From 8c8b3f668b753026823535db0bcd21ee9c7f8269 Mon Sep 17 00:00:00 2001 From: Luca Abeni Date: Fri, 23 May 2008 14:30:27 +0200 Subject: [PATCH] First import --- xorg-server-1.4/COPYING | 2713 + xorg-server-1.4/ChangeLog | 28152 ++++ xorg-server-1.4/GL/Makefile.am | 16 + xorg-server-1.4/GL/Makefile.in | 679 + xorg-server-1.4/GL/apple/Makefile.am | 15 + xorg-server-1.4/GL/apple/Makefile.in | 681 + xorg-server-1.4/GL/apple/aglGlx.c | 1354 + xorg-server-1.4/GL/glx/Makefile.am | 83 + xorg-server-1.4/GL/glx/Makefile.in | 743 + xorg-server-1.4/GL/glx/extension_string.c | 165 + xorg-server-1.4/GL/glx/extension_string.h | 63 + xorg-server-1.4/GL/glx/g_disptab.h | 53 + xorg-server-1.4/GL/glx/glxbyteorder.h | 61 + xorg-server-1.4/GL/glx/glxcmds.c | 2466 + xorg-server-1.4/GL/glx/glxcmdsswap.c | 714 + xorg-server-1.4/GL/glx/glxcontext.h | 174 + xorg-server-1.4/GL/glx/glxdrawable.h | 110 + xorg-server-1.4/GL/glx/glxdri.c | 1249 + xorg-server-1.4/GL/glx/glxext.c | 570 + xorg-server-1.4/GL/glx/glxext.h | 130 + xorg-server-1.4/GL/glx/glxglcore.c | 414 + xorg-server-1.4/GL/glx/glxscreens.c | 368 + xorg-server-1.4/GL/glx/glxscreens.h | 96 + xorg-server-1.4/GL/glx/glxserver.h | 257 + xorg-server-1.4/GL/glx/glxutil.c | 156 + xorg-server-1.4/GL/glx/glxutil.h | 63 + xorg-server-1.4/GL/glx/glxvisuals.c | 518 + xorg-server-1.4/GL/glx/indirect_dispatch.c | 5914 + xorg-server-1.4/GL/glx/indirect_dispatch.h | 1045 + xorg-server-1.4/GL/glx/indirect_dispatch_swap.c | 6076 + xorg-server-1.4/GL/glx/indirect_program.c | 150 + xorg-server-1.4/GL/glx/indirect_reqsize.c | 832 + xorg-server-1.4/GL/glx/indirect_reqsize.h | 121 + xorg-server-1.4/GL/glx/indirect_size_get.c | 1192 + xorg-server-1.4/GL/glx/indirect_size_get.h | 102 + xorg-server-1.4/GL/glx/indirect_table.c | 1596 + xorg-server-1.4/GL/glx/indirect_table.h | 106 + .../GL/glx/indirect_texture_compression.c | 120 + xorg-server-1.4/GL/glx/indirect_util.c | 310 + xorg-server-1.4/GL/glx/indirect_util.h | 53 + xorg-server-1.4/GL/glx/render2.c | 264 + xorg-server-1.4/GL/glx/render2swap.c | 375 + xorg-server-1.4/GL/glx/renderpix.c | 75 + xorg-server-1.4/GL/glx/renderpixswap.c | 93 + xorg-server-1.4/GL/glx/rensize.c | 423 + xorg-server-1.4/GL/glx/single2.c | 394 + xorg-server-1.4/GL/glx/single2swap.c | 272 + xorg-server-1.4/GL/glx/singlepix.c | 533 + xorg-server-1.4/GL/glx/singlepixswap.c | 584 + xorg-server-1.4/GL/glx/singlesize.c | 198 + xorg-server-1.4/GL/glx/singlesize.h | 59 + xorg-server-1.4/GL/glx/swap_interval.c | 92 + xorg-server-1.4/GL/glx/unpack.h | 239 + xorg-server-1.4/GL/glx/xfont.c | 201 + xorg-server-1.4/GL/mesa/Makefile.am | 15 + xorg-server-1.4/GL/mesa/Makefile.in | 747 + xorg-server-1.4/GL/mesa/X/Makefile.am | 33 + xorg-server-1.4/GL/mesa/X/Makefile.in | 665 + xorg-server-1.4/GL/mesa/dummy.c | 0 xorg-server-1.4/GL/mesa/glapi/Makefile.am | 20 + xorg-server-1.4/GL/mesa/glapi/Makefile.in | 636 + xorg-server-1.4/GL/mesa/main/Makefile.am | 86 + xorg-server-1.4/GL/mesa/main/Makefile.in | 774 + xorg-server-1.4/GL/mesa/math/Makefile.am | 27 + xorg-server-1.4/GL/mesa/math/Makefile.in | 652 + xorg-server-1.4/GL/mesa/shader/Makefile.am | 39 + xorg-server-1.4/GL/mesa/shader/Makefile.in | 786 + xorg-server-1.4/GL/mesa/shader/grammar/Makefile.am | 20 + xorg-server-1.4/GL/mesa/shader/grammar/Makefile.in | 635 + xorg-server-1.4/GL/mesa/shader/slang/Makefile.am | 41 + xorg-server-1.4/GL/mesa/shader/slang/Makefile.in | 684 + xorg-server-1.4/GL/mesa/swrast/Makefile.am | 50 + xorg-server-1.4/GL/mesa/swrast/Makefile.in | 700 + xorg-server-1.4/GL/mesa/swrast_setup/Makefile.am | 20 + xorg-server-1.4/GL/mesa/swrast_setup/Makefile.in | 636 + xorg-server-1.4/GL/mesa/tnl/Makefile.am | 37 + xorg-server-1.4/GL/mesa/tnl/Makefile.in | 673 + xorg-server-1.4/GL/mesa/vbo/Makefile.am | 35 + xorg-server-1.4/GL/mesa/vbo/Makefile.in | 668 + xorg-server-1.4/GL/symlink-mesa.sh | 336 + xorg-server-1.4/GL/windows/ChangeLog | 64 + xorg-server-1.4/GL/windows/glwindows.h | 64 + xorg-server-1.4/GL/windows/glwrap.c | 583 + xorg-server-1.4/GL/windows/indirect.c | 1605 + xorg-server-1.4/Makefile.am | 109 + xorg-server-1.4/Makefile.in | 932 + xorg-server-1.4/XTrap/Makefile.am | 5 + xorg-server-1.4/XTrap/Makefile.in | 623 + xorg-server-1.4/XTrap/xtrapddmi.c | 160 + xorg-server-1.4/XTrap/xtrapdi.c | 2151 + xorg-server-1.4/XTrap/xtrapdiswp.c | 937 + xorg-server-1.4/XTrap/xtrapditbl.c | 243 + xorg-server-1.4/Xext/EVI.c | 200 + xorg-server-1.4/Xext/EVIstruct.h | 58 + xorg-server-1.4/Xext/Makefile.am | 181 + xorg-server-1.4/Xext/Makefile.in | 903 + xorg-server-1.4/Xext/SecurityPolicy | 88 + xorg-server-1.4/Xext/appgroup.c | 773 + xorg-server-1.4/Xext/appgroup.h | 67 + xorg-server-1.4/Xext/bigreq.c | 105 + xorg-server-1.4/Xext/cup.c | 358 + xorg-server-1.4/Xext/dpms.c | 448 + xorg-server-1.4/Xext/dpmsproc.h | 15 + xorg-server-1.4/Xext/dpmsstubs.c | 52 + xorg-server-1.4/Xext/fontcache.c | 330 + xorg-server-1.4/Xext/mbuf.c | 1782 + xorg-server-1.4/Xext/mbufbf.c | 1028 + xorg-server-1.4/Xext/mbufpx.c | 649 + xorg-server-1.4/Xext/mitmisc.c | 168 + xorg-server-1.4/Xext/panoramiX.c | 1265 + xorg-server-1.4/Xext/panoramiX.h | 100 + xorg-server-1.4/Xext/panoramiXSwap.c | 142 + xorg-server-1.4/Xext/panoramiXh.h | 74 + xorg-server-1.4/Xext/panoramiXprocs.c | 2390 + xorg-server-1.4/Xext/panoramiXsrv.h | 46 + xorg-server-1.4/Xext/sampleEVI.c | 104 + xorg-server-1.4/Xext/saver.c | 1557 + xorg-server-1.4/Xext/security.c | 1939 + xorg-server-1.4/Xext/securitysrv.h | 89 + xorg-server-1.4/Xext/shape.c | 1335 + xorg-server-1.4/Xext/shm.c | 1257 + xorg-server-1.4/Xext/shmint.h | 42 + xorg-server-1.4/Xext/sleepuntil.c | 237 + xorg-server-1.4/Xext/sleepuntil.h | 46 + xorg-server-1.4/Xext/sync.c | 2642 + xorg-server-1.4/Xext/xace.c | 498 + xorg-server-1.4/Xext/xace.h | 109 + xorg-server-1.4/Xext/xacestr.h | 135 + xorg-server-1.4/Xext/xcalibrate.c | 260 + xorg-server-1.4/Xext/xcmisc.c | 251 + xorg-server-1.4/Xext/xevie.c | 708 + xorg-server-1.4/Xext/xf86bigfont.c | 788 + xorg-server-1.4/Xext/xprint.c | 2762 + xorg-server-1.4/Xext/xres.c | 401 + xorg-server-1.4/Xext/xtest.c | 603 + xorg-server-1.4/Xext/xvdisp.c | 2206 + xorg-server-1.4/Xext/xvdisp.h | 1 + xorg-server-1.4/Xext/xvdix.h | 290 + xorg-server-1.4/Xext/xvmain.c | 1199 + xorg-server-1.4/Xext/xvmc.c | 797 + xorg-server-1.4/Xext/xvmcext.h | 115 + xorg-server-1.4/Xi/Makefile.am | 80 + xorg-server-1.4/Xi/Makefile.in | 737 + xorg-server-1.4/Xi/allowev.c | 137 + xorg-server-1.4/Xi/allowev.h | 39 + xorg-server-1.4/Xi/chgdctl.c | 295 + xorg-server-1.4/Xi/chgdctl.h | 44 + xorg-server-1.4/Xi/chgfctl.c | 588 + xorg-server-1.4/Xi/chgfctl.h | 39 + xorg-server-1.4/Xi/chgkbd.c | 107 + xorg-server-1.4/Xi/chgkbd.h | 39 + xorg-server-1.4/Xi/chgkmap.c | 128 + xorg-server-1.4/Xi/chgkmap.h | 39 + xorg-server-1.4/Xi/chgprop.c | 164 + xorg-server-1.4/Xi/chgprop.h | 39 + xorg-server-1.4/Xi/chgptr.c | 110 + xorg-server-1.4/Xi/chgptr.h | 48 + xorg-server-1.4/Xi/closedev.c | 175 + xorg-server-1.4/Xi/closedev.h | 39 + xorg-server-1.4/Xi/devbell.c | 159 + xorg-server-1.4/Xi/devbell.h | 39 + xorg-server-1.4/Xi/exevents.c | 1260 + xorg-server-1.4/Xi/exglobals.h | 74 + xorg-server-1.4/Xi/extinit.c | 986 + xorg-server-1.4/Xi/getbmap.c | 144 + xorg-server-1.4/Xi/getbmap.h | 44 + xorg-server-1.4/Xi/getdctl.c | 334 + xorg-server-1.4/Xi/getdctl.h | 44 + xorg-server-1.4/Xi/getfctl.c | 378 + xorg-server-1.4/Xi/getfctl.h | 44 + xorg-server-1.4/Xi/getfocus.c | 148 + xorg-server-1.4/Xi/getfocus.h | 44 + xorg-server-1.4/Xi/getkmap.c | 162 + xorg-server-1.4/Xi/getkmap.h | 44 + xorg-server-1.4/Xi/getmmap.c | 149 + xorg-server-1.4/Xi/getmmap.h | 44 + xorg-server-1.4/Xi/getprop.c | 196 + xorg-server-1.4/Xi/getprop.h | 51 + xorg-server-1.4/Xi/getselev.c | 187 + xorg-server-1.4/Xi/getselev.h | 44 + xorg-server-1.4/Xi/getvers.c | 146 + xorg-server-1.4/Xi/getvers.h | 44 + xorg-server-1.4/Xi/grabdev.c | 210 + xorg-server-1.4/Xi/grabdev.h | 52 + xorg-server-1.4/Xi/grabdevb.c | 159 + xorg-server-1.4/Xi/grabdevb.h | 39 + xorg-server-1.4/Xi/grabdevk.c | 160 + xorg-server-1.4/Xi/grabdevk.h | 39 + xorg-server-1.4/Xi/gtmotion.c | 197 + xorg-server-1.4/Xi/gtmotion.h | 44 + xorg-server-1.4/Xi/listdev.c | 375 + xorg-server-1.4/Xi/listdev.h | 44 + xorg-server-1.4/Xi/opendev.c | 183 + xorg-server-1.4/Xi/opendev.h | 44 + xorg-server-1.4/Xi/queryst.c | 195 + xorg-server-1.4/Xi/queryst.h | 44 + xorg-server-1.4/Xi/selectev.c | 204 + xorg-server-1.4/Xi/selectev.h | 39 + xorg-server-1.4/Xi/sendexev.c | 168 + xorg-server-1.4/Xi/sendexev.h | 39 + xorg-server-1.4/Xi/setbmap.c | 157 + xorg-server-1.4/Xi/setbmap.h | 44 + xorg-server-1.4/Xi/setdval.c | 160 + xorg-server-1.4/Xi/setdval.h | 44 + xorg-server-1.4/Xi/setfocus.c | 120 + xorg-server-1.4/Xi/setfocus.h | 39 + xorg-server-1.4/Xi/setmmap.c | 153 + xorg-server-1.4/Xi/setmmap.h | 44 + xorg-server-1.4/Xi/setmode.c | 147 + xorg-server-1.4/Xi/setmode.h | 44 + xorg-server-1.4/Xi/stubs.c | 244 + xorg-server-1.4/Xi/ungrdev.c | 117 + xorg-server-1.4/Xi/ungrdev.h | 39 + xorg-server-1.4/Xi/ungrdevb.c | 162 + xorg-server-1.4/Xi/ungrdevb.h | 39 + xorg-server-1.4/Xi/ungrdevk.c | 166 + xorg-server-1.4/Xi/ungrdevk.h | 39 + xorg-server-1.4/acinclude.m4 | 47 + xorg-server-1.4/aclocal.m4 | 8062 + xorg-server-1.4/afb/Makefile.am | 51 + xorg-server-1.4/afb/Makefile.in | 739 + xorg-server-1.4/afb/README | 10 + xorg-server-1.4/afb/Xdaniver.doc | 218 + xorg-server-1.4/afb/afb.h | 1001 + xorg-server-1.4/afb/afbbitblt.c | 343 + xorg-server-1.4/afb/afbblt.c | 563 + xorg-server-1.4/afb/afbbltC.c | 2 + xorg-server-1.4/afb/afbbltCI.c | 2 + xorg-server-1.4/afb/afbbltG.c | 2 + xorg-server-1.4/afb/afbbltO.c | 2 + xorg-server-1.4/afb/afbbltX.c | 2 + xorg-server-1.4/afb/afbbres.c | 323 + xorg-server-1.4/afb/afbbresd.c | 214 + xorg-server-1.4/afb/afbbstore.c | 154 + xorg-server-1.4/afb/afbclip.c | 248 + xorg-server-1.4/afb/afbcmap.c | 84 + xorg-server-1.4/afb/afbfillarc.c | 346 + xorg-server-1.4/afb/afbfillrct.c | 291 + xorg-server-1.4/afb/afbfillsp.c | 1129 + xorg-server-1.4/afb/afbfont.c | 77 + xorg-server-1.4/afb/afbgc.c | 684 + xorg-server-1.4/afb/afbgetsp.c | 165 + xorg-server-1.4/afb/afbhrzvert.c | 209 + xorg-server-1.4/afb/afbimage.c | 271 + xorg-server-1.4/afb/afbimggblt.c | 472 + xorg-server-1.4/afb/afbline.c | 705 + xorg-server-1.4/afb/afbmisc.c | 94 + xorg-server-1.4/afb/afbpixmap.c | 294 + xorg-server-1.4/afb/afbply1rct.c | 300 + xorg-server-1.4/afb/afbplygblt.c | 463 + xorg-server-1.4/afb/afbpntarea.c | 655 + xorg-server-1.4/afb/afbpntwin.c | 126 + xorg-server-1.4/afb/afbpolypnt.c | 146 + xorg-server-1.4/afb/afbpushpxl.c | 169 + xorg-server-1.4/afb/afbscrinit.c | 240 + xorg-server-1.4/afb/afbseg.c | 2 + xorg-server-1.4/afb/afbsetsp.c | 257 + xorg-server-1.4/afb/afbtegblt.c | 586 + xorg-server-1.4/afb/afbtile.c | 857 + xorg-server-1.4/afb/afbtileC.c | 2 + xorg-server-1.4/afb/afbtileG.c | 2 + xorg-server-1.4/afb/afbwindow.c | 318 + xorg-server-1.4/afb/afbzerarc.c | 201 + xorg-server-1.4/autogen.sh | 12 + xorg-server-1.4/cfb/Makefile.am | 22 + xorg-server-1.4/cfb/Makefile.am.inc | 153 + xorg-server-1.4/cfb/Makefile.in | 1053 + xorg-server-1.4/cfb/cfb.h | 1319 + xorg-server-1.4/cfb/cfb16.h | 93 + xorg-server-1.4/cfb/cfb24.h | 97 + xorg-server-1.4/cfb/cfb32.h | 93 + xorg-server-1.4/cfb/cfb8bit.c | 469 + xorg-server-1.4/cfb/cfb8bit.h | 1570 + xorg-server-1.4/cfb/cfb8line.c | 1503 + xorg-server-1.4/cfb/cfb8lineCO.c | 2 + xorg-server-1.4/cfb/cfb8lineCP.c | 3 + xorg-server-1.4/cfb/cfb8lineG.c | 2 + xorg-server-1.4/cfb/cfb8lineX.c | 2 + xorg-server-1.4/cfb/cfb8segC.c | 3 + xorg-server-1.4/cfb/cfb8segCS.c | 4 + xorg-server-1.4/cfb/cfb8segX.c | 3 + xorg-server-1.4/cfb/cfb8setG.c | 3 + xorg-server-1.4/cfb/cfballpriv.c | 92 + xorg-server-1.4/cfb/cfbbitblt.c | 1454 + xorg-server-1.4/cfb/cfbblt.c | 933 + xorg-server-1.4/cfb/cfbbltC.c | 2 + xorg-server-1.4/cfb/cfbbltG.c | 2 + xorg-server-1.4/cfb/cfbbltO.c | 2 + xorg-server-1.4/cfb/cfbbltX.c | 2 + xorg-server-1.4/cfb/cfbbres.c | 340 + xorg-server-1.4/cfb/cfbbresd.c | 404 + xorg-server-1.4/cfb/cfbbstore.c | 143 + xorg-server-1.4/cfb/cfbcmap.c | 119 + xorg-server-1.4/cfb/cfbcppl.c | 488 + xorg-server-1.4/cfb/cfbfillarc.c | 374 + xorg-server-1.4/cfb/cfbfillarcC.c | 2 + xorg-server-1.4/cfb/cfbfillarcG.c | 2 + xorg-server-1.4/cfb/cfbfillrct.c | 305 + xorg-server-1.4/cfb/cfbfillsp.c | 1004 + xorg-server-1.4/cfb/cfbgc.c | 799 + xorg-server-1.4/cfb/cfbgetsp.c | 213 + xorg-server-1.4/cfb/cfbglblt8.c | 477 + xorg-server-1.4/cfb/cfbglrop8.c | 2 + xorg-server-1.4/cfb/cfbhrzvert.c | 554 + xorg-server-1.4/cfb/cfbigblt8.c | 106 + xorg-server-1.4/cfb/cfbimage.c | 206 + xorg-server-1.4/cfb/cfbline.c | 756 + xorg-server-1.4/cfb/cfbmap.h | 342 + xorg-server-1.4/cfb/cfbmskbits.c | 1400 + xorg-server-1.4/cfb/cfbmskbits.h | 891 + xorg-server-1.4/cfb/cfbpixmap.c | 372 + xorg-server-1.4/cfb/cfbply1rct.c | 363 + xorg-server-1.4/cfb/cfbply1rctC.c | 2 + xorg-server-1.4/cfb/cfbply1rctG.c | 2 + xorg-server-1.4/cfb/cfbpntwin.c | 768 + xorg-server-1.4/cfb/cfbpolypnt.c | 202 + xorg-server-1.4/cfb/cfbpush8.c | 184 + xorg-server-1.4/cfb/cfbrctstp8.c | 593 + xorg-server-1.4/cfb/cfbrrop.c | 227 + xorg-server-1.4/cfb/cfbrrop.h | 342 + xorg-server-1.4/cfb/cfbscrinit.c | 230 + xorg-server-1.4/cfb/cfbseg.c | 2 + xorg-server-1.4/cfb/cfbsetsp.c | 316 + xorg-server-1.4/cfb/cfbsolid.c | 1365 + xorg-server-1.4/cfb/cfbsolidC.c | 2 + xorg-server-1.4/cfb/cfbsolidG.c | 2 + xorg-server-1.4/cfb/cfbsolidX.c | 2 + xorg-server-1.4/cfb/cfbtab.h | 14 + xorg-server-1.4/cfb/cfbteblt8.c | 589 + xorg-server-1.4/cfb/cfbtegblt.c | 218 + xorg-server-1.4/cfb/cfbtile32.c | 517 + xorg-server-1.4/cfb/cfbtile32C.c | 2 + xorg-server-1.4/cfb/cfbtile32G.c | 2 + xorg-server-1.4/cfb/cfbtileodd.c | 1245 + xorg-server-1.4/cfb/cfbtileoddC.c | 2 + xorg-server-1.4/cfb/cfbtileoddG.c | 2 + xorg-server-1.4/cfb/cfbunmap.h | 164 + xorg-server-1.4/cfb/cfbwindow.c | 337 + xorg-server-1.4/cfb/cfbzerarc.c | 322 + xorg-server-1.4/cfb/cfbzerarcC.c | 2 + xorg-server-1.4/cfb/cfbzerarcG.c | 2 + xorg-server-1.4/cfb/cfbzerarcX.c | 2 + xorg-server-1.4/cfb/stip68kgnu.h | 121 + xorg-server-1.4/cfb/stipmips.s | 281 + xorg-server-1.4/cfb/stipsparc.s | 290 + xorg-server-1.4/cfb/stipsprc32.s | 291 + xorg-server-1.4/cfb32/Makefile.am | 9 + xorg-server-1.4/cfb32/Makefile.in | 1006 + xorg-server-1.4/cfb32/cfb8lineCO.c | 2 + xorg-server-1.4/cfb32/cfb8lineCP.c | 3 + xorg-server-1.4/cfb32/cfb8lineG.c | 2 + xorg-server-1.4/cfb32/cfb8lineX.c | 2 + xorg-server-1.4/cfb32/cfb8segC.c | 3 + xorg-server-1.4/cfb32/cfb8segCS.c | 4 + xorg-server-1.4/cfb32/cfb8segX.c | 3 + xorg-server-1.4/cfb32/cfb8setG.c | 3 + xorg-server-1.4/cfb32/cfbbltC.c | 2 + xorg-server-1.4/cfb32/cfbbltG.c | 2 + xorg-server-1.4/cfb32/cfbbltO.c | 2 + xorg-server-1.4/cfb32/cfbbltX.c | 2 + xorg-server-1.4/cfb32/cfbfillarcC.c | 2 + xorg-server-1.4/cfb32/cfbfillarcG.c | 2 + xorg-server-1.4/cfb32/cfbply1rctC.c | 2 + xorg-server-1.4/cfb32/cfbply1rctG.c | 2 + xorg-server-1.4/cfb32/cfbseg.c | 2 + xorg-server-1.4/cfb32/cfbsolidC.c | 2 + xorg-server-1.4/cfb32/cfbsolidG.c | 2 + xorg-server-1.4/cfb32/cfbsolidX.c | 2 + xorg-server-1.4/cfb32/cfbtile32C.c | 2 + xorg-server-1.4/cfb32/cfbtile32G.c | 2 + xorg-server-1.4/cfb32/cfbtileoddC.c | 2 + xorg-server-1.4/cfb32/cfbtileoddG.c | 2 + xorg-server-1.4/cfb32/cfbzerarcC.c | 2 + xorg-server-1.4/cfb32/cfbzerarcG.c | 2 + xorg-server-1.4/cfb32/cfbzerarcX.c | 2 + xorg-server-1.4/composite/Makefile.am | 10 + xorg-server-1.4/composite/Makefile.in | 629 + xorg-server-1.4/composite/compalloc.c | 630 + xorg-server-1.4/composite/compext.c | 734 + xorg-server-1.4/composite/compinit.c | 438 + xorg-server-1.4/composite/compint.h | 299 + xorg-server-1.4/composite/compwindow.c | 813 + xorg-server-1.4/config.guess | 1407 + xorg-server-1.4/config.sub | 1504 + xorg-server-1.4/config/Makefile.am | 22 + xorg-server-1.4/config/Makefile.in | 665 + xorg-server-1.4/config/config-backends.h | 59 + xorg-server-1.4/config/config.c | 66 + xorg-server-1.4/config/dbus-core.c | 243 + xorg-server-1.4/config/dbus.c | 441 + xorg-server-1.4/config/hal.c | 370 + xorg-server-1.4/config/x11-input.fdi | 31 + xorg-server-1.4/config/xorg-server.conf | 13 + xorg-server-1.4/configure | 39515 +++++ xorg-server-1.4/configure.ac | 2154 + xorg-server-1.4/cpprules.in | 46 + xorg-server-1.4/damageext/Makefile.am | 8 + xorg-server-1.4/damageext/Makefile.in | 623 + xorg-server-1.4/damageext/damageext.c | 532 + xorg-server-1.4/damageext/damageext.h | 33 + xorg-server-1.4/damageext/damageextint.h | 72 + xorg-server-1.4/dbe/Makefile.am | 13 + xorg-server-1.4/dbe/Makefile.in | 659 + xorg-server-1.4/dbe/dbe.c | 1927 + xorg-server-1.4/dbe/dbestruct.h | 230 + xorg-server-1.4/dbe/midbe.c | 821 + xorg-server-1.4/dbe/midbe.h | 47 + xorg-server-1.4/dbe/midbestr.h | 99 + xorg-server-1.4/depcomp | 584 + xorg-server-1.4/dix/BuiltInAtoms | 329 + xorg-server-1.4/dix/CHANGES | 17 + xorg-server-1.4/dix/Makefile.am | 64 + xorg-server-1.4/dix/Makefile.in | 732 + xorg-server-1.4/dix/Xserver-dtrace.h.in | 100 + xorg-server-1.4/dix/Xserver.d | 59 + xorg-server-1.4/dix/atom.c | 213 + xorg-server-1.4/dix/buildatoms | 43 + xorg-server-1.4/dix/colormap.c | 2699 + xorg-server-1.4/dix/cursor.c | 473 + xorg-server-1.4/dix/devices.c | 2053 + xorg-server-1.4/dix/dispatch.c | 4094 + xorg-server-1.4/dix/dispatch.h | 146 + xorg-server-1.4/dix/dix.c | 0 xorg-server-1.4/dix/dixfonts.c | 2079 + xorg-server-1.4/dix/dixutils.c | 965 + xorg-server-1.4/dix/events.c | 5024 + xorg-server-1.4/dix/extension.c | 406 + xorg-server-1.4/dix/ffs.c | 44 + xorg-server-1.4/dix/gc.c | 1275 + xorg-server-1.4/dix/getevents.c | 842 + xorg-server-1.4/dix/globals.c | 161 + xorg-server-1.4/dix/glyphcurs.c | 193 + xorg-server-1.4/dix/grabs.c | 483 + xorg-server-1.4/dix/initatoms.c | 84 + xorg-server-1.4/dix/main.c | 786 + xorg-server-1.4/dix/pixmap.c | 147 + xorg-server-1.4/dix/privates.c | 454 + xorg-server-1.4/dix/property.c | 635 + xorg-server-1.4/dix/resource.c | 953 + xorg-server-1.4/dix/strcasecmp.c | 48 + xorg-server-1.4/dix/swaprep.c | 1298 + xorg-server-1.4/dix/swapreq.c | 1100 + xorg-server-1.4/dix/tables.c | 512 + xorg-server-1.4/dix/window.c | 3889 + xorg-server-1.4/dix/xpstubs.c | 78 + xorg-server-1.4/doc/Makefile.am | 35 + xorg-server-1.4/doc/Makefile.in | 636 + xorg-server-1.4/doc/SecurityPolicy.man.pre | 258 + xorg-server-1.4/doc/Xserver.man.pre | 583 + xorg-server-1.4/doc/smartsched | 204 + xorg-server-1.4/exa/Makefile.am | 26 + xorg-server-1.4/exa/Makefile.in | 675 + xorg-server-1.4/exa/exa.c | 809 + xorg-server-1.4/exa/exa.h | 753 + xorg-server-1.4/exa/exa_accel.c | 1378 + xorg-server-1.4/exa/exa_migration.c | 638 + xorg-server-1.4/exa/exa_offscreen.c | 497 + xorg-server-1.4/exa/exa_priv.h | 427 + xorg-server-1.4/exa/exa_render.c | 1284 + xorg-server-1.4/exa/exa_unaccel.c | 416 + xorg-server-1.4/fb/Makefile.am | 59 + xorg-server-1.4/fb/Makefile.in | 1231 + xorg-server-1.4/fb/fb.h | 2123 + xorg-server-1.4/fb/fb24_32.c | 637 + xorg-server-1.4/fb/fb24_32.h | 51 + xorg-server-1.4/fb/fballpriv.c | 91 + xorg-server-1.4/fb/fbarc.c | 118 + xorg-server-1.4/fb/fbbits.c | 176 + xorg-server-1.4/fb/fbbits.h | 971 + xorg-server-1.4/fb/fbblt.c | 954 + xorg-server-1.4/fb/fbbltone.c | 879 + xorg-server-1.4/fb/fbbstore.c | 63 + xorg-server-1.4/fb/fbcmap.c | 591 + xorg-server-1.4/fb/fbcmap_mi.c | 123 + xorg-server-1.4/fb/fbcopy.c | 664 + xorg-server-1.4/fb/fbfill.c | 230 + xorg-server-1.4/fb/fbfillrect.c | 112 + xorg-server-1.4/fb/fbfillsp.c | 100 + xorg-server-1.4/fb/fbgc.c | 319 + xorg-server-1.4/fb/fbgetsp.c | 87 + xorg-server-1.4/fb/fbglyph.c | 481 + xorg-server-1.4/fb/fbimage.c | 368 + xorg-server-1.4/fb/fbline.c | 175 + xorg-server-1.4/fb/fboverlay.c | 454 + xorg-server-1.4/fb/fboverlay.h | 128 + xorg-server-1.4/fb/fbpict.c | 471 + xorg-server-1.4/fb/fbpict.h | 482 + xorg-server-1.4/fb/fbpixmap.c | 387 + xorg-server-1.4/fb/fbpoint.c | 162 + xorg-server-1.4/fb/fbpseudocolor.c | 2338 + xorg-server-1.4/fb/fbpseudocolor.h | 20 + xorg-server-1.4/fb/fbpush.c | 245 + xorg-server-1.4/fb/fbrop.h | 136 + xorg-server-1.4/fb/fbscreen.c | 307 + xorg-server-1.4/fb/fbseg.c | 734 + xorg-server-1.4/fb/fbsetsp.c | 102 + xorg-server-1.4/fb/fbsolid.c | 213 + xorg-server-1.4/fb/fbstipple.c | 312 + xorg-server-1.4/fb/fbtile.c | 203 + xorg-server-1.4/fb/fbtrap.c | 161 + xorg-server-1.4/fb/fbutil.c | 362 + xorg-server-1.4/fb/fbwindow.c | 372 + xorg-server-1.4/fb/wfbrename.h | 201 + xorg-server-1.4/hw/Makefile.am | 59 + xorg-server-1.4/hw/Makefile.in | 692 + xorg-server-1.4/hw/darwin/Makefile.am | 287 + xorg-server-1.4/hw/darwin/Makefile.in | 2090 + xorg-server-1.4/hw/darwin/XDarwin.man | 205 + xorg-server-1.4/hw/darwin/apple/X11Application.m | 926 + xorg-server-1.4/hw/darwin/apple/X11Controller.m | 752 + .../hw/darwin/bundle/Dutch.lproj/Credits.rtf | 168 + .../darwin/bundle/Dutch.lproj/Localizable.strings | Bin 0 -> 1426 bytes .../bundle/Dutch.lproj/MainMenu.nib/classes.nib | 72 + .../bundle/Dutch.lproj/MainMenu.nib/objects.nib | Bin 0 -> 22024 bytes .../hw/darwin/bundle/Dutch.lproj/Makefile.am | 35 + .../hw/darwin/bundle/Dutch.lproj/Makefile.in | 638 + .../darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp | 103 + .../hw/darwin/bundle/English.lproj/Credits.rtf | 168 + .../bundle/English.lproj/InfoPlist.strings.cpp | 5 + .../bundle/English.lproj/Localizable.strings | 23 + .../bundle/English.lproj/MainMenu.nib/classes.nib | 72 + .../bundle/English.lproj/MainMenu.nib/objects.nib | Bin 0 -> 20829 bytes .../hw/darwin/bundle/English.lproj/Makefile.am | 35 + .../hw/darwin/bundle/English.lproj/Makefile.in | 639 + .../bundle/English.lproj/XDarwinHelp.html.cpp | 96 + .../hw/darwin/bundle/French.lproj/Credits.rtf | 166 + .../darwin/bundle/French.lproj/Localizable.strings | Bin 0 -> 1492 bytes .../bundle/French.lproj/MainMenu.nib/classes.nib | 72 + .../bundle/French.lproj/MainMenu.nib/objects.nib | Bin 0 -> 21114 bytes .../hw/darwin/bundle/French.lproj/Makefile.am | 38 + .../hw/darwin/bundle/French.lproj/Makefile.in | 639 + .../bundle/French.lproj/XDarwinHelp.html.cpp | 101 + .../hw/darwin/bundle/German.lproj/Credits.rtf | 168 + .../darwin/bundle/German.lproj/Localizable.strings | Bin 0 -> 1458 bytes .../bundle/German.lproj/MainMenu.nib/classes.nib | 72 + .../bundle/German.lproj/MainMenu.nib/objects.nib | Bin 0 -> 21182 bytes .../hw/darwin/bundle/German.lproj/Makefile.am | 36 + .../hw/darwin/bundle/German.lproj/Makefile.in | 639 + .../bundle/German.lproj/XDarwinHelp.html.cpp | 96 + xorg-server-1.4/hw/darwin/bundle/Info.plist | 66 + .../hw/darwin/bundle/Japanese.lproj/Credits.rtf | 193 + .../bundle/Japanese.lproj/Localizable.strings | Bin 0 -> 1152 bytes .../bundle/Japanese.lproj/MainMenu.nib/classes.nib | 72 + .../bundle/Japanese.lproj/MainMenu.nib/objects.nib | Bin 0 -> 21854 bytes .../hw/darwin/bundle/Japanese.lproj/Makefile.am | 37 + .../hw/darwin/bundle/Japanese.lproj/Makefile.in | 641 + .../bundle/Japanese.lproj/XDarwinHelp.html.cpp | 141 + xorg-server-1.4/hw/darwin/bundle/Makefile.am | 38 + xorg-server-1.4/hw/darwin/bundle/Makefile.in | 827 + .../hw/darwin/bundle/Portuguese.lproj/Credits.rtf | 171 + .../bundle/Portuguese.lproj/Localizable.strings | Bin 0 -> 1504 bytes .../Portuguese.lproj/MainMenu.nib/classes.nib | 72 + .../Portuguese.lproj/MainMenu.nib/objects.nib | Bin 0 -> 21112 bytes .../hw/darwin/bundle/Portuguese.lproj/Makefile.am | 36 + .../hw/darwin/bundle/Portuguese.lproj/Makefile.in | 641 + .../bundle/Portuguese.lproj/XDarwinHelp.html.cpp | 211 + .../hw/darwin/bundle/Spanish.lproj/Credits.rtf | 168 + .../bundle/Spanish.lproj/Localizable.strings | Bin 0 -> 1480 bytes .../bundle/Spanish.lproj/MainMenu.nib/classes.nib | 72 + .../bundle/Spanish.lproj/MainMenu.nib/objects.nib | Bin 0 -> 20952 bytes .../hw/darwin/bundle/Spanish.lproj/Makefile.am | 36 + .../hw/darwin/bundle/Spanish.lproj/Makefile.in | 639 + .../bundle/Spanish.lproj/XDarwinHelp.html.cpp | 111 + .../hw/darwin/bundle/Swedish.lproj/Credits.rtf | 168 + .../bundle/Swedish.lproj/Localizable.strings | Bin 0 -> 1464 bytes .../bundle/Swedish.lproj/MainMenu.nib/classes.nib | 72 + .../bundle/Swedish.lproj/MainMenu.nib/objects.nib | Bin 0 -> 20858 bytes .../hw/darwin/bundle/Swedish.lproj/Makefile.am | 36 + .../hw/darwin/bundle/Swedish.lproj/Makefile.in | 639 + .../bundle/Swedish.lproj/XDarwinHelp.html.cpp | 103 + xorg-server-1.4/hw/darwin/bundle/XDarwin.icns | Bin 0 -> 69465 bytes .../hw/darwin/bundle/ko.lproj/Credits.rtf | 168 + .../hw/darwin/bundle/ko.lproj/Localizable.strings | Bin 0 -> 1332 bytes .../bundle/ko.lproj/MainMenu.nib/classes.nib | 72 + .../bundle/ko.lproj/MainMenu.nib/objects.nib | Bin 0 -> 21433 bytes .../hw/darwin/bundle/ko.lproj/Makefile.am | 37 + .../hw/darwin/bundle/ko.lproj/Makefile.in | 638 + .../hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp | 96 + xorg-server-1.4/hw/darwin/darwin.c | 1116 + xorg-server-1.4/hw/darwin/darwin.h | 157 + xorg-server-1.4/hw/darwin/darwinClut8.h | 531 + xorg-server-1.4/hw/darwin/darwinEvents.c | 446 + xorg-server-1.4/hw/darwin/darwinKeyboard.c | 1026 + xorg-server-1.4/hw/darwin/darwinKeyboard.h | 51 + xorg-server-1.4/hw/darwin/darwinXinput.c | 308 + xorg-server-1.4/hw/darwin/iokit/Makefile.am | 17 + xorg-server-1.4/hw/darwin/iokit/Makefile.in | 630 + xorg-server-1.4/hw/darwin/iokit/xfIOKit.c | 775 + xorg-server-1.4/hw/darwin/iokit/xfIOKit.h | 56 + xorg-server-1.4/hw/darwin/iokit/xfIOKitCursor.c | 737 + xorg-server-1.4/hw/darwin/iokit/xfIOKitStartup.c | 134 + xorg-server-1.4/hw/darwin/quartz/Makefile.am | 54 + xorg-server-1.4/hw/darwin/quartz/Makefile.in | 801 + xorg-server-1.4/hw/darwin/quartz/Preferences.h | 137 + xorg-server-1.4/hw/darwin/quartz/Preferences.m | 599 + xorg-server-1.4/hw/darwin/quartz/XApplication.h | 46 + xorg-server-1.4/hw/darwin/quartz/XApplication.m | 47 + .../darwin/quartz/XDarwin.pbproj/project.pbxproj | 2519 + xorg-server-1.4/hw/darwin/quartz/XDarwinStartup.c | 163 + .../hw/darwin/quartz/XDarwinStartup.man | 75 + xorg-server-1.4/hw/darwin/quartz/XServer.h | 136 + xorg-server-1.4/hw/darwin/quartz/XServer.m | 1541 + xorg-server-1.4/hw/darwin/quartz/applewm.c | 730 + xorg-server-1.4/hw/darwin/quartz/applewmExt.h | 84 + xorg-server-1.4/hw/darwin/quartz/cr/XView.m | 76 + xorg-server-1.4/hw/darwin/quartz/cr/crAppleWM.m | 159 + xorg-server-1.4/hw/darwin/quartz/cr/crFrame.m | 441 + xorg-server-1.4/hw/darwin/quartz/cr/crScreen.m | 383 + .../hw/darwin/quartz/fullscreen/fullscreen.c | 569 + .../hw/darwin/quartz/fullscreen/quartzCursor.c | 654 + xorg-server-1.4/hw/darwin/quartz/keysym2ucs.c | 908 + xorg-server-1.4/hw/darwin/quartz/keysym2ucs.h | 36 + xorg-server-1.4/hw/darwin/quartz/pseudoramiX.c | 434 + xorg-server-1.4/hw/darwin/quartz/pseudoramiX.h | 9 + xorg-server-1.4/hw/darwin/quartz/quartz.c | 432 + xorg-server-1.4/hw/darwin/quartz/quartz.h | 129 + xorg-server-1.4/hw/darwin/quartz/quartzAudio.c | 344 + xorg-server-1.4/hw/darwin/quartz/quartzAudio.h | 40 + xorg-server-1.4/hw/darwin/quartz/quartzCocoa.m | 208 + xorg-server-1.4/hw/darwin/quartz/quartzCommon.h | 106 + xorg-server-1.4/hw/darwin/quartz/quartzCursor.c | 657 + xorg-server-1.4/hw/darwin/quartz/quartzCursor.h | 43 + xorg-server-1.4/hw/darwin/quartz/quartzKeyboard.c | 389 + .../hw/darwin/quartz/quartzPasteboard.c | 152 + .../hw/darwin/quartz/quartzPasteboard.h | 44 + xorg-server-1.4/hw/darwin/quartz/quartzStartup.c | 353 + xorg-server-1.4/hw/darwin/quartz/xpr/appledri.c | 350 + xorg-server-1.4/hw/darwin/quartz/xpr/dri.c | 754 + xorg-server-1.4/hw/darwin/quartz/xpr/x-hash.c | 341 + xorg-server-1.4/hw/darwin/quartz/xpr/x-hash.h | 60 + xorg-server-1.4/hw/darwin/quartz/xpr/x-hook.c | 106 + xorg-server-1.4/hw/darwin/quartz/xpr/x-list.c | 335 + xorg-server-1.4/hw/darwin/quartz/xpr/x-list.h | 77 + xorg-server-1.4/hw/darwin/quartz/xpr/xprAppleWM.c | 99 + xorg-server-1.4/hw/darwin/quartz/xpr/xprCursor.c | 421 + xorg-server-1.4/hw/darwin/quartz/xpr/xprFrame.c | 495 + xorg-server-1.4/hw/darwin/quartz/xpr/xprScreen.c | 404 + xorg-server-1.4/hw/darwin/utils/Makefile.am | 11 + xorg-server-1.4/hw/darwin/utils/Makefile.in | 703 + xorg-server-1.4/hw/darwin/utils/README.txt | 111 + xorg-server-1.4/hw/darwin/utils/dumpkeymap.c | 1453 + xorg-server-1.4/hw/darwin/utils/dumpkeymap.man | 1004 + xorg-server-1.4/hw/dmx/Makefile.am | 116 + xorg-server-1.4/hw/dmx/Makefile.in | 974 + xorg-server-1.4/hw/dmx/Xdmx.man | 741 + xorg-server-1.4/hw/dmx/config/Canvas.c | 159 + xorg-server-1.4/hw/dmx/config/Canvas.h | 55 + xorg-server-1.4/hw/dmx/config/CanvasP.h | 65 + xorg-server-1.4/hw/dmx/config/Makefile.am | 89 + xorg-server-1.4/hw/dmx/config/Makefile.in | 852 + xorg-server-1.4/hw/dmx/config/TODO | 7 + xorg-server-1.4/hw/dmx/config/dmxcompat.c | 236 + xorg-server-1.4/hw/dmx/config/dmxcompat.h | 44 + xorg-server-1.4/hw/dmx/config/dmxconfig.c | 498 + xorg-server-1.4/hw/dmx/config/dmxconfig.h | 64 + xorg-server-1.4/hw/dmx/config/dmxparse.c | 610 + xorg-server-1.4/hw/dmx/config/dmxparse.h | 297 + xorg-server-1.4/hw/dmx/config/dmxprint.c | 455 + xorg-server-1.4/hw/dmx/config/dmxprint.h | 43 + xorg-server-1.4/hw/dmx/config/dmxtodmx.c | 49 + xorg-server-1.4/hw/dmx/config/dmxtodmx.man | 41 + xorg-server-1.4/hw/dmx/config/parser.c | 1500 + xorg-server-1.4/hw/dmx/config/parser.h | 90 + xorg-server-1.4/hw/dmx/config/parser.y | 226 + xorg-server-1.4/hw/dmx/config/scanner.c | 1802 + xorg-server-1.4/hw/dmx/config/scanner.l | 184 + xorg-server-1.4/hw/dmx/config/test-a.in | 1 + xorg-server-1.4/hw/dmx/config/test-a.out | 2 + xorg-server-1.4/hw/dmx/config/test-b.in | 1 + xorg-server-1.4/hw/dmx/config/test-b.out | 1 + xorg-server-1.4/hw/dmx/config/test-c.in | 1 + xorg-server-1.4/hw/dmx/config/test-c.out | 2 + xorg-server-1.4/hw/dmx/config/test-d.in | 1 + xorg-server-1.4/hw/dmx/config/test-d.out | 2 + xorg-server-1.4/hw/dmx/config/test-e.in | 1 + xorg-server-1.4/hw/dmx/config/test-e.out | 2 + xorg-server-1.4/hw/dmx/config/test-f.in | 2 + xorg-server-1.4/hw/dmx/config/test-f.out | Bin 0 -> 69 bytes xorg-server-1.4/hw/dmx/config/test-g.in | 4 + xorg-server-1.4/hw/dmx/config/test-g.out | 4 + xorg-server-1.4/hw/dmx/config/test-h.in | 7 + xorg-server-1.4/hw/dmx/config/test-h.out | 7 + xorg-server-1.4/hw/dmx/config/test-i.in | 3 + xorg-server-1.4/hw/dmx/config/test-i.out | 3 + xorg-server-1.4/hw/dmx/config/test-j.in | 13 + xorg-server-1.4/hw/dmx/config/test-j.out | 11 + xorg-server-1.4/hw/dmx/config/test-k.in | 3 + xorg-server-1.4/hw/dmx/config/test-k.out | 3 + xorg-server-1.4/hw/dmx/config/test-l.in | 12 + xorg-server-1.4/hw/dmx/config/test-l.out | 12 + xorg-server-1.4/hw/dmx/config/vdltodmx.c | 57 + xorg-server-1.4/hw/dmx/config/vdltodmx.man | 95 + xorg-server-1.4/hw/dmx/config/xdmxconfig.c | 1191 + xorg-server-1.4/hw/dmx/config/xdmxconfig.man | 63 + xorg-server-1.4/hw/dmx/dmx-config.h | 97 + xorg-server-1.4/hw/dmx/dmx.c | 1132 + xorg-server-1.4/hw/dmx/dmx.h | 377 + xorg-server-1.4/hw/dmx/dmx_glxvisuals.c | 606 + xorg-server-1.4/hw/dmx/dmx_glxvisuals.h | 64 + xorg-server-1.4/hw/dmx/dmxcb.c | 223 + xorg-server-1.4/hw/dmx/dmxcb.h | 53 + xorg-server-1.4/hw/dmx/dmxclient.h | 151 + xorg-server-1.4/hw/dmx/dmxcmap.c | 226 + xorg-server-1.4/hw/dmx/dmxcmap.h | 70 + xorg-server-1.4/hw/dmx/dmxcursor.c | 978 + xorg-server-1.4/hw/dmx/dmxcursor.h | 69 + xorg-server-1.4/hw/dmx/dmxdpms.c | 212 + xorg-server-1.4/hw/dmx/dmxdpms.h | 42 + xorg-server-1.4/hw/dmx/dmxextension.c | 1626 + xorg-server-1.4/hw/dmx/dmxextension.h | 118 + xorg-server-1.4/hw/dmx/dmxfont.c | 558 + xorg-server-1.4/hw/dmx/dmxfont.h | 59 + xorg-server-1.4/hw/dmx/dmxgc.c | 423 + xorg-server-1.4/hw/dmx/dmxgc.h | 89 + xorg-server-1.4/hw/dmx/dmxgcops.c | 601 + xorg-server-1.4/hw/dmx/dmxgcops.h | 95 + xorg-server-1.4/hw/dmx/dmxinit.c | 1047 + xorg-server-1.4/hw/dmx/dmxinit.h | 50 + xorg-server-1.4/hw/dmx/dmxinput.c | 107 + xorg-server-1.4/hw/dmx/dmxinput.h | 162 + xorg-server-1.4/hw/dmx/dmxlog.c | 350 + xorg-server-1.4/hw/dmx/dmxlog.h | 78 + xorg-server-1.4/hw/dmx/dmxpict.c | 1316 + xorg-server-1.4/hw/dmx/dmxpict.h | 134 + xorg-server-1.4/hw/dmx/dmxpixmap.c | 250 + xorg-server-1.4/hw/dmx/dmxpixmap.h | 66 + xorg-server-1.4/hw/dmx/dmxprop.c | 347 + xorg-server-1.4/hw/dmx/dmxprop.h | 46 + xorg-server-1.4/hw/dmx/dmxscrinit.c | 559 + xorg-server-1.4/hw/dmx/dmxscrinit.h | 51 + xorg-server-1.4/hw/dmx/dmxshadow.c | 71 + xorg-server-1.4/hw/dmx/dmxshadow.h | 46 + xorg-server-1.4/hw/dmx/dmxstat.c | 222 + xorg-server-1.4/hw/dmx/dmxstat.h | 55 + xorg-server-1.4/hw/dmx/dmxsync.c | 193 + xorg-server-1.4/hw/dmx/dmxsync.h | 43 + xorg-server-1.4/hw/dmx/dmxvisual.c | 140 + xorg-server-1.4/hw/dmx/dmxvisual.h | 47 + xorg-server-1.4/hw/dmx/dmxwindow.c | 1084 + xorg-server-1.4/hw/dmx/dmxwindow.h | 148 + xorg-server-1.4/hw/dmx/doc/DMXSpec-v1.txt | 458 + xorg-server-1.4/hw/dmx/doc/DMXSpec.txt | 875 + xorg-server-1.4/hw/dmx/doc/Makefile.am | 310 + xorg-server-1.4/hw/dmx/doc/Makefile.in | 814 + xorg-server-1.4/hw/dmx/doc/dmx.sgml | 2778 + xorg-server-1.4/hw/dmx/doc/dmx.txt | 2989 + xorg-server-1.4/hw/dmx/doc/doxygen.conf | 1090 + xorg-server-1.4/hw/dmx/doc/doxygen.css | 49 + xorg-server-1.4/hw/dmx/doc/doxygen.foot | 12 + xorg-server-1.4/hw/dmx/doc/doxygen.head | 8 + .../hw/dmx/doc/html/ChkNotMaskEv_8c.html | 76 + .../hw/dmx/doc/html/ChkNotMaskEv_8h-source.html | 60 + .../hw/dmx/doc/html/ChkNotMaskEv_8h.html | 77 + xorg-server-1.4/hw/dmx/doc/html/annotated.html | 98 + xorg-server-1.4/hw/dmx/doc/html/classes.html | 26 + xorg-server-1.4/hw/dmx/doc/html/dmx_8h-source.html | 276 + xorg-server-1.4/hw/dmx/doc/html/dmx_8h.html | 532 + .../hw/dmx/doc/html/dmx__glxvisuals_8h-source.html | 85 + xorg-server-1.4/hw/dmx/doc/html/dmxarg_8c.html | 239 + .../hw/dmx/doc/html/dmxarg_8h-source.html | 69 + xorg-server-1.4/hw/dmx/doc/html/dmxarg_8h.html | 235 + xorg-server-1.4/hw/dmx/doc/html/dmxbackend_8c.html | 427 + .../hw/dmx/doc/html/dmxbackend_8h-source.html | 75 + xorg-server-1.4/hw/dmx/doc/html/dmxbackend_8h.html | 411 + xorg-server-1.4/hw/dmx/doc/html/dmxcb_8c.html | 184 + .../hw/dmx/doc/html/dmxcb_8h-source.html | 70 + xorg-server-1.4/hw/dmx/doc/html/dmxcb_8h.html | 209 + .../hw/dmx/doc/html/dmxclient_8h-source.html | 168 + xorg-server-1.4/hw/dmx/doc/html/dmxclient_8h.html | 48 + xorg-server-1.4/hw/dmx/doc/html/dmxcmap_8c.html | 265 + .../hw/dmx/doc/html/dmxcmap_8h-source.html | 86 + xorg-server-1.4/hw/dmx/doc/html/dmxcmap_8h.html | 408 + xorg-server-1.4/hw/dmx/doc/html/dmxcommon_8c.html | 701 + .../hw/dmx/doc/html/dmxcommon_8h-source.html | 151 + xorg-server-1.4/hw/dmx/doc/html/dmxcommon_8h.html | 665 + xorg-server-1.4/hw/dmx/doc/html/dmxcompat_8c.html | 68 + .../hw/dmx/doc/html/dmxcompat_8h-source.html | 61 + xorg-server-1.4/hw/dmx/doc/html/dmxcompat_8h.html | 62 + xorg-server-1.4/hw/dmx/doc/html/dmxconfig_8c.html | 402 + .../hw/dmx/doc/html/dmxconfig_8h-source.html | 84 + xorg-server-1.4/hw/dmx/doc/html/dmxconfig_8h.html | 248 + xorg-server-1.4/hw/dmx/doc/html/dmxconsole_8c.html | 498 + .../hw/dmx/doc/html/dmxconsole_8h-source.html | 79 + xorg-server-1.4/hw/dmx/doc/html/dmxconsole_8h.html | 488 + xorg-server-1.4/hw/dmx/doc/html/dmxcursor_8c.html | 471 + .../hw/dmx/doc/html/dmxcursor_8h-source.html | 86 + xorg-server-1.4/hw/dmx/doc/html/dmxcursor_8h.html | 498 + xorg-server-1.4/hw/dmx/doc/html/dmxdetach_8c.html | 70 + xorg-server-1.4/hw/dmx/doc/html/dmxdpms_8c.html | 128 + .../hw/dmx/doc/html/dmxdpms_8h-source.html | 62 + xorg-server-1.4/hw/dmx/doc/html/dmxdpms_8h.html | 124 + xorg-server-1.4/hw/dmx/doc/html/dmxdummy_8c.html | 111 + .../hw/dmx/doc/html/dmxdummy_8h-source.html | 63 + xorg-server-1.4/hw/dmx/doc/html/dmxdummy_8h.html | 111 + xorg-server-1.4/hw/dmx/doc/html/dmxeq_8c.html | 269 + .../hw/dmx/doc/html/dmxeq_8h-source.html | 61 + xorg-server-1.4/hw/dmx/doc/html/dmxeq_8h.html | 63 + xorg-server-1.4/hw/dmx/doc/html/dmxevents_8c.html | 284 + .../hw/dmx/doc/html/dmxevents_8h-source.html | 66 + xorg-server-1.4/hw/dmx/doc/html/dmxevents_8h.html | 233 + .../hw/dmx/doc/html/dmxext_8h-source.html | 197 + xorg-server-1.4/hw/dmx/doc/html/dmxext_8h.html | 926 + .../hw/dmx/doc/html/dmxextension_8c.html | 433 + .../hw/dmx/doc/html/dmxextension_8h-source.html | 131 + .../hw/dmx/doc/html/dmxextension_8h.html | 426 + xorg-server-1.4/hw/dmx/doc/html/dmxfont_8c.html | 257 + .../hw/dmx/doc/html/dmxfont_8h-source.html | 78 + xorg-server-1.4/hw/dmx/doc/html/dmxfont_8h.html | 333 + xorg-server-1.4/hw/dmx/doc/html/dmxgc_8c.html | 456 + .../hw/dmx/doc/html/dmxgc_8h-source.html | 106 + xorg-server-1.4/hw/dmx/doc/html/dmxgc_8h.html | 561 + xorg-server-1.4/hw/dmx/doc/html/dmxgcops_8c.html | 1476 + .../hw/dmx/doc/html/dmxgcops_8h-source.html | 115 + xorg-server-1.4/hw/dmx/doc/html/dmxgcops_8h.html | 1469 + xorg-server-1.4/hw/dmx/doc/html/dmxinit_8c.html | 709 + .../hw/dmx/doc/html/dmxinit_8h-source.html | 70 + xorg-server-1.4/hw/dmx/doc/html/dmxinit_8h.html | 30 + xorg-server-1.4/hw/dmx/doc/html/dmxinput_8c.html | 185 + .../hw/dmx/doc/html/dmxinput_8h-source.html | 146 + xorg-server-1.4/hw/dmx/doc/html/dmxinput_8h.html | 534 + .../hw/dmx/doc/html/dmxinputinit_8c.html | 477 + .../hw/dmx/doc/html/dmxinputinit_8h-source.html | 259 + .../hw/dmx/doc/html/dmxinputinit_8h.html | 406 + xorg-server-1.4/hw/dmx/doc/html/dmxlog_8c.html | 602 + .../hw/dmx/doc/html/dmxlog_8h-source.html | 91 + xorg-server-1.4/hw/dmx/doc/html/dmxlog_8h.html | 616 + xorg-server-1.4/hw/dmx/doc/html/dmxmap_8c.html | 150 + .../hw/dmx/doc/html/dmxmap_8h-source.html | 62 + xorg-server-1.4/hw/dmx/doc/html/dmxmap_8h.html | 148 + xorg-server-1.4/hw/dmx/doc/html/dmxmotion_8c.html | 181 + .../hw/dmx/doc/html/dmxmotion_8h-source.html | 69 + xorg-server-1.4/hw/dmx/doc/html/dmxmotion_8h.html | 180 + xorg-server-1.4/hw/dmx/doc/html/dmxparse_8c.html | 74 + .../hw/dmx/doc/html/dmxparse_8h-source.html | 303 + xorg-server-1.4/hw/dmx/doc/html/dmxparse_8h.html | 775 + xorg-server-1.4/hw/dmx/doc/html/dmxpict_8c.html | 1184 + .../hw/dmx/doc/html/dmxpict_8h-source.html | 141 + xorg-server-1.4/hw/dmx/doc/html/dmxpict_8h.html | 1418 + xorg-server-1.4/hw/dmx/doc/html/dmxpixmap_8c.html | 240 + .../hw/dmx/doc/html/dmxpixmap_8h-source.html | 83 + xorg-server-1.4/hw/dmx/doc/html/dmxpixmap_8h.html | 351 + xorg-server-1.4/hw/dmx/doc/html/dmxprint_8c.html | 119 + .../hw/dmx/doc/html/dmxprint_8h-source.html | 63 + xorg-server-1.4/hw/dmx/doc/html/dmxprint_8h.html | 111 + xorg-server-1.4/hw/dmx/doc/html/dmxprop_8c.html | 235 + .../hw/dmx/doc/html/dmxprop_8h-source.html | 66 + xorg-server-1.4/hw/dmx/doc/html/dmxprop_8h.html | 136 + .../hw/dmx/doc/html/dmxproto_8h-source.html | 431 + xorg-server-1.4/hw/dmx/doc/html/dmxproto_8h.html | 89 + xorg-server-1.4/hw/dmx/doc/html/dmxscrinit_8c.html | 378 + .../hw/dmx/doc/html/dmxscrinit_8h-source.html | 70 + xorg-server-1.4/hw/dmx/doc/html/dmxscrinit_8h.html | 181 + xorg-server-1.4/hw/dmx/doc/html/dmxshadow_8c.html | 71 + .../hw/dmx/doc/html/dmxshadow_8h-source.html | 66 + xorg-server-1.4/hw/dmx/doc/html/dmxshadow_8h.html | 73 + xorg-server-1.4/hw/dmx/doc/html/dmxsigio_8c.html | 230 + .../hw/dmx/doc/html/dmxsigio_8h-source.html | 65 + xorg-server-1.4/hw/dmx/doc/html/dmxsigio_8h.html | 226 + xorg-server-1.4/hw/dmx/doc/html/dmxstat_8c.html | 274 + .../hw/dmx/doc/html/dmxstat_8h-source.html | 74 + xorg-server-1.4/hw/dmx/doc/html/dmxstat_8h.html | 364 + xorg-server-1.4/hw/dmx/doc/html/dmxsync_8c.html | 139 + .../hw/dmx/doc/html/dmxsync_8h-source.html | 63 + xorg-server-1.4/hw/dmx/doc/html/dmxsync_8h.html | 136 + xorg-server-1.4/hw/dmx/doc/html/dmxvisual_8c.html | 151 + .../hw/dmx/doc/html/dmxvisual_8h-source.html | 67 + xorg-server-1.4/hw/dmx/doc/html/dmxvisual_8h.html | 152 + xorg-server-1.4/hw/dmx/doc/html/dmxwindow_8c.html | 865 + .../hw/dmx/doc/html/dmxwindow_8h-source.html | 165 + xorg-server-1.4/hw/dmx/doc/html/dmxwindow_8h.html | 969 + xorg-server-1.4/hw/dmx/doc/html/dmxxinput_8c.html | 396 + xorg-server-1.4/hw/dmx/doc/html/doxygen.css | 49 + xorg-server-1.4/hw/dmx/doc/html/doxygen.png | Bin 0 -> 2352 bytes xorg-server-1.4/hw/dmx/doc/html/files.html | 120 + xorg-server-1.4/hw/dmx/doc/html/ftv2blank.png | Bin 0 -> 174 bytes xorg-server-1.4/hw/dmx/doc/html/ftv2doc.png | Bin 0 -> 255 bytes .../hw/dmx/doc/html/ftv2folderclosed.png | Bin 0 -> 259 bytes xorg-server-1.4/hw/dmx/doc/html/ftv2folderopen.png | Bin 0 -> 261 bytes xorg-server-1.4/hw/dmx/doc/html/ftv2lastnode.png | Bin 0 -> 233 bytes xorg-server-1.4/hw/dmx/doc/html/ftv2link.png | Bin 0 -> 358 bytes xorg-server-1.4/hw/dmx/doc/html/ftv2mlastnode.png | Bin 0 -> 160 bytes xorg-server-1.4/hw/dmx/doc/html/ftv2mnode.png | Bin 0 -> 194 bytes xorg-server-1.4/hw/dmx/doc/html/ftv2node.png | Bin 0 -> 235 bytes xorg-server-1.4/hw/dmx/doc/html/ftv2plastnode.png | Bin 0 -> 165 bytes xorg-server-1.4/hw/dmx/doc/html/ftv2pnode.png | Bin 0 -> 200 bytes xorg-server-1.4/hw/dmx/doc/html/ftv2vertline.png | Bin 0 -> 229 bytes xorg-server-1.4/hw/dmx/doc/html/functions.html | 237 + .../hw/dmx/doc/html/functions_vars.html | 237 + xorg-server-1.4/hw/dmx/doc/html/globals.html | 522 + xorg-server-1.4/hw/dmx/doc/html/globals_defs.html | 47 + xorg-server-1.4/hw/dmx/doc/html/globals_enum.html | 32 + xorg-server-1.4/hw/dmx/doc/html/globals_eval.html | 41 + xorg-server-1.4/hw/dmx/doc/html/globals_func.html | 388 + xorg-server-1.4/hw/dmx/doc/html/globals_type.html | 96 + xorg-server-1.4/hw/dmx/doc/html/globals_vars.html | 56 + xorg-server-1.4/hw/dmx/doc/html/index.html | 8 + .../hw/dmx/doc/html/lib_2dmx_2dmx_8c.html | 894 + .../hw/dmx/doc/html/lnx-keyboard_8c.html | 511 + .../hw/dmx/doc/html/lnx-keyboard_8h-source.html | 83 + .../hw/dmx/doc/html/lnx-keyboard_8h.html | 388 + xorg-server-1.4/hw/dmx/doc/html/lnx-ms_8c.html | 352 + .../hw/dmx/doc/html/lnx-ms_8h-source.html | 75 + xorg-server-1.4/hw/dmx/doc/html/lnx-ms_8h.html | 288 + xorg-server-1.4/hw/dmx/doc/html/lnx-ps2_8c.html | 352 + .../hw/dmx/doc/html/lnx-ps2_8h-source.html | 75 + xorg-server-1.4/hw/dmx/doc/html/lnx-ps2_8h.html | 288 + xorg-server-1.4/hw/dmx/doc/html/main.html | 26 + .../doc/html/programs_2Xserver_2Xext_2dmx_8c.html | 71 + .../hw/dmx/doc/html/structDMXConfigCmdStruct.html | 30 + .../hw/dmx/doc/html/structDMXConfigListStruct.html | 30 + .../dmx/doc/html/structDMXDesktopAttributes.html | 32 + .../doc/html/structDMXDesktopAttributesRec.html | 32 + .../hw/dmx/doc/html/structDMXInputAttributes.html | 32 + .../dmx/doc/html/structDMXInputAttributesRec.html | 32 + .../hw/dmx/doc/html/structDMXScreenAttributes.html | 32 + .../dmx/doc/html/structDMXScreenAttributesRec.html | 32 + .../hw/dmx/doc/html/structDMXWindowAttributes.html | 32 + .../dmx/doc/html/structDMXWindowAttributesRec.html | 32 + .../hw/dmx/doc/html/struct__DMXConfigComment.html | 32 + .../hw/dmx/doc/html/struct__DMXConfigDisplay.html | 32 + .../hw/dmx/doc/html/struct__DMXConfigEntry.html | 32 + .../hw/dmx/doc/html/struct__DMXConfigFullDim.html | 32 + .../hw/dmx/doc/html/struct__DMXConfigNumber.html | 32 + .../hw/dmx/doc/html/struct__DMXConfigOption.html | 32 + .../hw/dmx/doc/html/struct__DMXConfigPair.html | 32 + .../hw/dmx/doc/html/struct__DMXConfigParam.html | 32 + .../hw/dmx/doc/html/struct__DMXConfigPartDim.html | 32 + .../hw/dmx/doc/html/struct__DMXConfigString.html | 32 + .../hw/dmx/doc/html/struct__DMXConfigSub.html | 32 + .../hw/dmx/doc/html/struct__DMXConfigToken.html | 32 + .../hw/dmx/doc/html/struct__DMXConfigVirtual.html | 32 + .../hw/dmx/doc/html/struct__DMXConfigWall.html | 32 + .../hw/dmx/doc/html/struct__DMXEventMap.html | 82 + .../hw/dmx/doc/html/struct__DMXInputInfo.html | 490 + .../hw/dmx/doc/html/struct__DMXLocalInitInfo.html | 778 + .../hw/dmx/doc/html/struct__DMXLocalInputInfo.html | 996 + .../hw/dmx/doc/html/struct__DMXScreenInfo.html | 1330 + .../hw/dmx/doc/html/struct__DMXStatAvg.html | 30 + .../hw/dmx/doc/html/struct__DMXStatInfo.html | 30 + xorg-server-1.4/hw/dmx/doc/html/struct__Event.html | 104 + .../hw/dmx/doc/html/struct__EventQueue.html | 224 + .../hw/dmx/doc/html/struct__dmxArg.html | 104 + .../hw/dmx/doc/html/struct__dmxColormapPriv.html | 32 + .../hw/dmx/doc/html/struct__dmxCursorPriv.html | 32 + .../hw/dmx/doc/html/struct__dmxFontPriv.html | 32 + .../hw/dmx/doc/html/struct__dmxGCPriv.html | 32 + .../hw/dmx/doc/html/struct__dmxGlyphPriv.html | 58 + .../hw/dmx/doc/html/struct__dmxPictPriv.html | 82 + .../hw/dmx/doc/html/struct__dmxPixPriv.html | 32 + .../hw/dmx/doc/html/struct__dmxWinPriv.html | 32 + .../hw/dmx/doc/html/struct__myPrivate.html | 272 + .../hw/dmx/doc/html/structdmxGlxVisualPrivate.html | 32 + .../hw/dmx/doc/html/structxDMXAddInputReply.html | 32 + .../hw/dmx/doc/html/structxDMXAddInputReq.html | 32 + .../hw/dmx/doc/html/structxDMXAddScreenReply.html | 32 + .../hw/dmx/doc/html/structxDMXAddScreenReq.html | 32 + .../structxDMXChangeDesktopAttributesReply.html | 32 + .../html/structxDMXChangeDesktopAttributesReq.html | 32 + .../structxDMXChangeScreensAttributesReply.html | 32 + .../html/structxDMXChangeScreensAttributesReq.html | 32 + .../html/structxDMXForceWindowCreationReply.html | 32 + .../doc/html/structxDMXForceWindowCreationReq.html | 32 + .../html/structxDMXGetDesktopAttributesReply.html | 32 + .../html/structxDMXGetDesktopAttributesReq.html | 32 + .../html/structxDMXGetInputAttributesReply.html | 32 + .../doc/html/structxDMXGetInputAttributesReq.html | 32 + .../dmx/doc/html/structxDMXGetInputCountReply.html | 32 + .../dmx/doc/html/structxDMXGetInputCountReq.html | 32 + .../html/structxDMXGetScreenAttributesReply.html | 32 + .../doc/html/structxDMXGetScreenAttributesReq.html | 32 + .../doc/html/structxDMXGetScreenCountReply.html | 32 + .../dmx/doc/html/structxDMXGetScreenCountReq.html | 32 + .../html/structxDMXGetWindowAttributesReply.html | 32 + .../doc/html/structxDMXGetWindowAttributesReq.html | 32 + .../dmx/doc/html/structxDMXQueryVersionReply.html | 32 + .../hw/dmx/doc/html/structxDMXQueryVersionReq.html | 32 + .../dmx/doc/html/structxDMXRemoveInputReply.html | 32 + .../hw/dmx/doc/html/structxDMXRemoveInputReq.html | 32 + .../dmx/doc/html/structxDMXRemoveScreenReply.html | 32 + .../hw/dmx/doc/html/structxDMXRemoveScreenReq.html | 32 + .../hw/dmx/doc/html/structxDMXSyncReply.html | 32 + .../hw/dmx/doc/html/structxDMXSyncReq.html | 32 + xorg-server-1.4/hw/dmx/doc/html/tree.html | 295 + xorg-server-1.4/hw/dmx/doc/html/usb-common_8c.html | 222 + .../hw/dmx/doc/html/usb-common_8h-source.html | 74 + xorg-server-1.4/hw/dmx/doc/html/usb-common_8h.html | 167 + .../hw/dmx/doc/html/usb-keyboard_8c.html | 231 + .../hw/dmx/doc/html/usb-keyboard_8h-source.html | 68 + .../hw/dmx/doc/html/usb-keyboard_8h.html | 174 + xorg-server-1.4/hw/dmx/doc/html/usb-mouse_8c.html | 190 + .../hw/dmx/doc/html/usb-mouse_8h-source.html | 68 + xorg-server-1.4/hw/dmx/doc/html/usb-mouse_8h.html | 134 + xorg-server-1.4/hw/dmx/doc/html/usb-other_8c.html | 191 + .../hw/dmx/doc/html/usb-other_8h-source.html | 68 + xorg-server-1.4/hw/dmx/doc/html/usb-other_8h.html | 134 + .../hw/dmx/doc/html/usb-private_8h-source.html | 131 + .../hw/dmx/doc/html/usb-private_8h.html | 41 + xorg-server-1.4/hw/dmx/doc/scaled.sgml | 707 + xorg-server-1.4/hw/dmx/doc/scaled.txt | 579 + xorg-server-1.4/hw/dmx/examples/Makefile.am | 70 + xorg-server-1.4/hw/dmx/examples/Makefile.in | 1065 + xorg-server-1.4/hw/dmx/examples/dmxaddinput.c | 83 + xorg-server-1.4/hw/dmx/examples/dmxaddscreen.c | 105 + xorg-server-1.4/hw/dmx/examples/dmxreconfig.c | 162 + xorg-server-1.4/hw/dmx/examples/dmxresize.c | 104 + xorg-server-1.4/hw/dmx/examples/dmxrminput.c | 78 + xorg-server-1.4/hw/dmx/examples/dmxrmscreen.c | 80 + xorg-server-1.4/hw/dmx/examples/dmxwininfo.c | 496 + xorg-server-1.4/hw/dmx/examples/ev.c | 182 + xorg-server-1.4/hw/dmx/examples/evi.c | 86 + xorg-server-1.4/hw/dmx/examples/res.c | 99 + xorg-server-1.4/hw/dmx/examples/xbell.c | 101 + xorg-server-1.4/hw/dmx/examples/xdmx.c | 239 + xorg-server-1.4/hw/dmx/examples/xinput.c | 318 + xorg-server-1.4/hw/dmx/examples/xled.c | 124 + xorg-server-1.4/hw/dmx/examples/xtest.c | 75 + xorg-server-1.4/hw/dmx/glxProxy/Makefile.am | 43 + xorg-server-1.4/hw/dmx/glxProxy/Makefile.in | 678 + xorg-server-1.4/hw/dmx/glxProxy/compsize.c | 563 + xorg-server-1.4/hw/dmx/glxProxy/g_disptab.c | 611 + xorg-server-1.4/hw/dmx/glxProxy/g_disptab.h | 675 + xorg-server-1.4/hw/dmx/glxProxy/g_renderswap.c | 2360 + xorg-server-1.4/hw/dmx/glxProxy/global.c | 76 + xorg-server-1.4/hw/dmx/glxProxy/glxcmds.c | 3628 + xorg-server-1.4/hw/dmx/glxProxy/glxcmdsswap.c | 1057 + xorg-server-1.4/hw/dmx/glxProxy/glxcontext.h | 116 + xorg-server-1.4/hw/dmx/glxProxy/glxdrawable.h | 71 + xorg-server-1.4/hw/dmx/glxProxy/glxerror.h | 57 + xorg-server-1.4/hw/dmx/glxProxy/glxext.c | 519 + xorg-server-1.4/hw/dmx/glxProxy/glxext.h | 97 + xorg-server-1.4/hw/dmx/glxProxy/glxfbconfig.c | 111 + xorg-server-1.4/hw/dmx/glxProxy/glxfbconfig.h | 43 + xorg-server-1.4/hw/dmx/glxProxy/glxscreens.c | 382 + xorg-server-1.4/hw/dmx/glxProxy/glxscreens.h | 62 + xorg-server-1.4/hw/dmx/glxProxy/glxserver.h | 322 + xorg-server-1.4/hw/dmx/glxProxy/glxsingle.c | 1012 + xorg-server-1.4/hw/dmx/glxProxy/glxsingle.h | 59 + xorg-server-1.4/hw/dmx/glxProxy/glxswap.c | 538 + xorg-server-1.4/hw/dmx/glxProxy/glxswap.h | 46 + xorg-server-1.4/hw/dmx/glxProxy/glxutil.c | 119 + xorg-server-1.4/hw/dmx/glxProxy/glxutil.h | 53 + xorg-server-1.4/hw/dmx/glxProxy/glxvendor.c | 582 + xorg-server-1.4/hw/dmx/glxProxy/glxvendor.h | 55 + xorg-server-1.4/hw/dmx/glxProxy/glxvisuals.c | 543 + xorg-server-1.4/hw/dmx/glxProxy/glxvisuals.h | 55 + xorg-server-1.4/hw/dmx/glxProxy/render2swap.c | 347 + xorg-server-1.4/hw/dmx/glxProxy/renderpixswap.c | 389 + xorg-server-1.4/hw/dmx/glxProxy/unpack.h | 233 + xorg-server-1.4/hw/dmx/input/ChkNotMaskEv.c | 107 + xorg-server-1.4/hw/dmx/input/ChkNotMaskEv.h | 40 + xorg-server-1.4/hw/dmx/input/Makefile.am | 71 + xorg-server-1.4/hw/dmx/input/Makefile.in | 715 + xorg-server-1.4/hw/dmx/input/dmxarg.c | 175 + xorg-server-1.4/hw/dmx/input/dmxarg.h | 49 + xorg-server-1.4/hw/dmx/input/dmxbackend.c | 617 + xorg-server-1.4/hw/dmx/input/dmxbackend.h | 56 + xorg-server-1.4/hw/dmx/input/dmxcommon.c | 677 + xorg-server-1.4/hw/dmx/input/dmxcommon.h | 132 + xorg-server-1.4/hw/dmx/input/dmxconsole.c | 1028 + xorg-server-1.4/hw/dmx/input/dmxconsole.h | 59 + xorg-server-1.4/hw/dmx/input/dmxdetach.c | 58 + xorg-server-1.4/hw/dmx/input/dmxdummy.c | 88 + xorg-server-1.4/hw/dmx/input/dmxdummy.h | 43 + xorg-server-1.4/hw/dmx/input/dmxeq.c | 307 + xorg-server-1.4/hw/dmx/input/dmxeq.h | 43 + xorg-server-1.4/hw/dmx/input/dmxevents.c | 834 + xorg-server-1.4/hw/dmx/input/dmxevents.h | 46 + xorg-server-1.4/hw/dmx/input/dmxinputinit.c | 1368 + xorg-server-1.4/hw/dmx/input/dmxinputinit.h | 293 + xorg-server-1.4/hw/dmx/input/dmxmap.c | 121 + xorg-server-1.4/hw/dmx/input/dmxmap.h | 42 + xorg-server-1.4/hw/dmx/input/dmxmotion.c | 143 + xorg-server-1.4/hw/dmx/input/dmxmotion.h | 49 + xorg-server-1.4/hw/dmx/input/dmxsigio.c | 233 + xorg-server-1.4/hw/dmx/input/dmxsigio.h | 45 + xorg-server-1.4/hw/dmx/input/dmxxinput.c | 159 + xorg-server-1.4/hw/dmx/input/lnx-keyboard.c | 986 + xorg-server-1.4/hw/dmx/input/lnx-keyboard.h | 63 + xorg-server-1.4/hw/dmx/input/lnx-ms.c | 322 + xorg-server-1.4/hw/dmx/input/lnx-ms.h | 55 + xorg-server-1.4/hw/dmx/input/lnx-ps2.c | 290 + xorg-server-1.4/hw/dmx/input/lnx-ps2.h | 55 + xorg-server-1.4/hw/dmx/input/usb-common.c | 382 + xorg-server-1.4/hw/dmx/input/usb-common.h | 55 + xorg-server-1.4/hw/dmx/input/usb-keyboard.c | 441 + xorg-server-1.4/hw/dmx/input/usb-keyboard.h | 48 + xorg-server-1.4/hw/dmx/input/usb-mouse.c | 126 + xorg-server-1.4/hw/dmx/input/usb-mouse.h | 48 + xorg-server-1.4/hw/dmx/input/usb-other.c | 161 + xorg-server-1.4/hw/dmx/input/usb-other.h | 48 + xorg-server-1.4/hw/dmx/input/usb-private.h | 117 + xorg-server-1.4/hw/kdrive/Makefile.am | 42 + xorg-server-1.4/hw/kdrive/Makefile.in | 691 + xorg-server-1.4/hw/kdrive/ati/ChangeLog | 622 + xorg-server-1.4/hw/kdrive/ati/Makefile.am | 71 + xorg-server-1.4/hw/kdrive/ati/Makefile.in | 731 + xorg-server-1.4/hw/kdrive/ati/ati.c | 761 + xorg-server-1.4/hw/kdrive/ati/ati.h | 409 + xorg-server-1.4/hw/kdrive/ati/ati_cursor.c | 559 + xorg-server-1.4/hw/kdrive/ati/ati_dma.c | 1037 + xorg-server-1.4/hw/kdrive/ati/ati_dma.h | 141 + xorg-server-1.4/hw/kdrive/ati/ati_draw.c | 918 + xorg-server-1.4/hw/kdrive/ati/ati_draw.h | 93 + xorg-server-1.4/hw/kdrive/ati/ati_microcode.c | 857 + xorg-server-1.4/hw/kdrive/ati/ati_reg.h | 1927 + xorg-server-1.4/hw/kdrive/ati/ati_stub.c | 84 + xorg-server-1.4/hw/kdrive/ati/ati_video.c | 988 + xorg-server-1.4/hw/kdrive/ati/r128_composite.c | 564 + xorg-server-1.4/hw/kdrive/ati/radeon_composite.c | 875 + xorg-server-1.4/hw/kdrive/chips/Makefile.am | 33 + xorg-server-1.4/hw/kdrive/chips/Makefile.in | 691 + xorg-server-1.4/hw/kdrive/chips/chips.c | 334 + xorg-server-1.4/hw/kdrive/chips/chips.h | 117 + xorg-server-1.4/hw/kdrive/chips/chipsdraw.c | 491 + xorg-server-1.4/hw/kdrive/chips/chipsstub.c | 67 + xorg-server-1.4/hw/kdrive/ephyr/Makefile.am | 39 + xorg-server-1.4/hw/kdrive/ephyr/Makefile.in | 707 + xorg-server-1.4/hw/kdrive/ephyr/README | 73 + xorg-server-1.4/hw/kdrive/ephyr/ephyr.c | 965 + xorg-server-1.4/hw/kdrive/ephyr/ephyr.h | 195 + xorg-server-1.4/hw/kdrive/ephyr/ephyr_draw.c | 525 + xorg-server-1.4/hw/kdrive/ephyr/ephyrinit.c | 240 + xorg-server-1.4/hw/kdrive/ephyr/hostx.c | 800 + xorg-server-1.4/hw/kdrive/ephyr/hostx.h | 166 + xorg-server-1.4/hw/kdrive/ephyr/os.c | 41 + xorg-server-1.4/hw/kdrive/epson/Makefile.am | 33 + xorg-server-1.4/hw/kdrive/epson/Makefile.in | 690 + xorg-server-1.4/hw/kdrive/epson/epson13806.c | 604 + xorg-server-1.4/hw/kdrive/epson/epson13806.h | 132 + xorg-server-1.4/hw/kdrive/epson/epson13806draw.c | 649 + xorg-server-1.4/hw/kdrive/epson/epson13806draw.h | 119 + xorg-server-1.4/hw/kdrive/epson/epson13806reg.h | 183 + xorg-server-1.4/hw/kdrive/epson/epson13806stub.c | 69 + xorg-server-1.4/hw/kdrive/fake/Makefile.am | 29 + xorg-server-1.4/hw/kdrive/fake/Makefile.in | 688 + xorg-server-1.4/hw/kdrive/fake/fake.c | 484 + xorg-server-1.4/hw/kdrive/fake/fake.h | 137 + xorg-server-1.4/hw/kdrive/fake/fakeinit.c | 108 + xorg-server-1.4/hw/kdrive/fake/kbd.c | 208 + xorg-server-1.4/hw/kdrive/fake/mouse.c | 67 + xorg-server-1.4/hw/kdrive/fake/os.c | 63 + xorg-server-1.4/hw/kdrive/fbdev/Makefile.am | 28 + xorg-server-1.4/hw/kdrive/fbdev/Makefile.in | 682 + xorg-server-1.4/hw/kdrive/fbdev/fbdev.c | 821 + xorg-server-1.4/hw/kdrive/fbdev/fbdev.h | 140 + xorg-server-1.4/hw/kdrive/fbdev/fbinit.c | 113 + xorg-server-1.4/hw/kdrive/i810/Makefile.am | 36 + xorg-server-1.4/hw/kdrive/i810/Makefile.in | 695 + xorg-server-1.4/hw/kdrive/i810/i810.c | 2112 + xorg-server-1.4/hw/kdrive/i810/i810.h | 511 + xorg-server-1.4/hw/kdrive/i810/i810_cursor.c | 435 + xorg-server-1.4/hw/kdrive/i810/i810_reg.h | 695 + xorg-server-1.4/hw/kdrive/i810/i810_video.c | 1136 + xorg-server-1.4/hw/kdrive/i810/i810draw.c | 352 + xorg-server-1.4/hw/kdrive/i810/i810draw.h | 46 + xorg-server-1.4/hw/kdrive/i810/i810stub.c | 92 + xorg-server-1.4/hw/kdrive/linux/Makefile.am | 34 + xorg-server-1.4/hw/kdrive/linux/Makefile.in | 656 + xorg-server-1.4/hw/kdrive/linux/agp.c | 354 + xorg-server-1.4/hw/kdrive/linux/agp.h | 71 + xorg-server-1.4/hw/kdrive/linux/bus.c | 134 + xorg-server-1.4/hw/kdrive/linux/evdev.c | 536 + xorg-server-1.4/hw/kdrive/linux/keyboard.c | 803 + xorg-server-1.4/hw/kdrive/linux/klinux.h | 32 + xorg-server-1.4/hw/kdrive/linux/linux.c | 484 + xorg-server-1.4/hw/kdrive/linux/mouse.c | 1027 + xorg-server-1.4/hw/kdrive/linux/ms.c | 183 + xorg-server-1.4/hw/kdrive/linux/ps2.c | 187 + xorg-server-1.4/hw/kdrive/linux/ts.c | 209 + xorg-server-1.4/hw/kdrive/linux/tslib.c | 193 + xorg-server-1.4/hw/kdrive/mach64/Makefile.am | 40 + xorg-server-1.4/hw/kdrive/mach64/Makefile.in | 693 + xorg-server-1.4/hw/kdrive/mach64/mach64.c | 433 + xorg-server-1.4/hw/kdrive/mach64/mach64.h | 653 + xorg-server-1.4/hw/kdrive/mach64/mach64draw.c | 590 + xorg-server-1.4/hw/kdrive/mach64/mach64draw.h | 69 + xorg-server-1.4/hw/kdrive/mach64/mach64stub.c | 75 + xorg-server-1.4/hw/kdrive/mach64/mach64video.c | 994 + xorg-server-1.4/hw/kdrive/mga/Makefile.am | 35 + xorg-server-1.4/hw/kdrive/mga/Makefile.in | 694 + xorg-server-1.4/hw/kdrive/mga/g400_common.h | 185 + xorg-server-1.4/hw/kdrive/mga/g400_composite.c | 510 + xorg-server-1.4/hw/kdrive/mga/mga.c | 240 + xorg-server-1.4/hw/kdrive/mga/mga.h | 164 + xorg-server-1.4/hw/kdrive/mga/mgadraw.c | 324 + xorg-server-1.4/hw/kdrive/mga/mgastub.c | 64 + xorg-server-1.4/hw/kdrive/neomagic/ChangeLog | 98 + xorg-server-1.4/hw/kdrive/neomagic/Makefile.am | 45 + xorg-server-1.4/hw/kdrive/neomagic/Makefile.in | 697 + xorg-server-1.4/hw/kdrive/neomagic/README | 15 + xorg-server-1.4/hw/kdrive/neomagic/neo_draw.c | 210 + xorg-server-1.4/hw/kdrive/neomagic/neomagic.c | 335 + xorg-server-1.4/hw/kdrive/neomagic/neomagic.h | 210 + xorg-server-1.4/hw/kdrive/neomagic/neomagicstub.c | 73 + xorg-server-1.4/hw/kdrive/nvidia/Makefile.am | 36 + xorg-server-1.4/hw/kdrive/nvidia/Makefile.in | 694 + xorg-server-1.4/hw/kdrive/nvidia/nvidia.c | 361 + xorg-server-1.4/hw/kdrive/nvidia/nvidia.h | 247 + xorg-server-1.4/hw/kdrive/nvidia/nvidiadraw.c | 238 + xorg-server-1.4/hw/kdrive/nvidia/nvidiadraw.h | 69 + xorg-server-1.4/hw/kdrive/nvidia/nvidiastub.c | 65 + xorg-server-1.4/hw/kdrive/pm2/Makefile.am | 34 + xorg-server-1.4/hw/kdrive/pm2/Makefile.in | 691 + xorg-server-1.4/hw/kdrive/pm2/glint_regs.h | 1370 + xorg-server-1.4/hw/kdrive/pm2/pm2.c | 295 + xorg-server-1.4/hw/kdrive/pm2/pm2.h | 162 + xorg-server-1.4/hw/kdrive/pm2/pm2_draw.c | 318 + xorg-server-1.4/hw/kdrive/pm2/pm2stub.c | 54 + xorg-server-1.4/hw/kdrive/r128/Makefile.am | 33 + xorg-server-1.4/hw/kdrive/r128/Makefile.in | 691 + xorg-server-1.4/hw/kdrive/r128/r128.c | 250 + xorg-server-1.4/hw/kdrive/r128/r128.h | 123 + xorg-server-1.4/hw/kdrive/r128/r128draw.c | 296 + xorg-server-1.4/hw/kdrive/r128/r128stub.c | 67 + xorg-server-1.4/hw/kdrive/sdl/Makefile.am | 18 + xorg-server-1.4/hw/kdrive/sdl/Makefile.in | 656 + xorg-server-1.4/hw/kdrive/sdl/sdl.c | 455 + xorg-server-1.4/hw/kdrive/sis300/Makefile.am | 47 + xorg-server-1.4/hw/kdrive/sis300/Makefile.in | 698 + xorg-server-1.4/hw/kdrive/sis300/sis.c | 311 + xorg-server-1.4/hw/kdrive/sis300/sis.h | 160 + xorg-server-1.4/hw/kdrive/sis300/sis_draw.c | 320 + xorg-server-1.4/hw/kdrive/sis300/sis_reg.h | 902 + xorg-server-1.4/hw/kdrive/sis300/sis_stub.c | 77 + xorg-server-1.4/hw/kdrive/smi/Makefile.am | 38 + xorg-server-1.4/hw/kdrive/smi/Makefile.in | 697 + xorg-server-1.4/hw/kdrive/smi/smi.c | 343 + xorg-server-1.4/hw/kdrive/smi/smi.h | 257 + xorg-server-1.4/hw/kdrive/smi/smidraw.c | 340 + xorg-server-1.4/hw/kdrive/smi/smidraw.h | 69 + xorg-server-1.4/hw/kdrive/smi/smistub.c | 67 + xorg-server-1.4/hw/kdrive/src/Makefile.am | 40 + xorg-server-1.4/hw/kdrive/src/Makefile.in | 717 + xorg-server-1.4/hw/kdrive/src/fourcc.h | 133 + xorg-server-1.4/hw/kdrive/src/kaa.c | 1155 + xorg-server-1.4/hw/kdrive/src/kaa.h | 117 + xorg-server-1.4/hw/kdrive/src/kaapict.c | 719 + xorg-server-1.4/hw/kdrive/src/kasync.c | 378 + xorg-server-1.4/hw/kdrive/src/kcmap.c | 294 + xorg-server-1.4/hw/kdrive/src/kcurscol.c | 94 + xorg-server-1.4/hw/kdrive/src/kdrive.c | 1456 + xorg-server-1.4/hw/kdrive/src/kdrive.h | 1014 + xorg-server-1.4/hw/kdrive/src/kinfo.c | 173 + xorg-server-1.4/hw/kdrive/src/kinput.c | 2497 + xorg-server-1.4/hw/kdrive/src/kkeymap.c | 189 + xorg-server-1.4/hw/kdrive/src/kmap.c | 178 + xorg-server-1.4/hw/kdrive/src/kmode.c | 400 + xorg-server-1.4/hw/kdrive/src/knoop.c | 251 + xorg-server-1.4/hw/kdrive/src/koffscreen.c | 375 + xorg-server-1.4/hw/kdrive/src/kshadow.c | 83 + xorg-server-1.4/hw/kdrive/src/ktest.c | 76 + xorg-server-1.4/hw/kdrive/src/kxv.c | 1962 + xorg-server-1.4/hw/kdrive/src/kxv.h | 316 + xorg-server-1.4/hw/kdrive/src/vga.c | 328 + xorg-server-1.4/hw/kdrive/src/vga.h | 144 + xorg-server-1.4/hw/kdrive/vesa/Makefile.am | 32 + xorg-server-1.4/hw/kdrive/vesa/Makefile.in | 691 + xorg-server-1.4/hw/kdrive/vesa/vbe.c | 706 + xorg-server-1.4/hw/kdrive/vesa/vbe.h | 165 + xorg-server-1.4/hw/kdrive/vesa/vesa.c | 1823 + xorg-server-1.4/hw/kdrive/vesa/vesa.h | 295 + xorg-server-1.4/hw/kdrive/vesa/vesainit.c | 100 + xorg-server-1.4/hw/kdrive/vesa/vga.c | 242 + xorg-server-1.4/hw/kdrive/vesa/vga.h | 59 + xorg-server-1.4/hw/kdrive/vesa/vm86.c | 764 + xorg-server-1.4/hw/kdrive/vesa/vm86.h | 173 + xorg-server-1.4/hw/kdrive/via/Makefile.am | 34 + xorg-server-1.4/hw/kdrive/via/Makefile.in | 690 + xorg-server-1.4/hw/kdrive/via/via.c | 435 + xorg-server-1.4/hw/kdrive/via/via.h | 129 + xorg-server-1.4/hw/kdrive/via/via_regs.h | 154 + xorg-server-1.4/hw/kdrive/via/viadraw.c | 499 + xorg-server-1.4/hw/kdrive/via/viadraw.h | 45 + xorg-server-1.4/hw/kdrive/via/viastub.c | 135 + xorg-server-1.4/hw/vfb/InitInput.c | 326 + xorg-server-1.4/hw/vfb/InitOutput.c | 1050 + xorg-server-1.4/hw/vfb/Makefile.am | 49 + xorg-server-1.4/hw/vfb/Makefile.in | 839 + xorg-server-1.4/hw/vfb/Xvfb.man.pre | 125 + xorg-server-1.4/hw/vfb/lk201kbd.h | 158 + xorg-server-1.4/hw/xfree86/Makefile.am | 116 + xorg-server-1.4/hw/xfree86/Makefile.in | 947 + xorg-server-1.4/hw/xfree86/Options | 409 + xorg-server-1.4/hw/xfree86/common/Makefile.am | 97 + xorg-server-1.4/hw/xfree86/common/Makefile.in | 815 + xorg-server-1.4/hw/xfree86/common/atKeynames.h | 295 + xorg-server-1.4/hw/xfree86/common/compiler.h | 1774 + xorg-server-1.4/hw/xfree86/common/extramodes | 33 + xorg-server-1.4/hw/xfree86/common/fourcc.h | 160 + xorg-server-1.4/hw/xfree86/common/modeline2c.pl | 107 + xorg-server-1.4/hw/xfree86/common/scoasm.h | 142 + xorg-server-1.4/hw/xfree86/common/vesamodes | 111 + xorg-server-1.4/hw/xfree86/common/xf86.h | 442 + xorg-server-1.4/hw/xfree86/common/xf86AutoConfig.c | 289 + xorg-server-1.4/hw/xfree86/common/xf86Build.h | 2 + xorg-server-1.4/hw/xfree86/common/xf86Build.h.in | 2 + xorg-server-1.4/hw/xfree86/common/xf86Bus.c | 3229 + xorg-server-1.4/hw/xfree86/common/xf86Bus.h | 149 + xorg-server-1.4/hw/xfree86/common/xf86Config.c | 2583 + xorg-server-1.4/hw/xfree86/common/xf86Config.h | 80 + xorg-server-1.4/hw/xfree86/common/xf86Configure.c | 971 + xorg-server-1.4/hw/xfree86/common/xf86Cursor.c | 812 + xorg-server-1.4/hw/xfree86/common/xf86DGA.c | 1300 + xorg-server-1.4/hw/xfree86/common/xf86DPMS.c | 220 + xorg-server-1.4/hw/xfree86/common/xf86Date.h | 36 + xorg-server-1.4/hw/xfree86/common/xf86Debug.c | 77 + xorg-server-1.4/hw/xfree86/common/xf86DefModes.c | 155 + xorg-server-1.4/hw/xfree86/common/xf86DoProbe.c | 118 + xorg-server-1.4/hw/xfree86/common/xf86DoScanPci.c | 116 + xorg-server-1.4/hw/xfree86/common/xf86Events.c | 1189 + xorg-server-1.4/hw/xfree86/common/xf86Globals.c | 206 + xorg-server-1.4/hw/xfree86/common/xf86Helper.c | 2985 + xorg-server-1.4/hw/xfree86/common/xf86InPriv.h | 46 + xorg-server-1.4/hw/xfree86/common/xf86Init.c | 1859 + xorg-server-1.4/hw/xfree86/common/xf86MiscExt.c | 577 + xorg-server-1.4/hw/xfree86/common/xf86Mode.c | 2185 + xorg-server-1.4/hw/xfree86/common/xf86Module.h | 225 + xorg-server-1.4/hw/xfree86/common/xf86Opt.h | 113 + xorg-server-1.4/hw/xfree86/common/xf86Option.c | 883 + xorg-server-1.4/hw/xfree86/common/xf86PM.c | 220 + xorg-server-1.4/hw/xfree86/common/xf86PciInfo.h | 732 + xorg-server-1.4/hw/xfree86/common/xf86Priv.h | 207 + xorg-server-1.4/hw/xfree86/common/xf86Privstr.h | 198 + xorg-server-1.4/hw/xfree86/common/xf86RandR.c | 440 + xorg-server-1.4/hw/xfree86/common/xf86Resources.h | 139 + xorg-server-1.4/hw/xfree86/common/xf86Version.h | 56 + xorg-server-1.4/hw/xfree86/common/xf86Versions.c | 77 + xorg-server-1.4/hw/xfree86/common/xf86VidMode.c | 721 + xorg-server-1.4/hw/xfree86/common/xf86XKB.c | 80 + xorg-server-1.4/hw/xfree86/common/xf86Xinput.c | 834 + xorg-server-1.4/hw/xfree86/common/xf86Xinput.h | 215 + xorg-server-1.4/hw/xfree86/common/xf86cmap.c | 1121 + xorg-server-1.4/hw/xfree86/common/xf86cmap.h | 75 + xorg-server-1.4/hw/xfree86/common/xf86cvt.c | 292 + xorg-server-1.4/hw/xfree86/common/xf86fbBus.c | 96 + xorg-server-1.4/hw/xfree86/common/xf86fbman.c | 1454 + xorg-server-1.4/hw/xfree86/common/xf86fbman.h | 226 + xorg-server-1.4/hw/xfree86/common/xf86isaBus.c | 141 + xorg-server-1.4/hw/xfree86/common/xf86noBus.c | 74 + xorg-server-1.4/hw/xfree86/common/xf86pciBus.c | 3451 + xorg-server-1.4/hw/xfree86/common/xf86pciBus.h | 98 + xorg-server-1.4/hw/xfree86/common/xf86sbusBus.c | 708 + xorg-server-1.4/hw/xfree86/common/xf86sbusBus.h | 97 + xorg-server-1.4/hw/xfree86/common/xf86str.h | 1170 + xorg-server-1.4/hw/xfree86/common/xf86xv.c | 2096 + xorg-server-1.4/hw/xfree86/common/xf86xv.h | 273 + xorg-server-1.4/hw/xfree86/common/xf86xvmc.c | 237 + xorg-server-1.4/hw/xfree86/common/xf86xvmc.h | 163 + xorg-server-1.4/hw/xfree86/common/xf86xvpriv.h | 86 + xorg-server-1.4/hw/xfree86/common/xisb.c | 175 + xorg-server-1.4/hw/xfree86/common/xisb.h | 65 + xorg-server-1.4/hw/xfree86/common/xorgHelper.c | 23 + xorg-server-1.4/hw/xfree86/common/xorgVersion.h | 49 + xorg-server-1.4/hw/xfree86/ddc/DDC.HOWTO | 97 + xorg-server-1.4/hw/xfree86/ddc/Makefile.am | 12 + xorg-server-1.4/hw/xfree86/ddc/Makefile.in | 660 + xorg-server-1.4/hw/xfree86/ddc/ddcPriv.h | 9 + xorg-server-1.4/hw/xfree86/ddc/ddcProperty.c | 118 + xorg-server-1.4/hw/xfree86/ddc/edid.c | 140 + xorg-server-1.4/hw/xfree86/ddc/edid.h | 461 + xorg-server-1.4/hw/xfree86/ddc/interpret_edid.c | 321 + xorg-server-1.4/hw/xfree86/ddc/print_edid.c | 350 + xorg-server-1.4/hw/xfree86/ddc/xf86DDC.c | 301 + xorg-server-1.4/hw/xfree86/ddc/xf86DDC.h | 58 + xorg-server-1.4/hw/xfree86/dixmods/GLcoremodule.c | 63 + xorg-server-1.4/hw/xfree86/dixmods/Makefile.am | 118 + xorg-server-1.4/hw/xfree86/dixmods/Makefile.in | 1113 + xorg-server-1.4/hw/xfree86/dixmods/afbmodule.c | 57 + xorg-server-1.4/hw/xfree86/dixmods/cfb32module.c | 57 + xorg-server-1.4/hw/xfree86/dixmods/cfbmodule.c | 57 + xorg-server-1.4/hw/xfree86/dixmods/dbemodule.c | 46 + .../hw/xfree86/dixmods/extmod/Makefile.am | 32 + .../hw/xfree86/dixmods/extmod/Makefile.in | 708 + .../hw/xfree86/dixmods/extmod/dgaproc.h | 144 + .../hw/xfree86/dixmods/extmod/modinit.c | 256 + .../hw/xfree86/dixmods/extmod/modinit.h | 151 + .../hw/xfree86/dixmods/extmod/vidmodeproc.h | 77 + .../hw/xfree86/dixmods/extmod/xf86dga.c | 306 + .../hw/xfree86/dixmods/extmod/xf86dga2.c | 768 + .../hw/xfree86/dixmods/extmod/xf86dgaext.h | 10 + .../hw/xfree86/dixmods/extmod/xf86misc.c | 850 + .../hw/xfree86/dixmods/extmod/xf86miscproc.h | 69 + .../hw/xfree86/dixmods/extmod/xf86vmode.c | 2201 + xorg-server-1.4/hw/xfree86/dixmods/extmod/xvmod.c | 23 + .../hw/xfree86/dixmods/extmod/xvmodproc.h | 13 + xorg-server-1.4/hw/xfree86/dixmods/fbmodule.c | 52 + xorg-server-1.4/hw/xfree86/dixmods/ftmodule.c | 75 + xorg-server-1.4/hw/xfree86/dixmods/glxmodule.c | 150 + xorg-server-1.4/hw/xfree86/dixmods/mfbmodule.c | 47 + xorg-server-1.4/hw/xfree86/dixmods/recordmod.c | 44 + xorg-server-1.4/hw/xfree86/dixmods/shmodule.c | 54 + xorg-server-1.4/hw/xfree86/dixmods/type1mod.c | 75 + .../hw/xfree86/dixmods/xf86XTrapModule.c | 45 + xorg-server-1.4/hw/xfree86/dixmods/xkbKillSrv.c | 53 + xorg-server-1.4/hw/xfree86/dixmods/xkbPrivate.c | 41 + xorg-server-1.4/hw/xfree86/dixmods/xkbVT.c | 65 + xorg-server-1.4/hw/xfree86/doc/Makefile.am | 10 + xorg-server-1.4/hw/xfree86/doc/Makefile.in | 673 + xorg-server-1.4/hw/xfree86/doc/README.DRI | 1256 + xorg-server-1.4/hw/xfree86/doc/README.fonts | 1158 + xorg-server-1.4/hw/xfree86/doc/README.rapidaccess | 48 + .../hw/xfree86/doc/devel/DebuggingHints | 192 + xorg-server-1.4/hw/xfree86/doc/devel/Domain.note | 159 + xorg-server-1.4/hw/xfree86/doc/devel/Makefile.am | 10 + xorg-server-1.4/hw/xfree86/doc/devel/Makefile.in | 518 + xorg-server-1.4/hw/xfree86/doc/devel/RAC.Notes | 696 + .../hw/xfree86/doc/devel/README.DRIcomp | 556 + xorg-server-1.4/hw/xfree86/doc/devel/Registry | 410 + .../hw/xfree86/doc/devel/exa-driver.txt | 94 + xorg-server-1.4/hw/xfree86/doc/man/Makefile.am | 24 + xorg-server-1.4/hw/xfree86/doc/man/Makefile.in | 623 + xorg-server-1.4/hw/xfree86/doc/man/Xorg.man.pre | 700 + .../hw/xfree86/doc/man/xorg.conf.man.pre | 2186 + xorg-server-1.4/hw/xfree86/doc/sgml/DESIGN.sgml | 7414 + xorg-server-1.4/hw/xfree86/doc/sgml/Makefile.am | 54 + xorg-server-1.4/hw/xfree86/doc/sgml/Makefile.in | 557 + xorg-server-1.4/hw/xfree86/dri/Makefile.am | 23 + xorg-server-1.4/hw/xfree86/dri/Makefile.in | 719 + xorg-server-1.4/hw/xfree86/dri/dri.c | 2535 + xorg-server-1.4/hw/xfree86/dri/dri.h | 382 + xorg-server-1.4/hw/xfree86/dri/drimodule.c | 93 + xorg-server-1.4/hw/xfree86/dri/dristruct.h | 132 + xorg-server-1.4/hw/xfree86/dri/sarea.h | 97 + xorg-server-1.4/hw/xfree86/dri/xf86dri.c | 692 + xorg-server-1.4/hw/xfree86/dummylib/Makefile.am | 41 + xorg-server-1.4/hw/xfree86/dummylib/Makefile.in | 734 + xorg-server-1.4/hw/xfree86/dummylib/README | 7 + xorg-server-1.4/hw/xfree86/dummylib/dummylib.h | 9 + xorg-server-1.4/hw/xfree86/dummylib/fatalerror.c | 25 + xorg-server-1.4/hw/xfree86/dummylib/getemptypci.c | 19 + xorg-server-1.4/hw/xfree86/dummylib/getvalidbios.c | 19 + xorg-server-1.4/hw/xfree86/dummylib/logvwrite.c | 21 + xorg-server-1.4/hw/xfree86/dummylib/pcitestmulti.c | 19 + xorg-server-1.4/hw/xfree86/dummylib/verrorf.c | 19 + xorg-server-1.4/hw/xfree86/dummylib/xalloc.c | 111 + .../hw/xfree86/dummylib/xf86addrestolist.c | 24 + .../hw/xfree86/dummylib/xf86allocscripi.c | 19 + xorg-server-1.4/hw/xfree86/dummylib/xf86drvmsg.c | 24 + .../hw/xfree86/dummylib/xf86drvmsgverb.c | 24 + xorg-server-1.4/hw/xfree86/dummylib/xf86errorf.c | 33 + .../hw/xfree86/dummylib/xf86errorfverb.c | 24 + .../hw/xfree86/dummylib/xf86getpagesize.c | 21 + xorg-server-1.4/hw/xfree86/dummylib/xf86getverb.c | 19 + xorg-server-1.4/hw/xfree86/dummylib/xf86info.c | 12 + xorg-server-1.4/hw/xfree86/dummylib/xf86msg.c | 24 + xorg-server-1.4/hw/xfree86/dummylib/xf86msgverb.c | 24 + xorg-server-1.4/hw/xfree86/dummylib/xf86opt.c | 25 + xorg-server-1.4/hw/xfree86/dummylib/xf86screens.c | 12 + .../hw/xfree86/dummylib/xf86servisinit.c | 19 + xorg-server-1.4/hw/xfree86/dummylib/xf86verbose.c | 12 + xorg-server-1.4/hw/xfree86/exa/Makefile.am | 28 + xorg-server-1.4/hw/xfree86/exa/Makefile.in | 739 + xorg-server-1.4/hw/xfree86/exa/exa.man.pre | 40 + xorg-server-1.4/hw/xfree86/exa/examodule.c | 224 + xorg-server-1.4/hw/xfree86/fbdevhw/Makefile.am | 28 + xorg-server-1.4/hw/xfree86/fbdevhw/Makefile.in | 760 + xorg-server-1.4/hw/xfree86/fbdevhw/README | 16 + xorg-server-1.4/hw/xfree86/fbdevhw/fbdevhw.c | 974 + xorg-server-1.4/hw/xfree86/fbdevhw/fbdevhw.h | 60 + xorg-server-1.4/hw/xfree86/fbdevhw/fbdevhw.man.pre | 22 + xorg-server-1.4/hw/xfree86/fbdevhw/fbdevhwstub.c | 197 + xorg-server-1.4/hw/xfree86/fbdevhw/fbpriv.h | 265 + xorg-server-1.4/hw/xfree86/i2c/Makefile.am | 43 + xorg-server-1.4/hw/xfree86/i2c/Makefile.in | 787 + xorg-server-1.4/hw/xfree86/i2c/bt829.c | 745 + xorg-server-1.4/hw/xfree86/i2c/bt829.h | 97 + xorg-server-1.4/hw/xfree86/i2c/bt829_module.c | 28 + xorg-server-1.4/hw/xfree86/i2c/fi1236.c | 609 + xorg-server-1.4/hw/xfree86/i2c/fi1236.h | 110 + xorg-server-1.4/hw/xfree86/i2c/fi1236_module.c | 32 + xorg-server-1.4/hw/xfree86/i2c/i2c_def.h | 14 + xorg-server-1.4/hw/xfree86/i2c/msp3430.c | 726 + xorg-server-1.4/hw/xfree86/i2c/msp3430.h | 114 + xorg-server-1.4/hw/xfree86/i2c/msp3430_module.c | 32 + xorg-server-1.4/hw/xfree86/i2c/tda8425.c | 78 + xorg-server-1.4/hw/xfree86/i2c/tda8425.h | 42 + xorg-server-1.4/hw/xfree86/i2c/tda8425_module.c | 32 + xorg-server-1.4/hw/xfree86/i2c/tda9850.c | 112 + xorg-server-1.4/hw/xfree86/i2c/tda9850.h | 39 + xorg-server-1.4/hw/xfree86/i2c/tda9850_module.c | 32 + xorg-server-1.4/hw/xfree86/i2c/tda9885.c | 104 + xorg-server-1.4/hw/xfree86/i2c/tda9885.h | 60 + xorg-server-1.4/hw/xfree86/i2c/tda9885_module.c | 32 + xorg-server-1.4/hw/xfree86/i2c/uda1380.c | 183 + xorg-server-1.4/hw/xfree86/i2c/uda1380.h | 75 + xorg-server-1.4/hw/xfree86/i2c/uda1380_module.c | 32 + xorg-server-1.4/hw/xfree86/i2c/xf86i2c.c | 890 + xorg-server-1.4/hw/xfree86/i2c/xf86i2c.h | 96 + xorg-server-1.4/hw/xfree86/int10/INT10.HOWTO | 344 + xorg-server-1.4/hw/xfree86/int10/Makefile.am | 45 + xorg-server-1.4/hw/xfree86/int10/Makefile.in | 741 + xorg-server-1.4/hw/xfree86/int10/generic.c | 449 + xorg-server-1.4/hw/xfree86/int10/helper_exec.c | 694 + xorg-server-1.4/hw/xfree86/int10/helper_mem.c | 330 + xorg-server-1.4/hw/xfree86/int10/pci.c | 55 + xorg-server-1.4/hw/xfree86/int10/stub.c | 69 + xorg-server-1.4/hw/xfree86/int10/x86emu.c | 12 + xorg-server-1.4/hw/xfree86/int10/xf86int10.c | 789 + xorg-server-1.4/hw/xfree86/int10/xf86int10.h | 186 + xorg-server-1.4/hw/xfree86/int10/xf86int10module.c | 64 + xorg-server-1.4/hw/xfree86/int10/xf86x86emu.c | 89 + xorg-server-1.4/hw/xfree86/int10/xf86x86emu.h | 54 + xorg-server-1.4/hw/xfree86/loader/Makefile.am | 35 + xorg-server-1.4/hw/xfree86/loader/Makefile.in | 691 + xorg-server-1.4/hw/xfree86/loader/SparcMulDiv.S | 87 + xorg-server-1.4/hw/xfree86/loader/dixsym.c | 533 + xorg-server-1.4/hw/xfree86/loader/dlloader.c | 190 + xorg-server-1.4/hw/xfree86/loader/dlloader.h | 33 + xorg-server-1.4/hw/xfree86/loader/extsym.c | 79 + xorg-server-1.4/hw/xfree86/loader/fontsym.c | 109 + xorg-server-1.4/hw/xfree86/loader/loader.c | 389 + xorg-server-1.4/hw/xfree86/loader/loader.h | 106 + xorg-server-1.4/hw/xfree86/loader/loaderProcs.h | 112 + xorg-server-1.4/hw/xfree86/loader/loadext.c | 440 + xorg-server-1.4/hw/xfree86/loader/loadfont.c | 81 + xorg-server-1.4/hw/xfree86/loader/loadmod.c | 1315 + xorg-server-1.4/hw/xfree86/loader/misym.c | 214 + xorg-server-1.4/hw/xfree86/loader/os.c | 78 + xorg-server-1.4/hw/xfree86/loader/sym.h | 41 + xorg-server-1.4/hw/xfree86/loader/xf86sym.c | 1291 + xorg-server-1.4/hw/xfree86/modes/Makefile.am | 29 + xorg-server-1.4/hw/xfree86/modes/Makefile.in | 683 + xorg-server-1.4/hw/xfree86/modes/xf86Crtc.c | 2264 + xorg-server-1.4/hw/xfree86/modes/xf86Crtc.h | 788 + xorg-server-1.4/hw/xfree86/modes/xf86Cursors.c | 646 + xorg-server-1.4/hw/xfree86/modes/xf86DiDGA.c | 286 + xorg-server-1.4/hw/xfree86/modes/xf86EdidModes.c | 491 + xorg-server-1.4/hw/xfree86/modes/xf86Modes.c | 661 + xorg-server-1.4/hw/xfree86/modes/xf86Modes.h | 98 + xorg-server-1.4/hw/xfree86/modes/xf86RandR12.c | 1129 + xorg-server-1.4/hw/xfree86/modes/xf86RandR12.h | 41 + xorg-server-1.4/hw/xfree86/modes/xf86Rename.h | 93 + xorg-server-1.4/hw/xfree86/modes/xf86Rotate.c | 660 + xorg-server-1.4/hw/xfree86/modes/xf86cvt.c | 308 + xorg-server-1.4/hw/xfree86/os-support/Makefile.am | 28 + xorg-server-1.4/hw/xfree86/os-support/Makefile.in | 787 + .../hw/xfree86/os-support/README.OS-lib | 505 + xorg-server-1.4/hw/xfree86/os-support/assyntax.h | 749 + .../hw/xfree86/os-support/bsd/Makefile.am | 88 + .../hw/xfree86/os-support/bsd/Makefile.in | 818 + .../hw/xfree86/os-support/bsd/alpha_video.c | 732 + .../hw/xfree86/os-support/bsd/arm_video.c | 687 + .../hw/xfree86/os-support/bsd/bsdResource.c | 193 + .../hw/xfree86/os-support/bsd/bsd_VTsw.c | 94 + .../hw/xfree86/os-support/bsd/bsd_apm.c | 139 + .../hw/xfree86/os-support/bsd/bsd_axp.c | 72 + .../hw/xfree86/os-support/bsd/bsd_bell.c | 86 + .../hw/xfree86/os-support/bsd/bsd_ev56.c | 90 + .../hw/xfree86/os-support/bsd/bsd_init.c | 736 + .../hw/xfree86/os-support/bsd/bsd_jstk.c | 183 + .../hw/xfree86/os-support/bsd/bsd_kmod.c | 28 + .../hw/xfree86/os-support/bsd/bsd_kqueue_apm.c | 201 + .../hw/xfree86/os-support/bsd/bsd_mouse.c | 791 + .../hw/xfree86/os-support/bsd/i386_video.c | 1001 + .../hw/xfree86/os-support/bsd/libusb/data.c | 92 + .../hw/xfree86/os-support/bsd/libusb/descr.c | 73 + .../hw/xfree86/os-support/bsd/libusb/parse.c | 401 + .../hw/xfree86/os-support/bsd/libusb/usage.c | 196 + .../hw/xfree86/os-support/bsd/libusb/usb.3 | 191 + .../hw/xfree86/os-support/bsd/libusb/usb.h | 92 + .../xfree86/os-support/bsd/libusb/usb_hid_usages | 1079 + .../hw/xfree86/os-support/bsd/libusb/usbvar.h | 31 + .../hw/xfree86/os-support/bsd/memrange.h | 69 + .../hw/xfree86/os-support/bsd/ppc_video.c | 171 + .../hw/xfree86/os-support/bsd/sparc64_video.c | 109 + .../hw/xfree86/os-support/bus/460gxPCI.c | 469 + .../hw/xfree86/os-support/bus/460gxPCI.h | 41 + .../hw/xfree86/os-support/bus/Makefile.am | 58 + .../hw/xfree86/os-support/bus/Makefile.in | 709 + xorg-server-1.4/hw/xfree86/os-support/bus/Pci.c | 1417 + xorg-server-1.4/hw/xfree86/os-support/bus/Pci.h | 445 + xorg-server-1.4/hw/xfree86/os-support/bus/Sbus.c | 636 + .../hw/xfree86/os-support/bus/altixPCI.c | 83 + .../hw/xfree86/os-support/bus/altixPCI.h | 20 + xorg-server-1.4/hw/xfree86/os-support/bus/axpPci.c | 478 + .../hw/xfree86/os-support/bus/e8870PCI.c | 63 + .../hw/xfree86/os-support/bus/e8870PCI.h | 41 + .../hw/xfree86/os-support/bus/freebsdPci.c | 166 + .../hw/xfree86/os-support/bus/ix86Pci.c | 699 + .../hw/xfree86/os-support/bus/linuxPci.c | 1142 + .../hw/xfree86/os-support/bus/netbsdPci.c | 131 + xorg-server-1.4/hw/xfree86/os-support/bus/ppcPci.c | 82 + .../hw/xfree86/os-support/bus/sparcPci.c | 1051 + .../hw/xfree86/os-support/bus/xf86Pci.h | 802 + .../hw/xfree86/os-support/bus/xf86Sbus.h | 69 + xorg-server-1.4/hw/xfree86/os-support/bus/zx1PCI.c | 1140 + xorg-server-1.4/hw/xfree86/os-support/bus/zx1PCI.h | 39 + .../hw/xfree86/os-support/hurd/Makefile.am | 17 + .../hw/xfree86/os-support/hurd/Makefile.in | 710 + .../hw/xfree86/os-support/hurd/hurd_bell.c | 37 + .../hw/xfree86/os-support/hurd/hurd_init.c | 89 + .../hw/xfree86/os-support/hurd/hurd_mmap.c | 95 + .../hw/xfree86/os-support/hurd/hurd_mouse.c | 242 + .../hw/xfree86/os-support/hurd/hurd_video.c | 170 + .../hw/xfree86/os-support/int10Defines.h | 89 + .../hw/xfree86/os-support/linux/Makefile.am | 59 + .../hw/xfree86/os-support/linux/Makefile.in | 792 + .../hw/xfree86/os-support/linux/int10/linux.c | 549 + .../os-support/linux/int10/vm86/linux_vm86.c | 302 + xorg-server-1.4/hw/xfree86/os-support/linux/lnx.h | 53 + .../hw/xfree86/os-support/linux/lnxResource.c | 290 + .../hw/xfree86/os-support/linux/lnx_acpi.c | 186 + .../hw/xfree86/os-support/linux/lnx_agp.c | 374 + .../hw/xfree86/os-support/linux/lnx_apm.c | 206 + .../hw/xfree86/os-support/linux/lnx_axp.c | 199 + .../hw/xfree86/os-support/linux/lnx_bell.c | 45 + .../hw/xfree86/os-support/linux/lnx_ev56.c | 150 + .../hw/xfree86/os-support/linux/lnx_font.c | 291 + .../hw/xfree86/os-support/linux/lnx_ia64.c | 74 + .../hw/xfree86/os-support/linux/lnx_init.c | 416 + .../hw/xfree86/os-support/linux/lnx_jstk.c | 180 + .../hw/xfree86/os-support/linux/lnx_kmod.c | 112 + .../hw/xfree86/os-support/linux/lnx_mouse.c | 205 + .../hw/xfree86/os-support/linux/lnx_pci.c | 258 + .../hw/xfree86/os-support/linux/lnx_video.c | 1115 + .../hw/xfree86/os-support/lynxos/Makefile.am | 8 + .../hw/xfree86/os-support/lynxos/Makefile.in | 516 + .../hw/xfree86/os-support/lynxos/lynx_init.c | 192 + .../hw/xfree86/os-support/lynxos/lynx_mmap.c | 72 + .../hw/xfree86/os-support/lynxos/lynx_mouse.c | 33 + .../hw/xfree86/os-support/lynxos/lynx_noinline.c | 177 + .../hw/xfree86/os-support/lynxos/lynx_ppc.S | 70 + .../hw/xfree86/os-support/lynxos/lynx_ppc.c | 51 + .../hw/xfree86/os-support/lynxos/lynx_video.c | 710 + .../hw/xfree86/os-support/misc/BUSmemcpy.S | 153 + .../hw/xfree86/os-support/misc/BUSmemcpy.c | 412 + xorg-server-1.4/hw/xfree86/os-support/misc/Delay.c | 39 + .../hw/xfree86/os-support/misc/IODelay.S | 53 + .../hw/xfree86/os-support/misc/IODelay.c | 24 + .../hw/xfree86/os-support/misc/Makefile.am | 23 + .../hw/xfree86/os-support/misc/Makefile.in | 640 + .../hw/xfree86/os-support/misc/PortIO.S | 57 + .../hw/xfree86/os-support/misc/SlowBcopy.S | 108 + .../hw/xfree86/os-support/misc/SlowBcopy.c | 127 + .../hw/xfree86/os-support/misc/xf86_IlHack.c | 16 + .../hw/xfree86/os-support/misc/xf86_Util.c | 94 + .../hw/xfree86/os-support/sco/Makefile.am | 6 + .../hw/xfree86/os-support/sco/Makefile.in | 514 + .../hw/xfree86/os-support/sco/VTsw_sco.c | 117 + .../hw/xfree86/os-support/sco/sco_init.c | 294 + .../hw/xfree86/os-support/sco/sco_iop.c | 134 + .../hw/xfree86/os-support/sco/sco_mouse.c | 258 + .../hw/xfree86/os-support/sco/sco_video.c | 294 + .../hw/xfree86/os-support/shared/VTsw_noop.c | 54 + .../hw/xfree86/os-support/shared/VTsw_usl.c | 90 + .../hw/xfree86/os-support/shared/agp_noop.c | 103 + .../hw/xfree86/os-support/shared/bios_devmem.c | 75 + .../hw/xfree86/os-support/shared/bios_mmap.c | 162 + .../hw/xfree86/os-support/shared/ia64Pci.c | 243 + .../hw/xfree86/os-support/shared/inout.S | 111 + .../hw/xfree86/os-support/shared/ioperm_noop.c | 49 + .../hw/xfree86/os-support/shared/kmod_noop.c | 38 + .../hw/xfree86/os-support/shared/libc_wrapper.c | 2123 + .../hw/xfree86/os-support/shared/pm_noop.c | 47 + .../hw/xfree86/os-support/shared/posix_tty.c | 686 + .../hw/xfree86/os-support/shared/sigio.c | 285 + .../hw/xfree86/os-support/shared/sigiostubs.c | 71 + .../hw/xfree86/os-support/shared/stdPci.c | 48 + .../hw/xfree86/os-support/shared/stdResource.c | 176 + .../hw/xfree86/os-support/shared/vidmem.c | 296 + .../hw/xfree86/os-support/shared/xf86Axp.c | 49 + .../hw/xfree86/os-support/shared/xf86Axp.h | 34 + .../hw/xfree86/os-support/solaris/Makefile.am | 38 + .../hw/xfree86/os-support/solaris/Makefile.in | 813 + .../hw/xfree86/os-support/solaris/agpgart.h | 108 + .../hw/xfree86/os-support/solaris/apSolaris.shar | 806 + .../hw/xfree86/os-support/solaris/solaris-amd64.S | 73 + .../hw/xfree86/os-support/solaris/solaris-ia32.S | 73 + .../os-support/solaris/solaris-sparcv8plus.S | 144 + .../hw/xfree86/os-support/solaris/sun_agp.c | 338 + .../hw/xfree86/os-support/solaris/sun_apm.c | 232 + .../hw/xfree86/os-support/solaris/sun_bell.c | 185 + .../hw/xfree86/os-support/solaris/sun_bios.c | 103 + .../hw/xfree86/os-support/solaris/sun_init.c | 360 + .../hw/xfree86/os-support/solaris/sun_inout.s | 124 + .../hw/xfree86/os-support/solaris/sun_mouse.c | 717 + .../hw/xfree86/os-support/solaris/sun_vid.c | 236 + .../hw/xfree86/os-support/sysv/Makefile.am | 1 + .../hw/xfree86/os-support/sysv/Makefile.in | 508 + .../hw/xfree86/os-support/sysv/sysv_init.c | 252 + .../hw/xfree86/os-support/sysv/sysv_mouse.c | 60 + .../hw/xfree86/os-support/sysv/sysv_video.c | 367 + .../hw/xfree86/os-support/usl/Makefile.am | 6 + .../hw/xfree86/os-support/usl/Makefile.in | 514 + .../hw/xfree86/os-support/usl/usl_init.c | 357 + .../hw/xfree86/os-support/usl/usl_iop.c | 106 + .../hw/xfree86/os-support/usl/usl_mouse.c | 177 + .../hw/xfree86/os-support/usl/usl_video.c | 109 + .../hw/xfree86/os-support/usl/usl_vtsw.c | 95 + .../hw/xfree86/os-support/xf86OSmouse.h | 294 + xorg-server-1.4/hw/xfree86/os-support/xf86OSpriv.h | 56 + xorg-server-1.4/hw/xfree86/os-support/xf86_OSlib.h | 702 + .../hw/xfree86/os-support/xf86_OSproc.h | 258 + xorg-server-1.4/hw/xfree86/os-support/xf86_ansic.h | 314 + xorg-server-1.4/hw/xfree86/os-support/xf86_libc.h | 721 + xorg-server-1.4/hw/xfree86/os-support/xorgos.c | 0 xorg-server-1.4/hw/xfree86/osandcommon.c | 0 xorg-server-1.4/hw/xfree86/parser/Configint.h | 225 + xorg-server-1.4/hw/xfree86/parser/DRI.c | 185 + xorg-server-1.4/hw/xfree86/parser/Device.c | 402 + xorg-server-1.4/hw/xfree86/parser/Extensions.c | 111 + xorg-server-1.4/hw/xfree86/parser/Files.c | 282 + xorg-server-1.4/hw/xfree86/parser/Flags.c | 515 + xorg-server-1.4/hw/xfree86/parser/Input.c | 217 + xorg-server-1.4/hw/xfree86/parser/Layout.c | 534 + xorg-server-1.4/hw/xfree86/parser/Makefile.am | 41 + xorg-server-1.4/hw/xfree86/parser/Makefile.in | 736 + xorg-server-1.4/hw/xfree86/parser/Module.c | 279 + xorg-server-1.4/hw/xfree86/parser/Monitor.c | 906 + xorg-server-1.4/hw/xfree86/parser/Pointer.c | 237 + xorg-server-1.4/hw/xfree86/parser/Screen.c | 577 + xorg-server-1.4/hw/xfree86/parser/Vendor.c | 244 + xorg-server-1.4/hw/xfree86/parser/Video.c | 296 + xorg-server-1.4/hw/xfree86/parser/configProcs.h | 113 + xorg-server-1.4/hw/xfree86/parser/cpconfig.c | 122 + xorg-server-1.4/hw/xfree86/parser/read.c | 313 + xorg-server-1.4/hw/xfree86/parser/scan.c | 1030 + xorg-server-1.4/hw/xfree86/parser/write.c | 227 + xorg-server-1.4/hw/xfree86/parser/xf86Optrec.h | 112 + xorg-server-1.4/hw/xfree86/parser/xf86Parser.h | 484 + xorg-server-1.4/hw/xfree86/parser/xf86tokens.h | 280 + xorg-server-1.4/hw/xfree86/rac/Makefile.am | 8 + xorg-server-1.4/hw/xfree86/rac/Makefile.in | 651 + xorg-server-1.4/hw/xfree86/rac/xf86RAC.c | 1254 + xorg-server-1.4/hw/xfree86/rac/xf86RAC.h | 17 + xorg-server-1.4/hw/xfree86/ramdac/BT.c | 165 + xorg-server-1.4/hw/xfree86/ramdac/BT.h | 32 + xorg-server-1.4/hw/xfree86/ramdac/BTPriv.h | 20 + xorg-server-1.4/hw/xfree86/ramdac/CURSOR.NOTES | 191 + xorg-server-1.4/hw/xfree86/ramdac/IBM.c | 639 + xorg-server-1.4/hw/xfree86/ramdac/IBM.h | 385 + xorg-server-1.4/hw/xfree86/ramdac/IBMPriv.h | 27 + xorg-server-1.4/hw/xfree86/ramdac/Makefile.am | 19 + xorg-server-1.4/hw/xfree86/ramdac/Makefile.in | 674 + xorg-server-1.4/hw/xfree86/ramdac/TI.c | 719 + xorg-server-1.4/hw/xfree86/ramdac/TI.h | 95 + xorg-server-1.4/hw/xfree86/ramdac/TIPriv.h | 29 + xorg-server-1.4/hw/xfree86/ramdac/xf86BitOrder.c | 2 + xorg-server-1.4/hw/xfree86/ramdac/xf86Cursor.c | 410 + xorg-server-1.4/hw/xfree86/ramdac/xf86Cursor.h | 51 + xorg-server-1.4/hw/xfree86/ramdac/xf86CursorPriv.h | 50 + xorg-server-1.4/hw/xfree86/ramdac/xf86HWCurs.c | 527 + xorg-server-1.4/hw/xfree86/ramdac/xf86RamDac.c | 154 + xorg-server-1.4/hw/xfree86/ramdac/xf86RamDac.h | 123 + xorg-server-1.4/hw/xfree86/ramdac/xf86RamDacCmap.c | 74 + xorg-server-1.4/hw/xfree86/ramdac/xf86RamDacPriv.h | 13 + xorg-server-1.4/hw/xfree86/scanpci/Makefile.am | 32 + xorg-server-1.4/hw/xfree86/scanpci/Makefile.in | 689 + xorg-server-1.4/hw/xfree86/scanpci/extrapci.ids | 44 + xorg-server-1.4/hw/xfree86/scanpci/pci.ids | 14233 ++ xorg-server-1.4/hw/xfree86/scanpci/pciid2c.pl | 388 + xorg-server-1.4/hw/xfree86/scanpci/xf86PciData.c | 2 + xorg-server-1.4/hw/xfree86/scanpci/xf86PciData.h | 69 + xorg-server-1.4/hw/xfree86/scanpci/xf86PciIds.h | 156549 ++++++++++++++++++ xorg-server-1.4/hw/xfree86/scanpci/xf86PciStdIds.h | 156549 ++++++++++++++++++ xorg-server-1.4/hw/xfree86/scanpci/xf86PciStr.h | 66 + xorg-server-1.4/hw/xfree86/scanpci/xf86ScanPci.c | 346 + xorg-server-1.4/hw/xfree86/scanpci/xf86ScanPci.h | 48 + xorg-server-1.4/hw/xfree86/shadowfb/Makefile.am | 9 + xorg-server-1.4/hw/xfree86/shadowfb/Makefile.in | 678 + xorg-server-1.4/hw/xfree86/shadowfb/sfbmodule.c | 21 + xorg-server-1.4/hw/xfree86/shadowfb/shadow.c | 1834 + xorg-server-1.4/hw/xfree86/shadowfb/shadowfb.h | 43 + xorg-server-1.4/hw/xfree86/utils/Makefile.am | 9 + xorg-server-1.4/hw/xfree86/utils/Makefile.in | 676 + xorg-server-1.4/hw/xfree86/utils/cvt/Makefile.am | 45 + xorg-server-1.4/hw/xfree86/utils/cvt/Makefile.in | 811 + xorg-server-1.4/hw/xfree86/utils/cvt/cvt.c | 236 + xorg-server-1.4/hw/xfree86/utils/cvt/cvt.man.pre | 42 + xorg-server-1.4/hw/xfree86/utils/gtf/Makefile.am | 50 + xorg-server-1.4/hw/xfree86/utils/gtf/Makefile.in | 778 + xorg-server-1.4/hw/xfree86/utils/gtf/gtf.c | 746 + xorg-server-1.4/hw/xfree86/utils/gtf/gtf.man.pre | 45 + .../hw/xfree86/utils/ioport/Makefile.am | 58 + .../hw/xfree86/utils/ioport/Makefile.in | 715 + xorg-server-1.4/hw/xfree86/utils/ioport/ioport.c | 492 + .../hw/xfree86/utils/kbd_mode/Makefile.am | 70 + .../hw/xfree86/utils/kbd_mode/Makefile.in | 807 + .../hw/xfree86/utils/kbd_mode/bsd-kbd_mode.c | 91 + .../hw/xfree86/utils/kbd_mode/bsd-kbd_mode.man.pre | 36 + .../hw/xfree86/utils/kbd_mode/sun-kbd_mode.c | 152 + .../hw/xfree86/utils/kbd_mode/sun-kbd_mode.man.pre | 53 + .../hw/xfree86/utils/pcitweak/Makefile.am | 60 + .../hw/xfree86/utils/pcitweak/Makefile.in | 789 + .../hw/xfree86/utils/pcitweak/pcitweak.c | 241 + .../hw/xfree86/utils/pcitweak/pcitweak.man.pre | 64 + .../hw/xfree86/utils/scanpci/Makefile.am | 62 + .../hw/xfree86/utils/scanpci/Makefile.in | 792 + xorg-server-1.4/hw/xfree86/utils/scanpci/scanpci.c | 779 + .../hw/xfree86/utils/scanpci/scanpci.man.pre | 42 + .../hw/xfree86/utils/xorgcfg/Makefile.am | 165 + .../hw/xfree86/utils/xorgcfg/Makefile.in | 1302 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/TODO | 33 + .../hw/xfree86/utils/xorgcfg/XOrgCfg.pre | 1852 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/accessx.c | 681 + .../hw/xfree86/utils/xorgcfg/card-cfg.c | 433 + .../hw/xfree86/utils/xorgcfg/card-cfg.h | 43 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/card.xbm | 59 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/card.xpm | 81 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/cards.c | 695 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/cards.h | 89 + .../hw/xfree86/utils/xorgcfg/computer.xpm | 91 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/config.c | 301 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/config.h | 227 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/down.xbm | 8 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/expert.c | 4857 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/help.c | 1785 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/help.h | 40 + .../hw/xfree86/utils/xorgcfg/interface.c | 2282 + .../hw/xfree86/utils/xorgcfg/keyboard-cfg.c | 1378 + .../hw/xfree86/utils/xorgcfg/keyboard-cfg.h | 73 + .../hw/xfree86/utils/xorgcfg/keyboard.xbm | 59 + .../hw/xfree86/utils/xorgcfg/keyboard.xpm | 66 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/left.xbm | 8 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/loader.c | 405 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/loader.h | 170 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/loadmod.c | 681 + .../hw/xfree86/utils/xorgcfg/monitor-cfg.c | 456 + .../hw/xfree86/utils/xorgcfg/monitor-cfg.h | 47 + .../hw/xfree86/utils/xorgcfg/monitor.xbm | 59 + .../hw/xfree86/utils/xorgcfg/monitor.xpm | 79 + .../hw/xfree86/utils/xorgcfg/mouse-cfg.c | 449 + .../hw/xfree86/utils/xorgcfg/mouse-cfg.h | 42 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/mouse.xbm | 59 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/mouse.xpm | 76 + .../hw/xfree86/utils/xorgcfg/narrower.xbm | 8 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/options.c | 787 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/options.h | 50 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/right.xbm | 8 + .../hw/xfree86/utils/xorgcfg/screen-cfg.c | 555 + .../hw/xfree86/utils/xorgcfg/screen-cfg.h | 43 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/screen.c | 983 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/screen.h | 51 + .../hw/xfree86/utils/xorgcfg/shorter.xbm | 8 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/startx.c | 149 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/stubs.c | 65 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/stubs.h | 42 + .../hw/xfree86/utils/xorgcfg/taller.xbm | 8 + .../hw/xfree86/utils/xorgcfg/text-mode.c | 3379 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/up.xbm | 8 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/vidmode.c | 1346 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/vidmode.h | 63 + xorg-server-1.4/hw/xfree86/utils/xorgcfg/wider.xbm | 8 + .../hw/xfree86/utils/xorgcfg/xf86config.c | 982 + .../hw/xfree86/utils/xorgcfg/xf86config.h | 110 + .../hw/xfree86/utils/xorgcfg/xorgcfg.man.pre | 152 + xorg-server-1.4/hw/xfree86/utils/xorgconfig/Cards | 3135 + .../hw/xfree86/utils/xorgconfig/Cards98 | 647 + .../hw/xfree86/utils/xorgconfig/Makefile.am | 70 + .../hw/xfree86/utils/xorgconfig/Makefile.in | 835 + .../hw/xfree86/utils/xorgconfig/cards.c | 278 + .../hw/xfree86/utils/xorgconfig/cards.h | 30 + .../hw/xfree86/utils/xorgconfig/xorgconfig.c | 2903 + .../hw/xfree86/utils/xorgconfig/xorgconfig.man.pre | 22 + xorg-server-1.4/hw/xfree86/vbe/Makefile.am | 10 + xorg-server-1.4/hw/xfree86/vbe/Makefile.in | 681 + xorg-server-1.4/hw/xfree86/vbe/vbe.c | 1146 + xorg-server-1.4/hw/xfree86/vbe/vbe.h | 347 + xorg-server-1.4/hw/xfree86/vbe/vbeModes.c | 482 + xorg-server-1.4/hw/xfree86/vbe/vbeModes.h | 90 + xorg-server-1.4/hw/xfree86/vbe/vbe_module.c | 31 + xorg-server-1.4/hw/xfree86/vgahw/Makefile.am | 9 + xorg-server-1.4/hw/xfree86/vgahw/Makefile.in | 679 + xorg-server-1.4/hw/xfree86/vgahw/vgaCmap.c | 302 + xorg-server-1.4/hw/xfree86/vgahw/vgaHW.c | 2004 + xorg-server-1.4/hw/xfree86/vgahw/vgaHW.h | 236 + xorg-server-1.4/hw/xfree86/vgahw/vgaHWmodule.c | 24 + xorg-server-1.4/hw/xfree86/x86emu/Makefile.am | 26 + xorg-server-1.4/hw/xfree86/x86emu/Makefile.in | 646 + xorg-server-1.4/hw/xfree86/x86emu/debug.c | 430 + xorg-server-1.4/hw/xfree86/x86emu/decode.c | 1092 + xorg-server-1.4/hw/xfree86/x86emu/fpu.c | 965 + xorg-server-1.4/hw/xfree86/x86emu/ops.c | 11697 ++ xorg-server-1.4/hw/xfree86/x86emu/ops2.c | 2836 + xorg-server-1.4/hw/xfree86/x86emu/prim_ops.c | 2656 + xorg-server-1.4/hw/xfree86/x86emu/sys.c | 663 + xorg-server-1.4/hw/xfree86/x86emu/validate.c | 765 + xorg-server-1.4/hw/xfree86/x86emu/x86emu.h | 198 + xorg-server-1.4/hw/xfree86/x86emu/x86emu/debug.h | 210 + xorg-server-1.4/hw/xfree86/x86emu/x86emu/decode.h | 88 + xorg-server-1.4/hw/xfree86/x86emu/x86emu/fpu.h | 61 + .../hw/xfree86/x86emu/x86emu/fpu_regs.h | 119 + xorg-server-1.4/hw/xfree86/x86emu/x86emu/ops.h | 45 + .../hw/xfree86/x86emu/x86emu/prim_asm.h | 970 + .../hw/xfree86/x86emu/x86emu/prim_ops.h | 141 + xorg-server-1.4/hw/xfree86/x86emu/x86emu/regs.h | 337 + xorg-server-1.4/hw/xfree86/x86emu/x86emu/types.h | 106 + xorg-server-1.4/hw/xfree86/x86emu/x86emu/x86emui.h | 102 + xorg-server-1.4/hw/xfree86/xaa/Makefile.am | 72 + xorg-server-1.4/hw/xfree86/xaa/Makefile.in | 813 + xorg-server-1.4/hw/xfree86/xaa/XAA.HOWTO | 1427 + xorg-server-1.4/hw/xfree86/xaa/l-xaaBitmap.c | 2 + xorg-server-1.4/hw/xfree86/xaa/l-xaaStipple.c | 2 + xorg-server-1.4/hw/xfree86/xaa/l-xaaTEGlyph.c | 2 + xorg-server-1.4/hw/xfree86/xaa/l3-xaaBitmap.c | 3 + xorg-server-1.4/hw/xfree86/xaa/l3-xaaStipple.c | 3 + xorg-server-1.4/hw/xfree86/xaa/lf-xaaBitmap.c | 3 + xorg-server-1.4/hw/xfree86/xaa/lf-xaaStipple.c | 3 + xorg-server-1.4/hw/xfree86/xaa/lf-xaaTEGlyph.c | 3 + xorg-server-1.4/hw/xfree86/xaa/lf3-xaaBitmap.c | 4 + xorg-server-1.4/hw/xfree86/xaa/lf3-xaaStipple.c | 4 + xorg-server-1.4/hw/xfree86/xaa/m-xaaBitmap.c | 2 + xorg-server-1.4/hw/xfree86/xaa/m-xaaStipple.c | 2 + xorg-server-1.4/hw/xfree86/xaa/m-xaaTEGlyph.c | 2 + xorg-server-1.4/hw/xfree86/xaa/m3-xaaBitmap.c | 3 + xorg-server-1.4/hw/xfree86/xaa/m3-xaaStipple.c | 3 + xorg-server-1.4/hw/xfree86/xaa/mf-xaaBitmap.c | 3 + xorg-server-1.4/hw/xfree86/xaa/mf-xaaStipple.c | 3 + xorg-server-1.4/hw/xfree86/xaa/mf-xaaTEGlyph.c | 3 + xorg-server-1.4/hw/xfree86/xaa/mf3-xaaBitmap.c | 4 + xorg-server-1.4/hw/xfree86/xaa/mf3-xaaStipple.c | 4 + xorg-server-1.4/hw/xfree86/xaa/s-xaaDashLine.c | 2 + xorg-server-1.4/hw/xfree86/xaa/s-xaaLine.c | 2 + xorg-server-1.4/hw/xfree86/xaa/xaa.h | 1401 + xorg-server-1.4/hw/xfree86/xaa/xaaBitBlt.c | 221 + xorg-server-1.4/hw/xfree86/xaa/xaaBitOrder.c | 16 + xorg-server-1.4/hw/xfree86/xaa/xaaBitmap.c | 476 + xorg-server-1.4/hw/xfree86/xaa/xaaCpyArea.c | 387 + xorg-server-1.4/hw/xfree86/xaa/xaaCpyPlane.c | 210 + xorg-server-1.4/hw/xfree86/xaa/xaaCpyWin.c | 82 + xorg-server-1.4/hw/xfree86/xaa/xaaDashLine.c | 333 + xorg-server-1.4/hw/xfree86/xaa/xaaFallback.c | 352 + xorg-server-1.4/hw/xfree86/xaa/xaaFillArc.c | 217 + xorg-server-1.4/hw/xfree86/xaa/xaaFillPoly.c | 962 + xorg-server-1.4/hw/xfree86/xaa/xaaFillRect.c | 1095 + xorg-server-1.4/hw/xfree86/xaa/xaaGC.c | 654 + xorg-server-1.4/hw/xfree86/xaa/xaaGCmisc.c | 428 + xorg-server-1.4/hw/xfree86/xaa/xaaImage.c | 521 + xorg-server-1.4/hw/xfree86/xaa/xaaInit.c | 788 + xorg-server-1.4/hw/xfree86/xaa/xaaInitAccel.c | 1511 + xorg-server-1.4/hw/xfree86/xaa/xaaLine.c | 394 + xorg-server-1.4/hw/xfree86/xaa/xaaLineMisc.c | 150 + xorg-server-1.4/hw/xfree86/xaa/xaaNonTEGlyph.c | 200 + xorg-server-1.4/hw/xfree86/xaa/xaaNonTEText.c | 592 + xorg-server-1.4/hw/xfree86/xaa/xaaOffscreen.c | 162 + xorg-server-1.4/hw/xfree86/xaa/xaaOverlay.c | 308 + xorg-server-1.4/hw/xfree86/xaa/xaaOverlayDF.c | 1156 + xorg-server-1.4/hw/xfree86/xaa/xaaPCache.c | 2377 + xorg-server-1.4/hw/xfree86/xaa/xaaPaintWin.c | 200 + xorg-server-1.4/hw/xfree86/xaa/xaaPict.c | 787 + xorg-server-1.4/hw/xfree86/xaa/xaaROP.c | 184 + xorg-server-1.4/hw/xfree86/xaa/xaaRect.c | 136 + xorg-server-1.4/hw/xfree86/xaa/xaaSpans.c | 882 + xorg-server-1.4/hw/xfree86/xaa/xaaStateChange.c | 1684 + xorg-server-1.4/hw/xfree86/xaa/xaaStipple.c | 866 + xorg-server-1.4/hw/xfree86/xaa/xaaTEGlyph.c | 1077 + xorg-server-1.4/hw/xfree86/xaa/xaaTEGlyphBlt.S | 964 + xorg-server-1.4/hw/xfree86/xaa/xaaTEText.c | 312 + xorg-server-1.4/hw/xfree86/xaa/xaaTables.c | 87 + xorg-server-1.4/hw/xfree86/xaa/xaaWideLine.c | 921 + xorg-server-1.4/hw/xfree86/xaa/xaaWrapper.c | 532 + xorg-server-1.4/hw/xfree86/xaa/xaaWrapper.h | 10 + xorg-server-1.4/hw/xfree86/xaa/xaacexp.h | 127 + xorg-server-1.4/hw/xfree86/xaa/xaalocal.h | 1769 + xorg-server-1.4/hw/xfree86/xaa/xaarop.h | 311 + xorg-server-1.4/hw/xfree86/xaa/xaawrap.h | 81 + xorg-server-1.4/hw/xfree86/xf1bpp/Makefile.am | 180 + xorg-server-1.4/hw/xfree86/xf1bpp/Makefile.in | 910 + xorg-server-1.4/hw/xfree86/xf1bpp/maskbits.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbbitblt.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbbltC.c | 3 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbbltCI.c | 3 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbbltG.c | 3 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbbltO.c | 3 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbbltX.c | 3 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbbres.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbbresd.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbbstore.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbclip.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbcmap.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbfillarc.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbfillrct.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbfillsp.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbfont.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbgc.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbgetsp.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbhrzvert.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbigbblak.c | 4 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbigbwht.c | 4 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbimage.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbline.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbmap.h | 123 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbmap.sh | 25 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbmisc.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbmodule.c | 47 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbpablack.c | 6 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbpainv.c | 6 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbpawhite.c | 6 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbpgbblak.c | 4 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbpgbinv.c | 4 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbpgbwht.c | 4 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbpixmap.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbplyblack.c | 5 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbplyinv.c | 5 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbplywhite.c | 5 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbpntwin.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbpolypnt.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbpushpxl.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbscrclse.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbscrinit.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbseg.c | 3 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbsetsp.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbteblack.c | 5 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbtewhite.c | 5 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbtileC.c | 3 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbtileG.c | 3 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbunmap.h | 115 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbunmap.sh | 23 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbwindow.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/mfbzerarc.c | 2 + xorg-server-1.4/hw/xfree86/xf1bpp/xf1bpp.h | 36 + xorg-server-1.4/hw/xfree86/xf4bpp/Makefile.am | 59 + xorg-server-1.4/hw/xfree86/xf4bpp/Makefile.in | 772 + xorg-server-1.4/hw/xfree86/xf4bpp/NOTES | 194 + xorg-server-1.4/hw/xfree86/xf4bpp/OScompiler.h | 58 + xorg-server-1.4/hw/xfree86/xf4bpp/emulOpStip.c | 102 + xorg-server-1.4/hw/xfree86/xf4bpp/emulRepAre.c | 69 + xorg-server-1.4/hw/xfree86/xf4bpp/emulTile.c | 352 + xorg-server-1.4/hw/xfree86/xf4bpp/ibmTrace.h | 1 + xorg-server-1.4/hw/xfree86/xf4bpp/mfbbres.c | 164 + xorg-server-1.4/hw/xfree86/xf4bpp/mfbbresd.c | 205 + xorg-server-1.4/hw/xfree86/xf4bpp/mfbfillarc.c | 300 + xorg-server-1.4/hw/xfree86/xf4bpp/mfbhrzvert.c | 135 + xorg-server-1.4/hw/xfree86/xf4bpp/mfbimggblt.c | 504 + xorg-server-1.4/hw/xfree86/xf4bpp/mfbline.c | 976 + xorg-server-1.4/hw/xfree86/xf4bpp/mfbseg.c | 2 + xorg-server-1.4/hw/xfree86/xf4bpp/mfbzerarc.c | 266 + xorg-server-1.4/hw/xfree86/xf4bpp/offscreen.c | 342 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcArea.c | 97 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcBStore.c | 155 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcCReduce.c | 237 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcClip.c | 157 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcCpArea.c | 470 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcDepth.c | 53 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcFillRct.c | 215 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcGC.c | 453 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcGCstr.h | 71 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcGetSp.c | 141 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcIO.c | 250 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcImg.c | 121 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcPixFS.c | 502 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcPixmap.c | 148 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcPntWin.c | 216 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcPolyPnt.c | 143 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcQuery.c | 46 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcRslvC.c | 177 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcSetSp.c | 319 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcSpMcro.h | 43 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcWinFS.c | 280 + xorg-server-1.4/hw/xfree86/xf4bpp/ppcWindow.c | 228 + xorg-server-1.4/hw/xfree86/xf4bpp/vgaBitBlt.c | 749 + xorg-server-1.4/hw/xfree86/xf4bpp/vgaGC.c | 213 + xorg-server-1.4/hw/xfree86/xf4bpp/vgaImages.c | 460 + xorg-server-1.4/hw/xfree86/xf4bpp/vgaReg.h | 137 + xorg-server-1.4/hw/xfree86/xf4bpp/vgaSolid.c | 574 + xorg-server-1.4/hw/xfree86/xf4bpp/vgaStipple.c | 720 + xorg-server-1.4/hw/xfree86/xf4bpp/vgaVideo.h | 93 + xorg-server-1.4/hw/xfree86/xf4bpp/vgamodule.c | 57 + xorg-server-1.4/hw/xfree86/xf4bpp/wm3.c | 203 + xorg-server-1.4/hw/xfree86/xf4bpp/wm3.h | 73 + xorg-server-1.4/hw/xfree86/xf4bpp/xf4bpp.h | 644 + xorg-server-1.4/hw/xfree86/xf8_16bpp/Makefile.am | 11 + xorg-server-1.4/hw/xfree86/xf8_16bpp/Makefile.in | 677 + xorg-server-1.4/hw/xfree86/xf8_16bpp/cfb8_16.h | 36 + .../hw/xfree86/xf8_16bpp/xf8_16module.c | 77 + xorg-server-1.4/hw/xfree86/xf8_32bpp/Makefile.am | 38 + xorg-server-1.4/hw/xfree86/xf8_32bpp/Makefile.in | 718 + xorg-server-1.4/hw/xfree86/xf8_32bpp/cfb8_32.h | 227 + .../hw/xfree86/xf8_32bpp/cfb8_32module.c | 39 + xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbbstore.c | 105 + xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbcpyarea.c | 549 + xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbcpyplane.c | 41 + xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbgc.c | 646 + xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbgc32.c | 2 + xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbgc8.c | 2 + xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbgcmisc.c | 150 + xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbgcunder.c | 620 + xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbimage.c | 174 + xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbpntwin.c | 180 + xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbscrinit.c | 328 + xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbwindow.c | 121 + xorg-server-1.4/hw/xfree86/xf8_32bpp/xf86overlay.c | 1254 + xorg-server-1.4/hw/xfree86/xorg.c | 0 xorg-server-1.4/hw/xfree86/xorgconf.cpp | 610 + xorg-server-1.4/hw/xgl/Makefile.am | 82 + xorg-server-1.4/hw/xgl/Makefile.in | 942 + xorg-server-1.4/hw/xgl/egl/Makefile.am | 45 + xorg-server-1.4/hw/xgl/egl/Makefile.in | 881 + xorg-server-1.4/hw/xgl/egl/evdev.c | 646 + xorg-server-1.4/hw/xgl/egl/kinput.c | 1672 + xorg-server-1.4/hw/xgl/egl/kkeymap.h | 55 + xorg-server-1.4/hw/xgl/egl/module/Makefile.am | 15 + xorg-server-1.4/hw/xgl/egl/module/Makefile.in | 664 + xorg-server-1.4/hw/xgl/egl/module/xeglmodule.c | 104 + xorg-server-1.4/hw/xgl/egl/xegl.c | 313 + xorg-server-1.4/hw/xgl/egl/xegl.h | 214 + xorg-server-1.4/hw/xgl/egl/xeglinit.c | 131 + xorg-server-1.4/hw/xgl/egl/xeglinput.c | 168 + xorg-server-1.4/hw/xgl/glx/Makefile.am | 48 + xorg-server-1.4/hw/xgl/glx/Makefile.in | 774 + xorg-server-1.4/hw/xgl/glx/module/Makefile.am | 21 + xorg-server-1.4/hw/xgl/glx/module/Makefile.in | 665 + xorg-server-1.4/hw/xgl/glx/module/xglxmodule.c | 104 + xorg-server-1.4/hw/xgl/glx/xglx.c | 1454 + xorg-server-1.4/hw/xgl/glx/xglx.h | 138 + xorg-server-1.4/hw/xgl/glx/xglxorg.c | 676 + xorg-server-1.4/hw/xgl/glxext/Makefile.am | 21 + xorg-server-1.4/hw/xgl/glxext/Makefile.in | 750 + xorg-server-1.4/hw/xgl/glxext/module/Makefile.am | 22 + xorg-server-1.4/hw/xgl/glxext/module/Makefile.in | 677 + .../hw/xgl/glxext/module/glcoremodule.c | 38 + xorg-server-1.4/hw/xgl/glxext/module/glxmodule.c | 38 + xorg-server-1.4/hw/xgl/glxext/xglglxext.c | 5772 + xorg-server-1.4/hw/xgl/glxext/xglglxext.h | 41 + xorg-server-1.4/hw/xgl/glxext/xglglxlog.c | 4519 + xorg-server-1.4/hw/xgl/xgl.h | 1503 + xorg-server-1.4/hw/xgl/xglarea.c | 323 + xorg-server-1.4/hw/xgl/xglbstore.c | 125 + xorg-server-1.4/hw/xgl/xglcmap.c | 466 + xorg-server-1.4/hw/xgl/xglcompose.c | 281 + xorg-server-1.4/hw/xgl/xglcopy.c | 130 + xorg-server-1.4/hw/xgl/xglfill.c | 742 + xorg-server-1.4/hw/xgl/xglgc.c | 645 + xorg-server-1.4/hw/xgl/xglgeometry.c | 724 + xorg-server-1.4/hw/xgl/xglget.c | 88 + xorg-server-1.4/hw/xgl/xglglx.c | 260 + xorg-server-1.4/hw/xgl/xglglx.h | 79 + xorg-server-1.4/hw/xgl/xglglyph.c | 1169 + xorg-server-1.4/hw/xgl/xglhash.c | 134 + xorg-server-1.4/hw/xgl/xglinit.c | 336 + xorg-server-1.4/hw/xgl/xglinput.c | 263 + xorg-server-1.4/hw/xgl/xglloader.c | 130 + xorg-server-1.4/hw/xgl/xglmodule.h | 45 + xorg-server-1.4/hw/xgl/xgloutput.c | 215 + xorg-server-1.4/hw/xgl/xglparse.c | 257 + xorg-server-1.4/hw/xgl/xglpict.c | 787 + xorg-server-1.4/hw/xgl/xglpixmap.c | 741 + xorg-server-1.4/hw/xgl/xglscreen.c | 477 + xorg-server-1.4/hw/xgl/xglshm.c | 122 + xorg-server-1.4/hw/xgl/xglsolid.c | 159 + xorg-server-1.4/hw/xgl/xglsync.c | 453 + xorg-server-1.4/hw/xgl/xgltile.c | 268 + xorg-server-1.4/hw/xgl/xgltrap.c | 480 + xorg-server-1.4/hw/xgl/xglwindow.c | 341 + xorg-server-1.4/hw/xgl/xglxv.c | 634 + xorg-server-1.4/hw/xnest/Args.c | 205 + xorg-server-1.4/hw/xnest/Args.h | 38 + xorg-server-1.4/hw/xnest/Color.c | 495 + xorg-server-1.4/hw/xnest/Color.h | 56 + xorg-server-1.4/hw/xnest/Cursor.c | 157 + xorg-server-1.4/hw/xnest/Display.c | 193 + xorg-server-1.4/hw/xnest/Display.h | 44 + xorg-server-1.4/hw/xnest/Drawable.h | 26 + xorg-server-1.4/hw/xnest/Events.c | 227 + xorg-server-1.4/hw/xnest/Events.h | 29 + xorg-server-1.4/hw/xnest/Font.c | 89 + xorg-server-1.4/hw/xnest/GC.c | 338 + xorg-server-1.4/hw/xnest/GCOps.c | 327 + xorg-server-1.4/hw/xnest/GCOps.h | 68 + xorg-server-1.4/hw/xnest/Handlers.c | 45 + xorg-server-1.4/hw/xnest/Handlers.h | 22 + xorg-server-1.4/hw/xnest/Init.c | 168 + xorg-server-1.4/hw/xnest/Init.h | 20 + xorg-server-1.4/hw/xnest/Keyboard.c | 313 + xorg-server-1.4/hw/xnest/Keyboard.h | 28 + xorg-server-1.4/hw/xnest/Makefile.am | 89 + xorg-server-1.4/hw/xnest/Makefile.in | 898 + xorg-server-1.4/hw/xnest/Pixmap.c | 136 + xorg-server-1.4/hw/xnest/Pointer.c | 77 + xorg-server-1.4/hw/xnest/Pointer.h | 29 + xorg-server-1.4/hw/xnest/Screen.c | 452 + xorg-server-1.4/hw/xnest/Screen.h | 25 + xorg-server-1.4/hw/xnest/Visual.c | 70 + xorg-server-1.4/hw/xnest/Visual.h | 25 + xorg-server-1.4/hw/xnest/Window.c | 556 + xorg-server-1.4/hw/xnest/XNCursor.h | 34 + xorg-server-1.4/hw/xnest/XNFont.h | 34 + xorg-server-1.4/hw/xnest/XNGC.h | 42 + xorg-server-1.4/hw/xnest/XNPixmap.h | 36 + xorg-server-1.4/hw/xnest/XNWindow.h | 78 + xorg-server-1.4/hw/xnest/Xnest.h | 94 + xorg-server-1.4/hw/xnest/Xnest.man.pre | 428 + xorg-server-1.4/hw/xnest/icon | 14 + xorg-server-1.4/hw/xnest/screensaver | 686 + xorg-server-1.4/hw/xnest/xnest-config.h | 36 + xorg-server-1.4/hw/xprint/AttrValid.c | 701 + xorg-server-1.4/hw/xprint/AttrValid.h | 219 + xorg-server-1.4/hw/xprint/DiPrint.h | 85 + xorg-server-1.4/hw/xprint/Init.c | 1920 + xorg-server-1.4/hw/xprint/Makefile.am | 43 + xorg-server-1.4/hw/xprint/Makefile.in | 971 + xorg-server-1.4/hw/xprint/Oid.c | 3181 + xorg-server-1.4/hw/xprint/Oid.h | 293 + xorg-server-1.4/hw/xprint/OidDefs.h | 170 + xorg-server-1.4/hw/xprint/OidStrs.h | 172 + xorg-server-1.4/hw/xprint/Util.c | 370 + xorg-server-1.4/hw/xprint/ValTree.c | 191 + xorg-server-1.4/hw/xprint/attributes.c | 1735 + xorg-server-1.4/hw/xprint/attributes.h | 130 + xorg-server-1.4/hw/xprint/config/C/Makefile.am | 1 + xorg-server-1.4/hw/xprint/config/C/Makefile.in | 667 + .../hw/xprint/config/C/print/Makefile.am | 14 + .../hw/xprint/config/C/print/Makefile.in | 726 + xorg-server-1.4/hw/xprint/config/C/print/Xprinters | 49 + .../xprint/config/C/print/attributes/Makefile.am | 3 + .../xprint/config/C/print/attributes/Makefile.in | 541 + .../hw/xprint/config/C/print/attributes/document | 49 + .../hw/xprint/config/C/print/attributes/job | 25 + .../hw/xprint/config/C/print/attributes/printer | 96 + .../xprint/config/C/print/ddx-config/Makefile.am | 1 + .../xprint/config/C/print/ddx-config/Makefile.in | 667 + .../config/C/print/ddx-config/raster/Makefile.am | 3 + .../config/C/print/ddx-config/raster/Makefile.in | 541 + .../hw/xprint/config/C/print/ddx-config/raster/pcl | 39 + .../config/C/print/ddx-config/raster/postscript | 0 .../C/print/models/CANONBJ10E-GS/Makefile.am | 3 + .../C/print/models/CANONBJ10E-GS/Makefile.in | 541 + .../C/print/models/CANONBJ10E-GS/model-config | 23 + .../C/print/models/CANONC3200-PS/Makefile.am | 5 + .../C/print/models/CANONC3200-PS/Makefile.in | 701 + .../C/print/models/CANONC3200-PS/fonts/Makefile.am | 54 + .../C/print/models/CANONC3200-PS/fonts/Makefile.in | 564 + .../C/print/models/CANONC3200-PS/model-config | 40 + .../config/C/print/models/GSdefault/Makefile.am | 3 + .../config/C/print/models/GSdefault/Makefile.in | 541 + .../config/C/print/models/GSdefault/model-config | 137 + .../config/C/print/models/HPDJ1600C/Makefile.am | 5 + .../config/C/print/models/HPDJ1600C/Makefile.in | 701 + .../C/print/models/HPDJ1600C/fonts/9nb00051.pmf | Bin 0 -> 5740 bytes .../C/print/models/HPDJ1600C/fonts/9nb00052.pmf | Bin 0 -> 5736 bytes .../C/print/models/HPDJ1600C/fonts/9nb00053.pmf | Bin 0 -> 5740 bytes .../C/print/models/HPDJ1600C/fonts/9nb00054.pmf | Bin 0 -> 5744 bytes .../C/print/models/HPDJ1600C/fonts/9nb00055.pmf | Bin 0 -> 5740 bytes .../C/print/models/HPDJ1600C/fonts/9nb00056.pmf | Bin 0 -> 5724 bytes .../C/print/models/HPDJ1600C/fonts/9nb00057.pmf | Bin 0 -> 5632 bytes .../C/print/models/HPDJ1600C/fonts/9nb00058.pmf | Bin 0 -> 5740 bytes .../C/print/models/HPDJ1600C/fonts/9nb00059.pmf | Bin 0 -> 5720 bytes .../C/print/models/HPDJ1600C/fonts/9nb00060.pmf | Bin 0 -> 5740 bytes .../C/print/models/HPDJ1600C/fonts/9nb00061.pmf | Bin 0 -> 5720 bytes .../C/print/models/HPDJ1600C/fonts/9nb00062.pmf | Bin 0 -> 5728 bytes .../C/print/models/HPDJ1600C/fonts/9nb00063.pmf | Bin 0 -> 5728 bytes .../C/print/models/HPDJ1600C/fonts/9nb00064.pmf | Bin 0 -> 5720 bytes .../C/print/models/HPDJ1600C/fonts/9nb00065.pmf | Bin 0 -> 5728 bytes .../C/print/models/HPDJ1600C/fonts/9nb00066.pmf | Bin 0 -> 5732 bytes .../C/print/models/HPDJ1600C/fonts/9nb00067.pmf | Bin 0 -> 5736 bytes .../C/print/models/HPDJ1600C/fonts/9nb00068.pmf | Bin 0 -> 5732 bytes .../C/print/models/HPDJ1600C/fonts/9nb00069.pmf | Bin 0 -> 5740 bytes .../C/print/models/HPDJ1600C/fonts/9nb00070.pmf | Bin 0 -> 5744 bytes .../C/print/models/HPDJ1600C/fonts/9nb00071.pmf | Bin 0 -> 5740 bytes .../C/print/models/HPDJ1600C/fonts/9nb00072.pmf | Bin 0 -> 5724 bytes .../C/print/models/HPDJ1600C/fonts/9nb00073.pmf | Bin 0 -> 5720 bytes .../C/print/models/HPDJ1600C/fonts/9nb00074.pmf | Bin 0 -> 5724 bytes .../C/print/models/HPDJ1600C/fonts/9nb00075.pmf | Bin 0 -> 5724 bytes .../C/print/models/HPDJ1600C/fonts/9nb00076.pmf | Bin 0 -> 5716 bytes .../C/print/models/HPDJ1600C/fonts/9nb00077.pmf | Bin 0 -> 5720 bytes .../C/print/models/HPDJ1600C/fonts/9nb00079.pmf | Bin 0 -> 5656 bytes .../C/print/models/HPDJ1600C/fonts/9nb00080.pmf | Bin 0 -> 5664 bytes .../C/print/models/HPDJ1600C/fonts/9nb00081.pmf | Bin 0 -> 5672 bytes .../C/print/models/HPDJ1600C/fonts/9nb00082.pmf | Bin 0 -> 5660 bytes .../C/print/models/HPDJ1600C/fonts/9nb00083.pmf | Bin 0 -> 5720 bytes .../C/print/models/HPDJ1600C/fonts/9nb00084.pmf | Bin 0 -> 5724 bytes .../C/print/models/HPDJ1600C/fonts/9nb00085.pmf | Bin 0 -> 5724 bytes .../C/print/models/HPDJ1600C/fonts/9nb00086.pmf | Bin 0 -> 5716 bytes .../C/print/models/HPDJ1600C/fonts/9nb00087.pmf | Bin 0 -> 5752 bytes .../C/print/models/HPDJ1600C/fonts/9nb00088.pmf | Bin 0 -> 5720 bytes .../C/print/models/HPDJ1600C/fonts/9nb00089.pmf | Bin 0 -> 5744 bytes .../C/print/models/HPDJ1600C/fonts/9nb00090.pmf | Bin 0 -> 5736 bytes .../C/print/models/HPDJ1600C/fonts/9nb00091.pmf | Bin 0 -> 5744 bytes .../C/print/models/HPDJ1600C/fonts/9nb00092.pmf | Bin 0 -> 5736 bytes .../C/print/models/HPDJ1600C/fonts/9nb00093.pmf | Bin 0 -> 5728 bytes .../C/print/models/HPDJ1600C/fonts/9nb00094.pmf | Bin 0 -> 5728 bytes .../C/print/models/HPDJ1600C/fonts/Makefile.am | 50 + .../C/print/models/HPDJ1600C/fonts/Makefile.in | 589 + .../config/C/print/models/HPDJ1600C/fonts/README | 197 + .../C/print/models/HPDJ1600C/fonts/fonts.alias | 0 .../C/print/models/HPDJ1600C/fonts/fonts.dir | 45 + .../C/print/models/HPDJ1600C/fonts/lpr0ye1a.pmf | Bin 0 -> 4296 bytes .../config/C/print/models/HPDJ1600C/model-config | 40 + .../config/C/print/models/HPLJ4050-PS/Makefile.am | 5 + .../config/C/print/models/HPLJ4050-PS/Makefile.in | 701 + .../C/print/models/HPLJ4050-PS/fonts/Makefile.am | 54 + .../C/print/models/HPLJ4050-PS/fonts/Makefile.in | 564 + .../config/C/print/models/HPLJ4050-PS/model-config | 36 + .../config/C/print/models/HPLJ4family/Makefile.am | 5 + .../config/C/print/models/HPLJ4family/Makefile.in | 701 + .../C/print/models/HPLJ4family/fonts/9nb00051.pmf | Bin 0 -> 5740 bytes .../C/print/models/HPLJ4family/fonts/9nb00052.pmf | Bin 0 -> 5736 bytes .../C/print/models/HPLJ4family/fonts/9nb00053.pmf | Bin 0 -> 5740 bytes .../C/print/models/HPLJ4family/fonts/9nb00054.pmf | Bin 0 -> 5744 bytes .../C/print/models/HPLJ4family/fonts/9nb00055.pmf | Bin 0 -> 5740 bytes .../C/print/models/HPLJ4family/fonts/9nb00056.pmf | Bin 0 -> 5724 bytes .../C/print/models/HPLJ4family/fonts/9nb00057.pmf | Bin 0 -> 5632 bytes .../C/print/models/HPLJ4family/fonts/9nb00058.pmf | Bin 0 -> 5740 bytes .../C/print/models/HPLJ4family/fonts/9nb00059.pmf | Bin 0 -> 5720 bytes .../C/print/models/HPLJ4family/fonts/9nb00060.pmf | Bin 0 -> 5740 bytes .../C/print/models/HPLJ4family/fonts/9nb00061.pmf | Bin 0 -> 5720 bytes .../C/print/models/HPLJ4family/fonts/9nb00062.pmf | Bin 0 -> 5728 bytes .../C/print/models/HPLJ4family/fonts/9nb00063.pmf | Bin 0 -> 5728 bytes .../C/print/models/HPLJ4family/fonts/9nb00064.pmf | Bin 0 -> 5720 bytes .../C/print/models/HPLJ4family/fonts/9nb00065.pmf | Bin 0 -> 5728 bytes .../C/print/models/HPLJ4family/fonts/9nb00066.pmf | Bin 0 -> 5732 bytes .../C/print/models/HPLJ4family/fonts/9nb00067.pmf | Bin 0 -> 5736 bytes .../C/print/models/HPLJ4family/fonts/9nb00068.pmf | Bin 0 -> 5732 bytes .../C/print/models/HPLJ4family/fonts/9nb00069.pmf | Bin 0 -> 5740 bytes .../C/print/models/HPLJ4family/fonts/9nb00070.pmf | Bin 0 -> 5744 bytes .../C/print/models/HPLJ4family/fonts/9nb00071.pmf | Bin 0 -> 5740 bytes .../C/print/models/HPLJ4family/fonts/9nb00072.pmf | Bin 0 -> 5724 bytes .../C/print/models/HPLJ4family/fonts/9nb00073.pmf | Bin 0 -> 5720 bytes .../C/print/models/HPLJ4family/fonts/9nb00074.pmf | Bin 0 -> 5724 bytes .../C/print/models/HPLJ4family/fonts/9nb00075.pmf | Bin 0 -> 5724 bytes .../C/print/models/HPLJ4family/fonts/9nb00076.pmf | Bin 0 -> 5716 bytes .../C/print/models/HPLJ4family/fonts/9nb00077.pmf | Bin 0 -> 5720 bytes .../C/print/models/HPLJ4family/fonts/9nb00079.pmf | Bin 0 -> 5656 bytes .../C/print/models/HPLJ4family/fonts/9nb00080.pmf | Bin 0 -> 5664 bytes .../C/print/models/HPLJ4family/fonts/9nb00081.pmf | Bin 0 -> 5672 bytes .../C/print/models/HPLJ4family/fonts/9nb00082.pmf | Bin 0 -> 5660 bytes .../C/print/models/HPLJ4family/fonts/9nb00083.pmf | Bin 0 -> 5720 bytes .../C/print/models/HPLJ4family/fonts/9nb00084.pmf | Bin 0 -> 5724 bytes .../C/print/models/HPLJ4family/fonts/9nb00085.pmf | Bin 0 -> 5724 bytes .../C/print/models/HPLJ4family/fonts/9nb00086.pmf | Bin 0 -> 5716 bytes .../C/print/models/HPLJ4family/fonts/9nb00087.pmf | Bin 0 -> 5752 bytes .../C/print/models/HPLJ4family/fonts/9nb00088.pmf | Bin 0 -> 5720 bytes .../C/print/models/HPLJ4family/fonts/9nb00089.pmf | Bin 0 -> 5744 bytes .../C/print/models/HPLJ4family/fonts/9nb00090.pmf | Bin 0 -> 5736 bytes .../C/print/models/HPLJ4family/fonts/9nb00091.pmf | Bin 0 -> 5744 bytes .../C/print/models/HPLJ4family/fonts/9nb00092.pmf | Bin 0 -> 5736 bytes .../C/print/models/HPLJ4family/fonts/9nb00093.pmf | Bin 0 -> 5728 bytes .../C/print/models/HPLJ4family/fonts/9nb00094.pmf | Bin 0 -> 5728 bytes .../C/print/models/HPLJ4family/fonts/Makefile.am | 50 + .../C/print/models/HPLJ4family/fonts/Makefile.in | 589 + .../config/C/print/models/HPLJ4family/fonts/README | 203 + .../C/print/models/HPLJ4family/fonts/fonts.alias | 0 .../C/print/models/HPLJ4family/fonts/fonts.dir | 45 + .../C/print/models/HPLJ4family/fonts/lpr0ye1a.pmf | Bin 0 -> 4296 bytes .../config/C/print/models/HPLJ4family/model-config | 39 + .../hw/xprint/config/C/print/models/Makefile.am | 11 + .../hw/xprint/config/C/print/models/Makefile.in | 678 + .../C/print/models/PS2PDFspooldir-GS/Makefile.am | 4 + .../C/print/models/PS2PDFspooldir-GS/Makefile.in | 565 + .../C/print/models/PS2PDFspooldir-GS/model-config | 72 + .../models/PS2PDFspooldir-GS/ps2pdf_spooltodir.sh | 130 + .../config/C/print/models/PSdefault/Makefile.am | 5 + .../config/C/print/models/PSdefault/Makefile.in | 701 + .../models/PSdefault/fonts/AvantGarde-Book.pmf | Bin 0 -> 6716 bytes .../PSdefault/fonts/AvantGarde-BookOblique.pmf | Bin 0 -> 6728 bytes .../models/PSdefault/fonts/AvantGarde-Demi.pmf | Bin 0 -> 6712 bytes .../PSdefault/fonts/AvantGarde-DemiOblique.pmf | Bin 0 -> 6724 bytes .../print/models/PSdefault/fonts/Courier-Bold.pmf | Bin 0 -> 6612 bytes .../models/PSdefault/fonts/Courier-BoldOblique.pmf | Bin 0 -> 6636 bytes .../models/PSdefault/fonts/Courier-Oblique.pmf | Bin 0 -> 6608 bytes .../C/print/models/PSdefault/fonts/Courier.pmf | Bin 0 -> 6592 bytes .../models/PSdefault/fonts/Helvetica-Bold.pmf | Bin 0 -> 6680 bytes .../PSdefault/fonts/Helvetica-BoldOblique.pmf | Bin 0 -> 6692 bytes .../models/PSdefault/fonts/Helvetica-Oblique.pmf | Bin 0 -> 6688 bytes .../C/print/models/PSdefault/fonts/Helvetica.pmf | Bin 0 -> 6672 bytes .../models/PSdefault/fonts/LubalinGraph-Book.pmf | Bin 0 -> 6628 bytes .../PSdefault/fonts/LubalinGraph-BookOblique.pmf | Bin 0 -> 6640 bytes .../models/PSdefault/fonts/LubalinGraph-Demi.pmf | Bin 0 -> 6624 bytes .../PSdefault/fonts/LubalinGraph-DemiOblique.pmf | Bin 0 -> 6636 bytes .../C/print/models/PSdefault/fonts/Makefile.am | 44 + .../C/print/models/PSdefault/fonts/Makefile.in | 586 + .../models/PSdefault/fonts/NewCentSchlbk-Bold.pmf | Bin 0 -> 6644 bytes .../PSdefault/fonts/NewCentSchlbk-BoldItal.pmf | Bin 0 -> 6656 bytes .../models/PSdefault/fonts/NewCentSchlbk-Ital.pmf | Bin 0 -> 6652 bytes .../models/PSdefault/fonts/NewCentSchlbk-Roman.pmf | Bin 0 -> 6648 bytes .../print/models/PSdefault/fonts/Souvenir-Demi.pmf | Bin 0 -> 6680 bytes .../models/PSdefault/fonts/Souvenir-DemiItalic.pmf | Bin 0 -> 6692 bytes .../models/PSdefault/fonts/Souvenir-Light.pmf | Bin 0 -> 6684 bytes .../PSdefault/fonts/Souvenir-LightItalic.pmf | Bin 0 -> 6696 bytes .../C/print/models/PSdefault/fonts/Symbol.pmf | Bin 0 -> 6556 bytes .../C/print/models/PSdefault/fonts/Times-Bold.pmf | Bin 0 -> 6660 bytes .../models/PSdefault/fonts/Times-BoldItalic.pmf | Bin 0 -> 6672 bytes .../print/models/PSdefault/fonts/Times-Italic.pmf | Bin 0 -> 6668 bytes .../C/print/models/PSdefault/fonts/Times-Roman.pmf | Bin 0 -> 6664 bytes .../print/models/PSdefault/fonts/ZapfDingbats.pmf | Bin 0 -> 6676 bytes .../config/C/print/models/PSdefault/model-config | 136 + .../config/C/print/models/PSspooldir/Makefile.am | 4 + .../config/C/print/models/PSspooldir/Makefile.in | 565 + .../config/C/print/models/PSspooldir/model-config | 71 + .../config/C/print/models/PSspooldir/spooltodir.sh | 127 + .../config/C/print/models/SPSPARC2/Makefile.am | 5 + .../config/C/print/models/SPSPARC2/Makefile.in | 701 + .../C/print/models/SPSPARC2/fonts/Makefile.am | 37 + .../C/print/models/SPSPARC2/fonts/Makefile.in | 547 + .../config/C/print/models/SPSPARC2/model-config | 18 + xorg-server-1.4/hw/xprint/config/Makefile.am | 712 + xorg-server-1.4/hw/xprint/config/Makefile.in | 1404 + xorg-server-1.4/hw/xprint/config/README | 318 + xorg-server-1.4/hw/xprint/config/en_US/Makefile.am | 1 + xorg-server-1.4/hw/xprint/config/en_US/Makefile.in | 667 + .../hw/xprint/config/en_US/print/Makefile.am | 1 + .../hw/xprint/config/en_US/print/Makefile.in | 667 + .../config/en_US/print/attributes/Makefile.am | 3 + .../config/en_US/print/attributes/Makefile.in | 541 + .../xprint/config/en_US/print/attributes/document | 13 + xorg-server-1.4/hw/xprint/ddxInit.c | 373 + xorg-server-1.4/hw/xprint/doc/Makefile.am | 19 + xorg-server-1.4/hw/xprint/doc/Makefile.in | 601 + xorg-server-1.4/hw/xprint/doc/Xprt.html | 115 + xorg-server-1.4/hw/xprint/doc/Xprt.man.pre | 196 + xorg-server-1.4/hw/xprint/doc/Xprt.sgml | 371 + xorg-server-1.4/hw/xprint/dpmsstubs-wrapper.c | 1 + xorg-server-1.4/hw/xprint/etc/Makefile.am | 1 + xorg-server-1.4/hw/xprint/etc/Makefile.in | 667 + .../hw/xprint/etc/Xsession.d/92xprint-xpserverlist | 30 + .../hw/xprint/etc/Xsession.d/Makefile.am | 2 + .../hw/xprint/etc/Xsession.d/Makefile.in | 541 + xorg-server-1.4/hw/xprint/etc/init.d/Makefile.am | 12 + xorg-server-1.4/hw/xprint/etc/init.d/Makefile.in | 567 + xorg-server-1.4/hw/xprint/etc/init.d/xprint.cpp | 1277 + .../hw/xprint/etc/profile.d/Makefile.am | 1 + .../hw/xprint/etc/profile.d/Makefile.in | 508 + xorg-server-1.4/hw/xprint/etc/profile.d/xprint.csh | 16 + xorg-server-1.4/hw/xprint/etc/profile.d/xprint.sh | 16 + xorg-server-1.4/hw/xprint/mediaSizes.c | 782 + xorg-server-1.4/hw/xprint/miinitext-wrapper.c | 1 + xorg-server-1.4/hw/xprint/pcl-mono/Makefile.am | 5 + xorg-server-1.4/hw/xprint/pcl-mono/Makefile.in | 791 + xorg-server-1.4/hw/xprint/pcl/Makefile.am | 6 + xorg-server-1.4/hw/xprint/pcl/Makefile.am.inc | 27 + xorg-server-1.4/hw/xprint/pcl/Makefile.in | 791 + xorg-server-1.4/hw/xprint/pcl/Pcl.h | 623 + xorg-server-1.4/hw/xprint/pcl/PclArc.c | 268 + xorg-server-1.4/hw/xprint/pcl/PclArea.c | 435 + xorg-server-1.4/hw/xprint/pcl/PclAttVal.c | 206 + xorg-server-1.4/hw/xprint/pcl/PclAttr.c | 86 + xorg-server-1.4/hw/xprint/pcl/PclColor.c | 849 + xorg-server-1.4/hw/xprint/pcl/PclCursor.c | 113 + xorg-server-1.4/hw/xprint/pcl/PclDef.h | 67 + xorg-server-1.4/hw/xprint/pcl/PclFonts.c | 72 + xorg-server-1.4/hw/xprint/pcl/PclGC.c | 967 + xorg-server-1.4/hw/xprint/pcl/PclInit.c | 595 + xorg-server-1.4/hw/xprint/pcl/PclLine.c | 314 + xorg-server-1.4/hw/xprint/pcl/PclMisc.c | 304 + xorg-server-1.4/hw/xprint/pcl/PclPixel.c | 157 + xorg-server-1.4/hw/xprint/pcl/PclPolygon.c | 351 + xorg-server-1.4/hw/xprint/pcl/PclPrint.c | 709 + xorg-server-1.4/hw/xprint/pcl/PclSFonts.c | 427 + xorg-server-1.4/hw/xprint/pcl/PclSFonts.h | 115 + xorg-server-1.4/hw/xprint/pcl/PclSpans.c | 137 + xorg-server-1.4/hw/xprint/pcl/PclText.c | 934 + xorg-server-1.4/hw/xprint/pcl/PclWindow.c | 450 + xorg-server-1.4/hw/xprint/pcl/Pclmap.h | 211 + xorg-server-1.4/hw/xprint/ps/Makefile.am | 42 + xorg-server-1.4/hw/xprint/ps/Makefile.in | 670 + xorg-server-1.4/hw/xprint/ps/Ps.h | 601 + xorg-server-1.4/hw/xprint/ps/PsArc.c | 181 + xorg-server-1.4/hw/xprint/ps/PsArea.c | 390 + xorg-server-1.4/hw/xprint/ps/PsAttVal.c | 289 + xorg-server-1.4/hw/xprint/ps/PsAttr.c | 116 + xorg-server-1.4/hw/xprint/ps/PsCache.c | 328 + xorg-server-1.4/hw/xprint/ps/PsColor.c | 257 + xorg-server-1.4/hw/xprint/ps/PsDef.h | 96 + xorg-server-1.4/hw/xprint/ps/PsFTFonts.c | 85 + xorg-server-1.4/hw/xprint/ps/PsFonts.c | 873 + xorg-server-1.4/hw/xprint/ps/PsGC.c | 414 + xorg-server-1.4/hw/xprint/ps/PsImageUtil.c | 329 + xorg-server-1.4/hw/xprint/ps/PsInit.c | 664 + xorg-server-1.4/hw/xprint/ps/PsLine.c | 191 + xorg-server-1.4/hw/xprint/ps/PsMisc.c | 323 + xorg-server-1.4/hw/xprint/ps/PsPixel.c | 156 + xorg-server-1.4/hw/xprint/ps/PsPixmap.c | 619 + xorg-server-1.4/hw/xprint/ps/PsPolygon.c | 259 + xorg-server-1.4/hw/xprint/ps/PsPrint.c | 458 + xorg-server-1.4/hw/xprint/ps/PsSpans.c | 164 + xorg-server-1.4/hw/xprint/ps/PsText.c | 581 + xorg-server-1.4/hw/xprint/ps/PsWindow.c | 459 + xorg-server-1.4/hw/xprint/ps/psout.c | 1789 + xorg-server-1.4/hw/xprint/ps/psout.h | 335 + xorg-server-1.4/hw/xprint/ps/psout_ft.c | 335 + xorg-server-1.4/hw/xprint/ps/psout_ftpstype1.c | 185 + xorg-server-1.4/hw/xprint/ps/psout_ftpstype3.c | 439 + xorg-server-1.4/hw/xprint/ps/ttf2pt1wrap.c | 14 + xorg-server-1.4/hw/xprint/raster/Makefile.am | 10 + xorg-server-1.4/hw/xprint/raster/Makefile.in | 625 + xorg-server-1.4/hw/xprint/raster/Raster.c | 1571 + xorg-server-1.4/hw/xprint/raster/Raster.h | 117 + xorg-server-1.4/hw/xprint/raster/RasterAttVal.c | 267 + xorg-server-1.4/hw/xprint/spooler.c | 202 + xorg-server-1.4/hw/xprint/spooler.h | 75 + xorg-server-1.4/hw/xwin/ChangeLog | 683 + xorg-server-1.4/hw/xwin/InitInput.c | 177 + xorg-server-1.4/hw/xwin/InitOutput.c | 1162 + xorg-server-1.4/hw/xwin/Makefile.am | 196 + xorg-server-1.4/hw/xwin/Makefile.in | 1059 + xorg-server-1.4/hw/xwin/README | 141 + xorg-server-1.4/hw/xwin/X-boxed.ico | Bin 0 -> 12902 bytes xorg-server-1.4/hw/xwin/X.ico | Bin 0 -> 20870 bytes xorg-server-1.4/hw/xwin/XWin.man | 287 + xorg-server-1.4/hw/xwin/XWin.rc | 109 + xorg-server-1.4/hw/xwin/XWinrc.man | 180 + .../hw/xwin/_usr_X11R6_lib_X11_system.XWinrc | 125 + xorg-server-1.4/hw/xwin/ddraw.h | 2106 + xorg-server-1.4/hw/xwin/win.h | 1465 + xorg-server-1.4/hw/xwin/winallpriv.c | 184 + xorg-server-1.4/hw/xwin/winauth.c | 131 + xorg-server-1.4/hw/xwin/winblock.c | 106 + xorg-server-1.4/hw/xwin/winclip.c | 42 + xorg-server-1.4/hw/xwin/winclipboard.h | 164 + xorg-server-1.4/hw/xwin/winclipboardinit.c | 143 + xorg-server-1.4/hw/xwin/winclipboardtextconv.c | 159 + xorg-server-1.4/hw/xwin/winclipboardthread.c | 477 + xorg-server-1.4/hw/xwin/winclipboardunicode.c | 69 + xorg-server-1.4/hw/xwin/winclipboardwndproc.c | 622 + xorg-server-1.4/hw/xwin/winclipboardwrappers.c | 542 + xorg-server-1.4/hw/xwin/winclipboardxevents.c | 796 + xorg-server-1.4/hw/xwin/wincmap.c | 674 + xorg-server-1.4/hw/xwin/winconfig.c | 1174 + xorg-server-1.4/hw/xwin/winconfig.h | 344 + xorg-server-1.4/hw/xwin/wincreatewnd.c | 644 + xorg-server-1.4/hw/xwin/wincursor.c | 613 + xorg-server-1.4/hw/xwin/windialogs.c | 788 + xorg-server-1.4/hw/xwin/winengine.c | 336 + xorg-server-1.4/hw/xwin/winerror.c | 143 + xorg-server-1.4/hw/xwin/winfillsp.c | 875 + xorg-server-1.4/hw/xwin/winfont.c | 80 + xorg-server-1.4/hw/xwin/wingc.c | 256 + xorg-server-1.4/hw/xwin/wingetsp.c | 192 + xorg-server-1.4/hw/xwin/winglobals.c | 138 + xorg-server-1.4/hw/xwin/winkeybd.c | 637 + xorg-server-1.4/hw/xwin/winkeybd.h | 309 + xorg-server-1.4/hw/xwin/winkeyhook.c | 194 + xorg-server-1.4/hw/xwin/winkeymap.h | 136 + xorg-server-1.4/hw/xwin/winkeynames.h | 202 + xorg-server-1.4/hw/xwin/winlayouts.h | 257 + xorg-server-1.4/hw/xwin/winmessages.h | 1030 + xorg-server-1.4/hw/xwin/winmisc.c | 152 + xorg-server-1.4/hw/xwin/winmouse.c | 341 + xorg-server-1.4/hw/xwin/winms.h | 46 + xorg-server-1.4/hw/xwin/winmsg.c | 179 + xorg-server-1.4/hw/xwin/winmsg.h | 50 + xorg-server-1.4/hw/xwin/winmultiwindowclass.c | 325 + xorg-server-1.4/hw/xwin/winmultiwindowclass.h | 114 + xorg-server-1.4/hw/xwin/winmultiwindowicons.c | 478 + xorg-server-1.4/hw/xwin/winmultiwindowshape.c | 211 + xorg-server-1.4/hw/xwin/winmultiwindowwindow.c | 1054 + xorg-server-1.4/hw/xwin/winmultiwindowwm.c | 1440 + xorg-server-1.4/hw/xwin/winmultiwindowwndproc.c | 1049 + xorg-server-1.4/hw/xwin/winnativegdi.c | 546 + xorg-server-1.4/hw/xwin/winpfbdd.c | 684 + xorg-server-1.4/hw/xwin/winpixmap.c | 241 + xorg-server-1.4/hw/xwin/winpntwin.c | 47 + xorg-server-1.4/hw/xwin/winpolyline.c | 57 + xorg-server-1.4/hw/xwin/winprefs.c | 822 + xorg-server-1.4/hw/xwin/winprefs.h | 162 + xorg-server-1.4/hw/xwin/winprefslex.c | 1829 + xorg-server-1.4/hw/xwin/winprefslex.l | 116 + xorg-server-1.4/hw/xwin/winprefsyacc.c | 1614 + xorg-server-1.4/hw/xwin/winprefsyacc.h | 96 + xorg-server-1.4/hw/xwin/winprefsyacc.y | 353 + xorg-server-1.4/hw/xwin/winpriv.c | 134 + xorg-server-1.4/hw/xwin/winpriv.h | 15 + xorg-server-1.4/hw/xwin/winprocarg.c | 1561 + xorg-server-1.4/hw/xwin/winpushpxl.c | 225 + xorg-server-1.4/hw/xwin/winrandr.c | 141 + xorg-server-1.4/hw/xwin/winregistry.c | 71 + xorg-server-1.4/hw/xwin/winresource.h | 55 + xorg-server-1.4/hw/xwin/winrop.c | 144 + xorg-server-1.4/hw/xwin/winscrinit.c | 793 + xorg-server-1.4/hw/xwin/winsetsp.c | 195 + xorg-server-1.4/hw/xwin/winshaddd.c | 1442 + xorg-server-1.4/hw/xwin/winshadddnl.c | 1454 + xorg-server-1.4/hw/xwin/winshadgdi.c | 1324 + xorg-server-1.4/hw/xwin/wintrayicon.c | 210 + xorg-server-1.4/hw/xwin/winvalargs.c | 188 + xorg-server-1.4/hw/xwin/winvideo.c | 210 + xorg-server-1.4/hw/xwin/winwakeup.c | 71 + xorg-server-1.4/hw/xwin/winwin32rootless.c | 1092 + xorg-server-1.4/hw/xwin/winwin32rootlesswindow.c | 476 + xorg-server-1.4/hw/xwin/winwin32rootlesswndproc.c | 1325 + xorg-server-1.4/hw/xwin/winwindow.c | 649 + xorg-server-1.4/hw/xwin/winwindow.h | 150 + xorg-server-1.4/hw/xwin/winwindowswm.c | 663 + xorg-server-1.4/hw/xwin/winwndproc.c | 1288 + xorg-server-1.4/hw/xwin/xlaunch/COPYING | 25 + xorg-server-1.4/hw/xwin/xlaunch/config.cc | 282 + xorg-server-1.4/hw/xwin/xlaunch/main.cc | 700 + .../hw/xwin/xlaunch/resources/dialog.rc | 118 + .../hw/xwin/xlaunch/resources/fullscreen.bmp | Bin 0 -> 22554 bytes .../hw/xwin/xlaunch/resources/images.rc | 29 + .../hw/xwin/xlaunch/resources/multiwindow.bmp | Bin 0 -> 22554 bytes .../hw/xwin/xlaunch/resources/nodecoration.bmp | Bin 0 -> 22554 bytes .../hw/xwin/xlaunch/resources/resources.h | 99 + .../hw/xwin/xlaunch/resources/resources.rc | 30 + .../hw/xwin/xlaunch/resources/strings.rc | 108 + .../hw/xwin/xlaunch/resources/windowed.bmp | Bin 0 -> 22554 bytes xorg-server-1.4/hw/xwin/xlaunch/window/dialog.cc | 86 + xorg-server-1.4/hw/xwin/xlaunch/window/dialog.h | 54 + xorg-server-1.4/hw/xwin/xlaunch/window/util.cc | 1112 + xorg-server-1.4/hw/xwin/xlaunch/window/util.h | 53 + xorg-server-1.4/hw/xwin/xlaunch/window/window.cc | 284 + xorg-server-1.4/hw/xwin/xlaunch/window/window.h | 114 + xorg-server-1.4/hw/xwin/xlaunch/window/wizard.cc | 244 + xorg-server-1.4/hw/xwin/xlaunch/window/wizard.h | 59 + xorg-server-1.4/include/Makefile.am | 56 + xorg-server-1.4/include/Makefile.in | 736 + xorg-server-1.4/include/XIstubs.h | 63 + xorg-server-1.4/include/bstore.h | 22 + xorg-server-1.4/include/bstorestr.h | 57 + xorg-server-1.4/include/closestr.h | 157 + xorg-server-1.4/include/closure.h | 57 + xorg-server-1.4/include/colormap.h | 182 + xorg-server-1.4/include/colormapst.h | 133 + xorg-server-1.4/include/cursor.h | 146 + xorg-server-1.4/include/cursorstr.h | 96 + xorg-server-1.4/include/dix-config.h | 505 + xorg-server-1.4/include/dix-config.h.in | 504 + xorg-server-1.4/include/dix.h | 643 + xorg-server-1.4/include/dixevents.h | 109 + xorg-server-1.4/include/dixfont.h | 153 + xorg-server-1.4/include/dixfontstr.h | 94 + xorg-server-1.4/include/dixgrabs.h | 58 + xorg-server-1.4/include/dixstruct.h | 214 + xorg-server-1.4/include/do-not-use-config.h | 729 + xorg-server-1.4/include/do-not-use-config.h.in | 728 + xorg-server-1.4/include/exevents.h | 179 + xorg-server-1.4/include/extension.h | 77 + xorg-server-1.4/include/extinit.h | 52 + xorg-server-1.4/include/extnsionst.h | 115 + xorg-server-1.4/include/gc.h | 171 + xorg-server-1.4/include/gcstruct.h | 322 + xorg-server-1.4/include/globals.h | 183 + xorg-server-1.4/include/hotplug.h | 32 + xorg-server-1.4/include/input.h | 458 + xorg-server-1.4/include/inputstr.h | 357 + xorg-server-1.4/include/kdrive-config.h.in | 34 + xorg-server-1.4/include/misc.h | 257 + xorg-server-1.4/include/miscstruct.h | 77 + xorg-server-1.4/include/opaque.h | 81 + xorg-server-1.4/include/os.h | 510 + xorg-server-1.4/include/pixmap.h | 118 + xorg-server-1.4/include/pixmapstr.h | 95 + xorg-server-1.4/include/property.h | 72 + xorg-server-1.4/include/propertyst.h | 66 + xorg-server-1.4/include/region.h | 53 + xorg-server-1.4/include/regionstr.h | 320 + xorg-server-1.4/include/resource.h | 262 + xorg-server-1.4/include/rgb.h | 53 + xorg-server-1.4/include/screenint.h | 107 + xorg-server-1.4/include/scrnintstr.h | 605 + xorg-server-1.4/include/selection.h | 68 + xorg-server-1.4/include/servermd.h | 586 + xorg-server-1.4/include/site.h | 137 + xorg-server-1.4/include/swaprep.h | 292 + xorg-server-1.4/include/swapreq.h | 119 + xorg-server-1.4/include/validate.h | 40 + xorg-server-1.4/include/window.h | 257 + xorg-server-1.4/include/windowstr.h | 253 + xorg-server-1.4/include/xgl-config.h.in | 14 + xorg-server-1.4/include/xkb-config.h.in | 23 + xorg-server-1.4/include/xkbsrv.h | 1022 + xorg-server-1.4/include/xorg-config.h | 119 + xorg-server-1.4/include/xorg-config.h.in | 118 + xorg-server-1.4/include/xorg-server.h | 255 + xorg-server-1.4/include/xorg-server.h.in | 254 + xorg-server-1.4/include/xwin-config.h.in | 24 + xorg-server-1.4/install-sh | 507 + xorg-server-1.4/ltmain.sh | 6919 + xorg-server-1.4/mfb/Makefile.am | 133 + xorg-server-1.4/mfb/Makefile.in | 835 + xorg-server-1.4/mfb/fastblt.h | 96 + xorg-server-1.4/mfb/maskbits.c | 1059 + xorg-server-1.4/mfb/maskbits.h | 689 + xorg-server-1.4/mfb/mergerop.h | 398 + xorg-server-1.4/mfb/mfb.h | 1149 + xorg-server-1.4/mfb/mfbbitblt.c | 510 + xorg-server-1.4/mfb/mfbblt.c | 589 + xorg-server-1.4/mfb/mfbbltC.c | 2 + xorg-server-1.4/mfb/mfbbltCI.c | 2 + xorg-server-1.4/mfb/mfbbltG.c | 2 + xorg-server-1.4/mfb/mfbbltO.c | 2 + xorg-server-1.4/mfb/mfbbltX.c | 2 + xorg-server-1.4/mfb/mfbbres.c | 368 + xorg-server-1.4/mfb/mfbbresd.c | 207 + xorg-server-1.4/mfb/mfbbstore.c | 154 + xorg-server-1.4/mfb/mfbclip.c | 280 + xorg-server-1.4/mfb/mfbcmap.c | 162 + xorg-server-1.4/mfb/mfbfillarc.c | 333 + xorg-server-1.4/mfb/mfbfillrct.c | 226 + xorg-server-1.4/mfb/mfbfillsp.c | 1026 + xorg-server-1.4/mfb/mfbfont.c | 87 + xorg-server-1.4/mfb/mfbgc.c | 1118 + xorg-server-1.4/mfb/mfbgetsp.c | 157 + xorg-server-1.4/mfb/mfbhrzvert.c | 177 + xorg-server-1.4/mfb/mfbigbblak.c | 3 + xorg-server-1.4/mfb/mfbigbwht.c | 3 + xorg-server-1.4/mfb/mfbimage.c | 177 + xorg-server-1.4/mfb/mfbimggblt.c | 443 + xorg-server-1.4/mfb/mfbline.c | 757 + xorg-server-1.4/mfb/mfbmisc.c | 99 + xorg-server-1.4/mfb/mfbpablack.c | 5 + xorg-server-1.4/mfb/mfbpainv.c | 5 + xorg-server-1.4/mfb/mfbpawhite.c | 5 + xorg-server-1.4/mfb/mfbpgbblak.c | 3 + xorg-server-1.4/mfb/mfbpgbinv.c | 3 + xorg-server-1.4/mfb/mfbpgbwht.c | 3 + xorg-server-1.4/mfb/mfbpixmap.c | 295 + xorg-server-1.4/mfb/mfbply1rct.c | 261 + xorg-server-1.4/mfb/mfbplyblack.c | 4 + xorg-server-1.4/mfb/mfbplygblt.c | 397 + xorg-server-1.4/mfb/mfbplyinv.c | 4 + xorg-server-1.4/mfb/mfbplywhite.c | 4 + xorg-server-1.4/mfb/mfbpntarea.c | 299 + xorg-server-1.4/mfb/mfbpntwin.c | 126 + xorg-server-1.4/mfb/mfbpolypnt.c | 143 + xorg-server-1.4/mfb/mfbpushpxl.c | 287 + xorg-server-1.4/mfb/mfbscrclse.c | 64 + xorg-server-1.4/mfb/mfbscrinit.c | 210 + xorg-server-1.4/mfb/mfbseg.c | 2 + xorg-server-1.4/mfb/mfbsetsp.c | 281 + xorg-server-1.4/mfb/mfbteblack.c | 4 + xorg-server-1.4/mfb/mfbtegblt.c | 366 + xorg-server-1.4/mfb/mfbtewhite.c | 4 + xorg-server-1.4/mfb/mfbtile.c | 238 + xorg-server-1.4/mfb/mfbtileC.c | 2 + xorg-server-1.4/mfb/mfbtileG.c | 2 + xorg-server-1.4/mfb/mfbwindow.c | 341 + xorg-server-1.4/mfb/mfbzerarc.c | 258 + xorg-server-1.4/mi/Makefile.am | 69 + xorg-server-1.4/mi/Makefile.in | 759 + xorg-server-1.4/mi/mi.h | 577 + xorg-server-1.4/mi/miarc.c | 3691 + xorg-server-1.4/mi/mibank.c | 2573 + xorg-server-1.4/mi/mibank.h | 118 + xorg-server-1.4/mi/mibitblt.c | 839 + xorg-server-1.4/mi/mibstore.c | 3879 + xorg-server-1.4/mi/mibstore.h | 28 + xorg-server-1.4/mi/mibstorest.h | 91 + xorg-server-1.4/mi/micmap.c | 697 + xorg-server-1.4/mi/micmap.h | 64 + xorg-server-1.4/mi/micoord.h | 70 + xorg-server-1.4/mi/micursor.c | 75 + xorg-server-1.4/mi/midash.c | 122 + xorg-server-1.4/mi/midispcur.c | 816 + xorg-server-1.4/mi/mieq.c | 252 + xorg-server-1.4/mi/miexpose.c | 902 + xorg-server-1.4/mi/mifillarc.c | 807 + xorg-server-1.4/mi/mifillarc.h | 190 + xorg-server-1.4/mi/mifillrct.c | 142 + xorg-server-1.4/mi/mifpoly.h | 102 + xorg-server-1.4/mi/mifpolycon.c | 278 + xorg-server-1.4/mi/migc.c | 299 + xorg-server-1.4/mi/migc.h | 72 + xorg-server-1.4/mi/miglblt.c | 253 + xorg-server-1.4/mi/miinitext.c | 801 + xorg-server-1.4/mi/miline.h | 172 + xorg-server-1.4/mi/mioverlay.c | 2077 + xorg-server-1.4/mi/mioverlay.h | 32 + xorg-server-1.4/mi/mipointer.c | 517 + xorg-server-1.4/mi/mipointer.h | 171 + xorg-server-1.4/mi/mipointrst.h | 52 + xorg-server-1.4/mi/mipoly.c | 127 + xorg-server-1.4/mi/mipoly.h | 207 + xorg-server-1.4/mi/mipolycon.c | 246 + xorg-server-1.4/mi/mipolygen.c | 230 + xorg-server-1.4/mi/mipolypnt.c | 123 + xorg-server-1.4/mi/mipolyrect.c | 191 + xorg-server-1.4/mi/mipolyseg.c | 83 + xorg-server-1.4/mi/mipolytext.c | 149 + xorg-server-1.4/mi/mipolyutil.c | 395 + xorg-server-1.4/mi/mipushpxl.c | 259 + xorg-server-1.4/mi/miregion.c | 1902 + xorg-server-1.4/mi/miscanfill.h | 147 + xorg-server-1.4/mi/miscrinit.c | 340 + xorg-server-1.4/mi/mispans.c | 537 + xorg-server-1.4/mi/mispans.h | 99 + xorg-server-1.4/mi/misprite.c | 829 + xorg-server-1.4/mi/misprite.h | 94 + xorg-server-1.4/mi/mispritest.h | 132 + xorg-server-1.4/mi/mistruct.h | 63 + xorg-server-1.4/mi/mivalidate.h | 52 + xorg-server-1.4/mi/mivaltree.c | 834 + xorg-server-1.4/mi/miwideline.c | 2206 + xorg-server-1.4/mi/miwideline.h | 180 + xorg-server-1.4/mi/miwindow.c | 1182 + xorg-server-1.4/mi/mizerarc.c | 851 + xorg-server-1.4/mi/mizerarc.h | 126 + xorg-server-1.4/mi/mizerclip.c | 635 + xorg-server-1.4/mi/mizerline.c | 378 + xorg-server-1.4/miext/Makefile.am | 8 + xorg-server-1.4/miext/Makefile.in | 669 + xorg-server-1.4/miext/cw/Makefile.am | 11 + xorg-server-1.4/miext/cw/Makefile.in | 627 + xorg-server-1.4/miext/cw/cw.c | 696 + xorg-server-1.4/miext/cw/cw.h | 170 + xorg-server-1.4/miext/cw/cw_ops.c | 478 + xorg-server-1.4/miext/cw/cw_render.c | 502 + xorg-server-1.4/miext/damage/Makefile.am | 14 + xorg-server-1.4/miext/damage/Makefile.in | 658 + xorg-server-1.4/miext/damage/damage.c | 2029 + xorg-server-1.4/miext/damage/damage.h | 85 + xorg-server-1.4/miext/damage/damagestr.h | 111 + xorg-server-1.4/miext/rootless/Makefile.am | 22 + xorg-server-1.4/miext/rootless/Makefile.in | 756 + xorg-server-1.4/miext/rootless/README.txt | 403 + xorg-server-1.4/miext/rootless/accel/Makefile.am | 18 + xorg-server-1.4/miext/rootless/accel/Makefile.in | 640 + xorg-server-1.4/miext/rootless/accel/rlAccel.c | 151 + xorg-server-1.4/miext/rootless/accel/rlAccel.h | 140 + xorg-server-1.4/miext/rootless/accel/rlBlt.c | 370 + xorg-server-1.4/miext/rootless/accel/rlCopy.c | 106 + xorg-server-1.4/miext/rootless/accel/rlFill.c | 220 + xorg-server-1.4/miext/rootless/accel/rlFillRect.c | 117 + xorg-server-1.4/miext/rootless/accel/rlFillSpans.c | 105 + xorg-server-1.4/miext/rootless/accel/rlGlyph.c | 169 + xorg-server-1.4/miext/rootless/accel/rlSolid.c | 111 + xorg-server-1.4/miext/rootless/rootless.h | 435 + xorg-server-1.4/miext/rootless/rootlessCommon.c | 407 + xorg-server-1.4/miext/rootless/rootlessCommon.h | 260 + xorg-server-1.4/miext/rootless/rootlessConfig.h | 67 + xorg-server-1.4/miext/rootless/rootlessGC.c | 1505 + xorg-server-1.4/miext/rootless/rootlessScreen.c | 669 + xorg-server-1.4/miext/rootless/rootlessValTree.c | 648 + xorg-server-1.4/miext/rootless/rootlessWindow.c | 1470 + xorg-server-1.4/miext/rootless/rootlessWindow.h | 63 + .../miext/rootless/safeAlpha/Makefile.am | 12 + .../miext/rootless/safeAlpha/Makefile.in | 627 + .../miext/rootless/safeAlpha/safeAlpha.h | 44 + .../miext/rootless/safeAlpha/safeAlphaPicture.c | 200 + .../miext/rootless/safeAlpha/safeAlphaWindow.c | 177 + xorg-server-1.4/miext/shadow/Makefile.am | 34 + xorg-server-1.4/miext/shadow/Makefile.in | 702 + xorg-server-1.4/miext/shadow/shadow.c | 255 + xorg-server-1.4/miext/shadow/shadow.h | 185 + xorg-server-1.4/miext/shadow/shalloc.c | 50 + xorg-server-1.4/miext/shadow/shpacked.c | 115 + xorg-server-1.4/miext/shadow/shplanar.c | 180 + xorg-server-1.4/miext/shadow/shplanar8.c | 175 + xorg-server-1.4/miext/shadow/shrot16pack.c | 30 + xorg-server-1.4/miext/shadow/shrot16pack_180.c | 31 + xorg-server-1.4/miext/shadow/shrot16pack_270.c | 31 + xorg-server-1.4/miext/shadow/shrot16pack_270YX.c | 31 + xorg-server-1.4/miext/shadow/shrot16pack_90.c | 31 + xorg-server-1.4/miext/shadow/shrot16pack_90YX.c | 31 + xorg-server-1.4/miext/shadow/shrot32pack.c | 30 + xorg-server-1.4/miext/shadow/shrot32pack_180.c | 31 + xorg-server-1.4/miext/shadow/shrot32pack_270.c | 31 + xorg-server-1.4/miext/shadow/shrot32pack_90.c | 31 + xorg-server-1.4/miext/shadow/shrot8pack.c | 30 + xorg-server-1.4/miext/shadow/shrot8pack_180.c | 31 + xorg-server-1.4/miext/shadow/shrot8pack_270.c | 31 + xorg-server-1.4/miext/shadow/shrot8pack_90.c | 31 + xorg-server-1.4/miext/shadow/shrotate.c | 313 + xorg-server-1.4/miext/shadow/shrotpack.h | 187 + xorg-server-1.4/miext/shadow/shrotpackYX.h | 160 + xorg-server-1.4/missing | 367 + xorg-server-1.4/os/Makefile.am | 67 + xorg-server-1.4/os/Makefile.in | 721 + xorg-server-1.4/os/WaitFor.c | 720 + xorg-server-1.4/os/access.c | 2386 + xorg-server-1.4/os/auth.c | 365 + xorg-server-1.4/os/connection.c | 1249 + xorg-server-1.4/os/io.c | 1269 + xorg-server-1.4/os/log.c | 631 + xorg-server-1.4/os/mitauth.c | 197 + xorg-server-1.4/os/os.c | 0 xorg-server-1.4/os/oscolor.c | 286 + xorg-server-1.4/os/oscolor.h | 1508 + xorg-server-1.4/os/osdep.h | 292 + xorg-server-1.4/os/osinit.c | 237 + xorg-server-1.4/os/rpcauth.c | 202 + xorg-server-1.4/os/secauth.c | 202 + xorg-server-1.4/os/strlcat.c | 58 + xorg-server-1.4/os/strlcpy.c | 53 + xorg-server-1.4/os/utils.c | 2272 + xorg-server-1.4/os/xalloc.c | 816 + xorg-server-1.4/os/xdmauth.c | 497 + xorg-server-1.4/os/xdmcp.c | 1670 + xorg-server-1.4/os/xprintf.c | 104 + xorg-server-1.4/os/xstrans.c | 8 + xorg-server-1.4/randr/Makefile.am | 28 + xorg-server-1.4/randr/Makefile.in | 675 + xorg-server-1.4/randr/mirandr.c | 154 + xorg-server-1.4/randr/randr.c | 497 + xorg-server-1.4/randr/randrstr.h | 852 + xorg-server-1.4/randr/rrcrtc.c | 951 + xorg-server-1.4/randr/rrdispatch.c | 214 + xorg-server-1.4/randr/rrinfo.c | 335 + xorg-server-1.4/randr/rrmode.c | 397 + xorg-server-1.4/randr/rroutput.c | 535 + xorg-server-1.4/randr/rrpointer.c | 145 + xorg-server-1.4/randr/rrproperty.c | 692 + xorg-server-1.4/randr/rrscreen.c | 982 + xorg-server-1.4/randr/rrsdispatch.c | 305 + xorg-server-1.4/randr/rrxinerama.c | 444 + xorg-server-1.4/record/Makefile.am | 7 + xorg-server-1.4/record/Makefile.in | 621 + xorg-server-1.4/record/record.c | 2972 + xorg-server-1.4/record/set.c | 438 + xorg-server-1.4/record/set.h | 147 + xorg-server-1.4/render/Makefile.am | 21 + xorg-server-1.4/render/Makefile.in | 680 + xorg-server-1.4/render/animcur.c | 401 + xorg-server-1.4/render/filter.c | 323 + xorg-server-1.4/render/glyph.c | 803 + xorg-server-1.4/render/glyphstr.h | 168 + xorg-server-1.4/render/miglyph.c | 255 + xorg-server-1.4/render/miindex.c | 356 + xorg-server-1.4/render/mipict.c | 651 + xorg-server-1.4/render/mipict.h | 235 + xorg-server-1.4/render/mirect.c | 185 + xorg-server-1.4/render/mitrap.c | 189 + xorg-server-1.4/render/mitri.c | 191 + xorg-server-1.4/render/picture.c | 1945 + xorg-server-1.4/render/picture.h | 222 + xorg-server-1.4/render/picturestr.h | 705 + xorg-server-1.4/render/render.c | 3308 + xorg-server-1.4/render/renderedge.c | 91 + xorg-server-1.4/render/renderedge.h | 105 + xorg-server-1.4/xfixes/Makefile.am | 12 + xorg-server-1.4/xfixes/Makefile.in | 632 + xorg-server-1.4/xfixes/cursor.c | 1045 + xorg-server-1.4/xfixes/region.c | 870 + xorg-server-1.4/xfixes/saveset.c | 76 + xorg-server-1.4/xfixes/select.c | 279 + xorg-server-1.4/xfixes/xfixes.c | 263 + xorg-server-1.4/xfixes/xfixes.h | 52 + xorg-server-1.4/xfixes/xfixesint.h | 272 + xorg-server-1.4/xkb/Makefile.am | 54 + xorg-server-1.4/xkb/Makefile.in | 746 + xorg-server-1.4/xkb/README.compiled | 13 + xorg-server-1.4/xkb/XKBAlloc.c | 337 + xorg-server-1.4/xkb/XKBGAlloc.c | 1005 + xorg-server-1.4/xkb/XKBMAlloc.c | 903 + xorg-server-1.4/xkb/XKBMisc.c | 791 + xorg-server-1.4/xkb/ddxBeep.c | 336 + xorg-server-1.4/xkb/ddxCtrls.c | 129 + xorg-server-1.4/xkb/ddxDevBtn.c | 100 + xorg-server-1.4/xkb/ddxFakeBtn.c | 59 + xorg-server-1.4/xkb/ddxFakeMtn.c | 119 + xorg-server-1.4/xkb/ddxInit.c | 46 + xorg-server-1.4/xkb/ddxKeyClick.c | 50 + xorg-server-1.4/xkb/ddxKillSrv.c | 46 + xorg-server-1.4/xkb/ddxLEDs.c | 72 + xorg-server-1.4/xkb/ddxList.c | 305 + xorg-server-1.4/xkb/ddxLoad.c | 556 + xorg-server-1.4/xkb/ddxPrivate.c | 15 + xorg-server-1.4/xkb/ddxVT.c | 45 + xorg-server-1.4/xkb/maprules.c | 1324 + xorg-server-1.4/xkb/xkb.c | 6224 + xorg-server-1.4/xkb/xkb.h | 37 + xorg-server-1.4/xkb/xkbAccessX.c | 746 + xorg-server-1.4/xkb/xkbActions.c | 1429 + xorg-server-1.4/xkb/xkbDflts.h | 469 + xorg-server-1.4/xkb/xkbEvents.c | 1017 + xorg-server-1.4/xkb/xkbInit.c | 932 + xorg-server-1.4/xkb/xkbLEDs.c | 934 + xorg-server-1.4/xkb/xkbPrKeyEv.c | 182 + xorg-server-1.4/xkb/xkbSwap.c | 595 + xorg-server-1.4/xkb/xkbUtils.c | 2061 + xorg-server-1.4/xkb/xkberrs.c | 37 + xorg-server-1.4/xkb/xkbfmisc.c | 537 + xorg-server-1.4/xkb/xkbout.c | 925 + xorg-server-1.4/xkb/xkbtext.c | 1229 + xorg-server-1.4/xkb/xkmread.c | 1283 + xorg-server-1.4/xorg-server.m4 | 48 + xorg-server-1.4/xorg-server.pc.in | 12 + xorg-server-1.4/ylwrap | 223 + 2958 files changed, 1445041 insertions(+) create mode 100644 xorg-server-1.4/COPYING create mode 100644 xorg-server-1.4/ChangeLog create mode 100644 xorg-server-1.4/GL/Makefile.am create mode 100644 xorg-server-1.4/GL/Makefile.in create mode 100644 xorg-server-1.4/GL/apple/Makefile.am create mode 100644 xorg-server-1.4/GL/apple/Makefile.in create mode 100644 xorg-server-1.4/GL/apple/aglGlx.c create mode 100644 xorg-server-1.4/GL/glx/Makefile.am create mode 100644 xorg-server-1.4/GL/glx/Makefile.in create mode 100644 xorg-server-1.4/GL/glx/extension_string.c create mode 100644 xorg-server-1.4/GL/glx/extension_string.h create mode 100644 xorg-server-1.4/GL/glx/g_disptab.h create mode 100644 xorg-server-1.4/GL/glx/glxbyteorder.h create mode 100644 xorg-server-1.4/GL/glx/glxcmds.c create mode 100644 xorg-server-1.4/GL/glx/glxcmdsswap.c create mode 100644 xorg-server-1.4/GL/glx/glxcontext.h create mode 100644 xorg-server-1.4/GL/glx/glxdrawable.h create mode 100644 xorg-server-1.4/GL/glx/glxdri.c create mode 100644 xorg-server-1.4/GL/glx/glxext.c create mode 100644 xorg-server-1.4/GL/glx/glxext.h create mode 100644 xorg-server-1.4/GL/glx/glxglcore.c create mode 100644 xorg-server-1.4/GL/glx/glxscreens.c create mode 100644 xorg-server-1.4/GL/glx/glxscreens.h create mode 100644 xorg-server-1.4/GL/glx/glxserver.h create mode 100644 xorg-server-1.4/GL/glx/glxutil.c create mode 100644 xorg-server-1.4/GL/glx/glxutil.h create mode 100644 xorg-server-1.4/GL/glx/glxvisuals.c create mode 100644 xorg-server-1.4/GL/glx/indirect_dispatch.c create mode 100644 xorg-server-1.4/GL/glx/indirect_dispatch.h create mode 100644 xorg-server-1.4/GL/glx/indirect_dispatch_swap.c create mode 100644 xorg-server-1.4/GL/glx/indirect_program.c create mode 100644 xorg-server-1.4/GL/glx/indirect_reqsize.c create mode 100644 xorg-server-1.4/GL/glx/indirect_reqsize.h create mode 100644 xorg-server-1.4/GL/glx/indirect_size_get.c create mode 100644 xorg-server-1.4/GL/glx/indirect_size_get.h create mode 100644 xorg-server-1.4/GL/glx/indirect_table.c create mode 100644 xorg-server-1.4/GL/glx/indirect_table.h create mode 100644 xorg-server-1.4/GL/glx/indirect_texture_compression.c create mode 100644 xorg-server-1.4/GL/glx/indirect_util.c create mode 100644 xorg-server-1.4/GL/glx/indirect_util.h create mode 100644 xorg-server-1.4/GL/glx/render2.c create mode 100644 xorg-server-1.4/GL/glx/render2swap.c create mode 100644 xorg-server-1.4/GL/glx/renderpix.c create mode 100644 xorg-server-1.4/GL/glx/renderpixswap.c create mode 100644 xorg-server-1.4/GL/glx/rensize.c create mode 100644 xorg-server-1.4/GL/glx/single2.c create mode 100644 xorg-server-1.4/GL/glx/single2swap.c create mode 100644 xorg-server-1.4/GL/glx/singlepix.c create mode 100644 xorg-server-1.4/GL/glx/singlepixswap.c create mode 100644 xorg-server-1.4/GL/glx/singlesize.c create mode 100644 xorg-server-1.4/GL/glx/singlesize.h create mode 100644 xorg-server-1.4/GL/glx/swap_interval.c create mode 100644 xorg-server-1.4/GL/glx/unpack.h create mode 100644 xorg-server-1.4/GL/glx/xfont.c create mode 100644 xorg-server-1.4/GL/mesa/Makefile.am create mode 100644 xorg-server-1.4/GL/mesa/Makefile.in create mode 100644 xorg-server-1.4/GL/mesa/X/Makefile.am create mode 100644 xorg-server-1.4/GL/mesa/X/Makefile.in create mode 100644 xorg-server-1.4/GL/mesa/dummy.c create mode 100644 xorg-server-1.4/GL/mesa/glapi/Makefile.am create mode 100644 xorg-server-1.4/GL/mesa/glapi/Makefile.in create mode 100644 xorg-server-1.4/GL/mesa/main/Makefile.am create mode 100644 xorg-server-1.4/GL/mesa/main/Makefile.in create mode 100644 xorg-server-1.4/GL/mesa/math/Makefile.am create mode 100644 xorg-server-1.4/GL/mesa/math/Makefile.in create mode 100644 xorg-server-1.4/GL/mesa/shader/Makefile.am create mode 100644 xorg-server-1.4/GL/mesa/shader/Makefile.in create mode 100644 xorg-server-1.4/GL/mesa/shader/grammar/Makefile.am create mode 100644 xorg-server-1.4/GL/mesa/shader/grammar/Makefile.in create mode 100644 xorg-server-1.4/GL/mesa/shader/slang/Makefile.am create mode 100644 xorg-server-1.4/GL/mesa/shader/slang/Makefile.in create mode 100644 xorg-server-1.4/GL/mesa/swrast/Makefile.am create mode 100644 xorg-server-1.4/GL/mesa/swrast/Makefile.in create mode 100644 xorg-server-1.4/GL/mesa/swrast_setup/Makefile.am create mode 100644 xorg-server-1.4/GL/mesa/swrast_setup/Makefile.in create mode 100644 xorg-server-1.4/GL/mesa/tnl/Makefile.am create mode 100644 xorg-server-1.4/GL/mesa/tnl/Makefile.in create mode 100644 xorg-server-1.4/GL/mesa/vbo/Makefile.am create mode 100644 xorg-server-1.4/GL/mesa/vbo/Makefile.in create mode 100755 xorg-server-1.4/GL/symlink-mesa.sh create mode 100644 xorg-server-1.4/GL/windows/ChangeLog create mode 100644 xorg-server-1.4/GL/windows/glwindows.h create mode 100755 xorg-server-1.4/GL/windows/glwrap.c create mode 100755 xorg-server-1.4/GL/windows/indirect.c create mode 100644 xorg-server-1.4/Makefile.am create mode 100644 xorg-server-1.4/Makefile.in create mode 100644 xorg-server-1.4/XTrap/Makefile.am create mode 100644 xorg-server-1.4/XTrap/Makefile.in create mode 100644 xorg-server-1.4/XTrap/xtrapddmi.c create mode 100644 xorg-server-1.4/XTrap/xtrapdi.c create mode 100644 xorg-server-1.4/XTrap/xtrapdiswp.c create mode 100644 xorg-server-1.4/XTrap/xtrapditbl.c create mode 100644 xorg-server-1.4/Xext/EVI.c create mode 100644 xorg-server-1.4/Xext/EVIstruct.h create mode 100644 xorg-server-1.4/Xext/Makefile.am create mode 100644 xorg-server-1.4/Xext/Makefile.in create mode 100644 xorg-server-1.4/Xext/SecurityPolicy create mode 100644 xorg-server-1.4/Xext/appgroup.c create mode 100644 xorg-server-1.4/Xext/appgroup.h create mode 100644 xorg-server-1.4/Xext/bigreq.c create mode 100644 xorg-server-1.4/Xext/cup.c create mode 100644 xorg-server-1.4/Xext/dpms.c create mode 100644 xorg-server-1.4/Xext/dpmsproc.h create mode 100644 xorg-server-1.4/Xext/dpmsstubs.c create mode 100644 xorg-server-1.4/Xext/fontcache.c create mode 100644 xorg-server-1.4/Xext/mbuf.c create mode 100644 xorg-server-1.4/Xext/mbufbf.c create mode 100644 xorg-server-1.4/Xext/mbufpx.c create mode 100644 xorg-server-1.4/Xext/mitmisc.c create mode 100644 xorg-server-1.4/Xext/panoramiX.c create mode 100644 xorg-server-1.4/Xext/panoramiX.h create mode 100644 xorg-server-1.4/Xext/panoramiXSwap.c create mode 100644 xorg-server-1.4/Xext/panoramiXh.h create mode 100644 xorg-server-1.4/Xext/panoramiXprocs.c create mode 100644 xorg-server-1.4/Xext/panoramiXsrv.h create mode 100644 xorg-server-1.4/Xext/sampleEVI.c create mode 100644 xorg-server-1.4/Xext/saver.c create mode 100644 xorg-server-1.4/Xext/security.c create mode 100644 xorg-server-1.4/Xext/securitysrv.h create mode 100644 xorg-server-1.4/Xext/shape.c create mode 100644 xorg-server-1.4/Xext/shm.c create mode 100644 xorg-server-1.4/Xext/shmint.h create mode 100644 xorg-server-1.4/Xext/sleepuntil.c create mode 100644 xorg-server-1.4/Xext/sleepuntil.h create mode 100644 xorg-server-1.4/Xext/sync.c create mode 100644 xorg-server-1.4/Xext/xace.c create mode 100644 xorg-server-1.4/Xext/xace.h create mode 100644 xorg-server-1.4/Xext/xacestr.h create mode 100644 xorg-server-1.4/Xext/xcalibrate.c create mode 100644 xorg-server-1.4/Xext/xcmisc.c create mode 100644 xorg-server-1.4/Xext/xevie.c create mode 100644 xorg-server-1.4/Xext/xf86bigfont.c create mode 100644 xorg-server-1.4/Xext/xprint.c create mode 100644 xorg-server-1.4/Xext/xres.c create mode 100644 xorg-server-1.4/Xext/xtest.c create mode 100644 xorg-server-1.4/Xext/xvdisp.c create mode 100644 xorg-server-1.4/Xext/xvdisp.h create mode 100644 xorg-server-1.4/Xext/xvdix.h create mode 100644 xorg-server-1.4/Xext/xvmain.c create mode 100644 xorg-server-1.4/Xext/xvmc.c create mode 100644 xorg-server-1.4/Xext/xvmcext.h create mode 100644 xorg-server-1.4/Xi/Makefile.am create mode 100644 xorg-server-1.4/Xi/Makefile.in create mode 100644 xorg-server-1.4/Xi/allowev.c create mode 100644 xorg-server-1.4/Xi/allowev.h create mode 100644 xorg-server-1.4/Xi/chgdctl.c create mode 100644 xorg-server-1.4/Xi/chgdctl.h create mode 100644 xorg-server-1.4/Xi/chgfctl.c create mode 100644 xorg-server-1.4/Xi/chgfctl.h create mode 100644 xorg-server-1.4/Xi/chgkbd.c create mode 100644 xorg-server-1.4/Xi/chgkbd.h create mode 100644 xorg-server-1.4/Xi/chgkmap.c create mode 100644 xorg-server-1.4/Xi/chgkmap.h create mode 100644 xorg-server-1.4/Xi/chgprop.c create mode 100644 xorg-server-1.4/Xi/chgprop.h create mode 100644 xorg-server-1.4/Xi/chgptr.c create mode 100644 xorg-server-1.4/Xi/chgptr.h create mode 100644 xorg-server-1.4/Xi/closedev.c create mode 100644 xorg-server-1.4/Xi/closedev.h create mode 100644 xorg-server-1.4/Xi/devbell.c create mode 100644 xorg-server-1.4/Xi/devbell.h create mode 100644 xorg-server-1.4/Xi/exevents.c create mode 100644 xorg-server-1.4/Xi/exglobals.h create mode 100644 xorg-server-1.4/Xi/extinit.c create mode 100644 xorg-server-1.4/Xi/getbmap.c create mode 100644 xorg-server-1.4/Xi/getbmap.h create mode 100644 xorg-server-1.4/Xi/getdctl.c create mode 100644 xorg-server-1.4/Xi/getdctl.h create mode 100644 xorg-server-1.4/Xi/getfctl.c create mode 100644 xorg-server-1.4/Xi/getfctl.h create mode 100644 xorg-server-1.4/Xi/getfocus.c create mode 100644 xorg-server-1.4/Xi/getfocus.h create mode 100644 xorg-server-1.4/Xi/getkmap.c create mode 100644 xorg-server-1.4/Xi/getkmap.h create mode 100644 xorg-server-1.4/Xi/getmmap.c create mode 100644 xorg-server-1.4/Xi/getmmap.h create mode 100644 xorg-server-1.4/Xi/getprop.c create mode 100644 xorg-server-1.4/Xi/getprop.h create mode 100644 xorg-server-1.4/Xi/getselev.c create mode 100644 xorg-server-1.4/Xi/getselev.h create mode 100644 xorg-server-1.4/Xi/getvers.c create mode 100644 xorg-server-1.4/Xi/getvers.h create mode 100644 xorg-server-1.4/Xi/grabdev.c create mode 100644 xorg-server-1.4/Xi/grabdev.h create mode 100644 xorg-server-1.4/Xi/grabdevb.c create mode 100644 xorg-server-1.4/Xi/grabdevb.h create mode 100644 xorg-server-1.4/Xi/grabdevk.c create mode 100644 xorg-server-1.4/Xi/grabdevk.h create mode 100644 xorg-server-1.4/Xi/gtmotion.c create mode 100644 xorg-server-1.4/Xi/gtmotion.h create mode 100644 xorg-server-1.4/Xi/listdev.c create mode 100644 xorg-server-1.4/Xi/listdev.h create mode 100644 xorg-server-1.4/Xi/opendev.c create mode 100644 xorg-server-1.4/Xi/opendev.h create mode 100644 xorg-server-1.4/Xi/queryst.c create mode 100644 xorg-server-1.4/Xi/queryst.h create mode 100644 xorg-server-1.4/Xi/selectev.c create mode 100644 xorg-server-1.4/Xi/selectev.h create mode 100644 xorg-server-1.4/Xi/sendexev.c create mode 100644 xorg-server-1.4/Xi/sendexev.h create mode 100644 xorg-server-1.4/Xi/setbmap.c create mode 100644 xorg-server-1.4/Xi/setbmap.h create mode 100644 xorg-server-1.4/Xi/setdval.c create mode 100644 xorg-server-1.4/Xi/setdval.h create mode 100644 xorg-server-1.4/Xi/setfocus.c create mode 100644 xorg-server-1.4/Xi/setfocus.h create mode 100644 xorg-server-1.4/Xi/setmmap.c create mode 100644 xorg-server-1.4/Xi/setmmap.h create mode 100644 xorg-server-1.4/Xi/setmode.c create mode 100644 xorg-server-1.4/Xi/setmode.h create mode 100644 xorg-server-1.4/Xi/stubs.c create mode 100644 xorg-server-1.4/Xi/ungrdev.c create mode 100644 xorg-server-1.4/Xi/ungrdev.h create mode 100644 xorg-server-1.4/Xi/ungrdevb.c create mode 100644 xorg-server-1.4/Xi/ungrdevb.h create mode 100644 xorg-server-1.4/Xi/ungrdevk.c create mode 100644 xorg-server-1.4/Xi/ungrdevk.h create mode 100644 xorg-server-1.4/acinclude.m4 create mode 100644 xorg-server-1.4/aclocal.m4 create mode 100644 xorg-server-1.4/afb/Makefile.am create mode 100644 xorg-server-1.4/afb/Makefile.in create mode 100644 xorg-server-1.4/afb/README create mode 100644 xorg-server-1.4/afb/Xdaniver.doc create mode 100644 xorg-server-1.4/afb/afb.h create mode 100644 xorg-server-1.4/afb/afbbitblt.c create mode 100644 xorg-server-1.4/afb/afbblt.c create mode 100644 xorg-server-1.4/afb/afbbltC.c create mode 100644 xorg-server-1.4/afb/afbbltCI.c create mode 100644 xorg-server-1.4/afb/afbbltG.c create mode 100644 xorg-server-1.4/afb/afbbltO.c create mode 100644 xorg-server-1.4/afb/afbbltX.c create mode 100644 xorg-server-1.4/afb/afbbres.c create mode 100644 xorg-server-1.4/afb/afbbresd.c create mode 100644 xorg-server-1.4/afb/afbbstore.c create mode 100644 xorg-server-1.4/afb/afbclip.c create mode 100644 xorg-server-1.4/afb/afbcmap.c create mode 100644 xorg-server-1.4/afb/afbfillarc.c create mode 100644 xorg-server-1.4/afb/afbfillrct.c create mode 100644 xorg-server-1.4/afb/afbfillsp.c create mode 100644 xorg-server-1.4/afb/afbfont.c create mode 100644 xorg-server-1.4/afb/afbgc.c create mode 100644 xorg-server-1.4/afb/afbgetsp.c create mode 100644 xorg-server-1.4/afb/afbhrzvert.c create mode 100644 xorg-server-1.4/afb/afbimage.c create mode 100644 xorg-server-1.4/afb/afbimggblt.c create mode 100644 xorg-server-1.4/afb/afbline.c create mode 100644 xorg-server-1.4/afb/afbmisc.c create mode 100644 xorg-server-1.4/afb/afbpixmap.c create mode 100644 xorg-server-1.4/afb/afbply1rct.c create mode 100644 xorg-server-1.4/afb/afbplygblt.c create mode 100644 xorg-server-1.4/afb/afbpntarea.c create mode 100644 xorg-server-1.4/afb/afbpntwin.c create mode 100644 xorg-server-1.4/afb/afbpolypnt.c create mode 100644 xorg-server-1.4/afb/afbpushpxl.c create mode 100644 xorg-server-1.4/afb/afbscrinit.c create mode 100644 xorg-server-1.4/afb/afbseg.c create mode 100644 xorg-server-1.4/afb/afbsetsp.c create mode 100644 xorg-server-1.4/afb/afbtegblt.c create mode 100644 xorg-server-1.4/afb/afbtile.c create mode 100644 xorg-server-1.4/afb/afbtileC.c create mode 100644 xorg-server-1.4/afb/afbtileG.c create mode 100644 xorg-server-1.4/afb/afbwindow.c create mode 100644 xorg-server-1.4/afb/afbzerarc.c create mode 100755 xorg-server-1.4/autogen.sh create mode 100644 xorg-server-1.4/cfb/Makefile.am create mode 100644 xorg-server-1.4/cfb/Makefile.am.inc create mode 100644 xorg-server-1.4/cfb/Makefile.in create mode 100644 xorg-server-1.4/cfb/cfb.h create mode 100644 xorg-server-1.4/cfb/cfb16.h create mode 100644 xorg-server-1.4/cfb/cfb24.h create mode 100644 xorg-server-1.4/cfb/cfb32.h create mode 100644 xorg-server-1.4/cfb/cfb8bit.c create mode 100644 xorg-server-1.4/cfb/cfb8bit.h create mode 100644 xorg-server-1.4/cfb/cfb8line.c create mode 100644 xorg-server-1.4/cfb/cfb8lineCO.c create mode 100644 xorg-server-1.4/cfb/cfb8lineCP.c create mode 100644 xorg-server-1.4/cfb/cfb8lineG.c create mode 100644 xorg-server-1.4/cfb/cfb8lineX.c create mode 100644 xorg-server-1.4/cfb/cfb8segC.c create mode 100644 xorg-server-1.4/cfb/cfb8segCS.c create mode 100644 xorg-server-1.4/cfb/cfb8segX.c create mode 100644 xorg-server-1.4/cfb/cfb8setG.c create mode 100644 xorg-server-1.4/cfb/cfballpriv.c create mode 100644 xorg-server-1.4/cfb/cfbbitblt.c create mode 100644 xorg-server-1.4/cfb/cfbblt.c create mode 100644 xorg-server-1.4/cfb/cfbbltC.c create mode 100644 xorg-server-1.4/cfb/cfbbltG.c create mode 100644 xorg-server-1.4/cfb/cfbbltO.c create mode 100644 xorg-server-1.4/cfb/cfbbltX.c create mode 100644 xorg-server-1.4/cfb/cfbbres.c create mode 100644 xorg-server-1.4/cfb/cfbbresd.c create mode 100644 xorg-server-1.4/cfb/cfbbstore.c create mode 100644 xorg-server-1.4/cfb/cfbcmap.c create mode 100644 xorg-server-1.4/cfb/cfbcppl.c create mode 100644 xorg-server-1.4/cfb/cfbfillarc.c create mode 100644 xorg-server-1.4/cfb/cfbfillarcC.c create mode 100644 xorg-server-1.4/cfb/cfbfillarcG.c create mode 100644 xorg-server-1.4/cfb/cfbfillrct.c create mode 100644 xorg-server-1.4/cfb/cfbfillsp.c create mode 100644 xorg-server-1.4/cfb/cfbgc.c create mode 100644 xorg-server-1.4/cfb/cfbgetsp.c create mode 100644 xorg-server-1.4/cfb/cfbglblt8.c create mode 100644 xorg-server-1.4/cfb/cfbglrop8.c create mode 100644 xorg-server-1.4/cfb/cfbhrzvert.c create mode 100644 xorg-server-1.4/cfb/cfbigblt8.c create mode 100644 xorg-server-1.4/cfb/cfbimage.c create mode 100644 xorg-server-1.4/cfb/cfbline.c create mode 100644 xorg-server-1.4/cfb/cfbmap.h create mode 100644 xorg-server-1.4/cfb/cfbmskbits.c create mode 100644 xorg-server-1.4/cfb/cfbmskbits.h create mode 100644 xorg-server-1.4/cfb/cfbpixmap.c create mode 100644 xorg-server-1.4/cfb/cfbply1rct.c create mode 100644 xorg-server-1.4/cfb/cfbply1rctC.c create mode 100644 xorg-server-1.4/cfb/cfbply1rctG.c create mode 100644 xorg-server-1.4/cfb/cfbpntwin.c create mode 100644 xorg-server-1.4/cfb/cfbpolypnt.c create mode 100644 xorg-server-1.4/cfb/cfbpush8.c create mode 100644 xorg-server-1.4/cfb/cfbrctstp8.c create mode 100644 xorg-server-1.4/cfb/cfbrrop.c create mode 100644 xorg-server-1.4/cfb/cfbrrop.h create mode 100644 xorg-server-1.4/cfb/cfbscrinit.c create mode 100644 xorg-server-1.4/cfb/cfbseg.c create mode 100644 xorg-server-1.4/cfb/cfbsetsp.c create mode 100644 xorg-server-1.4/cfb/cfbsolid.c create mode 100644 xorg-server-1.4/cfb/cfbsolidC.c create mode 100644 xorg-server-1.4/cfb/cfbsolidG.c create mode 100644 xorg-server-1.4/cfb/cfbsolidX.c create mode 100644 xorg-server-1.4/cfb/cfbtab.h create mode 100644 xorg-server-1.4/cfb/cfbteblt8.c create mode 100644 xorg-server-1.4/cfb/cfbtegblt.c create mode 100644 xorg-server-1.4/cfb/cfbtile32.c create mode 100644 xorg-server-1.4/cfb/cfbtile32C.c create mode 100644 xorg-server-1.4/cfb/cfbtile32G.c create mode 100644 xorg-server-1.4/cfb/cfbtileodd.c create mode 100644 xorg-server-1.4/cfb/cfbtileoddC.c create mode 100644 xorg-server-1.4/cfb/cfbtileoddG.c create mode 100644 xorg-server-1.4/cfb/cfbunmap.h create mode 100644 xorg-server-1.4/cfb/cfbwindow.c create mode 100644 xorg-server-1.4/cfb/cfbzerarc.c create mode 100644 xorg-server-1.4/cfb/cfbzerarcC.c create mode 100644 xorg-server-1.4/cfb/cfbzerarcG.c create mode 100644 xorg-server-1.4/cfb/cfbzerarcX.c create mode 100644 xorg-server-1.4/cfb/stip68kgnu.h create mode 100644 xorg-server-1.4/cfb/stipmips.s create mode 100644 xorg-server-1.4/cfb/stipsparc.s create mode 100644 xorg-server-1.4/cfb/stipsprc32.s create mode 100644 xorg-server-1.4/cfb32/Makefile.am create mode 100644 xorg-server-1.4/cfb32/Makefile.in create mode 100644 xorg-server-1.4/cfb32/cfb8lineCO.c create mode 100644 xorg-server-1.4/cfb32/cfb8lineCP.c create mode 100644 xorg-server-1.4/cfb32/cfb8lineG.c create mode 100644 xorg-server-1.4/cfb32/cfb8lineX.c create mode 100644 xorg-server-1.4/cfb32/cfb8segC.c create mode 100644 xorg-server-1.4/cfb32/cfb8segCS.c create mode 100644 xorg-server-1.4/cfb32/cfb8segX.c create mode 100644 xorg-server-1.4/cfb32/cfb8setG.c create mode 100644 xorg-server-1.4/cfb32/cfbbltC.c create mode 100644 xorg-server-1.4/cfb32/cfbbltG.c create mode 100644 xorg-server-1.4/cfb32/cfbbltO.c create mode 100644 xorg-server-1.4/cfb32/cfbbltX.c create mode 100644 xorg-server-1.4/cfb32/cfbfillarcC.c create mode 100644 xorg-server-1.4/cfb32/cfbfillarcG.c create mode 100644 xorg-server-1.4/cfb32/cfbply1rctC.c create mode 100644 xorg-server-1.4/cfb32/cfbply1rctG.c create mode 100644 xorg-server-1.4/cfb32/cfbseg.c create mode 100644 xorg-server-1.4/cfb32/cfbsolidC.c create mode 100644 xorg-server-1.4/cfb32/cfbsolidG.c create mode 100644 xorg-server-1.4/cfb32/cfbsolidX.c create mode 100644 xorg-server-1.4/cfb32/cfbtile32C.c create mode 100644 xorg-server-1.4/cfb32/cfbtile32G.c create mode 100644 xorg-server-1.4/cfb32/cfbtileoddC.c create mode 100644 xorg-server-1.4/cfb32/cfbtileoddG.c create mode 100644 xorg-server-1.4/cfb32/cfbzerarcC.c create mode 100644 xorg-server-1.4/cfb32/cfbzerarcG.c create mode 100644 xorg-server-1.4/cfb32/cfbzerarcX.c create mode 100644 xorg-server-1.4/composite/Makefile.am create mode 100644 xorg-server-1.4/composite/Makefile.in create mode 100644 xorg-server-1.4/composite/compalloc.c create mode 100644 xorg-server-1.4/composite/compext.c create mode 100644 xorg-server-1.4/composite/compinit.c create mode 100644 xorg-server-1.4/composite/compint.h create mode 100644 xorg-server-1.4/composite/compwindow.c create mode 100755 xorg-server-1.4/config.guess create mode 100755 xorg-server-1.4/config.sub create mode 100644 xorg-server-1.4/config/Makefile.am create mode 100644 xorg-server-1.4/config/Makefile.in create mode 100644 xorg-server-1.4/config/config-backends.h create mode 100644 xorg-server-1.4/config/config.c create mode 100644 xorg-server-1.4/config/dbus-core.c create mode 100644 xorg-server-1.4/config/dbus.c create mode 100644 xorg-server-1.4/config/hal.c create mode 100644 xorg-server-1.4/config/x11-input.fdi create mode 100644 xorg-server-1.4/config/xorg-server.conf create mode 100755 xorg-server-1.4/configure create mode 100644 xorg-server-1.4/configure.ac create mode 100644 xorg-server-1.4/cpprules.in create mode 100644 xorg-server-1.4/damageext/Makefile.am create mode 100644 xorg-server-1.4/damageext/Makefile.in create mode 100755 xorg-server-1.4/damageext/damageext.c create mode 100644 xorg-server-1.4/damageext/damageext.h create mode 100644 xorg-server-1.4/damageext/damageextint.h create mode 100644 xorg-server-1.4/dbe/Makefile.am create mode 100644 xorg-server-1.4/dbe/Makefile.in create mode 100644 xorg-server-1.4/dbe/dbe.c create mode 100644 xorg-server-1.4/dbe/dbestruct.h create mode 100644 xorg-server-1.4/dbe/midbe.c create mode 100644 xorg-server-1.4/dbe/midbe.h create mode 100644 xorg-server-1.4/dbe/midbestr.h create mode 100755 xorg-server-1.4/depcomp create mode 100644 xorg-server-1.4/dix/BuiltInAtoms create mode 100644 xorg-server-1.4/dix/CHANGES create mode 100644 xorg-server-1.4/dix/Makefile.am create mode 100644 xorg-server-1.4/dix/Makefile.in create mode 100644 xorg-server-1.4/dix/Xserver-dtrace.h.in create mode 100644 xorg-server-1.4/dix/Xserver.d create mode 100644 xorg-server-1.4/dix/atom.c create mode 100644 xorg-server-1.4/dix/buildatoms create mode 100644 xorg-server-1.4/dix/colormap.c create mode 100644 xorg-server-1.4/dix/cursor.c create mode 100644 xorg-server-1.4/dix/devices.c create mode 100644 xorg-server-1.4/dix/dispatch.c create mode 100644 xorg-server-1.4/dix/dispatch.h create mode 100644 xorg-server-1.4/dix/dix.c create mode 100644 xorg-server-1.4/dix/dixfonts.c create mode 100644 xorg-server-1.4/dix/dixutils.c create mode 100644 xorg-server-1.4/dix/events.c create mode 100644 xorg-server-1.4/dix/extension.c create mode 100644 xorg-server-1.4/dix/ffs.c create mode 100644 xorg-server-1.4/dix/gc.c create mode 100644 xorg-server-1.4/dix/getevents.c create mode 100644 xorg-server-1.4/dix/globals.c create mode 100644 xorg-server-1.4/dix/glyphcurs.c create mode 100644 xorg-server-1.4/dix/grabs.c create mode 100644 xorg-server-1.4/dix/initatoms.c create mode 100644 xorg-server-1.4/dix/main.c create mode 100644 xorg-server-1.4/dix/pixmap.c create mode 100644 xorg-server-1.4/dix/privates.c create mode 100644 xorg-server-1.4/dix/property.c create mode 100644 xorg-server-1.4/dix/resource.c create mode 100644 xorg-server-1.4/dix/strcasecmp.c create mode 100644 xorg-server-1.4/dix/swaprep.c create mode 100644 xorg-server-1.4/dix/swapreq.c create mode 100644 xorg-server-1.4/dix/tables.c create mode 100644 xorg-server-1.4/dix/window.c create mode 100644 xorg-server-1.4/dix/xpstubs.c create mode 100644 xorg-server-1.4/doc/Makefile.am create mode 100644 xorg-server-1.4/doc/Makefile.in create mode 100644 xorg-server-1.4/doc/SecurityPolicy.man.pre create mode 100644 xorg-server-1.4/doc/Xserver.man.pre create mode 100644 xorg-server-1.4/doc/smartsched create mode 100644 xorg-server-1.4/exa/Makefile.am create mode 100644 xorg-server-1.4/exa/Makefile.in create mode 100644 xorg-server-1.4/exa/exa.c create mode 100644 xorg-server-1.4/exa/exa.h create mode 100644 xorg-server-1.4/exa/exa_accel.c create mode 100644 xorg-server-1.4/exa/exa_migration.c create mode 100644 xorg-server-1.4/exa/exa_offscreen.c create mode 100644 xorg-server-1.4/exa/exa_priv.h create mode 100644 xorg-server-1.4/exa/exa_render.c create mode 100644 xorg-server-1.4/exa/exa_unaccel.c create mode 100644 xorg-server-1.4/fb/Makefile.am create mode 100644 xorg-server-1.4/fb/Makefile.in create mode 100644 xorg-server-1.4/fb/fb.h create mode 100644 xorg-server-1.4/fb/fb24_32.c create mode 100644 xorg-server-1.4/fb/fb24_32.h create mode 100644 xorg-server-1.4/fb/fballpriv.c create mode 100644 xorg-server-1.4/fb/fbarc.c create mode 100644 xorg-server-1.4/fb/fbbits.c create mode 100644 xorg-server-1.4/fb/fbbits.h create mode 100644 xorg-server-1.4/fb/fbblt.c create mode 100644 xorg-server-1.4/fb/fbbltone.c create mode 100644 xorg-server-1.4/fb/fbbstore.c create mode 100644 xorg-server-1.4/fb/fbcmap.c create mode 100644 xorg-server-1.4/fb/fbcmap_mi.c create mode 100644 xorg-server-1.4/fb/fbcopy.c create mode 100644 xorg-server-1.4/fb/fbfill.c create mode 100644 xorg-server-1.4/fb/fbfillrect.c create mode 100644 xorg-server-1.4/fb/fbfillsp.c create mode 100644 xorg-server-1.4/fb/fbgc.c create mode 100644 xorg-server-1.4/fb/fbgetsp.c create mode 100644 xorg-server-1.4/fb/fbglyph.c create mode 100644 xorg-server-1.4/fb/fbimage.c create mode 100644 xorg-server-1.4/fb/fbline.c create mode 100644 xorg-server-1.4/fb/fboverlay.c create mode 100644 xorg-server-1.4/fb/fboverlay.h create mode 100644 xorg-server-1.4/fb/fbpict.c create mode 100644 xorg-server-1.4/fb/fbpict.h create mode 100644 xorg-server-1.4/fb/fbpixmap.c create mode 100644 xorg-server-1.4/fb/fbpoint.c create mode 100644 xorg-server-1.4/fb/fbpseudocolor.c create mode 100644 xorg-server-1.4/fb/fbpseudocolor.h create mode 100644 xorg-server-1.4/fb/fbpush.c create mode 100644 xorg-server-1.4/fb/fbrop.h create mode 100644 xorg-server-1.4/fb/fbscreen.c create mode 100644 xorg-server-1.4/fb/fbseg.c create mode 100644 xorg-server-1.4/fb/fbsetsp.c create mode 100644 xorg-server-1.4/fb/fbsolid.c create mode 100644 xorg-server-1.4/fb/fbstipple.c create mode 100644 xorg-server-1.4/fb/fbtile.c create mode 100644 xorg-server-1.4/fb/fbtrap.c create mode 100644 xorg-server-1.4/fb/fbutil.c create mode 100644 xorg-server-1.4/fb/fbwindow.c create mode 100644 xorg-server-1.4/fb/wfbrename.h create mode 100644 xorg-server-1.4/hw/Makefile.am create mode 100644 xorg-server-1.4/hw/Makefile.in create mode 100644 xorg-server-1.4/hw/darwin/Makefile.am create mode 100644 xorg-server-1.4/hw/darwin/Makefile.in create mode 100644 xorg-server-1.4/hw/darwin/XDarwin.man create mode 100644 xorg-server-1.4/hw/darwin/apple/X11Application.m create mode 100644 xorg-server-1.4/hw/darwin/apple/X11Controller.m create mode 100644 xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/Credits.rtf create mode 100644 xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/Localizable.strings create mode 100644 xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/classes.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/objects.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/Makefile.am create mode 100644 xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/Makefile.in create mode 100644 xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp create mode 100644 xorg-server-1.4/hw/darwin/bundle/English.lproj/Credits.rtf create mode 100644 xorg-server-1.4/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp create mode 100644 xorg-server-1.4/hw/darwin/bundle/English.lproj/Localizable.strings create mode 100644 xorg-server-1.4/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/English.lproj/Makefile.am create mode 100644 xorg-server-1.4/hw/darwin/bundle/English.lproj/Makefile.in create mode 100644 xorg-server-1.4/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp create mode 100644 xorg-server-1.4/hw/darwin/bundle/French.lproj/Credits.rtf create mode 100644 xorg-server-1.4/hw/darwin/bundle/French.lproj/Localizable.strings create mode 100644 xorg-server-1.4/hw/darwin/bundle/French.lproj/MainMenu.nib/classes.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/French.lproj/MainMenu.nib/objects.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/French.lproj/Makefile.am create mode 100644 xorg-server-1.4/hw/darwin/bundle/French.lproj/Makefile.in create mode 100644 xorg-server-1.4/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp create mode 100644 xorg-server-1.4/hw/darwin/bundle/German.lproj/Credits.rtf create mode 100644 xorg-server-1.4/hw/darwin/bundle/German.lproj/Localizable.strings create mode 100644 xorg-server-1.4/hw/darwin/bundle/German.lproj/MainMenu.nib/classes.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/German.lproj/MainMenu.nib/objects.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/German.lproj/Makefile.am create mode 100644 xorg-server-1.4/hw/darwin/bundle/German.lproj/Makefile.in create mode 100644 xorg-server-1.4/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp create mode 100644 xorg-server-1.4/hw/darwin/bundle/Info.plist create mode 100644 xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/Credits.rtf create mode 100644 xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/Localizable.strings create mode 100644 xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/Makefile.am create mode 100644 xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/Makefile.in create mode 100644 xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp create mode 100644 xorg-server-1.4/hw/darwin/bundle/Makefile.am create mode 100644 xorg-server-1.4/hw/darwin/bundle/Makefile.in create mode 100644 xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/Credits.rtf create mode 100644 xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/Localizable.strings create mode 100644 xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/classes.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/objects.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/Makefile.am create mode 100644 xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/Makefile.in create mode 100644 xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp create mode 100644 xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/Credits.rtf create mode 100644 xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/Localizable.strings create mode 100644 xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/classes.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/objects.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/Makefile.am create mode 100644 xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/Makefile.in create mode 100644 xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp create mode 100644 xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/Credits.rtf create mode 100644 xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/Localizable.strings create mode 100644 xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/classes.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/objects.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/Makefile.am create mode 100644 xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/Makefile.in create mode 100644 xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp create mode 100644 xorg-server-1.4/hw/darwin/bundle/XDarwin.icns create mode 100644 xorg-server-1.4/hw/darwin/bundle/ko.lproj/Credits.rtf create mode 100644 xorg-server-1.4/hw/darwin/bundle/ko.lproj/Localizable.strings create mode 100644 xorg-server-1.4/hw/darwin/bundle/ko.lproj/MainMenu.nib/classes.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/ko.lproj/MainMenu.nib/objects.nib create mode 100644 xorg-server-1.4/hw/darwin/bundle/ko.lproj/Makefile.am create mode 100644 xorg-server-1.4/hw/darwin/bundle/ko.lproj/Makefile.in create mode 100644 xorg-server-1.4/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp create mode 100644 xorg-server-1.4/hw/darwin/darwin.c create mode 100644 xorg-server-1.4/hw/darwin/darwin.h create mode 100644 xorg-server-1.4/hw/darwin/darwinClut8.h create mode 100644 xorg-server-1.4/hw/darwin/darwinEvents.c create mode 100644 xorg-server-1.4/hw/darwin/darwinKeyboard.c create mode 100644 xorg-server-1.4/hw/darwin/darwinKeyboard.h create mode 100644 xorg-server-1.4/hw/darwin/darwinXinput.c create mode 100644 xorg-server-1.4/hw/darwin/iokit/Makefile.am create mode 100644 xorg-server-1.4/hw/darwin/iokit/Makefile.in create mode 100644 xorg-server-1.4/hw/darwin/iokit/xfIOKit.c create mode 100644 xorg-server-1.4/hw/darwin/iokit/xfIOKit.h create mode 100644 xorg-server-1.4/hw/darwin/iokit/xfIOKitCursor.c create mode 100644 xorg-server-1.4/hw/darwin/iokit/xfIOKitStartup.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/Makefile.am create mode 100644 xorg-server-1.4/hw/darwin/quartz/Makefile.in create mode 100644 xorg-server-1.4/hw/darwin/quartz/Preferences.h create mode 100644 xorg-server-1.4/hw/darwin/quartz/Preferences.m create mode 100644 xorg-server-1.4/hw/darwin/quartz/XApplication.h create mode 100644 xorg-server-1.4/hw/darwin/quartz/XApplication.m create mode 100644 xorg-server-1.4/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj create mode 100644 xorg-server-1.4/hw/darwin/quartz/XDarwinStartup.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/XDarwinStartup.man create mode 100644 xorg-server-1.4/hw/darwin/quartz/XServer.h create mode 100644 xorg-server-1.4/hw/darwin/quartz/XServer.m create mode 100644 xorg-server-1.4/hw/darwin/quartz/applewm.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/applewmExt.h create mode 100644 xorg-server-1.4/hw/darwin/quartz/cr/XView.m create mode 100644 xorg-server-1.4/hw/darwin/quartz/cr/crAppleWM.m create mode 100644 xorg-server-1.4/hw/darwin/quartz/cr/crFrame.m create mode 100644 xorg-server-1.4/hw/darwin/quartz/cr/crScreen.m create mode 100644 xorg-server-1.4/hw/darwin/quartz/fullscreen/fullscreen.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/fullscreen/quartzCursor.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/keysym2ucs.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/keysym2ucs.h create mode 100644 xorg-server-1.4/hw/darwin/quartz/pseudoramiX.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/pseudoramiX.h create mode 100644 xorg-server-1.4/hw/darwin/quartz/quartz.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/quartz.h create mode 100644 xorg-server-1.4/hw/darwin/quartz/quartzAudio.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/quartzAudio.h create mode 100644 xorg-server-1.4/hw/darwin/quartz/quartzCocoa.m create mode 100644 xorg-server-1.4/hw/darwin/quartz/quartzCommon.h create mode 100644 xorg-server-1.4/hw/darwin/quartz/quartzCursor.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/quartzCursor.h create mode 100644 xorg-server-1.4/hw/darwin/quartz/quartzKeyboard.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/quartzPasteboard.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/quartzPasteboard.h create mode 100644 xorg-server-1.4/hw/darwin/quartz/quartzStartup.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/xpr/appledri.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/xpr/dri.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/xpr/x-hash.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/xpr/x-hash.h create mode 100644 xorg-server-1.4/hw/darwin/quartz/xpr/x-hook.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/xpr/x-list.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/xpr/x-list.h create mode 100644 xorg-server-1.4/hw/darwin/quartz/xpr/xprAppleWM.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/xpr/xprCursor.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/xpr/xprFrame.c create mode 100644 xorg-server-1.4/hw/darwin/quartz/xpr/xprScreen.c create mode 100644 xorg-server-1.4/hw/darwin/utils/Makefile.am create mode 100644 xorg-server-1.4/hw/darwin/utils/Makefile.in create mode 100644 xorg-server-1.4/hw/darwin/utils/README.txt create mode 100644 xorg-server-1.4/hw/darwin/utils/dumpkeymap.c create mode 100644 xorg-server-1.4/hw/darwin/utils/dumpkeymap.man create mode 100644 xorg-server-1.4/hw/dmx/Makefile.am create mode 100644 xorg-server-1.4/hw/dmx/Makefile.in create mode 100644 xorg-server-1.4/hw/dmx/Xdmx.man create mode 100644 xorg-server-1.4/hw/dmx/config/Canvas.c create mode 100644 xorg-server-1.4/hw/dmx/config/Canvas.h create mode 100644 xorg-server-1.4/hw/dmx/config/CanvasP.h create mode 100644 xorg-server-1.4/hw/dmx/config/Makefile.am create mode 100644 xorg-server-1.4/hw/dmx/config/Makefile.in create mode 100644 xorg-server-1.4/hw/dmx/config/TODO create mode 100644 xorg-server-1.4/hw/dmx/config/dmxcompat.c create mode 100644 xorg-server-1.4/hw/dmx/config/dmxcompat.h create mode 100644 xorg-server-1.4/hw/dmx/config/dmxconfig.c create mode 100644 xorg-server-1.4/hw/dmx/config/dmxconfig.h create mode 100644 xorg-server-1.4/hw/dmx/config/dmxparse.c create mode 100644 xorg-server-1.4/hw/dmx/config/dmxparse.h create mode 100644 xorg-server-1.4/hw/dmx/config/dmxprint.c create mode 100644 xorg-server-1.4/hw/dmx/config/dmxprint.h create mode 100644 xorg-server-1.4/hw/dmx/config/dmxtodmx.c create mode 100644 xorg-server-1.4/hw/dmx/config/dmxtodmx.man create mode 100644 xorg-server-1.4/hw/dmx/config/parser.c create mode 100644 xorg-server-1.4/hw/dmx/config/parser.h create mode 100644 xorg-server-1.4/hw/dmx/config/parser.y create mode 100644 xorg-server-1.4/hw/dmx/config/scanner.c create mode 100644 xorg-server-1.4/hw/dmx/config/scanner.l create mode 100644 xorg-server-1.4/hw/dmx/config/test-a.in create mode 100644 xorg-server-1.4/hw/dmx/config/test-a.out create mode 100644 xorg-server-1.4/hw/dmx/config/test-b.in create mode 100644 xorg-server-1.4/hw/dmx/config/test-b.out create mode 100644 xorg-server-1.4/hw/dmx/config/test-c.in create mode 100644 xorg-server-1.4/hw/dmx/config/test-c.out create mode 100644 xorg-server-1.4/hw/dmx/config/test-d.in create mode 100644 xorg-server-1.4/hw/dmx/config/test-d.out create mode 100644 xorg-server-1.4/hw/dmx/config/test-e.in create mode 100644 xorg-server-1.4/hw/dmx/config/test-e.out create mode 100644 xorg-server-1.4/hw/dmx/config/test-f.in create mode 100644 xorg-server-1.4/hw/dmx/config/test-f.out create mode 100644 xorg-server-1.4/hw/dmx/config/test-g.in create mode 100644 xorg-server-1.4/hw/dmx/config/test-g.out create mode 100644 xorg-server-1.4/hw/dmx/config/test-h.in create mode 100644 xorg-server-1.4/hw/dmx/config/test-h.out create mode 100644 xorg-server-1.4/hw/dmx/config/test-i.in create mode 100644 xorg-server-1.4/hw/dmx/config/test-i.out create mode 100644 xorg-server-1.4/hw/dmx/config/test-j.in create mode 100644 xorg-server-1.4/hw/dmx/config/test-j.out create mode 100644 xorg-server-1.4/hw/dmx/config/test-k.in create mode 100644 xorg-server-1.4/hw/dmx/config/test-k.out create mode 100644 xorg-server-1.4/hw/dmx/config/test-l.in create mode 100644 xorg-server-1.4/hw/dmx/config/test-l.out create mode 100644 xorg-server-1.4/hw/dmx/config/vdltodmx.c create mode 100644 xorg-server-1.4/hw/dmx/config/vdltodmx.man create mode 100644 xorg-server-1.4/hw/dmx/config/xdmxconfig.c create mode 100644 xorg-server-1.4/hw/dmx/config/xdmxconfig.man create mode 100644 xorg-server-1.4/hw/dmx/dmx-config.h create mode 100644 xorg-server-1.4/hw/dmx/dmx.c create mode 100644 xorg-server-1.4/hw/dmx/dmx.h create mode 100644 xorg-server-1.4/hw/dmx/dmx_glxvisuals.c create mode 100644 xorg-server-1.4/hw/dmx/dmx_glxvisuals.h create mode 100644 xorg-server-1.4/hw/dmx/dmxcb.c create mode 100644 xorg-server-1.4/hw/dmx/dmxcb.h create mode 100644 xorg-server-1.4/hw/dmx/dmxclient.h create mode 100644 xorg-server-1.4/hw/dmx/dmxcmap.c create mode 100644 xorg-server-1.4/hw/dmx/dmxcmap.h create mode 100644 xorg-server-1.4/hw/dmx/dmxcursor.c create mode 100644 xorg-server-1.4/hw/dmx/dmxcursor.h create mode 100644 xorg-server-1.4/hw/dmx/dmxdpms.c create mode 100644 xorg-server-1.4/hw/dmx/dmxdpms.h create mode 100644 xorg-server-1.4/hw/dmx/dmxextension.c create mode 100644 xorg-server-1.4/hw/dmx/dmxextension.h create mode 100644 xorg-server-1.4/hw/dmx/dmxfont.c create mode 100644 xorg-server-1.4/hw/dmx/dmxfont.h create mode 100644 xorg-server-1.4/hw/dmx/dmxgc.c create mode 100644 xorg-server-1.4/hw/dmx/dmxgc.h create mode 100644 xorg-server-1.4/hw/dmx/dmxgcops.c create mode 100644 xorg-server-1.4/hw/dmx/dmxgcops.h create mode 100644 xorg-server-1.4/hw/dmx/dmxinit.c create mode 100644 xorg-server-1.4/hw/dmx/dmxinit.h create mode 100644 xorg-server-1.4/hw/dmx/dmxinput.c create mode 100644 xorg-server-1.4/hw/dmx/dmxinput.h create mode 100644 xorg-server-1.4/hw/dmx/dmxlog.c create mode 100644 xorg-server-1.4/hw/dmx/dmxlog.h create mode 100644 xorg-server-1.4/hw/dmx/dmxpict.c create mode 100644 xorg-server-1.4/hw/dmx/dmxpict.h create mode 100644 xorg-server-1.4/hw/dmx/dmxpixmap.c create mode 100644 xorg-server-1.4/hw/dmx/dmxpixmap.h create mode 100644 xorg-server-1.4/hw/dmx/dmxprop.c create mode 100644 xorg-server-1.4/hw/dmx/dmxprop.h create mode 100644 xorg-server-1.4/hw/dmx/dmxscrinit.c create mode 100644 xorg-server-1.4/hw/dmx/dmxscrinit.h create mode 100644 xorg-server-1.4/hw/dmx/dmxshadow.c create mode 100644 xorg-server-1.4/hw/dmx/dmxshadow.h create mode 100644 xorg-server-1.4/hw/dmx/dmxstat.c create mode 100644 xorg-server-1.4/hw/dmx/dmxstat.h create mode 100644 xorg-server-1.4/hw/dmx/dmxsync.c create mode 100644 xorg-server-1.4/hw/dmx/dmxsync.h create mode 100644 xorg-server-1.4/hw/dmx/dmxvisual.c create mode 100644 xorg-server-1.4/hw/dmx/dmxvisual.h create mode 100644 xorg-server-1.4/hw/dmx/dmxwindow.c create mode 100644 xorg-server-1.4/hw/dmx/dmxwindow.h create mode 100644 xorg-server-1.4/hw/dmx/doc/DMXSpec-v1.txt create mode 100644 xorg-server-1.4/hw/dmx/doc/DMXSpec.txt create mode 100644 xorg-server-1.4/hw/dmx/doc/Makefile.am create mode 100644 xorg-server-1.4/hw/dmx/doc/Makefile.in create mode 100644 xorg-server-1.4/hw/dmx/doc/dmx.sgml create mode 100644 xorg-server-1.4/hw/dmx/doc/dmx.txt create mode 100644 xorg-server-1.4/hw/dmx/doc/doxygen.conf create mode 100644 xorg-server-1.4/hw/dmx/doc/doxygen.css create mode 100644 xorg-server-1.4/hw/dmx/doc/doxygen.foot create mode 100644 xorg-server-1.4/hw/dmx/doc/doxygen.head create mode 100644 xorg-server-1.4/hw/dmx/doc/html/ChkNotMaskEv_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/ChkNotMaskEv_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/ChkNotMaskEv_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/annotated.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/classes.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmx_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmx_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmx__glxvisuals_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxarg_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxarg_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxarg_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxbackend_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxbackend_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxbackend_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxcb_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxcb_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxcb_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxclient_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxclient_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxcmap_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxcmap_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxcmap_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxcommon_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxcommon_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxcommon_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxcompat_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxcompat_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxcompat_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxconfig_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxconfig_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxconfig_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxconsole_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxconsole_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxconsole_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxcursor_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxcursor_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxcursor_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxdetach_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxdpms_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxdpms_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxdpms_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxdummy_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxdummy_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxdummy_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxeq_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxeq_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxeq_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxevents_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxevents_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxevents_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxext_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxext_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxextension_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxextension_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxextension_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxfont_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxfont_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxfont_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxgc_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxgc_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxgc_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxgcops_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxgcops_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxgcops_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxinit_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxinit_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxinit_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxinput_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxinput_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxinput_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxinputinit_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxinputinit_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxinputinit_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxlog_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxlog_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxlog_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxmap_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxmap_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxmap_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxmotion_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxmotion_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxmotion_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxparse_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxparse_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxparse_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxpict_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxpict_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxpict_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxpixmap_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxpixmap_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxpixmap_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxprint_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxprint_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxprint_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxprop_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxprop_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxprop_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxproto_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxproto_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxscrinit_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxscrinit_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxscrinit_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxshadow_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxshadow_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxshadow_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxsigio_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxsigio_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxsigio_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxstat_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxstat_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxstat_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxsync_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxsync_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxsync_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxvisual_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxvisual_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxvisual_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxwindow_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxwindow_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxwindow_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/dmxxinput_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/doxygen.css create mode 100644 xorg-server-1.4/hw/dmx/doc/html/doxygen.png create mode 100644 xorg-server-1.4/hw/dmx/doc/html/files.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/ftv2blank.png create mode 100644 xorg-server-1.4/hw/dmx/doc/html/ftv2doc.png create mode 100644 xorg-server-1.4/hw/dmx/doc/html/ftv2folderclosed.png create mode 100644 xorg-server-1.4/hw/dmx/doc/html/ftv2folderopen.png create mode 100644 xorg-server-1.4/hw/dmx/doc/html/ftv2lastnode.png create mode 100644 xorg-server-1.4/hw/dmx/doc/html/ftv2link.png create mode 100644 xorg-server-1.4/hw/dmx/doc/html/ftv2mlastnode.png create mode 100644 xorg-server-1.4/hw/dmx/doc/html/ftv2mnode.png create mode 100644 xorg-server-1.4/hw/dmx/doc/html/ftv2node.png create mode 100644 xorg-server-1.4/hw/dmx/doc/html/ftv2plastnode.png create mode 100644 xorg-server-1.4/hw/dmx/doc/html/ftv2pnode.png create mode 100644 xorg-server-1.4/hw/dmx/doc/html/ftv2vertline.png create mode 100644 xorg-server-1.4/hw/dmx/doc/html/functions.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/functions_vars.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/globals.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/globals_defs.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/globals_enum.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/globals_eval.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/globals_func.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/globals_type.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/globals_vars.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/index.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/lib_2dmx_2dmx_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/lnx-keyboard_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/lnx-keyboard_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/lnx-keyboard_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/lnx-ms_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/lnx-ms_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/lnx-ms_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/lnx-ps2_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/lnx-ps2_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/lnx-ps2_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/main.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/programs_2Xserver_2Xext_2dmx_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structDMXConfigCmdStruct.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structDMXConfigListStruct.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structDMXDesktopAttributes.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structDMXDesktopAttributesRec.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structDMXInputAttributes.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structDMXInputAttributesRec.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structDMXScreenAttributes.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structDMXScreenAttributesRec.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structDMXWindowAttributes.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structDMXWindowAttributesRec.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXConfigComment.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXConfigDisplay.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXConfigEntry.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXConfigFullDim.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXConfigNumber.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXConfigOption.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXConfigPair.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXConfigParam.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXConfigPartDim.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXConfigString.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXConfigSub.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXConfigToken.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXConfigVirtual.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXConfigWall.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXEventMap.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXInputInfo.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXLocalInitInfo.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXLocalInputInfo.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXScreenInfo.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXStatAvg.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__DMXStatInfo.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__Event.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__EventQueue.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__dmxArg.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__dmxColormapPriv.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__dmxCursorPriv.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__dmxFontPriv.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__dmxGCPriv.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__dmxGlyphPriv.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__dmxPictPriv.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__dmxPixPriv.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__dmxWinPriv.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/struct__myPrivate.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structdmxGlxVisualPrivate.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXAddInputReply.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXAddInputReq.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXAddScreenReply.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXAddScreenReq.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXChangeDesktopAttributesReply.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXChangeDesktopAttributesReq.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXChangeScreensAttributesReply.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXChangeScreensAttributesReq.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXForceWindowCreationReply.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXForceWindowCreationReq.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXGetDesktopAttributesReply.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXGetDesktopAttributesReq.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXGetInputAttributesReply.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXGetInputAttributesReq.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXGetInputCountReply.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXGetInputCountReq.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXGetScreenAttributesReply.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXGetScreenAttributesReq.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXGetScreenCountReply.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXGetScreenCountReq.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXGetWindowAttributesReply.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXGetWindowAttributesReq.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXQueryVersionReply.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXQueryVersionReq.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXRemoveInputReply.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXRemoveInputReq.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXRemoveScreenReply.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXRemoveScreenReq.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXSyncReply.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/structxDMXSyncReq.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/tree.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/usb-common_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/usb-common_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/usb-common_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/usb-keyboard_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/usb-keyboard_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/usb-keyboard_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/usb-mouse_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/usb-mouse_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/usb-mouse_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/usb-other_8c.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/usb-other_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/usb-other_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/usb-private_8h-source.html create mode 100644 xorg-server-1.4/hw/dmx/doc/html/usb-private_8h.html create mode 100644 xorg-server-1.4/hw/dmx/doc/scaled.sgml create mode 100644 xorg-server-1.4/hw/dmx/doc/scaled.txt create mode 100644 xorg-server-1.4/hw/dmx/examples/Makefile.am create mode 100644 xorg-server-1.4/hw/dmx/examples/Makefile.in create mode 100644 xorg-server-1.4/hw/dmx/examples/dmxaddinput.c create mode 100644 xorg-server-1.4/hw/dmx/examples/dmxaddscreen.c create mode 100644 xorg-server-1.4/hw/dmx/examples/dmxreconfig.c create mode 100644 xorg-server-1.4/hw/dmx/examples/dmxresize.c create mode 100644 xorg-server-1.4/hw/dmx/examples/dmxrminput.c create mode 100644 xorg-server-1.4/hw/dmx/examples/dmxrmscreen.c create mode 100644 xorg-server-1.4/hw/dmx/examples/dmxwininfo.c create mode 100644 xorg-server-1.4/hw/dmx/examples/ev.c create mode 100644 xorg-server-1.4/hw/dmx/examples/evi.c create mode 100644 xorg-server-1.4/hw/dmx/examples/res.c create mode 100644 xorg-server-1.4/hw/dmx/examples/xbell.c create mode 100644 xorg-server-1.4/hw/dmx/examples/xdmx.c create mode 100644 xorg-server-1.4/hw/dmx/examples/xinput.c create mode 100644 xorg-server-1.4/hw/dmx/examples/xled.c create mode 100644 xorg-server-1.4/hw/dmx/examples/xtest.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/Makefile.am create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/Makefile.in create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/compsize.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/g_disptab.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/g_disptab.h create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/g_renderswap.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/global.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxcmds.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxcmdsswap.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxcontext.h create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxdrawable.h create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxerror.h create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxext.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxext.h create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxfbconfig.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxfbconfig.h create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxscreens.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxscreens.h create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxserver.h create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxsingle.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxsingle.h create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxswap.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxswap.h create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxutil.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxutil.h create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxvendor.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxvendor.h create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxvisuals.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/glxvisuals.h create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/render2swap.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/renderpixswap.c create mode 100644 xorg-server-1.4/hw/dmx/glxProxy/unpack.h create mode 100644 xorg-server-1.4/hw/dmx/input/ChkNotMaskEv.c create mode 100644 xorg-server-1.4/hw/dmx/input/ChkNotMaskEv.h create mode 100644 xorg-server-1.4/hw/dmx/input/Makefile.am create mode 100644 xorg-server-1.4/hw/dmx/input/Makefile.in create mode 100644 xorg-server-1.4/hw/dmx/input/dmxarg.c create mode 100644 xorg-server-1.4/hw/dmx/input/dmxarg.h create mode 100644 xorg-server-1.4/hw/dmx/input/dmxbackend.c create mode 100644 xorg-server-1.4/hw/dmx/input/dmxbackend.h create mode 100644 xorg-server-1.4/hw/dmx/input/dmxcommon.c create mode 100644 xorg-server-1.4/hw/dmx/input/dmxcommon.h create mode 100644 xorg-server-1.4/hw/dmx/input/dmxconsole.c create mode 100644 xorg-server-1.4/hw/dmx/input/dmxconsole.h create mode 100644 xorg-server-1.4/hw/dmx/input/dmxdetach.c create mode 100644 xorg-server-1.4/hw/dmx/input/dmxdummy.c create mode 100644 xorg-server-1.4/hw/dmx/input/dmxdummy.h create mode 100644 xorg-server-1.4/hw/dmx/input/dmxeq.c create mode 100644 xorg-server-1.4/hw/dmx/input/dmxeq.h create mode 100644 xorg-server-1.4/hw/dmx/input/dmxevents.c create mode 100644 xorg-server-1.4/hw/dmx/input/dmxevents.h create mode 100644 xorg-server-1.4/hw/dmx/input/dmxinputinit.c create mode 100644 xorg-server-1.4/hw/dmx/input/dmxinputinit.h create mode 100644 xorg-server-1.4/hw/dmx/input/dmxmap.c create mode 100644 xorg-server-1.4/hw/dmx/input/dmxmap.h create mode 100644 xorg-server-1.4/hw/dmx/input/dmxmotion.c create mode 100644 xorg-server-1.4/hw/dmx/input/dmxmotion.h create mode 100644 xorg-server-1.4/hw/dmx/input/dmxsigio.c create mode 100644 xorg-server-1.4/hw/dmx/input/dmxsigio.h create mode 100644 xorg-server-1.4/hw/dmx/input/dmxxinput.c create mode 100644 xorg-server-1.4/hw/dmx/input/lnx-keyboard.c create mode 100644 xorg-server-1.4/hw/dmx/input/lnx-keyboard.h create mode 100644 xorg-server-1.4/hw/dmx/input/lnx-ms.c create mode 100644 xorg-server-1.4/hw/dmx/input/lnx-ms.h create mode 100644 xorg-server-1.4/hw/dmx/input/lnx-ps2.c create mode 100644 xorg-server-1.4/hw/dmx/input/lnx-ps2.h create mode 100644 xorg-server-1.4/hw/dmx/input/usb-common.c create mode 100644 xorg-server-1.4/hw/dmx/input/usb-common.h create mode 100644 xorg-server-1.4/hw/dmx/input/usb-keyboard.c create mode 100644 xorg-server-1.4/hw/dmx/input/usb-keyboard.h create mode 100644 xorg-server-1.4/hw/dmx/input/usb-mouse.c create mode 100644 xorg-server-1.4/hw/dmx/input/usb-mouse.h create mode 100644 xorg-server-1.4/hw/dmx/input/usb-other.c create mode 100644 xorg-server-1.4/hw/dmx/input/usb-other.h create mode 100644 xorg-server-1.4/hw/dmx/input/usb-private.h create mode 100644 xorg-server-1.4/hw/kdrive/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/ati/ChangeLog create mode 100644 xorg-server-1.4/hw/kdrive/ati/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/ati/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/ati/ati.c create mode 100644 xorg-server-1.4/hw/kdrive/ati/ati.h create mode 100644 xorg-server-1.4/hw/kdrive/ati/ati_cursor.c create mode 100644 xorg-server-1.4/hw/kdrive/ati/ati_dma.c create mode 100644 xorg-server-1.4/hw/kdrive/ati/ati_dma.h create mode 100644 xorg-server-1.4/hw/kdrive/ati/ati_draw.c create mode 100644 xorg-server-1.4/hw/kdrive/ati/ati_draw.h create mode 100644 xorg-server-1.4/hw/kdrive/ati/ati_microcode.c create mode 100644 xorg-server-1.4/hw/kdrive/ati/ati_reg.h create mode 100644 xorg-server-1.4/hw/kdrive/ati/ati_stub.c create mode 100644 xorg-server-1.4/hw/kdrive/ati/ati_video.c create mode 100644 xorg-server-1.4/hw/kdrive/ati/r128_composite.c create mode 100644 xorg-server-1.4/hw/kdrive/ati/radeon_composite.c create mode 100644 xorg-server-1.4/hw/kdrive/chips/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/chips/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/chips/chips.c create mode 100644 xorg-server-1.4/hw/kdrive/chips/chips.h create mode 100644 xorg-server-1.4/hw/kdrive/chips/chipsdraw.c create mode 100644 xorg-server-1.4/hw/kdrive/chips/chipsstub.c create mode 100644 xorg-server-1.4/hw/kdrive/ephyr/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/ephyr/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/ephyr/README create mode 100644 xorg-server-1.4/hw/kdrive/ephyr/ephyr.c create mode 100644 xorg-server-1.4/hw/kdrive/ephyr/ephyr.h create mode 100644 xorg-server-1.4/hw/kdrive/ephyr/ephyr_draw.c create mode 100644 xorg-server-1.4/hw/kdrive/ephyr/ephyrinit.c create mode 100644 xorg-server-1.4/hw/kdrive/ephyr/hostx.c create mode 100644 xorg-server-1.4/hw/kdrive/ephyr/hostx.h create mode 100644 xorg-server-1.4/hw/kdrive/ephyr/os.c create mode 100644 xorg-server-1.4/hw/kdrive/epson/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/epson/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/epson/epson13806.c create mode 100644 xorg-server-1.4/hw/kdrive/epson/epson13806.h create mode 100644 xorg-server-1.4/hw/kdrive/epson/epson13806draw.c create mode 100644 xorg-server-1.4/hw/kdrive/epson/epson13806draw.h create mode 100644 xorg-server-1.4/hw/kdrive/epson/epson13806reg.h create mode 100644 xorg-server-1.4/hw/kdrive/epson/epson13806stub.c create mode 100644 xorg-server-1.4/hw/kdrive/fake/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/fake/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/fake/fake.c create mode 100644 xorg-server-1.4/hw/kdrive/fake/fake.h create mode 100644 xorg-server-1.4/hw/kdrive/fake/fakeinit.c create mode 100644 xorg-server-1.4/hw/kdrive/fake/kbd.c create mode 100644 xorg-server-1.4/hw/kdrive/fake/mouse.c create mode 100644 xorg-server-1.4/hw/kdrive/fake/os.c create mode 100644 xorg-server-1.4/hw/kdrive/fbdev/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/fbdev/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/fbdev/fbdev.c create mode 100644 xorg-server-1.4/hw/kdrive/fbdev/fbdev.h create mode 100644 xorg-server-1.4/hw/kdrive/fbdev/fbinit.c create mode 100644 xorg-server-1.4/hw/kdrive/i810/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/i810/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/i810/i810.c create mode 100644 xorg-server-1.4/hw/kdrive/i810/i810.h create mode 100644 xorg-server-1.4/hw/kdrive/i810/i810_cursor.c create mode 100644 xorg-server-1.4/hw/kdrive/i810/i810_reg.h create mode 100644 xorg-server-1.4/hw/kdrive/i810/i810_video.c create mode 100644 xorg-server-1.4/hw/kdrive/i810/i810draw.c create mode 100644 xorg-server-1.4/hw/kdrive/i810/i810draw.h create mode 100644 xorg-server-1.4/hw/kdrive/i810/i810stub.c create mode 100644 xorg-server-1.4/hw/kdrive/linux/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/linux/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/linux/agp.c create mode 100644 xorg-server-1.4/hw/kdrive/linux/agp.h create mode 100644 xorg-server-1.4/hw/kdrive/linux/bus.c create mode 100644 xorg-server-1.4/hw/kdrive/linux/evdev.c create mode 100644 xorg-server-1.4/hw/kdrive/linux/keyboard.c create mode 100644 xorg-server-1.4/hw/kdrive/linux/klinux.h create mode 100644 xorg-server-1.4/hw/kdrive/linux/linux.c create mode 100644 xorg-server-1.4/hw/kdrive/linux/mouse.c create mode 100644 xorg-server-1.4/hw/kdrive/linux/ms.c create mode 100644 xorg-server-1.4/hw/kdrive/linux/ps2.c create mode 100644 xorg-server-1.4/hw/kdrive/linux/ts.c create mode 100644 xorg-server-1.4/hw/kdrive/linux/tslib.c create mode 100644 xorg-server-1.4/hw/kdrive/mach64/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/mach64/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/mach64/mach64.c create mode 100644 xorg-server-1.4/hw/kdrive/mach64/mach64.h create mode 100644 xorg-server-1.4/hw/kdrive/mach64/mach64draw.c create mode 100644 xorg-server-1.4/hw/kdrive/mach64/mach64draw.h create mode 100644 xorg-server-1.4/hw/kdrive/mach64/mach64stub.c create mode 100644 xorg-server-1.4/hw/kdrive/mach64/mach64video.c create mode 100644 xorg-server-1.4/hw/kdrive/mga/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/mga/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/mga/g400_common.h create mode 100644 xorg-server-1.4/hw/kdrive/mga/g400_composite.c create mode 100644 xorg-server-1.4/hw/kdrive/mga/mga.c create mode 100644 xorg-server-1.4/hw/kdrive/mga/mga.h create mode 100644 xorg-server-1.4/hw/kdrive/mga/mgadraw.c create mode 100644 xorg-server-1.4/hw/kdrive/mga/mgastub.c create mode 100644 xorg-server-1.4/hw/kdrive/neomagic/ChangeLog create mode 100644 xorg-server-1.4/hw/kdrive/neomagic/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/neomagic/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/neomagic/README create mode 100644 xorg-server-1.4/hw/kdrive/neomagic/neo_draw.c create mode 100644 xorg-server-1.4/hw/kdrive/neomagic/neomagic.c create mode 100644 xorg-server-1.4/hw/kdrive/neomagic/neomagic.h create mode 100644 xorg-server-1.4/hw/kdrive/neomagic/neomagicstub.c create mode 100644 xorg-server-1.4/hw/kdrive/nvidia/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/nvidia/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/nvidia/nvidia.c create mode 100644 xorg-server-1.4/hw/kdrive/nvidia/nvidia.h create mode 100644 xorg-server-1.4/hw/kdrive/nvidia/nvidiadraw.c create mode 100644 xorg-server-1.4/hw/kdrive/nvidia/nvidiadraw.h create mode 100644 xorg-server-1.4/hw/kdrive/nvidia/nvidiastub.c create mode 100644 xorg-server-1.4/hw/kdrive/pm2/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/pm2/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/pm2/glint_regs.h create mode 100644 xorg-server-1.4/hw/kdrive/pm2/pm2.c create mode 100644 xorg-server-1.4/hw/kdrive/pm2/pm2.h create mode 100644 xorg-server-1.4/hw/kdrive/pm2/pm2_draw.c create mode 100644 xorg-server-1.4/hw/kdrive/pm2/pm2stub.c create mode 100644 xorg-server-1.4/hw/kdrive/r128/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/r128/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/r128/r128.c create mode 100644 xorg-server-1.4/hw/kdrive/r128/r128.h create mode 100644 xorg-server-1.4/hw/kdrive/r128/r128draw.c create mode 100644 xorg-server-1.4/hw/kdrive/r128/r128stub.c create mode 100644 xorg-server-1.4/hw/kdrive/sdl/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/sdl/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/sdl/sdl.c create mode 100644 xorg-server-1.4/hw/kdrive/sis300/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/sis300/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/sis300/sis.c create mode 100644 xorg-server-1.4/hw/kdrive/sis300/sis.h create mode 100644 xorg-server-1.4/hw/kdrive/sis300/sis_draw.c create mode 100644 xorg-server-1.4/hw/kdrive/sis300/sis_reg.h create mode 100644 xorg-server-1.4/hw/kdrive/sis300/sis_stub.c create mode 100644 xorg-server-1.4/hw/kdrive/smi/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/smi/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/smi/smi.c create mode 100644 xorg-server-1.4/hw/kdrive/smi/smi.h create mode 100644 xorg-server-1.4/hw/kdrive/smi/smidraw.c create mode 100644 xorg-server-1.4/hw/kdrive/smi/smidraw.h create mode 100644 xorg-server-1.4/hw/kdrive/smi/smistub.c create mode 100644 xorg-server-1.4/hw/kdrive/src/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/src/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/src/fourcc.h create mode 100644 xorg-server-1.4/hw/kdrive/src/kaa.c create mode 100644 xorg-server-1.4/hw/kdrive/src/kaa.h create mode 100644 xorg-server-1.4/hw/kdrive/src/kaapict.c create mode 100644 xorg-server-1.4/hw/kdrive/src/kasync.c create mode 100644 xorg-server-1.4/hw/kdrive/src/kcmap.c create mode 100644 xorg-server-1.4/hw/kdrive/src/kcurscol.c create mode 100644 xorg-server-1.4/hw/kdrive/src/kdrive.c create mode 100644 xorg-server-1.4/hw/kdrive/src/kdrive.h create mode 100644 xorg-server-1.4/hw/kdrive/src/kinfo.c create mode 100644 xorg-server-1.4/hw/kdrive/src/kinput.c create mode 100644 xorg-server-1.4/hw/kdrive/src/kkeymap.c create mode 100644 xorg-server-1.4/hw/kdrive/src/kmap.c create mode 100644 xorg-server-1.4/hw/kdrive/src/kmode.c create mode 100644 xorg-server-1.4/hw/kdrive/src/knoop.c create mode 100644 xorg-server-1.4/hw/kdrive/src/koffscreen.c create mode 100644 xorg-server-1.4/hw/kdrive/src/kshadow.c create mode 100644 xorg-server-1.4/hw/kdrive/src/ktest.c create mode 100644 xorg-server-1.4/hw/kdrive/src/kxv.c create mode 100644 xorg-server-1.4/hw/kdrive/src/kxv.h create mode 100644 xorg-server-1.4/hw/kdrive/src/vga.c create mode 100644 xorg-server-1.4/hw/kdrive/src/vga.h create mode 100644 xorg-server-1.4/hw/kdrive/vesa/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/vesa/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/vesa/vbe.c create mode 100644 xorg-server-1.4/hw/kdrive/vesa/vbe.h create mode 100644 xorg-server-1.4/hw/kdrive/vesa/vesa.c create mode 100644 xorg-server-1.4/hw/kdrive/vesa/vesa.h create mode 100644 xorg-server-1.4/hw/kdrive/vesa/vesainit.c create mode 100644 xorg-server-1.4/hw/kdrive/vesa/vga.c create mode 100644 xorg-server-1.4/hw/kdrive/vesa/vga.h create mode 100644 xorg-server-1.4/hw/kdrive/vesa/vm86.c create mode 100644 xorg-server-1.4/hw/kdrive/vesa/vm86.h create mode 100644 xorg-server-1.4/hw/kdrive/via/Makefile.am create mode 100644 xorg-server-1.4/hw/kdrive/via/Makefile.in create mode 100644 xorg-server-1.4/hw/kdrive/via/via.c create mode 100644 xorg-server-1.4/hw/kdrive/via/via.h create mode 100644 xorg-server-1.4/hw/kdrive/via/via_regs.h create mode 100644 xorg-server-1.4/hw/kdrive/via/viadraw.c create mode 100644 xorg-server-1.4/hw/kdrive/via/viadraw.h create mode 100644 xorg-server-1.4/hw/kdrive/via/viastub.c create mode 100644 xorg-server-1.4/hw/vfb/InitInput.c create mode 100644 xorg-server-1.4/hw/vfb/InitOutput.c create mode 100644 xorg-server-1.4/hw/vfb/Makefile.am create mode 100644 xorg-server-1.4/hw/vfb/Makefile.in create mode 100644 xorg-server-1.4/hw/vfb/Xvfb.man.pre create mode 100644 xorg-server-1.4/hw/vfb/lk201kbd.h create mode 100644 xorg-server-1.4/hw/xfree86/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/Options create mode 100644 xorg-server-1.4/hw/xfree86/common/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/common/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/common/atKeynames.h create mode 100644 xorg-server-1.4/hw/xfree86/common/compiler.h create mode 100644 xorg-server-1.4/hw/xfree86/common/extramodes create mode 100644 xorg-server-1.4/hw/xfree86/common/fourcc.h create mode 100644 xorg-server-1.4/hw/xfree86/common/modeline2c.pl create mode 100644 xorg-server-1.4/hw/xfree86/common/scoasm.h create mode 100644 xorg-server-1.4/hw/xfree86/common/vesamodes create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86AutoConfig.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Build.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Build.h.in create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Bus.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Bus.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Config.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Config.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Configure.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Cursor.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86DGA.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86DPMS.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Date.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Debug.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86DefModes.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86DoProbe.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86DoScanPci.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Events.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Globals.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Helper.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86InPriv.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Init.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86MiscExt.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Mode.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Module.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Opt.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Option.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86PM.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86PciInfo.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Priv.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Privstr.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86RandR.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Resources.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Version.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Versions.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86VidMode.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86XKB.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Xinput.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86Xinput.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86cmap.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86cmap.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86cvt.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86fbBus.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86fbman.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86fbman.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86isaBus.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86noBus.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86pciBus.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86pciBus.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86sbusBus.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86sbusBus.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86str.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86xv.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86xv.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86xvmc.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86xvmc.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xf86xvpriv.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xisb.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xisb.h create mode 100644 xorg-server-1.4/hw/xfree86/common/xorgHelper.c create mode 100644 xorg-server-1.4/hw/xfree86/common/xorgVersion.h create mode 100644 xorg-server-1.4/hw/xfree86/ddc/DDC.HOWTO create mode 100644 xorg-server-1.4/hw/xfree86/ddc/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/ddc/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/ddc/ddcPriv.h create mode 100644 xorg-server-1.4/hw/xfree86/ddc/ddcProperty.c create mode 100644 xorg-server-1.4/hw/xfree86/ddc/edid.c create mode 100644 xorg-server-1.4/hw/xfree86/ddc/edid.h create mode 100644 xorg-server-1.4/hw/xfree86/ddc/interpret_edid.c create mode 100644 xorg-server-1.4/hw/xfree86/ddc/print_edid.c create mode 100644 xorg-server-1.4/hw/xfree86/ddc/xf86DDC.c create mode 100644 xorg-server-1.4/hw/xfree86/ddc/xf86DDC.h create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/GLcoremodule.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/afbmodule.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/cfb32module.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/cfbmodule.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/dbemodule.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/extmod/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/extmod/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/extmod/dgaproc.h create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/extmod/modinit.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/extmod/modinit.h create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/extmod/vidmodeproc.h create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/extmod/xf86dga.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/extmod/xf86dga2.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/extmod/xf86dgaext.h create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/extmod/xf86misc.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/extmod/xf86miscproc.h create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/extmod/xf86vmode.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/extmod/xvmod.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/extmod/xvmodproc.h create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/fbmodule.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/ftmodule.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/glxmodule.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/mfbmodule.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/recordmod.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/shmodule.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/type1mod.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/xf86XTrapModule.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/xkbKillSrv.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/xkbPrivate.c create mode 100644 xorg-server-1.4/hw/xfree86/dixmods/xkbVT.c create mode 100644 xorg-server-1.4/hw/xfree86/doc/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/doc/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/doc/README.DRI create mode 100644 xorg-server-1.4/hw/xfree86/doc/README.fonts create mode 100644 xorg-server-1.4/hw/xfree86/doc/README.rapidaccess create mode 100644 xorg-server-1.4/hw/xfree86/doc/devel/DebuggingHints create mode 100644 xorg-server-1.4/hw/xfree86/doc/devel/Domain.note create mode 100644 xorg-server-1.4/hw/xfree86/doc/devel/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/doc/devel/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/doc/devel/RAC.Notes create mode 100644 xorg-server-1.4/hw/xfree86/doc/devel/README.DRIcomp create mode 100644 xorg-server-1.4/hw/xfree86/doc/devel/Registry create mode 100644 xorg-server-1.4/hw/xfree86/doc/devel/exa-driver.txt create mode 100644 xorg-server-1.4/hw/xfree86/doc/man/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/doc/man/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/doc/man/Xorg.man.pre create mode 100644 xorg-server-1.4/hw/xfree86/doc/man/xorg.conf.man.pre create mode 100644 xorg-server-1.4/hw/xfree86/doc/sgml/DESIGN.sgml create mode 100644 xorg-server-1.4/hw/xfree86/doc/sgml/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/doc/sgml/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/dri/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/dri/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/dri/dri.c create mode 100644 xorg-server-1.4/hw/xfree86/dri/dri.h create mode 100644 xorg-server-1.4/hw/xfree86/dri/drimodule.c create mode 100644 xorg-server-1.4/hw/xfree86/dri/dristruct.h create mode 100644 xorg-server-1.4/hw/xfree86/dri/sarea.h create mode 100644 xorg-server-1.4/hw/xfree86/dri/xf86dri.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/README create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/dummylib.h create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/fatalerror.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/getemptypci.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/getvalidbios.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/logvwrite.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/pcitestmulti.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/verrorf.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/xalloc.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/xf86addrestolist.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/xf86allocscripi.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/xf86drvmsg.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/xf86drvmsgverb.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/xf86errorf.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/xf86errorfverb.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/xf86getpagesize.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/xf86getverb.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/xf86info.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/xf86msg.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/xf86msgverb.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/xf86opt.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/xf86screens.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/xf86servisinit.c create mode 100644 xorg-server-1.4/hw/xfree86/dummylib/xf86verbose.c create mode 100644 xorg-server-1.4/hw/xfree86/exa/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/exa/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/exa/exa.man.pre create mode 100644 xorg-server-1.4/hw/xfree86/exa/examodule.c create mode 100644 xorg-server-1.4/hw/xfree86/fbdevhw/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/fbdevhw/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/fbdevhw/README create mode 100644 xorg-server-1.4/hw/xfree86/fbdevhw/fbdevhw.c create mode 100644 xorg-server-1.4/hw/xfree86/fbdevhw/fbdevhw.h create mode 100644 xorg-server-1.4/hw/xfree86/fbdevhw/fbdevhw.man.pre create mode 100644 xorg-server-1.4/hw/xfree86/fbdevhw/fbdevhwstub.c create mode 100644 xorg-server-1.4/hw/xfree86/fbdevhw/fbpriv.h create mode 100644 xorg-server-1.4/hw/xfree86/i2c/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/i2c/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/i2c/bt829.c create mode 100644 xorg-server-1.4/hw/xfree86/i2c/bt829.h create mode 100644 xorg-server-1.4/hw/xfree86/i2c/bt829_module.c create mode 100644 xorg-server-1.4/hw/xfree86/i2c/fi1236.c create mode 100644 xorg-server-1.4/hw/xfree86/i2c/fi1236.h create mode 100644 xorg-server-1.4/hw/xfree86/i2c/fi1236_module.c create mode 100644 xorg-server-1.4/hw/xfree86/i2c/i2c_def.h create mode 100644 xorg-server-1.4/hw/xfree86/i2c/msp3430.c create mode 100644 xorg-server-1.4/hw/xfree86/i2c/msp3430.h create mode 100644 xorg-server-1.4/hw/xfree86/i2c/msp3430_module.c create mode 100644 xorg-server-1.4/hw/xfree86/i2c/tda8425.c create mode 100644 xorg-server-1.4/hw/xfree86/i2c/tda8425.h create mode 100644 xorg-server-1.4/hw/xfree86/i2c/tda8425_module.c create mode 100644 xorg-server-1.4/hw/xfree86/i2c/tda9850.c create mode 100644 xorg-server-1.4/hw/xfree86/i2c/tda9850.h create mode 100644 xorg-server-1.4/hw/xfree86/i2c/tda9850_module.c create mode 100644 xorg-server-1.4/hw/xfree86/i2c/tda9885.c create mode 100644 xorg-server-1.4/hw/xfree86/i2c/tda9885.h create mode 100644 xorg-server-1.4/hw/xfree86/i2c/tda9885_module.c create mode 100644 xorg-server-1.4/hw/xfree86/i2c/uda1380.c create mode 100644 xorg-server-1.4/hw/xfree86/i2c/uda1380.h create mode 100644 xorg-server-1.4/hw/xfree86/i2c/uda1380_module.c create mode 100644 xorg-server-1.4/hw/xfree86/i2c/xf86i2c.c create mode 100644 xorg-server-1.4/hw/xfree86/i2c/xf86i2c.h create mode 100644 xorg-server-1.4/hw/xfree86/int10/INT10.HOWTO create mode 100644 xorg-server-1.4/hw/xfree86/int10/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/int10/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/int10/generic.c create mode 100644 xorg-server-1.4/hw/xfree86/int10/helper_exec.c create mode 100644 xorg-server-1.4/hw/xfree86/int10/helper_mem.c create mode 100644 xorg-server-1.4/hw/xfree86/int10/pci.c create mode 100644 xorg-server-1.4/hw/xfree86/int10/stub.c create mode 100644 xorg-server-1.4/hw/xfree86/int10/x86emu.c create mode 100644 xorg-server-1.4/hw/xfree86/int10/xf86int10.c create mode 100644 xorg-server-1.4/hw/xfree86/int10/xf86int10.h create mode 100644 xorg-server-1.4/hw/xfree86/int10/xf86int10module.c create mode 100644 xorg-server-1.4/hw/xfree86/int10/xf86x86emu.c create mode 100644 xorg-server-1.4/hw/xfree86/int10/xf86x86emu.h create mode 100644 xorg-server-1.4/hw/xfree86/loader/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/loader/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/loader/SparcMulDiv.S create mode 100644 xorg-server-1.4/hw/xfree86/loader/dixsym.c create mode 100644 xorg-server-1.4/hw/xfree86/loader/dlloader.c create mode 100644 xorg-server-1.4/hw/xfree86/loader/dlloader.h create mode 100644 xorg-server-1.4/hw/xfree86/loader/extsym.c create mode 100644 xorg-server-1.4/hw/xfree86/loader/fontsym.c create mode 100644 xorg-server-1.4/hw/xfree86/loader/loader.c create mode 100644 xorg-server-1.4/hw/xfree86/loader/loader.h create mode 100644 xorg-server-1.4/hw/xfree86/loader/loaderProcs.h create mode 100644 xorg-server-1.4/hw/xfree86/loader/loadext.c create mode 100644 xorg-server-1.4/hw/xfree86/loader/loadfont.c create mode 100644 xorg-server-1.4/hw/xfree86/loader/loadmod.c create mode 100644 xorg-server-1.4/hw/xfree86/loader/misym.c create mode 100644 xorg-server-1.4/hw/xfree86/loader/os.c create mode 100644 xorg-server-1.4/hw/xfree86/loader/sym.h create mode 100644 xorg-server-1.4/hw/xfree86/loader/xf86sym.c create mode 100644 xorg-server-1.4/hw/xfree86/modes/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/modes/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/modes/xf86Crtc.c create mode 100644 xorg-server-1.4/hw/xfree86/modes/xf86Crtc.h create mode 100644 xorg-server-1.4/hw/xfree86/modes/xf86Cursors.c create mode 100644 xorg-server-1.4/hw/xfree86/modes/xf86DiDGA.c create mode 100644 xorg-server-1.4/hw/xfree86/modes/xf86EdidModes.c create mode 100644 xorg-server-1.4/hw/xfree86/modes/xf86Modes.c create mode 100644 xorg-server-1.4/hw/xfree86/modes/xf86Modes.h create mode 100644 xorg-server-1.4/hw/xfree86/modes/xf86RandR12.c create mode 100644 xorg-server-1.4/hw/xfree86/modes/xf86RandR12.h create mode 100644 xorg-server-1.4/hw/xfree86/modes/xf86Rename.h create mode 100644 xorg-server-1.4/hw/xfree86/modes/xf86Rotate.c create mode 100644 xorg-server-1.4/hw/xfree86/modes/xf86cvt.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/os-support/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/os-support/README.OS-lib create mode 100644 xorg-server-1.4/hw/xfree86/os-support/assyntax.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/alpha_video.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/arm_video.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/bsdResource.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/bsd_VTsw.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/bsd_apm.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/bsd_axp.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/bsd_bell.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/bsd_ev56.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/bsd_init.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/bsd_jstk.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/bsd_kmod.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/bsd_mouse.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/i386_video.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/libusb/data.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/libusb/descr.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/libusb/parse.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/libusb/usage.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/libusb/usb.3 create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/libusb/usb.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/libusb/usb_hid_usages create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/libusb/usbvar.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/memrange.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/ppc_video.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bsd/sparc64_video.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/460gxPCI.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/460gxPCI.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/Pci.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/Pci.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/Sbus.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/altixPCI.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/altixPCI.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/axpPci.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/e8870PCI.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/e8870PCI.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/freebsdPci.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/ix86Pci.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/linuxPci.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/netbsdPci.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/ppcPci.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/sparcPci.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/xf86Pci.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/xf86Sbus.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/zx1PCI.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/bus/zx1PCI.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/hurd/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/os-support/hurd/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/os-support/hurd/hurd_bell.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/hurd/hurd_init.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/hurd/hurd_mmap.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/hurd/hurd_mouse.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/hurd/hurd_video.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/int10Defines.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/int10/linux.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/lnx.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/lnxResource.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/lnx_acpi.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/lnx_agp.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/lnx_apm.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/lnx_axp.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/lnx_bell.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/lnx_ev56.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/lnx_font.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/lnx_ia64.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/lnx_init.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/lnx_jstk.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/lnx_kmod.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/lnx_mouse.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/lnx_pci.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/linux/lnx_video.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/lynxos/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/os-support/lynxos/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/os-support/lynxos/lynx_init.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/lynxos/lynx_mmap.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/lynxos/lynx_mouse.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/lynxos/lynx_noinline.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/lynxos/lynx_ppc.S create mode 100644 xorg-server-1.4/hw/xfree86/os-support/lynxos/lynx_ppc.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/lynxos/lynx_video.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/misc/BUSmemcpy.S create mode 100644 xorg-server-1.4/hw/xfree86/os-support/misc/BUSmemcpy.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/misc/Delay.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/misc/IODelay.S create mode 100644 xorg-server-1.4/hw/xfree86/os-support/misc/IODelay.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/misc/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/os-support/misc/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/os-support/misc/PortIO.S create mode 100644 xorg-server-1.4/hw/xfree86/os-support/misc/SlowBcopy.S create mode 100644 xorg-server-1.4/hw/xfree86/os-support/misc/SlowBcopy.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/misc/xf86_IlHack.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/misc/xf86_Util.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/sco/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/os-support/sco/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/os-support/sco/VTsw_sco.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/sco/sco_init.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/sco/sco_iop.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/sco/sco_mouse.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/sco/sco_video.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/VTsw_noop.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/VTsw_usl.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/agp_noop.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/bios_devmem.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/bios_mmap.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/ia64Pci.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/inout.S create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/ioperm_noop.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/kmod_noop.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/libc_wrapper.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/pm_noop.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/posix_tty.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/sigio.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/sigiostubs.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/stdPci.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/stdResource.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/vidmem.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/xf86Axp.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/shared/xf86Axp.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/solaris/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/os-support/solaris/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/os-support/solaris/agpgart.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/solaris/apSolaris.shar create mode 100644 xorg-server-1.4/hw/xfree86/os-support/solaris/solaris-amd64.S create mode 100644 xorg-server-1.4/hw/xfree86/os-support/solaris/solaris-ia32.S create mode 100644 xorg-server-1.4/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S create mode 100644 xorg-server-1.4/hw/xfree86/os-support/solaris/sun_agp.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/solaris/sun_apm.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/solaris/sun_bell.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/solaris/sun_bios.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/solaris/sun_init.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/solaris/sun_inout.s create mode 100644 xorg-server-1.4/hw/xfree86/os-support/solaris/sun_mouse.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/solaris/sun_vid.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/sysv/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/os-support/sysv/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/os-support/sysv/sysv_init.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/sysv/sysv_mouse.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/sysv/sysv_video.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/usl/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/os-support/usl/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/os-support/usl/usl_init.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/usl/usl_iop.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/usl/usl_mouse.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/usl/usl_video.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/usl/usl_vtsw.c create mode 100644 xorg-server-1.4/hw/xfree86/os-support/xf86OSmouse.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/xf86OSpriv.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/xf86_OSlib.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/xf86_OSproc.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/xf86_ansic.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/xf86_libc.h create mode 100644 xorg-server-1.4/hw/xfree86/os-support/xorgos.c create mode 100644 xorg-server-1.4/hw/xfree86/osandcommon.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/Configint.h create mode 100644 xorg-server-1.4/hw/xfree86/parser/DRI.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/Device.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/Extensions.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/Files.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/Flags.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/Input.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/Layout.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/parser/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/parser/Module.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/Monitor.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/Pointer.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/Screen.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/Vendor.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/Video.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/configProcs.h create mode 100644 xorg-server-1.4/hw/xfree86/parser/cpconfig.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/read.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/scan.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/write.c create mode 100644 xorg-server-1.4/hw/xfree86/parser/xf86Optrec.h create mode 100644 xorg-server-1.4/hw/xfree86/parser/xf86Parser.h create mode 100644 xorg-server-1.4/hw/xfree86/parser/xf86tokens.h create mode 100644 xorg-server-1.4/hw/xfree86/rac/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/rac/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/rac/xf86RAC.c create mode 100644 xorg-server-1.4/hw/xfree86/rac/xf86RAC.h create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/BT.c create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/BT.h create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/BTPriv.h create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/CURSOR.NOTES create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/IBM.c create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/IBM.h create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/IBMPriv.h create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/TI.c create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/TI.h create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/TIPriv.h create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/xf86BitOrder.c create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/xf86Cursor.c create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/xf86Cursor.h create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/xf86CursorPriv.h create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/xf86HWCurs.c create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/xf86RamDac.c create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/xf86RamDac.h create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/xf86RamDacCmap.c create mode 100644 xorg-server-1.4/hw/xfree86/ramdac/xf86RamDacPriv.h create mode 100644 xorg-server-1.4/hw/xfree86/scanpci/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/scanpci/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/scanpci/extrapci.ids create mode 100644 xorg-server-1.4/hw/xfree86/scanpci/pci.ids create mode 100644 xorg-server-1.4/hw/xfree86/scanpci/pciid2c.pl create mode 100644 xorg-server-1.4/hw/xfree86/scanpci/xf86PciData.c create mode 100644 xorg-server-1.4/hw/xfree86/scanpci/xf86PciData.h create mode 100644 xorg-server-1.4/hw/xfree86/scanpci/xf86PciIds.h create mode 100644 xorg-server-1.4/hw/xfree86/scanpci/xf86PciStdIds.h create mode 100644 xorg-server-1.4/hw/xfree86/scanpci/xf86PciStr.h create mode 100644 xorg-server-1.4/hw/xfree86/scanpci/xf86ScanPci.c create mode 100644 xorg-server-1.4/hw/xfree86/scanpci/xf86ScanPci.h create mode 100644 xorg-server-1.4/hw/xfree86/shadowfb/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/shadowfb/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/shadowfb/sfbmodule.c create mode 100644 xorg-server-1.4/hw/xfree86/shadowfb/shadow.c create mode 100644 xorg-server-1.4/hw/xfree86/shadowfb/shadowfb.h create mode 100644 xorg-server-1.4/hw/xfree86/utils/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/utils/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/utils/cvt/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/utils/cvt/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/utils/cvt/cvt.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/cvt/cvt.man.pre create mode 100644 xorg-server-1.4/hw/xfree86/utils/gtf/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/utils/gtf/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/utils/gtf/gtf.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/gtf/gtf.man.pre create mode 100644 xorg-server-1.4/hw/xfree86/utils/ioport/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/utils/ioport/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/utils/ioport/ioport.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/kbd_mode/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/utils/kbd_mode/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/utils/kbd_mode/bsd-kbd_mode.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/kbd_mode/bsd-kbd_mode.man.pre create mode 100644 xorg-server-1.4/hw/xfree86/utils/kbd_mode/sun-kbd_mode.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/kbd_mode/sun-kbd_mode.man.pre create mode 100644 xorg-server-1.4/hw/xfree86/utils/pcitweak/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/utils/pcitweak/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/utils/pcitweak/pcitweak.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/pcitweak/pcitweak.man.pre create mode 100644 xorg-server-1.4/hw/xfree86/utils/scanpci/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/utils/scanpci/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/utils/scanpci/scanpci.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/scanpci/scanpci.man.pre create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/TODO create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/XOrgCfg.pre create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/accessx.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/card-cfg.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/card-cfg.h create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/card.xbm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/card.xpm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/cards.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/cards.h create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/computer.xpm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/config.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/config.h create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/down.xbm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/expert.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/help.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/help.h create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/interface.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/keyboard-cfg.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/keyboard-cfg.h create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/keyboard.xbm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/keyboard.xpm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/left.xbm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/loader.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/loader.h create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/loadmod.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/monitor-cfg.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/monitor-cfg.h create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/monitor.xbm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/monitor.xpm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/mouse-cfg.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/mouse-cfg.h create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/mouse.xbm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/mouse.xpm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/narrower.xbm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/options.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/options.h create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/right.xbm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/screen-cfg.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/screen-cfg.h create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/screen.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/screen.h create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/shorter.xbm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/startx.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/stubs.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/stubs.h create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/taller.xbm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/text-mode.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/up.xbm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/vidmode.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/vidmode.h create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/wider.xbm create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/xf86config.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/xf86config.h create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgcfg/xorgcfg.man.pre create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgconfig/Cards create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgconfig/Cards98 create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgconfig/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgconfig/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgconfig/cards.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgconfig/cards.h create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgconfig/xorgconfig.c create mode 100644 xorg-server-1.4/hw/xfree86/utils/xorgconfig/xorgconfig.man.pre create mode 100644 xorg-server-1.4/hw/xfree86/vbe/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/vbe/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/vbe/vbe.c create mode 100644 xorg-server-1.4/hw/xfree86/vbe/vbe.h create mode 100644 xorg-server-1.4/hw/xfree86/vbe/vbeModes.c create mode 100644 xorg-server-1.4/hw/xfree86/vbe/vbeModes.h create mode 100644 xorg-server-1.4/hw/xfree86/vbe/vbe_module.c create mode 100644 xorg-server-1.4/hw/xfree86/vgahw/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/vgahw/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/vgahw/vgaCmap.c create mode 100644 xorg-server-1.4/hw/xfree86/vgahw/vgaHW.c create mode 100644 xorg-server-1.4/hw/xfree86/vgahw/vgaHW.h create mode 100644 xorg-server-1.4/hw/xfree86/vgahw/vgaHWmodule.c create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/debug.c create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/decode.c create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/fpu.c create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/ops.c create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/ops2.c create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/prim_ops.c create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/sys.c create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/validate.c create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/x86emu.h create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/x86emu/debug.h create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/x86emu/decode.h create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/x86emu/fpu.h create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/x86emu/fpu_regs.h create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/x86emu/ops.h create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/x86emu/prim_asm.h create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/x86emu/prim_ops.h create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/x86emu/regs.h create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/x86emu/types.h create mode 100644 xorg-server-1.4/hw/xfree86/x86emu/x86emu/x86emui.h create mode 100644 xorg-server-1.4/hw/xfree86/xaa/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/xaa/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/xaa/XAA.HOWTO create mode 100644 xorg-server-1.4/hw/xfree86/xaa/l-xaaBitmap.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/l-xaaStipple.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/l-xaaTEGlyph.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/l3-xaaBitmap.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/l3-xaaStipple.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/lf-xaaBitmap.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/lf-xaaStipple.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/lf-xaaTEGlyph.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/lf3-xaaBitmap.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/lf3-xaaStipple.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/m-xaaBitmap.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/m-xaaStipple.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/m-xaaTEGlyph.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/m3-xaaBitmap.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/m3-xaaStipple.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/mf-xaaBitmap.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/mf-xaaStipple.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/mf-xaaTEGlyph.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/mf3-xaaBitmap.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/mf3-xaaStipple.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/s-xaaDashLine.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/s-xaaLine.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaa.h create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaBitBlt.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaBitOrder.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaBitmap.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaCpyArea.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaCpyPlane.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaCpyWin.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaDashLine.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaFallback.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaFillArc.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaFillPoly.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaFillRect.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaGC.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaGCmisc.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaImage.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaInit.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaInitAccel.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaLine.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaLineMisc.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaNonTEGlyph.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaNonTEText.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaOffscreen.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaOverlay.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaOverlayDF.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaPCache.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaPaintWin.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaPict.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaROP.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaRect.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaSpans.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaStateChange.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaStipple.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaTEGlyph.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaTEGlyphBlt.S create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaTEText.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaTables.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaWideLine.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaWrapper.c create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaaWrapper.h create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaacexp.h create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaalocal.h create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaarop.h create mode 100644 xorg-server-1.4/hw/xfree86/xaa/xaawrap.h create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/maskbits.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbbitblt.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbbltC.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbbltCI.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbbltG.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbbltO.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbbltX.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbbres.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbbresd.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbbstore.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbclip.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbcmap.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbfillarc.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbfillrct.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbfillsp.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbfont.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbgc.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbgetsp.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbhrzvert.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbigbblak.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbigbwht.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbimage.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbline.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbmap.h create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbmap.sh create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbmisc.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbmodule.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbpablack.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbpainv.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbpawhite.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbpgbblak.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbpgbinv.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbpgbwht.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbpixmap.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbplyblack.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbplyinv.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbplywhite.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbpntwin.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbpolypnt.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbpushpxl.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbscrclse.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbscrinit.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbseg.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbsetsp.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbteblack.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbtewhite.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbtileC.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbtileG.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbunmap.h create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbunmap.sh create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbwindow.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/mfbzerarc.c create mode 100644 xorg-server-1.4/hw/xfree86/xf1bpp/xf1bpp.h create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/NOTES create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/OScompiler.h create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/emulOpStip.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/emulRepAre.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/emulTile.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ibmTrace.h create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/mfbbres.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/mfbbresd.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/mfbfillarc.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/mfbhrzvert.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/mfbimggblt.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/mfbline.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/mfbseg.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/mfbzerarc.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/offscreen.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcArea.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcBStore.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcCReduce.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcClip.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcCpArea.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcDepth.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcFillRct.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcGC.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcGCstr.h create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcGetSp.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcIO.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcImg.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcPixFS.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcPixmap.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcPntWin.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcPolyPnt.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcQuery.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcRslvC.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcSetSp.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcSpMcro.h create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcWinFS.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/ppcWindow.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/vgaBitBlt.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/vgaGC.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/vgaImages.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/vgaReg.h create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/vgaSolid.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/vgaStipple.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/vgaVideo.h create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/vgamodule.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/wm3.c create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/wm3.h create mode 100644 xorg-server-1.4/hw/xfree86/xf4bpp/xf4bpp.h create mode 100644 xorg-server-1.4/hw/xfree86/xf8_16bpp/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/xf8_16bpp/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/xf8_16bpp/cfb8_16.h create mode 100644 xorg-server-1.4/hw/xfree86/xf8_16bpp/xf8_16module.c create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/Makefile.am create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/Makefile.in create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/cfb8_32.h create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/cfb8_32module.c create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbbstore.c create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbcpyarea.c create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbcpyplane.c create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbgc.c create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbgc32.c create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbgc8.c create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbgcmisc.c create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbgcunder.c create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbimage.c create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbpntwin.c create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbscrinit.c create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/cfbwindow.c create mode 100644 xorg-server-1.4/hw/xfree86/xf8_32bpp/xf86overlay.c create mode 100644 xorg-server-1.4/hw/xfree86/xorg.c create mode 100644 xorg-server-1.4/hw/xfree86/xorgconf.cpp create mode 100644 xorg-server-1.4/hw/xgl/Makefile.am create mode 100644 xorg-server-1.4/hw/xgl/Makefile.in create mode 100644 xorg-server-1.4/hw/xgl/egl/Makefile.am create mode 100644 xorg-server-1.4/hw/xgl/egl/Makefile.in create mode 100644 xorg-server-1.4/hw/xgl/egl/evdev.c create mode 100644 xorg-server-1.4/hw/xgl/egl/kinput.c create mode 100644 xorg-server-1.4/hw/xgl/egl/kkeymap.h create mode 100644 xorg-server-1.4/hw/xgl/egl/module/Makefile.am create mode 100644 xorg-server-1.4/hw/xgl/egl/module/Makefile.in create mode 100644 xorg-server-1.4/hw/xgl/egl/module/xeglmodule.c create mode 100644 xorg-server-1.4/hw/xgl/egl/xegl.c create mode 100644 xorg-server-1.4/hw/xgl/egl/xegl.h create mode 100644 xorg-server-1.4/hw/xgl/egl/xeglinit.c create mode 100644 xorg-server-1.4/hw/xgl/egl/xeglinput.c create mode 100644 xorg-server-1.4/hw/xgl/glx/Makefile.am create mode 100644 xorg-server-1.4/hw/xgl/glx/Makefile.in create mode 100644 xorg-server-1.4/hw/xgl/glx/module/Makefile.am create mode 100644 xorg-server-1.4/hw/xgl/glx/module/Makefile.in create mode 100644 xorg-server-1.4/hw/xgl/glx/module/xglxmodule.c create mode 100644 xorg-server-1.4/hw/xgl/glx/xglx.c create mode 100644 xorg-server-1.4/hw/xgl/glx/xglx.h create mode 100644 xorg-server-1.4/hw/xgl/glx/xglxorg.c create mode 100644 xorg-server-1.4/hw/xgl/glxext/Makefile.am create mode 100644 xorg-server-1.4/hw/xgl/glxext/Makefile.in create mode 100644 xorg-server-1.4/hw/xgl/glxext/module/Makefile.am create mode 100644 xorg-server-1.4/hw/xgl/glxext/module/Makefile.in create mode 100644 xorg-server-1.4/hw/xgl/glxext/module/glcoremodule.c create mode 100644 xorg-server-1.4/hw/xgl/glxext/module/glxmodule.c create mode 100644 xorg-server-1.4/hw/xgl/glxext/xglglxext.c create mode 100644 xorg-server-1.4/hw/xgl/glxext/xglglxext.h create mode 100644 xorg-server-1.4/hw/xgl/glxext/xglglxlog.c create mode 100644 xorg-server-1.4/hw/xgl/xgl.h create mode 100644 xorg-server-1.4/hw/xgl/xglarea.c create mode 100644 xorg-server-1.4/hw/xgl/xglbstore.c create mode 100644 xorg-server-1.4/hw/xgl/xglcmap.c create mode 100644 xorg-server-1.4/hw/xgl/xglcompose.c create mode 100644 xorg-server-1.4/hw/xgl/xglcopy.c create mode 100644 xorg-server-1.4/hw/xgl/xglfill.c create mode 100644 xorg-server-1.4/hw/xgl/xglgc.c create mode 100644 xorg-server-1.4/hw/xgl/xglgeometry.c create mode 100644 xorg-server-1.4/hw/xgl/xglget.c create mode 100644 xorg-server-1.4/hw/xgl/xglglx.c create mode 100644 xorg-server-1.4/hw/xgl/xglglx.h create mode 100644 xorg-server-1.4/hw/xgl/xglglyph.c create mode 100644 xorg-server-1.4/hw/xgl/xglhash.c create mode 100644 xorg-server-1.4/hw/xgl/xglinit.c create mode 100644 xorg-server-1.4/hw/xgl/xglinput.c create mode 100644 xorg-server-1.4/hw/xgl/xglloader.c create mode 100644 xorg-server-1.4/hw/xgl/xglmodule.h create mode 100644 xorg-server-1.4/hw/xgl/xgloutput.c create mode 100644 xorg-server-1.4/hw/xgl/xglparse.c create mode 100644 xorg-server-1.4/hw/xgl/xglpict.c create mode 100644 xorg-server-1.4/hw/xgl/xglpixmap.c create mode 100644 xorg-server-1.4/hw/xgl/xglscreen.c create mode 100644 xorg-server-1.4/hw/xgl/xglshm.c create mode 100644 xorg-server-1.4/hw/xgl/xglsolid.c create mode 100644 xorg-server-1.4/hw/xgl/xglsync.c create mode 100644 xorg-server-1.4/hw/xgl/xgltile.c create mode 100644 xorg-server-1.4/hw/xgl/xgltrap.c create mode 100644 xorg-server-1.4/hw/xgl/xglwindow.c create mode 100644 xorg-server-1.4/hw/xgl/xglxv.c create mode 100644 xorg-server-1.4/hw/xnest/Args.c create mode 100644 xorg-server-1.4/hw/xnest/Args.h create mode 100644 xorg-server-1.4/hw/xnest/Color.c create mode 100644 xorg-server-1.4/hw/xnest/Color.h create mode 100644 xorg-server-1.4/hw/xnest/Cursor.c create mode 100644 xorg-server-1.4/hw/xnest/Display.c create mode 100644 xorg-server-1.4/hw/xnest/Display.h create mode 100644 xorg-server-1.4/hw/xnest/Drawable.h create mode 100644 xorg-server-1.4/hw/xnest/Events.c create mode 100644 xorg-server-1.4/hw/xnest/Events.h create mode 100644 xorg-server-1.4/hw/xnest/Font.c create mode 100644 xorg-server-1.4/hw/xnest/GC.c create mode 100644 xorg-server-1.4/hw/xnest/GCOps.c create mode 100644 xorg-server-1.4/hw/xnest/GCOps.h create mode 100644 xorg-server-1.4/hw/xnest/Handlers.c create mode 100644 xorg-server-1.4/hw/xnest/Handlers.h create mode 100644 xorg-server-1.4/hw/xnest/Init.c create mode 100644 xorg-server-1.4/hw/xnest/Init.h create mode 100644 xorg-server-1.4/hw/xnest/Keyboard.c create mode 100644 xorg-server-1.4/hw/xnest/Keyboard.h create mode 100644 xorg-server-1.4/hw/xnest/Makefile.am create mode 100644 xorg-server-1.4/hw/xnest/Makefile.in create mode 100644 xorg-server-1.4/hw/xnest/Pixmap.c create mode 100644 xorg-server-1.4/hw/xnest/Pointer.c create mode 100644 xorg-server-1.4/hw/xnest/Pointer.h create mode 100644 xorg-server-1.4/hw/xnest/Screen.c create mode 100644 xorg-server-1.4/hw/xnest/Screen.h create mode 100644 xorg-server-1.4/hw/xnest/Visual.c create mode 100644 xorg-server-1.4/hw/xnest/Visual.h create mode 100644 xorg-server-1.4/hw/xnest/Window.c create mode 100644 xorg-server-1.4/hw/xnest/XNCursor.h create mode 100644 xorg-server-1.4/hw/xnest/XNFont.h create mode 100644 xorg-server-1.4/hw/xnest/XNGC.h create mode 100644 xorg-server-1.4/hw/xnest/XNPixmap.h create mode 100644 xorg-server-1.4/hw/xnest/XNWindow.h create mode 100644 xorg-server-1.4/hw/xnest/Xnest.h create mode 100644 xorg-server-1.4/hw/xnest/Xnest.man.pre create mode 100644 xorg-server-1.4/hw/xnest/icon create mode 100644 xorg-server-1.4/hw/xnest/screensaver create mode 100644 xorg-server-1.4/hw/xnest/xnest-config.h create mode 100644 xorg-server-1.4/hw/xprint/AttrValid.c create mode 100644 xorg-server-1.4/hw/xprint/AttrValid.h create mode 100644 xorg-server-1.4/hw/xprint/DiPrint.h create mode 100644 xorg-server-1.4/hw/xprint/Init.c create mode 100644 xorg-server-1.4/hw/xprint/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/Oid.c create mode 100644 xorg-server-1.4/hw/xprint/Oid.h create mode 100644 xorg-server-1.4/hw/xprint/OidDefs.h create mode 100644 xorg-server-1.4/hw/xprint/OidStrs.h create mode 100644 xorg-server-1.4/hw/xprint/Util.c create mode 100644 xorg-server-1.4/hw/xprint/ValTree.c create mode 100644 xorg-server-1.4/hw/xprint/attributes.c create mode 100644 xorg-server-1.4/hw/xprint/attributes.h create mode 100644 xorg-server-1.4/hw/xprint/config/C/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/Xprinters create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/attributes/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/attributes/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/attributes/document create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/attributes/job create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/attributes/printer create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/ddx-config/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/ddx-config/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/ddx-config/raster/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/ddx-config/raster/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/ddx-config/raster/pcl create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/ddx-config/raster/postscript create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/CANONBJ10E-GS/model-config create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/CANONC3200-PS/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/CANONC3200-PS/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/CANONC3200-PS/model-config create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/GSdefault/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/GSdefault/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/GSdefault/model-config create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00051.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00052.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00053.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00054.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00055.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00056.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00057.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00058.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00059.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00060.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00061.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00062.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00063.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00064.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00065.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00066.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00067.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00068.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00069.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00070.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00071.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00072.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00073.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00074.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00075.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00076.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00077.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00079.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00080.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00081.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00082.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00083.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00084.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00085.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00086.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00087.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00088.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00089.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00090.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00091.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00092.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00093.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00094.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/README create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/fonts.alias create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/fonts.dir create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/fonts/lpr0ye1a.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPDJ1600C/model-config create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4050-PS/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4050-PS/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4050-PS/model-config create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00051.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00052.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00053.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00054.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00055.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00056.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00057.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00058.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00059.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00060.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00061.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00062.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00063.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00064.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00065.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00066.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00067.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00068.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00069.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00070.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00071.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00072.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00073.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00074.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00075.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00076.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00077.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00079.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00080.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00081.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00082.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00083.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00084.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00085.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00086.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00087.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00088.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00089.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00090.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00091.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00092.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00093.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00094.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/README create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/fonts.alias create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/fonts.dir create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/fonts/lpr0ye1a.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/HPLJ4family/model-config create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/model-config create mode 100755 xorg-server-1.4/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/ps2pdf_spooltodir.sh create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Book.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-BookOblique.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Demi.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-DemiOblique.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-Bold.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-BoldOblique.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-Oblique.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Courier.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Bold.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-BoldOblique.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Oblique.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-Book.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-BookOblique.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-Demi.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-DemiOblique.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Bold.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-BoldItal.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Ital.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Roman.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Demi.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-DemiItalic.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Light.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-LightItalic.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Symbol.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Bold.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Times-BoldItalic.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Italic.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Roman.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/fonts/ZapfDingbats.pmf create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSdefault/model-config create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSspooldir/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSspooldir/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/PSspooldir/model-config create mode 100755 xorg-server-1.4/hw/xprint/config/C/print/models/PSspooldir/spooltodir.sh create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/SPSPARC2/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/SPSPARC2/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/C/print/models/SPSPARC2/model-config create mode 100644 xorg-server-1.4/hw/xprint/config/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/README create mode 100644 xorg-server-1.4/hw/xprint/config/en_US/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/en_US/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/en_US/print/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/en_US/print/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/en_US/print/attributes/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/config/en_US/print/attributes/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/config/en_US/print/attributes/document create mode 100644 xorg-server-1.4/hw/xprint/ddxInit.c create mode 100644 xorg-server-1.4/hw/xprint/doc/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/doc/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/doc/Xprt.html create mode 100644 xorg-server-1.4/hw/xprint/doc/Xprt.man.pre create mode 100644 xorg-server-1.4/hw/xprint/doc/Xprt.sgml create mode 100644 xorg-server-1.4/hw/xprint/dpmsstubs-wrapper.c create mode 100644 xorg-server-1.4/hw/xprint/etc/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/etc/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/etc/Xsession.d/92xprint-xpserverlist create mode 100644 xorg-server-1.4/hw/xprint/etc/Xsession.d/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/etc/Xsession.d/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/etc/init.d/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/etc/init.d/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/etc/init.d/xprint.cpp create mode 100644 xorg-server-1.4/hw/xprint/etc/profile.d/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/etc/profile.d/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/etc/profile.d/xprint.csh create mode 100644 xorg-server-1.4/hw/xprint/etc/profile.d/xprint.sh create mode 100644 xorg-server-1.4/hw/xprint/mediaSizes.c create mode 100644 xorg-server-1.4/hw/xprint/miinitext-wrapper.c create mode 100644 xorg-server-1.4/hw/xprint/pcl-mono/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/pcl-mono/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/pcl/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/pcl/Makefile.am.inc create mode 100644 xorg-server-1.4/hw/xprint/pcl/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/pcl/Pcl.h create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclArc.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclArea.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclAttVal.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclAttr.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclColor.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclCursor.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclDef.h create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclFonts.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclGC.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclInit.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclLine.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclMisc.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclPixel.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclPolygon.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclPrint.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclSFonts.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclSFonts.h create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclSpans.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclText.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/PclWindow.c create mode 100644 xorg-server-1.4/hw/xprint/pcl/Pclmap.h create mode 100644 xorg-server-1.4/hw/xprint/ps/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/ps/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/ps/Ps.h create mode 100644 xorg-server-1.4/hw/xprint/ps/PsArc.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsArea.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsAttVal.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsAttr.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsCache.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsColor.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsDef.h create mode 100644 xorg-server-1.4/hw/xprint/ps/PsFTFonts.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsFonts.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsGC.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsImageUtil.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsInit.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsLine.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsMisc.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsPixel.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsPixmap.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsPolygon.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsPrint.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsSpans.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsText.c create mode 100644 xorg-server-1.4/hw/xprint/ps/PsWindow.c create mode 100644 xorg-server-1.4/hw/xprint/ps/psout.c create mode 100644 xorg-server-1.4/hw/xprint/ps/psout.h create mode 100644 xorg-server-1.4/hw/xprint/ps/psout_ft.c create mode 100644 xorg-server-1.4/hw/xprint/ps/psout_ftpstype1.c create mode 100644 xorg-server-1.4/hw/xprint/ps/psout_ftpstype3.c create mode 100644 xorg-server-1.4/hw/xprint/ps/ttf2pt1wrap.c create mode 100644 xorg-server-1.4/hw/xprint/raster/Makefile.am create mode 100644 xorg-server-1.4/hw/xprint/raster/Makefile.in create mode 100644 xorg-server-1.4/hw/xprint/raster/Raster.c create mode 100644 xorg-server-1.4/hw/xprint/raster/Raster.h create mode 100644 xorg-server-1.4/hw/xprint/raster/RasterAttVal.c create mode 100644 xorg-server-1.4/hw/xprint/spooler.c create mode 100644 xorg-server-1.4/hw/xprint/spooler.h create mode 100644 xorg-server-1.4/hw/xwin/ChangeLog create mode 100644 xorg-server-1.4/hw/xwin/InitInput.c create mode 100644 xorg-server-1.4/hw/xwin/InitOutput.c create mode 100644 xorg-server-1.4/hw/xwin/Makefile.am create mode 100644 xorg-server-1.4/hw/xwin/Makefile.in create mode 100644 xorg-server-1.4/hw/xwin/README create mode 100755 xorg-server-1.4/hw/xwin/X-boxed.ico create mode 100644 xorg-server-1.4/hw/xwin/X.ico create mode 100644 xorg-server-1.4/hw/xwin/XWin.man create mode 100644 xorg-server-1.4/hw/xwin/XWin.rc create mode 100755 xorg-server-1.4/hw/xwin/XWinrc.man create mode 100644 xorg-server-1.4/hw/xwin/_usr_X11R6_lib_X11_system.XWinrc create mode 100644 xorg-server-1.4/hw/xwin/ddraw.h create mode 100644 xorg-server-1.4/hw/xwin/win.h create mode 100644 xorg-server-1.4/hw/xwin/winallpriv.c create mode 100644 xorg-server-1.4/hw/xwin/winauth.c create mode 100644 xorg-server-1.4/hw/xwin/winblock.c create mode 100644 xorg-server-1.4/hw/xwin/winclip.c create mode 100644 xorg-server-1.4/hw/xwin/winclipboard.h create mode 100644 xorg-server-1.4/hw/xwin/winclipboardinit.c create mode 100644 xorg-server-1.4/hw/xwin/winclipboardtextconv.c create mode 100644 xorg-server-1.4/hw/xwin/winclipboardthread.c create mode 100644 xorg-server-1.4/hw/xwin/winclipboardunicode.c create mode 100644 xorg-server-1.4/hw/xwin/winclipboardwndproc.c create mode 100755 xorg-server-1.4/hw/xwin/winclipboardwrappers.c create mode 100644 xorg-server-1.4/hw/xwin/winclipboardxevents.c create mode 100644 xorg-server-1.4/hw/xwin/wincmap.c create mode 100644 xorg-server-1.4/hw/xwin/winconfig.c create mode 100644 xorg-server-1.4/hw/xwin/winconfig.h create mode 100644 xorg-server-1.4/hw/xwin/wincreatewnd.c create mode 100644 xorg-server-1.4/hw/xwin/wincursor.c create mode 100755 xorg-server-1.4/hw/xwin/windialogs.c create mode 100644 xorg-server-1.4/hw/xwin/winengine.c create mode 100644 xorg-server-1.4/hw/xwin/winerror.c create mode 100644 xorg-server-1.4/hw/xwin/winfillsp.c create mode 100644 xorg-server-1.4/hw/xwin/winfont.c create mode 100644 xorg-server-1.4/hw/xwin/wingc.c create mode 100644 xorg-server-1.4/hw/xwin/wingetsp.c create mode 100644 xorg-server-1.4/hw/xwin/winglobals.c create mode 100644 xorg-server-1.4/hw/xwin/winkeybd.c create mode 100644 xorg-server-1.4/hw/xwin/winkeybd.h create mode 100755 xorg-server-1.4/hw/xwin/winkeyhook.c create mode 100644 xorg-server-1.4/hw/xwin/winkeymap.h create mode 100644 xorg-server-1.4/hw/xwin/winkeynames.h create mode 100644 xorg-server-1.4/hw/xwin/winlayouts.h create mode 100755 xorg-server-1.4/hw/xwin/winmessages.h create mode 100644 xorg-server-1.4/hw/xwin/winmisc.c create mode 100644 xorg-server-1.4/hw/xwin/winmouse.c create mode 100644 xorg-server-1.4/hw/xwin/winms.h create mode 100644 xorg-server-1.4/hw/xwin/winmsg.c create mode 100644 xorg-server-1.4/hw/xwin/winmsg.h create mode 100755 xorg-server-1.4/hw/xwin/winmultiwindowclass.c create mode 100755 xorg-server-1.4/hw/xwin/winmultiwindowclass.h create mode 100644 xorg-server-1.4/hw/xwin/winmultiwindowicons.c create mode 100644 xorg-server-1.4/hw/xwin/winmultiwindowshape.c create mode 100644 xorg-server-1.4/hw/xwin/winmultiwindowwindow.c create mode 100644 xorg-server-1.4/hw/xwin/winmultiwindowwm.c create mode 100644 xorg-server-1.4/hw/xwin/winmultiwindowwndproc.c create mode 100644 xorg-server-1.4/hw/xwin/winnativegdi.c create mode 100644 xorg-server-1.4/hw/xwin/winpfbdd.c create mode 100644 xorg-server-1.4/hw/xwin/winpixmap.c create mode 100644 xorg-server-1.4/hw/xwin/winpntwin.c create mode 100644 xorg-server-1.4/hw/xwin/winpolyline.c create mode 100644 xorg-server-1.4/hw/xwin/winprefs.c create mode 100644 xorg-server-1.4/hw/xwin/winprefs.h create mode 100644 xorg-server-1.4/hw/xwin/winprefslex.c create mode 100644 xorg-server-1.4/hw/xwin/winprefslex.l create mode 100644 xorg-server-1.4/hw/xwin/winprefsyacc.c create mode 100644 xorg-server-1.4/hw/xwin/winprefsyacc.h create mode 100644 xorg-server-1.4/hw/xwin/winprefsyacc.y create mode 100644 xorg-server-1.4/hw/xwin/winpriv.c create mode 100644 xorg-server-1.4/hw/xwin/winpriv.h create mode 100755 xorg-server-1.4/hw/xwin/winprocarg.c create mode 100644 xorg-server-1.4/hw/xwin/winpushpxl.c create mode 100755 xorg-server-1.4/hw/xwin/winrandr.c create mode 100644 xorg-server-1.4/hw/xwin/winregistry.c create mode 100644 xorg-server-1.4/hw/xwin/winresource.h create mode 100644 xorg-server-1.4/hw/xwin/winrop.c create mode 100644 xorg-server-1.4/hw/xwin/winscrinit.c create mode 100644 xorg-server-1.4/hw/xwin/winsetsp.c create mode 100644 xorg-server-1.4/hw/xwin/winshaddd.c create mode 100644 xorg-server-1.4/hw/xwin/winshadddnl.c create mode 100644 xorg-server-1.4/hw/xwin/winshadgdi.c create mode 100755 xorg-server-1.4/hw/xwin/wintrayicon.c create mode 100755 xorg-server-1.4/hw/xwin/winvalargs.c create mode 100755 xorg-server-1.4/hw/xwin/winvideo.c create mode 100644 xorg-server-1.4/hw/xwin/winwakeup.c create mode 100755 xorg-server-1.4/hw/xwin/winwin32rootless.c create mode 100755 xorg-server-1.4/hw/xwin/winwin32rootlesswindow.c create mode 100755 xorg-server-1.4/hw/xwin/winwin32rootlesswndproc.c create mode 100644 xorg-server-1.4/hw/xwin/winwindow.c create mode 100644 xorg-server-1.4/hw/xwin/winwindow.h create mode 100755 xorg-server-1.4/hw/xwin/winwindowswm.c create mode 100644 xorg-server-1.4/hw/xwin/winwndproc.c create mode 100755 xorg-server-1.4/hw/xwin/xlaunch/COPYING create mode 100644 xorg-server-1.4/hw/xwin/xlaunch/config.cc create mode 100755 xorg-server-1.4/hw/xwin/xlaunch/main.cc create mode 100755 xorg-server-1.4/hw/xwin/xlaunch/resources/dialog.rc create mode 100755 xorg-server-1.4/hw/xwin/xlaunch/resources/fullscreen.bmp create mode 100755 xorg-server-1.4/hw/xwin/xlaunch/resources/images.rc create mode 100755 xorg-server-1.4/hw/xwin/xlaunch/resources/multiwindow.bmp create mode 100755 xorg-server-1.4/hw/xwin/xlaunch/resources/nodecoration.bmp create mode 100755 xorg-server-1.4/hw/xwin/xlaunch/resources/resources.h create mode 100755 xorg-server-1.4/hw/xwin/xlaunch/resources/resources.rc create mode 100644 xorg-server-1.4/hw/xwin/xlaunch/resources/strings.rc create mode 100755 xorg-server-1.4/hw/xwin/xlaunch/resources/windowed.bmp create mode 100755 xorg-server-1.4/hw/xwin/xlaunch/window/dialog.cc create mode 100755 xorg-server-1.4/hw/xwin/xlaunch/window/dialog.h create mode 100644 xorg-server-1.4/hw/xwin/xlaunch/window/util.cc create mode 100644 xorg-server-1.4/hw/xwin/xlaunch/window/util.h create mode 100755 xorg-server-1.4/hw/xwin/xlaunch/window/window.cc create mode 100755 xorg-server-1.4/hw/xwin/xlaunch/window/window.h create mode 100755 xorg-server-1.4/hw/xwin/xlaunch/window/wizard.cc create mode 100755 xorg-server-1.4/hw/xwin/xlaunch/window/wizard.h create mode 100644 xorg-server-1.4/include/Makefile.am create mode 100644 xorg-server-1.4/include/Makefile.in create mode 100644 xorg-server-1.4/include/XIstubs.h create mode 100644 xorg-server-1.4/include/bstore.h create mode 100644 xorg-server-1.4/include/bstorestr.h create mode 100644 xorg-server-1.4/include/closestr.h create mode 100644 xorg-server-1.4/include/closure.h create mode 100644 xorg-server-1.4/include/colormap.h create mode 100644 xorg-server-1.4/include/colormapst.h create mode 100644 xorg-server-1.4/include/cursor.h create mode 100644 xorg-server-1.4/include/cursorstr.h create mode 100644 xorg-server-1.4/include/dix-config.h create mode 100644 xorg-server-1.4/include/dix-config.h.in create mode 100644 xorg-server-1.4/include/dix.h create mode 100644 xorg-server-1.4/include/dixevents.h create mode 100644 xorg-server-1.4/include/dixfont.h create mode 100644 xorg-server-1.4/include/dixfontstr.h create mode 100644 xorg-server-1.4/include/dixgrabs.h create mode 100644 xorg-server-1.4/include/dixstruct.h create mode 100644 xorg-server-1.4/include/do-not-use-config.h create mode 100644 xorg-server-1.4/include/do-not-use-config.h.in create mode 100644 xorg-server-1.4/include/exevents.h create mode 100644 xorg-server-1.4/include/extension.h create mode 100644 xorg-server-1.4/include/extinit.h create mode 100644 xorg-server-1.4/include/extnsionst.h create mode 100644 xorg-server-1.4/include/gc.h create mode 100644 xorg-server-1.4/include/gcstruct.h create mode 100644 xorg-server-1.4/include/globals.h create mode 100644 xorg-server-1.4/include/hotplug.h create mode 100644 xorg-server-1.4/include/input.h create mode 100644 xorg-server-1.4/include/inputstr.h create mode 100644 xorg-server-1.4/include/kdrive-config.h.in create mode 100644 xorg-server-1.4/include/misc.h create mode 100644 xorg-server-1.4/include/miscstruct.h create mode 100644 xorg-server-1.4/include/opaque.h create mode 100644 xorg-server-1.4/include/os.h create mode 100644 xorg-server-1.4/include/pixmap.h create mode 100644 xorg-server-1.4/include/pixmapstr.h create mode 100644 xorg-server-1.4/include/property.h create mode 100644 xorg-server-1.4/include/propertyst.h create mode 100644 xorg-server-1.4/include/region.h create mode 100644 xorg-server-1.4/include/regionstr.h create mode 100644 xorg-server-1.4/include/resource.h create mode 100644 xorg-server-1.4/include/rgb.h create mode 100644 xorg-server-1.4/include/screenint.h create mode 100644 xorg-server-1.4/include/scrnintstr.h create mode 100644 xorg-server-1.4/include/selection.h create mode 100644 xorg-server-1.4/include/servermd.h create mode 100644 xorg-server-1.4/include/site.h create mode 100644 xorg-server-1.4/include/swaprep.h create mode 100644 xorg-server-1.4/include/swapreq.h create mode 100644 xorg-server-1.4/include/validate.h create mode 100644 xorg-server-1.4/include/window.h create mode 100644 xorg-server-1.4/include/windowstr.h create mode 100644 xorg-server-1.4/include/xgl-config.h.in create mode 100644 xorg-server-1.4/include/xkb-config.h.in create mode 100644 xorg-server-1.4/include/xkbsrv.h create mode 100644 xorg-server-1.4/include/xorg-config.h create mode 100644 xorg-server-1.4/include/xorg-config.h.in create mode 100644 xorg-server-1.4/include/xorg-server.h create mode 100644 xorg-server-1.4/include/xorg-server.h.in create mode 100644 xorg-server-1.4/include/xwin-config.h.in create mode 100755 xorg-server-1.4/install-sh create mode 100644 xorg-server-1.4/ltmain.sh create mode 100644 xorg-server-1.4/mfb/Makefile.am create mode 100644 xorg-server-1.4/mfb/Makefile.in create mode 100644 xorg-server-1.4/mfb/fastblt.h create mode 100644 xorg-server-1.4/mfb/maskbits.c create mode 100644 xorg-server-1.4/mfb/maskbits.h create mode 100644 xorg-server-1.4/mfb/mergerop.h create mode 100644 xorg-server-1.4/mfb/mfb.h create mode 100644 xorg-server-1.4/mfb/mfbbitblt.c create mode 100644 xorg-server-1.4/mfb/mfbblt.c create mode 100644 xorg-server-1.4/mfb/mfbbltC.c create mode 100644 xorg-server-1.4/mfb/mfbbltCI.c create mode 100644 xorg-server-1.4/mfb/mfbbltG.c create mode 100644 xorg-server-1.4/mfb/mfbbltO.c create mode 100644 xorg-server-1.4/mfb/mfbbltX.c create mode 100644 xorg-server-1.4/mfb/mfbbres.c create mode 100644 xorg-server-1.4/mfb/mfbbresd.c create mode 100644 xorg-server-1.4/mfb/mfbbstore.c create mode 100644 xorg-server-1.4/mfb/mfbclip.c create mode 100644 xorg-server-1.4/mfb/mfbcmap.c create mode 100644 xorg-server-1.4/mfb/mfbfillarc.c create mode 100644 xorg-server-1.4/mfb/mfbfillrct.c create mode 100644 xorg-server-1.4/mfb/mfbfillsp.c create mode 100644 xorg-server-1.4/mfb/mfbfont.c create mode 100644 xorg-server-1.4/mfb/mfbgc.c create mode 100644 xorg-server-1.4/mfb/mfbgetsp.c create mode 100644 xorg-server-1.4/mfb/mfbhrzvert.c create mode 100644 xorg-server-1.4/mfb/mfbigbblak.c create mode 100644 xorg-server-1.4/mfb/mfbigbwht.c create mode 100644 xorg-server-1.4/mfb/mfbimage.c create mode 100644 xorg-server-1.4/mfb/mfbimggblt.c create mode 100644 xorg-server-1.4/mfb/mfbline.c create mode 100644 xorg-server-1.4/mfb/mfbmisc.c create mode 100644 xorg-server-1.4/mfb/mfbpablack.c create mode 100644 xorg-server-1.4/mfb/mfbpainv.c create mode 100644 xorg-server-1.4/mfb/mfbpawhite.c create mode 100644 xorg-server-1.4/mfb/mfbpgbblak.c create mode 100644 xorg-server-1.4/mfb/mfbpgbinv.c create mode 100644 xorg-server-1.4/mfb/mfbpgbwht.c create mode 100644 xorg-server-1.4/mfb/mfbpixmap.c create mode 100644 xorg-server-1.4/mfb/mfbply1rct.c create mode 100644 xorg-server-1.4/mfb/mfbplyblack.c create mode 100644 xorg-server-1.4/mfb/mfbplygblt.c create mode 100644 xorg-server-1.4/mfb/mfbplyinv.c create mode 100644 xorg-server-1.4/mfb/mfbplywhite.c create mode 100644 xorg-server-1.4/mfb/mfbpntarea.c create mode 100644 xorg-server-1.4/mfb/mfbpntwin.c create mode 100644 xorg-server-1.4/mfb/mfbpolypnt.c create mode 100644 xorg-server-1.4/mfb/mfbpushpxl.c create mode 100644 xorg-server-1.4/mfb/mfbscrclse.c create mode 100644 xorg-server-1.4/mfb/mfbscrinit.c create mode 100644 xorg-server-1.4/mfb/mfbseg.c create mode 100644 xorg-server-1.4/mfb/mfbsetsp.c create mode 100644 xorg-server-1.4/mfb/mfbteblack.c create mode 100644 xorg-server-1.4/mfb/mfbtegblt.c create mode 100644 xorg-server-1.4/mfb/mfbtewhite.c create mode 100644 xorg-server-1.4/mfb/mfbtile.c create mode 100644 xorg-server-1.4/mfb/mfbtileC.c create mode 100644 xorg-server-1.4/mfb/mfbtileG.c create mode 100644 xorg-server-1.4/mfb/mfbwindow.c create mode 100644 xorg-server-1.4/mfb/mfbzerarc.c create mode 100644 xorg-server-1.4/mi/Makefile.am create mode 100644 xorg-server-1.4/mi/Makefile.in create mode 100644 xorg-server-1.4/mi/mi.h create mode 100644 xorg-server-1.4/mi/miarc.c create mode 100644 xorg-server-1.4/mi/mibank.c create mode 100644 xorg-server-1.4/mi/mibank.h create mode 100644 xorg-server-1.4/mi/mibitblt.c create mode 100644 xorg-server-1.4/mi/mibstore.c create mode 100644 xorg-server-1.4/mi/mibstore.h create mode 100644 xorg-server-1.4/mi/mibstorest.h create mode 100644 xorg-server-1.4/mi/micmap.c create mode 100644 xorg-server-1.4/mi/micmap.h create mode 100644 xorg-server-1.4/mi/micoord.h create mode 100644 xorg-server-1.4/mi/micursor.c create mode 100644 xorg-server-1.4/mi/midash.c create mode 100644 xorg-server-1.4/mi/midispcur.c create mode 100644 xorg-server-1.4/mi/mieq.c create mode 100644 xorg-server-1.4/mi/miexpose.c create mode 100644 xorg-server-1.4/mi/mifillarc.c create mode 100644 xorg-server-1.4/mi/mifillarc.h create mode 100644 xorg-server-1.4/mi/mifillrct.c create mode 100644 xorg-server-1.4/mi/mifpoly.h create mode 100644 xorg-server-1.4/mi/mifpolycon.c create mode 100644 xorg-server-1.4/mi/migc.c create mode 100644 xorg-server-1.4/mi/migc.h create mode 100644 xorg-server-1.4/mi/miglblt.c create mode 100644 xorg-server-1.4/mi/miinitext.c create mode 100644 xorg-server-1.4/mi/miline.h create mode 100644 xorg-server-1.4/mi/mioverlay.c create mode 100644 xorg-server-1.4/mi/mioverlay.h create mode 100644 xorg-server-1.4/mi/mipointer.c create mode 100644 xorg-server-1.4/mi/mipointer.h create mode 100644 xorg-server-1.4/mi/mipointrst.h create mode 100644 xorg-server-1.4/mi/mipoly.c create mode 100644 xorg-server-1.4/mi/mipoly.h create mode 100644 xorg-server-1.4/mi/mipolycon.c create mode 100644 xorg-server-1.4/mi/mipolygen.c create mode 100644 xorg-server-1.4/mi/mipolypnt.c create mode 100644 xorg-server-1.4/mi/mipolyrect.c create mode 100644 xorg-server-1.4/mi/mipolyseg.c create mode 100644 xorg-server-1.4/mi/mipolytext.c create mode 100644 xorg-server-1.4/mi/mipolyutil.c create mode 100644 xorg-server-1.4/mi/mipushpxl.c create mode 100644 xorg-server-1.4/mi/miregion.c create mode 100644 xorg-server-1.4/mi/miscanfill.h create mode 100644 xorg-server-1.4/mi/miscrinit.c create mode 100644 xorg-server-1.4/mi/mispans.c create mode 100644 xorg-server-1.4/mi/mispans.h create mode 100644 xorg-server-1.4/mi/misprite.c create mode 100644 xorg-server-1.4/mi/misprite.h create mode 100644 xorg-server-1.4/mi/mispritest.h create mode 100644 xorg-server-1.4/mi/mistruct.h create mode 100644 xorg-server-1.4/mi/mivalidate.h create mode 100644 xorg-server-1.4/mi/mivaltree.c create mode 100644 xorg-server-1.4/mi/miwideline.c create mode 100644 xorg-server-1.4/mi/miwideline.h create mode 100644 xorg-server-1.4/mi/miwindow.c create mode 100644 xorg-server-1.4/mi/mizerarc.c create mode 100644 xorg-server-1.4/mi/mizerarc.h create mode 100644 xorg-server-1.4/mi/mizerclip.c create mode 100644 xorg-server-1.4/mi/mizerline.c create mode 100644 xorg-server-1.4/miext/Makefile.am create mode 100644 xorg-server-1.4/miext/Makefile.in create mode 100644 xorg-server-1.4/miext/cw/Makefile.am create mode 100644 xorg-server-1.4/miext/cw/Makefile.in create mode 100644 xorg-server-1.4/miext/cw/cw.c create mode 100644 xorg-server-1.4/miext/cw/cw.h create mode 100644 xorg-server-1.4/miext/cw/cw_ops.c create mode 100644 xorg-server-1.4/miext/cw/cw_render.c create mode 100644 xorg-server-1.4/miext/damage/Makefile.am create mode 100644 xorg-server-1.4/miext/damage/Makefile.in create mode 100755 xorg-server-1.4/miext/damage/damage.c create mode 100755 xorg-server-1.4/miext/damage/damage.h create mode 100755 xorg-server-1.4/miext/damage/damagestr.h create mode 100644 xorg-server-1.4/miext/rootless/Makefile.am create mode 100644 xorg-server-1.4/miext/rootless/Makefile.in create mode 100644 xorg-server-1.4/miext/rootless/README.txt create mode 100644 xorg-server-1.4/miext/rootless/accel/Makefile.am create mode 100644 xorg-server-1.4/miext/rootless/accel/Makefile.in create mode 100644 xorg-server-1.4/miext/rootless/accel/rlAccel.c create mode 100644 xorg-server-1.4/miext/rootless/accel/rlAccel.h create mode 100644 xorg-server-1.4/miext/rootless/accel/rlBlt.c create mode 100644 xorg-server-1.4/miext/rootless/accel/rlCopy.c create mode 100644 xorg-server-1.4/miext/rootless/accel/rlFill.c create mode 100644 xorg-server-1.4/miext/rootless/accel/rlFillRect.c create mode 100644 xorg-server-1.4/miext/rootless/accel/rlFillSpans.c create mode 100644 xorg-server-1.4/miext/rootless/accel/rlGlyph.c create mode 100644 xorg-server-1.4/miext/rootless/accel/rlSolid.c create mode 100644 xorg-server-1.4/miext/rootless/rootless.h create mode 100644 xorg-server-1.4/miext/rootless/rootlessCommon.c create mode 100644 xorg-server-1.4/miext/rootless/rootlessCommon.h create mode 100644 xorg-server-1.4/miext/rootless/rootlessConfig.h create mode 100644 xorg-server-1.4/miext/rootless/rootlessGC.c create mode 100644 xorg-server-1.4/miext/rootless/rootlessScreen.c create mode 100644 xorg-server-1.4/miext/rootless/rootlessValTree.c create mode 100644 xorg-server-1.4/miext/rootless/rootlessWindow.c create mode 100644 xorg-server-1.4/miext/rootless/rootlessWindow.h create mode 100644 xorg-server-1.4/miext/rootless/safeAlpha/Makefile.am create mode 100644 xorg-server-1.4/miext/rootless/safeAlpha/Makefile.in create mode 100644 xorg-server-1.4/miext/rootless/safeAlpha/safeAlpha.h create mode 100644 xorg-server-1.4/miext/rootless/safeAlpha/safeAlphaPicture.c create mode 100644 xorg-server-1.4/miext/rootless/safeAlpha/safeAlphaWindow.c create mode 100644 xorg-server-1.4/miext/shadow/Makefile.am create mode 100644 xorg-server-1.4/miext/shadow/Makefile.in create mode 100644 xorg-server-1.4/miext/shadow/shadow.c create mode 100644 xorg-server-1.4/miext/shadow/shadow.h create mode 100644 xorg-server-1.4/miext/shadow/shalloc.c create mode 100644 xorg-server-1.4/miext/shadow/shpacked.c create mode 100644 xorg-server-1.4/miext/shadow/shplanar.c create mode 100644 xorg-server-1.4/miext/shadow/shplanar8.c create mode 100644 xorg-server-1.4/miext/shadow/shrot16pack.c create mode 100644 xorg-server-1.4/miext/shadow/shrot16pack_180.c create mode 100644 xorg-server-1.4/miext/shadow/shrot16pack_270.c create mode 100644 xorg-server-1.4/miext/shadow/shrot16pack_270YX.c create mode 100644 xorg-server-1.4/miext/shadow/shrot16pack_90.c create mode 100644 xorg-server-1.4/miext/shadow/shrot16pack_90YX.c create mode 100644 xorg-server-1.4/miext/shadow/shrot32pack.c create mode 100644 xorg-server-1.4/miext/shadow/shrot32pack_180.c create mode 100644 xorg-server-1.4/miext/shadow/shrot32pack_270.c create mode 100644 xorg-server-1.4/miext/shadow/shrot32pack_90.c create mode 100644 xorg-server-1.4/miext/shadow/shrot8pack.c create mode 100644 xorg-server-1.4/miext/shadow/shrot8pack_180.c create mode 100644 xorg-server-1.4/miext/shadow/shrot8pack_270.c create mode 100644 xorg-server-1.4/miext/shadow/shrot8pack_90.c create mode 100644 xorg-server-1.4/miext/shadow/shrotate.c create mode 100644 xorg-server-1.4/miext/shadow/shrotpack.h create mode 100644 xorg-server-1.4/miext/shadow/shrotpackYX.h create mode 100755 xorg-server-1.4/missing create mode 100644 xorg-server-1.4/os/Makefile.am create mode 100644 xorg-server-1.4/os/Makefile.in create mode 100644 xorg-server-1.4/os/WaitFor.c create mode 100644 xorg-server-1.4/os/access.c create mode 100644 xorg-server-1.4/os/auth.c create mode 100644 xorg-server-1.4/os/connection.c create mode 100644 xorg-server-1.4/os/io.c create mode 100644 xorg-server-1.4/os/log.c create mode 100644 xorg-server-1.4/os/mitauth.c create mode 100644 xorg-server-1.4/os/os.c create mode 100644 xorg-server-1.4/os/oscolor.c create mode 100644 xorg-server-1.4/os/oscolor.h create mode 100644 xorg-server-1.4/os/osdep.h create mode 100644 xorg-server-1.4/os/osinit.c create mode 100644 xorg-server-1.4/os/rpcauth.c create mode 100644 xorg-server-1.4/os/secauth.c create mode 100644 xorg-server-1.4/os/strlcat.c create mode 100644 xorg-server-1.4/os/strlcpy.c create mode 100644 xorg-server-1.4/os/utils.c create mode 100644 xorg-server-1.4/os/xalloc.c create mode 100644 xorg-server-1.4/os/xdmauth.c create mode 100644 xorg-server-1.4/os/xdmcp.c create mode 100644 xorg-server-1.4/os/xprintf.c create mode 100644 xorg-server-1.4/os/xstrans.c create mode 100644 xorg-server-1.4/randr/Makefile.am create mode 100644 xorg-server-1.4/randr/Makefile.in create mode 100644 xorg-server-1.4/randr/mirandr.c create mode 100644 xorg-server-1.4/randr/randr.c create mode 100644 xorg-server-1.4/randr/randrstr.h create mode 100644 xorg-server-1.4/randr/rrcrtc.c create mode 100644 xorg-server-1.4/randr/rrdispatch.c create mode 100644 xorg-server-1.4/randr/rrinfo.c create mode 100644 xorg-server-1.4/randr/rrmode.c create mode 100644 xorg-server-1.4/randr/rroutput.c create mode 100644 xorg-server-1.4/randr/rrpointer.c create mode 100644 xorg-server-1.4/randr/rrproperty.c create mode 100644 xorg-server-1.4/randr/rrscreen.c create mode 100644 xorg-server-1.4/randr/rrsdispatch.c create mode 100644 xorg-server-1.4/randr/rrxinerama.c create mode 100644 xorg-server-1.4/record/Makefile.am create mode 100644 xorg-server-1.4/record/Makefile.in create mode 100644 xorg-server-1.4/record/record.c create mode 100644 xorg-server-1.4/record/set.c create mode 100644 xorg-server-1.4/record/set.h create mode 100644 xorg-server-1.4/render/Makefile.am create mode 100644 xorg-server-1.4/render/Makefile.in create mode 100644 xorg-server-1.4/render/animcur.c create mode 100644 xorg-server-1.4/render/filter.c create mode 100644 xorg-server-1.4/render/glyph.c create mode 100644 xorg-server-1.4/render/glyphstr.h create mode 100644 xorg-server-1.4/render/miglyph.c create mode 100644 xorg-server-1.4/render/miindex.c create mode 100644 xorg-server-1.4/render/mipict.c create mode 100644 xorg-server-1.4/render/mipict.h create mode 100644 xorg-server-1.4/render/mirect.c create mode 100644 xorg-server-1.4/render/mitrap.c create mode 100644 xorg-server-1.4/render/mitri.c create mode 100644 xorg-server-1.4/render/picture.c create mode 100644 xorg-server-1.4/render/picture.h create mode 100644 xorg-server-1.4/render/picturestr.h create mode 100644 xorg-server-1.4/render/render.c create mode 100644 xorg-server-1.4/render/renderedge.c create mode 100644 xorg-server-1.4/render/renderedge.h create mode 100644 xorg-server-1.4/xfixes/Makefile.am create mode 100644 xorg-server-1.4/xfixes/Makefile.in create mode 100755 xorg-server-1.4/xfixes/cursor.c create mode 100755 xorg-server-1.4/xfixes/region.c create mode 100755 xorg-server-1.4/xfixes/saveset.c create mode 100755 xorg-server-1.4/xfixes/select.c create mode 100755 xorg-server-1.4/xfixes/xfixes.c create mode 100755 xorg-server-1.4/xfixes/xfixes.h create mode 100755 xorg-server-1.4/xfixes/xfixesint.h create mode 100644 xorg-server-1.4/xkb/Makefile.am create mode 100644 xorg-server-1.4/xkb/Makefile.in create mode 100644 xorg-server-1.4/xkb/README.compiled create mode 100644 xorg-server-1.4/xkb/XKBAlloc.c create mode 100644 xorg-server-1.4/xkb/XKBGAlloc.c create mode 100644 xorg-server-1.4/xkb/XKBMAlloc.c create mode 100644 xorg-server-1.4/xkb/XKBMisc.c create mode 100644 xorg-server-1.4/xkb/ddxBeep.c create mode 100644 xorg-server-1.4/xkb/ddxCtrls.c create mode 100644 xorg-server-1.4/xkb/ddxDevBtn.c create mode 100644 xorg-server-1.4/xkb/ddxFakeBtn.c create mode 100644 xorg-server-1.4/xkb/ddxFakeMtn.c create mode 100644 xorg-server-1.4/xkb/ddxInit.c create mode 100644 xorg-server-1.4/xkb/ddxKeyClick.c create mode 100644 xorg-server-1.4/xkb/ddxKillSrv.c create mode 100644 xorg-server-1.4/xkb/ddxLEDs.c create mode 100644 xorg-server-1.4/xkb/ddxList.c create mode 100644 xorg-server-1.4/xkb/ddxLoad.c create mode 100644 xorg-server-1.4/xkb/ddxPrivate.c create mode 100644 xorg-server-1.4/xkb/ddxVT.c create mode 100644 xorg-server-1.4/xkb/maprules.c create mode 100644 xorg-server-1.4/xkb/xkb.c create mode 100644 xorg-server-1.4/xkb/xkb.h create mode 100644 xorg-server-1.4/xkb/xkbAccessX.c create mode 100644 xorg-server-1.4/xkb/xkbActions.c create mode 100644 xorg-server-1.4/xkb/xkbDflts.h create mode 100644 xorg-server-1.4/xkb/xkbEvents.c create mode 100644 xorg-server-1.4/xkb/xkbInit.c create mode 100644 xorg-server-1.4/xkb/xkbLEDs.c create mode 100644 xorg-server-1.4/xkb/xkbPrKeyEv.c create mode 100644 xorg-server-1.4/xkb/xkbSwap.c create mode 100644 xorg-server-1.4/xkb/xkbUtils.c create mode 100644 xorg-server-1.4/xkb/xkberrs.c create mode 100644 xorg-server-1.4/xkb/xkbfmisc.c create mode 100644 xorg-server-1.4/xkb/xkbout.c create mode 100644 xorg-server-1.4/xkb/xkbtext.c create mode 100644 xorg-server-1.4/xkb/xkmread.c create mode 100644 xorg-server-1.4/xorg-server.m4 create mode 100644 xorg-server-1.4/xorg-server.pc.in create mode 100755 xorg-server-1.4/ylwrap diff --git a/xorg-server-1.4/COPYING b/xorg-server-1.4/COPYING new file mode 100644 index 0000000..097ef98 --- /dev/null +++ b/xorg-server-1.4/COPYING @@ -0,0 +1,2713 @@ +Copyright (C) 1994-2003 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, FIT- +NESS 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. + + +Copyright 1997-2003 by 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 names of Orest Zborowski and David Wexelblat +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. Orest Zborowski +and David Wexelblat make no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +THE XFREE86 PROJECT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT 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 2005 Kean Johnston +Copyright 1999 by 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 names of The XFree86 Project, Inc +and Kean Johnston not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior permission. +The XFree86 Project, Inc and Kean Johnston make no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +THE XFREE86 PROJECT, INC AND KEAN JOHNSTON DISCLAIM ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THOMAS ROELL, DAVID WEXELBLAT +OR KEAN JOHNSTON 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 1985-1998, 2001 The Open Group +Copyright 2002 Red Hat Inc., Durham, North Carolina. + +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) 1987, 1989-1990, 1992-1995 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright © 1999-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. + + +Copyright © 2005 Novell, 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 +Novell, Inc. not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior permission. +Novell, Inc. makes no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +NOVELL, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN +NO EVENT SHALL NOVELL, INC. 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 by Sun Microsystems, Inc. Mountain View, CA. +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 no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or X Consortium +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and X Consortium make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN 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 SUN 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. + + +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. +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 no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or The Open Group +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and The Open Group make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN 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 SUN 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. + + +Copyright © 2006 Sun Microsystems + +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 Sun Microsystems not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Sun Microsystems makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL SUN MICROSYSTEMS 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-1991, 1993 by Digital Equipment Corporation, Maynard, Massachusetts. +Copyright 1991 Massachusetts Institute of Technology, Cambridge, Massachusetts. +Copyright 1991, 1993 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 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 1987 by Digital Equipment Corporation, Maynard, Massachusetts, +Copyright 1994 Quarterdeck Office Systems. + + 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 and +Quarterdeck not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +DIGITAL AND QUARTERDECK DISCLAIM 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 1987-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. + + +Copyright 1997 Digital Equipment Corporation. +All rights reserved. + +This software is furnished under license and may be used and copied only in +accordance with the following terms and conditions. Subject to these +conditions, you may download, copy, install, use, modify and distribute +this software in source and/or binary form. No title or ownership is +transferred hereby. + +1) Any source code used, modified or distributed must reproduce and retain + this copyright notice and list of conditions as they appear in the + source file. + +2) No right is granted to use any trade name, trademark, or logo of Digital + Equipment Corporation. Neither the "Digital Equipment Corporation" + name nor any trademark or logo of Digital Equipment Corporation may be + used to endorse or promote products derived from this software without + the prior written permission of Digital Equipment Corporation. + +3) This software is provided "AS-IS" and any express or implied warranties, + including but not limited to, any implied warranties of merchantability, + fitness for a particular purpose, or non-infringement are disclaimed. + In no event shall DIGITAL be liable for any damages whatsoever, and in + particular, DIGITAL shall not be liable for special, indirect, + consequential, or incidental damages or damages for lost profits, loss + of revenue or loss of use, whether such damages arise in contract, + negligence, tort, under statute, in equity, at law or otherwise, even + if advised of the possibility of such damage. + + +Copyright (c) 1991, 1996-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. + + +Copyright (c) 1993-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. + + +License Applicability. Except to the extent portions of this file are +made subject to an alternative license as permitted in the SGI Free +Software License B, Version 1.1 (the "License"), the contents of this +file are subject only to the provisions of the License. You may not use +this file except in compliance with the License. You may obtain a copy +of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: + +http://oss.sgi.com/projects/FreeB + +Note that, as provided in the License, the Software is distributed on an +"AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +PARTICULAR PURPOSE, AND NON-INFRINGEMENT. + +Original Code. The Original Code is: OpenGL Sample Implementation, +Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +Copyright in any portions created by third parties is as indicated +elsewhere herein. All Rights Reserved. + +Additional Notice Provisions: The application programming interfaces +established by SGI in conjunction with the Original Code are The +OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +Window System(R) (Version 1.3), released October 19, 1998. This software +was created using the OpenGL(R) version 1.2.1 Sample Implementation +published by SGI, but has not been independently verified as being +compliant with the OpenGL(R) version 1.2.1 Specification. + + +The contents of this file are subject to the GLX Public License Version 1.0 +(the "License"). You may not use this file except in compliance with the +License. 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/glx/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 GLX version 1.2 source code, released February, +1999. The developer of the Original Software is Silicon Graphics, Inc. +Those portions of the Subject Software created by Silicon Graphics, Inc. +are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. + + +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. + + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. +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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + + +Copyright 2001-2004 Red Hat Inc., Durham, North Carolina. +Copyright (c) 2003 by the XFree86 Project, Inc. +Copyright 2004-2005 Red Hat Inc., Raleigh, 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. + + +Copyright 2005 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 Red Hat +not be used in advertising or publicity pertaining to distribution +of the software without specific, written prior permission. Red +Hat makes no representations about the suitability of this software +for any purpose. It is provided "as is" without express or implied +warranty. + +RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN +NO EVENT SHALL RED HAT 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) 2006, 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. + +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 +RED HAT 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 Red Hat shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from Red Hat. + + +Copyright © 2006 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 Red Hat, +Inc not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. Red Hat, Inc makes no representations about the +suitability of this software for any purpose. It is provided "as +is" without express or implied warranty. + +RED HAT, INC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN +NO EVENT SHALL RED HAT, INC 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 © 2006 Red Hat, Inc. +(C) Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +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, sub license, +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, INC, OR PRECISION INSIGHT 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. + + +Copyright (c) 1995 X Consortium +Copyright 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 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, THE X CONSORTIUM, +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. + +Except as contained in this notice, the name of the X Consortium +shall not be used in advertising or otherwise to promote the sale, +use or other dealings in this Software without prior written +authorization from the X Consortium. + + +Copyright 1998-2000 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +Copyright (c) 2002 Apple Computer, Inc. +Copyright (c) 2003-2004 Torrey T. Lyons. +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, sub license, 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 PRECISION INSIGHT AND/OR ITS 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. + + +Copyright IBM Corporation 1987,1988,1989 +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 IBM not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, 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. + + +(C) Copyright IBM Corporation 2003 +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, sub +license, 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 +VA LINUX SYSTEM, IBM 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. + + +(C) Copyright IBM Corporation 2004-2005 +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, sub license, +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 +IBM, +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. + + +Copyright (c) 1997 Metro Link Incorporated + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +Except as contained in this notice, the name of the Metro Link shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from Metro Link. + + +Copyright 1995-1998 by Metro Link, Inc. +Copyright (c) 1997 Matthieu Herrb + +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 Metro Link, Inc. not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Metro Link, Inc. makes no +representations about the suitability of this software for any purpose. + It is provided "as is" without express or implied warranty. + +METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL METRO LINK, INC. 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 1998 by Metro Link Incorporated + +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 Metro Link +Incorporated not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. Metro Link Incorporated makes no representations +about the suitability of this software for any purpose. It is +provided "as is" without express or implied warranty. + +METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED 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) 2000 by Conectiva S.A. (http://www.conectiva.com) + +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 +CONECTIVA LINUX 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 Conectiva Linux shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from +Conectiva Linux. + + +Copyright (c) 2001, Andy Ritger aritger@nvidia.com +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +o Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +o 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. +o Neither the name of NVIDIA nor the names of its contributors + may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT +NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +THE 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. + + +Copyright 1992 Vrije Universiteit, The Netherlands + +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 the Vrije Universiteit not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. The Vrije Universiteit makes no +representations about the suitability of this software for any purpose. +It is provided "as is" without express or implied warranty. + +The Vrije Universiteit DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL The Vrije Universiteit 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 1998 by Concurrent Computer 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 name of Concurrent Computer +Corporation not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. Concurrent Computer Corporation makes no representations +about the suitability of this software for any purpose. It is +provided "as is" without express or implied warranty. + +CONCURRENT COMPUTER CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL CONCURRENT COMPUTER CORPORATION 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 2000 Intel Corporation. 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, sub license, 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 INTEL, AND/OR ITS 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. + + +Copyright © 2004 Nokia + +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 Nokia not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Nokia makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +NOKIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL NOKIA 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 1998-2003 VIA Technologies, Inc. +Copyright 2001-2003 S3 Graphics, 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, sub license, +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 +VIA, S3 GRAPHICS, AND/OR ITS 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. + + +(c)Copyright 1988,1991 Adobe Systems Incorporated. +All rights reserved. + +Permission to use, copy, modify, distribute, and sublicense this software and its +documentation for any purpose and without fee is hereby granted, provided that +the above copyright notices appear in all copies and that both those copyright +notices and this permission notice appear in supporting documentation and that +the name of Adobe Systems Incorporated not be used in advertising or publicity +pertaining to distribution of the software without specific, written prior +permission. No trademark license to use the Adobe trademarks is hereby +granted. If the Adobe trademark "Display PostScript"(tm) is used to describe +this software, its functionality or for any other purpose, such use shall be +limited to a statement that this software works in conjunction with the Display +PostScript system. Proper trademark attribution to reflect Adobe's ownership +of the trademark shall be given whenever any such reference to the Display +PostScript system is made. + +ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR ANY +PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ADOBE +DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON- +INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE TO YOU +OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,NEGLIGENCE, STRICT +LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT PROVIDE ANY TRAINING OR OTHER +SUPPORT FOR THE SOFTWARE. + +Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems +Incorporated which may be registered in certain jurisdictions. + + +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. + + +Copyright (c) 1987 by the Regents of the University of 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. The University of California +makes no representations about the suitability of this +software for any purpose. It is provided "as is" without +express or implied warranty. + + +Copyright 1992, 1993 Data General Corporation; +Copyright 1992, 1993 OMRON 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 +neither the name OMRON or DATA GENERAL be used in advertising or publicity +pertaining to distribution of the software without specific, written prior +permission of the party whose name is to be used. Neither OMRON or +DATA GENERAL make any representation about the suitability of this software +for any purpose. It is provided "as is" without express or implied warranty. + +OMRON AND DATA GENERAL EACH DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, +IN NO EVENT SHALL OMRON OR DATA GENERAL 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 © 1998-2004, 2006 Keith Packard +Copyright © 2000-2002 Keith Packard, member of The XFree86 Project, Inc. +Copyright (c) 2002 Apple Computer, Inc. +Copyright (c) 2003 Torrey T. Lyons. +All Rights Reserved. + +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. + + +Copyright © 2003-2005 Keith Packard, Daniel Stone + +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 Keith Packard and Daniel Stone not be +used in advertising or publicity pertaining to distribution of the software +without specific, written prior permission. Keith Packard and Daniel Stone +make no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +KEITH PACKARD AND DANIEL STONE DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, +IN NO EVENT SHALL KEITH PACKARD OR DANIEL STONE 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 © 1999 Keith Packard +Copyright © 2000 Compaq Computer Corporation +Copyright © 2002 MontaVista Software Inc. +Copyright © 2005 OpenedHand Ltd. + +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 or Compaq not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Keith Packard and Compaq makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +KEITH PACKARD AND COMPAQ DISCLAIM 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. + +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 Michael Taht or MontaVista not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Michael Taht and Montavista make no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +MICHAEL TAHT AND MONTAVISTA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, +IN NO EVENT SHALL EITHER 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. + +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 Matthew Allum or OpenedHand not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Matthew Allum and OpenedHand make no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +MATTHEW ALLUM AND OPENEDHAND DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, +IN NO EVENT SHALL EITHER 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 1993 by Davor Matic + +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. Davor Matic makes no representations about +the suitability of this software for any purpose. It is provided "as +is" without express or implied warranty. + + +(c) Copyright 1996 by Sebastien Marineau + +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 +HOLGER VEIT 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 Sebastien Marineau shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from Sebastien Marineau. + + +Copyright (C) 2001-2004 Harold L Hunt II +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 HAROLD L HUNT II 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 Harold L Hunt II +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +from Harold L Hunt II. + + +Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. + +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 Thomas Roell not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Thomas Roell makes no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL THOMAS ROELL 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 1990,91 by Thomas Roell, Dinkelscherben, Germany +Copyright 1993 by David Wexelblat + +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 Thomas Roell and David Wexelblat +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. Thomas Roell and +David Wexelblat makes no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +THOMAS ROELL AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THOMAS ROELL OR DAVID WEXELBLAT 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 1990,91 by Thomas Roell, Dinkelscherben, Germany +Copyright 1993 by David Dawes + +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 Thomas Roell and David Dawes +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. Thomas Roell and +David Dawes makes no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +THOMAS ROELL AND DAVID DAWES DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THOMAS ROELL OR DAVID DAWES 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 1990,91,92,93 by Thomas Roell, Germany. +Copyright 1991,92,93 by SGCS (Snitily Graphics Consulting Services), USA. + +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 Thomas Roell nor +SGCS be used in advertising or publicity pertaining to distribution +of the software without specific, written prior permission. +Thomas Roell nor SGCS makes no representations about the suitability +of this software for any purpose. It is provided "as is" without +express or implied warranty. + +THOMAS ROELL AND SGCS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THOMAS ROELL OR SGCS 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 2001-2005 by Kean Johnston +Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany +Copyright 1993 by David Wexelblat + +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 Thomas Roell, David Wexelblat +and Kean Johnston not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior permission. +Thomas Roell, David Wexelblat and Kean Johnston make no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +THOMAS ROELL, DAVID WEXELBLAT AND KEAN JOHNSTON DISCLAIM ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THOMAS ROELLm DAVID WEXELBLAT +OR KEAN JOHNSTON 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 2001-2005 by Kean Johnston +Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany +Copyright 1993 by David Dawes +Copyright 1993 by David Wexelblat + +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 Thomas Roell, David Dawes +and Kean Johnston not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior permission. +Thomas Roell, David Dawes and Kean Johnston make no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +THOMAS ROELL, DAVID DAWES AND KEAN JOHNSTON DISCLAIM ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THOMAS ROELLm DAVID WEXELBLAT +OR KEAN JOHNSTON 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) 2001-2003 Torrey T. Lyons. +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 +TORREY T. LYONS 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(s) of the above 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. + + +Copyright © 2004 David Reveman + +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 +David Reveman not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior permission. +David Reveman makes no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +DAVID REVEMAN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN +NO EVENT SHALL DAVID REVEMAN 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 1993 Gerrit Jan Akkerman + +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 Gerrit Jan Akkerman not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +GERRIT JAN AKKERMAN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, +IN NO EVENT SHALL GERRIT JAN AKKERMAN 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 1998 by Alan Hourihane, Wigan, England. +Copyright 2000-2002 by Alan Hourihane, Flint Mountain, North Wales. + +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 Alan Hourihane not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Alan Hourihane makes no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL ALAN HOURIHANE 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 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 + + +Copyright (c) 1997 Matthieu Herrb + +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 Matthieu Herrb not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Matthieu Herrb makes no +representations about the suitability of this software for any purpose. + It is provided "as is" without express or implied warranty. + +MATTHIEU HERRB DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL MATTHIEU HERRB 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 1993 by Thomas Mueller + +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 Thomas Mueller not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Thomas Mueller makes no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +THOMAS MUELLER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL THOMAS MUELLER 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 2004, Egbert Eich + +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 +EGBERT EICH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- +NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Egbert Eich shall not +be used in advertising or otherwise to promote the sale, use or other deal- +ings in this Software without prior written authorization from Egbert Eich. + + +Copyright 1993 by David Wexelblat +Copyright 2005 by Kean Johnston +Copyright 1993 by David McCullough + +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 David Wexelblat not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. David Wexelblat makes no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL DAVID WEXELBLAT 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 1992 by Orest Zborowski +Copyright 1993 by David Wexelblat + +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 Orest Zborowski and David Wexelblat +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. Orest Zborowski +and David Wexelblat make no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +OREST ZBOROWSKI AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT 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 1992 by Orest Zborowski +Copyright 1993 by David Dawes + +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 Orest Zborowski and David Dawes +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. Orest Zborowski +and David Dawes make no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +OREST ZBOROWSKI AND DAVID DAWES DISCLAIMS ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID DAWES 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 1995-1999 by Frederic Lepied, France. + +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 Frederic Lepied not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Frederic Lepied makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +FREDERIC LEPIED DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL FREDERIC LEPIED 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) 1999 Jeff Hartmann +Copyright (C) 1999 Precision Insight, Inc. +Copyright (C) 1999 Xi Graphics, Inc. + +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 +JEFF HARTMANN, OR ANY OTHER CONTRIBUTORS 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. + + +Copyright 2001,2005 by Kean Johnston + +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 Kean Johnston not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Kean Johnston makes no +representations about the suitability of this software for any purpose. +It is provided "as is" without express or implied warranty. + +KEAN JOHNSTON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL KEAN JOHNSTON 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 1992 by Rich Murphey +Copyright 1993 by David Wexelblat + +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 Rich Murphey and David Wexelblat +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. Rich Murphey and +David Wexelblat make no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT 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 1992 by Rich Murphey +Copyright 1993 by David Dawes + +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 Rich Murphey and David Dawes +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. Rich Murphey and +David Dawes make no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +RICH MURPHEY AND DAVID DAWES DISCLAIM ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID DAWES 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 © 2004 Franco Catrin + +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 Franco Catrin not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Franco Catrin makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +FRANCO CATRIN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL FRANCO CATRIN 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 © 2004 Ralph Thomas + +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 Ralph Thomas not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Ralph Thomas makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +RALPH THOMAS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL RALPH THOMAS 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 © 2004 Damien Ciabrini + +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 Anders Carlsson not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Anders Carlsson makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +DAMIEN CIABRINI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL ANDERS CARLSSON 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 © 2003-2004 Anders Carlsson + +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 Anders Carlsson not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Anders Carlsson makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +ANDERS CARLSSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL ANDERS CARLSSON 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) 2003 Anders Carlsson +Copyright © 2003-2004 Eric Anholt +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 Eric Anholt not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Eric Anholt makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL ERIC ANHOLT 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 2000 Silicon Integrated Systems Corp, Inc., HsinChu, Taiwan. +Copyright 2003 Eric Anholt +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, sub license, 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 +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP 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. + + +Copyright © 2004 PillowElephantBadgerBankPond + +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 PillowElephantBadgerBankPond not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. PillowElephantBadgerBankPond makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +PillowElephantBadgerBankPond DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL PillowElephantBadgerBankPond 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 2004 by Costas Stylianou +44(0)7850 394095 + +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 Costas Sylianou not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Costas Stylianou makes no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +COSTAS STYLIANOU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL COSTAS STYLIANOU 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) 1998 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE +FOR ANY SPECIAL, DIRECT, 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) 1995 Pascal Haible. 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 +PASCAL HAIBLE 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 Pascal Haible shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from +Pascal Haible. + + +Copyright © 2003-2004 Philip Blundell + +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 Philip Blundell not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Philip Blundell makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL PHILIP BLUNDELL 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-2003 by The XFree86 Project, Inc. +Copyright 1997 by Metro Link, Inc. +Copyright 2003 by David H. Dawes. +Copyright 2003 by X-Oz Technologies. +Copyright (c) 2004, X.Org Foundation + +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 HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) +and author(s) 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 copyright holder(s) and author(s). + + +Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany +Copyright 1993 by David Wexelblat +Copyright 1999 by David Holland +Copyright © 2000 Compaq Computer Corporation +Copyright © 2002 Hewlett-Packard Company +Copyright © 2004, 2005 Red Hat, Inc. +Copyright © 2004 Nicholas Miell +Copyright © 2005 Trolltech AS +Copyright © 2006 Intel 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 name of Red Hat not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. Red Hat makes 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. + + +Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. + 2005 Lars Knoll & Zack Rusin, Trolltech + +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. + +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. + + +Copyright 1987, 1998 The Open Group +Copyright © 1998-1999, 2001 The XFree86 Project, Inc. +Copyright © 2000 VA Linux Systems, Inc. +Copyright (c) 2000, 2001 Nokia Home Communications +Copyright 2003-2006 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. + + +Copyright (c) 1998-1999 Shunsuke Akiyama . +Copyright (c) 1998-1999 X-TrueType Server Project +Copyright (c) 1999 Lennart Augustsson +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. + + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. + + +(c) Copyright 1996 Hewlett-Packard Company +(c) Copyright 1996 International Business Machines Corp. +(c) Copyright 1996, 2004 Sun Microsystems, Inc. +(c) Copyright 1996 Novell, Inc. +(c) Copyright 1996 Digital Equipment Corp. +(c) Copyright 1996 Fujitsu Limited +(c) Copyright 1996 Hitachi, Ltd. +Copyright (c) 2003-2005 Roland Mainz + +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. + + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright (c) 2001 Andreas Monitzer. +Copyright (c) 2001-2004 Greg Parker. +Copyright (c) 2001-2004 Torrey T. Lyons +Copyright (c) 2002-2003 Apple Computer, Inc. +Copyright (c) 2004-2005 Alexander Gottwald +Copyright (c) 2002-2007 Apple 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + + +Copyright (C) 1999,2000 by Eric Sunshine +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. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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. + + +Copyright (C) 2005 Bogdan D. bogdand@users.sourceforge.net + +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 +AUTHOR 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 author 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 author. + + +Copyright © 2002 David Dawes + +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 AUTHOR(S) 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 author(s) 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 author(s). + + +Copyright (C) 1996-1999 SciTech Software, Inc. +Copyright (C) David Mosberger-Tang +Copyright (C) 1999 Egbert Eich + +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 authors not be used +in advertising or publicity pertaining to distribution of the software +without specific, written prior permission. The authors makes no +representations about the suitability of this software for any purpose. +It is provided "as is" without express or implied warranty. + +THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL THE AUTHORS 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 2005-2006 Luc Verhaegen. + +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 HOLDER(S) OR AUTHOR(S) 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. + + +Copyright 1995 by Robin Cutshaw +Copyright 2000 by Egbert Eich +Copyright 2002 by David Dawes + +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 the above listed copyright holder(s) +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. The above listed +copyright holder(s) make(s) no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 1997-2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org + +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 Marc Aurele La France not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. Marc Aurele La France makes no representations +about the suitability of this software for any purpose. It is provided +"as-is" without express or implied warranty. + +MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO +EVENT SHALL MARC AURELE LA FRANCE 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 by Glenn G. Lai +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 copyr notice and this permission notice appear in +supporting documentation, and that the name of Glenn G. Lai not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +Glenn G. Lai 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 (c) 1999 by Keith Packard +Copyright © 2006 Intel Corporation +Copyright 2006 Luc Verhaegen. + +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 (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 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. + + +Copyright (c) 2000-2001 by Juliusz Chroboczek +Copyright (c) 1999 by Keith Packard + +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. + + +Copyright 1990, 1991 by Thomas Roell, Dinkelscherben, Germany +Copyright 1992 by David Dawes +Copyright 1992 by Jim Tsillas +Copyright 1992 by Rich Murphey +Copyright 1992 by Robert Baron +Copyright 1992 by Orest Zborowski +Copyright 1993 by Vrije Universiteit, The Netherlands +Copyright 1993 by David Wexelblat +Copyright 1994, 1996 by Holger Veit +Copyright 1997 by Takis Psarogiannakopoulos +Copyright 1994-2003 by 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 names of the above listed copyright holders +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. The above listed +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 ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED 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. + + +Copyright 2001-2005 by J. Kean Johnston + +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 J. Kean Johnston not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. J. Kean Johnston makes no +representations about the suitability of this software for any purpose. +It is provided "as is" without express or implied warranty. + +J. KEAN JOHNSTON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL J. KEAN JOHNSTON 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) 2000 Jakub Jelinek (jakub@redhat.com) + +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 +JAKUB JELINEK 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. + + +Copyright (C) 1996 David S. Miller (davem@redhat.com) +Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz) + +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 +JAKUB JELINEK OR DAVID MILLER 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. + + +Copyright 1997,1998 by UCHIYAMA Yasushi + +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 UCHIYAMA Yasushi not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. UCHIYAMA Yasushi makes no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +UCHIYAMA YASUSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL UCHIYAMA YASUSHI 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) 2000 Keith Packard + 2004 Eric Anholt + 2005 Zack Rusin + +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 copyright holders not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. 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. + + +(C) Copyright IBM Corporation 2002-2007 +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, sub +license, 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 +THE COPYRIGHT HOLDERS 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. + + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. 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 +AUTHOR 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. + + +Copyright © 2006-2007 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 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. + + +Copyright 2006 Adam Jackson. + +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, sub +license, 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 +THE AUTHORS 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. + + +Copyright © 2006 Daniel Stone + +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 (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 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. + + +Copyright © 2006-2007 Daniel Stone + +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 (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 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. + + +Copyright © 2007 Daniel Stone + +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 (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 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. + + +Copyright © 1999 Keith Packard +Copyright © 2006 Nokia 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 name of the authors not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. The authors make no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL THE AUTHORS 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/xorg-server-1.4/ChangeLog b/xorg-server-1.4/ChangeLog new file mode 100644 index 0000000..ebd8bff --- /dev/null +++ b/xorg-server-1.4/ChangeLog @@ -0,0 +1,28152 @@ +commit 99dd8b9414d1eb7aabc682be0b9cfd7a27eb2a6b +Author: Eric Anholt +Date: Thu Sep 6 01:42:43 2007 -0700 + + Bump version to 1.4.0. + +commit f73fd98a8636c0df3133a8b9428f3f23ecc788b4 +Author: Daniel Stone +Date: Wed Sep 5 17:46:23 2007 -0700 + + Fix key repeats during VT switch. + + Add keyc->postdown, which represents the key state as of the last mieqEnqueue + call, and use it when we need to know the posted state, instead of the + processed state (keyc->down). Add small functions to getevents.c to query and + modify key state in postdown and use them all through, eliminating previously + broken uses. + (cherry picked from commit 81c28ffd2b13a83770eadcfd7829d35d319d637f) + +commit 3c5fe1ec377688ab2edc6137b74a7c04b3bc2e7e +Author: Keith Packard +Date: Wed Sep 5 14:19:19 2007 -0700 + + Deliver correct event when releasing keys on VT switch. + + In commit 41bb9fce47f6366cc3f7d45790f7883f74289b5a, the event delivery loop + for Xinput enabled keyboards was changed and accidentally used the wrong + index variable, causing random events to be delivered when returning from VT + switch. + + In addition, in commit aeba855b07832354f59678e20cc29a085e42bd99, + SIGIO was blocked during delivery of these events, but not for the entire + period the xf86Events array was being used. Block SIGIO for the whole loop + to avoid other event delivery from trashing the key release events. + (cherry picked from commit aa7ed1f5f35cd043bc38d985500aa0a32e857e84) + (cherry picked from commit accd71bda6f958ea6892ad3a10879232d345774c) + +commit 70ed110538413e96cefbf0a1c276b52dc62c5aae +Author: Eric Anholt +Date: Wed Sep 5 13:30:02 2007 -0700 + + Fix server version reporting to be the server package version. + + Previously, the server version reported by xdpyinfo and Xorg -version would + bear some vague resemblance to a X.Org katamari version, but in the presence + of modularization (and client-server relationships with different katamari + versions on each side) those numbers don't really make sense. Instead, just + report the package version. + + When branching a stable branch, master's version should be immediately updated + to the endpoint of the stable branch plus a snapshot of 1 (for example, + 1.4.0.1 after server-1.4-branch). The stable branch should then be changed to + RC0 at that time (1.3.99.0, for example). + + This scheme was partially attempted for server 1.3, but lacked the appropriate + master updates, thus why it had to be revisited now. While here, we can also + remove a lot of versioning complexity since everything is based on the package + version. + + (cherry picked from commit 47300ed2be59d0ba7ea9345b954bf3104877c095) + +commit b328d553723ecf8f893783e91ec00ee6054acb74 +Author: Alan Hourihane +Date: Thu Aug 30 21:57:41 2007 +0100 + + Allow yres_virtual to be greater for some kernel fbdev drivers. + + (temporary fix for older fbdev drivers) + (cherry picked from commit 87495fc7064d5e0a7575a0713b6895a4172df0fa) + +commit b69e6165136ff76ba4649bb9d11906fef27b78bc +Author: Keith Packard +Date: Sat Sep 1 21:14:22 2007 -0700 + + [COMPOSITE] Composite used for pixmap population on redirect. (Bug #7447) + + compNewPixmap copies bits from the parent window to the redirected child + pixmap to populate the pixmap with reasonable data. It cannot always use + CopyArea as that only works across matching depths. Use Composite when + the depths do not match. + (cherry picked from commit f98dfec79dadb70fa7bba84e7335f92b3a73dc02) + +commit 87f98178417718d8720566a2df04857a682a2d15 +Author: Adam Jackson +Date: Fri Aug 31 22:11:13 2007 -0700 + + [RANDR] Don't mark Xinerama as active if no crtcs are enabled. (bug #11504). + + Clients expect any Xinerama-enabled screen to report at least one + monitor, but with RandR, there may not be any enabled crtcs. In this case, + tell the client that Xinerama is not active. + (cherry picked from commit 1afdf8b0a92437dffe84fa98b6083b3d8fd55e27) + +commit 61460cf095a655d8711b79225080a8c2808dbbc4 +Author: Marius Gedminas +Date: Fri Aug 31 21:36:37 2007 -0700 + + [RANDR] Compare only milliseconds of config time. (Bug #6502) + + The timestamp transferred in the X protocol is a 32-bit number of + milliseconds. + + The timestamp stored in the server is a structure that contains two fields: + months (!) and milliseconds. + + When the server passes the config timestamp to the client, it discards the + months part and sends only the milliseconds part. + + When the server receives the config timestamp from the client, it tries to + guess the "months" part by looking at the current time and then maybe adding + or + subtracting one. The guess is wrong after the server has been running long + enough (several hours). + + I have added two ErrorF calls around the 'if' statement that returns + RRSetConfigInvalidConfigTimestamp in randr/randr.c and my Xorg.0.log has + this: + + randr request got good config time: 0:-2103495671 + + for the first few successful xrandr calls, and + + randr request failed with RRSetConfigInvalidConfigTime: client passed + 1:-2103495671, server has 0:-2103495671 + + when it fails. The server has been running for 8 and a half hours. + + The obvious fix would be to ignore the months field and only compare the + milliseconds. + (cherry picked from commit 0dc2bb6101704d0fd25f36e2c3df79687f119f5b) + +commit ec56c5e958248ea0161dda885fa59752b20f5d7c +Author: Eric Anholt +Date: Fri Aug 31 20:02:52 2007 -0700 + + Bump version to 1.3.99.2. + +commit 5efc4bd7d0e2020242127d8ed83efb8d2d76a151 +Author: Eric Anholt +Date: Fri Aug 31 18:27:41 2007 -0700 + + Remove backend.[ch] from neomagic to fix distcheck. + (cherry picked from commit 917e3bb83a48da7618fce463cf6283be36cd9084) + +commit 1a125b521434da7ba3a41b6398c7f094867908e0 +Author: Eric Anholt +Date: Fri Aug 31 15:16:01 2007 -0700 + + Bug #7364: Require renderproto 0.9.3 on 64-bit, and fix build with it. + + (cherry picked from commit 07630d897ef37cad8b79d073d9edc891d5a7bddd) + +commit f499c2ea0a90a69713daef8f9497463229384964 +Author: Eric Anholt +Date: Fri Aug 31 13:00:23 2007 -0700 + + Bug #7186: Fix an excessive request size limitation that broke big-requests. + + MAXBUFSIZE appears to be a leftover of some previous time. Instead, just + use maxBigRequestSize when bigreqs are available (limiting buffers to ~16MB). + When bigreqs are not available, needed won't be larger than the maximum + size of a non-bigreqs request (256kB). + (cherry picked from commit ca82d4bddf235c9b68d51d68636bab40eafb9889) + +commit 3e9ecdcb132bb223febc396626211aa2681e4c79 +Author: Matthieu Herrb +Date: Thu Aug 23 22:11:56 2007 +0200 + + Remove an extra cast. + + Thou should not apply patches manually without testing. + (cherry picked from commit a66c0f1dca2958835ff65a5b50579e3304ed316a) + +commit a964d541283e93b1096150275ba2d95594bf77ea +Author: Otto Moerbeek +Date: Thu Aug 23 21:59:25 2007 +0200 + + A high resolution device that's moving fast can potentially generate + an int overflow, making dx*dx+dy*dy negative. Now pow(negative, + non-integer) yields NaN, so you loose. Use fp math to avoid that. + (cherry picked from commit 12d27cf33c6d963eae77795c0d247175907162a5) + +commit bcd6708895e5c2fda423bb13fe42b078ef293b13 +Author: Egbert Eich +Date: Thu Aug 30 12:50:21 2007 +0200 + + Fixing a misleading comment which could suggest a GPL violation. + + The author of the int10 code looked at the VBIOS POSTing code + in DOSEMU to get some initial idea on how to POST a VBIOS. + To give credit to the DOSEMU Team for this inspiration a comment + was added to the code which could suggest that code from the + GPLed DOSEMU was directly incorporated into this code. + This patch should clearify the situation. + (cherry picked from commit 1d11e4bc4ccb169fb23fc18583f0b648f0a6a4e0) + +commit ed001ed363d11aff3df9a7de2f72075e0b2cfb7b +Author: Eric Anholt +Date: Wed Aug 29 15:54:32 2007 -0700 + + Bug #9629: Remove badly-licensed neomagic kdrive files. + + Licensing issues of these files include: + - They claim to be licensed under the GPL, yet we haven't allowed that in the + xserver repository in the past. + - They refer the user to the top of the tree for GPL license text, yet it isn't + there. + - They claim to be derived from the (MIT-licensed) ati kdrive code, yet don't + follow the licensing terms of those files. + (cherry picked from commit 87295b66a972a2bd194a79af6aa4f715018fcded) + +commit 5182fbf302beae93ea5b71a40a23528ee83fa1cc +Author: Alex Deucher +Date: Wed Aug 22 19:26:34 2007 -0400 + + Add _X_EXPORT to exported functions in hw/xfree86/modes/* + + Also add missing exports to hw/xfree86/loader/xf86sym.c + (cherry picked from commit 81f8b652d99ee0f7116c1e34aed0e585d23a91fb) + +commit 37954c019afd92edbe4aaa9d6deb6efaad7bf088 +Author: Brian Paul +Date: Thu Aug 23 19:38:53 2007 +0200 + + glx: fix crash when freeing visuals + + Don't set screen->num_vis to a value greater than the actual number of visuals. + + X.Org Bug #10809 + (cherry picked from commit ff089e6cae634ac3eb509abd448a250bcbb17275) + +commit d34b66402c9205aae38316c5855f3b492a7612c2 +Author: Dave Airlie +Date: Thu Aug 23 16:22:03 2007 +1000 + + randr: fixup crtc and output destroy + + if you are moving pointers, you want to move the pointers not just a byte + (cherry picked from commit 76bf3cd7b8c6189b6b08518cde00c8bd991bdfb7) + +commit efac9c9c2e7cfa974fb0e7737832f0e34d156f65 +Author: Keith Packard +Date: Sun Aug 19 20:28:05 2007 -0700 + + Ref count cursors used in hw/xfree86/modes code. + + The multi-crtc cursor code in hw/xfree86/modes holds a reference to the + current cursor. This reference must be correctly ref counted so the cursor + is not freed out from underneath this code. + (cherry picked from commit 7dc8531548cc9573e28bb04363dcbb3af5864c9a) + +commit 248b220b3e2bf8d999241543b69be3022a728b3a +Author: Alex Deucher +Date: Tue Aug 21 00:37:33 2007 -0400 + + add xf86_crtc_clip_video_helper to xf86sym.c + (cherry picked from commit 1f6ddae003ec65d6bc567831bf32bf75dfefdd6c) + +commit 242c05e326646cbe1ab6ced54504456fee327bce +Author: Alex Deucher +Date: Mon Aug 20 19:46:38 2007 -0400 + + move intel crtc xv clipping helper to the xserver + + The code is generic and can be used by any overlay-based card when + adding randr 1.2 support. Tested on radeon. + (cherry picked from commit 53c04351c462d2ae307684e50d5960debe1ee557) + +commit dd33e936b39d1c5229353d3f25c47e3b87de8498 +Author: Fredrik Höglund +Date: Sat Aug 18 19:02:18 2007 +0200 + + EXA: Fix a couple of logic errors in exaGetPixmapFirstPixel. + + The fb pointer would be left uninitialized when exaPixmapIsOffscreen + returned false. When it returned true and the pixmap was damaged, + fb would be initialized from the pixmap's devPrivate.ptr before the + exaDoMigration and exaPrepareAccess calls, at which point + devPrivate.ptr would still be pointing at offscreen memory. + (cherry picked from commit 3c448b0eb67337b56641e09a6d168aad6745e3ef) + +commit ec126e29e4a270577bba6337ed6f4ec8dbce46f9 +Author: Søren Sandmann Pedersen +Date: Tue Aug 21 14:26:14 2007 -0400 + + Require pixman 0.9.5; Use pixman_image_set_source_clipping() to fix + bug 11620 (reported by Jens Stroebel. + (cherry picked from commit 53941c8e68014619d3ded7f8bc0f07d9a38bb9b1) + +commit 71ddf917d7449b721582c910c5026faa457597fe +Author: Aaron Plattner +Date: Thu Aug 16 17:43:29 2007 -0700 + + stride is in FbBits-sized chunks, but xoff is not. + + Fixes corruption problems with composite rendering to redirected windows in + depth 16. + (cherry picked from commit 6a32a96d8df184c3ace4847beb48fdcb846d2286) + +commit 7cc53ae10adb7f8bb59f904b1362b7391b327f83 +Author: Aaron Plattner +Date: Thu Aug 16 14:57:18 2007 -0700 + + Bug #12015: Use the right offsets in the dst arguments of pixman_blt. + (cherry picked from commit 32666d77227fcd2c066de16bf3c07366f92b0457) + +commit 2bf6cb3074d9c0dcd706e8e083747c6d84b70e30 +Author: Julien Cristau +Date: Tue Aug 21 18:17:35 2007 +0200 + + config: fix default xkb model (pc105, not keyboard) + (cherry picked from commit 6ef4ecd82670c37a354243166750d76a97959c8b) + +commit fd4dc5a98e600b267ee22a3fb47c093c3e1b26d6 +Author: Julien Cristau +Date: Mon Aug 20 12:57:06 2007 +0200 + + xfree86: Fix build on Linux/alpha. + + A bunch of CFLAGS had gone missing, so the build failed with errors like: + ../../../../../hw/xfree86/os-support/linux/lnx_ev56.c:7:19: error: input.h: No such file or directory + ../../../../../hw/xfree86/os-support/linux/lnx_ev56.c:8:24: error: scrnintstr.h: No such file or directory + (cherry picked from commit a1fe36b772f7edc162ea97368f86588c0fb77148) + +commit 9a747b0b81d0bd9eea7d02601703df266d6c5eca +Author: Fredrik Höglund +Date: Wed Aug 15 19:19:11 2007 +0200 + + EXA: Wrap Trapezoids to prevent excessive migration of the alpha pixmap. + + miTrapezoids creates an alpha pixmap and initializes the contents + using PolyFillRect, which causes the pixmap to be moved in for + acceleration. The subsequent call to RasterizeTrapezoid won't be + accelerated by EXA, which causing the pixmap to be moved back out + again. + + By wrapping Trapezoids and using ExaCheckPolyFillRect instead of + PolyFillRect to initialize the pixmap, we avoid this roundtrip. + (cherry picked from commit daee59b1703ac07c2def9e9fecc479e59b93f761) + +commit d37edeff997219b1944a15cc0c9d7db64868ea70 +Author: Dave Jones +Date: Thu Aug 16 09:46:27 2007 +0200 + + Kdrive: fix nasty thinko in TslibEnable() + +commit 026534f945ae5652592a090a9d41375ca37ab618 +Author: Alan Coopersmith +Date: Wed Aug 15 16:47:53 2007 -0700 + + Update pci.ids to 2007-08-15 snapshot + + Remove nvidia ids in extrapci.ids that are now in pci.ids + +commit 6cef7b9611297cb1d93cefe3890b26b69c87bce2 +Author: Alan Coopersmith +Date: Wed Aug 15 16:44:49 2007 -0700 + + Correct XErrorDB path and make it configurable (used by DTrace support) + +commit 0f9e89b4e309e570d7d366489d250ca2143f0ad7 +Author: Fredrik Höglund +Date: Tue Aug 14 22:47:49 2007 +0200 + + Fix the value comparisons in the IDLETIME wakeup handler. + + LessThan/GreaterThan comparisons were used in the wakeup handler, + and LessOrEqual/GreaterOrEqual in the block handler. + + Change it to use LessOrEqual/GreaterOrEqual in both functions, + since this is what XSyncNegativeComparison and + XSyncPositiveComparison imply. + +commit 6a195e816b9d60f728d77cc1c23538e7af00a879 +Author: Kristian Høgsberg +Date: Mon Aug 13 10:43:48 2007 -0400 + + Revert "Implement damage tracking for AIGLX." + + This reverts commit 2243b30e54df07892f75e3d65b687abe5b183cf3. The existing + DRI interface doesn't let us get from a __DRIdrawable to the corresponding + X drawable, and thus, we can't implement AIGLX damage tracking with the + current interface. + +commit 03f9da672466b9ab9a9814d784b8c44f1030587e +Author: Samuel Thibault +Date: Sun Aug 12 03:07:04 2007 +0200 + + xfree86: Improve default mouse handling on the Hurd + + Make /dev/mouse the default device. This makes Xorg works with empty + or missing InputDevice sections. + +commit c5741438a3a171f493e9da32a6b39f73403f6993 +Author: Alan Coopersmith +Date: Fri Aug 10 16:13:55 2007 -0700 + + Only use evdev drivers in Xephyr #ifdef linux + +commit 59961e47df4ea621a6713a8c7d060555f8746c3a +Author: Alan Coopersmith +Date: Fri Aug 10 16:08:41 2007 -0700 + + xorgcfg needs PIXMAN_CFLAGS in order to build libc_wrapper.c + +commit 2243b30e54df07892f75e3d65b687abe5b183cf3 +Author: Kristian Høgsberg +Date: Fri Aug 10 15:53:05 2007 -0400 + + Implement damage tracking for AIGLX. + +commit ff4bd3addb48df3eacc4b121cc249a7f38eb981a +Author: Eric Anholt +Date: Wed Aug 8 14:24:42 2007 -0700 + + Fix the swapped decode of the EDID DTD h/v sync polarity fields. + + As a result, we can remove the quirks that existed to flip the bits back around + for us. This is not confirmed in all cases due to lack of bugs containing EDID + blocks associated with the quirks, but is likely true. + +commit 2926cf1da7e4ed63573bfaecdd7e19beb3057d9b +Author: Gustavo Pichorim Boiko +Date: Thu Aug 2 18:09:52 2007 -0300 + + [PATCH] Allocate the right number of entries for saving crtcs + +commit b2dcfbca2441ca8c561f86a78a76ab59ecbb40e4 +Author: Keith Packard +Date: Wed Aug 8 12:16:12 2007 -0700 + + RRScanOldConfig cannot use RRFirstOutput before output is configured. + + RRFirstOutput returns the first active output, which won't be set until + after RRScanOldConfig is finished running. Instead, just use the first + output (which is the only output present with an old driver, after all). + +commit ab3f601149e15789edfb7c9a0c33387070279582 +Author: Tiago Vignatti +Date: Tue Aug 7 23:17:32 2007 -0300 + + Updates some piece of the dead mouse evdev code under the new hotplug scheme. + I exported the evdev driver to Xephyr server. I'm running it using something + like: + $ ./hw/kdrive/ephyr/Xephyr :1 -mouse evdev,,device=/dev/input/event4 -keybd \ + evdev,,device=/dev/input/event1,xkbmodel=abnt2,xkblayout=br + + It also closes /#5668. + +commit 7d1a749b210ba5b9f8d0e5a1feb9a9ef9fa4d992 +Author: Tiago Vignatti +Date: Tue Aug 7 22:59:12 2007 -0300 + + Export device path key options to be called by the command line of server. + +commit aee3588a4a6829326770c84b860061f47f2cbcae +Author: Tiago Vignatti +Date: Tue Aug 7 22:49:07 2007 -0300 + + Update KdUseMsg() for completeness. + +commit 30259d5a4e95ff20b30807e5e207ab5995a3fdaf +Author: Daniel Stone +Date: Tue Aug 7 20:58:49 2007 +0300 + + Hotplug: HAL: Fix error handling + + Don't use our DBusError for property getting, because we simply don't care: + this fixes D-Bus error spew to stderr. Thanks Michel Dänzer for debugging + and testing. + +commit aef255425a3521d66c3405d34f7787628a22703e +Author: Daniel Stone +Date: Tue Aug 7 16:37:42 2007 +0300 + + Config: HAL: Use input.xkb namespace + + Use an explicit input.xkb.foo namespace, not input.xkb_foo. + +commit 838e59c02ec06446fc180fb9d86fa8793c7b9903 +Author: Daniel Stone +Date: Mon Aug 6 16:07:20 2007 +0300 + + configure.ac: Add $CONFIG_LIB to server libraries + + Make sure all DDXes get $CONFIG_LIB. Build-tested with Xvfb and Xdmx. + +commit b4193a2eee80895c5641e77488df0e72a73a3d99 +Author: Keith Packard +Date: Tue Aug 7 12:45:53 2007 -0700 + + RRScanOldConfig wasn't getting crtcs set correctly + + The output crtc is set by RRCrtcNotify, which is called at the end of + RRScanOldConfig. Several uses of output->crtc in this function were wrong. + +commit 2b93cbb5f8bac9b1b75f723baaa728430b5fefff +Author: Keith Packard +Date: Tue Aug 7 12:44:19 2007 -0700 + + Decrement mode count when removing RandR output mode. + + Removing an output mode without decrementing the mode count scrambles the + output mode array badly. + +commit fef4c7a6f1a1ef34233b36137bb66d9a657307fb +Author: Eric Anholt +Date: Tue Aug 7 09:01:14 2007 -0700 + + Fix driver build after pixman changes. + +commit 1339e57485db5a285cfbecbe0bba7154458680ad +Author: Tiago Vignatti +Date: Tue Aug 7 04:24:34 2007 -0300 + + Fix typo. + +commit d9ee5f3e3a3a814ebcd257736c305b41139cc354 +Author: Tiago Vignatti +Date: Tue Aug 7 04:22:26 2007 -0300 + + Clean a little bit the code. + +commit 7a5eb3e96b74daaaeb6babf46b13d698280aa3f6 +Author: Tiago Vignatti +Date: Tue Aug 7 02:16:44 2007 -0300 + + Let xkb options be passed through command line in kdrive servers. I start my + Xephyr using something like: + + ./hw/kdrive/ephyr/Xephyr :1 -fp /usr/share/fonts/X11/misc/ -mouse ephyr -keybd ephyr,,xkblayout=br,xkbmodel=abnt2 + +commit 955d5f6c0d14fae63bfe7c4ab39ee0a708919479 +Author: Tiago Vignatti +Date: Tue Aug 7 01:39:29 2007 -0300 + + When we call Xephyr with '-pointer' a new pointer is added inside the server + and the Xephyr virtual mouse keeps alive. With this patch the semantic changes + turning '-pointer' && 'Xephyr virtual mouse' always false. + + Now we can open a device pointer and pass its options in Xephyr's command line + without having other pointer unused. + +commit aa3c6aaaab213200591d29ddb2921adfb87ee5b4 +Author: Søren Sandmann Pedersen +Date: Mon Aug 6 19:00:59 2007 -0400 + + Require pixman-1 0.9.4, update pixman includes to new scheme + +commit 74feba4d77d74979a0ea478d666439ffc55001e5 +Author: Aaron Plattner +Date: Wed Aug 1 14:30:03 2007 -0700 + + Don't unwrap too early in libwfb for Composite. + + Don't call fbFinishWrap until the pixman_image_t that stores the pointer is + actually freed. This prevents corruption or crashes caused by accessing a + wrapped pointer after the wrapping is torn down. + +commit f6aa2200f2fb4f4d4bb51e67d68e86aabcac0c4b +Author: Roland "Test-tools" Bär +Date: Mon Aug 6 12:37:52 2007 -0700 + + Probable off by one buffer overflow in .../xorgconfig/xorgconfig.c + + X.Org Bug #11858 + Patch #11005 + +commit e717eb82dc2e55f852919312d04f5cfc8ee55bc8 +Author: Dave Airlie +Date: Thu Aug 2 10:50:01 2007 +1000 + + xserver: stop bcopy from going really slow + + The outport is most likely unnecessary on any currently used hardware, + the byte copy is necessary from what I know on IA64 and friends so leave it. + + Add a new API entry point which lets a driver select the old behaviour if + such a needs is ever found. + + This gives me ~20% speed up on startup on 945 hardware. + +commit 600ef07113caa7a901c7d486bc8ebd1ae47f885c +Author: Tiago Vignatti +Date: Fri Aug 3 15:33:41 2007 -0300 + + Fix kdrive command line parser. + +commit f3955c0a020b39021050cd33c20a17f14fc4b579 +Author: Arkadiusz Miskiewicz +Date: Wed Aug 1 21:04:22 2007 +0300 + + XFree86: xf1bpp: distclean generated files as well + + Make sure we clean up after ourselves: not sure why distcheck didn't flag + this one. + +commit a04c95f4446e5c169dea71019321d790ab4fa139 +Author: Julien Cristau +Date: Wed Aug 1 20:37:05 2007 +0300 + + configure.ac: Fix argument quoting for argv[] + + m4 quoting. Yar boo sux. + +commit 99a88826e5e8cfa25c5f8a88c12799d33114729c +Author: Daniel Stone +Date: Wed Aug 1 20:34:58 2007 +0300 + + configure.ac: Actually use -lrt in monotonic clock test + + If we need -lrt to use clock_gettime, then make sure we link with it. + +commit 1c80e04f876e9254b93ef87eadfcff71234340c6 +Author: Daniel Stone +Date: Wed Aug 1 20:08:31 2007 +0300 + + configure.ac: Disable D-Bus config API support by default + + This is problematic, so don't even bother with it unless someone wants it. + respeclaration is dead, long live HAL. + +commit c46663367329615bd2c9b63e93c9534036e5a2ae +Author: Michel Dänzer +Date: Wed Aug 1 18:32:09 2007 +0200 + + GLX/DRI: Remove some unused variables. + +commit 17cb4f64e3c39725e83b1e311c09422d7e1c0e52 +Author: Michel Dänzer +Date: Wed Aug 1 18:13:18 2007 +0200 + + GLX_EXT_texture_from_pixmap: Use client provided texture target when available. + + This prevents situations where the server doesn't use the target the + client thinks it does, usually resulting in the texture being sampled as all + white. + +commit a4197db9504adae6af005b2218eee36b8af0d98b +Author: Daniel Stone +Date: Wed Aug 1 14:04:51 2007 +0300 + + GL: GLX: Make sure glxbyteorder.h is distributed + +commit ad7421fc764e2b82e20d90f12225a03a1d636f18 +Author: Daniel Stone +Date: Wed Aug 1 08:30:00 2007 +0300 + + Bump version to 1.3.99.1 for development + + This is not actually .1, just bumping for a different devel version. + +commit 43e71a54502d9ab28ece7f6296d1416d60948dad +Author: Daniel Stone +Date: Wed Aug 1 08:16:35 2007 +0300 + + XFree86: xf1bpp: Fix previous build system commit + + Amateur error. + +commit 6d6bc93b0a13c5356544561e326d4aedf33e61c2 +Author: Daniel Stone +Date: Wed Aug 1 08:11:22 2007 +0300 + + Build system: Add missing files + + A couple of headers weren't added to the build. + +commit 505ec436af3a173e0ba32c6f14b4cf9837a553eb +Author: Daniel Stone +Date: Wed Aug 1 08:11:08 2007 +0300 + + XFree86: Properly clean up after ourselves + + CLEAN is not a useful variable. CLEANFILES/DISTCLEANFILES, on the other hand, + are useful variables. + +commit 1ace9770fed4a2ba354ff06a96189428beb36088 +Author: Daniel Stone +Date: Wed Aug 1 08:10:38 2007 +0300 + + Build system: Non-dtrace distcheck hacks + + automake 1.10 really wants foo.c for foo.O, so give it some dummy files to + deal with if it really needs them. + +commit cacbdf18ee771d43228c2e96e8ef9a32251ceb55 +Author: Daniel Drake +Date: Wed Aug 1 08:08:37 2007 +0300 + + Remove duplicated licenses + + Some files had two copies of the same license. + +commit bd49332e4772bd57ffb76c829f0e4770ab876057 +Author: Daniel Drake +Date: Wed Aug 1 08:07:08 2007 +0300 + + Add proper COPYING file + + I went through the entire xorg-server distribution and aggregated all + the licenses I could find (except the questionable GPL files, see my + last mail). + + There are many many permutations on essentially the same license terms, + but I have been pedantic and treated slight differences as separate + licenses. + + Here is a description of the process I used: + + tar xvjf /usr/portage/distfiles/xorg-server-1.1.1.tar.bz2 + + cd xorg-server-1.1.1 + find -name '*.c' -o -name '*.h' | xargs gvim + + egrep -Rli "permission|copyright" * | grep -v "\.[ch]" \ + | grep -v "\.in$" | xargs gvim + + cd .. + tar xvjf /usr/portage/distfiles/xorg-server-1.3.0.0.tar.bz2 + diff -urNp xorg-server-1.1.1 xorg-server-1.3.0.0 + + git clone git://anongit.freedesktop.org/git/xorg/xserver + cd xserver + git diff xorg-server-1.3.0.0.. + + For each file, licenses have been aggregated as follows: + + If 2 files have identical license text but different copyright notices, + the copyright notices are aggregated and the license text + is included only once. + + Note that by identical I mean really identical, i.e.: + 'AUTHOR(S)' is not the same as 'AUTHORS' + 'KEITH PACKARD DISCLAIMS' is not the same as 'KEITH PACKARD AND COMPAQ + DISCLAIM' + + Otherwise, licenses and accompanying copyright notices have been + stacked. + + When going through the changes from 1.1.1 to 1.3.0.0 then HEAD, licenses + have been added and removed (so I have reflected this since the original + version of my COPYING file). It's slightly concerning to see that even + between 1.3.0.0 and HEAD, new license permutations are being added. I'd + suggest that a primary license be chosen and this would be indicated at + the top of this COPYING file. + +commit 51b735394f0aa9f953f9c320617c7a56028ec458 +Author: Daniel Drake +Date: Mon Apr 30 11:37:46 2007 -0400 + + [PATCH] xserver: Add COPYING terms + + I went through the entire xorg-server distribution and aggregated all + the licenses I could find (except the questionable GPL files, see my + last mail). + + There are many many permutations on essentially the same license terms, + but I have been pedantic and treated slight differences as separate + licenses. + + Here is a description of the process I used: + + tar xvjf /usr/portage/distfiles/xorg-server-1.1.1.tar.bz2 + + cd xorg-server-1.1.1 + find -name '*.c' -o -name '*.h' | xargs gvim + + egrep -Rli "permission|copyright" * | grep -v "\.[ch]" \ + | grep -v "\.in$" | xargs gvim + + cd .. + tar xvjf /usr/portage/distfiles/xorg-server-1.3.0.0.tar.bz2 + +commit 7fa58385724fa7f441107a1793b601ba3dcb1f4c +Author: Arkadiusz Miskiewicz +Date: Wed Aug 1 08:01:28 2007 +0300 + + XFree86: xf1bpp: Fix parallel build + + One of the constructs wasn't parallel-build safe: fix that. + +commit 18ab4d559409d4b682aab99fb75f8d861122eab6 +Author: Daniel Stone +Date: Wed Aug 1 07:27:53 2007 +0300 + + Darwin: Remove missing file + + Xserver.m is missing and still hasn't been added, so just remove it for now. + +commit 0bd6fe7401b2524cf34793c0b0c642e3d32fae00 +Author: Daniel Stone +Date: Wed Aug 1 07:27:30 2007 +0300 + + Config: Add missing include + +commit 48b3034d13bbbb69072eb11f4579389cc32b0850 +Author: Daniel Stone +Date: Wed Aug 1 07:01:51 2007 +0300 + + Config: Add current FDI file + + Add the FDI file we're using at the moment, until it gets into upstream HAL. + +commit 82b720cf3e09d8a6adcd40b25c4d48b34ba1ae80 +Author: Daniel Stone +Date: Wed Aug 1 06:57:11 2007 +0300 + + Config: Fix merge detritus + +commit 6b055e5d9751e3679ff98065e43225ec8a960053 +Author: Daniel Stone +Date: Wed Aug 1 06:55:36 2007 +0300 + + Input: Fix stuck modifiers (bug #11683) + + Disclaimer: It's 6:51am. I'm trying to be as understandable as possible. + + What was happening previously was this: + * Press Alt + * Extended event generated and processed: state is now Alt down once + * Core event generated + - keyboard switched: inherited state is Alt down once + - event processed: Alt down twice + * Release Alt + * Extended event generated and processed: state is now null + * Core event generated and processed: Alt down once + + If we switch the order: + * Press Alt + * Core event generated: + - keyboard switched: inherited state is null + - event processed: Alt down once + * Extended event generated and processed: state is now Alt down once + * Release Alt + * Core event generated and processed: state is now null + * Extended event generated and processed: state is now null + + When we carry over the previous state, it needs to be the _previous_ state + (state and modifiersPerKey), assuming that we're going to catch now-core + events for any of these. For example, if Ctrl is held down as we pivot, we + need to carry Ctrl over with a count of one, for which an extended + core + release will then clear. Carrying over the union of the previous state _and + the state resulting from the immediate action_ was what broke things. + +commit 0e0174d45ecbeb7b6dddc4af53da9d6211038e0e +Author: Daniel Stone +Date: Wed Aug 1 03:30:07 2007 +0300 + + XFree86: Allow disabling of HAL + + If NoAutoAddDevices is given as a server flag, then no devices will be added + from HAL events at all. If NoAutoEnableDevices is given, then the devices will + be added (and the DevicePresenceNotify sent), but not enabled, thus leaving + policy up to the client. + +commit cd8e99e56ec5d02026e401cc15e0f8d75f2a4727 +Author: Daniel Stone +Date: Wed Aug 1 03:29:12 2007 +0300 + + Input: Don't enable devices when we open them + + Thanks to Xi's braindead design, it's otherwise impossible to query input + devices without enabling them. Hurrah. + +commit 0a31db14b7c7c21ef550dbcc73a9f649f3613cbe +Author: Daniel Stone +Date: Wed Aug 1 02:54:14 2007 +0300 + + Config: D-Bus core: Fix hook removal + + Make sure we properly initialise the entire hook when adding it, and + bust out when we're done removing. + +commit 89f628394f7d831f2ba1e45c5884c3983bef6031 +Author: Daniel Stone +Date: Wed Aug 1 02:08:02 2007 +0300 + + XFree86: Input: Fix whitespace + +commit aec0d06469a2fa7440fdd5ee03dc256a68704e77 +Author: Aaron Plattner +Date: Tue Jul 31 16:33:37 2007 -0700 + + Fix a crash when rotating the screen. + + Remember output->crtc before setting a NULL mode because RRCrtcNotify now sets + output->crtc to NULL. Use the saved crtc to set the new mode. + +commit a93033b0bc14ed0bb95c680ded26b63cfe5fd1d3 +Author: Daniel Stone +Date: Wed Aug 1 01:53:08 2007 +0300 + + XFree86: Module: Bump input version + + config_info changes the size (and ordering) of DeviceIntRec, so bump the + input major. + +commit 1150969b826e2bd6d8345fa245ed499f2e4cf101 +Author: Daniel Stone +Date: Wed Aug 1 01:52:20 2007 +0300 + + Convert all my license statements to the standard form + + Convert all my license statements to the standard, accepted form: + cf. <20070717142307.GD13478@fooishbar.org> + http://lists.freedesktop.org/archives/xorg/2007-July/026451.html + + keithp's license on configure.ac changed with his verbal permission. + +commit 8658f5d923a69fb55b4cd9e1e84c2d271679f6e2 +Author: Daniel Stone +Date: Wed Aug 1 01:10:50 2007 +0300 + + Hotplug: Add HAL support + + Add support for HAL-based hotplugging, in which we just get the list of + input devices and properties from HAL. Requires an FDI which is not yet + in mainline HAL. + +commit aa75b3481724834da2f855d8dd2ff36074bd5706 +Author: Daniel Stone +Date: Wed Aug 1 01:09:07 2007 +0300 + + Hotplug: D-Bus: Dispatch harder + + Dispatch until we've got nothing left to dispatch, since apparently + dispatching will only ever fire a single message ... + +commit 4d238c5c67461ed747aa6c021d1532734f4c63fe +Author: Daniel Stone +Date: Wed Aug 1 01:08:26 2007 +0300 + + Input: GetPointerEvents: Deny events from devices without valuators + + For some reason, my keyboard has 25 mouse buttons, but zero valuators. This + causes GPE to blow up spectacularly, trying to get (and set) co-ordinates from + devices without valuators. For now, just prevent this from ever happening, + and whack a dirty great FIXME in. + +commit 7c9e8fd56e1830f7a971187d14877ebbdf35c4b0 +Author: Daniel Stone +Date: Wed Aug 1 00:19:14 2007 +0300 + + Input: Allow enabling and disabling of devices + + Add DEVICE_ENABLE to KDrive and XFree86 to allow us to enable and disable + devices on the fly. + +commit 0afeb0241a83796575da827bd81375c99ff10af5 +Author: Daniel Stone +Date: Sun Jul 8 20:48:57 2007 +0300 + + DIX: Clean up null root cursor handling + + Move the null root cursor handling out of main() and into CreateRootCursor. + +commit 62ec6d09b3adaea82ff52c8672e6f611c15ec56d +Author: Daniel Stone +Date: Sun Jul 8 20:47:28 2007 +0300 + + dix.h: Remove duplicate ffs() prototype. + +commit 4d3379d418a781938358e511fd41deb4115a032c +Author: Daniel Stone +Date: Sun Jul 8 14:31:35 2007 +0300 + + Fonts: Fix builtin fonts + + Make sure the font path is always 'built-ins' when we use built-in fonts, + rather than having it as a fixed path for a while, then clobbering it + halfway through startup. + +commit 9ac7e8a559fe6008cafc95e8264680c50e72ba19 +Author: Daniel Stone +Date: Sun Jul 8 14:30:53 2007 +0300 + + Hotplug: D-Bus: API version 2 + + Use uint32s instead of int32s where practical, and add an API version + request. Also, try to return all devices added, not just the first, + and box device arguments. + +commit 1cdadc2f43d9069572814510d04b1a560c488fcb +Author: Daniel Stone +Date: Sun Jul 8 14:28:58 2007 +0300 + + Hotplug: Separate D-Bus into core and hotplug API components + + Break up D-Bus into two components: a D-Bus core that can be used by any + part of the server (for the moment, just the D-Bus hotplug API, and the + forthcoming HAL hotplug API), and the old D-Bus hotplug API. + +commit 8bfa41e1bf3f588780d7e9f6f900b1fde0570a7e +Author: Daniel Stone +Date: Sun Jul 8 04:29:43 2007 +0300 + + gitignore: Add automake lex/yacc wrapper + +commit 06dd2748da8b7af343f6cab409b9f351567de5f3 +Author: Daniel Stone +Date: Sun Jul 8 00:27:40 2007 +0300 + + configure.ac: Properly check XFree86 proto modules + + Not sure why these are conditionals, anyway. This one really needs + revisiting, but at least causes configure, rather than the compilation, + to bomb out. + +commit fd10312b4224197b937d9e696b53dc2a16c8912f +Author: Daniel Stone +Date: Sun Jul 8 00:26:26 2007 +0300 + + configure.ac: Fix KDrive VESA/fbdev conditionals + + Make sure we actually respect anything explicitly given on the configure + line, instead of just stomping it with what we detect. + +commit f37612c6f2375ca904411e6caa0be19fa24f032c +Author: Nicolas Trangez +Date: Sun Jul 8 00:23:57 2007 +0300 + + Hotplug: Remove unused function definition from hotplug.h + + configDispatch hasn't been used in a long time. + +commit 951c058e7800308f7c472e77178c14400f45c1b3 +Author: Aaron Plattner +Date: Tue Jul 31 14:23:58 2007 -0700 + + Don't fail compScreenInit if the driver added its own alternate visuals. + +commit 722d73a0ef54c2ebd8ef38c4a6afa0e7c5aa3e30 +Author: Dave Airlie +Date: Tue Jul 31 10:34:56 2007 +1000 + + Revert "Fix RandR 1.2 conversion of two colour to ARGB cursor on MSB first platforms." + + This reverts commit 0f057ebb272f0ee0b51b9ab37d4b07da0924fec4. + + This screws my cursor up just starting a bare X server on Intel, + I get the X more like <> than ><.. + +commit 57b5b97a0710fc043b8a1c01d756cdb73dfe4567 +Author: Adam Jackson +Date: Sun Jul 29 11:02:47 2007 -0400 + + ReduceCompositeOp returns a Render op, not a boolean. + +commit f62beb6f3609e8b6e61325ac89017590811bbd07 +Author: Adam Jackson +Date: Fri Jul 27 13:23:15 2007 -0400 + + Remove all trace of Option "BiosLocation". + + This code was deeply dangerous. If anyone actually had a use for this code, + we should find a better way of doing it. + +commit 486fd4145aed93093d1f1655de40c0a8582bb8b1 +Author: Adam Jackson +Date: Fri Jul 27 13:10:39 2007 -0400 + + exaGetPixmapFirstPixel: avoid framebuffer readbacks if possible. + + If the pixel in framebuffer memory isn't modified since we uploaded it, we + can just read from the system memory copy, wihch avoids both a readback and + an accelerator stall. + + In principle this function is still wrong, and all the framebuffer pixel + access should be going through (w)fb so we can get pixel layout corrections. + +commit 50cb6c7e4419e067c1f080d1de940811d21fc725 +Author: Kristian Høgsberg +Date: Fri Jun 15 15:29:00 2007 -0400 + + Don't map the front buffer in libdri if the ddx driver doesn't set the size. + + This lets drivers map the front buffer themselves + by setting dontMapFramebuffer. + +commit cec793ef7a6dac9fa2a6538683e363a72672cde9 +Author: Aaron Plattner +Date: Thu Jul 26 11:49:46 2007 -0700 + + Include picturestr.h in xf86Crtc.h to pick up definition of PictTransform. + +commit 27845fe197b74bf453d99f352e83513e201fdaae +Author: Adam Jackson +Date: Thu Jul 26 09:32:16 2007 -0400 + + libconfig shouldn't be an installed library. + +commit 276f8e2ca42eec982d16b86d67217d68ff98f81d +Author: Alan Coopersmith +Date: Wed Jul 25 17:42:23 2007 -0700 + + Include comment/copyright/license for AC_DEFINE_DIR in acinclude.m4 + +commit eba2be448bdd298ff2f7b8603bd9e976da1fdf72 +Author: Brice Goglin +Date: Wed Jul 25 20:53:45 2007 +0200 + + Minor fixes in cvt and gtf manpages + + Reported by "A. Costa" in + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=432065 + +commit 8d230319040f0a7f72231da2bf5ec97dc3612e21 +Author: Gustavo Pichorim Boiko +Date: Tue Jul 24 16:19:19 2007 -0300 + + Fix the output->crtc initialization in the old randr setup + +commit 0f057ebb272f0ee0b51b9ab37d4b07da0924fec4 +Author: Michel Dänzer +Date: Wed Jul 25 17:04:04 2007 +0200 + + Fix RandR 1.2 conversion of two colour to ARGB cursor on MSB first platforms. + + Doesn't seem necessary to do anything here... + +commit 5b424b562eee863b11571de4cd0019cd9bc5b379 +Author: Gustavo Pichorim Boiko +Date: Mon Jul 23 18:27:41 2007 -0300 + + Set the crtc before the output change is notified + + Set the new randr crtc of the output before the output change notification is + delivered to the clients. + Remove RROutputSetCrtc as it is not really necessary. All we have to do is set + the output's crtc on RRCrtcNotify + +commit 7da38bb6a15247948c90e00a59230453fcf13cbd +Author: Adam Jackson +Date: Sat Jul 21 15:27:40 2007 -0400 + + Partial redundancy elimination in PropertyNotify generation. + +commit 0f91abd5c68eb044d09733d18ef0f6b8ed128200 +Author: Julien Cristau +Date: Thu Jul 19 20:37:26 2007 -0400 + + Fix alpha build failures + + Don't include in os-support/linux/lnx_axp.c, use "lnx.h" and + instead + +commit dc9c5196282ba61bd542e198dfe0d53d93181591 +Author: Keith Packard +Date: Thu Jul 19 13:28:00 2007 -0700 + + Make PreferredMode option in config file override EDID mode preferences. + + When the PreferredMode option is selected in the config file, remove the + M_T_PREFERRED bit from all other preferred modes to force the config file + mode to be selected. + +commit 73a93c5a6b68f7ba21f9e75f50b1032603a3b39e +Author: Keith Packard +Date: Thu Jul 19 13:26:36 2007 -0700 + + Query modes on disabled (but not ignored) outputs. + + Code that disabled mode detection on disabled outputs would confuse + applications by listing said outputs as connected but without any modes. + This makes the disabled state in the config file affect only the initial + configuration and not subsequent modifications by RandR. + +commit 9fc36a391c11170cde1a28f548a2cae5f6f20d5b +Author: Keith Packard +Date: Sat Jul 14 12:36:15 2007 -0700 + + Make pending property changes trigger mode setting. + + The DDX code was ignoring pending properties for computing when mode setting + was required. This meant that configurations differing only in property + values would not cause the mode to be set. + +commit aed6569309223ecc7e26fa84e4d430e422455607 +Author: Adam Jackson +Date: Sat Jul 14 15:21:46 2007 -0400 + + Refactor how Composite adds visuals to the screen. + + Besides being slightly simpler to read, it's now trivial to add a depth-16 + visual to a depth-24 screen just by adding a line for it in the alternate + visual list. Visuals for indexed depths are slightly tricky still. + +commit 21bbd7d64b5f74915afd7a312e589654442f3461 +Author: Adam Jackson +Date: Tue Feb 6 21:42:50 2007 -0500 + + Delete some pre-dlloader debugging scaffolding. + + If your loader is as bad as elfloader, then it makes sense for the + server to have some stubs for you to assign to / break on. However it + is no longer 1996. + +commit 1f71f0c0574bafb36da20fec669f9a1138c69a47 +Author: Adam Jackson +Date: Tue Feb 6 21:28:03 2007 -0500 + + Remove (long-)deprecated xf86EnablePciBusMaster. + +commit 0a63d874e9c2f4fe4b38839a744461f9d41040b2 +Author: Adam Jackson +Date: Tue Feb 6 21:22:49 2007 -0500 + + Always normalize the module name. + +commit 9a1c6afd12caf0143483f72bfbba0c4c3daaa6ff +Author: Adam Jackson +Date: Tue Feb 6 21:19:50 2007 -0500 + + Remove dead code for screen crossing. + +commit 8ca2fe8914af1a67bf597f99025e5cbe9b08da57 +Author: Adam Jackson +Date: Tue Feb 6 21:11:13 2007 -0500 + + Delete dead module test code. + +commit e2413cc7cae4e578b8e9b408ea85bef596b03ea3 +Author: Adam Jackson +Date: Tue Feb 6 21:07:37 2007 -0500 + + Remove MEMDEBUG + + This existed (but may not have worked) in the monolith, but is gone now. + +commit d1d65a84150dfbc3a4dbe108f237a85ab6e09bbb +Author: Adam Jackson +Date: Tue Feb 6 21:01:08 2007 -0500 + + Dead ifdefs for BITMAP_SCANLINE_UNIT == 64 + + This appears to be a legacy of cfb24 not being smart enough to deal with this + case. But since cfb24 unexists, die die die. + +commit cbe74394a5ed21ed80c0aab6eefd2716122cce11 +Author: Adam Jackson +Date: Tue Feb 6 20:44:34 2007 -0500 + + Nuke dead X -configure code. + +commit 5657fb065cc79ba3ca5a836f45637ba9894f9abf +Author: Dodji Seketeli +Date: Tue Jul 17 12:12:02 2007 +0200 + + exaDriverInit: Fail if pScreenInfo or a member of it is invalid. + + EXA may attempt to use the invalid value and crash otherwise. + +commit bbe7ce10fa93017374d7a4611427b70a22d7507a +Author: Alan Coopersmith +Date: Mon Jul 16 17:25:59 2007 -0700 + + Update pci.ids to 2007-07-16 snapshot + + Remove nvidia ids in extrapci.ids that are now in pci.ids + Add nvidia ids to extrapci.ids that are in xf86-video-nv but not pci.ids + +commit ac979c165128704116cd40086320b6edc79018e2 +Author: Keith Packard +Date: Sat Jul 14 12:13:17 2007 -0700 + + MakeAtom needs length without trailing NUL. sizeof("string") includes NUL. + + I made a mistake in some new code using MakeAtom, passing the size of the + string instead of the length of the string. Figuring there might be other + such mistakes, I reviewed the server code and found four bugs of the same + form. + +commit 393171034c15d8a1b82232b8f9455a358035e932 +Author: Keith Packard +Date: Sat Jul 14 09:03:40 2007 -0700 + + Add RandR reflection support. + + Replace the ad-hoc transformation mechanisms with matrices. + Prepares for more general transformation as well. + +commit 8773ad023eb28950eb0f802d2ca31a67f84adddc +Author: Keith Packard +Date: Sat Jul 14 08:47:50 2007 -0700 + + Screen size bounds check in ProcRRSetCrtcConfig not masking out reflections. + + When checking how to validate the selected mode and position against the + current screen size, the test against 90/270 rotation did not mask out + reflection, so that when reflection was specified, the 90/270 test would + never succeed. This caused incorrect bounds checking and would return + an error to the user instead of rotating the screen. + +commit 881a620b4d6ea7a54af14c8f8fbe6924c9aa9291 +Author: Keith Packard +Date: Sat Jul 14 08:45:10 2007 -0700 + + When sync'ing logfile, also flush it. + + When the logfile is set to sync, the actual sync occurs whenever the log + file is flushed. If the log file is not also set to flush, no syncing + occurs. + +commit 031b009ea678809bf1ddca883c2082b304c408c9 +Author: Alan Coopersmith +Date: Fri Jul 13 14:54:45 2007 -0700 + + Use %S instead of %s for strftime seconds when printing build time + +commit c0e91777a9874fe2cd9a7e9180263f512c1e8f8d +Author: Alan Coopersmith +Date: Thu Jul 12 16:37:11 2007 -0700 + + Add __SOL8__ to xorg-server.h.in since xf86-input-kbd needs it to build + +commit 6b4231e3b5b49b731c9a00930ae465fff8539831 +Author: Alan Coopersmith +Date: Thu Jul 12 16:36:27 2007 -0700 + + Use kbd driver when xorg.conf specifies "keyboard" or "Keyboard" (bug #11301) + + X.Org Bug #11301 + Sun Bug #6560332 + +commit 9fcb30ebf7b7b2137955f759e95c1d58c4f27a11 +Author: Alan Coopersmith +Date: Thu Jul 12 13:00:32 2007 -0700 + + Make SOLARIS_INOUT_ARCH substitutions work better with automake-1.10 + +commit 7c0ca27f6dd0a800dc27429a33dbc8e133f9a9c1 +Author: Alan Coopersmith +Date: Wed Jul 11 17:15:29 2007 -0700 + + "fbpict.c", line 215: void function cannot return value + +commit 0a4e9311158ed3ecda0722640f860ace2f87a97e +Author: Hanno Boeck +Date: Thu Jul 12 10:17:07 2007 +1000 + + xnest: fix linking since dbus + + Fixes bug 8955 + +commit b2f9ca6ac400d426d7a1ef0162f7e7ce28288dd1 +Author: Keith Packard +Date: Tue Jul 10 21:33:34 2007 -0700 + + Redirect fix: Manual + Automatic - Manual = Automatic + + A window with redirect manual *and* redirect automatic which loses the + manual redirecting client becomes redirect automatic. + +commit 561989f2f0fc31e3d3bf8df978a9cb3d4c85af59 +Author: Keith Packard +Date: Tue Jul 10 21:06:51 2007 -0700 + + Generate ChangeLog file for make dist. + + Copy Makefile.am snippet which generates a complete git change history to + the ChangeLog file during the distribution generation process. + +commit e316fa59fea8b7b18cdf3a227890351a9567ec65 +Author: Adam Jackson +Date: Tue Jul 10 14:20:55 2007 -0400 + + Add per-monitor config file option for maximum pixel clock. + +commit 161624a5a45808fd56141dc2c64be729944f03ed +Author: Michel Dänzer +Date: Tue Jul 10 09:02:40 2007 +0200 + + GLX: Only build code dealing with GLXPixmap damage field when DRI is enabled. + +commit 4abd00dab7e648dab8172f6009371e4e63d0c521 +Author: Michel Dänzer +Date: Tue Jul 10 09:02:08 2007 +0200 + + Make sure DRI drawables are cleaned up when client dies. + + The previous scheme didn't work when the client didn't create the core drawable, + e.g. the root or composite overlay window. Use refcounting via special client + resources to fix that. + +commit 5957aa6fdc580ccad4557eeefa0636ffad823f33 +Author: Michel Dänzer +Date: Mon Jul 9 08:47:05 2007 +0200 + + Fix regression from recent composite changes. + + One pWin->redirectDraw test was converted incorrectly, causing incorrect + rendering in some cases. + +commit bcb23527421578bd4c9397d4c2c19cbefa22fc59 +Author: Adam Jackson +Date: Thu Jul 5 15:56:25 2007 -0400 + + Clean up unused #ifdefs from fb. + +commit 9ff7ff2fda30f334515b16ef0867c1500c41bc0f +Author: Keith Packard +Date: Wed Jul 4 23:38:27 2007 -0700 + + Fix MEMORY SMASH in XkbCopyKeymap. + + XkbCopyKeymap reallocates the destination keymap when it is not large enough + to hold the source data. When reallocating the map->types data, it needs to + zero out the new entries. The computation for where to start bzero'ing was + accounting for the size of the data type twice, once implicitly in the + pointer arithmetic, and once explicitly with '* sizeof (XkbKeyTypeRec)'. + This would often lead to random memory corruption when the destination + keymap had existing map->types data. + +commit 9131d560a0d42067cc4e726e445e060216c9acdc +Author: Tiago Vignatti +Date: Thu Jul 5 02:47:34 2007 -0300 + + Postpone options variable assignment to fix segfault when we got a device but + its driver is incorrect. Also if (!ki && !pi) can never be true. + + This one also adds the device option field. + +commit 41b485d5507821e41c3281c3c565647ae7582101 +Author: Tiago Vignatti +Date: Thu Jul 5 02:40:07 2007 -0300 + + kdrive must to know that devices are unplugged. + +commit a92dc6b5295e4f352115fed2856169929819863f +Author: Tiago Vignatti +Date: Thu Jul 5 02:28:14 2007 -0300 + + Remove redundant linking in kdrive. Fix configure.ac variable name and clean + it up a little. + +commit 41b5155c8be75c4e171c0f64616cc09598b8ec54 +Author: Tiago Vignatti +Date: Thu Jul 5 01:57:41 2007 -0300 + + For each kdrive server put a dependencie on its own libraries. + +commit 16e429bcbf2f62cfc58162ab2857afb7376dda41 +Author: Jonathan Lim +Date: Wed Jul 4 20:08:49 2007 +0200 + + Bug 5000: Fix domain support for SGI Altix + +commit f106c04b627d9f57b38627971dc79c75129e66d6 +Author: Keith Packard +Date: Tue Jul 3 14:47:19 2007 -0700 + + Have Composite always report server version. + + It was reporting the lessor of the server and client versions, which doesn't + make sense with the 0.4 semantic change in clipping. + +commit 4f88d68bdb90cc7d12170355105b4fd020acd306 +Author: Keith Packard +Date: Tue Jul 3 14:43:17 2007 -0700 + + Force advertised Composite version to 0.4 instead of using header version. + + Installed protocol header version may be newer than the server code base. + Use internal version number for Composite extension to make sure the server + doesn't advertise capabilities it doesn't support. + +commit 866f092ca0160a366add01b48ad03438926c4d16 +Author: Keith Packard +Date: Tue Jul 3 14:29:11 2007 -0700 + + Make Composite manual redirect windows not clip their parent. + + This patch changes the semantics of manual redirect windows so that they no + longer affect the clip list of their parent. Doing this means the parent can + draw to the area covered by the child without using IncludeInferiors. More + importantly, this also means that the parent receives expose events when + that region is damaged by other actions. + +commit 2a75c774975b50dd4e71b7dbea7bd65ca2984a43 +Author: Dodji Seketeli +Date: Tue Jul 3 11:00:29 2007 +0200 + + ExaOffscreenMarkUsed: Don't crash when there's no offscreen memory. + +commit 0ede39a25cf5b0b6c2c89677f810c21ce42b95df +Author: Michel Dänzer +Date: Tue Jul 3 10:55:13 2007 +0200 + + Fix build when int10 doesn't use x86emu. + +commit 028a00bc518dc6908839e8ce7c50ab1837100945 +Author: Adam Jackson +Date: Mon Jul 2 18:41:55 2007 -0400 + + Make x86emu's I/O cycle tracing more useful. + + Print debug messages only when the appropriate debug bit is set in the + 8086 state vector, so you can focus in on the call you're actually + interested in. + +commit 00e8295b7e0c7c0ba97707903004272818e3d87d +Author: Gero Mudersbach +Date: Mon Jul 2 11:40:11 2007 -0700 + + Bug #10814: Add needed quirk for Samsung 225BW like the 226BW. + +commit 667e95f2e8389d9f23c50446d6d664eddd16d260 +Author: Eric Anholt +Date: Mon Jul 2 11:36:11 2007 -0700 + + Correct the xf86EdidModes.c file description. + +commit 3de1f0d03b329b01856f664651db23ffefb58646 +Author: Eric Anholt +Date: Tue May 29 10:08:58 2007 -0700 + + Fix documentation of association of outputs to monitor sections in xorg.conf(5) + +commit 4d76075dbb618a47ff9fc15c4be2e2d34210fa8d +Author: Adam Jackson +Date: Fri Jun 29 14:06:52 2007 -0400 + + Death to RCS tags. + +commit 2691c05fd647d9fa10f791ac397ecb9c423a076f +Author: Peter Hutterer +Date: Fri Jun 29 11:56:18 2007 +0930 + + Make sure window->optional is allocated before assigning it. + + DeletePassiveGrabFromList() may remove the window optional, so we need to + re-alloc it if it isn't there anymore. + + Thanks to Colin Harrison for spotting the bug. + +commit f7f3fe7fe7233a2ffc43106c48f44cbbd82b7c19 +Author: Adam Jackson +Date: Thu Jun 28 18:59:05 2007 -0400 + + Remove the remnants of OS/2 support. + + This has never worked in any modular server release, and as far as I know + was never tested in 6.7 through 6.9. + +commit 8a06ff9ffa4816d192e58e43e7fe569b97b4dd7c +Author: Adam Jackson +Date: Thu Jun 28 16:41:28 2007 -0400 + + Fix another usage of MAX_PCI_DEVICES. + + Fixes cases where the VGA device is above the 128th device on the system. + +commit 928836a5abd85466e920eb487fab9ccb295e0c5b +Author: Adam Jackson +Date: Thu Jun 28 16:29:28 2007 -0400 + + Bug #10770: "Inputdevs" isn't a valid config file keyword. + +commit 62f43d8b33f67d8f3d0bd65787ffae9e6b634d65 +Author: Tiago Vignatti +Date: Wed Jun 27 16:24:42 2007 -0300 + + Relink properly all kdrive servers when changes happen. + +commit 3860996d5666b76600b1537e2cbd58e36b086308 +Author: Tiago Vignatti +Date: Wed Jun 27 16:06:12 2007 -0300 + + Remove double-defined. + +commit 1e189ed1daab58c1de67d387306fde0a9e7984a4 +Author: Aaron Plattner +Date: Wed Jun 27 10:16:40 2007 -0700 + + Handle tileStride > 1 in fbEvenTile. + + Patch courtesy of James Jones. + +commit bf1ad1aa4270dccf1540943d97e80b317c0adb56 +Author: Adam Jackson +Date: Wed Jun 27 09:19:28 2007 -0400 + + Add VBE PanelID support. + + Originally found only in the i810 driver. + +commit d73835efda4995a310188537233a984f4b73628d +Author: Tiago Vignatti +Date: Wed Jun 27 03:34:13 2007 -0300 + + More janitor work. Remove 'defined but not used' warnings from kdrive and some minor cosmetic. + +commit 38f8e536684193c3f70b23be22d818053c676072 +Author: Tiago Vignatti +Date: Wed Jun 27 03:19:37 2007 -0300 + + Janitor work. Remove 'defined but not used' warnings from xorg and other cosmetic. + +commit 1340f34ec98c41781164018d43bd7bb858d8132b +Author: Tiago Vignatti +Date: Wed Jun 27 03:04:55 2007 -0300 + + Fix kdrive XKB. + +commit 9725516b4274ceaf9d6caf372c5439b4c9db2316 +Author: Alan Coopersmith +Date: Fri Jun 22 17:05:21 2007 -0700 + + Split checks for dtrace & getpeerucred() + +commit edb9ccf3ecb4e35a840aa13815979c5fbd73f32d +Author: Michel Dänzer +Date: Mon Jun 25 10:51:38 2007 +0200 + + Make sure DRIScreenPrivIndex is -1 when no DRI screen private is allocated. + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=11340 . + +commit 4c601b904ee6fb01da3343ff9ef00d36f1341fcb +Author: Peter Hutterer +Date: Mon Jun 25 10:53:05 2007 +0930 + + configFiles(): don't return anything when declared as void. + +commit bec4e47d128ec40b58a2c9aae475f6a6fc4323c3 +Author: Peter Hutterer +Date: Mon Jun 25 10:51:42 2007 +0930 + + NULL-terminate device list when synthesizing core devices. + + This fix is required for 93ca526892c0d22afa05cce6496198c652043a19 to work. + +commit 8e5102b9f01821048e72e7f068193a0b3e1816f9 +Author: Peter Hutterer +Date: Thu Jun 21 15:47:48 2007 +0930 + + Set the detail field for DeviceKeyEvents to the keycode. + + (cherry picked from commit 0c33dc152e372cdc8ae59d9a5696b0774bcd03b7) + +commit 87564543d92c1ee1f8cb6fb9716a15d693e08cf5 +Author: Peter Hutterer +Date: Tue Jun 19 18:20:05 2007 +0930 + + Only decrement buttonsDown when the button count is greater than 0. + + Device drivers flush their buttons on device init and cause a button down + event to be generated. If we unconditionally decrease the buttons, we won't be + able to ever get a passive device grab. + + Format documentation for CheckDeviceGrabs to make it readable. + (cherry picked from commit 3e894974cdd6a75683d4601f71622d1da7ec4395) + + Conflicts: + + Xi/exevents.c + +commit 24ee89fd60f489f2d3af0399e0d667057df74d02 +Author: Peter Hutterer +Date: Tue Jun 19 15:31:56 2007 +0930 + + Add a few comments to devices.c + +commit 93ca526892c0d22afa05cce6496198c652043a19 +Author: Peter Hutterer +Date: Wed Jun 13 15:28:15 2007 +0930 + + Split up memory for devices configured in the config file. + + If we're using a continuous block here, we segfault when a device removal + triggers an xfree call. + +commit b141b85c254afff3ce2221d899787fab3dc295bd +Author: Peter Hutterer +Date: Wed Jun 13 15:26:03 2007 +0930 + + Check for identical grabs when adding a new passive grab. If an identical grab + + exists, remove the old one and prepend the new one. + + X.org Bug 2738 + +commit 19cde59c41cf167cc609debfee75bfc015beac12 +Author: Søren Sandmann Pedersen +Date: Fri Jun 22 00:38:50 2007 -0400 + + In fbFill() make sure the drawable is validated when pixman_fill() succeeds. + + In fbSolidBoxClipped() don't return when pixman_fill() succeeds. + +commit d2177c80915f2fe2e8a5c948d4ba2fa51dbfbea2 +Author: Keith Packard +Date: Fri Jun 22 02:08:21 2007 +0100 + + Skip driver mode detection/configuration when !vtSema. + + When the server is not active, make sure the driver functions related to + mode setting are not called. + +commit e523859a952d49b20f3d10152cc0ef695d2c12a1 +Author: Alan Coopersmith +Date: Wed Jun 20 17:54:38 2007 -0700 + + Include module name in "already built-in" message + +commit 5138f710a1574fef6f553f3fe2fccac0620d2584 +Author: Arcady Goldmints-Orlov +Date: Wed Jun 20 16:31:55 2007 -0700 + + Fixed fbSolidBoxClipped() to fill the right place. + + Changed an X2 to a Y1. + + Signed-off-by: Aaron Plattner + +commit c9b79a355845c895aca8303a39798264d80b6212 +Author: Michel Dänzer +Date: Wed Jun 20 18:56:06 2007 +0200 + + exaPolyFillRect: Don't track damage explicitly. + + All callers should already do it. + + Also don't leak pReg. + +commit 87966c5d2889873cea6cbc16b7e4399490dfaec1 +Author: Michel Dänzer +Date: Wed Jun 20 18:42:00 2007 +0200 + + exaGetImage: Don't migrate or try to accelerate for 1x1. + + This is mainly to avoid wasting effort for XSync(), but just reading a single + pixel directly is probably faster than DownloadFromScreen anyway. Though in + light of the latter, even larger thresholds might be useful. + + Also move the swappedOut check before the migration checks because migration + can't actually occur when swapped out. + +commit 40f27a2df4906d9ceb1c78f6163a62c497321535 +Author: Michel Dänzer +Date: Tue Jun 19 09:11:16 2007 +0200 + + mieqEnqueue: Make local queue tail variables unsigned. + + So the modulo arithmetic actually works as intended... thanks to Peter Hutterer + for pointing out the problem. + +commit 2e7fef7d0837939e822c40b6ac77e7f0e66d57bd +Author: Adam Jackson +Date: Mon Jun 18 12:08:39 2007 -0400 + + Make xf86{En,Dis}ableInterrupts no-ops on Linux. + +commit 831d3b7f8d053aba649c8d04af3bef96376bdc3a +Author: Lennart Buytenhek +Date: Mon Jun 18 12:05:55 2007 -0400 + + Compile fixes for Linux ARM platforms. + +commit 562ca3f2f9005e7c5ed0a24b0759051ded2173e9 +Author: Zephaniah E. Hull +Date: Mon Jun 18 12:00:49 2007 -0400 + + In NewInputDeviceRequest, only call EnableDevice if xf86Screens[0]->vtSema is + true, preventing unwanted behavior in the case where a device is added while + the user is in a different VT. + +commit 42c2e14b254f6f882b3e79444360ab855db43e27 +Author: Matthieu Herrb +Date: Fri Jun 15 00:14:02 2007 +0200 + + swap xOrigin and yOrigin in SProcRenderSetPictureClipRectangles. + + Fixes Xrender clipping rectangles when X server and client are of + different endianness, shown by xterm 225 among others. + +commit 78179ae827bb5d19abb1340084362bc51ad5c1e5 +Author: Søren Sandmann Pedersen +Date: Mon Jun 11 22:46:42 2007 -0400 + + Remove fbmmx.[ch] files + +commit eb2d7fe02f9cbca57b462bba05498e2d59316fbc +Author: Søren Sandmann Pedersen +Date: Mon Jun 11 22:43:01 2007 -0400 + + Replace fbFillmmx() with pixman_fill() and remove fbmmx.[ch] + +commit f52ae237d3eec79ccd64cdd77271aeacc37af70c +Author: Søren Sandmann Pedersen +Date: Mon Jun 11 22:02:39 2007 -0400 + + Require pixman 0.9.2 + +commit d1d85c04e248f46b1cf1b1d25fdd56aa69b8f0ee +Author: Søren Sandmann Pedersen +Date: Mon Jun 11 21:25:42 2007 -0400 + + Delete fbBltmmx(). + +commit 3f9adb18f127318d054f30a57e3a77176e14c692 +Author: Søren Sandmann Pedersen +Date: Mon Jun 11 15:19:27 2007 -0400 + + Port a few forgotten fbSolidFillmmx()'es to fbFillmmx(). Use pixman_blt() instead of fbBltmmx() + in fbCopyNToN(). + +commit d06099b38e8445e6e31f5178ffefcc31a71080ef +Author: Søren Sandmann Pedersen +Date: Mon Jun 11 13:28:24 2007 -0400 + + Remove fbCopyAreammx() and fbSolidFillmmx() + +commit d4a034370c8ae71b2cc4fe824ceee58b19624f35 +Author: Søren Sandmann Pedersen +Date: Mon Jun 11 13:26:24 2007 -0400 + + Split fbSolidFillmmx() into a new FbFillmmx() function. Call that from fbFill(). + +commit 3210902a7334f3d8d6c18a34a3cb3f55803b0043 +Author: Søren Sandmann Pedersen +Date: Mon Jun 11 13:14:50 2007 -0400 + + Split fbCopyAreammx() into a new fbBltmmx() function; call this + + function from fbCopyNToN(). + +commit 8d5f4368eac1b259db3e61f877a4cc10f04efa2f +Author: Clark Rawlins +Date: Mon Jun 11 16:53:38 2007 +0200 + + Really make sure BUILD_TIME doesn't have a leading zero. + + date +'%k%M%S' still gives a leading zero in the hour after midnight... + + Add a leading 1 and remove it in xf86PrintBanner(). + +commit 54e023cec07aa7e392da36e11d0a4667b8341370 +Author: Søren Sandmann Pedersen +Date: Mon Jun 11 09:16:46 2007 -0400 + + Don't pass regions to pixman_image_composite() anymore. + +commit 5cbec267b6426960c90f6bcff1d051af5084538c +Author: Michel Dänzer +Date: Mon Jun 11 12:38:41 2007 +0200 + + Make sure BUILD_TIME doesn't have a leading zero. + + It causes the compiler to treat it as an octal constant instead of decimal as + intended, which could even cause a build failure in the cases of 08 and 09. + + Thanks to Clark Rawlins for pointing out the problem. + +commit 1aceec61ff203848576c47a1eab13f90a67d7176 +Author: Michel Dänzer +Date: Mon Jun 11 09:23:19 2007 +0200 + + DRI: Clip cliprects obtained from DRIGetDrawableInfo to screen dimensions. + + This is to avoid issues with redirected windows which are located partly or + fully outside of a screen edge, resulting in unusual cliprects which the 3D + drivers generally can't handle. The symptoms in such cases would be incorrect + rendering or even crashes or hangs. + +commit 5d896e43fd056d935935b4eb66562791edc247a1 +Author: Michel Dänzer +Date: Mon Jun 11 09:23:19 2007 +0200 + + DRITreeTraversal: Stop walking tree when we've seen all DRI windows. + +commit 0fb44c6f9a0415184818ba8357a21ff920e907dc +Author: Michel Dänzer +Date: Mon Jun 11 09:23:19 2007 +0200 + + DRI: Fix build warning. + +commit 644f7ddc0cb029e2ebca43742fd8a46a1a3f4c9f +Author: Michel Dänzer +Date: Mon Jun 11 09:23:18 2007 +0200 + + dixLookupClient: Use access parameter. + +commit 30a3297fed9af3a594aba0875a8f58a0a38b33fc +Author: Michel Dänzer +Date: Mon Jun 11 09:23:18 2007 +0200 + + mieq queue handling cleanups. + + In particular, fix handling of wraparounds in mieqEnqueue. + +commit c1a49a9269f14b6975a1a2c751bb179757373f11 +Author: Adam Jackson +Date: Sun Jun 10 22:14:57 2007 -0400 + + GNU is wrong and ` is not left-quote. + +commit 67a0a4da1a225ee3bd6bbd1846f8141fe333c884 +Author: Dave Airlie +Date: Mon Jun 11 11:55:11 2007 +1000 + + update xproto dependency to at least 7.0.9 + +commit c079cce9d884ab03f305b3fba4a4e1247c023480 +Author: Daniel Ciocea +Date: Fri Jun 8 18:12:21 2007 -0700 + + Fix sync polarity on Samsung SyncMaster 205BW monitor. + + need to use standard VESA sync polarity instead of the + EDID provided -hsync -vsync values. + +commit 9c47b86bd9a4633fda5fd305a09ac8623187efa0 +Author: Aaron Plattner +Date: Thu Jun 7 13:57:12 2007 -0700 + + Add new fb symbols to wfbrename.h. + + Avoids crashes when wfbComposite calls the wrong image_from_pict. + +commit 567b5bf765254a4ae9cc7711bb6acfa89a9fd61c +Author: Søren Sandmann Pedersen +Date: Tue Jun 5 20:26:49 2007 -0400 + + Delete fbCompositeCopyAreammx() + +commit 49ed31c0b323dd8c5887a803c199875e6f2330d8 +Author: Søren Sandmann Pedersen +Date: Tue Jun 5 17:44:21 2007 -0400 + + Remove most of the fast-path MMX operations from fbmmx. fbCopyAreammx + + and fbSolidFillmmx are still needed by other code. + +commit dfbe32b5b828cc4e3da36a0e2e6ad641164eaa5e +Author: Adam Jackson +Date: Mon Jun 4 18:07:00 2007 -0400 + + Remove the old Kerberos 5 authentication code. + + Before you complain, this code hasn't seen material change since at least + X11R6. It certainly does not build with any modern version of Kerberos. + Anybody wanting krb5 auth to their X server should probably be using + GSSAPI instead of internal krb5 API anyway. + +commit 75dece08fb72803d5116e6776e9f1534ff20e37b +Author: Zephaniah E. Hull +Date: Mon Jun 4 09:09:20 2007 -0400 + + xf86PostMotionEvents[P] calls xf86SendDragEvents, xf86SendDragEvents + unconditionally checks device->button->buttonsDown. + + Let's make it possible to have a device with motion, but no buttons. + + Without segfaulting. + +commit fbb9b203950e9d0e82574cde5b3e006b0e6b404f +Author: Zephaniah E. Hull +Date: Mon Jun 4 06:59:42 2007 -0400 + + Let's not do a calloc and a free on every call to xf86PostMotionEvents. + +commit 3f4295e643ca56c40f33af7966e8efd367ef8749 +Author: Zephaniah E. Hull +Date: Mon Jun 4 06:48:06 2007 -0400 + + Add xf86PostMotionEventP, takes a pointer instead of a variable number of + arguments. + + Bump input ABI to 1.1 since we export this. + +commit a4f3473c88370b8411e016ebab619cffd33e58f9 +Author: Zephaniah E. Hull +Date: Mon Jun 4 06:39:02 2007 -0400 + + Fully init the AbsoluteClassRec in InitAbsoluteClassDeviceStruct. + (Specificly, we were missing the screen field.) + +commit 0cbc3a4da2ddb6e4f30f60d2bc7f405d31aa554a +Author: Zephaniah E. Hull +Date: Mon Jun 4 02:03:44 2007 -0400 + + Print the build time as well as the date if we can. + +commit 9a7aaeb3f6ff79af60fde91cd0575a54ba0b9587 +Author: Daniel Stone +Date: Mon May 28 13:54:16 2007 +0300 + + XFree86: Input: Assume core events per default + + Assume that a device will be sending core events, unless explicitly + specified otherwise. + +commit 94361cbba7f866144691f6f5e9251a550e0e0cb8 +Author: Daniel Stone +Date: Mon May 28 13:54:47 2007 +0300 + + XFree86: Input: Perform case-insensitive comparisons on option names + +commit e5ce982381c4092252d6b55fcefcc9a3cd21e656 +Author: Benjamin Herrenschmidt +Date: Sun Jun 3 09:40:37 2007 +1000 + + Include pixman.h from fb.h or compile of some files will fail + + Signed-off-by: Benjamin Herrenschmidt + +commit 90eb22656c34d2d08a8dccaf05e6d081c56bd7f3 +Author: Adam Jackson +Date: Sat Jun 2 16:49:26 2007 -0400 + + Minor cleanup/robustification to config parsing. + +commit f6a983533bdc84752562ef0be25b320678bf08a1 +Author: Adam Jackson +Date: Sat Jun 2 16:37:39 2007 -0400 + + Don't warn about default behaviour when autoconfigging. + +commit 21e8f4eb02842f877336db08c332d8ee4a381ee0 +Author: Adam Jackson +Date: Sat Jun 2 16:13:01 2007 -0400 + + Don't print lack of DRI support as an error in AIGLX init. + +commit 0e1384d8318637f75d04d3d1b7600f7cad40117e +Author: Adam Jackson +Date: Sat Jun 2 16:07:20 2007 -0400 + + Delete VDIF support; it was never used anyway. + +commit 66702f3c1c6c884e83744c72da173cc32f22b2f4 +Author: Henry Zhao +Date: Fri Jun 1 23:55:40 2007 -0700 + + Need to use minPitch in miScanLineWidth() to get the shrinked + linePitch. + +commit fa877d7ff25c4ec45288e1fea70d4f5e1baf3ef3 +Author: Alan Hourihane +Date: Wed May 30 13:06:45 2007 +0100 + + Fix mode validation against the maximum X/Y values configured + at server startup, and not against the virtual X/Y parameters + as they can change. + + This fixes an issue when canGrow is TRUE and modes get dropped + when using the virtual X/Y parameters. + +commit 99eae8bea6724a24477375ad5b2d31cc4883cf6b +Author: Samuel Thibault +Date: Tue May 29 22:04:36 2007 -0400 + + I/O enable/disable update for the Hurd + +commit 3c6f1428489c1f71acd41066ea73ef4ae7c60f17 +Author: Julien Cristau +Date: Tue May 29 22:01:30 2007 -0400 + + Make sure that the ramdac symbols are present in the server + + The former ramdac module is now built into the server, so its symbols need to + be explicitly exported to drivers (Debian #423129). + +commit ee20c481eede0954f4a8bef5113979b101863c32 +Author: Matthieu Herrb +Date: Tue May 29 14:54:27 2007 -0600 + + Remove wscons keyboard handling stuff that doesn't belong there anymore. + +commit 60de6c7ef9bdcee043f63e8e0d493e6feba6a9d0 +Merge: 3a6549a... 2f13b7c... +Author: Matthieu Herrb +Date: Tue May 29 12:14:49 2007 -0600 + + Merge branch 'master' of ssh://herrb@git.freedesktop.org/git/xorg/xserver + +commit 3a6549a163aba26bf4ac58b050c493fba0df14c6 +Author: Matthieu Herrb +Date: Tue May 29 12:14:23 2007 -0600 + + Make this build on OpenBSD + +commit 2f13b7c113c17239e382dd3640e9c29201d8ab1f +Author: Drew Parsons +Date: Wed May 30 02:13:36 2007 +1000 + + Update Xprint build for pixman. + + Xprt links libfb, which now uses pixman. Update configure.ac to + require module $PIXMAN for XPRINT. + Also, use $(top_builddir) to reference libfb.la and other local + libraries, rather than using the relative reference ../.. + +commit ba0b7d47ab0c24d5a29228f8af583044060464bd +Author: David Nusinow +Date: Mon May 28 21:57:04 2007 -0400 + + Fix for GNU/kFreeBSD + +commit 2267bf48b385c93243e26c3bb84ebb04c7fdb39f +Author: Bastian Blank +Date: Mon May 28 21:55:05 2007 -0400 + + Fixes for s390 + +commit 857ddbb660a21cad1c16f4fb2dc8a904d6655304 +Author: Eugene Konev +Date: Mon May 28 21:53:02 2007 -0400 + + Allow configurable serverconfigdir for security policy location + Allow the location of the SERVERCONFIGdir variable to be defined at + compile-time. This allows us to specify where the security policy will be + located (Debian uses this to put it in /etc). The default is to the + previous location. + +commit 78d01d1008973899d931ef44b47d5f0b5f220b0d +Author: Gerhard Tonn +Date: Mon May 28 21:48:58 2007 -0400 + + Miscellaneous fixes for S/390. + +commit d98bd4bf908c2c51fcfd3a4c3230de17f2567244 +Author: Branden Robinson +Date: Mon May 28 21:44:59 2007 -0400 + + Overhaul xorg.conf manpage + + Major stylistic cleanups, greatly expanded cross-reference ("SEE ALSO") + section and some typo fixes. + + This patch by Branden Robinson. Forward-ported by Fabio M. Di Nitto. + +commit 6bf8d5019313ee2251a44dfb7ad3435a3c6db7eb +Author: David Nusinow +Date: Mon May 28 21:42:10 2007 -0400 + + Read ROM in chunks + This patch speeds up reads of the ROM by reading in large chunks rather + than one byte at a time. This patch was by Dann Frazier. + +commit 6fdd134a0c3e6fdde9b089100e8783705c9cc6ac +Author: David Nusinow +Date: Mon May 28 21:39:12 2007 -0400 + + Fix up xnest manpage + I believe this patch was originally by Branden Robinson + +commit 6a870992d81a6bacfa9d313c15784fdb281d474f +Author: Keith Packard +Date: Fri May 25 20:33:08 2007 -0700 + + xf86XVFillKeyHelper assumed root clip never changed. + + When the root window changed size, xf86XVFillKeyHelper would not revalidate + the GC, leaving the clip at the old size causing lossage (and possibly + memory corruption if the screen and frame buffer shrank). + + Fixed by just using a scratch GC; saving memory, eliminating bugs and + shrinking the code. + +commit 3c982bc1a49509dda7bc469b0eced44df02755b3 +Author: Luo Jie +Date: Thu May 24 11:13:03 2007 -0700 + + Reinstate an apparently mis-deleted ';' from a for loop with no body. + + Fixes an error returning "No core keyboard" with multiple keyboards. + +commit 4d7469f75fadfc4a59664e88e18eb304203670f4 +Author: Luo Jie +Date: Thu May 24 11:04:06 2007 -0700 + + Fix a typo in using memcpy in xwin. + +commit 0b988450462ddb005311e68502357baf272e6371 +Author: Luo Jie +Date: Thu May 24 11:02:28 2007 -0700 + + Fix os/utils.c compile with mingw. + +commit 1f48995d66c0072caa7e5ce2845be642221dd56d +Author: Luo Jie +Date: Thu May 24 11:01:15 2007 -0700 + + Fix build of composite, dix, and randr when Xinerama is disabled. + +commit 8f98be7db303bc3db650054efb86843c70114451 +Author: Eric Anholt +Date: Thu May 24 11:00:04 2007 -0700 + + Fix bswap detection on BSD (mis-added '_' in function names). + +commit 9616a042855399f0ee9c6489ea824621ea5fee18 +Author: Matthias Drochner +Date: Tue Apr 10 16:15:40 2007 -0700 + + Fix build on NetBSD/amd64. + +commit 649e7f82d8d4333443493056b81eb20d6cf022bc +Author: Michel Dänzer +Date: Thu May 24 12:10:05 2007 +0200 + + Consolidate portPriv->pDraw assignments into xf86XVEnlistPortInWindow. + + This avoids a crash in xf86XVReputVideo and also cleans up the code slightly. + +commit 047bf3349bb697c73c95729a8bbf15f72605901f +Author: Soren Sandmann Pedersen +Date: Wed May 23 16:56:05 2007 -0400 + + Delete trapezoid rendering code; replace with pixman calls + +commit 9d87ef4e0dff40ea39f1b209c67b90079fc79065 +Author: Soren Sandmann Pedersen +Date: Wed May 23 15:50:25 2007 -0400 + + - Make image_from_pict() non-static + - Delete fbedge.c and fbedgeimp.h + - Use pixman_rasterize_edges() in fbtrap.c + +commit 2a960c442bd7560630f52b55d82ec0517542ee5a +Author: Soren Sandmann Pedersen +Date: Wed May 23 13:08:26 2007 -0400 + + Port renderedge.c to pixman + +commit 3ba3ede9bbdfc6376b6f6e0b6ce8280a05e6584d +Author: Soren Sandmann Pedersen +Date: Wed May 23 12:56:04 2007 -0400 + + Add missing offsets for window coordinates - reported by Colin Harrison + +commit cc648e609d472472bac4a2e568eb3598b3690ba3 +Author: Michel Dänzer +Date: Tue May 22 10:51:56 2007 +0200 + + EXA: Export ExaOffscreenMarkUsed. + + Can be used to inform EXA that an offscreen area is used outside of EXA. + +commit e6a7198e7cd96f1fe0654cc6811a977821579258 +Author: Adam Jackson +Date: Tue May 22 10:51:55 2007 +0200 + + Bug #8991: Add glXGetDrawableAttributes dispatch; fix texture format therein. + + Adapted to master branch by Michel Dänzer . + +commit 6324bfc468f7a645d2fee59f1c921a4328a4639f +Author: Michel Dänzer +Date: Tue May 22 10:51:53 2007 +0200 + + AIGLX: Zero-copy texture-from-pixmap. + + When available, use the 2D driver texOffsetStart hook and the 3D driver + setTexOffset hook to save the overhead of passing the pixmap data to + glTex(Sub)Image. + + The basic idea is to update the driver specific 'offset' for bound pixmaps + before dispatching a GLX render request and to flush immediately afterwards + if there are any pixmaps bound. This should ensure that the 3D driver can + use pixmaps for texturing directly regardless of the X server moving them + around. + +commit 5006d08d7fc56d3d380cc6b75297f94e8594eb54 +Author: Michel Dänzer +Date: Tue May 22 10:51:52 2007 +0200 + + DRI: Add TexOffset driver hooks. + + To be used by AIGLX for GLX_EXT_texture_from_pixmap without several data copies. + + The texOffsetStart hook must make sure that the given pixmap is accessible by + the GPU for texturing and return an 'offset' that can be used by the 3D + driver for that purpose. + + The texOffsetFinish hook is called when the pixmap is no longer being used for + texturing. + +commit ff2eae86b6a8760befbbc5d605debebe7b024c05 +Author: David Nusinow +Date: Mon May 21 19:50:04 2007 -0400 + + Fix boolean thinko that prevented working without a server layout + +commit 56fd92715567cd32e4b725b3791de9ac4e3879aa +Author: Soren Sandmann Pedersen +Date: Mon May 21 20:00:25 2007 -0400 + + Remove fast path code from fbpict.c + + Remove the various fast path functions from fbpict, and instead use + pixman_image_composite(). + +commit 7e2c935920cafadbd87c351f1a3239932864fb90 +Author: Fredrik Höglund +Date: Fri May 18 20:06:14 2007 +0200 + + Add a new IDLETIME system sync counter. + + This counter exposes the time in milliseconds since the last + input event. Clients such as screen savers and power managers + can set an alarm on this counter to find out when the idle time + reaches a certain value, without having to poll the server. + +commit 756acea23a0cc56c470bcd77c6f5638d923ab3d1 +Author: Soren Sandmann Pedersen +Date: Fri May 18 13:39:12 2007 -0400 + + Use pixman_image_set_indexed() to make 8 bit work + +commit 7916419a0092b8bf9713c0840f9e969950d7aa85 +Author: Soren Sandmann Pedersen +Date: Fri May 18 11:58:24 2007 -0400 + + Comment out setup of general MMX code + +commit 998164bac648756e5b5254aa36e075ae360d3972 +Author: Soren Sandmann Pedersen +Date: Fri May 18 11:36:20 2007 -0400 + + Move fbCompositeGeneral() to fbpict.c and remove fbcompose.c + +commit a2e3614eb8f0fa198615df492b03ff36bc9c1121 +Author: Soren Sandmann Pedersen +Date: Fri May 18 11:33:11 2007 -0400 + + Break image_from_pict() into a few subfunctions. + +commit c5ef84c325440af5fbdf9f44c3781d99a0392df9 +Author: Soren Sandmann Pedersen +Date: Thu May 17 21:31:08 2007 -0400 + + Make the general compositing code create a pixman image and call + + pixman_image_composite(). Leave the general code commented out for now. + +commit 076d070e186afeb416976ae74fbfd50c86db10c5 +Author: Keith Packard +Date: Thu May 17 20:24:18 2007 -0700 + + Use Screen block handler for rotation to draw under DRI lock. + + DRI uses a non-screen block/wakeup handler which will be executed after the + screen block handler finishes. To ensure that the rotation block handler is + executed under the DRI lock, dynamically wrap the screen block handler for + rotation. + +commit 915563eba530c5e2fdc2456cf1c7c3cc09b3add0 +Author: Keith Packard +Date: Thu May 17 20:22:43 2007 -0700 + + Disable all outputs and crtcs at startup. + + Leaving devices enabled during server startup can cause problems during the + initial mode setting in the server, especially when they are used for + different purposes by the X server than by the BIOS. Disabling all of them + before any mode setting is attempted provides a stable base upon which the + remaining mode setting operations can be built. + +commit 0375009a97c2ab7f0e0f0265463d45c0580388c6 +Author: Soren Sandmann Pedersen +Date: Thu May 17 12:59:24 2007 -0400 + + Remove excessive unrolling in fbCompositeSrc_x888x8x8888() and fix bug where + the source alpha was used instead of 0xff. + +commit 546465ee6aa6584780aec6357f32d205c807ae71 +Author: Soren Sandmann Pedersen +Date: Wed May 16 17:42:04 2007 -0400 + + Make fbFetch_b8g8r8() actually write the read value to the buffer + +commit 0fcd17c9181901c419cc32bc24c07fe5a6934d81 +Author: Soren Sandmann Pedersen +Date: Tue May 15 17:59:13 2007 -0400 + + Use pixman short formats, revert the gradient_stop change + +commit f4c1d5fc28a5a7fe2592505350f9e2331f6049b7 +Author: Soren Sandmann Pedersen +Date: Tue May 15 17:12:22 2007 -0400 + + Use pixman types for transforms and vectors + +commit f2e30e7d0a1d075e7e83c5b5ceca9e4752951138 +Author: Soren Sandmann Pedersen +Date: Tue May 15 16:51:21 2007 -0400 + + Use the pixman fixed point types and macros + +commit 3da842bf930d7875599ca0c06cb4a09cfa987ac5 +Author: Soren Sandmann Pedersen +Date: Tue May 15 14:57:14 2007 -0400 + + Revert various fast path functions to their pre-pixman-merge state + since they fail rendercheck. Remove their associated macros. + + See bug 10903. + +commit 1568b6b6a0d7337f29c7b87cc46ae64b3b0f8fdf +Author: Soren Sandmann Pedersen +Date: Sat May 12 20:33:23 2007 -0400 + + Port large amounts of the region code to pixman + +commit dde0ceac4ea7639d0096bfd26f37c5851778854c +Author: Soren Sandmann Pedersen +Date: Sat May 12 17:41:47 2007 -0400 + + Add new InitRegions() function called from dix/main + +commit e037052ac522150786abf44d3a04c813cc490050 +Author: Soren Sandmann Pedersen +Date: Sat May 12 16:58:54 2007 -0400 + + Turn boxes and regions into typedefs for pixman types + +commit 8e56f5be4b70773c899f01b9ccd2e88d523327e4 +Author: Soren Sandmann Pedersen +Date: Fri May 11 11:45:37 2007 -0400 + + Add dependency on pixman 0.9.0 + +commit a277f04ab08514462b7f10b4dd92eb326af85501 +Author: Adam Jackson +Date: Wed May 9 22:03:12 2007 -0400 + + Remove mfb and cfb from include paths where they're not needed. + +commit 20c5250e487e032d392e2e4624021fccb1bfb72c +Author: Adam Jackson +Date: Wed May 9 21:49:44 2007 -0400 + + Use system copy of cbrt() if available. + + Also move the replacement inline into miarc.c, since that's the only user. + +commit 8dcc37520d5e8c8b52cee81faa67fd5205548377 +Author: Adam Jackson +Date: Wed May 9 18:57:05 2007 -0400 + + Use _X_INLINE instead of ad-hoc #defines. + +commit 6ff239cb4e67c0a2ea497a1714e5585c1d941af3 +Author: Adam Jackson +Date: Wed May 9 18:38:33 2007 -0400 + + Make the use of ICEIL slightly less ugly. + +commit 178d426311bb3c7160f72b5d95b0a137eda09ba9 +Author: Colin Harrison +Date: Fri May 11 10:08:42 2007 +0100 + + Missing piece from bug 9808 + +commit ebaa6c920c82401952a0ccc991b94574306449bd +Author: Matthias Hopf +Date: Thu May 10 15:25:31 2007 +0200 + + Disable Simba PCI bridge routing code (Bug #8020). + + The code in hw/xfree86/os-support/bus/sparcPci.c:simbaCheckBus() + is trying to mimmick VGA routing by disabling I/O space responses + behind the Simba PCI-PCI controller. + + Unfortunately, doing this also happens to disable access to the + IDE controller I/O space registers, thus crashing the system. The + granularity of the I/O disabling in the Simba controller is not + fine enough to disable VGA without also disabling the IDE controller + registers. + +commit 86c4941727f7c673ae6bb88c67443fa25935c7f5 +Author: Colin Harrison +Date: Wed May 9 16:55:27 2007 +0100 + + fix an occasional crash in GetWindowName() (bug: 9798) + +commit be44018a3c6172caf3e91c36ea321420d104e79f +Author: Colin Harrison +Date: Wed May 9 16:55:09 2007 +0100 + + Fix bad use of hwnd (bug: 9808) + +commit d3248b66a650c6c629cd66240e25004869217d2e +Author: Colin Harrison +Date: Wed May 9 16:54:46 2007 +0100 + + Migrate some code to the new mi apis + +commit 021e5df85d7c9373a2fed55512751d16e08128db +Author: David Nusinow +Date: Mon May 7 21:03:40 2007 -0400 + + Add more informative logging for module default loading + + When the modules section is parsed, if a module is set to be loaded by + default, this will be logged. If it is redundantly specified in xorg.conf, + this will also be noted. None of this logging will happen if the xorg.conf + lacks a modules section. + +commit 1b3a0508a7aee1c7b14cd62216b4727fcc9181d4 +Author: Jesse Barnes +Date: Sun May 6 01:30:59 2007 -0700 + + Fix documentation for Copy hook -- it can copy memory to the scanout + buffer too. + +commit 030a578391c634bc68add6ada3f251cf3f8c3069 +Author: David Nusinow +Date: Thu May 3 22:51:07 2007 -0400 + + Provide UseDefaultFontPath option + + This provides a new option, UseDefaultFontPath. This option is enabled by + default, and causes the X server to always append the default font path + (defined at compile time) to the font path for the server. This will allow + people to specify additional font paths if they want without breaking + their font path, thus hopefully avoiding ye olde "fixed front" problem. + + Because this option is a ServerFlag option, the ServerFlags need to be + processed before the files section of the config file, so swap the order + that they are processed. + +commit e91b9ddc7aa95abc2d4d314e8db204860771a099 +Author: David Nusinow +Date: Thu May 3 22:00:23 2007 -0400 + + Improve modules loading defaults + + Provide default modules that may be overrided easily. Previously the + server would load a set of default modules, but only if none were + specified in the xorg.conf, or if you didn't have a xorg.conf at all. This + patch provides a default set and you can add only the "Load" instructions + to xorg.conf that you want without losing the defaults. Similarly, if you + don't want to load a module that's loaded by default, you can add "Disable + modulename" to your xorg.conf (see man xorg.conf in this release for + details). This allows for a minimal "Modules" section, where the user only + need specify what they want to be different. See bug #10541 for more. + + The list of default modules is taken from the set loaded by default when + there was a xorg.conf containing no "Modules" section. + + A potential problem for some users is that some users disable a module, + most notably DRI, by commenting out the "Load" line in their xorg.conf. + This needs to be changed to an uncommented "Disable" line, as DRI is + loaded by default. + +commit d2f813f7db157fc83abc4b3726821c36ee7e40b1 +Author: Soren Sandmann Pedersen +Date: Wed May 2 19:10:22 2007 -0400 + + New fbWalkCompositeRegion() function + + This new function walks the composite region and calls a rectangle + compositing function on each compositing rectangle. Previously there + were buggy duplicates of this code in fbcompose.c and + miext/rootles/safealpha/safeAlphaPicture.c. + +commit e0959adcd8df2c61e98e76e708fceef9c7cd54eb +Author: Soren Sandmann Pedersen +Date: Tue May 1 13:41:48 2007 -0400 + + Add fbCompositeRect() as another special case in the switch of doom in fbpict.c + + This is phase one of getting the two region walkers in fbcompose.c and + fbpict.c merged together. + +commit c1e1d6b98a6708860e5b5f6e21d8d5b1d8ce9075 +Author: Brian +Date: Wed May 2 15:55:40 2007 -0600 + + In __glXCreateARGBConfig(), insert the new GL mode at the _end_ of the linked list. + + Previously, the new mode was added at the head of the list. This caused the + positional correspondence between modes and the XMesaVisuals array to be off + by one. The net result was GLX clients failing when they tried to use the + last GLX mode/visual. + + We still have the problem of DRI drivers not being able to use the extra + mode/visual introduced by __glXCreateARGBConfig(). glXCreateContext fails + with BadAlloc if it's attempted. This is also the source of the often- + seen warning "libGL warning: 3D driver claims to not support visual xxx" + Look into fixing that someday... + +commit bd0abb2844ef9faf28703e592cfebb886004234c +Author: Tilman Sauerbeck +Date: Wed May 2 17:20:48 2007 +0200 + + Bug #10823: Fixed default OSNAME value. + + We try to get OSNAME from uname by default now. + +commit 71fc5b3e9309182978ead676965d65ca93a4e3b9 +Author: Keith Packard +Date: Wed May 2 11:41:11 2007 +0200 + + Fix for a divide by zero that can be triggered by a malicious client. + + Problem reported by Derek Abdine of rapid7.com. Thanks. + +commit 873ef75b1e8c94d39670c981c4d830ab8bcc018b +Author: Colin Guthrie +Date: Mon Apr 30 10:33:12 2007 -0600 + + fix __glXErrorCallBack() proto + +commit 6b33459bf5aac23c3ecc7002d091c02f327d907a +Merge: 18252a5... 3c91a99... +Author: Brian +Date: Mon Apr 30 10:26:19 2007 -0600 + + Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/xorg/xserver + +commit 3c91a993e8c752002adf85c317216e1487c20780 +Author: Michel Dänzer +Date: Sun Apr 29 23:49:41 2007 +0200 + + EXA: Fix OffscreenValidate build with DEBUG_OFFSCREEN enabled. + +commit a261e1325057974d58440812b93c00c0caa4423a +Author: Michel Dänzer +Date: Sun Apr 29 23:49:35 2007 +0200 + + EXA: Remove DrawableDirty. + + Convert the remaining callers to PixmapDirty. + +commit b1b6674a919943a8ac37e54d02e8d0d23a642b1d +Author: Michel Dänzer +Date: Sun Apr 29 23:49:28 2007 +0200 + + EXA: FillSpans improvements. + + * Don't need to track damage. + * Always migrate for fallbacks. + +commit 584697a2231ac782f362a925e1489c15483a8791 +Author: Michel Dänzer +Date: Sun Apr 29 23:49:09 2007 +0200 + + EXA: SolidBoxClipped improvements. + + * Centralize handling of fallbacks and damage tracking. + * Always migrate for fallbacks. + +commit 982d7c2c0b948ba04c8eefa475d660981e6ed9f9 +Author: Michel Dänzer +Date: Sun Apr 29 23:48:59 2007 +0200 + + EXA: CopyNtoN improvements. + + * Centralize handling of fallbacks and damage tracking. + * Always migrate for fallbacks. + +commit d2245386eed200e77a8c84bdda36ab29e39fd593 +Author: Michel Dänzer +Date: Sun Apr 29 23:48:31 2007 +0200 + + EXA: GetImage improvements. + + Only migrate when appropriate. In particular, don't migrate to offscreen in the + no-fallback case as copying from system memory should usually be as fast if not + faster than DownloadFromScreen, in particular if the bits need to be uploaded + to offscreen first. + +commit 0880aaac9c83019fec2e3d32871f74c7a407f8b3 +Author: Michel Dänzer +Date: Sun Apr 29 23:48:19 2007 +0200 + + EXA: PutImage improvements. + + * Migrate for fallbacks when appropriate. + * Add damage tracking in ExaCheckPutImage. + +commit 7fca16901187ade48e83e6a2684ef464b1912357 +Author: Michel Dänzer +Date: Sun Apr 29 23:48:11 2007 +0200 + + EXA: ImageGlyphBlt improvements. + + * Don't waste effort on invisible glyphs. + * Only track damage for bounding box instead of each glyph separately. + * Always migrate for fallbacks. + +commit a8d6ebdf9338dc2f6ff9a532e6fec460a70d3b1e +Author: Michel Dänzer +Date: Sun Apr 29 23:47:53 2007 +0200 + + EXA: Defer to FillRegionTiled in Composite when possible. + + Committed separately as this case is hard to hit and has only been tested + lightly. + +commit 81b055605c34b5823f6c5f63cc0f92f43c6b7252 +Author: Michel Dänzer +Date: Sun Apr 29 23:47:43 2007 +0200 + + EXA: Composite improvements. + + * Defer to simpler hooks in more cases (inspired by XAA behaviour). + * Move damage tracking from lower to higher level functions. + * Always migrate for fallbacks. + +commit ce317a5b76c053f449122c46e1372bf8e067cb4c +Author: Michel Dänzer +Date: Sun Apr 29 23:47:16 2007 +0200 + + EXA: Glyphs improvements. + + * Don't waste effort on invisible glyphs. + * Add damage tracking where necessary. + * Always migrate for fallbacks. + +commit 0c8905ebc91cf654facef84ee52231a358deec5c +Author: Michel Dänzer +Date: Sun Apr 29 23:47:08 2007 +0200 + + EXA: PolyFillRect improvements. + + * Convert rects to region and use it for damage tracking. + * When possible, defer to exaFillRegion{Solid,Tiled} using converted region. + * Always migrate for fallbacks. + * Move damage tracking out of ExaCheckPolyFillRect. + +commit 567f18a09bfb05f448be40c7ebe0f210f955601c +Author: Michel Dänzer +Date: Sun Apr 29 23:46:49 2007 +0200 + + EXA: FillRegion{Solid,Tiled} improvements. + + * Support planemasks, different ALUs and arbitrary tile origin. + * Leave damage tracking and non-trivial fallbacks to callers. + * Always migrate for fallbacks. + + This is in preparation for using these from more other functions. + +commit e869573b52fac69fb88cea120daaeec59c7a3461 +Author: Michel Dänzer +Date: Sun Apr 29 23:45:48 2007 +0200 + + EXA: exaAssertNotDirty improvements. + + * Return early if the valid region is empty or the pixmap is pinned. + * Fix loop for several cliprects. + +commit d3f8667341bfe6dc7d0258c4ad69377f37d88d95 +Author: Michel Dänzer +Date: Sun Apr 29 23:44:27 2007 +0200 + + EXA: Fix exaEnableDisableFBAccess for nested disables and enables. + +commit 5e4b3232dafe3b0dec65bf639bebaba4774210b7 +Author: Michel Dänzer +Date: Sun Apr 29 23:38:22 2007 +0200 + + Fix fbCompositeTrans_0888xnx0888 build for wfb on big endian. + +commit 2866e0bac9b8dd3892c5e68abcfc6c97cebaf88a +Author: Michel Dänzer +Date: Sun Apr 29 23:38:13 2007 +0200 + + Fix a couple of picture repeat fields incorrectly compared to RepeatNormal. + +commit 78a20455356ccc310f73cfc65ad65a7677eee7e5 +Author: Soren Sandmann Pedersen +Date: Fri Apr 27 15:20:24 2007 -0400 + + Pixman merging + + More msvc++ porting + +commit 6c4f1826bf2c5f30f5fe6e489a02b6375478b380 +Author: Soren Sandmann Pedersen +Date: Fri Apr 27 08:13:08 2007 -0400 + + Bug fix in fbCompositeIn_nx8x8888 + + Make sure both halves of the dst word is set to zero when the masks + are both 0. + +commit ae04f2cb0a068cdc1e519627bf745de0c9e4a85a +Author: Adam Jackson +Date: Thu Apr 26 15:28:04 2007 -0400 + + Fix the 'relink' target for kdrive servers. + +commit 6c8152d6ee9eeb21a68a8bbfed1540939e5bcd1f +Author: Adam Jackson +Date: Thu Apr 26 14:59:04 2007 -0400 + + Remove old edid_modes.c, it lives in hw/xfree86/modes/ now. + +commit 2208c6087d6bffcb24a30891a56430e28735874c +Author: Soren Sandmann Pedersen +Date: Thu Apr 26 14:40:30 2007 -0400 + + Change expand_alpha_rev to expand_alpha in mmxSaturateU + +commit a300ef84cee26febfbe08c497d0d063588130bdd +Author: Soren Sandmann Pedersen +Date: Thu Apr 26 14:37:53 2007 -0400 + + Fix typo in previous commit + +commit 0ebe48be59368b55c618f60d4656300bd7f52ed9 +Author: Soren Sandmann Pedersen +Date: Thu Apr 26 14:36:32 2007 -0400 + + Pixman merge + + - Changes to support MS Visual C++ + + - use inline instead of __inline__ + + - Fix rounding errors (Billy Biggs, from xserver via pixman) + +commit 4fe918b38553133c27e5ae672e5c43984a9bbaea +Author: Soren Sandmann Pedersen +Date: Thu Apr 26 12:41:01 2007 -0400 + + Fix bug 8871 - scrolling corruption with a compositing manager + + Call miHandleExposures() in CopyArea/CopyPlane explicitly in cw to + generate GraphicsExposes correctly. + +commit 0ff7c94fcf6497ee8575f81cf97eeeb3a857739e +Author: Soren Sandmann Pedersen +Date: Thu Apr 26 10:56:02 2007 -0400 + + Pixman merge + + Make use of fbCompositeSrcAdd_8888x8x8mmx + +commit 701ccb4a22cfd646ccb7f19b7b3a476aeb5ce2da +Author: Soren Sandmann Pedersen +Date: Thu Apr 26 10:49:06 2007 -0400 + + Pixman merge + + - Remove stray default label + + - Integrate new MMX ops SolidMaskSrc_nx8x8888mmx, In_8x8mmx, and + In_nx8x8mmx + + - Formatting changes to reduce diff noise + +commit a54ef54db19dcd36ed86b33cff2bc369f9690a15 +Author: Soren Sandmann Pedersen +Date: Thu Apr 26 10:24:25 2007 -0400 + + Pixman merge + + Make sure fbCompositeSrc_x888x8x8888mmx and fbCompositeSrc_8888x8x8888mmx + are used when possible. + +commit 3571b8e65b0857322d12e291305cfe29ea497c3c +Author: Soren Sandmann Pedersen +Date: Thu Apr 26 09:45:11 2007 -0400 + + More pixman merging + + - Move some code around to minimize diff noise + + - Add mmx ops from pixman that never made it into X + + - Merge Jeff Muizelaar's bugfixes to fbCompositeSrc_8888x8x8888mmx and + fbCompositeSrc_x888x8x8888mmx. + +commit c0346e57e6d3857994f7af76060c502c2fdea294 +Author: Peter Hutterer +Date: Thu Apr 26 12:02:45 2007 +0930 + + Require inputproto 1.4.2. + + Requirement was introduced with c7e2ba0c9b9b1fc1aed8f91f86471c4c8e650b78. + +commit 67347739b0571b2978468e8088480b105f505ad2 +Author: Soren Sandmann Pedersen +Date: Wed Apr 25 14:19:39 2007 -0400 + + Don't treat convolution filters as transformations. + + Some rearrangement of code to get it closer to pixman. + +commit c056ce95d89ef1df57edf47149fc34cd3925496e +Author: Soren Sandmann Pedersen +Date: Wed Apr 25 13:21:47 2007 -0400 + + Port MSVC++ CPU detection code from pixman. (Vladimir Vukicevic). + +commit c19ece1d8c32dc81740a4036a642661f54064e75 +Author: Soren Sandmann Pedersen +Date: Wed Apr 25 12:34:19 2007 -0400 + + Integrate optimization from xserver from David Reveman where repeats + + get handled by fbFetchTransformed() rather than in the region walking + code. + +commit 48c73dfc369fdf8f6023436ebe82bb604f76bb80 +Author: Soren Sandmann Pedersen +Date: Wed Apr 25 12:09:22 2007 -0400 + + Add function fbCompositeSrcAdd_8888x8x8(), and fix a bug where + + srcRepeat = FALSE would be set in the wrong place. + +commit 66ba3d758a368bf83d75bab8b08bdb6b34925e40 +Author: Soren Sandmann Pedersen +Date: Wed Apr 25 10:31:38 2007 -0400 + + Various fixes from xserver via pixman (Billy Biggs) + +commit c09e68ce30dabd6b7068b163b9d2382d85d0d0bc +Author: Adam Jackson +Date: Wed Apr 25 16:46:26 2007 -0400 + + Paper over a crash at exit during GLX teardown. + +commit 9c80eda826448822328bb678a7d284cc43fffb17 +Author: Adam Jackson +Date: Wed Apr 25 16:35:04 2007 -0400 + + Disable RANDR's fake Xinerama protocol when there's more than one screen. + + ... in the protocol sense. Xinerama doesn't have any provision for more + than one protocol screen each with its own geometry. + + Red Hat bug #231257. + +commit d322608dc929d5f8cda07a53143a4f28423e0460 +Author: Adam Jackson +Date: Wed Apr 25 16:29:48 2007 -0400 + + Fix a buffer overrun on machines with excessively large PCI busses. + + Formerly we sized an array with a compile time constant, then initialized + its size to the same constant, but the Linux PCI init code would increase + that "constant". So if you happened to have more than 128 PCI devices, + you'd happily scribble into whatever variables happened to be in .bss + after that array. + + Only really fixed for Linux atm. Other OSes will simply (still) fail to + work on video devices above the 128th PCI device. + +commit 3ba1e8ab6d69566e1a3f8f0eb4605631aeffc8e5 +Author: Aaron Plattner +Date: Tue Apr 24 17:20:14 2007 -0700 + + Include xf86Rename.h in xf86RandR12.h. + +commit 0a2fe443d25b1ca25349aba3f748df986952e20f +Author: Soren Sandmann Pedersen +Date: Tue Apr 24 19:02:44 2007 -0400 + + Use READ/WRITE macros for new functions introduced in previous commits. + +commit 7e16da7b78c422f96387502b9cc29eaa1741543f +Author: Soren Sandmann Pedersen +Date: Tue Apr 24 18:15:34 2007 -0400 + + Remove #if 0'ed blocks + +commit 18252a515d4989b983a3b7389636045e06d0f246 +Author: Brian +Date: Tue Apr 24 14:10:09 2007 -0600 + + bump release date to reflect input code updates + +commit 2d9a7a768747ca39a800475f12c424c298018dc6 +Author: Soren Sandmann Pedersen +Date: Tue Apr 24 14:46:59 2007 -0400 + + From pixman (Jeff Muizelaar) + + Fix up the fast-path compositing operators; those are useful for + sources without alpha, but can't be used for sources with + alpha. Also, replaced fbCompositeSrcSrc_nxn with call to fbBlt as + this function must handle 1, 4, 8, 16, 24, 32 bpp objects. Would + be nice to optimize fbBlt for common cases involving 8, 16, 24 and + 32bpp. + + From Keith Packard. + +commit fde4a5adf02d3067a064ebf6bdd666aa5784cfe9 +Author: Soren Sandmann Pedersen +Date: Tue Apr 24 13:30:43 2007 -0400 + + From xserver via pixman (Jeff Muizelaar) + + Add some optimizations from jaymz. Also adds some compile + warnings that will hopefully go awa y as we continue merging. + +commit 13e1d5ea55b0a3b7729316c8e37d3d8fca2075b5 +Author: Soren Sandmann Pedersen +Date: Tue Apr 24 12:59:18 2007 -0400 + + Fix format vs formatCode in previous commit + +commit 077a5d4555676d5775e990468a697b6890c6d609 +Author: Soren Sandmann Pedersen +Date: Tue Apr 24 12:57:55 2007 -0400 + + Add functions fbCompositeSrcSrc_nxn() and fbCompositeTrans_0565xnx0565 + from xserver via pixman. Add READ/WRITE and fbFinishAccess as + appropriate. + +commit 09436fb7c38a9819bde770c4c21143591671c4d7 +Author: Peter Hutterer +Date: Tue Apr 24 22:52:33 2007 +0930 + + Disable devices before removing, remove unrecoverable devices. + +commit c7e2ba0c9b9b1fc1aed8f91f86471c4c8e650b78 +Author: Peter Hutterer +Date: Tue Apr 24 21:34:47 2007 +0930 + + Use DevicePresence events to tell the client about enabled/disabled devices. + + Include the device id in the event sent to the client. + +commit ce099a9b78195540ec251a6a3dbe26019c1a686d +Author: Brian +Date: Mon Apr 23 12:34:01 2007 -0600 + + fix bug in which maxKeysPerModifier wasn't getting set + +commit b5e1f7869b2f12a1c2baa7f699ae609fc9ad50aa +Author: Soren Sandmann Pedersen +Date: Mon Apr 23 14:16:30 2007 -0400 + + Remove #if 0'ed merge leftovers + +commit 84838268b34661d598f8e4856fab355f414930d9 +Author: Soren Sandmann Pedersen +Date: Mon Apr 23 13:19:54 2007 -0400 + + Gradient fixes + + * Port fix for bug 7685 from pixman. Patch by Carl Worth + + * Add projective version of radial gradient code. + + * Make sure that all Pict*Gradient types have PictGradient as prefix, + since code in various places relies on that. + +commit 38d14e858980a1b0c087344d24bf6aebf755663c +Author: Aaron Plattner +Date: Sun Apr 22 18:04:27 2007 -0700 + + Adjust the screen pixmap's dimensions in xf86RandR12ScreenSetSize. + +commit ca784df84e07227a4cc0a1add079884f557b7a00 +Author: Aaron Plattner +Date: Sun Apr 22 16:26:01 2007 -0700 + + Fix unbalanced fbGetDrawable added in commit 0a9239ec. + +commit 55bd8668e7d4100579bcd6c16a804d9f25267070 +Author: Soren Sandmann Pedersen +Date: Fri Apr 20 14:53:37 2007 -0400 + + Remove #if 0'ed leftovers from merge + +commit 41dd7ab067adde8f66cd9f74c5a6570c325518a5 +Author: Soren Sandmann Pedersen +Date: Fri Apr 20 14:51:40 2007 -0400 + + Fix gradient walker to not reset needlessly + + Previously the gradient walker was doing excessive resets, (such + as on every pixel in constant-colored regions or outside the + gradient with CAIRO_EXTEND_NONE). Don't do that. + + Carl Worth, from pixman + +commit c1b73f0f2acd56b423b91a04f1e1b3cdcad0069f +Author: Soren Sandmann Pedersen +Date: Fri Apr 20 14:34:13 2007 -0400 + + Fixing gradient repeat mode computations in previous patch. From David + + Turner. + +commit 38f718799c68995c2d9a1680355bd55fd925009e +Author: Soren Sandmann Pedersen +Date: Fri Apr 20 13:59:11 2007 -0400 + + Remove a few memory references in fbFetchTransformed + +commit 9c4b14d4f6a1fe018acd64789434216cd1560a4a +Author: Soren Sandmann Pedersen +Date: Fri Apr 20 13:23:58 2007 -0400 + + Integrate David Turner's gradient optimizations from pixman + +commit cd2c1714eb4946bf7b1fc194fe074f8024a2ec23 +Author: Brian +Date: Sat Apr 21 12:40:51 2007 -0600 + + add slang_mem.c + +commit 67545333ec0b08db783e94e9e3ec55873dea19a3 +Author: Brian +Date: Sat Apr 21 12:40:33 2007 -0600 + + replace occlude.c w/ queryobj.c + +commit 39bc8bb0fdc854dcf9bbc0857fec84d50fa4f3b2 +Author: Aaron Plattner +Date: Fri Apr 20 14:22:42 2007 -0700 + + Don't call xf86RandR12TellChanged if it doesn't exist. Add some exports to xf86Rename.h. + +commit 3daa5c1a991d659b1386a09e33b044470d489cb3 +Author: Soren Sandmann Pedersen +Date: Fri Apr 20 09:43:16 2007 -0400 + + Fix pixman bug 5777, patch by David Reveman + +commit 9c2e955f6792e80fb84f848ed9e6ebbfd79f7130 +Author: Brian +Date: Fri Apr 20 07:21:19 2007 -0600 + + regenerated to add GL_CLIENT_ATTRIB_STACK_DEPTH (bug 9823) + +commit 96ef0f78438b60436c3940817980a3ab4070c7e8 +Author: Keith Packard +Date: Thu Apr 19 17:39:51 2007 -0700 + + Disable SourceValidate in rotation to capture cursor. + + SourceValidate is used exclusively by the software cursor code to pull the + cursor off of the screen before using the screen as a source operand. This + eliminates the software cursor from the frame buffer while painting the + rotated image though. Disabling this function by temporarily setting the + screen function pointer to NULL causes the cursor image to be captured. + (cherry picked from commit 05e1c45ade9c558820685bfd2541617a2e8de816) + +commit 7ca4baffb5569ea12b578a4a3f69e93d272d6c6d +Author: Keith Packard +Date: Thu Apr 19 17:37:18 2007 -0700 + + Was accidentally disabling rotation updates in mode set. + + Setting a mode on an unrotated CRTC was causing all of the rotation updates + to be disabled; the loop looking for active rotation wasn't actually looking + at each crtc, it was looking at the modified crtc many times. + (cherry picked from commit 8b217dee3a6c46b13fc9571a4a9a95bc55686cdb) + +commit 806a537e644d8cc9e53f3ac52efb49453e5aa1fb +Author: Keith Packard +Date: Thu Apr 19 17:49:34 2007 -0700 + + Revert "Suppress software cursor removal during rotated shadow buffer drawing." + + This reverts commit 999b681cf3973af4191506e49cde06963b11a774. + Replacing this with simpler code that just disables SourceValidate + during rotation redisplay. + +commit 0a9239ec258828ec1da6c208634a55fc4053d7da +Author: Soren Sandmann Pedersen +Date: Thu Apr 19 18:19:34 2007 -0400 + + Merge David Reveman's gradient optimization patch from pixman + +commit d0e55774e0da641ba85c5173f27f68de27372747 +Author: Thomas Hellstrom +Date: Thu Apr 19 11:39:53 2007 +0200 + + libdri: Make sure the new DRIInfo keepFDOpen member is honoured. + +commit e1f0b3e70b696d7ea4cf9e6ed30d751e7fdbc577 +Author: Peter Hutterer +Date: Thu Apr 19 12:00:24 2007 +0930 + + config: Return errors as negative numbers, device ids as positive numbers. + Update dbus-api documentation. + +commit c6972c893359f8fa7631ae674330f3f4f7010ba0 +Author: Peter Hutterer +Date: Wed Apr 18 12:10:05 2007 +0930 + + Change dbus 'listDevices' call to not require an argument. + Update dbus-api documentation, plug memory leak on dbus reply error. + +commit 999b681cf3973af4191506e49cde06963b11a774 +Author: Eric Anholt +Date: Wed Apr 18 14:33:27 2007 -0700 + + Suppress software cursor removal during rotated shadow buffer drawing. + +commit 28bb34eec63bf3c98f38ba7fc044f6419aaa3307 +Author: Eric Anholt +Date: Wed Apr 18 13:48:28 2007 -0700 + + Belatedly bump XORG_VERSION for 7.2. + +commit 5d8e8a7f4b3226bffd9e4d6d9326688f475b0183 +Author: Eric Anholt +Date: Wed Apr 18 13:22:26 2007 -0700 + + Remove libminimi build. + + It appears to have been a leftover of a previous incarnation of the build + system that didn't handle miinitext.c well. + +commit 53fb42e65c2b2ff58a4a324b7f05cff8a587720a +Author: Erik Andrén +Date: Tue Apr 17 21:34:47 2007 -0700 + + Syncmaster 226 monitor needs 60Hz refresh (#10545). + + I've managed to solve my own bug (#10545) by applying the following + patch to the xserver. + + Please apply. + + + This monitor is "Vista Certified". I wonder if this is a pure coincidence... + + + With kind regards + Erik Andrén + (cherry picked from commit a63704f14a1d97b9a00fef6fa290e74e51b9732b) + +commit fc162c6cfa06f0b012743d6d79cef45cf0166229 +Author: Keith Packard +Date: Mon Apr 16 09:55:58 2007 -0700 + + Allow outputs to be explicitly enabled in config, overriding detect. + + Option "Enable" "True" will force the server to enable an output at startup + time, even if the output is not connected. This also causes the default + modes to be added for this output, allowing even sync ranges to be used to + pick out standard modes. + (cherry picked from commit a3d73ba2cb7e13a6d129cd88d6a7f7d756e2ced2) + +commit c41e3bd713206c0bbd8ab8cef4c83eb7ba7e1c3c +Author: Keith Packard +Date: Mon Apr 16 09:53:42 2007 -0700 + + Use default screen monitor for one of the outputs. + + By default, use the screen monitor section for output 0, however, a driver + can change which output gets the screen monitor by calling + xf86OutputUseScreenMonitor. + (cherry picked from commit f4a8e54caf6b9431711383a39f55a18e7fd654f4) + +commit 97a2c2579c56c304705c934f3b536473645747df +Author: Keith Packard +Date: Mon Apr 16 09:39:47 2007 -0700 + + Using wrong log level in extension to built-in message + + was: typo in built-in module log message + (cherry picked from commit 00cfd1f765895b4d1b2234f3203727a8871b64b0) + +commit deda7791dfa34d0563c8d7fa2a0660ac27e6858c +Author: Brian +Date: Mon Apr 16 11:35:22 2007 -0600 + + remove sources deleted in Mesa + +commit 02d42f344ce020c9b84723671cb9c68d5c064933 +Author: Thomas Hellstrom +Date: Mon Apr 16 17:24:53 2007 +0200 + + Changes for single-entity multi-screen DRI. + + The entity (device) has a locking SAREA and a master file descriptor + that optionally isn't closed between server generation. + + The locking SAREA contains the device hardware lock. + Each DRI screen creates an new SAREA containing the drawable lock, + drawable-and private info, the drawable SAREA. + + The first screen optionally shares its drawable SAREA with the + device SAREA. + + Default is to close the master descriptor between server generations, + and to share the drawable SAREA of the first screen with the device locking + SAREA. Thus we should (hopefully) have full backwards compatibility. + + Mesa changes to support single-device multiple screens are pending. + +commit b5823ea3e1ed5a0449d44da05165a46719dcf287 +Author: Keith Packard +Date: Sun Apr 15 22:59:19 2007 -0300 + + RandR 1.2 spec says CRTC info contains screen-relative geometry. + + Was reporting mode size instead of adjusting for rotation. + (cherry picked from commit e2e7c47a528447e90cff6cf10d2ce457742ef48d) + +commit cc4eb1c7ea1bace7ed69cfd80c99d22933282ae1 +Author: Keith Packard +Date: Fri Apr 13 15:04:29 2007 -0300 + + Add quirk for Acer AL1706 monitor to force 60hz refresh. + + This Acer monitor reports support for 75hz refresh via EDID, and yet when + that rate is delivered, the monitor does not sync and reports out of range. + Use the existing 60hz quirk for this monitor. + (cherry picked from commit 1328a288e9030a472a915077160f090d1afd4126) + +commit eba81a0a01f8a61151d8bf9f3d83bda85ca26e73 +Author: George Sapountzis +Date: Sat Apr 14 18:30:09 2007 +0300 + + glx: move __glXMesaProvider from GLcore module to glx module. + + This treats the GLcore provider similar to DRI provider, using a subset of + XMesa as the GLcore interface. + +commit 6b040b79f0e247b6f2da8f7d239443743e96de67 +Author: George Sapountzis +Date: Sat Apr 14 18:29:52 2007 +0300 + + glx: drop xmesaP.h include from xf86glx.c + + The declarations for the xfree86-specific XMesa functions were moved up to + xmesa.h, requires Mesa as of 2007-04-13. + +commit 2c833f60acb3dc358815a99cd295ef7fc695c45d +Author: George Sapountzis +Date: Sat Apr 14 18:29:25 2007 +0300 + + glx: drop stray CAPI define. + + SI imports/exports were dropped from Mesa. + +commit 7ccebc50b98ac175fdbdfaab081bcead62e60ee3 +Author: Peter Hutterer +Date: Fri Apr 13 13:08:44 2007 +0930 + + Documentation for events.c. + +commit 33a5d9605e3e282f6aa1921d7321a2a12ef02c42 +Author: Daniel Stone +Date: Wed Apr 11 18:28:57 2007 +0300 + + XFree86: DGA: Don't call ProcessInputEvents from CloseScreen + + By the time CloseScreen gets called, we can't call ProcessInputEvents, as + the event queue will get unhappy. So just unregister our hooks instantly, + and hope that they don't get called. + +commit 0910540e4322bba72a2fa0a907072eab2547a7b6 +Author: Remigiusz Marcinkiewicz +Date: Wed Apr 11 01:09:26 2007 +0300 + + Config: Extend D-BUS API + + Return device ID where available. + Add listDevices call, which does what it says on the box. + +commit aecbc712144dd1aaf462bd758821438b1d22d957 +Author: Remigiusz Marcinkiewicz +Date: Wed Apr 11 00:38:16 2007 +0300 + + Input: Allow a pointer to a device to be returned in NIDR + + Allow a pointer to the first device added to be returned, so we know which + device(s) were added by the NIDR call. + +commit 4f05f9591e5492c72f3856bd7a2ff13378f59f2b +Author: Magnus Vigerlöf +Date: Tue Apr 10 23:57:48 2007 +0300 + + Input: Always add devices with first available ID + + Scan the device list when adding a new device, and make sure we can use + the first available ID, instead of always incrementing. + +commit 20674dcbb2373a0af287883bc008fb6fb23d4466 +Author: Magnus Vigerlöf +Date: Tue Apr 10 23:55:36 2007 +0300 + + Config: Fix memory leaks + + Fix memory leaks that could occur along the error path. + +commit 82962bbae2b4fda274625d1712ef839ce1ab9dc8 +Author: Magnus Vigerlöf +Date: Tue Apr 10 23:54:32 2007 +0300 + + Input: Add DeleteInputDeviceRequest + + Add DIDR, which asks the DDX to remove a device, analogous to + NewInputDeviceRequest. Only implemented for XFree86 at the moment. + +commit 7b82a836c66ba88566255052caff63577e1a0384 +Author: Magnus Vigerlöf +Date: Tue Apr 10 23:52:08 2007 +0300 + + XFree86: Fix memory leaks, option parsing, in NewInputDeviceRequest + + Plugged some possible memory leaks, and added some more checks on the + options, particular for driver/identifier. Added an unwind. + +commit 4771fa8747791498e504d73afccfb5833499a38b +Author: Magnus Vigerlöf +Date: Tue Apr 10 23:48:00 2007 +0300 + + XFree86: Fix memory leak in option parsing + + Fix option parsing functions and callers thereof to not leak memory. + +commit 07c56abf84080c020a3e7b7703a447c7f996975c +Author: Magnus Vigerlöf +Date: Tue Apr 10 23:43:58 2007 +0300 + + Input: Plug memory leak in device free + + Remember to also free the motion history, if we're using the DIX-managed + history. + +commit e92743bc9839c36914a44f3e5bc8cd85773ac794 +Author: Daniel Stone +Date: Sun Apr 8 14:02:02 2007 +0300 + + getevents: Copy modifier state from extended to core devices + + Make core events carry the same modifier state as the extended events, so + that holding down Ctrl on keyboard A and pressing Q on keyboard B won't + cause your app to quit. + +commit e49f836d6fa2768cd6d2a6d0227b5dbf516013dc +Author: Daniel Stone +Date: Sun Apr 8 13:56:41 2007 +0300 + + mieq: Use larger default queue size + + Use a default queue size of 512 rather than 256, else Xephyr is too slow + without a host cursor, so events get stuck in the queue. + +commit 4aae2de74b9224bac2b2e2522637dac09abc3837 +Author: Jared D. McNeill +Date: Tue Apr 10 12:57:15 2007 -0700 + + Add a real xf86EnableIO/xf86DisableIO for NetBSD/PPC. + +commit f77a8ea849d171a8ca00b2b7334866ace1ffbf73 +Author: Keith Packard +Date: Mon Apr 9 14:29:46 2007 -0700 + + Rotate screen size as needed from RandR 1.1 change requests. + + Screen size must reflect rotated mode size when setting rotated mode using + RandR 1.1 SetScreenConfig request. + (cherry picked from commit efcec7dbd3c2736c7b421d29c4d37e231aa681d2) + +commit bcf17df69a232e5e84609abacdca36274316e170 +Author: Keith Packard +Date: Mon Apr 9 14:12:27 2007 -0700 + + Disable CRTC when SetSingleMode has no matching mode. Update RandR as well. + + xf86SetSingleMode tries to resize all crtcs to match the selected mode. When + a CRTC has no matching mode, it now disables the CRTC (instead of crashing). + + Also, poke the RandR extension when xf86SetSingleMode is done so that + appropriate events can be delivered, and so that future RandR queries return + correct information. + (cherry picked from commit dc6c4f6989f87149d8605604f4514f5cbf11de67) + +commit 67e1c98895a566f927e1ae2384d56cfca104f971 +Author: Adam Jackson +Date: Mon Apr 9 19:08:52 2007 -0400 + + Look for the PCI ROM file elsewhere in sysfs. + + /sys/devices reflects the bus topology, and we don't care that much. + Easier (and more reliable) to just look in /sys/bus/pci/devices, which + is a flat view. + +commit a08d5157f70567a0aa9583d4a15e62437340cf34 +Author: Adam Jackson +Date: Mon Apr 9 19:04:56 2007 -0400 + + VT activate or waitactive are fatal if they fail. + + Also, be sure to waitactive on the way down, to make sure we're off the VT + before exiting. + +commit 72b477f964c748a1ab668781643cc11877f19738 +Author: Adam Jackson +Date: Mon Apr 9 18:59:01 2007 -0400 + + Don't write out empty sections from the parser. + +commit 1f6741db19d4c91b1eacb497dff1814acb1bf0c3 +Author: Stefan Huehner +Date: Mon Apr 9 14:33:15 2007 -0700 + + Bug #10560: Code-Cleanup: function declarations () -> (void) + + X.Org Bugzilla #10560: + Patch #9511 + +commit f24391dbfd12a84253dfec794ee7884afd52e197 +Author: Keith Packard +Date: Mon Apr 9 12:30:31 2007 -0700 + + In AIGLX EnterVT processing, invoke driver EnterVT before resuming glx. + + As the driver EnterVT function generally re-enables the hardware and + prepares it for rendering, it must be called before any gl functions are + called which could touch the hardware. + +commit 4c2e28b0916b5f75cfefb6df9fa0a7a09675539a +Author: Keith Packard +Date: Mon Apr 9 12:28:53 2007 -0700 + + Add setrlimit call in -core option to make dumps occur. + + Default core size limit for most environments is 0, which disables core + dumps. Add code in the -core option processing path to set the core limit to + the maximum value. + +commit 4beeab8424774ea4c3142f29b90e33f1fc7cb154 +Author: Daniel Stone +Date: Sun Apr 8 13:39:06 2007 +0300 + + XFree86: Treat evdev and vmmouse as mouse drivers (bug #10512, #10559) + + When we see an evdev or vmmouse section, assume that it's a mouse, and + don't add a default mouse device. This will break users who have an + evdev keyboard section but no mouse, and want the mouse to get added + by default. + +commit 0a6ac992363343487dfe0a0fc985ea55bd448382 +Author: Brian +Date: Sat Apr 7 12:41:57 2007 -0600 + + regenerated to fix bug 10371 + +commit 7e385598613778de14c0feea0d32f17d7aa66a8e +Author: George Sapountzis +Date: Fri Apr 6 13:38:12 2007 +0300 + + GLcore: fix after moving xf86glx_util.[hc] to Mesa. + +commit 5a804f2e97ab59745482660a635b801ac2b9e769 +Author: George Sapountzis +Date: Thu Apr 5 19:14:31 2007 +0300 + + configure: minor cosmetic, move GLX extension options together. + +commit a4e2fc703484fffed8dd50c1b4b24c564be4d3cd +Author: George Sapountzis +Date: Thu Apr 5 19:13:47 2007 +0300 + + glx: Remove stray __GLinterface. + + __GLinterface was droped from glcore.h + +commit 38ca7d388c47c4800c74442172d6595a9b3dfcc7 +Author: George Sapountzis +Date: Thu Apr 5 19:13:14 2007 +0300 + + glx: fix symlink, glcontextmodes.c was moved to mesa/src/glx/ + +commit f8482967ae8080f49dd1bbb0b79cc65020df679f +Author: Thomas Hellstrom +Date: Wed Apr 4 12:28:48 2007 +0200 + + Add an EXA driver callback to determine whether a pixmap is + + "offscreen" in exa terms, which means accessible to the GPU. + Bump exa minor. The change is backwards-compatible. + +commit c10df5b967d4da4e11786520317e2917de5541fa +Author: Aaron Plattner +Date: Tue Apr 3 15:47:01 2007 -0700 + + Swap RRScreenChangeNotifyEvent dimensions when the screen has one crtc and it's rotated. + + RandR 1.1 clients expect the size fields in this event to be the unrotated + dimensions of the screen. This behavior is "weird", but that's the way the old + code worked so we need to be bug-compatible with it. + +commit e1dea151db6405e12d991feacba9446320739ee8 +Author: Brian +Date: Tue Apr 3 11:21:50 2007 -0600 + + Implement a minor hack in dmxCheckFunctionKeys() to detect special keys. + + Keep track of status of (left) alt/ctrl keys so that ctrl-alt-q to exit + can be detected. Not ideal, but works for now. + +commit 0ee40c935750e25a9e178cdd70f6b2c667e79344 +Author: Brian +Date: Tue Apr 3 09:31:00 2007 -0600 + + s/intead/instead/ + +commit 23974f20bf0e0c2786cc75af026af5484f6dc331 +Author: Brian +Date: Tue Apr 3 09:30:24 2007 -0600 + + add DDXRingBell() stub to solve link problem + +commit a240c039c47c0be22ea5e100692307b26d938747 +Author: Brian +Date: Tue Apr 3 09:27:57 2007 -0600 + + Split the xserver/fb/fbcmap.c file into two files. + + Now, fbcmap_mi.c contains the fb functions which just wrap mi functions. + Previously, these were in fbcmap.c and compiled when XFree86Server was defined. + Now, clients of fbcmap should either use fbcmap.c or fbcmap_mi.c and not worry + about setting the XFree86Server symbol. + +commit 1cc8db72816cd079f30255046e10043c350bf683 +Merge: 645d87c... a39f297... +Author: Matthieu Herrb +Date: Tue Apr 3 16:04:45 2007 +0200 + + Merge branch 'master' of ssh://herrb@git.freedesktop.org/git/xorg/xserver + +commit 645d87cf8ef724d4591614f9994cdc4d7549a7a8 +Author: Matthieu Herrb +Date: Tue Apr 3 15:47:18 2007 +0200 + + CVE-2007-1003: XC-MISC Extension ProcXCMiscGetXIDList() Memory Corruption + +commit a39f297ada4fa87c858395ae2aacefac5f8fba05 +Author: Keith Packard +Date: Mon Apr 2 14:15:36 2007 -0700 + + Don't erase current crtc for outputs on CloseScreen + + Erasing this variable causes some outputs (SDVO on intel) to fail + to be correctly reset at server reset time. + (cherry picked from commit 56262a4ee943f328d089a8eb4aa70b9a4bd5d135) + +commit 11797ffdcc22160317a5ebbc9291472570a51c6d +Author: Eric Anholt +Date: Mon Apr 2 18:21:58 2007 -0700 + + Move modes/ debugging output under Option "ModeDebug" in the Device section. + +commit e44f106ffc796c025abdfb66717c06db8b12b4e4 +Author: Brian +Date: Mon Apr 2 16:26:15 2007 -0600 + + clean-up, debug code + +commit 8d8bc8927760fad631bef83fa2841b455ff6d511 +Author: Brian +Date: Mon Apr 2 16:21:57 2007 -0600 + + fix formatting + +commit 3e482de7b145a5eed79b81c30c359fe43647824a +Author: Brian +Date: Mon Apr 2 15:38:15 2007 -0600 + + checkpoint: more clean-up + +commit 76a7a5ca1f068c27c9b5fbd49d5a1da80ed6f488 +Author: Brian +Date: Mon Apr 2 15:24:05 2007 -0600 + + formatting fixes + +commit 69baad321d35dae0bfa535be0c6ed2131fed1e60 +Author: Brian +Date: Mon Apr 2 15:21:22 2007 -0600 + + clean-up dmxCoreMotion() dmxCoreMotion2() + +commit 44eb15adeee3b299677070f39625daa53679bd13 +Author: Brian +Date: Mon Apr 2 15:12:04 2007 -0600 + + checkpoint clean-up + +commit 0f873a9d4f02b399c37b4058c6a9a2e21aa205e8 +Author: Brian +Date: Mon Apr 2 14:51:38 2007 -0600 + + remove some debug code + +commit 3a0ce1084a18e17a3c8a009d99c228652b8763a9 +Author: Brian +Date: Mon Apr 2 14:51:21 2007 -0600 + + for completeness, init dummy's min/maxval[1] values (vertical axis) + +commit 12016f20f7f5365f30cfbeb05568b3fb89759e5a +Author: Brian +Date: Mon Apr 2 14:50:48 2007 -0600 + + As for normal mouse device, init valuator maxval[] to real values, not zero. + +commit 0aaf28e5633a59563b89a2e42d19fabc84adc3ed +Author: Brian +Date: Mon Apr 2 12:41:30 2007 -0600 + + In dmxBackendMouGetInfo() initialize the info->minval[], maxval[] arrays to the size of the backend display. + + It seems that the changes to X input exposed a problem that wasn't detected + before. The axis clipping code in GetPointerEvents() uses those limits to + constrain the pointer's coordinate range. The max was zero so the pointer + couldn't move. + +commit 0013bf6ddb3867c9a504603434d8c2ec83f3f3bc +Author: Brian +Date: Mon Apr 2 12:39:04 2007 -0600 + + undo 1280 valuator hack + +commit 08a88d1803f672555141011e082fbc0edeedcf05 +Author: Brian +Date: Mon Apr 2 12:28:14 2007 -0600 + + Pass num_valuators=0 for ButtonPress/Release. This seems to fix the button coordinate problem + +commit 70683e338dacc48e3adf489d66ec33b29dfc3b77 +Author: Brian +Date: Mon Apr 2 12:26:27 2007 -0600 + + formatting fixes + +commit f2808005f4ee72c5fd7f5f3dcca181306485113e +Author: Alberto Mardegan +Date: Sat Mar 31 16:51:24 2007 +0200 + + Bug #6620: Fixed a missing 'else' in ATIPseudoDMAInit(). + + Before this, we'd write some registers twice on R200 hardware and also + possibly end up with a bad value in atis->cce_pri_size. + +commit 5257b32e492bd2082bef6a4cd0fea03ce093c0f8 +Author: Aaron Plattner +Date: Wed Mar 28 15:51:24 2007 -0700 + + Bump video driver ABI to 2.0 for cw change (commit 6ed08949af4f7ac09170d3d9581e4092b24a84ee). + +commit 73fdc16bc4f4e21ff604b3f9ded23b40398fb1b6 +Author: Brian +Date: Fri Mar 30 16:07:26 2007 -0600 + + formatting fixes + +commit ebdc8ce5c108dc3b6b0004e7c7939d1a5bef8676 +Author: Brian +Date: Fri Mar 30 16:05:46 2007 -0600 + + Checkpoint DMX updates: things are working much better now, but still not 100% right. + + Use new dmxCoreMotion2() function which enqueues motion events with + GetPointerEvents()/mieqEnqueue(). + The clipAxis() code in GetPointerEvents() is causing some grief. The + limits seem to have always been (0,0) according to the original calls + to InitValuatorAxisStruct() in dmxinputinit.c. + Terrible hack for now: Call InitValuatorAxisStruct() with hard-coded max + values of 1280 (my screen width). + +commit 3c7413e0c2f87e154aa8aa4a83bd585a6d1091e8 +Author: Brian +Date: Fri Mar 30 14:07:04 2007 -0600 + + Tweak some parameters, etc. Things seem a little better now, but still a ways to go. + +commit 7989dacdcb1449b10d7733dda11cd96e260e9fae +Author: Brian +Date: Fri Mar 30 13:44:24 2007 -0600 + + num_valuators=1 for GetPointerEvents(), hack ButtonPress/Release position + +commit 1ea842960fddbc6363cc6e7f914d70ba45525a6b +Author: Brian +Date: Fri Mar 30 13:43:15 2007 -0600 + + more debug + +commit 92e8cdbd32b0d86cabd4ad88e3240bf90c018b9a +Author: Brian +Date: Fri Mar 30 13:19:33 2007 -0600 + + Checkpoint fixes to DMX for X input changes. + + Xdmx builds and runs now. + Keyboard seems OK, and mouse pointer moves, but everything else is flakey. + Something is still seriously wrong. + +commit d92da3d5f309392ac398c0975ef17bb04312d5e2 +Author: Brian +Date: Fri Mar 30 12:56:34 2007 -0600 + + more formatting fixes + +commit 44acb2517d9fb07790d9d799aa9cc727d1b7d35c +Author: Brian +Date: Fri Mar 30 12:54:22 2007 -0600 + + Fix some bad formatting. + + Doing this: + if (something) stmt; + is evil if you're debugging and want to break on stmt! + +commit 9f24798af50896cc3262c1201f75c10a688f2a83 +Author: Brian +Date: Fri Mar 30 12:49:34 2007 -0600 + + ompile fbcmap.c w/ -DXFree86Server instead of linking libfbcmap.a. + + The former works, the later doesn't (DMX blows up on visuals/pixel formats). + This undos Daniel's patch, which undid my prev patch. Revisit someday. + +commit 76756f27561c6386cba0d338441e8ec7b98500ce +Author: George Sapountzis +Date: Thu Nov 30 04:20:32 2006 +0200 + + Make xf86glx.c unaware of Mesa internals + + Use newly added XMesaCopyContext() and drop the GlxSetRenderTables() call + for Xgl, as this is now done inside XMesaForceCurrent(). This leaves xmesaP.h + but only for the declarations of the three XMesa/XFree86 functions. Also, + GlxSetRenderTables() stays but is only used in hw/xgl/glxext/ . + + Also drop xf86glxint.h, no longer used. + + Depends on mesa commit 7439a36785b6a2783e80a40a96c09db8f56dc2bc of 2007-03-30. + +commit 307d2b57bbfcc281656011533627bea6ab98189e +Author: Peter Hutterer +Date: Thu Mar 29 15:23:41 2007 +0930 + + Xi: remove 'register' keywords. + +commit 82a8b99a6c46018885600011913267d8af9dfe13 +Author: Adam Jackson +Date: Wed Mar 28 15:17:02 2007 -0400 + + Move the XAA private indices to be static. + + Technically this is an ABI break, if you aren't smart enough to be using the + getter functions. Cope. + +commit 8c7f56d92d8471ee059c14d322af5f7f555dd5c6 +Author: Tomas Janousek +Date: Wed Mar 28 14:46:30 2007 -0400 + + Bug #10296: Fix timer rescheduling. + +commit 5ba4d9eedf1b4ce4795bf910cd184872e2d9b3fc +Author: Adam Jackson +Date: Wed Mar 28 12:03:19 2007 -0400 + + Refuse to create tiny modes from EDID detailed timing. + +commit 85220446359a75ea2c359b418b4051c04eea739c +Author: Daniel Stone +Date: Wed Mar 28 13:03:32 2007 +0300 + + GL: Update for Mesa changes + Added s_fragprog.c to fix the build. + +commit 1af2ef0b25fd8017a3271e624a5f1548f02b09f9 +Author: Eric Anholt +Date: Tue Mar 27 13:13:45 2007 -0700 + + Enable Composite by default now that it disables itself in the known bad cases. + +commit 0bfc3cc22db94ec6867596606fe93228e315c847 +Author: Eric Anholt +Date: Tue Mar 27 13:12:21 2007 -0700 + + Disable composite when Xinerama is active. + + It will likely take a decent bit of work to make that work right. + +commit 5e7936371c9e1ac48e19bf1e9e3f71f037fd9b5d +Author: Eric Anholt +Date: Mon Mar 26 20:18:18 2007 -0700 + + Disable Composite when the screen's visual is pseudocolor. + + Rendering fails badly in this case, and I don't care enough to fix it. + +commit 8afc7e2eb3ebec48d3879bf269143259c8bc18c8 +Author: Eric Anholt +Date: Mon Mar 26 15:55:38 2007 -0700 + + Refuse to initialize Composite if Render is not present. + + Composite relies on the presence of Render, in particular for the automatic + compositing. + +commit 6ed08949af4f7ac09170d3d9581e4092b24a84ee +Author: Eric Anholt +Date: Tue Mar 27 17:31:28 2007 -0700 + + Move libcw setup to the only renderer requiring it (XAA). + + Additionally, protect libcw setup behind checks for Render, to avoid + segfaulting if Render isn't available (xnest). + + The previous setup was an ABI-preserving dance, which is better nuked now. + Now, anything that needs libcw must explicitly initialize it, and + miDisableCompositeWrapper (previously only called by EXA and presumably binary + drivers) is gone. + +commit e76b6349516d5d1c8f7167d6f5419e0d06a546c3 +Author: Eric Anholt +Date: Mon Mar 26 16:04:50 2007 -0700 + + Fix indentation of fakexa help text. + +commit 6a0bed16e80a91891cee6c7033c90875bc2af193 +Author: Michel Dänzer +Date: Tue Mar 27 16:51:12 2007 +0200 + + Fix typo in GL/mesa/shader/slang/Makefile.am. + +commit b8f846a9dfc6697d59ad5482ba7c9d738875318e +Author: Dave Airlie +Date: Tue Mar 27 14:17:40 2007 +1000 + + gl: oops dodgy s appeared pointed out by jcristau on irc.. + +commit a63ee90bc2d490f6c5c1802c164391963cf6c1d9 +Author: Dave Airlie +Date: Tue Mar 27 11:05:52 2007 +1000 + + gl: update for latest mesa glsl-compiler merge + +commit d387a3ddf76716791e5e8b8f0954ca0df3c579d6 +Author: Dave Airlie +Date: Tue Mar 27 11:00:13 2007 +1000 + + fix loading of GLcore after recent loading changes + +commit 92ba435bd9aa7b6eca9aef8e5193576ef62fc9db +Author: Eric Anholt +Date: Mon Mar 26 12:44:58 2007 -0700 + + Update xorg.conf manpage for new RandR 1.2 monitor options. + +commit f7c5aa0dc0fa3569a2ee412c4f996960f936b6ed +Author: Eamon Walsh +Date: Mon Mar 26 10:21:44 2007 -0400 + + Remove dead NEED_DBE_BUF_BITS code. + +commit 2e3cc861f90415f200826bc71dab6298d759c42b +Author: Adam Jackson +Date: Sun Mar 25 22:01:34 2007 -0400 + + Since ddc, i2c, and ramdac are in core now, remove their ModuleData stubs. + +commit e88fa75c9b468b88bb7b87b1da235c6eb2fe8164 +Author: Adam Jackson +Date: Sun Mar 18 17:39:08 2007 -0400 + + Static cleanup on Xi/ + +commit 4b5802ddbd45271be3cadeae0a83a6742df2515b +Author: Adam Jackson +Date: Sun Mar 25 17:57:54 2007 -0400 + + General DIX static and dead code cleanup. + +commit 04b87d6dfae02e4ecdb5216d12c6cdafd1e8c2b4 +Author: Adam Jackson +Date: Sun Mar 25 17:57:22 2007 -0400 + + Static and dead code cleaup for Xext/ + +commit af769892a91c9af59de53ca3bcd77fc4967daffb +Author: Adam Jackson +Date: Sun Mar 25 17:56:32 2007 -0400 + + Static and dead code cleanup from mi/ + +commit 62224e39727fd6f1cf11a461983662f615a9fea1 +Author: Adam Jackson +Date: Sun Mar 25 17:55:15 2007 -0400 + + Static cleanup for xf86 ddx. + +commit e8bc1988d9ff10b65717574175f70df3c4d6334d +Author: Adam Jackson +Date: Sun Mar 25 15:13:05 2007 -0400 + + Un-staticise VTSwitchEnabled, since kbd wants it apparently. + +commit 70e493d223b1e943e652191150bd0b7e1a6ebcfb +Author: Adam Jackson +Date: Sun Mar 25 14:55:28 2007 -0400 + + Static and dead code cleanup over afb/ + +commit f36bf1a3e4ce9465ea4a6159c209924a3cafbe58 +Author: Adam Jackson +Date: Sun Mar 25 12:28:13 2007 -0400 + + Delete a dead file. + +commit 9a0f25de7ca3c68af867b38936103d17daa92ac6 +Author: Adam Jackson +Date: Sun Mar 25 12:27:01 2007 -0400 + + Static cleanups, dead code deletion. + +commit ac2356843e38b3400142bc54b65393c12976fc07 +Author: Peter Hutterer +Date: Sun Mar 25 09:41:33 2007 +0930 + + dix: Increase allocation size for core keyboard keymap to avoid buffer overrun when copying keymap from extension devices. + +commit 1072b88a8f352484e70bc749e300c936e5600480 +Author: Dave Airlie +Date: Sun Mar 25 10:06:00 2007 +1000 + + loader: fix already built-in message + +commit 804080a7096347d48c686f2c8fbfd06326bce400 +Author: Keith Packard +Date: Fri Mar 23 23:41:36 2007 -0700 + + Make pending properties force mode set. And, remove AttachScreen calls. + + Yes, two changes in one commit. Sorry 'bout that. + + The first change ensures that when pending property values have been + changed, a mode set to the current mode will actually do something, rather + than being identified as a no-op. In addition, the driver no longer needs to + manage the migration of pending to current values, that is handled both + within the xf86 mode setting code (to deal with non-RandR changes) as well + as within the RandR extension itself. + + The second change eliminates the two-call Create/AttachScreen stuff that was + done in a failed attempt to create RandR resources before the screen + structures were allocated. Merging these back into the Create function is + cleaner. + (cherry picked from commit 57e87e0d006cbf1f5b175fe02eeb981f741d92f0) + + Conflicts: + + randr/randrstr.h + randr/rrcrtc.c + + I think master and server-1.3-branch are more in sync now. + +commit 1f77120775dc05fc84a00dd55190af2fa50ae509 +Author: Keith Packard +Date: Fri Mar 23 14:39:10 2007 -0700 + + Ensure that crtc desired values track most recent mode. + + desiredX and desiredY were not recorded during xf86InitialConfiguration. + desiredX, desiredY and desiredRotation were not recorded during + xf86SetSingleMode. + (cherry picked from commit 36e5227215e0912ddf8a010db042467f00efe0fc) + +commit 476f2b5aefa518262b69e487555e6094818d857a +Author: Keith Packard +Date: Fri Mar 23 01:17:14 2007 -0700 + + Incorrect extra memory copy in RRChangeOutputProperty. + + Left over from previous version of the code, this memmove will break when + the mode is not Replace. + (cherry picked from commit 945aa0aa556429b50dea8e8ebc0008304b093eb7) + +commit 7093367c3976bef5b9d219d9f2a7dc7dd3eeb091 +Author: Keith Packard +Date: Fri Mar 23 01:05:55 2007 -0700 + + Fix Pending property API, adding RRPostPendingProperty. + + Pending Properties take effect when the driver says they do, so provide an + API to tell DIX when a property effect is made. Also, allow driver + to reject property values in RRChangeOutputProperty. + (cherry picked from commit 8eb288fbd69e2ffd02521d2c6a964c8180d08ec8) + +commit 86d76390eb182f271f5fa5dc19205e97a867f7e7 +Author: Keith Packard +Date: Fri Mar 23 01:03:40 2007 -0700 + + Make sure RandR events are delivered from RRCrtcSet. + + Some paths were skipping the event delivery stage. + (cherry picked from commit 9ca7ba5d6012295a77ed773c656e786440da973d) + +commit 510eaa346e68fd82c852c7b41fb0e2c5be12da78 +Author: Keith Packard +Date: Fri Mar 23 00:59:11 2007 -0700 + + Clean up xf86CrtcRec and xf86OutputRec objects at CloseScreen. + + Erase pointers to structures which are freed at server reset time. + (cherry picked from commit 492c768065f49306a2194a88edf96b85de0ff4ff) + +commit 479b2be4badab0a67b1f091feb83c1364e27d783 +Author: Keith Packard +Date: Fri Mar 23 00:57:18 2007 -0700 + + Clear allocated RandR screen private structure. + + Use xcalloc instead of xalloc when allocating this structure to ensure + consistent contents at startup. + (cherry picked from commit 16f4c0c1750824f2e5a001cef82a4122a7a2beb0) + +commit b63e0d2545bb75e14d9de019a88f31e20a2f7377 +Author: Keith Packard +Date: Tue Mar 20 07:17:27 2007 -0700 + + Clean up Rotate state on server reset. + + The rotation state is stored in the xf86_config structure which is not + re-initialized at server reset time. Clean it up at CloseScreen time. + (cherry picked from commit f8db7665dcd7af78ca4db2461e0bf787ec662cb1) + +commit 3e9f7a5504ab41d845e88f293d8498c963d8a7d8 +Author: Daniel Stone +Date: Wed Mar 21 02:35:31 2007 +0200 + + XFree86 DGA: Guard against NULL pointer dereferences. + Ass, u, me ... + +commit f292de2ef13dc994a38029cee9e2642576893332 +Author: Daniel Stone +Date: Wed Mar 21 02:04:12 2007 +0200 + + XKB: Fix size_syms calculation bug + + Apparently it needed to be nSyms*15/10, not *12/10; make it match the + other allocation code. + +commit f34b9a20b0181d3c2641c305e91180711afbd4b9 +Author: Daniel Stone +Date: Wed Mar 21 02:03:37 2007 +0200 + + XKB: Be a tiny bit more conservative with type allocation + + Make sure size_types will _always_ be 0 if we don't have any types. + +commit 021fc5cb2cb4a7972b4a6fcb570c1da92787d68d +Author: Adam Jackson +Date: Sun Mar 18 16:31:19 2007 -0400 + + Static markup and dead code cull over xkb/. + + The former has been pulled into the server now as + include/xkbsrv.h, and the world updated to look for it in the new place, + since it made no sense to define server API in an extension header. Any + further work along this line will need to do similar things with XKBgeom.h + and friends. + +commit 9398d62f27ee1b287e4458fd8b011c10f7b59efd +Author: Daniel Stone +Date: Wed Mar 21 00:18:24 2007 +0200 + + XFree86 input: Add backwards compatibility for motion history + Add the old motion history API back, as a shim around the new mi API. + +commit 0f75c47e0c5f4b2778930a6fabf894fc1dffd9d3 +Author: Daniel Stone +Date: Wed Mar 21 00:12:02 2007 +0200 + + xfree86 input: Re-enable DGA support + Re-enable DGA support for relative mouse motion. + +commit 80d29475b9a2ebbb303a8e324e09a15c528d5556 +Author: Daniel Stone +Date: Wed Mar 21 00:10:38 2007 +0200 + + mieq: Allow event handlers for arbitrary events to be set + Allow arbitrary events to use mieq by letting custom handlers be set. + +commit b8df961843a95b29258ae9c5d46ccfc620d8de1c +Author: Alan Coopersmith +Date: Mon Mar 19 18:03:26 2007 -0700 + + Define XF86PM on Solaris x86 builds now that we have sun_apm.c + +commit 720f302d241e88e6e9f2962207da1aa9a79728b7 +Author: Keith Packard +Date: Sat Mar 17 20:14:05 2007 -0700 + + Slow down DDC I2C bus using a RiseFallTime of 20us for old monitors. + + This time value makes the bus run slowly enough for even the least reliable + of monitors. Thanks to Pavel Troller for finding the necessary change. + +commit b5a8a71e64c76b8dd42962cbd7984215c6ce4aa8 +Author: Keith Packard +Date: Sat Mar 17 17:26:11 2007 -0700 + + Remove extra (and wrong) I2C ByteTimeout setting in DDC code. + + The DDC code sets the I2C timeouts to VESA standards, except that it had an + extra setting of the ByteTimeout value which was wrong (off by a factor of + 50). Removing this should help DDC work on many more monitors. Note that the + Intel driver duplicated these settings, along with the error. Yay for cult + and paste coding. + +commit 2489dae9f7def788910eee5733931392df83a0d6 +Author: Keith Packard +Date: Thu Mar 15 20:26:07 2007 -0700 + + Correct ref counting of RRMode structures + + RRModes are referenced by the resource db, RROutput and RRCrtc structures. + Ensure that the mode reference count is decremented each time a reference is + lost from one of these sources. The missing destroys were in + RRCrtcDestroyResource and RROutputDestroyResource, which only happen at + server reset time, so modes would be unavailable in subsequent server + generations. + +commit 9d0c3b52f25df89738fb1a62ccffda8c8cbb4689 +Author: Keith Packard +Date: Tue Feb 20 23:04:26 2007 -0800 + + Eliminate RRModeRec devPrivate field. + + The xf86 mode setting code was mis-using this field to try and store a + pointer to a DisplayModeRec, however, each output has its own copy of every + DisplayModeRec leaving the one in in the RRModeRec devPrivate field pointing + at a random DisplayModeRec. + + Instead of attempting to rectify this, eliminating the devPrivate entirely + turned out to be very easy; the DDX code now accepts an arbitrary RRModeRec + structure and set that to the hardware, converting it on the fly to a + DisplayModeRec as needed. + (cherry picked from commit 3506b9376c2b0db09bfff58d64e07af88a6e8195) + +commit 2c93083edd29a65e73bb2e8eff9d353e92845c9b +Author: Keith Packard +Date: Sun Feb 18 23:49:38 2007 -0800 + + Add support for user-defined modelines in RandR. + + The RandR protocol spec has several requests in support of user-defined + modes, but the implementation was stubbed out inside the X server. Fill out + the DIX portion and start on the xf86 DDX portion. It might be necessary to + add more code to the DDX to insert the user-defined modes into the output + mode list. + (cherry picked from commit 63cc2a51ef87130c632a874672a8c9167f14314e) + + Conflicts: + + randr/randrstr.h + + Updated code to work in master with recent security API changes. + +commit 3bffb281260476d2f74f0bf451d85d2f7cacd6c4 +Author: Keith Packard +Date: Thu Mar 15 16:16:16 2007 -0700 + + Don't wedge when rotating more than one CRTC. + + Rotation block handler was re-registering the rotation damage structure, + creating an infinite loop in the damage code. Track registration of the + damage structure to avoid this. + (cherry picked from commit b14f003b0ed1252766c9e3b1c086ea2809521047) + +commit 9562b6abe1da566cf73a08c4f4c4339fb67fbc71 +Author: Keith Packard +Date: Thu Mar 15 10:50:45 2007 -0700 + + Allow xf86_reload_cursors during server init. + + xf86_reload_cursors is supposed to be called from the crtc mode setting + commit hook; as that happens during server initialization, check for this + case. + (cherry picked from commit 5b77bf2d020b1ee56c1c5f2db089a8f7f64a76a6) + +commit 3b71b0f89f1db837da91650baa0ef4bb7ef2e98f +Author: Eric Anholt +Date: Thu Mar 15 13:21:00 2007 -0700 + + Set the RandR version returned, rather than just passing the proto's version. + +commit 2fe74ef339c3a4902ae8214f5a0454662895422c +Author: Matthias Hopf +Date: Thu Mar 15 16:56:01 2007 +0100 + + Fix calculations in x86 emulator for the long long case (Andreas Schwab). + +commit ae75019ccf1edac9e8be31b6a96293624f672ccb +Author: Keith Packard +Date: Wed Mar 14 23:59:29 2007 -0700 + + Create driver-independent CRTC-based cursor layer. + + This moves most of the cursor management code out of the intel driver and + into the general server code. Of course, the hope is that this code will be + useful for other driver writers as well. + + Check out xf86Crtc.h for the usage information, making sure you add the + needed hooks to the crtc funcs structure for your driver. + (cherry picked from commit 4d81c99a4660a0bf9014f789de55edabd185bd14) + +commit 4bf1b280f7cb676ec2b172f26dd2ad9bac2eb2ca +Author: Alan Hourihane +Date: Fri Mar 9 14:18:14 2007 +0000 + + Set pScreen on context + +commit c366b82bd50066019cf82b3464445d5bc27d6f9f +Author: Jay Estabrook +Date: Fri Mar 9 12:26:55 2007 +0000 + + Ensure domain is stripped from the bus ID. + +commit 405483496538f1c82cbd7fe1e76c5d94e1a90525 +Author: Peter Hutterer +Date: Fri Mar 9 14:16:23 2007 +1030 + + mi: remove 'register' keywords. + +commit 63169ce52d354b4345dcfc46b89f0ea88379718f +Author: Peter Hutterer +Date: Thu Mar 8 17:50:19 2007 +1030 + + dix: remove 'register' keyword for all variables. + +commit 40ae4f246d8818410490236ab183204a84765629 +Author: Keith Packard +Date: Wed Mar 7 20:52:31 2007 -0800 + + Remove stale monitor data when output becomes disconnected. + + Remove parsed EDID and EDID property from disconnected outputs. + (cherry picked from commit ae9d5aa479dd50cc81b755079fcf96a0d02f135a) + +commit b5fde366e2e21234ac0b81222fd5c42ca3e49cba +Author: Eamon Walsh +Date: Wed Mar 7 12:29:55 2007 -0500 + + Properly free device devPrivates - memory leak fix. + +commit a3d2c5d622d9ca36d6fa2966aff09524e3ea39ac +Author: Adam Jackson +Date: Wed Mar 7 11:02:47 2007 -0500 + + XORG_VERSION_CURRENT, not XF86_VERSION_CURRENT. + + If only this was the least wrong thing in this code. + +commit e9bfb2b3d7dfaafd90d2ad0fa3d0e1acced4380b +Author: Keith Packard +Date: Tue Mar 6 23:19:30 2007 -0800 + + Add hw/xfree86/docs/README.modes, documenting new mode setting APIs. + + This document covers both API and xorg.conf usage of the new mode setting + APIs. + (cherry picked from commit a59c31b0f7b94ed1f395c7586c37ef5fe7ba2a25) + +commit 72a23d88d73a8c72ed18847b004db05092d3e7be +Author: Keith Packard +Date: Tue Mar 6 23:15:34 2007 -0800 + + Add xf86CrtcScreenInit to share initialization across drivers. + + xf86CrtcScreenInit performs initialization that needs to happen at + ScreenInit time. + (cherry picked from commit 558a4f5588ad2ec11254e0b5d6ce9515b137369e) + +commit 81526232bc0119d2ec7b8590be4f78cf066ae359 +Author: Eamon Walsh +Date: Tue Mar 6 17:19:11 2007 -0500 + + remove PIXPRIV check as this flag is always set. + +commit a7cd53deb99957dec27a55ffd75e548b322ae0ce +Author: Eamon Walsh +Date: Tue Mar 6 15:32:13 2007 -0500 + + remove PIXPRIV checks as this flag is always set. + +commit 024bbc7cbb924daaf3e305ddfc8e74509acd1e15 +Author: Eric Anholt +Date: Tue Mar 6 16:18:59 2007 -0800 + + Bug #9931: Fix linear allocations with a non-1-byte granularity. + + This was introduced in 83080809f9a1c1d24b0318e54632f25f5940da25. Instead of + aligning the offset, it doubled it. Results were appropriately spectacular. + +commit 9d94c137596d3f9d9118ec70455b7a30b3582046 +Author: Ben Byer +Date: Tue Mar 6 11:09:30 2007 -0800 + + updated todo list + +commit 81d581e655fc989da3be4256b83849a63b8607b7 +Merge: a05ffca... d5aba03... +Author: Ben Byer +Date: Tue Mar 6 10:37:29 2007 -0800 + + Merge branch 'master' of git+ssh://bbyer@git.freedesktop.org/git/xorg/xserver + +commit a05ffca8dd0da9bdb5c1bf4c481028aeabf21e34 +Author: Ben Byer +Date: Tue Mar 6 10:36:51 2007 -0800 + + rewrote event handling, Xquartz now has working mouse and keyboard. use it\! + +commit d5aba03feff41722c72b4c6193f09d141cbf1678 +Author: Drew Parsons +Date: Tue Mar 6 23:53:23 2007 +1100 + + Xprint: shorten font filename to fit in tar length limit + + The length of the Xprint font file NewCenturySchlbk-BoldItalic.pmf + pushes the full path over the traditional 100 character limit for + tarballs (when module version number is included). Shorten it to + NewCentSchlbk-BoldItal.pmf to get back below the limit and rename + other font files in that family to match. + +commit 3206e9225897989638ad553e1f392b918ac4d21f +Author: Ben Byer +Date: Tue Mar 6 02:31:59 2007 -0800 + + moved new event-handling code from X11Application.m to darwinEvents.c in preparation for making all Darwin servers use it + +commit 0ccd1443fd6db397b42e5b99ce733ce1316c785e +Merge: ec1ef8a... 9b6bb06... +Author: Ben Byer +Date: Tue Mar 6 01:04:50 2007 -0800 + + Merge branch 'master' of git+ssh://bbyer@git.freedesktop.org/git/xorg/xserver + +commit ec1ef8a56d6217ca2b04899043874ce0bcad9784 +Author: Ben Byer +Date: Tue Mar 6 00:57:23 2007 -0800 + + Fixed Darwin's Makefile.am to fix a problem building X11.app + +commit 9b6bb06f13a71f6078f762b4a78fa516faccb638 +Author: Keith Packard +Date: Mon Mar 5 23:49:35 2007 -0800 + + Allow relative positions to use output names or monitor identifiers. + + Previous version used monitor identifiers if present, otherwise output + names. That caused existing working configurations to break when additional + information was added to the configuration file. + (cherry picked from commit 3f5cedf00a82f08a433c95ffbb7f8ac69dcf6a50) + +commit bed76caa6caaea6a6598755b82a54425a9d9f73e +Author: Keith Packard +Date: Mon Mar 5 23:36:00 2007 -0800 + + Use EDID data to set screen physical size at server startup. + + Screen physical size is set to a random value before the RandR code gets + control, override that and reset it to a value based on the compat_output + physical size (if available). If that output has no physical size, just use + 96dpi as the default resolution and set the physical size as appropriate. + (cherry picked from commit 843077f23a1b49bd712d931421753e3a09d4008c) + +commit 47f8361c3a64834587e54507653d8d5b258c2530 +Author: Keith Packard +Date: Mon Mar 5 22:07:01 2007 -0800 + + Add xf86SetDesiredModes to apply desired modes to crtcs. + + xf86SetDesiredModes applies the desired modes to each crtc (as selected by + xf86InitialConfiguration initially and modified by successful mode settings + afterwards). For crtcs without a desired mode, pScrn->currentMode is used to + select something workable. + (cherry picked from commit bcade98ccaa18298d844a606cb44271f0254c185) + +commit 33d2cf93fb50464941e74efe246b10aee212223a +Author: Keith Packard +Date: Sat Mar 3 23:10:31 2007 -0800 + + Move xf86SetSingleMode into X server from intel driver. + + This function applies a single mode to the screen (as from RandR 1.1, + XFree86-VidModeExtension or XFree86-DGA) using a policy that selects one + output to reconfigure to the requested mode and then makes all other outputs + fit within that size. + (cherry picked from commit 5a595c1f767a8d666348b845d18934aee0cfe38f) + +commit 689d52b6242434507a64a8fff27b01607628c393 +Author: Jens Granseuer +Date: Mon Mar 5 15:31:44 2007 -0800 + + Bugzilla #7145: fix build with gcc 2.95 + + Bugzilla #7145: + Patch #8987: + +commit fe7b8f4237874e3e45fe25a6bf06faddfa1ab8e1 +Author: Ben Byer +Date: Mon Mar 5 03:48:27 2007 -0800 + + began to factor out code to move to darwinEvents.c + +commit 537dc5ecde46d0525c503d1d2b39b6eb89a1298e +Author: Ben Byer +Date: Mon Mar 5 02:30:56 2007 -0800 + + started moving new input code into darwinEvents.c so that it may be shared by the three servers + +commit 8ba5e8d82014b774a52f3e050ddbbb8bde4e0933 +Author: Dave Airlie +Date: Mon Mar 5 13:46:41 2007 +1100 + + add a standard connector type and name for us as an output property + +commit 2e31872e05c2408d53ba0182bcddc5dabb3615fe +Author: Dave Airlie +Date: Mon Feb 26 09:40:00 2007 +1100 + + modes: add commit/prepare hooks + +commit 06b01186f6ae17aafdd1f628c306466ddea9e065 +Author: Keith Packard +Date: Sun Mar 4 17:15:24 2007 -0800 + + Remove debugging ErrorF from rotation code. + (cherry picked from commit e6af7569f201842b4754aec6e72b30dc2daefdfb) + +commit c14507b6837387d867792a24778786311b2b38d5 +Author: Keith Packard +Date: Sun Mar 4 17:06:37 2007 -0800 + + Handle non-zero origin rotated crtc. Damage crtc area on re-rotate. + + Box transformation from source to dest area was broken, leaving the wrong + areas painted when the crtc origin was non-zero. + + When rotating from left to right, the pixmap doesn't get reallocated, and so + no damage was left in the pixmap from xf86RotatePrepare. Separately damage + the whole crtc area when this occurs to repaint the area. + (cherry picked from commit 2a50ca2160bc05af1c24421ec079e902ff730277) + +commit 97978b515b7af5fbaaa32b1729e835f3bfb9f5c6 +Author: Drew Parsons +Date: Sun Mar 4 16:28:54 2007 +1100 + + Xprint: fix font symlinks + + Change symlinks to Xprint base fonts in model/PSdefault using local + relative links. This facilitates moving the Xprint config files, for + instance for FHS compliance placing data files in /usr/share rather + than /usr/lib. Also ensures NewCenturySchlbk-BoldItalic.pmf is + installed. + +commit 215e3691b76a63e6af19865790193b20b105ec5a +Author: Ben Byer +Date: Sat Mar 3 21:52:56 2007 -0800 + + stopped using XTrans internals in X11.app because they're apparently no longer public + +commit ea8dcc458ea8870126cf8d3e21cab9d63d094c5e +Author: Ben Byer +Date: Sat Mar 3 21:51:20 2007 -0800 + + Makefile fix for X11.app + +commit 18508212599bf0964c450c69b9790208e5d428be +Author: Ben Byer +Date: Sat Mar 3 21:41:33 2007 -0800 + + fixed X11.xcodeproj to get CFLAGS and LDFLAGS from autoconf script + +commit 7f2b9f3790456044d01bf8e6404f9a1239b41da6 +Author: Ben Byer +Date: Sat Mar 3 19:27:53 2007 -0800 + + autoconf fixes for XDarwin (created DARWIN_LIBS) + +commit ea1a72946d1aa4c256e6afb9d834c582ba4ac3a1 +Author: Aaron Plattner +Date: Wed Feb 28 14:26:47 2007 -0800 + + Add a canGrow argument to xf86InitialConfiguration. + + canGrow indicates to the DDX that the driver can enlarge the desktop via the + xf86_config->funcs->resize hook. If so, xf86InitialConfiguration will set + virtual[XY] to match the configuration it chooses and will leave the crtc config + size ranges alone. If FALSE, it will bloat the screen to fit the largest probed + mode and also set the crtc config max size to limit the desktop to the initial + virtual[XY] size. + +commit 04d15da95d608766c7832a7aa881be499c1395ba +Author: Aaron Plattner +Date: Wed Feb 28 13:36:58 2007 -0800 + + Add a screen resize hook to xf86CrtcConfigRec. + + This hook is called when the DDX needs to resize the screen. The driver is + responsible for changing virtualX and virtualY, along with any other related + screen properties (devPrivate.ptr, devKind, displayWidth, etc.). + + Use the size range from the crtc config instead of randrp->virtual[XY] when + reporting the min and max screen sizes to the DDX. + +commit b11dfac287d65de7b83f63749087cba4e8ddaf4a +Author: Matthias Hopf +Date: Fri Mar 2 12:30:26 2007 +0100 + + Legacy framebuffer support wasn't compiled if Xorg wasn't explicitly enabled. + +commit 2dafc46e3d814e02b25e5a2fa2e931f0257402a8 +Author: Ben Byer +Date: Thu Mar 1 17:44:39 2007 -0800 + + Fixed pointer events in Xquartz -- Keyboard events work, but + the keycodes are incorrect. + +commit 39ecd6fff4f946deebe310b4b26b171c842db223 +Author: Ben Byer +Date: Thu Mar 1 01:45:19 2007 -0800 + + Rewrote parts of the Xquartz event-handling code (thanks daniels and whot!) + It should still be considered a work in progress, but mouse events almost work. + +commit ed7ccc481ad1caaa518cafe944c2327a5d0b6c65 +Author: Ben Byer +Date: Thu Mar 1 00:51:10 2007 -0800 + + AIGLX support for Darwin -- works well enough to run + glxgears and glxinfo, but still needs more testing. + +commit 90ca76ba28fcd8bed945e33cf9674784fa2eb533 +Author: Jay Cotton +Date: Wed Feb 28 17:40:58 2007 -0800 + + Add sun_apm.c for Suspend-and-Resume support on Solaris + + + +commit 06c3021aec720837bef432656e88ae9b4e35101d +Author: Aaron Plattner +Date: Wed Feb 28 16:09:11 2007 -0800 + + Don't crash setting a NULL mode with a randr classic DDX. Also remember to update the screen size during modesets. + +commit 68c64ad7b1eea79c786b5a7f3459076780163a47 +Author: Peter Hutterer +Date: Thu Mar 1 09:51:20 2007 +1030 + + Xext: Update device's lastx/lasty when sending a motion event with XTest. + +commit 8b245758845523d5f8f017bb9d0e9aa57b616c28 +Author: Aaron Plattner +Date: Mon Feb 26 17:45:40 2007 -0800 + + Return BadMatch if a client tries to clone non-cloneable outputs. + +commit d9bcb22d199e8444b9762a35754e04d327dd5915 +Merge: 272d934... c16343a... +Author: Ben Byer +Date: Tue Feb 27 16:28:20 2007 -0800 + + Merge branch 'master' of git+ssh://bbyer@git.freedesktop.org/git/xorg/xserver + +commit 272d9341d0f7c3e9e0c9b9a8c0d4d8779cdcc5cf +Author: Ben Byer +Date: Tue Feb 27 16:27:26 2007 -0800 + + fix for hw/darwin/Makefile.am to properly use XSERVER_LIBS + +commit c16343ac2ca18391b21022b2edd02ad9f413d2b3 +Author: Eamon Walsh +Date: Tue Feb 27 14:14:47 2007 -0500 + + Make mfb, cfb, and afb support configurable at build-time. + +commit 5680efc0d2baf0a9451e82e490e3690fc23dda0f +Author: Alan Coopersmith +Date: Tue Feb 27 09:55:48 2007 -0800 + + Sun bug 6529003: Xorg should not be including on Solaris + + was removed from the latest Solaris Nevada build, but it's + been useless to Xorg for a long time (it only declared a couple of kernel + variables) + + +commit ab0fc8c1ad7ea2dc3389a4a4bb1c45bbded5e7ad +Author: Ben Byer +Date: Tue Feb 27 00:14:35 2007 -0800 + + verbiage corrected per daniels + +commit cdd4c84572cc3bdd004f8dca6d8b64e710344ac0 +Author: Ben Byer +Date: Mon Feb 26 23:57:02 2007 -0800 + + added hw/darwin/README.apple file with some todo items and props. + +commit 776d4d6587c57f94bca8732f915d07a0d4e137c8 +Author: Ben Byer +Date: Mon Feb 26 23:40:00 2007 -0800 + + X11.app now builds correctly + +commit 154d2c13f4ec22b7e6332808bbcd049d63784891 +Author: Ben Byer +Date: Mon Feb 26 19:39:26 2007 -0800 + + more changes for X11.app + +commit fa06e11f972e2a75c84b2f1586997ffc1239cbd9 +Author: Ben Byer +Date: Mon Feb 26 17:06:53 2007 -0800 + + added hw/darwin/apple directory, which contains source and data files to build + a version of the X11.app shipped with Mac OS X, using the X.org server. + +commit a16360733ea393ec1fc267e88fc604d9d7534484 +Author: Jay Estabrook +Date: Sun Feb 25 19:58:26 2007 +0000 + + Fix root bus/domain selection on alpha + +commit 566610680c4e1cab3e7fc7146adbeaba52fdd0ad +Author: Adam Jackson +Date: Fri Feb 23 15:20:35 2007 -0500 + + Don't install libi2c.a + +commit af550ea91c451cf4f831c2413266a19d1f211d0e +Author: Alan Coopersmith +Date: Thu Feb 22 14:38:40 2007 -0800 + + Move SecurityPolicy file format from Xserver(1) to it's own man page + + Don't make users looking for Xserver information page through pages of + details only interesting to the handful of people writing security policies. + +commit b1142cdbce76fed8cb22ba6d7ac027751dd56a76 +Author: Brice Goglin +Date: Thu Feb 22 12:26:04 2007 -0800 + + Bug #10034: 'man Xserver' typos: s/dqoute/dquote/ + + Bugzilla #10034: + Patch #8780: + +commit 3344a4eda704edc7dc30037f095de277a60a70bb +Author: Michel Dänzer +Date: Thu Feb 15 16:27:50 2007 +0100 + + DRI: Make sure number of DRI windows is accurate in driver ClipNotify hook. + + Always call DRI{De,In}creaseNumberVisible (which in turn calls + DRIDriverClipNotify) after updating pDRIPriv->nrWindows. + +commit 3c7a27dc77595ad018bb7c4f7cef6bc178268cb6 +Author: Michel Dänzer +Date: Wed Feb 14 16:17:18 2007 +0100 + + DRI: New ClipNotify driver hook. + + The hook is called whenever the clipList of any DRI window changes, be it via + DRIClipNotify, DRICreateDrawable or DRIDrawablePrivDelete. This allows the + driver to keep track of which DRI windows are visible where. + +commit eedf148e5a1273ebbf4dc8dcac9c435712fc00ea +Author: Michel Dänzer +Date: Fri Feb 2 18:27:40 2007 +0100 + + Track number of visible DRI windows separately for transitions. + + This allows e.g. doing page flipping with multiple DRI windows as long as + only one of them is visible. + +commit 8a42af6a935b1cf0e15102e986bb527f4fab31a8 +Author: Keith Packard +Date: Mon Feb 19 15:28:37 2007 -0800 + + Check for clientGone before sending events from XFixes (bug #1753). + + Freeing resources during client closedown can cause cursor changes which + attempt to send cursor events through the XFixes extension; a client in the + process of closing down has no file to send events to, causing a crash when + this path is hit. + +commit 4660eaaffb36f526f71d5847ae1309c10ee133c6 +Author: Ben Byer +Date: Sun Feb 18 14:09:51 2007 -0800 + + configure fixes for darwin + +commit 5631a67f648f5f151a849a918ee12871c71c32e9 +Author: Keith Packard +Date: Fri Feb 16 10:06:22 2007 -0800 + + Don't set subpixel order during startup; the screen won't be ready. + + in xf86CrtcSetMode, scrn->pScreen will be NULL during server startup time, + so don't try to set the subpixel order. subpixel order will be set in the + randr initialization anyways. + (cherry picked from commit 5f6f8616d862ce4a37f6d3df4bdbc44fd21cc82a) + +commit 096965ec9c7514f0c9fc0d17e5166f2d26781f87 +Author: Keith Packard +Date: Fri Feb 16 02:17:11 2007 -0800 + + Ensure drivers can use new modes header files. + + New modes header files required a few minor changes to be used by external + drivers, the most notable of which is the publication of the config file + parser header files. + +commit 55797dd252382d35ebab5d9e18a5e0e77872d775 +Author: Keith Packard +Date: Fri Feb 16 00:56:00 2007 -0800 + + Respect rotation in initial screen size computation. + +commit e4507825bf0328ea59673f2bbe652de3a9105c86 +Author: Keith Packard +Date: Fri Feb 16 00:41:29 2007 -0800 + + Enable startup-time rotation; change rotation pixmap creation API. + + Add monitor "Rotate" option taking one of "normal", "left", "inverted" or + "right". However, because initial mode selection is made before the screen + is completely initialized, we cannot create the shadow pixmap object at this + point. Pend the shadow pixmap creation until the block handler. + + Note that this code is not completely functional yet. + +commit 8606aeb9b2ab2dafc11e64436db4d3a7e67dbcc0 +Author: Keith Packard +Date: Thu Feb 15 22:23:16 2007 -0800 + + RRConfigureOutputProperty is a variable length request. + + Replace REQUEST_SIZE_MATCH with REQUEST_AT_LEAST_SIZE + +commit a88844eccb0e423e71d4fcb286866a026308babd +Author: Daniel Stone +Date: Sat Feb 17 20:35:07 2007 +0200 + + configure.ac: disable dmx per default + + Disable DMX until it gets ported to the new input API. + +commit e9a2cc7d9fcc73e16576be2522522cce675dc3f3 +Author: Daniel Stone +Date: Sat Feb 17 16:17:48 2007 +0200 + + config: error message cleanup + + Demote failure to connect from ErrorF to DebugF. + +commit 81876bc5ddc2f3eda5078fe4bd101917fb32e586 +Author: Ben Byer +Date: Sat Feb 17 04:07:11 2007 -0800 + + oops, missed a spot + +commit d287b76471f66c9aea54f969d050b35643cb2501 +Author: Ben Byer +Date: Sat Feb 17 03:47:42 2007 -0800 + + cleaned up some linking ugliness in hw/darwin/quartz + +commit 81444486be4f182dde778bac6f7edcbfc4368482 +Author: Ben Byer +Date: Sat Feb 17 02:23:11 2007 -0800 + + autoconf goodness for XDarwin, courtesy of pogma + +commit cf4994b0db2fef4c10ce8804adef766bc5118daf +Author: Ben Byer +Date: Sat Feb 17 01:21:43 2007 -0800 + + dix mods for Darwin + +commit cece0601571f6304e392a3a40505664544b249f3 +Author: Ben Byer +Date: Sat Feb 17 01:00:13 2007 -0800 + + build fix for configure.ac / BUILD_DARWIN, oops + +commit 00b0657b815b95964401c3e36eed54063afbd003 +Author: Ben Byer +Date: Sat Feb 17 00:55:32 2007 -0800 + + glx fixes for XDarwin + +commit 93777c7b96e560da087963040e372aecbfca7bbc +Author: Ben Byer +Date: Sat Feb 17 00:22:39 2007 -0800 + + more patches to make the Quartz part of XDarwin work again + (thanks Peter and Torrey!) + +commit 612144c811fdf06b7c03cf48a321388fe411acd4 +Author: Ben Byer +Date: Sat Feb 17 00:09:58 2007 -0800 + + More build fixes / updates for XDarwin: + quartz/cr: "Cocoa Rootless" support (deprecated in favor of xpr?) + quartz/fullscreen: Fullscreen support using Xplugin (not yet functional) + +commit 68d39d8571d8717d26cedc84015d537549520a14 +Author: Daniel Stone +Date: Fri Feb 16 23:02:13 2007 +0200 + + kdrive/ephyr: fix keysym type confusion once and for all + + Take keysyms in as an XID in hostx_load_keymap() and explicitly + convert them to CARD32 for loading into the server. Fixes Xephyr on + AMD64, wa-hey. + +commit 5507cb885d861e974be240120ada2ace2a980a72 +Author: Daniel Stone +Date: Fri Feb 16 23:01:27 2007 +0200 + + kdrive: delete input debugging, yet again ... + + I have no idea how this keeps on coming back. + +commit 84efe23ae834dd3a4d3f3e08832b69469c7382aa +Author: Ben Byer +Date: Fri Feb 16 04:37:38 2007 -0800 + + updated darwin/quartz/xpr (libXplugin interface for Mac OS X) support + +commit 5e7f7436a755a33e48ab91831cc6af710a8344ef +Author: Ben Byer +Date: Fri Feb 16 04:12:26 2007 -0800 + + merged in miext/rootless changes for XDarwin support + +commit f350909d1696fcfda87e8f12c729254d762313c9 +Author: Keith Packard +Date: Thu Feb 15 21:50:48 2007 -0800 + + Kludge around duplicate code added in hw/xfree86/modes. + + Code added in hw/xfree86/modes came from the server-1.3-branch. + Portions of this code had previously been integrated into xf86Mode.c + and edid_modes.c. + + To preserve hw/xfree86/modes as much as possible, the duplicate code from + the other files has been disabled; a more careful review would figure out + where that code actually belonged. + +commit 258beebc77510f84fbea66d6ebf29c5097bd11db +Author: Keith Packard +Date: Thu Feb 15 20:13:15 2007 -0800 + + Report correct RandR 1.0 sizeID. Report correct subpixel order. + + RandR 1.0 sizeID must be computed the same way every time, so when reporting + it in the ScreenChangeNotify event, just construct the usual 1.0 data block + and use that. + + subpixel geometry information can be computed by looking at the connected + outputs and finding any with subpixel geometry and using one of those for + the global screen subpixel geometry. This might be improved by reporting + None if more than one screen has information and they conflict. + +commit ef6b1235fd7d6dc422e8a150c089496a8e648067 +Author: Keith Packard +Date: Thu Feb 15 11:27:35 2007 -0800 + + Allow new modes code to build inside drivers as well as server. + + Use config.h for driver builds where xorg-config.h isn't available. + +commit 3dbe8f6b6ea32a9a137ad6e9235f74009b095bd8 +Author: Tilman Sauerbeck +Date: Thu Feb 15 17:51:01 2007 +0100 + + Distribute hw/xfree86/modes. + +commit d4eb4d065032112a38444e36f791cb468a5ca8f4 +Author: Keith Packard +Date: Thu Feb 15 20:36:20 2007 -0800 + + Merge crtc/output-based mode selection code. + + This code comes from the intel driver, so there's no history in this tree. + + As the crtc/output-based mode selection code uses ddc, the ddc and i2c + modules have been merged into the server. Attempts to load them are safely + ignored now. + +commit 37fe4c49dc3a5faf2d3d56112b6bd78453045f6a +Author: Peter Hutterer +Date: Fri Feb 16 09:57:57 2007 +1030 + + mi: Move WarpPointer event generation to miPointerMove to avoid duplicate + events, cache event array allocation. + +commit c2f3f705f1db8ca78292912544a7e416116175f3 +Author: Eamon Walsh +Date: Thu Feb 15 14:38:24 2007 -0500 + + Bug #6988: Change behavior of Security extension per user feature request. + +commit 811675733e97416c990e6dc9c19271b43d96248d +Author: Daniel Stone +Date: Thu Feb 15 19:09:00 2007 +0200 + + os: fix client privates leak + Minor leak here. Oops. + +commit 8f6961d385bda92703f18090cff551409d2710c9 +Author: Daniel Stone +Date: Thu Feb 15 19:08:46 2007 +0200 + + configure.ac: add xdarwin stubs + Add stub AM_CONDITIONALs to at least fix the build. + +commit a3b62623b8aac56b219633bdb2c2f6de19b0580b +Author: Daniel Stone +Date: Thu Feb 15 17:07:42 2007 +0200 + + change versioning for new server version scheme + See: + http://xorg.freedesktop.org/wiki/XDC2007Notes#head-2719037a1905516c45cf74f0e155c8703221e446 + +commit 0f6dd4aea6176507dbe1c90c950d332fecbcaacb +Author: Daniel Stone +Date: Thu Feb 15 16:14:57 2007 +0200 + + kdrive/ephyr: free screen struct + Free screen->driver on screenFini, instead of just leaking it. + +commit 9ecf79ca0111dd899ca88dd54156f71013220fcc +Author: Ben Byer +Date: Thu Feb 15 05:22:21 2007 -0800 + + Beginnings of an update Darwin driver + +commit 136bb4874aadf4a731d7eb8671e8bb641f9980a7 +Author: Ben Byer +Date: Thu Feb 15 05:14:38 2007 -0800 + + iokit support for XDarwin + +commit 3ead1afe78d2913f08c8144cb2d3813c6b159488 +Author: Ben Byer +Date: Thu Feb 15 05:09:29 2007 -0800 + + Beginning of patches to add XDarwin support to the modular tree; + special thanks to Torrey Lyons and Peter O'Gorman for making this possible. + + This is the automake framework for the XDarwin.app interface files. + +commit d570ff7c81858a3174686b46a088f67563b4a2d5 +Author: Peter Hutterer +Date: Wed Feb 14 17:09:33 2007 +1030 + + fix: WarpCursor needs to send MotionNotify. + +commit 81aa7f059d3cfd8d28420b7932b8ff7e06d67979 +Author: Eric Anholt +Date: Wed Feb 14 12:48:15 2007 -0800 + + Add missing dirty marking in a couple of fallback cases in the exaGlyphs path. + +commit a5f19c5150a7b3dc2ff3ad759ee1a6ab0ad8925c +Author: Eric Anholt +Date: Wed Feb 14 10:39:46 2007 -0800 + + Mark sync when UploadToScreen succeeds in exaGlyphs(). + +commit a492d494f51caf15a5cb979dc335387486c105d1 +Author: Alan Coopersmith +Date: Tue Feb 13 18:32:59 2007 -0800 + + Update Xvfb man page: remove monolith build instructions, use /var/tmp instead of /usr/tmp + +commit a23b0b069cac8a48e2b306b2095515d75f647705 +Author: Adam Jackson +Date: Mon Feb 12 17:50:00 2007 -0500 + + Typo fix. + +commit d21c95f80bdba2f29eedd57fb0b00e580391c08e +Author: Adam Jackson +Date: Mon Feb 12 17:22:39 2007 -0500 + + Hook up --with-builderstring for vendor build identification. + +commit 46784d24c11767455a4986449a8037295912dcee +Author: Adam Jackson +Date: Mon Feb 12 17:18:29 2007 -0500 + + Remove spurious LIBADD from xf4bpp + +commit c4b7e9d1c16797c3e4b1200b40aceab5696a7fb8 +Author: Aaron Plattner +Date: Tue Feb 6 14:57:22 2007 -0800 + + Add an RDTSC implementation to the x86 emulator. + + This instruction is being used in some debug VBIOSes. This implementation + doesn't even try to be accurate. Instead, it just increments the counter by a + fixed amount every time an rdtsc instruction in encountered, to avoid divides by + zero. + +commit 262b9b104a04e55969593ef96a16004e53ecd00a +Author: Soren Sandmann Pedersen +Date: Tue Feb 6 17:30:22 2007 -0500 + + Use the new 8888x0565mmx function in fbpict.c + +commit 876b806ec09d5ff0c6cd19df91006c4eefedfaa6 +Author: Soren Sandmann Pedersen +Date: Tue Feb 6 17:16:23 2007 -0500 + + Reapply patch to fix AMD CPU detection + +commit 13568d2aa43da4216bbcb46e1125ff28c323ac54 +Author: Soren Sandmann Pedersen +Date: Tue Feb 6 17:12:01 2007 -0500 + + Revert "Fix for AMD cpu detection. Bug 9614, Dan Williams." + + This reverts commit b2cd3b133748cc5aa541905a703a6fdb1cbbb1e6 since + unrelated changes in fbpict.c broke the build. + +commit 5a3334410367a2186b2c667fa1eb6cf0baf93e95 +Author: Soren Sandmann Pedersen +Date: Tue Feb 6 17:11:01 2007 -0500 + + Add new fbCompositeSrc_8888x0565mmx() function, based on patch by Dan + Williams. Bug 9682. + +commit b2cd3b133748cc5aa541905a703a6fdb1cbbb1e6 +Author: Soren Sandmann Pedersen +Date: Tue Feb 6 16:43:37 2007 -0500 + + Fix for AMD cpu detection. Bug 9614, Dan Williams. + + Credit for the fixes in this patch goes to: + + Marco Gritti + Jordan Crouse + +commit 760a38c4c7ab66ae653d3acb92f5cda4bd44edd6 +Author: Daniel Stone +Date: Mon Feb 5 03:39:36 2007 +0200 + + XkbCopyKeymap: fix copy-and-waste accident + + When we reallocated modmap, we accidentally clobbered syms with the + result, leaving syms definitely too small, and modmap also potentially too + small (as well as not actually allocated anymore). + +commit 17d85387d1e6851d35474b65929e268ca64ef65b +Author: Daniel Stone +Date: Thu Jan 18 15:23:57 2007 +1100 + + dmx, vfb, xnest: fix fbcmap compilation + + Don't always define XFree86Server, but only for damn fbcmap.c. + Split fbcmap.c into its own library to achieve this. + +commit 236f04b638e7d4d1656c6bedd8a6e8d7cec285ec +Author: Dave Airlie +Date: Mon Feb 5 09:09:12 2007 +1100 + + remove array_cache from everywhere + +commit eb228e8d1eaa78911541b2fec5d04a74c1299718 +Author: Alan Hourihane +Date: Sun Feb 4 22:06:59 2007 +0000 + + clean up more of the vbo fallout + +commit fb1bc1c65b88527b42a0e4abed23e5ddaae711b7 +Author: Dave Airlie +Date: Sun Feb 4 18:39:58 2007 +1100 + + add vbo to .gitignore + +commit d8e148ec841d340327e6813127b0e0ffc4db712d +Author: Dave Airlie +Date: Sun Feb 4 18:39:04 2007 +1100 + + update xserver for vbo code in mesa + +commit 5dcad9e9d7d9993d65f989219bee94a060bbf476 +Author: Alan Coopersmith +Date: Fri Feb 2 14:44:55 2007 -0800 + + Fix bus error on startup in 64-bit Xephyr + + hostx_get_visual_masks takes unsigned long * arguments, but was being + passed pointers to CARD32's. + +commit 170a55022ebc7b148bff93886eda152a0d5ce79a +Author: Alan Hourihane +Date: Fri Feb 2 20:56:12 2007 +0000 + + remove file + +commit e6a505be84f5f72349d6860dc5a5058367516019 +Author: Dan Nicholson +Date: Fri Feb 2 20:53:01 2007 +0000 + + The array_cache sources don't exist anymore in the Mesa tree, + so we shouldn't try to build them. + +commit af20485ec370801f2aabfaeae17bbd030a849bd1 +Author: Alan Hourihane +Date: Fri Feb 2 19:14:46 2007 +0000 + + Remove array_cache for recent Mesa changes + +commit cf5b29d75dad7c74543f49f010c817623a3df747 +Author: George Sapountzis +Date: Fri Feb 2 12:57:38 2007 +0200 + + dmx: drop leftover __GLXdrawablePrivateRec struct. + +commit 4f2f3233c808fd86bf9f6c09937feda9e0b367fd +Author: Eric Anholt +Date: Thu Feb 1 15:10:29 2007 -0800 + + Fix the size expectations of xRRSetCrtcGamma. + + It was using REQUEST_SIZE_MATCH (client request length must equal request size) + rather than REQUEST_AT_LEAST_SIZE (client request length must be at least + big enough for request size), and this request has data following the request + structure. + +commit 8274ea6aa97b06a56b7468c3908894c0ff72b687 +Author: Eric Anholt +Date: Thu Feb 1 12:15:54 2007 -0800 + + Set the Damage version supported in the server, instead of using damageproto. + + This was caught by distributions upgrading damageproto to 1.1, before the + server they had supported it. The server then advertised the new version + without supporting the protocol. + +commit 8bce182568f14edfb03911d8c5d791fd83bb6222 +Author: Eric Anholt +Date: Mon Jan 29 17:30:59 2007 -0800 + + Restore a few important lines killed in the previous commit. + + Typical results were failure to sync, and a black screen. + +commit 31f2d4a57e04f5ea635fbb50c508405c4fc37b65 +Author: Eric Anholt +Date: Mon Jan 29 09:39:33 2007 -0800 + + Bug #9680: Remove bogus blank length limiting in xf86SetModeCrtc(). + + Our modes typically come from EDID or default modes, and when the monitor + asks for a specific mode, deciding to tweak it usually results in incorrect + display. And if the user is specifying a mode by hand, tweaking it then is + still pretty rude. + + Reviewed by: ajax + +commit 1627af54497bee659ea30f2850b39cbbf576e22d +Author: Jonathan Lim +Date: Fri Jan 26 13:00:45 2007 +0100 + + Call linuxPciOpenFile() for r/w access if applicable. + + Currently, the call to linuxPciOpenFile() is always made for read + only access which causes the subsequent mmap call to fail when the + memory is mapped read/write. + + Xorg #9692 + +commit cf7ca9d09cba14d107152a5179de38e5ef7bd784 +Author: Alan Coopersmith +Date: Wed Jan 24 20:20:48 2007 -0800 + + Plug memory leak in doLoadModule() + +commit 5abd50e37ceda134897891ed32e05215db67e0b4 +Author: Alan Coopersmith +Date: Wed Jan 24 18:54:38 2007 -0800 + + Correct help lines for configure's --with-vendor-name flags + +commit b32a40817fc0e2ac2edf2fa22a8813087fce2e7b +Author: Alan Coopersmith +Date: Wed Jan 24 16:29:49 2007 -0800 + + Correct variable descriptions in comment for SecurityCheckResourceIDAccess + +commit a53586eebc166e35c1f48942205832810061daee +Author: Eric Anholt +Date: Wed Jan 24 13:36:25 2007 -0800 + + Warning fix for RRCrtcSetRotations(). + +commit 7a12952fd437b105ea0d013d680f9c3a775a183c +Author: Eric Anholt +Date: Wed Jan 24 13:34:29 2007 -0800 + + Bug #7639: Only swap out pixmaps (rather than everything) on VT switch in EXA. + + This is a new behavior for version 2.1 of EXA, and only takes effect if the + driver has requested that. Otherwise, the previous behavior remains the same. + +commit b6b855932109b4bc3454f07bef8cb079d79ca369 +Author: Keith Packard +Date: Thu Jan 25 00:29:20 2007 +0800 + + Make Xinearama screen information reflect CRTC rotation. + +commit 788cfce911793a26aed16f38f30678ecee82c873 +Author: Michel Dänzer +Date: Tue Jan 23 10:15:22 2007 +0100 + + Bump video driver ABI version to 1.2. + + This is necessary because server-1.2-branch bumped to 1.1 for xf86CVTMode and + we have xf86XVFillKeyHelperDrawable on top of that. + +commit 2dc866252c84ed0e7b3afa25e8a5312f448d405b +Author: Eric Anholt +Date: Mon Jan 22 08:41:50 2007 +0800 + + Really fix optimized render cases being hit when they shouldn't. + + I don't know how this define slipped in there. Fixes + 6fdfd9dad91d7b7aa292f8c4d268dd27c34de8d3. + +commit 0d6d373af95d0004d33b987d14ad7e04dd5d2003 +Author: Alan Coopersmith +Date: Fri Jan 19 14:52:23 2007 -0800 + + Update Xserver man page to match commit ed33c7c98ad0c542e9e2dd6caa3f84879c21dd61 + + Remove unused -xkbdb and -noloadxkb options. Rename -ar1 and -ar2 to + -ardelay and -arinterval, respectively. + +commit 14d6a9b327381a6bb2dac59c62728e5fd0f0bcfb +Author: Michel Dänzer +Date: Fri Jan 19 18:30:21 2007 +0100 + + fbdevhw: Only deal with RGB weight if default visual is True- or DirectColor. + +commit 27a01e100bff21ac0b70c6d72071d7226fc91264 +Author: Michel Dänzer +Date: Fri Jan 19 18:28:05 2007 +0100 + + fbdevhw: Consider mode set equal to mode requested if virtual width is larger. + +commit 65f4690ecb4576f60396fcccff8e5bd5d4b6645f +Author: Michel Dänzer +Date: Fri Jan 19 17:54:03 2007 +0100 + + __glXDRIscreenProbe: Use drmOpen/CloseOnce. + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=9275 . Based on patch from + Alan Swanson. + +commit 8b3a591cd39f2d51209dc71b641cac79663e1b16 +Author: Alan Coopersmith +Date: Thu Jan 18 16:03:30 2007 -0800 + + Update pci.ids to 2007-01-18 snapshot + + (includes a whole bunch of ATI device id updates) + +commit 0f0c321adf2850b3d7aafe281362bfe424cb0ca1 +Author: Alan Coopersmith +Date: Thu Jan 18 15:31:53 2007 -0800 + + Make xf1bpp build correctly with compilers that don't support -include + +commit a811e92104028ae60ba69f73e32ee1e0533b088c +Author: Eric Anholt +Date: Thu Jan 18 14:28:01 2007 -0800 + + Account for CRTC rotation in the cursor containment code. + +commit df147c10ce597c56c16cbca552e8a3e3ecb3cdaa +Author: Alan Coopersmith +Date: Wed Jan 17 16:47:07 2007 -0800 + + Xserver man page: remove bc, add -wr + +commit 2dfd1aab244a2c8da3b62b522b9a8434e474af17 +Author: Alan Coopersmith +Date: Wed Jan 17 14:39:28 2007 -0800 + + Always include compiler.h in cfbmskbits.h instead of checking #ifdef XFREE86 + +commit 42a48786acf54f83167de4f561526986d4e27033 +Author: Eric Anholt +Date: Wed Jan 17 14:34:42 2007 -0800 + + Add a setter for randr_crtc->rotations. + +commit cde17015dff1ced2aabb8b76c08f9110237821a5 +Author: Eric Anholt +Date: Tue Jan 16 13:01:03 2007 -0800 + + When changing a non-pending property, call the screen rrOutputSetProperty hook. + +commit e3add7c8ecbb2a0a662860f208f6ae7d1857c717 +Author: Eric Anholt +Date: Tue Jan 16 12:59:34 2007 -0800 + + Don't forget to add the property we configure to the properties list. + +commit 7fccec91c46baac4f8d2965180dc535b4eb7d65c +Author: Eric Anholt +Date: Wed Jan 10 13:10:43 2007 -0800 + + Bug #9555: Always define _GNU_SOURCE in glibc environments. + + This keeps us from having to define _POSIX_C_SOURCE, _BSD_SOURCE, and + _XOPEN_SORUCE to get the C environment we want in different places. It also + fixes the build on linux due to RTLD_DEFAULT having not been defined. + +commit 78f9592c112d4245f6119b98c244bbb4cae3e5aa +Author: Alan Hourihane +Date: Wed Jan 10 16:04:20 2007 +0000 + + lnx_ev56.c has to be built with -mcpu=ev56. Fix it. + +commit 6a2fb2928714ce77ee342cdc23a1178e5e766cf2 +Author: Eric Anholt +Date: Tue Jan 9 16:34:40 2007 -0800 + + Track rename of DamagePost -> DamageAdd. + +commit e3aa6ad201eb20862c11c000e76206e317a96dc9 +Author: Matthieu Herrb +Date: Tue Jan 9 14:14:19 2007 +0100 + + Multiple integer overflows in dbe and render extensions + CVE IDs: CVE-2006-6101 CVE-2006-6102 CVE-2006-6103 + +commit 359d20532bdcef6a540a551578d000afbb609c2d +Author: Michel Dänzer +Date: Tue Jan 9 09:53:45 2007 +0100 + + Require glproto >= 1.4.8 for GLX. + + It builds against 1.4.7 as well, but it hardcodes the GLX_EXT_tfp tokens that + were finalized in 1.4.8, so GLX_EXT_tfp breaks if the client side was built + against an older glproto. This will hopefully alert people to rebuild other + components (in particular Mesa) against the new glproto as well. + +commit 88740c4855babedbea420b5e1b35ae105d1f1026 +Author: Alan Coopersmith +Date: Mon Jan 8 17:36:07 2007 -0800 + + Use PKG_CHECK_EXISTS(libdrm) to determine if DRI should be enabled on Solaris + +commit 282a4dcaabc5f0cd6f7d3819aa648333b93b265e +Author: Michel Dänzer +Date: Mon Jan 8 19:22:41 2007 +0100 + + Attempt to fix drawable type checks in dixLookupDrawable(). + + Not sure this is 100% correct either, but it fixes at least one reproducible + crasher where it returned a pixmap to dixLookupWindow(). + +commit 0b73a7eb17fd848c6bdc6a65ba835aa2cbfc3cfd +Author: Eric Anholt +Date: Fri Jan 5 18:12:04 2007 -0800 + + Add support for the DamagePost (XDamage 1.1) request. + + This makes damageproto >= 1.1 a requirement to build. + +commit dfb2c10413e22afd8d486a982870f874326d5ef4 +Author: Ian Romanick +Date: Fri Jan 5 10:15:09 2007 -0800 + + Add missing #else from previous commits. + +commit f90c3e226b105bf77beb94723fc08bdff14834be +Author: Ian Romanick +Date: Thu Jan 4 15:38:16 2007 -0800 + + Re-regenerate from Mesa scripts. + + DO NOT HAND EDIT THESE FILES! For cryin' out loud, there's even a + comment to that effect in the file's header... + +commit b7ca5d14ce7ba410b0dab5c2289f6d7b75e763df +Author: Ian Romanick +Date: Thu Jan 4 15:37:33 2007 -0800 + + Incorporate new byte-order related configure changes. + +commit 8dd5771a1b91c331860b667fb18e484452000aad +Merge: 45aa26c... 7d2ec92... +Author: Ian Romanick +Date: Thu Jan 4 15:01:38 2007 -0800 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + + Conflicts: + + GL/glx/indirect_dispatch_swap.c + GL/glx/swap_interval.c + +commit 45aa26ccb4f61c2919ce2475d0907c6e1b177da2 +Author: Ian Romanick +Date: Thu Jan 4 14:55:51 2007 -0800 + + Regenerate from Mesa scripts. + + Regenerate source files from Mesa scripts. This causes the generated + files to use glxbyteorder.h. + +commit 6d603bb47ff9d238637adbf30c6e9697e6e7e6fa +Author: Ian Romanick +Date: Thu Jan 4 14:49:26 2007 -0800 + + Add new header file containing byte-order wrappers. + + Move the byte-order related wrappers out of the individual source + files into a dedicated header file. Modify the single hand-coded + source file that uses the byte-order wrappers to use the new header + file. + +commit 7d2ec92170ebbdfa10a05734cb7cfaac97d19d65 +Author: Eric Anholt +Date: Thu Jan 4 12:24:48 2007 -0800 + + Keep track of how many visuals we set up for GLcore, to avoid an invalid free. + + The proper fix would involve actually setting up the ARGB visual for GLcore, + but I just want the server to not crash at exit. + +commit aab2ca204279b638c7e5bb6b8427c58be9704c57 +Author: Eric Anholt +Date: Thu Dec 21 09:16:19 2006 -0800 + + Try dlsym(RTLD_DEFAULT) first when finding symbols. + + The previous mechanism failed when finding drm symbols now that libdrm has + moved to being linked by libdri instead of being linked into the server. + +commit 2fd4626fa6969b84d8e2f9db16d6e2d44c4bc499 +Author: Alan Coopersmith +Date: Wed Jan 3 15:44:55 2007 -0800 + + Make GLX byteswap macros more portable + + - Use autoconf tests instead of platform-specific #ifdef's to decide + which macros to use. + - Provide fallbacks for platforms like Solaris that don't provide any + of the existing known forms. + +commit 66fa87292ef26bd0f464481287f3af992cd5741c +Author: Aaron Plattner +Date: Wed Jan 3 10:27:07 2007 -0800 + + Fix BSF and BSR instructions in the x86 emulator. + + Patch courtesy of Michael Yaroslavtsev. + +commit 3b5b7ef5c2ab1d196806f6359e0972fd78d204dd +Author: Fredrik Höglund +Date: Wed Jan 3 21:05:35 2007 +0100 + + Move the code for resetting the DPMS mode in response to input events, + from WaitForSomething to mieqProcessInputEvents. + + mieqProcessInputEvents already handles resetting the screen saver. + +commit 953a9ef949b4c57d28daeec57031fe1ce368c27c +Author: Keith Packard +Date: Thu Dec 21 23:50:39 2006 -0800 + + Track physical screen size and send out updates when that changes. + + Events and internal data structures need to be updated whenever the physical + or pixel size of the screen changes. The code was ignoring the physical + size, so changing only that would not be registered anywhere. + (cherry picked from f42e3cea236fa0091ed398a818fc8e17b0e1b3df commit) + +commit e79602fca2f2cced66136729cdda4d356b0bdda0 +Author: Keith Packard +Date: Sat Dec 30 21:52:22 2006 -0800 + + Use RRScreenSetSizeRange in 1.0 compat. Check RRGetInfo for error. + + The RRScreenSizeSetRange function is used externally for 1.2 API drivers, + but can also be used in the 1.0 compatibility code. This also ensures that + the right changed bits are set so that clients are correctly notified when + the range changes. + + RRGetInfo can return an error, use that to return BadAlloc to clients + instead of blindly going on with various requests. + (cherry picked from f05dd384d38c76dd9662933a03625dfef5b1c81f commit) + +commit dc5eb4523298f966bd5fd9ae6672160034b5e82c +Author: Michel Dänzer +Date: Sun Dec 31 17:59:44 2006 +0100 + + fbdevhw: Override RGB offsets and masks after setting initial mode. + + This is a hack, but it should be a NOP for all the setups that worked before + and actually seems to fix some others... + + Based on a patch by Peter Teichmann from + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=338241 . + +commit d077c0da470ab7291e8d838eaace57b066477d6f +Author: Michel Dänzer +Date: Sun Dec 31 17:23:31 2006 +0100 + + fbdevhw: Use displayWidth for fbdev virtual width when appropriate. + + The fbdev API doesn't allow setting the pitch explicitly, so we have to set + the virtual width to the pitch we're using for drawing. This fixes corruption + after changing the virtual width with RandR. + +commit c385bcf0bde38dd869f7065f859dd4b4126f5690 +Author: Michel Dänzer +Date: Sat Dec 30 16:44:31 2006 +0100 + + fbdevhw: Fix some issues with the previous commit. + + Fix a TRACE_ENTER typo and only update the internal fbdev mode state cache + after actually setting a mode. + +commit f6815cb68b0f6698497348fc6e4214dacef33b95 +Author: Michel Dänzer +Date: Sat Dec 30 10:18:28 2006 +0100 + + fbdevhw: Consolidate modeset ioctl calling, report failure if it modifies mode. + + The fbdev API allows the driver to 'accept' modes it doesn't really support by + modifying it to the nearest supported mode. Without this check, e.g. vesafb + would appear to accept all modes, even though it actually can't set any modes + other than the bootup mode at all. + +commit 083b790515faaf134a78abc4b0a7ef0d6ea5db75 +Author: Eric Anholt +Date: Thu Dec 28 13:21:25 2006 -0800 + + Switch the default migration heuristic for EXA to "always". + + This has been what has been used the most successfully post-damagetrack. + The current thinking is that: + 1) We should be able to accelerate basically everything. So we don't need to + try to migrate trees of pixmaps permanently out of framebuffer to speed + CPU drawing up. + 2) Migration is cheaper in the thrashing case, so we don't want to go to a lot + of effort to try (and fail badly) to find a working set. + +commit cfbc7379f0232bb336461f6d2a8496d3d0763e7e +Author: Eric Anholt +Date: Thu Dec 28 13:15:11 2006 -0800 + + Export exaMove{In,Out}Pixmap(). + +commit 683ca3f7afaf15fd3ca7918f6175b5a9e4a6f05b +Merge: 05f9150... 9563b2e... +Author: Eric Anholt +Date: Wed Dec 27 16:11:31 2006 -0800 + + Merge branch 'exa-damagetrack' + +commit 05f915050cad72d4fb39cbb886be57beeac18749 +Author: Peter Hutterer +Date: Wed Dec 27 16:38:06 2006 +0000 + + dix/events: take screen number, not pointer, in PostSyntheticMotion + Since we were using PostSyntheticMotion incorrectly anyway, update the + declared API to match. + +commit c1674660a7115ebf993dcde78f4e45f756e4c951 +Author: Daniel Stone +Date: Sun Dec 24 06:28:44 2006 +0200 + + os: test for userland, not kernel + + It doesn't matter which kernel we're running on, the relevant part when + dealing with includes is what our userland is. + +commit 83080809f9a1c1d24b0318e54632f25f5940da25 +Author: Marc Aurele La France +Date: Sun Dec 24 06:28:21 2006 +0200 + + xfree86: deal with pitch that isn't a multiple of the granularity + + When the pitch isn't a multiple of the granularity, allocate more space to + compensate. + +commit 329f6417275bb1201ba66c29b202028eeab3a355 +Author: Daniel Stone +Date: Sat Dec 9 22:51:59 2006 +0200 + + XkbCopyKeymap: make sure sym_interpret is always valid + + Make sure we're not copying sym_interpret across from an empty source. + +commit d9e079d2a385203fdd18d958cfc19d759cab4ba8 +Author: Eamon Walsh +Date: Fri Dec 22 13:07:09 2006 -0500 + + Zero out client devPrivates on allocation. + +commit e437f357b6850a6c87ca6696870b3abd40e5b8ed +Author: Alan Coopersmith +Date: Tue Dec 19 16:38:34 2006 -0800 + + xorg.conf man page should say "XFree86-DGA", not "Xorg-DGA" + +commit d442998e39611be6805ea261f2286a2fd00f49b1 +Author: Eric Anholt +Date: Fri Dec 8 13:35:36 2006 -0800 + + Only do the _POSIX_C_SOURCE hackery on linux where it's required. + + On other OSes, the nasty hack was resulting in prototypes being hidden, so just + don't do it. + +commit 228b9f77696190e47d4c96d6e0809bf645751557 +Author: Eric Anholt +Date: Fri Dec 8 13:32:22 2006 -0800 + + Include sys/select.h to get FD_ISSET. + +commit 9563b2eea2f61246b6a9e14e00c701f693efa4e1 +Author: Michel Dänzer +Date: Tue Dec 19 18:57:22 2006 +0100 + + EXA: Lots of damage tracking fixes. + + Mostly due to exaDrawableDirty() now calculating the backing pixmap coordinates + internally, for cases where they aren't trivially known. There's a new + exaPixmapDirty() function for the other cases. + +commit 467c00cf450826e0bf06fe94470ec193af625d68 +Author: George Sapountzis +Date: Tue Dec 19 18:45:25 2006 +0100 + + exaGlyphs: mark dirty for software path also. + + This affects drivers with no UploadToScreen or UploadToScreen failures. + +commit 4334860e69e7d5b156082bd05c7a86708e5bad4c +Merge: 7e47176... fdcc22c... +Author: Michel Dänzer +Date: Tue Dec 19 16:29:26 2006 +0100 + + Merge branch 'master' into exa-damagetrack + + Conflicts: + + exa/exa_accel.c + exa/exa_migration.c + +commit fdcc22ca1704d3519156c66804528c21b04fea65 +Author: Michel Dänzer +Date: Tue Dec 19 16:11:17 2006 +0100 + + exaCopyNtoN: Fix usage of 'dx' and 'dy' instead of 'reverse' and 'upsidedown'. + +commit 67c2a86e59e915d9a5681e9d233478cfea3e51ed +Author: Michel Dänzer +Date: Tue Dec 19 15:44:18 2006 +0100 + + EXA: Compare backing pixmaps instead of drawables against driver limits. + + The driver operations are always contained within the backing pixmaps, it + doesn't matter if the drawables are bigger. + +commit 6b1e354dbb6e8ed9f2c654bbe7f8bbf241843d1c +Author: Eric Anholt +Date: Tue Dec 19 15:24:19 2006 +0100 + + EXA: Disable SHM pixmaps. + + See https://bugs.freedesktop.org/show_bug.cgi?id=6772 . + +commit 1b029fd896b76096905c516925ce0214fe14632c +Author: Alan Coopersmith +Date: Mon Dec 18 14:51:04 2006 -0800 + + Xorg & Xserver man page updates for 1.2 release + + - Added -extension & +extension to Xserver man page + - Changed Xorg synopsis from X11R6 to X11R7 + - Clarified Xorg ancestry description + - Moved Solaris to free/Open Source OS list + - Removed references to MetroLink module loader & getconfig + - Converted (1) to (__appmansuffix__) in a few more places + - Replaced http://www.freedesktop.org/cvs/ with http://gitweb.freedesktop.org/ + +commit a5fcf1e5e7452c9be82f63b6c2be2a25c4109523 +Author: James Steven Supancic III +Date: Sat Dec 16 12:02:38 2006 -0500 + + Fix RENDER issues (bug #7555) and implement RENDER add/remove screen + support (bug #8485). + +commit c92f7bef54fa737766d65fe32c200f405f39228c +Author: Kevin E Martin +Date: Sat Dec 16 12:01:49 2006 -0500 + + For Xvfb, Xnest and Xprt, compile fbcmap.c with -DXFree86Server + +commit 012807356883128fde58bb2d4f91dd356d6418fc +Author: Eamon Walsh +Date: Fri Dec 15 18:27:16 2006 -0500 + + Add loud warnings to deprecated lookup functions. + Hopefully this will alert external driver maintainers. + +commit ab1d5b0c31a1cfce95ab6b1d06f209f2c44e19ac +Author: Eamon Walsh +Date: Fri Dec 15 17:26:58 2006 -0500 + + Convert callers of LookupClient() to dixLookupClient(). + +commit f11dafaafc68f5cff1a1538d9566907786d8ab72 +Author: Eamon Walsh +Date: Fri Dec 15 16:51:58 2006 -0500 + + Convert callers of SecurityLookupDrawable() to dixLookupDrawable(). + +commit 10aabb729d1586db344f9c1abdf1cf45e7ddaa7a +Author: Eamon Walsh +Date: Fri Dec 15 16:36:29 2006 -0500 + + Convert callers of LookupDrawable() to dixLookupDrawable(). + +commit 25d5e0a629f82d95bd71daf9a920a70e095b5188 +Author: Eamon Walsh +Date: Fri Dec 15 15:50:46 2006 -0500 + + Convert callers of SecurityLookupWindow() to dixLookupWindow(). + +commit 04c721854fbf1bd6379c165a53fab2bdc09961c0 +Author: Eamon Walsh +Date: Fri Dec 15 14:11:40 2006 -0500 + + Convert callers of LookupWindow() to dixLookupWindow(). + +commit 670bbb87310503fcc17203cecfa6f4f2f5db51d2 +Author: Keith Packard +Date: Wed Dec 13 01:21:32 2006 -0800 + + RandR 1.2 rotation code must adjust width/height. + + Mode lines reflect the monitor mode, not the projected size into the frame + buffer. Flip width/height around so that the dimensions are oriented + correctly. + (cherry picked from 612a8e61803da8db0e305cbb093696b8e4284572 commit) + +commit 6c6901434ab469dd03b79fc98cd4a2b64d339305 +Author: Keith Packard +Date: Wed Dec 13 00:58:54 2006 -0800 + + RandR 1.0 refresh rates unscrambled. SetScreenConfig uses RRCrtcSet right. + + RandR 1.0 refresh rates were scrambled when working with a 1.2 driver that + returned sizes in a mixed order. SetScreenConfig was treating RRCrtcSet as + returning an RandR status instead of a Bool. + (cherry picked from 6dc711833d7387372012fdff1ce1df3aefa2d234 commit) + +commit 628c7daeb12713d28e85e6b49fa037a7748dff83 +Author: Keith Packard +Date: Tue Dec 12 22:59:03 2006 -0800 + + RandR: config time updates when hardware config changes. + + The config time in the RandR protocol reflects when the hardware state has + changed. It was getting changed anytime the driver changed the usage + of the hardware as well. + (cherry picked from 98d18a6578130adb411ca4bcc776fcb7e07f189f commit) + +commit d742025f435f3eb7458cf8284d59300bc9a850aa +Author: Keith Packard +Date: Tue Dec 12 20:16:49 2006 -0800 + + RandR mode list needs both output and crtc modes. + + When an output no longer reports the current mode, it must still be included + in the list advertised by the X server. Walk the crtcs to ensure it is + included. + (cherry picked from 78689d0d6630afcbcd3ce5394d12c2564a489f45 commit) + +commit 9e32bf98bc9ab17a137664d01f59a8f426f7ff3b +Author: Eamon Walsh +Date: Thu Dec 14 19:31:58 2006 -0500 + + Remove now-unused macro definitions from dix.h. + +commit 00f0705b3bb444ac934fc902cd23130f1777eab2 +Author: Eamon Walsh +Date: Thu Dec 14 19:15:21 2006 -0500 + + Remove instances of macros SECURITY_VERIFY_GEOMETRABLE and SECURITY_VERIFY_GC. + +commit 5e334f06a1ef89891f9df2a371e4662340bec26b +Author: Eamon Walsh +Date: Thu Dec 14 18:27:09 2006 -0500 + + Remove instances of macros VERIFY_GEOMETRABLE and VERIFY_GC. + +commit 51b69ff499c05f59cb1e577c4e8abf6f7f283b3e +Author: Eamon Walsh +Date: Thu Dec 14 17:53:43 2006 -0500 + + Remove instances of macro SECURITY_VERIFY_DRAWABLE. + +commit 0cf75e74322e2b6a6efc7acf892e04365fde503b +Author: Eamon Walsh +Date: Thu Dec 14 17:27:12 2006 -0500 + + Remove instances of macros LOOKUP_DRAWABLE and VERIFY_DRAWABLE. + +commit ab1886df73b73360fa3bd7ce8e01affc074cbc8d +Author: Eamon Walsh +Date: Thu Dec 14 15:42:19 2006 -0500 + + Add new, combined dix lookup functions (tweak). + +commit 60cdc592fe042c03ceb5d4c3344acfbbf5d8ae28 +Author: Eamon Walsh +Date: Thu Dec 14 14:46:03 2006 -0500 + + Add new, combined dix lookup functions. + +commit 6c46645cfc1afda8aeabfe0ed4d9342673b702f1 +Author: Eamon Walsh +Date: Thu Dec 14 14:45:42 2006 -0500 + + Naming change: Security*Access -> Dix*Access + +commit b88ad820fac81d0dfd557a384bf0406e8893e7af +Author: Alan Hourihane +Date: Wed Dec 13 12:13:11 2006 +0000 + + Set Int10Current->Tag for the linux native int10 module + Fixes bug #9296 + (cherry picked from 731952c561a3972d09d1315f4fd31466e459ccb9 commit) + +commit 81281cb298a5825bc7a2e692375a86199293bbbe +Author: Alan Hourihane +Date: Tue Dec 12 11:28:24 2006 +0000 + + Fix bad commit + +commit 792e0f71c6a435b2e28f8a4cdcc790f3b982e62c +Author: Alan Hourihane +Date: Mon Dec 11 14:54:49 2006 +0000 + + Fix Xming fails to use xkb bug + bug #5049 (Colin Harrison) + +commit 27d4b84f268ac21601f7f52a7e257f70753396b3 +Author: Alan Hourihane +Date: Mon Dec 11 14:50:08 2006 +0000 + + Fix Tooltip from minimized clients + + Bug #3678 (Colin Harrison) + +commit fb8364bca30fe9268e807b0a9a3ebf875ee1fce2 +Author: Adam Jackson +Date: Sun Dec 10 11:24:05 2006 -0500 + + Accept EDID > 1.3 but < 2.0 if we find it, assume it's compatible. + +commit d56249a15ead51ad4d2117d5538ada24af05b693 +Merge: f1f8df1... ec84f72... +Author: Jeremy C. Reed +Date: Fri Dec 8 15:52:37 2006 -0600 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit f1f8df1889ab656bb57596e2f85408f15f42cd5d +Author: Jeremy C. Reed +Date: Fri Dec 8 15:51:44 2006 -0600 + + For MANDEFS, also replace __mandir__ for $(mandir) which includes + the prefix. Noticed wrong path to man pages on both Ubuntu and on + NetBSD with pkgsrc. + +commit ec84f72d077eaf2e7768a1f5398f65a5e1714d08 +Author: Daniel Stone +Date: Fri Dec 8 21:31:47 2006 +0200 + + XkbCopyKeymap: always initialise map and preserve + + If we don't have map or preserve in the source map, make sure the + destination is initialised to NULL, and freed if it's a valid type. + +commit e59aeac1ff13ea53f44dba1ac7800f37f4532ca1 +Author: Daniel Stone +Date: Wed Dec 6 23:44:06 2006 +0200 + + xfree86: remove stray debug line + +commit 729fca33a417ae3dfb180caf0ea8946ef9eee1df +Author: Michel Dänzer +Date: Thu Dec 7 12:09:18 2006 +0100 + + Revert "xfree86 DDX: Delete DDX screens in ddxGiveUp()." + + This reverts commit a6381e69845f58d2b3282992b1f881015190f1bc. + + See https://bugs.freedesktop.org/show_bug.cgi?id=9224 . + +commit 4ea6dfb984063117eef5c2f931205b1c3eb3108b +Author: Daniel Stone +Date: Wed Dec 6 23:24:39 2006 +0200 + + whitespace police + +commit 4cba1a1ebfbdd7ab489b1b1ffb6656cbe88eb61e +Author: Daniel Stone +Date: Wed Dec 6 23:21:38 2006 +0200 + + config: bus reconnect support + + Add support for reconnecting to the bus when it restarts. + +commit 0c5dab5c8eaa174f28054b9d20244a709c015210 +Author: Daniel Stone +Date: Wed Dec 6 23:21:15 2006 +0200 + + config: move config.h to hotplug.h + + Also, move configInitialise to after OsInit, since the next commit will + make it use a timer. + +commit 72e7f2ac6cf0db474d0defa7918f2a3ba76c0e46 +Author: Daniel Stone +Date: Wed Dec 6 23:18:52 2006 +0200 + + GetPointerEvents: always send valuator events for MotionNotify + + Always chase a DeviceMotionNotify event with a DeviceValuator, which is + not required in the spec, but will silently break the lib if you don't + include. + +commit c458a70d650bd62b8f4706f022d1f3f347636db1 +Author: Daniel Stone +Date: Wed Dec 6 20:30:44 2006 +0200 + + GetPointerEvents: fix typo + + Fix typo that resulted in inverted axes when using an absolute positioning + device that didn't report y, and thus relied on the previous value. + +commit edabf45425f9ed79547f918cc0dfff4c268de386 +Author: Daniel Stone +Date: Sat Dec 2 16:37:19 2006 +0200 + + configure.ac: add CONFIG_LIB to Xvfb + +commit 8724af248cd6c93182fecd060fed09a556361080 +Author: Daniel Stone +Date: Sat Dec 2 16:20:34 2006 +0200 + + kdrive/mga: fix compiler warning + + Change a case that only made one test for an if, preventing the compiler + warning about all other PICT_* types being unsupported. + +commit 2f0a800ffdc881cdb3adf84f1ed97bbb63cba34c +Author: Daniel Stone +Date: Mon Nov 27 22:22:53 2006 +0200 + + config: move to block/wakeup handler + +commit 99378b58dbc63160382ad9c41f9cb0dd2a24e9d1 +Author: Daniel Stone +Date: Mon Nov 27 22:22:33 2006 +0200 + + kdrive/tslib: remove vendor-specific hacks + + Parts of the KDrive merge accidentally contained a bunch of + vendor-specific hacks; sorry. + +commit 8884a73a3f4efa8276c5e38b9573201574c4f1f6 +Author: Daniel Stone +Date: Mon Nov 27 22:39:56 2006 +0200 + + xfree86/input: re-add support for disabling drag events + +commit f2903c12bb4bb0b7c94b96c55af8fa55507f9d7d +Author: Daniel Stone +Date: Tue Nov 7 11:13:32 2006 +0200 + + SyntheticMotion: don't dereference sprite.screen when not using Xinerama + + (cherry picked from aa052e43c6c293e14f78837e00c6b7581f9713bb commit) + +commit d17ec01e8395a8f14b75a10c8bf082b3f5a4fb36 +Author: Daniel Stone +Date: Fri Dec 1 00:41:41 2006 +0200 + + remove CID support (bug #5553) + + Remove CID from all our fontpaths. + (cherry picked from 69820a10e33e4582c192360996e866007114639d commit) + +commit abe5e079af715713097ab0daad29a3e9f523c398 +Author: Alan Coopersmith +Date: Wed Dec 6 07:58:03 2006 -0800 + + Update pci.ids to 2006-12-06 from pciids.sf.net + +commit 724f9cb578086e8483a2d0636dd6eb05d664d31c +Author: Aaron Plattner +Date: Tue Dec 5 13:44:05 2006 -0800 + + Bug #9219: Use pWin->viewable instead of pWin->realized to catch InputOnly windows too. + +commit 3690de9b1b0902d395bc7d071fc05ebc8f75be2b +Author: Aaron Plattner +Date: Tue Dec 5 12:42:12 2006 -0800 + + Bug #9219: Return BadMatch when trying to name the backing pixmap of an unrealized window. + + Before this change, ProcCompositeNameWindowPixmap would name the screen pixmap + if !pWin->realized. + +commit f9f7d7f3be53c808abb5eaceb7a1abc55744a210 +Author: Alan Coopersmith +Date: Mon Dec 4 13:36:30 2006 -0800 + + Check for __sparc as well as __sparc__ for compatibility with Sun cc + + (gcc defines __sparc__, Sun cc defines __sparc) + +commit ac90ce58ba1da3ed605adf75f4d54c34b578c402 +Author: Eamon Walsh +Date: Fri Dec 1 21:12:21 2006 -0500 + + Naming change: Security*Operation -> Xace*Operation + +commit f44f14fe564d834568a0afefba944223a73ea0f5 +Author: Eamon Walsh +Date: Fri Dec 1 20:48:15 2006 -0500 + + Define calls away when not building XACE, allowing ifdef's to be removed. + +commit a5d6499d666fea4a9988118ddd3a5e4c9cfcc32c +Author: Alan Coopersmith +Date: Fri Dec 1 16:42:37 2006 -0800 + + Fix syntax error in configure check for SYSV_IPC that broke with Sun cc + +commit 89b2aa9be81613cb1a06bd535bf50ecf2a00208d +Author: Keith Packard +Date: Mon Nov 27 21:40:24 2006 -0800 + + Destroying RandR crtc or output overwrites memory. + + RRCrtcDestroyResource and RROutputDestroyResource had matching + bugs that would overwrite memory past the end of the storage + of the crtc or output arrays. Oops. + (cherry picked from 4202b23ed86405a4cebfdcf239df1b023c1d10ca commit) + +commit 23ba72323af785516db6cbcf6c1b2fa907a8232f +Author: Keith Packard +Date: Thu Nov 30 23:16:42 2006 -0800 + + RandR ListOutputProperties has nAtoms element, not nProperties + + Earlier RandR 1.2 encoding revisions used 8-bit nProperties field. + Final RandR 1.2 spec uses 16-bit nAtoms field instead. + (cherry picked from 66b6358a393972946f16394918db2401c51dc5ed commit) + +commit ccd804c6c01cdfffe938fa5336be9b5668a6f0c0 +Merge: 9423ac1... 82912ad... +Author: Drew Parsons +Date: Fri Dec 1 15:21:57 2006 +1100 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 9423ac134a2a9800787c4978d384827cc4e61fc8 +Author: Drew Parsons +Date: Fri Dec 1 15:21:05 2006 +1100 + + GNU/FreeBSD support in GLX: include byteswap.h for FreeBSD systems + defining __GLIBC__, as done already for Linux and Hurd (cf. bug #5613). + Also includes some more __GNU__ checks on top of those made in + commit ade4bf09076d13dbf3549c0a2d987a0afe76d5c1. + Thanks Petr Salinger (Debian bug #400869). + +commit 82912ad7709e8cf4a5f8a9fa6b47f789842a3fe9 +Author: Alan Coopersmith +Date: Thu Nov 30 20:13:52 2006 -0800 + + Make solaris version of xf86OSRingBell return void like other OS'es + +commit 8956f63a941bf0a5f157d47b33e6221601a75040 +Author: Alan Coopersmith +Date: Thu Nov 30 19:53:29 2006 -0800 + + Tell automake to STFU about the *.O files + + automake will not stop whining about the *.O files not being in normal library + name format, so just tell automake they are PROGRAMS so it builds them without + bitching. + +commit ee9bdd3f4a14a42fb0747acc420966f0f669129b +Author: Aaron Plattner +Date: Wed Nov 29 12:01:43 2006 -0800 + + Add DIX_CFLAGS to util builds. + + Fixes a build breakage when $(top_srcdir) != $(top_builddir) because + -I$(top_srcdir)/include is missing for the cvt, ioport, pcitweak, and scanpci + builds. + + Signed-off-by: Adam Jackson + +commit a6381e69845f58d2b3282992b1f881015190f1bc +Author: Michel Dänzer +Date: Wed Nov 29 19:25:09 2006 +0100 + + xfree86 DDX: Delete DDX screens in ddxGiveUp(). + + This allows video drivers to clean up in the FreeScreen hook things they set up + in the PreInit hook. + +commit b0c8558b9d9a9984c0067960392e28f5a7622b29 +Author: Keith Packard +Date: Sun Nov 26 19:31:48 2006 -0800 + + Ensure RandR resource types are registered before resources are created. + + Now that resources can be created during server initialization, make sure + the crtc, output and mode resource types are created before attempting to + create associated resources. + (cherry picked from commit ec83d674167e7045d5317b179c9998e3172a26dc) + +commit 6245e9dd4719c5dc15ff45d49cf626123794038b +Author: Keith Packard +Date: Tue Nov 21 16:52:28 2006 -0800 + + Allocate correct size for RRPropertyRec (oops). + + Neglected to change the allocation size from sizeof (PropertyRec) to + sizeof (RRPropertyRec). Lots of fun crashes this way. + (cherry picked from commit 0626eb8e5c9fa05de6bdc9aa0c654f5148bf7cff) + +commit 24abce8032940e96bb2ccf9e463a7fff6f36283a +Author: Keith Packard +Date: Tue Nov 21 01:15:26 2006 -0800 + + Change RandR property datatype to include pending/valid values. + + This patch tracks the protocol changes which introduce more complex + semantics for RandR output properties including pending and valid value + information. + (cherry picked from commit af55c65bea40669fdc038aa34c6a1ec9ecb33e87) + +commit f62ac3ec39c6593df476985c630e499864c19c72 +Author: Eric Anholt +Date: Tue Nov 28 10:31:40 2006 -0800 + + Separate DDC mode list creation from MonPtr creation. + + This will be used by the intel driver, and likely other RandR 1.2 drivers. + +commit fbd09443385c533416fa530399d54f130afaf985 +Author: Eric Anholt +Date: Tue Nov 28 10:15:51 2006 -0800 + + Replace bad mode name-setting code with xf86SetModeDefaultName(). + +commit 4ad0bde661be2af4a17771d66066d49736e85cbe +Author: Eric Anholt +Date: Tue Nov 28 10:12:02 2006 -0800 + + Clean up a bunch of long lines and trailing whitespace. + +commit 05778432dc6e688bc0beff0c20ffd7e27b74888e +Author: Eric Anholt +Date: Tue Nov 28 10:07:57 2006 -0800 + + Move code to get a mode list from EDID data from ddcProperty.c to edid_modes.c. + +commit 38ecc66cd9c61346a46697bbf1d8319f4f6f9800 +Author: Eric Anholt +Date: Tue Nov 28 10:06:15 2006 -0800 + + Typo that was missed in testing. + +commit 834e4b079866594b50be64ae79f3cb2a5baa2070 +Author: Matthias Hopf +Date: Tue Nov 28 18:57:13 2006 +0100 + + Fix potential NULL pointer access in timer code. + + https://bugzilla.novell.com/show_bug.cgi?id=223718 + +commit 5dbcd34a0a6c0d10dbfea8fdc9d7dfe7a0261b19 +Author: Eric Anholt +Date: Mon Nov 27 16:26:14 2006 -0800 + + Register dependency on new RandR protocol. + +commit 16f8f10dc2106bc6253b2d89a1f8efee8d80e2ba +Author: Eric Anholt +Date: Mon Nov 27 16:21:31 2006 -0800 + + Move mode handling helpers from ddcProperty.c to xf86Mode.c. + +commit b4b0d901d98371a8aa7b17d195e18e83e2a6a618 +Merge: 64de3ba... d6cd031... +Author: Eric Anholt +Date: Mon Nov 27 15:43:15 2006 -0800 + + Merge branch 'randr-1.2' + + Conflicts: + + dix/events.c + dix/getevents.c + hw/xfree86/common/xf86Mode.c + hw/xfree86/dri/Makefile.am + hw/xfree86/os-support/drm/xf86drm.c + hw/xfree86/os-support/xf86drm.h + +commit d6cd0313c7f23f32c9c7dda00ff739e772bf7db3 +Author: Eric Anholt +Date: Mon Nov 27 14:46:50 2006 -0800 + + Add some mode helper functions from the intel driver. + + This also removes static from some other functions that had been copied out + to at least the intel driver, but perhaps others that were doing mode list + handling. + +commit 64de3baf85f6df274f71f736016f0848567cd9f6 +Author: Aaron Plattner +Date: Wed Nov 22 14:46:51 2006 -0800 + + Add a -showDefaultLibPath option. + + A corollary to the previous change, this option prints $libdir. + +commit 0a2a6e4070718b90af7ca0e047f028e0cabdfb9d +Author: Aaron Plattner +Date: Fri Nov 17 18:27:23 2006 -0800 + + Add a -showDefaultModulePath option. + + As discussed on the mailing list, people would rather have an X command-line + option to print the module path so installers can know where to put modules, + rather than the installers using `pkg-config --variable=moduledir xorg-server`, + since some distros choose not to install xorg-server.pc. + +commit 61832cb94c8a4d62cddb92188caeed86519e9d62 +Author: Brian +Date: Wed Nov 22 09:16:43 2006 -0700 + + Regenerated from Mesa w/ latest gl_API.xml file + +commit 61863f09d22935406371e92bb75173d55ff9b29f +Author: Brian +Date: Wed Nov 22 09:16:17 2006 -0700 + + Regenerated from Mesa, fixes glMap* protocol problem (bug 8899) + +commit 33ff4cec5ff7533ec725f71d357c096dfb0acb79 +Author: Alan Hourihane +Date: Tue Nov 21 21:23:17 2006 +0000 + + Issue CloseDownDevices() in os/log.c and remove from dix/main.c. + + This ensures that all calls to FatalError() will shutdown the input devices. + +commit ca2874b273232d9f51881b1cd754ed6847bfaf47 +Merge: c9a5f9d... e2f6dac... +Author: Alan Hourihane +Date: Sat Nov 18 19:56:32 2006 +0000 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit c9a5f9d3911c2e6a8f81b0721c9eb914fb7719b5 +Author: Alan Hourihane +Date: Sat Nov 18 19:55:42 2006 +0000 + + Shutdown input devices if FatalError occurs during startup. + Fixes Xdmx problems when the input device has been initialized + and the keyboard map has been destroyed. + +commit e2f6dacc736527790ed8e304698678afc17f71c6 +Author: Dave Airlie +Date: Sat Nov 18 11:26:55 2006 +1100 + + dri: setup libdrm hooks as early as possible. + + This is due to radeon doing drm stuff before DRI extension gets initialised + +commit ef47d9c3ba63e9a6243fe5c81ccc60c8246352b4 +Author: Keith Packard +Date: Thu Nov 16 13:50:48 2006 -0800 + + Reduce calls to RRGetInfo. + + RRGetInfo can be expensive. Don't invoke it when quering Xinerama + information or setting a new CRTC configuration. + (cherry picked from commit b5aa9eb8e6eda36856a075f4b008c33f6c706bad) + +commit 07b26e690cd9a4fc626132feed0702515cbe5a88 +Author: Keith Packard +Date: Thu Nov 16 09:48:33 2006 -0800 + + Remove RandR output options. + + RandR output options are now expected to be handled by properties instead. + (cherry picked from commit 8b2a7e94a1dc2776ab2cfaaebb309be02502602a) + +commit f17e3c34dfd1f1418440bdebf45764e4dbf550f0 +Author: George Sapountzis +Date: Thu Nov 16 02:18:03 2006 +0200 + + Fix GL context destruction with AIGLX. + + The logic for freeing GL contexts introduced by "Fix AIGLX VT switching." is + inverted. As it is now, GL context destruction is deferred for glxDRIEnterVT(). + +commit ae3c9ad4abe66784d7ee474455003d2745699286 +Author: Bjorn Helgaas +Date: Thu Nov 16 17:29:06 2006 +0100 + + Bug 9041: Check the return code in xf86MapDomainMemory(). + +commit 6ff7f2ad6a5e2e769244590578e6809974b5235d +Author: Eric Anholt +Date: Tue Nov 7 13:13:53 2006 -0800 + + Fix build on FreeBSD after input-hotplug. + (cherry picked from commit 4e6e4baead6c565363abbcd9e06cc685be121596) + +commit 2eab230d9bd3f73ffe1b5a42111f89e85904ee11 +Author: Jeremy C. Reed +Date: Tue Nov 14 16:37:18 2006 -0600 + + For NetBSD, define PCVT_SUPPORT (System has PCVT console). + + Noticed by Joerg Sonnenberger. This fixes problem with console + switching. + + This was in original imake NetBSD.cf. + +commit 26d2e45bdb0cf4d18ba7b0365425da49d60b3d5c +Author: Matthias Hopf +Date: Tue Nov 14 15:33:07 2006 +0100 + + Bug #9023: Only check mice for "mouse" or "void" if identifier is != NULL. + +commit a724b7f1302ba7a59f140b521f13d2ddf0fcf9bf +Merge: 6facd95... f80a8ae... +Author: Jeremy C. Reed +Date: Mon Nov 13 20:32:26 2006 -0600 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 6facd958c2e7098cb68eac2810a88b8cd40f19c0 +Author: Jeremy C. Reed +Date: Mon Nov 13 20:23:06 2006 -0600 + + On DragonFLy, default to /dev/sysmouse (just like on FreeBSD). + + TODO: use autoconf to handle this so the code is not platform + based but feature based. + +commit f80a8ae6e6820378ea70ac0849cee8bf3055e0e8 +Author: Adam Jackson +Date: Mon Nov 13 18:26:05 2006 -0500 + + Disable Xprt server build by default. + +commit 5bfe7f4dfc6ab51b6790d74faf11574385234423 +Author: George Sapountzis +Date: Mon Nov 13 01:54:32 2006 +0200 + + DRI: call drmSetServerInfo() before drmOpen(). + + Also, remove some libdrm remnants. + +commit acb5ff4c73ac4d52201d7c421f488e2ead5c8b9c +Author: Jurij Smakov +Date: Sat Nov 11 14:09:15 2006 +0200 + + ffs: handle 0 argument (bug #8968) + + Handle an argument of 0 in ffs(), instead of looping indefinitely. + Add an ffs prototype to dix.h, and add includes to ffs.c. + (cherry picked from 34164e551e4c3909322d50b09835ca4ac1d49d68 commit) + +commit ca094684196886a4a1c10273049fae0705a3edc2 +Author: Alan Coopersmith +Date: Fri Nov 10 18:02:05 2006 -0800 + + Correct symlink-mesa.sh usage message + +commit 28337cc1060bc08adef81c304dd9ed02d0a0e37b +Author: Eric Anholt +Date: Thu Nov 9 19:51:17 2006 -0800 + + Fix typo before the last commit. + +commit e1720b1089328af80ca0cb85e5289ced05263f95 +Author: Eric Anholt +Date: Thu Nov 9 18:53:37 2006 -0800 + + Bug #8868: Remove drm from SUBDIRS now that the directory is gone. + +commit 0dee48b8af3e054228aef0d15c1cb1c9e23790cc +Author: Keith Packard +Date: Wed Nov 8 23:17:55 2006 -0800 + + Add RRInit function to create resource types for RR objects. + + To allow RandR objects to be created before the screen object exists, + the resource types must be registered with the resource database. + A driver wishing to create RandR objects must call RRInit before doing so. + + Also, fix a segfault when setting Output data before it is associated with a + screen. + +commit ec77a95a02329a2ee3a94d7de9d2a234aecb9ca0 +Author: Keith Packard +Date: Wed Nov 8 21:36:35 2006 -0800 + + Allow RandR objects to be created before the associated ScreenRec. + + xf86 drivers need to create RandR object in the PreInit stage, + before the ScreenRec is allocated. Changing the RandR DIX code + to permit this required the addition of functions that later associate the + objects with the related screen. + + An additional change is that modes are now global, and no longer associated + with a specific screen. This change actually makes mode management cleaner + as there is no more per-screen list of modes to deal with. + + This changes the RandR 1.2 ABI/API for drivers. + +commit fd91630b73100e9d77ccb492c52807448bc772a5 +Author: Dave Airlie +Date: Thu Nov 9 09:30:33 2006 +1100 + + make X server use system libdrm - this requires libdrm >= 2.3.0 + + This patch blacklists the load "drm" line, moves some functions in dri module + links dri module against libdrm, and removes the X copy of libdrm + +commit 0409e1627a167db2efc1355f292d3c02a6989ffc +Author: Adam Jackson +Date: Wed Nov 8 16:17:20 2006 -0500 + + 'make dist' fixes. + +commit 7e0aeebb8f8a5dff3cb4d88756e535dd70edeec4 +Author: Adam Jackson +Date: Wed Nov 8 12:03:37 2006 -0500 + + Bug #6786: Use separate defines for server's Fixes support level. + +commit b5d09d4adb8088719ff494a4281a793717046576 +Author: Rich Coe +Date: Wed Nov 8 18:10:14 2006 +0200 + + CheckConnections: don't close down the server client (bug #7876) + When an appgroup is shutting down, the list of clients can change, so make + sure we're not trying to shut the server down. + +commit 0567a6337b84fa045b5732e98203f488274aa2a2 +Author: Bram Verweij +Date: Wed Nov 8 18:00:52 2006 +0200 + + xfree86/linux acpi: fix tokenising + Split on a space, rather on the 'video' string, as strtok takes a char, + not a string. + +commit e7900d68c3ee657158813f0650886d680c0a9a3c +Author: Daniel Stone +Date: Wed Nov 8 15:36:47 2006 +0200 + + remove trailing whitespace + Whitespace police in full effect. + +commit 2035f115b7db3c4b7deabeab0d814b3107d6ef30 +Author: Daniel Stone +Date: Wed Nov 8 15:28:10 2006 +0200 + + xfree86: remove xf86Keymap.h + +commit 809e2841aaa54662a42498aacec558bc813bba1c +Author: Daniel Stone +Date: Wed Nov 8 15:27:58 2006 +0200 + + xfree86: add general handler, port ACPI to it (bug #5665) + + Add 'general' handler registration, which will not trigger DPMS when an + event comes in. + Make ACPI use this. + +commit b5438f7fb2879e0226b578f60b22a490e73c3a83 +Author: Daniel Stone +Date: Wed Nov 8 15:24:58 2006 +0200 + + Get*Events: massive reorganisation + + Reorganise the code logically, and put more comments in. + Clip valuators in proximity calls. + +commit b0a7443ca8bd224994f98c1c1e25de88f2573224 +Author: Daniel Stone +Date: Wed Nov 8 15:23:52 2006 +0200 + + configure.ac: axe redundant SDL test + +commit 332f179db7c38310db1f752d45f51b6d8301fd30 +Author: Daniel Stone +Date: Wed Nov 8 15:23:35 2006 +0200 + + kdrive/sdl: fix compilation + +commit 988757a44197c91027109076e2e33ff6510ed71d +Author: Daniel Stone +Date: Wed Nov 8 14:06:51 2006 +0200 + + config: error messages non-fatal, and before we free them + + Move error messages before we free the error structure, and make them all + non-fatal. + +commit e2b78df5800fb4e3f0ed01b38a1974ba3577949c +Author: Daniel Stone +Date: Tue Nov 7 11:13:56 2006 +0200 + + xkb: warning fix + +commit b55007d8cc9d20baa23d5de67683e414c827d3e5 +Author: Daniel Stone +Date: Tue Nov 7 11:13:32 2006 +0200 + + SyntheticMotion: don't dereference sprite.screen when not using Xinerama + +commit f93d10ce9bb4a6de83b561f44fb7b046def16234 +Author: Daniel Stone +Date: Mon Nov 6 18:33:45 2006 +0200 + + dix: remove staggeringly broken vendor workarounds + + Dear SGI, + No. + + Scant regards, + Daniel + +commit 389275d240e4ba19d62fda0f138a45c7ecb245ff +Author: Daniel Stone +Date: Sun Nov 5 02:47:59 2006 +0200 + + XkbCopyKeymap: don't iterate broken types, or dereference null pointers + + Don't iterate invalid destination types (>= num_types) when coping key + types. + Don't free key_aliases if it's NULL (theoretical, but sure). + Make sure dst's label_font gets allocated if it's NULL. + (Thanks, Chris Lee.) + +commit d585b4189aff8d7952847f75b19b4f092ab3b88b +Author: Daniel Stone +Date: Sat Nov 4 21:47:55 2006 +0200 + + xkb: fix uninitialised warning + + Fix uninitialised warning with memset(); we never actually use it + uninitialised, but gcc doesn't know that. + +commit b6d7b537ed8975363ad0f7c4180a62822358e418 +Author: Daniel Stone +Date: Sat Nov 4 21:43:22 2006 +0200 + + os: fix sun extensions test + + 'else if' is not very valid, plus the logic is kind of broken, so just + move it outside the ifdef in the first place. + +commit 8ba0c7b62c78dead722b0c8aa414f37bac4414b7 +Author: Daniel Stone +Date: Sat Nov 4 21:41:03 2006 +0200 + + xace: avoid 'unused variable pScreen' + + Initialise pScreen explicitly, as REGION_* macros ignore pScreen. + +commit c3ea1f7db494365032526dc06a7283384bd0ecd1 +Author: Daniel Stone +Date: Sat Nov 4 21:38:31 2006 +0200 + + dix/mi: still more warning fixes + + Fix up prototypes for PrintChildren and PrintWindowTree in the dix. + Make miPrintRegion be unconditionally defined, and move the prototype into + regionstr.h. + Change a bunch of ScreenPtr pScreen = foo; to + ScreenPtr pScreen; pScreen = foo; in window.c, so we avoid unused variable + references (as inline REGION_* doesn't reference pScreen). + +commit 3a9b96425851b495503bd2eb0fd0d01c08f6a097 +Author: Daniel Stone +Date: Sat Nov 4 21:33:09 2006 +0200 + + dix: add missing prototypes + + Add missing prototype for ffs, and include headers from ffs.c. + Move PostSyntheticMotion prototype to input.h. + +commit 6716488fa256798070017232405b107d5c985479 +Author: Daniel Stone +Date: Sat Nov 4 21:30:23 2006 +0200 + + dix: remove unused debug code + +commit 51813d77bfb84609a58a98e678efe9b6c0bf5503 +Author: Daniel Stone +Date: Sat Nov 4 21:29:05 2006 +0200 + + dix: remove unused variable + +commit 844090a5b557705dd0adce2b7ed98813b5104d85 +Author: Daniel Stone +Date: Sat Nov 4 21:21:29 2006 +0200 + + xfree86/xf86misc: warning fixes + +commit 61b570d0c1eb448f0aa08b4598118f0d43bc7345 +Author: Daniel Stone +Date: Sat Nov 4 21:21:09 2006 +0200 + + xfree86/os-support: update prototype for OSRingBell + +commit c51fadc07d938f6a3edfd5620170fcb7d6486a11 +Author: Daniel Stone +Date: Sat Nov 4 21:20:45 2006 +0200 + + mieq: annotate with some more comments + +commit 578899139f133746634a7bf8845e25362b5dfca2 +Author: Daniel Stone +Date: Sat Nov 4 20:35:55 2006 +0200 + + RemoveGeneralSocket: don't touch EnabledDevices + + RemoveGeneralSocket. Harmless, but. + +commit ae58d349c1cf5d63ad3616c485baa858350978d5 +Author: Laurence Withers +Date: Sat Nov 4 19:34:37 2006 +0200 + + CreateColormap: fix return value (bug #7083) + + Return BadMatch when an unsupported visual type is given, not BadValue -- + this is correct according to the spec. + +commit 96f78e3886791b723ccd9ba40bea701603537b0c +Author: Erik Andren +Date: Sat Nov 4 19:29:49 2006 +0200 + + remove XFree86 changelogs (bug #7262) + + Without being able to tie these to specific commits, the text changelog is + useless, as well as being huge. + +commit 5a40448f2d0ac2c86c617bebe3fb649174bf0d7f +Author: Eric Anholt +Date: Tue Nov 7 15:48:05 2006 -0800 + + A couple more cases of error message before freeing strings. + +commit 05f1c302460a14c8fa9a943a12d69adcd3c30d58 +Merge: 3e7e0e3... 46af6d1... +Author: Adam Jackson +Date: Tue Nov 7 18:42:54 2006 -0500 + + Merge branch 'autoconfig-for-7.2' + +commit 3e7e0e35094d09e0e764818ed125314be75be01a +Author: Eric Anholt +Date: Tue Nov 7 14:13:23 2006 -0800 + + Report the error before freeing the error strings. + +commit 4e6e4baead6c565363abbcd9e06cc685be121596 +Author: Eric Anholt +Date: Tue Nov 7 13:13:53 2006 -0800 + + Fix build on FreeBSD after input-hotplug. + +commit 20e9144c0746943624ff77a61791b8596f3f8458 +Author: Keith Packard +Date: Tue Nov 7 12:49:28 2006 -0800 + + Add $(DIX_CFLAGS) to remaining Makefile.am files + +commit 5e946dd853a4ebc2722ae023429ce5797de3d7a6 +Author: Eamon Walsh +Date: Tue Nov 7 13:50:19 2006 -0500 + + Bug #8937: Extension setup functions not called on server resets + +commit 1dcda4f3c56214464c0b6123fea6daa69aae69fc +Author: Keith Packard +Date: Tue Nov 7 01:29:51 2006 -0800 + + Avoid dereferencing sprite.screen when Xinerama is not running. (#8925) + + With Xinerama support built into the X server but not in use, + sprite.screen is NULL and yet the SyntheticMotion + macro would dereference it. Avoid that by just passing sprite.screen + to PostSyntheticMotion which can then dereference it when Xinerama is + enabled. + + Also, define PostSyntheticMotion in dixevents.h and include dixevents.h in + getevents.c + +commit c20d3bf7533da0bf26beaf7d8c359d18edbd70e8 +Merge: 028bbdc... 3d39c02... +Author: Keith Packard +Date: Tue Nov 7 01:21:28 2006 -0800 + + Merge branch 'origin' into randr-1.2 + +commit 3d39c02fe6aaa602c52f1d4f0ea6cd3bd000cf9f +Author: Eamon Walsh +Date: Mon Nov 6 21:25:52 2006 -0500 + + More work on Bug #8875: revert previous fix and try using client argument + instead of serverClient. Also don't use totalClientSize as it is not + initialized until after the first call to InitClient. + +commit 75fe0670eb1f71144246f1c20759d58788bbee00 +Author: Eamon Walsh +Date: Mon Nov 6 15:30:25 2006 -0500 + + whitespace adjust + +commit 0539d9cf2423fc0bed6f5c413beba3080f8abd85 +Author: Eamon Walsh +Date: Mon Nov 6 15:29:17 2006 -0500 + + Bug #8875: Security extension causes Xorg to core dump on server reset + +commit aa0261a98e9d5b1349b33e2639bd83c556dd4000 +Author: Juliusz Chroboczek +Date: Mon Nov 6 02:29:49 2006 +0100 + + Improve vm86 error handling in Xvesa. + +commit 6b2c65fdd169037c6ede250d4a8fec3d29a080ae +Author: Juliusz Chroboczek +Date: Mon Nov 6 00:30:09 2006 +0100 + + Fix typo in Xvesa: incorrect reporting of DAC capabilities. + +commit 028bbdc0417173803695808ba9f48498519273a3 +Merge: 50504c6... 8deaaa3... +Author: Keith Packard +Date: Sat Nov 4 17:46:26 2006 -0800 + + Merge master back to randr-1.2 + +commit 50504c68e1d407232cf83465981b235e542ef31f +Merge: 8b87ce1... cde8806... +Author: Keith Packard +Date: Sat Nov 4 17:43:19 2006 -0800 + + Merge branch 'randr-1.2-origin' into randr-1.2 + +commit 8b87ce19741753eafbd99e7093bc3dea8f26e838 +Author: Keith Packard +Date: Sat Nov 4 17:41:25 2006 -0800 + + Allow X server to build against libdrm 2.1 + +commit 7ffbe9d232e3a4621a204448d67e434736465cbe +Author: Keith Packard +Date: Sat Nov 4 17:41:09 2006 -0800 + + Add DIX_CFLAGS to hw/vfb/Makefile.am + +commit 2db62bce0725ba2d88cbe40fc440b6bda45046f3 +Author: Keith Packard +Date: Sat Nov 4 17:40:34 2006 -0800 + + Define fbHasVisualTypes in fb.h as it is exported + +commit 8deaaa312ad7f9b492a2ae8ad17d74650112c25c +Author: Bernhard Rosenkraenzer +Date: Sat Nov 4 18:59:39 2006 +0200 + + automake: avoid use of reserved _SOURCES keyword (bug #8866) + Avoid using _SOURCES unless we're directly referencing a program or + library to be built; use _SRCS instead. Shuts automake 1.10 up. + +commit f72927d26cd112d321f7bf187df3c740b3129d22 +Author: Samuel Thibault +Date: Sat Nov 4 19:00:57 2006 +0200 + + xfree86/hurd: remove OsMouseProc (bug #5613) + Remove OsMouseProc, let the mouse driver deal with it. + +commit 0273610578485564c3c0be11b336b6554cc31b43 +Author: Samuel Thibault +Date: Sat Nov 4 19:02:04 2006 +0200 + + xfree86/hurd: add bell support, remove SERVER/LOADER defines (bug #5613) + Add no-op bell ringing support, and remove obsolete @SERVER_DEFINES@ and + @LOADER_DEFINES@ from CFLAGS. + +commit ade4bf09076d13dbf3549c0a2d987a0afe76d5c1 +Author: Samuel Thibault +Date: Sat Nov 4 19:03:13 2006 +0200 + + mesa/indirect: include byteswap.h on GNU userland (bug #5613) + Include byteswap.h on all GNU-userland systems (including with the Hurd + and FreeBSD kernels), not just Linux. + +commit 412e93349e1656c9650115328af4be0e59a66f74 +Author: Samuel Thibault +Date: Sat Nov 4 19:05:02 2006 +0200 + + kdrive: make building of Linux support conditional (bug #5613) + Only try to build Linux support on Linux. We should probably disable all + OS-dependent DDXes if we don't have a workable OS (and only build + Xephyr/Xfake), but that's future work. + +commit cde8806c2930788ba8076e94651d391e45f3ccdb +Author: Eric Anholt +Date: Fri Nov 3 16:36:34 2006 -0800 + + Don't bump the refcnt if the new mode is NULL. + +commit 97fd471a627be185bee8cda3f709cfccea3fa12d +Author: Aaron Plattner +Date: Fri Oct 27 12:36:56 2006 -0700 + + Fix standard VESA modes. + + The built-in mode timings were off slightly for the 640x480@60, 640x480@72, + and 1024x768@75 modes. + +commit 22ee2e4e1f1d9fd9ca9f25c9bf25370034b771d4 +Merge: 49a2668... bd0c829... +Author: Alan Coopersmith +Date: Fri Nov 3 12:54:56 2006 -0800 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 49a26681b2bdd95ed65c425f1fa1441d2f092a6e +Author: Alan Coopersmith +Date: Fri Nov 3 12:54:43 2006 -0800 + + Add DTrace probe points for X server <-> client communications + + See http://people.freedesktop.org/~alanc/dtrace/ for more details + +commit bd0c829654903ca45543dfa59cda967c4fafd8ac +Author: Bjorn Helgaas +Date: Fri Nov 3 18:54:06 2006 +0100 + + Do not map full 0-1MB legacy range + + If we're mapping something in the "legacy range" (0-1Mb), we shouldn't + expand the requested range to the entire 0-1Mb range. Typically this + is for mapping the VGA frame buffer, and some platforms support mmap of + the frame buffer but not the entire 0-1Mb range. + + For example, HP sx1000 and sx2000 ia64 platforms can have memory from + 0-0x9ffff, VGA frame buffer from 0xa0000-0xbffff, and memory from + 0xc0000-0xfffff. On these platforms, we can't map the entire 0-1Mb + range with the same attribute because the memory only supports WB, + while the frame buffer supports only UC. But an mmap of just the + frame buffer should work fine. + +commit c1828a8ff51c8db326c47e6710f4f42fab94fb6d +Author: Egbert Eich +Date: Fri Nov 3 18:32:48 2006 +0100 + + Fixing mach64 driver bailing out on ia64 + + Mach64 driver bails out on ia64 because it cannot map device + memory. It turns out that some bogus and unneeded code attempts + to find the root bridge of the device and fails to do so proberly + as there this host-to-pci bridge is not existant. This code has + been around for years although it completely unclear what it had + been intended for. Fixing this by eliminating the bogus code. + +commit d50fc413b39f52663b46084c28e81fc4933a7b49 +Author: Matthias Hopf +Date: Thu Nov 2 18:53:41 2006 +0100 + + Fix device path in altixPCI.c to be domain aware. + +commit 1d731fc54a2cf5d3f353d8ee1c7c4989df27f011 +Author: Matthias Hopf +Date: Thu Nov 2 18:50:15 2006 +0100 + + Add domain support to linuxPciOpenFile(). + + Loosely based on patch from David S. Miller + See also bug #2368. + +commit caaa113acf4144fd47a1ac93ca440d78d1983e54 +Author: Matthias Hopf +Date: Thu Nov 2 18:38:45 2006 +0100 + + Fixing domain support for ia64 + + ia64 specific functions + defines. + Still uses /proc interface for some scaning code. + Based on code from Egbert Eich . + +commit 16c5043fc0c84b14323cd211c2645106455ac320 +Author: Matthias Hopf +Date: Thu Nov 2 18:22:09 2006 +0100 + + Fix 2 warnings. + +commit 072c022e731c3aadf34096f16364e29df47280d2 +Author: Matthias Hopf +Date: Thu Nov 2 17:58:19 2006 +0100 + + Fix obviously wrong boundary checks + cleanup unused vars. + + Also disable compilation of code that is no longer used anywhere in the whole + Xserver tree. + +commit 5afc6c1a14fea2966017493b045fa7209faeb8eb +Author: Matthias Hopf +Date: Thu Nov 2 15:42:03 2006 +0100 + + Added linux 2.6 compatible domain aware device scanning code. + + Additional scanning code uses the /sys interface of 2.6 kernels. + Cleaned up the use of tags and already split domain/bus/dev/fn. + +commit 6319f7d713971f70f06166480f069eca3bcace36 +Author: Egbert Eich +Date: Thu Nov 2 12:50:52 2006 +0100 + + Make int10 fully domain aware. + +commit f4dd2665b0f9aa9c00a5152c73bc72cb7514eeb5 +Author: Matthias Hopf +Date: Thu Nov 2 12:36:12 2006 +0100 + + Added missing domain stripping in already domain aware code. + +commit 46901063e8edc82b67989f4e5eec39d17c67dc98 +Author: Matthias Hopf +Date: Thu Nov 2 12:25:03 2006 +0100 + + Build with -D_PC on ix86 only. + +commit 543b397277d1f03b8091e44812010abcd5d80102 +Merge: 4056e6e... 645d057... +Author: Keith Packard +Date: Thu Nov 2 19:00:35 2006 -0800 + + Merge branch 'origin' into randr-1.2 + +commit 037f23e6f8fbe6e6fc8e71ed21958fc553df72d0 +Author: Alan Coopersmith +Date: Thu Nov 2 18:30:58 2006 -0800 + + Convert Xprt DDX to new motion history api + +commit 7dc54a40e900cbea1e509620623b091d54a3c2d1 +Author: Alan Coopersmith +Date: Thu Nov 2 16:38:47 2006 -0800 + + Remove references to xf86Info.kbd* from solaris code + +commit e46f7f78b362e76f5a553184e3f5ec7e109aa39d +Author: Alan Coopersmith +Date: Thu Nov 2 16:38:12 2006 -0800 + + sun_bell.c needs to #include "xf86_OSlib.h" + +commit 58bf9a142d1957f4d77038ee4ce7b1116b1f7955 +Author: Alan Coopersmith +Date: Thu Nov 2 14:43:02 2006 -0800 + + PostSyntheticMotion needs to be extern, not static, since it's in getevents.c + +commit 1ecd45fb8e4250fb51daa2bdf1a960af0f8b53fb +Author: Daniel Stone +Date: Thu Nov 2 04:51:03 2006 +0200 + + Makefile.am: add config to DIST_SUBDIRS as well + +commit 01afa533aa872d1a101a41153f95d800e68fea3e +Author: Daniel Stone +Date: Thu Nov 2 04:32:37 2006 +0200 + + xfree86/os-support: axe more unused files + +commit 57c1409151cb1f6e0e528fb92ebda58f86f12c1a +Author: Daniel Stone +Date: Thu Nov 2 04:21:06 2006 +0200 + + xfree86/os-support: remove unused file from dist + +commit de5a4c63747a417cdece919f4fb5a4004a3ee7bb +Author: Daniel Stone +Date: Thu Nov 2 04:18:33 2006 +0200 + + xkb: note that we allow full xi interaction + We now allow maps to be set (etc) on different keyboards, so stop putting + XkbXI_KeyboardsMask in unsupported. + +commit 1d65429a9e03871969552d0c31b022546cc46b12 +Author: Daniel Stone +Date: Thu Nov 2 04:12:55 2006 +0200 + + xfree86: don't attempt to enable and disable non-DIX devices + Don't try to enable and disable devices with no entry in the DIX, such as + the evdev brain. + +commit 64139c1950ea825c0a0124abc5f88499e91f797f +Author: Daniel Stone +Date: Thu Nov 2 03:22:09 2006 +0200 + + bump to 1.2.99.0 + +commit 18c246a13b887b865de6a17e6cd1c259b9bc383d +Merge: 794f2e7... 4843d82... +Author: Daniel Stone +Date: Thu Nov 2 03:21:37 2006 +0200 + + Merge branch 'input-hotplug' + +commit 4843d823f4d38d8bd468ce3a8feddbff229ed416 +Merge: ba9f513... a7b944f... +Author: Daniel Stone +Date: Thu Nov 2 03:18:13 2006 +0200 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit ba9f5138fc32a7a7b97bcf941bc92751b7c6c2c0 +Author: Daniel Stone +Date: Thu Nov 2 03:16:10 2006 +0200 + + xfree86: allow starting with no input devices + Add a server flag (AllowEmptyInput), which will inhibit adding the + standard keyboard and mouse drivers, if there are no input devices in the + config file. + +commit be291a6d9764cf29a7d9a8114d47d9f41ce856e9 +Merge: a2d6242... 6fdfd9d... +Author: Daniel Stone +Date: Thu Nov 2 03:15:25 2006 +0200 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit a7b944f0d96c3e0e15e75378a04def1ac96089fb +Author: Alan Coopersmith +Date: Wed Nov 1 16:17:49 2006 -0800 + + If getpeerucred() is available, include pid & zoneid in audit messages too + +commit fbfb35189ef6666707097704b43e052cb2f919ae +Author: Alan Coopersmith +Date: Wed Nov 1 15:11:48 2006 -0800 + + Bug #1997: AUDIT messages should contain uid for local accesses + + + +commit a2d6242106bb3a440faa9cad157e0120dbfa7b6e +Author: Daniel Stone +Date: Thu Nov 2 00:46:33 2006 +0200 + + kdrive:remove Change{Keyboard,Pointer}Device + This was removed in the DIX, so just axe it. + +commit d9a5e3e964b6c91fbca88b50674fce9660b972a4 +Author: Daniel Stone +Date: Thu Nov 2 00:45:23 2006 +0200 + + XkbCopyKeymap: be more careful with levels, allocate compat/geom + Take various extra precautions with copying levels across (thanks Chris + Lee for a gdb session), including allocating when we don't already have a + coherent map. + Only free type components if they're present. + Allocate geometry and compat components if we don't already have them in + the dest map. + +commit 6fdfd9dad91d7b7aa292f8c4d268dd27c34de8d3 +Author: Eric Anholt +Date: Wed Nov 1 14:29:59 2006 -0800 + + Fix several cases where optimized paths were hit when they shouldn't be. + + This fixes a number of rendercheck cases. + +commit 40f84793bca40dcc6883d51aefa1bda44bd1ac61 +Author: Alan Coopersmith +Date: Wed Nov 1 14:34:46 2006 -0800 + + Propogate $LIBS for xtrans, clock_gettime, libm, etc. to libs used for each server + +commit d7d931abe01a8cf555b027f2bcfcccd5e9053e52 +Author: Daniel Stone +Date: Wed Nov 1 23:48:58 2006 +0200 + + configure.ac: remove check for rate/period + Keyboard stuff is now handled in the kbd driver. + +commit 81728558a044fdde0e1d63da7b6314755f77296e +Author: Daniel Stone +Date: Wed Nov 1 23:10:26 2006 +0200 + + input: add non-keyboard bell ringing function + Add a generic 'ring the bell' function (console bell on Linux and BSD, + /dev/audio on Solaris), and add DDX functions for this. Make this the + core keyboard's bell. + Port Xvfb and Xnest to this. + Port XFree86 to this, with OS-specific hooks for Linux, BSD, and Solaris + taken from foo_io.c in the old layer. + +commit 3df454719f9cbf6a046cb7458019ec621b3b42ee +Author: Daniel Stone +Date: Wed Nov 1 23:02:57 2006 +0200 + + kdrive: add KdRingBell prototype + +commit 4056e6e79a4e37101d298ae29139c83d3816368b +Author: Keith Packard +Date: Wed Nov 1 00:29:46 2006 -0800 + + Move physical size from mode to output. + + Modes can be shared across different sized monitors this way. + + Also caught some missing byteswapping and an incorrect return type. + +commit c03311a1e78daa291477a67b1bb7206772108c5d +Author: Alan Coopersmith +Date: Tue Oct 31 16:05:48 2006 -0800 + + Fix automake error: BUILT_SOURCES was defined multiple times on Solaris + +commit a2434ec5f3c9dc79d1f05c2d704a82a766718ed4 +Author: Alan Coopersmith +Date: Tue Oct 31 15:57:59 2006 -0800 + + Make _POSIX_C_SOURCE hack work with Solaris headers + + Solaris headers are very literal - if you ask for POSIX_C_SOURCE 199309L, + they limit to only the functions in that standard and no more, unless you + also specify __EXTENSIONS__ to allow functions beyond the standard base. + +commit 645d0576205532a3610ae351267d5b84d76236bd +Author: Matthieu Herrb +Date: Sun Oct 29 18:19:56 2006 +0100 + + Handle building in a separate objdir + +commit 59584c375f4e4b2670a92002ecb7a78a0bc50cce +Author: Matthieu Herrb +Date: Sun Oct 29 17:49:46 2006 +0100 + + kill GNU-make'ism. + +commit 0107320fac0913aae2cb169992e31c670b4bd2f7 +Merge: 06b6b97... a34446f... +Author: Thomas Hellstrom +Date: Sun Oct 29 15:23:35 2006 +0100 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 06b6b971d065226b983ba25da7ea8236ec37df04 +Author: Thomas Hellstrom +Date: Sun Oct 29 15:22:37 2006 +0100 + + Make sure we have 64-bit file-offsets in libdrm. + +commit 644ee2434a4e09f5baea00a486911f8c24b9a261 +Author: Daniel Stone +Date: Sun Oct 29 03:52:11 2006 +0300 + + kdrive: avoid null dereferences + Avoid jumping into NULL pointers for OS or card functions which do not + exist. + +commit 738d2e88171bcce8782d670a1cda9a1d941d7977 +Author: Daniel Stone +Date: Sun Oct 29 03:48:02 2006 +0300 + + kdrive: move bell ringing into an OS function + Move the bell into an OS function, and use that if it's declared; else, + fall back to using the driver's function. + Remove the Linux keyboard bell function; just move it into the OS layer. + Use named initialisers when converting the old structures, and eliminate + unused functions. + +commit 96e32805d12fc36f0fa0926dbfb0dd8a5cadb739 +Author: Daniel Stone +Date: Sun Oct 29 03:43:34 2006 +0300 + + Xi: disallow changing core keyboard and pointer + Just short-circuit the change core keyboard/pointer requests. + +commit 68f595ca6c7883e030947b7f95c50e92aa733f2b +Author: Daniel Stone +Date: Sun Oct 29 03:41:34 2006 +0300 + + GetTimeInMillis: use correct units for clock_gettime + Make sure we're treating the nanoseconds as a long, not an int, so we + don't overflow. + +commit 51a06b3c44509c72279b5cfcf2b52b9a35c461b0 +Author: Daniel Stone +Date: Sun Oct 29 03:40:57 2006 +0300 + + WaitForSomething: only rewind when delta is more than 250ms + Only rewind time when we're more than (original delta + 250ms) away from + executing the timer. + When we're walking the timer list, use a goto to iterate all of them from + the start again, since timers may drop out of the list. + Don't bother trying to be smart in TimerSet, we'll pick it up in + WaitForSomething anyway. + +commit a34446f5b3d90714969a90583c49cb1eae1c9651 +Author: Eamon Walsh +Date: Fri Oct 27 13:43:43 2006 -0400 + + Add missing file to list in Makefile.am + +commit 92d04e746bd9b8ad3ee217c165ace20468e079cf +Author: Thomas Hellstrom +Date: Fri Oct 27 18:26:30 2006 +0200 + + Import libdrm functions for the drm memory manager. + +commit 196c5836f463c28f633bbba847f59acd5935359d +Author: Daniel Stone +Date: Fri Oct 27 01:27:31 2006 +0300 + + CoreKeyboardProc: annotate with FIXME + Setting an empty keymap by default isn't wildly useful. + +commit f9a1e456f8a4eaa1a9c71fd0fe5231140975c22d +Author: Daniel Stone +Date: Fri Oct 27 01:25:39 2006 +0300 + + CoreKeyboardProc: don't leak keymap and modmap + SetKeySymsMap does a copy here, so try not to leak them. + +commit a5be65401769fabcb5001dc63035c69f9e4a2712 +Author: Daniel Stone +Date: Fri Oct 27 01:25:21 2006 +0300 + + mieqEnqueue: only compare DEVICE_BITS of deviceid + Only compare DEVICE_BITS of the two deviceids, so we don't decide that + a valuator event isn't for us, because (id | MORE_EVENTS) != id. + +commit 85212eb504f860b054eb0f0a5029fed86cb8d1c0 +Author: Daniel Stone +Date: Fri Oct 27 01:23:58 2006 +0300 + + getValuatorEvents: make sure we put MORE_EVENTS in the right places + Make sure we put MORE_EVENTS in with the device id if there are, in fact, + more valuator events coming. + +commit 794f2e7291ccb4e48f9fbfc8f08302e3aac0f79f +Author: Myron Stowe +Date: Thu Oct 26 20:38:58 2006 +0300 + + xfree86: re-enable chipset-specific drivers for Linux/ia64 + Re-enable chipset-specific support for Linux/ia64, by linking in + lnx_ia64.c. + +commit 8c0556e7cb1de8c387ddd886a03a8f8afff1fd0e +Merge: cdc8a4b... 004d00e... +Author: Daniel Stone +Date: Thu Oct 26 15:21:22 2006 +0300 + + Merge branch 'master' into input-hotplug + +commit 004d00e6689f452fc9fdf91f5ffc6d6aed697d54 +Author: Daniel Stone +Date: Thu Oct 26 01:10:08 2006 +0300 + + GetTimeInMillis: simplify monotonic test + We don't actually need to get the CPU clock ID, which means we don't need + the monotonic_usable test. Since there's now only one branch, the + compiler will treat that as likely, so we don't need xproto 7.0.9 anymore. + + The fallthrough to gettimeofday() is preserved. + +commit cdc8a4b7b2f099b8860a54c5c9f488e6f7c4913a +Merge: 3da918a... d285833... +Author: Daniel Stone +Date: Thu Oct 26 00:28:30 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit d285833290316cb5dd1e7f1e52c96be3e9cf21cd +Author: Daniel Stone +Date: Wed Oct 25 23:57:00 2006 +0300 + + GetTimeInMillis: spuport monotonic clock + Add support for CLOCK_MONOTONIC from clock_gettime, and use that in + GetTimeInMillis() if available, falling back to the old gettimeofday() + implementation. + + This is _slightly_ faster on some 64-bit architectures, and _slightly_ + slower on others (though barely measurable). + +commit d3e57faffee63df1424a209d0418d3a712f91ae6 +Author: Daniel Stone +Date: Wed Oct 25 23:55:43 2006 +0300 + + WaitForSomething: allow time to rewind + If time rewinds dramatically, reset all the timers to fix their expiry. + +commit e21604914dccece6bc64c69b55512d1f1a969235 +Author: Keith Packard +Date: Wed Oct 25 09:48:23 2006 -0700 + + Merge master back in and clean up some unfinished code (closes 8745) + +commit becbda6d519a11c2c211afb8d46f9ea1a2676bc3 +Author: Michel Dänzer +Date: Wed Oct 25 11:39:27 2006 +0200 + + Fix test for Option "IgnoreABI". + + This option has plenty of potential for wasting the time of bug triagers + without pretending it's always on. + +commit 59511974db843fa7e11133894cfc10c20fdaf60f +Merge: 054f8cd... 598ac7a... +Author: Keith Packard +Date: Tue Oct 24 17:26:20 2006 -0700 + + Merge branch 'master' into randr-1.2 + +commit 598ac7a83698327b607084abaebcbd22f8d25fbb +Merge: 828c34e... 948a97b... +Author: Keith Packard +Date: Tue Oct 24 17:23:12 2006 -0700 + + Merge branch 'origin' + +commit 828c34e83ccdf3bcd2844d5af8b0cac4164b04ab +Author: Keith Packard +Date: Tue Oct 24 17:23:02 2006 -0700 + + Byte swap RRSelectInput enable flags. + +commit 3da918a16c8908fdfaf89f2a1bcaec19e01528a9 +Author: Daniel Stone +Date: Wed Oct 25 02:22:07 2006 +0300 + + mipointer: remember to update pointer location + Update pointer location so it doesn't get quickly reset by the next + pointer update. + +commit aabc087998e680c2fcf0ebc1c5022c1fe8f58f0c +Author: Daniel Stone +Date: Wed Oct 25 02:21:39 2006 +0300 + + GetPointerEvents: always ensure correct number of events + Ensure correct number of valuator events are returned, and that we always + increment events correctly. + +commit 65cd5aa4d754624566c2263015f1a018d137fce1 +Author: Daniel Stone +Date: Wed Oct 25 01:12:45 2006 +0300 + + kdrive/input: remove unnecessary #ifdef XINPUTs + Xi is now mandatory, so don't bother with the ifdefs. + +commit 0514d53e10b3521bb708a9cbde4bab525248eadb +Author: Daniel Stone +Date: Wed Oct 25 01:10:44 2006 +0300 + + xfree86: remove motion history handling + Remove motion history handling, as we now deal with this in the DIX. + +commit b1debebf8fe20ded20ba27e871fd1a6a9de029e3 +Author: Daniel Stone +Date: Wed Oct 25 01:10:20 2006 +0300 + + mi: remove mi motion history + This is now unneeded as we do motion history in the DIX. + +commit b9e180e632d04bf685ade9e32bd0b20882794486 +Author: Daniel Stone +Date: Wed Oct 25 01:09:19 2006 +0300 + + port all users to the new DIX motion history API + Port KDrive, Xvfb, and Xnest, as well as the virtual core devices, to the + new motion history API. Make GetPointerEvents also update the history. + +commit 5b38eb69cdaa154791c7f74e35dbe4d3256b19bd +Author: Daniel Stone +Date: Wed Oct 25 01:08:29 2006 +0300 + + dix: add motion history support + Add motion history support (sort of based on the XFree86 DDX's + implementation) to the DIX. + +commit 11fb58be77ac163844e494b2b0a260cf28a7ecd1 +Author: Daniel Stone +Date: Wed Oct 25 01:07:36 2006 +0300 + + miscellaneous warning fixes + Use the correct type for time, and fix the mi prototype of EnqueueEvent. + +commit 2a74b8a91da1a98669993078f7fe9081f2d743ce +Author: Daniel Stone +Date: Wed Oct 25 01:04:53 2006 +0300 + + xfree86: re-bump input abi to 1.0, yet again + +commit 37d1fffe79c35ada056ce9a56292c000014fe48a +Author: Daniel Stone +Date: Tue Oct 24 23:06:57 2006 +0300 + + inputstr: try to keep device structs the same size + Try to make sure DeviceIntRec and friends stay the same size, + regardless of whether or not XKB is enabled. + +commit 9f9ac01a819ee96fb5be5d7d346c91f461bf3979 +Author: Daniel Stone +Date: Tue Oct 24 23:01:05 2006 +0300 + + inputstr: fix indentation + +commit 0cd6a3d8efb5cc1ce4f85ab95bcdf4fb66c7245d +Author: Daniel Stone +Date: Mon Oct 23 06:56:07 2006 +0300 + + xfree86/input: add proximity support, free valuators + Re-add support for proximity events, and remember to both va_end our + varargs, and free our valuators. + +commit cccf7ae0ff24d0c84b5144c457f3f86bbbc36e12 +Author: Daniel Stone +Date: Mon Oct 23 06:55:21 2006 +0300 + + GetProximityEvents: add (untested) function + Add untested first guess at what GetProximityEvents should look like. + +commit 35fa4ac12b3da33f81e2a12bc9661ed075f323ed +Author: Daniel Stone +Date: Mon Oct 23 06:23:45 2006 +0300 + + GetPointerEvents: break into separate functions + Break out clipAxis, clipValuators, and getValuatorEvents, into + separate functions, to be used by the proximity event code. + +commit a7c2d9a15dc2ff253bb69c3b0738ad993521b9c7 +Author: Daniel Stone +Date: Mon Oct 23 06:08:27 2006 +0300 + + kdrive: numerous warning fixes + +commit c8f76fb3a473a022d497bd0acd6c84f58fc6efbe +Author: Daniel Stone +Date: Mon Oct 23 05:12:15 2006 +0300 + + xfree86/input: disallow pointer device changes, fix drag event calculation + Don't allow users to change the core pointer. + Fix xf86SendDragEvents to check the device button state, not the core + pointer's. + Remove unused xf86CheckButton. + +commit c5b5b046e86b159a9d32451308f38246cc4587f7 +Merge: fab1d37... 948a97b... +Author: Daniel Stone +Date: Mon Oct 23 02:58:30 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit fab1d37ecbeee9777ad1485b0cc62b55042d5014 +Author: Daniel Stone +Date: Mon Oct 23 02:57:00 2006 +0300 + + xfree86/options: don't blindly dereference NULL pointers + Sure, conf_idev should be initialised, but if it's not, try to make the + best of a bad situation. + +commit 523fe64ba16cf7a40f4095432d81300726d83e8d +Author: Daniel Stone +Date: Mon Oct 23 02:56:28 2006 +0300 + + kdrive/lots of DDXes: make stubs use KdOsAddInputDrivers() + In theory, removing LinuxPciScan should make these drivers OS-independent. + +commit 57f98e2b72d5c7fea93a9f6da86228ffb4856bf3 +Author: Daniel Stone +Date: Mon Oct 23 02:55:41 2006 +0300 + + kdrive/tslib: port to new absolute API, remove debugging + Port to new absolute device (not touchscreen) API, and remove some + leftover debugging. + +commit a6dc629052f0ad509cfa30e98217043a63c09552 +Author: Daniel Stone +Date: Mon Oct 23 02:54:59 2006 +0300 + + kdrive/os: add KdOsAddInputDrivers + Add KdOsAddInputDrivers, which adds all relevant input drivers. + + Could possibly be refactored to KdAddInputDrivers, which called through + OsFuncs to a new function, if it existed. + +commit ac240b00ff6fc354c1aa641406ae8b49244c0b8b +Author: Daniel Stone +Date: Mon Oct 23 02:54:07 2006 +0300 + + kdrive/input: use Absolute instead of Touchscreen + Adjust to suit Zepheniah's new absolute device API. + +commit b1ba4b3e8ad427af1fa8618b0bd839f741ec2ce3 +Author: Daniel Stone +Date: Mon Oct 23 02:53:15 2006 +0300 + + kdrive/neomagic: include vesa.h, use DebugF + +commit 29f28dd1a8a7ed07e945a67946e3510f4b32d12a +Author: Daniel Stone +Date: Mon Oct 23 02:52:52 2006 +0300 + + configure.ac: add XSERVER_LIBS to XNEST_LIBS + +commit 2f33f4065d89ae2b6fdda43c7105d72f89920cae +Author: Daniel Stone +Date: Mon Oct 23 02:52:35 2006 +0300 + + Xnest: port to new input API + Port Xnest to Get{Pointer,Keyboard}Events, plus the new mieq API. + +commit 08928afb0500d46b0caa0a1d1244dee2ed80e6a0 +Author: Daniel Stone +Date: Mon Oct 23 02:51:52 2006 +0300 + + Xnest: disable XKB, reshuffle code + Disable XKB, as we can't yet use it; move Composite disabling to + ddxInitGlobals, along with XKB. + +commit cd3b16a57efaf89108054f18a94c91e2dd74fafa +Author: Daniel Stone +Date: Mon Oct 23 02:51:13 2006 +0300 + + Xvfb: port to new mieq API + +commit bf4df9b73f0c1a84093aaf9a2e2cbc56fb341c60 +Author: Daniel Stone +Date: Mon Oct 23 02:50:53 2006 +0300 + + include: move POINTER_* flags from inputstr.h to input.h + Given they're just numeric constants, they should be included in + input.h, not inputstr.h. + +commit 4dd91c45abea9fb561a5acb10290e29487df6722 +Author: Daniel Stone +Date: Mon Oct 23 02:50:03 2006 +0300 + + miinitext: Xi and XKB are not hardware-only extensions + Xi is now a required extension, and XKB can be used without hardware, + so include them both when NO_HW_ONLY_EXTS is defined. + +commit 562096a012f4bb8f44d5ec6320a32f4010c189e4 +Author: Daniel Stone +Date: Mon Oct 23 02:49:22 2006 +0300 + + XkbCopyKeymap: increment shapes and outlines when copying + Remember to increment the source and destination shapes when copying, + instead of just endlessly copying the first one. + +commit eec182259112fba240751f974f7e5ca09fce8b9d +Author: Daniel Stone +Date: Mon Oct 23 02:48:30 2006 +0300 + + dix/getevents: move SyntheticMotion to getevents.c + Mostly, this is just a cheesy hack to ensure that getevents.o gets + included when linking. Sigh. + +commit bc701a14292da5abfb601e3a040651a74f46df8f +Author: Daniel Stone +Date: Mon Oct 23 00:08:32 2006 +0300 + + dix/getevents: cosmetic cleanups, remove keymap copy from GKVE + Remove keymap copy from GetKeyboardValuatorEvents, as + SwitchCoreKeyboard now takes care of this for us. + Remove unused variable and function prototype. + Update comments to be as informative as possible. + +commit b03e2f7029506640a8fe5cb88818b329c23503ff +Author: Daniel Stone +Date: Sun Oct 22 19:56:49 2006 +0300 + + xi: fix NIDR return yet again + For a one-line function, it was pretty broken. + +commit 90de7ce25a84cfe6c6790f9af2bc2399d25b9b9c +Author: Daniel Stone +Date: Sun Oct 22 19:54:36 2006 +0300 + + xi: fix return type for NIDR + +commit f46dc272913ffb6b5b234a7ec6f4ba5cae44a831 +Author: Daniel Stone +Date: Sun Oct 22 19:51:35 2006 +0300 + + xi: add NewInputDeviceRequest to stubs + +commit 31a6307b7ba5adaa96deb8101ddfcda0262f537d +Author: Daniel Stone +Date: Sun Oct 22 19:49:31 2006 +0300 + + xi: change DEVICE_TOUCHSCREEN to ABS_{AREA_CALIB} for stubs + +commit eae6594d03a606ddf1f433b5897b5938aa940c1e +Author: Daniel Stone +Date: Sun Oct 22 16:39:44 2006 +0300 + + Xi: swap control in DevicePresenceNotify + +commit be21630164e865eca72ff2a686a38ae4e30fd79c +Author: Daniel Stone +Date: Sun Oct 22 16:33:02 2006 +0300 + + dix, Xi: make use of deviceid in DevicePresenceNotify + Use the deviceid and control fields in DevicePresenceNotify since + the last push to inputproto to send a DPN whenever a control changes + on a device. + +commit f08b6b2367705cb5b60e996e6328197430bf1919 +Author: Daniel Stone +Date: Sun Oct 22 12:30:02 2006 +0300 + + kdrive: change DEVICE_TOUCHSCREEN to DEVICE_ABS_{CALIB,AREA} + +commit 77e724585f6c53feb55475b94d8cfcb6acf1159b +Author: Daniel Stone +Date: Fri Oct 20 00:44:46 2006 +0300 + + minor formatting fixes + +commit 948a97b97e93cee05a23f1f1ae699c5e181bc8ce +Author: Drew Parsons +Date: Sat Oct 21 23:09:22 2006 +1000 + + Minor typo fix to xorg.conf man page. + +commit 04554a3adcddc32de5fdb0b3122da0bcdd4c24a9 +Author: Drew Parsons +Date: Sat Oct 21 22:06:43 2006 +1000 + + Minor typos in Xserver man page. + +commit e26a494f417c3c700636ee68892c3015b2e0f27a +Merge: 736b0d5... aeba855... +Author: Zephaniah E. Hull +Date: Sat Oct 21 04:26:14 2006 -0400 + + Merge branch 'input-hotplug' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 736b0d5078597abbda80444deef852879260af90 +Author: Zephaniah E. Hull +Date: Sat Oct 21 04:24:49 2006 -0400 + + DEVICE_TOUCHSCREEN becomes DEVICE_ABS_CALIB. + + Update the DEVICE_ABS_CALIB stuff to include the new elements. + + New DEVICE_ABS_AREA support. + + dev->touchscreen becomes dev->absolute, with _CALIB and _AREA stuff in it. + + Update xfree86 to compile with this, kdrive needs an update too. + +commit edd5f1745461f995670969cb736d1569ca94643f +Author: Carl Switzky +Date: Thu Oct 19 17:30:54 2006 -0700 + + Add ast driver/device info to Xorg server & config utilities + +commit aeba855b07832354f59678e20cc29a085e42bd99 +Author: Daniel Stone +Date: Fri Oct 20 00:30:28 2006 +0300 + + move keymap copy to event processing, from enqueuing + + Move the keymap copying to event processing time (in + ProcessInputEvents), instead of being at event enqueuing time. + Break SetCore{Pointer,Keyboard} out into separate functions. + Change mieqEnqueue to take a device pointer, that asks for the + _original_ device associated with this event. + +commit a8d3dad9d9f2b9053843e655abe463a68ba8dcb7 +Author: Daniel Stone +Date: Fri Oct 20 00:28:40 2006 +0300 + + xi: add DEVICE_ENABLE control + + Add DEVICE_ENABLE control, which allows runtime enabling and disabling + of specific devices. + +commit b0780312d80ea4af0136227f90fdd7ada3db71c5 +Author: Alan Coopersmith +Date: Thu Oct 19 13:51:53 2006 -0700 + + Pre-release message should tell users to check git, not CVS, for updates + +commit c5dc997baf57ffa08025efadbbaf761296ce4bc4 +Author: Joshua Baergen +Date: Thu Oct 19 11:14:26 2006 -0700 + + Create xorg.conf.example (Gentoo bug #138623). + +commit d029c8f1b72019446a5c873f55ffa43504b03dfb +Author: Alan Coopersmith +Date: Wed Oct 18 18:11:06 2006 -0700 + + Use getisax() instead of asm code to determine available x86 ISA extensions on Solaris + +commit a8a0abdbea0573c861a5af9d58f3ce66790455ca +Author: Daniel Stone +Date: Wed Oct 18 10:59:07 2006 +0300 + + config/dbus: always unref the connection, not close + +commit 80642f37d40216035786eaf490952d16f6b5f597 +Author: Adam Jackson +Date: Tue Oct 17 14:53:28 2006 -0400 + + Stop building xorgcfg by default. + +commit 5e17cde27b064174584d478130b0f95dcef78deb +Author: Matthias Hopf +Date: Tue Oct 17 17:06:44 2006 +0200 + + StorePixels() macro could create invalid *x++=*x... code - fixed. + +commit 205c6788d7a34704e36b23f1a93d89e9b986266a +Author: Daniel Stone +Date: Mon Oct 16 23:48:09 2006 +0300 + + config/dbus: properly initialise vtable + + Properly initialise the vtable, so we don't end up with an unregister_function + pointing to god knows where. + +commit 85ac2f16abe9f6e88b4e71609da334d336a9a600 +Author: Alan Hourihane +Date: Mon Oct 16 12:39:05 2006 +0100 + + Small modification to blocking signals when switching modes. + +commit 0901eec87ee9f3a2a067695bdbd569ff42149879 +Author: Michel Dänzer +Date: Sun Oct 15 16:57:09 2006 +0200 + + Fix __glXDRIbindTexImage() for 32 bpp on big endian platforms. + +commit a232693c8c2a206aac47c07b133c071938204e0b +Author: Michel Dänzer +Date: Sun Oct 15 16:48:59 2006 +0200 + + Add per-drawable Xv colour key helper function. + + This allows overlay Xv adaptors to work slightly better with compositing + managers. + + Bump the video driver ABI minor so drivers only need to check for this at build + time. + +commit 5563861ab7e56ec891cfce6b34af43fec53ccee3 +Author: Alan Coopersmith +Date: Fri Oct 13 19:05:28 2006 -0700 + + Make sure xorgcfg files are included even when dist made with --disable-xorgcfg + +commit e1dd1904c6c7ce33f347d822272831d54a6497c8 +Author: Alan Coopersmith +Date: Thu Oct 19 13:51:53 2006 -0700 + + Pre-release message should tell users to check git, not CVS, for updates + +commit 62d24097932708fbbb62a23614fe63b4b7acf3bd +Author: Joshua Baergen +Date: Thu Oct 19 11:14:26 2006 -0700 + + Create xorg.conf.example (Gentoo bug #138623). + +commit 357b37b3826fa6e9878c0bd895164259c2ed3c0d +Author: Alan Coopersmith +Date: Wed Oct 18 18:11:06 2006 -0700 + + Use getisax() instead of asm code to determine available x86 ISA extensions on Solaris + +commit 1b1698af41b9038d9f9dbf521737d0baab5a2237 +Author: Zephaniah E. Hull +Date: Wed Oct 18 04:57:22 2006 -0400 + + Pass SetDeviceValuators down to the driver. + NOTE: This changes the LocalDeviceRec struct, which breaks input drivers. + +commit 5eca750fe2f3f243fb352271ad8da196af0cb16a +Author: Adam Jackson +Date: Tue Oct 17 14:53:28 2006 -0400 + + Stop building xorgcfg by default. + +commit df979b75c8cd8a7e0566aea58031bb9b8f5cd3d3 +Author: Matthias Hopf +Date: Tue Oct 17 17:06:44 2006 +0200 + + StorePixels() macro could create invalid *x++=*x... code - fixed. + +commit d430e76a161c963169067875c3654f5fd8f42b19 +Author: Alan Hourihane +Date: Mon Oct 16 12:39:05 2006 +0100 + + Small modification to blocking signals when switching modes. + +commit 6dd4fc4652f942724039dc2317c560ea7276ab59 +Author: Daniel Stone +Date: Mon Oct 16 00:22:00 2006 +0300 + + xkb: fix virtual modmap size computation + Compute virtual modmap size bounded by nVModMapKeys-1, rather than + nVModMapKeys. + + This is sort of a best guess. The other way seems a little more + logical, but also leads to segfaults pretty quickly if you hammer + GetMap hard enough. So let's try this one. + +commit a484ba15277e66e7ef9b21b238dcbf760695bc63 +Author: Daniel Stone +Date: Sun Oct 15 23:47:34 2006 +0300 + + XkbCopyKeymap: copy server vmods, and name atoms + Copy server->vmods, and all the atoms in names. + +commit ad355fecee3965be576596aeed5da54d776edf1d +Author: Daniel Stone +Date: Sun Oct 15 21:59:06 2006 +0300 + + xkb: make sure we set the map on the right device, not necessarily core + Forgot that all XKB requests took a device spec: the comparison of + 'if working on the core keyboard, does this device send core events; or, + is this device the core keyboard?' was broken. Instead, what we want is + 'if working on the core keyboard, does this device send core events; or, + is this device the one we're working on?'. + +commit 4ae7745a0dc86de6346409a69c1e396e0b954514 +Author: Daniel Stone +Date: Sun Oct 15 21:48:01 2006 +0300 + + xfree86 input: always open devices on NewInputDeviceRequest + +commit acd8419948003032056a56d46adbef7c35e7739c +Author: Daniel Stone +Date: Sun Oct 15 20:42:31 2006 +0300 + + config: unref connection, don't close it + Just unref the connection instead of explicitly closing it (thanks, Rob + McQueen). + Add a commented-out unregister_object_path call: unfortunately, when we + call it, libdbus segfaults. But if we don't unregister the path, we + can't register it again. So regenerations are broken either way, but a + little less violently like this. + +commit fc9b5f84b244ea08480b73bd15ac919b875800fb +Author: Daniel Stone +Date: Sun Oct 15 20:01:01 2006 +0300 + + dix/devices: add devices in proper forward order + Add devices in forward order with the normal linked list convention. + Previously, AddInputDevice would add all the devices in reverse order to + off_devices, before they were added again in reverse order to devices with + EnableDevice. + This just makes both work in forward order, which provides the ordering as + you'd expect when hotplugging devices (i.e. adds them to the head, not the + tail). + +commit ec35e7198debf938f1115f584e675ce5995743e3 +Author: Daniel Stone +Date: Sun Oct 15 19:44:49 2006 +0300 + + config: add replies and dbus api documentation + Add replies, which use standard X error values, to the two currently-supported + input configuration requests. + Document the D-BUS API we use. + Make sure we free everything when we encounter an error. + Add a _source option to all incoming requests, noting that it came from a + client. + Reject all requests to add a device where an option name contains an + underscore. + +commit 7e4717683d6c08d1e490a60b7493a94bbc57bf8d +Author: Michel Dänzer +Date: Sun Oct 15 18:12:28 2006 +0200 + + exaDrawableDirty: Fix initialization of BoxRec. + + This will hopefully fix the partial window corruption experienced by some + people. + +commit 3ad1642f1bbaa5f96558cdf3384b40f7122f8781 +Author: Michel Dänzer +Date: Sun Oct 15 16:57:09 2006 +0200 + + Fix __glXDRIbindTexImage() for 32 bpp on big endian platforms. + +commit f9bfee50981006a2c58d3f73e2b0d123bb2a41b7 +Author: Michel Dänzer +Date: Sun Oct 15 16:48:59 2006 +0200 + + Add per-drawable Xv colour key helper function. + + This allows overlay Xv adaptors to work slightly better with compositing + managers. + + Bump the video driver ABI minor so drivers only need to check for this at build + time. + +commit a05044cfc14a8bc6cc31236dcecada60bec09924 +Author: Daniel Stone +Date: Sat Oct 14 22:14:56 2006 +0300 + + xkb: better support of XkbDfltXIId + XKB.h specifies that XkbDfltXIId should be used where the client doesn't + care about the device identifier. We take this to mean core devices, + where practical. + +commit 4d8030076ed1a7680bdfcb7b89af1045bdc40304 +Author: Daniel Stone +Date: Sat Oct 14 22:14:07 2006 +0300 + + dix: move GetKeyboardEvents/GetPointerEvents to a new file, export symbols + Move GKE and GPE to a separate file, to help stem the events.c explosion. + Mark GKE/GKVE/GPE as _X_EXPORT. + +commit 6afc7c284690b1e2bb7544b5bc4f31a3f6a05519 +Author: Daniel Stone +Date: Sat Oct 14 15:54:35 2006 +0300 + + dix/devices: remove XACE merge debris + +commit 93302452e737bd91a893eb495592538d40d921e5 +Author: Daniel Stone +Date: Sat Oct 14 15:54:12 2006 +0300 + + XkbCopyKeymap: add geometry support + Add a first cut at geometry support, which seems to generally work. + +commit b9108a13fc126d97c0393f911a1d9292563444ce +Author: Alan Coopersmith +Date: Fri Oct 13 19:05:28 2006 -0700 + + Make sure xorgcfg files are included even when dist made with --disable-xorgcfg + +commit 054f8cd2675a80b14bc1ce266377fcfee2335cee +Author: Keith Packard +Date: Fri Oct 13 17:34:53 2006 -0700 + + Limit pointer to valid crtc areas. Add event swapping. Fix change tracking. + + Add function to keep pointer within valid crtc areas. + Finish event delivery and swapping code. + Separate configuration from layout changes to send correct events. + +commit 335b503c5e7041bb0c44611e496d1c46f554e630 +Merge: bd3d93b... cf948b7... +Author: Daniel Stone +Date: Fri Oct 13 18:10:45 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit cf948b7b04dfeb61a294889027b9a54f6b9b478e +Author: Alan Hourihane +Date: Fri Oct 13 14:48:10 2006 +0100 + + Block IO on switchmode just as we do for VT switching + to avoid cursor movements signalling io. + +commit a6df780e4d3f90cc699b0b864bade03d6f15afd7 +Author: Ian Romanick +Date: Wed Oct 11 15:41:22 2006 -0700 + + Fix bug #8608. + + Regenerate files based on recent commits to Mesa (that fix Mesa bug + that return pixel data. + +commit 042d4a407d0eca9131d0420b0b9189559aac326d +Author: Aaron Plattner +Date: Mon Oct 9 16:32:11 2006 -0700 + + Bug #8459: Don't forget to include AM_CFLAGS in libfb_la_CFLAGS on non-MMX platforms. + + Reported by Edgar Toernig. + +commit 1b94c117e0f294ef2f89bf24d45ba7a8e45efe35 +Author: Matthias Hopf +Date: Tue Oct 10 19:37:22 2006 +0200 + + Fixing probably long-standing bug in domain support. + +commit 6776c0f0e9677a65ec36ceef9618ff701b99596c +Author: Alan Coopersmith +Date: Mon Oct 9 17:24:37 2006 -0700 + + Use bash on Solaris to run symlink-mesa.sh + + symlink-mesa.sh won't run with Solaris Bourne Shell (/bin/sh) so explicitly + run it with /usr/bin/bash instead + (cherry picked from cde68728860179dc84e615ccb378ce992513fd62 commit) + +commit bd3d93be82d91e4cf35ae317dfd658d1706257ea +Author: Daniel Stone +Date: Sun Oct 8 23:21:12 2006 +0300 + + xkb: remove random broken vendor workarounds + +commit 33406da096b4ae21134484113b280e07d0c8f0d9 +Author: Daniel Stone +Date: Sun Oct 8 23:20:56 2006 +0300 + + GetKeyboardEvents: add first_valuator argument to GKVE + +commit ef7e05e9de57b9c9c27ed3307eede6d8fc6c1af3 +Author: Daniel Stone +Date: Sun Oct 8 21:42:15 2006 +0300 + + xfree86/xinput: pass first_valuator params, don't clip to first screen bound + Pass first_valuator to GetPointerEvents/GetKeyboardValuatorEvents. + Don't clip axis bounds to that of screen 0 when initialising axes. + +commit 1546a398144619a14ff06aaf84ebc1bf293eac66 +Author: Daniel Stone +Date: Sun Oct 8 21:40:53 2006 +0300 + + GetKeyboardValuatorEvents: also take first_valuator param + Take a first_valuator parameter, which specifies the first valuator. + +commit b05a11478edc7e6d1e38ef7f8d6788c7bd917493 +Author: Daniel Stone +Date: Sun Oct 8 21:23:12 2006 +0300 + + doc/extensions: rename to c-extensions + The old name could be somewhat confusing. + +commit 41bb9fce47f6366cc3f7d45790f7883f74289b5a +Author: Daniel Stone +Date: Sun Oct 8 20:34:32 2006 +0300 + + mipointer: take device arguments, split miPointerAbsoluteCursor + Update mipointer API to take a device argument to (almost) all functions, + and split miPointerAbsoluteCursor into a couple of separate functions. + Remove miPointerAbsoluteCursor call from mieq, as we now deal with it in + GetPointerEvents. + Make miPointerSetPosition (successor of miPointerAbsoluteCursor) take + pointers to x and y, so it can return the clipped values. + Modify callers of miPointer*() functions to generally use the new + functions. + This should fix things with multi-head setups. + +commit be8dfafd1d58b27bbfd953fc1216311523353db1 +Author: Daniel Stone +Date: Sun Oct 8 20:32:16 2006 +0300 + + warning cleanups + Fix still more warnings. + +commit ca474e0920dd29ebe7ccf346cddc526732ad01ba +Author: Daniel Stone +Date: Sun Oct 8 20:30:49 2006 +0300 + + Xi: move SendEventToAllWindows and FindInterestedChildren to exevents + Move SendEventToAllWindows and FindInterestedChildren from chgptr to exevents, + so the DIX can more easily use it. + Clean up two warnings (type mismatch, unused variable) in exevents.c. + +commit c2fab469b66f2796c541e911202faa411d116b04 +Author: Daniel Stone +Date: Sun Oct 8 18:26:26 2006 +0300 + + dix/devices: clean up debugging + +commit 4493acb88c59721f7807093a3ed3c39396c2076d +Author: Daniel Stone +Date: Sun Oct 8 17:51:03 2006 +0300 + + xkb: add FIXMEs to procedures which need to act on all core devices + Add FIXME comments above request handlers which need to act on all core-sending + devices if called on the core keyboard. + +commit ef68273f5bdb27a492ec0b69548ec4fbede46c08 +Author: Daniel Stone +Date: Sun Oct 8 17:44:37 2006 +0300 + + mi/mipointer: deprecate functions which don't take a device + Deprecate all mi pointer functions which don't take a device argument, and + replace them with versions which do, in preparation for MPX. + +commit 6eab4c55890660089067da0e944256b1ed3a8c67 +Author: Daniel Stone +Date: Sun Oct 8 17:24:33 2006 +0300 + + doc/extensions: document C extension use in the X server + +commit 80cdd26581508dd17c5d0a5739cd540113996bbb +Author: Daniel Stone +Date: Sun Oct 8 17:23:54 2006 +0300 + + mi/pointer: mark public pointer functions as deprecated + Deprecate miPointer functions which don't take a device pointer. Pointer + movement should be handled through GetPointerEvents, and functions which + take a device as an argument (e.g. miPointerPosition) will be added. + +commit 97030b6c6b0fb6ff629ae31e483704d0a2207a53 +Author: Daniel Stone +Date: Sun Oct 8 17:07:05 2006 +0300 + + config: fix compilation + Accidentally built with --disable-config, didn't notice that the previous + commit to clean up the debugging broke things horribly. + +commit 14b157bdb1f2cd5feba03ba0815d7c5b2dd6633f +Author: Daniel Stone +Date: Sun Oct 8 17:04:12 2006 +0300 + + include: actually declare DebugF + DebugF is ErrorF when DEBUG is defined, else a no-op. + +commit 9e37de193f5d7412ffd8de76d5eed0158c0a3609 +Author: Daniel Stone +Date: Sun Oct 8 16:32:15 2006 +0300 + + configure.ac: reactivate warnings when building with gcc + We were inadvertently stomping XSERVER_CFLAGS after adding the warnings, so + move them after we do that. + +commit b559cbb1601f93cb03ea3dcfb2c5ca94ee6b73bb +Author: Daniel Stone +Date: Sun Oct 8 16:23:14 2006 +0300 + + dix/CoreProcessKeyboardEvent: remove debugging for every key event + Also change #ifdef DEBUG/ErrorF/#endif to DebugF in FixKeyState. + +commit 3ae4d250185e71a0a218c062426f92b9b1adbf05 +Author: Daniel Stone +Date: Sun Oct 8 16:20:42 2006 +0300 + + xfree86 Xinput: remove still more excessive debugging + There isn't any more debugging left for input events in the XFree86 DDX. + +commit 58314756aeecbb8fb04706c3e04d98e9ac531a02 +Author: Daniel Stone +Date: Sun Oct 8 16:18:05 2006 +0300 + + GetPointerEvents: add first_valuator parameter + Add a first_valuator parameter. Looks correct by inspection, but untested + with first_valuator != 0 as yet. + +commit 84f5d2291c1fe92fd8358e999e909bf3aab86c98 +Author: Daniel Stone +Date: Sun Oct 8 15:30:24 2006 +0300 + + GetPointerEvents: fix relatively harmless typo + Change !(cp->button || !cp->valuator) to (!cp->button || !cp->valuator). + +commit cfc3e9ede2dc83741bd38bf3df13f096ecb8adc0 +Author: Daniel Stone +Date: Sun Oct 8 15:27:52 2006 +0300 + + config: remove excessive debugging + +commit 8d8e7f8bae4099f9e90ef9aac687607dae1d32bf +Author: Daniel Stone +Date: Sun Oct 8 15:26:54 2006 +0300 + + kdrive/input: remove excessive debugging in NIDR + +commit 22a836fafd39a8ef413826dc2c94bc5f96990e2d +Author: Daniel Stone +Date: Sat Oct 7 14:16:51 2006 +0300 + + xfree86/loader: bump input major ABI version + Bump input major ABI version to 1.0, since we removed the OS keyboard + layer. + +commit 4c342246300e06bdf5c9c62cc1d2f6aa57a524db +Merge: 8382234... 49a70c8... +Author: Alan Coopersmith +Date: Fri Oct 6 18:01:13 2006 -0700 + + Merge branch 'XACE-modular' + +commit 3686cd0fbf56d883f2f3b3fda11ffba1058b74e4 +Author: Daniel Stone +Date: Fri Oct 6 17:20:42 2006 +0300 + + xkb: make XkbSetControls work on all core-sending devices + +commit 7b4dc171b036107cfba87a1a16bf692b982005a5 +Author: Daniel Stone +Date: Fri Oct 6 16:26:54 2006 +0300 + + xkb: remove unused #ifndef + +commit ab56f0c5b516269bb99ae8b5f479e49e61a3af76 +Author: Daniel Stone +Date: Fri Oct 6 16:12:36 2006 +0300 + + xkb: simplify core device loop in GetKeyboardByName + +commit 4b6e2f12f7296e17b2850f36b3adcf8156125cbe +Author: Daniel Stone +Date: Fri Oct 6 16:08:21 2006 +0300 + + xkb: make LatchLockGroup work on all core-sending devices + Apply the settings to all devices sending core events, if we're working on the + core keyboard. + +commit ebf9b3bbbb04acb78cdf8a84e47a96755fbfe854 +Author: Daniel Stone +Date: Fri Oct 6 14:17:59 2006 +0300 + + xkb: update all core-sending keyboards on GetKeyboardByName + Update the keymaps of all keyboards which send core events on + GetKeyboardByName; still a few other procedures which need this treatment. + +commit 1178796a4dff5ebf0bd9fb3cacb35be9709b41e5 +Author: Keith Packard +Date: Thu Oct 5 22:31:35 2006 -0700 + + Add preferred modes for each output. Round vrefresh. Deliver crtc events. + +commit de63a469dcd0a8ae98554bca540ac0106cccf2a5 +Merge: 9c7440b... 8382234... +Author: Daniel Stone +Date: Thu Oct 5 20:29:19 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit b4659faf9b455b44ac8e691cc7a8fc00a967c80b +Merge: c4f30c6... 8382234... +Author: Keith Packard +Date: Wed Oct 4 14:46:04 2006 -0700 + + Merge branch 'master' into randr-1.2 + +commit c4f30c63538e1451f15ed1991439869127d9b148 +Author: Keith Packard +Date: Tue Oct 3 21:06:11 2006 -0700 + + Add mode origins and output options. Fix memmoves in resource free funcs. + + Output options and mode origins both affected driver ABI. memmove mistakes + were causing 'Freeing resource which isn't there' messages. + + Prune unused non-user defined modes from available list now. + +commit 8382234a7f318057de66490299d63807cefb5201 +Author: Alan Coopersmith +Date: Tue Oct 3 17:49:48 2006 -0700 + + Update pci.ids to Tue 2006-10-03 daily snapshot + +commit 96edf7b853c1045d12d957a2957a11879100a2de +Author: Alan Coopersmith +Date: Tue Oct 3 17:48:50 2006 -0700 + + Don't insert RCS tag into generated pci id header files + +commit df800d87e04ce984a8a9ab4252ac6478ab1e4426 +Author: Alan Coopersmith +Date: Mon Oct 2 11:28:47 2006 -0700 + + Add (void) casts to clear compiler errors about ?: results having type mismatch + +commit 9c7440bdf5a4ecd113e102004c804a2ba354c422 +Author: Daniel Stone +Date: Mon Oct 2 20:58:33 2006 +0300 + + xkb: remove the world's most staggeringly broken vendor workaround + Certain versions of LynxOS needed to sleep up to five seconds for closing a + pipe to actually, y'know, be useful. + +commit d7c89c7c1c8c1e110345d9d8d300adbf5fe5804a +Author: Daniel Stone +Date: Mon Oct 2 02:15:36 2006 +0300 + + symlink-mesa.sh: expand *.{c,h} + +commit d6ea96b13e2ea01c51998c41ae2a3677bdedf61c +Author: Ivan Pascal +Date: Mon Oct 2 02:17:14 2006 +0300 + + xkb: fix wrapping when switching between groups + Use XkbCharToInt as that's what we're doing. + +commit 3c98cebb6e954855528794fec46830f456cbdec1 +Merge: fa1ac94... 2cf1098... +Author: Daniel Stone +Date: Mon Oct 2 02:18:17 2006 +0300 + + Merge branch 'input-hotplug' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit fa1ac94178cf976d4c8dae9a4dc8703303a62d4b +Author: Ivan Pascal +Date: Mon Oct 2 02:17:14 2006 +0300 + + xkb: fix wrapping when switching between groups + Use XkbCharToInt as that's what we're doing. + +commit c31672e6aab168262bd7824a8082ecdf841fc3c0 +Author: Daniel Stone +Date: Mon Oct 2 02:15:36 2006 +0300 + + symlink-mesa.sh: expand *.{c,h} + +commit 2cf1098436d6b4382d9ed3f6b88214d37bdd8ddb +Author: Daniel Stone +Date: Sat Sep 30 17:05:46 2006 +0300 + + dix/events, mi/eq: remove utterly ridiculous debugging + Remove debugging which can cause long-lived Xorg logs to grow well above 1GB + if built with --enable-debug. + +commit 518db35ca3f569e7cb95dbddeddb93f3691de498 +Merge: 5d99e05... 84eb2c0... +Author: Daniel Stone +Date: Fri Sep 29 00:35:21 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 5d99e05f05a42a82a9f02844df9bfebaa673759d +Merge: ad631af... 5893375... +Author: Daniel Stone +Date: Fri Sep 29 00:35:07 2006 +0300 + + Merge branch 'input-hotplug' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit ad631afcf3fbc74024cddaaacd05d38addc047a2 +Author: Daniel Stone +Date: Fri Sep 29 00:34:23 2006 +0300 + + make core keyboard/pointer map functions act on all core-sending devices + Make Set{Keyboard,Modifier,Pointer}Mapping act on all devices which send core + events. + Change LegalModifier to accept a DeviceIntPtr. + +commit 84eb2c0a06de60e88e14bb03fabe661d7cd8f1d3 +Author: Brian +Date: Thu Sep 28 15:09:40 2006 -0600 + + Replace hard-coded filesnames with loops (all .c and .h files). + Should fix problems with Mesa adding/removing source files, for the most part. + Patch by Dan Nicholson. + +commit 4bc5dc2854e33bf343cdea44a3c3b4c41f6f4145 +Merge: cf6e968... f9542e7... +Author: Aaron Plattner +Date: Thu Sep 28 13:27:13 2006 -0700 + + Merge branch 'wfb' + +commit f9542e749544c7a3084fd72ecc6642ca3262f7c7 +Author: Aaron Plattner +Date: Thu Sep 28 13:26:54 2006 -0700 + + Restore the global xx* symbols and add them to wfbrename.h. + + I don't think they're ever used, but it's best to just leave them alone for ABI + compatibility. + +commit cf6e9687ffcc52af0d64e9098186570719a575a2 +Author: Jeff Smith +Date: Thu Sep 28 15:34:17 2006 -0400 + + Bug #8449: Yet another Mesa symlink script resync. + +commit a5d639cd87f30f9b3d765352d27253940f33b2b7 +Author: Daniel Stone +Date: Wed Sep 27 16:15:27 2006 +0300 + + remove merge detritus + +commit 2206a92a97901977910a6e39b4174ca805f9f4a7 +Author: Michel Dänzer +Date: Wed Aug 30 19:15:55 2006 +0200 + + Push information about cliprects of DRI windows to the DRM. + +commit 54d371e7a4ebab79a0f616669e2f601d8370cef3 +Author: Michel Dänzer +Date: Wed Aug 30 19:12:17 2006 +0200 + + Add wrapper for new ioctl to update drawable information in the DRM. + +commit ad321fad4b9ab3a2c70cfff37ca6c8faaa5cce9c +Merge: 5e9d33f... f7c1d94... +Author: Daniel Stone +Date: Sun Sep 24 17:56:43 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit f7c1d942416db8d0d4c5a21f5ece1ccacb926b69 +Author: Brian +Date: Sat Sep 23 10:38:10 2006 -0600 + + Check for visual==NULL in dmxBECreateColormap() before calling XCreateColormap() + to prevent potential segfault. + +commit 945b7c63946f5257d0f9b0dcf2f8f4882fb2c6f8 +Author: Brian +Date: Sat Sep 23 10:35:25 2006 -0600 + + The fbcmap.c file used by Xdmx _must_ be compiled with XFree86Server defined. + Otherwise, Xdmx generates a slew of protocol errors. + +commit 891e9c3e6cbd0869a57395b96c8e18ff522c2bb4 +Author: Brian +Date: Sat Sep 23 10:28:24 2006 -0600 + + Replace broken DMXDBG3() with DMXDBG2() + +commit a10039a100dfe5f87e29e9cc4fa656176e0890f9 +Author: David Nusinow +Date: Thu Sep 21 23:58:32 2006 -0400 + + Allow the xfree86 ddx utils to be optionally built. Patch by Eugene Konev. + +commit ce78b0cd2b1c35d60eb5683a1d00222aa4797c79 +Author: Adam Jackson +Date: Thu Sep 21 20:42:47 2006 -0400 + + Close with Pclose() that which we open with Popen(). + +commit c1655f0fd457f9bdf0857c5e0904639925bb01f1 +Author: Aaron Plattner +Date: Thu Sep 21 14:45:17 2006 -0700 + + Bug 8386: Grow parser buffers to fit an entire line if it's longer than CONFIG_BUF_LEN. + +commit b36fde9257263fa502147df37e8331184c323e14 +Author: Keith Packard +Date: Thu Sep 21 09:52:04 2006 -0700 + + When no mode is specified, don't validate mode-specific parameters. + +commit 8b4ed47c5d39f219866e3c72fa973c6fc4c70f18 +Author: Drew Parsons +Date: Thu Sep 21 22:19:44 2006 +1000 + + * Install Xprint's Xsession script to $(sysconfdir)/X11/Xsession.d + * Removing outdated references to CDE and dt, rename script to + 92xprint-xpserverlist. + +commit 219546fd76750f358ffb6738f17b9237c58c15a6 +Author: Keith Packard +Date: Wed Sep 20 22:43:05 2006 -0700 + + Steal Xinerama code from SiS driver. Add missing files. + + Provide a Xinerama implementation when DIX version isn't enabled. This + version exposes each crtc as a separate 'screen' and reports the size of + that patch. The extension also sends ConfigureNotify events to the root + window whenever crtcs change so that applications will re-fetch xinerama + information. This actually works for metacity. + +commit bde0a4c12cb393a6d7f1552b067624da1b0502ae +Author: Keith Packard +Date: Wed Sep 20 19:42:34 2006 -0700 + + RRSetCrtcConfig status fix. RRGetScreenResources timestamp fix. + + RRSetCrtcConfig was returning the wrong status values. + RRGetScreenResources was always returning currentTime. + +commit d812f486a01a6276aed7b4ebd3cd8eb8ddfe10d3 +Author: Donnie Berkholz +Date: Wed Sep 20 15:39:39 2006 -0700 + + Really fix sparc on 64-bit kernel/32-bit userland. + + Commit b3a3020fd018df8bc5a8193d36e1a1c7ae8af8ba used a sparc64 ifdef instead of + sparc. But for 32-bit userland, __sparc64__ is not defined so the wrong code is + used. + +commit 09f7499851bd2f2eba1e30460c61c7a82ed9e853 +Author: Keith Packard +Date: Wed Sep 20 13:15:20 2006 -0700 + + typo + +commit 9f870e0aa1ada238d6a0cd099996e8c47f6ba1d9 +Author: Keith Packard +Date: Wed Sep 20 13:14:53 2006 -0700 + + When setting output state, leave output unchanged when setting to current. + +commit d16e83413e7e06adebd629d04de57bbedd8c3765 +Author: Aaron Plattner +Date: Wed Sep 20 12:47:17 2006 -0700 + + Hide or rename more global symbols to avoid clashes with libfb. + + Rename composeFunctions, xxSetup, and xxPrintVisuals. Hide the other xx* + symbols by making them static. + +commit d08718d8fd31477e90f13b9e122504c515b46ee0 +Author: Keith Packard +Date: Wed Sep 20 12:05:52 2006 -0700 + + Avoid calling xalloc(0). Change rrScreenSizeSet to rrScreenSetSize. + +commit ef1f3248cb5fff0a02c0059f865c4d931eba23a6 +Author: Keith Packard +Date: Tue Sep 19 22:48:54 2006 -0700 + + Split out 1.0-style info and new property routines to their own files. + +commit 07112adb0802d28488de5a495aa61bb3cfc280b6 +Author: Keith Packard +Date: Tue Sep 19 00:46:27 2006 -0700 + + RRGetScreenResources and RRGetOutputInfo are working now. + + Removed separate id field in RRModeRec. + Pull screen subpixel order from Render extension. + Implement RGetScreenResources and RRGetOutputInfo + +commit afe5e9483b352ed06075ed68a6ffa50799194e2d +Author: Keith Packard +Date: Mon Sep 18 12:18:22 2006 -0700 + + RandR working with old clients and old API. + +commit 2be1ac15aee592782d7693b8de2c3815478a094e +Author: Keith Packard +Date: Mon Sep 18 12:11:18 2006 -0700 + + Remove smashing of CFLAGS from server build. + + CFLAGS is a user variable, extracted from the environment at configure time + and settable by the user at build time. We must not override this variable. + +commit bf07893947cfca945598e194ed416fda6162b11c +Author: Keith Packard +Date: Sun Sep 17 23:03:23 2006 -0700 + + Split out RandR dispatch code from randr.c to rr*dispatch.c. + + More disassembly to ease ongoing development. + +commit 3e745745fecef1cb59e53bde52ded311b51e1dac +Author: Keith Packard +Date: Sat Sep 16 23:21:37 2006 -0700 + + Split RandR implementation into separate files. + + RandR is getting too big to live in one file; split into one file per object + type (crtc, mode, screen), leaving the rest of the code in randr.c. + + Code is slowly approaching the point where it will drop-in as a replacement + for the old 1.0 implementation. + +commit d17fb9672e238a089e463ac74cc4cd3325b67e1f +Author: Keith Packard +Date: Sat Sep 16 21:44:42 2006 -0700 + + Start moving to new randr 1.2 definition + +commit 8dec74321d916f204f8182f1b93a65defbe50e78 +Author: Keith Packard +Date: Mon Jul 17 14:43:07 2006 -0400 + + Successful legacy RandR API/Protocol emulation for query. + + These changes clean up minor errors to make it possible to list the + available modes for a monitor using legacy APIs in both the X server DDX and + RandR protocol. Setting modes is untested, so it probably doesn't work. + +commit cab3a0145f2483fe43b5db5f5dd2076db9757fe5 +Author: Keith Packard +Date: Mon Jul 17 01:21:11 2006 -0400 + + RandR: New data structure, old API. At least it compiles now + +commit d95c758630f4aacec339a7ec80d2c4a9d7de1e4a +Author: Keith Packard +Date: Sat Jul 1 19:46:38 2006 -0700 + + Preliminary RandR 1.2 work + +commit f057de4f73fa593fa3fc5f05f65b89e76273b158 +Author: Adam Jackson +Date: Sat Sep 16 03:49:11 2006 -0400 + + Don't install librac.a. + + Thanks, automake. + +commit 49a70c8570b03aff8239324a2474918a6fbc52a0 +Merge: d1110c5... 05231e3... +Author: Eamon Walsh +Date: Fri Sep 15 15:26:57 2006 -0400 + + Merge branch 'master' into my-XACE-modular + +commit 46af6d1e953f1eefb6edbba3d29fb9700e42c2bb +Author: Adam Jackson +Date: Thu Sep 14 19:28:44 2006 -0400 + + Always believe the monitor when it reports a reduced-blanking mode. + + CVT reduced blanking modes are typically only seen on digital connections to + LCDs, but there are some monitors that report them as supported over the + VGA connector too, which is perfectly legitimate, electrically speaking. + +commit 63acf18b7e4ce3a9f7deab3a9088a1c41cab0191 +Author: Adam Jackson +Date: Thu Sep 14 19:26:37 2006 -0400 + + In xf86MatchPciInstances, fail gracefully when there's no PCI device at all. + + This allows the autoconfig logic to fall through sanely on non-PCI machines, + which importantly includes Xen virtual machines. + +commit a8f9936f55c5364bb02e8c3187507eb1f70e2ef2 +Author: Adam Jackson +Date: Thu Sep 14 19:24:41 2006 -0400 + + Prefer driver-provided modes when matching name strings to modelines. + + Well, kinda. Strictly we prefer M_T_BUILTIN strongest since those are modes + where the driver has said it absolutely can't do anything else (VBE). Then + we look for user-defined modes, ie, modelines from the config file. Then + we consider modes reported by the monitor via EDID. Finally if nothing has + matched yet we consider the default mode pool. + + Within each of the above-mentioned classes, modes with the M_T_PREFERRED bit + take priority over other modes in the same class. + + This logic ensures that the timings sent to the monitor exactly match the + timings it reported as supported, which occasionally don't match the numbers + you might get for that mode from CVT or GTF. + +commit 81ef1b6d6063c20db4963abf7b7848e235aa4ebb +Author: Adam Jackson +Date: Thu Sep 14 19:18:58 2006 -0400 + + Mark EDID modes as driver modes. Infer virtual size from driver modes. + + This allows the server to guess an appropriate initial virtual size and + resolution. The heuristic is to select the largest driver-reported mode + that matches the monitor's physical aspect ratio. We revalidate this + estimate after mode validation, since we may have filtered away all + modes that would fill that size. + + Also, the EDID preferred timing is now marked as M_T_PREFERRED as well. + +commit 43d9edd31e31b33b9da4a50d8ab05004881c8d5a +Author: Adam Jackson +Date: Thu Sep 14 19:09:02 2006 -0400 + + Attempt to add the 'mouse' driver in more situations. + + Always add a mouse driver instance configured to send core events, unless + a core pointer already exists using either the mouse or void drivers. This + handles the laptop case where the config file only specifies, say, + synaptics, which causes the touchpad to work but not the pointing stick. + We don't double-instantiate the mouse driver to avoid the mouse moving twice + as fast, and we skip this logic when the user asked for a void core pointer + since that probably means they want to run with no pointer at all. + +commit 739224d05eb4f356c9cab9dcb8a44a8d78287765 +Author: Adam Jackson +Date: Thu Sep 14 19:03:32 2006 -0400 + + Load the default module set when no Module section is given in the config. + + Also, synchronize that list with the list for the pseudoconfig file used + when starting with no config file. These really need to be better unified. + +commit beac2bf1e48e6b77dbf7d95f086abc5abcd90cf0 +Author: Adam Jackson +Date: Thu Sep 14 19:01:13 2006 -0400 + + Expand the default sync ranges to be large enough for 800x600@60. + +commit 71a15a7d5721073eccb3a275f353b3aa584c0d68 +Author: Adam Jackson +Date: Thu Sep 14 19:00:10 2006 -0400 + + Publish the raw EDID block as a property on the root window. + + This was removed in the patch for bug #5386, but is still useful. + +commit 7939c8dfb7c7bed4febcdc12922fb2e17619ea36 +Author: Adam Jackson +Date: Thu Sep 14 18:57:57 2006 -0400 + + Bump the default pixel depth to 24, and default bpp to 32. + +commit 72af975f9c8de0ff6796f1ce4b76dcf841d21e99 +Author: Adam Jackson +Date: Thu Sep 14 18:56:34 2006 -0400 + + Fix up EDID blocks where the max pixclock exceeds the preferred mode clock. + + Base EDID only lets you specify the maximum dotclock in tens of MHz, which + is too fuzzy for some monitors. 1600x1200@60 is just over 160MHz, but if + the monitor really can't handle any mode at 170MHz, then 160 is more + correct. Fix up the EDID block before the driver can see it in this case, + so we don't spuriously reject modes. + +commit d05e0a97bb704a4986cf638487205da759c4ce17 +Author: Adam Jackson +Date: Thu Sep 14 18:49:12 2006 -0400 + + Enable DPMS by default. + +commit 334f7db9f653113d5d46236911d7de2ec4173f28 +Author: Adam Jackson +Date: Thu Sep 14 18:46:10 2006 -0400 + + Allow hsync and vsync ranges to be overridden independently again. + +commit ced46e17777b635df9371c4cfaec3f8968b4dbcf +Author: Adam Jackson +Date: Thu Sep 14 18:41:59 2006 -0400 + + Record all standard timings from EDID as modes, instead of just the first five. + +commit d89fee68d0e49211871cd9eb3893ed55c1d478a6 +Author: Adam Jackson +Date: Thu Sep 14 18:41:15 2006 -0400 + + Record the maximum dot clock of the monitor, and filter by it. + +commit fa8ef7166839a7435e0017683f3e3c7f7904b285 +Author: Adam Jackson +Date: Thu Sep 14 18:33:00 2006 -0400 + + Don't translate monitor gamma to X gamma. + + The X gamma is used to set the output ramp of the card. Setting a 2.2 output + gamma going into a 2.2 monitor gives an effective gamma of 4.84, which is + very much not what you want. + +commit 511c60bc7399b07c267d686a969880e5ec92408a +Author: Luc Verhaegen +Date: Thu Sep 14 18:30:36 2006 -0400 + + Bug #5386: Synthesize modelines from EDID data. + +commit 05231e336db8f959c15dda518641976f061df1a6 +Author: Ian Romanick +Date: Thu Sep 14 14:13:39 2006 -0700 + + Use correct opcodes for GLX_EXT_texture_from_pixmap. + + Regenerate from glX_API.xml 1.3 from Mesa. The glproto package and libGL + (from Mesa) must also be updated. + +commit 0a62840e2ce25e5c2554e7e5ab4c9c5b96899e2d +Author: Bill Nottingham +Date: Wed Sep 13 15:40:23 2006 -0700 + + Bug 7641: fix comment written to Xorg.conf (s/VertSync/VertRefresh/) + + X.Org Bugzilla #7641 + Patch #6349 + +commit 182e5e0f4ba4c98a34bc52bdf4032ba315fe80ad +Author: Drew Parsons +Date: Tue Sep 12 14:30:46 2006 +1000 + + Xprint: revert installation of /etc/X11/Xsession.d/cde_xsessiond_xprint.sh + pending resolution of #8232. + +commit 594d4019c613b0f4bf8f48cc074ecc3c8366f1d7 +Author: Tilman Sauerbeck +Date: Tue Sep 12 01:15:40 2006 +0200 + + transformIsIdentity() now doesn't accept a zero matrix as the identity. + + Added a non-zero test for one of the diagonal values. + +commit fc30370d14125f86ee1192890a184881fa139546 +Author: Tilman Sauerbeck +Date: Mon Sep 11 19:43:09 2006 +0200 + + Bug #8226: Fixed SetPictureTransform()'s handling of the argument matrix. + + It now recognizes scaled variants of the identity matrix, too. + +commit 2b357e9a2f9038cf9cd07da908e3103a3d0965c9 +Author: Donnie Berkholz +Date: Sun Sep 10 22:17:20 2006 -0700 + + If we're installing libxf86config, install headers needed to build against it. + +commit 58933757862c458e2da39bd464e50d9c0e41b313 +Author: Zephaniah E. Hull +Date: Sun Sep 10 15:50:51 2006 -0400 + + Warning fix, and a syntax fix in a #if 0 section of code. + +commit 0a3740a0000191e3039fe183ae51b938d0548340 +Author: Zephaniah E. Hull +Date: Sun Sep 10 15:49:25 2006 -0400 + + Typo correction, 'i' is not a '1', so no longer crash on some Xi requests. + +commit 8d709f0280b458515b32c2b87938749428e5c149 +Author: Zephaniah E. Hull +Date: Sun Sep 10 15:48:35 2006 -0400 + + Remove a merge artifact so that we can compile. + +commit b3a3020fd018df8bc5a8193d36e1a1c7ae8af8ba +Author: Jesse Barnes +Date: Sun Sep 10 11:13:18 2006 -0700 + + the new PCI mapping routines are broken on sparc64 (in fact they look + broken for any 32 bit X server running on a 64 bit kernel) so #ifdef + them out for now. the PCI rework tree will make all this crap go away, + so I think we can tolerate the extra #ifdef for the next release. + +commit 60db190ecfce52cbfa888c0af3210634f9186bed +Merge: 5e9d33f... 6525610... +Author: Zephaniah E. Hull +Date: Sun Sep 10 03:49:17 2006 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 65256109bb8f5a26704ed960e1dd113981df5787 +Author: Drew Parsons +Date: Sun Sep 10 17:40:37 2006 +1000 + + * Define XPSERVERLIST with `/etc/init.d/xprint get_xpserverlist` + instead of `/bin/sh /etc/init.d/xprint get_xpserverlist` + - allows the initscript to set its own different shell under #! + - allows disabling of XPSERVERLIST by making the script non-executable + * Allow files to be installed by using dist_*_DATA instead of EXTRA_DIST. + Also, use dist_*_SCRIPTS to install scripts. + * Fix minor typos in man pages. + +commit d1110c5c83a7f439158f369ab2f3ae614fa9d2a5 +Author: Eamon Walsh +Date: Fri Sep 8 15:28:48 2006 -0400 + + Generalize the handling of configuration files that ship with extensions. + +commit 9deb579dc9366590203afe0576bf88643ab36c89 +Author: Eamon Walsh +Date: Fri Sep 8 15:25:17 2006 -0400 + + Zero out newly created ExtensionEntry structures, but only after the + devPrivates have been initialized. + +commit cec392656cda1c938d5462e1949e6eef489f9168 +Author: Eamon Walsh +Date: Fri Sep 8 15:24:23 2006 -0400 + + Zero out newly allocated ClientRec structures. + This is required to initialize the devPrivates to a known state. + +commit 0fba09cdfcc78161f5c92bef6cca53e5309656bd +Author: Eamon Walsh +Date: Fri Sep 8 15:23:06 2006 -0400 + + Include dix-config.h. + +commit c93877100eb98647c5b6b8556730d54677f730b6 +Author: Eamon Walsh +Date: Fri Sep 8 15:21:57 2006 -0400 + + Don't need to allocate memory now that devPrivates are being used. + +commit 86450998da616e3d00d4d6293acc35eccc2061e7 +Author: Kristian Høgsberg +Date: Thu Sep 7 15:35:16 2006 -0400 + + Fix AIGLX VT switching. + + See https://bugs.freedesktop.org/show_bug.cgi?id=7916 + + There may be a simpler, less intrusive fix that involves just rearranging + DRI locking between 2D and 3D drivers around VT switch. + +commit 5e9d33fe87f9d24e55c468d4b2bb761c9efdb26a +Merge: 629798c... 64479ff... +Author: Daniel Stone +Date: Thu Sep 7 15:43:31 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 629798c73ad76a77fa6a55bc6403fd9b95ade2bb +Author: Daniel Stone +Date: Thu Sep 7 15:17:04 2006 +0300 + + XkbCopyKeymap/SrvXkbCopyKeymap: free geom harder, add cheery comments + Unconditionally free geometry when copying the keymap (so we have none on + core, oh well), add a couple of heartening comments. + +commit 64479fffa22581cc7d753065c33eda5520b7db9a +Author: Ian Romanick +Date: Wed Sep 6 16:13:21 2006 -0700 + + Remove prototypes and externs for non-existant functions and variables. + +commit a0179281a6522ec59830e8f2549633741bc56e10 +Author: Ian Romanick +Date: Wed Sep 6 15:45:48 2006 -0700 + + Remove prototypes for non-existant functions. + +commit 8356be492c6b46abdffa08b13836571ed872e16f +Author: Michel Dänzer +Date: Wed Sep 6 15:20:55 2006 +0200 + + Make sure _XSERVER64 is defined when it should be and gets tested. + +commit f6ce0839ba5b73247097826d28f7388fe248ec0c +Author: Michel Dänzer +Date: Wed Sep 6 13:18:02 2006 +0200 + + Fix #include paths for fontcacheproto headers. + +commit f39fd4242902eaa862321d39337f429dd14ebacf +Author: Aaron Plattner +Date: Tue Sep 5 15:23:54 2006 -0700 + + (unsigned long)(1 << 31) = bad news on x86_64. + (cherry picked from 410e5b1d738ba47b36778e6cbed44023a27ce259 commit) + +commit 410e5b1d738ba47b36778e6cbed44023a27ce259 +Author: Aaron Plattner +Date: Tue Sep 5 15:23:54 2006 -0700 + + (unsigned long)(1 << 31) = bad news on x86_64. + +commit 0b81fccd2ee4e054e5cffb739de07460ff2c13f7 +Merge: 20c4ac6... c281351... +Author: Eamon Walsh +Date: Tue Sep 5 18:03:25 2006 -0400 + + Merge branch 'master' into my-XACE-modular + + Conflicts: + + configure.ac + +commit c2813514cf7b1a36caa848cbc2ceef99cf2eb769 +Author: Ian Romanick +Date: Thu Aug 31 15:36:13 2006 -0700 + + Add missing file from previous commit. + +commit 0f9cfb2f752a9010ff07f4b2bd891db0cc30b8e6 +Author: Ian Romanick +Date: Thu Aug 31 13:54:10 2006 -0700 + + Implement GLX_SGI_swap_control. + + Regenerate from glX_API.xml 1.2. Add infrastructure to support + GLX_SGI_swap_control for AIGLX when the DRI driver enables it. Tested + with R300. + +commit a9ef5862919313582f72fc0cfb5ab0af4df6507e +Author: Ian Romanick +Date: Thu Aug 31 13:47:50 2006 -0700 + + Fix problems with vertex program protocol + + There were two sets of bugs in the vertex program (ARB and NV) + protocol. First, several of the ARB functions were missing the + 'doubles_in_order="true"' annotation. Second, after the ARB decided + that glVertexAttrib*ARB functions must not alias fixed-function state + for GLSL, Nvidia re-assigned GLX protocol opcodes for + glVertexAttrib*NV (circa Septeber 2004). For some reason gl_API.xml + was never updated to reflect this, and the updated version of the + GL_NV_vertex_program spec never made into the registry. + + This is just a server-side regeneration from gl_API.xml version 1.68. + +commit 69d5becce4ca2cfc8f8de53672ed54a47de62164 +Author: Matthew Allum +Date: Thu Aug 31 17:30:24 2006 +0100 + + Fix previous commit breaking other kdrives pulling in fbdev.a + +commit fd609956f27d76ee76ac8623787f0fc8633a5546 +Author: Matthew Allum +Date: Thu Aug 31 17:18:57 2006 +0100 + + Add framebuffer device command line switch for Xfbdev + +commit 2fb7b8795a9a36cce61f6449f6ca26ffd1b071f0 +Author: Ian Romanick +Date: Tue Aug 29 16:35:32 2006 -0700 + + Minor extension tweaks. + + GLX_EXT_texture_from_pixmap should always be enabled. + GLX_SGI_video_sync is only for direct rendering and should never + appear in the server's string. + +commit 1c8851ad491dd02d1c79e620b46384956838ed42 +Merge: d59b52f... 5ddbf4b... +Author: Ian Romanick +Date: Tue Aug 29 16:34:04 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit d59b52fc08f2d80b38993e383e61c3eeb0bb0763 +Author: Ian Romanick +Date: Tue Aug 29 14:40:13 2006 -0700 + + Make sure unsupported extensions are disabled. + + GLX protocol isn't supported for GLX_SGI_swap_control or + GLX_SGI_video_sync. Remove them from the list of available extensions + until they are supported. + +commit db6d04d4b87fd9b6409a3ddf0479a88440c2eda1 +Author: Ian Romanick +Date: Tue Aug 29 14:35:08 2006 -0700 + + Add support for AIGLX drivers to enable GLX extensions that they support. + +commit 5ddbf4bcd46fe0d3d682668c2748c712fea410ae +Author: Matthew Allum +Date: Tue Aug 29 22:07:15 2006 +0100 + + Re-add support for tslib (1.0 release) and Xcalibrate extension. + +commit 4524a2bf6f22c871ed109b027a065f0262137dc5 +Author: Daniel Stone +Date: Tue Aug 29 23:49:26 2006 +0300 + + configure.ac: move tslib from KDRIVE_PURE_LIBS to KDRIVE_LIBS + Yeah. That was dumb. + +commit 942b4369990a255257f66835caf8671432c405a3 +Merge: 77d315b... 393dc0a... +Author: Ian Romanick +Date: Tue Aug 29 13:30:37 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 77d315bd2fd2f9014c831d313efbe5821189177c +Author: Ian Romanick +Date: Tue Aug 29 13:30:20 2006 -0700 + + Remove __glXNoSuchRenderOpcode because it is no longer used. + +commit 260c3f32b69c98f8fc5360f860f69d32c19f04a7 +Author: Daniel Stone +Date: Tue Aug 29 23:18:12 2006 +0300 + + configure.ac: fix XSDL test + +commit 393dc0a3388d56186181b2bd9bcc1d267747e709 +Author: Daniel Stone +Date: Tue Aug 29 22:53:54 2006 +0300 + + kdrive: remove @KDRIVE_LIBS@ from Xfoo_DEPENDENCIES + +commit cff23616fe45e10c6786a303c8dcfc0a80463a53 +Author: Daniel Stone +Date: Tue Aug 29 22:44:09 2006 +0300 + + configure.ac: allow disabling of XSDL + +commit 89d272bb183e85715d8e6047929fb2d912033d82 +Author: Daniel Stone +Date: Tue Aug 29 15:05:31 2006 +0300 + + [PATCH] kdrive/linux keyboard: remove more debugging spew + +commit bd6f539ff9409aa7d9056fabe120b457b0a15997 +Author: Daniel Stone +Date: Tue Aug 29 13:21:58 2006 +0300 + + [PATCH] kdrive/linux keyboard: silence excessive debugging noise + +commit 5436fce09003e20744a388fa4ae49007c9cf8ede +Author: Daniel Stone +Date: Tue Aug 29 13:21:40 2006 +0300 + + [PATCH] GetKeyboardValutorEvents: be even more careful + + Don't accept devices without a keyboard feedback class. + +commit 0eb7299f445455a7bcacf2410e83227b23259675 +Author: Daniel Stone +Date: Tue Aug 29 13:19:12 2006 +0300 + + [PATCH] XkbCopyKeymap: still more range fixes + + Make sure we don't stomp preserve if it doesn't already exist, and fix a + couple of range-related thinkos in level name copying. + +commit 7fa3383e3c8eea7d1eb0e556393f2431cf8e6ed2 +Merge: 8d77d44... ebbdc13... +Author: Daniel Stone +Date: Tue Aug 29 15:16:01 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit ebbdc1342a243b301723390696f742dc91f59764 +Author: Adam Jackson +Date: Mon Aug 28 18:17:32 2006 -0400 + + Remove calls to LoaderCheckUnresolved(), since it's now a stub. + +commit 8d77d44fda3aacbae62864a3620e09095b79e92d +Merge: d6f36bd... 2fde560... +Author: Daniel Stone +Date: Sun Aug 27 23:08:49 2006 +0300 + + Merge branch 'origin' into input-hotplug + +commit 20c4ac6e038607ebbf6c04639670514c016d8597 +Merge: 13c6713... 8d4f21a... +Author: Eamon Walsh +Date: Fri Aug 25 18:49:46 2006 -0400 + + Merge branch 'my-XACE-SELINUX' into my-XACE-modular + +commit 13c6713c82763a85c725c998b37ad02156d803ba +Author: Eamon Walsh +Date: Fri Aug 25 18:17:01 2006 -0400 + + Add four new XACE hooks: auditing, key event notification, window init + +commit 2fde560bbb9c1148f26fd969dc30c4e736672b7c +Author: Ian Romanick +Date: Fri Aug 25 13:01:51 2006 -0700 + + Enable GL_EXT_texture_filter_anisotropic and GL_EXT_blend_equation_separate. + + Re-generate from gl_API.xml 1.65. This provides the missing bits for + GL_EXT_texture_filter_anisotropic and GL_EXT_blend_equation_separate. + Enable those extensions. + +commit e2d529963ed40b5f113cf82c17809d241cd4aac1 +Author: Ian Romanick +Date: Fri Aug 25 12:05:16 2006 -0700 + + Enable vertex and fragment programs. + + Implement glGetProgramStringARB and glGetProgramStringNV. With these + functions implemented, GL_ARB_{vertex,fragment}_program, + GL_NV_{vertex,fragment}_program, and related extensions can be enabled. + +commit d6f36bd28009881ef7f7a20cdadb3808d808ed97 +Author: Daniel Stone +Date: Fri Aug 25 12:43:17 2006 +0300 + + xfree86/parser: use 'kbd' driver when 'keyboard' specified + Now that we've completely ditched the old driver, we should probably make a + best-effort attempt to keep configs working. + +commit 7c4167f0d6b33c9c602b04fcfd246fd3aeddd709 +Merge: 393f834... cd2da4e... +Author: Daniel Stone +Date: Fri Aug 25 11:15:33 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 393f8347edcccfc24d8902a86ea9def7ada2537b +Author: Daniel Stone +Date: Fri Aug 25 10:46:32 2006 +0300 + + xorgconf.cpp: kbd, not keyboard + +commit c33e39c86be2010b169ffbd8adbe53b93222dc5f +Author: Ian Romanick +Date: Thu Aug 24 20:33:57 2006 -0700 + + Finish support for GL_ARB_texture_compression. + + Fill in __glXDisp_GetCompressedTexImageARB and + __glXDispSwap_GetCompressedTexImageARB to finish support for + GL_ARB_texture_compression. With this extension (and the related + compression extensions), the server-side GLX supports all of the + protocol for GL 1.4. w00t! + + The bad news is that this has received only minimal testing, and Mesa + does not contain any good tests for GL_ARB_texture_compression. + +commit cd2da4e41eae233b50f8830d9a8f5d1d916a5a1b +Author: Ian Romanick +Date: Thu Aug 24 18:00:16 2006 -0700 + + Remove GL/glx/g_disptab.c, GL/glx/g_disptab_EXT.c, and + GL/glx/g_disptab_EXT.h. Unfortunately GL/glx/g_disptab.h has to be + kept around a bit longer. + +commit a29e6dd2d2d45c18c52737bb3b7945aafcea5032 +Author: Ian Romanick +Date: Thu Aug 24 17:58:52 2006 -0700 + + Add some missing bits of GL_SGI_color_table. + +commit ae608b2071d882966e9c7ede71f846b1ecec0b23 +Merge: 2c86527... b879356... +Author: Ian Romanick +Date: Thu Aug 24 14:56:33 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 2c865277fe1d056981d1020e1af001d2319252c0 +Author: Ian Romanick +Date: Thu Aug 24 14:54:49 2006 -0700 + + Regenerate from gl_API.xml 1.63. Enable extensions. + + gl_API.xml 1.63 corrects some problems with GLX protocol for + GL_EXT_paletted_texture and GL_SGI_color_table. Regenerate from that + file, and enable those extensions and GL_EXT_shared_texture_palette. + +commit 7d5de5c6657304246473d7ddd5c29bb0c7a3bc34 +Author: Ian Romanick +Date: Thu Aug 24 14:49:46 2006 -0700 + + Regenerate from gl_API.xml 1.62. Functions move, no real changes. + +commit 3a36b0a24aa9e9e238faa7f00100f59800f5142b +Merge: db1ab1b... b879356... +Author: Daniel Stone +Date: Thu Aug 24 23:35:28 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit db1ab1bdb2f79eca593fe247056309a16ebd29c6 +Author: Daniel Stone +Date: Thu Aug 24 23:33:59 2006 +0300 + + XkbCopyKeymap: fix various range issues + Fix a bunch of range issues caused by incorrect assumptions (e.g. that the + design was at least halfway sensible), and copy types by hand, instead of + just blindly memcpy()ing the lot, since it itself cleverly contains a ton + of allocated pointers. + +commit 5fb8d947bb88d715b9b236342885c445cb5a9387 +Author: Daniel Stone +Date: Thu Aug 24 23:16:43 2006 +0300 + + configure.ac: more thinkos + Fix auto tests for vidmode and xf86dga. I win at life. + +commit 4e37c07ba6e5d299d4f8922dc6cf054c814f7baf +Author: Daniel Stone +Date: Thu Aug 24 23:16:17 2006 +0300 + + config: clean up debugging messages, make failure to acquire name fatal + Bomb with FatalError when we can't acquire the bus and name. + Clean up a bunch of debugging ErrorFs to be hidden behind #ifdef DEBUG. + +commit b879356ce96929d02bcb75b9aa24b17ac7e28125 +Author: Adam Jackson +Date: Thu Aug 24 15:50:15 2006 -0400 + + More #ifdef USE_DEPRECATED_KEYBOARD_DRIVER. + +commit 4ed311cf1c29090c53e474a3001c5702ff8409df +Merge: 73e58ad... b29b236... +Author: Matthias Hopf +Date: Thu Aug 24 20:17:10 2006 +0200 + + Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver + +commit b29b236d88789fd45d823a55dbedb393bb134c5b +Author: Lukáš Turek <8an@centrum.cz> +Date: Thu Aug 24 15:57:09 2006 +0200 + + Adapt to Mesa header name change. + +commit ce4a0a4ddafd3833d7025f83ed3729915c8aba70 +Author: Alan Hourihane +Date: Thu Aug 24 13:56:22 2006 +0100 + + Apply patch in bug #7919, blit improvements in + multiwindow mode for Xming/CygwinX + +commit 866ca1f929c95689bac9f0a0b3478f7b4d77214b +Author: Daniel Stone +Date: Thu Aug 24 15:46:44 2006 +0300 + + configure.ac: fix XF86VidMode test + +commit 2b06c69c8feaf3bdc065635ee711efa45b3033b3 +Author: Daniel Stone +Date: Thu Aug 24 14:51:26 2006 +0300 + + GKVE: pass correct arguments to XkbCopyKeymap + Fix horrendous thinko. Indicators now work perfectly. + +commit 4adf9af313c9f63b6ad734e174efe1d36ddb5813 +Merge: 33af05d... 67bd672... +Author: Daniel Stone +Date: Thu Aug 24 10:59:33 2006 +0300 + + Merge branch 'master' into input-hotplug + +commit 67bd672c880869ef625ae0c0163c3ec1eba46abf +Author: Alan Hourihane +Date: Thu Aug 24 08:47:06 2006 +0100 + + Fix typo + +commit 733c4beb16c2c4ad9e9a4ea9a85b09fc5062a775 +Author: David Nusinow +Date: Wed Aug 23 22:39:42 2006 +0000 + + Add xorg.conf IgnoreABI option which does the same thing as -ignoreABI + +commit b983773d446cef6a0948ca264ed48126e404ae9a +Merge: 0623d36... d9a8656... +Author: Ian Romanick +Date: Wed Aug 23 17:16:50 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 0623d3643fc28ebc514b2ca872c985d0cf0c753a +Author: Ian Romanick +Date: Wed Aug 23 17:16:02 2006 -0700 + + Fix the sorting of the extension string. Add a few extensions that + are supported by the new code. A few of these were actually supported + before but weren't advertised. + +commit 5d2caacff570dd68bb3fb05e776e02515b2a9da0 +Author: Ian Romanick +Date: Wed Aug 23 16:47:00 2006 -0700 + + Refector __glXDisp_Render and __glXDispSwap_Render to DoRender. + Refector __glXDisp_RenderLarge and __glXDispSwap_RenderLarge to + DoRenderLarge. + +commit 866bb3f34046045c9fa0744db1d76e035b3da9c7 +Author: Ian Romanick +Date: Wed Aug 23 16:41:53 2006 -0700 + + Memo to myself: Whenever a Makefile.am changes, autogen.sh must be + re-run. This is especially true if the change is to remove a source + file. + + Fix RenderLarge to actually use the new protocol decode tables. + +commit d9a86566c21afd7985673f3ed851b055d9dac46f +Author: Alan Coopersmith +Date: Wed Aug 23 16:15:19 2006 -0700 + + Add LOCALCONN to dix-config.h template for xtrans + +commit f6fd7d8f8393f93705e76b2b2777a0d9bcafa991 +Author: Ian Romanick +Date: Wed Aug 23 16:05:37 2006 -0700 + + Convert protocol decode tabels for Render and RenderLarge to use nice, + compact N-way search trees generated by scripts in Mesa. + +commit 7ae82b5fc8721be78b43a322bbf2c46aac08b8cf +Author: Ian Romanick +Date: Wed Aug 23 16:00:48 2006 -0700 + + Fix __glXDispatchInfo::dispatch_functions and + __glXDispatchInfo::size_table. dispatch_functions had the const in + the wrong place, and size_table was declared as an array of two + pointers to int_fast16_t instead of a pointer to an array of 2 + int_fast16_t. cdecl to the rescue! + +commit 39a620d17809dc71fb5ad61a955fe3c442f90a05 +Author: Ian Romanick +Date: Wed Aug 23 14:24:34 2006 -0700 + + Rename __glXDrawArraysSize to __glXDrawArraysReqSize. This makes its + name match the pattern of all the other functions in + __glXRenderSizeTable. + +commit 86406455f0e5fc977431948611e9bb5fda1e1d46 +Author: Ian Romanick +Date: Wed Aug 23 13:30:59 2006 -0700 + + Re-generated files after a fix to glX_API.xml (in Mesa). + +commit d7a7f12361d31001bbd9394a57de029ef0b934b8 +Author: Ian Romanick +Date: Wed Aug 23 13:30:13 2006 -0700 + + Convert protocol decode tables for Single, VendorPrivate, and + VendorPrivateWithReply message to use nice, compact N-way search trees + generated by scripts in Mesa. + + The Render protocol decode tables are next... + +commit bdec9680fa74dd23cf319d09af1940f8cf71a5b1 +Author: Adam Jackson +Date: Wed Aug 23 14:43:23 2006 -0400 + + Make sure Composite is never enabled for Xnest. + +commit 9f2a108051aad9b024ab737b45fc12290a113e37 +Author: Adam Jackson +Date: Wed Aug 23 14:38:34 2006 -0400 + + Make 'Xvfb -render' also disable Composite, lest we segfault on startup. + +commit 33af05d58f1f4f021036e9ce4b60fd76dbaebe73 +Author: Daniel Stone +Date: Wed Aug 23 19:05:50 2006 +0300 + + XkbCopyKeymap: use correct range for MapNotify + We haven't copied {min,max}_key_code by the time the notifies run, so use + src instead of dst to determine number of keys, et al. + +commit 6323a11d0db4d3cf0317af83f0362730142f5325 +Author: Daniel Stone +Date: Wed Aug 23 18:53:04 2006 +0300 + + XkbCopyKeymap: optionally send NewKeyboardNotify/MapNotify events + Optionally send a NewKeyboardNotify or MapNotify event when copying the + keymap; modify GetKeyboardValuatorEvents to make use of this. + +commit 728fbadd16a748b45c80bc2c65c46f82cf803578 +Author: Daniel Stone +Date: Wed Aug 23 14:33:59 2006 +0300 + + gitignore: ignore vi swap files + +commit 8f8487ff997670a4af0293fed77ff920cfc39fb1 +Author: Daniel Stone +Date: Wed Aug 23 14:33:41 2006 +0300 + + xkb/gkve: copy XKB map, not pointer-assign + Write a new function to copy an XKB map (does everything but geometry at + the moment), and use that instead of nasty pointer assignments. + +commit 52ba722e4c89c052609b4fc62e965d92778aa2dd +Merge: 9138d5a... 0554125... +Author: Eamon Walsh +Date: Mon Aug 21 18:49:31 2006 -0400 + + Merge branch 'XACE-modular' into my-XACE-modular + +commit 05541259bdb0dfaab015a01caa3722b7a1b782e2 +Merge: c2535f6... a1ac044... +Author: Alan Coopersmith +Date: Mon Aug 21 13:07:41 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into XACE-modular + +commit a56b98bb047003a05e26ca9365c212a2da7ac200 +Author: Daniel Stone +Date: Fri Aug 18 18:03:41 2006 +0300 + + dix: enable null root cursor + + Enable a blank root cursor, selectable with --enable-null-root-cursor at + configure time. + +commit 0704bb298cc826cd117815898c6bc015a693c2c9 +Merge: c140369... a1ac044... +Author: Daniel Stone +Date: Fri Aug 18 17:30:14 2006 +0300 + + Merge branch 'master' into input-hotplug + +commit a1ac0440bba690368aa4226468ce571be1a09d95 +Author: Daniel Stone +Date: Fri Aug 18 17:30:00 2006 +0300 + + dix: fix whiteroot thinko + Note to self: run git update-index _after_ testing, not just before. + +commit c14036977fef7b8787c0b68f5262fa0b6a2834f5 +Author: Daniel Stone +Date: Fri Aug 18 17:24:34 2006 +0300 + + input.h: add InitCoreDevices prototype + +commit 1c2cb30cd88ba4453f9da339025f8ff39f7f5412 +Merge: 633b6a6... 70ddd0f... +Author: Daniel Stone +Date: Fri Aug 18 17:05:50 2006 +0300 + + Merge branch 'origin' into input-hotplug + +commit 19f673b7788d32c220e7e06734f1074b0e4a999c +Merge: cb0a565... 70ddd0f... +Author: Daniel Stone +Date: Fri Aug 18 17:05:41 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit cb0a565d2b2cf8823abbd77b4426cc2237731dc1 +Author: Daniel Stone +Date: Fri Aug 18 17:04:48 2006 +0300 + + dix: add whiteroot flag + Add a -wr option to use a white root window, and use a BackPixel rather + than BackPixmap for both white and black root windows. + +commit 70ddd0f39d5118db72a1a4e473cbfb502f1ed9ec +Author: Alan Hourihane +Date: Fri Aug 18 14:43:10 2006 +0100 + + Fix bug #5735, Serious flaw in CygwinX clipboard + integration prevents paste from X to Windows apps + (Brett Stahlman & Colin Harrison) + +commit 708b225689b5a4ba9ffe3372b584b715ef9eacdc +Merge: e1f4565... ee5e2cb... +Author: Alan Hourihane +Date: Fri Aug 18 09:13:52 2006 +0100 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit e1f4565be5ce80be4655e81f77f4073fa3fbf8d0 +Author: Alan Hourihane +Date: Fri Aug 18 09:11:48 2006 +0100 + + Fix bug #7302, make Xn.hosts work from the + Microsoft Windows install directory on Xming. + (Colin Harrison) + +commit 1880defe4eaba02f9585b154d0883235eabc6d11 +Author: Alan Hourihane +Date: Fri Aug 18 09:09:53 2006 +0100 + + Fix bug #7281, clipboard viewer should not + call SetClipboard viewer when bogus in Xming/CygwinX + (Colin Harrison) + +commit a1a8e4f7f5917f537eb3dd51d3d6fa3e129236ce +Author: Alan Hourihane +Date: Fri Aug 18 09:08:12 2006 +0100 + + Fix bug #7280, round title corner background + should be transparent not black in Xming/CygwinX + (Colin Harrison) + +commit ee5e2cbd2bee610a95facc6b486c4a5070973099 +Author: Adam Jackson +Date: Thu Aug 17 17:29:32 2006 -0400 + + Un-cut-and-paste the mode rejection message. + +commit 43e42eef1f5a22703eb64fc9cffecde036ea38e0 +Author: Adam Jackson +Date: Thu Aug 17 16:22:07 2006 -0400 + + Fix default mouse device on Linux, again. + + It would be really nice if we only did this in one place instead of 40. + +commit 633b6a69f560c0a77dcff78fdef5fcf0041e2e04 +Merge: 95dbfcf... 7da5144... +Author: Daniel Stone +Date: Thu Aug 17 21:25:14 2006 +0300 + + Merge branch 'master' into input-hotplug + +commit 7da51447eaab34292e14077fb5a48e6b2e587781 +Author: Daniel Stone +Date: Thu Aug 17 21:24:07 2006 +0300 + + events.c: fix tiny XEvIE thinko + Make sure xeviehot gets updated after the ConfineToShape() call. + +commit 5d082f05632906c29296a44ef5c3a4962c0cbe62 +Author: Daniel Stone +Date: Thu Aug 17 21:18:18 2006 +0300 + + events.c: make XEvIE a little less verbose + Change a lot of: + #ifdef XEVIE + xeviehot.x = + #endif + sprite.hot.x = ... + #ifdef XEVIE + xeviehot.y = + #endif + sprite.hot.y = ... + to one single + #ifdef XEVIE + xeviehot.x = sprite.hot.x; + xeviehot.y = sprite.hot.y; + #endif + at the end of the functions. + +commit 95dbfcf8828c041c218145afc87d21a6c9c7bc02 +Author: Daniel Stone +Date: Thu Aug 17 21:18:18 2006 +0300 + + events.c: make XEvIE a little less verbose + Change a lot of: + #ifdef XEVIE + xeviehot.x = + #endif + sprite.hot.x = ... + #ifdef XEVIE + xeviehot.y = + #endif + sprite.hot.y = ... + to one single + #ifdef XEVIE + xeviehot.x = sprite.hot.x; + xeviehot.y = sprite.hot.y; + #endif + at the end of the functions. + +commit c6c39afde3e5f43b623ca6b52162b83c98a28d45 +Author: Daniel Stone +Date: Thu Aug 17 21:13:09 2006 +0300 + + dix/events.c: add YAFIXME + Add another FIXME to the cacaphony of XXX and FIXMEs in this file. + +commit f9624e0109cf12b6af43fb4235aaa0b54340a4bb +Author: Daniel Stone +Date: Thu Aug 17 16:09:51 2006 +0300 + + kdrive/input: verify SIGIO with --enable-debug + +commit 73e58adda96c1d1b5176d819107faa7697c3eb94 +Author: Matthias Hopf +Date: Wed Aug 16 18:17:58 2006 +0200 + + Fixed segfault w/ broken Xinerama configs. + +commit cd3f744b1f983f71476db99c050045d981c5f5b2 +Author: Daniel Stone +Date: Tue Aug 15 15:54:13 2006 +0300 + + fix missing brace, trim unused variables + +commit 5d073697adb3864133fa3221b82ab8d2f4a59758 +Author: Daniel Stone +Date: Tue Aug 15 15:37:10 2006 +0300 + + kdrive/input: minor warning cleanups + And also a compiler error fix when VERIFY_SIGIO is defined. + +commit 47c1c948e69cfba950ad37a3133fa2db0bd0ff2c +Author: Daniel Stone +Date: Tue Aug 15 15:25:16 2006 +0300 + + kdrive/input: only run special key behaviours on non-XKB + Only attempt to manually deal with special key behaviours (e.g. terminating + the server) when not using XKB, and leave locking behaviour up to GKVE. + +commit 34228d8b280ef105a0c60b8de5dacf70a5ce24b5 +Author: Daniel Stone +Date: Tue Aug 15 15:23:53 2006 +0300 + + GPE: fix absolute button events / GKVE: (non-XKB) don't repeat lock keys + Fix absolute button events in GPE, where we would previously send valuator + events without bumping numEvents accordingly, causing the core event to + go missing. + In the non-XKB path in GKVE, implement proper lock behaviour (one press to + enable, one press to disable, discard releases). + Fix debug_events prototype. + +commit d003bada3352ec7d734498c4c732904876a9d1e2 +Merge: d6433be... a815b9b... +Author: Daniel Stone +Date: Sat Aug 12 22:48:55 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit a815b9b990e068f02d9cbba2b17f2cc3a30a9310 +Merge: 37943e2... 984babe... +Author: George Sapountzis +Date: Sat Aug 12 21:58:33 2006 +0300 + + Merge branch 'master' of git+ssh://gsap7@git.freedesktop.org/git/xorg/xserver + +commit d6433be3cca807dd78fbb1f45d9ba0212283083d +Merge: 2bf9e3d... 984babe... +Author: Daniel Stone +Date: Sat Aug 12 21:50:52 2006 +0300 + + Merge branch 'master' into input-hotplug + +commit 2bf9e3dc1ec5fd7bf84a4a96899e5663a721d4a4 +Author: Daniel Stone +Date: Sat Aug 12 21:50:39 2006 +0300 + + make DIX more tolerant of devices without a CtrlProc (Debian #269860) + Return BadDevice on client requests for devices without a CtrlProc, instead + of tanking horribly. + +commit 984babe86bf82002b4d6589b2750c7b5a5489bd5 +Author: Daniel Stone +Date: Sat Aug 12 21:43:38 2006 +0300 + + remove obsolete vendor defines + Remove random behaviour changes for SGI and MetroLink. + +commit 37943e2f1abc6709ff739000372b0394d5cd18c5 +Author: George Sapountzis +Date: Sat Aug 12 20:54:33 2006 +0300 + + Call exaTryComponentAlphaHelper() for solid src also. + + Also, rename to exaTryMagicTwoPassCompositeHelper() as it is now called for + non-component-alpha masks also, and add function description from + http://anholt.livejournal.com/32058.html. + +commit f7919c287936f55569c2301ebb1b5f52358e70fa +Author: Bastian Blank +Date: Sat Aug 12 20:43:25 2006 +0300 + + xfree86: don't do legacy IO on ARM or S/390 (Debian #362641) + Don't attempt to poke legacy IO ranges on ARM or S/390. + +commit 59dcc62906d8ee597cd43aa307f414cb47995cea +Author: Daniel Stone +Date: Sat Aug 12 20:39:08 2006 +0300 + + xfree86: remove Xqueue support completely + +commit e641000b98e7c2e92e3c801eaa42aa15d5c16ad0 +Author: Samuel Thibault +Date: Sat Aug 12 19:41:59 2006 +0300 + + xfree86: add Hurd support (#5613) + Add support for GNU/Hurd. + +commit 5a3488ccac8e5dabd9fc98bc41ef178ead1b2faf +Author: Daniel Stone +Date: Sat Aug 12 19:25:06 2006 +0300 + + configure.ac: fix execinfo.h test (Debian #363218) + Define HAVE_EXECINFO_H as well as HAVE_BACKTRACE, when we find execinfo.h. + +commit 26c3cd1c9e3f52548389817a6d89a377e20c4269 +Merge: 008aa7e... c4951e0... +Author: Daniel Stone +Date: Sat Aug 12 18:58:18 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 008aa7eb6ed090384e6c44f861410e317c78a1cd +Author: Daniel Stone +Date: Sat Aug 12 18:56:05 2006 +0300 + + completely remove OS keyboard layer + Completely axe the keyboard layer from os-support. + +commit c4951e0a6b6cf3eeee710cc5cda1d9bc929ee3d7 +Author: Adam Jackson +Date: Thu Aug 10 20:49:06 2006 -0400 + + Fix a mode sanity check to not break reduced-blanking setups (LCDs). + +commit e1921f014b102e3eecf3b41972f8672cf23264d6 +Author: Adam Jackson +Date: Thu Aug 10 20:43:15 2006 -0400 + + Rename some mode tokens to better reflect their use. + + Per #5386, M_T_EDID -> M_T_DRIVER, since it's really for any driver-detected + mode. Also add M_T_PREFERRED bit, to select a 'best' mode out of a set. + +commit c2535f67923bde0bfb0e72363467110806e2f40f +Merge: c0cb8d1... db82e12... +Author: Alan Coopersmith +Date: Thu Aug 10 10:37:59 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into XACE-modular + +commit 9525c2709ea3245c6518d4c3b5a0a4afff37181d +Author: Daniel Stone +Date: Thu Aug 10 20:29:57 2006 +0300 + + configure.ac: fix xephyr conditionals + Fix Xephyr build conditions, allowing it to actually be disabled. + +commit 6d8d4abaaacf08140b673472d985117d448a62e7 +Author: Daniel Stone +Date: Thu Aug 10 20:28:06 2006 +0300 + + configure.ac: allow conditional building of XF86{DGA,Misc,VidMode} + Allow conditional building of the above three extensions, defaulting to + auto. + +commit cec284f2b3e948deb9e56a1a8519fddf693ab952 +Author: Daniel Stone +Date: Thu Aug 10 18:03:58 2006 +0300 + + kdrive: properly ifdef composite enabling + +commit 45bce556e8665412b9f6e89f88ed5bedb41de1ba +Author: Daniel Stone +Date: Thu Aug 10 18:02:47 2006 +0300 + + GetMaximumEventsNum: be more conservative + Be slightly more conservative in our maximum event count if we're using + XKB (and thus don't need to count the extra repeat events). + +commit 172d45b9b75f95c997d1e9358040eead496e2a06 +Merge: 3832a3d... db82e12... +Author: Daniel Stone +Date: Thu Aug 10 14:14:54 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 3832a3d7db0f3b5d7167e3b3b5ea6d6b3d96351a +Author: Daniel Stone +Date: Thu Aug 10 14:13:51 2006 +0300 + + GKVE: don't repeat modifiers when using XKB + Make sure we don't ever repeat modifiers (previously was repeating when + using XKB); only do explicit KP/KR repeats in the non-XKB case. XKB will + take care of repeating when we're using it. + +commit 9f188416bb6b4837d4c3f8773053d5eee0ff0ee1 +Author: Daniel Stone +Date: Thu Aug 10 14:00:34 2006 +0300 + + core devices: clear devicePrivates on close + +commit 539d1f33475484d35fb5a377efc76dba2d868e3f +Author: Daniel Stone +Date: Thu Aug 10 14:00:14 2006 +0300 + + GKVE/GPE: have DDX allocate events + Don't allocate events on every GKE/GKVE/GPE call, just have the DDX manage + it instead. Introduce GetMaximumEventsNum(), which is the maximum number + of events these functions will ever produce. + +commit db82e12fac5eaa16a39fc1bd0bc31ad95089dc95 +Author: Adam Jackson +Date: Wed Aug 9 14:55:17 2006 -0400 + + Remove TargetRefresh option from the autoconfig logic. + + The default target of 75Hz is almost always wrong for LCDs. + +commit fcd4167e8913f77bdf9e17a6955d0f2a9f4eeb10 +Author: Adam Jackson +Date: Wed Aug 9 14:48:51 2006 -0400 + + Remove the bc flag from the -help text, since it's gone. + +commit 767f372dd02232469f9fd804b811a17eaf762e1e +Merge: c4f5de6... 462bb61... +Author: Tilman Sauerbeck +Date: Wed Aug 9 20:23:30 2006 +0200 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit c4f5de6cc3b935025829af971b0b8010c1ecfedb +Author: Tilman Sauerbeck +Date: Wed Aug 9 20:21:52 2006 +0200 + + Sanitized glxdri's Block/Wakeuphandler calling. + + __glXDRIleaveServer() and _enterServer() used to call DRIDoBlockHandler + (resp DRIDoWakeupHandler) directly. They are now calling DRIBlockHandler + (resp DRIWakeupHandler) to account for driver specific block/wakeup + hooks. + +commit 5506b4ad200745236f997c121e8200179c47b749 +Merge: 4be9abb... 462bb61... +Author: Daniel Stone +Date: Wed Aug 9 07:21:01 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 4be9abb8504b3761b5f3a01851e4eb3da86c76e2 +Author: Daniel Stone +Date: Wed Aug 9 07:20:16 2006 +0300 + + kdrive: remove ddx_DEPENDENCIES + Remove foo_DEPENDENCIES as they weren't guaranteed to just be libs, + and loader arguments (-lfoo, -Lfoo) might've crept in. + +commit 462bb61b0fe968fae1b99cf98ec6f7de09105dcd +Author: Aaron Plattner +Date: Tue Aug 8 18:07:22 2006 -0700 + + Add CompositeRegisterAlternateVisuals. + + This provides drivers the ability to add their own alternate visuals and then + register them with Composite for implicit redirection. + +commit fe351a711ef55c3ae1e784d4551147c080eda109 +Author: Daniel Stone +Date: Tue Aug 8 14:54:10 2006 +0300 + + GKVE: send XkbMapNotify, not XkbNewKeyboardNotify + Sending MapNotify is more correct in this case than NKN, so do that. + +commit 31089816317f27c668b12a15c74fdd226a8df9f7 +Merge: ab3ebfe... 12dbd8a... +Author: Daniel Stone +Date: Tue Aug 8 12:01:12 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit ab3ebfefdb7d21aba72a5030f6f93bf4fafed709 +Author: Tiago Vignatti +Date: Tue Aug 8 12:00:34 2006 +0300 + + xorgcfg: fix compilation error + Add missing parentheses to IS_KBDDRIV macros. + +commit 12dbd8a02f797ad57a1be683a02a1fcb1ca35438 +Author: Daniel Stone +Date: Mon Aug 7 23:43:40 2006 +0300 + + remove optional R3 backwards compatibility + Remove the permitOldBugs flag, which enabled backwards compatbility with + broken R2/R3 era clients. + +commit 7721ee308fbbb6fc9c969f15fe04b3346c04f843 +Author: Daniel Stone +Date: Mon Aug 7 23:03:02 2006 +0300 + + config client: fix minor race with event queue + Fix a small race whereby you could remove a device while events from it + were still in the queue, by calling ProcessInputEvents immediately before + RemoveDevice, to (hopefully) flush the event queue. + +commit 458c63a84110f64c7fce397a531a3a779c2239a2 +Author: Daniel Stone +Date: Mon Aug 7 23:02:17 2006 +0300 + + enable adding devices after removal of a middle device + Allow new devices to be added after a device that _wasn't_ the last on the + list was removed, by ensuring inputInfo.numDevices always increases, and + never decreases. + +commit a31d11a7a8485cdc799f76c4d407d3b7f7c9b350 +Author: Daniel Stone +Date: Mon Aug 7 23:01:23 2006 +0300 + + GKVE: get rid of bogus double-release check + Get rid of a bogus double-release check which broke non-XKB servers. + +commit bedc4ecf23c7150e3156e0d24602ed3bc3977225 +Author: Daniel Stone +Date: Mon Aug 7 23:00:45 2006 +0300 + + xephyr: aid input debugging + Add the 'ephyr' mouse and keyboard drivers to the driver list so we can + re-add devices. + Set the names properly in Ephyr{Keyboard,Mouse}Init, not in InitInput. + +commit baf93b3abe1e88d82ee6a3d6939f50f96ded271a +Author: Daniel Stone +Date: Mon Aug 7 21:12:45 2006 +0300 + + kdrive: move map initialisation to KdNewPointer + Do a linear n -> n initialisation on the map up until KD_MAX_BUTTON in + KdNewPointer, moving it out of both KdParsePointer, and KdPointerProc. + Also remove dead pointer acceleration code. + +commit ccb53340b66a778abf10182fd88a7d699207fb84 +Author: Daniel Stone +Date: Mon Aug 7 21:12:00 2006 +0300 + + ephyr: cleanup + Remove extraneous KdAddPointerDriver call. + +commit d1c18af27e0aed73104743afb4bf4b8d3d1186cf +Author: Daniel Stone +Date: Mon Aug 7 21:11:38 2006 +0300 + + GPE: use button map for DBP/DBR, not just BP/BR + Make sure we use the button map for extended events, not just core. + +commit 9b7ecbd1dd8d092221897e29c85f3306c7367716 +Author: Daniel Stone +Date: Mon Aug 7 21:09:32 2006 +0300 + + kdrive: prevent overrun in map + We actually need n + 1 elements for the mouse button map, not n. + +commit eb6e8d4042252b13328dbb122e0e6186796a80ac +Author: Daniel Stone +Date: Mon Aug 7 21:05:37 2006 +0300 + + kdrive: increase maximum number of buttons + Increase KD_MAX_BUTTONS to 32. + +commit 1c72290cdf4d9b214e1b9c0526cb7cb8641051f3 +Author: Aaron Plattner +Date: Mon Aug 7 09:57:58 2006 -0700 + + Use DrawablePtrs instead of PixmapPtrs for Prepare/Finish access. + + Also, define some wfb functions even if FB_ACCESS_WRAPPER is not defined. This allows a client to use libfb and libwfb at the same time. + +commit afcad4ad99bbfc8bdcd0f4fdd70e072108410d30 +Author: Daniel Stone +Date: Mon Aug 7 18:11:05 2006 +0300 + + xfree86 ddx: always free GKE/GPE events + free() events we get passed back from GKE and GPE so we don't just, er, + leak them all. *cough*. + +commit 98fdf874eeadd5b37413922d8afba8415d0c56bb +Author: Daniel Stone +Date: Mon Aug 7 16:51:39 2006 +0300 + + move all autorepeat logic to DIX + Move core autorepeat logic for keyboards down to the DIX, remove it from + KDrive. + +commit 5c7001fef8ffc6e3d8585a37d3f79a9495be8ed0 +Author: Daniel Stone +Date: Mon Aug 7 16:51:09 2006 +0300 + + memcpy() events in + memcpy events into our event structure instead of doing pointer assignment. + +commit c85e64cba1d2d88f676ca7cf23b52a6f8219e90e +Merge: a406f6b... f54b71b... +Author: Daniel Stone +Date: Mon Aug 7 15:54:55 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit f54b71b772a1f587394ae3968782b611e52f0e2d +Author: David Nusinow +Date: Sun Aug 6 18:11:00 2006 +0000 + + Document enable/disable flag for AIGLX in xorg.conf manpage. + +commit a406f6bfeaa46e3236f7ab46813fe6c30b936a35 +Author: Daniel Stone +Date: Fri Aug 4 12:40:19 2006 +0300 + + mieq: don't leak events + free all events posted through mieqEnqueue. + +commit 997ba45b192f21810099ed888792a45f1677a9ce +Author: Daniel Stone +Date: Fri Aug 4 11:18:16 2006 +0300 + + fix incorrect button test + Test for n (1..nButtons) being under nButtons, not button (1..(1< +Date: Thu Aug 3 18:24:04 2006 -0400 + + Make SecurityLookupIDBy* part of the base functionality. + +commit 45c229f526bf1dafb5e81b50d700449ba4e1613d +Author: Eamon Walsh +Date: Thu Aug 3 14:26:06 2006 -0400 + + Remove LBX code. + +commit 96e45626c43b7674b66e0258b0b1730d5ce71357 +Author: Eamon Walsh +Date: Wed Aug 2 20:29:59 2006 -0400 + + Rebase Security extension to use devPrivates for storing security state. + +commit 3c23dec5962b8b81ae838fe0ee2c7b0a789f5386 +Author: Eamon Walsh +Date: Wed Aug 2 13:39:49 2006 -0400 + + Call ClientStateCallback on serverClient devPrivates initialization. + +commit ee02e647882a4be29e1130bd79904ee79ed6b802 +Author: Aaron Plattner +Date: Tue Aug 1 13:45:43 2006 -0700 + + Wrap libwfb memory access. + + Use the READ and WRITE macros to wrap memory accesses that could be in video + memory. Add MEMCPY_WRAPPED and MEMSET_WRAPPED macros to wrap memcpy and + memset, respectively. + +commit 39169fd373b97f34923f6494d697d9429d0b8aa3 +Author: Matthew Allum +Date: Tue Aug 1 13:39:22 2006 +0100 + + Back out 'mystery' spurious host window hints. + +commit f737cc38baea6af8bf284c9e207e60a7d90eebe1 +Author: Eamon Walsh +Date: Mon Jul 31 19:58:42 2006 -0400 + + Adding devPrivates support to the ExtensionEntry structure. + +commit b04d64854712678701d5243aacf5cc93444cfadc +Author: Eamon Walsh +Date: Mon Jul 31 19:35:08 2006 -0400 + + Added devPrivates support to the ExtensionEntry structure. + +commit a69335dc299be6de8b82ed34de1cb30f1255feb4 +Author: Aaron Plattner +Date: Mon Jul 31 14:15:55 2006 -0700 + + Make ReadMemoryProcPtr take a const pointer. + + Fixes some warnings when using READ with a const pointer. + +commit b74c845a1233f78b841ff8840272c50873300c20 +Merge: 3112a6c... 02daa6b... +Author: Ian Romanick +Date: Mon Jul 31 10:26:06 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 3112a6c4f26d5e9258b8def7ce4109b4bd408c67 +Author: Ian Romanick +Date: Mon Jul 31 10:25:31 2006 -0700 + + Noting uses libdummy.a, so don't build it. Only libdummy-nonserver.a + is actually used. + +commit 02daa6bb103e53e5a33db2bb6acbe57d0bf2c30e +Author: Matthew Allum +Date: Mon Jul 31 17:32:05 2006 +0100 + + Improve XRes to; + - Better estimate general pixmap memory usage. + - Account for pixmaps shared between clients. + - Account for window background and border pixmaps, + and GC stripple and tile pixmaps. + +commit 24051ef97406f28c102cf46a78223400b61fdae2 +Author: Daniel Stone +Date: Sun Jul 30 12:15:33 2006 +0300 + + remove filename that's too long for tar + +commit ecb7d43a76d507d04891ab7f189b23be5eccda51 +Author: Daniel Stone +Date: Sun Jul 30 11:52:41 2006 +0300 + + add sym.h to sources + +commit bf2d7499c84c94f228d03b21448f5688b3cda1a8 +Author: Daniel Stone +Date: Sun Jul 30 11:17:02 2006 +0300 + + add securitysrv.h + +commit e87e68634d8eb66ab783e2802e2d5d12ff1031be +Author: Daniel Stone +Date: Sun Jul 30 11:11:59 2006 +0300 + + remove .cvsignores from EXTRA_DIST + +commit ed0c807de9f07468385fcbd2e8a9c0737759a461 +Author: Daniel Stone +Date: Sun Jul 30 11:08:54 2006 +0300 + + bump to 1.1.99.3 + +commit a68dc013a33d867e65a7e76b3eec5947b862a5b4 +Author: Daniel Stone +Date: Sun Jul 30 11:08:47 2006 +0300 + + remove README (which doesn't exist) from EXTRA_DIST + +commit 87fe85f38b6f781bf0e2eb555526e3d77779f9fa +Merge: 3518e2d... 654619d... +Author: Daniel Stone +Date: Sun Jul 30 10:51:34 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 654619d76c779606f2315782fc01d1410399fa3b +Author: Kevin E Martin +Date: Fri Jul 28 17:16:32 2006 -0400 + + Revert xkb changes that broke XkbGetKeyboard() + +commit 79016d4036786b091a9b9d1133a6cdfedd6c277d +Author: Luc Verhaegen +Date: Fri Jul 28 16:02:02 2006 -0400 + + Bug #5386 (partial): Move CVT mode generator from cvt(1) to server core, and + export it from the X server to modules. + +commit e6ae1612be519ee6224d354244d076d85d44a750 +Author: Aaron Plattner +Date: Thu Jul 27 18:24:59 2006 -0700 + + Add fbHasVisualTypes and fbSetVisualTypesAndMasks to wfbrename.h and include -DXFree86Server. + +commit 2a4ceb09ed5a09dc5763754ab865ec23df91ac9f +Author: Adam Jackson +Date: Wed Jul 26 19:39:17 2006 -0400 + + Remove dead function prototypes. + +commit 990a4009057e068f41d20b95aa0c59357185650d +Author: Adam Jackson +Date: Wed Jul 26 19:03:39 2006 -0400 + + Remove getconfig horrorshow. Replace with a static built-in rule list for now. + +commit 377a581ddf5e428a368efb1b59fcb317666fecdd +Author: Aaron Plattner +Date: Tue Jul 25 15:27:31 2006 -0700 + + Switch to using void* pointers. + + Pass the size of the data pointed to by src or dst as an argument to + wfb{Read,Write}Memory. This allows one set of macros to be used with any size + pointer. Assumes that sizeof(FbBits) >= sizeof(FbStip). + +commit a4005c15fbb48231cb958c32b2c791a2d23a135a +Author: Aaron Plattner +Date: Mon Jul 10 18:58:09 2006 -0700 + + Add framebuffer access wrapper infrastructure. + + Create fbPrepareAccess macros to call into the driver to set up the + wfbReadMemory and wfbWriteWemory pointers. Call these from fbGetDrawable and + fbGetStipDrawable. + + Add the READ and WRITE macros, which expand to simple memory accesses for fb, + and calls through the function pointers for wfb. + + Add fbFinishAccess macro to give the driver an opportunity to clean up. Add + calls to this in the appropriate places. + +commit 319efac445cebda5a2ac1db67efebe54bc47ba9d +Author: Aaron Plattner +Date: Fri Jul 7 18:45:30 2006 -0700 + + Prefix all of the exported symbols in libwfb.so with "wfb". + + For now, just #define all of the exported symbols in wfbrename.h. Later, + we should add FBPREFIX() around the exported symbols and use -fvisiblity=hidden + to hide the rest. + +commit 7608a63ff7409f399c9a26962a304b84196a1868 +Author: Aaron Plattner +Date: Thu Jul 6 17:05:21 2006 -0700 + + Build infrastructure for libwfb.so. + + Builds fb/* twice, defining FB_ACCESS_WRAPPER for libwfb.la. Define a macro, + FBPREFIX(X) which expands to fbX for libfb.la and wfbX for libwfb.la. Use the + macro on [w]fbModuleData so the new module loads. + +commit 39158e98acb29e97a2682d4a37385f9141b484c4 +Author: Adam Jackson +Date: Wed Jul 26 18:39:28 2006 -0400 + + Remove another latent PowerMAX hunk. + + All your favorite running jokes of 2005, today! + +commit 3518e2d0debc97e2bacdefe604b280e7fdfdd216 +Merge: eb7733a... 3821f6a... +Author: Daniel Stone +Date: Wed Jul 26 11:29:21 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit eb7733a48a92405660d5d2ab60913b62c30daaed +Author: Daniel Stone +Date: Wed Jul 26 11:28:45 2006 +0300 + + kdrive: drop excessive NewInputDeviceRequest debugging + +commit 3821f6aeaa714582ee0a631de96c6e7cfd96303e +Author: Kristian Høgsberg +Date: Wed Jul 26 01:56:02 2006 -0400 + + Unlibc-wrap DMX glxscreens.c and fix tag-removal typo. + +commit 4ea475924c557ad0819b796f5369e5e669465709 +Author: Daniel Stone +Date: Tue Jul 25 20:00:48 2006 +0300 + + re-add OpenedHand copyright + Ae-add OpenedHand copyright, accidentally dropped in KDrive new world + order patch. Sorry guys. + +commit ca3f4fc1b0c21a0620ab1eb35c199cd55d795095 +Author: Daniel Stone +Date: Sun Jul 23 19:02:12 2006 -0400 + + add fallback ChangeDeviceControl, allow XOpenDevice on closed device + Add a fallback ChangeDeviceControl, which allows the attributes we know about + so far. + Allow XOpenDevice on closed devices. + +commit e73e5e2a4d8f22889d840a7719479f9af686cb9c +Merge: a73cef1... 8977b07... +Author: Daniel Stone +Date: Sat Jul 22 13:56:30 2006 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 8977b07434d75ca396d236dc1324f0c862b633c7 +Author: Dave Airlie +Date: Sun Jul 23 03:36:47 2006 +1000 + + glx: fix typo from tag removal + +commit a73cef1f005ca66db18e952e676ee5a21b829700 +Merge: 672ca15... 70869fc... +Author: Daniel Stone +Date: Sat Jul 22 12:07:22 2006 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 70869fc6777f87cd05794446caa739e3d9a91ffe +Author: Adam Jackson +Date: Fri Jul 21 23:39:37 2006 -0400 + + Yet more dead code. + +commit 7c1b2ee7a8238c267bc97e78bbff204dc7723dd3 +Author: Adam Jackson +Date: Fri Jul 21 23:35:13 2006 -0400 + + static markup, more dead code. + +commit 1c4f90b1d05d4c49279f3224a6dd94850a6bd8d0 +Author: Adam Jackson +Date: Fri Jul 21 23:03:21 2006 -0400 + + Open-coded path checks make baby Jesus cry. + +commit 114264584ca43091a5e07282566a30a6378a1502 +Author: Adam Jackson +Date: Fri Jul 21 22:55:41 2006 -0400 + + Remove a useless open() of the module we're about to load. + +commit 985611d5cd079f97da700c7b8e898d33da004be0 +Author: Adam Jackson +Date: Fri Jul 21 22:37:59 2006 -0400 + + Delete some long-unused testing code. + +commit 672ca156bfb11440e6e234650bfba9d38e1edb52 +Merge: d14d91f... 6cf844a... +Author: Daniel Stone +Date: Fri Jul 21 19:58:42 2006 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 6cf844ab69926b6d23619a12c97734af3881ba67 +Author: Daniel Stone +Date: Fri Jul 21 19:57:28 2006 -0400 + + loader: walk directory paths with readdir(), don't stat() everything + Walk the directories with readdir, and don't stat everything we can + find. Thanks to davej for the public humiliation reminding me to go back + and re-fix this one. + +commit d14d91f094c3897c889f6aafb66d738820dae0aa +Author: Daniel Stone +Date: Fri Jul 21 19:57:28 2006 -0400 + + loader: walk directory paths with readdir(), don't stat() everything + Walk the directories with readdir, and don't stat everything we can + find. Thanks to davej for the public humiliation reminding me to go back + and re-fix this one. + +commit 87a6346bf7f086b5f98b2b2ecd52f27efe864e56 +Merge: b73fb2a... 0486d39... +Author: Daniel Stone +Date: Fri Jul 21 19:36:25 2006 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 0486d3966d2888ef86d36c19f31bdbc2a3e8c652 +Author: Daniel Stone +Date: Fri Jul 21 19:35:04 2006 -0400 + + fix kbproto dependency + Depend on kbproto >= 1.0.3, for unconditional definition of + XkbSA_XFree86Private. + +commit b73fb2ae35a82e0bdd48f01132e971fb84946ff1 +Merge: e7ac27a... aff404f... +Author: Daniel Stone +Date: Fri Jul 21 19:30:26 2006 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit e7ac27ad81efbea6128b3cec443ca98e228d14ad +Author: Daniel Stone +Date: Fri Jul 21 19:29:28 2006 -0400 + + revert accidental deletion of lnx_io.c; re-delete lnx_kbd.c + Thinko'd which file to remove after merging from master. + +commit 81913a12910e39d7ea6af8657c1c66cc6791cd65 +Author: Daniel Stone +Date: Fri Jul 21 19:10:26 2006 -0400 + + remove undead files from master + Remove dead files which worked their way back in when merging from master. + Ugh. + +commit 7465010d59ec435bd00b738f0cef766b352dc7eb +Merge: 1d31ed7... 0aaac95... +Author: Daniel Stone +Date: Fri Jul 21 19:05:41 2006 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 1d31ed778284082e1060bff63317c94581d9eb9b +Author: Daniel Stone +Date: Fri Jul 21 19:02:52 2006 -0400 + + xephyr: load keysyms at init, not enable + Load keysyms at init time, not enable, so we don't get the wrong map width. + +commit 63dfaa1d5ba556e09314ec914936e5471aab94b0 +Author: Adam Jackson +Date: Fri Jul 21 18:47:18 2006 -0400 + + Delete internal usage of the symbol ref/req lists. + +commit bca9364f3f4a2376edbcf57a34f704ce28be21ba +Author: Adam Jackson +Date: Fri Jul 21 18:41:46 2006 -0400 + + Remove the loader's required and referenced symbol lists, dead code. + +commit aff404f293ed86a44a093a51a9f11e79e6c3f4f6 +Author: Adam Jackson +Date: Fri Jul 21 18:24:37 2006 -0400 + + Detach xf4bpp from cfb. + +commit 0aaac95b0d12089b256c97f6ff955c8c229ae095 +Author: Adam Jackson +Date: Fri Jul 21 17:56:00 2006 -0400 + + Remove RCS tags. Fix Xprint makefile braindamage. + +commit eeaad0e956640aac653d194a992df7792e4abcbb +Author: Aaron Plattner +Date: Thu Jul 20 18:19:07 2006 -0700 + + Fix the RandR failure path for rotated screens. + +commit 22db3fdb54d2f7f6b72638b46c186af6db04e214 +Merge: 2f98841... 93cd538... +Author: Ian Romanick +Date: Fri Jul 21 13:55:37 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 3eeb62e8f587732e6b433c2b9c6879eb26a3f1b4 +Author: Kristian Høgsberg +Date: Fri Jul 21 16:33:28 2006 -0400 + + bug #890: completely remove deprecated keyboard driver + Remove all remnants of the old built-in keyboard driver. + +commit 60ea7b51fe2b8a19a08b63db48504971a7a50ee6 +Author: Daniel Stone +Date: Fri Jul 21 15:23:37 2006 -0400 + + xorg ddx: move to new input API, remove old keyboard driver + Remove most of the rest of the old keyboard driver. + Move to the new Get{Keyboard,Pointer}Events API, which is mostly + complete at this stage: just missing the proximity events. + +commit d32dc8bf19e1071fc30af2f0bc6a6699b351f39e +Author: Daniel Stone +Date: Thu Jul 20 18:40:47 2006 -0400 + + be more careful in IVAS + + Don't walk off the end of a NULL pointer in InitValuatorAxisStruct. + +commit 7711c56d2e2aeae4dcd6d9297bc144c1cb3cfab1 +Author: Daniel Stone +Date: Thu Jul 20 18:38:57 2006 -0400 + + xephyr: fix keymap, pointer; dix: fix multiple axes + + Initialise our axes properly in the DIX, and make sure we don't + unnecessarily clip maxval when it's not set. + Fix keymap copying in Xephyr (to some degree: it's still broken), + and set nAxes and nButtons properly. + +commit f18c3122a57df9770087e5fc70ac488552222233 +Author: Daniel Stone +Date: Thu Jul 20 16:49:17 2006 -0400 + + sanitise debug output + + Don't spit out huge chunks of pointless ephemera, especially without + --enable-debug. + +commit 463e0fe35bec3c91b19be9aacf34babb146a88c9 +Author: Daniel Stone +Date: Thu Jul 20 16:45:15 2006 -0400 + + update KDrive to new input API + + Update KDrive to fit the new API (mieqInit and InitPointerDeviceStruct), and + include InitTouchscreenDeviceStruct in the DIX. + +commit 1987af8c498a1bf394a8951ca6d5b0b7f7a35188 +Author: Daniel Stone +Date: Thu Jul 20 16:39:54 2006 -0400 + + add virtual core devices to DIX + + Add virtual core devices, with proper keymaps etc, to the DIX. + +commit 737e6e4836a6af26fedc22cda8e7d366b52c8fa7 +Author: Kristian Høgsberg +Date: Wed Jul 19 20:10:48 2006 -0400 + + define SDevicePresenceNotifyEvent prototype + +commit 7f36cc533e7f6ae44e973c5f00f9bfec7c6b7b50 +Author: Daniel Stone +Date: Wed Jul 19 20:09:13 2006 -0400 + + distribute config.h + +commit e896195eab726a2b307200958308eda8c93dd3cd +Author: Daniel Stone +Date: Wed Jul 19 20:05:33 2006 -0400 + + remove extraneous font debugging code + + Some of it didn't compile, and some of it was just unnecessary. + +commit 99c57674c002c5e88c6db34488a27b05004c9197 +Author: Daniel Stone +Date: Wed Jul 19 19:59:11 2006 -0400 + + avoid using font servers with built-in fonts + +commit ecfad74c48f633916305bcc25baaaad74aa52b78 +Author: Daniel Stone +Date: Wed Jul 19 19:55:13 2006 -0400 + + add support for built-in fonts + + Use --enable-builtin-fonts to only use built-in fonts, and avoid loading + fonts. + +commit 0a2068d123520d35818c38a555ae3ba06d8ca7fb +Author: Daniel Stone +Date: Wed Jul 19 17:29:23 2006 -0400 + + Xi: add XExtension{Keyboard,Pointer} types + + Report XExtensionKeyboard for non-core keyboards, and XExtensionPointer for + non-core pointers/mice. + +commit c7577f9b88aac84d59404f29d994ee7af583d33b +Author: Kristian Høgsberg +Date: Wed Jul 19 17:27:58 2006 -0400 + + Xi: add DevicePresenceNotify + + Add support for DevicePresenceNotify events. + +commit 3a23e499017d5823157806029263edac53c663fd +Author: Daniel Stone +Date: Wed Jul 19 17:00:23 2006 -0400 + + make XInput mandatory + + Always build Xi, since GetPointerEvents/GetKeyboardEvents relies on it. + +commit 02d09105113fb9b560a770fe15f7bb041165831c +Author: Daniel Stone +Date: Wed Jul 19 16:51:04 2006 -0400 + + new KDrive input world order + + Convert KDrive to GPE/GKE interface. + Add first-class drivers and enumerate every device separately through + Xi, instead of lamely attempting to aggregate them. + Add XKB support to the Linux keyboard driver. + Add 'thumb button' support to the tslib driver. + Rejig InitInput, so each DDX has to add a list of drivers it supports. + Support NewInputDeviceRequest, et al. + +commit a274e7296b1bdd6f6c921f28b087610cec9548e0 +Author: Daniel Stone +Date: Wed Jul 19 13:56:23 2006 -0400 + + add GetPointerEvents/GetKeyboardEvents framework + + Add GetPointerEvents (with XFree86 pointer acceleration) and GetKeyboardEvents + to the DIX. Extend the ValuatorClass structure to account for same. + +commit b308dbf273f8c26361b0fee7aca64aec3245f60b +Author: Daniel Stone +Date: Wed Jul 19 12:15:18 2006 -0400 + + add DEVICE_TOUCHSCREEN and DEVICE_CORE Xi controls (DeviceIntRec ABI break) + + Add DEVICE_TOUCHSCREEN and DEVICE_CORE controls to the Xi code, and the + TouchscreenClassRec and a coreEvents flag, to toggle propagation of core + events. + +commit c9a3d9baa81ceb940032ffe529d9eadf2d202ab2 +Author: Daniel Stone +Date: Wed Jul 19 11:41:16 2006 -0400 + + xorg DDX: implement NewInputDeviceRequest + + Implement NewInputDeviceRequest for Xorg, mainly written by Kristian Høgsberg. + Move MatchInput to xf86Helper.c, as xf86LookupInputDriver. + +commit 02a95311568e24e1055ea52c7df8cb7aa3f38ad0 +Author: Daniel Stone +Date: Wed Jul 19 10:05:12 2006 -0400 + + add basic D-BUS configuration mechanism + + Also move LookupDeviceIntRec into the DIX, and add InputOption type, and + NewInputDeviceRequest prototype (DIX requests DDX to add a device). Does not + link without an implemented NIDR. + +commit 93cd53860c3aca182a0a02543c41b5d71d65926b +Author: Daniel Stone +Date: Thu Jul 20 16:52:31 2006 -0400 + + kdrive: allow debugging + +commit cd0874dda1c30ef91a7d2b3cd455676422599ccf +Author: Daniel Stone +Date: Wed Jul 19 20:13:02 2006 -0400 + + never define MEMBUG + + Definining MEMBUG causes allocations to randomly fail. + +commit 093943d4d02f1dbc8935b8cf835866a6e3885193 +Author: Daniel Stone +Date: Wed Jul 19 20:09:55 2006 -0400 + + define DEBUG in DIX + + Which makes #ifdef DEBUG actually useful. Incredible. + +commit 68b0678254240a984db9adefefb0cf68e9bfd4e4 +Author: Daniel Stone +Date: Wed Jul 19 20:08:32 2006 -0400 + + exa: only disable cw when COMPOSITE is built + +commit 27df2eda795681c9f05e2907d74e2c102d3441e4 +Author: Daniel Stone +Date: Wed Jul 19 16:18:28 2006 -0400 + + fix KdXvCopyPackedData to actually work + + Remove extraneous bit shift in KdXvCopyPackedData, so it's actually + useful. + +commit 00b24f119f03da86fa98ffea545c5b041810ce53 +Author: Daniel Stone +Date: Wed Jul 19 17:01:20 2006 -0400 + + fix minor typo + +commit f8a7a1e40c14a85ebde11c5854c07a8d529d38b9 +Author: Daniel Stone +Date: Wed Jul 19 17:06:00 2006 -0400 + + fix XEvIE build without XKB + + Don't unconditionally play with XKB stuff in XEvIE. + +commit 2f98841fde6bad807967ed15e954291240714198 +Author: Ian Romanick +Date: Thu Jul 20 16:08:27 2006 -0700 + + Remove unused variable. + +commit 985c34bf06af70a7296db8307899a17347a25558 +Author: Adam Jackson +Date: Thu Jul 20 17:33:13 2006 -0400 + + Remove the DDXTIME conditional, for being unused. + +commit c69c00d6523a35232a32e54a533811fc2b37815a +Merge: 4636935... 84683f1... +Author: Ian Romanick +Date: Thu Jul 20 12:08:38 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 84683f19b4d1c712281036bcabf8dc623e64b26a +Author: Daniel Stone +Date: Tue Jul 18 18:16:12 2006 -0400 + + get rid of XFree86LOADER, XFree86Server, XFree86Module, and IN_MODULE + Get rid of almost all uses of these definitions. They're still defined for + delinquent out-of-tree drivers, and also for the Mesa build. As well as + for miinitext.c. But largely gone. + +commit 881953813c7307f2aac4057b48d233e5f4a574cd +Author: Adam Jackson +Date: Mon Jul 17 13:50:38 2006 -0400 + + Fix the Linux ACPI reopen code to use a repeating timer, rather than a + one-shot sleep-and-reopen attempt. + +commit f029e9a32dcaa95b84e08ec173a0cc78fd92bdbf +Author: Kristian Høgsberg +Date: Sat Jul 15 22:05:38 2006 -0400 + + Un-glx-libcwrap DMX GLX proxy so it works without GL/include. + +commit 46369350d40819ecc2a9f37ed4aaa95866b80997 +Author: Ian Romanick +Date: Fri Jul 14 15:51:55 2006 -0700 + + Add some const qualifiers to serveral function parameters. + +commit 490fb304599b1f24b36439e5c1397781e7d2f612 +Author: Ian Romanick +Date: Fri Jul 14 15:26:56 2006 -0700 + + Rearrange code in xf86int10ParseBiosLocation to use strncasecmp. This + eliminates the need for the first use of xstrdup in this function. + The second use of xstrdup was *never* necessary and has also been + eliminated. + +commit d3ee49bcbafe4b4e6b308686020847e978473779 +Author: Ian Romanick +Date: Fri Jul 14 15:13:35 2006 -0700 + + Refactor common code from the generic.c and linux.c version of + xf86ExtendedInitInt10 to xf86int10GetBiosLocationType and + xf86int10GetBiosSegment. + + These changes were tested on MGA hardware on x86-64 with various + combinations of InitPrimary and BiosLocation. + +commit 8793c7fd4ba7d1b3e2eff3f2c18d042ee9bb3f62 +Author: Ian Romanick +Date: Fri Jul 14 09:11:39 2006 -0700 + + Refactor identical xf86InitInt10 function from generic.c and linux.c + to helper_exec.c. + +commit 1450fd596433f7adfe3d0798dc2ddceb9d0a9034 +Author: Ian Romanick +Date: Fri Jul 14 09:10:32 2006 -0700 + + Trivial refactor of libint10_la_SOURCES. + +commit 4c225a3a8b2e7e5e5510347d8473f1318bbac769 +Author: James Steven Supancic III +Date: Thu Jul 13 10:03:57 2006 -0400 + + Bug #7482: Fix Xdmx's Render code to match reality; fixes BadLength client + crashes. + +commit bb3aa94845a74d7718ba9539bb76203ec82957fc +Author: Drew Parsons +Date: Tue Jul 11 18:26:55 2006 -0700 + + Bug #7346: Disable Composite extension in Xprt + + Xorg Bug #7346 + Patch #6184 + +commit 10f3e32726d5b4981abd1a3a022e5b4f219fb41e +Author: Gustavo Pichorim Boiko +Date: Mon Jul 10 16:37:53 2006 -0700 + + Fix the configure check for the --{enable,disable}-dpms option + +commit 2194d99d9ca3c607e0f5ddd911ee3df536d77564 +Author: Matthieu Herrb +Date: Sun Jul 9 16:16:08 2006 +0200 + + Replace GNU make-ism. + +commit 90a9b82272446fdaebe71c966325fd7e670f75c6 +Author: Matthew Allum +Date: Sat Jul 8 21:57:07 2006 +0100 + + Fix crash in Xephyr when running on host X with keymap width < 4 ( i.e xvnc ) + +commit 21e3e3ca298dce22e5fad6ef38aa6fe9736a1d3b +Merge: e805621... 39b2f7b... +Author: Matthew Allum +Date: Sat Jul 8 21:13:52 2006 +0100 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit e8056218944e873135c93039d1e9646d51364467 +Author: Matthew Allum +Date: Sat Jul 8 21:10:58 2006 +0100 + + Add support to Xephyr for simulating 8bit grayscale. + +commit 39b2f7b2182aedb1ab45415efb4c263012ace512 +Author: Tilman Sauerbeck +Date: Sat Jul 8 19:55:53 2006 +0200 + + Bug #3042: Use autoconf to get the correct name of a struct member. + + This allows us to remove the kernel version ifdefs from the code, which + are ugly and broken. + +commit 63f13e01ee6e7df1753f2113f4cff9538596be0a +Author: Tilman Sauerbeck +Date: Sat Jul 8 11:33:44 2006 +0200 + + Bug #7097: do case-insensitive comparison for some hotkeys. + + xkb's strcasecmp implementation has been moved to the dix so it's now + safe to just use strcasecmp(). + +commit 5416f90e9c939027005fc01fa3ce3df56919ae0d +Author: Kristian Høgsberg +Date: Thu Jul 6 21:22:34 2006 -0400 + + Implement GLX_MESA_copy_sub_buffer. + +commit b84374b2917a91a7732e780ffab6a29c807a3ecc +Author: Kristian Høgsberg +Date: Thu Jul 6 02:28:55 2006 -0400 + + Add GLX_MESA_copy_sub_buffer marshalling support. + +commit 2152e2d364bdd179cf218cde446c763d8c8bb833 +Author: Ed Catmur +Date: Thu Jul 6 17:45:36 2006 -0700 + + Remove hardcoded 'lib' in XPRINTDIR. + +commit 233c004641483a75985e09fea5416ab2c7a97fc4 +Author: Ed Catmur +Date: Thu Jul 6 17:41:53 2006 -0700 + + Generate xprint.pre from xprint.cpp. + +commit b3e4d1d1f4bcf900146d7b8cd19e008209294663 +Author: Adam Jackson +Date: Thu Jul 6 18:51:29 2006 -0400 + + PPC64 build fix. + +commit f847f3c0a956c0aec8ade8e32f770daae147f40b +Author: Keith Packard +Date: Thu Jul 6 15:33:31 2006 -0700 + + xorgcfg now needs libxkbui version 1.0.2 or better. + + Old versions of libxkbui use XkbStrCaseCmp which doesn't exist any longer; + the server fails to link with that version of the libkbui library, so + require the current version (1.0.2). + +commit 27ffd7e03c05dd2083a10e5acebd2b385d729eeb +Author: Keith Packard +Date: Thu Jul 6 14:43:10 2006 -0700 + + GL proto version 1.4.7 needed for texture-from-pixmap defines. + + GLX_TEXTURE_TARGET_EXT and GLX_TEXTURE_RECTANGLE_EXT are defined as a part + of the new texture from pixmap GL extension in gl proto version 1.4.7 and + are now used by the X server code. + +commit d7a96dd6f18e54c26fc5881772d033ac078db3a1 +Author: Adam Jackson +Date: Thu Jul 6 17:39:14 2006 -0400 + + Switch the default mouse device on Linux to /dev/input/mice. + +commit 8d07ee070ecf0d403d9d27c80764d343b80af6f0 +Author: Ian Romanick +Date: Thu Jul 6 12:48:51 2006 -0700 + + Refactor linuxGetIOSize and linuxGetSizes. Eliminate the unnecessary + optimization in the search loop. + +commit 704e645207d88a2d0a372cf69f6abd778ed4c30b +Author: Adam Jackson +Date: Thu Jul 6 14:22:33 2006 -0400 + + Remind dlloader that it needs to search the global scope as well as the + loaded modules. Fixes LoaderSymbol() on symbols provided by the server. + Spotted by Aaron Plattner. + +commit 28b95fd9d1c2f078aaaac75c310a27b17c74a6fc +Author: Kristian Høgsberg +Date: Thu Jul 6 03:25:38 2006 -0400 + + Drop unused GL/include subtree. + + Woo, less Makefile's to generate. + +commit fc1a55671dceae0e2a701e044ff8203fae5eb1ba +Author: Kristian Høgsberg +Date: Thu Jun 29 04:35:45 2006 -0400 + + Implement glXCreateWindow and glXDestroyWindow. + +commit ee012588d28b468bd41da8d216210f8cb2bf8cb5 +Author: Kristian Høgsberg +Date: Thu Jun 29 04:25:54 2006 -0400 + + Move __GLXdrawable lookup and creation into GetDrawableOrPixmap. + + Also refactors __glXSwapBuffers to use GetDrawableOrPixmap for + getting the __GLXdrawable. This patch paves the way for GLXWindows + with XIDs different from the X Windows they are created for, a + prerequisite for glXCreateWindow(). + +commit 8b5bc6a9ab487fdea754266b120c686d75d9e100 +Author: Kristian Høgsberg +Date: Thu Jun 29 00:05:01 2006 -0400 + + Drop global GLX error integer variables and use __glXError() instead. + + Also drop glxerror.h (__glXError is now declared in glxserver.h) + and global.c (last remaining globals are in glxext.c now). + + With this change we now support all GLX 1.3 error codes. + +commit 7cf3ec7b59223f15314a0629f122ecb796678421 +Author: Kristian Høgsberg +Date: Wed Jun 28 17:00:23 2006 -0400 + + Move createDrawable from __GLXcontext to __GLXscreen. + +commit eea8efe4516750b2505b52ebc9f769f5e8a6f94c +Author: Kristian Høgsberg +Date: Wed Jun 28 15:59:01 2006 -0400 + + Add marshalling for GLX 1.3 requests. + + Also, hook up glXGetDrawableAttributes and glXQueryContext to existing + DoGetDrawableAttributes and __glXQueryContextInfoEXT. + +commit eb35f812a5b65adcc5f6cbb91b31b69cae5d7f3d +Author: Greg Kroah-Hartman +Date: Wed Jul 5 13:27:26 2006 -0700 + + add another file to .gitignore + +commit 863f5cc31b747bc9f2fcd6a9e20c613a11733bf4 +Author: Greg Kroah-Hartman +Date: Wed Jul 5 13:26:34 2006 -0700 + + fix compiler warning in hw/xfree86/common/xf86Config.c + +commit f059b61ab3af25b03c704669eddb838d3ce4366c +Author: Greg Kroah-Hartman +Date: Wed Jul 5 11:47:25 2006 -0700 + + fix compiler warning about xnestRecolorCursor() not being defined + +commit cc3e99f747586f9d32622e5a682de39891b1fcba +Author: Greg Kroah-Hartman +Date: Wed Jul 5 10:13:19 2006 -0700 + + fix some more compiler warnings due to defines being declared differently + +commit 59836c0f2abee3339e1aa30dacadb82e477943d6 +Author: Greg Kroah-Hartman +Date: Wed Jul 5 09:30:48 2006 -0700 + + fix wrong function pointer type in hw/dmx/dmxcmap.c + +commit 12563db59dd613ecc926e3bed9534152ebc0a2fb +Author: Eric Anholt +Date: Mon Jul 3 12:52:27 2006 -0700 + + Revert "Optimize out computing a gradient pixel if the mask value is 0." + + This reverts cf46242e337481cd3b9b39d77dd621d2a63b11f9 commit. It wasn't meant + to be pushed to master yet, and doesn't work. + +commit 002e28c12c74aa63777f65cbfb382c2bfd0d6850 +Author: Eric Anholt +Date: Mon Jul 3 12:48:12 2006 -0700 + + Correct AGP memory deallocation argument on *BSD. + + This fixes leaks and eventual crashes with RandR resizing on Intel. + +commit cf46242e337481cd3b9b39d77dd621d2a63b11f9 +Author: Eric Anholt +Date: Wed Jun 28 18:35:59 2006 +0200 + + Optimize out computing a gradient pixel if the mask value is 0. + + Obtained from: kdrive CVS (DavidR XGL fb/ megapatch) + +commit a838fb70c52a829872680f6a2a2e7dd6d2dc9247 +Author: Eric Anholt +Date: Mon Jul 3 19:22:36 2006 +0200 + + Bump server version to 7.1.99.2 for gradient and repeat fixes. + +commit 25d871d98462f0481ee419295ddc94b8c79dc881 +Author: Eric Anholt +Date: Mon Jul 3 19:22:26 2006 +0200 + + Fix source picture filter check for multiple screens. + + Now, we only check for filter commonality if we're operating on a source + picture, and we compare the id (screen-independent index of the filter name) + rather than the pointer to the filter (per-screen state). + +commit 7106a77df37c06d2b5568eceeb9297096bff3137 +Author: Eric Anholt +Date: Sun Jul 2 12:41:35 2006 +0200 + + Fix bugs in support for new repeatTypes in XAA and EXA. + + EXA now won't pass pictures with new repeatTypes to drivers. We can add a flag + for them to support it at a later time. + +commit f5e92542a14f51029347b6476e4e4af69144930b +Author: Eric Anholt +Date: Fri Jun 30 12:03:47 2006 +0200 + + Bug #7366: Fix crashes when setting filters on source pictures. + + Now, filters may only be set on source pictures when the filter is common to + all screens. Also, like SetPictureTransform, ChangePictureFilter is now not + called on source pictures. + +commit 6ef457913955d4289081c7d07d528963ccf5272c +Author: Eric Anholt +Date: Fri Jun 30 03:01:14 2006 +0200 + + Bug #7366: Fix two crashes in operations on source pictures. + + A screen's ChangePictureTransform now isn't called when changing the transform, + as source pictures aren't associated with screens. Also, attempting to set + an AlphaMap to a source picture will fail with BadMatch just like a Window + would, preventing another crash. + +commit 50a3e1ad18c815a5adafee22beccdf970bae62d6 +Author: Rudo Thomas +Date: Sat Jul 1 12:34:36 2006 -0700 + + Missing close parenthesis in one of the setuid() fixes. + +commit 124a81eb389dfa510ac07ca93ee17c4c9d6e56ea +Merge: d3d6c5f... 179737d... +Author: Keith Packard +Date: Sat Jul 1 11:12:50 2006 -0700 + + Merge branch 'origin' + +commit d3d6c5f4d05e0ca5b566e19657e0fe2b3898482a +Author: Paul Mackerras +Date: Sat Jul 1 11:10:18 2006 -0700 + + Bug #7381: Coordinates get wrapped in accelerated line drawing on pixmap + + XAAPolylinesWideSolid was adding the drawable origin onto each element in the + pPts array. Since the values got stored back into the pPts array, they got + truncated to 16 bits, causing the overflow I saw. This patch avoids storing + the coords back into the pPts array (and actually reduces the size of the + code too :). Now the 32-bit sum of coords + origin doesn't get truncated to + 16 bits, and the problem is solved. + +commit 179737d4a07ed10a734fe017b5680f8e78ffda96 +Author: Jens Granseuer +Date: Wed Jun 7 01:46:00 2006 -0700 + + Bug 7145: fix build with gcc 2.95 & other c89 compilers + + Move variable declarations to start of blocks as required by c89 + +commit 6bd4c254396cb0f4e8ae21ff455ebb15cd9f4f10 +Author: Martin Bochnig +Date: Mon Jun 26 01:52:24 2006 +0200 + + Updated Solaris aperture driver to build on sun4v & amd64 kernels + Updated for Solaris 10 changes to DDI + +commit 54d9acd5113318274e291abab4554b8e678227df +Author: Kristian Høgsberg +Date: Tue Jun 27 19:44:52 2006 -0400 + + Add damage tracking to GLX_EXT_tfp implementation. + + - Only update when pixmap content actually change; + - Only update the regions that acutally changed. + + This is a worthwhile optimization, but it doesn't completely remove + the bottleneck, as mesa still uploads then entire texture whenever + it changes. + +commit adfe8e7437ff739f54d1d074008e8cc0e3bcb4d3 +Author: Eric Anholt +Date: Tue Jun 27 21:49:00 2006 +0200 + + Bump server release to 7.1.99.1. + + This will be important for a couple of cairo workaround tests. + +commit 63c169e3b1f7d6a7375a414fcd50cce32358a525 +Author: Eric Anholt +Date: Tue Jun 27 04:11:47 2006 +0200 + + Fix MMX Saturate implementation. + + The code was expanding the source blend factor from the wrong channel. Fixes + cairo's clip-operator test. + +commit ff6b59a0dbadbe61a53e48c23965d3073d95791b +Merge: b3c8693... 48c8715... +Author: Alan Coopersmith +Date: Mon Jun 26 13:02:33 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit b3c869304cd85af034aa9debaa874e29d14fcbe6 +Author: Peter Breitenlohner +Date: Mon Jun 26 10:48:44 2006 -0700 + + Free small, one-time memory leak in xdmcp -from handling + + Part of Patch #6046 + +commit 48c871564d493203d434d5da015903399287f619 +Author: Eric Anholt +Date: Mon Jun 26 15:57:32 2006 +0200 + + Move EXA_PM_IS_SOLID() to the public API, since drivers will want it frequently. + +commit afb84c2fca56887b3bfe7aa93f337c49b087acdc +Author: George Fufutos +Date: Sat Jun 24 15:23:14 2006 +0200 + + Bug #6911: Check return value of exaGetPixelFromRGBA(). + +commit 930b9a069a425818d4e9965f53be7df1f4d7d422 +Author: Michel Dänzer +Date: Sat Jun 24 15:21:17 2006 +0200 + + Bug #6818: Avoid infinite loop in exaLog2() with negative arguments. + +commit 36756fdb2ddc154b406f664a6af0f38d26e6973d +Author: Michel Dänzer +Date: Sat Jun 24 15:09:24 2006 +0200 + + Make sure is actually included when needed. + + configure only defines HAVE_BACKTRACE, not HAVE_EXECINFO_H. + + This could cause problems on platforms where the size of a pointer is greater + than that of an integer, see + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=363218 . + +commit 4426215a6e99f84550aaac23ac9c2018668bfbc1 +Author: Michel Dänzer +Date: Sat Jun 24 15:02:56 2006 +0200 + + Bug #7213: Fix the XFree86-DRI extension for byte-swapped clients. + + These clients are by definition non-local and thus not direct rendering + capable, but they still need the QueryVersion and QueryDirectRenderingCapable + requests to find out cleanly. + +commit a195a3debca02572d9f7d7a9976b5bf67acc5d08 +Author: Michel Dänzer +Date: Sat Jun 24 14:54:52 2006 +0200 + + Fix byte swapping in some GLX requests. + +commit bc6cfde19887eff7a07dc739ffa29609fb55b83d +Author: Eric Anholt +Date: Fri Jun 23 20:07:34 2006 -0700 + + Use correct OSNAME setting so we can find os-specific modules like libdrm. + +commit c7ac485a59709572307b9a4a9abacc52c7021b65 +Author: Eric Anholt +Date: Wed Jun 21 09:34:55 2006 -0700 + + Remove the default case from fbcompose.c switches which should cover all cases. + + Instead, stick the NULL return default case afterwards, so that the compiler can + warn us when we've got unimplemented cases. Removes some unimplemented and + unused 8bpp, depth 4 picture format names. + +commit 2cf1f39ca974c81a2f52d2f7509aa3d098a87176 +Author: Eric Anholt +Date: Wed Jun 21 09:30:59 2006 -0700 + + Add a manpage for EXA. + +commit d67fd106968e371d8be3966ed5ecdd3c69f36e3a +Author: Adam Jackson +Date: Thu Jun 22 12:47:51 2006 -0400 + + Add kdrive servers to .gitignore + +commit bf17c6dede1c0cf1edee10f2cc7e1e619b944d3a +Author: Adam Jackson +Date: Thu Jun 22 12:24:09 2006 -0400 + + Drop libz from the server's link line, it was only needed for LBX. + +commit c0cb8d1fb80540e093da54da3ee2f55bdf139274 +Author: Alan Coopersmith +Date: Wed Jun 21 18:12:41 2006 -0700 + + Use XACE, not XCSECURITY to decide if SecurityLookup* are exported + +commit 3177dc498a955cd58cd6054a7c7e69724db4a59b +Merge: 3f19803... 91dcac5... +Author: Alan Coopersmith +Date: Wed Jun 21 18:06:06 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 3f19803e0b1adc66e695f63f915b8dc85eb84215 +Author: Alan Coopersmith +Date: Wed Jun 21 18:05:51 2006 -0700 + + APPGROUP requires both X-ACE & XC-SECURITY now + +commit 91dcac5295486cc55a34ad91704bfa483bd31eeb +Merge: d8135eb... 77c947b... +Author: Adam Jackson +Date: Wed Jun 21 20:49:30 2006 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit d8135eb9e414bf6957f64c5102ee0ef7c2404c6f +Author: Adam Jackson +Date: Wed Jun 21 20:49:21 2006 -0400 + + Unbreak unbreaking the loader. Re-add the symbol reference lists so that the + linker will include everything it's supposed to. This is a terrible solution, + but ld semantics don't let you do anything better. + +commit f83cee0338eca095ad601374a87775be823a2565 +Author: Eamon Walsh +Date: Wed May 5 20:07:37 2004 +0000 + + Modify XC-SECURITY and XC-APPGROUP extensions to work with XACE + +commit 15c9002d68a7eeb02a6db1f231af7a18a3cf7512 +Author: Alan Coopersmith +Date: Wed Jun 21 16:24:20 2006 -0700 + + Correct ifdef - should be XACE, not XSECURITY + +commit 90af38fa0c46c2081d2becac262a614c26ba6ef1 +Merge: 3e098ef... 77c947b... +Author: Alan Coopersmith +Date: Wed Jun 21 16:23:31 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + + Conflicts: + + Xext/appgroup.c + +commit 3e098efa35ba70ad4d5699af3130a3b02e1cb06e +Author: Alan Coopersmith +Date: Wed Jun 21 16:21:03 2006 -0700 + + Correct ifdef - should be XACE, not XCSECURITY + +commit 77c947b900faf34f425eef1549d8210c475e093b +Author: Alan Coopersmith +Date: Wed Jun 21 16:18:41 2006 -0700 + + Move Xserver internal API for appgroup from Xagsrv.h to appgroup.h + + (Since all use is inside the xserver module, might as well keep the header + in the Xserver module instead of in proto/XExt to allow easier synchronization + of updates.) + +commit 40aafaf154ba8a2cba857689d1481be2d4a610c2 +Author: Greg Kroah-Hartman +Date: Wed Jun 21 14:36:09 2006 -0700 + + fix a number of compiler warnings in os/* + +commit 77aa701e898c6525322cc4029d95167dd9f6e618 +Author: Greg Kroah-Hartman +Date: Wed Jun 21 14:16:48 2006 -0700 + + add some function prototypes to hw/xprint/DiPrint.h as they are exported + +commit 865884d050e1778180f7677e15f9ee1625ea4bb2 +Author: Greg Kroah-Hartman +Date: Wed Jun 21 14:16:28 2006 -0700 + + fix compiler warning in dix/xpstubs.c when XPRINT is not defined + +commit ed18d776f02e2ab235954501ef64936af9f9d909 +Author: Kristian Høgsberg +Date: Wed Jun 21 16:22:14 2006 -0400 + + Fix #2488 for fb too: sample pixel center when transforming. + +commit ea5e0eabd1303a55d8fc10f44d21a3d371ce8919 +Author: Matthias Hopf +Date: Wed Jun 21 17:08:51 2006 +0200 + + Bug 4320: Fastpath corner case improvement for Composite. + +commit 9af315a9be19b48faa1249e0575cbe3d1e31dec5 +Author: Eamon Walsh +Date: Wed May 5 20:07:37 2004 +0000 + + Modify XC-SECURITY and XC-APPGROUP extensions to work with XACE + +commit f68ecfa482b2c2037f929710310c7b9ce6fe9291 +Author: Alan Coopersmith +Date: Tue Jun 20 19:01:34 2006 -0700 + + Add X-ACE to build system + + - Added --disable-xace to configure.ac and issue configure error if trying + to build XC-Security without X-ACE + - Added XACE #define to dix-config.h + - Added X-ACE sources to Xext/Makefile.am + +commit a46c06dab8392cf8012c7cc0b916de9a9e569671 +Merge: 49b368c... d44b2a0... +Author: Alan Coopersmith +Date: Tue Jun 20 18:40:18 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + + Conflicts: + + Xext/appgroup.c + Xext/security.c + dix/devices.c + dix/dispatch.c + dix/dixutils.c + dix/events.c + dix/extension.c + dix/property.c + dix/window.c + os/access.c + +commit d44b2a0a57fb89741173c31676af0ccc822387dc +Author: Alan Coopersmith +Date: Tue Jun 20 18:22:51 2006 -0700 + + Move Xserver API for security extension to securitysrv.h + +commit a54435946544a039fc333bb5e3438501d0d1ffc6 +Author: Alan Coopersmith +Date: Tue Jun 20 18:14:27 2006 -0700 + + Move Xserver API for security extension to securitysrv.h + +commit 49b368c0bb04816c4a3579071c596b2398cae3ec +Merge: 63f6e6b... 481d401... +Author: Alan Coopersmith +Date: Tue Jun 20 16:22:39 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 481d4012e74d9b0e98911f0ae02700ecf4cfc5ac +Author: Alan Coopersmith +Date: Tue Jun 20 16:16:19 2006 -0700 + + Don't add -ldl to XORG_LIBS if it's not needed for dlopen + +commit 63f6e6bbfd0d3677e29621af982c9392ead98dd7 +Merge: 88ede2c... 6df52fb... +Author: Alan Coopersmith +Date: Tue Jun 20 16:03:34 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 6df52fb7745c185c0168060f69cc6b4f5315914e +Author: Alan Coopersmith +Date: Tue Jun 20 16:02:55 2006 -0700 + + Delete code that's been inside #if 0 since X11R6.7. + +commit 88ede2cec79281a43cecb43ee6dec65770f82530 +Merge: 227a319... 2b58685... +Author: Alan Coopersmith +Date: Tue Jun 20 15:29:55 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 227a3193405147fbbee2971cc15bac92cc13285a +Author: Eamon Walsh +Date: Tue Jun 1 21:09:25 2004 +0000 + + Add XACE extension source files. + + (Copied from XACE-SELINUX branch in Xorg monolith CVS since these were never + imported to modular cvs or git trees.) + +commit 2b58685402e70f123e131fd8146e6083ff5214a4 +Author: Matthieu Herrb +Date: Tue Jun 20 21:07:53 2006 +0200 + + Check setuid() return value. Bugzilla #7116. + +commit 4365d16c8629e824973ee0c357efdfbfd28b672c +Author: Kristan Høgsberg +Date: Mon Jun 19 22:13:22 2006 -0400 + + Pull over convolution filter fixes from xgl-0-0-1 branch. + + Cherry-picking patches: + + 8a5ea68800b9d7dca90ff4e573ad8533852f1ea3 and + 4d755fe14274a7293748ce9aa666ab85df6297c5 + +commit f818e0ab60da3779ab2602c6e6d3ff261b50917e +Author: Eamon Walsh +Date: Wed May 5 20:07:37 2004 +0000 + + Modify XC-SECURITY and XC-APPGROUP extensions to work with XACE + (cherry picked from 0106715000196c7b349a0b4494b61545f0f5e138 commit) + +commit 0707eb33d6826e1300a905edea28c12134600b12 +Merge: 37f0ae0... 98d17bb... +Author: Alan Coopersmith +Date: Mon Jun 19 17:09:51 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 37f0ae02457bd22b27f8f30a373e5cb19f2fbaea +Author: Eamon Walsh +Date: Wed May 5 20:04:52 2004 +0000 + + Replace XC-SECURITY code with XACE security hooks + (cherry picked from 8526cd6395490b03b279f1962df777fb0e4a9878 commit) + +commit 98d17bba716619e3402bd74c7c3e1c01d055ef6e +Author: Alan Coopersmith +Date: Mon Jun 19 17:07:59 2006 -0700 + + Tell git to ignore emacs *~ droppings and git .msg files + +commit 569c808a2375be71f835ee8693605487484bd22e +Author: Eric Anholt +Date: Mon Jun 19 16:42:09 2006 -0700 + + Fix crash when using PICT_x4a4 by supplying an appropriate fbFetchPixel_x4a4. + +commit 8d9ccc90a54c786ca4ba5620ab0a965e3f3bc8ea +Author: Eamon Walsh +Date: Wed May 5 20:15:41 2004 +0000 + + Add XACE extension + (partially cherry picked from 8d4f21ab53c44ca48501d6211ea6db0c0b8af916 commit) + +commit 55426650417df4ec22ea0e2a67f6074f0ac1d54e +Author: Eric Anholt +Date: Mon Jun 19 15:04:46 2006 -0700 + + Clean up gcc warnings from picture format CARD32 -> enum change. + +commit 520c80f4b807ae6419e70fe2b524532465b509ac +Author: Eric Anholt +Date: Mon Jun 19 14:40:27 2006 -0700 + + Don't forget to step the rows when verifying the equivalence of fb/sys areas. + + This is only used by fakexa, but we would have missed some errors without this + fix. + +commit e793f0eeee3e9c83b6a7b50d451fb6db12839087 +Author: Eric Anholt +Date: Mon Jun 19 14:06:02 2006 -0700 + + Correct component ordering when fetching [ax]4b4g4r4 pixels. + + Noticed by: rendercheck + +commit e1672a12eb70836a2ceec803d505294897ae8cd2 +Author: Eric Anholt +Date: Mon Jun 19 13:20:56 2006 -0700 + + Convert PICT_* names from #defines to an enum to aid in debugging. + +commit 9742d55c820a260a42a4537502295931d4529deb +Author: Greg Kroah-Hartman +Date: Mon Jun 19 14:40:14 2006 -0700 + + update .gitignore to handle Xprint move + +commit d97a21acb878bc4e5e6542912fbd820503bba312 +Author: Greg Kroah-Hartman +Date: Mon Jun 19 14:36:54 2006 -0700 + + fix compiler warnings in hw/xfree86/i2c/fi1236.c + +commit 29c78321e86956c4ce0c1c899d82557f927e04da +Author: Greg Kroah-Hartman +Date: Mon Jun 19 14:36:41 2006 -0700 + + fix compiler warning in hw/xfree86/i2c/tda9850.c + +commit 9f2793551f335e5fb08990fc8bb9e05e0ffb68d5 +Author: Greg Kroah-Hartman +Date: Mon Jun 19 11:50:47 2006 -0700 + + fix compiler warning in hw/vfb/InitOutput.c + +commit b20ae5ddb7682bafcee6f8bf0c8208a3f70b882b +Author: Greg Kroah-Hartman +Date: Mon Jun 19 11:38:52 2006 -0700 + + fix compiler warnings in hw/xfree86/xf4bpp/ppcGC.c + +commit 4d258f31967141e3c4a6e4abbef89ffa717e85aa +Author: Greg Kroah-Hartman +Date: Mon Jun 19 11:27:47 2006 -0700 + + fix compiler warnings in XTrap/xtrapdi.c + +commit 870cecb72c2cba44dc64cb202917453603c8f287 +Author: Greg Kroah-Hartman +Date: Mon Jun 19 11:22:42 2006 -0700 + + fix compiler warnings in XTrap/xtrapdiswp.c + +commit a28652f9c35fbc009245382a5cc2a022f42366fc +Author: Adam Jackson +Date: Mon Jun 19 00:57:18 2006 -0400 + + Another round of loader sense-beating. Remove the (unused) server export + lists, a really bad hash table, the last vestiges of the other backends, + and some miscellaneous cleanups. Good for dropping 300k from the size of + the built server on x86. + +commit 98a602fab1f307a07a96868d7dae12b6f8d7f405 +Author: Adam Jackson +Date: Sun Jun 18 23:54:04 2006 -0400 + + Don't bother building RAC as a module, that's just absurd. + +commit 76aaf7eae7409162c5ed2963f2e27d019cb30263 +Author: Eric Anholt +Date: Sun Jun 18 19:47:29 2006 -0700 + + Add a couple of (doxygen) comments I wrote while looking at modesetting. + +commit 6aaf0e5b581b06fc73e56f863a26cd9d684eb9c0 +Author: Eric Anholt +Date: Sun Jun 18 19:12:15 2006 -0700 + + Add options to disable EXA acceleration for Composite/UTS/DFS, and always print + + out how much memory EXA is managing for offscreen pixmaps. + +commit 21ef7e17ef6dca177461c9438b9df707a4d664a2 +Author: Eric Anholt +Date: Sun Jun 18 18:57:55 2006 -0700 + + Add some missing .gitignore stuff for Mesa symlinks and other generated files. + +commit 71fbda8049f64c7fefae8ab817fb5f37ee2ee134 +Author: Adam Jackson +Date: Sun Jun 18 21:07:28 2006 -0400 + + Xprint/ -> hw/xprint + XpConfig -> hw/xprint/config + +commit 868e2cab706e317618646e064b0559d4e68c7b32 +Author: Eric Anholt +Date: Fri Jun 16 10:17:51 2006 -0700 + + Add explicit dependencies (Xorg_DEPENDENCIES = ) on the internal libraries + (such as libcw.la) that we link into the server, causing it to be rebuild + automatically when they're updated. Some system libraries are included, but + don't appear to cause any harm. You would think this would be automatic... + +commit 53f74b6aa95fe57fda45fd8a051595e772f00402 +Author: Eric Anholt +Date: Fri Jun 16 10:14:30 2006 -0700 + + Bugzilla #5120, #7246: In CW's GC ops, validate the backing GC against the + backing drawable if the serial numbers differ. Fixes crash in XAA which + occurred when the DDX bumped the serial number on the backing drawable and + expected it to get re-validated, and we didn't because the wrapped drawable + hadn't been bumped. + +commit b90088321e6ef84970aa97d7c851af93f49bf4b7 +Author: Ian Romanick +Date: Mon Jun 12 15:22:31 2006 -0700 + + Add arrayobj.c to the Makefile as well. + +commit f9f33b72e34eaeccea2a20f4a3dd68c2dbefc90e +Author: Michel Dänzer +Date: Mon Jun 12 20:19:11 2006 +0200 + + Track per-drawable damage to minimize UTS and DFS transfers. + + Based on work by Eric Anholt. + +commit 6060b612de6b41f872d034c6130770c1d189d0a3 +Author: Eric Anholt +Date: Mon Jun 12 20:12:31 2006 +0200 + + Provide option to report damage after operation is complete. + +commit 041ef23192b193b87f6cfc3e74e2e77f9f47cd4b +Author: Ian Romanick +Date: Mon Jun 12 09:39:18 2006 -0700 + + Add new Mesa files arrayobj.c and arrayobj.h. + +commit caad8b724b97074e41de447fe77dda189f287a26 +Author: Greg Kroah-Hartman +Date: Fri Jun 9 11:24:57 2006 -0700 + + fix compiler warnings in record/set.c + + (note this only fixed up the function definitions for the static functions + which can not cause any abi incompatibility) + +commit 51489bb5ed86cb6aa07e26a13618765c29f913e4 +Author: Greg Kroah-Hartman +Date: Fri Jun 9 10:59:47 2006 -0700 + + more .gitignore updates + +commit c4d251bd3e88cf8dfd6872537dbe30c07344b196 +Author: Greg Kroah-Hartman +Date: Fri Jun 9 10:46:18 2006 -0700 + + updated .gitignore with more pre-generated files + +commit 9f31ef83be61a900c701fcbc9a43ffae40ca7005 +Author: Greg Kroah-Hartman +Date: Fri Jun 9 10:44:46 2006 -0700 + + fix compiler warning in hw/xfree86/loader/loaderProcs.h + +commit 490ffc205a7714145cac0c63efeb6374ea28141f +Author: Greg Kroah-Hartman +Date: Fri Jun 9 10:44:25 2006 -0700 + + fix compiler warning in hw/xfree86/loader/loadmod.c + +commit 6119845d1ff832ea2b7c9cbe7ed6c6637cdcf305 +Author: Greg Kroah-Hartman +Date: Fri Jun 9 10:14:08 2006 -0700 + + fix compiler warnings in hw/xnest/Keyboard.c + +commit 1a7335ff932baa59a3283c50dd6007d81989b7e3 +Author: Greg Kroah-Hartman +Date: Fri Jun 9 10:02:08 2006 -0700 + + remove unneeded externs from Xprint/ps/psout.c + +commit 9583859d538394e98ac1f38b8e6f0997e321621d +Author: Greg Kroah-Hartman +Date: Fri Jun 9 09:59:22 2006 -0700 + + remove unneeded "extern" in Xprint/ddxInit.c + +commit cb9e29c184474edd75645e3b52e22a097a242e40 +Author: Greg Kroah-Hartman +Date: Fri Jun 9 09:54:50 2006 -0700 + + removed unneeded extern in Xprint/ps/PsWindow.c + +commit 96c19a3ec1b7e43782d373b8015fa0ca24cb4f5b +Author: Greg Kroah-Hartman +Date: Fri Jun 9 09:51:28 2006 -0700 + + put function prototype for ShapeExtensionInit() in proper place + + based on FIXME in mi/miinitext.c + +commit 576e6fb1124a47493371210adf99d6f2076e72c5 +Author: Adam Jackson +Date: Thu Jun 8 17:49:02 2006 -0400 + + Bug #7120: Multimonitor (non-Xinerama) support for xwin servers. + (Tom Whittock) + +commit d42cf4a2a4980fdd29fb15c4fd8fddda67b36256 +Author: Adam Jackson +Date: Thu Jun 8 17:46:53 2006 -0400 + + Bug #7121: fix clipboard handling in Xming (Colin Harrison) + +commit 3930da3f6209312dd0f10aba0b16ef45996a07fe +Author: Greg Kroah-Hartman +Date: Thu Jun 8 11:27:29 2006 -0700 + + fix compiler warnings in Xprint/ps/psout.c + +commit c496a3b9c981dc079fcc6c0ac4db3aa912b3dcf1 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 11:23:53 2006 -0700 + + fix compiler warning in Xprint/ps/PsImageUtil.c + +commit ea24b5a25c2544f3b3de6480da125edb23a6b3a9 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 11:22:01 2006 -0700 + + add proper function prototypes for Xprint/ps/PsCache.c to Xprint/ps/Ps.h + +commit ee2bb4d1929e20436cf0e830ece02fe07db2d524 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 11:15:34 2006 -0700 + + fix compiler warnings in Xprint/ps/PsArea.c + +commit 92303d534a91cb0ea30e4cd0f639efd70b9739b4 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 11:12:16 2006 -0700 + + fix compiler warning in Xprint/ps/PsGC.c + +commit cf6169f9e99e6e8ab264f284cfa13cb379b36207 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 11:09:56 2006 -0700 + + fix compiler warnings in Xprint/ps/PsFonts.c + +commit 1abc7f96edf37a1e2c766b9cdba7fc9b2cb06d19 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 11:06:51 2006 -0700 + + fix compiler warnings in Xprint/ps/PsInit.c + +commit 2dc291384c550badf55542ae645240e166676848 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 11:04:40 2006 -0700 + + fixed compiler warnings in Xprint/ps/PsPixmap.c + +commit aef092e0290143c2b8b1cb98fdf55c9630032aaf +Author: Greg Kroah-Hartman +Date: Thu Jun 8 10:53:17 2006 -0700 + + fix compiler warnings in Xprint/ps/PsPolygon.c + +commit 511b231ded61159ebd70cab020ca1ca003fd0784 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 10:41:34 2006 -0700 + + fix compiler warnings in Xprint/ps/PsPrint.c + +commit 35fccb0068e8d73d1e6a16aefdc771506e620f83 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 10:40:24 2006 -0700 + + remove some compiler warnings in Xprint/ps/PsText.c + + Note that one of the existing warnings is pointing out a + real bug (uninitialized use for fontPage in PsPolyText16()) + if anyone really cares about this code. + +commit 1ac30947f4a222ba78558eddf8e5f03cec31f613 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 10:35:18 2006 -0700 + + fix compiler warnings in Xprint/ps/PsWindow.c + +commit 9fa73721f0c3df73e508da909a5665f47a54cb57 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 10:27:28 2006 -0700 + + fix up EnableDisableExtension() and EnableDisableExtensionError() prototypes + +commit c405659626477f2009603d8c0e381b8b62277bb6 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 10:19:24 2006 -0700 + + comment out QualifyName in Xprint/Init.c which is not used anymore + + If someone else wants to delete this function, that's fine with me too. + +commit a940b851faba569e36983f7885aefa72f7bf2ade +Author: Greg Kroah-Hartman +Date: Thu Jun 8 10:17:53 2006 -0700 + + fix function pointer warning in Xprint/Init.c + +commit 9e0c82386ae389bcc296a5ad44e996790b033ad3 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 10:16:37 2006 -0700 + + fix already-defined warning in Xprint/Init.c + +commit 40fb7eecaf14a76f35ac2dc350ad2fffdaf6e0d0 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 10:11:17 2006 -0700 + + fix noDamageExtension warning in Xprint/Init.c + + Also took out duplicate definition of this variable in mi/miinitext.c + +commit 494895e0fbbf0a71bc535c0a2358c9db54c95c5a +Author: Greg Kroah-Hartman +Date: Thu Jun 8 09:43:44 2006 -0700 + + Properly define dispatchExceptionAtReset to fix compiler warnings + +commit d90eecf40ea768b2bf6340f15bb0af9dab2f3cf3 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 09:11:41 2006 -0700 + + add some missing function prototypes to Xprint/AttrValid.h to fix compiler warnings + +commit bccde1609153dee93f6fe5a138fc0c0f2fe08212 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 09:01:59 2006 -0700 + + fix incompatible pointer warning in Xprint/ddxInit.c + +commit 60bd8893d50ed1da9b94f4b96a07ea432e23f467 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 09:01:21 2006 -0700 + + Properly #ifdef out ddxBeforeReset() to fix compiler warning + +commit ac21e6a594eac69101aa8920d70a9d60412b57f6 +Author: Greg Kroah-Hartman +Date: Thu Jun 8 09:00:42 2006 -0700 + + remove unused variable warning in Xprint/ddxInit.c + +commit 71dd44b0ad617dd36ce4ed328f9e1e8c5ef713a5 +Author: Greg Kroah-Hartman +Date: Wed Jun 7 19:17:26 2006 -0700 + + Fixed up most "warning: function declaration isn't a prototype" warnings from Xprint/ + +commit 839305bac98856a2bb1d96691e4dcf49db229f90 +Author: Greg Kroah-Hartman +Date: Wed Jun 7 19:12:23 2006 -0700 + + Remove unused variables from Xprint/attributes.c + +commit 7a40ac2585028860730ffcd333eb3fe9de63680c +Author: Greg Kroah-Hartman +Date: Wed Jun 7 16:23:45 2006 -0700 + + remove a bunch of unused variables in Xprint/Init.c (fixing the compiler warnings) + +commit 163980138cc0bfc9124456781b3dc45a49e2a129 +Author: Greg Kroah-Hartman +Date: Wed Jun 7 16:11:20 2006 -0700 + + remove some unused local variables in Xprint/Oid.c + +commit 8e41640db884a4633b598d0a52b269e6547c8bf0 +Author: Greg Kroah-Hartman +Date: Wed Jun 7 15:56:43 2006 -0700 + + add bison generated files to .gitignore + +commit 78f4ab6b89fca3086b9c9471b40c11c23fbb6142 +Author: Greg Kroah-Hartman +Date: Wed Jun 7 14:12:40 2006 -0700 + + Fix compiler warning about undefined ReinitializeRootWindow function + +commit 757f40fca50a99377e437949ee77b983c8cd6087 +Author: Greg Kroah-Hartman +Date: Wed Jun 7 14:09:13 2006 -0700 + + updated the .gitignore file with more auto-generated files + +commit cc465800ddca5fb6c9ec09fdfa8f1f05359cf396 +Author: Greg Kroah-Hartman +Date: Wed Jun 7 14:03:35 2006 -0700 + + Fix compiler warnings about SetVendorRelease and SetVendorString + +commit 785c9789704ed142fe98cd17b5995e4a95b7141f +Merge: 21ebcfd... 36d786e... +Author: Greg Kroah-Hartman +Date: Wed Jun 7 13:20:21 2006 -0700 + + Merge ../xserver + +commit 36d786e9f051c5c95c1cc8c098c84e118ed3cc85 +Author: Greg Kroah-Hartman +Date: Wed Jun 7 12:47:50 2006 -0700 + + add more files to .gitignore + +commit 8f5aa38abf1158a789b5528df9d98826342e30cf +Author: Greg Kroah-Hartman +Date: Wed Jun 7 12:33:44 2006 -0700 + + fix compiler warning about XKB_IN_SERVER redefinition + +commit 101ae616962c355388722e05ab8413eb5f5c3402 +Author: Greg Kroah-Hartman +Date: Wed Jun 7 12:06:22 2006 -0700 + + Add PanoramiXExtensionDisabledHack to globals.h as it was missing. + +commit e5b72bd9c6fb06640a5de4031be0dc9b04b4b215 +Author: Greg Kroah-Hartman +Date: Wed Jun 7 12:05:39 2006 -0700 + + Remove 3 compiler warnings in the Xext/xevie.c file + +commit e3c11f66516521959127b9ab8fd88cc4c954f5bb +Author: Greg Kroah-Hartman +Date: Wed Jun 7 12:05:01 2006 -0700 + + Added first cut at a .gitignore file to make using git easier. + +commit 21ebcfd7027b2a6182d4065e56a2ef814f5181ae +Author: Adam Jackson +Date: Wed Jun 7 14:17:31 2006 -0400 + + Demolish now-unused loader functions. + +commit f90761b06eaa5fa44fe85289e54eed5f47eff3b9 +Author: Adam Jackson +Date: Wed Jun 7 13:58:24 2006 -0400 + + Add a token for EDID-supplied modes. + +commit d00aa6b8559d3e5f70c6558ce0abd12f7d758491 +Author: Adam Jackson +Date: Wed Jun 7 11:44:36 2006 -0400 + + Delete a (now misleading) message from the crash handler. + +commit f8535edec736cf19740bd41ed2adfe531f2c26ac +Author: Keith Packard +Date: Tue Jun 6 10:29:34 2006 -0700 + + Remove ChangeLog file. + +commit 8444bb77c91cf8a23d32b3cc9749e2a3d3f9f9eb +Author: Daniel Stone +Date: Mon Jun 5 20:22:06 2006 +0000 + + When we can, bound the maximum number of PCI devices to attempt to scan, by + the number found on the system. Only implemented for Linux right now. + +commit 11cf4d2fde9219e8d6ca427acae89a0c9f5d71b1 +Author: Keith Packard +Date: Mon Jun 5 07:15:23 2006 +0000 + + Update AC_DEFINE_DIR to version compatible with CVS autoconf which requires + double eval to avoid leaving ${prefix} in output + +commit 52fc7c8dc70226cc7f03454e9be86a627672295f +Author: Adam Jackson +Date: Mon Jun 5 03:00:24 2006 +0000 + + Ensure all *ModuleData symbols are marked _X_EXPORT. Start removing + XFree86LOADER ifdefs, non-loadable hasn't been supported for a while + now. Remove completely gratuitious REMOVE_LOADER_CHECK_MODULE_INFO + ifdefs surrounding a call to a function added in XFree86 4.1 (!). + Miscellaneous static markings. + +commit d22582dc5a070f72d4653e24d1e4ebe4a112276e +Author: Adam Jackson +Date: Sun Jun 4 16:13:26 2006 +0000 + + Remove a stray LBX reference. + +commit ddc6b99505e227f99585b8c2392da524022a73e6 +Author: Daniel Stone +Date: Sat Jun 3 11:24:33 2006 +0000 + + Bump to 1.1.99.2. + +commit 4fd668940f2155c4b06d24b6da8bcccd01f66f4c +Author: Daniel Stone +Date: Sat Jun 3 10:58:37 2006 +0000 + + Bug #6619: Fix disappearing hardware cursor. (Colin Harrison) + +commit ee71cb61f8da29bcf36ea4b199d629e34f89b119 +Author: Daniel Stone +Date: Sat Jun 3 10:54:38 2006 +0000 + + Bug #6956: Fix crash when removing session leader before its children. + (Rich Coe) + +commit cd384af3058fe15077c57eccdffed3b61e261e7f +Author: Daniel Stone +Date: Sat Jun 3 10:50:23 2006 +0000 + + Completely remove relocation pointer table. + +commit 8e8c6faecddbe014d8760822e1f705b43a00fa33 +Author: Daniel Stone +Date: Sat Jun 3 10:48:37 2006 +0000 + + Add support for kFreeBSD systems. (Robert Millan, Aurelien Jarno) + +commit 5b703f847d166176920077c1e6ba1d9559fc8481 +Author: Daniel Stone +Date: Fri Jun 2 12:05:32 2006 +0000 + + Fix type confusion. + +commit 56f21bda1ce95741c88c423b60bd709eef26eb12 +Author: Daniel Stone +Date: Thu Jun 1 22:30:52 2006 +0000 + + Bug #6583: Only open /proc/bus/pci/devices once. (Bill Nottingham) + +commit a9ed5a87902a839a5a135af03db78f113b18bd86 +Author: Daniel Stone +Date: Thu Jun 1 22:06:41 2006 +0000 + + Kill LBX, too. + +commit df6da66525836d515f408a82f1a13ca5251ff0f7 +Author: Daniel Stone +Date: Thu Jun 1 20:56:39 2006 +0000 + + Simplify the unsupported XI function list. + +commit 97203f1cf6e5b7c6389f69cbb1b75ac675d09531 +Author: Daniel Stone +Date: Thu Jun 1 20:41:21 2006 +0000 + + Clean up a warning, and remove excess multiple-suffix code. + +commit 6d594ebc667afd404556ec3e108c810946b20ac5 +Author: Daniel Stone +Date: Thu Jun 1 20:22:39 2006 +0000 + + Ditch more alternate-loader braindamage. + +commit c9468177486833d521ec62c7b0266b4be8200de7 +Author: Daniel Stone +Date: Thu Jun 1 20:18:30 2006 +0000 + + Kill a.out, COFF and ELF loaders with FIRE. + +commit a3a4221495dfe4cc0a3874a08dd5364ef45a7f2e +Author: Adam Jackson +Date: Thu Jun 1 19:53:06 2006 +0000 + + Add bitmap to the ignored module list. + +commit ee689c104287140db38bbd26959ab1b4847c168e +Author: Daniel Stone +Date: Thu Jun 1 19:49:55 2006 +0000 + + Ignore requests to load GLcore and speedo. + +commit 07c731a2bc21e6b98f28a2c0ebc42f01b67b824b +Author: Adam Jackson +Date: Thu Jun 1 19:37:53 2006 +0000 + + Bug #5089: Die, libbitmap, die! + +commit 32be08ba7242da74de5defd6a4dcb536a273f57a +Author: Daniel Stone +Date: Thu Jun 1 19:22:38 2006 +0000 + + Remove horrendously ugly DDX backward-compatibility. + +commit d81edb9e00680e3c0001f343fa1d0c310b86cb93 +Author: Daniel Stone +Date: Thu Jun 1 19:22:01 2006 +0000 + + Forgot to remove this one too. + +commit a73e0f8cdfec1c9199ffe696146ba7d677c4c10d +Author: Daniel Stone +Date: Thu Jun 1 18:47:47 2006 +0000 + + Die XTESTEXT1, die! + +commit fc5ca97284ef237a91f6adb433148ff57a673c08 +Author: Matthieu Herrb +Date: Tue May 30 22:56:36 2006 +0000 + + Powerpc machines also need ioperm_noop.c + +commit 07b168c8d8b2d79a4e7cf8dc5124eafc0f2bbcd0 +Author: Adam Jackson +Date: Tue May 30 16:10:59 2006 +0000 + + Properly document the DPMS, SyncOnGreen, and TargetRefresh options. + +commit 107defd920d9b1eb52b15e8ca8665bc48bb933d6 +Author: Kristian Høgsberg +Date: Mon May 29 19:53:18 2006 +0000 + + Remove superfluous definition of tfp tokens. + +commit fd8bde8bb0f9d796b3464973b53285c0a6d22a31 +Author: Daniel Stone +Date: Mon May 29 11:14:03 2006 +0000 + + Remove -xkbmap argument. + +commit db0680cf70b8367e1f8a7fff9c0f6ec414db0542 +Author: Daniel Stone +Date: Mon May 29 09:26:32 2006 +0000 + + Minor #include cleanups. + +commit c38aab293a06f43c04f14223f94f822d91d73396 +Author: Matthieu Herrb +Date: Sat May 27 23:15:05 2006 +0000 + + check buffersize before reading next char, fixes the "mouse stuck at left" + bug (bugzilla #3113) for BSD systems using wscons. (Dale Rahn). + +commit 2102fdd0a58e18aeaa842b2ec73b6071970fafb7 +Author: Jeremy C. Reed +Date: Fri May 26 00:12:18 2006 +0000 + + RGB color database and XErrorDB install to "share" not "lib" by default (by + app/rgb and libX11). + TODO: They are customizable, so maybe cpprules.in should be extended. + +commit 354086d7e8e13fc7acbcc6603ca2a03c8cc806ee +Author: Jeremy C. Reed +Date: Thu May 25 23:32:33 2006 +0000 + + Don't do fixup_video_driver_list if no drivers. (I had signal 11 and core + dump when drivers not installed yet.) + TODO: fix fixup_video_driver_list to handle NULL argument. + +commit c6b1cff43238deded11dc58945778aec3d844598 +Author: Matthieu Herrb +Date: Thu May 25 13:27:42 2006 +0000 + + update to build against Mesa CVS HEAD (Carlos Eduardo Rodrigues Diogenes). + +commit 99724c16c9c58eb3e20ba91c79464747b8ee3fcf +Author: Matthieu Herrb +Date: Thu May 25 10:14:39 2006 +0000 + + typo + +commit 5c7aef148de23f39027fda647bbb53bb5b992683 +Author: Matthieu Herrb +Date: Thu May 25 09:57:47 2006 +0000 + + Don't destroy a pixmap twice on server exit (bugzilla #4247). + +commit 693079442377daa2dc48bf318a0d7dd256cb2738 +Author: Jeremy C. Reed +Date: Wed May 24 22:58:03 2006 +0000 + + NetBSD also has curses.h instead of ncurses.h. (TODO: Maybe instead of + checking for SCO, UnixWare, Sun SVR4 and NetBSD, the curses.h versus + ncurses.h should be tested in configure.) + +commit 9477e5e0be04f4f6fa311de8b3693fbc8a082fbf +Author: Jeremy C. Reed +Date: Wed May 24 22:43:13 2006 +0000 + + On NetBSD, add -li386 for i386 and -lx86_64 for x86_64 to SYS_LIBS. (x86_64 + on NetBSD not tested.) + +commit b3031532ca96b22e81863202efb8bbcb9d701fac +Author: Jeremy C. Reed +Date: Wed May 24 20:11:38 2006 +0000 + + Remove tolower() which was missed in the _XkbStrCaseCmp/strcmp changes. + +commit eb696f72a0819edef550bce9ff55730c02f70452 +Author: Alan Coopersmith +Date: Tue May 23 16:17:09 2006 +0000 + + Add AC_SUBST([SOLARIS_ASM_CFLAGS]) that I forgot when splitting them out of + the XORG_CFLAGS. + +commit bc0c56c407117d1545e20d21f7d30eb3472d618b +Author: Adam Jackson +Date: Mon May 22 15:47:56 2006 +0000 + + Bug #6924: Restore the ABI for DrawableRec and ColormapRec to the state + they were in prior to the fix for #6438. Based on a patch from Andy + Ritger. + +commit cc3b882bd141218052cdde0144fc2a707ceee83d +Author: Alan Coopersmith +Date: Sat May 20 00:55:44 2006 +0000 + + Update to 2006-05-19 snapshot + Remove entries now present in pci.ids + Regenerate from updated pci.ids & extrapci.ids + +commit 0b2c2b6bba5b578d5f0ac2d709d5d2ce7cb32bef +Author: Adam Jackson +Date: Fri May 19 20:29:47 2006 +0000 + + Remove dead DPMS timer functions from the installed headers. (Fredrik + Höglund) + +commit deebf6bd51117c01a3217f134bd952481b9e41ab +Author: Adam Jackson +Date: Thu May 18 23:52:51 2006 +0000 + + Bug #4139: Fix a BAR remapping bug that could lead to IERR and system hang. + (Egbert Eich) + +commit 91239d83f4e27835cf871348b5ff6c892bd4f4f4 +Author: Adam Jackson +Date: Thu May 18 23:52:41 2006 +0000 + + file getemptypci.c was initially added on branch server-1_1-branch. + +commit c11cfcfaffc79be5686c666f881c4c08f69e1b86 +Author: Adam Jackson +Date: Thu May 18 23:48:57 2006 +0000 + + Bug #6377: Ignore disabled BARs, and allow matching BARs aligned to less + than 16 bytes. (Felix Kühling, ATI) + +commit fa9a49a92db52de968d7147c71c6b9a8fd480f1e +Author: Adam Jackson +Date: Thu May 18 18:18:41 2006 +0000 + + Bug #5877: Avoid burning CPU when acpid dies. Require acpid to be running + for ACPI support on Linux. Minor errno handling fixes. (Valery + Inozemtsev, Adam Jackson) + +commit 7893dadb2f6df218a4f4ea30a41c1aa9838da1f0 +Author: Adam Jackson +Date: Thu May 18 14:39:59 2006 +0000 + + Bug #6827: Fix texel fetch in fbFetchTransformed to avoid crashes. Still + not 100% correct, but better than 7.0. (Radek Doulik, Matthias Hopf) + +commit 2892dd6d2e34957650ef1630a94d471dfa71f888 +Author: Daniel Stone +Date: Wed May 17 16:20:03 2006 +0000 + + Make Xv symbols conditional. (Enrico Wiegelt) + +commit a317bf482257f0e1b612dec7961fdfa564f0b9f2 +Author: Daniel Stone +Date: Wed May 17 15:00:18 2006 +0000 + + Make DBE support conditional. (Enrico Wiegelt) + +commit 321dbed5f5a857a23525167ab85d4d7699429132 +Author: Adam Jackson +Date: Mon May 15 18:27:18 2006 +0000 + + Bug #5209: Fix APM/ACPI support, again. (Michel Dänzer, Valery Inozemtsev) + +commit dd38d3bd673cf830c2cd591fe1245909aa729892 +Author: Matthieu Herrb +Date: Sun May 14 16:22:24 2006 +0000 + + Don't use AM_CONDITIONAL inside shell conditionals. Bugzilla #6916. + +commit 6558ba4e62dba99f2a4d830f1c16f8d1c255b316 +Author: Søren Sandmann Pedersen +Date: Fri May 12 21:53:28 2006 +0000 + + Fri May 12 17:51:26 2006 Søren Sandmann + Keep track of the previous item and update its next pointer when deleting + from the linked list. + +commit 9e239a0df7ededb50de091e5271cbfddd2b683c3 +Author: Matthias Hopf +Date: Thu May 11 11:23:43 2006 +0000 + + Bug #5796: Wrong fastpath selection for repeating sources. + +commit 9db5d2dfc33e384ea4db1b7cbc377e0b05cfb3ff +Author: Matthias Hopf +Date: Thu May 11 10:18:08 2006 +0000 + + Bug #4320: Improved XAA Composite fastpath. + +commit 9a2a63ca3ff30d15e82a29e75a3720ba5b446978 +Author: Adam Jackson +Date: Wed May 10 15:44:27 2006 +0000 + + Bug #3561: Crash fix in the Record extension. (Paul Anderson) + +commit ab1a0249ba5e3174f18a1db212bc511fd7d74cb0 +Author: Adam Jackson +Date: Tue May 9 22:36:01 2006 +0000 + + Bug #6867: Yet another Render crash fix. (Michel Dänzer) + +commit 24310f827b71009c7510a674d2f92ced89847e37 +Author: Adam Jackson +Date: Tue May 9 18:12:50 2006 +0000 + + Revert accidental commit + +commit 86ffb46358965509aa3ee536f15cb5a4e5e04426 +Author: Adam Jackson +Date: Tue May 9 18:04:29 2006 +0000 + + Bug #5209: Re-enable building APM and ACPI support. (Michel Dänzer) + +commit b46d6a44fa97a3e66de828385026b7f84d9e59b8 +Author: Alan Coopersmith +Date: Wed May 3 23:45:16 2006 +0000 + + Make Xephyr build on Solaris: + Add #include on Solaris for FNONBLOCK/FASYNC definitions + hw/kdriver/linux/Makefile.am Move agp.c & agp.h to KDRIVE_HW_SOURCES since + they're not needed for Xephyr-only builds + Add -lrt to XEPHYR_LIBS if needed to get nanosleep(). + +commit fc91ca069dd55490b99b096f029e0864b049120c +Author: Adam Jackson +Date: Wed May 3 17:50:10 2006 +0000 + + Redact a few mentions of speedo font support. + +commit b9a9cf618566bdd796556b8a1f31949f66184352 +Author: Matthieu Herrb +Date: Tue May 2 14:09:30 2006 +0000 + + Typo in ALLLOCATE_LOCAL() arguments, causing mis-computation of the buffer. + Bugzilla #6642. + +commit 1e8a594957d84a37e66183e9c0cb9d42b62bdb24 +Author: Alan Coopersmith +Date: Tue May 2 01:37:25 2006 +0000 + + Fix Solaris build with Sun compilers to work when exa is built before + hw/xfree86/os-support/solaris (as it is by default now). + +commit 724dbc2f8bbe2f21bf16f20ca7b8bb555516626c +Author: Alan Coopersmith +Date: Tue May 2 01:30:37 2006 +0000 + + Use min() [defined in include/misc.h] instead of MIN() [not defined in any + Xorg header]. + +commit ad124742ae2a265a54a4a7ac91709ec6fd6ced34 +Author: Adam Jackson +Date: Sun Apr 30 20:33:27 2006 +0000 + + Remove stray mfb/cfb references. + +commit 291e89d4f2a4bb3177b2dfe6421680e23f120b8e +Author: Adam Jackson +Date: Sun Apr 30 19:16:14 2006 +0000 + + Remove NEED_LINEHELPER BC cruft for pre-R6 DDXes. + +commit fdcacc5a4bc1d6cb7347fc66041a9c686c5c74d1 +Author: Eric Anholt +Date: Fri Apr 28 03:27:12 2006 +0000 + + Add Polylines and PolyPoint acceleration as well. This is primarily to + clean up fallback debugging output, so I can focus on more imporant + cases. Performance is comparable but without hardware stalls, and + passes Xlib9. + +commit 005529a1c9c9e78f06565dff081f03b74988081e +Author: Eric Anholt +Date: Fri Apr 28 03:26:30 2006 +0000 + + Correct some bugs causing performance issues in the "Smart" scheme. + +commit 8738bc295bba229e36d064713e0c28aa8720c494 +Author: Eric Anholt +Date: Thu Apr 27 20:27:27 2006 +0000 + + Improve EXA fallback debugging output to include the locations of pixmaps. + This is being used in tracking down recent compositing performance + regressions. + +commit 83b061776a57025076fc26d6d01fe2e049c2243b +Author: Eric Anholt +Date: Thu Apr 27 19:17:34 2006 +0000 + + Add trivial PolySegment acceleration for 0-width horizontal/vertical lines, + which still happen somewhat frequently and were cluttering up my + fallback debugging output. x11perf says it's a major performance win in + those cases (though probably irrelevant), and it passes Xlib9. + +commit 69164ec00c749787dd59d5913ec6b3d159ad74d7 +Author: Eric Anholt +Date: Thu Apr 27 02:15:19 2006 +0000 + + In drawing glyphs, shortcut our way to exaComposite instead of going + through the whole CompositePicture stack and doing things like + computing damage over again. This is a sizeable win for text drawing + with a compmgr. Also avoid calling down into the server for dealing + with the scratch pixmap when we are able to do UploadToScreen + successfully and never need it. + +commit 3d4ca57b69c40d27fe191170d0819013f8cc4947 +Author: Eric Anholt +Date: Wed Apr 26 18:27:40 2006 +0000 + + Add a helper for the Component Alpha Over case, which breaks the operation + down into an OutReverse and an Add. Turn off the fallback to software + glyphs when component alpha, now that we expect all (new) drivers to be + able to support it. Also, make Xephyr fall back in the CA Over case to + exercise this code. This speeds up my rgb24text and ls -lR in + gnome-terminal by a factor of 5. + +commit 26fa45b64258894201496f921eccb0cb7028c28c +Author: Dave Airlie +Date: Wed Apr 26 11:40:58 2006 +0000 + + Bug #6751: Use the Linux PCI ROM interface on Linux properly. The old + domain code, still modified BARs not a good idea, Just talk to sysfs, + if 0 read, fallback to old methods. + +commit c339b221d3f59130a39e63d4cec3de7e3de95bf3 +Author: Dave Airlie +Date: Wed Apr 26 11:31:07 2006 +0000 + + Bug #6750: This patch detects Intel bridges that are transparent but aren't + reported as such. From the Linux kernel fixups. This patch also removes + the reserved BIOS area from the area to allocate resources in. + +commit 6d156c044085881c6ecbd8a13521c0a26df71c30 +Author: Eric Anholt +Date: Wed Apr 26 01:33:15 2006 +0000 + + Improve the migration debugging output. + +commit eaed7545a25a08b3223bf620c2ab6f80fe7cfdf6 +Author: Eric Anholt +Date: Wed Apr 26 01:32:55 2006 +0000 + + Fix a bug in the intersection computation that could concievably cause + incorrect results to be returned (but would probably usually be + over-conservative). + +commit 5d00859c6e7d4b7ebce56f438ec4993334de2328 +Author: Eric Anholt +Date: Tue Apr 25 23:56:17 2006 +0000 + + Bug #4668: Check if the lists of glyphs don't have any intersecting glyphs, + and if they all have a maskFormat matching the format of the actual + glyphs If so, we can avoid the temporary pixmap for accumulating + glyphs, which reduces the number of operations done, and makes it + easier on the migration system. This fixes some significant performance + issues, particularly with subpixel antialiasing. Note that it does + increase the amount of damage computation which is done, so is not + always a win with a compositing manager running. + +commit 074dc9a023b3967ce00aa42c26a7c988423afe8a +Author: Eric Anholt +Date: Tue Apr 25 16:47:23 2006 +0000 + + Add an option to verify at the point of migration that pixmaps which aren't + marked dirty are in fact not dirty. This will hopefully help catch + issues like the previous commit. Leave it on in fakexa. + +commit 702d9226d57ec1584de2e8a85c268795650b1094 +Author: Eric Anholt +Date: Tue Apr 25 15:46:04 2006 +0000 + + Don't forget to mark the drawable as dirty in exaPutImage(). Fixes + corruption with drivers that have UTS. (Michel Dänzer) + +commit 39ca0867c7dd6f3bdecc52aec8df435946682098 +Author: Donnie Berkholz +Date: Mon Apr 24 05:44:06 2006 +0000 + + Remove another reference to cfb16. + +commit 81f3c2937df6230542f3223c201da8c41ff59945 +Author: Donnie Berkholz +Date: Mon Apr 24 05:39:47 2006 +0000 + + strlcpy() doesn't exist on Linux, so use the implementation in os/. + +commit a715634d23fb3124261dbbd8d7d4e6522551bb9b +Author: Matthieu Herrb +Date: Sun Apr 23 13:14:50 2006 +0000 + + Don't access free memory after unloading a module. Bugzilla #4168. + +commit 79dc6892610c9f8385cde4f0d601cc7481225c16 +Author: Benjamin Herrenschmidt +Date: Sat Apr 22 03:22:17 2006 +0000 + + When reading the kernel keyboard mapping (readKernelMapping in + os-support/linux/lnx_KbdMap.c) we overrun the usefully-named global + array 'map', scribbling on other random static variables elsewhere. + This is fixed by changing the size of at2lnx. (David Woodhouse). Bug + #5169 + +commit b37c515320dc8df2b1d160cc3f37d6bfac109b91 +Author: Keith Packard +Date: Wed Apr 19 21:56:13 2006 +0000 + + Add support for x4a4 format (depth 4 at 8bpp). Bug #6325. + +commit c947d796aad0b81d661a10b787deed967376da79 +Author: Eric Anholt +Date: Tue Apr 18 19:18:43 2006 +0000 + + Missed in previous commit: Add a new migration scheme, called "Smart" for + lack of a better name. This one behaves somewhat between Greedy and + Always. It moves in if we can accelerate, unless the destination is + clean and shouldn't be kept in framebuffer according to the score, in + which case we migrate out (and force-migrate anything where migration + is free). This should help fix lack of acceleration for drivers without + UTS since removing exaAsyncPixmapGCOps, and has removed one performance + trap with Radeon I'd noticed. It is the new default. + +commit b17a4de83e7ab18bef29ae898195889638f1cc6a +Author: Eric Anholt +Date: Tue Apr 18 19:14:07 2006 +0000 + + Add a new migration scheme, called "Smart" for lack of a better name. This + one behaves somewhat between Greedy and Always. It moves in if we can + accelerate, unless the destination is clean and shouldn't be kept in + framebuffer according to the score, in which case we migrate out (and + force-migrate anything where migration is free). This should help fix + lack of acceleration for drivers without UTS since removing + exaAsyncPixmapGCOps, and has removed one performance trap with Radeon + I'd noticed. It is the new default. + +commit 771b366abe0bc060592b548612ec413291e14bf0 +Author: Eric Anholt +Date: Tue Apr 18 18:50:35 2006 +0000 + + Fix exaGetPixmapFirstPixel to migrate as unaccelerated. Also adds a bit of + fallback debugging info to PolyGlyphBlt. + +commit 782d61a03176264e0a9eb222ae97be3d175cf0ab +Author: Donnie Berkholz +Date: Tue Apr 18 17:28:44 2006 +0000 + + Update all prefixes in config tools, so they mostly work again. Also, make + RgbPath commented out when using xorgconfig. Start using + /dev/input/mice as the default mouse location on Linux. + +commit 0f065059dcaf9c452f1cdec115f619f697fd71cc +Author: Donnie Berkholz +Date: Mon Apr 17 07:27:43 2006 +0000 + + Wrap a couple more SDK headers in if XORG, as per Dave Airlie's commit on + 2006-01-18. + +commit ba632f697a782cd47870705b6cecaac2c60d30ff +Author: Donnie Berkholz +Date: Mon Apr 17 07:10:31 2006 +0000 + + Fix kdrive build by linking in libexa before KDRIVE_LIBS. + +commit 0e62d92d5b809bc3a6503e9bc386cf961fc22557 +Author: Adam Jackson +Date: Fri Apr 14 23:43:32 2006 +0000 + + Coverity #804: Another leak on OOM path. + +commit d61219aaadf9e4aa83644a69627d3a1d3282c95f +Author: Adam Jackson +Date: Fri Apr 14 23:38:11 2006 +0000 + + Coverity #806: Another memory leak on OOM path. + +commit 1b04e313920447e4c1f42bdd5a61f188d463210c +Author: Adam Jackson +Date: Fri Apr 14 23:32:22 2006 +0000 + + Coverity #847, #848, #849: Three more memory leaks. + +commit 6545051902f2ce00c98bd1373f97ebc942667e9c +Author: Adam Jackson +Date: Fri Apr 14 23:10:59 2006 +0000 + + Coverity #1003, #1004: Two more useless null checks. + +commit ab1d420022fb09d36a0d6ad948c38147c65b9adf +Author: Adam Jackson +Date: Fri Apr 14 23:09:38 2006 +0000 + + Coverity #1005: Avoid a null deref. + +commit d01e0956a8903fb41e8a34c78973b9b2860b6446 +Author: Adam Jackson +Date: Fri Apr 14 23:08:10 2006 +0000 + + Coverity #1007: Fix a silly null check. + +commit 6d29f659318364afe046dc242d6f506ce40a944a +Author: Luc Verhaegen +Date: Fri Apr 14 23:01:35 2006 +0000 + + CVT means Coordinated Video Timing instead of Common. + +commit 82b6ea1a4b414426072bf001daeb3e9de0e93589 +Author: Adam Jackson +Date: Fri Apr 14 22:51:19 2006 +0000 + + Bug #6580: Don't install xf86drm.h, that's libdrm's job. + +commit aefa347bded9a3179ab139d0ccddce314040e9b9 +Author: Ian Romanick +Date: Thu Apr 13 21:08:25 2006 +0000 + + Fix build for added file to Mesa CVS. This is always fun. :( + +commit 6aadd454e70d83921685b58bf57ec30d95920734 +Author: Daniel Stone +Date: Mon Apr 10 10:11:19 2006 +0000 + + Fix stupid thinko. + +commit c9f6e60d42dec82d06995c05a2a011c338cadd87 +Author: Daniel Stone +Date: Mon Apr 10 08:50:33 2006 +0000 + + Coverity #826: Fix potential memory leak. + +commit 1357af2474be9a3bce7ee2350fd4252eee89a3b1 +Author: Daniel Stone +Date: Sun Apr 9 17:39:10 2006 +0000 + + Coverity #340: Fix potential NULL dereference. Clean up proliferation of + 'register int n' in loops of ProcXkbGetNames. + +commit f324be00c547effc698ae6679d12ffe90bd90e43 +Author: Daniel Stone +Date: Sun Apr 9 17:28:42 2006 +0000 + + Coverity #324: Fix potential NULL dereference. (Alan Coopersmith) + +commit 7637aa17f21e26d979fbb210a638d6751c98b1eb +Author: Daniel Stone +Date: Sun Apr 9 17:26:17 2006 +0000 + + Coverity #169: Fix potential fgets() into NULL (?!?). + +commit d5bc41b88272b4a3a1841cc1189720b0549db215 +Author: Daniel Stone +Date: Sun Apr 9 17:15:51 2006 +0000 + + Coverity #323, #445, #446, #447: Fix potential NULL dereferences. + +commit 2387bfa5ff5ed82f3f732fb9152c1ea95850a914 +Author: Aaron Plattner +Date: Fri Apr 7 18:56:04 2006 +0000 + + Bump the ABI versions. Due to Glyph privates and the XV update below, the + video driver ABI needs to be bumped to 1.0. The rest of the ABI minor + versions were bumped to include the LoaderGetABIVersion function. + Add a DrawblePtr argument to the XV hooks. This allows drivers to determine + that the target window is redirected and draw to the appropriate place. + +commit dc43909219fe2a4d03139638814b89032b2921b9 +Author: Søren Sandmann Pedersen +Date: Fri Apr 7 17:49:32 2006 +0000 + + Fri Apr 7 13:46:45 2006 Søren Sandmann + Use FreeResource instead of deleteCompOverlayClient() + +commit 94e7213d594dbbb53a6bb05d1dab7514c4ff5350 +Author: Adam Jackson +Date: Fri Apr 7 16:08:50 2006 +0000 + + Remove libc wrapper types from Xisb interfaces. + +commit 47bdc9528c2dd4ea9d59a0944c023173ea7a7a66 +Author: Daniel Stone +Date: Fri Apr 7 16:07:50 2006 +0000 + + Coverity #844, #845, #846: Fix memory leaks. + +commit 2c90c3bfef8563f739a72bb645dd52b35b6ff6d5 +Author: Daniel Stone +Date: Fri Apr 7 15:57:17 2006 +0000 + + Coverity #987: Avoid potential NULL dereference. + +commit 843146cfbaef234e13df9a62b6f0232a5efdf7f0 +Author: Daniel Stone +Date: Fri Apr 7 15:53:21 2006 +0000 + + Coverity #1216: Fix double-close of file on error. + +commit 5dacc822327689c0f096093756473c96fba67d76 +Author: Keith Packard +Date: Fri Apr 7 02:20:11 2006 +0000 + + Coverity #333, #334 - eliminate unncessary test for always true condition + in fbEvenStipple. + +commit 75a9afdbf42e4196471774102e1758f18866bec6 +Author: Adam Jackson +Date: Fri Apr 7 01:53:43 2006 +0000 + + Coverity #488: Avoid smashing an array on malformed config files. + +commit 20c1ef2cc30abe45eeaf5b0833cbc0095ed05c02 +Author: Adam Jackson +Date: Fri Apr 7 01:50:07 2006 +0000 + + Coverity #769: Fix a potential memory leak for systems that allocate on + malloc(0) + +commit 5ef711032b821be82fd7281fe64872bcbaff0327 +Author: Adam Jackson +Date: Fri Apr 7 01:41:00 2006 +0000 + + Coverity #838: Plug two more memory leaks. + +commit 69477ea4b6e666940c5dd4422bedfa6432dead04 +Author: Adam Jackson +Date: Fri Apr 7 01:37:11 2006 +0000 + + Coverity #837: Fix another another memory leak. + +commit b472ce7307dd88a21c7713a2b127e34f5c2bc817 +Author: Adam Jackson +Date: Fri Apr 7 01:35:43 2006 +0000 + + Coverity #836: Fix another memory leak. + +commit 9c84ed5f8d9eded1a8b509c9cad1ca0ebcf2166a +Author: Adam Jackson +Date: Fri Apr 7 01:34:29 2006 +0000 + + Coverity #835: Plug memory leak in extension section parsing. + +commit 12924d0da36ad2266bb040caac58534c07e85261 +Author: Adam Jackson +Date: Fri Apr 7 01:29:39 2006 +0000 + + Coverity #812: Fix parser memory leak. + +commit 49abff79957799e9229d5c0226ee1b0d7505003d +Author: Adam Jackson +Date: Fri Apr 7 01:26:33 2006 +0000 + + Coverity #818: Avoid memory leak on error path. + +commit bda292120fc97f890c1f58a31177c0f7c0bfa048 +Author: Adam Jackson +Date: Fri Apr 7 01:23:50 2006 +0000 + + Coverity #985: Avoid segfault on malloc failure. + +commit 536628bb4bcb0a0d749e0c01412a5eb5d6d24063 +Author: Adam Jackson +Date: Fri Apr 7 01:18:01 2006 +0000 + + Coverity #1037: Sanity check idx before use. + +commit 53e97ce4ddd993248561c245143b61915ea254b5 +Author: Adam Jackson +Date: Thu Apr 6 22:04:12 2006 +0000 + + missed a line while removing cfb16 + +commit 4ae12636694af05cee4287b119bde08e9ceaa8aa +Author: Adam Jackson +Date: Thu Apr 6 18:59:11 2006 +0000 + + Remove cfb16, no longer used. + +commit e1fc15a85fb367ee9afd63c920c3327c3f45158d +Author: Fredrik Höglund +Date: Wed Apr 5 21:08:45 2006 +0000 + + Put the screensaver extension back in the Xext module. + Move the screenSaverSuspended variable to DIX globals. + Restore the old link order for the Xorg and Xdmx binaries. + +commit 383c2e1e9ec54ab9de356993ad552c1aa6ec094f +Author: Ian Romanick +Date: Wed Apr 5 19:52:12 2006 +0000 + + Include fbmmx.h in fb/fbwindow.c when USE_MMX is defined. Fixes build + problem on x86-64 resulting from fbHaveMMX being a macro instead of a + function on that platform. + +commit 4697da177d545a2f8bb6fd0d6588a1c40532c339 +Author: Adam Jackson +Date: Tue Apr 4 18:30:28 2006 +0000 + + Initial checkin + +commit 83ea57bcc82f478a7ecdcd6ed73ca4be01cd9c26 +Author: Adam Jackson +Date: Tue Apr 4 14:39:06 2006 +0000 + + Bug #5729: Convert xf8_16bpp to fb. chips(4) users please test. + +commit 4c7da861185080d15b3ff4301af4af0e85a71f93 +Author: Adam Jackson +Date: Tue Apr 4 14:17:04 2006 +0000 + + Bug #5300: Fix missing spaces in the Build OS line in the log. (Egmont + Koblinger) + +commit fb6f61b50f1c701041680e49f6a406a6603f1577 +Author: Adam Jackson +Date: Tue Apr 4 12:36:16 2006 +0000 + + Bug #4806: Dump the raw EDID contents in hex to the log file for better + debugging. (Philip Prindeville) + +commit 14af50371c7f23855781924cdf6afa6ab7566a87 +Author: Adam Jackson +Date: Mon Apr 3 22:00:06 2006 +0000 + + Bug #2142: Make font path logging more readable. (Eduard Fuchs) + +commit 373f9f92566290d979730c09c9c5c5d50e23390c +Author: Adam Jackson +Date: Mon Apr 3 21:45:54 2006 +0000 + + Bug #4766: Convert all Xprint drivers to fb. + +commit d9b8bfbfafe8758ceb629606607e37546d51ca52 +Author: Adam Jackson +Date: Mon Apr 3 21:16:30 2006 +0000 + + Bug #5478: More use of fbSOlidFillmmx. (Jim Huang) + +commit b0e67782653033c6518944adfbf23e466bd8bc39 +Author: Adam Jackson +Date: Mon Apr 3 19:50:15 2006 +0000 + + Bug #6346: Build fix when using gcc -mno-sse. (Jonathan Adamczewski) + +commit 66500819b1ca730a7b1df400a8368a08cbe49335 +Author: Daniel Stone +Date: Mon Apr 3 11:37:30 2006 +0000 + + Bug #1358: Make ISO_Prev_Group cycle/wrap as ISO_Next_Group does. + +commit 2a6c11aa3b06f13dad94f3441c7184e6720a2bf4 +Author: Alan Hourihane +Date: Mon Apr 3 09:12:28 2006 +0000 + + Fix a server crash due to memsetting beyond allocated memory when running + GL applications. + +commit f6ca2b3ea92b7fe98408c51a17a590435e808b1d +Author: Adam Jackson +Date: Mon Apr 3 02:15:55 2006 +0000 + + Coverity #38: Dead branch elimination. + +commit 9b9dd747d8f4697c6d5c947c160d5991c7c8fde5 +Author: Adam Jackson +Date: Mon Apr 3 02:13:47 2006 +0000 + + Coverity #75: Dead variable elimination. + +commit 3f87aeefb4be3ac23ae636d3756ffdc446eaa62d +Author: Adam Jackson +Date: Mon Apr 3 02:12:11 2006 +0000 + + Coverity #82: Dead variable elimination. + +commit 61926dbe592468076f8c9a666f0098d067d2213e +Author: Adam Jackson +Date: Mon Apr 3 02:09:05 2006 +0000 + + Coverity #271: Fix an unbelievably boneheaded NULL chase. + +commit 7ef95da8a3e22e710882590fc47d56893159cb5d +Author: Adam Jackson +Date: Mon Apr 3 01:51:54 2006 +0000 + + Coverity #616: Fix a rare memory leak. + +commit 01ebd633017249c496f378df511586c973d49708 +Author: Adam Jackson +Date: Mon Apr 3 01:43:33 2006 +0000 + + Coverity #833: Fix a rather nasty memory leak. + +commit a01f17d6dec02f80144e108f748783cb4e429ebb +Author: Adam Jackson +Date: Mon Apr 3 01:35:05 2006 +0000 + + Coverity #983: Move some risky debugging code inside #ifdef DEBUG. + +commit c03cfca3806f45948627715b25b46839a07be979 +Author: Adam Jackson +Date: Mon Apr 3 01:31:59 2006 +0000 + + Coverity #986: Prevent a NULL chase. + +commit 07ecf49521973bbb205b199c39e1171f1163df2b +Author: Adam Jackson +Date: Mon Apr 3 01:28:11 2006 +0000 + + Coverity #992: Prevent a NULL chase. + +commit c6b3b3354c2d9139b19b132051d434e97dd19715 +Author: Adam Jackson +Date: Sun Apr 2 22:51:42 2006 +0000 + + Bump to 1.1.99.1. + +commit 7e085f52b6f07c076bd3bcfdce27c17d14d7822e +Author: Kristian Høgsberg +Date: Sun Apr 2 22:31:13 2006 +0000 + + Use xf86LoaderCheckSymbol to check for DRI symbols instead of dlsym, + avoiding RTLD_DEFAULT. (__glXDRIscreenProbe): Change GLX-DRI to AIGLX + in LogMessage for consitency. + +commit b2097b99a2e6cc045ee9b6d80946bc06c4d9302c +Author: Adam Jackson +Date: Sun Apr 2 21:45:03 2006 +0000 + + ../stub + +commit 4e3a4cfdd1d7153eb88aab05ed02ddb32601ae93 +Author: Eric Anholt +Date: Sun Apr 2 06:22:05 2006 +0000 + + Use RTLD_DEFAULT, rather than relying on NULL happening to map to it as it + does on Linux. + +commit 323fec20292fc5ad90bfee9015ecccdc13c968ad +Author: Adam Jackson +Date: Sun Apr 2 00:46:20 2006 +0000 + + Reorder link order for Xdmx to fix new screensaver variable reference + properly; remove previous awful hack. + +commit a605b9ffd3c2e7d227e35b911761f720bf07b7e6 +Author: Adam Jackson +Date: Sun Apr 2 00:09:43 2006 +0000 + + Fix some includes to point into X11/fonts/ properly. + +commit e5b1d38e142807b59ce4ec89764c949f707ec541 +Author: Adam Jackson +Date: Sat Apr 1 23:53:33 2006 +0000 + + Disable Xprint freetype support momentarily. Needs ttf2pt1.c, which exists + in the monolith but has an advertising clause in the license. + +commit ccca76b8083b83825fa16483b44e8926a35412bb +Author: Eric Anholt +Date: Sat Apr 1 23:41:23 2006 +0000 + + Clean up warnings and a debug printf. + +commit 6afa814ab16f351b2eb787e5bf481a1f9738b391 +Author: Eric Anholt +Date: Sat Apr 1 23:28:17 2006 +0000 + + Pull out fb's tile handling during fbValidateGC so we can do the necessary + exaPrepare/FinishAccess()es. Revealed by xtest with fakexa. + +commit 277f612d4eeb89adb8ccda4e8fd3d211d8d1705e +Author: Adam Jackson +Date: Sat Apr 1 23:19:08 2006 +0000 + + Hack around the new screensaver variable for DMX, which is otherwise + blissfully ignorant of it. + +commit 5f95146fcfcae60cc29265799ba3b851647105d6 +Author: Eric Anholt +Date: Sat Apr 1 22:35:16 2006 +0000 + + Export exaPrepare/FinishGC to the rest of EXA, and use it in the ImageGlyph + implementation to avoid unprepared access to the tile. Also, relocate + the fbGetDrawable to avoid using a stale dest pointer after + exaSolidBoxClipped() may have migrated it. Revealed by xtest. + +commit c720ffe875e4b2038746ff9b4767f8b90db0a307 +Author: Eric Anholt +Date: Sat Apr 1 22:17:44 2006 +0000 + + Use fb's depth-to-planemask computation, which doesn't suffer from getting + a 1 planemask at depth 32. Fixes Get/PutImage xtest tests. + +commit 5c0a2088e229d05c38e5df7daea45af0d7db7daf +Author: Daniel Stone +Date: Sat Apr 1 21:49:44 2006 +0000 + + Bug #6428: Fix off-by-one error when walking off the end of the vmodmap + list. + +commit 1e764feab595b781dab22d6e41c26f118c9d41b5 +Author: Daniel Stone +Date: Sat Apr 1 21:20:31 2006 +0000 + + Bug #5801: Check for MTRR support under Linux. Minor refactoring of MTRR + checks for other OSes. + +commit 978c7b14a18caffde5600480824d04492fc32aef +Author: Daniel Stone +Date: Sat Apr 1 21:02:40 2006 +0000 + + Make Xprint AC_ARG_ENABLEs and AC_ARG_WITHs unconditional also. + +commit 71a6f2ef6c1138c5c6918a54dfb856183f4f242c +Author: Daniel Stone +Date: Sat Apr 1 20:58:42 2006 +0000 + + Unconditionally run XP_USE_FREETYPE AM_CONDITIONAL, not only in the Xprint + path. + +commit d1e90113fc32b6ddc4dbe1a074763c31bc133e75 +Author: Eric Anholt +Date: Fri Mar 31 23:22:29 2006 +0000 + + Don't attempt to Prepare/FinishAccess NULL pDrawables. Exposed by new + gradient testing in rendercheck. + +commit 2e38fedd29e7e55d01e3edce6a73b8ceaac17911 +Author: Eric Anholt +Date: Fri Mar 31 19:41:28 2006 +0000 + + Add an option to EXA for the DDX to request that EXA hide the pixmap's + devPrivate.ptr when pointing at offscreen memory, outside of + exaPrepare/FinishAccess(). This was used with fakexa to find (by NULL + dereference) many instances of un-Prepared CPU access to the + framebuffer: + - GC tiles used in several ops when fillStyle == FillTiled were never + Prepared. + - Migration could lead to un-Prepared access to mask data in render's + Trapezoids and Triangles + - PutImage's UploadToScreen failure fallback failed to Prepare. + +commit f480dc797b51f080f912efc7867d6d8e50be074c +Author: Eric Anholt +Date: Fri Mar 31 19:25:42 2006 +0000 + + Revert mistaken commit to exa_unaccel.c. Should have been to + exa_offscreen.c: Correct a typo in debug-only offscreen validation + code. (Wang Zhenyu) + +commit 1a8167c1baa767fc056d1e17d96d0ea98a5f3b17 +Author: Eric Anholt +Date: Fri Mar 31 19:16:51 2006 +0000 + + Correct a typo in debug-only offscreen validation code. (Wang Zhenyu) + +commit 7ea30b507f4ce5ce20fbfaca80f7d5b53a99eb1d +Author: Fredrik Höglund +Date: Fri Mar 31 18:49:38 2006 +0000 + + Move the screensaver extension from module to builtins. + Add the server side implementation of the ScreenSaverSuspend request. + Require scrnsaverproto >= 1.1, and change the linking order of the Xorg + static libs. + +commit acca49b1a5a6c034f3b9d51d9016b8a7d43da809 +Author: Søren Sandmann Pedersen +Date: Fri Mar 31 17:39:35 2006 +0000 + + Fri Mar 31 12:37:16 2006 Søren Sandmann + Fix copyright statement + +commit b074ce22470ba0a51eda2af7100d09a260a1e8bb +Author: Egbert Eich +Date: Fri Mar 31 15:11:51 2006 +0000 + + fixed typo. + +commit 710bb2e6c8b2874406e48fa8ad24539290c98d41 +Author: Daniel Stone +Date: Fri Mar 31 14:52:57 2006 +0000 + + Reindent with -cbi0. + +commit 7c44bb8c49656133eae675377edea55322d254ca +Author: Daniel Stone +Date: Fri Mar 31 07:33:34 2006 +0000 + + Simplify XkbWriteXKBKeymapForNames a bit, and remove debug spew. + +commit 4c317bbc1259fa555dc5d5278226b21c42845c0c +Author: Daniel Stone +Date: Fri Mar 31 07:21:41 2006 +0000 + + Add full FreeType support for Xprint. (Drew Parsons) + +commit 759033703ce17b20d57756206f48a7ae410a50d1 +Author: Eric Anholt +Date: Thu Mar 30 21:44:36 2006 +0000 + + Remove the exaAsyncPixmapGCOps mostly-unaccelerated ops vector, and always + plug in the accelerated one, even if the destination pixmap is + currently offscreen. This was a leftover from when kaa originally got + accelerated offscreen pixmap support, and its only concievable use was + to avoid a little overhead on ops to in-system pixmaps that weren't + going to get migrated. At this point, we probably care more about just + getting everything accelerated that we easily can, which should happen + with the new migration support. + +commit b9203dc068ccd4c0d22d49a94b910783432b96a8 +Author: Eric Anholt +Date: Thu Mar 30 21:25:43 2006 +0000 + + Don't do an extra fallback path for CopyWindow while swappedOut, since + exaCopyNtoN takes care of the fallback anyway, and we don't care about + the performance of this path. + +commit 5c04610f8aeceed9ec7cd0ca8c5eb314cacc3c25 +Author: Eric Anholt +Date: Thu Mar 30 21:21:59 2006 +0000 + + Add a dependency on EXA, so it rebuilds when the library does. The manual + indicated I shouldn't do this, but experience indicates I should. + +commit 8ec42a10ff04e51e8d0b4cffb15064d901bc398d +Author: Kristian Høgsberg +Date: Thu Mar 30 20:08:44 2006 +0000 + + Mark the ARGB FBConfig as nonconforming to prevent drivers and apps from + falling over. + Add @GLX_DEFINES@ so GLcore gets compiled with TLS support if configured. + Only destroy the mesa buffer if it got initialized. + +commit 08e319091fae7a60ae9fa757659cfde2966af9e9 +Author: Egbert Eich +Date: Thu Mar 30 18:53:41 2006 +0000 + + Added notice to last ChangeLog entry + Fixes for some vsw4 failures on 64bit BE platforms such as PPC64 and s390x. + Provided by Hong Bo Peng of IBM (slightly modified). Patches try to + resolve some of the careless mixtures of ulong and uint (which are + different size on + 64bit). > This patch will break the driver ABI! < Bugzilla #6438. + +commit 9da1d2257d02155cc8b4541cf5fcb4e64d756945 +Author: Egbert Eich +Date: Thu Mar 30 18:48:11 2006 +0000 + + Fixes for some vsw4 failures on 64bit BE platforms such as PPC64 and s390x. + Provided by Hong Bo Peng of IBM (slightly modified). Patches try to + resolve some of the careless mixtures of ulong and uint (which are + different size on + 64bit). Bugzilla #6438. + +commit 6d7ad353bafe914f0b50887daaeaae89ada6ebd3 +Author: Kristian Høgsberg +Date: Thu Mar 30 18:29:53 2006 +0000 + + Regenerate these files using updated scripts to avoid unused variable + warnings. + +commit 2153fa97482bae5737def3ecd4fe1cdc03834991 +Author: Eric Anholt +Date: Thu Mar 30 05:24:27 2006 +0000 + + Bug #2986: Add PutImage acceleration for the ZPixmap, planeMask ~= + FB_ALLONES, bitsPerPixel >= 8, GXcopy cases. With the radeon driver on + my machine, this gives about 10% speedup in PutImage + 10x10 and 500x500, and 40% speedup for 10x10 ShmPutImage, up to 65% + improvement in 500x500 ShmPutImage. Also fixes a crasher in GetImage + that slipped in at the last minute. + +commit 3cf46cc1e32efc0e4be1d88be111ba0438e0f021 +Author: Eric Anholt +Date: Thu Mar 30 05:15:58 2006 +0000 + + Add an UploadToScreen implementation, for testing PutImage support, and + make the DownloadFromScreen more robust. + +commit e799dd68e2bd0fa8ac3c344111fb12e1f32d4c10 +Author: Eric Anholt +Date: Wed Mar 29 22:25:17 2006 +0000 + + Bug #2986: Add acceleration of GetImage using DownloadFromScreen for the + ZPixmap, planeMask ~= FB_ALLONES, bitsPerPixel >= 8 case. I'm pretty + convinced that this is the only case that we care about at all. Tested + with xwd -root and xwd on a gnome-terminal, in a composited environment + or not. + +commit 4bb5ab0b4453208573b91b334940f190a8f7210a +Author: Eric Anholt +Date: Wed Mar 29 22:03:18 2006 +0000 + + Add a DownloadFromScreen implementation, used for testing GetImage + acceleration, and set the migration scheme to Always on init (since + this is all for testing, and Always should make migration happen more + frequently than Greedy). + +commit e31e8ace1043eab340d6b60a6e98b23ebf102786 +Author: Deron Johnson +Date: Wed Mar 29 17:51:54 2006 +0000 + + Fix composite overlay window bug 6411 + +commit ff6f88348c7498e83b0b143ef3737fd6eb0995e4 +Author: Adam Jackson +Date: Wed Mar 29 01:05:09 2006 +0000 + + More warning cleanup. + +commit 52d9ce7f4fc599d30dec2e61fc1720597043d91c +Author: Kristian Høgsberg +Date: Tue Mar 28 21:45:14 2006 +0000 + + Fix another typo. + +commit 7df64898eac46a487e8eab2af7213d133b9ca419 +Author: Kristian Høgsberg +Date: Tue Mar 28 07:46:04 2006 +0000 + + Fix a couple of typos. + +commit bd283c2464e2c0e1fd0aca1dedff0f39c2564c34 +Author: Aaron Plattner +Date: Tue Mar 28 07:21:50 2006 +0000 + + Add a new export, LoaderGetABIVersion. This function allows modules to + query the versions directly instead of having to guess. Bug #6416: Add + LoaderGetABIVersion. + +commit a06342eccc76035ff859fee4d283b288c90ee923 +Author: Kristian Høgsberg +Date: Tue Mar 28 02:57:07 2006 +0000 + + Add --enable-glx-tls ./configure option to enable use of TLS for storing + current GL context. Use this option to let AIGLX load DRI drivers + compiled for TLS. + +commit 77531dfb9f9f3ca0e38ad0555ee3735d6f28cf19 +Author: Adam Jackson +Date: Tue Mar 28 01:22:01 2006 +0000 + + Silence some editorializing in the configure help text. + +commit 7deaaa797cf8e7ca71e9b34fa6f413d1ed2b3dab +Author: Adam Jackson +Date: Tue Mar 28 01:21:00 2006 +0000 + + Big old pile of warning fixes. + +commit 7342dbe4b2108827eaf30993ceeecbd828da2290 +Author: Adam Jackson +Date: Tue Mar 28 00:18:31 2006 +0000 + + Remove long-dead screen region code. + +commit 0e88cefbfecbff0c7dd606ce0caca840f45cbc0d +Author: Daniel Stone +Date: Mon Mar 27 23:03:47 2006 +0000 + + Prune XKB code to only what we need to run the server. Remove dead + !XKB_IN_SERVER codepaths. Remove HAVE_CONFIG_H codepaths. + +commit 5be8a66d324f3d5840b134ad29069eace64e6f12 +Author: Daniel Stone +Date: Mon Mar 27 22:28:32 2006 +0000 + + Fix remnants of previous busted _XkbStrCaseCmp commit. + +commit 9e202dfe40e2bdd66f461a6ba531e927f82096ae +Author: Daniel Stone +Date: Mon Mar 27 22:25:56 2006 +0000 + + Remove remnants of XkbCF code. + +commit 7257590651328f89d23e80da1ec6241542a660cd +Author: Daniel Stone +Date: Mon Mar 27 21:15:06 2006 +0000 + + Move XFree86 DDX XKB actions into dixmods. + +commit d7b9e2b0e9d6889ea6b05e63892e612f4e5f19f5 +Author: Daniel Stone +Date: Sat Mar 25 23:09:50 2006 +0000 + + Bug #3819: Remove open-coding of strcasecmp. + +commit b3570dd94aa72f94e537a17680150e91e7712f5a +Author: Daniel Stone +Date: Sat Mar 25 22:37:58 2006 +0000 + + Remove INITARGS braindamage, change to void; add XkbExtensionInit prototype + to xkb.h. Explicitly initialise nTypes in xkb.c. + +commit 1ef60ce8ebb681b3cfb5e515be5c187c0442dcda +Author: Daniel Stone +Date: Sat Mar 25 22:35:48 2006 +0000 + + Really remove all DDX pre-config code. + +commit ec10f70b2114e5369a5b2f34b084dcf55634dcb4 +Author: Daniel Stone +Date: Sat Mar 25 21:52:49 2006 +0000 + + Remove XkbCF DDX configuration code. + +commit aae4238360b842ac34dc8ee16e165a1821f9a801 +Author: Daniel Stone +Date: Sat Mar 25 20:17:58 2006 +0000 + + Fix two glaring unconditional-NULL-dereferences. + +commit a68c11bb1d7c5419004a1714e49dffac57304e78 +Author: Adam Jackson +Date: Sat Mar 25 19:52:05 2006 +0000 + + Mark everything in xf86sym.c as _X_EXPORT. + +commit ae935832facfa81a9689882406ecca74b0346790 +Author: Fredrik Höglund +Date: Fri Mar 24 20:50:13 2006 +0000 + + Refactored the screensaver and DPMS timer code to use the screensaver timer + for both screensaver and DPMS. Removed the SetDPMSTimers() and + FreeDPMSTimers() functions. + +commit d1746ec0f0c8a0b750f390e7a7faf21b67683f4a +Author: Kristian Høgsberg +Date: Fri Mar 24 17:58:39 2006 +0000 + + Make sure DRI module is loaded before calling DRI functions. + +commit f1616508c95d12dfaad2cfd61b40228b3dba6f60 +Author: Alan Coopersmith +Date: Thu Mar 23 23:54:08 2006 +0000 + + Add ast driver/pci id (Carl Switzky, Sun Microsystems) + +commit 6d2896b384e17512e8f12036daabcd575d21f804 +Author: Kristian Høgsberg +Date: Wed Mar 22 22:49:52 2006 +0000 + + Improve error logging. + +commit 5449634e3c9428005aba5b3322ced7e86c62f185 +Author: Søren Sandmann Pedersen +Date: Wed Mar 22 21:37:49 2006 +0000 + + Wed Mar 22 16:28:46 2006 Søren Sandmann + Use inline assembly for copy area, since gcc doesn't generate movq + instructions. + +commit 5b3084c64f7bd1232603ffb3e985600b8d045453 +Author: Søren Sandmann Pedersen +Date: Wed Mar 22 21:13:08 2006 +0000 + + Wed Mar 22 16:05:09 2006 Søren Sandmann + Use inline assembly for solid fills, since gcc doesn't use the movq + instructions. + +commit a08e5e0c68baaf85b0fc3ecde74a6bcf80bcd4bf +Author: Søren Sandmann Pedersen +Date: Wed Mar 22 18:44:26 2006 +0000 + + Wed Mar 22 13:42:44 2006 Søren Sandmann + Patch by Keith Packard to make sure redirected windows don't get considered + "FullyObscured". + +commit 966d93ef6d1f2ed02f3b81b5bf5a1ebbdd48c93d +Author: Kristian Høgsberg +Date: Tue Mar 21 22:54:38 2006 +0000 + + Make the server distcheck and tag 1.0.99.1 snapshot. + Bump CVS version to 1.0.99.1. + Distcheck fixes. + +commit 8e3ad87d01c102591c7dc25614f6ac10e444a1b1 +Author: Kristian Høgsberg +Date: Tue Mar 21 22:32:13 2006 +0000 + + #include indirect_dispatch to get prototypes for FBO functions. + Fix a couple of warnings. + +commit dcc43d57cbe9d2b65384fe9ba2e4e4fbb43cb0a1 +Author: Donnie Berkholz +Date: Mon Mar 20 20:10:29 2006 +0000 + + Finish glx_ansic.h wrapper changes to make Xvfb and Xnest link again. + +commit 9509c6799e31e96677b6d07bdf24ea91ddd30020 +Author: Adam Jackson +Date: Mon Mar 20 19:32:18 2006 +0000 + + dead file removal + +commit 61a020265c5915e3d671d5b2047b81a5d15594c3 +Author: Adam Jackson +Date: Mon Mar 20 18:43:18 2006 +0000 + + Bug #5549: Fix build for sparc64. (Matthieu Herrb) + +commit 6eb4e2303aaab8d64e3f6cbc0bbee55689bdcb82 +Author: Adam Jackson +Date: Mon Mar 20 14:01:05 2006 +0000 + + Bug #6213: Check geteuid's return value, not its address, otherwise + unprivileged users can set the modulepath and run arbitrary code. Patch + from Matthieu Herrb. (CVE-2006-0745, Coverity #4) + +commit 8c1bb37d0649b269b78c457b8b41ff59a41d89af +Author: Daniel Stone +Date: Fri Mar 17 08:55:07 2006 +0000 + + Typo fix, reindent. + +commit 2d2d38d17cc2558f8a41166a4a1578bc4c663c37 +Author: Kristian Høgsberg +Date: Fri Mar 17 01:47:25 2006 +0000 + + Check for glproto when building GLX and make sure we have at least 1.4.6. + Drop glx_ansic.h wrapper and call xalloc, xrealloc, xfree and str-funcs + directly. + +commit 2c11cde3367fcd22740b577a4364b1e41cf3e1d2 +Author: Kristian Høgsberg +Date: Fri Mar 17 00:35:18 2006 +0000 + + More patches from David Reveman: + Add GL_ARB_texture_non_power_of_two, GL_EXT_framebuffer_object and + GL_NV_texture_env_combine4 extensions. + Add __GLXcontext destructor and flush context cache there and on + loseCurrent. + Chain back to new __GLXcontext destructor. (__glXMesaContextForceCurrent): + Set render table on forceCurrent. (init_screen_visuals): Index pVis + array correctly. (GlxGetMesaProvider): Add this. + Hook up FBO marshalling. + +commit 14aafc258cd774cf937f9798a888c2d3c97ccacf +Author: Eric Anholt +Date: Thu Mar 16 18:43:55 2006 +0000 + + Change EXA so that exaMoveOutPixmap() retains the framebuffer copy of the + pixmap, and damage is tracked so that a later exaMoveInPixmap won't + result in an upload if no upload is necessary. This will likely improve + the performance of the "Always" migration scheme significantly, and is + a step in the path to more exact damage tracking between framebuffer + and system memory. + +commit d0d336efd58896718f31a400651bacd9b769fb5a +Author: Daniel Stone +Date: Thu Mar 16 16:29:17 2006 +0000 + + Add support for ZX2 PCI-E local bus adaptors. (Alex Williamson, HP) + Use soft timeout register to avoid MCAs when probing for non-existent local + bus adaptors on ZX2. (Alex Williamson, HP) + +commit 175980580e572745a9a381b4432e3ba0457d3ba3 +Author: Adam Jackson +Date: Wed Mar 15 23:05:53 2006 +0000 + + Bump to requiring fixesproto >= 4.0 and compositeproto >= 0.3. + +commit 6fe377af5a82deb6f8b0f3b75414335e7845caac +Author: Matthieu Herrb +Date: Wed Mar 15 21:25:38 2006 +0000 + + - OpenBSD needs -Wl,-export-dynamic to export symbols from main executable + to modules. + - Probe for OpenBSD aperture driver and define HAS_APERTURE_DRV + accordingly. + +commit 21f7f2fb113ee4f9cd011c3cc2d45d43bbdd35fa +Author: Felix Kuehling +Date: Wed Mar 15 18:43:32 2006 +0000 + + Enable correct handling of the BTS instruction (opcode 0f ab) The code was + there but #ifdefed out. Insead of BTS, BT was executed. This patch + enables the BTS function and hooks it up the the correct opcode. (ATI + Technologies Inc.) + +commit b726aa502a871c700bc42b5325abf2c6820ff756 +Author: Felix Kuehling +Date: Wed Mar 15 18:37:44 2006 +0000 + + Update to build against Mesa CVS HEAD. + +commit c74464d92cd673ff0669375757caab798cc57e95 +Author: Eric Anholt +Date: Wed Mar 15 16:59:45 2006 +0000 + + Don't let pinned pixmaps get migrated in when using the "Always" migration + scheme. This notably keeps the visible screen from getting migrated in + to a new location in framebuffer. + Reported by: Michel Dänzer. + +commit b9c43cde1e368903786977b06368d5e36db9ffe8 +Author: Adam Jackson +Date: Wed Mar 15 16:56:10 2006 +0000 + + Coverity #1042, 1043: Nuke some dead variables. + +commit 5e106a71b9f8077216d41619402952b0005dd8a4 +Author: Adam Jackson +Date: Wed Mar 15 16:49:04 2006 +0000 + + Coverity #807: Fix a memory leak in XFixesExpandRegion. + +commit a3ef63696cac950b2520e7c85564befc0a830fde +Author: Adam Jackson +Date: Wed Mar 15 16:36:31 2006 +0000 + + Coverity #490: Fix a range check in xf86vidmode extension. + +commit 152090ce442e94de1ae920208a92931af6493c8c +Author: Adam Jackson +Date: Wed Mar 15 16:33:12 2006 +0000 + + Coverity #487: Check version number correctly. + +commit 72cc6307257fcbb800267464487bf918ee674328 +Author: Adam Jackson +Date: Wed Mar 15 16:32:05 2006 +0000 + + Coverity #491: Check version number correctly. + +commit 460f2ea4a594a53536f34c4ad27795fceec50bcc +Author: Adam Jackson +Date: Wed Mar 15 16:21:04 2006 +0000 + + Coverity #794: Fix a highly unlikely memory leak. + +commit 116d158e85ec43577ff69aeb3271ab1f888500c9 +Author: Adam Jackson +Date: Wed Mar 15 16:16:24 2006 +0000 + + Coverity #269: Compare the requested ABI class against the ABI class of the + module, not the module class. + +commit d8221a9b70a11606a0f7e1f69afee6049d7f182f +Author: Adam Jackson +Date: Wed Mar 15 16:11:34 2006 +0000 + + Coverity #484: Fix an off-by-one in module refcounting. + +commit 6bb2dc02a7cffd6ed7dd28e88d584920a4150749 +Author: Adam Jackson +Date: Wed Mar 15 16:01:47 2006 +0000 + + Coverity #337: Remove useless NULL check. + +commit 1e5c0842af99027cc6c30a16f967d8b60c9a894d +Author: Adam Jackson +Date: Wed Mar 15 15:34:57 2006 +0000 + + Coverity #1053: Nuke a dead variable. + +commit 7314d16cde4c3f99d9d9f1d539f0c5ff4942e653 +Author: Benjamin Herrenschmidt +Date: Wed Mar 15 03:18:42 2006 +0000 + + Fix DRIExtensionInit() to not register callbacks when it hasn't been + initialized for the current server generation. Fixes a problem where it + would use stale private index and blow up in colorful ways if no driver + called DRIScreenInit() on the second generation (which happens due to a + bug in radeon that i'll fix separately). Note: clearing the index in + DRIReset() wouldn't work as DRIReset() is called before the + CloseScreen() chain + +commit 02d80a0de93f7592e69065b0fbe5820dcdebdb44 +Author: Benjamin Herrenschmidt +Date: Wed Mar 15 03:12:32 2006 +0000 + + Make xf86 linear allocator smarter when dealing with alignment constraints + when falling back to X/Y allocations. Fixes various problems of Xv + allocation failures, notably with "nv" driver. + +commit c1601717d536419693b3ef6e8a3d69b9f2fdc2b3 +Author: Eric Anholt +Date: Wed Mar 15 01:20:08 2006 +0000 + + Add a new migration scheme, "always", which will move pixmaps to their + desired location always (unless they don't fit in FB, in which case + they all get moved out for software rendering). The default remains as + before, but can be controlled by the MigrationHeuristic xorg.conf + option (which is intentionally not documented, as it may be + short-lived). This is part of the exa-damagetrack work, which appears + stable in testing with fakexa, unlike the work as a whole. + +commit a90cff266cc81993ed804fb320c1dbfe5e0d4787 +Author: Eric Anholt +Date: Wed Mar 15 00:13:52 2006 +0000 + + Add more doxygen documentation, including notes on WaitMarker() and + MarkSync() that I noticed were needed while reading the VIA driver. + +commit 693e42114f1127528448126d78a5209dd1198d8d +Author: Eric Anholt +Date: Tue Mar 14 21:30:12 2006 +0000 + + Move migration logic to a new function, exaDoMigration(). This is largely a + manual conversion to allow for different migration schemes to be + implemented reasonably, but does include some minor improvements such + as accounting for pinned pixmaps not being acceleratable, and for our + current GetImage and GetSpans not being accelerated. + +commit d30905478078036383977ae9d4a3685c2e2c642f +Author: Eric Anholt +Date: Tue Mar 14 20:38:06 2006 +0000 + + Pull code for getting the (0,0) pixel from a pixmap out to a separate + function, since it gets repeated (with bad error handling, in one + case). + +commit 01aa209f2056ef04e3f2735756a0f8b4a67a3d87 +Author: Kristian Høgsberg +Date: Tue Mar 14 19:32:27 2006 +0000 + + Bail out early if screen doesn't support DRI. + +commit 0cc34266d6e84bb491fcf9aa74e34615b2fca4fc +Author: Deron Johnson +Date: Mon Mar 13 22:43:42 2006 +0000 + + Updated ChangeLog for my latest composite and xfixes changes. + +commit 450018f48b2796345a4eaccbb94c1971ebd30114 +Author: Deron Johnson +Date: Mon Mar 13 21:59:55 2006 +0000 + + Part 3 of 3 (Other parts are in proto and lib) Composite Version 0.3: + CompositeGetOverlayWindow, CompositeReleaseOverlayWindow Xfixes Version + 4.0: XFixesHideCursor, XFixesShowCursor + +commit e5956f49b217b0ee9c9f35b6a58f339a8d22b1d7 +Author: Kristian Høgsberg +Date: Mon Mar 13 01:54:59 2006 +0000 + + First batch of AIGLX fixes from David Reveman. + Add getter for Mesa provider. + Export this for Xgl. + Move resource tracking out of drawable constructor to allow wrapping. + Use corrent reply size #define. + Add this function. (DoGetDrawableAttributes): Fix array length. + +commit eb63e50d95da4e1e08fc6fcec46ac63d5e3b7bf4 +Author: Matthieu Herrb +Date: Sun Mar 12 17:14:03 2006 +0000 + + Fix build when AIGLX is false. + +commit 9ed3463450469c3108e0be7e4baabc0a403a78b2 +Author: Eric Anholt +Date: Sun Mar 12 03:04:52 2006 +0000 + + Improve doxygen formatting, and attempt to clarify the 1:1 ratio of + successful PrepareCopy()s to DoneCopy()s. + +commit 9a7fba5fd07c8831d0acab8d901605de537ae273 +Author: Eric Anholt +Date: Sun Mar 12 03:02:26 2006 +0000 + + Make exaCopyNtoNTwoDir() call DoneCopy() at the end of each string of + consecutive Copy() calls (rather than exactly once at the end of the + function). + Reviewed by: jbarnes + +commit c3342c8000f6d2bfb61e2cf95e028d11b59698fa +Author: Kristian Høgsberg +Date: Sun Mar 12 00:11:34 2006 +0000 + + Merge accel_indirect branch to HEAD. + +commit b1b731c28630965d9e2defe62d1108270dc8264c +Author: Alan Coopersmith +Date: Sat Mar 11 02:43:51 2006 +0000 + + Fix buffer size checks to prevent 2-byte buffer overflows. (Coverity #480, + #481, #482, #483) + +commit fc0772de36315f19f5b57220db69f48a3b1fdc9a +Author: Alan Coopersmith +Date: Sat Mar 11 02:10:14 2006 +0000 + + Add HAS_MMAP for Xvfb + Fix Xvfb option parsing to exit on bad arguments, not just issue error + messages and continue on. (Coverity #492) + +commit f2ecbb30187000547a98ca7cbaee433ea4ba8fe3 +Author: Alan Coopersmith +Date: Sat Mar 11 01:58:32 2006 +0000 + + Pass sizeof the correct buffer to XmuSnprintf. (Coverity #489) + +commit d6955798489813ef77cca13cf5f5c67d49e6dece +Author: Eric Anholt +Date: Fri Mar 10 21:36:24 2006 +0000 + + If fakexa is enabled, create a larger buffer in the Ximage, but keep the + same width/height for front-buffer drawing. The fakexa code then uses + this extra space for offscreen pixmaps. Note that this tones down the + absurdity of fakexa's offscreen pixmap alignment requirements (odd + alignment is too weird, so stick with "24", which is still strange but + exists out there). It also fixes a couple of bugs in the fakexa + implementation revealed by using offscreen pixmaps. + +commit 5b1a7b478f072f56e836f2d4c0fbc1985842e2bb +Author: Eric Anholt +Date: Fri Mar 10 21:32:34 2006 +0000 + + Move the exaDrawableDirty in exaPrepareAccess to exaFinishAccess, which is + after the drawing is done. Previously, a failed PrepareAccess could + have migrated and cleared the dirty flag before the damage was ever + done. + +commit ffdbb547becc71f1cfdd035d0d6c71539f185fb1 +Author: Eric Anholt +Date: Fri Mar 10 08:06:42 2006 +0000 + + Coverity #1011: Remove a useless NULL check on a pVbe that had been + dereferenced many times before. + +commit 1bc72dce5f8bc40e369e69b684816fdaaa07da43 +Author: Eric Anholt +Date: Fri Mar 10 08:03:24 2006 +0000 + + Coverity #857: Fix resource leak in error path by freeing earlier. + +commit 55f677d600370b19d62ef821025481f2be6f5edb +Author: Eric Anholt +Date: Fri Mar 10 07:58:27 2006 +0000 + + Coverity #813, #814, #815, #816: Fix resource leaks in error paths of + config parsing code. + +commit 2bd41105496b729395fbcf97f09581eb0efb3510 +Author: Eric Anholt +Date: Fri Mar 10 07:45:25 2006 +0000 + + Document the restriction on PrepareAccess() failure, from discussion with + benh. + +commit 21dcd0304879f38ea8ea01ba88e7cc7783771adf +Author: Jeremy C. Reed +Date: Fri Mar 10 01:34:45 2006 +0000 + + Just like FreeBSD, let DragonFly's default mouse Device be /dev/sysmouse + (since /dev/mouse don't even exist by default). + +commit 9a99afdfb292f303f914039952fdd772eed9e03a +Author: Jeremy C. Reed +Date: Fri Mar 10 01:22:26 2006 +0000 + + Add DragonFly support. (It is like FreeBSD.) + This patch is from DragonFly developer Joerg Sonnenberger and the pkgsrc + collection. + I tested using /dev/sysmouse with moused using my serial /dev/cuaa0. + +commit 7a0f7f739804bc7d9c5562701abee8d134878977 +Author: Eric Anholt +Date: Thu Mar 9 23:29:44 2006 +0000 + + Coverity #349: Fall back to software early if pSrc->pDrawable is NULL, or + pMask is non-NULL but pMask->pDrawable is NULL. This prevents NULL + dereferences on gradients and other Pictures which have no pDrawable. + +commit 8a3ff42abb726d1604af39b4653ede5f760b7e69 +Author: Eric Anholt +Date: Thu Mar 9 23:25:35 2006 +0000 + + Commit changes missed in last commit (mis-typed path and didn't notice): Do + a first pass of doxygen documentation of EXA. This removes the + corresponding pieces of exa-driver.txt, which were becoming stale. + Hopefully the documentation will stay much more up-to-date this way. + Many thanks to jbarnes for writing exa-driver.txt which was used a lot + in writing this documentation. + +commit ab35c3fbc135bafdfc5057ef5d6227ca3534ed26 +Author: Eric Anholt +Date: Thu Mar 9 23:18:15 2006 +0000 + + Do a first pass of doxygen documentation of EXA. This removes the + corresponding pieces of exa-driver.txt, which were becoming stale. + Hopefully the documentation will stay much more up-to-date this way. + Many thanks to jbarnes for writing exa-driver.txt which was used a lot + in writing this documentation. + +commit d8f8bfeccef0750d79f852b9ae7152e841227d5a +Author: Matthias Hopf +Date: Thu Mar 9 14:23:57 2006 +0000 + + Do Xorg configure checks for Xgl only as well + +commit 2822cbc1fb2271844e7ae10c3629aaa940ae4042 +Author: Eric Anholt +Date: Thu Mar 9 06:04:07 2006 +0000 + + Rearrange EXA driver structures so that there's a hope of maintaining ABI + when extending the driver interface. The card and accel structures are + merged into the ExaDriverRec, which is to be allocated using + exaDriverAlloc(). The driver structure also grows exa_major and + exa_minor, which drivers fill in and have checked by EXA + (double-checking that the driver really did check that the EXA version + was correct). Removes exaInitCard(), which is replaced by the driver + filling in the rec by hand, and the exaGetVersion() and related + EXA_*VERSION which are replaced by always using the XFree86 loadable + module versioning. + +commit 65aa33f9173b1554924437685698f7c5f645a3c4 +Author: Lars Knoll +Date: Wed Mar 8 06:19:37 2006 +0000 + + render/picture.c Initialize the format of a source picture to + PICT_a8r8g8b8. Fixes a failure in the gradients test of rendercheck. In + the long term we could do better by setting the format to something + without alpha whenever the gradient doesn't contain colors with alpha. + This triggers a reduction of the over operation to a pure source + operation. + +commit cb5090e8d60f4e9780c859faeea5c24587f6bee7 +Author: Eric Anholt +Date: Wed Mar 8 03:32:07 2006 +0000 + + Bug #6150: Do the obvious fix of an insane sanity check in + xf86InitFBManager. (Julio M. Merino Vidal) + +commit 2e6f801fe1a749f6a4db2cfd8a43abec5caceae0 +Author: Ian Romanick +Date: Tue Mar 7 23:58:22 2006 +0000 + + Numerous amounts refactoring and comment adding (see ChangeLog for file by + file details). The primary intention for these changes is to pave the + way for the new device probing and PCI configuration code that I'm + working on. + +commit b7d2dfc1e5e07051732303731ff3e4e76852dd94 +Author: Eric Anholt +Date: Tue Mar 7 20:06:15 2006 +0000 + + Add appropriate MIT license. Oops. + +commit 9d8c0e4bcbb111e860b7c3c33c224c22589006b1 +Author: Eric Anholt +Date: Tue Mar 7 19:57:46 2006 +0000 + + Add a new flag to ephyr, "-fakexa", which turns on an EXA acceleration + implementation that calls fb to get its work done. The purpose is to + have a trusted EXA driver for use with testing changes to the core of + EXA. However, fakexa has not received much testing yet, lacks offscreen + pixmaps support, and doesn't reliably provide garbage when EXA doesn't + get its syncing right. All of these should be fixed soon. + +commit 0a3d6c739968bf5af81fc0e8ea7211c20d52080b +Author: Eric Anholt +Date: Tue Mar 7 19:49:31 2006 +0000 + + Remove stale EXA files, which failed to get removed during the move to + top-level, somehow. + +commit 68a8963f726cb92624665669813b6d952d53556e +Author: Luc Verhaegen +Date: Tue Mar 7 16:00:57 2006 +0000 + + Fix cvt -r check again. CH7011 TV encoder had 800x600 PAL hit the check. + +commit 0693083335185ce05ee64546151f3fc43ce98575 +Author: Lars Knoll +Date: Mon Mar 6 21:00:09 2006 +0000 + + render/picture.c Correctly initialize devPrivates variable in source only + pictures to 0 + miext/cw/cw.h Don't try to access devPrivates of source only pictures + +commit 448997ebcd2bab02be1059b07b91b63b0d05d268 +Author: Matthieu Herrb +Date: Sun Mar 5 16:43:10 2006 +0000 + + Only output SetClientVersion message if verbosity > 1, like other + extensions do + +commit d921173833cc207380eb08b6675393f5e8139d5f +Author: Matthieu Herrb +Date: Sun Mar 5 16:35:08 2006 +0000 + + define SYS_LIBS to hold system dependant libraries that may needed. and add + it to libraries list where needed. Update ChangeLog for previous + changes too + +commit 82cbd2ee0d20225b9edbb5246c8ed116b4614e1a +Author: Matthieu Herrb +Date: Sun Mar 5 16:33:17 2006 +0000 + + Don't hard-code -DUSE_DEV_IO here. configure generates the proper OS + specific values here. + +commit b56a1513d27f84dcd55f3dc6053f183aa6f7855b +Author: Matthieu Herrb +Date: Sun Mar 5 16:32:40 2006 +0000 + + Definitions for bswapxx() macros on OpenBSD. + +commit 4335868476af7c821c64def52b102b93ae91f8b0 +Author: Matthieu Herrb +Date: Sun Mar 5 16:13:21 2006 +0000 + + Fix build with non GNU make. + +commit b2f8f410c0bb8bc24039b2a593f8a2a483659914 +Author: Alan Hourihane +Date: Fri Mar 3 09:54:54 2006 +0000 + + https://bugs.freedesktop.org/show_bug.cgi?id=4341 Make Xming error messages + more meaningful. + +commit 29237c1977e454511e0d0244c68d34d572b68458 +Author: Alan Hourihane +Date: Fri Mar 3 09:50:55 2006 +0000 + + https://bugs.freedesktop.org/show_bug.cgi?id=4538 Fix mouse button release + on multiwindows scrolling. + +commit 06f01623fde61f1a11c2c1ecfae6a4c346473b05 +Author: Alan Hourihane +Date: Fri Mar 3 09:43:42 2006 +0000 + + https://bugs.freedesktop.org/show_bug.cgi?id=5138 Check for NULL pointer + +commit 054c291b274b238893e408e070aef13a7933400b +Author: Felix Kuehling +Date: Thu Mar 2 18:35:08 2006 +0000 + + Fix build against Mesa CVS HEAD: added s_blit.c to symlink-mesa.sh. + +commit c1a82b9554028640dc4e08f042f1a8faf3372627 +Author: Brian Paul +Date: Thu Mar 2 03:43:26 2006 +0000 + + added s_blit.c file + +commit 5f4d11c8d926cf396e0a8e203e14a8e1e123e011 +Author: Jesse Barnes +Date: Wed Mar 1 16:31:53 2006 +0000 + + fix spelling error, document EXA_TWO_BITBLT_DIRECTIONS device flag + +commit 044a3abb382a4850722c391f04d09d3160790814 +Author: Jesse Barnes +Date: Wed Mar 1 16:28:34 2006 +0000 + + Add accelerated two directional blt support to EXA + +commit 96ca329382141fd50dccb1cc35a71a333d80bce4 +Author: Ian Romanick +Date: Tue Feb 28 23:07:09 2006 +0000 + + Remove redundant definition of struct Inst. Safeguard xf86AddDriver against + future additions to DriverRec. + +commit 1cfa9f647e0241f4b9e56556b128d7bfd987eaca +Author: Daniel Stone +Date: Tue Feb 28 16:55:26 2006 +0000 + + Bug #5216: Allow options to appear with other components. + +commit e3b6b95f29cb2ea00b4290d694c5e202b8d180ad +Author: Adam Jackson +Date: Tue Feb 28 16:26:16 2006 +0000 + + Bug #5627: Fix Xprint font symlinking. (TIlman Sauerbeck) + +commit e7f0b84fa7bd0c40cb456ec4e447103442c8dae3 +Author: Jesse Barnes +Date: Tue Feb 28 05:20:20 2006 +0000 + + fix exaInitCard by making it a real function + +commit 088e5768faa90fe16de41b135b1111b5d25c64ad +Author: Felix Kuehling +Date: Mon Feb 27 18:12:24 2006 +0000 + + Fixing the Mesa build again, sigh. Add slang_execute_x86.c. Add + -I../shader/slang to swrast INCLUDES. + +commit 345d99c972cac67f2cdc38750e4ba2dea1cdb360 +Author: Alan Coopersmith +Date: Mon Feb 27 16:19:39 2006 +0000 + + Typo fixes (Nicholas Joly, XFree86 bugzilla #1658) + +commit 6b08a5013b4e9e350ba461c9a59d30bb41feef8f +Author: Jesse Barnes +Date: Sat Feb 25 20:26:49 2006 +0000 + + EXA driver doc cleanups and additions. + +commit f41ec003f39c575299429897d4287233184583ad +Author: Roland Scheidegger +Date: Sat Feb 25 01:17:10 2006 +0000 + + Add two radeon pci ids (one is used for a radeon mobility X700 XL in a + medion notebook, the other is for a AIW X800 VE) + +commit 01a0bf881ada03ca3c27bdef7423c760c3bc2f9c +Author: Matthieu Herrb +Date: Fri Feb 24 17:01:57 2006 +0000 + + OpenBSD supports PCVT and WSCONS. PCCONS is long gone. + +commit d3e1587c20c155b7873b6646ddf0b96f806f8a7f +Author: Kristian Høgsberg +Date: Fri Feb 24 16:50:42 2006 +0000 + + file glxdri.c was initially added on branch accel_indirect_branch. + +commit 5d9a620726d2b0ad89625574478d2fd4536485b0 +Author: Adam Jackson +Date: Thu Feb 23 19:25:57 2006 +0000 + + Remove redundant composite op reduction, done in Render now. + +commit 028d6903f674fa77617f333b25356710d1682b05 +Author: Alexander Gottwald +Date: Wed Feb 22 16:29:07 2006 +0000 + + Bug #5978: Added missing swap of input variables. Added missing cases for + GL_SECONDARY_COLOR_ARRAY and GL_FOG_COORD_ARRAY (Colin McDonald) + +commit 43324132afcbb6b231efcc24ec72ee44678d5771 +Author: Alexander Gottwald +Date: Wed Feb 22 16:08:56 2006 +0000 + + Added Mesa include directory + +commit 43fbcc28c960ce5abe1d3223441c3dc5a10cde27 +Author: Jeremy C. Reed +Date: Wed Feb 22 02:47:00 2006 +0000 + + Update to build against Mesa HEAD. (Thank you Felix for feedback on xorg + list.) + +commit cfdacab33a62b47f22bb54683e3ca20ec9824864 +Author: Ian Romanick +Date: Tue Feb 21 00:02:08 2006 +0000 + + Eliminate unused PCI BIOS reading functionality. The old code used several + function pointers to implement a level of flexability that was never + used. The code also had unused support for extracting a single image + type from a larger expansion ROM. + Fix the spelling of PCI_BIOS_OPEN_FIRMWARE. + Fix a couple errors in #ifdef debug code. + These changes have been tested on x86 and x86-64 Linux. + +commit 5fd0f94006775e2271107c960dfa3314dddd9a5f +Author: Ian Romanick +Date: Mon Feb 20 23:45:50 2006 +0000 + + Eliminate all the code for querying the PCI class from the PCI ID database. + Class information is not, and never has been, stored there. Therefore, + this is just a bunch of elaborate code to read 0x00000000. + This has received testing on x86 and x86-64 Linux. + +commit 6d7083bd69724586338d79784655328f1fcd2ae5 +Author: Adam Jackson +Date: Mon Feb 20 22:16:49 2006 +0000 + + indent fixes (OMG SO UGLY), and nuke old RCS keywords. + +commit 5480c537cee79b324736eac3e438a4713dfa1036 +Author: Adam Jackson +Date: Mon Feb 20 21:50:49 2006 +0000 + + ANSIfy Xi/. Mostly automated via protoize(1). + +commit cc42e153c2437fe9c94b0c20e1b56277474d94d0 +Author: Felix Kuehling +Date: Mon Feb 20 03:00:09 2006 +0000 + + Update to build against Mesa HEAD. + +commit ed3ea887a6b1c9fdc83895c40da34076121f05e9 +Author: Eric Anholt +Date: Thu Feb 16 21:49:51 2006 +0000 + + Fix the encoding of DES's name. + +commit ea0b3f65f77a78df1671b09739c00762a8875607 +Author: Eric Anholt +Date: Thu Feb 16 21:45:12 2006 +0000 + + Fix build of Xorg by putting xf86bigfont back into builtin instead of + module sources list. + +commit d97f29be22e22e6f5bc23229ffa5ef087f992c8c +Author: Eric Anholt +Date: Thu Feb 16 21:35:32 2006 +0000 + + Bug #5453: Don't forget to still do AM_CONDITIONAL for XVMC even if XV is + disabled, and also force XVMC disabled if XV is disabled. (Dag-Erling + Sm�rgrav) + +commit d33c2e0d1079f93f4ba8b28d19950d384a9e7c32 +Author: Keith Packard +Date: Thu Feb 16 19:36:39 2006 +0000 + + Add oscolor.h + +commit 60d4839a2d373cc6d8c0d5004284494d3a994a63 +Author: Keith Packard +Date: Thu Feb 16 19:03:07 2006 +0000 + + Forgot to include this file in previous patch + +commit 8987b2c1efc9a4667e278e6ba411772ba2a4a4e6 +Author: Keith Packard +Date: Thu Feb 16 07:17:31 2006 +0000 + + Make more extensions optional in build (for kdrive). Fix kdrive build for + actual hardware. Fix kdrive pointer signed/unsigned types. Add + kdrive-required YX rotation functions. Replace rgb text file loading + with static rgb color table. + +commit c8acb342695936db062c966029019a458d45459e +Author: Benjamin Herrenschmidt +Date: Thu Feb 16 06:52:12 2006 +0000 + + Fix an occasional crash on VT switches: the server would save a pointer to + the current cursor when disabling FB access and would try to restore + that cursor when re-enabling. However, that cursor might have been + destroyed in between. This fixes it by updating the saved cursor + pointer when a cursor is set and vtSema is FALSE. + +commit c845e152f52b3e8cef579797c5c8834ad2fd2cd5 +Author: Eric Anholt +Date: Thu Feb 16 05:46:08 2006 +0000 + + Bug #5871: Drop special build infrastructure left over from libcwrapper + times. (George Fufutos) + +commit c2f685e64464ccf86ed47ae37f74bf46877e0739 +Author: Dave Airlie +Date: Thu Feb 16 05:18:20 2006 +0000 + + Fix XSERVER64 should be _XSERVER64 + +commit 1bbd5e49b1dcc2e3f9785bd2bb58f946b9998099 +Author: Eric Anholt +Date: Thu Feb 16 04:59:45 2006 +0000 + + Bug #5869: Remove traces of EXTMODULE define, which doesn't appear to be + useful any more. (George Fufutos) + +commit c03b06bdf04fa8500d0f85314c7268848b4d50be +Author: Eric Anholt +Date: Thu Feb 16 04:39:00 2006 +0000 + + Bug #5888: Remove orphaned laymodule.c from miext/layer removal. (George + Fufutos) + +commit 3b32e902c7a12aa2320da27d984029cde28fd8c3 +Author: Eric Anholt +Date: Thu Feb 16 01:49:23 2006 +0000 + + Add entry missed in my last commit. + +commit c4767794ef5b014ae25fe8541e72348ecfb1ee49 +Author: Zephaniah E. Hull +Date: Thu Feb 16 01:03:09 2006 +0000 + + Export xf86ActivateDevice, used by the evdev driver. + +commit dc0354104cb4057dfcc7b2ccb8e2ae8474d70b15 +Author: Eric Anholt +Date: Thu Feb 16 00:14:11 2006 +0000 + + Move EXA implementation up to the top level and remove its XFree86 + dependencies. It was nearly abstract enough already to be used by + multiple DDXes. This will be useful for EXA development through + providing a fake acceleration implementation within Xephyr, so that + testing can be done on new EXA code without worrying about buggy + drivers. + +commit c170aa830d0ce3dbff6b30081e04c3f91bf921be +Author: Eric Anholt +Date: Wed Feb 15 23:27:40 2006 +0000 + + Forced commit to note repocopy from hw/xfree86/exa/ + +commit 6770f1bdb145e7a6c431d0523f10d12155f58273 +Author: Eric Anholt +Date: Wed Feb 15 21:09:14 2006 +0000 + + Define NO_LIBCWRAPPER in dix-config.h, and rely on Mesa including + dix-config.h if DIX_HAVE_CONFIG_H is defined to get it and _XSERVER64, + instead of defining things like this per directory. + +commit 7d7fc927cd90146788780477b8e3379d91c3b910 +Author: Adam Jackson +Date: Wed Feb 15 20:47:44 2006 +0000 + + Remove a few #ifdef vms; whatever problem that was solving should assuredly + be solved some other way. + +commit f105b8da11fcf337512b3c39da3368f98da07a33 +Author: Adam Jackson +Date: Wed Feb 15 20:44:13 2006 +0000 + + Mark everything in dixsym.c as _X_EXPORT. + +commit 010d6effa6fa210251b12459882e88aeee82c2c0 +Author: Adam Jackson +Date: Wed Feb 15 19:15:32 2006 +0000 + + Mark everything in {ext,font}sym.c as _X_EXPORT. + +commit 3fe482c77e7b3e46739d011d8bbdee527d7a42fc +Author: Adam Jackson +Date: Wed Feb 15 19:05:55 2006 +0000 + + Mark everything in misym.c as _X_EXPORT. + +commit 6ad4325b87889e1aada9333d750b7bb586c38b52 +Author: Kristian Høgsberg +Date: Wed Feb 15 18:26:45 2006 +0000 + + Update to build against mesa head. + +commit 50e2ff9a2500078ebbd833fddab0d93f3a50b6a6 +Author: Eric Anholt +Date: Wed Feb 15 03:20:55 2006 +0000 + + Remove the waitSync from KdDisableScreen and push it off to drivers' + disableAccel hook, which is more correct anyway. This makes kdrive.c + not have any knowledge of kaa, opening the way for using exa from + kdrive. + +commit 0446aafa9467f43515fb578d50f45e2c3153c8cf +Author: Eric Anholt +Date: Wed Feb 15 03:07:23 2006 +0000 + + Avoid some more libcwrapper damage that prevented kdrive linking. + +commit 5c9b6f0fb01252d704de1bbdf3015dee7f956593 +Author: Benjamin Herrenschmidt +Date: Tue Feb 14 08:14:42 2006 +0000 + + DRIGetSecs() would call getsecs() when XFree86LOADER is defined, relying on + the wrappers to provide it. Wrapper gone, and getsecs doesn't exist on + linux so it now blows up. Fixes it by just calling gettimeofday() in + all cases instead. + +commit 049dca0f43eb2179d2c61033a17ff1a89f8fb689 +Author: Benjamin Herrenschmidt +Date: Tue Feb 14 08:11:41 2006 +0000 + + Remove useless line of code that contained a bug and triggered a gcc + warning. This variable will be overriden before being used anyway. + (Bugzilla #5595) + +commit 1132d0e6102d4564f70f0e8c98854e3acf25b109 +Author: Dave Airlie +Date: Tue Feb 14 06:27:59 2006 +0000 + + update to latest Mesa CVS HEAD + +commit bb8c36690ab411c11aa8dd3d4520d513eb8f9091 +Author: Alan Hourihane +Date: Tue Feb 14 04:20:37 2006 +0000 + + Bump shadow module version number to 1.1.0 from 1.0.0 + +commit cc9dfab0b31c7956f99d1f1b9c195065b5e18c29 +Author: Adam Jackson +Date: Mon Feb 13 18:57:38 2006 +0000 + + (Reverted) + +commit 83dd6241c8cd81e8d897bd17588ada92a945e647 +Author: Adam Jackson +Date: Mon Feb 13 18:55:44 2006 +0000 + + Reverted, did nothing anyway, I'm not smart today. + +commit 4a7f6f53cad541e8c5042a6472e3b3886fc9b7e6 +Author: Adam Jackson +Date: Mon Feb 13 18:09:51 2006 +0000 + + Further op reduction when both src and dst alpha are absent. + +commit 28ced9f3e0dd4bd81067f590a1d64ba0844edb06 +Author: Eric Anholt +Date: Mon Feb 13 05:29:00 2006 +0000 + + Add missing ChangeLog text for r1.2 of GL/glx/indirect_reqsize.h + +commit 4839e91fcab4c344e672154a447d8c7035fce1f4 +Author: Benjamin Herrenschmidt +Date: Mon Feb 13 05:03:13 2006 +0000 + + HAS_MKSTEMP vs. HAVE_MKSTEMP (From Fredrik Höglund) + +commit 1a4f20541a9f4f41f444d826d743899ea2dee2db +Author: Benjamin Herrenschmidt +Date: Mon Feb 13 04:56:27 2006 +0000 + + Fix linux build without libc wrappers (From Fredrik Höglund) + +commit 2dc7b5e0d96a187bfbb355caa788f0fdcd88eaad +Author: Benjamin Herrenschmidt +Date: Mon Feb 13 04:43:40 2006 +0000 + + Move call to xf86WrapperInit() to OsVendorInit() in xf86Init.c and remove + stubs in other DDX. + +commit 34d0b9228f46c2f87be74dddc9c7d97aab091d03 +Author: Eric Anholt +Date: Sun Feb 12 20:53:35 2006 +0000 + + Simplify ops that would use the alpha channel when an alpha channel is + always 1.0, and short circuit PictOpDst for good measure. + +commit 5f45776ef3b9256bea44842d1c50f269422531a1 +Author: Eric Anholt +Date: Sun Feb 12 10:30:47 2006 +0000 + + Add missing HAVE_DIX_CONFIG_H which caused issues with mismatched screen + structure interpretations, and remove a bunch of unused junk from + kdrive-config.h. Xephyr almost works on my amd64. + +commit 5249416d091d59c248c8dda44529b8aa4910b1a0 +Author: Eric Anholt +Date: Sat Feb 11 22:40:50 2006 +0000 + + Add stub xf86WrapperInits so that the servers will build even if os/ was + built with XFree86LOADER set. + +commit a2a5254675a6b7ef0f7da9caa76c028b7c526502 +Author: Alan Coopersmith +Date: Sat Feb 11 19:16:51 2006 +0000 + + Add , , and to clear undefined function + warnings after the removal of libcwrapper headers. + +commit d6337c83241f0fa4bb03039a9767b58d8a1a7c91 +Author: Alan Coopersmith +Date: Sat Feb 11 17:42:31 2006 +0000 + + -> so we can compile on non-BSD OS'es + +commit 4fafba61d5402d4e4d2c21ba1be3ed8969b99334 +Author: Eric Anholt +Date: Sat Feb 11 03:03:45 2006 +0000 + + Remove libcwrapper damage from GLX (requires fresh Mesa HEAD), and get it + compiling in kdrive. + +commit c3d14036729fd186d4ec7ca1de603e1f2d174e2f +Author: Eric Anholt +Date: Fri Feb 10 22:00:30 2006 +0000 + + Remove libcwrapper usage from xorg server modules. The libcwrapper is only + of (marginal) use in the drivers, and that usage remains. + +commit a8cec1b656f57746758613213de1d6e5acb79451 +Author: Eric Anholt +Date: Fri Feb 10 09:00:02 2006 +0000 + + Merge from kdrive: use RECT_PRIM to avoid tearing in xvideo. + +commit efc3fab7f4b29f56fffd21304c64c03a48aa5b4b +Author: Eric Anholt +Date: Fri Feb 10 07:52:05 2006 +0000 + + Make kdrive (i.e. Xephyr only) buildable on FreeBSD and probably other OSes + without linux VT switching, fbdev, and vm86 support. + +commit fa3a65e33d8c893c7867ea507afc7caa1361aa9c +Author: Eric Anholt +Date: Fri Feb 10 07:47:21 2006 +0000 + + Remove the include of X11/misc.h, which fails to compile and isn't + necessary. + +commit d875bdb2756b082ce93bd86016c369ea85c04d17 +Author: Jeremy C. Reed +Date: Fri Feb 3 02:44:19 2006 +0000 + + hw/xfree86/os-support/xf86_OSlib.h Fix sysmouse handling on DragonFly, + mostly garbage arrived. From Joerg Sonnenberger. + +commit 0946bb9427695a4314e5c43de573b3a75a18e466 +Author: Jeremy C. Reed +Date: Fri Feb 3 02:37:52 2006 +0000 + + Fix sysmouse handling on DragonFly, mostly garbage arrived. From Joerg + Sonnenberger. + +commit 5e2a7af23bd0f46fbddca34098cb297be58b7a55 +Author: Eric Anholt +Date: Thu Feb 2 21:07:06 2006 +0000 + + Move the frequently-repeated code to get the pixmap that backs a drawable + to a new function, exaGetDrawablePixmap(). + +commit ee3c7ccb175752dbeaed6b0113d0819b3fcd2398 +Author: Eric Anholt +Date: Thu Feb 2 20:51:54 2006 +0000 + + Remove more debugging leftovers. + +commit 3366b6836572461209bb2f8aa28d9e662067dc54 +Author: Eric Anholt +Date: Thu Feb 2 20:09:14 2006 +0000 + + Rearrange and rename EXA code to be a bit more logically organized. Also + removes a little bit of debugging leftovers. Summary: + exa.c -> exa.c (miscellaneous code) exa_accel.c (all acceleration code) + exa_migration.c (migration logic) exaasync.c -> exa_unaccel.c (software + fallbacks) exapict.c -> exa_render.c (render extension stuff) + exaoffscreen.c -> exa_offscreen.c exaPriv.h -> exa_priv.h + +commit 25d4ff870d49533d82a77f144722ff7934d52e0b +Author: Eric Anholt +Date: Thu Feb 2 20:04:15 2006 +0000 + + Forced commit to note repocopies: exa.c -> exa_accel.c exa_migration.c + exaasync.c -> exa_unaccel.c exapict.c -> exa_render.c exaoffscreen.c -> + exa_offscreen.c exaPriv.h -> exa_priv.h + +commit 2ab487d4d20e4e34e73cc6d87f41bf0836c7a8af +Author: Alan Hourihane +Date: Wed Feb 1 22:20:05 2006 +0000 + + Add a new function RRGetRotation() which does exactly the same thing as + xf86GetRotation(), but allows for drivers to provide their own RandR + implementation. xf86GetRotation could be obsoleted by this change. + +commit f4898b409376803c9a9dd8475bdd5576ff1cc59d +Author: Luc Verhaegen +Date: Tue Jan 31 14:49:43 2006 +0000 + + Further bug #5386 fixes: Fix some problems with the EDID code: Some + bitoffsets were wrong. Unknown Detailed Sections weren't handled + properly and defaulted to Detailed Timing. + +commit 437b385ce4cc3ff00e14d3d39f4a2f6c8f0c67a0 +Author: Luc Verhaegen +Date: Tue Jan 31 13:55:01 2006 +0000 + + Bring the cvt utility up to date with bug #5386 changes. Fix 2 issues with + the generator routine: the allocated modeline wasn't nulled and + mode->name's \0 wasn't copied over. PrintModeLine was rewritten and + HDisplay gets rounded up to character width instead of refused. + +commit 8f3c69dcf17691f71bca7b0a2cd34f7788a97b8c +Author: Luc Verhaegen +Date: Tue Jan 31 13:04:02 2006 +0000 + + Accept modes with less than 25% horizontal blanking again (you can push old + gtf timing to below 25%), only stop cvt reduced blanking. Users should + be free to blow up their monitors if they so choose. + +commit 701b63cf1dcd3e49602114fb1dde45a74b4e1122 +Author: Donnie Berkholz +Date: Mon Jan 30 20:04:56 2006 +0000 + + Update to build against Mesa trunk. + +commit dd50015b05b901fe0c60717512c854389610aea2 +Author: Eric Anholt +Date: Sat Jan 28 02:20:37 2006 +0000 + + Add libc_wrapper support for random(), which will be used in upcoming EXA + memory manager work. + +commit 3d1667278ff309d7f8e61a6d330f712bae5bcd41 +Author: Eric Anholt +Date: Sat Jan 28 00:37:52 2006 +0000 + + Remove leftover variables for cfb24 build, and finish commenting out Xglx + standalone stuff, which some versions of automake get whiny about. + +commit ab01eb247f9e5d7c9995bf2d6432358cd64bf11d +Author: Alan Hourihane +Date: Fri Jan 27 12:27:34 2006 +0000 + + update pci ids + +commit 261aa4403c77203f8f02b399ddd382c731dda324 +Author: Alan Hourihane +Date: Thu Jan 26 09:04:22 2006 +0000 + + remove that, and will put it in a i810 driver specific Changelog + +commit 94e678fd014c61d12591d7398b6591f24c3d71f1 +Author: Alan Hourihane +Date: Thu Jan 26 08:49:19 2006 +0000 + + add changelog for i810 updates + +commit c5e93182905332383ca3ef5db3f334cec69c8dda +Author: Donnie Berkholz +Date: Thu Jan 26 04:32:45 2006 +0000 + + Really allow linking against Mesa trunk to work. + +commit 0dc0f17f27f99da79c99031b41b0c0e95ef035f5 +Author: Adam Jackson +Date: Thu Jan 26 04:10:43 2006 +0000 + + Speed up checkout and autogen by removing disused iplan2p4 and ilbm. + +commit 023d2b4e3c392eed1f149dc5b13a83429cd052a3 +Author: Daniel Stone +Date: Thu Jan 26 00:23:44 2006 +0000 + + Add forgotten HAVE_BACKTRACE define. + +commit 14fdd81614cdd6ef7e01976a43da8b6a3bf8386e +Author: Adam Jackson +Date: Wed Jan 25 23:05:26 2006 +0000 + + Remove xf8_32wid, it's dead code with no maintainer interest. Also remove + cfb24, since xf8_32wid was the only user. + +commit 2e28f4104ddf94a8f9a70fe6b2a2a6859ffedc8f +Author: Alan Hourihane +Date: Tue Jan 24 22:05:33 2006 +0000 + + Allow current trunk to build against Mesa trunk + +commit 0d9ed2624fe8fb95c57930da523351556ba11351 +Author: Alan Hourihane +Date: Mon Jan 23 22:01:34 2006 +0000 + + Commit #4633 - Initial mouse pointer incorrect with EXA which also fixes + the repaint of the cursor image with randr events. + +commit 9148d8700b7c5afc2644e5820c57c509378f93ce +Author: Alan Hourihane +Date: Mon Jan 23 13:59:14 2006 +0000 + + Commit slight variation of bug #5460 which is the merge of the new shadow + code from kdrive. + +commit cfd3988ed906ab48ca4362256f8dbb8852d7ca0a +Author: Alan Hourihane +Date: Mon Jan 23 13:58:19 2006 +0000 + + wrap with if XORG / endif + +commit f51ecc66e9ad6d2c3541b1dafa7659da5a0a3a86 +Author: Alan Hourihane +Date: Mon Jan 23 13:54:59 2006 +0000 + + #include "gcstruct.h" + +commit 80f45fa4dfa011c2ae7bcb34f87aafb91763f1fe +Author: Alan Hourihane +Date: Mon Jan 23 13:54:34 2006 +0000 + + add damage.h & damagestr.h to SDK headers + +commit af5b3ea4b3df9e9c6dd6993c5e7238a366a3f508 +Author: Alan Hourihane +Date: Thu Jan 19 14:51:09 2006 +0000 + + add randrstr.h to sdk_HEADERS + +commit 03ebd37baba2f5af3ab502ff02ec14c15859dc3f +Author: Daniel Stone +Date: Thu Jan 19 12:25:01 2006 +0000 + + Make error() bomb with exit code 1, not 0. + +commit adce1f16e0d815e5c762407da3544a7d2eff9303 +Author: Eric Anholt +Date: Thu Jan 19 00:06:57 2006 +0000 + + Only try to use byteswap.h on linux. Assume that everyone else (thinking of + BSDs here) has sys/endian.h, and use macros as appropriate for the + names. This should probably be in a gloabl header. + +commit 1c3f8727b2349c9b988eaa744f11366322d42538 +Author: Adam Jackson +Date: Wed Jan 18 19:42:56 2006 +0000 + + More kdrive merge, fast path fbBlt to use memcpy() when possible. Good for + -5% to 60% speedup on XGetImage, and 0% to 10% speedup on copies within + host memory. Based on work by Jaymz Julian. + +commit e70b64b93024d05519014fb1b76fe26bd9f3a496 +Author: Dave Airlie +Date: Wed Jan 18 07:15:55 2006 +0000 + + Updated xgl code drop from Novell + xserver tree changes + +commit b5356e0afaf2b660c8905f63d5fdcb03402b81c5 +Author: Dave Airlie +Date: Wed Jan 18 07:00:50 2006 +0000 + + typo in last change + +commit 506eca5f57b960a6650c3387047a6ae8a22181e9 +Author: Dave Airlie +Date: Wed Jan 18 06:56:52 2006 +0000 + + Wrap sdk_HEADERS in if XORG as otherwise installing non-xorg servers + breaks. + +commit 8ccf4f2b8fdb5e57d2ec5f2d54731fbf83fb9d8c +Author: Dave Airlie +Date: Wed Jan 18 06:49:17 2006 +0000 + + This is a fix from David Reveman from the xserver tree, Make fbPadPixmap + work with negative stride + +commit a1f9262c6acd195c0fcf5f602d5ca0c252993521 +Author: Kristian Høgsberg +Date: Tue Jan 17 21:27:49 2006 +0000 + + file glxvisuals.c was initially added on branch accel_indirect_glx. + +commit c2dedf4d17f8a5b1a8037fd2b4e29122ef78945a +Author: Søren Sandmann Pedersen +Date: Thu Jan 12 22:14:56 2006 +0000 + + Thu Jan 12 17:09:18 2006 Søren Sandmann + Add new functions to enable and disable events on Map and Unmap. + Use them here to make sure Composite redirect doesn't cause Map/UnmapNotify + events that would confuse window managers. + +commit 847d83ec3c90c5b298eaf19ba55251b4a30f4155 +Author: Ian Romanick +Date: Thu Jan 12 00:21:59 2006 +0000 + + Bug #2996: libglx / libGLcore should use a dispatch table + Port all changes from the (monolithic) accelerated_indirect-0-0-1 branch to + the modular trunk. This will break the Darwin and cygwin builds. Other + than the changes to symlink-mesa.sh and the various Makefile.am files, + to code is identical to what's in the branch. + Reviewed by: airlied, krh + +commit c56e9a8849ce8dd5c09732ae1860e409e7886690 +Author: Daniel Stone +Date: Tue Jan 10 03:24:53 2006 +0000 + + Bomb when symlink-mesa.sh continues, instead of silently failing. + +commit 2949c705f11f8710301555c039bcecbe748cabd9 +Author: Daniel Stone +Date: Tue Jan 10 03:23:05 2006 +0000 + + Add all subdirs used to DIST_SUBDIRS, and files to EXTRA_DIST. + Attempt to build xeglmodule.c, not xglxmodule.c. + Add xf86Sbus.h to EXTRA_DIST, as _HEADERS doesn't appear to get the same + treatment as _SOURCES in terms of automatically DISTing. + +commit 4fc9eb592a446ad5711bdaa82c60e9fe010fd76a +Author: Daniel Stone +Date: Tue Jan 10 02:32:20 2006 +0000 + + Bomb out if symlink-mesa.sh failed. + +commit 890ec849479db2510a9b4bc5e5e2f7978ca37b83 +Author: Daniel Stone +Date: Tue Jan 10 02:30:56 2006 +0000 + + Add xgl to DIST_SUBDIRS. + +commit 53dbd00a75313ec5301ca95b2e91d5d02bdaf820 +Author: Adam Jackson +Date: Sun Jan 8 23:43:54 2006 +0000 + + Remove remaining #ifdef DPSEXT stanzas. + +commit 7fc9bc44e099f8f046bf707cb87ef7d736933f80 +Author: Adam Jackson +Date: Sat Jan 7 01:29:05 2006 +0000 + + Compile fix, again, stupid non-clean builds + +commit 9d62d1e6903ccc095f784279a699b3f40a8f0cf8 +Author: Adam Jackson +Date: Sat Jan 7 00:45:17 2006 +0000 + + Bug #5218: Don't crash on unconfigured interfaces. (Andrei Barbu) + +commit 3c58072956c28ebc3ca2eb50c1ff09823e1219d7 +Author: Adam Jackson +Date: Sat Jan 7 00:33:41 2006 +0000 + + One more build fix. + +commit 07303c1b42afd1ada98cbc11d1ba616d366017fb +Author: Adam Jackson +Date: Sat Jan 7 00:05:46 2006 +0000 + + This version will actually compile + +commit 7f46aba35ee482e9b28ecc81d1a99d423fc88a70 +Author: Adam Jackson +Date: Fri Jan 6 23:52:23 2006 +0000 + + Compile fix + +commit 25babf2791ad42101a86ba2a0f14564328256ee2 +Author: Adam Jackson +Date: Fri Jan 6 23:36:53 2006 +0000 + + Missed file. + +commit 13c9e0c094c4e34cd1e43a7cc08b2dca39a32412 +Author: Adam Jackson +Date: Fri Jan 6 23:06:15 2006 +0000 + + Bug #5525: Build a working Xprt. (Drew Parsons) + +commit fe0c838b5d8bc8d9cf5a686bb7d3e90682d2d19a +Author: Adam Jackson +Date: Fri Jan 6 18:06:02 2006 +0000 + + Move drawable lock acquisition into DRIClipNotify from DRIValidateTree, so + we only take it when clipping a DRI drawable instead of on every tree + update. Note drawable lock acquisition per- screen instead of globally, + and drop it in BlockHandler if necessary. + +commit 39ce5f1544029412f4060f3e89ce1d87222ef42b +Author: Adam Jackson +Date: Fri Jan 6 17:05:26 2006 +0000 + + Remove unused X11R4 DDX compatibility function miClipNotify. + +commit 07ecb969d7eb8d4ab0bb0b8a55a5f40f3c8ec5e3 +Author: Eric Anholt +Date: Wed Jan 4 03:29:15 2006 +0000 + + Forced commit to note that glyph privates commit was: + Obtained from: xserver tree (David Reveman) + +commit b6b88d2f62d8c596171f487dd25fbdbc85d0c5a8 +Author: Eric Anholt +Date: Wed Jan 4 00:05:16 2006 +0000 + + Correct rounding in divide-by-255 code. Obtained from xserver. + +commit b9c0ae867e1b52186c26841a77745f7f5a0a76dd +Author: Eric Anholt +Date: Tue Jan 3 22:36:46 2006 +0000 + + Remove the manual AddFilter for convolution, which I'm pretty sure + shouldn't be necessary due to it already happening from + PictureSetDefaultFilters. + +commit 601ab861b46a62b0742ffd3e937c4fab129664f0 +Author: Eric Anholt +Date: Tue Jan 3 22:06:23 2006 +0000 + + Add glyph privates for Xgl, which uses them to implement a glyph cache. EXA + would probably also like to do this. This breaks module ABI for EXA and + XAA, and likely breaks proprietary drivers as well. + +commit 1729fc882ceec392331566c95efd5968fe9e97fd +Author: Eric Anholt +Date: Sat Dec 31 08:06:00 2005 +0000 + + Change REGION_INIT(pScreen, &foo, NullBox, 0) to REGION_NULL(pScreen, + &foo). While it is no longer (or rather, once again not) required as of + regionstr.h r1.4, it matches the style of the rest of the xorg code. + +commit c25536a7937b11a5347bfb8796d5cb6eb0445b51 +Author: Eric Anholt +Date: Sat Dec 31 08:01:31 2005 +0000 + + Initialize the fourcc value in stack-allocated glitz_pixel_format_t + structures. Greatly reduces the number of uninitialized-value accesses + during Xgl startup according to valgrind. Allocating and filling these + in by hand on the stack seems very shady to me. + +commit e6dab3d7c429a2d30d31f188c4554e870011e051 +Author: Eric Anholt +Date: Fri Dec 30 12:05:47 2005 +0000 + + Fix the AC_TRY_RUN for sys/linker.h which had no hope due to lacking a + main() to instead use a nice AC_CHECK_HEADERS that works. Also, fix the + nearby SYSV IPC check which was lacking an argument and giving bogus + results (it's "AC_TRY_LINK(includes, main, yes, no)"). + +commit eef16c36ad6e90fd8eaad4d8bdbc1205bc28a66f +Author: Eric Anholt +Date: Fri Dec 30 05:44:14 2005 +0000 + + Add #undef BSD44SOCKETS, without which the listener socket on FreeBSD would + be created without the port number due to xtrans's define not being + used when xtrans was compiled in the X Server. + +commit 7aa0ea23bc9b8df582fe06f2bc39dcfe34583c7e +Author: Eric Anholt +Date: Fri Dec 30 04:11:42 2005 +0000 + + Add an empty all-local target for FreeBSD make's sake, which doesn't deal + with .PHONY. + +commit 49a9249239b0dd105b83a101db6e32549978f0d5 +Author: Adam Jackson +Date: Thu Dec 29 21:11:41 2005 +0000 + + Make kdInputMachine static const, shrinks .data a bit. + +commit 6d7ee4167d9daeef9b793789a70aa724c4fe6bf4 +Author: Adam Jackson +Date: Thu Dec 29 20:54:08 2005 +0000 + + Style fix, make SCREEN_EPILOGUE two arguments instead of three. + +commit b1efb3810cfea8116d76bae3ff3acfee521f4793 +Author: Adam Jackson +Date: Thu Dec 29 20:42:54 2005 +0000 + + Missed one + +commit 858b4bc14a7adc7314ce5043c7ff8ca1891dd0c9 +Author: Adam Jackson +Date: Thu Dec 29 20:38:29 2005 +0000 + + missed changelog entry: + Enough build fixes to get {sdl,ephyr,fake} to link. + +commit 54922aeadb29df0a1819afd3f616131aa56e140a +Author: Adam Jackson +Date: Thu Dec 29 20:29:26 2005 +0000 + + Disable building LBX by default. + +commit fc69a2e729532ee062af6676fb187a89f7fffe8a +Author: Dave Airlie +Date: Thu Dec 29 08:42:49 2005 +0000 + + Remove PowerMAX_OS define it never worked , it'll never work again, + finishes running joke of OLS2005 + +commit 25d3852b833bc0b61ce8313ce116251a2602b827 +Author: Eric Anholt +Date: Thu Dec 29 00:44:20 2005 +0000 + + Undo spamming of libv's ChangeLog entry. + +commit d6646307f063b938c44d6193a2e8872e178aa90f +Author: Eric Anholt +Date: Thu Dec 29 00:19:33 2005 +0000 + + Add necessary *CONFIG_H declarations and a force-off of XF86* extensions in + miinitext in the XGL case. Prevents mismatched structure sizes on my + _XSERVER64 machine. At this point, with the uncommitted render/ diffs, + Xglx starts up but displays badly. + +commit 3664c3ebf348d07ae3fe301fb8720adf32cf6d64 +Author: Luc Verhaegen +Date: Wed Dec 28 15:22:21 2005 +0000 + + Bug #5153: standalone CVT modeline generator. + - add hw/xfree86/utils/cvt/, cvt.c, cvt.man.pre and Makefile.am. + - Adjust configure.ac and hw/xfree86/utils/Makefile.am for cvt. + - Add MonPtr->reducedblanking and Option "ReducedBlanking" to the Monitor + section. + - Check for reduced blanking in xf86CheckModeForMonitor and disallow modes + with less than 25% blanking otherwise. + - Fix some warnings in hw/xfree86/common/xf86Config.c. + +commit 08708f7d616a7c0a596fb71dd7acd76d45257fec +Author: Eric Anholt +Date: Wed Dec 28 11:48:14 2005 +0000 + + Merge from xserver: Make the existing ChangePictureFilter and + ChangePictureTransform screen hooks get called at appropriate times. + +commit 31d0fdde19598ce9375cc9638ad4e2c8b5af8d9a +Author: Adam Jackson +Date: Wed Dec 28 10:46:56 2005 +0000 + + Remove a debugging printf + +commit 64ac7401ad5022462279dff4dcfb12844c9857ae +Author: Eric Anholt +Date: Wed Dec 28 10:43:02 2005 +0000 + + Fix a copy'n'paste-o that would result in mis-rounding of the results of + several composite operators in A and G channels. + +commit 9ceffb6b92e55f0d74d71489900d43940f14dfd9 +Author: Eric Anholt +Date: Wed Dec 28 10:37:17 2005 +0000 + + Merge from xserver a header for shm's server internal functions, which are + called by DDXes. Desired by XGL, and should be used in other locations, + probably. + +commit b1b40ed6a87f72d07825624730cca193d5a89baf +Author: Eric Anholt +Date: Wed Dec 28 10:31:46 2005 +0000 + + Initial commit of XGL build infrastructure and XGL code changes for + building within the xorg server tree. Requires additional, uncommitted + dix changes to successfully build, and successful running is still yet + to happen. + +commit 36061c75ae42aa733cde9b3fd05e0c8280b31655 +Author: Eric Anholt +Date: Wed Dec 28 10:10:59 2005 +0000 + + Forced commit to note repocopy from xserver CVS as of a few minutes ago. + +commit 05c139d4cdfd11d39c0168d0c80ac1dbdd069b4c +Author: Adam Jackson +Date: Wed Dec 28 10:02:54 2005 +0000 + + Enough build fixes to get {sdl,ephyr,fake} to link. + +commit aeb770f645e2d591b255ec4ab06addcb1beafa5f +Author: Dave Airlie +Date: Wed Dec 28 02:43:50 2005 +0000 + + recommit previous changes to evdev.c + +commit ce7c0c89375ec74f89ae5727998fd75fb768d280 +Author: Dave Airlie +Date: Wed Dec 28 01:57:11 2005 +0000 + + some updates for default colormap install + +commit 022aa1127c7dcd133ce73dbc12a10bfba8b1ed6e +Author: Adam Jackson +Date: Wed Dec 28 01:01:06 2005 +0000 + + Get Xsdl closer to linking. + +commit 27d79ab2bcebb634d0b69c851c72283a7514eb0c +Author: Adam Jackson +Date: Tue Dec 27 23:03:15 2005 +0000 + + s/XSERVER/KDRIVE/ + +commit 72817714a0787536ce8e8ad0d5473dea0f1c1abe +Author: Adam Jackson +Date: Tue Dec 27 23:01:27 2005 +0000 + + Remove Imakefiles. + +commit 9dd0af6cb4e2c8976ada57a4f4ed16faae090a9d +Author: Adam Jackson +Date: Tue Dec 27 08:31:37 2005 +0000 + + Skeletal kdrive build system. Totall non-functional atm. + +commit 7fd73d2953cf9449c15462cf4bf67639db64f997 +Author: Adam Jackson +Date: Tue Dec 27 08:29:50 2005 +0000 + + Build fixes: XSERVER_LIBS -> KDRIVE_LIBS, config.h -> kdrive-config.h + +commit 2f3ac6e5fcbd0e954a094fb6b975d7c8816c44b7 +Author: Adam Jackson +Date: Tue Dec 27 08:26:03 2005 +0000 + + Start importing kdrive. + +commit 6798fd0170f4225ce4e69148978533fcee9bdc34 +Author: Adam Jackson +Date: Mon Dec 26 19:13:52 2005 +0000 + + Bug #4190: Add a rule for 'make relink' since automake sucks. + +commit 8fc4ea8620913776a903ee2b4f22c306d5778623 +Author: Adam Jackson +Date: Mon Dec 26 18:55:09 2005 +0000 + + Nuke unsupported NDBM routines. Shrink the hash table a bit, over + 25% of the buckets were going empty. + +commit ed33c7c98ad0c542e9e2dd6caa3f84879c21dd61 +Author: Daniel Stone +Date: Mon Dec 26 04:23:58 2005 +0000 + + Remove unused -xkbdb and -noloadxkb options. Rename -ar1 and -ar2 to + -ardelay and -arinterval, respectively. Remove XKB banner from help text. + +commit 7e3cb9a09ac422179be89773f7fb14a462d25434 +Author: Adam Jackson +Date: Sun Dec 25 22:25:15 2005 +0000 + + Remove unused layer module. + +commit 9b083369ded2258cbc8ac2058e06ec8a3b171178 +Author: Alan Coopersmith +Date: Fri Dec 23 20:11:12 2005 +0000 + + Change list of X server man pages in "See Also" section to list the ones + actually included and remove the ones that are no longer. + +commit 5fd978b1e7bce9169f87712a4a7c2c36a68ac00a +Author: Daniel Stone +Date: Fri Dec 23 07:40:44 2005 +0000 + + Make LBX configuration default to auto. + +commit 5230e86b1cc841bfb35806618052aa835b7eb7e7 +Author: Dave Airlie +Date: Fri Dec 23 04:13:37 2005 +0000 + + fix up xglglx.c + +commit feb735c5bb0cd391136f1c73476703dff82dc9b0 +Author: Dave Airlie +Date: Fri Dec 23 02:07:58 2005 +0000 + + Well there were a couple of snapshots later than CVS available outside of + Novell, so I've done a crazy merge to try and get them into a workable + CVS, I suspect I may have failed.. there is a pre-xgldrop-merge tag if + I did. + +commit ade104ce5a016623c1ce97b0d52b531185b35baf +Author: Dave Airlie +Date: Fri Dec 23 01:51:40 2005 +0000 + + check drawable is available + +commit 7fb521e80d6e2c05e9475e74fbf80bfbe74cda95 +Author: Dave Airlie +Date: Fri Dec 23 01:50:04 2005 +0000 + + from davidr's tree update some fixes + +commit c88a3145d057ab72466a3ea8b789bf419e4efc33 +Author: Dave Airlie +Date: Fri Dec 23 01:49:21 2005 +0000 + + from davidr's tree if source picture defined return + +commit c59508566f11982aa3f4be383597d0e6178718c2 +Author: Dave Airlie +Date: Fri Dec 23 01:13:28 2005 +0000 + + fix glx up for newest glitz interface + +commit d822bc159672e7327054e572b659ae7dde040e83 +Author: Dave Airlie +Date: Fri Dec 23 00:08:35 2005 +0000 + + make xgl code at least build against latest glitz. + +commit 6e2086395d99081d8d682b90cec650a06e41fc2c +Author: Dave Airlie +Date: Thu Dec 22 23:32:49 2005 +0000 + + fixups for newer glitz API + +commit f3ae42c0fd910b7f9feb9be91ccb056bce0cd999 +Author: Dave Airlie +Date: Thu Dec 22 23:31:15 2005 +0000 + + small fix towards new glitz interface + +commit 2af7e94eab6847159a3439301ecc93c62a12b1a0 +Author: Eric Anholt +Date: Thu Dec 22 13:54:08 2005 +0000 + + Adjust the rules for auto-generating some source files, so that they work + on both GNU make and FreeBSD's make. + +commit 0d7ec5c7d9b451066a079fe56bcc9722341a91ff +Author: Kevin E Martin +Date: Wed Dec 21 02:30:08 2005 +0000 + + Update package version for X11R7 release. + +commit b37e738d5f4e1769bdee98acca788aeeb1556bcc +Author: Adam Jackson +Date: Tue Dec 20 21:40:19 2005 +0000 + + Fix an fb regression on A8 pictures. (Fredrik Höglund) + +commit 03d37eb03864cfc1a2f8d239d5a4c8341bf274f7 +Author: Adam Jackson +Date: Tue Dec 20 21:34:21 2005 +0000 + + Bug #5359: Fix a segfault (Mark Kettenis) + +commit 7b89b643c12fa0f7a662b3ff76e05ece53101312 +Author: Adam Jackson +Date: Mon Dec 19 16:44:21 2005 +0000 + + Bug #5116: Refer DRI section details to dri.fd.o. + +commit 3ef3add90351e3cb7b54dbcedc234bc5d3d65f1c +Author: Adam Jackson +Date: Mon Dec 19 16:34:07 2005 +0000 + + Stub COPYING files + +commit 3566307c8d44f89622ea51169f67c79092cb56d1 +Author: Alan Coopersmith +Date: Mon Dec 19 09:18:29 2005 +0000 + + Fix typos. + +commit 137447c5f3c6f1914ac869297f823ae93ce428ac +Author: Alan Coopersmith +Date: Thu Dec 15 01:54:45 2005 +0000 + + Update to 2005-12-14 snapshot from pciids.sf.net + +commit 2cf86fce41e3fd2ac48c5088da11e19077e42e65 +Author: Kevin E Martin +Date: Thu Dec 15 00:20:27 2005 +0000 + + Update package version number for final X11R7 release candidate. Update + release string to 6.99.99.904. + +commit f1ba3b4f33a928a3a59538799b3863de5c87e70e +Author: Adam Jackson +Date: Wed Dec 14 20:11:16 2005 +0000 + + Bug #4718: Command line flag to disable ACPI. + +commit cf605eb91619a8c0589a08674ffc3e018471b3fc +Author: Adam Jackson +Date: Tue Dec 13 17:35:26 2005 +0000 + + Build libglx correctly when not building the Xorg DDX. + +commit b076dd787ff71c4b385ab4e2e4eb367f3de378f6 +Author: Adam Jackson +Date: Tue Dec 13 17:34:06 2005 +0000 + + Spell it XINERAMA_SRCS, not PANORAMIX_SRCS. + +commit 3666dbb5f3e06fa6a72def64556d64cf73141777 +Author: Alan Coopersmith +Date: Mon Dec 12 23:33:55 2005 +0000 + + Remove unnecessary include of dgaproc.h that broke Solaris builds. + +commit 438a5549f08ab03443d45dd46323579a2f2e4ba2 +Author: Alan Coopersmith +Date: Mon Dec 12 03:06:18 2005 +0000 + + Bugzilla #4715 Files in + xserver/xorg/Xext not included in tarball after make dist + +commit 62f3ef930adc7edd49b27dd1f7b0f51bc8bc0afa +Author: Adam Jackson +Date: Fri Dec 9 18:35:21 2005 +0000 + + Bug #5258: Restore binary compatibility with 6.8.2's PictureRec. (Aaron + Plattner) + +commit b99dea9dcf99f907a3536c0db1c39cc67931a5b1 +Author: Adam Jackson +Date: Fri Dec 9 18:32:46 2005 +0000 + + Bug #4935: Fix includes. (Eric Anholt) + +commit f4957ee94810b471110deebf03d7413399b45db3 +Author: Adam Jackson +Date: Fri Dec 9 18:30:51 2005 +0000 + + Bug #4809: Re-fix that doesn't break distcheck. (Alan Coopersmith) + +commit de22d0c2264bd6dbacbbb4160d09c7e84ad37e70 +Author: Adam Jackson +Date: Fri Dec 9 15:30:05 2005 +0000 + + Fix a thinko so the code matches the comment + +commit 6fcb049cd0d2291da5943176716d1f7bbb85fdc2 +Author: Adam Jackson +Date: Fri Dec 9 06:49:39 2005 +0000 + + Bug #1288: Additional refactor of the driver probe logic to keep ati loaded + before atimisc. + +commit 17ac5e9fec1e07bd18ae1407043c300cb4695ede +Author: Adam Jackson +Date: Fri Dec 9 05:36:41 2005 +0000 + + Push the fallback drivers to the end of the list so driver probe order + stays useful. + +commit 80ea67e37980d07438749f1aa4dfdd7ee1086799 +Author: Adam Jackson +Date: Fri Dec 9 03:59:41 2005 +0000 + + Bug #4361: Change driver probe logic to read the driver list from disk + instead of using a compile-time array. + +commit 7fa2d11d85d43f42aa9c02f8d772c91d1b04df43 +Author: Adam Jackson +Date: Fri Dec 9 03:57:41 2005 +0000 + + Bug #4361: Define XF86CONFIGFILE properly so config file generation works + +commit 26b41ff43959a07a778bc3d6e4db8da036f09de3 +Author: Kevin E Martin +Date: Fri Dec 9 03:02:21 2005 +0000 + + Fix sgml docs build. + +commit d6f98cbdb8fb74c504a92939d3741420eeed7110 +Author: Adam Jackson +Date: Thu Dec 8 19:33:09 2005 +0000 + + Bug #3944: Fix 24bpp packed pixel. (Søren Sandmann Pedersen) + +commit f9ccebe8c5cd674c08fe8ed860d1c456e42c937e +Author: Adam Jackson +Date: Thu Dec 8 19:27:13 2005 +0000 + + Bug #4928: Fix compilation for Alpha. (Stefaan DeRoeck) + +commit 3a6bdf0715b994d6ecaa5b6e448695a8a8ec7d72 +Author: Kevin E Martin +Date: Thu Dec 8 19:21:12 2005 +0000 + + Add configure option to set the top level font dir. + +commit 008c2dd5e4614e6a21123ee3a2ac9c5d3bafa97a +Author: Kevin E Martin +Date: Thu Dec 8 17:55:19 2005 +0000 + + Add configure options to allow hard-coded paths to be changed. + +commit 39189c2b86a4c2ab5f3f161d423eb072356668e5 +Author: Kevin E Martin +Date: Thu Dec 8 17:54:40 2005 +0000 + + Allow hard-coded paths to be configurable. + +commit 20c0ebe7b3feb85abf9bf140b7799aafc6f59513 +Author: Kevin E Martin +Date: Wed Dec 7 16:18:02 2005 +0000 + + Change to use the app-defaults default dir configured in libXt. + +commit 4a39354e14c3c360046b04ea0d4825832b05df05 +Author: Kevin E Martin +Date: Tue Dec 6 22:48:51 2005 +0000 + + Change *man_SOURCES ==> *man_PRE to fix autotools warnings. + +commit 84faf8dc9747bc4f1db5ebc2f23e17cf1460e2e9 +Author: Adam Jackson +Date: Tue Dec 6 16:22:47 2005 +0000 + + Bug #5230: Fix whitespace bugs. + +commit 9439297b7bc07dcb90f0d01da09eea1bac3d42ff +Author: Alan Coopersmith +Date: Tue Dec 6 15:50:35 2005 +0000 + + Bugzilla #5219 Make + sure all optional sources are included in EXTRA_DIST, even if they + aren't used on the platform the distballs are made on. + +commit f259fd680caccb59546d7788704e46e51a9c6146 +Author: Adam Jackson +Date: Sat Dec 3 22:47:47 2005 +0000 + + Disable the xf8_32wid logic for now, breaks distcheck + +commit 26f9c4305660c2b3dc7fe8d214bcdd3c24e1b198 +Author: Alan Coopersmith +Date: Sat Dec 3 17:04:45 2005 +0000 + + Bugzilla #4809 Patch + #3908 xf8_32wid + and cfb24 only need to be built on sparc + +commit 98231c6b38c98976f4ac2b9417ecfbc37a8cbe9a +Author: Kevin E Martin +Date: Sat Dec 3 05:47:25 2005 +0000 + + Update package version number for X11R7 RC3 release. Update release string + to 6.99.99.903 (i.e., 7.0 RC3). + +commit 7c00afd0ec94e491f1a9ef32d6543ed51ea3319d +Author: Kevin E Martin +Date: Fri Dec 2 06:02:45 2005 +0000 + + Define XFree86Server only where it is required. + +commit 924518605b613eb66aa569877fa9f131e6f2a2fd +Author: Kevin E Martin +Date: Thu Dec 1 23:39:00 2005 +0000 + + Fix GL build when srcdir != builddir (Donnie Berkholz). + +commit 14b9315379fe8c783013906616d868f93fd51c83 +Author: Kevin E Martin +Date: Thu Dec 1 22:06:49 2005 +0000 + + Add missing XvExtension and XvMCExtension defines. + +commit df8fa21d3189e20260328b88cc8a86224a9b1ebf +Author: Kevin E Martin +Date: Thu Dec 1 16:20:09 2005 +0000 + + Fix typo: xorg_bus_linuxbsdpci ==> xorg_bus_linuxpci + +commit ccfaf82367c9d057fd8314ce36b47f0a8eb696b6 +Author: Eric Anholt +Date: Thu Dec 1 05:04:07 2005 +0000 + + Bug #5160: Fix the modular build to try to use the same logic for choosing + the architecture/os-specific bus support as monolithic. + +commit 9c0bd9687fe7d20f2f0793332ae0db06f035eb23 +Author: Adam Jackson +Date: Wed Nov 30 22:59:22 2005 +0000 + + Import libdrm 2.0 + +commit 4ec0b623b6ab5f8a1e5af2cc3d839251acf81ce2 +Author: Adam Jackson +Date: Wed Nov 30 02:36:25 2005 +0000 + + Bug #5093: Fix fb for non-SSE machines. (Xavier Bachelot) + +commit ed826d563cba82c516fd41f6a29ee50aa1fe6c6a +Author: Adam Jackson +Date: Tue Nov 29 23:34:30 2005 +0000 + + Only build dlloader modules by default. + +commit da5d66f2ff27b21fe5c39a4abb4f627edd707f1d +Author: Kevin E Martin +Date: Tue Nov 29 16:39:33 2005 +0000 + + Fix usage of XFree86LOADER/XFree86Module/IN_MODULE and update loadable + module builds to reflect this change. + +commit 51a721a6dbb42702347aad3115147e4922fc1a25 +Author: Alan Coopersmith +Date: Mon Nov 28 22:05:09 2005 +0000 + + Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4 + update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir) + +commit 381931b15b15d0a2ec384b0c22864412c44f9c6e +Author: Kevin E Martin +Date: Wed Nov 23 07:14:46 2005 +0000 + + Add configure option to install libxf86config.a (disabled by default). + +commit 594ca0966e8fd5992ebf95170cc42e19c698fec6 +Author: Eric Anholt +Date: Tue Nov 22 02:11:00 2005 +0000 + + Bug #5118: Use "rm -f" instead of "$(RM)", which isn't always defined. + +commit 1c8c1179c0789e3e134d31a62dbb88bfdb594b26 +Author: Felix Kuehling +Date: Mon Nov 21 04:24:07 2005 +0000 + + Fix Xprt library dependencies in the case that Xprint is auto-detected by + configure. + +commit a1f110bda80bb3b8e4f602385ca5ccd96cf3f786 +Author: Alan Coopersmith +Date: Sun Nov 20 23:01:02 2005 +0000 + + Make sure XKM_OUTPUT_DIR (used in code) ends in / (so paths don't get hosed + when appending file names) but XKB_COMPILED_DIR (used in Makefiles) + does not so install-sh -d doesn't get confused when the directory + already exists. + +commit 385730d23944c24dd9af45b27f62c1161abc48b2 +Author: Alan Coopersmith +Date: Sun Nov 20 04:15:15 2005 +0000 + + Add xext to list of modules xorgcfg depends on. + +commit 63aa96c08a8390621b017ea498c88cf88152024b +Author: Kevin E Martin +Date: Sat Nov 19 07:15:50 2005 +0000 + + Update pkgconfig files to separate library build-time dependencies from + application build-time dependencies, and update package deps to work + with separate build roots. + +commit d3b6653a2892e8c929c79fe3ace19ac9d8366fc4 +Author: Adam Jackson +Date: Sat Nov 19 03:53:04 2005 +0000 + + Bug #4824: Build XTrap support by default, matching monolith. + +commit 627ac1fe1dbcbc070575da7bee9e686a7dce5262 +Author: Eric Anholt +Date: Fri Nov 18 23:34:04 2005 +0000 + + Bug #5060: Fix non-Linux DRI on 64 bit post Linux 32/64 changes. + +commit e3ec048ff2fe0ee0862472e9b147b7ce488ea898 +Author: Adam Jackson +Date: Fri Nov 18 22:43:50 2005 +0000 + + Bug #4928: Unbreak Makefile.am for Alpha chips. (Stefan DeRoeck) + +commit de95d8ee197a0bb738037195997d754a20e10254 +Author: Adam Jackson +Date: Fri Nov 18 18:02:24 2005 +0000 + + Bug #4859: Don't segfault on bad DDC read. (Tony Houghton) + +commit 21f7d03dbc347f6bf97a40671275ac75df15bd10 +Author: Adam Jackson +Date: Wed Nov 16 07:28:19 2005 +0000 + + Fix builds when not building the Xorg DDX. + +commit fb2d9df869af0c96f1488ef7cf364e01a9d28f3f +Author: Adam Jackson +Date: Tue Nov 15 00:29:23 2005 +0000 + + Make fb build on darwin/ppc without addition #define hacks + +commit 16b315affa30e34b9bab81778978484137a5d9bb +Author: Kevin E Martin +Date: Mon Nov 14 21:04:12 2005 +0000 + + Use glcontextmodes.[ch] from Mesa. + +commit 0c110c80e7afbef50bb354cf1df30123ed048250 +Author: Kevin E Martin +Date: Mon Nov 14 20:18:03 2005 +0000 + + Add GL_CFLAGS so that GLX can find its proto headers when using separate + build dirs. + +commit fc81c13e4dafb0eb818879454ee7ae3fa3dae6d0 +Author: Kean Johnson +Date: Mon Nov 14 18:49:30 2005 +0000 + + Dont prevent SCO platforms for using the default ZAxisMapping now that the + OS layer correctly sends z-axis events when the wheel button is used. + +commit bd9fb533b31c2427d854199fa59dccd357cf874b +Author: Alan Coopersmith +Date: Mon Nov 14 00:01:34 2005 +0000 + + Default xkb-output directory needs trailing slash. + +commit 267cbffa41fffff69c692911d128462f5bab2a69 +Author: Alan Coopersmith +Date: Sun Nov 13 20:53:24 2005 +0000 + + Bug #5019 xserver + installs manpages into 'man1' instead of 'man1x' + +commit 3179d29b8212c197634d81fbeb8dd2e8df995735 +Author: Alan Coopersmith +Date: Sat Nov 12 18:03:34 2005 +0000 + + use RGB_DB not RGB_PATH as that's what configure defines (Jürg Billeter + ) + +commit 0e7e4c7064df64c29b1a0ccd84fba1be7c748f18 +Author: Kevin E Martin +Date: Thu Nov 10 04:59:21 2005 +0000 + + Fix typo to enable DGA support. + EXTMODULE is required to build DGA support into extmod. + +commit e4554db8f87c6a39a3087186395972000bd2085c +Author: Kean Johnson +Date: Thu Nov 10 02:41:20 2005 +0000 + + Dont pass wheel mouse buttons as real buttons, map them as Z-Axis movement + on SCO and USL. Re-instate the ZAxisMapping default for the mouse + driver. + +commit 1b26fe6d2092c202141a0371f47ef1cd7c66ec00 +Author: Kevin E Martin +Date: Wed Nov 9 21:28:54 2005 +0000 + + Update package version number for X11R7 RC2 release. Update release string + to 6.99.99.902 (i.e., 7.0 RC2). + +commit f886e632b8dab1bfa0de42b9759a8284ecd9b94f +Author: Matthias Hopf +Date: Wed Nov 9 17:05:41 2005 +0000 + + Bug #4915: ButtonMapping option which allows to define arbitrary button + mappings (including left-handed mouse etc.). Fixed incorrect usage of + non-reversed, but ZAxisMapped buttons for state detection. Nuked unused + part of reverseMap. + +commit a25871ae52dd5ce094ba8c1b2021dd027d3e71bd +Author: Kevin E Martin +Date: Wed Nov 9 01:00:46 2005 +0000 + + DRM 1.0.5 import + +commit c9709c0a38af46368726857f7261cbeb84e53911 +Author: Kevin E Martin +Date: Tue Nov 8 22:47:57 2005 +0000 + + Add newly checked in files to Xorg server build. + Fix release date. Enable DGA extension by default. + +commit f8430a1b8651f4b52d9d3b54694a60d929b48925 +Author: Kristian Høgsberg +Date: Tue Nov 8 19:04:56 2005 +0000 + + Bug #2880, add functions for byte and word level access to pci config + space. + Fix broken utf8 again. + +commit 5390c7ab05d23f64e6d9afaa558be246a6d6e1b4 +Author: Kean Johnson +Date: Tue Nov 8 06:33:30 2005 +0000 + + See ChangeLog entry 2005-11-07 for details. + +commit f5814bf3fff5352ed6edef4c58aadf2d4593f094 +Author: Alan Coopersmith +Date: Tue Nov 8 03:12:43 2005 +0000 + + Don't reference noXkbExtension when building without XKB. (Bob Terek - Sun + Microsystems) + +commit e73cdba865f36ebf78c2dc4ff674b4d9bfe85013 +Author: Kevin E Martin +Date: Mon Nov 7 21:03:49 2005 +0000 + + Fix Xvfb to work properly in depth 15 mode. Fixes XTS5 XCloseDisplay-3 + server crash. + +commit 890ed0e082e048fa8daf48229b40558381bd131d +Author: Thomas Hellstrom +Date: Sun Nov 6 16:40:59 2005 +0000 + + Fix a bug where a system memory pixmap got a wrong address if memcpy() + fallback was used for downloading from screen. + +commit 70aedcf32a0c924fd073f5b36d20813e8323026b +Author: Alan Coopersmith +Date: Sat Nov 5 18:56:50 2005 +0000 + + Bug #4948: Incorrect + URL in log file for Xorg CVS. Also fixed wording of statement to not + refer to monolithic CVS since modular uses the same code, so it was + appearing in modular builds too. + +commit 89c661d61f1b9c70a08237476fa1f7f42c1783ab +Author: Kevin E Martin +Date: Fri Nov 4 21:37:32 2005 +0000 + + Only use fbCopyAreammx if planemask is FB_ALLONES (fixes XTS5 XCopyArea + tests 22 and 23). + +commit 0b150a05e6fadca7ee8240697d6cbeadea0c53b3 +Author: Ian Romanick +Date: Thu Nov 3 17:12:53 2005 +0000 + + Whitespace change just to make sure I created the branch correctly. + +commit 90cf8e339b71c2f8f2d7a362e6e1ca8078d7f4fd +Author: Kevin E Martin +Date: Thu Nov 3 17:08:06 2005 +0000 + + Fix vendor string and release version reported by the servers. Enable + security, lbx and xevie extensions to give us parity with monolithic + tree. + +commit f23defeef285b4a5bb58405589294bd557c9bb01 +Author: Alan Coopersmith +Date: Thu Nov 3 16:57:01 2005 +0000 + + Use APP_MAN_SUFFIX for Xserver man page instead of hardcoding section 1 + +commit f5daec674aeb4fe6ccbc95ead8a319bbeb368d9f +Author: Kevin E Martin +Date: Wed Nov 2 15:56:40 2005 +0000 + + Add support for enabling/disabling DBE (part of generic enable/disable + extension support in the server). + +commit a311bfa73afa1af76f81958d23bc8e0c631d6828 +Author: Kevin E Martin +Date: Wed Nov 2 15:53:57 2005 +0000 + + Fix support for enabling/disabling extensions loaded from modules. + +commit 462a2407d540eac831c9be4dcee8a16aa1cea6ac +Author: Kevin E Martin +Date: Tue Nov 1 15:01:51 2005 +0000 + + Add xorg-server.m4 for driver dependency checking. + Update pkgcheck depedencies to work with separate build roots. + +commit 56101c9d6ec3585a0a8550da4b83dd399e3bcce6 +Author: Kevin E Martin +Date: Mon Oct 31 05:45:40 2005 +0000 + + Fix fd leak by closing them in the ACPI code instead of just using + shutdown. + +commit 7993486e80711bd6f6f5b6c2b1f2ac32bfba735b +Author: Thomas Winischhofer +Date: Sun Oct 30 17:38:49 2005 +0000 + + RandR: Add a driver func to let the driver determine the physical size of a + screen size (display mode). Useful for faked widescreen modes, modes + which are scaled by the driver, etc. This really helps fixing RandR's + sometimes dumb DPI assumptions. + +commit c818d3a1a5439c54fc687927a99d69712602ed5e +Author: Thomas Winischhofer +Date: Sun Oct 30 09:27:06 2005 +0000 + + Add xf86RandRSetNewVirtualAndDimensions to loader symlist + +commit fdbb3ea60949a12eb2f4805d16e8acc2348e39c7 +Author: Thomas Winischhofer +Date: Sat Oct 29 21:31:23 2005 +0000 + + Add function for drivers to change RandR's idea of the virtual screen size. + (This allows drivers to reserve a larger virtual size at start and + change it later) + +commit e921eec1c6d6ce32630977bd876c529a7c694459 +Author: Alan Coopersmith +Date: Sat Oct 29 00:12:33 2005 +0000 + + Make X -> Xorg symlink at install time. + +commit f842c229d4c4dbd5c01364f9e99709bedfd32be6 +Author: Alan Hourihane +Date: Fri Oct 28 16:01:17 2005 +0000 + + build fix on alpha + +commit 7416fd61a17a70a2c27c4b1d19796955c296dc7a +Author: Alan Coopersmith +Date: Thu Oct 27 21:03:27 2005 +0000 + + Improved stack trace dump code for Solaris - try fork & exec of pstack + first so we can see the names of non-exported symbols that aren't + visible to walkcontext/dladdr1 code. + +commit b588bdfe2ac3758d7188706078d79fa276a303e3 +Author: Dave Airlie +Date: Sat Oct 22 04:38:50 2005 +0000 + + programs/Xserver/GL/mesa/X/xf86glx.c: Missing initializer in xf86glx.c + spotted while debugging something else. + +commit 59279da49806b032027bb54410bc2513d21e3d9e +Author: Adam Jackson +Date: Fri Oct 21 19:06:13 2005 +0000 + + Bug #1429: Report input device type correctly. (Stéphane VOLTZ) + +commit 4a8072011895e6f472e429af7503fc07e0561144 +Author: Adam Jackson +Date: Fri Oct 21 18:50:09 2005 +0000 + + Bug #4730: Byte-swap the pixmap ID correctly. (Neil Campbell) + +commit 81e913d3106066de73792f59f3e50e2b5458c567 +Author: Adam Jackson +Date: Fri Oct 21 18:23:33 2005 +0000 + + Bug #4840: Typo, x$xRES -> x$RES. (George Fufutos) + +commit f5a58178347878e0409b592330a07867bea02bef +Author: Ian Romanick +Date: Thu Oct 20 23:24:47 2005 +0000 + + Make sure that the __gl*_size prototypes are seen in all the places that + they need to be seen. + +commit 279cf9f79da5778b6e14ecc437379d73e3bec5b0 +Author: Donnie Berkholz +Date: Thu Oct 20 22:41:28 2005 +0000 + + Bug #4817 Restore '=' + to '==' in test for mmx_capable. + +commit 1f43d218cc24358a0379535ed517c23011633c31 +Author: Thomas Winischhofer +Date: Thu Oct 20 21:45:40 2005 +0000 + + EXA: The "optimization" for using a fill operation instead of 1x1 copies + checked the destination drawable's dimensions (!) instead of the + tile's. Really.... + +commit 15f56b203dbc14ea59885d40fd4bed3da9e8e190 +Author: Adam Jackson +Date: Thu Oct 20 18:52:51 2005 +0000 + + Move xf86XTrapModule.c to dixmods, guess at a build system. + +commit da43c778f4a831061ad2c8b8a312b7a54c9cd79e +Author: Adam Jackson +Date: Wed Oct 19 22:45:54 2005 +0000 + + Bug #3224: Degrade XKB fallback message to X_WARNING. + +commit 4ebd26f04b32f1b09e0759f1a83437d0b1c4d646 +Author: Adam Jackson +Date: Wed Oct 19 22:36:22 2005 +0000 + + Bug #3196: Fix Load foo.so syntax. + +commit af211a9bc1bcab0aa631558e5d6ce013095f9802 +Author: Adam Jackson +Date: Wed Oct 19 22:30:09 2005 +0000 + + Fix PCI bus scan on ia64 E8870 chipsets. + +commit 5744308e2957781449bfe6fee9b465617a88384d +Author: Kevin E Martin +Date: Tue Oct 18 22:06:54 2005 +0000 + + Update package version number for RC1 release. Update release string to + 6.99.99.901 (i.e., 7.0 RC1). + +commit 2769c3e72c470b472dae013e256a7ee73c3e53f2 +Author: Adam Jackson +Date: Tue Oct 18 19:43:48 2005 +0000 + + Fix distcheck by forcing Xorg to be installed before chmod/chown. + +commit dd0d010e9c34278f968be486a6c5c91e021b6609 +Author: Adam Jackson +Date: Tue Oct 18 19:14:08 2005 +0000 + + Fix parallel builds my ensuring libdmxconfig builds first. + +commit 79e6ac79f983b6cbd88a868dfd2235d9cbe75e8b +Author: Alan Coopersmith +Date: Tue Oct 18 07:18:21 2005 +0000 + + Don't use $< in explicit rules since neither BSD nor Solaris make allow + that. + +commit fb282ef43a1936dcdefa57f16a8363b2adaf983b +Author: Aaron Plattner +Date: Tue Oct 18 04:03:01 2005 +0000 + + Add miext/damage so misym.c can export DamageDamageRegion. + +commit 959db6028d232dc76396cb658aa48d3b4e605aed +Author: Aaron Plattner +Date: Tue Oct 18 04:02:31 2005 +0000 + + Export DamageDamageRegion. Not bumping the ABI version since we did that + already for this release. + +commit b61c828b0455ec1d4a7ffb54b5ac9b65764a458b +Author: Kevin E Martin +Date: Tue Oct 18 02:23:58 2005 +0000 + + DRM 20051017 import + +commit d6a40bcd4a745b5d6d1070deb696b21d128ca0fe +Author: Alan Coopersmith +Date: Tue Oct 18 00:32:55 2005 +0000 + + Change default install dir for app-default files from + $(sysconfdir)/X11/app-defaults to $(libdir)/X11/app-defaults to match + the monolith & allow localization + +commit e7007f7d51c9e1d39118865fefb1716c579a70bd +Author: Adam Jackson +Date: Mon Oct 17 22:42:03 2005 +0000 + + More automake 1.7 braindamage: use mkdir -p, not . + +commit 151ba8b67fd88a721f9f72d3019212b22f5cd3e2 +Author: Adam Jackson +Date: Mon Oct 17 22:25:58 2005 +0000 + + Work around automake-1.7 braindamage by providing an explicit rule for + XOrgCfg. + +commit eec3df1503e561aff6656e15c73b25a0bba1b06b +Author: Kristian Høgsberg +Date: Mon Oct 17 17:11:12 2005 +0000 + + Fix whitespace in AS_HELP_STRING uses, convert all help strings to use + AS_HELP_STRING. + +commit 1859c62607d567aa05334df1662f7249c983f793 +Author: Kevin E Martin +Date: Mon Oct 17 07:18:59 2005 +0000 + + include/dix-config.h.in Add support for more extensions + Add missing files to EXTRA_DIST + +commit ccfe9e7e9b49cbbf7c50fbf1a5c33178f27f79eb +Author: Alan Coopersmith +Date: Sun Oct 16 21:57:34 2005 +0000 + + Link Xprint config directories in $(C_LOCALE) list to C locale dir, not + en_US + +commit a7d6a4fb321415b8aaad72760ff8a1ca3fd077f9 +Author: Donnie Berkholz +Date: Sun Oct 16 03:02:53 2005 +0000 + + Change '==' to portable '='. + +commit c2e461c7e970830ea430de3e5f352d144e9f0239 +Author: Kevin E Martin +Date: Sat Oct 15 20:44:44 2005 +0000 + + Fix typo and add new Makefiles to AC_OUTPUT + Fix typos + Add xorg.conf.man to CLEANFILES + Add missing files to EXTRA_DIST + +commit 34b7b57b3c80507f63a542c6adb4b5c8ed80b642 +Author: Kristian Høgsberg +Date: Sat Oct 15 19:34:28 2005 +0000 + + Doh, remember to add this file. + +commit 744aa34ca5228ea176cc56a7bdd48bbf5f29b0b5 +Author: Eric Anholt +Date: Sat Oct 15 02:19:09 2005 +0000 + + Add an additional meaning to the "dirty" flag. Now, if !dirty && !area, the + pixmaps's contents are undefined, so we won't need to upload the + undefined contents in MoveIn. Use the ExaCheck* for async ops as well, + so that dirty is always tracked. While the performance impact for my ls + -lR test was not significant (though the avoiding-upload path was being + hit), it's likely to be important for the upcoming Get/PutImage + acceleration from ajax. + +commit 21e7339c1eead1148eea462bc99cf8faf02c8d39 +Author: Kristian Høgsberg +Date: Fri Oct 14 22:44:56 2005 +0000 + + Hook up lbx. + +commit d62943c040fd3d45079c9918c57f74f993b585d4 +Author: Alan Coopersmith +Date: Fri Oct 14 22:19:51 2005 +0000 + + Set default font path to match the default in the monolith so fonts are + actually found. + +commit 0ee70f53ef9b05052ee079560df107d05a9c5407 +Author: Alan Coopersmith +Date: Fri Oct 14 22:01:46 2005 +0000 + + Install Xorg & xorg.conf man pages even when not building docs + +commit 0676a2874a62a3661a718cdf21e75ffc77197ad9 +Author: Kristian Høgsberg +Date: Fri Oct 14 20:01:36 2005 +0000 + + Add sysv and sco os-support subdirs and add simple EXTRA_DIST Makefile.am + in those dirs. Remove unsupported os-support subdirs (bsdi, dgux, hurd, + nto, os2, pmax, qnx4) that have no maintainer and we don't dist. + Add Options. + +commit 57abb5b171b2fe88252aeb788463e533106d66b9 +Author: Alan Hourihane +Date: Fri Oct 14 08:29:16 2005 +0000 + + remove reference to non-existent agpgart.h + +commit 7e3e9ed97ba25bb84286f97fe6882a37c9aa7e25 +Author: Donnie Berkholz +Date: Fri Oct 14 06:10:06 2005 +0000 + + Add XTRAP_LIB to XPRINT_EXTENSIONS to fix xprint build when xtrap is + enabled. + +commit 821584fcd3bf83f3aaacd35e54323f71d976db44 +Author: Donnie Berkholz +Date: Fri Oct 14 05:36:39 2005 +0000 + + Require glproto >= 1.4.1 if building DRI with GLX. This fixes a build + failure on a number of hyperpipe functions. + +commit 8df7628a2ad93edf8271f13e0b43c0fa8f766668 +Author: Alan Coopersmith +Date: Fri Oct 14 00:41:51 2005 +0000 + + Remove reference to XF86config-4. Add xorgcfg(1) to See Also list. + +commit b54c8154ca19edce00b9c6379d5daf94268bade1 +Author: Alan Coopersmith +Date: Fri Oct 14 00:34:49 2005 +0000 + + Set substitutions needed in xorgconfig man page. + +commit 1df705e465a103c94ffbb9fe97bdbe6b0aefc746 +Author: Alan Coopersmith +Date: Thu Oct 13 20:30:38 2005 +0000 + + AC_SUBST VENDOR_STRING & VENDOR_RELEASE for xorgcfg's app-defaults file + +commit b349b20d783252d5126451142419aae554f9b776 +Author: Kristian Høgsberg +Date: Thu Oct 13 18:08:24 2005 +0000 + + Dist NOTES. + Dist helper shell scripts. + Dist XAA.HOWTO and a few more unused C files. + Dist xorgconf.cpp. + Fix DIST_EXTRA typo. + Clean yacc and lex generated files only during make maintainer-clean as we + don't expect users to have those tools installed. + +commit 35a767590e481b15ae66dccc2dd91098992b2751 +Author: Benjamin Herrenschmidt +Date: Thu Oct 13 01:13:58 2005 +0000 + + Fix stupid mistake in yesterday's allocator commit, would cause exa to + consider a random available memory size + +commit a16dabd05ee7ec97877f07bd40ed83c01e72fc22 +Author: Eric Anholt +Date: Wed Oct 12 11:15:44 2005 +0000 + + Remove an RM line that appears unnecessary and was breaking the build at + xf86DefModeSet.c with FreeBSD make, where RM was undefined. While here, + make the build of xf86DefModeSet.c depend on its sources, so it'll + rebuild properly, and make it a normal CLEANFILE rather than a + DISTCLEANFILE, since the intention seems to be to build it at the + user's build time. + +commit b819c8378fbf29f185332e8435a80eb35991cd1f +Author: Alan Hourihane +Date: Wed Oct 12 08:22:31 2005 +0000 + + remove unneeded line of code + +commit e573b272bf2b06fb62d0306ddc966f3230ead967 +Author: Benjamin Herrenschmidt +Date: Wed Oct 12 07:46:36 2005 +0000 + + Use proper access size when reading pixel based on bpp of the source pixmap + +commit 55efb41f6cc064763cbfd3ee2a1239dc46cb109a +Author: Eric Anholt +Date: Wed Oct 12 07:35:20 2005 +0000 + + If a window background is a 1x1 pixmap, read the value out and go to + exaFillRegionSolid rather than sending piles and piles of Copies to the + hardware. + +commit fce11fdf03acc1f3f1dafb79fc8fff0251cf5473 +Author: Kevin E Martin +Date: Wed Oct 12 02:11:06 2005 +0000 + + Fix typo (DIST_EXTRA -> EXTRA_DIST) + +commit 12994b9afbc18bfb7209f677abf673415c9ddf15 +Author: Benjamin Herrenschmidt +Date: Tue Oct 11 23:11:37 2005 +0000 + + Fix a couple of bugs in the offscreen allocator. One mostly harmless was + causing our search loop for evictable blocks to possibly skip a good + candiate, and another was the allocator would occasionally use + area->offset as if it was the base of the pixmap, while for a pixmap + that is not in available state, it is not. This caused some funny + miscalculation leading to overlapping pixmaps and accesses beyond the + end of the framebuffer. To make things cleared, I renamed save_offset + to base_offset, made sure it's the one used everywhere in the + allocator, and only align "offset" for the client at the end of + exaOffscreenAlloc(). + +commit 8444a1f3918b0433f89cae31673ab63628b4543d +Author: Alan Hourihane +Date: Tue Oct 11 21:01:04 2005 +0000 + + missed commit + +commit 3b683b63eed603ae58a8cddab48eb81f7ba0dbdf +Author: Alan Coopersmith +Date: Tue Oct 11 20:12:24 2005 +0000 + + missed ChangeLog entry for previous commit + +commit b4450f3242ab408e80bc3d6d5d1cf6765f3e5339 +Author: Thomas Winischhofer +Date: Tue Oct 11 19:03:02 2005 +0000 + + Add DGAReInitModes, Part 2 + +commit d91d18e1d6d663244288748ab86a35a6c151a535 +Author: Thomas Winischhofer +Date: Tue Oct 11 19:02:18 2005 +0000 + + Add DGAReInitModes in order to allow the driver to change the list of + supported DGA modes. (Part 1) + +commit c1a2abadfbb862cbaac3e23d0c1317ce5473ebdd +Author: Alan Hourihane +Date: Tue Oct 11 14:50:47 2005 +0000 + + fix a typo + +commit 697f64a22ac5a7742a0022605a1074351296d4f8 +Author: Alan Hourihane +Date: Tue Oct 11 14:50:03 2005 +0000 + + check randrp has been initialized + +commit 2828d92c6ca400b603b6a20a221d9c858732292f +Author: Alan Hourihane +Date: Tue Oct 11 14:45:01 2005 +0000 + + programs/Xserver/hw/xfree86/common/xf86RandR.c + programs/Xserver/hw/xfree86/loader/xf86sym.c Add a new function + xf86GetRotation to allow third party modules to obtain the current + rotation. + +commit cad18ec979e38ef80a606f0e4abf2142b9d0d2b1 +Author: Alan Hourihane +Date: Mon Oct 10 10:07:47 2005 +0000 + + don't move x or y depending on the screen size change + +commit 7f72f94aa4f0655b8aab6c67eef2a5f5ac4b418f +Author: Alan Hourihane +Date: Mon Oct 10 09:31:49 2005 +0000 + + rework that again + +commit 7c1d9a31a36552467d194e7d009c17dc526256c2 +Author: Alan Hourihane +Date: Mon Oct 10 09:24:28 2005 +0000 + + a furthur tweak to the randr cursor position fix + +commit 13f958fbe8420e406f24c01d320f29002ee860b7 +Author: Benjamin Herrenschmidt +Date: Mon Oct 10 05:58:41 2005 +0000 + + Add missing {Prepare,Finish}Access() wrappers for the tile pixmap in the + fallback case + +commit d82aeb55ca3b6abe4cafa7b9c39777a5f67308e5 +Author: Alan Coopersmith +Date: Sun Oct 9 23:47:52 2005 +0000 + + Bug #3254 Make sure + screensaver & DPMS timeouts don't overflow when multiplied by + MILLI_PER_MIN. (Reported by Zachary J. Slater) + +commit 29b5f846d261976f466d2c7181d6a75de670066b +Author: Alan Coopersmith +Date: Sun Oct 9 17:47:34 2005 +0000 + + Bug #4715 Add + SecurityPolicy to EXTRA_DIST (Bill Crawford) + +commit 046234b3ebdfe221de9e87d70d287f69a6f59d6e +Author: Eric Anholt +Date: Sun Oct 9 02:03:22 2005 +0000 + + Don't try the accelerated glyphs path for component-alpha text (which I + don't expect drivers to be able to accelerate without exa assistance). + Instead, drop back to plain old miGlyphs for a 62.5% +/- 1.5% reduction + in runtime of my ls -lR test (n=5) with component alpha. While a + reasonable approach would seem to be making a better test to see + whether the entire path would be accelerated and force migration + appropriately, my attempt at this made the situation much worse. + +commit 526d1502df8db6799c9d1155b86ce79cef90872b +Author: Alan Hourihane +Date: Fri Oct 7 21:29:39 2005 +0000 + + another update to the RandR fix (thanks Aaron) + +commit 5a71a5667eb5b01e0f65f9310f4af1f6c5711ab7 +Author: Kristian Høgsberg +Date: Fri Oct 7 19:01:10 2005 +0000 + + Add Xprint init scrips to EXTRA_DIST. + +commit 470213753b158225b44a39a872599344acbc7101 +Author: Alan Hourihane +Date: Fri Oct 7 18:15:08 2005 +0000 + + update the last RandR fix + +commit 348242f35aeb2869ef390241035b5f3266fc0288 +Author: Alan Hourihane +Date: Fri Oct 7 15:39:52 2005 +0000 + + programs/Xserver/hw/xfree86/common/xf86RandR.c Use PointerMoved instead of + SetCursorPosition, as PointerMoved will call AdjustFrame to reposition + the window if necessary and avoid the cursor ending up offscreen. + +commit 578e18d11b3d61449c1dd7eba04e1748f19c68f3 +Author: Kevin E Martin +Date: Fri Oct 7 14:27:47 2005 +0000 + + Add darwin to dist + Include missing docs in EXTRA_DIST + Include headers and other files in dist + +commit 148df64a05d69adaac4b0f3684b846eb1da60219 +Author: Kevin E Martin +Date: Fri Oct 7 04:11:02 2005 +0000 + + Add README.compiled to dist tarball + +commit ff258ac2783203ed2a7698894d951391d1aecebc +Author: Benjamin Herrenschmidt +Date: Thu Oct 6 23:45:29 2005 +0000 + + Clients tend to set picture->repeat when not necessary. Most HW cannot + accelerate repeat NPOT thus triggering software fallback (this is the + case with gnome desktop for example). This adds a simple optimisation + to exa that removes "repeat" when it's obviously useless, that is, the + single picture instance covers the entire rectangle beeing used + +commit e4ed43c3a6c248ba2b82b8bbf29da537a68407e6 +Author: Søren Sandmann Pedersen +Date: Thu Oct 6 22:25:35 2005 +0000 + + symlink.sh: + New files linked: + xorgconf.cpp Options + usb.3 usb_hid_usages + lynx_ppc.S + BUSmemcpy.S IODelay.S PortIO.S SlowBcopy.S + sun_inout.s + xaaTEGlyphBlt.S + xkbcomp/compiled/README + New files excluded: + All of lib/GL/apple + xlibi18n/*/*.mapfile + xxserver/xorg/configure.ac, xkb/Makefile.am: + Install README.compiled in the xkb output dir + +commit 1614a31a9dad9482ae4526c194c2bae1c4993f8f +Author: Eric Anholt +Date: Thu Oct 6 21:55:41 2005 +0000 + + Bug #4699: Correct some memory leaks in EXA and damage related to region + handling. + +commit cd9ff6aec81e04bbfe14364407ccb28df05fc063 +Author: Alan Coopersmith +Date: Thu Oct 6 20:16:13 2005 +0000 + + cpp processing for Xvfb man page + +commit 370b8c8f1cb1a3531d52ea3b430852a0d76b2a4c +Author: Alan Coopersmith +Date: Thu Oct 6 20:14:43 2005 +0000 + + App-defaults file not supposed to have .ad suffix when installed Fix cpp + rules to set needed flags for app-defaults file + +commit 2770233069d3845c681bea8eccff22e92254487e +Author: Alan Coopersmith +Date: Thu Oct 6 19:59:26 2005 +0000 + + Don't build "ev" example on systems without + +commit 460145a5d52b5325fa5e920cee3699fcf7dd9afe +Author: Kristian Høgsberg +Date: Thu Oct 6 19:37:39 2005 +0000 + + Add cpconfig.c to EXTRA_DIST. + Add CURSOR.NOTES to EXTRA_DIST. + Add extrapci.ids to EXTRA_DIST and fix xf86PciIds.h rule. + +commit e63f76caa1b1342422567fdcb9f8af24792c8ca1 +Author: Alan Coopersmith +Date: Thu Oct 6 17:55:54 2005 +0000 + + Sun bug #6326551: xkbSetDetectableAutoRepeat broken when using XEvIE + + (Derek Wang, Sun Microsystems) + +commit 5f30a7b10286b4f55821acd4eb5580a8f5a3c56a +Author: Benjamin Herrenschmidt +Date: Thu Oct 6 08:08:04 2005 +0000 + + Bug #4689: Treat DirectColor as TrueColor in Render. It fixes some crashes + with xcompmgr when using apps that use a DirectColor visual for their + windows + +commit 9000c0321baf1e25e1796e6a333aad0e5a22cbe2 +Author: Kevin E Martin +Date: Thu Oct 6 04:05:30 2005 +0000 + + Install correct man page and add to dist + +commit 9b894df44b575f768a2400d044d8c1eb6ef2ec97 +Author: Kevin E Martin +Date: Thu Oct 6 02:40:41 2005 +0000 + + Include dmx-config.h for modular build + Use intead of "dmxext.h" + +commit 30c1369bf5816ffd7bd52d9a9dbcb72500684e2f +Author: Kevin E Martin +Date: Thu Oct 6 02:35:22 2005 +0000 + + Add support for building DMX config and examples programs Add missing files + to EXTRA_DIST Install Xdmx man page + +commit 1f9b6dc1ccd999c90ba825cf5fbdfa29770224a6 +Author: Kevin E Martin +Date: Thu Oct 6 00:34:29 2005 +0000 + + Clean up generated files to pass distcheck + Clean up generated files to pass distcheck Distribute getconfig.man.pre, + not getconfig.man + +commit 61cd478b545de0313271cf6852e2df770e8f5914 +Author: Adam Jackson +Date: Wed Oct 5 22:39:41 2005 +0000 + + Bug #3652: Server-side GLX support for GLX_SGIX_swap_barrier and + GLX_SGIX_hyperpipe extensions. (Eric Kunze, SGI) + +commit e891d9c078bd31447ae3e1fc7f8c15953b0bb916 +Author: Alan Coopersmith +Date: Wed Oct 5 22:19:09 2005 +0000 + + Update to 2005-10-05 snapshot from pciids.sf.net (includes a couple new + Radeon id's). + +commit dc6ac8e46f80157960a24a1be1fb83f22dff45a0 +Author: Kristian Høgsberg +Date: Wed Oct 5 21:38:40 2005 +0000 + + Add DGA configure option and add various files that we should be dist'ing. + Simplify xf86DefModeSet.c rule a bit. + +commit 8391eaa4aa1ae3744ad8c45f5d148ba362d2c9dd +Author: Adam Jackson +Date: Wed Oct 5 21:13:49 2005 +0000 + + Preprocess and install XOrgCfg.ad as in the monolith. + +commit a9df169f108b15d312421e498675cd2e48206660 +Author: Alan Coopersmith +Date: Wed Oct 5 17:27:58 2005 +0000 + + Add missing $(DESTDIR) to custom install target + +commit a6cbe0776fcc8fb19a2bf2ecef41559eed6e5cef +Author: Alan Coopersmith +Date: Wed Oct 5 16:39:09 2005 +0000 + + Fix the rest of the XFree86 DDX options that require an argument to say so + instead of reporting "unrecognized option" when the argument is + missing. Also give correct error instead of "unrecognized option" for + options only available to root. + +commit 8c524f9966d2a167ea71dd81e235140e0db31471 +Author: Alan Coopersmith +Date: Wed Oct 5 15:33:40 2005 +0000 + + Xdmx & Xprint also need xau & xdmcp module dependencies + +commit 9f3ad65251832631630f7e587b409b750a144bd3 +Author: Luc Verhaegen +Date: Wed Oct 5 07:27:52 2005 +0000 + + Fix lnx_pci.c's xf86GetOSOffsetFromPCI return value. Clears up the resource + ranges awkwardness and the "INVALID MEM ALLOCATION" warning. + +commit da989e988cc96c0ec4f07fceb4c36b30c2e37f4a +Author: Alan Coopersmith +Date: Wed Oct 5 02:18:10 2005 +0000 + + Xnest depends on xdmcp & xau modules too + +commit 9e8b5f3d478ca18a9ff9c26745de77c91a5d36d9 +Author: Alan Coopersmith +Date: Wed Oct 5 01:38:50 2005 +0000 + + Make Xorg -config stop lying to people and claiming it doesn't exist when + you fail to specify a file name. Also, include it in the list of + available options for non-root users when listing all available flags. + +commit 34a8411ede185553f1387ee0bf534cf77b0fc004 +Author: Adam Jackson +Date: Wed Oct 5 00:55:08 2005 +0000 + + Bug #4038: Unbreak the SYSVIPC check for cross builds. (Detlef Vollman) + +commit f47f00ab747563678c8625de5e5b2a588660064e +Author: Eric Anholt +Date: Tue Oct 4 11:24:09 2005 +0000 + + Mark the temporary pixmap dirty if UploadToScreen succeeds. Failure to do + so resulted in a solid black glyph if the font rendering actually + resulted in a fallback (subpixel AA, for example) and the temporary got + migrated after 10 or so glyphs. + +commit 89a1a91b88b94b341075bc208941337ce11465b7 +Author: Aaron Plattner +Date: Tue Oct 4 07:42:21 2005 +0000 + + Add miext/cw to the module loader include path so that misym.c can export + miDisableCompositeWrapper. + +commit 43625a47063c246e7bf9d687caded0b7e2ea0dc6 +Author: Aaron Plattner +Date: Tue Oct 4 07:31:53 2005 +0000 + + Bump the video driver module ABI minor version to 8 so modules statically + linked against miDisableCompositeWrapper won't load on older servers. + #include "cw.h" instead of #include "cw/cw.h" + +commit ca57db6fc1e6100c47ad935d626fdd490ed6116e +Author: Aaron Plattner +Date: Tue Oct 4 04:30:33 2005 +0000 + + Export miDisableCompositeWrapper. + +commit b2e451b93c20efc49a6cc565239432b2c705fe37 +Author: Eric Anholt +Date: Tue Oct 4 03:44:14 2005 +0000 + + Correct the test for whether projective transform is necessary. Also, use + "affine" to describe the variable (universally) on suggestion from + vektor. Corrects a rendercheck failure. + +commit cdded97a0ad717f4f9120b37d2687fa661696c9b +Author: Alan Coopersmith +Date: Tue Oct 4 00:45:42 2005 +0000 + + Add #include for modular build + +commit 4ae4fc7d51aeb0f27bed52f7e6a346745f3ea453 +Author: Alan Coopersmith +Date: Tue Oct 4 00:43:16 2005 +0000 + + Add gtf to xserver/xorg/hw/xfree86/utils + +commit d51962378ef6371456e034d6d7f6780e05bc1207 +Author: Adam Jackson +Date: Mon Oct 3 19:31:50 2005 +0000 + + Bug #3781: Only use fbCopyAreammx when alu == GXcopy. Originally Gentoo bug + #96053, patch by bartron@gmx.net. + +commit 6d4b350dee9495e54e6e5492815885f1d8455ac9 +Author: Alan Coopersmith +Date: Mon Oct 3 16:46:14 2005 +0000 + + Bug #3815 Patch #3463 + GNU/kFreeBSD + Xserver support (Robert Millan) + +commit 22b4200b01310e7b4743ef0b3541c3053a2d8279 +Author: Alan Coopersmith +Date: Mon Oct 3 15:41:10 2005 +0000 + + Whoops, need to be in DIST_SUBDIRS too. + +commit 14a2bd33307fd937804a9fbb03787ec30858a05c +Author: Alan Coopersmith +Date: Mon Oct 3 15:37:57 2005 +0000 + + Add missing ] (Dawid Gajownik) + Add getconfig (Dawid Gajownik) + +commit 84141fc299b03b5552be093f9b698a85bc670d65 +Author: Eric Anholt +Date: Mon Oct 3 11:43:55 2005 +0000 + + Merge r1.36 of fbcompose.c from xserver CVS: Special case projective + transforms so we can avoid doing the expensive + 64-bit math. Unroll the bilinear interpolation loops for an extra boost. I + tested this with the up/downscaling cairo-benchmarks with Xvfb and saw + a 12% +/- 4% decrease in time taken to run them. + +commit c024262eae4e00567ccb66a59b4d572621233cbc +Author: Eric Anholt +Date: Mon Oct 3 10:20:29 2005 +0000 + + Merge r1.2 of fbedge.c from xserver CVS: Optimize spans where the same + value is being added to multiple pixels. This improves the speed of + rendering wide trapezoids. I tested this with a small set of xlibs + cairo-benchmarks with Xvfb and saw a 4% decrease in time taken to run + them. + +commit a7e3c6fa8ceb6a3a423377aa32ab0da5a6ab9286 +Author: Adam Jackson +Date: Mon Oct 3 06:31:48 2005 +0000 + + Real configure check for execinfo.h (Yuri Vasilevski) + +commit e3d2a7d57bc57453d66aa63ca7fe4d910b64737c +Author: Adam Jackson +Date: Mon Oct 3 06:29:14 2005 +0000 + + Bug #4393: uClibc lies and defines __GLIBC__ even though it's not source + compatible with glibc, so the backtrace support check fails. Work + around this by wrapping the code in a configure check for execinfo.h, + and emulate detection for the monolith. (Yuri Vasilevski) + +commit 5037d3441d65f1fb6493c3b55137ef1b5eddd6b0 +Author: Alan Coopersmith +Date: Sun Oct 2 22:17:38 2005 +0000 + + Bug #1465 + /etc/init.d/Xprint should use PROJECTROOT from build (Grzegorz + DÄ?browski) + +commit b05e78dd40e1fe915096362f32c3af8aee0ed36a +Author: Alan Coopersmith +Date: Sun Oct 2 19:30:57 2005 +0000 + + Fix typo in MAN_SRCS (Dawid Gajownik) + +commit 8814896da83b19be01beedd0b2b3380298778328 +Author: Eric Anholt +Date: Sun Oct 2 08:53:18 2005 +0000 + + Fix include path for commit of bug #4616. + +commit ecaa46380ed0a920186407b9294c5c60f75f1a13 +Author: Eric Anholt +Date: Sun Oct 2 08:28:27 2005 +0000 + + Bugzilla #4616: + - Merge various fb/ bits of COMPOSITE support from xserver, which weren't + necessary before due to cw hiding the issues. Fixes offset calculations + for a number of operations, and may pull some fixes that cairo has + wanted for XAA as well. + - Add a new call, miDisableCompositeWrapper(), which a DDX can call to keep + cw from getting initialized from the damage code. While it would be + cleaner to have each DDX initialize it if it needs it, we don't have + control over all of them (e.g. nvidia). + - Use the miDisableCompositeWrapper() to keep cw from getting set up for + screens using EXA, because EXA is already aware of composite. Avoiding + cw improved performance 0-35% on operations tested by ajax in x11perf. + +commit 2c82429f8957ed0268c0e4e4fe5aed9093f33960 +Author: Ian Romanick +Date: Sat Oct 1 22:25:13 2005 +0000 + + Refactors __glXImageSize and __glXImage3DSize into a single function. It + replaces all calls to the old functions with calls to __glXImageSize + with the new parameter list. + I have also added 'target' as a parameter. This is a stepping stone to the + code in patch #2410. Basically, if the texture target is one of + GL_PROXY_*, the image size is always zero. This gathers all the checks + for that into a single place. I have *not* modified the existing + callers to take this into account. They still do their own checks for + GL_PROXY_*. However, when the generated versions of those functions are + added to the tree, they *will* rely on that. + The code growth is mainly due to the new 40 line comment before + __glXImageSize. + I have tested this with a few of the texture using demos and tests from + Mesa, including tunnel, texdown, and drawpix. + Reviewed by: Adam Jackson, Eric Anholt, and Brian Paul. + +commit e27b3e4ea1ddf9b2e9c2d63a0e60400b523a8a94 +Author: Ian Romanick +Date: Sat Oct 1 22:19:04 2005 +0000 + + Remove some more incorrect prototypes for the __gl*_size functions. + +commit e270e6394b623b48d416feeef0c3856f2e303c8d +Author: Matthieu Herrb +Date: Sat Oct 1 17:53:38 2005 +0000 + + Bug #3822: out of bound reads in fbbltone and fbblt (Mark Kettenis, Thierry + Deval). + +commit 54b2a14f0fa4397f3e9ae75dd63d5cacfdd778eb +Author: Matthieu Herrb +Date: Sat Oct 1 17:30:58 2005 +0000 + + Bug #3411: fix handling of keyboard Autorepeat rate in xorg.conf. + +commit a07dd03748c8fa2633e294ee4d9ab38265970e5e +Author: Alan Coopersmith +Date: Sat Oct 1 07:17:55 2005 +0000 + + Add hw/xfree86/getconfig + +commit abc6aa50fb52fa4fa9b9436dbc3a70f86e62dc27 +Author: Alan Coopersmith +Date: Sat Oct 1 06:27:12 2005 +0000 + + Oops - fix build/install of fbdevhw.man + +commit 13e0db19d8c0b1df636f218bcbfbb2c54fa7576f +Author: Alan Coopersmith +Date: Sat Oct 1 06:19:02 2005 +0000 + + Adding more doc files & fbdevhw man page + +commit b5ce065a5e91e2ad3213ea8c711cfe7ed9060c16 +Author: Thomas Winischhofer +Date: Fri Sep 30 08:54:44 2005 +0000 + + RandR: Fix failure handling (Closes #4635; Thomas Winischhofer) + +commit 4608a2b654be84b2e345bcada63422d18c74a06e +Author: Alan Coopersmith +Date: Fri Sep 30 02:37:57 2005 +0000 + + Man page processing/installation and other doc file updates + +commit aa74468aa59b95424cd0000179b8985b267d639b +Author: Adam Jackson +Date: Fri Sep 30 02:03:45 2005 +0000 + + sparse cleanups. s/0/NULL/ and mark a few things static. + +commit c65fde5343719d3e9ebc76cc371c6f5f7948de8c +Author: Søren Sandmann Pedersen +Date: Wed Sep 28 20:38:42 2005 +0000 + + Make the server distcheck: + - Fix up the XpConfig directory to remove the stuff it installs + - Add a few files to CLEANFILES here and there + +commit 58abce3f90504dd48838a2f7ae7bb5db6a6cff70 +Author: Eric Anholt +Date: Wed Sep 28 20:01:37 2005 +0000 + + - Use the dirty flag (which should be set correctly all the time, + particularly thanks to Prepare/FinishAccess) to avoid DFS/memcpy on + pixmap move-out if it's unnecessary. This was disabled in KAA because + cache misuse on ATI made me guess that this code was wrong. + - Unwrap Glyphs on closescreen. + +commit f53404bdbba23fd46420564565ab815f7c20b101 +Author: Alan Coopersmith +Date: Wed Sep 28 16:55:25 2005 +0000 + + Add kbd_mode build system + +commit 940158a6f2e98069a47293d713df674e16ad8a11 +Author: Ian Romanick +Date: Wed Sep 28 03:37:22 2005 +0000 + + Replace all uses of __glEvalComputeK (and the doubly redundant + EvalComputeK) with calls to one of __glMap[12][df]_size. This was + tested with progs/samples/eval (from Mesa). + +commit 806d74bc0640f4f3dcc034b36a36aea289b01685 +Author: Alan Coopersmith +Date: Wed Sep 28 01:57:47 2005 +0000 + + Add __SVR4 #ifdefs to work in non-Imake builds. + +commit 88957862b812b3e1e19d5e11365a22dc249cf4d2 +Author: Kevin E Martin +Date: Tue Sep 27 23:28:46 2005 +0000 + + Fix distcheck build and install errors. + +commit 003655c02ad3a031031bb4ac859966a513f63e10 +Author: Søren Sandmann Pedersen +Date: Tue Sep 27 18:36:14 2005 +0000 + + Make XpConfig build system call mkfont{scale,dir} + +commit 156b2cf3f76ae53cc37b6f5910b446c776ccc9ba +Author: Søren Sandmann Pedersen +Date: Tue Sep 27 17:49:35 2005 +0000 + + Add forgotten Makefile.am + +commit f3d0cb4a5722e0512bbdcd179215532795cba38f +Author: Søren Sandmann Pedersen +Date: Tue Sep 27 16:15:55 2005 +0000 + + Get XpConfig build system in pretty much working state + +commit 1c2e8b1ecc8b7b8c8562461eed7892ff22d17e71 +Author: Kevin E Martin +Date: Tue Sep 27 15:11:56 2005 +0000 + + Fix make dist to include only sgml files. + +commit ca64aab609c3585234410cd8d908f8e1efe5c788 +Author: Kevin E Martin +Date: Tue Sep 27 14:09:31 2005 +0000 + + Add build system for building docs and fix setuid issues. + Add build system for sgml docs. + +commit 1a4e30d508e62ab304722c3525748ff0e3c2899d +Author: Kevin E Martin +Date: Tue Sep 27 13:47:26 2005 +0000 + + Include xorg-config.h so the generated file will also include it. + +commit 30ff9e26196bdba8435e0dcdb96864e81c8cb136 +Author: Ian Romanick +Date: Tue Sep 27 00:04:40 2005 +0000 + + Fix some problems that caused incorrectly annotated prototypes for + __gl*_size functions to be used. The result was that, on x86, the code + would be compiled with FASTCALL semantics, but the callers would not. + This should fix GLX protocol errors that people are seeing. There + doesn't appear to be a bugzilla associated with this problem. + +commit 6c5c54b9a2872f1bb7de36a8d2d4efcef70b14c6 +Author: Søren Sandmann Pedersen +Date: Mon Sep 26 23:07:44 2005 +0000 + + Various small fixups to get XpConfig to 'build' + +commit 604f7c64efb57a48ec667c2ed62d3b4bad0c302b +Author: Søren Sandmann Pedersen +Date: Mon Sep 26 22:45:43 2005 +0000 + + Check in skeleton Makefile.am's for the rest of XpConfig + +commit 8907195d784ff2c72a00b64edab6a8ac3b31dec5 +Author: Alan Coopersmith +Date: Mon Sep 26 20:58:26 2005 +0000 + + Take care of more files from monolith's Xserver/hw/xfree86/etc dir: + hw/xfree86/utils/ioport/Makefile.am + Add ioport and pcitweak utils from monolith hw/xfree86/etc dir. + Generate xf86DefModeSet.c from vesamodes & extramodes + Add apSolaris.shar to EXTRA_DIST + +commit 9abccb5e65628c938c6f01b685ab8fbffae7bc3b +Author: Søren Sandmann Pedersen +Date: Mon Sep 26 19:33:06 2005 +0000 + + Add initial build system for XpConfig + +commit 0531c4be2f1a30082cfec5e411ab34d17978d66e +Author: Alan Coopersmith +Date: Mon Sep 26 02:41:38 2005 +0000 + + alanc@alf:/export/alanc/X.org/head/cvs-rw/xc [7:40pm - 628] head -14 + ChangeLog + include xorg-config.h for modular build + Adjust XF86CONFIG defines for modular build + Fixes for modular build: + - include modular server config headers + - change default XCONFIGFILE to xorg.conf + - define XKB_RULES_DIR if not defined by Imake + +commit 256fa24945bcaa6e5a68a48c1b757f8084e88a38 +Author: Alan Coopersmith +Date: Sun Sep 25 17:48:09 2005 +0000 + + Add SecurityPolicy file for XCSECURITY extension. + Add README to EXTRA_DIST + +commit 54639964cc344f1086196729fde37515f11e7972 +Author: Bogdan Diaconescu +Date: Sat Sep 24 21:56:00 2005 +0000 + + Changed the license to a X/MIT one + +commit 3192f400c72b3b606fcc1798d577737502897b43 +Author: Adam Jackson +Date: Sat Sep 24 18:45:45 2005 +0000 + + Disable the {Open,Close}FullScreen DRI protocol. Remove empty FullScreen + stubs from drivers, comment the non-empty ones. + +commit a5477ae7ac9a56c1a586950db1dee6661bff149d +Author: Alan Coopersmith +Date: Sat Sep 24 02:40:51 2005 +0000 + + Add scanpci, xorgcfg, & xorgconfig utilities. + +commit 2ba865b3f57340fd1d75f7614c17f615cc127b89 +Author: Søren Sandmann Pedersen +Date: Fri Sep 23 23:04:04 2005 +0000 + + Fri Sep 23 19:00:06 2005 Søren Sandmann + Apply patch from Ronald Wahl to make sure that the stack pointer is not + modified at points where we access external variables. (Bug 4269). + +commit 7554e1bf29e5aef8e76f88bac2994ea45a924f2b +Author: Alan Coopersmith +Date: Fri Sep 23 00:27:07 2005 +0000 + + Sun bug #6321613 + + xorgcfg dumps core when it reads a configuration file that has a + Monitor Section, but does not have a "VendorName" entry inside it. + (Henry Zhao, Sun Microsystems) + +commit 99793543c0fcfd4d699549fcc2bf0ed12aed6a19 +Author: Alan Hourihane +Date: Thu Sep 22 12:40:41 2005 +0000 + + put back some agp related allocation messages + +commit 02566dff4abbda6888f719727c169b966617a83d +Author: Alan Hourihane +Date: Thu Sep 22 12:33:36 2005 +0000 + + fix typo + +commit 56e7766c775385b0c6e09e6a65a1c8e10dba786e +Author: Eric Anholt +Date: Wed Sep 21 22:26:07 2005 +0000 + + Bug #4541: Fix text drawing in the case where a list contains no + non-zero-sized glyphs. Several variables weren't updated, resulting in + rendering simply stopping when this case was hit. (Anders Kaseorg) + +commit 32497ff479d0c34c05eb5acfcd5f7e186bac3227 +Author: Kristian Høgsberg +Date: Wed Sep 21 18:14:32 2005 +0000 + + Accept --with-xkb-output argument to specify output dir for compiled xkb + keymaps. Define XKM_OUTPUT_DIR and XKB_BIN_DIRECTORY. + Add XKM_OUTPUT_DIR and XKB_BIN_DIRECTORY. + Add XKB_CFLAGS. + +commit 361a9eb953aaa38f8ebc057185de29e50f9eef26 +Author: Eric Anholt +Date: Wed Sep 21 10:27:53 2005 +0000 + + - Change migration-in rule slightly: previously, if your score was less + than the max, it was bumped, and then if you were above the threshhold + you got moved in. Instead, do the above-threshhold check separate from + score starting out less than max. While this will likely make thrashing + cases worse, I hope it will fix some issues with long term performance + (think of an xcompmgr with a backbuffer it's doing only accelerated + operations to. If some new pixmap comes in and bumps it out, even once, + it will never get a chance to re-migrate because its score will be + maxed). Change migration-out to be the same way for symmetry, though it + shouldn't ever affect anything. + - Fix a lot of debugging output, both in terms of printing quality, and + completeness. The fallback debugging covers a lot more now, pointing + out new areas for improvement. Debugging toggles are now centralized in + exaPriv.h. + +commit 6a29c4cec156a135d1d9cdb65995f7a84de7cb56 +Author: Eric Anholt +Date: Wed Sep 21 07:43:01 2005 +0000 + + Add support for hardware accelerating tiled background painting. One + example of this is the root weave, which paints slightly slower on SiS + now in my testing. However, according to keithp some apps use this + feature for a sort of cheap backing store, which this could help with + significantly. While I haven't done much performance testing with it, + it will at least rule out one possible source of terrible performance. + +commit 1115ff4c008dea6d6cafcb39e4ce6d0b3ed4fcc0 +Author: Adam Jackson +Date: Wed Sep 21 00:38:05 2005 +0000 + + Bug #4487: Add the bsd subdir to DIST_SUBDIRS. (Joshua Baergen) + +commit 00bd8968b264c1f69487dd99c212e0ce889b11db +Author: Adam Jackson +Date: Wed Sep 21 00:24:10 2005 +0000 + + Bug #4257: Move cfbcmap.c to cfb_common_sources. + +commit b7e723ed6f23cc8d85f1f1eced9d8ccbc2a6b38c +Author: Adam Jackson +Date: Tue Sep 20 23:32:21 2005 +0000 + + Missing backslash + +commit 15b2f94de5e2cc7e4df8d897d562dffeda31c82c +Author: Alan Coopersmith +Date: Tue Sep 20 18:26:24 2005 +0000 + + Update CVS project tag & notice about pci.ids license in output .h. + Update to match recent changes to pci.ids, extrapci.ids, & pciid2c.pl for + people building on systems without perl. + +commit 7d0f47c43c5c177cae0f375ceaeef892e4c9663a +Author: Alan Coopersmith +Date: Tue Sep 20 15:50:31 2005 +0000 + + Add --disable-install-setuid option so you can build as non-root and + chown/chmod later. Also disable by default on platforms that don't need + setuid root X servers (Darwin & SPARC's, according to + InstallXserverSetUID settings in the old Imake config files). + +commit b623c60745ca486667657fa39ad517d1f7a72794 +Author: Alan Coopersmith +Date: Mon Sep 19 22:44:49 2005 +0000 + + Linux/Alpha support (Stefaan De Roeck) + +commit bd906c6bb803b286c39eca80e437a21c14e808a3 +Author: Alan Coopersmith +Date: Mon Sep 19 18:54:05 2005 +0000 + + Update to latest version from pciids.sf.net + Sync with updates to pci.ids & PCI id list in nv driver + +commit 535cd292c809314efe4730a27b0271adfa842775 +Author: Alan Coopersmith +Date: Mon Sep 19 18:38:26 2005 +0000 + + #include "xf86Axp.h" -> "shared/xf86Axp.h" for modular build. (Stefaan De + Roeck) + +commit a1bcf25a1f819768672ac837cb0a3d0c66937656 +Author: Eric Anholt +Date: Sun Sep 18 02:32:23 2005 +0000 + + Break EXA ABI while we still can. Add coordinates to the UploadToScreen + hook so we can upload a subset of a pixmap, and convert the current + drivers to respect that. Use this support to directly UploadToScreen in + exaGlyphs, providing a 47.4% +/-2.4% decrease in wall time for ls -lR + programs/Xserver in an antialiased gnome-terminal on an M6 (n=3, caches + hot). I would have bumped major version, only I can't tell what the + EXA_VERSION_* is supposed to be doing as opposed to the module version. + +commit 074913c8a9c1f66c8752387db2c81ad669e91878 +Author: Eric Anholt +Date: Sat Sep 17 20:02:02 2005 +0000 + + - Don't try to upload 0 byte-per-pixel (PICT_a1) data using + RADEONHostDataBlit. + - Disable the shortcut for switching from 3d to 3d in radeon_exa.c. It + appears that we do need the cache flush here, thought it's not clear + why. Disable the 2d to 2d shortcut while here, since I'm unsure of what + we're doing. Exposed by the following bit: + - Bug #4485: Add a new routine, exaGlyphs, to handle font drawing. Glyphs + were being accumulated in from non-migratable scratch pixmaps, causing + the destination pixmap to move towards screen but the migration + necessary for source never to happen, leading to abysmal performance. + Instead, copy the scratch glyph data into a real pixmap first, then + composite from that into the destination, allowing for migration. time + ls -lR from programs/Xserver showed 26.9% (+/- 6.3%) decrease in wall + time (n=3). + - Create exaDrawableUse* wrapping exaPixmapUse*, but which are aware of + windows needing backing store. Makes migration code prettier, and + ensures that composited windows will be migrated as normal when we turn + off cw for EXA. (issue brought up by keithp) + +commit be2bdab4339e493bb0ac3d0e36508b7aa1cd6e92 +Author: Eric Anholt +Date: Thu Sep 15 06:46:05 2005 +0000 + + Bug #3990: Require glproto in the cases that it's necessary (DRI or DMX + with GLX). (spyderous) + +commit ef7eef0f68af6bfbb4ee56115ac2f3c1b7425755 +Author: Eric Anholt +Date: Thu Sep 15 05:55:21 2005 +0000 + + Bug #4046: Install the X.Org server setuid root. (David Schleef) + +commit 88d7eb1f7ed6afc85c07797838714f2601356018 +Author: Eric Anholt +Date: Thu Sep 15 05:06:54 2005 +0000 + + Bug #3889: Create the log dir on install, and allow configuring + specifically that directory. Failure to have the directory keeps the + xorg server from starting. + +commit 25a0ecdc1868f4b53225b92e8ccd222814e2da2a +Author: Eric Anholt +Date: Thu Sep 15 04:07:19 2005 +0000 + + Don't put a version number on the module filename. + +commit 0888ad3874414e32535fecdb717ee7ab86f9d4cc +Author: Eric Anholt +Date: Wed Sep 14 07:49:22 2005 +0000 + + Build xf8_32bpp, which is wanted by the mga driver, and export elf.h, which + is wanted by the rendition driver. + +commit dfb5da93bc16b2fd2b00e939dbe101a04bdeab4f +Author: Eric Anholt +Date: Tue Sep 13 20:59:05 2005 +0000 + + Turn on DRI by default on Linux, NetBSD, FreeBSD, and fix the build of the + module for FreeBSD by setting some missing defines (XFree86Module, + IN_MODULE) in the dri directory. Note that those missing defines should + be somewhere generic, since there are other consumers of them, but I + haven't figured out where. + +commit 12fbcfefe672ec226bdbc7597bf2fd2cb0ee1e19 +Author: Eric Anholt +Date: Tue Sep 13 18:37:35 2005 +0000 + + Add some initial BSD support for the xorg server. Incomplete on NetBSD, + OpenBSD, and non-i386/amd64 FreeBSD for sure. Plus I haven't actually + run it yet. + +commit 51eb6c83a3b2721703ca50758853bbf9f99fc4d2 +Author: Søren Sandmann Pedersen +Date: Tue Sep 13 15:28:29 2005 +0000 + + Tue Sep 13 11:27:05 2005 S%Gï¿¿%@ren Sandmann + * programs/Xserver/miext/shadow/shadow.c (shadowDamageBox): Add + missing REGION_UNINIT. + +commit 133edff1b499b2c794fcc9a1860c1b5526b58869 +Author: Eric Anholt +Date: Tue Sep 13 05:44:47 2005 +0000 + + Don't define POSIX_SOURCE on any BSDs, since it breaks things. + Define NO_SYS_HEADERS, as the monolithic build does. Helps FreeBSD. + Don't include validate.c in the library, since it seems to be a userland + test program. + +commit c3d6799cee7ff8411b3a05a7ab7e2a9e80c95059 +Author: Daniel Stone +Date: Tue Sep 13 01:33:19 2005 +0000 + + Bug #594: CAN-2005-2495: Fix exploitable integer overflow in pixmap + creation, where we could create a far smaller pixmap than we thought, + allowing changes to arbitrary chunks of memory. (Søren Sandmann + Pedersen) + +commit b290884719e18646326f0c2412c2494a07fe3cfd +Author: Adam Jackson +Date: Tue Sep 13 00:44:52 2005 +0000 + + Bug #3284: Make the DRI lock reference count per-screen. + +commit 846f797f37c1ae57a8dad981113b1139359d8c94 +Author: Daniel Stone +Date: Mon Sep 12 08:24:48 2005 +0000 + + Add missing fontsproto and fontenc to REQUIRED_MODULES. + +commit 5b218617fa8ba52bf65aef35da39e06c662495e6 +Author: Daniel Stone +Date: Mon Sep 12 07:53:16 2005 +0000 + + Add missing resourceproto to REQUIRED_MODULES. + +commit ade158d238475ce923fbc5c49275c78cf3864223 +Author: Daniel Stone +Date: Mon Sep 12 07:07:59 2005 +0000 + + Define WITH_VGAHW, since we always build it; add to Xorg headers. + +commit 34dc481a16c0c1cbd69a9ec7172331b59b85e9a7 +Author: Daniel Stone +Date: Mon Sep 12 07:02:46 2005 +0000 + + Put DMX AC_CONDITIONALS at the top level, since they must always be called. + +commit b0f6fe1f38b448b5f1a280e86b01353865866c70 +Author: Eric Anholt +Date: Sun Sep 11 21:38:41 2005 +0000 + + Add some optional (disabled) fallback debugging code to the async code, for + better tracking of when we're hitting software. + +commit 1c003ccf5d68baaae6fafdc75eff964f2a62fc35 +Author: Eric Anholt +Date: Sun Sep 11 19:08:10 2005 +0000 + + Add a pair of hooks, PrepareAccess() and FinishAccess(), which get called + around CPU access to the framebuffer. This allows the hardware to set + up swappers to deal with endianness, or to tell EXA to move the pixmap + out to framebuffer if insufficient swappers are available (note: must + not fail on front buffer!). + Submitted by: benh + +commit ca210830bd361e3d91b6bc741c495b61c424d1d2 +Author: Adam Jackson +Date: Sun Sep 11 18:43:55 2005 +0000 + + Simplify life for EXA drivers by reducing some {Con,Dis}joint ops. + +commit 04f81cacb9fd0944879b2c23a99fa3a1ae979b12 +Author: Matthieu Herrb +Date: Sun Sep 11 18:33:31 2005 +0000 + + OpenBSD also doesn't like defining POSIX_SOURCE: it limits available + functionnality in headers beyond what's used by Xorg. + +commit 089b4272cf32fc9429c1a0e666c2ffb34fda0b93 +Author: Daniel Stone +Date: Sun Sep 11 01:16:14 2005 +0000 + + use RGB_DB not RGB_PATH as that's what it's looking for + define HAVE_XKB_CONFIG_H so setting xkb-path works (Jürg Billeter) + +commit 2f9d01c9681d80235a70263e2e087dc6c181cdc8 +Author: Eric Anholt +Date: Thu Sep 8 01:15:47 2005 +0000 + + Remove some references to mfb/cfb support that is no longer there. + +commit b5d42012f9be87f3b45a089c596ce6dba8845794 +Author: Daniel Stone +Date: Wed Sep 7 01:30:23 2005 +0000 + + Fix typo resulting in failure to swap between RGB/BGR properly. (Stephen P. + Becker) + +commit c8de8c23fbccb3296747f429a02c0c0682b74bf5 +Author: Daniel Stone +Date: Mon Sep 5 07:43:51 2005 +0000 + + Fix tests for maximum number of colours when creating a colourmap, so a + 32-bit visual (e.g. ARGB) doesn't overflow an int when attempting to do + 1 << 32. (Benjamin Herrenschmidt) + +commit 5c5c51fa6da03f19831632a092761a1e4bcf653b +Author: Daniel Stone +Date: Mon Sep 5 07:40:50 2005 +0000 + + Initialise private arrays with calloc, rather than standard malloc. + (Benjamin Herrenschmidt) + +commit 691669c0121494df90c8523f7d17e01ba0b14a57 +Author: Daniel Stone +Date: Sat Sep 3 07:08:58 2005 +0000 + + xorg-server.h -> dix-config.h (thinko). + +commit 4b2f5ba1b5d59fd6bd7f82da5730f72e8df04858 +Author: Alan Coopersmith +Date: Sat Sep 3 03:27:55 2005 +0000 + + Use macros from xtrans.m4, issue error if not found. + +commit 733a6d7a268945d149bcea159253408bedc69b12 +Author: Jesse Barnes +Date: Sat Sep 3 02:21:36 2005 +0000 + + Add EXA driver writer documentation for the benefit of future generations + of X hackers. + +commit 854010d71dc0f1e9b73cdc764c9d2cf36f1da625 +Author: Daniel Stone +Date: Fri Sep 2 03:22:01 2005 +0000 + + Add -include dix-config.h to GL/mesa/X to catch _XSERVER64, et al. + +commit 287336f3c9e5023acbfba6508b05a68ccca9ddf0 +Author: Kristian Høgsberg +Date: Thu Sep 1 19:56:14 2005 +0000 + + Teach xkb how to optionally run xkbcomp from $bindir instead of + $datadir/xkb. + +commit 94fbdb5c6d2cdc7b70ecdabe22a9de8b9aabeced +Author: Daniel Stone +Date: Thu Sep 1 14:56:35 2005 +0000 + + Make RGB_PATH configurable. + Move I2C modules back to $(moduledir)/multimedia. + +commit a65c5796133d126b1810749b5206607e7c42d787 +Author: Kristian Høgsberg +Date: Wed Aug 31 14:58:09 2005 +0000 + + Include xkb-config.h if we have it so we pick up the paths defined there. + +commit 9d3b5e89d691b79ea3361e6dc82938c22d70d0e3 +Author: Alan Coopersmith +Date: Tue Aug 30 22:34:14 2005 +0000 + + Save keyboard LED state on startup and restore on exit so text console mode + LEDs match text console mode state. Move push of streams module earlier + so it's loaded before we start using kbd ioctls provided by the streams + module. + +commit fa6fbd018da939fda7cc2b9a9aa2717b9675a178 +Author: Kristian Høgsberg +Date: Tue Aug 30 22:31:52 2005 +0000 + + Use the $(moduledir) makefile variable instead of @moduledir@ so it can be + overridden at make install time. + Remove driverdir and inputdir from pkg-config file. The directory layout of + moduledir is fixed and well known by drivers. + +commit b4f4bf028a88ee709f4536373de2d40b6445006e +Author: Alan Hourihane +Date: Tue Aug 30 19:51:59 2005 +0000 + + programs/Xserver/hw/xwin/winmultiwindowshape.c Fix off by one error (Colin + Harrison) + +commit 0e50af8b7f459aafd1d1d52414629e926167a751 +Author: Adam Jackson +Date: Tue Aug 30 19:35:06 2005 +0000 + + typo fix + +commit 0c74799af4f924ba64ebd6052802b73547f55c72 +Author: Eric Anholt +Date: Tue Aug 30 04:41:04 2005 +0000 + + Remove existing broken maxX/maxY code for composite (results in infinite + loops, doesn't deal with failure, doesn't present the interface to + drivers that I expected) and instead replace it with a simple fallback + to software when coordinate limits could be violated. Act similarly in + other acceleration cases as well. + The solution I want to see (and intend to do soon) is to (when necessary) + create temporary pictures/pixmaps pointing towards the real ones' bits, + with the offsets adjusted, then render from/to those using adjusted + coordinates. + +commit f20e845b04dee5fc0780811f565180e322b60b73 +Author: Eric Anholt +Date: Tue Aug 30 03:42:07 2005 +0000 + + More 0 -> NULL for pointers missed in previous commit to this file. + +commit 7777d325a3d049cc233c004cba288ed5d10539c2 +Author: Eric Anholt +Date: Tue Aug 30 03:05:21 2005 +0000 + + Apply an xserver patch from cworth: Avoid buffer ovverrun when a + trapezoid's right edge is on a pixel boundary. + +commit e321f9e7ff7de9aa702e33a22743b55c8bb66953 +Author: Eric Anholt +Date: Tue Aug 30 03:01:38 2005 +0000 + + Apply the xserver patch from vektor for bug #4208: Use NULL for pointers + instead of 0. + +commit 20813d3af065f9b719b39d2e7a3382b8fa278a48 +Author: Adam Jackson +Date: Sun Aug 28 19:47:39 2005 +0000 + + Bug #3974: Fix unaligned memory access on LP64. (Matthieu Herrb) + +commit 0926cf79c030f29dce32a9dc944734960ec93d19 +Author: Adam Jackson +Date: Fri Aug 26 20:21:57 2005 +0000 + + Add diagnostic messages for exaDriverInit failure cases. + +commit 5ffff7cb868a768307ff6faf164210020e6b94a2 +Author: Adam Jackson +Date: Fri Aug 26 20:08:09 2005 +0000 + + Bug #4160: Fix Altix kernel version check. + +commit 6b0cdc5dd9e451021c562ac4b6b2101d50187a30 +Author: Daniel Stone +Date: Fri Aug 26 16:46:41 2005 +0000 + + Change use of dix-config.h to xorg-config.h. + +commit 9d1b349b3765fb587b353c78cca9aa083f5d0eee +Author: Daniel Stone +Date: Fri Aug 26 16:34:55 2005 +0000 + + Back out previous change until I figure out something smarter. + +commit 3075df24e7931901c6f0526e10a89631fd73c4d0 +Author: Daniel Stone +Date: Fri Aug 26 07:35:55 2005 +0000 + + Subvert SIGUSR2 to reload all input devices. (Ubuntu #020) + +commit 89c84575ea905c7598d6b6029c9209abe1cfb074 +Author: Daniel Stone +Date: Fri Aug 26 07:24:21 2005 +0000 + + Undo rate/period change after function body, so the damage doesn't leak + into other functions. (Debian #050) + +commit bb5e934df7f23fb365ed673a12d283ff52af79c0 +Author: Daniel Stone +Date: Fri Aug 26 07:15:04 2005 +0000 + + Only open /proc/bus/pci/devices once. (Ubuntu #029) + +commit c937faadd0a0a5f2598b84286ac1ed8996a512e5 +Author: Daniel Stone +Date: Fri Aug 26 06:48:24 2005 +0000 + + Better error message on failure to set iopl. (Debian #021) + +commit 6d34a2ac8a33bd6c9083106b38fab6062e033e39 +Author: Daniel Stone +Date: Fri Aug 26 06:35:00 2005 +0000 + + Add Xv symbol from Xext. + +commit b8f0d4c3ebee363279f9dc7318de3e3c854ca5ef +Author: Daniel Stone +Date: Fri Aug 26 06:29:15 2005 +0000 + + Spit out an error when there is no valid FB device, instead of just failing + silently. (Debian #070) + +commit b48a24e7969d99a0116bc780c70d3e1c18b34769 +Author: Daniel Stone +Date: Fri Aug 26 06:23:41 2005 +0000 + + Don't assume that all sun4m CPUs support muldiv; the Cypress CPU, which + implements the 4m MMU but only v7 instructions, does not. (Debian + #100). + +commit fd158d3d5215b0a013f5305a76097b0b8fa14cf6 +Author: Daniel Stone +Date: Fri Aug 26 05:49:44 2005 +0000 + + Get prototype for ntohl from SuSv3-compliant location, fixing it for + systems which define ntohl as a macro only, not both macro and + function. (Debian #076) + +commit 53e489c0e39b89f41213a726fe1b611d7d9a18db +Author: Daniel Stone +Date: Fri Aug 26 05:47:36 2005 +0000 + + Work around ATI expansion ROM problem on IA64 caused by prototype HP + McKinley systems. (Bdale Garbee) + +commit 40374d1149d6dcf0b4521faae8bdfecc8a3af077 +Author: Daniel Stone +Date: Fri Aug 26 05:00:07 2005 +0000 + + Accept 'Enabled' and 'Disabled' for Extensions section (Ubuntu #990) + +commit ea80b5db257f4c22cf5a152084aef5fe05079db0 +Author: Eric Anholt +Date: Thu Aug 25 22:11:04 2005 +0000 + + Fix a use-after-free of cursor data by refcounting for the sprite.current + reference. The particular path seen was XFixes' ReplaceCursor() + resulting in the sprite.current being freed, but then it getting + accessed during the ChangeToCursor() that happens as a result of + WindowHasNewCursor(). + +commit 54cc45b09bc6c860b3de2012b57c4b35ca18ffd2 +Author: Søren Sandmann Pedersen +Date: Thu Aug 25 21:22:41 2005 +0000 + + Thu Aug 25 17:15:01 2005 Søren Sandmann + Add all the drivers to the module_LTLIBRARIES instead of having separate + variables for them. Pointed out by Kristian Høgsberg. + +commit ff22adc09763b2bd860e7f780a5d0855cab0ab30 +Author: Kristian Høgsberg +Date: Thu Aug 25 14:19:43 2005 +0000 + + Remove sun_inout.s so make dist works (discussed with Alan Coopersmith). + +commit 344a24b6229f477c892dd855546391bc1e091bd7 +Author: Alan Coopersmith +Date: Thu Aug 25 04:09:45 2005 +0000 + + Use system curses library on Solaris for xorgcfg text mode. + +commit 0711502f1847ed461672b9842218b9afa9d349ed +Author: Eric Anholt +Date: Wed Aug 24 23:48:11 2005 +0000 + + Bugzilla #4226: Change the pixmap migration strategy for the CopyNtoN case. + Now, if either source or dest were in framebuffer, try to get both + there, but prefer system memory for both otherwise. Required making + exaasync.c go through the try-acceleration path. This significantly + improves window resizing under composite, because previously the + pattern of creating a new pixmap and copying default contents from the + screen caused a fallback every time due to the new destination pixmap + being in system memory. + +commit 2261710fe0dffd60433e3362ac12adf4db570fe5 +Author: Eric Anholt +Date: Wed Aug 24 23:38:25 2005 +0000 + + Fix a bug where NULL could be dereferenced during the pixmap kick-out + process by referencing the correct offscreen area. Also drive-by the + comments related to these for clarity. + +commit 55c5c6953a3a661758a42b147f9542950a62fc4d +Author: Eric Anholt +Date: Wed Aug 24 22:43:27 2005 +0000 + + Bugzilla #4090: Introduce getters for pixmap pitch and offset, to + simplify/clarify it for driver writers who probably don't want to know + what pPixmap->devPrivate.ptr or pPixmap->devKind mean. Converts the sis + driver to use them, and bumps the EXA module minor version. + +commit 079ad773e09ed0c5baf01de3d4f02a5568da5634 +Author: Alan Coopersmith +Date: Wed Aug 24 22:37:15 2005 +0000 + + Fill in xf86DeallocateGARTMemory stub based on lnx_agp.c version. Add + include of xorg-config.h for modular builds + +commit 8fd250e5e4c2016614b82e2d653b7fbf8a3a5b99 +Author: Eric Anholt +Date: Wed Aug 24 21:51:28 2005 +0000 + + Bugzilla #4089: Fix crashes in !EXA_OFFSCREEN_PIXMAPS case by not trying to + do migration when the EXA pixmap private is NULL. + +commit 79dc5f3d5fe5a66f5fa53af9afc30d27d1af0bce +Author: Kristian Høgsberg +Date: Wed Aug 24 21:28:40 2005 +0000 + + Don't export non-standard symbols generated GCCs stack protection feature + (__guard, __stack_smash_handler). + +commit d2952de6e3d9197529695bb88d8c3af679ad71af +Author: Søren Sandmann Pedersen +Date: Wed Aug 24 19:41:43 2005 +0000 + + Wed Aug 24 15:39:07 2005 Søren Sandmann + Add GLX_{INC,LIBS} for xprint. + Add @DIX_FLAGS@ to AM_CFLAGS + +commit 81e708440ced309adc62ebf43d00becd32338db5 +Author: Søren Sandmann Pedersen +Date: Wed Aug 24 19:35:51 2005 +0000 + + Wed Aug 24 15:29:50 2005 Søren Sandmann + Conditionally include dix-config.h + Conditionally include dix-config.h + +commit 9657e0e9def47dba5b0bfa7461874362712a07bb +Author: Alan Coopersmith +Date: Wed Aug 24 15:18:06 2005 +0000 + + Don't try to build dmx/input/lnx-*.c if isn't found + Don't try to build dmx/input/usb-*.c if isn't found + Replace -rdynamic with $(LD_EXPORT_SYMBOLS_FLAG) for compatibility with + compilers other than gcc + +commit 825a95a1fab69f84c99ae132888fced22e28be33 +Author: Daniel Stone +Date: Wed Aug 24 11:18:35 2005 +0000 + + Remove use of dix-config and xorg-config.h from public headers. + +commit 1fb4a5a4ea993a7913a7bcc362315d31b2907836 +Author: Daniel Stone +Date: Wed Aug 24 09:12:50 2005 +0000 + + Add xcmiscproto and bigreqsproto to REQUIRED_MODULES, since Xext uses them. + +commit b47535bd661743946851099f226f9e6aa4cc8c90 +Author: Alan Hourihane +Date: Wed Aug 24 08:49:31 2005 +0000 + + programs/Xserver/GL/windows/glwrap.c Wrap PointParameteriNV & + PointParameterivNV for Windows builds. + +commit 9f498a37dd3d8456d2a97be9c039b63abc81a5fe +Author: Alan Coopersmith +Date: Tue Aug 23 20:58:29 2005 +0000 + + Display more friendly mouse protocol names. Enable mouse wheel mapping by + default. + +commit cff4b1c2166aa2e75618c8df09554a602c3a68c5 +Author: Alan Coopersmith +Date: Tue Aug 23 20:12:26 2005 +0000 + + Check for getconfig in GETCONFIG_DIR if it's not found in module dir. + +commit bfd13645867aab831b7a0f2b1757cb80837c07d9 +Author: Daniel Stone +Date: Tue Aug 23 09:20:49 2005 +0000 + + Add missing saver, evie, video, trap proto pkg-config checks. (Georgi + Georgiev) + +commit 27afac2ce6a77bc68669c1af6a61c589aa9ef384 +Author: Daniel Stone +Date: Tue Aug 23 08:59:30 2005 +0000 + + Fix test for Xnest presence. (Donnie Berkholz) + +commit fed61462be281c568df6407f94ea519748f0b720 +Author: Daniel Stone +Date: Tue Aug 23 08:58:40 2005 +0000 + + Fix up warning on debugging. + +commit e848eb289c9251742a88e76017603952394f4262 +Author: Alan Coopersmith +Date: Tue Aug 23 01:14:35 2005 +0000 + + Rename app-defaults entries from xf86cfg to xorgcfg to match name passed to + XtAppInitialize. (Henry Zhao, Sun Microsystems) Also, display vendor + version instead of 4.0 for server version. + +commit 6076fca82528da8d50b0ed6be8da6f811321474d +Author: Alan Coopersmith +Date: Tue Aug 23 00:32:27 2005 +0000 + + User message cleanups/updates for modern configurations. + +commit b07602014061cb41540f6a7e74e4132e67aa1117 +Author: Alan Coopersmith +Date: Mon Aug 22 21:47:59 2005 +0000 + + If MAKE_XKM_OUTPUT_DIR is defined, call trans_mkdir to create directory if + it doesn't already exist. (ported from Solaris Xsun bug #5039004) + When BuildLikeSun is set, define MAKE_XKM_OUTPUT_DIR and set the xkb output + directory to /var/run/xkb. + +commit 4a19a33db6d04b5835830a665daa679ee2fcafe7 +Author: Kevin E Martin +Date: Mon Aug 22 21:29:18 2005 +0000 + + bugzilla #2880 (https://bugs.freedesktop.org/show_bug.cgi?id=2880) + attachment #2987 (https://bugs.freedesktop.org/attachment.cgi?id=2987) + Use system method to access PCI config space for inb and inw in + addition to inl (Olivier Baudron and Kevin Martin). + +commit 5557a40a022b0ede36edd3370a60f5fc3d147796 +Author: Kevin E Martin +Date: Mon Aug 22 19:52:26 2005 +0000 + + Fix linking errors for xprint. + +commit 7693f668efd206a6c259166665bc36d3c6335e8d +Author: Alan Hourihane +Date: Mon Aug 22 12:05:18 2005 +0000 + + programs/Xserver/hw/xfree86/os-support/linux/lnx_acpi.c + programs/Xserver/hw/xfree86/os-support/linux/lnx_apm.c + programs/Xserver/hw/xfree86/os-support/linux/Imakefile Add basic ACPI Linux + support so that events can be passed to the driver. (Alan Hourihane) + +commit 02c834f198eab4c4686d8156b88508fe102099c1 +Author: Daniel Stone +Date: Mon Aug 22 09:15:31 2005 +0000 + + Include Xv and XvMC headers in the SDK. + +commit 3c4d605c7e8a9f6d296086a5b03b4f11b90590db +Author: Daniel Stone +Date: Mon Aug 22 09:15:20 2005 +0000 + + Fix linkage for Xnest, Xvfb, Xdmx and Xorg DDXes; include all libs. + +commit 79be1f6d4d1ab48841d31d5553dd36b1b3632650 +Author: Daniel Stone +Date: Sun Aug 21 19:29:55 2005 +0000 + + Fix inclusion order of dix-config.h, so _XSERVER64 gets defined before X.h + or Xdefs.h get included. (Jürg Billeter) + +commit 8d6e743bc4e6854ee0bb0fa4f197acd6d7683ccd +Author: Daniel Stone +Date: Sun Aug 21 19:23:17 2005 +0000 + + Add _XSERVER64 definition to config headers. + +commit 588105173840355717d7b2f7f652289a41166c3f +Author: Daniel Stone +Date: Sun Aug 21 19:15:11 2005 +0000 + + Huge cleanup. Group into sections: hardware feature detection, extension + detection/configuration, DDX options. Make building of Xorg DDX fully + optional. Clarify and correct some help texts. Change all comments to + use dnl instead of #. Quote all tests correctly, and guard + pure-variable tests with 'x' (e.g. test $DMX = yes -> test "x$DMX" = + xyes). Since the DDXes seem to have pretty divergent extension support + these days, get rid of EXTENSION_LIBS, DMX_EXTENSIONS and + XPRINT_EXTENSIONS, and go back to building extension lists by hand in + the DDX-specific sections. Use portable POSIX constructs everywhere + (e.g. test foo && test bar, instead of test foo -a bar). + Clean up old cruft. + Set _XSERVER64 on 64-bit architectures, and use x86_64 for host_cpu instead + of amd64 (Jürg Billeter). + +commit 367f45073953f8f99a2d9dd054f479e1070f856e +Author: Daniel Stone +Date: Sun Aug 21 08:43:46 2005 +0000 + + Change xorg_bus_sbus to xorg_bus_sparc; build sparcPci.c on all SPARCs. + +commit 71b3fea94e8845f35e47503636ca1fe78d2d48ca +Author: Daniel Stone +Date: Sun Aug 21 08:24:52 2005 +0000 + + Typo fix (SOURCE -> SOURCES). + +commit db2909ce76b178663de301c09fb97f2936b1997e +Author: Daniel Stone +Date: Sun Aug 21 06:56:19 2005 +0000 + + Add test for SPARC. Build SparcMulDiv.S on all SPARCs. + Make the default font path configurable. + +commit d96e6666862553d59fc1f9fdd14fb65f36d589af +Author: Adam Jackson +Date: Sat Aug 20 18:52:07 2005 +0000 + + Add sparcPci.c to EXTRA_DIST. + +commit a402c876a465904ac71ebf39af67ea451b2457dc +Author: Daniel Stone +Date: Sat Aug 20 18:11:17 2005 +0000 + + Make DRI/GLcore builds srcdir != builddir safe, and invoke symlink-mesa.sh + in our builddir, not our srcdir. + +commit 238d45d2f148e1e0af4b1619cc1d5e8cc4bf9661 +Author: Daniel Stone +Date: Sat Aug 20 18:10:03 2005 +0000 + + Make Xprint build optional. + +commit abab3fd628c2d1096e8534192f33c1068a573c12 +Author: Daniel Stone +Date: Sat Aug 20 18:09:21 2005 +0000 + + Make Xext linkage srcdir != builddir safe. + +commit bb1d99ee72cc560e95010ea1008d5e796177ae62 +Author: Daniel Stone +Date: Sat Aug 20 18:07:59 2005 +0000 + + Build libxkbstubs.la to stub XKB DDX functions (e.g. VT switches), and + build libxorggxkb.la from within the Xorg DDX to replace the previous + xf86VT.o, et al, hacks. + +commit 8a32ed46480d78b69f289c90098f5ed4a830851f +Author: Daniel Stone +Date: Fri Aug 19 15:48:18 2005 +0000 + + Really hopefully the last xorg-commit test. + +commit 2fd951434507d2a2c0266a052bdca6e223d31bfa +Author: Daniel Stone +Date: Fri Aug 19 15:45:55 2005 +0000 + + Another test commit for xorg-commit. + +commit 39630b301f769118959b20d962404555714a5812 +Author: Daniel Stone +Date: Fri Aug 19 15:25:19 2005 +0000 + + Testing xorg-commit, nothing else. + +commit b13d3382de0027e897532926983b79caaa1eb655 +Author: Daniel Stone +Date: Fri Aug 19 15:21:54 2005 +0000 + + Fix dates on Søren's entries. + +commit 8ec79e05feacd61562b53ebf36a8b30967affc1e +Author: Daniel Stone +Date: Fri Aug 19 15:15:51 2005 +0000 + + Make symlink-mesa.sh call srcdir != objdir safe. Remove requirement for + XF86Rush protocol headers, which we don't even use. + +commit 057a8709a116feb0fd0004141bbac20d2766f3db +Author: Alan Coopersmith +Date: Fri Aug 19 00:13:46 2005 +0000 + + More updates for Panoramix -> Xinerama rename + +commit bed3235d222fd6e2207f6c0d551c67d5a53322cd +Author: Søren Sandmann Pedersen +Date: Thu Aug 18 21:28:09 2005 +0000 + + Thu Aug 18 17:27:09 2005 Søren Sandmann + Move fbmmx to a convenience library since the mmx flags may be harmful when + applied to non-mmx code. + +commit a0366ddb8cb1c57b85a5806eb348abc19c7f92d6 +Author: Alan Coopersmith +Date: Thu Aug 18 17:14:11 2005 +0000 + + Replace gnu-makeism with portable rules + +commit ea5c49cb17ac956d6dea6bf563e392e61c39da2b +Author: Alan Coopersmith +Date: Thu Aug 18 01:40:33 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2901> Patch #2331 + Lines ending in + break with cpp from gcc >= 3.3 (Peter Breitenlohner) + +commit 22694500e0dd8752b4c01e340f587ecba1ff7fb7 +Author: Alan Coopersmith +Date: Wed Aug 17 23:20:27 2005 +0000 + + Add xf86Sbus.h to EXTRA_DIST files (bugzilla #4128) + +commit df938987d6c19fbdfff8d3334bb497f4814ae384 +Author: Søren Sandmann Pedersen +Date: Wed Aug 17 19:03:18 2005 +0000 + + Add buildsystem for Xprint, and: + Wed Aug 17 14:50:58 2005 Soren Sandmann + Include instead of "Print{,str}.h" + Include isntead of "fonts/fontstruct.h" + Wed Aug 17 14:54:49 2005 Søren Sandmann + Conditionally compile in xprint.c + Add Xprint + +commit f2f6820c3f01810a4da5a8bb4e43119ef2a3fcb6 +Author: Søren Sandmann Pedersen +Date: Wed Aug 17 17:20:13 2005 +0000 + + Wed Aug 17 13:13:00 2005 Søren Sandmann + Make asm labels local. Bug 4073, patch from Diego Pettenò. + +commit ad7f2fc67376f4fbfe81047273de12f7926f0b17 +Author: Søren Sandmann Pedersen +Date: Tue Aug 16 16:21:09 2005 +0000 + + symlink.sh: Temporarily disable xkbdata, add type1mod.c + Tue Aug 16 12:09:09 2005 Søren Sandmann + Add ft and type1 modules. + +commit 24597a1ee2c567ec6bc2f2208457f2778937a034 +Author: Alan Coopersmith +Date: Tue Aug 16 00:40:25 2005 +0000 + + 2005-08-15 Alan Coopersmith m + Convert sunPostKbdEvent to use xf86ProcessAction like xf86PostKbdEvent. + +commit b86282b764387ef8315fc4045d4e1ca1bb74fee1 +Author: Alan Coopersmith +Date: Mon Aug 15 23:48:35 2005 +0000 + + Set ZAxisMapping default to "4 5 6 7". + +commit a6c8d0d71eef7cb964797f7595be36ee0ac10a1a +Author: Søren Sandmann Pedersen +Date: Mon Aug 15 19:42:48 2005 +0000 + + Mon Aug 15 15:41:26 2005 Søren Sandmann + Link this module with libXext.la. + Mon Aug 15 14:56:57 2005 Søren Sandmann + Remove the xkb* files. + Add xkbVT.o and friends as the last things on the link line so they will + override the symbols in libxkb.a. Add a comment on how this situation + might not be considered ideal. + +commit 46aede552aa43cd59f81980303826b5c3d889c02 +Author: Søren Sandmann Pedersen +Date: Mon Aug 15 18:59:16 2005 +0000 + + Mon Aug 15 14:56:57 2005 Søren Sandmann + Remove the xkb* files. + Add xkbVT.o and friends as the last things on the link line so they will + override the symbols in libxkb.a. Add a comment on how this situation + might not be considered ideal. + +commit bcc95c83406a4498227ffd8384bc272fd8cdc49c +Author: Alan Coopersmith +Date: Mon Aug 15 18:32:08 2005 +0000 + + Add AC_SYS_LARGEFILE to match flags used in monolith + +commit 809906a754a1289b7e88489241a2065aa0bf27a2 +Author: Dave Airlie +Date: Mon Aug 15 08:24:45 2005 +0000 + + make mouse support work - note you need to change the evdev devices in the + source.. hacky... + +commit fe5abff38e65c1a49886924efdf0242ab8048008 +Author: Alan Hourihane +Date: Mon Aug 15 07:30:05 2005 +0000 + + Egbert's 64bit fixes for mixed 32/64bit clients + +commit ebedc8bbb54b9b4e1814bc2758216af2bab93540 +Author: Eric Anholt +Date: Sun Aug 14 19:46:55 2005 +0000 + + - Fix the exa pixmap offset/pitch alignment to deal with non-POT alignment + requirements. MGA, notably, uses a multiple of 3 in some cases. + - Rename the pixmap offset/pitch alignment fields to more clearly state + their meaning. + +commit e3509c940fa1fc3988d23f884ca8bffc87d091e5 +Author: Daniel Stone +Date: Sun Aug 14 16:24:30 2005 +0000 + + Don't link libXext, as it is linked in to the server also. + +commit 05071ae0fb847c211b1f20770d3b57fc2172738c +Author: Daniel Stone +Date: Sat Aug 13 07:41:33 2005 +0000 + + Don't link in libx86emu.a as this a) fails badly on non-x86 systems, and b) + is done via x86emu.c including all the source files anyway. + +commit 1ffe9ceb2f6a7261fb62c90dfea861f9dadd27ce +Author: Alan Coopersmith +Date: Sat Aug 13 06:15:35 2005 +0000 + + Oops, forgot a file in earlier Solaris kbd commit + +commit c29051f9d108fe49c23d9cf36fd08cc64c87262a +Author: Alan Coopersmith +Date: Sat Aug 13 00:11:28 2005 +0000 + + Add LintTarget() + Bugzilla #1068 Port + Solaris keyboard code to work with kbd driver. + Also incorporated "audio bell" feature from Xsun keyboard DDX to play bell + tones via /dev/audio (specified via Option "BellDevice" "/dev/audio" in + keyboard device options). + +commit 616a65c4cc528278168db1414776f3a867cd463e +Author: Søren Sandmann Pedersen +Date: Fri Aug 12 18:50:33 2005 +0000 + + Fri Aug 12 14:49:24 2005 Søren Sandmann + Apply another patch from Billy Biggs to fix precision issues. + +commit 1eed84f227311730ce1f9ffab190e95de967c7da +Author: Søren Sandmann Pedersen +Date: Fri Aug 12 18:47:17 2005 +0000 + + Fri Aug 12 14:45:54 2005 Søren Sandmann + Fix up multiplications based on patch by Billy Biggs. Part of bug 3945. + +commit 8bfffb96b552a3facb77ff9e81658e80becbf2f4 +Author: Søren Sandmann Pedersen +Date: Fri Aug 12 18:31:07 2005 +0000 + + Fri Aug 12 14:29:09 2005 Søren Sandmann + Apply patch from Billy Biggs that fixes rounding problems with division. + Part of bug 3945. + +commit 812ed2e17bfe8e232313cf9ab78000a564cb6b3c +Author: Søren Sandmann Pedersen +Date: Fri Aug 12 17:43:38 2005 +0000 + + Fri Aug 12 10:45:01 2005 S%Gï¿¿%@ren Sandmann + Make this function compute the same results as the fbByteMul macro. + +commit 370b111f4882a95248bcc4727438c95a065c174d +Author: Ian Romanick +Date: Fri Aug 12 16:30:57 2005 +0000 + + Use '$(DRMSRCDIR)/shared-core' instead of '$(DRMSRCDIR)/shared' for DRM + includes. This matches the way drivers are built in the Mesa tree and + fixes a build problem in the Savage driver. + Convert uses of __glPointParameterfvARB_size to + __glPointParameterfvEXT_size and uses of __glPointParameteriv_size to + __glPointParameterivNV_size. This eliminates the need to hand-edit + indirect_size.c after it is generated. + +commit 5f5117729de3a8a4eb6e17dc0979e4b1c1ef9918 +Author: Alan Coopersmith +Date: Fri Aug 12 01:17:58 2005 +0000 + + Fix segfault when "kbd" fails to load and "keyboard" driver is not + configured. + +commit 13e16ee93a328a55494c2933143c66559fe7ba98 +Author: Søren Sandmann Pedersen +Date: Thu Aug 11 15:46:42 2005 +0000 + + Thu Aug 11 11:43:32 2005 Søren Sandmann + Make sure we don't crash on glyphs with NULL bits. Bug 659. + +commit 3e471ddf1dbf58ed021d6f31bdaf438872f03ca8 +Author: Søren Sandmann Pedersen +Date: Thu Aug 11 14:36:29 2005 +0000 + + Add check for whether the platform is MMX capable and add the relevant + flags if so. + +commit 130fffc0cdbfdc29f33f1ee97c09e744c19e243a +Author: Søren Sandmann Pedersen +Date: Wed Aug 10 20:22:57 2005 +0000 + + Wed Aug 10 16:17:38 2005 Søren Sandmann + Add back non-SSE implementations. Define USE_SSE if the CPU is amd64/x86-64 + +commit ef50bba5694ef276a239882fae3502638b4ec784 +Author: Søren Sandmann Pedersen +Date: Wed Aug 10 19:42:36 2005 +0000 + + Revert previous patch as it causes build failures + +commit b99360e264c9531593ce8eb67bd006275ca5e5a0 +Author: Søren Sandmann Pedersen +Date: Wed Aug 10 19:15:44 2005 +0000 + + Add XF86DDXACTIONS to AM_CFLAGS + +commit 73a335a926e50afde36816ab47dae689202df319 +Author: Jon Smirl +Date: Tue Aug 9 16:51:05 2005 +0000 + + Point xegl at the DRI driver + +commit 29d0ba9f06d90a1c7f619db87d681ca53fa1bf38 +Author: Jon Smirl +Date: Tue Aug 9 15:58:20 2005 +0000 + + Touchup xgl for modular tree + +commit 435e2a09de7c9dd843b05f4a0484371a67940515 +Author: Alan Coopersmith +Date: Tue Aug 9 01:18:04 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=3950> Xorg prints version numbers in + wrong format for modules compiled for Xorg 6.99 & later (Adam Jackson & + Alan Coopersmith) + +commit 5849c69db80b2320bddb7fafb519300cc0435c84 +Author: Søren Sandmann Pedersen +Date: Mon Aug 8 18:02:08 2005 +0000 + + Mon Aug 8 13:39:45 2005 Søren Sandmann + Conditionally include xorg-config.h + +commit 5e6e5e6d8c6add3aac5c3aebc984d3afb842edc1 +Author: Søren Sandmann Pedersen +Date: Mon Aug 8 17:38:37 2005 +0000 + + Mon Aug 8 13:36:23 2005 Søren Sandmann + #undef PIXPRIV here. + +commit a11ce76b0625501a202fa34e18777b7bd42b2713 +Author: Keith Packard +Date: Mon Aug 8 06:25:21 2005 +0000 + + Build with modular X.org libraries and headers. + composite/compwindow.c Don't damage unmoved windows. Let border clip reset + leave damage alone, pending actual damage for painting. + +commit 129e812c339879b68bb162331ac9b7e0f86a7474 +Author: Keith Packard +Date: Mon Aug 8 02:30:31 2005 +0000 + + Re-add _XOPEN_SOURCE as it's needed *sometimes*. Place it in #ifndef to + avoid whinging. + +commit 4dfc3357a78a52ef70750608138dfeef0371cbc4 +Author: Keith Packard +Date: Mon Aug 8 00:38:41 2005 +0000 + + Add autogenerated source files and other various non-CVS material to + .cvsignore files + Use XORG_CFLAGS. Ensure that all exa files are in SOURCES + remove _XOPEN_SOURCE as it's always in xtrans.pc these days and gcc whines + libdamage.la needs libcw.la when COMPOSITE is defined, but that + libdamage.la must be after libcomposite.la, so add libcw.la to + DAMAGE_LIB instead of EXTENSION_LIBS. Regularize library link order + across all X servers + +commit 7d2b08aa4786eb4d181c88f7dc6b7eb059cc9dad +Author: Adam Jackson +Date: Sun Aug 7 20:42:50 2005 +0000 + + Invert the sense of the composite configure flag to match reality. + +commit fcaa6f30c489578589af19ef798ab31150e696a2 +Author: Adam Jackson +Date: Sun Aug 7 19:02:32 2005 +0000 + + Bug #3989: Fix Composite builds, enable Composite build by default. (Olli + Helenius) + +commit 3639fb243450ae447e9901de9f909e975a919514 +Author: Chris Lee +Date: Sat Aug 6 23:56:18 2005 +0000 + + Enabling EXA by default in the modular build. + +commit a16357ebc9344fbf3e393da9e7b28164ad5b9dc8 +Author: Chris Lee +Date: Sat Aug 6 23:46:38 2005 +0000 + + Last bits of changes to make exa build properly in the modular server. + +commit cc67bd187f06bfade0d2fe1b4cca92805458b210 +Author: Chris Lee +Date: Sat Aug 6 23:34:09 2005 +0000 + + EXA support in the modular build. + +commit 33326f4ee884aa677e4568c3eaed4311a8ed0f2a +Author: Chris Lee +Date: Sat Aug 6 23:27:33 2005 +0000 + + Adding exa support to the modular server. + +commit b90a88e80310e5650e2abed4c151889d9c0bd316 +Author: Alan Coopersmith +Date: Sat Aug 6 19:48:12 2005 +0000 + + Add checks for functions used in os/access.c & os/connection.c: + getdtablesize(), getifaddrs(), getpeereid(), getpeerucred() + +commit 2304c14fe5d3796c557a86d0ece1f0fb92591469 +Author: Alan Coopersmith +Date: Sat Aug 6 19:14:24 2005 +0000 + + Fix endian test to work on big-endian platforms correctly + +commit fc29d014aa586229cdc976aa1bfe38bd949f7cde +Author: Alan Coopersmith +Date: Sat Aug 6 16:29:20 2005 +0000 + + Merge in patch release RC handling code from 6.8.2 (Kevin Martin) + +commit 9828a38ed695fed9788ace8bba575e521fa354b7 +Author: Alan Coopersmith +Date: Sat Aug 6 03:14:50 2005 +0000 + + Solaris build fixes needed for modular builds + +commit f51047c0b6749ae8f04925eb62706b4743328383 +Author: Alan Coopersmith +Date: Fri Aug 5 15:43:31 2005 +0000 + + Fix 32-bit vs. 64-bit test for Solaris + +commit 4220a0c4ccd0672460d31db239829384aee69f9a +Author: Matthew Allum +Date: Fri Aug 5 09:08:32 2005 +0000 + + Make Xephyr work without shadow fb + +commit fedbce2186bbe3bd8d23a4d74c35f10286930a7d +Author: Adam Jackson +Date: Fri Aug 5 00:13:31 2005 +0000 + + EXTRA_DIST hacks to get all the OS support files into the tarball. + +commit 39a80312e0c6e9f3b260d2f8279c71aef0a60d12 +Author: Adam Jackson +Date: Thu Aug 4 22:31:20 2005 +0000 + + - Bug #3960: Add remaining GLX and pci.ids stuff to DIST (Cha Young-Ho, + Olli Helenius) + - Fix some distcheck problems for non-solaris systems + - Change server version number from the Xorg rev to an independent one + - _POSIX_SOURCE and _XOPEN_SOURCE defined to the right values + +commit ed4d77a16a226a7bc88d0d4f5c595d16cdf46360 +Author: Søren Sandmann Pedersen +Date: Thu Aug 4 21:05:12 2005 +0000 + + Thu Aug 4 16:08:00 2005 Søren Sandmann + Make the fbCompose paths use the existing inline functions instead of + macros. Various other cleanups. + Remove macro definitions, move typedef to fbmmx.c + +commit e62be6d2721e7f43c7bba6b8da4e5ec8c364697d +Author: Adam Jackson +Date: Thu Aug 4 18:45:46 2005 +0000 + + - Check for vsnprintf + - Don't build the Xorg DDX on darwin + - Workaround for gcc defining __ppc__ but not __powerpc__ + +commit 13bec87f45509452c643e20745e12878584d606a +Author: Alan Coopersmith +Date: Thu Aug 4 02:39:56 2005 +0000 + + Fix inline assembly versions of in*/out* for Sun compilers Add check for + ancient USL console code on Solaris to allow building on old Solaris + x86 versions + +commit 9802106864a6b2c24df8e9fcb3c3471033abd5c6 +Author: Adam Jackson +Date: Wed Aug 3 01:41:34 2005 +0000 + + dist fixes for cw and GL (Donnie Berkholz, me) + +commit d7c246f35b1ba7ecbbc086dd1229b298faddec96 +Author: Alan Coopersmith +Date: Tue Aug 2 23:57:52 2005 +0000 + + Only build ix86Pci.c on x86 & amd64 platforms Set DEFAULT_INT10 to x86emu + on everything but Linux/x86 Fix Sbus.c inclusion on sparc platforms + +commit 3d0d95004c65cd3a29c94fec99e13ab7fdc19c7c +Author: Alan Coopersmith +Date: Tue Aug 2 20:47:47 2005 +0000 + + Add check for walkcontext() to enable stack trace dumper on Solaris + +commit bb5258a21d9efbb7d8b4226a44bd5738eb46d32a +Author: Keith Packard +Date: Tue Aug 2 17:57:36 2005 +0000 + + Mark generated files as BUILT_SOURCES and CLEANFILES to ensure they are + regenerated after 'make clean' and to make parallel builds work right. + +commit 0c608a690e85064345d7ebdf6b03e2f3bd861708 +Author: Keith Packard +Date: Tue Aug 2 06:48:20 2005 +0000 + + Note yacc and lex generated files as BUILT_SOURCES so they are created + before anything is compiled; required for parallel builds + +commit d31de217e6e9bfb0e1cc99141d80def9382de9a9 +Author: Adam Jackson +Date: Tue Aug 2 03:36:09 2005 +0000 + + distcheck fixes + +commit c83772fef7ea0379db9bab1120f064b80b74f377 +Author: Alan Coopersmith +Date: Tue Aug 2 01:50:48 2005 +0000 + + Set OSNAME for "Build Operating System" line in Xorg log + +commit 005a9cf1f5fe688f303b954870afd35635fc33bf +Author: Alan Coopersmith +Date: Tue Aug 2 01:03:25 2005 +0000 + + Fix Solaris assembly source to work with libtool + +commit 48b130285ad1309a1ff5b2148b3bae5f5b642488 +Author: Adam Jackson +Date: Tue Aug 2 00:47:08 2005 +0000 + + Move AM_CONDITIONAL for ia64 to global scope + +commit 03379474e0fd9c21ac058e2319618934359b3262 +Author: Adam Jackson +Date: Tue Aug 2 00:45:30 2005 +0000 + + only do the AS_HELP_STRING workaround once, d'oh + +commit 2d7b1893befb84850f3221cbe70b3bce4e621d63 +Author: Adam Jackson +Date: Tue Aug 2 00:41:07 2005 +0000 + + - Workaround for AS_HELP_STRING compatibility with older autoconf. + - New intermediate build target for Xorg server + - ia64 fixes + +commit 7c84189ea1dc236bc979bb4bf158ecb1a6b45137 +Author: Alan Coopersmith +Date: Mon Aug 1 22:22:16 2005 +0000 + + Bugzilla #3566 Patch + #2906 Fix for + RENDER, repeating pictures and offscreen memory (Owen Taylor) + +commit 2acd29c93fd3b3d438887f0ca9be6713db81c1e8 +Author: Adam Jackson +Date: Mon Aug 1 22:13:20 2005 +0000 + + Bump autoconf dependency to 2.57 from 2.53. Add 2.57 compatibility hack for + the new AS_HELP_STRING syntax from 2.58+. + +commit b7a43fa0f112d92cce71642142e07276da4de681 +Author: Adam Jackson +Date: Mon Aug 1 19:00:21 2005 +0000 + + Bug #3739: Fail soft on unknown extension string. + +commit 0285804811bd24ad7de8894f8188b87e821e54cc +Author: Adam Jackson +Date: Mon Aug 1 18:41:54 2005 +0000 + + GLX fix for loadable servers: indirect_size.c goes in libglx, not libGLcore + +commit 78d51253e229bcb428039911d80a5d89d4bf4491 +Author: Søren Sandmann Pedersen +Date: Mon Aug 1 16:07:14 2005 +0000 + + Fri Jul 29 17:20:53 2005 Søren Sandmann + Fix rounding bug. + +commit fd84b3b56280ef88a8c848c4338f0bea906ce6d8 +Author: Alan Coopersmith +Date: Sat Jul 30 18:56:32 2005 +0000 + + Clear compiler warnings. (Stefan Dirsch) + +commit 9e9f9cb4878d597b3fa6de7732d2866e24c32f54 +Author: Alan Coopersmith +Date: Fri Jul 29 21:55:57 2005 +0000 + + Need to define SVR4 on SVR4-ish systems since many headers and source files + check for it, expecting Imake to have defined it already. (Should be + replaced with more specific checks & defines, but there's too many to + get them all right now.) + +commit 14ade55b83aa72240a555b3b9def9f40a6a38cd9 +Author: Kevin E Martin +Date: Fri Jul 29 21:22:58 2005 +0000 + + Various changes preparing packages for RC0: + - Verify and update package version numbers as needed + - Implement versioning scheme + - Change bug address to point to bugzilla bug entry form + - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to + reenable it) + - Fix makedepend to use pkgconfig and pass distcheck + - Update build script to build macros first + - Update modular Xorg version + +commit 2654f88cee86fae9db169dc8668492857fbbad98 +Author: Kevin E Martin +Date: Fri Jul 29 18:40:54 2005 +0000 + + Fix code to handle printing 7.0 release candidates properly. + +commit d5d669b04ecbd91bb2db9ddc6238acabbeaabbe0 +Author: Alan Coopersmith +Date: Thu Jul 28 23:33:57 2005 +0000 + + If neither --enable-dmx or --disable-dmx are specified, default to "yes" on + Linux, "no" on everything else (matches defaults in monolith Imake) + +commit 86529c07d6ff69ef936ee370be07b373e2961360 +Author: Kevin E Martin +Date: Thu Jul 28 23:28:34 2005 +0000 + + Fix distcheck for server + +commit 3e4bf8a8f46e14078c64c56ad303c80cd9d8d5be +Author: Alan Coopersmith +Date: Thu Jul 28 02:38:23 2005 +0000 + + Rework wrapping of common mouse driver to not require mousePriv.h, so that + modular tree xserver can be built on Solaris. Wrap more ioctls in + SYSCALL() to restart on signals. + +commit cfd6c74067de7fdb2aeddee6780c29231a56acdc +Author: Søren Sandmann Pedersen +Date: Wed Jul 27 17:50:13 2005 +0000 + + Add dbestruct.h to sdk_HEADERS + +commit 5ced854186b851ba2c9ac84eb6d7f141fdee487b +Author: Søren Sandmann Pedersen +Date: Wed Jul 27 17:35:25 2005 +0000 + + Add miwideline.h mistruct.h mifpoly.h to sdk_HEADERS + +commit 7bd6b0640e69552ed4c9daac26e41410dd7338b4 +Author: Kevin E Martin +Date: Wed Jul 27 08:16:35 2005 +0000 + + Add #include for building dmx/glxProxy in the modular tree. + +commit b9ccd89918e1c79d6013fe563c7fa933c1274837 +Author: Kevin E Martin +Date: Wed Jul 27 08:11:26 2005 +0000 + + Fix dmx/glxProxy build + +commit 8f6664fcff319ee155e7864ce25fa11c1fa5594b +Author: Søren Sandmann Pedersen +Date: Tue Jul 26 23:40:45 2005 +0000 + + Add these files to the sdk: + cbf32.h cfb16.h cfbmap.h cfbunmap.h cfbunmap.h cfbmskbits.h xf86sbusBus.h + mifillarch.h mispans.h + +commit 3cbb55f309b8eaba246d1d948b59883f9ed28bf4 +Author: Søren Sandmann Pedersen +Date: Tue Jul 26 22:17:27 2005 +0000 + + Install xorgVersion.h + +commit df5d47560c19b01f2998806c4b62f459a6b5fc02 +Author: Søren Sandmann Pedersen +Date: Tue Jul 26 18:56:45 2005 +0000 + + xserver/xorg/fb/Makefile.am: install fboverlay.h + +commit b25e6f82a1189a67208a2a4980d732ab77e64a35 +Author: Søren Sandmann Pedersen +Date: Tue Jul 26 18:21:22 2005 +0000 + + fb/Makefile.am: add fbpseudocolor.h to sdk_HEADERS + hw/xfree86/xaa/Makefile.am: add xaaWrapper.h to sdk_HEADERS + +commit e7502158d6922a149d0aaf1de209f0b58fa444bf +Author: Alan Coopersmith +Date: Sun Jul 24 16:24:17 2005 +0000 + + Add xf86DeallocateGARTMemory stub so that Xorg can be built on Solaris + again. + +commit 7c1148c0fbc00716bb7ec621a1b968b4127cbb00 +Author: Adam Jackson +Date: Sat Jul 23 19:32:57 2005 +0000 + + Fire the Mesa symlink script from the configure stage. + +commit f331a325447449982efba8adc5bc079371dfb77a +Author: Adam Jackson +Date: Sat Jul 23 19:29:58 2005 +0000 + + Add the symlink script for the Mesa source. + +commit a5532e456d763718036e84891ff57c6f7417615a +Author: Stuart R. Anderson +Date: Sat Jul 23 18:16:06 2005 +0000 + + Change the default depth back to 8 like it was originally. Disable the + addition of depth 12 & 30. It causes more than MAXFORMATS depths to be + added to the screen which causes an array in the Screen structure to + overflow and crash on server reset. + +commit d8a1241a24d75c258548875350bff4d0acc795ab +Author: Stuart R. Anderson +Date: Sat Jul 23 17:49:45 2005 +0000 + + Add a safety check to catch when numDepths GCperDepthexceeps MAXFORMATS + +commit 93d29b4554d26b22ca43311264f85ea8e14804c2 +Author: Adam Jackson +Date: Sat Jul 23 02:04:39 2005 +0000 + + Emit makefiles for glapi, slang, and grammar. Conditionally define GLX_LIBS + if GLX support is requested. Add GLX_LIBS to the link deps for Xvfb and + Xnest. All GLX support should work now for the vfb, xnest, and xfree86 + DDXes. + +commit 525d663ec5a8a181a1e36f3787b24cdb77290c17 +Author: Adam Jackson +Date: Sat Jul 23 02:02:18 2005 +0000 + + glapi build (forgot this one somehow) + +commit 6aaceef3231818682dccf1969b211f1dc798da1f +Author: Adam Jackson +Date: Sat Jul 23 02:00:52 2005 +0000 + + Fix the build system to reflect the rest of the Mesa core. Almost links, + needs a code fix to Mesa though. + +commit d7e2cadb13ef0e77d864c8282489f544b0e1dede +Author: Adam Jackson +Date: Thu Jul 21 02:29:05 2005 +0000 + + GLX needs gl.h from Mesa too + +commit bf32f4739c6ef7f41cde6cc409d42e00462402fb +Author: Alan Hourihane +Date: Tue Jul 19 20:51:46 2005 +0000 + + programs/Xserver/hw/xfree86/os-support/shared/agp_noop.c + programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c + programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h + //bugs.freedesktop.org/show_bug.cgi?id=3164> Add xf86DeallocateGARTMemory() + function call (Austin Yuan) + +commit 931abdba8410bf1188d69d54c57543a21ea36968 +Author: Alan Coopersmith +Date: Tue Jul 19 02:50:00 2005 +0000 + + Change #include "X.h" to + +commit 4f2e731aba0c5694abb65a877395cc5f9869c556 +Author: Daniel Stone +Date: Sun Jul 17 07:34:31 2005 +0000 + + objdir != srcdir fixes. + +commit a6bd7ad985e138874bb0e1f33f545651dfde32a9 +Author: Alan Coopersmith +Date: Sun Jul 17 01:52:33 2005 +0000 + + Set GLX automake conditional after we've tested for mesa source and set GLX + to "no" if it's --with-mesa-source wasn't set. + +commit ead37b08699f665a856c7ba29578c27c27db4100 +Author: Alan Coopersmith +Date: Sat Jul 16 20:52:25 2005 +0000 + + Mark variables modified in signal handlers as volatile (part of Sun bug id + 4496504) + +commit bbb49449cbc0815fd9c4faf9b6ee32be99a8aa3d +Author: Adam Jackson +Date: Sat Jul 16 16:30:40 2005 +0000 + + Fix --with-mesa-source parsing, and turn GLX off if no path to Mesa given. + +commit d69e9872ae91c9c17a33e1ed763f98453d950b39 +Author: Adam Jackson +Date: Sat Jul 16 16:29:30 2005 +0000 + + Typo fix, and re-add GLcore to the dixmods build + +commit 8bc883c48c8f99502707998a8257c0563cae7d3a +Author: Alan Coopersmith +Date: Sat Jul 16 09:00:44 2005 +0000 + + Update build instructions. Add details about how the expat, fontconfig, + libpng, freetype, and xterm builds are now handled. + Update text docs from SGML masters. + +commit 8e600b87643f7f4e19923dd6a0f2eec83303363a +Author: Alan Coopersmith +Date: Sat Jul 16 07:39:48 2005 +0000 + + Only pass -rdynamic when using gcc + +commit 4f04e26c69747929243f176feaa90f3042481f53 +Author: Adam Jackson +Date: Sat Jul 16 04:30:33 2005 +0000 + + Say --with-mesa-source to get GLcore built. + +commit 4913316f25e76381844cf15aa64eff620c2807a1 +Author: Adam Jackson +Date: Sat Jul 16 04:29:28 2005 +0000 + + Switch to MESA_SOURCE which we're already AC_SUBSTing + +commit 7facb209a705ca406b05272c233ea0cfd6a5b266 +Author: Adam Jackson +Date: Sat Jul 16 04:24:21 2005 +0000 + + Hook in the GLcore build + +commit 2f9a7c6ee1012b2c7664c53f405affaf82bd0953 +Author: Adam Jackson +Date: Sat Jul 16 04:13:33 2005 +0000 + + Hey look, GLcore links + +commit 5f81eb1d89f623dd9281e686a4d4d4f403e459c6 +Author: Kevin E Martin +Date: Sat Jul 16 03:49:59 2005 +0000 + + Fix the *-config.h includes so that it is possible to build modules without + having to use -include in the Makefile. + +commit 0635acab08bade9bfd9d2abd3ea5a3fe525bc647 +Author: Kevin E Martin +Date: Sat Jul 16 03:46:01 2005 +0000 + + Add record module building support Change module building to not use + -include Fix xnest, dmx and vfb builds to -DXFree86Server for fbcmap + compilation + +commit 92b23ff426936909e1ff5e063b75e5f112b93ca1 +Author: Alan Coopersmith +Date: Sat Jul 16 01:17:52 2005 +0000 + + Update to match recent changes to pci.ids & extrapci.ids for people + building on systems without perl. + +commit 6ce3743948a7151c721194594091a7e1183e2f32 +Author: Adam Jackson +Date: Sat Jul 16 00:51:14 2005 +0000 + + start the GLcore build system + +commit 2f0487521da3da6784dd964c915071b82d749108 +Author: Kevin E Martin +Date: Fri Jul 15 23:08:31 2005 +0000 + + Fix the *-config.h includes for the files that have moved in the modular + tree. + +commit a407fa373bb72f29050e3f027042011075b3bdf0 +Author: Kevin E Martin +Date: Fri Jul 15 22:51:05 2005 +0000 + + Move drm up to os-support since the files are shared by multiple platforms. + Fix the dri and drm build. Fix server-side DMX extension build. Make + xf4bpp use the correct version of mfbline.c for mfbseg.c. Add #ifndef + _HEADERNAME_H_/#define _HEADERNAME_H_/.../#endif to the headers. + +commit eb6fa0dc15516a0a436090efc6d85f22baeec015 +Author: Adam Jackson +Date: Fri Jul 15 22:14:28 2005 +0000 + + Enable GLX build by default + +commit 0e352a8b2b4c78c291074b9531ed7afa7a20ac17 +Author: Adam Jackson +Date: Fri Jul 15 21:59:39 2005 +0000 + + disable GLcore momentarily until a build system exists. --enable-glx should + work now. + +commit 4bf453086418e93e81b24d3d2a0f49a9357acff3 +Author: Kevin E Martin +Date: Fri Jul 15 05:48:29 2005 +0000 + + Fix keyboard state when XEVIE is not enabled (Keith Packard). + +commit 562acf2e69dcf08f8db8f8eeaa162949d45f70b2 +Author: Søren Sandmann Pedersen +Date: Thu Jul 14 23:41:15 2005 +0000 + + Add -I$(top_builddir)/hw/xfree86/dixmods/extmod to Xext/Makefile.am Patch + from Stefan Dirsch + +commit defeb56fc9559661fa632935a4c76c500c7edcf4 +Author: Kevin E Martin +Date: Thu Jul 14 22:20:16 2005 +0000 + + Fix the build when DRI is enabled + +commit 6b546d0ec07e493b501e82300b3e6c143cd4d0ac +Author: Kevin E Martin +Date: Thu Jul 14 03:36:44 2005 +0000 + + Add #include to the Xnest source files for modularization. + +commit 7375f4d13626bbba4204e2f08f41c212b2eed992 +Author: Kevin E Martin +Date: Thu Jul 14 03:32:09 2005 +0000 + + Add support for Xnest + +commit c582560c62fd8181b7521e470f118a59c418a95f +Author: Alan Coopersmith +Date: Thu Jul 14 02:59:34 2005 +0000 + + Add partial in*/out* assembly support for Sun compilers on x86 + +commit 64bf3a81a3212dc2c0f55aebdc74a618ca6a32c0 +Author: Adam Jackson +Date: Thu Jul 14 02:53:31 2005 +0000 + + loadable extmod build system. + +commit 6c96e0c9e4b3f1e8dfa5dcf7366bb838dc0724ec +Author: Adam Jackson +Date: Thu Jul 14 01:36:58 2005 +0000 + + loader support for extmod + +commit 8ea4a1b759eae0279ce619c663f2cd2f6dee8d71 +Author: Alan Coopersmith +Date: Thu Jul 14 01:00:39 2005 +0000 + + First pass at Solaris os-support + +commit f07e905553783dc0133015bcbf94d3b6be68b19c +Author: Søren Sandmann Pedersen +Date: Thu Jul 14 00:28:47 2005 +0000 + + - Add build system for xf86-video-ati + - Add build system for xserver/xorg/hw/xfree86/dri + - Add glcore.h to symlink.sh + - Symlink.sh: add some more DRI files, symlink glcore.h from + extras/Mesa/include/GL/internal to proto/GL + - proto/GL/Makefile.am: install glcore.h + - xf86-video-ark: s/module-dir/xorg-module-dir/ + +commit 939b7720f17ec5ac5edcc6cfe70453160ecb0161 +Author: Alan Coopersmith +Date: Thu Jul 14 00:02:05 2005 +0000 + + Merge SVR4/pre-Solaris 8 and Solaris 8+ sections for greater consistency, + easier maintenance, and to fix some missing headers when building the + modular Xorg on Solaris. + +commit 23d25a656d7fdbafa1c78be2950fb405f0a1b87b +Author: Adam Jackson +Date: Wed Jul 13 23:41:21 2005 +0000 + + Remove references to DDX-specific extensions + +commit f4626bb72b9955846abee018ae31c1aeb51b8dbf +Author: Adam Jackson +Date: Wed Jul 13 22:59:39 2005 +0000 + + dlloader is the default in 6.9, but the loader doesn't get told to prefer + dlloader modules unless you -DDLOPEN_HACK. + +commit 4f38526566dbcc296d124bb852adfa30ac4d927e +Author: Alan Coopersmith +Date: Wed Jul 13 22:54:02 2005 +0000 + + - Use fbdevhwstub.c if is not found + - Use x86emu on Solaris instead of vm86 + - Better per-OS control over which xf86Kbd*.c and *Pci.c files to build + - Set various #defines to be defined or not on Solaris as needed + +commit db8aa17f15f62f243400b0267bf281dd27738644 +Author: Adam Jackson +Date: Wed Jul 13 22:19:36 2005 +0000 + + updated comment for libbitmap + +commit 4f9e76ed6a61b414ffc94550727a138c3f73996f +Author: Adam Jackson +Date: Wed Jul 13 22:09:52 2005 +0000 + + Dear libtool: Loadable modules do not need version numbers. kthnxbye. + +commit 40ad7321f5d8d216523d575c4414736d8cfe9e88 +Author: Adam Jackson +Date: Wed Jul 13 21:52:51 2005 +0000 + + Generate useful loadable modules by actually linking in the blobs from the + DIX + +commit 0e08818d3951c324e5953bd23a8a9457b3fec78f +Author: Adam Jackson +Date: Wed Jul 13 21:41:02 2005 +0000 + + Hook dbe into the build + +commit 2d4ddb5606b7328c591a7bffafbb49bdaf2adcf9 +Author: Adam Jackson +Date: Wed Jul 13 21:36:27 2005 +0000 + + double-buffering extension + +commit c2ec9fbb15c776b9c64451cf32927b1b8d1c560c +Author: Kevin E Martin +Date: Wed Jul 13 21:17:53 2005 +0000 + + Only build Xi/stubs.c on DDXs that don't support the Xinput extension + +commit 74a534f63c1ed016f24dbc3ca31f05b81076e8f0 +Author: Søren Sandmann Pedersen +Date: Wed Jul 13 20:19:38 2005 +0000 + + xc/programs/Xserver/hw/xfree86/drivers/i2c/*.c: include xorg-config.h + instead of config.h xserver/xorg/hw/xfree86/i2c/Makefile.am: Add i2c + drivers + +commit 1dc3e96e4077a912dd3aa13fa80099f5864b641f +Author: Torrey Lyons +Date: Wed Jul 13 16:30:53 2005 +0000 + + Fix compilation where uint is not defined. + +commit 19e20c1470c1f8d15f2a78fb29545bde06a65516 +Author: Lars Knoll +Date: Wed Jul 13 08:58:37 2005 +0000 + + don't clobber %ebx in the assembler. + +commit bfb10bd2dcca65ba5d346c9d7da594a81c35c101 +Author: Lars Knoll +Date: Wed Jul 13 07:28:17 2005 +0000 + + Fix potential buffer overflow and a smaller bug in the convolution filter + +commit 778a2703b233641e298fa81ef9c477943c496305 +Author: Lars Knoll +Date: Wed Jul 13 07:12:33 2005 +0000 + + fix compilation + +commit 66bc36473c238fdee7e6c1d31e6e5f6813a7541a +Author: Daniel Stone +Date: Tue Jul 12 23:36:27 2005 +0000 + + Use builddir, not srcdir, for built files. + +commit d6808a48d2dffd72f618fa372fba993736638799 +Author: Alan Coopersmith +Date: Tue Jul 12 18:16:03 2005 +0000 + + Fix scanpci -v core dump when subsys vendor/device id's are NOVENDOR & + NODEVICE. Bug #3763 + Patch #3074 + +commit cda9c7b2678ea08ac6176a9eee72e6e511134b8e +Author: Lars Knoll +Date: Tue Jul 12 14:50:10 2005 +0000 + + add x86emu. + +commit 41002623f314444bd416fd5f445a0425c5b59df0 +Author: Lars Knoll +Date: Tue Jul 12 10:02:10 2005 +0000 + + Add MMX Code paths for the basic composition operations in + fbComposeGeneral. + +commit 697cf74fb50a550b8f7e124dc8f463a55519795f +Author: Keith Packard +Date: Tue Jul 12 03:09:20 2005 +0000 + + Make Xprt run when linked against Xlib for Xrm + +commit 419448ea7b0d7f672e568cb1d8b4e190a1f54825 +Author: Adam Jackson +Date: Tue Jul 12 03:03:16 2005 +0000 + + Pull libdri out of the build for now until I get something better worked + out + +commit f054bf2ff6b94e285e7f2d174163c01b07b07143 +Author: Adam Jackson +Date: Tue Jul 12 01:29:41 2005 +0000 + + build fix + +commit 02427d4d04f70109a499578c6762654463ebdae4 +Author: Kevin E Martin +Date: Tue Jul 12 01:20:36 2005 +0000 + + Add support for building Xdmx and Xvfb + +commit 3fe6b5bb30e8e1b9017a9cf818fcceb279a28e65 +Author: Adam Jackson +Date: Tue Jul 12 01:17:39 2005 +0000 + + GLX server support + +commit 377e3bddd4d73154520a9582d75de2b20ae532a5 +Author: Adam Jackson +Date: Tue Jul 12 00:55:43 2005 +0000 + + Forgot to add these for some reason + +commit e348ac4b4dfb1112c19fe5fe5441182e66716087 +Author: Kevin E Martin +Date: Tue Jul 12 00:52:48 2005 +0000 + + Prepare Xdmx and Xvfb for modularization by adding appropriate #include + <{dix,dmx}-config.h> to the source files. + +commit b7a9a6a03560bdf6584c71bf0b546301bba9ab89 +Author: Kevin E Martin +Date: Mon Jul 11 17:52:00 2005 +0000 + + Remove unneeded xf86drm.h includes to fix modular build. + +commit cf4dfd650dbc2bb65eae4eea2acfb4a4c5295548 +Author: Adam Jackson +Date: Mon Jul 11 02:29:50 2005 +0000 + + Prep for modular builds by adding guarded #include "config.h" everywhere. + +commit c5548086f3864c828f0cad65d2708cefd2025947 +Author: Adam Jackson +Date: Mon Jul 11 00:42:52 2005 +0000 + + Start filling in glx build. Add xf86Version.h and a few DRI headers to the + sdk (needed for modular driver builds). + +commit 955fe17133d841758a18072a9acabedc81dc4562 +Author: Adam Jackson +Date: Sun Jul 10 21:45:55 2005 +0000 + + add some convenience variables for the drivers + +commit 78fab90230c61241af29f0c94f401ce0bc749b6b +Author: Alan Coopersmith +Date: Sat Jul 9 16:51:58 2005 +0000 + + Bug #3740 Patch #3058 + + 08-Jul-2005 nv driver updates from Mark Vojkovich: + Change some console restore code for NV11. Hopefully, we can more reliably + restore the console for desktop systems using DVI. This may correct a + recent regression on NV11. + Also, new PCI IDs. + Add new nVidia PCI ids to match nv_driver.c changes. + +commit 3c92389185f0c9fa3b8c299a084b10c12bcab52c +Author: Zack Rusin +Date: Sat Jul 9 14:15:35 2005 +0000 + + Patch from Thomas Winischhofer to kick out all pixmaps to system ram upon a + VT switch and vice versa when returning. + +commit 327741486e807c068383a771c04c9042b0589c37 +Author: Adam Jackson +Date: Sat Jul 9 02:22:29 2005 +0000 + + Don't try to link fb, shadow, or vgahw into the loadable Xorg server, as + they're only supposed to be loadable modules. + +commit 2b8e4db9ac4b4c8f8fd73c00436d6abec2faa535 +Author: Adam Jackson +Date: Fri Jul 8 20:27:30 2005 +0000 + + -lXfont isn't enough for libbitmap, you need to get the -L from pkg-config + +commit e84648df7d7eb700b7c2d35fdef0be1f463853fa +Author: Zack Rusin +Date: Fri Jul 8 17:07:52 2005 +0000 + + mark drawable as dirty on copying/painting windows + +commit 4ab73a73f4aa1f02cc8dada185b5dcbddfe43878 +Author: Zack Rusin +Date: Fri Jul 8 07:43:00 2005 +0000 + + heh, oops (thanks Thomas) + +commit 0a28516a6e641b41e674f69fc228b0babbe1743b +Author: Alan Coopersmith +Date: Thu Jul 7 19:07:28 2005 +0000 + + More compiler warning fixes for missing prototypes: + Add prototype for XkbSetExtension() + Add #include for isspace() & isdigit() + Add #include (for initgroups()) and remove extra * + Add prototype for xorgGetVersion() + +commit 2c3c4060fd2a52f147eda01b11222c341c6e3dee +Author: Alan Coopersmith +Date: Thu Jul 7 16:18:52 2005 +0000 + + Bug #2901 Add prototype + for XdmAuthenticationInit() (Peter Breitenlohner) + +commit d0dc574adb79ffacf90b786d4ccfcd1cd8598728 +Author: Zack Rusin +Date: Thu Jul 7 15:05:02 2005 +0000 + + Check vtSema before accelerating primitives and sync in fallbacks only if + we got vtSema + +commit 6cba5f1260c20b3bc072fdcc5f3e49fa28ba6414 +Author: Alan Coopersmith +Date: Thu Jul 7 14:59:48 2005 +0000 + + Bug #2901 Patch #2332 + This patch avoids + 79 gcc-3.4.3 warnings 'xxx' declared `static' but never defined mostly + due to including "ftfuncs.h" with the declaration of static functions + defined in "ftfuncs.c". (Peter Breitenlohner) + +commit 7da3f4a786d9b61f4129c7dbbef80c84abbfde68 +Author: Alan Coopersmith +Date: Thu Jul 7 03:12:40 2005 +0000 + + Bug #2901 Fix warnings + about redefined macros (Peter Breitenlohner) + +commit f86562540d1c945bfd96d4b89259d81e4ed25255 +Author: Alan Coopersmith +Date: Thu Jul 7 02:47:06 2005 +0000 + + Bug #2901 Patch #2325 + Avoid 38 + gcc-3.4.2 warnings: suggest parentheses around assignment used as truth + value suggest explicit braces to avoid ambiguous `else' suggest + parentheses around && within || suggest parentheses around arithmetic + in operand of ^ "/*" within comment (Peter Breitenlohner) + Bug #2901 Patch #2326 + This patch + removes these 2 gcc-3.4.3 warnings: missing braces around initializer + implicit declaration of function `XpOidTrayMediumListHasTray' (Peter + Breitenlohner) + +commit 4047191124c237518110e698bde6dab445644449 +Author: Damien Ciabrini +Date: Wed Jul 6 15:34:22 2005 +0000 + + Added hardware support for transformation matrix (zoom, rotation, etc...). + Fixed the composition function for RGB and A8 format. Avoid syncing + hardware after HW fills or copies. + +commit 4073f24c90d4aff3f7d83af4c0e733eed082b53b +Author: Alan Hourihane +Date: Wed Jul 6 15:14:30 2005 +0000 + + add missing PictureTransformPoint3d call + +commit c48f631cdb6a279ab1a24a486b05956cfa9ca3da +Author: Damien Ciabrini +Date: Wed Jul 6 13:57:41 2005 +0000 + + Fix offset alignment code in the offscreen memory allocator to prevent + textures from being allocated in the next free memory area. + +commit baa99be190c51b533bf8748c6c6a9bce62594e96 +Author: Ian Romanick +Date: Wed Jul 6 07:16:19 2005 +0000 + + Put the correct value in the length field of the reply. Previously, the + number of tag/date pairs was specified. This was incorrect. The correct + value is the number of values (one for the tag and one for the value). + Xorg bug: #3210 + +commit 6ba4a2e78a73858648b5b6a39306446d519c3a75 +Author: Alexander Gottwald +Date: Tue Jul 5 23:01:51 2005 +0000 + + Add more defines for XWin DDX Make building of cfb*, afb and mfb + conditional Set FD_SETSIZE=256 on cygwin + +commit 71ed3ae0c696152e82a98ce2ac0fa67ce6f23464 +Author: Alexander Gottwald +Date: Tue Jul 5 22:58:29 2005 +0000 + + wrap fInternalWM with XWIN_MULTIWINDOWEXTWM + +commit 456844a613240ce56181f6f3ec7873be9b2dc85d +Author: Alan Coopersmith +Date: Tue Jul 5 18:42:32 2005 +0000 + + Remove Speedo font module documentation. + Remove Speedo from list of font directories + Update default font path to remove Speedo, add TTF. + +commit 20c15003f9648de0c03f7d4fa4508afd896b19f5 +Author: Alexander Gottwald +Date: Tue Jul 5 18:25:44 2005 +0000 + + Fix crash on server shutdown + +commit d72fef26d44e649f39a56730830148d48d77ee9e +Author: Alexander Gottwald +Date: Tue Jul 5 17:52:35 2005 +0000 + + Fix simultanious presses of Left and Right Control and Shift keys. + https://bugs.freedesktop.org/show_bug.cgi?id=3677 + +commit 0f2c8221c938ce8eebd9f0e111a6b87223c18f9e +Author: Alexander Gottwald +Date: Tue Jul 5 16:35:42 2005 +0000 + + Fix typo which broke window titles + +commit 0bb2eb8eaaf4054fefbc45bf3cb47bbcf10b7cfd +Author: Alexander Gottwald +Date: Tue Jul 5 15:43:20 2005 +0000 + + Fix problem with fake Control press on Alt-Gr + https://bugs.freedesktop.org/show_bug.cgi?id=3680 + https://bugs.freedesktop.org/show_bug.cgi?id=3497 + Fix static declaration of winGetBaseDir + +commit 3af77ad3e754c4d419a1996ca73a9fd01f92388a +Author: Alexander Gottwald +Date: Tue Jul 5 14:09:48 2005 +0000 + + External windowmanagers could connect in multiwindow mode which lead to + strange results with the internal windowmanager. + +commit 426282268bcdd0e0ca973fa79b414e9065fbfd9d +Author: Alexander Gottwald +Date: Mon Jul 4 23:40:09 2005 +0000 + + Build miinitext.c and fbcmap.c as DDX specific files + Do not define _POSIX_SOURCE on cygwin. + +commit 845a0ac68b02148db6f2cca81debf20b2331607b +Author: Alexander Gottwald +Date: Mon Jul 4 23:11:20 2005 +0000 + + Revert last changes. They have to be addressed in a different way + +commit 048045a9e714fc85c26028c4de36dff47644b826 +Author: Alexander Gottwald +Date: Mon Jul 4 22:18:40 2005 +0000 + + Add XWin DDX, make Xorg DDX conditional Make XF86VidMode and XF86Misc + conditional + Add XWin DDX + Added DDXTIME, DDXOSFATALERROR, DDXOSVERRORF and DDXBEFORERESET + Added fbcmap.c + Added miinitext.c + Added -I$(top_srcdir)/Xext/extmod to INCLUDES + +commit 508cdb5cb01a91b1bf3ef31da80b6b1d36286bf0 +Author: Alexander Gottwald +Date: Mon Jul 4 22:10:43 2005 +0000 + + Include xwin-config.h if HAVE_XWIN_CONFIG is defined Cleanup X11 includes + handling Warning fixes + +commit 5e50ae22bf206d6c2cc05e772e05fa5a363acb81 +Author: Zack Rusin +Date: Mon Jul 4 18:55:53 2005 +0000 + + remove the temporary debugging output + +commit 7586ac6edea64b30d6187f9ec4d867521c1e769c +Author: Adam Jackson +Date: Mon Jul 4 18:41:04 2005 +0000 + + Bug #2216: Multiseat support. From various Debian and Ubuntu patches by + Aivils Stoss, Andreas Schuldei, Branden Robinson, and Daniel Stone. + +commit ba011dc77dcfaea2843481fbba45a76d8cb9aa83 +Author: Lars Knoll +Date: Mon Jul 4 14:47:03 2005 +0000 + + don't be too smart and try to replace PictOpOver by PictOpSrc when we have + an external alpha map. + Make fbmmx.c compile on gcc 4.0.1. + +commit a4df8ad75579d9c183f110d79d87cfb9aaf23acd +Author: Lars Knoll +Date: Mon Jul 4 14:23:59 2005 +0000 + + Fix handling of "super luminescent" colors Fix off by one error in the + transformation handling. + +commit e34f31762e0454930f30547a9407cc8b941c70f2 +Author: Zack Rusin +Date: Mon Jul 4 14:15:57 2005 +0000 + + This fixes the close screen mess (crash reported by Thomas). Also hide the + private Exa screen definition. Properly cleanup on screen close and do + not delete the private screen in the DriverFini call. + +commit 4ef813961dc8dea8924a79e0954d5b6da12e77c0 +Author: Alexander Gottwald +Date: Mon Jul 4 09:01:43 2005 +0000 + + provide the uint datatype on WIN32 + +commit 7dc547252af3b23652b1d496957645726c7125a4 +Author: Alan Coopersmith +Date: Mon Jul 4 00:16:23 2005 +0000 + + Fix builds on non-GLIBC systems (missing __GLIBC_PREREQ). Add Solaris stack + backtrace dumper. + +commit d010de6979a6c51a628f2f8e6d7f479a542d1e8b +Author: Daniel Stone +Date: Sun Jul 3 15:51:23 2005 +0000 + + Abandon the nostdinc experiment. + +commit b0d80e76d28dbc1ee14453950db000bb4d7f377f +Author: Daniel Stone +Date: Sun Jul 3 12:17:04 2005 +0000 + + Add missing include paths. + +commit 461eb6ebd9273dc3dcd601ee0a0491981a98acd9 +Author: Daniel Stone +Date: Sun Jul 3 12:16:29 2005 +0000 + + Change HAVE_CONFIG_H to HAVE_DIX_CONFIG_H. + +commit c1e69798ad14fb706f5f6de67e3f53df56f524c6 +Author: Daniel Stone +Date: Sun Jul 3 12:15:16 2005 +0000 + + Add explicit PSZ defines, remove unnecessary dix-config.h include. + Add -DXF86PM, forgotten from last commit. + +commit 4e501d35e260775a43f340b3e1a9aa092570aba4 +Author: Daniel Stone +Date: Sun Jul 3 10:51:16 2005 +0000 + + Remove needless usage of DECkeysym.h. + +commit a107f599518a175dd689417b48788a746303966a +Author: Daniel Stone +Date: Sun Jul 3 09:39:54 2005 +0000 + + Predicate usage of xf86OSPM functions on #ifdef XF86PM. + Remove needless include of ../input/mouse/mouse.h. + +commit 0bb669638f032e61471007b2fa88285aa5d63903 +Author: Daniel Stone +Date: Sun Jul 3 08:53:54 2005 +0000 + + Change and to "misc.h" and "os.h". + +commit 401e4580d6dd9867a691045688680ce410f84cb5 +Author: Daniel Stone +Date: Sun Jul 3 07:55:00 2005 +0000 + + Move misc.h and os.h from proto/X11 to xserver/xorg/include. + +commit 46b64bd5c66abb1bb9f3538c887d10867607bfff +Author: Daniel Stone +Date: Sun Jul 3 07:37:35 2005 +0000 + + Fix more include paths; add dix-config.h to XKB code. + +commit e03198972ca78b03ad13cb49112c03a052bb763b +Author: Daniel Stone +Date: Sun Jul 3 07:02:09 2005 +0000 + + Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings. + Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings. + Add #include or , as appropriate, to all + source files in the xserver/xorg tree, predicated on defines of + HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to + . + +commit b8aef6c474ffc6d637bec178674898ea95ccde47 +Author: Kevin E Martin +Date: Sun Jul 3 03:28:27 2005 +0000 + + Fix build issues. + +commit 826a6f029faeabaa783a93dfdccca846f9326b58 +Author: Daniel Stone +Date: Sat Jul 2 18:59:44 2005 +0000 + + Continuing Makefile cleanup; add DIX_CFLAGS and XORG_CFLAGS everywhere. + +commit e58c09d31bdf90210e2ec1ef976cea0459cdc02a +Author: Adam Jackson +Date: Sat Jul 2 18:06:05 2005 +0000 + + Bug #3687: Print backtraces on fatal signal on glibc systems. + +commit e6602b041fe489d51a1d7fac55cbbb12b1826ba1 +Author: Adam Jackson +Date: Sat Jul 2 17:02:23 2005 +0000 + + Bug #3546: Use MAP_LENGTH instead of a magic number. (Mark McLoughlin) Bug + #3664: Further fixes to Xnest modifier state handling. (Mark + McLoughlin) + +commit 9b1debcdb6c7df956c06350a6525afb8e6d691fa +Author: Daniel Stone +Date: Fri Jul 1 22:43:43 2005 +0000 + + Change all misc.h and os.h references to . + +commit 657b4cb8aa0076acae85997c4f0c353b4d86b632 +Author: Daniel Stone +Date: Fri Jul 1 22:32:34 2005 +0000 + + Change all misc.h and os.h references to . + +commit 303c281f956d55e35b05ef8521d0b60d24aa7a10 +Author: Daniel Stone +Date: Fri Jul 1 21:15:20 2005 +0000 + + Add auto-generated header files. + +commit 9a6ec34d2545a23586f11ad51c81f41a940d73d0 +Author: Daniel Stone +Date: Fri Jul 1 21:13:36 2005 +0000 + + Use canonical autogen.sh, which supports srcdir != objdir autogen. + +commit 7ecc2d526c4ea5db2589644a2fec0daf71df36da +Author: Daniel Stone +Date: Fri Jul 1 21:12:24 2005 +0000 + + Remove fbcmap.c hacks from the DIX. + +commit 6251f9c00a866f64207d23b0a06306ead15298e8 +Author: Daniel Stone +Date: Fri Jul 1 21:11:16 2005 +0000 + + Minor build system tweaks. + +commit 641f32c4368db07831d9d703161a9d4699307621 +Author: Daniel Stone +Date: Fri Jul 1 20:54:30 2005 +0000 + + Adding initial build system. + +commit 507d30546f56bfd172fc43857459c78c1026e97c +Author: Daniel Stone +Date: Fri Jul 1 20:54:01 2005 +0000 + + Adding initial build system. + +commit a822df1cc16d150614dead70fd00750095a05c35 +Author: Daniel Stone +Date: Fri Jul 1 20:49:35 2005 +0000 + + Adding initial build system. + +commit ded56b1a74e6b3e4c48054b7e142d924b19e6104 +Author: Daniel Stone +Date: Fri Jul 1 20:29:53 2005 +0000 + + Adding initial build system. + +commit aabb868920658c9d3979dc194c6bd9702171f101 +Author: Zack Rusin +Date: Fri Jul 1 13:30:29 2005 +0000 + + removing all debugging output from the default build :) + +commit 0fa9d1fb4886c418e3d8e0886ad815513eda0633 +Author: Zack Rusin +Date: Fri Jul 1 12:24:30 2005 +0000 + + Leave debugging output for only the interested parties. + +commit 0df446ab8875430508ff51d3548955a215475084 +Author: Zack Rusin +Date: Fri Jul 1 10:39:21 2005 +0000 + + Missed this. Spotted by Thomas. + +commit b5b2a0522efd61bd99b5d5d75cdd27960cd1c7e1 +Author: Lars Knoll +Date: Fri Jul 1 10:05:43 2005 +0000 + + Add support for gradients and solid fills to Render. + Changed the semantics of the Convolution filter a bit. It now doesn't try + to normalize the filter values but leaves this to the client. This + gives more reasonable behaviour in the limit where the filter + parameters sum up to 0. + +commit 30c019e847adef6f7f3963df8ef1f3f994669a54 +Author: Zack Rusin +Date: Fri Jul 1 08:56:12 2005 +0000 + + Adding the new acceleration architecture: Exa. It's meant to replace XAA in + the coming months. + +commit 276821605ee50e71f30dd52f2c12237fc61f288f +Author: David Reveman +Date: Fri Jul 1 03:14:54 2005 +0000 + + Fix return values in Xgl render texture implementation + +commit 5e381441fff411316ea202a9f85aceb0e0dcf46b +Author: Alex Deucher +Date: Fri Jul 1 02:56:04 2005 +0000 + + - Fix Support for Philips FM1236/F tuner on ATI AIW 9600 XT (Jeff Smith) + Bug 3401 + +commit c4d1b4e0424d53cd0470e0e3f57c10ee8fe3d8c2 +Author: Alexander Gottwald +Date: Thu Jun 30 21:33:46 2005 +0000 + + Added another test of checkForInput for WIN32 Windows keyboard and mouse + events are added to the input queue in Block- and WakupHandlers. There + is no device to check if input is ready. + +commit 1230c55ac3f75f4902b51b223d40354a54d0d0ab +Author: Alexander Gottwald +Date: Thu Jun 30 18:50:20 2005 +0000 + + Pass serverClient instead of NULL to ConfigureWindow. This should fix a + crash reported by Øyvind Harboe + +commit 0929f79c1baa5b65808ab034591510906623e841 +Author: Matthew Allum +Date: Thu Jun 30 13:39:00 2005 +0000 + + Another Xephyr focus/modifier fix + +commit b6c7afe0b9faed7025c70334d464fd75ce5c84c4 +Author: Lars Knoll +Date: Wed Jun 29 15:19:14 2005 +0000 + + compile + +commit d8a98454e305973dd7fec76db2ef80705cf7c298 +Author: Lars Knoll +Date: Wed Jun 29 11:57:16 2005 +0000 + + Add support for gradients and solid fills to Render. + Changed the semantics of the Convolution filter a bit. It now doesn't try + to normalize the filter values but leaves this to the client. This + gives more reasonable behaviour in the limit where the filter + parameters sum up to 0. + +commit ce0e11aeac76119b96b463605bc1f5318e3d2bde +Author: Adam Jackson +Date: Tue Jun 28 21:05:31 2005 +0000 + + Bug #2447: Fix argument order to xf86DrvMsgVerb. (Luc Verhaegen) + +commit 5ef5aec9bb5ee85295c0913afca891572d1315a4 +Author: Alan Coopersmith +Date: Tue Jun 28 02:04:54 2005 +0000 + + Update to latest snapshot (27-May-2005) from http://pciids.sf.net/ + +commit b262a18aad36b2de729f6d00d144ac7277687f19 +Author: Adam Jackson +Date: Sun Jun 26 02:48:36 2005 +0000 + + Cosmetic correctness fixes: miEmptyBox and miEmptyData are variables, and + miGlyphExtents is a function. + +commit aa7fb99bc76e62036c73ff50f58337558859b814 +Author: Adam Jackson +Date: Sat Jun 25 21:28:48 2005 +0000 + + Bug #3030: Fix Xnest keyboard state handling. (Mark McLoughlin) + +commit 8562f800b879ae461317da9640961f753e107250 +Author: Adam Jackson +Date: Sat Jun 25 21:16:54 2005 +0000 + + Bug #3626: _X_EXPORT tags for video and input drivers. + +commit 582a9f0d2ec01f1a3c5625e2f45a4599be7a11d5 +Author: Zack Rusin +Date: Sat Jun 25 12:39:58 2005 +0000 + + Correctly handle empty rects on region initialization. + +commit 56201222067e793a3542bcdcd39bb257b4fad2a6 +Author: Matthew Allum +Date: Thu Jun 23 16:50:07 2005 +0000 + + Fix issues with focus in and modifiers from host confusing Xephr + +commit a668b6c11a2d6b4800407ad918481d90be87a732 +Author: Matthew Allum +Date: Thu Jun 23 16:34:07 2005 +0000 + + redo tslib + +commit 5e863851a61207ade1ac807bc8cff7d9cf02dbbe +Author: Adam Jackson +Date: Sun Jun 19 01:30:29 2005 +0000 + + Build workaround. Add glcontextmodes.[ch] from Mesa. + +commit 9743adbe94f29417818b90e18aebb96a72f332f0 +Author: Søren Sandmann Pedersen +Date: Thu Jun 16 20:50:12 2005 +0000 + + Add Type1 subdirectory to lib/Xfonts, update build system accordingly. + +commit 68e856ff5b1842ba10421714b5f6b21d528f6071 +Author: Ian Romanick +Date: Wed Jun 15 18:31:52 2005 +0000 + + DRM 20050615 import + +commit 6e301a8e97e99d58eaed25453f66c6d73bafd460 +Author: Ian Romanick +Date: Wed Jun 15 18:31:52 2005 +0000 + + Initial revision + +commit f0c76610b72a5b54bae5a5eb51ff4c420a27320e +Author: Daniel Stone +Date: Wed Jun 15 16:46:59 2005 +0000 + + Conditionalise another use of XEvIE. + +commit 28ee3dd955302a1e99ffdc66cf0f512c6234d043 +Author: Daniel Stone +Date: Wed Jun 15 16:27:16 2005 +0000 + + Conditionalise building of XEvIE code with #ifdef XEVIE. + +commit c6166ee74137084775c7550b708c5f71f16e7d3f +Author: Lars Knoll +Date: Wed Jun 15 14:51:12 2005 +0000 + + Fix projective transformations in fbcompose.c Bugfix for convolution + filters + +commit bd54b96034e640f202821eac0a2c40e66c1ddfd0 +Author: David Reveman +Date: Wed Jun 15 05:50:15 2005 +0000 + + Shut up compiler + +commit 7fa782dfd548498474830c7268032ffc5fb406a5 +Author: Søren Sandmann Pedersen +Date: Mon Jun 13 21:51:46 2005 +0000 + + Add xkbfile to symlink.sh, conditionally include "config.h" in + xc/lib/xkbfile + +commit 0802a2824c06d294ea42f0f6256644da5c0038c2 +Author: Eric Anholt +Date: Mon Jun 13 18:14:53 2005 +0000 + + Correct the CHIPSET lines for the 3dfx cards so the tdfx driver will + recognize them. I'm not sure if this file is supposed to be maintained + still, but I'd like to close FreeBSD ports/32121 which has been around + for far too long. + +commit 2eab094816726542c4de6c9db5efa102ab1e1593 +Author: David Reveman +Date: Mon Jun 13 16:38:06 2005 +0000 + + Build fixes + +commit 49476ca73c86a599a1bc49cba1117d42f59996a8 +Author: Lars Knoll +Date: Mon Jun 13 14:40:25 2005 +0000 + + add the convolution filter from xserver to xorg + +commit f0ab6d57df66da5de1a8182f8250cc2c8e1450ad +Author: David Reveman +Date: Mon Jun 13 06:00:35 2005 +0000 + + Remove xgloffscreen.c + +commit f5aeaa7710de5ba4aad125bc8472bad1f17e23c6 +Author: Adam Jackson +Date: Mon Jun 13 00:09:23 2005 +0000 + + Bug #3513: Silence unhandled event messages from Xnest when running with + -parent. (Mark McLoughlin) + +commit 521916d0074901db58ab6b9edab52373da28bdb3 +Author: David Reveman +Date: Fri Jun 10 12:30:39 2005 +0000 + + New implementation of GLX_MESA_render_texture + +commit bdb3eb86f02e233b6aeef0995ea9afeaa7b035ac +Author: Kean Johnson +Date: Fri Jun 10 06:54:07 2005 +0000 + + file usl_xqueue.c was initially added on branch sco_port_update. + +commit 988ffddfe082fb27fadf9aa60ab22dce6855508c +Author: Adam Jackson +Date: Fri Jun 10 04:01:14 2005 +0000 + + Bug #2799: Input shape. (Keith Packard) + +commit d24ed90547122832d4168ad761f68e107bb1a2db +Author: Eric Anholt +Date: Fri Jun 10 02:14:44 2005 +0000 + + Axe a few dead fields from the port priv struct and add my name to the + "Copyright" line of the license to ati_video.c that already has my name + in the text. + +commit 75065f3a54ec760bbe81160fa233810f14d8aaa2 +Author: Eric Anholt +Date: Thu Jun 9 23:22:55 2005 +0000 + + Perform a warnings sweep on hw/kdrive. A number of these were my fault, but + some come from others. + +commit e11e60b361d63ae02918dd6b43038a5c92b73a49 +Author: Eric Anholt +Date: Thu Jun 9 21:59:26 2005 +0000 + + Greatly improve the correctness and performance of the MGA render + implementation. Includes cache flushing to prevent bad first reads of + the framebuffer, fixing blending of many formats, falling back on many + unsupported operations, and falling back early to prevent migration. + Passes all of rendercheck except some of the blend (!) tests. + +commit 9f81ce945680515e6db7da6c87458bee7c0f053d +Author: Ian Romanick +Date: Thu Jun 9 21:48:45 2005 +0000 + + Re-enable GL_HP_occlusion_test. The problems in Mesa that caused this bug + were fixed by Brian Paul in Mesa version 6.1. The current Mesa version + in the X.org tree is 6.2.1. + Xorg bug: 762 + +commit 92b3775ae8bdd4a84d7e101b36b306fbd3ac17a2 +Author: Matthew Allum +Date: Thu Jun 9 16:22:27 2005 +0000 + + TSLib fixes. Add fullscreen support to ephyr + +commit 545c082cf9c86f2a809ea6b4dca33643afb0c3d3 +Author: Eric Anholt +Date: Thu Jun 9 10:44:45 2005 +0000 + + - Replace the syncAccel hook in the kdrive structure with a pair of hooks + in the kaa structure: markSync and waitMarker. The first, if set, + returns a hardware-dependent marker number which can then be waited for + with waitMarker. If markSync is absent (which is the case on all + drivers currently), waitMarker must wait for idle on any given marker + number. The intention is to allow for more parallelism when we get + downloading from framebuffer, or more fine-grained idling. + - Replace the KdMarkSync/KdCheckSync functions with kaaMarkSync and + kaaWaitSync. These will need to be refined when KAA starts being smart + about using them. Merge kpict.c into kasync.c since kasyn.c has all the + rest of these fallback funcs. + - Restructure all drivers to initialize a KaaInfo structure by hand rather + than statically in dubious order. + - Whack the i810 driver into shape in hopes that it'll work after this + change (it certainly wouldn't have before this). Doesn't support my + i845 though. + - Make a new KXV helper to avoid duplicated code to fill the region with + the necessary color key. Use it in i810 and mach64 (tested). + +commit 72ca8e1b5432db57401e66af8a07fcd8cbbbb9f1 +Author: Alan Coopersmith +Date: Thu Jun 9 03:11:58 2005 +0000 + + Add agpgart support for Solaris x86/x64. [Requires Solaris "Nevada" build + 16 or later to get kernel side for now.] (Sophia Li - Sun Microsystems) + +commit ca37d5755259ca03c61cf0567be3dea99d0c79f6 +Author: Adam Jackson +Date: Thu Jun 9 03:01:57 2005 +0000 + + Bug #2469: More accurate damage reports. (Jonathan Lennox) + +commit cdc15e2294a9bffc570e33bc31170081abfc55fb +Author: Adam Jackson +Date: Thu Jun 9 02:29:42 2005 +0000 + + Bug #1846: Add intentionally undocumented -disablexineramaextension flag to + the server to work around ignorant clients on large display walls. + (Kevin E. Martin) + +commit e3cdec7cdcd76f6294ba1f296e4bcdee43b1eb3c +Author: Adam Jackson +Date: Thu Jun 9 02:19:10 2005 +0000 + + Bug #1880: Remove unused xnestConfineWindow. (Mark McLoughlin) + +commit 0f7136191b54e587b66958985e14d8b0687c5ee1 +Author: Adam Jackson +Date: Thu Jun 9 02:03:50 2005 +0000 + + Bug #3434: Don't define fbAddTraps twice. (Mike A. Harris) + +commit e7fec996eb43a0bea94a37d329e3902299e6e895 +Author: Alexander Gottwald +Date: Wed Jun 8 16:13:11 2005 +0000 + + Merge from CYGWIN Added layout "French (Canada)" as ca_enhanced Added Czech + (QWERTY) layout + Merge from CYGWIN Print error code if winStoreColorsShadowDDNL fails + +commit d0d164e6daf6c1d8afe8099fb6187d8a74ff652b +Author: Alexander Gottwald +Date: Wed Jun 8 09:01:41 2005 +0000 + + Fix crash reported by Øyvind Harboe + +commit d146c41882e50dd1ed6022f8a5866514067ba9d2 +Author: David Reveman +Date: Tue Jun 7 08:53:40 2005 +0000 + + GLX improvements and remove use of pbuffers for offscreen rendering in Xgl + +commit 8237b31f60245a8e67735d6c231dfb7dd0bbc388 +Author: Jon Smirl +Date: Mon Jun 6 04:06:38 2005 +0000 + + Keyboard sort of works now with evdev + +commit c5026577cbc70c7365a9c81b2775136b45c850d2 +Author: Jon Smirl +Date: Sun Jun 5 17:32:41 2005 +0000 + + Create a default colormap + +commit 021a5cd170051aae25cf61651d07b47a4df31ab4 +Author: Jon Smirl +Date: Sun Jun 5 01:58:41 2005 +0000 + + Enable egl server in automake + --enable-xeglserver + +commit aa959672863aad71c807d6c09938bb296c347bcf +Author: Jon Smirl +Date: Sat Jun 4 23:33:03 2005 +0000 + + Initial Xegl check-in. Works on EGL fbdev driver Input is totally broken. + +commit 88d49bed008264092245c4f6c53174f93f6ab387 +Author: Alan Coopersmith +Date: Fri Jun 3 21:49:11 2005 +0000 + + Need to set initial screen size at device open time too. + +commit 0d206e177f46eedfffd8f88e985efdfaf117021c +Author: Alexander Gottwald +Date: Fri Jun 3 08:12:22 2005 +0000 + + Backout last winRaiseWindow patch which caused stacking problems + +commit 2fc290f646eb48f3c20ccff98355c2d082569160 +Author: Alan Coopersmith +Date: Wed Jun 1 17:45:17 2005 +0000 + + Solaris VUID mouse protocol updates: + - support for mouse-like devices that report absolute coordinates + - support for mouse-like devices that need to know screen size so they can + scale absolute coordinates to screen size + - fix 3-button emulation + +commit 8537146e3662cdc66ef4692bfd3886a676096fb8 +Author: Adam Jackson +Date: Mon May 30 18:44:55 2005 +0000 + + Bug #3368: Cosmetic cleanup to DIX export list. + +commit 547c47aaea9f31f7c873376b0db859c1c1d3d918 +Author: Adam Jackson +Date: Mon May 30 18:36:19 2005 +0000 + + Bug #3407: Clean out ancient #ifdef X11R5 conditionals. + +commit cebd7348d271591b7ebeebe3b332f835cfa8a068 +Author: Alan Coopersmith +Date: Sat May 28 00:08:03 2005 +0000 + + Change hardcoded /usr/X11R6 to PROJECTROOT. Change hardcoded XF86Config to + XCONFIGFILE. + +commit 1cb18a4bad565d1f783a4cefb3ed467699051068 +Author: Alexander Gottwald +Date: Wed May 25 12:14:29 2005 +0000 + + Workaround bug in pthread.h + +commit 62343f5162066f19ca6e62d1c85a4a40d45b3295 +Author: Alan Coopersmith +Date: Sun May 22 01:12:49 2005 +0000 + + Bugzilla #2800 Xevie + extension crash with signal 11 on keyboard Bugzilla #1205 + Xevie client + receives two KeyPress events on consumed keys when XKB is enabled + Patch #2223 Fixes for + both of these and some other Xevie bugs (Derek Wang - Sun Microsystems) + +commit a8a61bbe22361b12d4a2dd511894987a338e3eef +Author: Alan Coopersmith +Date: Sat May 21 07:46:38 2005 +0000 + + Initial experimental support for AMD64 builds on Solaris 10 x86. Improved + support for 64-bit SPARC builds on Solaris as well. + +commit ef4401ff8a8c4d7c22ef6af7bf47ccb24f83967f +Author: Adam Jackson +Date: Thu May 19 18:53:51 2005 +0000 + + Bug #3334: Clean up remnants from the PEX, XIE, and BEZIER extensions. + +commit 1e51e18382de61a67027759eccee9ccbb0924304 +Author: Søren Sandmann Pedersen +Date: Thu May 19 01:25:02 2005 +0000 + + Wed May 18 21:20:35 2005 Søren Sandmann + s/dst/src that I missed in the previous patch. Pointed out by Owen Taylor. + +commit be3875994d7778ffad0cd957a4bd1500bf58ac2c +Author: Søren Sandmann Pedersen +Date: Wed May 18 20:49:31 2005 +0000 + + Wed May 18 16:47:44 2005 Søren Sandmann + Actually assign the computed results. (Reported by Michael Dänzer, patch + by Owen Taylor). + +commit 07d1e9ae5f0da65427ac52f065b173d340d70d6d +Author: Adam Jackson +Date: Wed May 18 19:44:35 2005 +0000 + + Bug #3066: Promote frameBufferPhysicalAddress to pointer from CARD32; bump + DRIINFO version to match. Fix various pointer printfs in libdri to be + 64-bit aware. Silence a warning about redefining noXFree86DRIExtension. + (Jesse Barnes) + +commit b87a32fb0eafa6d5f12a6faa634662c71fdc97fa +Author: Adam Jackson +Date: Wed May 18 17:47:35 2005 +0000 + + Bug #3163: Create new DRIINFO_*_VERSION macros to indicate the version + number of the DRIInfoRec, disambiguating it from the XF86DRI protocol + version number. Modify DRIQueryVersion to return the libdri version + number, which all DDXes were requesting implicitly. Fix the DDXes to + check for the DRIINFO version they were compiled against. + +commit fddcde777f50611099d8888456d93be7e566c84e +Author: Egbert Eich +Date: Wed May 18 15:38:50 2005 +0000 + + VBESetVBEMode() calls int10 0x4f02 to set a VBE video mode. This can be a + standard mode solely determined by the mode ID or it may be a detailed + mode with almost arbitrary mode parameters. The mode parameters are + passed to the BIOS in a memory area pointed to by es:di. If bit 11 in + the video mode is set this memory area is evaluated. When we don't have + such an area (passed to VBESetVBEMode() this function should unset this + bit for sanity reasons. (Bugzilla #3329) + +commit f28d644d9fb1feeab1bbb3d5e68255bfa20905d8 +Author: Zack Rusin +Date: Wed May 18 14:24:14 2005 +0000 + + rewrite the rootless compositing code (1) compiles which is already a huge + improvement ;) , 2) matches the new render composition semantics) + +commit bbbb0a3a84bf21f5120c73ef387d6190154c0f65 +Author: Egbert Eich +Date: Wed May 18 10:31:53 2005 +0000 + + Avoid segfaults if the number of user supplied monitor ranges exceed the + number of preallocated slots. We should really make this dynamic - but + I don't think this ever caused a problem so it's more or less academic. + A. Avoid that *SyncStart starts before *BlankStart. If *BlankStart > + *SyncStart it is made = *SyncStart and its width is made maximal but such + that the blank does not exceed *Total. Since the Sync width has the + same restrictions as the Blank width monitors should still be able to + clamp after the sync pulse. B. Over time mode validation has become + inconsistent when people started to add additional features to the mode + validation. One such feature is that the mode->Crtc* values have been + (ab)used to allow the driver ValidMode() function to pass driver + normalized timing values back to the validation function. The + introduction of these features made the code less readable and created + numerous possibly unintended side effects in the validation semantics. + I've attempted to consolidate these changes making the code more + consistent and eliminating a number of side effects. This should not + cause problems for the majority of drivers, still it should receive + testing - especially with ATi Mach64 and Radeon code. (Bugzilla #3325). + +commit a90af4a2e6e38cbe20af13aaa7822836c01290ae +Author: Thomas Hellstrom +Date: Sun May 15 17:45:47 2005 +0000 + + Bug 2750: Prevent mtrr_remove_offending from ending up in an endless loop + if the offending region refuses to be removed. + +commit f58a54668b96884ece6ecbff732e880677d5d19e +Author: Alan Coopersmith +Date: Sat May 14 20:13:45 2005 +0000 + + Change return statements to fix compiler errors: "fbcompose.c", line 2815: + void function cannot return value "fbcompose.c", line 2861: void + function cannot return value + +commit a9d820b454bbb418d04e1d3c3d5d4dd10d7bb3af +Author: Søren Sandmann Pedersen +Date: Fri May 13 22:53:44 2005 +0000 + + - For now put xtrans in X11/Xtrans/X11, since libX11 is looking for it in + + - For Xcomposite and Xdamage, don't link the build system out of the xc + tree + - Link the public X11 headers into their own directory + - Add links to XKeysymDB and XErrorDB + - Add links to all the Xlib man pages + - Add links to the lcUniConv subdirectory + - Conditionally include config.h in Xlib source + +commit 8993e70d8da89e130455369ccb504b3adea5344f +Author: Eric Anholt +Date: Tue May 10 00:12:17 2005 +0000 + + Bugzilla #2561: Disable some keycode translations on PC98, which had + various bad effects including modifier keys not working. + +commit e78abf3bdfbf5fc13fbc5b1d3ec00e9484297b89 +Author: Eric Anholt +Date: Mon May 9 23:42:26 2005 +0000 + + Bugzilla #2429: Correct the sysarch prototype for FreeBSD/alpha. + +commit 3f1a1551df2a9f45b3b8821f3f168d4dc8b8b438 +Author: Eric Anholt +Date: Mon May 9 23:26:02 2005 +0000 + + Increase the maximum number of buttons from 12 to 24. Helps with + button-happy mice like the Logitech MediaPlay. (Bugzilla #2390) + +commit eca5dff173d5af0a31bbf84579909b88a86e4c92 +Author: Adam Jackson +Date: Mon May 9 12:46:53 2005 +0000 + + Render performance improvements. (Lars Knoll, Zack Rusin) + +commit 2de24db63eb65974ac547facf2a99aa4709d54b3 +Author: Adam Jackson +Date: Sun May 8 23:34:15 2005 +0000 + + Render performance improvements. (Lars Knoll, Zack Rusin) + +commit 2c9b1e337b2e82e10909f62e8cd8c2c7a402fdd8 +Author: Alexander Gottwald +Date: Sun May 8 21:14:55 2005 +0000 + + Only call ConfigureWindow from winRaiseWindow if the windows message + dispatch loop is running. + +commit 78e4cb67d0f595f4fba5e98a9fa46de044556905 +Author: Torrey Lyons +Date: Fri May 6 00:45:30 2005 +0000 + + Fix build issues on Mac OS X 10.4.0. + +commit d5739efd2c266081ed6b844767dcdd0a3331bfd3 +Author: Eric Anholt +Date: Wed May 4 04:14:58 2005 +0000 + + Port X.Org to FreeBSD/powerpc. This makes a bit of math for sysmouse in + mouse.c explicitly signed, avoiding the need for -fsigned-chars. (Peter + Grehan, grehan at FreeBSD dot org) + +commit 6700847458427cbdbaf837ab06bfea9b80d92df2 +Author: Harold L Hunt II +Date: Mon May 2 22:01:08 2005 +0000 + + Fix comments for pointers in parameter lists to work with fussy compilers + +commit e50ab8feade400efd8e88ee0b2deeb924f169034 +Author: Harold L Hunt II +Date: Mon May 2 21:57:32 2005 +0000 + + Fix message type (respose->response) and fix */*comment*/ blocks to work + with fussy compilers. + +commit baa0cfc15442287557e44fa2614d89ab0b5c2539 +Author: Alexander Gottwald +Date: Mon May 2 14:07:31 2005 +0000 + + Print correct logfile in FatalError message + +commit bc977945a53206d70ef9817d6ede4137eb5f7e3c +Author: David Reveman +Date: Mon May 2 00:33:52 2005 +0000 + + Set stencil size for Xgl GLX visuals + +commit 5b4462ed9bbb17212dd57617cb7e837142b6270a +Author: David Reveman +Date: Sun May 1 22:55:25 2005 +0000 + + New algorithm for calculating glyph extents in Xgl + +commit e4b33f4e91a5379c99ecf78ffb6a3e836cb42491 +Author: Egbert Eich +Date: Wed Apr 27 15:42:15 2005 +0000 + + Catch SIGCHLD in OsBlockSignals() too to make sure this signal doesn't + intercept reading the authority file (Fabian Franz, Bugzilla #3137). + +commit 246b14cb29250517912d9c661ab037a953f4bbf4 +Author: David Reveman +Date: Wed Apr 27 10:34:33 2005 +0000 + + Minor optimization + +commit 28a2d841cee596c0242b1649587d6b180529c0ef +Author: David Reveman +Date: Wed Apr 27 09:29:33 2005 +0000 + + Line drawing improvements to Xgl + +commit abcc8c352e5fe6dd3b7ce5c6a25f435f877264c3 +Author: David Reveman +Date: Wed Apr 27 08:45:16 2005 +0000 + + Fix typo + +commit 8bc5a387c365d6367813eac374150440d0edbf6e +Author: David Reveman +Date: Tue Apr 26 11:04:23 2005 +0000 + + Add glCopy operation and glPushAttrib/glPopAttrib support to Xgl GLX + +commit f010131a1964b5ec35f3b333ffa7459c38f8ce45 +Author: Roland Mainz +Date: Tue Apr 26 06:12:07 2005 +0000 + + xc/programs/Xserver/Xprint/Init.c + //bugs.freedesktop.org/show_bug.cgi?id=2879) attachment #2556 + (https://bugs.freedesktop.org/attachment.cgi?id=2556) Refix for bug + 2879 - downgrade 15bit PseudoColor to 14bit - the current datatype for + the |ColormapEntries| is a |signed short| which is too small for + |32768| colors (=integer overflow). + +commit ba24ae89d33fbf3aacb8bbaf920d7436b77fda46 +Author: David Reveman +Date: Mon Apr 25 17:18:01 2005 +0000 + + Add scissor based clipping to Xgl GLX + +commit 07cc29cf69ff1e079efe3c9bfc55e8ac0f9bac93 +Author: Adam Jackson +Date: Mon Apr 25 00:25:39 2005 +0000 + + Bug #2138: When the server is built with MakeDllModules YES, prefer + dlloader modules to elfloader modules, and vice versa when + MakeDllModules is NO. Based on 028_loader_speed_hack.diff from Ubuntu + (Daniel Stone). + +commit 6c37648754c9bd901adecf8d38f9bb46db65efad +Author: Adam Jackson +Date: Mon Apr 25 00:11:21 2005 +0000 + + Bug #2141: Rework misleading warning message when APM support is + unavailable. (Previous patch on 2005-04-14 changed the wrong message.) + +commit a369d390a87ab0189c465be6cfd914e4b9329691 +Author: Roland Mainz +Date: Sun Apr 24 01:10:12 2005 +0000 + + xc/config/cf/X11.tmpl + xc/programs/Xserver/Xext/Imakefile + xc/programs/Xserver/dix/Imakefile + xc/programs/Xserver/dix/main.c + xc/programs/Xserver/dix/xpstubs.c + xc/programs/Xserver/mi/miinitext.c + //bugs.freedesktop.org/show_bug.cgi?id=2792) attachment #2526 + (https://bugs.freedesktop.org/attachment.cgi?id=2526) bug 2792 part II: + Make Xprint headers in dix/, mi/, os/ and Xext/ conditional on whether + the Xprint extension is build or not. Patch by Egbert Eich + and Roland Mainz . + +commit 13fcfee37305f46e95ff81d7d5eec4d88a63a63b +Author: Roland Mainz +Date: Sat Apr 23 22:55:40 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=3118) attachment #2525 + (https://bugs.freedesktop.org/attachment.cgi?id=2525) Get Xprint server + working again which was broken by the + 05/04/20 05:49:46 commit commit (the CPP symbol |XPRINT| is not universally + available when building the Xserver and should be used with care). + +commit 39eb2797183bf871a2dd01bff63dd35c146471f5 +Author: Adam Jackson +Date: Sat Apr 23 19:16:10 2005 +0000 + + Bug #3016: Don't complain as loudly about failing to load a module that's + already loaded. + +commit 139f900c56a6f44df2b411fe4bbc025a147e3abe +Author: Adam Jackson +Date: Sat Apr 23 19:01:13 2005 +0000 + + Bug #3109: Handle R_ALPHA_BRSGP relocations in elfloader. (Sergey Tikhonov) + +commit 0e80fe0e607cc73856332563becd70ef92d1aa75 +Author: Alan Coopersmith +Date: Fri Apr 22 22:11:26 2005 +0000 + + Clean up formatting, projectroot substutition, and grammatical nits. + +commit dcfb97204b021738c0ee9f1f8f40243dfa0b2ce0 +Author: Alan Coopersmith +Date: Fri Apr 22 22:04:37 2005 +0000 + + Work around clash between Solaris headers and module loader headers over + definition of FILE. + +commit 07bd7df6a6a07834277b4bf505db6727841e1153 +Author: Adam Jackson +Date: Fri Apr 22 20:49:50 2005 +0000 + + Bug #3069: Drop the BuildLowMem hack, it doesn't compile and isn't useful. + +commit d450a70e00b50427ecb2065d3cc44f43d102cade +Author: Adam Jackson +Date: Fri Apr 22 17:45:14 2005 +0000 + + Bug #2373: SGI Altix platform support. (Shrijeet Mukherjee, Jesse Barnes, + Bjorn Helgaas, Egbert Eich.) + +commit 16c2499b8f5c2405e36c7d5a922bb0b150df1762 +Author: Adam Jackson +Date: Fri Apr 22 16:49:22 2005 +0000 + + Bug #2373: SGI Altix platform support. (Shrijeet Mukherjee, Jesse Barnes, + Bjorn Helgaas, Egbert Eich.) + +commit 8565b6c0e2851cc3f194ba72d3db02a4e2976528 +Author: Daniel Stone +Date: Thu Apr 21 00:31:31 2005 +0000 + + Change xf86bigfont.h include to X11/extensions/xf86bigfont.h. + +commit b241c703a2c4164420dd26ee11f583bbf9cfe0f3 +Author: Daniel Stone +Date: Thu Apr 21 00:31:13 2005 +0000 + + Change keymap.h includes to X11/keymap.h + +commit 44528218d5ca75b842e4cefd8fdc58be2f35f0f4 +Author: Daniel Stone +Date: Wed Apr 20 23:33:53 2005 +0000 + + Change dmxext.h and dmxproto.h to . + +commit efa9d5f4757bfc0588cee361bcc78dd8a09efa62 +Author: Daniel Stone +Date: Wed Apr 20 23:11:12 2005 +0000 + + Change "eviestr.h" to . + +commit db5bd04097fd815ab6523f187679682a5e5047fa +Author: Alexander Gottwald +Date: Wed Apr 20 16:40:52 2005 +0000 + + Fix includes right throughout the Xserver tree: + apply changes to windows specific includes + Fix includes right throughout the Xserver tree: + apply changes to Xdmcp.h + +commit 8963a220f36cf0ae2a8a653fd39c983140e29736 +Author: Alexander Gottwald +Date: Wed Apr 20 16:34:46 2005 +0000 + + warning fix for Win32 + +commit e6a0820d1b479058bddef66018d321940e79260c +Author: Daniel Stone +Date: Wed Apr 20 15:16:36 2005 +0000 + + Change "xf86bigfstr.h" to for includes. + +commit 025724f9f5874159c20ebd705288ec60b960caac +Author: Alexander Gottwald +Date: Wed Apr 20 14:17:35 2005 +0000 + + Add missing space after -query hostname + +commit 35cd1684622f4528c68e07eea798c33bc4b93667 +Author: Daniel Stone +Date: Wed Apr 20 14:16:37 2005 +0000 + + Change xf86bigfstr.h to X11/extensions/xf86bigfstr.h for includes. + +commit c7c27e61870b42de044b183c854a960582d98dbf +Author: Daniel Stone +Date: Wed Apr 20 13:33:54 2005 +0000 + + Change xf86bigfont.h to X11/extensions/xf86bigfont.h for includes. + +commit abd246c6c272a2c6f9c37404b2ed439911880e75 +Author: Daniel Stone +Date: Wed Apr 20 13:01:55 2005 +0000 + + Add glyphstr.h to includes. + +commit 956dfa22f6076969776546fb1151e900d8d773a1 +Author: Daniel Stone +Date: Wed Apr 20 12:49:46 2005 +0000 + + Conditionalise usage of Xprint functions and headers. + +commit 2cdfab0ed7eb33a6a50f9b7ec212b498dd8318b5 +Author: Daniel Stone +Date: Wed Apr 20 12:42:02 2005 +0000 + + Change keysymdef.h to X11/keysymdef.h for include statement. + +commit fa5539247d3b246db9ff1469d08167178c85d7ad +Author: Daniel Stone +Date: Wed Apr 20 12:39:28 2005 +0000 + + Change Xalloca.h to X11/Xalloca.h for include. + +commit 292c4cff26687e6ef86c285b97813ab587daf009 +Author: Daniel Stone +Date: Wed Apr 20 12:25:48 2005 +0000 + + Fix includes right throughout the Xserver tree: + change "foo.h" to for core headers, e.g. X.h, Xpoll.h; + change "foo.h", "extensions/foo.h" and "X11/foo.h" to + for extension headers, e.g. Xv.h; + change "foo.[ch]" to for Xtrans files. + +commit c062d7f96f47bdd31640be1fbce682d0774db3d9 +Author: Alexander Gottwald +Date: Tue Apr 19 18:21:01 2005 +0000 + + Prevent recursive calls to winRaiseWindow. + +commit 4e914c5ed7679a1102f3e25af0c087380f834865 +Author: David Reveman +Date: Tue Apr 19 14:51:29 2005 +0000 + + Hash texture objects and display lists in Xgl + +commit 6bde764de102a56d2c71b971eaa36535e9760b52 +Author: Bogdan Diaconescu +Date: Sun Apr 17 23:02:25 2005 +0000 + + Added a log pring for the parameters + +commit 8594b8f2893e58ae824e140334c18ba3d7467217 +Author: Bogdan Diaconescu +Date: Sun Apr 17 23:00:58 2005 +0000 + + Added new tuner FM1236MK3 PAL version + +commit 7f74e3aebdf79fbca4141e6ffcdad39812df9335 +Author: Bogdan Diaconescu +Date: Sun Apr 17 22:58:03 2005 +0000 + + This is the UDA1380 sound coder-decoder module + +commit 7a4e5f4006319e025e3ff561eccc3f1ad6c661a0 +Author: Torrey Lyons +Date: Sat Apr 16 00:21:21 2005 +0000 + + Fix cases in Darwin build where a variable is declared static and later as + extern (XFree86 Bug #1576, Jordan Frank). + +commit 4f686f158b00478a3d074128f9e4cb6dc0d928cd +Author: Roland Mainz +Date: Fri Apr 15 23:34:39 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2885) attachment #2434 + (https://bugs.freedesktop.org/attachment.cgi?id=2434) Fix Solaris build + bustage caused by namespace collision between symbols defined in + and those in "xf86_OSlib.h". Patch by Alan Coopersmith + . + +commit 7472fcfdd40e29cd2847e45d4bd2dd11ccc41ff5 +Author: Adam Jackson +Date: Fri Apr 15 00:18:58 2005 +0000 + + Bug #2141: Rework misleading warning message when APM support is + unavailable. + +commit 504067819a4f1a8564dcacc278933f533618b666 +Author: Adam Jackson +Date: Thu Apr 14 17:51:51 2005 +0000 + + Bug #3025: gcc4 build fix. + +commit e40db7f26af39a8b1f3675a2c87ce90c4fd59d85 +Author: David Reveman +Date: Wed Apr 13 14:27:47 2005 +0000 + + Add GLX code to Xgl + +commit ddfa6f00da7c80b246b57c592361baa4bc5a8e9d +Author: Roland Mainz +Date: Wed Apr 13 00:05:37 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=3001) attachment #2404 + (https://bugs.freedesktop.org/attachment.cgi?id=2404) Improve rendering + performance when glXSwapBuffers()| or |XPutImage()| are called for the + PostScript DDX via optimizing the codepath around + |PsOut_OutImageBytes()|. Patch by Simon Toedt + and Roland Mainz . + +commit f45208a7e9c39345ac431c2e7da8777d6c466dcc +Author: Alan Hourihane +Date: Mon Apr 11 11:06:21 2005 +0000 + + update static file from pci.ids + +commit b47f39b417cbe220690155a08c6bc18cd7cfa388 +Author: Alan Hourihane +Date: Mon Apr 11 10:57:33 2005 +0000 + + import latest pci.ids file + +commit 00a551393ce7aa9d2b23634737ced5071e3cdd35 +Author: Egbert Eich +Date: Mon Apr 11 10:54:13 2005 +0000 + + Reenable BackingStore in Xvfb. + +commit 1fbd38f3b46df62561f8be74cbc05fcf8ad88a21 +Author: Alexander Gottwald +Date: Mon Apr 11 10:16:25 2005 +0000 + + Added wizard page for clipboard selection and additional server parameters + +commit 6848b0353897a6a5d1218b266c22fb87a7c6d730 +Author: Egbert Eich +Date: Mon Apr 11 10:05:38 2005 +0000 + + Correct the mask bits when checking for a 64bit memory base in PCI config + space (bugzilla #2963). + +commit adac7011965ed75ea399b93dae917cb48180c77a +Author: Egbert Eich +Date: Mon Apr 11 09:33:43 2005 +0000 + + Preventing hight for drawing from becoming negative when face->dy < 0. The + height value is used in miFillPolyHelper() to calculate the size of + memory to be allocated. A negative value will lead to a crash (Bugzilla + #2690, Keith Packard, Egbert Eich). + +commit 5e2080ef93a598c6d68e1b2f446f251ab025b702 +Author: Roland Mainz +Date: Mon Apr 11 01:06:15 2005 +0000 + + xc/programs/Xserver/Xprint/attributes.c + xc/programs/glxgears/glxgears.c + xc/programs/xdbedizzy/xdbedizzy.c + xc/programs/xedit/Imakefile + xc/programs/xedit/Xedit-xprint.ad + xc/programs/xedit/util.c + xc/programs/xedit/xedit.h + xc/programs/xlogo/print.c + xc/programs/xlogo/xlogo.c + xc/programs/xlogo/xlogo.h + xc/programs/xman/Imakefile + xc/programs/xman/print.h + xc/programs/xmore/Imakefile + xc/programs/xmore/print.c + xc/programs/xmore/print.h + xc/programs/xmore/printdialog.c + xc/programs/xphelloworld/xpawhelloworld/xpawhelloworld.c + xc/programs/xphelloworld/xphelloworld/xphelloworld.c + xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.c + xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.c + //bugs.freedesktop.org/show_bug.cgi?id=790) attachment #2379 + (https://bugs.freedesktop.org/attachment.cgi?id=2379) Implement support + client+Xserver support for passing output (stdout+stderr) of the + spooler command started by the Xprint server back to the application + using the "xp-spooler-command-results" XPJobAttr attribute + (applications can fetch the attribute value after the XPEndJobNotify + event was received; more details can be found in + http://xprint.mozdev.org/docs/dtprint_fspec.ps). + +commit 9af443f5976ab3987e4ee9d397391e82206676b4 +Author: Alexander Gottwald +Date: Sat Apr 9 19:20:03 2005 +0000 + + Fix passing of non-RGB visuals. The old code did not initialize the + structure properly which lead to a crash in 8bpp mode + +commit f02440dfa3439ab493c7918b472c23bb22e29707 +Author: Alexander Gottwald +Date: Wed Apr 6 15:18:59 2005 +0000 + + First import of xlaunch frontend for Xming + +commit de5d24a200e4426e458fc447884d1a5b0257faaa +Author: Egbert Eich +Date: Mon Apr 4 10:17:06 2005 +0000 + + Fixed sentinels in Xt, editres and xedit to reduce number of warnings with + gcc4 (Andreas Schwab). + +commit 277ff06e9999f2efe0f082a3565f6279219c13e4 +Author: Egbert Eich +Date: Mon Apr 4 10:11:51 2005 +0000 + + Fix typo leading to bogus code in xorgcfg (Andreas Schwab). + +commit 7eb6b69ebd945c753ee0988e1a85dffde982446e +Author: Egbert Eich +Date: Mon Apr 4 09:55:25 2005 +0000 + + Support for HP's IPF ZX1 systems (Alex Williamson). + +commit 231c00e8fba91b580ec3e2703dd1ceacf13a6624 +Author: Egbert Eich +Date: Mon Apr 4 09:47:07 2005 +0000 + + When not using dlopen ia64 needs an extra cache flush to ensure the icache + is coherent when modules are loaded (Alex Williamson). + +commit 55dc930a180553c08d8546cc2078451c20e34934 +Author: Torrey Lyons +Date: Sat Apr 2 02:29:24 2005 +0000 + + Fix XDarwin's handling of Wacom tablet mouse buttons (Based on patch + suggested by Daphne Pfister). + +commit 03d126081e5ba57ea2304753289528a896f3baaf +Author: Roland Mainz +Date: Fri Apr 1 21:45:20 2005 +0000 + + xc/programs/Xserver/Xprint/Init.c + xc/programs/Xserver/Xprint/ps/Imakefile + xc/programs/Xserver/Xprint/ps/Ps.h + xc/programs/Xserver/Xprint/ps/PsArea.c + xc/programs/Xserver/Xprint/ps/PsColor.c + xc/programs/Xserver/Xprint/ps/PsImageUtil.c + xc/programs/Xserver/Xprint/ps/PsInit.c + //bugs.freedesktop.org/show_bug.cgi?id=2879) attachment #2287 + (https://bugs.freedesktop.org/attachment.cgi?id=2287) Follow-up to + bugzilla #1299: Add new visuals in the Postscript DDX (including + TrueColor 16bit, PseudoColor 15bit/12bpg(12 bits per R-, G-, B-channel + as in PostScript Level 2 (and above) colors can have 12 bits per + component (36 bit for RGB)), PseudoColor+GrayScale+StaticGray + 12bit/12bpg) and switch the default visual from PseudoColor 8bit/8bpg to + PseudoColor 12bit/12bpg. + +commit fe37cc7e7b3036e538930c16bbdb39a7915b1685 +Author: Matthieu Herrb +Date: Fri Apr 1 21:28:50 2005 +0000 + + programs/Xserver/hw/xfree86/loader/xf86sym.c + programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c Fix setjump0 + declaration for DllLoader. + +commit ef60998a828951e61f1480e29c2fec62e7454bbc +Author: Kevin E Martin +Date: Fri Apr 1 20:21:38 2005 +0000 + + bugzilla #2880 (https://bugs.freedesktop.org/show_bug.cgi?id=2880) + attachment #2285 (https://bugs.freedesktop.org/attachment.cgi?id=2285) + Use system method to access PCI config space. + +commit 33ab2a2abc8c1e4ca9c7139454c60f5ad8a61a94 +Author: Adam Jackson +Date: Fri Apr 1 20:05:11 2005 +0000 + + Bug #2835: Add symbol exports to support the ReadDisplay extension. + +commit cbccac448a1466ab098e8fe5dbfff98264c7260a +Author: Alex Deucher +Date: Thu Mar 31 23:18:10 2005 +0000 + + - Add new Radeon pci ids (ATI devrel), bug 2827 + +commit 59d7222b13775efb2159159cc897e7789bdf10b2 +Author: Søren Sandmann Pedersen +Date: Sun Mar 27 00:17:12 2005 +0000 + + Sat Mar 26 19:00:30 2005 Søren Sandmann + Remove accidentally committed prototype. + +commit 476ae15640d2b97cb0ebccab8255ccf728596c62 +Author: Søren Sandmann Pedersen +Date: Sat Mar 26 23:50:24 2005 +0000 + + Sat Mar 26 18:49:21 2005 Soeren Sandmann + programs/Xserver/fb/fbmmx.h + New function. + Hook it up here + +commit 0d33b588376a4d86d50ed8b7e06eaf0dbd8c5ba5 +Author: Roland Mainz +Date: Fri Mar 25 23:11:14 2005 +0000 + + xc/programs/Xserver/Xprint/ps/Imakefile + //bugs.freedesktop.org/show_bug.cgi?id=2821) attachment #xxx + (https://bugs.freedesktop.org/attachment.cgi?id=xxx) Remove the cfb + dependicy from the PostScript DDX as this is not needed in a vector DDX + (mfb is still needed to fill the |BitmapToRegion()| callback with + |mfbPixmapToRegion()|). + +commit 5f320335c3a8148ae98f82a00ff44954197f4251 +Author: Matthieu Herrb +Date: Wed Mar 23 21:09:48 2005 +0000 + + bugzilla #2194: fix an alignement problem on 64 bit architectures. + +commit f4e9f522fe8bec3dd6294d062c2244a06623add3 +Author: Thomas Hellstrom +Date: Wed Mar 23 21:03:41 2005 +0000 + + Bugzilla #2750 (https://bugs.freedesktop.org/show_bug.cgi?id=2750) + Linux-only fixes: Fix case where a smaller write-combining region + blocks write-combining setting of the whole frame buffer. Fix bug in wc + setting code when regions are first splitted and setting of + write-combining then fails. + +commit 1be6e2388bcc5835ab62f0855d443fb508697deb +Author: Roland Mainz +Date: Wed Mar 23 20:49:52 2005 +0000 + + xc/programs/Xserver/hw/vfb/InitOutput.c + //bugs.freedesktop.org/show_bug.cgi?id=2791) attachment #2197 + (https://bugs.freedesktop.org/attachment.cgi?id=2197) Add support for + 12bit PseudoColor and 30bit TrueColor to Xvfb. + +commit 26aec10adad51deb35a8398abb884d90be077a6b +Author: Roland Mainz +Date: Wed Mar 23 19:58:45 2005 +0000 + + xc/programs/Xserver/Imakefile + xc/programs/Xserver/Xprint/DiPrint.h + xc/programs/Xserver/Xprint/Imakefile + xc/programs/Xserver/Xprint/Init.c + xc/programs/Xserver/Xprint/ddxInit.c + xc/programs/Xserver/dix/Imakefile + xc/programs/Xserver/dix/main.c + xc/programs/Xserver/dix/xpstubs.c + xc/programs/Xserver/os/Imakefile + //bugs.freedesktop.org/show_bug.cgi?id=2792) attachment #2193 + (https://bugs.freedesktop.org/attachment.cgi?id=2193) Fix build bustage + when |PrintOnlyServer| is set to |NO|. Patch by Roland Mainz + and Julien Lafon . + +commit ac18f8e308221af368fd4153b4eee7b89f8dd4bc +Author: Roland Mainz +Date: Wed Mar 23 00:32:49 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2789) attachment #2187 + (https://bugs.freedesktop.org/attachment.cgi?id=2187) Fix Xvfb to honor + the "-dpi" option (instead of using a hardcoded value of 100DPI). + +commit 45bcb8e22ad949c456368b7d4f4226110f8b5cfc +Author: Adam Jackson +Date: Tue Mar 22 21:30:43 2005 +0000 + + Bug #1821: Typo fix in xorg.conf man page (Jens Schweikhardt) + +commit cc95e597b51f06e835c6a9def1bc6681029bf41e +Author: Søren Sandmann Pedersen +Date: Tue Mar 22 17:49:14 2005 +0000 + + Tue Mar 22 12:47:16 2005 Søren Sandmann + Only validate the source if it is a viewable window. Stops the cursor + flickering when it is above an unviewable window. + +commit 1d68ede0eed62b48354a954a62fca98aa2ce9d2d +Author: Roland Mainz +Date: Sat Mar 19 20:51:34 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2771) attachment #2148 + (https://bugs.freedesktop.org/attachment.cgi?id=2148) Remove RENDER + extension from exclusion list for the standalone print server (Xprt) to + get this extension enabled if the print DDX support it. + +commit 64f1b3fe7e85245865666607d7b32ef7807df08f +Author: Michel Daenzer +Date: Fri Mar 18 22:36:47 2005 +0000 + + Add support for production version of ATI RN50/ES1000. (ATI Technologies + Inc.) + +commit 36dcc9bb1d51fb8c0d67c7e15700e3473a06e47b +Author: Torrey Lyons +Date: Thu Mar 17 01:12:07 2005 +0000 + + Fix build on stock Mac OS X: Out of the box, Mac OS X does not include + Freetype2, Expat, or PNG. Also global variables should be initalized in + the Xserver. + +commit 82f5a127522e48ff7ff78400eadbce0a5a362064 +Author: Søren Sandmann Pedersen +Date: Wed Mar 16 21:25:43 2005 +0000 + + Wed Mar 16 16:17:43 2005 Søren Sandmann + Only validate the source if it is a viewable window. Stops the cursor + flickering when it is above an unviewable window. + +commit 226c0907d4327a440fb0ac5380a19538ffdc6fa0 +Author: David Reveman +Date: Wed Mar 16 21:05:51 2005 +0000 + + Add cursor support to Xglx + +commit 7109ae147c3a9d243d11f386cfbcfbf7b4ea7918 +Author: David Reveman +Date: Wed Mar 16 20:05:19 2005 +0000 + + Fix a few problems in Xgl + +commit 04ccba4d40bef6cee902b118598272f26eebb1df +Author: Egbert Eich +Date: Wed Mar 16 12:16:06 2005 +0000 + + Don't fail calling function when DriverFunc() for RandR fails as + DriverFunc() also returns FALSE when the specific sub function isn't + supported. In the case of xf86RandRGetInfo() we simply rely on what has + been set before and return TRUE. In the case of xf86RandRSetConfig() we + only bail with FALSE if we have to do a rotation and the call fails. We + presently cannot do rotation on the fly without the help of a driver + function (Bugzilla #2745). + +commit 1011762254b41db5ce67cb652a2d4965efd7ec20 +Author: Egbert Eich +Date: Wed Mar 16 11:54:54 2005 +0000 + + Make message that gets printed when loader encounters a .o with no symbols + less conspicuous. + +commit 816606b9eabee334ce6e0b79e8aa67544f428c19 +Author: David Reveman +Date: Fri Mar 11 12:26:20 2005 +0000 + + Return early from xglFillRect when no rectangles should be filled + +commit 4de5aa428514f2cacc60d4708dad996dedee1092 +Author: David Reveman +Date: Fri Mar 11 00:58:49 2005 +0000 + + Use negative stride and PBOs in Xgl + +commit 8653db5d57199d53c9b2b993c35a7b70c8949989 +Author: Alexander Gottwald +Date: Thu Mar 10 20:05:46 2005 +0000 + + Force rebuilding of window stack if a window changes it's state from + minimized. + +commit 522628f25b4a075c8daf547991ea5b80c5efe9c7 +Author: Egbert Eich +Date: Tue Mar 8 10:26:59 2005 +0000 + + Adding more errnos to the libc wrapper (Bugzilla #2672). + +commit db7c9d349b86216ed00888181c64ab707fbe18d4 +Author: David Reveman +Date: Tue Mar 8 09:27:09 2005 +0000 + + Return early from xglCopy if fall-back is more efficient + +commit e09d1d2ae3ccd59408b1dc6f264897ae12dfa2b8 +Author: David Reveman +Date: Tue Mar 8 09:12:17 2005 +0000 + + Better ShmPutImage support in Xgl + +commit 5d9885c5b95286c8d7f777c7232283e8b1e81d1b +Author: David Reveman +Date: Tue Mar 8 09:03:38 2005 +0000 + + Minor improvement to CopyArea in Xgl + +commit 51155ca68bf7539bd3ace2ac068a2be1fbcf400c +Author: David Reveman +Date: Tue Mar 8 08:48:22 2005 +0000 + + Improve Xgl offscreen memory manager + +commit e26a096cb662700387c7b43289d1f6f7ab4a0aac +Author: David Reveman +Date: Tue Mar 8 08:30:47 2005 +0000 + + Fix Xgl glyph caching + +commit 8d0e520721ab7697d2d4f639425499b79c61b43f +Author: Roland Mainz +Date: Mon Mar 7 23:02:59 2005 +0000 + + xc/programs/Xserver/dix/atom.c + xc/programs/Xserver/dix/colormap.c + xc/programs/Xserver/dix/cursor.c + xc/programs/Xserver/dix/devices.c + xc/programs/Xserver/dix/dispatch.c + xc/programs/Xserver/dix/dixfonts.c + xc/programs/Xserver/dix/dixutils.c + xc/programs/Xserver/dix/events.c + xc/programs/Xserver/dix/extension.c + xc/programs/Xserver/dix/gc.c + xc/programs/Xserver/dix/glyphcurs.c + xc/programs/Xserver/dix/grabs.c + xc/programs/Xserver/dix/main.c + xc/programs/Xserver/dix/pixmap.c + xc/programs/Xserver/dix/privates.c + xc/programs/Xserver/dix/property.c + xc/programs/Xserver/dix/resource.c + xc/programs/Xserver/dix/swaprep.c + xc/programs/Xserver/dix/swapreq.c + //bugs.freedesktop.org/show_bug.cgi?id=2560) attachment #2037 + (https://bugs.freedesktop.org/attachment.cgi?id=2037) ANSI-fy + Xserver/dix code. The conversion preserves the comments which annotate + variables. These have been moved into doxygen(esque?) "stubs" above + each function. Patch by Mike Owens . + +commit cb0aa2b4d8875f1ea66e720ca7c6cc2f403be26a +Author: Alexander Gottwald +Date: Mon Mar 7 22:26:59 2005 +0000 + + Prevent winRaiseWindow from calling ConfigureWindow if the message was sent + from within winDestroyWindowsWindow + DestroyWindow send a WM_WINDOWPOSCHANGED to another window causing a + restacking of all windows, even of the window which is just about to + destroyed and whose structures may not be intact anymore. + +commit 978f3b496b9951ee8120a0efcc5cd12503e26770 +Author: Roland Mainz +Date: Sat Mar 5 21:38:29 2005 +0000 + + xc/programs/Xserver/Imakefile + xc/programs/Xserver/hw/xnest/Imakefile + //bugs.freedesktop.org/show_bug.cgi?id=2653) attachment #2020 + (https://bugs.freedesktop.org/attachment.cgi?id=2020): Cleanup Xnest + usage of the DPMS dummy stub functions from dpmsstubs.c instead of + using it's own copy of these functions. + +commit 602209990dbbc96b4c5a96e2221a418cf29e613d +Author: Roland Mainz +Date: Sat Mar 5 20:47:12 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2543) attachment #2019 + (https://bugs.freedesktop.org/attachment.cgi?id=2019): Fix + |xf86SignalHandler()| which resets the signal handler before setting + the flag indicating a signal has been caught, theoretically allowing + the possibility of infinite recursion. Patch by Andrew Church + . + +commit d995fe631a5706de93a05fda498333442af3d207 +Author: Roland Mainz +Date: Wed Mar 2 14:21:40 2005 +0000 + + xc/programs/Xserver/hw/xnest/Screen.c + xc/programs/Xserver/hw/xnest/Window.c + //bugs.freedesktop.org/show_bug.cgi?id=2546) attachment #2005 + (https://bugs.freedesktop.org/attachment.cgi?id=2005): Fix Xnest to + update the shape regions in the backend server whenever a client + changes them in Xnest (the fix is to add a new wrapper which calls + |xnestShapeWindow()| before calling |miSetShape()|). Patch by Mark + McLoughlin + +commit 3f79c5eefc0d62d3a9b095472cd75b446ba2a56e +Author: Roland Mainz +Date: Wed Mar 2 11:20:30 2005 +0000 + + xc/config/cf/DragonFly.cf + xc/config/cf/Imake.cf + xc/config/cf/Imakefile + xc/config/imake/imake.c + xc/config/imake/imakemdep.h + xc/extras/drm/shared/drm.h + xc/include/Xos_r.h + xc/lib/xtrans/Xtranssock.c + xc/programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h + xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h + xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c + //bugs.freedesktop.org/show_bug.cgi?id=1712) attachment #2004 + (https://bugs.freedesktop.org/attachment.cgi?id=2004): Add support for + DragonFly/BSD platform. Patch by Jeroen Ruigrok + and Mike Verona . + +commit 6c6151b2339a05c60ec58e013f915f79a3f9d756 +Author: Alexander Gottwald +Date: Tue Mar 1 18:58:17 2005 +0000 + + If a context is already attached copy it instead of reattaching to keep + displaylists and share displaylists Enable tracing of often called + functions with GLWIN_ENABLE_TRACE ForceCurrent is a no-op now + +commit d323c4f59a653f364164d2a57fbbd102306a6ee9 +Author: David Reveman +Date: Tue Mar 1 16:57:54 2005 +0000 + + Minor improvement to pixel transfers in Xgl + +commit 2d2c1732620a83215983ee7a7dd469a1a85fcc12 +Author: David Reveman +Date: Tue Mar 1 16:34:31 2005 +0000 + + Add dither support to Xgl + +commit b4b27e9eaa43401ae70e5d03823012bf8c78848f +Author: Keith Packard +Date: Mon Feb 28 20:45:15 2005 +0000 + + Force DPMS normal on screen enable + Add placeholder for bit used to redirect input + Add macrovision register defines + +commit 409c0618bced6df02eed7af77107ff74508c0f3f +Author: Alexander Gottwald +Date: Thu Feb 24 22:53:17 2005 +0000 + + on WM_WINDOWPOSCHANGED raise window directly and in sync without utilizing + the async windowmanager thread. Fixes some restacking problems occuring + which were timing dependent Do not raise the window on WM_ACTIVATE + Removed unused code for WM_WINDOWPOSCHANGING ESC is debug key. Print + status but do not abort processing the message + +commit 775efdbd79448040b822fcc0556e98d3968ba8c3 +Author: Alexander Gottwald +Date: Wed Feb 23 19:17:10 2005 +0000 + + Bugzilla #2599 (https://bugs.freedesktop.org/show_bug.cgi?id=2599) + attachment #1964 (https://bugs.freedesktop.org/attachment.cgi?id=1964): + move miScreenInit in front of pScreen->function initializations to + prevent it from resetting ClipNotify. + +commit c4b3fcda98a92c204534f04bd386ace5d3620d86 +Author: Eric Anholt +Date: Mon Feb 21 03:44:10 2005 +0000 + + Move the draw tracing supplies into ati_draw.h, and do some touchups on it. + (When tracing drawing, I want to know what I'm drawing to, at a + minimum). + +commit de34b0eefc9f8a29147659454398cabb187c7cb6 +Author: Eric Anholt +Date: Mon Feb 21 03:05:55 2005 +0000 + + Extend the filter support to R200, and do the check for filter settings in + Check rather than Prepare, to avoid migration of things we won't be + able to accelerate. + +commit 535c178286f94cc593b6cda753bbeb9b7cf6df4c +Author: Michel Daenzer +Date: Fri Feb 18 19:55:35 2005 +0000 + + Bug #2576: Add support for ATI RN50/ES1000. (ATI Technologies Inc.) + +commit 2f07222106358a02f56bf1e344d1fbf7ead14cbd +Author: Adam Jackson +Date: Fri Feb 18 17:52:48 2005 +0000 + + Bug #2455: Make x86emu handle JNL correctly. (David Wong) + +commit 01b156240ce66703b38a67ee3cfbb475352cdf68 +Author: Alexander Gottwald +Date: Sat Feb 12 14:55:24 2005 +0000 + + winmultiwindowwindow.c + winmultiwindowwndproc.c + Cleanup some message debugging + +commit 8df7126f09d6d7cb35a5912a71531cad28ba2545 +Author: Alexander Gottwald +Date: Sat Feb 12 14:47:17 2005 +0000 + + win.h + winfont.c + winmultiwindowshape.c + winmultiwindowwindow.c + winpfbdd.c + winshaddd.c + winshadddnl.c + winshadgdi.c + Fix incorrect wrapping of functions. Ensure the pointers from pScreen point + to the called function even if wrapped functions changed it + Set the window properties to NULL to avoid referencing freed memory because + of timing problems after deleting a window + Do not wrap ChangeWindowAttributes. All functions are noops currently + +commit 676fdb03f3fb27ac24834aeb895df7d6d6e83f78 +Author: Alexander Gottwald +Date: Sat Feb 12 14:43:07 2005 +0000 + + print window handle in message outout + +commit 046bdb17169ecb1361a42ab52043da699590d39a +Author: David Reveman +Date: Fri Feb 11 20:19:20 2005 +0000 + + Fixes a few problems in Xgl + +commit 35bd81dfec62402f9d6c68d98e651e8cd87a8758 +Author: Søren Sandmann Pedersen +Date: Fri Feb 11 19:38:04 2005 +0000 + + Fri Feb 11 14:28:22 2005 Søren Sandmann + When COMPOSITE is enabled, call CopyWindow even when the pixels "don't + move" on screen. + Don't reject modes that are not supported by the unused monitor. + +commit e5ccccfbd45c78c1be5e311b2cb4135a9a27540b +Author: Adam Jackson +Date: Fri Feb 11 06:37:38 2005 +0000 + + Bug #826: Make xorgconfig respect font installation outside $PROJECTROOT. + (Donnie Berkholz) + +commit e7369daba58bb4fad5cef37fefbd851e59446045 +Author: Egbert Eich +Date: Wed Feb 9 11:12:54 2005 +0000 + + Added PCI2Host bus translations for linux PPC and fixed fixed bugs in + macros that apply these functions (Bill Randle Bugzilla #325 and #327). + +commit aab9a8dd99e52297ed9b40c936600429f38fe9ad +Author: Keith Packard +Date: Wed Feb 9 03:56:35 2005 +0000 + + Add initial evdev framework + +commit a85c33b52c40fbae544c7dd40df8c8968e0cf7e9 +Author: Keith Packard +Date: Tue Feb 8 22:45:21 2005 +0000 + + update Xgl to changes in damage API. Remove some flags to support software + mesa + +commit db2c83551cd3516800b88784c461fb33ee15aacf +Author: Keith Packard +Date: Tue Feb 8 22:43:54 2005 +0000 + + hw/kdrive/ati/radeon_composite.c Support linear filtering + Change how touch screens work -- make them just another 'mouse' device. Add + unfinished (and unused) code to accelerate tiled fills. + +commit 70d3a9192feefd54be93ea71231574c3ed815bf2 +Author: Alexander Gottwald +Date: Tue Feb 8 15:20:01 2005 +0000 + + Updated fix for ABNT2 and HK_Toggle keys. + +commit 384099457e9d938871019ba2e5afc20280328884 +Author: Alexander Gottwald +Date: Tue Feb 8 10:15:49 2005 +0000 + + Backout ABNT2 and HK_Toggle fix since it broke keys F1 and F4. + +commit ea5b09f95d6f25d8b0f8858c36b680055edd0da9 +Author: Egbert Eich +Date: Mon Feb 7 18:16:05 2005 +0000 + + Save gs register before calling the vm86_old syscall thru int 0x80. This is + required for linuxthreads as the TLS uses this register to keep track + of local thread storage (Bugzilla #2431, J. Scott Berg). + +commit 4d55065b35baa7e13f6e726cb9d6675562648000 +Author: Alexander Gottwald +Date: Mon Feb 7 15:08:31 2005 +0000 + + Moved keyboard layout table to external file. + +commit e132cb7590b5518ef1b7fce5f9151beed916fafc +Author: Alexander Gottwald +Date: Mon Feb 7 15:05:39 2005 +0000 + + file winlayouts.h was initially added on branch CYGWIN. + +commit c12ef1b34a55544f54401a5a66a36cd728e2f944 +Author: Egbert Eich +Date: Mon Feb 7 11:56:31 2005 +0000 + + Check the pixel clock choosen for a specific refresh rate against the + maximally allowed pixel clock when choosing mode lines for + VBESetVBEMode() and VESA BIOS version >= 3.0 (Bugzilla #2486). + +commit 859be7a52b778df8acb676683351a6562a6d4400 +Author: Felix Kuehling +Date: Fri Feb 4 01:14:49 2005 +0000 + + Applied patch (id=1354) by Mike A. Harris from bug #1901: The attached + patch updates a couple of PCI IDs for the Savage driver -- + Debian/Ubuntu/Red Hat/Fedora. + +commit 5feca068d740b165d3c36a690f5a68b7588b6625 +Author: Alexander Gottwald +Date: Thu Feb 3 09:58:47 2005 +0000 + + Bugzilla #1865 (https://bugs.freedesktop.org/show_bug.cgi?id=1865) + attachment #1827 (https://bugs.freedesktop.org/attachment.cgi?id=1827): + check for va_copy not being defined and use __va_copy if available + +commit 3dda2fe0e2e7e4d2c058d32fa8691d12386b978d +Author: Alexander Gottwald +Date: Wed Feb 2 18:06:14 2005 +0000 + + Force ShowWindow if XWin was started via run.exe. Fixes mainwindow not + showing bug + +commit e8d3da3c753677cc1ae86bc5a79f2b7eba181d74 +Author: Alexander Gottwald +Date: Wed Feb 2 17:17:56 2005 +0000 + + Bugzilla #1866 (https://bugs.freedesktop.org/show_bug.cgi?id=1866) + attachment #1819 (https://bugs.freedesktop.org/attachment.cgi?id=1819): + Define APIENTRY on windows to prevent from loading + removed leftovers from attachment #1818 + +commit 81b862509c87281705f8a8641c28ae2f45f15751 +Author: Alexander Gottwald +Date: Wed Feb 2 15:03:44 2005 +0000 + + Bugzilla #1866 (https://bugs.freedesktop.org/show_bug.cgi?id=1866) + attachment #1818 (https://bugs.freedesktop.org/attachment.cgi?id=1818): + Include Xwindows.h before GL/gl.h on windows to prevent loading + windows.h which pollutes our namespace with some symbols. + +commit b532bfb483cc8ea87c28302e3d676234cab7c3f0 +Author: Adam Jackson +Date: Wed Feb 2 04:07:04 2005 +0000 + + Bug #1294: Make sure RenderAccel hooks get wrapped in XAA init. + +commit 44e2d9167943182fea530dfd7ec16aa53db20f4c +Author: Roland Mainz +Date: Wed Feb 2 00:55:21 2005 +0000 + + xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Sbus.h + xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c + //bugs.freedesktop.org/show_bug.cgi?id=825) attachment #956 + (https://bugs.freedesktop.org/attachment.cgi?id=956): Fix build + problems on Linux/SPARC. Patch by Jeremy Huddleston + . Approved in the 2005-01-31 Xorg + release-wranglers phone call. + +commit 15c555a25df76e0e95bc8eaa2ca7ec80a7695a6c +Author: David Reveman +Date: Tue Feb 1 21:22:02 2005 +0000 + + Use negative stride for trapezoid masks in Xgl + +commit 2f0bdf77dd37d1763c4f4f409d55a6aad6031b9f +Author: Alexander Gottwald +Date: Tue Feb 1 18:14:01 2005 +0000 + + xc/programs/Xserver/xkb/ddxLoad.c + Bugzilla #2245 (https://bugs.freedesktop.org/show_bug.cgi?id=2245) + attachment #1649 (https://bugs.freedesktop.org/attachment.cgi?id=1649): + cleanup the generation of xkbcomp command lines. Allocate them + dynamicly and remove unmaintainable length calculation. + +commit d3ca132061a861cb9292b5a95dbcb2f67695883b +Author: Alexander Gottwald +Date: Mon Jan 31 10:49:30 2005 +0000 + + winmultiwindowwindow.c + Create windows with SWP_NOACTIVATE flag (updated) (Kensuke Matsuzaki) + Fixes for window ordering problem (updated) (Kensuke Matsuzaki) + +commit 374b9aa8ce14cd20a6768519eee63948c83488d6 +Author: Alexander Gottwald +Date: Mon Jan 31 10:47:32 2005 +0000 + + Added hungarian keyboard layout. + +commit 8d277ceb22929fcb44f2d4def8c5b70535eb087f +Author: Alexander Gottwald +Date: Mon Jan 31 10:43:37 2005 +0000 + + winmessages.h + winmsg.h + winmsg.c + winmultiwindowwndproc.c + winwin32rootlesswndproc.c + Make logging of messages configurable with environment variables + +commit 2982d173cad762b801869b7ceacc237afdad88d6 +Author: Alexander Gottwald +Date: Mon Jan 31 10:32:19 2005 +0000 + + resolve SHGetFolderPath dynamicly since it is not available on all Windows + systems. + +commit 8ac3be3f6c4bcaa8c3f6080cbfe72db4967feff8 +Author: Alan Coopersmith +Date: Sun Jan 30 21:18:46 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=1692> Remove reference to + nonexistent Monitors file from xorgconfig (Report & patch from Dejan + Lesjak ) + +commit 206072c475408b8d4cfd75d897854d8478fe0905 +Author: Matthieu Herrb +Date: Sun Jan 30 20:12:07 2005 +0000 + + programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c Fix option + dontVTSwitch under *BSD, when XKB is disabled. Bugzilla #2252. + +commit 327922f006dcc2e30ec0391d7fa786560fcd1599 +Author: Alan Coopersmith +Date: Sat Jan 29 01:01:03 2005 +0000 + + Update to latest rev from http://pciids.sf.net/ + Remove entries that now duplicate pci.ids Add entries for new Nvidia boards + added in recent nv driver update + +commit d23c46dd3e2cbf84012055bad43b1bb15809a244 +Author: Egbert Eich +Date: Fri Jan 28 16:13:00 2005 +0000 + + Modifying X.Org Xserver DDX to allow to run X with ordinary user + permissions when no access to HW registers is required. For API changes + which mostly involve the modifications to make the RRFunc (introduced + with 6.8) more flexible please check Bugzilla #2407. NOTE: This patch + applies changes to OS specific files for other OSes which I cannot + test. + +commit 1562ec5cc3706acfac1db04366f78e4949ef5502 +Author: Alexander Gottwald +Date: Thu Jan 27 20:33:34 2005 +0000 + + Functions like glGenTextures and glBindTexture are in OpenGL 1.1 and can be + resolved at linktime. Fixes tuxkart (at least with wine) + +commit 5ca5fe71119f35f1f24aeb49e2608684024d450a +Author: Eric Anholt +Date: Thu Jan 27 05:25:57 2005 +0000 + + Add an OUT_RING_REG macro for use with DMA_PACKET0, which is like OUT_RING + but includes debugging to ensure that the reg being submitted is the + one that follows in the packet. Convert most uses of OUT_RING to it, + and convert a couple of OUT_REG sets to DMA_PACKET0/OUT_RING_REG. Also, + add checking to see if more registers are submitted to a DMA_PACKET0 + than should be, to avoid hangs during stupid mistakes (checking for + less isn't done). + +commit 0bd459488bf88084d703d801bfd5e79ea6d2b5a5 +Author: Eric Anholt +Date: Thu Jan 27 03:52:49 2005 +0000 + + Move the bailing out due to ATIUploadToScreen() being unfinished up + farther, so that the traces aren't as confusing. + +commit a973af4a9ade68b271d0695898d72aea50d8953b +Author: Eric Anholt +Date: Thu Jan 27 03:50:48 2005 +0000 + + Remove an unused field. + +commit 59c7005bb155393c44792d457d98d72e34bb1b51 +Author: Egbert Eich +Date: Wed Jan 26 15:50:17 2005 +0000 + + When we tested if a PCI base address was unassigned we didn't take into + account that this bar could have been the upper part of a 64bit base + address. This fix makes this code 64bit bar aware (Bugzilla #2382). + +commit 7c3dd0a5a76bea2c64972ae19d99775b5a992513 +Author: Egbert Eich +Date: Wed Jan 26 15:45:49 2005 +0000 + + Rewrite of RemoveOverlaps() to make the code more readable. It was + virtually impossible to determine if the old code did what it was + supposed to do. Also changed paradigm: Trust the based address more + than the (guessed) size. (Bugzilla #2383) + +commit 9817582328cdafee59de616136172c2ce361a4b3 +Author: David Reveman +Date: Wed Jan 26 10:58:52 2005 +0000 + + Xgl improvements + +commit 13b5a93b70839053b9165b5087872164f0612536 +Author: Egbert Eich +Date: Tue Jan 25 10:08:18 2005 +0000 + + Fix interpretation of 64bit PCI bases: read hi long word from the right bar + (Michael Yaroslavtsev, Bugzilla #2322). + +commit 8813898ef6b9eb470e079bcdcffa89d1243b63b9 +Author: Keith Packard +Date: Tue Jan 25 06:04:21 2005 +0000 + + Fix R100 text by forcing the 3d engine to idle before executing more 3d + commands. Add docs for the ISYNC_CNTL register, which doesn't quite do + what we want. + +commit 33155b4fd3ce025d555f07833f96b760d5cdfbd3 +Author: Eric Anholt +Date: Tue Jan 25 03:37:05 2005 +0000 + + Finish converting RB2D_DSTCACHE to RB3D_DSTCACHE. Remove an extra pixel + cache flush in the idle function. Init an extra reg for r200, and + annotate the TCL_BYPASS better. Also, clean up some style nits from the + last commit. + +commit 3b1f1508b13520626839d45185dec09a42b9ff71 +Author: Keith Packard +Date: Tue Jan 25 02:39:48 2005 +0000 + + Add tracing. Hack Radeon cache registers to use 3D addresses. Works on M6 + +commit 6eaca06dac037851ae5c9575048faf932ad5ffc8 +Author: Eric Anholt +Date: Tue Jan 25 01:40:18 2005 +0000 + + Fix a leak of a region when the driver's CheckComposite fails. + +commit 8a1bee8ea9a028eef65b8884f73a79fbe84a9f3a +Author: Eric Anholt +Date: Tue Jan 25 01:38:26 2005 +0000 + + Silence a warning about uninitialized variable (though it would be). + +commit 67eeede4e16324990e1a6afc237a3f51b8edea39 +Author: Adam Jackson +Date: Mon Jan 24 20:44:49 2005 +0000 + + Bug #2004: Make DDC delay slightly longer. (Thomas J. Moore) + +commit 55736aa8c17f762b15e9bcd7b3f68f8680b7cb33 +Author: Egbert Eich +Date: Fri Jan 21 14:25:26 2005 +0000 + + Alan Cox requested that we check the kernel version before we use kernel + VGA font save/restore as the required features have been added to Linux + 2.6.11 (Bugzilla #2277). + +commit d7263b11f043c8c0f83d6e05095143c70177926b +Author: Keith Packard +Date: Thu Jan 20 20:51:27 2005 +0000 + + Reinitialize offscreen memory before enabling cursor on VT switch-to + +commit 13c6b2f0b6c464ce11f6c332b2fa1a529bdbab01 +Author: Eric Anholt +Date: Thu Jan 20 16:22:04 2005 +0000 + + Add a set of macros for dealing with the repeated code to wait for a while + reading a register/attempting DMA. Now it'll wait for a certain number + of seconds rather than a certain number of times through the loop + before deciding that it's timed out and resetting the hardware. Also, + add more timeout handling, and reset the draw state after resetting the + engine. + +commit dbe45c71590ac319250d04a2bf37ec07cd79e42a +Author: Eric Anholt +Date: Thu Jan 20 07:28:02 2005 +0000 + + Use RadeonSwitchTo3D() instead of doing the WAIT_UNTIL ourselves (RST3D() + also does DC_FLUSH, which may be important). + +commit fc43c154943fb1d277a9cffa9a4db7e76db461bc +Author: Eric Anholt +Date: Thu Jan 20 07:09:00 2005 +0000 + + Add R200 XV support, and make R100 (hopefully) use linear filtering instead + of nearest. Also, use RadeonSwitchTo3D instead of doing the WAIT_UNTIL + ourselves. + +commit 77755065345eb71c997c1ff74dcfd2b2bbbf1305 +Author: Eric Anholt +Date: Thu Jan 20 01:09:48 2005 +0000 + + Make R200 PDMA work -- primary queue sizes are now 9 bits, not 8. + +commit 9bd876768b2165ec3903ad0848ae2ae950330290 +Author: Alan Coopersmith +Date: Wed Jan 19 22:23:20 2005 +0000 + + Fix debugging ErrorF() so it compiles when DEBUG is true. + +commit ff433adba3a643512fdd44e41cd08965fab9c9cb +Author: Keith Packard +Date: Wed Jan 19 06:35:28 2005 +0000 + + Prefer 32bpp to 24bpp. Fix 16 color planar mode (!) + +commit cbcdae5a3f7c4009121f86de52bba6c657f20fff +Author: Adam Jackson +Date: Mon Jan 17 17:17:45 2005 +0000 + + more static server build fixes + +commit 79a7120983eff6fa114d4250fe01b62d4a99a612 +Author: Adam Jackson +Date: Sun Jan 16 01:59:23 2005 +0000 + + Bug #1895: Fix fbComposeGetSolid for BGR. (David S. Miller) + +commit 24cdd188dc3c10b56d6a7b46dafefb16c6d13efc +Author: Søren Sandmann Pedersen +Date: Fri Jan 14 22:07:59 2005 +0000 + + Fri Jan 14 17:03:40 2005 Søren Sandmann + Fix from Keith Packard for bitgravity bugs in the Composite extension, + reported by Amir Bukhari. + +commit 7db2e666e2dc9a1dba468e35e9d382e76ed8be54 +Author: Søren Sandmann Pedersen +Date: Fri Jan 14 21:56:51 2005 +0000 + + Fri Jan 14 11:12:46 2005 Søren Sandmann + Use mmx CopyArea in a few more places. + +commit 761f937fdee9ccd10ad54c1f06e12f2f102547a6 +Author: Egbert Eich +Date: Fri Jan 14 19:29:18 2005 +0000 + + - Don't suspend Xserver on APM standby request as this seems to cause + problems on may systems which don't support APM standby and might not + be required as according to the APM specs the chips should receive + enough power to retain its state. + - Print out power state change requests to log file in all verbosity + levels. + - Don't change server state if no driver PM function is registered. + (Bugzilla #2279) + +commit 16f9d2d72a2378470e9c5b31c59fa6c9a00892d6 +Author: Egbert Eich +Date: Fri Jan 14 18:42:26 2005 +0000 + + Let the OS instead of X save/restore text console fonts on Linux. So far we + relied on the generic VGA layer to restore text console fonts for us + when shutting down the server or VT switching back to the text console. + This has worked rather well but it has some downsides on Linux: a. Many + people use fbdev as console text mode. In this case it is not necessary + to save/restore console fonts as the console is running in graphics + mode anyway. b. Some architectures don't have a fbdev console but + require a full POST of even the primary card (ie. IA64). This posting + has to take place before we even have a chance to save anything. + Therefore the fonts we save are the once written to the chip by POST, + not what has been programmed by the user. c. Certain chipsets utilize + the BIOS to perform mode setting. This may interfer with the vga + save/restore font function in a strange way. It would therefore be + preferrable to let the OS - which has been used to set up the font in + the first place - take care of saving/restoring the data. I will attach + a patch which will do so for Linux. To make this fully functional a + small patch needs to be applied to the Linux kernel. To disable this + feature add: #define DoOSFontRestore NO to your host.def. (Bugzilla + #2277) + +commit 6c0b03a2362f33ae24a2f6845ed1418c9af4b8bc +Author: Adam Jackson +Date: Fri Jan 14 17:14:08 2005 +0000 + + Build fixes for static server. + +commit df4a1fa9c5cc5d54a9347a2bf4843cae87a942f1 +Author: Alexander Gottwald +Date: Fri Jan 14 12:17:10 2005 +0000 + + Added copyright notice. + +commit 2137bc6eb9f36f4ba999023d83c637024f3a6e4c +Author: Roland Mainz +Date: Fri Jan 14 08:37:30 2005 +0000 + + xc/programs/Xserver/afb/afbbres.c + xc/programs/Xserver/afb/afbbresd.c + xc/programs/Xserver/afb/afbclip.c + xc/programs/Xserver/afb/afbhrzvert.c + xc/programs/Xserver/afb/afbline.c + xc/programs/Xserver/afb/afbmodule.c + xc/programs/Xserver/afb/afbpixmap.c + xc/programs/Xserver/afb/afbpolypnt.c + xc/programs/Xserver/afb/afbpushpxl.c + xc/programs/Xserver/afb/afbtegblt.c + xc/programs/Xserver/cfb/Imakefile.inc + xc/programs/Xserver/cfb/cfballpriv.c + xc/programs/Xserver/cfb/cfbbitblt.c + xc/programs/Xserver/cfb/cfbcppl.c + xc/programs/Xserver/cfb/cfbgc.c + xc/programs/Xserver/cfb/cfbglblt8.c + xc/programs/Xserver/cfb/cfbmap.h + xc/programs/Xserver/cfb/cfbpixmap.c + xc/programs/Xserver/cfb/cfbscrinit.c + xc/programs/Xserver/cfb/cfbtab.h + xc/programs/Xserver/cfb/cfbteblt8.c + xc/programs/Xserver/cfb/cfbunmap.h + xc/programs/Xserver/mfb/maskbits.c + xc/programs/Xserver/mfb/maskbits.h + xc/programs/Xserver/mfb/mergerop.h + xc/programs/Xserver/mfb/mfb.h + xc/programs/Xserver/mfb/mfbclip.c + xc/programs/Xserver/mfb/mfbfont.c + xc/programs/Xserver/mfb/mfbgc.c + xc/programs/Xserver/mfb/mfbmisc.c + xc/programs/Xserver/mfb/mfbpushpxl.c + //bugs.freedesktop.org/show_bug.cgi?id=1114) attachment #667 + (https://bugs.freedesktop.org/attachment.cgi?id=667): Convert afb and + cfb{,16,24,32} to be dlloader-friendly. Patch by Adam Jackson + . + +commit 61b3c3aef5437f14d413a60da792257b01e9f8fa +Author: Søren Sandmann Pedersen +Date: Thu Jan 13 23:07:41 2005 +0000 + + Thu Jan 13 17:45:13 2005 Søren Sandmann + Make sure the pixmap is a valid new resource + Make sure the context is a legal new resource. + Handle null attrib_list. + Handle null attrib_list; copy attrib_list to data; actually allocate the + new GLXDrawable. + +commit 433c38f22fa96486a43dc0c9871cc09875251b34 +Author: Søren Sandmann Pedersen +Date: Thu Jan 13 20:49:21 2005 +0000 + + Thu Jan 13 15:40:29 2005 Søren Sandmann + Add MMX implementation of non-repeating source IN repeating mask, aka + "translucent window". + Add MMX implementation of CopyArea. + Use MMX implementation of CopyArea. + Use the new implementations. + +commit a303670107f205c6ca76919ca6cd6af6013073f1 +Author: Adam Jackson +Date: Thu Jan 13 01:22:53 2005 +0000 + + Bug #2114: PPC64 Linux build fix: use system definition of eieio(). + Originally Gentoo bug #66223. (Tim Yamin, Donnie Berkholz) + +commit 15895b411779aa3c14ffb92fb58cd8ec24845ea7 +Author: Alexander Gottwald +Date: Wed Jan 12 16:10:00 2005 +0000 + + winmsg.c + Introduce function winTrace which prints log message with verbosity 10 + Use winTrace for 3 heavily called functions + +commit 8aabc94596dae0fd4ce2c975de75946685faf2cd +Author: Alexander Gottwald +Date: Tue Jan 11 17:33:03 2005 +0000 + + Document the -silent-dup-error switch + +commit b6301dc41090899b20003eab1356bc09fc5eed1a +Author: Egbert Eich +Date: Tue Jan 11 14:59:02 2005 +0000 + + Minor format fix. + Added explanatory comment and debug code. + Added comment. + +commit 27fc6874b34d70a7ddae5ed8f516f6cfaab518b8 +Author: Alexander Gottwald +Date: Tue Jan 11 12:03:34 2005 +0000 + + Do not grab ALT-TAB when window is in multiwindow mode + +commit d365664c58919edb5e121a7c884384438df79776 +Author: Alexander Gottwald +Date: Tue Jan 11 11:58:12 2005 +0000 + + Fix crash with not matching definitions of PATH_MAX + +commit 65b893a707ad8b3e4d0971825c05a965dca36d10 +Author: Roland Mainz +Date: Mon Jan 10 23:38:50 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2167) attachment #1641 + (https://bugs.freedesktop.org/attachment.cgi?id=1641): Fix broken + Solaris print queue enumeration. + +commit c6b5a9431178ac7eb90ec498e6830366865d1268 +Author: Roland Mainz +Date: Mon Jan 10 18:47:55 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2254) attachment #1659 + (https://bugs.freedesktop.org/attachment.cgi?id=1659): Refix for gcc4.0 + build failure. It seems that the |ExecCommand()| function has no + consumer and can safely be removed. + +commit eb701e9b4481f984fdcfece181126f7424e2bf45 +Author: Alexander Gottwald +Date: Mon Jan 10 17:54:31 2005 +0000 + + winkeybd.h + Adjust keysyms for Hiragana_Katakana toggle and backslash/underscore on + Japanese and ABNT2 keyboards + +commit 2ef9d01c4d3b03f0a5d829304f2a7e2cc1327f3b +Author: Roland Mainz +Date: Mon Jan 10 14:16:29 2005 +0000 + + xc/programs/Xserver/Xprint/Util.c + xc/programs/Xserver/Xprint/attributes.h + //bugs.freedesktop.org/show_bug.cgi?id=2254) attachment #1654 + (https://bugs.freedesktop.org/attachment.cgi?id=1654): Fix gcc4.0 build + failure. Patch by Egbert Eich and Roland Mainz + + +commit 57387e115caf5a4b9501cc8f6ddeb1946b0e6547 +Author: Alexander Gottwald +Date: Mon Jan 10 13:13:08 2005 +0000 + + winkeybd.h + winkeyhook.c + Make keyhook feature work in multiwindowmode too Hook windows keys + +commit f417159e51afe22de7d4e6ba9f154313c6af59bc +Author: Egbert Eich +Date: Mon Jan 10 12:20:33 2005 +0000 + + Make option 'DontVTSwitch' work again with kbd driver under Linux. The kbd + driver now calls the OS layer to handle special keys. Possibly other + special keys and other OSes need to be looked at also. (Helmut + Fahrion). + +commit fe4e74241f6791cb1cefdddeb492ed0f56ce99b4 +Author: Alexander Gottwald +Date: Sun Jan 9 17:35:47 2005 +0000 + + xc/programs/Xserver/xkb/ddxList.c + //bugs.freedesktop.org/show_bug.cgi?id=2245) attachment #1647 + (https://bugs.freedesktop.org/attachment.cgi?id=1647): export + Win32System and Win32TempDir remove #ifdef WIN32 block for building + xkbcomp commandline create win32 tempfile in system tempdir use + PATH_MAX*4 for commandline buffer unlink tmpfile again + +commit ba25f7e8dcaa2690ce3eab839904fac034002e0b +Author: Alexander Gottwald +Date: Sun Jan 9 15:29:45 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2245) attachment #1645 + (https://bugs.freedesktop.org/attachment.cgi?id=1645): cleanup some + #ifdef __UNIXOS2__ and WIN32 blocks. make OutputDirectory check the + size of the buffer quote all file and pathnames in the xkbcomp + commandline use PATH_MAX*4 for commandline buffer + +commit 2410b61f430c3ac4be79043f8b00defe6d53148c +Author: Roland Mainz +Date: Sun Jan 9 00:38:08 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2240) attachment #1642 + (https://bugs.freedesktop.org/attachment.cgi?id=1642): Fix incorrect + usage of /usr/bin/tr in startup script (the used "[\n]" is neither + correct or portable, using "\n" seems to be sufficient (this fixes + various "random" issues, including including Debian bug #258419 and + Debian bug #264983). Patch by Drew Parsons . + +commit 709a2343a8c12ea7e158c63a9737b11744b50994 +Author: Alexander Gottwald +Date: Sat Jan 8 13:01:03 2005 +0000 + + Fix a possible null-pointer dereference (Keishi Suenaga) + +commit d332a909f8b8741af75047d78a62a3d19e0776e1 +Author: Alexander Gottwald +Date: Thu Jan 6 21:29:09 2005 +0000 + + Imakefile + InitOutput.c + XWin.rc + winerror.c + wintrayicon.c + winvideo.c + winshaddd.c + Set PROJECT_NAME in Imakefile to create alternative window titles for + Cygwin/X and Xming + +commit d6a74f2c4aec9c914ec0837bd0bf0d212019093f +Author: Alexander Gottwald +Date: Thu Jan 6 16:02:47 2005 +0000 + + Imakefile + InitOutput.c + XWin.rc + winerror.c + wintrayicon.c + winvideo.c + Set PROJECT_NAME in Imakefile to create alternative window titles for + Cygwin/X and Xming + +commit 3165236483de936b4ca22f8b6d2d2b8b1a1a4909 +Author: Alexander Gottwald +Date: Thu Jan 6 13:24:57 2005 +0000 + + Fix crash with non-nullterminated strings (reported by Øyvind Harboe) + +commit 591ac9c811de0871d3bdcc19cada0ff6715bf67c +Author: Alan Coopersmith +Date: Tue Jan 4 00:16:20 2005 +0000 + + Bugzilla #2211 (https://bugs.freedesktop.org/show_bug.cgi?id=2211) + attachment #1627 (https://bugs.freedesktop.org/attachment.cgi?id=1627): + xorgconfig default keyboard model outdated (should be pc105, not + pc101/pc102) + +commit af8bd7161724b6709ffe582dfd830c05d9bf4f26 +Author: Søren Sandmann Pedersen +Date: Mon Jan 3 21:32:22 2005 +0000 + + Mon Jan 3 12:45:10 2005 Søren Sandmann + Clean-ups and support for AMD64. Bug 1067. Patch by Nicholas Miell + (nmiell@comcast.net) + Add support for AMD64 + Many cleanups using instead of __builin_ia32_*, and intrinsics + instead of inline assembly. Also unconditionally use pshufw on AMD64. + s/USE_GCC34_MMX/USE_MMX/g + +commit 5f39eff85109a73d006832ad35d9d5b58f93ef0c +Author: Egbert Eich +Date: Mon Jan 3 15:43:55 2005 +0000 + + Added missing return value (Bugzilla #2205) Problem found by Stefan Kulow. + +commit ae6d52092bca6068a7847b3944148336ab489869 +Author: Egbert Eich +Date: Mon Jan 3 15:39:35 2005 +0000 + + Added missing return value (Bugzilla #2206) Problem found by Stefan Kulow. + +commit 83e13e21c8d9a3b54cae2ecc2943be3316659870 +Author: Alexander Gottwald +Date: Fri Dec 24 14:40:28 2004 +0000 + + Print error message if CreateProcess fails Simplify popen simulation code + for WIN32 Remove temporary file after executing xkbcomp + +commit 106703edf67139fa52f6810f9ced0ce5ba86a3cd +Author: Eric Anholt +Date: Wed Dec 22 18:39:41 2004 +0000 + + Back out the previous day's broken R200 "fix" -- the same number of coords + are always emitted. Fix the real problem, which was not enough regs + being initialized in ati_draw.c. Fix a typo that was resulting in alpha + coming out as 0 * src or 0 * broken instead of src * 1 or src * mask. + Assign the blending results to R0, as appears to be necessary. Unbreak + the dst-alpha-blend-with-no-dst-alpha code. Yow. And set the right DMA + count for the r200 traps code. + +commit 3035739e5b7d5a9042292d64455feb4b38788fe4 +Author: Alan Coopersmith +Date: Wed Dec 22 08:28:16 2004 +0000 + + Bug #2123 Attachment + #1587 Call to + uname should not check for return == 0, but for >= 0 instead + +commit fa0677ab43722462042f87c4636a7d59d1cb873f +Author: Eric Anholt +Date: Tue Dec 21 09:51:47 2004 +0000 + + Fix r200 render (for real this time?) by setting tex1_comp_cnt right for + non-mask rendering. Reenable it. Also, R200TexFormats was used instead + of R100 in one place. Harmless so far, because the formats were in the + same order. + +commit 4b0247b9e0a6b7f40cd2738fb29d2ed1acba99e7 +Author: Eric Anholt +Date: Tue Dec 21 09:49:30 2004 +0000 + + Whitespace nit. + +commit 894431412613265fd315cf7a707ffa741f93cf47 +Author: Matthieu Herrb +Date: Wed Dec 15 20:51:25 2004 +0000 + + Use snprintf. + +commit eea11301fd9247a28b1daeb340a018c7ea309c41 +Author: Thomas Winischhofer +Date: Wed Dec 15 15:05:35 2004 +0000 + + Another fix for MiscPassMessage(): Initialize returned "status". + +commit 264c3eefe6c0cdee1ff0a5de914f051ab23026b7 +Author: Alexander Gottwald +Date: Wed Dec 15 12:22:39 2004 +0000 + + latest changes from CYGWIN + +commit c7fec26b50f8a64360d1252cdf48370935fb2f76 +Author: Thomas Winischhofer +Date: Wed Dec 15 00:32:56 2004 +0000 + + Make MISC extention's PassMessage() actually work and fix memory leaks + +commit d0b17bda4dc469e2ce72f4f8965916b316e1deb7 +Author: Egbert Eich +Date: Tue Dec 14 08:59:20 2004 +0000 + + Removed #ifdef'ed out code together with the comment explaining why it was + #ifdef'ed out. + Fixed typo. + Added comment to a changed that's been committed with one of the previous + commits. + +commit 0e6a122316a94c96051f1d832990032a386097bc +Author: Roland Mainz +Date: Mon Dec 13 03:42:32 2004 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=1695) attachment #1230 + (https://bugs.freedesktop.org/attachment.cgi?id=1230): Fix crash in + Xscreensaver code which allowed any authentificated X client to crash + the Xserver using |XScreenSaverUnsetAttributes()|. Patch by + ajax@nwnk.net + +commit 159e443a2209eb3ea305e84b847b76ef1637d005 +Author: Roland Mainz +Date: Mon Dec 13 02:13:32 2004 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=1688) attachment #1530 + (https://bugs.freedesktop.org/attachment.cgi?id=1530): Fix the current + implementation to make it possible to slow down the mouse pointer or + use arbitrary fractions (without running into rounding error issues). + The change is using the same method of preserving rounding errors that + the exponential method is already using. Patch by Jan Brunner + . + +commit f1768677f73150c686cf5678f5f5d63c0cfa8e56 +Author: Kristian Høgsberg +Date: Sun Dec 12 23:29:20 2004 +0000 + + Reduce vidmode logging. + +commit 9286a5d032ea6bed102db39281c3d2537da4dccc +Author: Kristian Høgsberg +Date: Sun Dec 12 22:58:37 2004 +0000 + + Add fix for 460gx pci scan code. + +commit 8266a2581d21a1a2880a0e8babb8b0305c435ec0 +Author: Torrey Lyons +Date: Thu Dec 9 22:40:35 2004 +0000 + + Fix crash with more than one screen reported by John Davidorff Pell. + +commit 081b33d73f73572cfefba7e5489408a7117b6e9f +Author: Alexander Gottwald +Date: Wed Dec 8 15:48:15 2004 +0000 + + import changes from CYGWIN branch + +commit 6c317c1c1323bd11292f8f9f179d75c96a18e616 +Author: Roland Mainz +Date: Wed Dec 8 05:52:20 2004 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=1361) attachment #1287 + (https://bugs.freedesktop.org/attachment.cgi?id=1287): Avoid DRI + initalisation when the Xfree86-DRI extension was turned off. Patch by + Kristian Høgsberg . + +commit b9476cd96faf19153c11e3370e9fced8045600f4 +Author: Roland Mainz +Date: Wed Dec 8 05:48:16 2004 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=1361) attachment #938 + (https://bugs.freedesktop.org/attachment.cgi?id=938): Allow more + extensions to be enabled/disabled. + +commit 47935dd7f010f2f77768774ceb6f85667efe4264 +Author: Matthew Allum +Date: Mon Dec 6 22:29:31 2004 +0000 + + Xephyr on Xorg fix + +commit 8091b301c941473ab99626a6e66f72acdb6750f7 +Author: Matthieu Herrb +Date: Mon Dec 6 21:54:19 2004 +0000 + + xf86Config.c references USE_DEPRECATED_KEYBOARD_DRIVER so define it if + needed when building this file + - bug fix: pointerMsg -> keyboardMsg in auto-configuration code. + - make the 'kbd' driver the default for autoconfiguration everywhere. + +commit cde3a175005104e061c1ff133f07c598868bdc4e +Author: Alexander Gottwald +Date: Mon Dec 6 18:28:12 2004 +0000 + + include windows.h + +commit 9c94971617db11861aed82e16804fc14a9ca1260 +Author: Egbert Eich +Date: Mon Dec 6 15:53:00 2004 +0000 + + Use the same method of finding the screen pixmap of COMPOSITE extension is + compiled in or not. + Removed stale make variable. + Updated xaaWrapper.c: Under certain circumstances the accel path was not + used when possible. Removed some debugging stuff and stale code that + had been commented out. + Check if maps are really installed before attempting to list them. + +commit 4945034792b28d1a222a615404bfceaf48a130c5 +Author: Alexander Gottwald +Date: Mon Dec 6 12:26:50 2004 +0000 + + problem with max() macro. this one slipped though again + +commit 531776becf95f66e6e435aad0dc21ead436ff5aa +Author: Alexander Gottwald +Date: Sun Dec 5 21:33:23 2004 +0000 + + missed another wBOOL issue + +commit 9bd1328c49aafae67a6a6d9fd17063c75d8547a2 +Author: Alexander Gottwald +Date: Sun Dec 5 21:24:48 2004 +0000 + + redone ddraw.h to be able to mix it with w32api style COM header files. + obj_base.h is not needed anymore. Using instead. + Use Xwindows.h instead of windows.h + do not include win_ms.h + remove extra definition of sleep() + Set HOME to Documents and Settings/username if not set + Use Xming basedir instead of ProjectRoot for system.XWinrc + Fix callback functions to use wBOOL instead of BOOL + Fix compiler warnings. Added debug output. + Fix warning about undefined macro max + +commit bf0a760331e2fe4dbc00e78f87022c7464d9ca4f +Author: Roland Mainz +Date: Sun Dec 5 04:39:34 2004 +0000 + + //freedesktop.org/bugzilla/show_bug.cgi?id=1800): Fix Postscript DDX's 1bit + StaticGray visual to report only 1bit of significant bits in color + specification (instead of 8bits). Patch by Julien Lafon + + +commit 44f4713a056b7a6a076b2f65fbed43e0cfe9ff06 +Author: Markus Kuhn +Date: Sat Dec 4 00:43:13 2004 +0000 + + Encoding of numerous files changed to UTF-8 + +commit f264a7ea741f57fbc3bb900cfbb9e0cc23f46e90 +Author: Alexander Gottwald +Date: Fri Dec 3 12:04:15 2004 +0000 + + Removed scprintf, aprintf and snprintf stuff and use newXprintf + +commit 16a683f4d164899ecfdafb853f48cff10fd13fd4 +Author: Alexander Gottwald +Date: Fri Dec 3 11:57:42 2004 +0000 + + Bugzilla #1865, https://bugs.freedesktop.org/show_bug.cgi?id=1865 Added + X(NF)printf and X(NF)vprintf functions which allocate the buffer with + X(NF)alloc + Bugzilla #1865, https://bugs.freedesktop.org/show_bug.cgi?id=1865 extend + snprintf to work on NULL. + +commit fe2a2213d1db8700f6078379f86ebe8827793c20 +Author: Roland Mainz +Date: Thu Dec 2 23:47:39 2004 +0000 + + //freedesktop.org/bugzilla/show_bug.cgi?id=1998): Fix Xserver standalone + build when RENDER extension includes are not availabe. + +commit 30a4202f3d59a32fd6f93dfd257d93ee21b68ed9 +Author: Kristian Høgsberg +Date: Thu Dec 2 21:58:58 2004 +0000 + + Use __printf__ in gcc function attributes to avoid clash with libc wrapper + define, and remove the last bits of the old workaround. + +commit e62d85baa31fc853aefdef49962ad4cb86ae8245 +Author: Alexander Gottwald +Date: Thu Dec 2 21:49:54 2004 +0000 + + Remove some of the ifdef WIN32 checks from WaitForSomething + +commit 2782b8871196ef28f9a6c84bf6c8b5086d00d5d4 +Author: Alexander Gottwald +Date: Thu Dec 2 14:19:01 2004 +0000 + + Adjust the width of the rootless backbuffer to match 32 bit alignment + Make multiplemonitors default for -internalwm + +commit 3b3e24dc4d89b471d80428dd9ad122f259b1fc81 +Author: Alexander Gottwald +Date: Thu Dec 2 13:38:30 2004 +0000 + + Set HasFfs to NO + Fix link order problems with mingw. Add libdix.a after libmi.a. + Pass -DHAS_FFS to compiler + remove inline code for ffs(). It will link to dix/ffs.c instead added + declaration for ffs() + +commit 2620676306d1eccd24a6bf0637a60842656e6f7c +Author: Phil Blundell +Date: Wed Dec 1 19:43:29 2004 +0000 + + Patch from Florian Boor : + Check return value from ts_config. (TslibInit): Likewise. + +commit 96545d038837bbc7dc435ed7c1f631454e86cecb +Author: Alexander Gottwald +Date: Wed Dec 1 14:57:45 2004 +0000 + + Remove code which sneaked in recently. It is not proven to be correct, just + a workaround and disabled by default + +commit 3f063fc49cc2d456359a1b0b9f36f27befdb09b0 +Author: Alexander Gottwald +Date: Wed Dec 1 14:16:07 2004 +0000 + + Set XERRORDB environment variable to relocate the XErrorDB file + +commit 908442301478b21febab17e31aa55918eaaa5101 +Author: Roland Mainz +Date: Tue Nov 30 23:43:33 2004 +0000 + + //freedesktop.org/bugzilla/show_bug.cgi?id=811): Updating generated + Xprt.html which was forgotten during the previous work. + +commit af717ae57dd6c5e6ad41b4142d62cdbb55f13777 +Author: Egbert Eich +Date: Tue Nov 30 08:38:44 2004 +0000 + + Make Xorg the default server to install. + Avoid PIO access on IA64. Some IA64 machine check if legacy ports outside + the VGA range are accessed. The ATi driver however does this to probe + for ISA Mach8/32/64. Since no IA64 has ISA slots this restriction + should not be relevant to the user. + Avoid recursive calls of xf86scanpci(). This function normally detects that + it has been called before by checking if the PCI structure is filled + out. So far if this was not the case (because PCI probing has failed + for some reason) the function is traversed again. With the chipset + specific PCI bus probing this can lead to an endless recursive loop as + the post-probing code calls xf86scanpci() from within this function. + The OS specific PCI code for Linux worked only if bus 0 was populated as it + checked for the presence of /proc/bus/pci/00. Fixed to check for + /proc/bus/pci/ instead. + +commit 59ccc6465ca15e046ad11362ae5fbb3c71d2c148 +Author: Alexander Gottwald +Date: Mon Nov 29 12:34:55 2004 +0000 + + Fixed windows.h include for cygwin. + Bugzilla #1945: Stop unnecessary reordering. + +commit df2f2ff5a4ebf6c5289da64bf3f572341a0f7656 +Author: Phil Blundell +Date: Sun Nov 28 23:20:17 2004 +0000 + + Re-read "fix" structure from kernel after mode selection, in case line + pitch has changed. + +commit 6062f6a6e7b3c444a35e3f11b2541df2aa0066a2 +Author: Roland Mainz +Date: Thu Nov 25 22:42:51 2004 +0000 + + xc/programs/Xserver/Xprint/Imakefile + xc/programs/Xserver/Xprint/Xprt.html + xc/programs/Xserver/Xprint/Xprt.man + //freedesktop.org/bugzilla/show_bug.cgi?id=811): Add missing manual page + for "Xprt" (DocBook master file (Xprt.sgml) and the generated files + (Xprt.html, Xprt.man). + +commit cbce4cf96dfa2eeecb253d73d7d9acecbc52ad67 +Author: Alexander Gottwald +Date: Thu Nov 25 12:48:21 2004 +0000 + + Bugzilla #1914: fix size limit for -fp argument + +commit 2b75c19ea2bb76512d51e99c5c9ecb073fdb9163 +Author: Matthew Allum +Date: Wed Nov 24 17:50:50 2004 +0000 + + minor Xephyr fix + +commit a96254234fc9410944406f6ae878815cd3cfcee3 +Author: Matthew Allum +Date: Wed Nov 24 17:08:06 2004 +0000 + + XEphyr -parent switch fixes + +commit a7a07d0c71aa3f2e224cceea7e8d8348523136ee +Author: Alexander Gottwald +Date: Wed Nov 24 16:56:03 2004 +0000 + + Finally the multiwindow mode defines a default cursor + +commit ca4da62478a3ad86ab087245bf8eb7d7fadf31de +Author: Eric Anholt +Date: Wed Nov 24 09:07:58 2004 +0000 + + Add include to unbreak build on FreeBSD. + +commit da3df7522d15855fa871c45f3b8db23e7c639a44 +Author: Kristian Høgsberg +Date: Wed Nov 24 02:45:33 2004 +0000 + + Remove this file and all references to the binary expiry code. + Remove old obsolete include/extensions/damage.h. + Include srvrv_ctrl(xfree86) in macintosh US XKB symbol file so VT switching + works again on mac (#1872). + Remove out of place #define's of printf to xf86printf. This definition + should only be in xfree86/os-support/xf86_libc.h + +commit 9a26d6f39e199bad287d4e538ef75700a0102788 +Author: Thomas Hellstrom +Date: Tue Nov 23 17:29:47 2004 +0000 + + Bugzilla #1883 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1883): Fix + insufficient SHM detection in XvMC local test. Removed reference to + getpagesize() which caused linking problems on s390. Reported by Stefan + Dirsch + +commit fec868bf0f67a8f62fc69d55e2ff72b6cacea6f8 +Author: Roland Mainz +Date: Tue Nov 23 17:10:55 2004 +0000 + + //freedesktop.org/bugzilla/show_bug.cgi?id=1204): Fix X11 test suite + (caused by DAMAGE layer) failure with Xvfb when rendering text using + |XDrawText*()| (XDrawText() tests 1, 3, 4, 27, 28, + 29, 30, 34, 37, 39, 41, 43 and XDrawText16() tests 1, 3, 9, 10, 11, 12, + 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 34, + 37, 39, 41, 43). Patch by Hong Bo Peng and Stefan + Dirsch . + +commit b09f2a0495071a068c2b6b36084c974acf7aab9b +Author: Alexander Gottwald +Date: Mon Nov 22 16:04:04 2004 +0000 + + Windows does not have ffs() implementation. added one + Enable RootlessSafeAlpha and RootlessAcceleration for the Windows port too + +commit bb43f234c5d418e064c89b928b81b53987f14e92 +Author: Alexander Gottwald +Date: Mon Nov 22 15:00:04 2004 +0000 + + Use GetTempPath for finding a place where to store temporary files on + Windows + +commit bc7493801d1f5177d9ba3fe09accc2a2d72cfe3d +Author: Alexander Gottwald +Date: Mon Nov 22 14:28:25 2004 +0000 + + Fixes for building multiwindow and internalwm on mingw + Changed some debugging output + +commit 255c3c0e8ca0f402b2c327d70c8a254ba65eda03 +Author: Alexander Gottwald +Date: Mon Nov 22 14:12:33 2004 +0000 + + Xming: Place logfile in users tempdir + +commit 0f7874cbfc01da339cc6be221351ddffdb37805d +Author: Alexander Gottwald +Date: Mon Nov 22 13:23:25 2004 +0000 + + Use a simple hashtable as ConnectionTranslation instead of a plain array on + Windows because socket fds are not sequential and do not start at 0 + +commit e6bc551e3451efe4fcbb55475d6d0ff53fcc9807 +Author: Alexander Gottwald +Date: Mon Nov 15 18:13:41 2004 +0000 + + Use CreateProcess instead of system() to spawn xkbcomp on windows. system() + can not handle spaces in the path component. Quoted all filenames on + the commandline. + +commit 6618567311f41f5e237f12b4204aa32ce174a514 +Author: Alexander Gottwald +Date: Mon Nov 15 15:58:51 2004 +0000 + + Remove override of HasSnprintf + +commit 9826b83826190e514ed115e15691ca015780f9bc +Author: Alexander Gottwald +Date: Mon Nov 15 15:06:51 2004 +0000 + + Bufzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 Added + mingw (Win32) port + +commit cecb668149e1956fb29bc89855182349122e2f4e +Author: David Reveman +Date: Sun Nov 14 23:21:29 2004 +0000 + + Add xglPixmapToRegion + +commit 343f965749af0a985573c525dc6084c2519b6ffe +Author: Alan Coopersmith +Date: Sun Nov 14 17:29:56 2004 +0000 + + Fix typos in output file. (Bugzilla #1849, reported by Yi Ren-Chen) + +commit 636a9e786881dd42cd6fd579e13b7895cf9f10eb +Author: Phil Blundell +Date: Sat Nov 13 18:03:16 2004 +0000 + + Don't leave stale pointers hanging around after ts_close(). (TslibFini): + Likewise. + +commit 36d9e01c0d36eaf0d9cb1e77dd2908b09d55a35d +Author: Phil Blundell +Date: Sat Nov 13 16:41:00 2004 +0000 + + New global variable. (KdProcessArgument): Set it to TRUE on -nozap switch. + (KdUseMsg): Add help for -nozap and -rgba switches. + Declare. + Honour dontZap flag. + +commit 3b0dce3620e4cce74c3a2c7f9077cc28be11740d +Author: Thomas Hellstrom +Date: Sat Nov 13 11:09:23 2004 +0000 + + lib/XvMC/Imake + Added support for automatic loading of the correct hardware XvMC driver. + This involves a protocol extension of the XvMC protocol. The XvMC + revision number was bumped. + +commit a97548b1c9bb69b5824609c1da1ad66c3a9c5065 +Author: Kristian Høgsberg +Date: Thu Nov 11 20:10:28 2004 +0000 + + Cosmetic fix to make xf86pciBus.c use standard min() macro. + +commit e5040e24f03a2fe770139e6f37acef3da48aa0f9 +Author: Matthieu Herrb +Date: Thu Nov 11 16:09:58 2004 +0000 + + oops commited wrong version previously + +commit e380fd548ed5452d08184723145dd992ad72288c +Author: Matthieu Herrb +Date: Thu Nov 11 15:44:31 2004 +0000 + + update shared lib revisions on OpenBSD (Bug #1828). + update references to xf86site.def in comments (Bug #1827). + fix kbd driver for wskbd protocol and pure wscons console driver (Bug + #1825). + don't add '-4' to generated default file name (bug #1826). + typo in resource name (XFree86 bug #1300, X.org bug #1825) + +commit d7f46f71d892768ea85552a0d5458b69b561fe21 +Author: Matthew Allum +Date: Thu Nov 11 14:55:30 2004 +0000 + + Xephyr grab fix + +commit 2854fa438ff721637f2e53fbafa141b3db8a9082 +Author: Adam Jackson +Date: Tue Nov 9 17:06:15 2004 +0000 + + Bug #557: Don't use "bool" as a variable name in xf86cfg, to avoid compiler + bugs. (Donnie Berkholz) + +commit 367b963b6333ee58e197845f1389a95ff26f108e +Author: Adam Jackson +Date: Tue Nov 9 15:58:41 2004 +0000 + + Bug #1765: Add support for R_ALPHA_SREL32 relocations in elfloader. + Originally Debian patch + 202_alpha_elfloader_support_R_ALPHA_SREL32.diff. (Falk Hueffner) + +commit 50cdff7ee2a1b448da24e85efae02237cff9b6b7 +Author: Matthew Allum +Date: Tue Nov 9 11:36:49 2004 +0000 + + Xephyr improvements + +commit 81a3b6fe27567b4f91033ece69996aa6bf8d01a3 +Author: Matthew Allum +Date: Mon Nov 8 22:39:47 2004 +0000 + + Add support to Xephyr for lower depths than hosts + +commit e494e24c508b34b144355cb380aac16abf2fb891 +Author: Alexander Gottwald +Date: Sat Nov 6 11:56:57 2004 +0000 + + Wrap all mwextwm and internalwm code with XWIN_MULTIWINDOWEXTWM + +commit 16ee24cd994fa3f8d479c972f18c8207a5116cb7 +Author: Torrey Lyons +Date: Fri Nov 5 19:51:38 2004 +0000 + + Use ROOTLESS instead of platform specific defines. + +commit 64c7f8e667eef955b266c359291206c7188ce20c +Author: David Reveman +Date: Fri Nov 5 13:26:07 2004 +0000 + + Use UTF-8 encoding in Xgl sources + +commit 1d994e1d14225c1dec5251edeae40e24923a31c6 +Author: David Reveman +Date: Fri Nov 5 12:46:29 2004 +0000 + + Use negative strides in Xgl if pixel data have bottom-top scanline order + +commit 2dd76d646c517e1988897692e9ff8b6194d25c87 +Author: David Reveman +Date: Thu Nov 4 23:19:13 2004 +0000 + + Add working Xgl server code + +commit 1aef1060647d22b676a29f6dcf1ac54f9fe7ff5d +Author: Kensuke Matsuzaki +Date: Thu Nov 4 11:52:22 2004 +0000 + + Add InternalWM mode. + +commit 522c878fca3bfe97cd408e37065f827c004faa04 +Author: Egbert Eich +Date: Tue Nov 2 08:54:53 2004 +0000 + + Removing unneeded private FreeType2 symbol. + Updating to EDID 1.3. (Bugzilla# 1490, Jay Cotton, Egbert Eich). + Removing unneeded code. + Fixed KGA handling for i810. KGA handling for chips derived from C&T chips + is slightly different. The changes make the code consistent with the + C&T (chips) and i740 drivers. + +commit 1074992c285835ca9d96d11e8352bbe2cdbc2a28 +Author: Egbert Eich +Date: Mon Nov 1 16:05:27 2004 +0000 + + Fixed sig11 which occured when calling a CloseDisplay() after + XScreenSaverSetAttributes() followed by XScreenSaverUnsetAttributes(). + Caused by missing FreeResource() in XScreenSaverUnsetAttributes(). + Removing unused DDC sections that caused misinterpretation of DDC data due + to a missing break statement in a switch. + Fixed typo: #if <-> #ifdef. + +commit 7e588ba9abdcc2078b6c361c81806337b8ff0827 +Author: Alan Coopersmith +Date: Sat Oct 30 20:33:43 2004 +0000 + + Add -d flag for compilers like the Sun C compilers that produce dependency + lists themselves. To use with the Sun compilers, add to host.def: # + define UseCCMakeDepend YES # define DependFlags -cc $(CC) -d -xM (Sun + bug id #4245688 - fix by Alan Coopersmith) + Add Solaris to the platforms on which mprotect is run to set execute + permissions when necessary. (Sun bug id #6175128 - fix by Alan + Coopersmith) + Internationalize digital output (Sun bug id #4119396 - fix by Steve + Swales), add -bgpixmap option to set XPM file as background (originally + from STSF project version of xclock by Alan Coopersmith) + xc/programs/xmodmap/handle.c,pf.c xmodmap was printing line numbers which + are one too low in error messages (Xorg bugzilla #1739, Sun bug id + 4637857 - fix by Sam Lau) + +commit 612bd1c27322a69a98b59193e7d31501688359bd +Author: Thomas Winischhofer +Date: Fri Oct 29 02:07:15 2004 +0000 + + Add facility for catching signal 4 from driver. This can be used to check + for OS SSE support. (Part 2) + +commit 09fdfaa28d2afe33dfadd4293b39a34da268fbdb +Author: Thomas Winischhofer +Date: Fri Oct 29 02:06:17 2004 +0000 + + Add facility to catch sig 4 from driver. This can be used to check for OS + SSE support. (Part 1) + +commit b0185a4bf77a668e65e94197bdb13331680521c7 +Author: Thomas Winischhofer +Date: Thu Oct 28 22:12:23 2004 +0000 + + Add xf86[GetGammaRamp|ChangeGammaRamp|GetGammaRampSize] to symlist in order + to allow drivers to use them + +commit 9d4823adc8319a20d2ace3d0944ca32e300f6eeb +Author: Alexander Gottwald +Date: Thu Oct 28 14:23:08 2004 +0000 + + Import recent changes from CYGWIN branch + +commit db65fce04ddec1dac0d92ad3abc95ab4996bd206 +Author: Torrey Lyons +Date: Mon Oct 25 19:09:11 2004 +0000 + + Fix rootless Cygwin crash due to acceleration code illegally modifying a + const structure (Reported by Kensuke Matsuzaki). + +commit a57e85b52357f15f52e81c8d9b310a76e0c62b3f +Author: Roland Mainz +Date: Mon Oct 25 07:12:21 2004 +0000 + + Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1664 - RFE: Add + support for the DOUBLE-BUFFER extension to the Xprint server and DDX. + Additionally a "pixmap-scrubber" optimisation is added to the + PostScript DDX to remove all content from a vector pixmap when a + |PolyFillRect()| call covers the whole pixmap surface with a solid fill + (this avoids that a backbuffer vector pixmap gets constantly filled + even when the content is not visible anymore after |XdbeSwapBuffers()| + has cleared the hidden buffer with the background color). + +commit e0cc4871491ab7a8c52749ff2c077d8f11516b15 +Author: Phil Blundell +Date: Wed Oct 20 18:06:58 2004 +0000 + + Add epson. + Build Makefile in hw/kdrive/epson. + +commit 258c9016a0c966187a81f9d956766791d6e8c505 +Author: Phil Blundell +Date: Wed Oct 20 18:02:32 2004 +0000 + + Block SIGIO before disabling input fds. (KdEnableInput): Unblock it after + enabling them again. + +commit cbd5fbcb7e5b802cbcff317fdc2f848043207690 +Author: Phil Blundell +Date: Wed Oct 20 08:20:51 2004 +0000 + + Import Epson 13806 driver from Costas Stylianou: + New files. + +commit 0584d92b36910d42e4fba96cee5f3380eeb3b493 +Author: Egbert Eich +Date: Mon Oct 18 14:21:46 2004 +0000 + + Made handling of DevelDrivers for x86-64 more conformant to other + platforms. + Compress all font encodings (Stefan Dirsch). + Fixed warnings. + Turn on forwarding XNSpotLocation event to XIM server in OffTheSpot and + Root mode (bugzilla #1580, James Su). + Added another compose key combination for the Euro symbol (Stefan Dirsch). + Added support for UTF-8 in ja_JP, ko_KR and zh_TW locales (Mike Fabian). + Changed default encoding for ru from KOI8-R to ISO8859-5 (Mike Fabian). + This is the encoding that is also used by glibc. We may break other + libcs - lets see who complains. + Added explanation for DESTDIR to install to a different directory than /. + Added some early bailouts to atiprobe if PCI structure pointer is NULL to + prevent sig11. + XV support doesn't depend on 2D acceleration any more. This patch removes + this limitation from the NSC driver. This is a patch that I have + committed to XFree86 a while ago but never ported over to X.Org. + Matthieu Herrb contributed some build fixes. + Fixing SetDPMSTimers() so that DPMS*Time == 0 disables the appropriate + timer. This takes advantage of the fact that TimerSet() with a timeout + argument 0 behaves like TimerCanel(). + Use /dev/xconsole (named pipe) or devpts for system logger (Werner Fink). + Create missing links for backward compatibility to XFree86 (Stefan Dirsch). + Changed comment to mention xorg. + 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). + Added 'pic' to the man page rendering command pipeline (Werner Fink). + Added missing return value (Stefan Dirsch, Roland Mainz) + +commit 77dab254402073bf96234a6b1056b2277578a976 +Author: Alex Deucher +Date: Sun Oct 17 20:29:35 2004 +0000 + + - Add interlaced support to S3 driver (bug 332, Leo Savernik) + - EmulateWheelTimeout (bug 323, Mathias Fröhlich) + - single button double-click (bug 322, Rob Brown) + +commit 9a0cf1eb43878308c0a83e4f935933b647edc6d5 +Author: Matthieu Herrb +Date: Sun Oct 17 10:46:14 2004 +0000 + + Remove some remaining AMOEBA specific code. + +commit 5505555c15bfa2de1f596ae0997335fdbf07eb5a +Author: Roland Mainz +Date: Fri Oct 15 22:29:40 2004 +0000 + + Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1647 - Fix the + problem that |XpSubmitJob()| returns a random value (patch by Stefan + Dirsch/SuSE). + +commit 60caca718d23012c4c85ce70547610fe05168342 +Author: Roland Mainz +Date: Fri Oct 15 22:08:38 2004 +0000 + + Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1646 - Fix the + problem that |PsCreateColormap()| returns a random value (patch by + Stefan Dirsch/SuSE). + +commit 4782b2f7c10708f9662d9fc743c692d0bec85743 +Author: Roland Mainz +Date: Fri Oct 15 21:43:31 2004 +0000 + + Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1637 - Fix + problems in oid code which may cause the usage of an invalid string + pointer (original patch by Egbert Eich). + +commit 881b5756dc96dc33f6966ec6fccd324f63559dc2 +Author: Adam Jackson +Date: Thu Oct 14 23:10:30 2004 +0000 + + Bug #1628: Convert xf86{BusToMem,MemToBus} to PIC code, eliminating a text + relocation and enabling the server to be built as a + position-independent executable. (PaX Team) + +commit a0251ee285e1f1e28d06927d8ab7d35d59fda607 +Author: Roland Mainz +Date: Thu Oct 14 02:20:52 2004 +0000 + + Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1629 - Fix crash + on AMD64, regression caused by bug 1496 ("Xorg Xprt does not support + "*xp-listfonts-mode: xp-list-internal-printer-fonts" to toggle the + usage of printer-builtin fonts"). + +commit 3a055ea35b687e381da4d729dbdd0ebac47f673b +Author: Vladimir Dergachev +Date: Wed Oct 13 23:02:42 2004 +0000 + + Modified: + xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c + xc/programs/Xserver/hw/xfree86/drivers/i2c/fi1236.h Squash annoying warning + about fi1236_dump_status + +commit 3364e7fbd44537b98212820fb2b1941abf0d5ef3 +Author: Egbert Eich +Date: Tue Oct 12 19:13:43 2004 +0000 + + Set fbdev mode as the default mode on PPC (Olaf Hering). + Added support for IBM space saver keyboard (Stefan Dirsch). Added support + for Cherry CyMotion Master XPress (Marcus Schaefer). + Change order of SetDisplayDevice(), HWRestore(), UnbindGART() and + RestoreBIOSMemSize() to be exactly opposite to the Save procedure in + EnterVT() (Matthias Hopf, Alan Hourihane). + Fix text mode restauration by removing the assumption that the register + which determines which head is programmed is set. to the active head by + the BIOS (Mark Vojkovich). + When I wrote the resource code 5 years ago I made some assumptions which + turned out to be false: I've assumed that the bus number of the PCI + hostbridge would be the PCI bus the bridge links to. This is not + correct. Fixing this assumption is not easy. However I hope that the + attached patch will make the system work regardless as it 'ignores' + host bridges from which the target bus is not known. This should not + matter at all as we really don't care about host bridges (unless we + have bridge specific code which retrieves information about the + bridge). + Fixed server crash on reset when a structure allocated in PreInit() was + freed on CloseScreen(). + Fixed ring buffer lock ups that happened because the structure that + contained ringbuffer data was not zeroed after allocation. + Fixed numerous warnings due to signed unsigned comparisons. + programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c: + (NVBacklightEnable): Changed the order in which the sequencer registers + and the backlight control registers are written. The sequencer control + register need to be written first otherwise DPMS screen blanking + produces vertical bars on a mobile device. lib/Xau/Imakefile: Build + libXau static library PIC so it can be linked into toolkits that would + like to wrap its functionality. + +commit 4ab7d316eceb23c81c1b208f9291750cf6b37513 +Author: Egbert Eich +Date: Mon Oct 11 09:58:04 2004 +0000 + + Improving DPMS handling on VT swich and server termination/abort: previous + version called the driver directly and too late. + Unblank secondary screen explicitely. Don't rely on the value read during + register save as the BIOS have blanked the secondary head. + Checking if server isn't switched away before calling sync. Sanity check + for possible bugs in aother areas of the code. + Fixing default amount of of allocated video memory from AGP for i810: Use + 16MB if less than 192MB are installed else use 24MB (Matthias Hopf). + +commit ca1fda2a3f674a6d59de236612c7077387738ec3 +Author: Matthieu Herrb +Date: Sun Oct 10 17:48:43 2004 +0000 + + programs/Xserver/Xext/saver.c Fix for XFree86 bugzilla #1224. + +commit fa9847aeb9094aafc3798aee1fc8379e77a18d6a +Author: Torrey Lyons +Date: Fri Oct 8 00:35:08 2004 +0000 + + Allow rootless implementations to override frame reordering. This is used + on Mac OS X when genie-restoring from the Dock to ensure that the + animation completes before drawing the frame. + +commit d737bc3300cf1847bcea08ca781f37ee3ee62692 +Author: Alan Coopersmith +Date: Tue Oct 5 17:28:15 2004 +0000 + + Make xorgconfig ask again instead of giving up and throwing away all your + answers when you give a bad file name or bad amount of video RAM. (Sun + bug id 5070654 - Derek Wang) + +commit 75217be88ccb87a54c84e31697ffb98b5f9b8e0a +Author: Roland Mainz +Date: Mon Oct 4 05:34:32 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=661 - Xprt + producing spurious characters in PS output when using the bitmap cache + (Originally reported against Solaris Xprt as Sun bug id #4369307, and + fixed in Solaris by Jay Hobson. + +commit 658b4ed81f777df2d8b9f47904de90bde1897113 +Author: Roland Mainz +Date: Mon Oct 4 05:04:14 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1299 - Add more + visuals to the Postscript DDX (8bit GrayScale/StaticGray, 1bit + StaticGray and the basic infratructure for "deep" visuals with more + than 8bits per RGB gun). + +commit e622b346113f65788110777d7d1b5fc436600a4d +Author: Roland Mainz +Date: Sun Oct 3 23:29:21 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1496 : Fixed Xprt + font handling which did not support "*xp-listfonts-modes: + xp-list-internal-printer-fonts" or "*xp-listfonts-modes: + xp-list-glyph-fonts" to toggle the usage of printer-builtin and glyph + fonts in XListFonts*(), XLoad*Font(), etc. Additionally the Xprint DDX + now explicitly list "xp-listfonts-modes" in + "document-attributes-supported" (for document-level) or + "xp-page-attributes-supported" (for page-level) when the DDX implements + this feature (as described in the CDE DtPrint specification). + +commit 8b2f127ea0db2c7fee223b69f4fceee0427fb2e4 +Author: Roland Mainz +Date: Sun Oct 3 15:34:33 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1416 - Fix Xprt + PostScript DDX crashes when copying offscreen pixmap content to the + same pixmap. + +commit 7b27bf869dcf02bccf730706fc451c6f4c72b1f0 +Author: Vladimir Dergachev +Date: Sun Oct 3 15:01:31 2004 +0000 + + Modified: + xc/programs/Xserver/hw/xfree86/drivers/i2c/fi1236.c Make sure formatting + style is consistent within a single function. MT2032 functions are best + be in separate file anyway. + +commit 4046653cb63f4cd752212e7cf65fad5408d8f5b8 +Author: Vladimir Dergachev +Date: Sun Oct 3 14:38:31 2004 +0000 + + Modified: + xc/programs/Xserver/hw/xfree86/drivers/i2c/fi1236.c Fix compilation with + gcc 3.4.x Cleanup xf86DrvMsg noise. + +commit ebe7b3fe160259b6f19fe760d6ff4f5bb1dd4b72 +Author: Vladimir Dergachev +Date: Sat Oct 2 01:35:33 2004 +0000 + + xc/programs/Xserver/hw/xfree86/drivers/i2c/*_module.c Change version + strings to XORG. + +commit 0d474149f1cb68a60927529f6eac611a12acf5e6 +Author: Vladimir Dergachev +Date: Thu Sep 30 22:58:07 2004 +0000 + + Initial code from GATOS. This needs to be cleaned up, for example the bt829 + code is practically untouched since xatitv (which was a standalone test + program). However, it all worked and was debugged over long period of + time, so I prefer to to mess with these for now. + New drivers: fi12xx (including MT2032 - this would be be split off later). + tdaXXX msp34xx bt8xx + +commit 1dfafe2aeec864a9bdfd6da3324243b2be8e3a62 +Author: Roland Mainz +Date: Wed Sep 29 04:17:44 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1489 - Use |long| + instead of |int| for BIGREQUESTS commandline option. + +commit de89181444a2f2258a446fe20a25e37fd225a568 +Author: Roland Mainz +Date: Fri Sep 24 02:11:14 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1453 - Fix spaces + in usage output for BIGREQUESTS extension (option "-maxbigreqsize"). + +commit 884cb060eea2b914191c269a0c9955ed83d07ff9 +Author: Torrey Lyons +Date: Wed Sep 22 23:52:39 2004 +0000 + + Update XDarwin project to Xcode 1.5 format and remove unused + QUARTZ_SAFETY_DELAY code. + +commit 35a3bf13a8be96bb29dce32399c3684c6baa527d +Author: Torrey Lyons +Date: Wed Sep 22 23:38:33 2004 +0000 + + Add option for XDarwin to track system keyboard layout changes as they + occur (John Harper and Torrey T. Lyons). + +commit 1b3fa4d53b287cbe9d38c5f8c9fbbc2298690959 +Author: Torrey Lyons +Date: Wed Sep 22 22:52:03 2004 +0000 + + Warning fixes. + +commit de68a3339b9f19630e29a17773cad060b1f65300 +Author: Alan Coopersmith +Date: Wed Sep 22 17:20:56 2004 +0000 + + Allow overriding DPMS defaults (timeouts & default for on/off) from + #defines/-D options. + programs/Xserver/hw/xfree86/common/xf86DPMS.c Use defaultDPMSEnabled global + for the default state of DPMS if not set in any config files. + programs/Xserver/hw/xfree86/os-support/sunos/solaris-sparcv8plus.S Add + support for required assembly inline functions for Sun compilers on + Solaris/sparc. + Add support for Solaris/sparc libraries. + +commit d7514b9162648f894211884b199ef2edc458aa86 +Author: Adam Jackson +Date: Wed Sep 22 04:38:03 2004 +0000 + + Bug #1252, #1253, #1255, #1256: Various typo fixes from Dave Jones. + +commit 269012e6014d7c23bf6805ba14ca0b598cdd6313 +Author: Torrey Lyons +Date: Tue Sep 21 22:01:14 2004 +0000 + + Add offscreen GLX direct rendering with XDarwin's xpr backend (John + Harper). + +commit 0514f8b65616d8878000764485e71384b71e3860 +Author: Egbert Eich +Date: Tue Sep 21 17:57:36 2004 +0000 + + Merged over libXpm security fix provided by Chris Evans, Matthieu Herrb and + Alan Coopersmith from release 6.8.1. + Fail during initialization with error if font/fontset is not set for + widget. This prevents a sig11 later when the non-existent font/fontset + structs are referenced. + Check if xf86Info.kbdProc pointer is really set before calling it on abort + as this pointer won't be set if the new modular keyboard driver is used + (Matthias Hopf). + Added new libs to the bindist control files. + Removed inclusion of unnecessary kernel header on Linux. This may fail in + an -ansi environment. + +commit 814b74662103710665c0b5659a93974ad609276c +Author: Alexander Gottwald +Date: Mon Sep 20 08:44:54 2004 +0000 + + Bugzilla #1402: The last patch was broken on linux. Take definition of + badSysCall out of the OS specific block. + +commit b600fcda38f4ab4796b5536cbedc5dee1abd25b1 +Author: Eric Anholt +Date: Mon Sep 20 03:12:00 2004 +0000 + + Fix the R200 Render code. Composite and Trapezoids are now supported just + as well as on R100. + +commit 908287addaff10a0f5f6f14bf06a9b85870737ec +Author: Alexander Gottwald +Date: Sun Sep 19 12:59:52 2004 +0000 + + Bugzilla #1402: fix BigFont extension if SHM is compiled in but not + working. Does not access SHM and privates if the SHM syscall failed + during extension initialization. + +commit 90ff3688cdc0c2c1b5ccdbd9cc0659b9a355e85f +Author: Eric Anholt +Date: Sun Sep 19 10:57:31 2004 +0000 + + Unbreak the AGP DRI case. That was quite a pile of broken code. + +commit 9297c6149f83de22395503c484a2ca65dbffaf6b +Author: Roland Mainz +Date: Sat Sep 18 23:18:35 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1404 - Fixing + random crashes (like in DAMAGE code etc.) in Xnest due uninitalised + GetWindowPixmap. Original patch by Alexander Gottwald + + +commit 6344bb51e2a97d9678cec2ec1dab19abfe9d9e8d +Author: Torrey Lyons +Date: Sat Sep 18 00:38:30 2004 +0000 + + Bugzilla #1032: Make rootless acceleration functions compatible with + Damage. + +commit cedb9a8d62df3391fd89a8b05a2dd64bd098a7df +Author: Torrey Lyons +Date: Fri Sep 17 21:57:26 2004 +0000 + + Update Apple's list and hash utility routines to latest versions (John + Harper). + +commit b56f4532d1a5febb8df45da0e3d3ad7bf8838e5f +Author: Alexander Gottwald +Date: Thu Sep 16 13:22:52 2004 +0000 + + Remove code which prevented the use from specifying the window size in + nodecoration mode. + +commit c4083511acd1d0f20a242b8cd3ed62629629ce8f +Author: Alexander Gottwald +Date: Wed Sep 15 17:58:50 2004 +0000 + + add support for mice with more than 3 buttons and one scroll wheel (Chris + B) + +commit 516f452e78170bc643117a71bd2246a83b071316 +Author: Egbert Eich +Date: Wed Sep 15 09:23:59 2004 +0000 + + Adding support for OS dependent probing of IA64 chipsets. Not all IA64 + chipsets can be probed without OS support as probing them is only + possible using ACPI. One example of this are the HP ZX1/2 chipsets: + previously the code assumed that these chips were present when no other + of the known chipsets could be probed. This assumption brought SGI + Altrix machines with 64 CPUs to a grinding halt. + +commit a3aa6a2d865239c5b8f29cbd849ae3288e36b8a9 +Author: Egbert Eich +Date: Wed Sep 15 09:05:22 2004 +0000 + + Unregistering events in XSelectInput() when unregistering IM filter + callbacks may be a bad idea as others may be interested in this event. + Removed the call to XSelectInput() altogether as we are in root window + anyway (Lubos Lunak). + Fix size of a variable that gets assigned the value of SmartScheduleTime + (long) to long. This should help to prevent smart scheduler lockup on + 64 bit systems due to overruns (Andreas Schwab). + +commit f642fc729b481c55073c75beca301b2f17881179 +Author: Roland Mainz +Date: Tue Sep 14 23:21:22 2004 +0000 + + Refix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1361 - RFE: Allow + enabling/disabling of more extensions (fixing duplicate symbols caused + by previous checkin; attachment #899) + +commit 0d95bdfbabf4c526f6f54d6f1de8811f4e6d5d5f +Author: Phil Blundell +Date: Tue Sep 14 23:08:10 2004 +0000 + + Only set screen parameters if resolution has changed from current values. + Patch from scoony@noos.fr. + +commit ba3b6fd23be5f1f900fcff57bc586e08bc524e99 +Author: Eric Anholt +Date: Tue Sep 14 06:26:54 2004 +0000 + + Add proper PCI/AGP detection, based on Mike Harris's code for Radeon, but + using the MMIO mirror of the bits instead of config space. + +commit d9df39ee2b5b462be87718046b16d30c231563ec +Author: Roland Mainz +Date: Tue Sep 14 00:51:25 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1361 - RFE: Allow + enabling/disabling of more extensions + +commit 80dc84d067c5af29e33a0c7ac62eecc8ba4e0871 +Author: Eric Anholt +Date: Sun Sep 12 23:22:31 2004 +0000 + + - Fix a segfault on VT switch with DRI. Still dies due to cursor allocation + troubles. + - Move the RemoveBlockAndWakeupHandlers to match + RegisterBlockAndWakeupHandlers. + - Enable R100 trapezoid "acceleration" when DRI is working, so that it can + be exposed and worked on. + +commit ab50679aabdda9e6197568f745d02fe1e65c7a24 +Author: Eric Anholt +Date: Sun Sep 12 23:01:24 2004 +0000 + + Fix a bad argument missed in the previous commit for ATIDRIDMA* functions. + +commit 2d069b1d1950b5f6f9140e5573e349e6559251e6 +Author: Eric Anholt +Date: Sun Sep 12 22:21:12 2004 +0000 + + Move the RegisterBlockAndWakeupHandlers to before DRI initialization. The + change to use that instead of manual wrapping made the DMA dispatch + come after the lock had been dropped, causing lots of pain. + +commit 27b5a65f05c78a0b6de0d0ace4f4275d990cc3a4 +Author: Eric Anholt +Date: Sun Sep 12 20:31:39 2004 +0000 + + Reset the CCE/CP on engine reset, and make the ATIDRIDMA functions take a + more useful argument. + +commit fcd52d276f0276490ef08af2f0d6c52ed631f130 +Author: Eric Anholt +Date: Sun Sep 12 20:19:15 2004 +0000 + + Add missing kaa.h include for kaaInitTrapOffsets. + +commit b5d406e8c84d8aba2b45e985e43d02c2e6770019 +Author: Eric Anholt +Date: Sun Sep 12 20:02:10 2004 +0000 + + Fix handling of is_agp. is_agp is whether the card is actually AGP, while + using_agp should say whether AGP is being used as part of DMA/DRI. + +commit 7cab70d1cb7298035429dd8953e521a31fc6770d +Author: Eric Anholt +Date: Sun Sep 12 19:52:51 2004 +0000 + + Improve error handling, especially in the DRI case. Do some FatalErrors + instead of ErrorFs for things that are really bad, and put limits on + some loops. Now, sometimes instead of hanging the entire system, we + (mostly-) cleanly drop to console when the card has hung. + +commit 0cd662ea80579c317d706ebe04971bb29d0f9b4f +Author: Eric Anholt +Date: Sat Sep 11 09:28:19 2004 +0000 + + - Add disabled WIP trapezoid code for R128 and R100. The R128 rendering is + not doing an add of 1 per triangle like I hoped, and instead seems to + be saturating all the pixels or something. The R100 acceleration + renders pretty well, with some gaps. Note that both are slower than + software due to lack of DMA to submit vertices. + - Mostly fix R128 and Radeon transform support, including supporting + bilinear filtering on R128. Subpixel offsets are still probably an + issue (reported by rendercheck), but I want to make 100% sure about my + understanding of the protocol before changing everybody, including fb. + - Add support for dst formats without alpha to R128 Composite. + - Remove the R128 Blend code, which has long outlived its usefulness. (I + kept it around for one reason: It could be useful for the w/h > 1024 + case with no mask and a non-src op. That seems pretty infrequent and + not worth the trouble). + +commit 396100dd235105a0e2c9013f1e07e4dae0cc3404 +Author: Eric Anholt +Date: Sat Sep 11 09:23:12 2004 +0000 + + - Don't require Imrecise mode for Trapezoid acceleration. It looks like we + might be able to do Precise in hardware, so leave it up to the driver. + - Add a helper function for computing a set of offsets for smooth trapezoid + rasterizing using many sharp trapezoids. + +commit 501dcf37aac4ec9298e8c79ca65c048c362bce31 +Author: Matthew Allum +Date: Wed Sep 8 11:31:49 2004 +0000 + + cursor fixes + +commit 20918ab480c8c8285a68e9f974b0208a18acec94 +Author: Matthew Allum +Date: Tue Sep 7 19:00:04 2004 +0000 + + avoid ephyr breakage when tslib enabled + +commit 8bf6ea903be4c052c747e3e81fc977155072299d +Author: Matthew Allum +Date: Tue Sep 7 12:44:19 2004 +0000 + + fixes to Xephyr debug mode + +commit b3322257815ec4550e1634453167535b02c1bfbd +Author: Kevin E Martin +Date: Fri Sep 3 23:41:21 2004 +0000 + + Update formatted docs. + +commit b2135e589baeb2ea26da50b9167feaea23bcce3c +Author: Kevin E Martin +Date: Fri Sep 3 16:18:23 2004 +0000 + + First set of documentation updates. + Include more correct fix for rootless interaction with damage (Bug #1168, + Keith Packard). + +commit d7fef52254126aa5897a5c58faeda1f61d5b13d8 +Author: Kevin E Martin +Date: Thu Sep 2 04:04:47 2004 +0000 + + Workaround for servers using rootless layer with damage (Bug #1168, Torrey + T. Lyons). + +commit 0e56515aa3ebc5ee8cc33213fb22b69bb4b3a0da +Author: Kevin E Martin +Date: Thu Sep 2 01:38:17 2004 +0000 + + Fix AGL display problems (Bug #1210, Torrey T. Lyons). + +commit 2753c8e2c84cc1fb6d73a05258ab7200068e7830 +Author: Matthew Allum +Date: Wed Sep 1 15:30:58 2004 +0000 + + see changelog + +commit 7c0aaa53bf8dcf3d0a8c9e78d31cf62b1766fb35 +Author: Matthew Allum +Date: Wed Sep 1 11:13:36 2004 +0000 + + '-dpi' fixes for Xephyr + +commit 16ff3a872731633b6f1f4920f793153722026189 +Author: Matthew Allum +Date: Wed Sep 1 08:31:20 2004 +0000 + + Actuall select events for -parent option + +commit 2d065c4c33b9ec17c4c791070cf8189cb57bbb9c +Author: Matthew Allum +Date: Tue Aug 31 16:33:05 2004 +0000 + + Added ephyr server sources + +commit 6ec9ecd591fba9e9b69b8ebbd2fa08c0a2beac08 +Author: Eric Anholt +Date: Mon Aug 30 22:16:46 2004 +0000 + + Add a set of three hooks for accelerating trapezoids, and use it for the + RasterizeTrapezoid screen function. These hooks will be called for + imprecise, non-sharp trapezoids with A8 destinations. + Note that the current main consumer of trapezoids, cairo, is requesting + precise, sharp trapezoids by not changing the default Picture + attributes, but gets non-sharp effects in software because fb bases its + choice of sharp/non-sharp on the mask format being A8 vs A1, and cairo + asks for A8. Follow fb's (poor?) example by ignoring the sharp setting + and basing the choice off of the mask being A8. + +commit ccaf332ce3a9393715317edd3b92420c27fc94eb +Author: Eric Anholt +Date: Mon Aug 30 16:43:10 2004 +0000 + + Rather than initially place pixmaps in framebuffer based on a size + heuristic, delay the decision until the first + kaaPixmapUse{Screen|Memory}, and put it in framebuffer if UseScreen was + called. Provides a significant improvement in cairo speeds (100% + speedup in cairogears here) and is likely to improve text performance + as well. + +commit 14b2db63e7ae0c0d356062cd15811484038f97d9 +Author: Kevin E Martin +Date: Sun Aug 29 21:06:00 2004 +0000 + + Fix make install when BuildServersOnly is YES (Bug #1213). + Fix build failures when UseDeprecatedKeyboardDriver is YES and + DoLoadableServer is NO (Bug #1229, Kristian Høgsberg). + Fix failure when using DLL loader and LD_BIND_NOW is set (Bug #1212, Adam + Jackson). + +commit ac038e9cc6f7708fdd9f36494861d2f611d5a90a +Author: Alan Coopersmith +Date: Sun Aug 29 00:48:17 2004 +0000 + + Don't define _XOPEN_SOURCE before including math.h on Solaris - it's not + needed on older releases, and breaks builds on Solaris 10. (Same as + bugzilla #189). + +commit 89d702763875831604751bac396c3d2400ec59b6 +Author: Egbert Eich +Date: Fri Aug 27 21:44:54 2004 +0000 + + Fix for XV memory allocation: Also use tiled area for allocation even if it + hasn't been used before. + +commit 971755765d6ef9cadf11127478af59189034d356 +Author: Eric Anholt +Date: Fri Aug 27 21:09:23 2004 +0000 + + Bug #1101: Fix PaintWindow in the pixmap case when the window's origin is + not at the backing pixmap's origin. Resulted in incorrect rendering in + at least aisleriot, fluxbox, and KDE apps, and probably many more. + While here, move the ParentRelative loop above the drawable grab -- may + improve correctness with ParentRelative background origins as well. + Note that the border code doesn't handle ParentRelative yet. + +commit 1840a50bb763d5c94195eaffa3954c1afd77a31a +Author: Kevin E Martin +Date: Fri Aug 27 20:39:17 2004 +0000 + + Add missing reply for DMX (Rik Faith). + +commit f30fbc600f3e5c3b4aceafb8256594af0069f2c9 +Author: Egbert Eich +Date: Fri Aug 27 20:20:54 2004 +0000 + + Fixed typos. + +commit 276cf271527b7a6f464025457e5dd452ac13605e +Author: Egbert Eich +Date: Fri Aug 27 20:16:28 2004 +0000 + + - adding missing file + +commit ecd889c6ff7427b4e7d3f820586aac178a4dfdc2 +Author: Egbert Eich +Date: Fri Aug 27 19:27:12 2004 +0000 + + Added support for LynxOS 4.0 (Thomas Mueller). + Fix arm netwinder build (Donnie Berkholz). + +commit 7c087078694a6895a9bcbe62d091665c05a86b5a +Author: Egbert Eich +Date: Fri Aug 27 12:32:14 2004 +0000 + + - Make DDC code more VESA compliant: when MaxClock is set to 0xFF it means + 'no value specified'. Therefore setting it to 0. + +commit c0bff215de2d034118d06cac42e234008612204b +Author: Kevin E Martin +Date: Fri Aug 27 01:15:10 2004 +0000 + + Fix xtest failures in Xvfb from XMatchVisualInfo test. + +commit 5335bc8a0657b3e378795b44698ed23020c13891 +Author: Eric Anholt +Date: Thu Aug 26 20:32:59 2004 +0000 + + Bug #1138: Wrap funcs in CW's GC ops as well. While this is unnecessary + according to the rules as I understand them (bug #1045), not everybody + follows the rules. GC funcs were being called on the same GC from + within GC ops, and the cwValidateGC caused a loop in the funcs chain + that resulted in a crash, notably in cwPolylines. + +commit c8672e7ac79c872344f287f7cc106cb5c006e619 +Author: Egbert Eich +Date: Thu Aug 26 11:58:08 2004 +0000 + + Fixed support for LynxOS 3.1 (LynxOS 4 will follow) (Thomas Mueller). + 2 + +commit 198e62c44b99ee0890b944f92b162387f77aa10d +Author: Torrey Lyons +Date: Sat Aug 21 00:46:01 2004 +0000 + + Documentation only update: Update XDarwin application version for release. + +commit 74d84d7b122802230579a4da8c2e6914d2f5f060 +Author: Kevin E Martin +Date: Fri Aug 20 05:22:39 2004 +0000 + + Fix keyboard driver failing to initialize if DoLoadableServer is NO (Bug + #1133, Kristian Høgsberg). + +commit bd3e6e44259155cb37f39eb2ca5e1f0de1c2ebb7 +Author: Kevin E Martin +Date: Thu Aug 19 04:08:40 2004 +0000 + + Add missing no.*Extension symbols (Bug #1131, Aaron Plattner). + +commit 87842285007e9ac4f9de0349abee1fb66b7c795f +Author: Kevin E Martin +Date: Wed Aug 18 21:11:17 2004 +0000 + + Fix CopyArea for non-redir dst, redir src (Bug #1105, Eric Anholt). + +commit 9223baf985778c536ce93846c431b46a0192cf32 +Author: Kevin E Martin +Date: Wed Aug 18 18:41:41 2004 +0000 + + Fix AIX build problems (Bugs #1020, 1102, 1103, Dan McNichol). + Remove old config files (Bug #1123, Jim Gettys). + Remove old log message (Bug #1123, Jim Gettys). + +commit a45bc0df7a1c369e8429e84414ac813187c90059 +Author: Kevin E Martin +Date: Tue Aug 17 17:55:02 2004 +0000 + + Fix DRI module loading (Bug #1057, Ronny Vindenes). + Fix Xvfb at 8bpp (Bug #1091). + Fix link order when building with Xprint in glxgears (Bug #1060, Alexander + Gottwald). + +commit 75de2fe82e7da755555028a724f68b9fb9ddfb14 +Author: Kevin E Martin +Date: Mon Aug 16 22:48:50 2004 +0000 + + Update release and date for first RC. + Fix kbd/keyboard driver for DoLoadableServer NO. + Revert change since it is better to set date in the config files. + +commit 1798cac6fa2e909c9f3df26b97ee8232a0bf1592 +Author: Kevin E Martin +Date: Mon Aug 16 20:17:51 2004 +0000 + + Add kdb <-> keyboard aliasing when UseDeprecatedKeyboardDriver is NO (Bug + #1072, Kristian Høgsberg). + +commit 6cac342517892a20bab6a6177f8b5742feaaed38 +Author: Alexander Gottwald +Date: Mon Aug 16 15:48:53 2004 +0000 + + document broken composite in XWin + +commit 9aa6beb6b7e6272b05a03e0a4fd34eb8ad21bf47 +Author: Kevin E Martin +Date: Mon Aug 16 02:07:53 2004 +0000 + + Fix banner to print out proper version information. + +commit 9da0c214ab5f4ee9c1610b4888f5c7c0dd2bcacc +Author: Keith Packard +Date: Sun Aug 15 21:13:11 2004 +0000 + + Clip destination instead of source. Should be the same, but it looks nicer + to me. + Clean up transition between cheap and expensive GC wrappers by using the + prologue and epilogue macros. Before, the GC would be left unvalidated + sometimes which would cause all kinds of entertaining bugs against a + DDX which cares (XAA). + +commit a68f350195c1c54034f98e2b78c2c3da70044884 +Author: Keith Packard +Date: Sun Aug 15 19:05:01 2004 +0000 + + Remove debugging code which did a full tree walk on every window operation + Eliminate needless (and, it turns out, dangerous) call to ChangeGC on + DestroyGCPrivate. + in cwSetWindowPixmap, check if the pixmap is the screen pixmap and disable + the wrapper by setting the private to NULL. + +commit 5db70ae2575e3e8669d7a66e2218ba28e8bdfa68 +Author: Kristian Høgsberg +Date: Sun Aug 15 15:40:19 2004 +0000 + + Remove #error used for testing. + +commit 1e728c3e88f6a74b93dc11827c9fcfe7b39ca5a5 +Author: Keith Packard +Date: Sun Aug 15 03:34:18 2004 +0000 + + Copy bits from parent window when allocating pixmaps so that Background == + None works. + Copy filter to backing picture during validation. + Mark picture serialNumber when setting Filter or Transform so Validate + occurs. + Initialize xf86Screens[i]->pScreen to NULL so that RADEON driver doesn't + crash during server reset using old pScreen. + +commit 943308517905d16bda1bb27cd745bd291a84dbf6 +Author: Keith Packard +Date: Sun Aug 15 00:43:39 2004 +0000 + + Redraw window borders when switching window pixmaps around + Make cw "own" the window pixmaps by wrapping + GetWindowPixmap/SetWindowPixmap. + +commit 597fdae93e6e1b7e4052097baf3d91e7a134c162 +Author: Kristian Høgsberg +Date: Sat Aug 14 23:59:52 2004 +0000 + + More kbd fun: write out "kbd" from Xorg -configure (#1078). + +commit e483fe3ec384da556c31292001a86ec95c2ddc46 +Author: Keith Packard +Date: Sat Aug 14 21:57:58 2004 +0000 + + Fix offsets again. Really, it works this time. Promise. + +commit e6216b48f5feee72f107348cb21bad724536ec62 +Author: Keith Packard +Date: Sat Aug 14 21:36:10 2004 +0000 + + Fix offsets, do whole region at once by using GC clipping + +commit ed425d1d88a72586d5d7a4aad9d0be0b06637070 +Author: Eric Anholt +Date: Sat Aug 14 20:29:28 2004 +0000 + + Bug #1077: Fix source copy performance problem exposed by Composite. + +commit cc3ad0ed4302f54318e190a2b10646337f242d40 +Author: Keith Packard +Date: Sat Aug 14 19:53:36 2004 +0000 + + Fix clip list computation and setting to ignore clip changes to "real" + GC/Picture and track serial numbers correctly when copying + pCompositeClip down. + +commit 183c6d06455114c61f6db57ec0a084caf11ece3a +Author: Eric Anholt +Date: Sat Aug 14 19:51:11 2004 +0000 + + Wrap CopyWindow in cw, which fixes scrolling in many apps. + +commit e61b5d38ab30c4f73ba0d070f485a32708a03eb6 +Author: Keith Packard +Date: Sat Aug 14 07:12:37 2004 +0000 + + Use XLIB_SKIP_ARGB_VISUALS environment variable to disable all depth 32 + visuals. Necessary to keep Flash from crashing. + Must call ValidateGC/ValidatePicture on "real" GC/Picture to ensure + pCompositeClip is set correctly. + Need to take the composite clip from the "real" GC/Picture and turn it into + the clientClip for the backing version. + Adjust pixmap screen origin to account for drawable->x/y Change debugging + output a bit (disabled by default) + +commit 05f6329eb6f564ad4fc366d75f4ebf9f3ba4b5dd +Author: Alan Coopersmith +Date: Fri Aug 13 23:57:38 2004 +0000 + + Don't enable speedo & type1 modules if they're not being built + Clean up a couple of hardcoded paths & vendor names to use defines set by + Imakefile + +commit 3f84e4f71d9c7c560f9bef675b1cc96fa1d83b14 +Author: Kevin E Martin +Date: Fri Aug 13 19:51:34 2004 +0000 + + Fix Xprt bug by disabling code that merges multiple audit messages (Bug + #964, Roland Mainz). + +commit 922fd3a2e568571171dfd64a94f804350829230f +Author: Alexander Gottwald +Date: Fri Aug 13 19:18:29 2004 +0000 + + Added $(MESASRCDIR)/src/mesa/glapi to INCLUDES. Removed $(SERVERSRC)/mi + from INCLUDES. Rearranged INCLUDES for better readability. + Removed mipointrst.h and miscstruct.h from #include since they are not used + anymore. + +commit f63f4b768cd5ec5bffd270e448e6e51b8ad67016 +Author: Søren Sandmann Pedersen +Date: Fri Aug 13 18:24:07 2004 +0000 + + Fri Aug 13 19:53:10 2004 Soeren Sandmann + Fix for lockups on some versions of Matrox Mystique. #687, Patch from Mike + Harris. + Call xf86EnableDisableFBAccess though the function pointer instead of + directly. #1041, Patch from Aaron Plattner. + Swap the phsyical size of the screen when rotiation. #1050, Patch from + Aaron Plattner. + Fri Aug 13 19:47:12 2004 Soeren Sandmann + Make HAVE_FT_BITMAP_SIZE_Y_PPEM conditional on the FreeType version instead + of proping it. This way it will work with the monolithic version too. + #1062, Patch by Owen Taylor. + +commit a29bfbd3d0a5d39ccee5b83ac1ba632091b031bb +Author: Keith Packard +Date: Fri Aug 13 08:16:14 2004 +0000 + + Empty damage object when freeing pixmap. + Wrap InstallColormap so that the DDX doesn't see colormaps from our ARGB + visual (avoids lovely green tint to screen). Also, set visual->nplanes + of ARGB visual to all used (including alpha) planes so DIX can set + pixel values correctly. + Translate automatic update regions correctly to account for borders + When nplanes == 32 (ARGB visuals), mask in all ones for alpha values to + allocated pixel values. + Remove redundant fbAddTraps declaration + Fix fbCopyWindow to work on non-screen pixmaps (not needed yet) + Replace broken clipping code with that from modular tree. + Respect subWindowMode. + +commit 24bed5cff908a6f8b1857e3dadac22d6db54c69e +Author: Eric Anholt +Date: Fri Aug 13 07:47:21 2004 +0000 + + Fix copy'n'paste-os of x/y in CopyPicture for AlphaXOrigin and ClipXOrigin. + +commit 5825e4559e7aaf3b40205a0dca49a785c8de7b92 +Author: Eric Anholt +Date: Thu Aug 12 23:14:50 2004 +0000 + + Fix after Mesa 20040812 merge: revert glxext.h to vendor branch, and fix + bug #1022. + +commit 2889ad2cb8827f20b6d69da4fe99db33bf9c5ff2 +Author: Torrey Lyons +Date: Thu Aug 12 20:24:36 2004 +0000 + + Fix crash in rootless XDarwin due to rootless being initialized before + damage extension. + +commit 961333143e2df3e3f33e8624fc61e79cf3e86cd1 +Author: Eric Anholt +Date: Thu Aug 12 08:45:33 2004 +0000 + + Apply a kludge to initialize the composite wrapper before DamageSetup. If + not, DamageSetup will wrap some operations first, and the cw + initializes during ExtensionInit, so cw comes higher in the wrapping + chain. cw going first will result in damage getting confused when the + drawables get changed around. + +commit 6e0228722cc2fa37a0e2359bc3dab3646e36c4b7 +Author: Eric Anholt +Date: Thu Aug 12 08:11:59 2004 +0000 + + Fix various cw issues, including a couple reported by deronj: + - Fix wrapping of GC ops/funcs according to policy described in bug #1045. + - Remove ValidateGC/ValidatePictures on the redirected drawables/pictures + -- it's not needed, and DDXs shouldn't be seeing redirected drawables + in render or GC ops/funcs when cw is running. + - Mark all GC/Picture state as dirty when moving from redirected to + non-redirected, since it hadn't been passed down in Change* or + Validate* while redirected. + - Remove CreatePicture wrapper that didn't do anything. + - Comment on why AddTraps wrapper isn't needed. + +commit 789cf3ed846045d91f950cb177ef6bae4c8966fc +Author: Eric Anholt +Date: Thu Aug 12 07:57:03 2004 +0000 + + Fix some issues reported by deronj: + - Hopefully fix a crash in compCheckRedirect on unrealizing windows. + - Remove an extern that doesn't point at anything. + +commit 1a073786e0159a80ac3b8772a1d89b0618a8ff33 +Author: Kevin E Martin +Date: Thu Aug 12 05:11:57 2004 +0000 + + Update version and date for next snapshot + +commit 47ee5f4ba72f0e0bc92a5e04073c70808e85fc08 +Author: Kristian Høgsberg +Date: Thu Aug 12 01:57:51 2004 +0000 + + Add call to SourceValidate() when pDst == pSrc, so misprite.c get a chance + to remove the sprite before the area is copied. The drivers handle pDst + != pSrc (#1030). + +commit 09d0056b8bc103f67a35980934f03d28fed51164 +Author: Adam Jackson +Date: Thu Aug 12 01:30:57 2004 +0000 + + Wrap the Propolice fix in #ifdef __SSP__; Propolice doesn't define this yet + but an RFE has been submitted upstream. + +commit e30c22dbbffa2605f8d7ac010c8208a135a2293a +Author: Adam Jackson +Date: Thu Aug 12 01:16:36 2004 +0000 + + Back out the propolice fix for a second, it causes linktime errors. + +commit 9d0213525f4f692c250f10309146fe9db76ba12d +Author: Keith Packard +Date: Thu Aug 12 00:09:30 2004 +0000 + + Paint to parent window instead of parent window's pixmap (helps for servers + that don't have a pixmap for the root) + Fix offsets for render drawing. + +commit c7bc76f663008119b3681d4b7adef7dc9ffdc236 +Author: Torrey Lyons +Date: Wed Aug 11 23:53:36 2004 +0000 + + Fix leftover XF86_VERSION_SNAP macro. + +commit eb607030e32cbad846696a20cfb3045c5f8f65c1 +Author: Adam Jackson +Date: Wed Aug 11 23:10:02 2004 +0000 + + Teach the loader about the extra symbols needed for Propolice-protected + modules to work under elfloader. From Travis Tilley (Gentoo). + +commit fd439afdfe7ba451aff19b62d1764e4dfd0b782f +Author: Keith Packard +Date: Wed Aug 11 22:40:14 2004 +0000 + + Add COMPOSITE change to fbCopyWindow (not needed yet) + Xnest was half-using midispcur and doing a bad job of it. Replace all of + that code with mipointer which does a lot of the work. + Support DDXen which don't provide GetWindowPixmap, or which return NULL for + the root pixmap. + +commit f95293e5253904883d3b40f9e68e6175247754a3 +Author: Kevin E Martin +Date: Wed Aug 11 22:27:50 2004 +0000 + + Fix bogus contact address in Xserver/os/util.c (Bug #738). + +commit 56520ecd5ceb9526541c241634b467eba6a8f7cf +Author: Eric Anholt +Date: Wed Aug 11 22:13:01 2004 +0000 + + In CopyPicture, add missing call to ChangePicture to notify about the + changes that CopyPicture has done. + +commit f77f1d50723aceb5059a96f7a4068046b7961c51 +Author: Kevin E Martin +Date: Wed Aug 11 21:14:18 2004 +0000 + + Apply PPC64 build patch (Bug #303, Mike A. Harris, Alan Coopersmith). + +commit 3dbaeb2e126d9424b21df91f0be9129c4eea6f1b +Author: Kristian Høgsberg +Date: Wed Aug 11 20:25:13 2004 +0000 + + Patch xorgconfig to generate config files with correct keyboard driver; use + "kbd" by default, "keyboard" if UseDeprecatedKeyboarDriver is YES + (#1040). + +commit ca458e3c9b25c3efc10532eb8e31bdcff44dc321 +Author: Roland Mainz +Date: Wed Aug 11 13:55:03 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=492 - + /etc/init.d/xprint did not source xorg.conf for font paths additionally + to xfree86 config files + +commit 81881b96861d707b0729e0146a4b53b3dd234885 +Author: Kevin E Martin +Date: Tue Aug 10 21:37:35 2004 +0000 + + Update version to 6.7.99.1 and fix problem with snapshot string generation. + +commit 21c7c8cdc7d2f607177634601cef8b0290fb0e80 +Author: Kevin E Martin +Date: Mon Aug 9 22:37:22 2004 +0000 + + Fix install problem on platforms not using xorg.cf/xfree86.cf (Bug #339, + Harold L. Hunt II, Alexander Gottwald). + Fix crash when using X core font in zh_CN.UTF-8 locale (Bug #368, Yu Shao, + David Dawes). + Fix glXMakeCurrent(Dpy, None, NULL) crash (Bug #719, Adam Jackson). + HP-PA build fix (Bug #828, Guy Martin, Paul Anderson). + Fix SDK build for GATOS and Wacom driver (Bug #829, Bryan Stine). + Fix attempt to read video ROM before enabling it (Bug #843, Ivan + Kokshaysky, Mike A. Harris). + Fix detection of primary adapter (Bug #843, Ivan Kokshaysky, Mike A. + Harris). + Clarify xset man page description of how to use the keyboard repeat rate + settings (Bug #846, Mike A. Harris). + Fix problem where print-screen key would get remapped to sys-req in certain + keymaps, which broke GNOME printscreen functionality (Bug #847, Owen + Taylor). + Fix several render problems: + - MMIO mode support + - Hang on IGP chips + - VT switching hang + - 3D render corruption (Bug #922, Hui Yu). + +commit 26847ef9268f687c4f45f3d048eff4b06c2ba3bf +Author: Kristian Høgsberg +Date: Mon Aug 9 03:40:50 2004 +0000 + + Move the new render symbols to dixsym.c instead so they are grouped with + the other render symbols. + Initialize screen_x and screen_y to 0. This fixes a problem with the new + Damage based sprite, where intersection test against the root pixmap + would fail because the two fields were not initialized (damage.c, + 166-170). + +commit 57eab4dc87670da42e645a4c341d1ee661b43b5b +Author: Kevin E Martin +Date: Mon Aug 9 02:08:35 2004 +0000 + + - Fix building without Xfixes extension + - Fix building without Xevie + - Fix building without DPMS + - Fix "Extensions" section config file support to accept general boolean + options + +commit a2e51b13ea5a2e5fc5626905b6c2caac6358eb11 +Author: Kristian Høgsberg +Date: Sun Aug 8 20:56:56 2004 +0000 + + Disable legacy keyboard driver "keyboard", unless + USE_DEPRECATED_KEYBOARD_DRIVER is defined. Print warning if the old + driver is used. + +commit 3431692bf44e7be01187b421cfb0e46131c5e4c7 +Author: Kristian Høgsberg +Date: Sun Aug 8 17:02:19 2004 +0000 + + Add new render symbols to list of exported extension symbols so + DoLoadableServer works again. + +commit 1e694d2b51a954d1bc4afdde390723e9a1a5b9bf +Author: Keith Packard +Date: Sat Aug 7 01:23:07 2004 +0000 + + Fix minor timestamp lossage in mieq. + Replace miSprite implementation with Damage-based one. Otherwise damage and + misprite conflict causing looping. + Change pScreen usage around a bit to eliminate warnings + +commit 45fde3b041c071ae5a604cefbbfa4da5c1e828f8 +Author: Keith Packard +Date: Sat Aug 7 01:19:01 2004 +0000 + + Eliminate mfb support. Fix visuals to match "normal" PC hardware (making + lightpipe work). + +commit 2bdbc2c0d39b1618440a6a8ed1c38a11703e898c +Author: Keith Packard +Date: Sat Aug 7 01:02:41 2004 +0000 + + Clean up cw initialization, make sure wrappers re-wrap on exit. + +commit cff0043a347ba06e8ab16a84a35c99794b45149b +Author: Keith Packard +Date: Sat Aug 7 00:58:21 2004 +0000 + + Remove alpha-related fields from visual structure to retain binary + compatibilty. Applications using ARGB visuals will need to use Render + or other mechanisms to compute pixel values instead of AllocColor + +commit 196aafb19a3cfdc8c21f9bf75814cf0d84ff4446 +Author: Keith Packard +Date: Fri Aug 6 23:42:10 2004 +0000 + + Add RenderAddTraps. Rewrite trapezoid rendering code. + +commit e847bcda0827ffb87689a0162c648570de6d6f69 +Author: Eric Anholt +Date: Fri Aug 6 00:31:28 2004 +0000 + + Fix missing ';' in cw.c and unwrap the render wrapper properly. + +commit ae1580c494fde2b56f9faa40f7ebcf637728efc8 +Author: Eric Anholt +Date: Thu Aug 5 18:24:58 2004 +0000 + + - Add a new Render function, CopyPicture, which will update a picture with + the flagged bits from a source picture. Approved in principle by + keithp. + - Use CopyPicture and SetTransform to update most of the backing picture's + state in the composite wrapper. Filters are still missing. + - Don't allocate a picture private, now that we calculate clipping properly + and don't need the serialNumber or stateChanges. + - Use the format of the source pixmap rather than generating the format + from the window's visual. + - Wrap the rest of the Render primitives that were stubbed out before. + +commit 73e14bd611fa7eac649a2b4c7964959d9eae887b +Author: Eric Anholt +Date: Wed Aug 4 23:18:38 2004 +0000 + + - Always validate the backing GC in cwValidateGC, not just when the clip + list changes. + - Use FillTiled instead of FillSolid for painting tiled border/background + pixmaps, and don't needlessly change the scratch GC's defaults. + - Use the preferred dixChangeGC instead of DoChangeGC. + - Simplify a silly loop and clean up a couple of comments. + +commit d240c41a3ab9cde9921cc96cf86e630ca5c9005a +Author: Egbert Eich +Date: Wed Aug 4 12:21:48 2004 +0000 + + Optimization of CJK rendering when using versions of freetype prior to + 2.1.8 (Chisato Yamauchi). + A small backward compatibility fix to make the freetype module build with + freetype version < 2.1.7. + Fixed/added some debugging code. + +commit 751fd11a9ad1a473d7311362246b0869a008001b +Author: Eric Anholt +Date: Wed Aug 4 10:05:37 2004 +0000 + + - Add two new XAA hooks, SetupForCPUToScreenTexture2 and + SetupForCPUToScreenAlphaTexture2. These add a dstFormat argument after + the previous format argument, which the driver needs to use to properly + set up the destination format. Two new arrays are added for the list of + destination formats supported that correspond to the previous format + arrays for sources. + - Make Render acceleration only occur when the new hook for that + acceleration type is supplied and the dst format list is set, along + with the src format list being set. Without knowing the destination + format, the Render acceleration couldn't properly support all the + destinations it might encounter. + - Bump XAA module minor version. + - Update the Radeon Render acceleration to use the new hooks when the XAA + module is sufficiently new. Fix a bug in the src/dst alpha booleans for + ops, and use them to set blend_cntl to support destinations without + alpha. Add missing PICT_a1r5g5b5 texture format, and add list + terminator. (!) + +commit 9c1d52a69db841ac85ef97d7223361b83a66ae29 +Author: Alexander Gottwald +Date: Tue Aug 3 10:12:25 2004 +0000 + + Merge from CYGWIN branch + 2004-08-02 Kensuke Matsuzaki + Fix the bug that we can't copy & paste multi-byte string to Unicode-base + Windows application. Rename fUnicodeSupport to fUseUnicode, because it + don't mean wheather Windows support Unicode or not. + +commit defcfe3c7ee3e39ef02da08b7227b758dbede325 +Author: Matthieu Herrb +Date: Tue Aug 3 09:33:54 2004 +0000 + + programs/Xserver/hw/xfree86/ddc/xf86DDC.h + programs/Xserver/hw/xfree86/vgahw/vgaHW.c + programs/Xserver/hw/xfree86/vgahw/vgaHW.h + programs/Xserver/miext/shadow/shadow.h + programs/Xserver/miext/shadow/shpacked.c + programs/Xserver/miext/shadow/shplanar.c + programs/Xserver/miext/shadow/shrotate.c Fix glitches in pointer to + functions declarations. + +commit e6d0b18c24f7f84aabed763be1cc8414883fab95 +Author: Matthieu Herrb +Date: Tue Aug 3 08:52:17 2004 +0000 + + Fix declaration of XAACachePlanarMonoStippleProc. Rename + XAACachePlanarMonoStippleWeak to XAAGetCachePlanarMonoStipple() for + consistency with other parts of xaa and fix forward declaration in + xaalocal.h. Fixes last comments on Bug #962. + +commit bfbb40c28ce6e98c82973bd96054d4787579eaa6 +Author: Eric Anholt +Date: Tue Aug 3 05:49:48 2004 +0000 + + Major improvements to Composite wrapper. Several issues remain, but it now + appears stable in limited testing. + - Allocate the picture private, avoiding segfault. + - Wrap PaintWindow to draw the background/border to the backing pixmap + (based on Deron Johnson's comptran.c). + - Set the x_off/y_off returns to translate coordinates properly. + - Don't bother allocating temporary areas for the modified coordinates. + Layers above are responsible for handling lower layers changing the + arguments, so cw doesn't have to worry about it. mibstore.c has to do + the allocation because it calls down twice (front buffer and backing + store). (Suggested by keithp) + - Handle the mode argument to PolyPoint, Polylines, and FillPolygon. + - Remove some dead elements in the cw privates. + - Kill a prototype warning in compinit.c by adding the cw.h header. + +commit b7ba272da0910c6558f71cfedd0bf9836fc892c1 +Author: Eric Anholt +Date: Tue Aug 3 05:39:19 2004 +0000 + + The Damage extension has to wrap after (be called before) the Composite + extension so that the redirecting of drawables by the wrapper doesn't + confuse Damage. + +commit d112e55992e9e03e74fdf5738c8c47cd90033a37 +Author: Adam Jackson +Date: Tue Aug 3 02:44:23 2004 +0000 + + Bug #962: Remove LoaderSymbol calls introduced by the dlloader work so + DoLoadableServer NO builds work again. + +commit 734cb34dc1697530ecd971b84e1061ed86b4c2a4 +Author: Søren Sandmann Pedersen +Date: Mon Aug 2 21:15:30 2004 +0000 + + Mon Aug 2 21:49:33 2004 Soeren Sandmann + Remove double cast. + +commit e6b9cc79c204420117a1f7b23d131ec24923d612 +Author: Egbert Eich +Date: Mon Aug 2 19:35:07 2004 +0000 + + Removed distro specific stuff. + Fixed FreeType module to build with FreeType versions older than 2.1.7. + Fixed typo. + Added vtSema to protect call of driver DPMS function. + removed unneeded variable + Modified RandR driver hook to reduce the number of function calls to one. + Function is sufficiently generic to be extended in the future. + +commit b759da83ae62a897b7727d9180a68b962b571286 +Author: Alexander Gottwald +Date: Sun Aug 1 16:16:18 2004 +0000 + + added README for Cygwin/X + This file currently contains the Cygwin/X specific release notes from 6.7.0 + and a first collection of what will make up the release notes for the + next release + +commit d638a50f3f039d84d86c00696d7d3ec22560bc3c +Author: Alexander Gottwald +Date: Sat Jul 31 18:33:56 2004 +0000 + + adjust prototype for winInitCmapPrivates to match Egberts change. + +commit 488be6611919af97d7e4f8b0994487882eb78e18 +Author: Kevin E Martin +Date: Sat Jul 31 09:41:27 2004 +0000 + + Fix typo + +commit 383b6b59864098b03d991628ff5933d997793ea1 +Author: Kevin E Martin +Date: Sat Jul 31 09:14:06 2004 +0000 + + Add "Extensions" section support to configuration parser + +commit d690556d496c7331bd112903a0c9e6553c7d3342 +Author: Eric Anholt +Date: Sat Jul 31 08:24:14 2004 +0000 + + Integrate COMPOSITEWRAP branch including composite wrapper. This code still + has several issues, including: + - CopyWindow and PaintWindow wrappers missing (will be done soon) + - Some segfaults seen in the Render wrappers. + - Xprt server build breaks with Composite. + - DDXs must be recompiled for Composite due to VisualRec size change. + - Composite bugs pointed out by Deron Johnson in email. + Also, reorder XFixes initialization according to comments by Keith which + are also in xserver CVS. + +commit 8763cca7f9927bd6c9caf804bf09dcfea929eed0 +Author: Eric Anholt +Date: Sat Jul 31 07:26:50 2004 +0000 + + Update xfixes server code to major version 3 from xserver CVS, and perform + minor diff-reduction versus xserver CVS. + +commit 25bd6ff4a622d09fb0c247b7c40281744c61431e +Author: Kevin E Martin +Date: Sat Jul 31 04:23:21 2004 +0000 + + Add new extension enable/disable feature. This code is a small step in the + right direction -- i.e., moving towards full run-time config of + extensions. Currently, only XTEST, XINERAMA, RENDER, XKB, and XEVIE are + supported. + +commit 326729ebca863c99cf913445126294a3c6d3db5d +Author: Eric Anholt +Date: Sat Jul 31 01:48:27 2004 +0000 + + - Add some XFIXES bits apparently missed in the DAMAGE-XFIXES merge + - Add missing XCSECURITY ifdef. + - Sync some whitespace to xserver CVS and surrounding style. + +commit 370bda820b2912b93dcc34c088075f8e65a9e5cb +Author: Eric Anholt +Date: Sat Jul 31 01:38:46 2004 +0000 + + Integrate latest damage bits, including the addition of Composite code. + Includes REGION_INIT -> REGION_NULL necessary to avoid segfaults with + inlined region macros. + +commit 7542d8a17ad469f9c760f0f843bd6a4fb6deb57d +Author: Stuart Kreitman +Date: Sat Jul 31 01:37:47 2004 +0000 + + Turn on XEVIE https://freedesktop.org/bugzilla/show_bug.cgi?id=947 Modified + Files: miinitext.c + +commit b2065f376b932e49f1f96dfb92ddb52d15796abe +Author: Stuart Kreitman +Date: Sat Jul 31 01:34:26 2004 +0000 + + Integration of XEVIE branch to trunk, latest updates + https://freedesktop.org/bugzilla/show_bug.cgi?id=947 Modified Files: + Imakefile xevie.c + +commit e68bfc801680f2852c59099aa3d7502e49b48b2c +Author: Stuart Kreitman +Date: Sat Jul 31 01:33:40 2004 +0000 + + Integration of XEVIE branch to trunk, Some updates from latest reviews + https://freedesktop.org/bugzilla/show_bug.cgi?id=947 Modified Files: + events.c + +commit 706b2a7e02aa0085769fb87782118488d0f90eaa +Author: Adam Jackson +Date: Sat Jul 31 01:21:19 2004 +0000 + + Change several LoaderSymbol calls introduced by the bug #400 patch to + *Weak() resolver functions. + +commit 9e13805b02f37497971c789b4035abc29463c550 +Author: Alexander Gottwald +Date: Sat Jul 31 00:44:45 2004 +0000 + + adjust prototype for winInitCmapPrivates to match Egberts change. + +commit 4da507a03fd5659e5944d9e47dd2f8920636383b +Author: Kevin E Martin +Date: Sat Jul 31 00:32:43 2004 +0000 + + Fix compiler warning + +commit 64a6d3e9c84a36b4e0550d112f288b695c5056cd +Author: Hui YU +Date: Fri Jul 30 22:20:21 2004 +0000 + + Support for New radeon chips: R420/M18, R423, RV370/M22, RV380/M24, RS300. + Add special handlings for DELL triple-head server (RV100). Misc. bug + fixes for flat panel, host aperture, etc (Bug #946) + +commit d3c98fed2c37a863a6765a3e288bcdbc2738878a +Author: Egbert Eich +Date: Fri Jul 30 21:53:09 2004 +0000 + + Add support for on-the-fly screen rotation when supported by hardware (Aron + Plattner). + +commit 4baf0029418d3eeeac5d1026a7cfea3234e44e48 +Author: Egbert Eich +Date: Fri Jul 30 21:46:38 2004 +0000 + + An experimental pseudocolor emulation layer. Not fully completed, currently + only works for 16bpp. + +commit 63a152f7812d0981e3e7aa41a42e59cd0c3e50dc +Author: Egbert Eich +Date: Fri Jul 30 21:39:20 2004 +0000 + + removing some unnecessary restricitons on the allowed visuals. + +commit 0ba15599466ddb644728c6b68e64e05b1317ac2e +Author: Egbert Eich +Date: Fri Jul 30 21:10:46 2004 +0000 + + Adding a colormap index to the InitColormapPrivate() func call. Without it + it was completely useless. + test if colormap with index really exists in the list of installed maps + before using it. + +commit bbfe7bed3fe4d9bd089327cd59e6faedb592dabb +Author: Egbert Eich +Date: Fri Jul 30 20:56:53 2004 +0000 + + Set DPMS to ON when VT switching away or shutting down the server. Failing + to do this may leave the text console blank. + +commit 40b975e3acb11c1ec2fd4c5984f5efa20b669489 +Author: Egbert Eich +Date: Fri Jul 30 20:51:09 2004 +0000 + + Improved error messages. + build fixes for AMD64. + Made shm* functions in the libc_wrapper more standard conformant by setting + errno correctly. + Use xf86ExendedInitInt10() in VBEExtendedInit() to be able to pass flags. + +commit 7643199de1c4f12a2aadeaf2d539a37ddb45672b +Author: Egbert Eich +Date: Fri Jul 30 20:38:27 2004 +0000 + + Fix static build. + add i845 to the list of chips that allow memory size tweaking. + +commit 48514fee3c8ec26f36e142ffc9272e510b9a4238 +Author: Adam Jackson +Date: Fri Jul 30 20:30:57 2004 +0000 + + Bug #400 (partial): Driver fixes for the dlloader. When using dlloader, all + framebuffer formats except cfb and the overlay modes should work, and + r128 and radeon need to be loaded from the ati driver (both issues to + be fixed soon). Tested on i740, s3virge, mach64, tdfx, vesa, and vga + drivers. elfloader users shouldn't be affected. + +commit 29012adb37c533f57c684ad94c4d83a6c31793e5 +Author: Torrey Lyons +Date: Fri Jul 30 19:28:03 2004 +0000 + + Add generic rootless layer documentation missed from last commit. + +commit 784e4d1cc02dea837a38a4140a18013953296366 +Author: Torrey Lyons +Date: Fri Jul 30 19:12:18 2004 +0000 + + Merge many XDarwin improvements: + - Fix launch of X clients by double clicking in the Finder when there is a + space in the path (Torrey T. Lyons). + - Interpret scroll wheel mouse events correctly when shift is held down + (Benjamin Burke). + - Add option to always use Mac command key equivalents (John Harper and + Torrey T. Lyons). + - Add support for dynamic screen configuration changes in rootless mode + (John Harper and Torrey T. Lyons). + - Add documentation on generic rootless layer (Torrey T. Lyons). + +commit c2275b31adc3c4292c171055db16e00ee0e69e43 +Author: Egbert Eich +Date: Fri Jul 30 19:04:14 2004 +0000 + + Removed bugs on TweakMemorySize() which prevented it from working at all. + Initialized last element of BIOS version number string to 0 to avoid random + problems. + +commit 5ed0aefc67e86abaddf1b6bffdc832996b86fb46 +Author: Egbert Eich +Date: Fri Jul 30 18:40:36 2004 +0000 + + Fixed typo in a comment. + Deleted bogus comment. + Added debugging support. + +commit d380647739e4767da69edc44bbb441b3b9554b03 +Author: Torrey Lyons +Date: Fri Jul 30 18:22:13 2004 +0000 + + Add initial Xinput support for XDarwin (Greg Parker). + +commit 41641c11ec8994f1bc4bd1b05ae2cb38167c8312 +Author: Torrey Lyons +Date: Fri Jul 30 17:37:09 2004 +0000 + + Make XDarwin not default to StaticColor on ix86 (Shantonu Sen). + +commit f4c84e7dbf0f25a2544d4400e600310421683f3c +Author: Roland Mainz +Date: Fri Jul 30 12:03:56 2004 +0000 + + Fix for http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=940 + - Filter /etc/init.d/xprint throught CPP/|MakeScriptFromCpp()| to allow + platform-specific customisation. + +commit ed923a42b800e3f701084ef5828cabbbefe8361f +Author: Eric Anholt +Date: Fri Jul 30 06:54:41 2004 +0000 + + file cw_render.c was initially added on branch COMPOSITEWRAP. + +commit 69e379ddaf85feda6a163b5f4e855ffe86b254df +Author: Eric Anholt +Date: Fri Jul 30 06:54:41 2004 +0000 + + file cw_ops.c was initially added on branch COMPOSITEWRAP. + +commit 0ee93acd103af947fef0a28e32b5b3f2857789bf +Author: Eric Anholt +Date: Fri Jul 30 06:54:40 2004 +0000 + + file cw.c was initially added on branch COMPOSITEWRAP. + +commit 3bdaa0e7fa7b6f5d550907d5fe7d0fb16c53e243 +Author: Eric Anholt +Date: Fri Jul 30 06:54:40 2004 +0000 + + file cw.h was initially added on branch COMPOSITEWRAP. + +commit 94e1ea569171334eb40a2d4a63138c02915203db +Author: Eric Anholt +Date: Fri Jul 30 06:54:40 2004 +0000 + + file compwindow.c was initially added on branch COMPOSITEWRAP. + +commit 705536d04c4f09c84bb04827c07bb899584f399d +Author: Eric Anholt +Date: Fri Jul 30 06:54:40 2004 +0000 + + file compinit.c was initially added on branch COMPOSITEWRAP. + +commit b80dbd886d7cc3a72772f3231a8c8e8df7f6679f +Author: Eric Anholt +Date: Fri Jul 30 06:54:40 2004 +0000 + + file compalloc.c was initially added on branch COMPOSITEWRAP. + +commit beb26caf68d3e25bf85fd63dbb499eca4b1f05ba +Author: Eric Anholt +Date: Fri Jul 30 06:54:40 2004 +0000 + + file compext.c was initially added on branch COMPOSITEWRAP. + +commit 97afc846003bb521cf9d6e92b298024d83db8759 +Author: Eric Anholt +Date: Fri Jul 30 06:54:40 2004 +0000 + + file compint.h was initially added on branch COMPOSITEWRAP. + +commit 854c1afa867ff617b47c4cde3cfd86bd26e9931a +Author: Kevin E Martin +Date: Fri Jul 30 04:44:13 2004 +0000 + + Fix "DoLoadableServer NO" build + +commit 71164d118c192e96eb2b0fc45514233e9563a568 +Author: Stuart Kreitman +Date: Fri Jul 30 01:21:57 2004 +0000 + + Integration of XEVIE branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=947 + Modified Files: cursorstr.h input.h inputstr.h windowstr.h + +commit 82a6a659248bb66a0364eb9eaf331747834fb5c6 +Author: Stuart Kreitman +Date: Fri Jul 30 01:20:42 2004 +0000 + + Integration of XEVIE branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=947 + Modified Files: Imakefile Added Files: xevie.c + +commit dd7077cadcdc323e1a301ed5eefa7ff12599aa4d +Author: Kevin E Martin +Date: Fri Jul 30 01:15:57 2004 +0000 + + Cleaned up code since client's saveSet is no longer defined as a pointer* + (forgot one change in previous check-in) + +commit 813d75f9d3c7b540977926e37310fa683daf12e1 +Author: Kevin E Martin +Date: Thu Jul 29 23:43:40 2004 +0000 + + Use LibraryTargetName when not building a loadable server + Move extern function declarations to window.h + Cleaned up code since client's saveSet is no longer defined as a pointer* + Added externs back in + Change #if to #ifdef to fix compiler warning + Add function declarations that were inadvertently removed by previous check + in + Disable extensions that are not (yet) supported by DMX + +commit 274d5044ac41523ff23912c223177c429c710e09 +Author: Stuart Kreitman +Date: Thu Jul 29 18:49:42 2004 +0000 + + Integration of DAMAGE-XFIXES branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=859 + Modified Files: Imakefile miinitext.c + +commit 406c49eb810cbdcfd833cac4eeaa465598238691 +Author: Stuart Kreitman +Date: Thu Jul 29 18:46:37 2004 +0000 + + Integration of DAMAGE-XFIXES branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=859 + DAMAGE calls some shape functions. Modified Files: Imakefile shape.c + +commit 0bca00e1205bf1a4537cbf7be6339b3b1f9b953f +Author: Stuart Kreitman +Date: Thu Jul 29 18:43:58 2004 +0000 + + Integration of DAMAGE-XFIXES branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=859 + Modified Files: dispatch.c dixutils.c events.c window.c + +commit d4a101d4ef9943dcddf08b00b2d3ab4319597193 +Author: Stuart Kreitman +Date: Thu Jul 29 18:37:54 2004 +0000 + + Integration of DAMAGE-XFIXES branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=859 + These RENDER changes come from the experimental freedesktop tree formerly + known as "Xserver". Partly motivated by compatibility with DAMAGE as + pulled from that tree, also some of the code just is better + implemented. + Modified Files: filter.c picture.c picture.h picturestr.h + +commit e1281790bb3d7cdcc5de85829806dd53da67e326 +Author: Stuart Kreitman +Date: Thu Jul 29 18:16:56 2004 +0000 + + Integration of DAMAGE-XFIXES branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=859 + Modified Files: cursorstr.h dix.h dixstruct.h regionstr.h window.h + +commit d2f798b6dbaebd0300f42c2e083a962c37647620 +Author: Stuart Kreitman +Date: Thu Jul 29 14:42:24 2004 +0000 + + Integration of DAMAGE-XFIXES branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=859 + Added Files: Imakefile damage.c damage.h damagestr.h + +commit 682ee8a9f8d55c6a6f517a277d1bfad2a0f28594 +Author: Stuart Kreitman +Date: Thu Jul 29 14:40:33 2004 +0000 + + Integration of DAMAGE-XFIXES branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=859 + +commit 6ed1c3845517c7731dcc74baa51bb801838afaff +Author: Stuart Kreitman +Date: Thu Jul 29 14:33:43 2004 +0000 + + bugzilla 859 -merging DAMAGE-XFIXES into trunk + +commit 736e511824c4f5e77e637c680a4e45f0b7631644 +Author: Alan Coopersmith +Date: Wed Jul 28 03:57:19 2004 +0000 + + Fix shared reqs for Xlibi18n, Xaw6 & Xmu for Solaris + Improved support for Compose and Kana Lock LED's on Sun keyboards + Add event definitions for additional keys on Sun Japanese keyboards + VUID mouse protocol support for Solaris Make default mouse message clearer + on machines that use a default other than /dev/mouse. + +commit d374dffb20364a3df184cc28888ee7edbe50f474 +Author: Rik Faith +Date: Wed Jul 28 00:28:00 2004 +0000 + + When using DMX console input, make detached screens display as grey (vs. + white for attached and black for dead-space). + +commit 1498414cc85c148ef15b9b57d9f9b6b850bf2702 +Author: Torrey Lyons +Date: Tue Jul 27 20:26:47 2004 +0000 + + Fix Xprint build on Darwin. + +commit ddd58356123f61b863754eb0bdd42a8defa0461b +Author: Torrey Lyons +Date: Tue Jul 27 20:24:00 2004 +0000 + + Fix XDarwin's broken build of libGL and server side GLX. GL library is only + known to build correctly on Mac OS X 10.3.4 and still needs some work + for earlier versions. + +commit 8ef3e7052e8e1db869411e9f6fc88491e3f05474 +Author: Alexander Gottwald +Date: Tue Jul 27 09:53:14 2004 +0000 + + Merge latest changes from CYGWIN branch + Use find | xargs combination instead of simple shell globbing to prevent + commandline argument overflow + +commit a12a678bc9af8df1a3078f574b0c910e3e6983f8 +Author: Matthieu Herrb +Date: Tue Jul 27 06:20:52 2004 +0000 + + Fix a bug that caused an entire batch of events to be thrown out when one + of an unknown type is encountered. (Ty Sarna, NetBSD). + +commit 19002e47a0dbf55e035b674116a533ec9814edfa +Author: Alex Deucher +Date: Tue Jul 27 02:50:41 2004 +0000 + + - enable maven support for TV detection, DPMS, and DDC on crtc2 on G400 + (Ryan Underwood) (http://bugs.xfree86.org/show_bug.cgi?id=1098) + - expose I2CStart; needed for mga maven support (Ryan Underwood) + +commit 2a7b137d41eb8ce6efc45b47b5df0c89eb4f5d93 +Author: Matthieu Herrb +Date: Mon Jul 26 22:41:47 2004 +0000 + + remove extra ';' (Alan Hourihane, Keith Packard). + +commit 799208dd44a65b18dda97b4843a27a2628f955f4 +Author: Adam Jackson +Date: Mon Jul 26 19:06:04 2004 +0000 + + Bug #377: Make lib{glx,GLcore,dri} work when compiled as dlloader modules. + +commit f15f881727cee9a879bd43be8dc849320f8d3cbd +Author: Keith Packard +Date: Mon Jul 26 17:14:27 2004 +0000 + + Eliminate bogus rate check in fbdevModeSupported. Hmm. Potentially bogus + rate selection necessary for Mac fbdev + Don't know about fb changes to pixmaps, so can't track dirt. + Add Mac specific 1280x854 mode. Warn when requested mode isn't found. + Add ability to soft-boot video cards. + Add region expand request. FIXME: need test cases + +commit 20913b7d5daf90e0f7ad1ee967ad2f0daaec40f9 +Author: Matthieu Herrb +Date: Sat Jul 24 17:35:39 2004 +0000 + + Fix a problem with wsmouse driver loosing events on 64bit architectures + (XFree86 Bugzilla #1438, John Heasley). "To fix this, I've added a + mouse buffer (Xisb buffer) "scale" value to the MouseDevPtr type. If + set, it is used as structure size of which we want space for a few." + +commit c57944cd9aaac717d4d4ada44626e35925b39bbd +Author: Keith Packard +Date: Sat Jul 24 17:02:49 2004 +0000 + + Check for mmio before restoring crtc/crtc2 pitch registers + +commit 5fdff8b95e8f90221a46717c2f84715ab238460c +Author: Matthieu Herrb +Date: Sat Jul 24 16:32:39 2004 +0000 + + Bugzilla #884: OpenBSD/amd64 support. + +commit cc3e0173d9fae8a40eb46606d9951e3aa1df975a +Author: Søren Sandmann Pedersen +Date: Thu Jul 22 19:24:50 2004 +0000 + + Thu Jul 22 20:03:11 2004 Soeren Sandmann + Call MMX solid fill routine when available. + Call MMX operations when available. + New HasGcc34 macro + New file with many operations implemented with MMX intrinsics, conditional + on having GCC 3.4 on i386. + +commit 9565d9e0cf85e6f5fb47acebdd66212bd6cc3e08 +Author: Keith Packard +Date: Thu Jul 22 18:17:59 2004 +0000 + + Correct pitch so that accelerator can run on 1400x1050 screens. Add a few + more register sets for cursors. + +commit 67dbad6b3b9163eafae7d9dd7698708e10372a21 +Author: Eric Anholt +Date: Thu Jul 22 06:48:19 2004 +0000 + + DRM 20040721 import + +commit 829b2c72a6433ebaf63f2d2726259c73cca4bd1a +Author: Eric Anholt +Date: Thu Jul 22 06:48:19 2004 +0000 + + Initial revision + +commit 448e0754e369d433a61ae337bbfd7dba195c5e69 +Author: Phil Blundell +Date: Wed Jul 21 20:33:35 2004 +0000 + + Include -lts if appropriate. Patch from pattieja@bentham.ispvip.biz. + +commit 0c32a94623b13dd1ac5b015b465bdf890f498282 +Author: Alexander Gottwald +Date: Tue Jul 20 15:15:13 2004 +0000 + + Bugzilla #889: Bind -from address to port number 0 instead of 177 + +commit 07e6011106dcfa0ab69861aa7dcbb88382625c16 +Author: Phil Blundell +Date: Tue Jul 20 14:33:42 2004 +0000 + + Select optimized + 16bpp shadow copy functions if screen is 16bpp. Select -YX versions for + 90 and 270 rotations if architecture is ARM. + +commit 797114414096d7bf7ed0d73a878d0cffef262301 +Author: Roland Mainz +Date: Mon Jul 19 22:01:52 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=893 - Fixing the + bug that Xprt did not honor ${LC_ALL} when looking for model-config + dirs. + +commit 8853f9331826899229e5b7c964e9c852c0371ce5 +Author: Eric Anholt +Date: Mon Jul 19 12:07:01 2004 +0000 + + Add support for a8b8g8r8 and x8b8g8r8 pictures, which showed up frequently + with metacity usage. + +commit adf4b38f49da063576b48f9c0750b78bb753b3de +Author: Eric Anholt +Date: Mon Jul 19 11:42:49 2004 +0000 + + Breakage in last commit to this file: pCurPriv->area isn't set up until + Enable, these days. + +commit d2e74e419d2c75c5a5b97236d2714730e6f69ee0 +Author: Eric Anholt +Date: Mon Jul 19 11:19:12 2004 +0000 + + Set the right number of texture coordinates for r200 Render support (still + disabled, needs to be tested). + +commit cefcb7f123c962c3715b0c46f30430e87c82a017 +Author: Eric Anholt +Date: Mon Jul 19 11:16:13 2004 +0000 + + - Add Radeon picture transform support. + - On R128, don't refer to an old Composite's mask transform when the + current Composite doesn't have a mask. + - Staticize some global variables in r128_composite.c. + +commit 9fe216a45836b98b5aea55725019668de3900e83 +Author: Eric Anholt +Date: Mon Jul 19 07:53:54 2004 +0000 + + Use the offscreen memory manager as much as possible to do the reservation + of memory at startup. Do some drive-by cleanups while I'm here + (sorry!). + +commit e2bb9f38cdcb74fd7630f4efe310ad14d597171e +Author: Eric Anholt +Date: Mon Jul 19 07:20:01 2004 +0000 + + Add support for transforms of textures on R128. + +commit c04264727860cbe2e276e1934d6700d0baaf9f73 +Author: Rik Faith +Date: Sun Jul 18 22:19:33 2004 +0000 + + Addition of console input after removal of core backend input that is not + on screen 0 can cause a segfault. Fix by preventing reinitialization of + detached inputs. When Xinerama is active and screen 0 is detached, + pixmaps for XGetImage must be obtained from another screen. + +commit 0addd0d499046fc8a6cdc18fc41d34cac2ba77ea +Author: Roland Mainz +Date: Sun Jul 18 05:21:20 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=858 - Fixing the + problem that clients cannot use the TrueColor visual without calling + |XInstallColormap();|. + +commit 7f9e263658b1c9c435db851a8afd904a2f584d13 +Author: Kevin E Martin +Date: Sat Jul 17 20:44:14 2004 +0000 + + Revert change to MAXFORMATS to maintain binary compatibility + +commit c47a1bdd7463b6863018e2c4237acfd28b89f38f +Author: Alan Coopersmith +Date: Sat Jul 17 01:13:31 2004 +0000 + + Fix typo in debug message in MakeAllCLTSServerListeners + Add $(GETPEER_DEFINES) to DEPEND_DEFINES for makedepend + Add "localuser" and "localgroup" access types to server-interpreted + authentication scheme. + +commit 3e52373fc8179a59efc9e7ab22ce0cb5160d0409 +Author: Carlos Romero +Date: Thu Jul 15 09:56:40 2004 +0000 + + Enable i810. + +commit aeb78eaa980ac93f6af3e947ab1ad8bce5bc5bd1 +Author: Eric Anholt +Date: Thu Jul 8 08:21:25 2004 +0000 + + Commit the rest of the dirty optimization from 20040703 and add a missing + header include. I don't know how this happened, but I'm going to blame + a "few" fscks having happened between testing the code and committing + (due to other driver changes that made me not blame dirty for the + failures I saw) for disappearance of kasync.c changes. Fixes a lot of + corruption. + +commit b46767352822b09e5dab8b54cbb7a37a9b62de53 +Author: Eric Anholt +Date: Thu Jul 8 06:57:58 2004 +0000 + + Remove duplicate protos in kdrive.h. + +commit 764d9e822b01fdfe3ff088028959cbc48b349026 +Author: Carlos Romero +Date: Wed Jul 7 20:43:25 2004 +0000 + + missing xkb/[xkb.h, xkbDflts.h] and hw/kdrive/mga/g400_common.h + +commit f96ef08d48b01f6119799ede9ffc43d0134cbf8b +Author: Carlos Romero +Date: Wed Jul 7 19:21:07 2004 +0000 + + Initial kdrive XKB/XINPUT support, use --enable-xkb --enable-xinput + +commit a5c9b3229ce418a5e3eacc40b7a7f11c0a26d958 +Author: Rik Faith +Date: Wed Jul 7 04:32:52 2004 +0000 + + Bugzilla #817 + +commit 1498d7a096f0855fa965585acd9ca4a2780cc959 +Author: Kevin E Martin +Date: Tue Jul 6 23:51:00 2004 +0000 + + - Disable building DMX on OSs that have not been verified to build + correctly (Kevin Martin). + - Fix DMX build when Xinerama is not enabled (Kevin Martin). + +commit 0e45f2a7536bf4b66d6f64d96b44431310884af3 +Author: Egbert Eich +Date: Tue Jul 6 14:49:13 2004 +0000 + + ifdef'ed some IA32-only assembler statements. Presently these chipsets are + IA32 only, anyway (Egbert Eich). + Disabling generic VGA testing for IA64 architectures. Temporarily disabling + support for ZX1 bus. This code is extremely invasive and is executed as + fallback without testing for a ZX1 chipset. It brings a SGI Altrix to a + grinding halt. (Egbert Eich). + +commit df2b55a25b7056ac92c1f6cbee9f16bd0a37ba8c +Author: Egbert Eich +Date: Tue Jul 6 14:37:48 2004 +0000 + + Separated Intel drivers from default DriDrivers to avoid building them on + IA64 (Egbert Eich). + Fixed wrong function prototype (Egbert Eich). + Don't test for generic VGA on IA64 (Egbert Eich). + Fixed a segfault when accessing a structure before verifying the pointer + exists (Egbert Eich). + Added a showcache option for debugging (Egbert Eich). + Increase default video RAM size to 16MB when DRI is enabled and more than + 128MB are available (Egbert Eich). Fixed lockups during mode switch. + Problem was introduced when attempting to copy the behavior during + LeaveVT()/EnterVT() but but forgetting to call I810DRILeave() before + I810DRIEnter(). The entire DRILeave()/Enter() scenario has been + commented out as it didn't seem to be necessary (Egbert Eich). + Fix TweakMemorySize() (tested with i855/i865) (Egbert Eich). + increased MAX_DEVICES to 128 (Egbert Eich). + Use OS provided PCI config space access as default method (Egbert Eich). + Added support for Linux 2.6 proc file format. + Fixed unaligned accesses to pieces of the VBE info block. VESA did not + align elements to size (Egbert Eich). + +commit 7c466d64c34e68e0bc50e083861874161ae02db9 +Author: Eric Anholt +Date: Sat Jul 3 10:23:03 2004 +0000 + + Clean up Rage 128 composite code. Now it composites more operations + correctly and is simpler. + +commit 020701566916c8569f5af7f2efe1de36fea2002e +Author: Eric Anholt +Date: Sat Jul 3 09:16:30 2004 +0000 + + Add a "dirty" flag to the pixmap private. Clear it when setting up an + offscreen pixmap area, and set it when any rendering occurs. When + moving a pixmap out of offscreen, don't read data back if it wasn't + dirtied (compared to the system memory copy). + +commit fd594b0559caa98ee0823be956aecf9c9d2e52bc +Author: Phil Blundell +Date: Fri Jul 2 21:30:00 2004 +0000 + + Call ts_read multiple times, to avoid events getting stuck in the pipeline. + +commit 7976ee51afcad41b611e642d2feb31d805dedcf6 +Author: Kevin E Martin +Date: Wed Jun 30 20:06:56 2004 +0000 + + Add Distributed Multihead X (DMX) support + +commit d5db59bd79f5d8788b99056bf9d969b5b3ad99e1 +Author: Eric Anholt +Date: Tue Jun 29 20:37:51 2004 +0000 + + Add an offscreen area scoring to improve choosing offscreen areas to kick + out when allocation can't find a free area of the requested size. When + offscreen pixmaps get used, the offscreen area's score is increased by + a constant value. Every certain number of increases, all offscreen area + scores get decreased by a fraction. When choosing a set of areas to + remove for a new allocation, the set of areas with the smallest total + score is chosen for removal. While this is not the smartest system, it + prevents things like always removing the first offscreen area in memory + (likely the most recent) to be kicked out when doing replacing. + +commit ea78d1c6fcd27d28e69cb97faf72b7b719f6f93e +Author: Alan Coopersmith +Date: Mon Jun 28 18:08:26 2004 +0000 + + Add GLX_ALIAS_VOID for GLX_ALIAS of functions with return type void to fix + builds with non-gcc compilers that refuse to let you do return + function_that_returns_void(...) + programs/Xserver/hw/xfree86/os-support/shared/sigiostubs.c Remove includes + of xf86drm.h that break non-DRI builds + +commit 7ff67f2872ddd15908f789ec9bdb76e8211d6431 +Author: Keith Packard +Date: Mon Jun 28 00:48:51 2004 +0000 + + Separate out off-screen allocation from Init. Fix Enable to update + off-screen addresses. Wrap RandR to update off-screen addresses. + Set off_screen_base and memory_size fields correctly. + +commit 5b75aae2cf1ad38556e9a55da72ad65419aa7f84 +Author: Keith Packard +Date: Sat Jun 26 04:13:03 2004 +0000 + + Add ARGB cursor support for Radeon cards. + +commit 8bc0bc6d36dbc5000069017a1984905065164016 +Author: Alexander Gottwald +Date: Fri Jun 25 08:58:18 2004 +0000 + + #Bug 784: Ignore unconfigured interfaces with xdmcp + +commit c5ab3fdd928d12b4dc28108f2242b3b75e1ac65f +Author: Alexander Gottwald +Date: Fri Jun 25 08:56:04 2004 +0000 + + #Bug 780: add RRSetScreenConfig + +commit f8226cee08a00b49f32dc3db814478490febe45d +Author: Roland Mainz +Date: Fri Jun 25 00:02:11 2004 +0000 + + Fix for http://xprint.freedesktop.org/bugzilla/show_bug.cgi?id=791 - Adding + special support for Canon C3200N + +commit ad6b9644a39343437967b4c3b2442dbd47508443 +Author: Roland Mainz +Date: Thu Jun 24 06:26:27 2004 +0000 + + Fix for http://xprint.freedesktop.org/bugzilla/show_bug.cgi?id=660 : Fix + for the issue that GetPrinterList does not return printer descriptions + on Solaris. The patch implements a framework which allows the printer + enumerator scripts to pass additional printer attributes to the + information pool (currently only "xp-printerattr.descriptor" is + implemented). + +commit 884908a63c624585c9b5fcf22d565236298c2916 +Author: Roland Mainz +Date: Tue Jun 22 10:18:13 2004 +0000 + + Fix for http://xprint.freedesktop.org/bugzilla/show_bug.cgi?id=789 : Adding + a workaround for the issue that Xprt may hang when the CUPS spooler + frontend sends messages to stdout. + +commit c66cc2a219e860ae3c0b5d4ad18b22a6dc4e16df +Author: Alexander Gottwald +Date: Mon Jun 21 13:51:57 2004 +0000 + + Bug 783: rootless patches for cygwin + +commit ed7f92e791f052d64cffef4b44eae5160fb24689 +Author: Alexander Gottwald +Date: Mon Jun 21 13:44:14 2004 +0000 + + Bug 778: add ddxBeforeReset + +commit 68d92cca1a696521599db6a826d2187ec0c15f01 +Author: Alexander Gottwald +Date: Mon Jun 21 13:35:05 2004 +0000 + + Bug 782: Merge native OpenGL for Windows from CYGWIN branch + +commit d6e8b1affec7351549c0006cc63b6923091cdd68 +Author: Alexander Gottwald +Date: Mon Jun 21 13:19:32 2004 +0000 + + Bug 777: Merge from CYGWIN branch + +commit dfdbb60bf5f613b3554d5435f08f16bde72aa353 +Author: Roland Mainz +Date: Mon Jun 21 00:29:46 2004 +0000 + + Fix for http://xprint.freedesktop.org/bugzilla/show_bug.cgi?id=772 - RFE: + Switch default resolution from 300DPI to 600DPI + +commit dd831c7a5c1b0c540a78350aadaeb34a8aa67395 +Author: Roland Mainz +Date: Sat Jun 19 21:56:01 2004 +0000 + + Refix for http://freedesktop.org/bugzilla/show_bug.cgi?id=764 : Rework + previous solution and make Xprt to default to "-noreset" (the default + of Solaris version of Xprt) and add a "-reset" option which can be used + to restore the default behaviour on demand. + +commit da78a4ddd833f78baf1d2579a1adea8208016ddb +Author: Damien Ciabrini +Date: Wed Jun 16 21:36:54 2004 +0000 + + Update MGA composite patch commit. (some files were missing in the previous + commit) + +commit e56e24af252bd3b8e58076adf0f8eabf1103f187 +Author: Eric Anholt +Date: Wed Jun 16 09:37:59 2004 +0000 + + Merge DRI-trunk-20040613 changes in programs/Xserver/GL. + +commit 2e1868b560315a8b20d688e646c489a5ad93eeae +Author: Eric Anholt +Date: Wed Jun 16 09:25:21 2004 +0000 + + DRI trunk-20040613 import + +commit f45c46c630855e8e0d1c28b1f0d3b2ad54334619 +Author: Eric Anholt +Date: Wed Jun 16 09:25:15 2004 +0000 + + Initial revision + +commit 22bad9474b8822f03f84a8a39edce624bfb9befa +Author: Eric Anholt +Date: Wed Jun 16 09:22:17 2004 +0000 + + DRI XFree86-4_3_99_12-merge import + +commit 1c133c27ccc1f09b95922fdece3c8d73cc182def +Author: Eric Anholt +Date: Wed Jun 16 09:22:05 2004 +0000 + + Initial revision + +commit b61ff0daa4bd1e3b828dc5b985c3a2f3c92b202e +Author: Eric Anholt +Date: Wed Jun 16 09:16:01 2004 +0000 + + DRM 20040613 import + +commit bcc1eab1fd57e8cb686d625934a6e527b7ae4ea2 +Author: Eric Anholt +Date: Wed Jun 16 09:16:01 2004 +0000 + + Initial revision + +commit 580b9a7da1bf0e20acdcddd676d471b3d6589023 +Author: Jaymz Julian +Date: Mon Jun 14 08:43:57 2004 +0000 + + MGA composite support from Damien Ciabrini - thanks! + +commit 95d65cf6bb753d10f4db3d857fb98bb09389228e +Author: Alan Coopersmith +Date: Sun Jun 13 04:50:21 2004 +0000 + + Manual page X(7) does not reference Xprt(1x), xplsprinters(1x), etc. + xc/config/cf/Imake.rules Correct comment to match rule name for + InstallDriverSDKObjectModule + xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_kbd.c Log results of + ioctls to probe keyboard type & layout + +commit 4ffde8a6b3299f002c10b1abd881e4c6849767ea +Author: Eric Anholt +Date: Thu Jun 10 19:22:58 2004 +0000 + + - Pass the right pixel mask (all ones) in to PrepareSolid in the + solid-fill-based composite acceleration. + - Use a real pixmap when doing an UploadToScratch (For pDrawable->type == + DRAWABLE_WINDOW, you need to get the backing pixmap). + - Pass back the x/y offsets from kaaGetOffscreenPixmap unconditionally, + because they'll be used in the scratch case. + - Turn on the Render acceleration for Rage 128 and Radeon 100-series at + last! + +commit c3bc6dd551436d5e37a07f37b3b77a83bb5b5da0 +Author: Eric Anholt +Date: Thu Jun 10 09:50:59 2004 +0000 + + Align scratch area offsets to the offscreen byte alignment. + +commit cf3f95d2164604047866b283fe0071574bf16dbc +Author: Eric Anholt +Date: Thu Jun 10 08:37:28 2004 +0000 + + Oops, testers reported that the last patch actually didn't work (conflicts + occurred), so the R300 PDMA doesn't work. Disable. + +commit 0b7647ee359537953b67b0dbf9daa807e356062b +Author: Eric Anholt +Date: Thu Jun 10 05:57:31 2004 +0000 + + Bug #242: Fix setup of R300 cards, by providing R300 CP code from + volodya-project and initializing PDMA. + +commit b3a18ca8b827cfe2ebb295a03a9776028242c1a0 +Author: Franco Catrin L +Date: Mon Jun 7 05:13:29 2004 +0000 + + Neomagic driver enabled + +commit 893ea125597f3c6273f45a51673d4dc514e754e9 +Author: Franco Catrin L +Date: Mon Jun 7 05:05:10 2004 +0000 + + small fixes. README added + +commit d9cca52feba13b69f3eea9e1d958b8a4711e7d67 +Author: Keith Packard +Date: Fri Jun 4 17:06:18 2004 +0000 + + Add (stubbed out) Xgl server code + +commit f8a1dd3ce725195baa6f38a880299752c6c6c2c4 +Author: Keith Packard +Date: Fri Jun 4 16:10:50 2004 +0000 + + Add top-level build support for GL X server (not working yet) + Fix a few allocation bugs with alternate visual ids Allow for non-8/8/8 + alternate visuals + Turn off any existing shadow before enabling it again (avoids + re-registering existing damage) + Add some validation code to catch re-registered damages + +commit 6741fadc52598af0096f106a2cefd640abb434b3 +Author: Phil Blundell +Date: Wed Jun 2 20:49:50 2004 +0000 + + New conditional. (REQUIRED_MODULES): Demand xcalibrateext if building + XCalibrate. + New file. + Add xcalibrate.c. + Read raw events if requested. + +commit d4d0c8470c4272dec642ab4c68f44a83cda06971 +Author: Phil Blundell +Date: Sun May 30 20:40:30 2004 +0000 + + Add -lts if using tslib. + +commit 8124810950d7e0b9db7f66dadee7218b0c26c4c3 +Author: Carlos Romero +Date: Sun May 30 13:51:18 2004 +0000 + + Initialize permedia engine for acceleration to work. + +commit ea1bbf8d83d3780ccce5ebcdff48f0b19863cee1 +Author: Ralph Thomas +Date: Sat May 29 12:15:46 2004 +0000 + + Adding driver for VIA CLE266 graphics chip. Currently it only accelerates + copy and fill operations. + +commit 6af411b02e808220d3afcef14abb97eec86cf1f3 +Author: Daniel Stone +Date: Fri May 28 04:56:49 2004 +0000 + + Hey, I like devfs. + Try /dev/fb/0 if /dev/fb0 fails. + +commit a7b42f685e7a4bf57cf89a3ef664a581ecedb50f +Author: Alexander Gottwald +Date: Thu May 27 14:11:42 2004 +0000 + + file ChangeLog was initially added on branch CYGWIN. + +commit 05a3dbf5dc55ea534c68fc9d05b3949805a0752e +Author: Egbert Eich +Date: Wed May 26 17:44:29 2004 +0000 + + Updated x86emu and resynced with upsteam at Scitech. + +commit 9549f628e066396e6bc9a7edfc919bdd6860f170 +Author: Alan Coopersmith +Date: Tue May 25 20:33:46 2004 +0000 + + getconfig: file '/usr/X11R6/lib/X11/getconfig/xorg.cfg' has bad signature + (Change "Xorg Project" to "Xorg Foundation" to match getconfig script) + +commit f8124d3ef5890d59c3ce41bee46b5e3576d0f9b1 +Author: Carlos Romero +Date: Tue May 25 13:02:44 2004 +0000 + + Add pm2 to the build + +commit 32d0920ef9ec3c5e61089b88dedc82ffab294276 +Author: Carlos Romero +Date: Mon May 24 19:31:41 2004 +0000 + + Initial import of Permedia2 driver + +commit 5b2211ec3545f1634f807daf84b6c4bc2c0fdecf +Author: Egbert Eich +Date: Mon May 24 19:05:01 2004 +0000 + + Muffle compiler warnings. + fix option name in log message. + improve debugging messages. + +commit 932efe8e6d4e6280aed9b5e25af56888c964d37b +Author: Keith Packard +Date: Fri May 21 03:32:27 2004 +0000 + + Allow for multiple composite-based visuals, then add an RGB24 visual in + addition to the ARGB32 one. This allows 'glitz' to run on top of any X + server using mesa. + Switch to using 32bpp for depth 24 pixmaps (even when the frame buffer is + not depth 24). + +commit cde51fd05b2bd413d8db8ad750e6a72398a7039c +Author: Keith Packard +Date: Thu May 20 19:51:44 2004 +0000 + + Miscomputing pitch in 24bpp modes because of rounding errors. + +commit b9d920f3dc060d230a4a7b2d40210524acf50666 +Author: Keith Packard +Date: Thu May 20 05:27:03 2004 +0000 + + Fix SYNC_ALWAYS (debugging) code to use mach64WaitIdle instead of + KdCheckSync -- the boolean used in the latter won't be set yet. + Oops. == instead of =. + Must sync hardware before rasterizing trapezoids in case the mask is in + off-screen memory and has just been erased. Yes, it is silly to place + masks in off-screen memory. That's a separate issue. + +commit 94648799c82e59166155ca5abf22a9391693e6a1 +Author: Keith Packard +Date: Thu May 20 02:42:20 2004 +0000 + + Pin header-only pixmaps in memory. + Off-screen reallocation could have used a stale pointer. + Separate framebuffer mapping computation from actual frame buffer mapping. + Now map the frame buffer from vesaEnable so that VT switch shares the + same mapping code. This makes sure any shadow framebuffer is allocated + again. + +commit cade317d31dddab61199d5e90bcff36fb12f3cd1 +Author: Eric Anholt +Date: Mon May 17 20:18:02 2004 +0000 + + Overhaul of the ATI driver: + - Add monochrome hardware cursor support. + - Try to auto-detect AGP support for DRI on Radeons. And fail. Detect it + properly on R128. + - Set up card for pseudo-DMA if possible. Convert 2D rendering code to + prepare DMA packets only. Use generic code to decode DMA packets to + MMIO if PDMA is unavailable. Add WIP code to support "real" DMA without + DRM support. + - Dispatch pending DMA commands when the server sleeps. Otherwise some + things, such as typing in an xterm, wouldn't show up for a time. + - Fix Radeon Composite acceleration in many ways, and add Rage 128 + Composite acceleration. Disable them both due to still-not-understood + issues they have. They fail with In, Out, AtopReverse, and Xor, and + text rendering is strange. + - Add textured XV support for R100 and Rage 128. No brightness/sat + controls, but it does support multiple ports, and cooperates with + Composite. + - Add WIP code for hostdata uploads. + - Many cleanups and fixes. + +commit 834537e212e01314b60737278b7abc6bb7cef102 +Author: Eric Anholt +Date: Mon May 17 07:19:49 2004 +0000 + + Make kaaMoveInPixmap public. This will be used by the ATI driver's xvideo + support to ensure that the destination is in framebuffer. + +commit 85f46e0bcdf60d145a6868ee71d10688c9113e6e +Author: Eric Anholt +Date: Mon May 17 07:14:23 2004 +0000 + + Add new CheckComposite hook. This allows a driver to avoid the migration of + pixmaps for a Composite operation if the operation can't be supported. + This hook is optional. + +commit 47fb207c8ae2b54e976066f78892a1ee3fb35d30 +Author: Alan Coopersmith +Date: Sun May 16 05:08:39 2004 +0000 + + xc/programs/Xserver/fb/fb.h + xc/programs/Xserver/fb/fboverlay.c + xc/programs/Xserver/fb/fbscreen.c + - Change #ifdef for checking for old format miScreenInit to + FB_OLD_MISCREENINIT for easier portability to xservers with updated + screen structs but old function prototypes. Make it automatically + defined if FB_OLD_SCREEN is defined. + - Add _LP64 to list of #ifdefs for 64-bit platforms to support + 64-bit Solaris. + +commit fc2dd516c3c7382915452207180a1c483d0d73ca +Author: Alan Coopersmith +Date: Sun May 16 00:03:54 2004 +0000 + + xc/programs/Xserver/hw/xfree86/xf86config/Imakefile + xc/programs/Xserver/hw/xfree86/xf86config/xorgconfig.c + - Clean up server name changes from TM branch + - Set default XKB rules file name correctly + - Use default font path from Imake configuration for the default font path + in generated xorg.conf files. + - Use path variables from Imake configuration for paths to files, in case + vendor has configured them to install somewhere other than the + defaults. + +commit b1aa9499ffb827f4b1acc75f197e332bba382565 +Author: Roland Mainz +Date: Sat May 15 14:43:05 2004 +0000 + + Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=622 - + RFE: Xprt default BIGREQUESTS extension buffer size should be 8MB (to + make |XpPutDocumentData()| happy and to improve performance). + +commit 74b2a7694791297a4f798ecc05c7eb8f68634722 +Author: Eric Anholt +Date: Fri May 14 00:34:28 2004 +0000 + + Add new flag, KAA_OFFSCREEN_ALIGN_POT, which tells KAA to align pixmap + pitches to a power-of-two number of bytes. Useful for Render + acceleration on older cards. + +commit 2bea33e881693e7d7dcf938db79c888a71dfb2fb +Author: Eric Anholt +Date: Fri May 14 00:27:29 2004 +0000 + + Don't let the visible screen get "migrated" offscreen, which manifests + itself as a hang. + Reported by: Ginokas + +commit 40354e761892dc2ef88d2e722d8d7896642003eb +Author: Eric Anholt +Date: Thu May 13 22:57:15 2004 +0000 + + Add generic functions for copying packed/planar XV data, copied from + mach64. + +commit 2e330e980f61b256c55f5b9debb00574e4e85b26 +Author: Eric Anholt +Date: Thu May 13 21:41:48 2004 +0000 + + Move fourcc.h to a generic location in src/. + +commit f52a4d472d2463482d865c5006208182c294e670 +Author: Keith Packard +Date: Thu May 13 21:25:51 2004 +0000 + + Follow GLX in setting ARGB visual nplanes to 24. + Retry current mouse protocol when sync is lost + +commit aa5a87847290d49b03a33351ebfd8df652a42489 +Author: Eric Anholt +Date: Thu May 13 21:15:06 2004 +0000 + + There's no need to explicitly set softCursor -- kdrive handles this if the + cursor hooks aren't set. + +commit 4078457919708a8dbf9db8ee6e4871ecbf72518f +Author: Eric Anholt +Date: Wed May 12 01:49:46 2004 +0000 + + Fix problems in render fb implementation found by rendercheck: + - fbCombineSaturate was pointed at fbCombineDisjointOver, instead of + fbCombineDisjointOverReverse as it should. Instead, point + fbCombineDisjointOverReverse at fbCombineSaturate (which is likely to + be faster). + - fix previously-unused fbCombineSaturate implementation. + - fbCombineMaskAlphaC was just a copy of fbCombineMaskValueC. Make it do + what it's supposed to (return a cs.alpha). + - fbCombineAtopC didn't invert the source alpha value. + - fix copy'n'paste errors in fbCombine(Dis/Con)jointGeneralC, also source + alpha wasn't treated in a component fashion. + - fbCompositeSrc_8888* didn't handle when the source lacks an alpha + channel. Rather than adding that and possilby slowing down the (normal) + alpha case, don't let x8r8g8b8/x8b8g8r8 Pictures be used in + fbCompositeSrc_8888* because Over with one of these is just Src. + +commit a43d5412b4d79d67af20dc8af144a9ca80263e9d +Author: Alexander Gottwald +Date: Sun May 9 16:20:13 2004 +0000 + + file ChangeLog was initially added on branch CYGWIN. + +commit 0498d818fe40cb4eb03983e27a980791bbadf6db +Author: Roland Mainz +Date: Sat May 8 02:06:46 2004 +0000 + + Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=608 + ("Can not print on Debian/CUPS due to error |Xprt_64:lpr: unable to + print file: server-error-not-accepting-jobs|"): Xprt did not setup the + list of supplementary group ids, causing print failure when the the + calling user must be a member in a specific group to be allowed to + print. + +commit 75d96afcc4a1f201da665bd73b7067e8e7139a3f +Author: Egbert Eich +Date: Thu May 6 17:31:17 2004 +0000 + + BugZilla #601: Fixing makedepend choking on floating point exception + because CHAR_BIT is defined to __CHAR_BIT__ which is a compiler + intrinsic define. BugZilla #605: Fixing build on IA64 which is broken + due to the inclusion of the kernel header asm/page.h. Kernel headers + however don't work with + -ansi. The inclusion of asm/page.h can however savely be removed as it + there are plenty of other ways to determine the page size. + +commit 7124cfaa006e840ba48dcc466c0dc8b34503a686 +Author: Keith Packard +Date: Thu May 6 16:19:32 2004 +0000 + + Use current resolution by default, change rate to 75 to match + fbdevModeSupported cut-off (?). Glenn McGrath + +commit e4ac2411eddf1f01ef9204f27b6d1ce8f1749439 +Author: Roland Mainz +Date: Thu May 6 01:53:52 2004 +0000 + + Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=551 - + PS DDX will not build on platforms with BuildFreeType NO. Patch by Alan + Coopersmith . + +commit b1c65e1ca6828ea82ee7790f22c26503b0a5e17d +Author: Roland Mainz +Date: Thu May 6 00:24:32 2004 +0000 + + Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=536 - + RFE: PS output should contain the FreeType2 version being used. + +commit 8d4f21ab53c44ca48501d6211ea6db0c0b8af916 +Author: Eamon Walsh +Date: Wed May 5 20:15:41 2004 +0000 + + Add XACE and XSELINUX extensions to the build system + +commit 0106715000196c7b349a0b4494b61545f0f5e138 +Author: Eamon Walsh +Date: Wed May 5 20:07:37 2004 +0000 + + Modify XC-SECURITY and XC-APPGROUP extensions to work with XACE + +commit 8526cd6395490b03b279f1962df777fb0e4a9878 +Author: Eamon Walsh +Date: Wed May 5 20:04:52 2004 +0000 + + Replace XC-SECURITY code with XACE security hooks + +commit 6d066cb10990d951449b342b40dec1f1b1ae593c +Author: Eamon Walsh +Date: Tue May 4 19:44:02 2004 +0000 + + Merge the new release from HEAD + +commit b5f200ce9d495c6ce94e0170909465a30e8799d9 +Author: Keith Packard +Date: Tue May 4 03:28:06 2004 +0000 + + Attached is a patch to fix a build error whe ncompiling with tslib support, + a variable wasnt set, i just changed it to be like the other + MAkefile.ams :) -- Glenn McGrath + +commit 5ca651e66f3d0ab189962bb4609b87a865364ef8 +Author: Alexander Gottwald +Date: Fri Apr 30 12:48:56 2004 +0000 + + file winmessages.h was initially added on branch CYGWIN. + +commit 2c2c1704b542f29fe5ac9917e1141040a0dbd3e9 +Author: Roland Mainz +Date: Thu Apr 29 23:59:15 2004 +0000 + + Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=567 - + Xorg Xprt starts to consume 100% CPU when being idle for some time + (internal screensaver goes mad after 10mins) + +commit a8429d76103ff0f4fc61db86201c741f91bfcba2 +Author: Keith Packard +Date: Wed Apr 28 07:26:46 2004 +0000 + + Add completely fake X server -- draws to allocated buffer, has no keyboard + or mouse. + +commit 85e4e5445218d70f627fb132a8e8f18470e6749d +Author: Roland Mainz +Date: Mon Apr 26 11:07:03 2004 +0000 + + Work-in-progress for + http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=542 - GLX + support for PS DDX / part #1: Fix visual setup (attachment #243) + +commit 46472cbee679f9757c4003a0dcf158aeb3852f47 +Author: Alan Coopersmith +Date: Mon Apr 26 02:39:58 2004 +0000 + + xc/config/cf/sun.cf + xc/config/cf/sv4Lib.rules + xc/programs/Xserver/Imakefile + xc/programs/Xserver/hw/xfree86/os-support/sunos/find_deps.pl Make Solaris + builds work when using MakeDllModules (it's not the default yet, but at + least it works now if you turn it on) Also improve default compiler, + optimizer, & linker flags for Solaris builds using either Sun cc or gcc + xc/programs/Xserver/cfb/Imakefile.inc + xc/programs/Xserver/cfb/stipsparc.s + xc/programs/Xserver/cfb/stipsprc32.s Remove text relocation error when + building shared versions + +commit 36e3e5430e1ca7103a4e0b796eb3817975b40d90 +Author: Roland Mainz +Date: Sun Apr 25 22:42:09 2004 +0000 + + Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=541 - + Xorg Xprt may crash with "Freeing resource id=40200000 which isnt + there" + +commit 2fb588620030ad393f8500d60e16144d59e4effe +Author: Egbert Eich +Date: Fri Apr 23 19:54:30 2004 +0000 + + Merging XORG-CURRENT into trunk + +commit 0664db19bf37f9dd69cca6adff4e238e310c3092 +Author: Egbert Eich +Date: Fri Apr 23 18:54:16 2004 +0000 + + Merging XORG-CURRENT into trunk + +commit 68fd529608c58334f13beb88dbcc1d5db85b9b00 +Author: Roland Mainz +Date: Wed Apr 21 23:24:20 2004 +0000 + + Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=535 - + Xprt should not annouce extensions which are not supported + +commit 1af13123fa79ad1c6747aad60ed458bbd69da12d +Author: Roland Mainz +Date: Wed Apr 21 10:03:41 2004 +0000 + + Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=530 - + Land XPRINT branch on XORG-CURRENT + +commit 449e83a9470ec4bdd0871e2f263f608b24455423 +Author: Alan Coopersmith +Date: Sun Apr 18 03:00:43 2004 +0000 + + xc/lib/GL/glx/Imakefile + xc/lib/GL/mesa/src/Imakefile LargePICTable required for Solaris SPARC + builds + xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_accel.c + xc/programs/Xserver/hw/xfree86/common/xf86Events.c Add != NULL to if + statements to get past syntax error reported by Sun Forte 6.1 cc. + xc/config/imake/imake.c + xc/config/cf/sun.cf + xc/config/cf/sunLib.tmpl Allow compiling with Sun compilers installed + somewhere other than /opt/SUNWspro + xc/programs/Xserver/hw/xfree86/common/compiler.h + xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h Check for + defined(sparc) as well as defined(__sparc__) since Sun compilers don't + define __sparc__ + +commit 425251a752805affb6ce14baa58d92c384f39501 +Author: Alan Coopersmith +Date: Sat Apr 17 18:47:05 2004 +0000 + + Bugzilla #495: LocalClientCred should use getpeerucred on Solaris 10 + +commit 7215fb186f076a24d0a04c9c20ac9b92cae1f49b +Author: Alan Coopersmith +Date: Fri Apr 16 00:21:24 2004 +0000 + + xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_mouse.c Solaris mouse + enhancements, including autoprobe support, VUID wheel mouse events, and + streams module pushing. Bugzilla #434. (Russ Blaine & Alan Coopersmith, + Sun Microsystems) + xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_init.c Xorg doesn't + reset console to text mode on Solaris x86 8 and later Bugzilla #469. + +commit c6c6d0de2309019999fa75a2f36a4f4a93ad2f31 +Author: Egbert Eich +Date: Thu Apr 15 10:17:35 2004 +0000 + + Merged changes from RELEASE-1 branch + +commit 9d24a5fa91bf165bbd2048a844edeb59b5e34aad +Author: Harold L Hunt II +Date: Wed Apr 14 00:01:22 2004 +0000 + + file XWinrc.man was initially added on branch CYGWIN. + +commit 01bb5eb5032a7566c86a51053146dba98a3ed749 +Author: Roland Mainz +Date: Tue Apr 13 03:16:46 2004 +0000 + + file psout_ftpstype3.c was initially added on branch XPRINT. + +commit cb3f3d8f2283d384dc5a3af3f38053cc8a2d192e +Author: Roland Mainz +Date: Tue Apr 13 03:16:46 2004 +0000 + + file psout_ft.c was initially added on branch XPRINT. + +commit 7cfb4c2b33ae2147b5d6ddc2afc8b777686a666f +Author: Roland Mainz +Date: Tue Apr 13 03:16:46 2004 +0000 + + file psout_ftpstype1.c was initially added on branch XPRINT. + +commit 4ae42e79d46d7db30f7b6f321bbb0d134862138d +Author: Roland Mainz +Date: Tue Apr 13 03:16:46 2004 +0000 + + file PsFTFonts.c was initially added on branch XPRINT. + +commit b5fb71922b02024aa5a8f349c9d2c956e2f83f0f +Author: Roland Mainz +Date: Tue Apr 13 03:16:45 2004 +0000 + + file xprint.sh was initially added on branch XPRINT. + +commit ca9a9a58be51a21f123b11dd68047034696cae84 +Author: Roland Mainz +Date: Tue Apr 13 03:16:45 2004 +0000 + + file xprint.csh was initially added on branch XPRINT. + +commit 7c1f840108172d6b18af47465ea72f4820640598 +Author: Roland Mainz +Date: Tue Apr 13 03:16:45 2004 +0000 + + file cde_xsessiond_xprint.sh was initially added on branch XPRINT. + +commit 579221198aeac7010435b29db1ad8fe9ee2d7c5d +Author: Roland Mainz +Date: Tue Apr 13 03:16:44 2004 +0000 + + file spooler.c was initially added on branch XPRINT. + +commit 7677b4992fee7eb73cc97914163dcf689ad13d6a +Author: Roland Mainz +Date: Tue Apr 13 03:16:44 2004 +0000 + + file spooler.h was initially added on branch XPRINT. + +commit d3907ca519b476c99e29a58c22258f22dbe63244 +Author: Roland Mainz +Date: Tue Apr 13 03:16:44 2004 +0000 + + file document was initially added on branch XPRINT. + +commit 3646bb9c894d5f011e2df4fac402118d8350102e +Author: Roland Mainz +Date: Tue Apr 13 03:16:39 2004 +0000 + + file spooltodir.sh was initially added on branch XPRINT. + +commit 8c006df3c6d8e5ac95f0b0fa38a030100541598f +Author: Roland Mainz +Date: Tue Apr 13 03:16:39 2004 +0000 + + file model-config was initially added on branch XPRINT. + +commit 95a84bc0cb809e5c7141d0411e329a3ec300b8aa +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file ZapfDingbats.pmf was initially added on branch XPRINT. + +commit 5527b39e668ea7a88c41186dbb6d7b66e892547a +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Times-Roman.pmf was initially added on branch XPRINT. + +commit 69c405ac66b1a15076e247dd1b578b7b4b210b00 +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Times-Italic.pmf was initially added on branch XPRINT. + +commit b6b75f677292ed0c694921df0abf40038dd5e99d +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Times-BoldItalic.pmf was initially added on branch XPRINT. + +commit 6605566bcf008551d33a9a68bd03e9a0c57c4f60 +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Souvenir-LightItalic.pmf was initially added on branch XPRINT. + +commit 38ad2972bffea1019214785ee479f7670ca70d1f +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Souvenir-Light.pmf was initially added on branch XPRINT. + +commit 10d8eace174a9778a3313ac36a3422637b020d5f +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Souvenir-DemiItalic.pmf was initially added on branch XPRINT. + +commit fb5ac8e2bdfe1217663679f5eae8045473456752 +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file NewCenturySchlbk-Roman.pmf was initially added on branch XPRINT. + +commit 5ec311b05dc1e509c115ccca808ee05090cfddad +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file NewCenturySchlbk-Italic.pmf was initially added on branch XPRINT. + +commit 70947a8f1addf4ca17e50d9e6ae590266ac446cc +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Symbol.pmf was initially added on branch XPRINT. + +commit 436ff77b21515cd9fe9732e0bd5361f2bfba44ed +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Times-Bold.pmf was initially added on branch XPRINT. + +commit 4db563027844245d6c9085f997e75da743410885 +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file NewCenturySchlbk-Bold.pmf was initially added on branch XPRINT. + +commit 79110faa2eac849756b859071ce68fba64de57aa +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file NewCenturySchlbk-BoldItalic.pmf was initially added on branch XPRINT. + +commit 4e1ae7e9cc04806f4436759764cc680ecf1f014c +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Souvenir-Demi.pmf was initially added on branch XPRINT. + +commit 433913bacf988908b94c420452c042eebcb381ac +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file LubalinGraph-Demi.pmf was initially added on branch XPRINT. + +commit d5bae63138ab833fdd56bb983436ac514536d7b6 +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file LubalinGraph-DemiOblique.pmf was initially added on branch XPRINT. + +commit 3acd6856617e784ee30333dc9b779189a3f44052 +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file LubalinGraph-Book.pmf was initially added on branch XPRINT. + +commit 5f73192458136fe4b6b82372c3b1653fbf831ebd +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Helvetica.pmf was initially added on branch XPRINT. + +commit e129abc3bf269e857aa65065cc18a31a56ba0373 +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Helvetica-Oblique.pmf was initially added on branch XPRINT. + +commit 576a4cddf995082d10e2e29e1b58c1564eb11ee7 +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Helvetica-BoldOblique.pmf was initially added on branch XPRINT. + +commit cf26c87833a79427b665abce67ca19f2b68bc8e5 +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Helvetica-Bold.pmf was initially added on branch XPRINT. + +commit a091408c372a2aa89fb83b023248f45aa8cd4173 +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Courier.pmf was initially added on branch XPRINT. + +commit 9e4221d08ff9a408fb25a32887390b14788b1558 +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Courier-Oblique.pmf was initially added on branch XPRINT. + +commit 6b2674078079a5959a2b7758e6c628a14ec1a46c +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Courier-BoldOblique.pmf was initially added on branch XPRINT. + +commit 6aee2d37b95170a65ee08c0866c425f115ebc9f1 +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file LubalinGraph-BookOblique.pmf was initially added on branch XPRINT. + +commit 7a59fe1dd987e1ef0abd92e0ac80dd87a15137fe +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file AvantGarde-Demi.pmf was initially added on branch XPRINT. + +commit 22e0316acc8992033fc82a38f663fce130e4031b +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file AvantGarde-DemiOblique.pmf was initially added on branch XPRINT. + +commit f8aded3a7f8c97731e33b4362243da947fb4e774 +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file AvantGarde-Book.pmf was initially added on branch XPRINT. + +commit 2224187c05d4dc05f7e03e22307cf7816d69f789 +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file AvantGarde-BookOblique.pmf was initially added on branch XPRINT. + +commit 9eafaaf83294d1988b30bde4485a299cf8ae5035 +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Courier-Bold.pmf was initially added on branch XPRINT. + +commit f9eea9864e333efde97143278916da44639cc18a +Author: Roland Mainz +Date: Tue Apr 13 03:16:38 2004 +0000 + + file ps2pdf_spooltodir.sh was initially added on branch XPRINT. + +commit 20248eedd69c42c27605d7bcfb265994f5846f17 +Author: Franco Catrin L +Date: Sun Apr 11 16:39:48 2004 +0000 + + fixed Changelog format + +commit bc7168ee763ffac9cbb992096a53b346cd640a13 +Author: Franco Catrin L +Date: Sun Apr 11 16:24:03 2004 +0000 + + Added ROP + +commit 784d37ee369b94c83c4cc6e280a39f32da8aa678 +Author: Franco Catrin L +Date: Sun Apr 11 15:51:04 2004 +0000 + + Fixed size calculation in solid rendering + +commit 056322336cbb6093d74aa9d22bbfd42e2248a16a +Author: Franco Catrin L +Date: Sun Apr 11 15:20:17 2004 +0000 + + Basic bitblt implementation + +commit c231856a1343e38381e1b4e545ff1ac279141bf0 +Author: Franco Catrin L +Date: Sun Apr 11 00:53:10 2004 +0000 + + First acceleration function implemented (DrawSolid) + +commit 47436a8af82a00d0d392cef4d5906729d9a37649 +Author: Franco Catrin L +Date: Sun Apr 11 00:15:57 2004 +0000 + + Finnally got MMIO working all timecat ChangeLog cat ChangeLog cat ChangeLog + :-D + +commit 1740b938e4c4f1cd3de700ea26143b01c0312325 +Author: Franco Catrin L +Date: Tue Apr 6 18:09:44 2004 +0000 + + Return back to VESA only version + +commit 07bc231872e7e056fa3049a0fcd963c61f826f80 +Author: Franco Catrin L +Date: Mon Apr 5 18:19:34 2004 +0000 + + small fixes, but still can't get this driver woking again + +commit b526276faa765df893197e04370a915ed73947dc +Author: Brent Cook +Date: Mon Apr 5 02:52:35 2004 +0000 + + removed hardcoded vesa references so we can operate with any backend. fbdev + works for initializing the screen, but input fails shortly after. + +commit 920e6ff81baeec16465f81bacbcff711ce82e149 +Author: Brent Cook +Date: Sun Apr 4 07:30:07 2004 +0000 + + Begin separating VESA calls into a more generic backend wrapper like the + ati driver, cascading between VESA and FBDEV. We only have init + functions done so far; need to add all of the others. Fixed some + compiler warnings. Whitespace and formatting cleanups (using 4 spaces, + no tabs) + +commit 530371ceaf7f593badf38bbc2d2e50f6a920d24f +Author: Brent Cook +Date: Sat Apr 3 22:26:37 2004 +0000 + + added touchscreen support, detect all known PCI chips in the Neomagic line. + We'll not bother with ISA for now. + +commit 962b898868dcab959c390986dcb0b4dd750dc107 +Author: Brent Cook +Date: Sat Apr 3 22:22:48 2004 +0000 + + initial import of original driver by Franco Catrin L. Wraps VESA for most + parts, with some hardware acceleration enabled for the cursor on the + NM2300. + +commit 8a2fce3b90b5efc8bab19675cb8e02690e24442e +Author: Harold L Hunt II +Date: Sat Apr 3 05:01:21 2004 +0000 + + file winkeyhook.c was initially added on branch CYGWIN. + +commit 12d5371ed2fbefab069dea46be972a7269b8c2db +Author: Stuart Kreitman +Date: Tue Mar 30 18:31:54 2004 +0000 + + file xfixes.h was initially added on branch DAMAGE-XFIXES. + +commit a4b319dbf375461c975450659723e6326153e536 +Author: Stuart Kreitman +Date: Tue Mar 30 18:31:54 2004 +0000 + + file xfixes.c was initially added on branch DAMAGE-XFIXES. + +commit 5319d30d45d5f8ec04a496327f32cc6431c6a511 +Author: Stuart Kreitman +Date: Tue Mar 30 18:31:54 2004 +0000 + + file select.c was initially added on branch DAMAGE-XFIXES. + +commit 76f247bd0ef23d688028c63b5f8bd3e9ad6b1b45 +Author: Stuart Kreitman +Date: Tue Mar 30 18:31:54 2004 +0000 + + file saveset.c was initially added on branch DAMAGE-XFIXES. + +commit 83f0f1babb612774f609c71879a225c43f63ac1f +Author: Stuart Kreitman +Date: Tue Mar 30 18:31:54 2004 +0000 + + file cursor.c was initially added on branch DAMAGE-XFIXES. + +commit 52bc7693dbe7e3db916f8d463d9a750e3c6ffa4d +Author: Stuart Kreitman +Date: Tue Mar 30 18:31:54 2004 +0000 + + file region.c was initially added on branch DAMAGE-XFIXES. + +commit 5d9098cb17cd88cfdf49de92bec2a787d6681649 +Author: Stuart Kreitman +Date: Tue Mar 30 18:31:54 2004 +0000 + + file xfixesint.h was initially added on branch DAMAGE-XFIXES. + +commit ace9aa7c45ff2ea6b3476006574da5c27d05afd4 +Author: Stuart Kreitman +Date: Tue Mar 30 17:41:24 2004 +0000 + + file damage.c was initially added on branch DAMAGE-XFIXES. + +commit 72dc7569c6bbc216f613be21ea4f79d3ef1d5534 +Author: Stuart Kreitman +Date: Tue Mar 30 17:41:24 2004 +0000 + + file damage.h was initially added on branch DAMAGE-XFIXES. + +commit 95da7b7e061b6925d8cd85bc7b25708ff253fcb1 +Author: Stuart Kreitman +Date: Tue Mar 30 17:41:24 2004 +0000 + + file damagestr.h was initially added on branch DAMAGE-XFIXES. + +commit 629c3792225cec28572081ebc8dda3fd803fe616 +Author: Egbert Eich +Date: Tue Mar 30 14:23:15 2004 +0000 + + 36. Conversion: __AMD64__ > __amd64__ (Egbert Eich). + 35. Fixed stretching option and centering in C&T driver (Egbert Eich). + 34. Added support for memory size tweaking in BIOS for i845 (Egbert Eich, + thanks to Christian Ziez) + 33. Removed video playback dependency on Accel in NSC drivers (Egbert + 3Eich). + 32. Fix HW cursor state on Savage driver when entering VT as some BIOSes + seem to enable it unconditionally (Egbert Eich). + 31. Fixed Emulate3Button message to distinguish between 'hard' (ie. + configured) and 'soft' (ie. automatic emulation that is disabled as + soon as the middle button is pressed) (Egbert Eich). + 30. Free XrmDB in XCloseDisplay() only when implicitely allocated by + XGetDefaults(). If Client allocates it itself it should free it also. + Trying to free it for the client may result in segfault if the client + has already freed it (Egbert Eich). + +commit b5e400867feab935aa04e9aadb12deb0601b7f83 +Author: Egbert Eich +Date: Tue Mar 30 14:14:31 2004 +0000 + + - backing out XFIXES and DAMAGE related code that accidentally went in + here. + +commit 0017ddaa6406524d0a86ff7020eed4c33758ddbd +Author: Stuart Kreitman +Date: Tue Mar 30 02:16:15 2004 +0000 + + file damageextint.h was initially added on branch DAMAGE-XFIXES. + +commit 4b5112fd0593b34e6e096d88b0841a28636600f6 +Author: Stuart Kreitman +Date: Tue Mar 30 02:16:15 2004 +0000 + + file damageext.c was initially added on branch DAMAGE-XFIXES. + +commit 733bfa4b5dd5255713a98f390a1fb65be6e16c2d +Author: Stuart Kreitman +Date: Tue Mar 30 02:16:15 2004 +0000 + + file damageext.h was initially added on branch DAMAGE-XFIXES. + +commit b1ed473ef2e1da99d7fe3df14fdef4d8b6365626 +Author: Harold L Hunt II +Date: Tue Mar 30 00:31:28 2004 +0000 + + file winrandr.c was initially added on branch CYGWIN. + +commit fec5095bdfb376d0046e2f52188c68bef4e31fd7 +Author: Keith Packard +Date: Sun Mar 28 07:14:30 2004 +0000 + + file xorgcfg.man was initially added on branch XORG-RELEASE-1-TM. + +commit 136a9364be80f407f498e9e9695cadaab39227ad +Author: Keith Packard +Date: Sun Mar 28 07:14:30 2004 +0000 + + file XOrgCfg.cpp was initially added on branch XORG-RELEASE-1-TM. + +commit 881afb356d6992bcfbbfcbdf31f1f71c64d648da +Author: Keith Packard +Date: Sat Mar 27 17:01:11 2004 +0000 + + file Xorg.man was initially added on branch XORG-RELEASE-1-TM. + +commit d2119ac7c56ba94db1d8639937b13e72288a328c +Author: Keith Packard +Date: Sat Mar 27 17:01:11 2004 +0000 + + file xorg.conf.man was initially added on branch XORG-RELEASE-1-TM. + +commit 5a9f3a36a35549f30fc67a8e3a3e9a201efb91ec +Author: Egbert Eich +Date: Fri Mar 26 20:02:03 2004 +0000 + + file xorgHelper.c was initially added on branch XORG-RELEASE-1-TM. + +commit b2b0e70fe5c65c8f2d518f5f0ce89a86938701ed +Author: Egbert Eich +Date: Fri Mar 26 19:54:39 2004 +0000 + + file xorgconf.cpp was initially added on branch XORG-RELEASE-1-TM. + +commit 83880dd464a415d3d0efa546b1f0b9887342e809 +Author: Alan Coopersmith +Date: Fri Mar 26 17:11:49 2004 +0000 + + 29. XkbWriteRulesProp fails if XkbRulesFile is NULL. Bug #376. (Alan + Coopersmith) + +commit 861a33678243349b987ff30912985968ede8ac84 +Author: Stuart Kreitman +Date: Fri Mar 26 01:22:18 2004 +0000 + + oops + +commit 23d552bbef2984afee889f82ded154478548ee15 +Author: Egbert Eich +Date: Thu Mar 25 11:00:52 2004 +0000 + + file xorg.cfg was initially added on branch XORG-RELEASE-1-TM. + +commit d1e52f13ad4610ec4907432c21384d08d6aaaf27 +Author: Stuart Kreitman +Date: Thu Mar 25 05:11:16 2004 +0000 + + oops + +commit f0336f18ee4106050104cb060c38fe87541615da +Author: Stuart Kreitman +Date: Thu Mar 25 03:45:49 2004 +0000 + + built,working DAMAGE/XFIXES in mono tree + +commit f1394ec3cec09ff9c5fbbff3c1f595a642b25f91 +Author: Torrey Lyons +Date: Wed Mar 24 22:15:25 2004 +0000 + + Change XFree86 Project to X.Org Foundation in localized XDarwin splash + screens. + +commit d2bbcc0deed3a607d347ed4ef07ded9bcb44f1bb +Author: Torrey Lyons +Date: Wed Mar 24 22:12:34 2004 +0000 + + Change XFree86 Project to X.Org Foundation in XDarwin splash screen. + +commit 84d25a5e178835234261a63f0a1b8131c01bbe1f +Author: Egbert Eich +Date: Wed Mar 24 15:58:45 2004 +0000 + + file xorgVersion.h was initially added on branch XORG-RELEASE-1-TM. + +commit 685d1630c1540e29644849254bd45708aa5763bb +Author: Egbert Eich +Date: Tue Mar 23 12:46:30 2004 +0000 + + file xorgconfig.man was initially added on branch XORG-RELEASE-1-TM. + +commit 6631bd586f74f89e2dce74fe1cc25ee982883323 +Author: Egbert Eich +Date: Tue Mar 23 12:46:30 2004 +0000 + + file xorgconfig.c was initially added on branch XORG-RELEASE-1-TM. + +commit 05a16f4acce3b6ef4ddafe044f96774de3f75b7c +Author: Alexander Gottwald +Date: Mon Mar 22 13:43:35 2004 +0000 + + file glwindows.h was initially added on branch CYGWIN. + +commit 3c2e2d9ae0704931737bb0879a49a8575a07d13b +Author: Kaleb Keithley +Date: Sun Mar 21 22:55:35 2004 +0000 + + bug #357. Fix XDarwin so it builds on Mac OS X 10.2 and earlier. Merged + down from -RELEASE-1-TM and -RELEASE-1 + +commit 122be5328ffea0a3b92612b8ea0f5b02736ac175 +Author: Kaleb Keithley +Date: Fri Mar 19 23:16:06 2004 +0000 + + no bug report. Restore Credits to the hw/darwin ddx that were deleted + previously. RTF may or may not be "human readable," but with a little + effort it's about as readable as SGML, IMNSHO. + +commit 551c93da612923f8d32707adc16431979bad6fb0 +Author: Harold L Hunt II +Date: Mon Mar 15 04:33:23 2004 +0000 + + file winkeynames.h was initially added on branch CYGWIN. + +commit 0c97b290015186acbaadae9a9bf79f37c3d38b40 +Author: Harold L Hunt II +Date: Mon Mar 15 04:33:23 2004 +0000 + + file winkeymap.h was initially added on branch CYGWIN. + +commit dae90c3af98edd5e95289abd930b3872c996c503 +Author: Egbert Eich +Date: Sun Mar 14 08:34:49 2004 +0000 + + Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 + +commit 4e996f9d76f51e9b1e33bef610bb9c2a746c8b9c +Author: Alexander Gottwald +Date: Fri Mar 12 21:05:47 2004 +0000 + + file winpriv.c was initially added on branch CYGWIN. + +commit c79b4bfd15534de12aaf8eca9965403b4913ca4b +Author: Alexander Gottwald +Date: Fri Mar 12 21:05:47 2004 +0000 + + file winpriv.h was initially added on branch CYGWIN. + +commit 24c02f84cc31475bfba27417dfef66b11c09b25c +Author: Harold L Hunt II +Date: Fri Mar 12 01:11:23 2004 +0000 + + file X-boxed.ico was initially added on branch CYGWIN. + +commit 45b638b87f0daf94f9fce566179775fb2889c663 +Author: Daniel Stone +Date: Wed Mar 10 11:49:11 2004 +0000 + + Twenty link errors for Xizzle now - count 'em. 20. + Get rid of all references to SCO. + Change SDK include dir to $(includedir)/xizzle. Add SDK libs where + necessary. + Reformat to be nicer and easier to shuffle around; also, fix lib ordering + so we get so much closer to the elusive final link. Shuffle + common/xf86Init.c into libxizzle.a. + Fix a couple of early snafus - s/BUILDXI/XINPUT/, et al; make the SDK stuff + conditional as needed; fix the SBus includes. + Name library os-support/libxizzleos.a, not os-support/foo/libxizzlefoo.a. + Clean up ARCH_SOURCES so it's always initialised to something. + Move linked libraries to _LIBADD, which somehow escaped my attention. Make + inclusion of drm/libxizzlelinuxdrm.a dependent on DRI. + s/VERSION/VBE_VERSION/; + Axe this redundant dir. + All Xizzle-specific: axe hw/xizzle/Xi, shuffle link order, fix list of + required modules to be vaguely sane, add some pertinent libs/incs. + +commit 519f76a0867fb2711d311b7929632408c3633e37 +Author: Alan Coopersmith +Date: Sun Mar 7 23:45:10 2004 +0000 + + 24. Update license for Xinerama code from DEC to the version requested by + Compaq for X11R6.5.1 that allows redistribution without written + permission from DEC. Originally X.org Defect #9263. freedesktop.org + bugzilla #283. (Alan Coopersmith) + +commit 505fe2ba307e9270627ca7f3cb6b4e1dbacc327b +Author: Egbert Eich +Date: Fri Mar 5 13:41:12 2004 +0000 + + 23. Merged with XFree86 4.4.0. Added changes that went into infected files. + Reverted darwin/bundle/**/Credits.rtf to XFree86 versions to avoid + future conflicts on ASCII but not humal readable files. (There should + probably be separate CreditsXorg.rtf files) (Egbert Eich). + +commit 1b22db1ebcf1ba98ca8519fa38210e275373f8f6 +Author: Alan Coopersmith +Date: Thu Mar 4 02:13:09 2004 +0000 + + 21. X server crashes when X-Resource has to byte-swap. Sun bug #5007488. + freedesktop.org bugzilla #267. (Alan Coopersmith) + +commit 47c9395969593a4e897e8c8110d5f2414e47b06a +Author: Alan Coopersmith +Date: Wed Mar 3 17:03:46 2004 +0000 + + file solaris-ia32.S was initially added on branch XORG-CURRENT. + +commit ed066cc67b1fca03fb38c80ecb8194b5b40963be +Author: Alan Coopersmith +Date: Wed Mar 3 17:03:46 2004 +0000 + + Enable inlining of assembly functions for inX/outX on Solaris 8 with Sun + compilers + +commit 867451f1ab7b9870621725bd4be3dd8694c364b8 +Author: Egbert Eich +Date: Wed Mar 3 12:12:50 2004 +0000 + + Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 + +commit 2934f0731b3d2bc9c1e25ceab26d9e0d9cadb054 +Author: Harold L Hunt II +Date: Tue Mar 2 20:00:16 2004 +0000 + + file winvalargs.c was initially added on branch CYGWIN. + +commit f72efebf280547c80ff7010e32f56416e7121164 +Author: Harold L Hunt II +Date: Tue Mar 2 19:26:34 2004 +0000 + + Replace a handful of calls to ErrorF and exit(1) with a single call to + FatalError. These direct calls to exit(1) made it impossible to do + anything ddx-specific in these cases; note that most of these calls + occur during argument processing. + +commit 7557d4da10cc482fcec40acadf7744b04c1615a0 +Author: Kaleb Keithley +Date: Tue Mar 2 19:00:06 2004 +0000 + + bug #230 Revert to Xinerama 1.1 In order to make a "quick" release it has + been decided that the priority is to preserve the server's internal + API/ABI so that third-party drivers that depend on symbols like + noPanoramiXExtension, etc., would not need to be recompiled. Toobad gcc + on Linux doesn't support ELF's weak symbols as that would have been a + reasonable solution for preserving the ABI. N.B.: While symbols, i.e. + functions and variables revert to the old name, I did not revert build + names, i.e. -DXINERAMA, to the old -DPANORAMIX. There was no need, and + it's just a build issue that has no impact on the binary output of the + build. + +commit 215a13aa8f537dcb62b0a2f6d335901ee47e9e9b +Author: Alan Coopersmith +Date: Mon Mar 1 16:38:20 2004 +0000 + + Add the .stab.indexstr section produced by Sun's compilers to the list of + SHT_STRTAB sections with debug information to ignore when loading ELF + objects. + +commit d87b05563dc13ba8d9825ec3bb772702dce6c9fe +Author: Harold L Hunt II +Date: Mon Mar 1 03:33:28 2004 +0000 + + file indirect.c was initially added on branch CYGWIN. + +commit f81d63ec5396c8d7f62ddd6ff6bab10b32493264 +Author: Kaleb Keithley +Date: Sun Feb 29 20:11:11 2004 +0000 + + bug #240 Instead of both Meta keys generating Meta_L, and both Alt keys + generating Alt_L, etc, fix the implementation so that you get Meta_L + for the left Meta key and Meta_R for the right Meta key. Ditto for Alt, + Control, and Shift. + +commit 6c412a43e42538a51d3a4d92a6db12b0b6cf0e9b +Author: Jaymz Julian +Date: Sat Feb 28 09:47:55 2004 +0000 + + sdl x server so that we can x-on-x the fb stuff for ease of debugging. if + anyone uses this in production, a big scary monster will eat them. hrm, + perhaps i should make it have a --i-know-what-i'm-doing param that it + doens't start without, heh + +commit bb93fef9877a885da2c6108410155fa996b19abf +Author: Kaleb Keithley +Date: Fri Feb 27 19:35:49 2004 +0000 + + bug #238 test for root-window that XFree86 fixed in their + programs/Xserver/Xext/shm.c + 3.37 and programs/Xserver/Xext/xvdisp.c 1.26 got zapped when Xinerama2 was + merged into the tree. (Xinerama has since been reverted to 1.1, but + that's another story.) + +commit cb718ce08eb25c3999c91b8d614fb88237fad03d +Author: Kaleb Keithley +Date: Fri Feb 27 16:17:12 2004 +0000 + + Revert to Xinerama 1.1 In order to make a "quick" release it has been + decided that the priority is to preserve the server's internal API/ABI + so that third-party drivers that depend on symbols like + noPanoramiXExtension, etc., would not need to be recompiled. Toobad gcc + on Linux doesn't support ELF's weak symbols as that would have been a + reasonable solution for preserving the ABI. N.B.: While symbols, i.e. + functions and variables revert to the old name, I did not revert build + names, i.e. -DXINERAMA, to the old -DPANORAMIX. There was no need, and + it's just a build issue that has no impact on the binary output of the + build. + +commit df0313d35bc89abe9374ed25533db283430716e0 +Author: Egbert Eich +Date: Thu Feb 26 13:36:15 2004 +0000 + + readding XFree86's cvs IDs + +commit 147aae87fde5edeed395f77e60f0f8e812d3b6af +Author: Egbert Eich +Date: Thu Feb 26 09:23:53 2004 +0000 + + Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 + +commit 8844423f890194bcb0419a38249029f1997c8c66 +Author: Stuart Kreitman +Date: Wed Feb 25 23:28:43 2004 +0000 + + file xevie.c was initially added on branch XEVIE. + +commit b052486adb9ea26f37be120966eb60cd3ac3db2f +Author: Kaleb Keithley +Date: Wed Feb 25 21:47:10 2004 +0000 + + bug #230 Revert to Xinerama 1.1 In order to make a "quick" release it has + been decided that the priority is to preserve the server's internal + API/ABI so that third-party drivers that depend on symbols like + noPanoramiXExtension, etc., would not need to be recompiled. Too bad + gcc on Linux doesn't support ELF's weak symbols as that would have been + a reasonable solution for preserving the ABI. N.B.: While symbols, i.e. + functions and variables revert to the old name, I did not revert build + names, i.e. -DXINERAMA, to the old -DPANORAMIX. There was no need, and + it's just a build issue that has no impact on the binary output of the + build. + +commit 14ab4ade74e946c09d633b15ab4d447d7b69ea29 +Author: Kaleb Keithley +Date: Tue Feb 24 15:22:40 2004 +0000 + + bug #214. Merge most of 4.4RC3 + +commit 9343c8f5ac180043c29ead5e83a3efef16d7b3f2 +Author: Kaleb Keithley +Date: Tue Feb 24 15:16:35 2004 +0000 + + bug #188, #214, see versions 1.1.4.3 and 1.1.4.4 of this file. fix bad + merge + +commit 03d893bff9bf5d6be9663a21cc983873d8e8d4c7 +Author: Kaleb Keithley +Date: Mon Feb 23 21:37:29 2004 +0000 + + merge most of XFree86 RC3 (4.3.99.903) from vendor branch. bug #214 + +commit 4ee0a53de870192d57c02baffa106b10bae6e0bf +Author: Kaleb Keithley +Date: Mon Feb 23 20:35:22 2004 +0000 + + Import most of XFree86 4.4RC3. This import excludes files which have the + new license. If we want to, later we can import 4.4RC3 again and pick + up the files that have the new license, but for now the vendor branch + is "pure." + +commit dcdd47ebbd4e9b5f4cbb598a5217004df0e80844 +Author: Kaleb Keithley +Date: Mon Feb 23 20:35:19 2004 +0000 + + Initial revision + +commit 30ac3efde2c3f08b98f31833df4ea7d87f33b092 +Author: Kaleb Keithley +Date: Mon Feb 23 16:32:14 2004 +0000 + + bug #188 report bugs to X.org bugzilla, not XFree86 + +commit d52f3ac58fd596fca392394f16acff84115f6e1d +Author: Alan Coopersmith +Date: Wed Feb 18 21:43:19 2004 +0000 + + Additional fixes to allow building with Sun compilers on Solaris x86 + +commit 07109fd63e0999905e6f7df8fd7f9c713d0dc2cc +Author: Alan Coopersmith +Date: Wed Feb 18 21:30:12 2004 +0000 + + Sun cc on Solaris x86 defines __i386 but not __i386__ so the x86 + architecture #ifdef should accept either form + +commit a27ffd2678ef76453c4fa27932462425d804df6d +Author: Warren Turkal +Date: Wed Feb 18 02:12:44 2004 +0000 + + completely get rid of NeedNestedPrototypes + completely get rid of NeedVarargsPrototypes + remove a lot of NeedFunctionPrototypes + ansify many function declarations + +commit d17586c4dc858d0127fa021e6db62f8cc28ef7a6 +Author: Alan Coopersmith +Date: Mon Feb 16 20:19:59 2004 +0000 + + [fd.o bugzilla #189] _XOPEN_SOURCE defines break builds on Solaris Express + +commit b146ef1548d36d6897fbd674f1c3b8324bed11a7 +Author: Warren Turkal +Date: Sun Feb 15 15:04:57 2004 +0000 + + Moving toward a working input extension. + +commit e90274c2bba1f66a68c2bc30ddb589dbf6fa0929 +Author: Egbert Eich +Date: Wed Feb 11 19:29:37 2004 +0000 + + 2. Fixing segfaults that may happen in some corner cases when VT switching + and during int10 initialization (Egbert Eich). + +commit 453a0743eb524da88dd364ccac86f35e61899e64 +Author: Kaleb Keithley +Date: Sun Feb 8 00:17:31 2004 +0000 + + revert to RC1 version of file with the license we like + +commit d6f33d897221450f3cfcc1162e2a6d09b227326e +Author: Kaleb Keithley +Date: Sun Feb 8 00:12:27 2004 +0000 + + revert to RC1 version of the file with the license we like + +commit bd20c8d340fce0700ae813bd5b55fe7f4b9e0c98 +Author: Jaymz Julian +Date: Thu Feb 5 09:09:51 2004 +0000 + + Polling input mode for the kdrive os layer. And a moose! + +commit af798d27743dbc4f70e85e297daa5863ec89640b +Author: Jaymz Julian +Date: Wed Feb 4 16:08:27 2004 +0000 + + More NULL checks. These ones are more useful than the last (which just made + debugging a bunch of problems easier), since you can implement less in + the basic simplest case driver now (not that i'm lazy, mind :-p) + +commit 3c64b65d805915e5c5628663113c54c3e9c3013b +Author: Egbert Eich +Date: Thu Jan 29 08:08:57 2004 +0000 + + Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004 + +commit 2ec70aa70133190ad31a83114fdb9a218e6aa8e6 +Author: Eric Anholt +Date: Sun Jan 25 05:31:24 2004 +0000 + + Disable GLX visuals code on !GLXEXT, and remove a useless prototype. + +commit 01e9cc858ac646b3140d1d85ea9c069bc708fb28 +Author: Eric Anholt +Date: Sun Jan 25 01:30:33 2004 +0000 + + - Add glx visuals code based on XFree86's Radeon driver. + - Reserve areas for back/depth/span when USING_DRI && GLXEXT. This would be + better in a TransitionTo3d, but we'd need to work with the offscreen + memory manager for that. + - Misc. fixes to ati_dri.c for DRI+GLX. Needs more work still. + +commit f2bedd17af7c3b9241c02dc1c899f32fc0cd2f10 +Author: Eric Anholt +Date: Sun Jan 25 01:16:19 2004 +0000 + + Oops, turn fallback output back off. + +commit 26c5a8dfdd2aa09db46c4cf963ca697df3e777ef +Author: Eric Anholt +Date: Sun Jan 25 01:04:12 2004 +0000 + + Whitespace cleanup. + +commit 6870c081572fcf32997e7906a54d09da0ca58ac3 +Author: Keith Packard +Date: Thu Jan 15 09:19:56 2004 +0000 + + Oops, lost a diff needed for the non-screen format pixmap code + +commit 3867e03cb63e49aeb1742a8a4bdaed0b7a23749e +Author: Keith Packard +Date: Thu Jan 15 09:15:53 2004 +0000 + + Fix up some mis-used variable names + +commit f233bbf3652327e62e03efbb8a355e6af2703a1c +Author: Keith Packard +Date: Thu Jan 15 09:13:01 2004 +0000 + + Accelerate non-screen format pixmaps. + +commit 751fb0374b12679f63c922adf0f0e7cadd83d861 +Author: Harold L Hunt II +Date: Thu Jan 15 06:06:44 2004 +0000 + + file winresource.h was initially added on branch CYGWIN. + +commit a265167f19e37aec2173c0ca6c9955450aa69941 +Author: Anders Carlsson +Date: Wed Jan 14 10:00:00 2004 +0000 + + Add IPAQ modeline by Dennis Noordsij. + +commit 6c97b277d9140b9d6bca047c56e303f6fc1d92e0 +Author: Eric Anholt +Date: Sun Jan 11 00:10:34 2004 +0000 + + Support 1x1 repeat sources in R128's Blend. + +commit 92702565657d48f1fcc2bae1b5989b1d6d3dd164 +Author: Eric Anholt +Date: Fri Jan 9 08:43:48 2004 +0000 + + Change PCI ID information field to be one of r128, r100, r200, r300. This + is all the information we need so far. Put that information into atic, + and use it correctly in the code (unlike before). + +commit 5d51dfc69cb245f6a1c7b106954a3365524741e2 +Author: Eric Anholt +Date: Fri Jan 9 08:40:32 2004 +0000 + + Use the scratch area for Composite when one of src or dst is in memory. + +commit 6d8001f4688e2149fcdd480401c46c7540680576 +Author: Eric Anholt +Date: Thu Jan 8 20:18:13 2004 +0000 + + Compile fixes for non-DRI case and for non-C99 compiler. + +commit 1be4b2d5e8048eb3653fad3a1267a0da865bcee8 +Author: Eric Anholt +Date: Thu Jan 8 08:25:49 2004 +0000 + + Forced commit: Previous commit included the removal of the 8192 scanline + limit on offscreen memory in the fbdev case. I remember daenzer (who + originally put that code in) saying he wasn't sure of it, and there + doesn't seem to be any reason for that limit given how acceleration is + done. + +commit b27729ec88f5d4153a0debfe2347bbed022329ba +Author: Eric Anholt +Date: Thu Jan 8 08:16:24 2004 +0000 + + - Add a new UploadToScratch kaa hook for putting the data for a single + pixmap into temporary offscreen storage. Subsequent UploadToScratch may + clobber the data of previous ones. This allows hardware acceleration of + composite operations on glyphs. + - Add a new UploadToScreen kaa hook for doing the actual moving of data to + framebuffer. This would allow us to do things like hostdata blits or + memcpy to agp and then blit. + - Add an UploadToScreen on ATI which is just memcpy, but which will be + replaced with a hostdata blit soon. + - Add UploadToScratch on ATI and reserve 64k of scratch space. This + provided a 3x speedup of rgb24text on my Radeon. + +commit d640cf4cb4e031a0e93dfd5955405847fe4475c0 +Author: Harold L Hunt II +Date: Thu Jan 8 05:10:33 2004 +0000 + + file winprocarg.c was initially added on branch CYGWIN. + +commit 77183abbc499c69fbbbae1d92a6b012c5f80b6c4 +Author: Harold L Hunt II +Date: Thu Jan 8 05:10:32 2004 +0000 + + file winglobals.c was initially added on branch CYGWIN. + +commit eb5bb9c1a16db308eae84ea45a5920c768d4a2ff +Author: Harold L Hunt II +Date: Thu Jan 8 05:10:32 2004 +0000 + + file winclipboardwrappers.c was initially added on branch CYGWIN. + +commit e93d468df21840007cbeea03ed545e75f0f0baf1 +Author: Harold L Hunt II +Date: Thu Jan 8 05:10:32 2004 +0000 + + file winauth.c was initially added on branch CYGWIN. + +commit 737eddfa4b6a8851e20823405b7269dd49c49b89 +Author: Eric Anholt +Date: Wed Jan 7 09:50:28 2004 +0000 + + Disconnect the sis300 driver. I've never managed to fix it, and it breaks + the build on PPC. + +commit 5a2c23f8a18767f0eb2fe2846ca3ba18fd236284 +Author: Eric Anholt +Date: Wed Jan 7 02:30:29 2004 +0000 + + Speed things up slightly by removing Z values from emitted vertices and by + emitting as a tri fan rather than a tri list. A rect list would save an + additional vertex (out of 4) per rectangle, but there's no measurable + speed difference and the tri fan may be useful when transforms come + into play. + +commit cff782078cec9b10606c5873816b7acd9977ce4d +Author: Eric Anholt +Date: Sun Jan 4 20:51:53 2004 +0000 + + - Don't forget to UNINIT miComputeCompositeRegion's regions + - Fix a bit of whitespace nearby. + +commit 34d1529731fff0cb61c71f76edc5c6499ece68d1 +Author: Eric Anholt +Date: Sun Jan 4 20:47:30 2004 +0000 + + - Correctly set the texture coordinate set source for the second texture + unit. + - Re-enable Radeon's Composite accel now that fonts work again. + +commit 9f1a92cd092e87f774ce4ed99d4b3e15f905d4f7 +Author: Eric Anholt +Date: Sat Jan 3 21:52:14 2004 +0000 + + - Call appropriate Done function for Composite. + - Don't allow src transforms for Copy acceleration. + - Minor whitespace fixes. + +commit 3db761a17b60b80acb83f365628b093f0ba6958c +Author: Eric Anholt +Date: Sat Jan 3 11:46:57 2004 +0000 + + - Add more Composite operations, including Saturate, to Radeon Composite + accel. I don't 100% trust that the math works for Saturate, but I can't + tell from existing information. + - Fix texture pitch fallback checks. + - Fallback when src or mask have transforms. + - Disable Radeon Composite accel until the offset thing is fixed. + - Set offscreenPitch to 64 on Radeon thanks to new information and a kaa + fix. Fixes acceleration at width!=1024. + +commit d15acfa79b64b8dab1e930ce8e5423a212a1360b +Author: Eric Anholt +Date: Sat Jan 3 11:25:27 2004 +0000 + + Split the various attempts at accelerating Composite into separate + functions. Along with making things more readable, it fixes a problem + where the coordinates would get messed up if acceleration failed due to + things like pixmaps being in the wrong locations. + +commit 1e1a35e20c1d281bc9700b349cda1e67f65905dd +Author: Eric Anholt +Date: Sat Jan 3 11:17:44 2004 +0000 + + Actually align the offset of allocated offscreen areas. + +commit 354f8f7e943d1a0732f4181420211efff27532b8 +Author: Eric Anholt +Date: Wed Dec 31 23:24:33 2003 +0000 + + Some strange \240 character snuck into the original commit of this file. + +commit 5f947b04da13256e5f514c40dedb98c6e1cbe0f1 +Author: Eric Anholt +Date: Tue Dec 30 08:45:53 2003 +0000 + + There's never a copy between different depths. Remove the check. + +commit c8eb20a08ee9174374b6f5ac6e79f31fce26e181 +Author: Eric Anholt +Date: Tue Dec 30 08:23:56 2003 +0000 + + - Add new Composite hook for kdrive drivers, which only ensures that the + pixmaps are offscreen and don't have alpha maps. It is the last case + checked before going to software fallback + - Use the new Composite hook in the ati driver to implement acceleration of + most Composites that get done in an xcompmgr environment on r100 series + cards. It is only available when using the DRM. There are still some + corruption issues, but the DRI is still non-default and I need to get + this into version control. + +commit adfc1ed8e1e150100accf014e46241201275138f +Author: Eric Anholt +Date: Mon Dec 29 09:04:20 2003 +0000 + + Add dependency lines so that servers are rebuilt when server libraries are + changed. + +commit df03e80ae9162ec87f503322ccbcf2846ad38bef +Author: Eric Anholt +Date: Mon Dec 29 06:24:01 2003 +0000 + + Merge dri-0-1-branch to trunk. Notable changes: + - Add libdrm and libdri. Portions of the DRI extension are stubbed out. + - Use the DRM in the ATI driver when available. This provides a minor + performance improvement in x11perf, and opens the possibility of using + the 3d hardware for acceleration in the future. + - Implement solid fill acceleration for Composite in KAA. + - Implement Blend hook for Composite and use it on r128. + - Fix a bug of mine that resulted in overuse of offscreen memory. + - Fix many miscellaneous bugs in ATI driver and add PCI IDs. + +commit 9bea538745f1a0c14faaac0e61dee5cf86f98dc6 +Author: Eric Anholt +Date: Sun Dec 28 09:56:54 2003 +0000 + + file kaa.h was initially added on branch dri-0-1-branch. + +commit fb8cd7454baec0bc0f693d222f3920ce03dde7c6 +Author: Eric Anholt +Date: Sun Dec 28 09:56:54 2003 +0000 + + file kaapict.c was initially added on branch dri-0-1-branch. + +commit f388f1509cb131cdf0675415214c9610d3d322c7 +Author: Eric Anholt +Date: Tue Dec 23 22:29:38 2003 +0000 + + file r128_blendtmp.h was initially added on branch dri-0-1-branch. + +commit 918958705dd97ce678b8901666c85fb359d0e013 +Author: Kaleb Keithley +Date: Sun Dec 21 13:39:58 2003 +0000 + + Use a different icon + +commit e97c634593dd171a05aa0fa5a35d218dcc3ecfb0 +Author: Kaleb Keithley +Date: Sat Dec 20 00:28:31 2003 +0000 + + merge XFree86 RC2 (4.3.99.902) from vendor branch + +commit 12e532010b9e8cb67bedd44d489c9c40dd265165 +Author: Kaleb Keithley +Date: Fri Dec 19 20:55:39 2003 +0000 + + XFree86 4.3.99.902 (RC 2) + +commit 4b75c7f6358b28978b05ffa4b73853d936454f50 +Author: Kaleb Keithley +Date: Thu Dec 18 19:32:17 2003 +0000 + + First pass at "Standard" Xinerama. The sources for this came from Heather + Lanigan's xinerama tree on Sourceforge.Net. No attempt has been made to + handle previous, non-standard versions of the protocol. Nor has any + attempt been made to preserve the ABI of previous versions -- that part + will be added at a later time, and then probably only on systems that + have nice object/linker semantics, e.g. ELF systems with weak symbols. + +commit 305c444de3baa863d7abc4221e8cebb973805847 +Author: Eric Anholt +Date: Mon Dec 8 01:55:10 2003 +0000 + + Add initial SiS 300-series (300, 305, 540, 630, 730) driver based off of + the ATI driver. It suffers from hw/sw synchronization problems, it + looks like, but may be good enough to work on Render acceleration + experiments. Committing it as-is so I don't lose it again. + +commit 8a7481a27496c842ec2ef5bac5e4d0b5e6279deb +Author: Kaleb Keithley +Date: Sat Dec 6 13:24:29 2003 +0000 + + merge XFree86 4.3.99.901 (RC1) from vendor branch + +commit e82928826f60a2e76a670c936bd557838fc1764c +Author: Kensuke Matsuzaki +Date: Fri Dec 5 03:37:26 2003 +0000 + + file winwin32rootlesswindow.c was initially added on branch CYGWIN. + +commit fc40d0a3cbee053d446032ae3150b06edf66a335 +Author: Kensuke Matsuzaki +Date: Fri Dec 5 03:37:26 2003 +0000 + + file winwin32rootlesswndproc.c was initially added on branch CYGWIN. + +commit c3f26a1b989dbbf5167e6e352aebf2f53bfcc442 +Author: Kensuke Matsuzaki +Date: Fri Dec 5 03:37:26 2003 +0000 + + file winwindowswm.c was initially added on branch CYGWIN. + +commit 0f06636a9a088fc27262da0f0bc9a20a3dbeab69 +Author: Kensuke Matsuzaki +Date: Fri Dec 5 03:37:26 2003 +0000 + + file winwin32rootless.c was initially added on branch CYGWIN. + +commit a84f16a9ad2ed0f874d2c1816aedee96725d2657 +Author: Kaleb Keithley +Date: Thu Dec 4 22:03:38 2003 +0000 + + XFree86 4.3.99.901 (RC 1) + +commit 33fdd50a94baab1db342bfce442907db8f8ad03e +Author: Keith Packard +Date: Tue Dec 2 01:59:38 2003 +0000 + + Wrap ClipNotify to see region motions during MoveWindow. + Check window reorigin in PositionWindow and bump pixmap serial numbers to + revalidate GCs. + Fix picture clip region origin in automatic update + Initialize client private 'critical' value + Clean up pixmap bounds checking code to only affect contents allocated by + fb. + Oops. Call SourceValidate for Composite operations. + Add Xchips server (vesa based) + +commit 6db77925406a0ee600998ad558a50190ba631649 +Author: Eric Anholt +Date: Mon Dec 1 22:56:06 2003 +0000 + + file radeon_sarea.h was initially added on branch dri-0-1-branch. + +commit 313046b42832fa2434d617997d5701157b55e7c8 +Author: Eric Anholt +Date: Mon Dec 1 22:56:06 2003 +0000 + + file radeon_common.h was initially added on branch dri-0-1-branch. + +commit 2ad126286e524392741164babe530210892c377f +Author: Eric Anholt +Date: Mon Dec 1 22:56:06 2003 +0000 + + file r128_sarea.h was initially added on branch dri-0-1-branch. + +commit f486c136ad8d2d893cdf3aee6aa752578a6809d7 +Author: Eric Anholt +Date: Mon Dec 1 22:56:06 2003 +0000 + + file r128_common.h was initially added on branch dri-0-1-branch. + +commit 1eb63ef1b5d0ce10117196df3e81e8312a55a93c +Author: Eric Anholt +Date: Mon Dec 1 22:56:06 2003 +0000 + + file ati_sarea.h was initially added on branch dri-0-1-branch. + +commit 1fa5f28406f8a7ad54049e4bec129953149bd3ed +Author: Eric Anholt +Date: Mon Dec 1 22:56:06 2003 +0000 + + file ati_dri.c was initially added on branch dri-0-1-branch. + +commit 14ce4f2c3ebc20e5f6d57adda0a7e14229541a72 +Author: Eric Anholt +Date: Mon Dec 1 22:56:06 2003 +0000 + + file ati_dri.h was initially added on branch dri-0-1-branch. + +commit 8887456e7d4fc1280287ed3e35c6c4464525827b +Author: Eric Anholt +Date: Mon Dec 1 22:56:06 2003 +0000 + + file ati_dripriv.h was initially added on branch dri-0-1-branch. + +commit 6c9e7f47357b02f41b9f1f43f7f1d9b5a139e5b6 +Author: Eric Anholt +Date: Mon Dec 1 22:56:06 2003 +0000 + + file ati_draw.h was initially added on branch dri-0-1-branch. + +commit 2ad20d4e99d0d8ecb922507e0bfead8b7b7d4a55 +Author: Eric Anholt +Date: Mon Dec 1 22:56:06 2003 +0000 + + file ati_drawtmp.h was initially added on branch dri-0-1-branch. + +commit ae2454f65698eef66b3507e586e4f8125cb1790d +Author: Anders Carlsson +Date: Mon Dec 1 22:11:12 2003 +0000 + + Add support for setting the video mode. + +commit e31051ba26c18f6232798c5a5c4725f5ce53d6b9 +Author: Phil Blundell +Date: Mon Dec 1 21:49:41 2003 +0000 + + Call KdShadowUnset before fbdevSetShadow. + +commit 9cdd6fd9e3d6e44adf392279093f92fb6678a49c +Author: Eric Anholt +Date: Mon Dec 1 04:33:36 2003 +0000 + + - Add fbdev mode-setting backend to Xati. It and vesa are compiled in when + available, with fbdev being used by default. + - Use depth 16 by default when vesa backend is used. + - Add MMIO defines for PowerPC (should be in a common location). + Many thanks for Michel Daenzer for much of this code. + +commit ec7f5539302fafd1ac7609ac423f1379f54916ab +Author: Eric Anholt +Date: Mon Dec 1 03:15:13 2003 +0000 + + Add more RV250 PCI IDs. + +commit d221c484f9521c780fc3c7e88833c62e50463c6d +Author: Eric Anholt +Date: Mon Dec 1 01:46:42 2003 +0000 + + Remove sys/io.h inclusion from some files that didn't need it, and change + asm/io.h to sys/io.h in vga.c, which newer Linux complains about. + +commit 5fd7f82390d78621a8aad959eb216b8fb7e1a97f +Author: Kaleb Keithley +Date: Sun Nov 30 16:47:13 2003 +0000 + + xfree86 merge + +commit 77836ebda2a47e04c56c5842f62fab5992909712 +Author: Kaleb Keithley +Date: Sat Nov 29 16:08:53 2003 +0000 + + xfree86 merge + +commit 88193e928be7cf5a526b50ad1e0b4ac9cddef297 +Author: Kaleb Keithley +Date: Sat Nov 29 15:10:02 2003 +0000 + + xfree86 merge + +commit 0097b6fe2d1739e46e4e7726aaa481b6dc84870c +Author: Kaleb Keithley +Date: Wed Nov 26 22:49:07 2003 +0000 + + merge latest (4.3.99.16) from XFree86 (vendor) branch + +commit d803918a9fb5f80a2d6e4b711d8e43916cd09da5 +Author: Eric Anholt +Date: Tue Nov 25 22:39:54 2003 +0000 + + Add new Radeon 9200 PCI IDs. + +commit adc7f9a4ebdfe11d4cd6de9388b63dfe36450b39 +Author: Kaleb Keithley +Date: Tue Nov 25 19:29:01 2003 +0000 + + XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks + +commit 90f1536dd315cd265bfc7ef35058761a65a01734 +Author: Kaleb Keithley +Date: Tue Nov 25 19:29:01 2003 +0000 + + Initial revision + +commit d461855a73d8c9f51a18673aef7ce88f94a71629 +Author: Eric Anholt +Date: Sun Nov 23 10:12:04 2003 +0000 + + - Fix Radeon offscreen pixmap pitch alignment. + - Remove usleeps from idle and waitavail code, recommended by keithp. + - Add a workaround for apparent broken acceleration with Rage 128 and + offset alignment with 8-bit acceleration (24-hack and plain 8-bit). + - Minor cleanup of setup code. + +commit 8e09afe657b110bc1ea9e58dea81a120c343d16e +Author: Eric Anholt +Date: Sun Nov 23 02:08:16 2003 +0000 + + Add RV250 PCI IDs. + +commit b3247251fb7d9f2d50ef41d9c2089629544d534d +Author: Eric Anholt +Date: Thu Nov 20 07:49:46 2003 +0000 + + - Fix a bug in pitch alignment for offscren pixmaps. + - Add 24-bit acceleration for Xati using the 8-bit trick from mach64. + - Add offscreen pixmap support to Xati. + +commit 41dde24b229f4bc4738637d9cd0a86b74b9f8457 +Author: Eric Anholt +Date: Thu Nov 20 00:05:56 2003 +0000 + + - Fix confusion of depth/bitsPerPixel in ati_draw.c + - Disable acceleration with 24bpp due to apparent broken acceleration. + Accel at 24bpp was the cause of the crashes when people tried to use + any depth over 16. XFree86 doesn't support 24 either. + - Disable at < 8bpp, too. + - Add the other Rage 128 PCI IDs. + - Remove unnecessary setting of scissor registers (only default scissor + gets used). + +commit 7abbcce4222958b4670873a17f67ea1ec1d958e2 +Author: Eric Anholt +Date: Wed Nov 19 08:32:38 2003 +0000 + + - Add PCI information (device/vendor id, bus location) to KdCardAttr to + help with ati, and future DRM drivers. + - Add new "ati" kdrive driver. It has ancestry in the r128 driver from + andersca, but took a detour through being the WIP SiS 300 driver on the + way. It supports Radeons (tested on QD VIVO and 7500) and Rage 128. + Current limitations include that it requires depth 16 and that the + other Rage 128 PCI IDs aren't included yet. + +commit e9cb70dae0a85fcd116d7ffac73d1322ec282a94 +Author: Keith Packard +Date: Tue Nov 18 18:38:48 2003 +0000 + + Reset available offscreen segment save function pointer. (Not a functional + change, just cleaning up a bit) + Reset the screen->memory_base value when frame buffer is remapped. This + makes sure new off-screen allocations point at the newly mapped region + rather than the old (now unmapped) region. + +commit f333581b7b4066ab054dd765a1c9bae0f3407188 +Author: Seth W. Klein +Date: Tue Nov 18 04:53:16 2003 +0000 + + Added infrastructure for driver specific usage messages and added vesa + usage message. + +commit 003e87717cfe378261ed1a1e7bcb2cf0d200b1b8 +Author: Keith Packard +Date: Mon Nov 17 22:09:12 2003 +0000 + + Recompute winSize/borderSize to fix them when changing redirection. + Sufficient, but not always necessary. + Add borderClip to damage on creation so that clients needn't guess. + Fix API to FbDots functions to make PolyPoint work with screen_x/screen_y + offsets + Add debugging code to make sure no pictures are left pointing at freed + pixmaps. "Can't" happen, but it did once. + Change KdOffscreenArea structure to eliminate separate private structure, + eliminate the ScreenPtr, change from doubly linked to singly linked + list. + Don't damage BackgroundNone windows on PW_BACKGROUND. Re-clip damage to + borderClip in DamageSubtract. + +commit c57959ad6a4c0f5329762f401fd7871ffb2ee90c +Author: Kaleb Keithley +Date: Mon Nov 17 19:03:47 2003 +0000 + + merge XFree86 4.3.0.1 to -CURRENT + +commit acd200770513ad03dd3f4bdc7448edfd69b1ff9d +Author: Keith Packard +Date: Mon Nov 17 06:54:52 2003 +0000 + + Clear window when Manual Subwindows redirect is destroyed + Fix Tile/Stipple origin with non-zero pixmap window origins + Use computed depth for TrueColor visuals as fbdev doesn't have one. + +commit d568221710959cf7d783e6ff0fb80fb43a231124 +Author: Kaleb Keithley +Date: Fri Nov 14 16:49:22 2003 +0000 + + XFree86 4.3.0.1 + +commit 9508a382f8a9f241dab097d921b6d290c1c3a776 +Author: Kaleb Keithley +Date: Fri Nov 14 16:48:57 2003 +0000 + + Initial revision + +commit ded6147bfb5d75ff1e67c858040a628b61bc17d1 +Author: Kaleb Keithley +Date: Fri Nov 14 15:54:54 2003 +0000 + + R6.6 is the Xorg base-line + +commit cb6ef07bf01e72d1a6e6e83ceb7f76d6534da941 +Author: Keith Packard +Date: Fri Nov 14 07:46:20 2003 +0000 + + Accelerated image text code drew glyphs at wrong location when compositing + manager enabled. + +commit 318d525bf2fe52b059b1568e9b31d144b297a781 +Author: Keith Packard +Date: Thu Nov 13 09:14:29 2003 +0000 + + Have the composite extension tell the damage extension about clients which + have redirected subwindows in manual mode. Those clients are marked + Critical and given a significant scheduling boost whenever they receive + a damage notify event. This dramatically improves update frequency. + If the kernel reported a large number of keys, readKernelMapping would walk + off the end of the kdKeysym array. + Fix usage of _IOWR; the 'size' argument is actually a datatype. + +commit e9904cefa39e1c9d3c7bf2f335dbafb23809cdba +Author: Eric Anholt +Date: Tue Nov 11 05:46:15 2003 +0000 + + Fix Makefile.am's to include header files needed for distcheck. Remove + -Werror default and add --enable-werror switch to add it back. + +commit 5dc119b73ffcae32c2d470b734dfa2f8af58e77e +Author: Keith Packard +Date: Mon Nov 10 20:35:05 2003 +0000 + + Fix KdXv interface to pass drawable down so that bits can be put into + drawable pixmap rather than directly into the frame buffer. Rewrite + logic in kdoffscreen to make space for new allocations, now deals + correctly with locked areas. + +commit e500986657ea8b4e14a1ff4730ecda4583c75277 +Author: Keith Packard +Date: Mon Nov 10 06:40:23 2003 +0000 + + Must offset composite parameters by drawable coordinates in accelerated + case. + +commit d694b44259ff51cfca2c3ec9a58bf164010cc1ad +Author: Phil Blundell +Date: Sat Nov 8 18:51:59 2003 +0000 + + Avoid ugly shell error when libXdmcp isn't present. + New functions. (TsInit): Register them. + +commit 3e18c6363454aa87e1ad8c121019bab185e613b8 +Author: Keith Packard +Date: Sat Nov 8 00:28:19 2003 +0000 + + Fix KAA to work with screen_x/screen_y hacks from COMPOSITE Also add + kaaComposite acceleration for simple bltblt case. + +commit 1280f79054dc16ccf321006cd2de53e0f53c7b70 +Author: Keith Packard +Date: Fri Nov 7 23:29:29 2003 +0000 + + Ok, Composite extension is semi-working; when no-one asks for redirection, + the server seems to act as before. With RedirectSubwindows (root, + automatic), the server looks just like a regular X server. Now to go + rewrite the (currently lame) compositing manager to get some real + action on the screen. + Some of the fixes here are to make valgrind quiet with various ioctls used + by kdrive/linux. + Also fixed a bug where fbdev initialization was out of order in fbdev.c and + smi.c + +commit d319a0a610c90524ad29cab3c6d4d21b5298fc7f +Author: Phil Blundell +Date: Fri Nov 7 23:00:06 2003 +0000 + + Fix warnings. + +commit 598c5d549abbb819f3391a2c88432941b546a213 +Author: Matthew Allum +Date: Thu Nov 6 14:01:46 2003 +0000 + + tslib improvements + +commit 7e1a564c416f6dc337a0021b1c0e1f2cb3b27296 +Author: Keith Packard +Date: Wed Nov 5 06:46:13 2003 +0000 + + Replace translucent compositing hacks with PictOpSrc to match eventual + extension semantics. Replace mouse acceleration with quadratic. + +commit 5378236aa647ec9a723a3e5fbd2a57eb286a1938 +Author: Keith Packard +Date: Sun Nov 2 19:56:10 2003 +0000 + + merge xfixes_2_branch back to HEAD + +commit 9e94665cf9cf0f74dff5b3cdaa4cde99e234fa45 +Author: Phil Blundell +Date: Tue Oct 28 22:28:33 2003 +0000 + + try /dev/misc/apm_bios if /dev/apm_bios doesn't exist + +commit bb99451f275827da580dcfa3b66cd0705fcc900a +Author: Phil Blundell +Date: Tue Oct 28 22:27:35 2003 +0000 + + move smi into VESA_SUBDIRS + +commit 9a05f8f7858641b780046ad69d61f21ccbb93db8 +Author: Keith Packard +Date: Sun Oct 19 20:46:23 2003 +0000 + + Minor cleanups -- remove a couple of bogus KdCheckSync calls, restructure + KdOffscreenSwapOut to avoid unneeded 'continue' + +commit 16b2ea64e7e0bd32d6dba078b4891167bd335d44 +Author: Keith Packard +Date: Thu Oct 16 08:03:25 2003 +0000 + + Discard/reconstruct list of offscreen areas on VT switch so no allocations + can occur while switched away. + Set type of off_screen_areas member to actual type instead of pointer + +commit f4bcd36a386116c450ea6893ab3d08e81cea663b +Author: Anders Carlsson +Date: Wed Oct 15 05:34:54 2003 +0000 + + Add a memory_base variable and use it. + +commit f5916edb172738c73c8f78b23981abfd8d03a079 +Author: Keith Packard +Date: Wed Oct 15 04:59:45 2003 +0000 + + hw/kdrive/*/Makefile.am Libraries in local dir must not use global path or + make doesn't build things in the right order (-j) + hw/kdrive/mga/mga.h, mgadraw.c Fix warnings + +commit b3e47ce18ff9c86833fc6302b1e074912edce404 +Author: Keith Packard +Date: Wed Oct 15 01:00:38 2003 +0000 + + various Split out pixmap allocation debug statements Fix bogus offscreen + pixmap size test Add migration to composite function for source + operands + VbeDPMS Remove extraneous call to VbeGetVib. + +commit 28bcd2efd134bfea3daa0738c9155b36cdf84168 +Author: Keith Packard +Date: Tue Oct 14 21:33:04 2003 +0000 + + Avoid attempting acceleration on non-screen formats (for now) + Offscreen allocator API changes. + +commit cb46169759a833605b78409ae68c9fb57618ceba +Author: Keith Packard +Date: Tue Oct 14 21:10:53 2003 +0000 + + Use same assumptions as layergc about what layer kind is approprate for + unwrapping pixmap operations. This makes sure the accelerated code gets + invoked for pixmaps + Add pixmap migration support to kaa. Can't quite automatically migrate + pixmaps off-screen, but soon we will. Can kick objects out of video + memory. Move per-screen linked list pointers to pixmap private. Wrap + Composite in preparation for migrating pixmaps. Have kasync ignore + drawable type so that pixmaps trigger sync Add KdOffscreenFini to + cleanup on server reset. Switch off screen area to have only a 'save' + function; moving objects to off screen memory is done by saving then + freeing the area. + +commit 109b94951654171ada94e2ffb29568b8a1bcde77 +Author: Keith Packard +Date: Tue Oct 14 05:08:35 2003 +0000 + + -Wall fixes. Might have fixed VESA based DPMS code as a result + +commit 4b844cafb2516139c8407822b61939cd6c743742 +Author: Keith Packard +Date: Tue Oct 14 05:07:39 2003 +0000 + + Check for off-screen pixmap support in KaaDrawableIsOffscreenPixmap. -Wall + fixes. Allocate pixmap private space only for screens with off-screen + pixmap support + +commit cdf3377f6d3789628495ac64df80ac7dc235e46d +Author: Keith Packard +Date: Tue Oct 14 05:05:53 2003 +0000 + + -Wall fixes. Support off-screen pixmaps + +commit 777f31cd0b5ec387d975e6d10ae73fa325e4c311 +Author: Keith Packard +Date: Tue Oct 14 05:05:28 2003 +0000 + + -Wall fixes. Add klinux.h to export function declarations + +commit a398339b6d5209a11af93a3b836b0cad326a0799 +Author: Keith Packard +Date: Tue Oct 14 05:04:22 2003 +0000 + + -Wall fixes + +commit 44f2e82f1b463e272f4e521561f74eb14bf24082 +Author: Anders Carlsson +Date: Mon Oct 13 02:19:47 2003 +0000 + + Use pixmaps instead of drawables in the kaa functions. Have the mga server + support accelerated operations on offscreen pixmaps. + +commit 47a9fab5e286c5224047690482a2cb36a3c17b88 +Author: Anders Carlsson +Date: Mon Oct 13 01:19:37 2003 +0000 + + Add support for offscreen pixmaps. + +commit c538fa874257a2cbf53f329d3982e7a01fefe629 +Author: Anders Carlsson +Date: Mon Oct 13 00:56:21 2003 +0000 + + Fix a couple of bugs. + +commit a50438b4709b32ec869e232628971b0dccd27adf +Author: Anders Carlsson +Date: Mon Oct 13 00:19:58 2003 +0000 + + Add offscreen memory manager and update the servers to reflect the name + change for the kaa structure. + +commit 307f3dbd10e0c8e392865e85e9e3e4dff108df02 +Author: Anders Carlsson +Date: Sun Oct 12 14:17:24 2003 +0000 + + Remove this for now. + +commit ab3305d0ac805d0c9e917c35b316d9b58dde2187 +Author: Anders Carlsson +Date: Sat Oct 11 19:36:13 2003 +0000 + + Add ATI Rage 128 server. + +commit ed98d3814ee65cd9fd18eeadbd20c8fc6b4ab342 +Author: Keith Packard +Date: Thu Oct 9 23:35:44 2003 +0000 + + use #if instead of #ifdef + +commit 4dd37de858464c576bfdcd10255a8e233a5b05d5 +Author: Anders Carlsson +Date: Thu Oct 9 16:21:24 2003 +0000 + + Build smi after vesa. + +commit e5a1c9952f7d621493f08257c8b9456b7608c55a +Author: Keith Packard +Date: Thu Oct 9 07:29:31 2003 +0000 + + Initialize smi chip on graphics setup. Seems to help some. + +commit 10f721acc5e59ea4152b94246b62963f2ff9d678 +Author: Keith Packard +Date: Thu Oct 9 07:12:01 2003 +0000 + + Leave iopl set to 3 so vesa module will work + +commit f74555e94264e6f703d399a5e0475c7283e20a88 +Author: Keith Packard +Date: Thu Oct 9 06:36:26 2003 +0000 + + Add xfixes, fix smi driver to use either fbdev or vesa. Add hole mapping to + vesa server by default + +commit 346aff7ef6f47a191c7f134b7843a634189b9e83 +Author: Keith Packard +Date: Thu Oct 9 06:35:11 2003 +0000 + + Use either vesa or fbdev, selectable at compile time + +commit adc5b8068d5532a6f3f23e64d3c668a22d5b1504 +Author: Keith Packard +Date: Sun Oct 5 05:22:35 2003 +0000 + + Fix fbdev server to allow accelerated servers on top to use RandR. Switch + smi server to fbdev (vesa bios doesnt work on the Acer I have here) + +commit f3d8476ced1e3ba4b4ca7c9e23e98c2cc7ffcc14 +Author: Phil Blundell +Date: Sat Oct 4 02:56:54 2003 +0000 + + few more fixes for h3600 ts + +commit aae3e6dcb3d72eba6d7d8d99079782ed1bfe63bd +Author: Keith Packard +Date: Sat Oct 4 02:43:16 2003 +0000 + + configure.ac Makefile.am os/oscolor.c Xext/saver.c Xext/Makefile.am + hw/kdrive/linux/ts.c hw/kdrive/src/Makefile.am hw/kdrive/src/kdrive.h + hw/kdrive/src/kinput.c hw/kdrive/src/kmap.c Autodetect VM86 (for vesa), + AGPGART, APM, MTRR, tslib and handhelds.org touch screen. Add + USE_RGB_BUILTIN and code for fileless RGB database. Add + MIT-SCREEN-SAVER + +commit efbf205a2ac4792b71d39f8fe3ef3b1cf12697c0 +Author: Phil Blundell +Date: Fri Oct 3 15:27:46 2003 +0000 + + add --disable-kdrivevesa option + +commit 89a536f349525e642bb4cd233bc47864ed4a6ad7 +Author: Keith Packard +Date: Thu Oct 2 02:30:28 2003 +0000 + + Add smi server + +commit 5a21f4f4d0c03e0e34f1979fd7cec8f0d19b00d4 +Author: Keith Packard +Date: Wed Oct 1 06:43:50 2003 +0000 + + Add XDM cookies. Fix up support for pkgconfig X bits + +commit a42e31b28c493dc3d6b32cde4e72ff17fc983183 +Author: Matthew Allum +Date: Tue Sep 30 22:14:59 2003 +0000 + + Fixed tslib driver to handle VT switches + +commit a0876ade6479c40dcef63f70f4c6c5a5988edeba +Author: Keith Packard +Date: Tue Sep 30 20:49:47 2003 +0000 + + Enable maintainer mode from autogen.sh. Fix vesa build to create library + before program. Remove bogus AC_SUBST lines for XSERVER_CFLAGS and + XSERVER_LIBS + +commit e8c02296476f068bc8158d112dc15df00dddac2a +Author: Matthew Allum +Date: Tue Sep 30 20:15:14 2003 +0000 + + Added --enable-tslib configure option + +commit a42384e9356ec79510682bacf08410e87d7102ff +Author: Keith Packard +Date: Mon Sep 29 01:42:40 2003 +0000 + + Use other freedesktop.org packages to build the server + +commit 6a098a88af174db1674662c09e2385b4e6e0bb4e +Author: Anders Carlsson +Date: Wed Sep 24 23:36:54 2003 +0000 + + Add beginnings of offscreen memory manager. + +commit 918a8273eeabcb14fc82742cc68223d8a7c2a67a +Author: Keith Packard +Date: Wed Sep 24 21:07:06 2003 +0000 + + hw/kdrive/src/kdrive.c + hw/kdrive/src/kdrive.h Add -switchCmd option to set command that is + executed whenever the VT is enabled or disabled. This permits input + device to be customized by external apps when switching to X. + +commit 20bbd750d0d359e55cbdcc86aeea6013ac665bce +Author: Anders Carlsson +Date: Mon Sep 22 21:14:59 2003 +0000 + + Accelerate server. + +commit 49771e3f074cae3947b0084e6514a19dc4c4cad1 +Author: Anders Carlsson +Date: Thu Sep 18 20:48:48 2003 +0000 + + Add mga server to the build. + +commit 07ab15d61d2468fc858453cdabe7296d19fc9e10 +Author: Anders Carlsson +Date: Thu Sep 18 20:47:43 2003 +0000 + + Add mga server + +commit b260825e880615f589e2bad35491ebb598e21a0f +Author: Anders Carlsson +Date: Thu Sep 18 14:44:57 2003 +0000 + + Try this. + +commit b889d4ba2c2e59769a3ff6fd00ee5bb395108827 +Author: Anders Carlsson +Date: Thu Sep 18 14:42:00 2003 +0000 + + Try things out. + +commit 85ff67670c6216a8c4368a8bd70fd0434a4e0aca +Author: Anders Carlsson +Date: Tue Sep 16 21:07:16 2003 +0000 + + Add fbdev server to the build. + +commit be12dcdcf39a30f69fe73cbb5a4acacef8024db6 +Author: Keith Packard +Date: Fri Sep 12 07:00:19 2003 +0000 + + Switch to freedesktop.org libXfont + +commit eca43a59ec95646836f9704714823249a15747fa +Author: Keith Packard +Date: Fri Sep 12 01:51:16 2003 +0000 + + Clean up mach64 for autofoo + +commit 6b16b827bb125b43b41b7f8558991e90ada316de +Author: Keith Packard +Date: Fri Sep 12 01:49:46 2003 +0000 + + Add some configure options, make the mach64 server build + +commit ce55d3234dc34157f0fc8059a6793cdd17fa4519 +Author: Keith Packard +Date: Thu Sep 11 05:15:08 2003 +0000 + + Move kdrive common sources to src dir + +commit 269b9dac5a96005fe38379377526592cb7930a51 +Author: Keith Packard +Date: Thu Sep 11 05:12:51 2003 +0000 + + Get Xvesa building + +commit 0d775576b9b3cf410e9a463b87340612d34bc13d +Author: Keith Packard +Date: Thu Sep 11 03:26:03 2003 +0000 + + Add Makefile.am + +commit ef8977a30ccb55af8e8bbb635127efb94f232983 +Author: Keith Packard +Date: Thu Sep 11 03:23:13 2003 +0000 + + More build fixes + +commit 14a8311bb3b6273617f7c7b70222e97835e9c8af +Author: Keith Packard +Date: Thu Sep 11 02:31:24 2003 +0000 + + Make more stuff build + +commit 8bc8fd8678b20dde2a3fc47ff5b617bc8046ea9f +Author: Mike A. Harris +Date: Thu Sep 11 02:02:54 2003 +0000 + + POSIX sigaction cleanups - removed act.sa_restorer as it's not in POSIX and + is not portable + +commit 514ab46ce3c6eb0163720315474cba884d029b62 +Author: Anders Carlsson +Date: Thu Sep 11 00:47:36 2003 +0000 + + Start autoifying everything. + +commit 283a7f32c449b1970e5a484351f8396a8afd99da +Author: Keith Packard +Date: Mon Jul 7 19:13:03 2003 +0000 + + Update RCS tags, fix keyboard hang on VT switch, fix scroll wheel mice, add + -rawcoord option to not transform mice on rotate, fix mtrr to use + power-of-two size, add a few vesa options + +commit 804b89284665f19e2c92a07fadc72c25fbb3f5d9 +Author: Keith Packard +Date: Wed Jul 2 17:53:46 2003 +0000 + + Silicon motion driver for kdrive + +commit b923d897a51707c25b2dc62395d9765ba1a47bfe +Author: Keith Packard +Date: Wed Jul 2 17:53:46 2003 +0000 + + Initial revision + +commit 544ee9bb7a060d6a85b5168a2de74ff1db430c89 +Author: Marc Aurele La France +Date: Wed Apr 23 21:51:18 2003 +0000 + + 136. Fix bug that prevented fbman from using the last partial scanline of a + Mach64 framebuffer (Marc La France). + 135. Make ATI Mach64 FIFO cache integrity testing optional (Marc La + France). + 134. Export ATI Mach64 hardware overlay as an XVideo adaptor (derived from + GATOS project, Egbert Eich, Marc La France). + 133. Reorganise ATI Mach64 support into separate source files (Marc La + France). + 132. Refine atimisc's decoding of the panel mode on server entry in an + attempt to reduce the effect of atyfb bugs (Marc La France). + 131. Make Rage128 and Radeon XVideo available even when 2D acceleration is + disabled (Marc La France). + 130. There is no longer any need to require hardware cursors during Rage128 + and Radeon XVideo displays (Marc La France). + 129. Initialise v4l's XVideo adaptors last (Marc La France). + 128. Reduce cut&paste effects by adding more helpers to Xv (derived from + #5645, Björn Augustsson, Marc La France). + 127. Centralise a region comparison primitive into 'mi' and use it instead + of local definitions throughout the server (Marc La France). + 126. DPMSExtension & XvExtension driver cleanups (Marc La France). + +commit 870d0f8752c11c3df42185786ab1e2bd200e4de1 +Author: Egbert Eich +Date: Thu Dec 12 18:29:05 2002 +0000 + + 621. Let kbd driver test if Xserver is in suspend before handling any input + events (Egbert Eich). + 620. Fixed agp version checking to accept minor versions >= the specified + number (Leif Delgass). + +commit 7827fce0b5ff600d0adc3a30eab69e8141c2e548 +Author: Keith Packard +Date: Wed Nov 13 16:37:39 2002 +0000 + + Allow input devices to be closed while the VT is switched away (needs + per-driver support) + +commit 3eaea6608bc33633c00860008f246f59ad5687a7 +Author: Keith Packard +Date: Tue Nov 12 22:20:42 2002 +0000 + + Update ipaq-specific ts driver to match generic tslib version + +commit 612e82053d986df70bcc9c87038244eab8c3dc13 +Author: Keith Packard +Date: Tue Nov 5 05:28:34 2002 +0000 + + Clean up touch screen hacks for controlling pointer on alternate screen + +commit 358d887cbef4d2ec34532a364dd44205eab36c23 +Author: Keith Packard +Date: Fri Nov 1 22:27:49 2002 +0000 + + Add support for ARM linux TS lib (disabled by default) in kdrive + +commit f0a8d06fcaf3fe0a652efa65966f4b0b0d688c12 +Author: Keith Packard +Date: Thu Oct 31 18:29:50 2002 +0000 + + Refix mouse matrix computation for touch screens. Update usage message for + -screen option + +commit 28d191680ecbcd50dc1cccec12e55a3c433fbf48 +Author: Keith Packard +Date: Wed Oct 30 21:25:53 2002 +0000 + + Uninitialized mouse matrix elements + +commit dd7c85f108d01d207248300019e88d56012c33c9 +Author: Alan Hourihane +Date: Wed Oct 30 12:52:06 2002 +0000 + + 441. Import Mesa-4.0.4, and resync with the DRI trunk (DRI Project). + +commit d04246c8fca4132063234ab44a68a7fac8c22261 +Author: Keith Packard +Date: Fri Oct 18 06:31:17 2002 +0000 + + Changed arguments to vesaRandRSetConfig + +commit 7d214e2e2a2a1601ca14be6b52190c5b22611e2d +Author: Keith Packard +Date: Fri Oct 18 06:08:10 2002 +0000 + + Fix additions of RandR support in kmode.c + +commit 5bb4a7b6998132d574d823301333b7e119dc7213 +Author: Keith Packard +Date: Fri Oct 18 06:00:29 2002 +0000 + + Fix other half of kdrive mach64 video code after randr update + +commit e1c304e22b1a29a5259aec1e956dbc75e0fa0138 +Author: Keith Packard +Date: Mon Oct 14 18:01:42 2002 +0000 + + Add refresh rates to RandR (v1.1) + +commit 5804e69f4c20dcd33f69673aa82da3051e6eed3c +Author: Keith Packard +Date: Sun Oct 13 19:35:56 2002 +0000 + + Custom file for rotating pcmcia screens + +commit b5d1c538622b21bed8eb59b557d79323f65ffbd7 +Author: Keith Packard +Date: Tue Oct 8 21:28:05 2002 +0000 + + Add vtxx option to kdrive servers + +commit f214cab20baf57fc23389ef9b63a3e3a50b2a4f6 +Author: Keith Packard +Date: Tue Oct 8 21:27:18 2002 +0000 + + Clear screen on mode switch + +commit b28a8c6e2a1fbc57d96d94b7445c86f94c2d8d4d +Author: Keith Packard +Date: Tue Oct 8 21:25:35 2002 +0000 + + Add another mach64 PCI id + +commit 9373d9186b413e1d53200b191816b9143d19c4bf +Author: Keith Packard +Date: Fri Oct 4 01:44:20 2002 +0000 + + Fix mouse mapping under reflection + +commit a80e1e5aed07cb57151408b0481f18e2ffb7f146 +Author: Keith Packard +Date: Thu Oct 3 22:09:04 2002 +0000 + + Update kdrive servers to support reflection + +commit 238a2ec201a52d59a46540ddd419d8d6f6bf8daa +Author: Keith Packard +Date: Sun Sep 29 23:39:47 2002 +0000 + + Update RandR to 1.0 (library version 2.0) + +commit 5d871996431e33b0d64ad9158e040e46770b6ee4 +Author: Keith Packard +Date: Thu Sep 26 02:56:48 2002 +0000 + + Add image transformation and sub-pixel ordering to Render + +commit a2637ba1f6c8417a48c95c9b65542c696ba0c8c0 +Author: Egbert Eich +Date: Mon Sep 16 18:05:35 2002 +0000 + + 319. Moved LdPreLib define after the vendor/OS specific config files as it + may depend on setting done there (Egbert Eich). + 318. Several fixes for cross compile environment (Egbert Eich). + 317. Added code to allow for building of static only libraries with + -fPIC for platforms which require it (Egbert Eich). + 316. Added '-m32' to gcc flags as default for ia32 builds when gcc version + is >= 3.1. This allows building a 32 bit Version of X on 64bit x86-64 + (Egbert Eich). + 315. Changed direct calls of ld to 'gcc -nostdlib' for Linux (Egbert Eich). + 314. Changed calls to as to 'gcc -c -x assembler-with-cpp' for Linux + (Egbert Eich). + 313. Added '-fno-strict-aliasing' flag to gcc version >= 3.1 (Egbert Eich). + Strict requires that one address must not contain pointers to different + types - a feature heavily used by X (Egbert Eich). + 312. Fixed a core dump problem in libXtt (?) (Egbert Eich). + 311. Removed '#pragma pack' from structures that contain function pointers + in x86emu. This causes problems on gcc 3.1 for ia64 (Egbert Eich). + 310. Added defines for missing X types to saverproto.h (Egbert Eich). + 309. Fixed compiler warings generated by gcc >= 3.1 in mesa drivers (Egbert + Eich). + 308. For platforms that allow both 32 and 64 bit libraries to be executed + split Xlib i18n modules path into + /X11R6/lib/X11/locale/lib/common and + /X11R6/lib/X11/locale/lib64/common. 'lib64' has been defined + to be the default path for 64bit shared libraries on these platforms + (Egbert Eich). + 307. Fixed obvious typo in OMlib (Egbert Eich). + 306. Fixed code in cfb that didn't comply with C sequence rules. Modern C + compilers tend to be more aggressive on code reordering (Egbert Eich). + 305. Changed arguments of NoopDDA() from VarArgs to void. Handling of + VarArgs by gcc isn't compatible with the way it was used on certain + platforms (Egbert Eich). + 304. Added support for 32bit pixmaps for 24bit overlay framebuffers in fb + overlay code (Egbert Eich). + 303. Fixed kdrive to print a meaningful error message instead of just core + dump when no matching graphics cards is found (Egbert Eich). + 302. fixed portability bug in xwd (Andreas Schwab ) + 301. fixed X Server crash, which happended each time a proportional + iso10646 font was loaded with xtt backend (Yong Li + ) + 300. Added some ARM specific fixes to compiler.h (Uli Hecht). + 299. Added a virtual 'dummy' driver (Egbert Eich). + 298. Fixed core dump when certain access functions are not set in xf86Bus.c + (Egbert Eich). + 297. Fixed problem where SIGIO could be disabled after a server reset. + 296. Added configurable list of devices the xf86Misc extension is allowed + to change the mouse device to (Egbert Eich). + 295. Changed default mouse type to 'auto' when generating config file with + '-configure' (Egbert Eich). + 294. Made sure keyboard modifier settings are consistent after exit from + DGA when the xkb extension is used (Egbert Eich). + 293. Disabled keyboard processing when Xserver is suspended by power + management. This allows effective locking of laptops when stolen + (Egbert Eich). + 292. Added/improved options for lockfile syncing (Egbert Eich). + 291. Added support for backup copy of Xserver logfile (Egbert Eich). + 290. Fixed GetTimeInMillis() to use deltas instead of absolute time + returend by gettimeofday(). This ensures time is monotonic in X (Egbert + Eich). + 289. Fixed xf86Misc extension to allow modification of Expps2 mice (Egbert + Eich). + 288. Made code in xf86MiscExt.c more readable (Egbert Eich). + 287. Fixed PCI CardBus bridge handling (Egbert Eich). + 286. Added code to reenable PCI bus mastering after coming back from a VT + switch to radeon driver (Charl P. Botha ) (Egbert + Eich). + 285. Dito for r128 driver (M. Harris). + 284. Dito for glint and mga driver (Egbert Eich). + 283. Fixed double scan issues for low res modes in C&T driver (Egbert + Eich). + 282. Set rgbBits to 8 for all HiQV chips in chips driver (Egbert Eich). + 281. Moved initialization of accel funtions past initialization of + offscreen fb manager in chips driver (Egbert Eich). + 280. Fixed initialization of video in chips driver (?). + 279. Fixed HALlib problem restoring text mode on G550 (Egbert Eich). + 278. Restructured and included Matrox's Merged Framebuffer changes to mga + driver (Egbert Eich). + 277. G450/550 clockchip programming fixes (Matrox). + 276. Fixed HW Cursor for HALlib frame granularity (Egbert Eich). + 275. Enabling 2D accel in 24-bit for neomagic 2360 and 2380 (Egbert Eich). + 274. Added support for builtin 1024x480 mode of Sony subnotebooks for + Neomagic driver (Egbert Eich). + 273. Fixed support for lowRes (320x240) modes in neomagic driver (Egbert + Eich). + 272. Fixed RAC function registration in S3 driver (Egbert Eich). + 271. Added some voodoo to screen initialization of S3 driver (Egbert Eich). + 270. Fixed vbe/int10 support in SMI driver. It used to core dump when BIOS + was not usable (Egbert Eich). + 269. Separated BRIGHTNESS and and CAPTURE_BRIGNTESS video attributes in smi + driver: CAPTURE_BRIGHTNESS refers to the capture chip (ie. Philips + SAA7110) while BRIGHTNESS controls the video overlay of the SMI chip + itself (Egbert Eich). + 268. Disable automatic loading of DRI when running SUN ffb as this is + inconsistent with other drivers (Thorsten Kukuk). + 267. Fixed Gamma/Brightness code in trident driver (Egbert Eich). + 266. Added FpDelay debugging option (Egbert Eich). + 260. Fixed video support for Trident 9397 (Egbert Eich). + 265. Fixed Cursor/VT switch support for vmware driver (Egbert Eich). + 264. Fixed Blit problems in vmware driver when running KDE (Egbert Eich). + 263. Added RENDER support to vmware driver (Egbert Eich). + 262. Added C&T 69030 to extrapci.ids (Egbert Eich). + 261. Improved mouse autodetection code (Egbert Eich). + 260. Restructured int10 code so that vm86 and x86emu support can be loaded + as modules. Implemented heuristic to try vm86 first and fall back to + x86emu. This allows 32 bit Xservers to run on x86_64 on 64-bit kernel + without vm86 support (Egbert Eich). + 259. Restructured elf loader: determine which section to load from + elfheader flags (Egbert Eich). + 258. Adding RENDER Support to RAC (Egbert Eich). + 257. Using borderClip instead of borderSize region for redisplay function + in miext/shadow code to avoid core dumps when vt switched away (Egbert + Eich). + 256. Replacing sprintf() by snprintf() in lbxproxy to eliminate possible + buffer overrun exploits (Egbert Eich). + 255. KP_Decimal fixes to Czech and Slovak keybards (Jan Holesovsky + ) (Egbert Eich). + +commit 2698ee9f29189a44de1c92df99f48d45f0111577 +Author: Keith Packard +Date: Thu Aug 15 18:07:57 2002 +0000 + + Prefer touchscreen to mouse + +commit fe477855d7d714c154dc9fcb1d0aa67fb8e4e5a5 +Author: Keith Packard +Date: Fri Aug 2 16:30:50 2002 +0000 + + Fix for iPaq IOCTL changes + +commit cf49ce6f26caee30f4160e6e0b2b658863e7a145 +Author: Keith Packard +Date: Fri Aug 2 16:15:02 2002 +0000 + + Allow both touchscreen and mouse at the same time + +commit 1a5f923c62dcffb3a81c6532f3dc071c70345cb3 +Author: David Dawes +Date: Tue Jun 4 22:19:58 2002 +0000 + + 174. Fix makedepend so that it can parse a unary '+' operator (#5185, Mark + Snitily). + 173. Fix a typo in Xvesa's emulation of instructions forbidden in vm86 mode + (#5184, Juliusz Chroboczek) + 172. Fix a bounds check in Xlib's Region code (#5183, Owen Taylor). + +commit 98f8d7af3cb7a10cc268a8bdd3039539b1bf90f2 +Author: Keith Packard +Date: Tue Feb 19 00:18:05 2002 +0000 + + kdrive/vesa: apply vm86 patch from Juliusz + +commit 6d8cedf68c7803330bc920cf7506727c4ad6108c +Author: Keith Packard +Date: Thu Feb 14 16:08:05 2002 +0000 + + update kdrive manual and usage + +commit 44b20bfa587def11f3127980e67ff47e695c3e51 +Author: Keith Packard +Date: Fri Feb 1 00:52:15 2002 +0000 + + kdrive/mach64: recognize the mach64li + +commit 3abb3e073961986137f8fec1f194c60636b9e864 +Author: Keith Packard +Date: Fri Jan 18 16:25:19 2002 +0000 + + kdrive: fix button emulation for iPAQ + +commit 88810cfc02941d7e54924e25aa872e5cc740d274 +Author: Keith Packard +Date: Thu Dec 20 16:47:30 2001 +0000 + + kdrive/linux/mouse.c: convert mouse data to signed values for compilers + with default unsigned chars + +commit 83388cb23282471e80d513bd3ab472b51c110b35 +Author: Keith Packard +Date: Mon Dec 10 16:34:20 2001 +0000 + + kdrive/i810: bit swap for i810 cursor (from Pontus Lidman) + +commit 4646a6c3b925676039f50bacb4f3c780f6e81bcc +Author: Keith Packard +Date: Fri Dec 7 02:19:04 2001 +0000 + + kdrive: work around ipaq touch screen compile problems + +commit 54feb8a4c8f0e0cb6eb40b494171fa4f3552cfc3 +Author: Keith Packard +Date: Fri Dec 7 02:18:19 2001 +0000 + + kdrive: missing registration for mouse input type + +commit 636390fb9d6314e506f593da6556fa198b4e9bf6 +Author: Keith Packard +Date: Thu Nov 22 23:38:21 2001 +0000 + + kdrive: initialize all Linux mouse driver fields + +commit 668c25a769044f06ed47a3145a11aceeb9574c9d +Author: Keith Packard +Date: Thu Nov 8 10:26:24 2001 +0000 + + kdrive: fix ALTGR keyboard mappings + +commit e76c6b2acae5622dd2d4944cd6f3673dbc70a571 +Author: Keith Packard +Date: Thu Nov 8 09:35:08 2001 +0000 + + kdrive/linux: update ps/2 mouse detection/configuration code from FreeBSD + bits + +commit 6fafe3b092f799da788a1ae75be1c23da42f0983 +Author: Keith Packard +Date: Thu Nov 8 09:33:51 2001 +0000 + + kdrive: Open APM device r/w for kernel 2.4.14 + +commit 2f2e256de71c42b7856440ec43b1c122019b95b7 +Author: Marc Aurele La France +Date: Mon Oct 29 16:34:56 2001 +0000 + + DPMS warning fix + +commit b8d90c5ea4659a01694864e6c05a563dcea296eb +Author: Marc Aurele La France +Date: Sun Oct 28 03:33:10 2001 +0000 + + 407. Fix for threaded libraries (Marc La France). + 406. Finish removal of SuperProbe (Marc La France). + 405. A rather large number of warning fixes throughout (Marc La France). + 404. Fix bug in HTML install script (Marc La France). + 403. Missing ident lines for some XFree86-modified files (Marc La France). + 402. Add default half-width doublescanned modes (Marc La France). + 401. Mark all driver-registered resources with ResBus (Maarc La France). + 400. Fix DPMS-related build problem (Marc La France). + 399. Log a message just before calling each ChipProbe() during '-probe' + processing (Marc La France). + 398. Temporarily disable ISA probing on SPARCs and PowerPCs (Marc La + France). + 397. Add PCI IDs for Sun hardware (Marc La France). + 396. Fix memory leak in resource relocation (Marc La France). + 395. Do not relocate resources that only conflict with disabled non-video + PCI devices or disabled PCI ROMs (Marc La France). + 394. Re-organise SBUS code (Marc La France). + 393. Add as-yet-unused definitions for PCI resource types other than I/O + and memory (Marc La France). + 392. Add doc for Solaris, but don't format it yet (Marc La France). + 391. Normalise driver names (Marc La France). + 390. For SPARCs, disable DGA support in ATI driver (Marc La France). + 389. Clean up some debugging messages (Marc La France). + 388. Fix newport driver for when a /proc fs isn't mounted (Marc La France). + 387. Fix DAC handling bugs in s3 driver (Marc La France). + 386. Fix resource registration bug for PCI Tseng's (Marc La France). + 385. Add aperture driver for Solaris (not yet used) (Marc La France). + 384. Rework scanpci to fix problems that prevented it from completely + displaying non-PCI bridges and Simba bridges (Marc La France). + 383. Fix build problems in some input drivers (Marc La France). + 382. Fix int10 compile problem for SPARCs and PowerPCs (Marc La France). + 381. Ensure master aborts on secondary buses complete normally during PCI + scans (Marc La France). + 380. Some memory mapping and Solaris cleanups (Marc La France). + +commit a8518b35617a479f50c735c015115b853f4aa327 +Author: Keith Packard +Date: Wed Oct 24 20:14:52 2001 +0000 + + kdrive/savage: Long lines cant be drawn with accelerator + +commit 28fd5f7525848cf0109f9cf2d6311f3717570a5d +Author: Keith Packard +Date: Fri Oct 12 06:33:12 2001 +0000 + + kdrive: add new auto-detecting and auto-switching mouse driver + +commit 5f310d7f8b566b1e331286752d349f87ef43a811 +Author: Keith Packard +Date: Sat Sep 29 04:16:39 2001 +0000 + + kdrive: restructure APM/VT switch support to reset keyboard state and flush + buffer on APM resume + +commit bb2e1c53b58ac94539f0d11ae195186a9ee0a2f7 +Author: Keith Packard +Date: Fri Sep 21 21:58:34 2001 +0000 + + hw/kdrive: Xv window private should be allocated on demand + +commit 59cd35f634468acfa2e48711da09fabc811d96f9 +Author: Keith Packard +Date: Fri Sep 14 19:25:17 2001 +0000 + + hw/kdrive/vesa: initialize mouse matrix for non-rotated case correctly + +commit fbaf3ceae0519ebdfee4b6a73b1bc0000f141cf2 +Author: Keith Packard +Date: Fri Sep 14 19:24:11 2001 +0000 + + hw/kdrive/trident: solid fill checks busted for planemasking + +commit 216090d1aedb23c691a75da25b14d8543b932e1c +Author: Keith Packard +Date: Wed Sep 5 07:12:43 2001 +0000 + + kdrive: Add primitive ct65550 server. Update kdrive/vesa code to support + DPMS using VESA bios routines. Include support for Toshiba SMM DPMS as + well + +commit f856b952ec7251d6e95f0b93d62fb026d07b0ebc +Author: David Dawes +Date: Thu Aug 9 20:45:15 2001 +0000 + + 187. Add an MS mouse driver for KDrive (#4754, Juliusz Chroboczek). + +commit f4db75ac431c14e0c24ff7549c6ce1e3b0b86b87 +Author: Keith Packard +Date: Thu Aug 9 09:08:55 2001 +0000 + + kdrive/mach64: support Xv under RandR + +commit 628d7695d1696f6f5cba6ea1f2548aa5d0f38c80 +Author: Keith Packard +Date: Thu Aug 9 09:06:08 2001 +0000 + + kdrive: disable sigio debugging + +commit 958c0374a6709386e91b4b3ed7ba8fa81d415ebf +Author: Keith Packard +Date: Tue Jul 24 21:26:17 2001 +0000 + + kdrive: add apm support, fix MTRR unmapping bug + +commit b7eb8a35b51aa2edc9ff59f091ee88ea7000b757 +Author: Keith Packard +Date: Tue Jul 24 19:06:04 2001 +0000 + + kdrive: Unmap vesa device when disabled + +commit d2d221a012950b98e48e47b6dea38e6ad385fef8 +Author: Keith Packard +Date: Mon Jul 23 03:44:17 2001 +0000 + + kdrive/mach64: Force read of GUI_STAT on every op to avoid problems across + suspend/resume + +commit 79486b3b5c792a990cb73b4efa453218262e605f +Author: Keith Packard +Date: Fri Jul 20 19:35:30 2001 +0000 + + Too many changes, but all in kdrive: + Add support for global screen origins (-origin option), handles both + Xinerama and mouse crossings. + Fix XV enable/disable sequences -- can't use card wrappers as cards have + more than one screen. + Change vesa/fbdev to use new depth-independent rotation shadow update + Fix vesa to allow starting rotation value (again) + Make vesa driver write all colormap changes in one INT10 call + +commit 9826d5a1339570c037ae1ef29c9a237874a6ffa2 +Author: Keith Packard +Date: Thu Jul 19 08:46:30 2001 +0000 + + kdrive/fbdev: only setting first colormap entry on static hardware + +commit 35d8b5f44269c97497c73d3638b8f0345757c04c +Author: Keith Packard +Date: Mon Jul 16 19:48:00 2001 +0000 + + kdrive/fbdev: fix static color case + +commit 090a429573dfb965ebc4ea8ea57e3bef5f9a8539 +Author: Keith Packard +Date: Wed Jul 11 16:42:17 2001 +0000 + + kdrive/fbdev: dont set DPMS mode repeatedly to the same value + +commit 99fb2eb76d8f93578e4aba75c73b9be0766f7b6f +Author: Keith Packard +Date: Wed Jul 11 05:02:24 2001 +0000 + + Generalize kludge in fbdev that normalizes pixel formats to something that + Render can handle + +commit 562474091a3d52a062eb89d25a7d38200a785425 +Author: Keith Packard +Date: Wed Jul 11 02:58:19 2001 +0000 + + Fix TOUCHSCREEN support in kdrive + +commit 67cd53abfce7ed17ae4c428332a9e0fd908da97a +Author: Keith Packard +Date: Fri Jun 29 14:00:41 2001 +0000 + + Rework kdrive input fd handling, enable multiple simultaneous mice + +commit c872ee82045e8c7ce019df2577d06bec549cd71c +Author: Keith Packard +Date: Fri Jun 29 13:57:45 2001 +0000 + + kdrive: typo in MTRR calculations + +commit 63dd090655ba995b8f26386bb50cb5b7568f7da0 +Author: Keith Packard +Date: Fri Jun 29 13:55:53 2001 +0000 + + kdrive: dont touch hardware when disabled + +commit 01a53daa03a8ee36ce136dde3a9a9b152e9c2e2f +Author: Keith Packard +Date: Sat Jun 23 03:41:24 2001 +0000 + + Clean up mach64 video code to add ReputVideo and make StopVideo not crash + the machine + +commit 31d47ec8bed1b02d04563ba502eaeb028975f653 +Author: Keith Packard +Date: Thu Jun 21 21:44:09 2001 +0000 + + kdrive/mach64: remove useless Xv debug printfs + +commit bd61c15279e2195c72b3add32961ed21e293d48b +Author: Keith Packard +Date: Thu Jun 21 01:01:30 2001 +0000 + + Add RCS tag + +commit 66c9184807997d2a0a155ba1697906c07396863f +Author: Keith Packard +Date: Thu Jun 21 00:58:51 2001 +0000 + + Fix screen physical size in RandR code for kdrive fbdev and pcmcia servers + +commit f8a456f094d8f61c021bbfb6e6f0a4723ebdc73f +Author: Alan Hourihane +Date: Wed Jun 20 21:53:31 2001 +0000 + + Add RandR support to the Kdrive pcmcia driver. + +commit 918ff10f2697ee8c17013bd31596072a38c5ac9b +Author: Keith Packard +Date: Tue Jun 19 09:31:47 2001 +0000 + + Finish Xv support for kdrive/mach64 + +commit 6d86517b0ed0db51f3eaf19c186db52feb1e47e0 +Author: Keith Packard +Date: Sat Jun 16 05:53:05 2001 +0000 + + Screen flipping broken pointer remapping + +commit 54aea8ec0c1c3633788fd9b19636093860c75d53 +Author: Keith Packard +Date: Sat Jun 16 05:48:49 2001 +0000 + + Patch DPMS support in kdrive/mach64, add preliminary (broken) Xv support + +commit f386ca6c69ba10cd8c0dd60bb25cde37ecfc8bc7 +Author: Keith Packard +Date: Wed Jun 13 19:18:44 2001 +0000 + + Support initial rotation in kdrive/fbdev, use that as the normal + orientation + +commit 93dbdc89c172fd5d6450f21ebc91011771ac0100 +Author: Keith Packard +Date: Wed Jun 13 19:18:03 2001 +0000 + + Add -dpi support to kdrive + +commit a6517a3056a88fca35a47185a0e6d83f3e8b0015 +Author: Keith Packard +Date: Mon Jun 11 01:38:54 2001 +0000 + + Advertise supported rotations in kdrive/vesa server + +commit 4f8254b31f30bd12224c2fdcecfbd67b41ecd7e1 +Author: Keith Packard +Date: Tue Jun 5 17:17:39 2001 +0000 + + Attempt to make kdrive/fbdev run on static gray hardware (iPaq 3150) + +commit bf4dbfbf45e4e6b1b86c624b1995a1050b7a0eef +Author: Alan Hourihane +Date: Tue Jun 5 16:57:44 2001 +0000 + + fix some warnings due to new shadow code + +commit a4ba10ba6ffb1c01a0df5b34669b9fb24ad0e7d9 +Author: Keith Packard +Date: Tue Jun 5 16:49:31 2001 +0000 + + kdrive/fbdev: RandR initialization sequence change + +commit 7fcf46356ba70563f036f535e60667727db442ae +Author: Keith Packard +Date: Mon Jun 4 09:45:42 2001 +0000 + + Allow for hardware acceleration under RandR with Layer. Hardware/Software + cursor switching still busted + +commit 54e66d92db917923e33e018e628a7629d6705507 +Author: Keith Packard +Date: Sun Jun 3 21:52:46 2001 +0000 + + Update RandR protocol + +commit 88ae32841d766c7d0df79ee25e1db62996d4ecb3 +Author: Keith Packard +Date: Sun Jun 3 18:48:19 2001 +0000 + + Add mach64 driver to Tiny-X + +commit 14ed0c3d6d674df4edcbcd8840a7cea4b41a0673 +Author: Keith Packard +Date: Wed May 30 15:36:25 2001 +0000 + + Fix kaa to not try Copy for pixmap sources + +commit a2bd75d15a99d4ee117e17921f0426228d53f5e8 +Author: Keith Packard +Date: Tue May 29 21:55:41 2001 +0000 + + Xfbdev: Make sure screen gets re-enabled on RandR failure + +commit 562925c439cf1746f2caa720d4f2dce54ba0311b +Author: Keith Packard +Date: Tue May 29 17:47:55 2001 +0000 + + Fix Xipaq build after layer/RandR additions + +commit 78b53386b51cde4fe4664963ddafa36b814360f2 +Author: Keith Packard +Date: Tue May 29 04:54:13 2001 +0000 + + Add miext/layer for more complete RandR support in kdrive/Xfbdev + +commit 06f758797ab3651b0e293ae26daf4df77702fdde +Author: Keith Packard +Date: Sat May 26 01:25:42 2001 +0000 + + Add initial RandR support to Xvesa + +commit ba8351609869165aa2de92b7a876dc2d2768cb5b +Author: David Dawes +Date: Fri May 25 18:40:59 2001 +0000 + + 38. Fix xmh's use of XtNewString() with getenv (#4694, Tim Waugh). + 37. Xdm/PAM fixes: leave it to PAM to observe whether or not an account is + locked, and reinitialize credentials after calling initgroups(), + because sometimes the credentials pam_setcred() gives are in the form + of group membership (#4693, Mike Harris). + 35. Fix warnings when building mieq.c (#4689, Adam Sulmicki). + 34. Fix some bugs in the cz and sk entried in XKB's keymap/xfree86 file + (#4692, Ivan Pascal). + 33. Add 'hr' entries to XKB's keymap/xfree86 and rules/xfree86.lst files + (#4687, Nerijus Baliunas). + 32. Include in shape.h to get Region typedef (#4686, Adam + Sulmicki). + +commit e9314bd34ec39cc699591123cc8a05a934b66b85 +Author: Alan Hourihane +Date: Fri May 25 07:44:29 2001 +0000 + + wrap some stuff around #ifdef TOUCHSCREEN + +commit e6497f39af98cd25719eab72b0be04fa4146172f +Author: Alan Hourihane +Date: Thu May 24 19:31:46 2001 +0000 + + fix ifdef->if + +commit 0e1a49a7dd00ae494d92ab480d9776ec5320cb3e +Author: Alan Hourihane +Date: Wed May 23 17:28:39 2001 +0000 + + add missing pieces for the pcmcia driver + +commit 85d827f5329fa93dea1125788457fac6835cd134 +Author: Alan Hourihane +Date: Wed May 23 08:56:09 2001 +0000 + + Add PCMCIA server for HP VGA Out PC Card and the Voyager VGA Card. Use on + the Compaq IPAQ. Use -listmodes to see supported modes. Hack the + touchscreen driver to work as a mouse pad for the VGA screen. Fixup key + bindings so xmodmap can remap IPAQ's buttons as mouse buttons. + +commit f9104754cda1212cf48d6d24a0a586c5368d7549 +Author: Keith Packard +Date: Wed May 23 03:29:44 2001 +0000 + + Add RandR extension + +commit dc383e8f77f99e8c2b799a6ab4e4998a1fcacb24 +Author: Marc Aurele La France +Date: Sun Apr 1 14:00:04 2001 +0000 + + 317. glxinfo needs libGLU (Marc La France). + 316. Rage128 fix to Cards database (Marc La France). + 315. Minor fix to PCI resource overlap handling (Marc La France). + 314. Loader code simplification and IA-64 cache flushes (Marc La France). + 313. Workaround in the ATI driver for troublesome interaction between + loader and compiler optimisation (Marc La France). + 312. Warning fixes for `gcc -fno-builtin`, which appears to be the default + on some systems (Marc La France). + more of #301, tags, warnings and build fixes. + +commit 518e205b06d0dc7a0cd35fbc2c6a4376f2959020 +Author: Keith Packard +Date: Fri Mar 30 17:35:55 2001 +0000 + + kdrive/igs: add missing register definitions that used to be in igsregs.t + +commit eb3da37564593b7c9fb574af824e2f5e0cc6bb24 +Author: Keith Packard +Date: Fri Mar 30 02:18:41 2001 +0000 + + Add files for Xmuu and i810 driver + +commit f39a62d122b6e63e2971d8593bf6b24933f66ec8 +Author: Keith Packard +Date: Fri Mar 30 02:15:20 2001 +0000 + + Add Xmuu library to remove requirement for Xt/Xaw from most X utilities Add + i810 and Xv support to kdrive + +commit a161cfd72870ae6dca66ef02f5cdd13b7ac75fd6 +Author: David Dawes +Date: Wed Mar 21 16:43:16 2001 +0000 + + remove Id line + +commit 0aa54b4d409647778b563d77ef6100085d86c6f3 +Author: David Dawes +Date: Tue Feb 13 21:15:15 2001 +0000 + + 144. Fix the neomagic driver so that it saves/restores the palette (#4452, + Ken Hornstein). + 143. Fix a palette saving bug in the vgahw module (#4452, Ken Hornstein). + 142. Fix a typo in Xfbdev.man (#4446, Juliusz Chroboczek). + 141. Major updates to the savage driver, including: + - DDC support + - I2C support + - XVideo YUV overlay support for Savage/MX and Savage/IX + - DGA support + - yanks Ani Joshi's depth/bitsPerPixel patch for searching the BIOS + - fixes interactions with frame buffer and SVGATextMode consoles; VT + switching now seems quite reliable for almost everyone + - yanks unused options + - adds new options for hacks to deal with the status register hangs + - adds one special case memory configuration for Savage 4 + - adds support for doublescan modes (320x240 works) + - adds LCD panel detection + - fixes a panning bug at depth 24 (panning must be to even pixels) + - adds a workaround for bugs in the latest ProSavage BIOSes (#4445, 4448, + Tim Roberts). + 140. Make 'X -configure' use the long monitor name when present in the DDC + info (#4444, Andrew C. Aitchison). + 139. Make glxinfo respect $DISPLAY (#4443, Meelis Roos). + 138. Fix TrueType font problems in 4.0.2 (#4439, Juliusz Chroboczek). + 137. Document the "DisplaySize" keyword in the XF86Config man page (#4438, + Andrew C. Aitchison). + +commit 3dfa6cce9938413e10cc400ba6d9b19b8f28e485 +Author: David Dawes +Date: Sat Jan 27 18:20:40 2001 +0000 + + 88. Set the version strings in man pages dynamically (David Dawes). + 87. Remove the XF86_VERSION string from xf86Version.h, leaving just the + numerical values. All the version information is now derived from that + single set of values (David Dawes). + +commit 60c7a912e257045d1189a19a38d9dbedc20ae78b +Author: David Dawes +Date: Wed Jan 24 00:06:10 2001 +0000 + + 79. Preprocess all man pages to make sure that the references to pages in + sections that are platform-dependent are correct. Also fixed some misc + formatting problems found while doing that (David Dawes). + +commit dacbf5671da08d161cd7a32496e0b58f50a93453 +Author: Keith Packard +Date: Tue Jan 23 06:25:05 2001 +0000 + + Integrate jg patch for iPAQ + +commit 2869e08a328cb6aa51c17b96bdebd37e9eeefc88 +Author: Keith Packard +Date: Wed Dec 13 18:06:54 2000 +0000 + + kdrive: non-x86 compiles broken in kmap.c + +commit ec4916836c42cb4a1dc1622dddd27951a90a52c9 +Author: Keith Packard +Date: Fri Dec 8 23:04:57 2000 +0000 + + kdrive: dont try MTRR on non-x86, fix backspace mapping + +commit d09a156d92dbcd9368be20dabe47ea197f19357e +Author: Keith Packard +Date: Fri Dec 8 22:59:37 2000 +0000 + + kdrive: allow screen size specification + +commit 6b61d48f2146f18c94d5f2b3d16a822c0eee9841 +Author: Keith Packard +Date: Fri Dec 8 21:40:29 2000 +0000 + + kdrive/vesa: type cast warning fix + +commit b59eabd230110d604515868893d9aa06e6d3b748 +Author: Keith Packard +Date: Fri Dec 8 21:40:02 2000 +0000 + + kdrive: A few iPAQ inspired changes to event management + +commit a25637fe789c5127451233c759074780cbc110ac +Author: David Dawes +Date: Mon Dec 4 21:01:00 2000 +0000 + + missing ident lines + +commit 1adbdf76a903aa37d553c1c2cc43a783f21acaa5 +Author: Keith Packard +Date: Fri Dec 1 00:01:32 2000 +0000 + + kdrive: add Xkdrive/Xfbdev man pages, update Xvesa manual + +commit 5f8e75f27d49719f5fd07d48481435f93779da6c +Author: Keith Packard +Date: Wed Nov 29 08:42:25 2000 +0000 + + kdrive: add MTRR support, add clock support to trident driver + +commit 02568ec5a8f278faaa26c973fcb424da3fd31f2b +Author: Keith Packard +Date: Sun Nov 19 20:51:12 2000 +0000 + + kdrive: vesa get mode using uninitialized value + +commit 8f634a6516caca0e4be875e696820a820e480cff +Author: Keith Packard +Date: Fri Oct 20 00:19:51 2000 +0000 + + Add VGA BIOS modes to Tiny-X Xvesa server + +commit f16d5d6817f15be35293ee995d073eb57fafe283 +Author: Keith Packard +Date: Wed Oct 11 06:04:40 2000 +0000 + + Add composite operator support to trident + +commit d579bd5676ea570a8f2765cd2f6ba40074171593 +Author: Marc Aurele La France +Date: Tue Oct 10 14:05:48 2000 +0000 + + Static build fix and ident lines. + +commit 5f5b9ed1ad0591d70354c2b90609051d169fc33e +Author: Keith Packard +Date: Sun Oct 8 02:08:39 2000 +0000 + + kdrive: Add timeout to screen switching to avoid unintentional flipping + +commit fb8b58270fcaee236337d3818df04e651acbcea9 +Author: Keith Packard +Date: Fri Oct 6 22:13:40 2000 +0000 + + kdrive: support jgs new linux keysyms + +commit 15d45ffbd9af5ccce07264d6182b2222c417a2a5 +Author: Keith Packard +Date: Fri Oct 6 22:05:53 2000 +0000 + + kdrive: fix any-edge screen-switching behaviour + +commit fae164a4958b95e3ba4e4d5125da4611fcb14f6d +Author: Keith Packard +Date: Fri Oct 6 05:54:09 2000 +0000 + + kdrive: ignore mouse/keyboard fds in WakeupHandler while switched away + +commit b814019be970bc45f808ec19eef0a48b789d6646 +Author: Keith Packard +Date: Tue Oct 3 17:22:14 2000 +0000 + + kdrive: zero out fbdev screen private as its supposed to be + +commit e0ccbaab226bd3e1d619d66c9ec718c67c0a559a +Author: Keith Packard +Date: Thu Sep 28 20:58:21 2000 +0000 + + kdrive: fix typo initializing touch screen + +commit 6171187e92152a443f7d5dd7f0dad866b3e275ea +Author: Keith Packard +Date: Wed Sep 27 20:47:37 2000 +0000 + + kdrive: memory/fd leaks fixed in fbdev/vesa/trident drivers + +commit 367cab99ece8655bbd8a65096bb68bcfd7ef6fea +Author: Marc Aurele La France +Date: Tue Sep 26 15:57:04 2000 +0000 + + 721. PCI chip ID updates to ATI driver (Marc La France). + 720. Fix i810 driver for -probe and -configure (Marc La France). + 719. Change message when default modes are deleted (Marc La France). + 718. Fix Xinerama byte swapping bug (Marc La France). + 717. IA-64 and Alpha fixes for pswrap, Mesa, DRI, Xpm, libX11, Xt, Xaw, + Xmu, dps, Type1 fonts, cfb24, most output drivers, ELF loader, ramdac + module, xf4bpp and xf86cfg (Marc La France). + 716. Improve IA-64 support by removing a plethora of 32-bit'isms (Marc La + France). + 715. Default HasLinuxDoc to NO (Marc La France). + ident lines and warning fixes. + +commit 94368c3b92b8513d5135fb3c20165f108b0e96fd +Author: Keith Packard +Date: Tue Sep 26 04:31:23 2000 +0000 + + kdrive: Add iPAQ and Touch screen support + +commit 03e3689701007ea40422b4d729b65aaebcd84869 +Author: Alan Hourihane +Date: Sun Sep 24 13:52:40 2000 +0000 + + reversed a tag accidentally - put it back. + +commit 61e8a40f0d4e886bec96c3f9ee90433a3fab9d54 +Author: Alan Hourihane +Date: Sun Sep 24 13:51:22 2000 +0000 + + DRI merge + +commit 2bbb90ebd927607e0b2c7cd8f3a402b44705fe03 +Author: Keith Packard +Date: Fri Sep 22 06:25:29 2000 +0000 + + Changes for PPC support under linux and a few overlay additions + +commit 02777941e6ac8c79f934ba95b6b2e7f388ffbd14 +Author: Keith Packard +Date: Tue Sep 19 23:50:48 2000 +0000 + + kdrive: fix bug in vesa 4plane in 8bpp mode + +commit 5b9f49f64c7fb51afbfaab4f848fc7d67851582c +Author: Keith Packard +Date: Tue Sep 19 23:49:55 2000 +0000 + + kdrive: use VESA instead of FBDEV for trident driver + +commit 18692160c964c80ba83b63bc207660b6254e11cb +Author: Keith Packard +Date: Tue Sep 19 23:49:17 2000 +0000 + + kdrive: make sure allocation worked before accessing + +commit d6e151ce4deaff506c580da7e3baf055db1c3ae3 +Author: Keith Packard +Date: Fri Sep 15 15:19:00 2000 +0000 + + Tiny-X: Add mouse matrix to rotate mouse, allow enable to fail, add render + by default + +commit f7421d836186cd6dfb919c5a48d556a68d6c5a5d +Author: Keith Packard +Date: Fri Sep 15 07:25:13 2000 +0000 + + Add rotation to fbdev and vesa + +commit 5ec29fe9ea788e0dcc47534a2eca479b2c465160 +Author: Marc Aurele La France +Date: Thu Sep 7 19:44:26 2000 +0000 + + Ident lines + +commit db1a883d32ce8138dde288d32c11e147cdfc81a0 +Author: Keith Packard +Date: Sun Sep 3 05:12:28 2000 +0000 + + Rework tiny-x vesa driver for shadowing and multiple screen support. Allow + enable to fail and avoid crashing + +commit c97fb611dd7dedef6d075ef9d56f3d32c8018d39 +Author: Keith Packard +Date: Sun Sep 3 05:11:46 2000 +0000 + + Rework vesa driver for shadowing and multiple screen support. Allow enable + to fail and avoid crashing + +commit 38059656849a5bab5b56b23359a90aca4ba396c7 +Author: Keith Packard +Date: Tue Aug 29 17:20:15 2000 +0000 + + Use VESA driver underneath + +commit 77331f967077ca2fefbfb117c7e9bc2bf65b5e31 +Author: Keith Packard +Date: Tue Aug 29 17:19:51 2000 +0000 + + Changes from Juliusz for emulating some in/out insns, make ready for other + layers to use + +commit 3095deed7701a1a14be85dff4a6994028b5a6d09 +Author: David Dawes +Date: Mon Aug 28 15:29:19 2000 +0000 + + 565. Support for multithreaded libraries on NetBSD when used in conjunction + with the GNU pth library (#4113, Chris Sekiya). + 564. Add /usr/pkg/bin to NetBSD's DefaultUserPath (#4112, Bernd Ernesti). + 563. Add a (Linux-specific) VESA driver for Keith's small X server (#4111, + Juliusz Chroboczek). + 562. Update Hungarian xkb maps (#A.145, Peter Soos). remove koi8-r encoding + file since it's built-in + +commit f32448679118b77825625aafdc4d6ae4d636cc21 +Author: Marc Aurele La France +Date: Mon Aug 28 02:43:14 2000 +0000 + + Ident lines + +commit 83a388c96d665b6bfb0ae195c8c74e0e1520ab8f +Author: Keith Packard +Date: Sat Aug 26 00:24:38 2000 +0000 + + Try to avoid hitting hardware during server reset when not active, add + KdPicture code + +commit 4223801110c8d5873dd668880dff411765dfc18d +Author: Keith Packard +Date: Wed Aug 9 17:52:45 2000 +0000 + + Add overlay support for savage. Make sis setup code work on nIc + +commit 325fb002e8832a05361516bbaf19d1e8b67a3486 +Author: Keith Packard +Date: Wed May 24 23:57:56 2000 +0000 + + Fix 640x480x60 mode, drop inb/outb on non-x86 machines + +commit a6d519e527a81341ad333cb25b410dfde07176ae +Author: Keith Packard +Date: Wed May 24 23:52:48 2000 +0000 + + Add modes, cursors and acceleration + +commit 240aeb4cda91d19f5b19ebd7f7d6c1aad19f1642 +Author: Marc Aurele La France +Date: Thu May 11 18:14:13 2000 +0000 + + 162. Fix possible SEGV in generic int10 module (Marc La France). + 161. Fix *BSD aperture driver to allow for int10 (Bernd Ernesti, Marc La + France). + 160. Fix vesafb restore problem in ATI driver (Marc La France). + 159. Fix a few more compilation glitches (Marc La France). + +commit 3731c184d69e3c1face0c731926433d522d48067 +Author: Keith Packard +Date: Sat May 6 22:17:53 2000 +0000 + + Lots of Tiny-X changes: + Add overlay support in the Tiny-X Savage4 driver (required changing lots of + Tiny-X code). Savage4 now support 8/16, 8/32 overlays. + Add IGS Cyberpro 5050 driver. This chip has bus support for embeded + systems. + +commit 4b54f22b6accf438f31fbbe79877545c38375351 +Author: David Dawes +Date: Wed Feb 23 20:30:15 2000 +0000 + + remove/disable standard RCS ident lines that are in some files some bindist + updates don't define noPanoramiXExtension when Xinerama is not enabled + Add xfontsel to programs/Imakefile + +commit be2dad5954b8fee09a84f417e41bb65745dadf76 +Author: David Dawes +Date: Fri Jan 21 18:41:49 2000 +0000 + + missing ident lines + +commit 306ac1db85c30a796c9a69c639e7f2e4efd98d50 +Author: David Dawes +Date: Fri Jan 21 01:12:02 2000 +0000 + + 3554. Fix "controlization" in XLookupString for chars > 127 (#3569, Ivan + Pascal). + 3553. Take advantage of FB speedups in Tiny-X (#3568, Keith Packard). + 3552. Speed up FB and do 32bit accesses instead of 64bit accesses (#3567, + Keith Packard). + 3551. Eliminate saving the contents of the screen durint VT switching + (#3562, Keith Packard). + 3550. Make using fb easier for driver writers (#3561, Keith Packard). + 3549. Fix TCP font server connections (#3560, Keith Packard). + 3548. Implement the "OverclockMem" option for the Millennium and Millennium + II (#3558, Andrew Aitchison). + 3547. Speed up some FB performance problems (#3557, 3559, 3560, Keith + Packard). + 3546. Work around a bad code generation bug in gcc 2.7.2.3 that shows up in + XAA (#3550, Rik Faith). + 3545. Add a -brief option to xclock to show only hours and minutes when in + digital mode (#3549, Keith Packard). + 3544. Fix some dead key problems with xkb symbols for Swiss French and + Swiss German keyboards (#3546, Charles Lopes). + +commit 6d978d21b0bea6c73b65f2f47c68de4b94dd73c4 +Author: Robin Cutshaw +Date: Thu Dec 30 03:42:58 1999 +0000 + + Itsy cleanup. + +commit 30e35cb44b6ea11d0eac8ce0d986517f3224852a +Author: Robin Cutshaw +Date: Thu Dec 30 03:03:21 1999 +0000 + + 3516. Jumbo Tiny-X patch with Itsy support (#3527, Keith Packard). + +commit f13b792a3a8d307a18cd6a41aa5a06622009e42f +Author: Dirk Hohndel +Date: Fri Nov 19 13:54:06 1999 +0000 + + 3336. Fx up new MMIO macros (#3337, Matt Grossman). + 3335. Clean up compiler warnings in lib/font/bitmap (#3411, Matt Grossman). + 3334. TGA fixes, add sync on green (#3410, Matt Grossman). + 3333. Fix NULL pointer dereference in libXaw (#3406, Christopher Sekiya). + 3332. Add Rage128 support (#3405, Rik Faith, funded by ATI). + 3331. Add MTRR support for NetBSD and OpenBSD. Add new NetBSD aperture + driver (#3404, Matthieu Herrb). + 3330. Xterm patch #121 (#3402, Thomas Dickey). + 3329. Rendition driver bugfixes and alpha related cleanups (#3400, Dejan + Ilic, Marc Langenbach, Egbert Eich). + 3328. Add void input device (#3392, Frederic Lepied). + 3327. Changed the Xon serial option to be able to select xon/xoff for + input, output or both. Add support for Graphire models. Change wacom + init phase to use new Xoff option (#3391, Frederic Lepied). + 3326. Change the SwapAxes option to SwapXY in elographics/microtouch driver + to match an already existing option in the Dynapro driver. Add a Focus + class capability to the elographics driver (#3395, Patrick Lecoanet). + 3325. Update mouse rate handling (#3388, Harald Koenig). + 3324. Fix NULL pointer dereference in misprite.c (#3380, Edward Wang). + 3323. Add FBDev and ShadowFB support to glint driver. Add new option + "NoWriteBitmap" (#3383, Michel Daenzer). + 3322. Update SuperProbe to handle S3 Savage4, Savage200 and clean up + Trio3D/Savage3D detection (#3382,3384 Harald Koenig). + 3321. Add new framebuffer code and tiny X DDX architecture (#3379, Keith + Packard). + 3320. Add DGA2 documentation (#3378, Mark Vojkovich). + 3319. Update XFree86 manpage wrt -bpp/-depth/-fbbpp (#3377, Andy Isaacson). + 3318. Make SuperProbe check primary cards, only (#3374, Harald Koenig). + 3317. Add SilkenMouse to *BSD (#3373, Matthieu Herrb). + 3316. Allow SilkenMouse to work if not all drivers of an OS support SIGIO + (#3372, Keith Packard). + 3315. Fix a few problems in TGA driver and add support for backing store + and SilkenMouse (#3371, Matt Grossman). + 3314. Add smarter scheduler (#3370, Keith Packard). + 3313. Xterm patch #120 (#3369, Thomas Dickey). + 3312. Enable xf86SetKbdRate function on Solaris 8 (#3364, David Holland). + 3311. Fix some bugs and add acceleration to Rendition server (#3360, Dejan + Ilic). + 3310. Make raw DDC information available as properties in the root window + (#3357, Andrew Aitchison). + 3309. Fix for xf86CreateRootWindow (#3355, Andrew Aitchison). + 3308. Add manpage for the chips driver (#3353, David Bateman). + 3307. Update contact info (#3352, Andrew van der Stock). + 3306. Add kbd rate support for Linux (#3363, Harald Koenig). + 3305. Update Portuguese XKB map (#3351, Joao Esteves, Francisco Colaco). + 3304. Fix text clipping in 3dfx driver (#3349, Henrik Harmsen). + 3303. Fix S3 ViRGE hw cursor (#3348, Harald Koenig). + 3302. Fix clipping in 3dfx driver (#3342, Daryll Strauss). + 3301. Enable SilkenMouse for 3dfx driver (#3341, Henrik Harmsen). + 3300. Enable SIGIO support on LynxOS (#3339, Thomas Mueller). + 3299. Get TRUE defined in sigio.c. Fix xterm compile problem on ISC (#3338, + Michael Rohleder). + 3298. Correct DPMS suspend/standby modes for 3dfx driver (#3336, Henrik + Harmsen) + 3297. Xterm patch #119 (#3335, Thomas Dickey). diff --git a/xorg-server-1.4/GL/Makefile.am b/xorg-server-1.4/GL/Makefile.am new file mode 100644 index 0000000..df9f533 --- /dev/null +++ b/xorg-server-1.4/GL/Makefile.am @@ -0,0 +1,16 @@ +# someone could get really crazy someday and add support for the SI... + +# xwin/darwin/xfree86 have their accel support under the DDX + +if BUILD_DARWIN +DARWIN_SUBDIRS = apple +endif +SUBDIRS = glx mesa $(DARWIN_SUBDIRS) + +WINDOWS_EXTRAS = \ + windows/ChangeLog \ + windows/glwindows.h \ + windows/glwrap.c \ + windows/indirect.c + +EXTRA_DIST = symlink-mesa.sh $(WINDOWS_EXTRAS) diff --git a/xorg-server-1.4/GL/Makefile.in b/xorg-server-1.4/GL/Makefile.in new file mode 100644 index 0000000..16265ac --- /dev/null +++ b/xorg-server-1.4/GL/Makefile.in @@ -0,0 +1,679 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# someone could get really crazy someday and add support for the SI... + +# xwin/darwin/xfree86 have their accel support under the DDX +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = GL +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = glx mesa apple +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +@BUILD_DARWIN_TRUE@DARWIN_SUBDIRS = apple +SUBDIRS = glx mesa $(DARWIN_SUBDIRS) +WINDOWS_EXTRAS = \ + windows/ChangeLog \ + windows/glwindows.h \ + windows/glwrap.c \ + windows/indirect.c + +EXTRA_DIST = symlink-mesa.sh $(WINDOWS_EXTRAS) +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GL/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign GL/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/GL/apple/Makefile.am b/xorg-server-1.4/GL/apple/Makefile.am new file mode 100644 index 0000000..2b2d10c --- /dev/null +++ b/xorg-server-1.4/GL/apple/Makefile.am @@ -0,0 +1,15 @@ +AM_CFLAGS = -I$(top_srcdir) \ + -I$(top_srcdir)/hw/darwin/quartz \ + -I$(top_srcdir)/GL/glx \ + -I$(top_srcdir)/hw/darwin/quartz/cr \ + -I$(top_srcdir)/GL/include + +if HAVE_AGL_FRAMEWORK +noinst_LIBRARIES = libAGLcore.a +libAGLcore_a_SOURCES = aglGlx.c \ + $(top_srcdir)/hw/darwin/quartz/xpr/x-list.c \ + $(top_srcdir)/hw/darwin/quartz/xpr/x-list.h \ + $(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c \ + $(top_srcdir)/hw/darwin/quartz/xpr/x-hash.h \ + $(top_srcdir)/hw/dmx/glxProxy/compsize.c +endif diff --git a/xorg-server-1.4/GL/apple/Makefile.in b/xorg-server-1.4/GL/apple/Makefile.in new file mode 100644 index 0000000..bdea2a0 --- /dev/null +++ b/xorg-server-1.4/GL/apple/Makefile.in @@ -0,0 +1,681 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = GL/apple +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libAGLcore_a_AR = $(AR) $(ARFLAGS) +libAGLcore_a_LIBADD = +am__libAGLcore_a_SOURCES_DIST = aglGlx.c \ + $(top_srcdir)/hw/darwin/quartz/xpr/x-list.c \ + $(top_srcdir)/hw/darwin/quartz/xpr/x-list.h \ + $(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c \ + $(top_srcdir)/hw/darwin/quartz/xpr/x-hash.h \ + $(top_srcdir)/hw/dmx/glxProxy/compsize.c +@HAVE_AGL_FRAMEWORK_TRUE@am_libAGLcore_a_OBJECTS = aglGlx.$(OBJEXT) \ +@HAVE_AGL_FRAMEWORK_TRUE@ x-list.$(OBJEXT) x-hash.$(OBJEXT) \ +@HAVE_AGL_FRAMEWORK_TRUE@ compsize.$(OBJEXT) +libAGLcore_a_OBJECTS = $(am_libAGLcore_a_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libAGLcore_a_SOURCES) +DIST_SOURCES = $(am__libAGLcore_a_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +AM_CFLAGS = -I$(top_srcdir) \ + -I$(top_srcdir)/hw/darwin/quartz \ + -I$(top_srcdir)/GL/glx \ + -I$(top_srcdir)/hw/darwin/quartz/cr \ + -I$(top_srcdir)/GL/include + +@HAVE_AGL_FRAMEWORK_TRUE@noinst_LIBRARIES = libAGLcore.a +@HAVE_AGL_FRAMEWORK_TRUE@libAGLcore_a_SOURCES = aglGlx.c \ +@HAVE_AGL_FRAMEWORK_TRUE@ $(top_srcdir)/hw/darwin/quartz/xpr/x-list.c \ +@HAVE_AGL_FRAMEWORK_TRUE@ $(top_srcdir)/hw/darwin/quartz/xpr/x-list.h \ +@HAVE_AGL_FRAMEWORK_TRUE@ $(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c \ +@HAVE_AGL_FRAMEWORK_TRUE@ $(top_srcdir)/hw/darwin/quartz/xpr/x-hash.h \ +@HAVE_AGL_FRAMEWORK_TRUE@ $(top_srcdir)/hw/dmx/glxProxy/compsize.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GL/apple/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign GL/apple/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libAGLcore.a: $(libAGLcore_a_OBJECTS) $(libAGLcore_a_DEPENDENCIES) + -rm -f libAGLcore.a + $(libAGLcore_a_AR) libAGLcore.a $(libAGLcore_a_OBJECTS) $(libAGLcore_a_LIBADD) + $(RANLIB) libAGLcore.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aglGlx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compsize.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-hash.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-list.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +x-list.o: $(top_srcdir)/hw/darwin/quartz/xpr/x-list.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT x-list.o -MD -MP -MF $(DEPDIR)/x-list.Tpo -c -o x-list.o `test -f '$(top_srcdir)/hw/darwin/quartz/xpr/x-list.c' || echo '$(srcdir)/'`$(top_srcdir)/hw/darwin/quartz/xpr/x-list.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/x-list.Tpo $(DEPDIR)/x-list.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/hw/darwin/quartz/xpr/x-list.c' object='x-list.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o x-list.o `test -f '$(top_srcdir)/hw/darwin/quartz/xpr/x-list.c' || echo '$(srcdir)/'`$(top_srcdir)/hw/darwin/quartz/xpr/x-list.c + +x-list.obj: $(top_srcdir)/hw/darwin/quartz/xpr/x-list.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT x-list.obj -MD -MP -MF $(DEPDIR)/x-list.Tpo -c -o x-list.obj `if test -f '$(top_srcdir)/hw/darwin/quartz/xpr/x-list.c'; then $(CYGPATH_W) '$(top_srcdir)/hw/darwin/quartz/xpr/x-list.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/hw/darwin/quartz/xpr/x-list.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/x-list.Tpo $(DEPDIR)/x-list.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/hw/darwin/quartz/xpr/x-list.c' object='x-list.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o x-list.obj `if test -f '$(top_srcdir)/hw/darwin/quartz/xpr/x-list.c'; then $(CYGPATH_W) '$(top_srcdir)/hw/darwin/quartz/xpr/x-list.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/hw/darwin/quartz/xpr/x-list.c'; fi` + +x-hash.o: $(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT x-hash.o -MD -MP -MF $(DEPDIR)/x-hash.Tpo -c -o x-hash.o `test -f '$(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c' || echo '$(srcdir)/'`$(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/x-hash.Tpo $(DEPDIR)/x-hash.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c' object='x-hash.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o x-hash.o `test -f '$(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c' || echo '$(srcdir)/'`$(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c + +x-hash.obj: $(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT x-hash.obj -MD -MP -MF $(DEPDIR)/x-hash.Tpo -c -o x-hash.obj `if test -f '$(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c'; then $(CYGPATH_W) '$(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/x-hash.Tpo $(DEPDIR)/x-hash.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c' object='x-hash.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o x-hash.obj `if test -f '$(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c'; then $(CYGPATH_W) '$(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c'; fi` + +compsize.o: $(top_srcdir)/hw/dmx/glxProxy/compsize.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT compsize.o -MD -MP -MF $(DEPDIR)/compsize.Tpo -c -o compsize.o `test -f '$(top_srcdir)/hw/dmx/glxProxy/compsize.c' || echo '$(srcdir)/'`$(top_srcdir)/hw/dmx/glxProxy/compsize.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/compsize.Tpo $(DEPDIR)/compsize.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/hw/dmx/glxProxy/compsize.c' object='compsize.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o compsize.o `test -f '$(top_srcdir)/hw/dmx/glxProxy/compsize.c' || echo '$(srcdir)/'`$(top_srcdir)/hw/dmx/glxProxy/compsize.c + +compsize.obj: $(top_srcdir)/hw/dmx/glxProxy/compsize.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT compsize.obj -MD -MP -MF $(DEPDIR)/compsize.Tpo -c -o compsize.obj `if test -f '$(top_srcdir)/hw/dmx/glxProxy/compsize.c'; then $(CYGPATH_W) '$(top_srcdir)/hw/dmx/glxProxy/compsize.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/hw/dmx/glxProxy/compsize.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/compsize.Tpo $(DEPDIR)/compsize.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/hw/dmx/glxProxy/compsize.c' object='compsize.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o compsize.obj `if test -f '$(top_srcdir)/hw/dmx/glxProxy/compsize.c'; then $(CYGPATH_W) '$(top_srcdir)/hw/dmx/glxProxy/compsize.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/hw/dmx/glxProxy/compsize.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/GL/apple/aglGlx.c b/xorg-server-1.4/GL/apple/aglGlx.c new file mode 100644 index 0000000..900a9a9 --- /dev/null +++ b/xorg-server-1.4/GL/apple/aglGlx.c @@ -0,0 +1,1354 @@ +/* + * GLX implementation that uses Apple's AGL.framework for OpenGL + * + * FIXME: This file and indirect.c are very similar. The two should be + * merged by introducing suitable abstractions. + */ +/* + * Copyright (c) 2002 Greg Parker. All Rights Reserved. + * Copyright (c) 2004 Torrey T. Lyons. All Rights Reserved. + * + * Large portions of this file are copied from Mesa's xf86glx.c, + * which contains the following copyright: + * + * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. + * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "quartzCommon.h" +#include +#include "cr.h" + +// X11 and X11's glx +#undef BOOL +#define BOOL xBOOL +#include "quartz.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#undef BOOL + +#include "glcontextmodes.h" + +// ggs: needed to call back to glx with visual configs +extern void GlxSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs, void **configprivs); + +// Write debugging output, or not +#ifdef GLAQUA_DEBUG +#define GLAQUA_DEBUG_MSG ErrorF +#else +#define GLAQUA_DEBUG_MSG(a, ...) +#endif + + +// The following GL functions don't have an EXT suffix in OpenGL.framework. +GLboolean glAreTexturesResidentEXT (GLsizei a, const GLuint *b, GLboolean *c) { + return glAreTexturesResident(a, b, c); +} +void glDeleteTexturesEXT (GLsizei d, const GLuint *e) { + glDeleteTextures(d, e); +} +void glGenTexturesEXT (GLsizei f, GLuint *g) { + glGenTextures(f, g); +} +GLboolean glIsTextureEXT (GLuint h) { + return glIsTexture(h); +} + + +// some prototypes +static Bool glAquaScreenProbe(int screen); +static Bool glAquaInitVisuals(VisualPtr *visualp, DepthPtr *depthp, + int *nvisualp, int *ndepthp, + int *rootDepthp, VisualID *defaultVisp, + unsigned long sizes, int bitsPerRGB); +static void glAquaSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs, + void **privates); +static __GLinterface *glAquaCreateContext(__GLimports *imports, + __GLcontextModes *mode, + __GLinterface *shareGC); +static void glAquaCreateBuffer(__GLXdrawablePrivate *glxPriv); +static void glAquaResetExtension(void); + + +/* + * This structure is statically allocated in the __glXScreens[] + * structure. This struct is not used anywhere other than in + * __glXScreenInit to initialize each of the active screens + * (__glXActiveScreens[]). Several of the fields must be initialized by + * the screenProbe routine before they are copied to the active screens + * struct. In particular, the contextCreate, modes, numVisuals, + * and numUsableVisuals fields must be initialized. + */ +static __GLXscreenInfo __glDDXScreenInfo = { + glAquaScreenProbe, /* Must be generic and handle all screens */ + glAquaCreateContext, /* Substitute screen's createContext routine */ + glAquaCreateBuffer, /* Substitute screen's createBuffer routine */ + NULL, /* Set up modes in probe */ + NULL, /* Set up pVisualPriv in probe */ + 0, /* Set up numVisuals in probe */ + 0, /* Set up numUsableVisuals in probe */ + "Vendor String", /* GLXvendor is overwritten by __glXScreenInit */ + "Version String", /* GLXversion is overwritten by __glXScreenInit */ + "Extensions String", /* GLXextensions is overwritten by __glXScreenInit */ + NULL /* WrappedPositionWindow is overwritten */ +}; + +void *__glXglDDXScreenInfo(void) { + return &__glDDXScreenInfo; +} + +static __GLXextensionInfo __glDDXExtensionInfo = { + GL_CORE_APPLE, + glAquaResetExtension, + glAquaInitVisuals, + glAquaSetVisualConfigs +}; + +void *__glXglDDXExtensionInfo(void) { + return &__glDDXExtensionInfo; +} + +// prototypes + +static GLboolean glAquaDestroyContext(__GLcontext *gc); +static GLboolean glAquaLoseCurrent(__GLcontext *gc); +static GLboolean glAquaMakeCurrent(__GLcontext *gc); +static GLboolean glAquaShareContext(__GLcontext *gc, __GLcontext *gcShare); +static GLboolean glAquaCopyContext(__GLcontext *dst, const __GLcontext *src, + GLuint mask); +static GLboolean glAquaForceCurrent(__GLcontext *gc); + +/* Drawing surface notification callbacks */ +static GLboolean glAquaNotifyResize(__GLcontext *gc); +static void glAquaNotifyDestroy(__GLcontext *gc); +static void glAquaNotifySwapBuffers(__GLcontext *gc); + +/* Dispatch table override control for external agents like libGLS */ +static struct __GLdispatchStateRec* glAquaDispatchExec(__GLcontext *gc); +static void glAquaBeginDispatchOverride(__GLcontext *gc); +static void glAquaEndDispatchOverride(__GLcontext *gc); + + +static __GLexports glAquaExports = { + glAquaDestroyContext, + glAquaLoseCurrent, + glAquaMakeCurrent, + glAquaShareContext, + glAquaCopyContext, + glAquaForceCurrent, + + glAquaNotifyResize, + glAquaNotifyDestroy, + glAquaNotifySwapBuffers, + + glAquaDispatchExec, + glAquaBeginDispatchOverride, + glAquaEndDispatchOverride +}; + + +typedef struct { + int num_vis; + __GLcontextModes *modes; + void **priv; + + // wrapped screen functions + RealizeWindowProcPtr RealizeWindow; + UnrealizeWindowProcPtr UnrealizeWindow; +} glAquaScreenRec; + +static glAquaScreenRec glAquaScreens[MAXSCREENS]; + + +// __GLdrawablePrivate->private +typedef struct { + GLboolean (*resize)(__GLdrawableBuffer *buf, GLint x, GLint y, + GLuint width, GLuint height, + __GLdrawablePrivate *glPriv, + GLuint bufferMask); +} GLAquaDrawableRec; + +struct __GLcontextRec { + struct __GLinterfaceRec interface; // required to be first + + AGLContext ctx; + AGLPixelFormat pixelFormat; + + Bool isAttached; // TRUE if ctx is really attached to a window +}; + + +// Context manipulation; return GL_FALSE on failure +static GLboolean glAquaDestroyContext(__GLcontext *gc) +{ + GLAQUA_DEBUG_MSG("glAquaDestroyContext (ctx 0x%x)\n", gc->ctx); + + if (gc) { + if (gc->ctx) aglDestroyContext(gc->ctx); + if (gc->pixelFormat) aglDestroyPixelFormat(gc->pixelFormat); + free(gc); + } + + return GL_TRUE; +} + + +static GLboolean glAquaLoseCurrent(__GLcontext *gc) +{ + GLAQUA_DEBUG_MSG("glAquaLoseCurrent (ctx 0x%x)\n", gc->ctx); + + aglSetCurrentContext(NULL); + __glXLastContext = NULL; // Mesa does this; why? + gc->isAttached = FALSE; + + return GL_TRUE; +} + + +/* + * Attach a GL context to a GL drawable + * If glPriv is NULL, the context is detached. + */ +static void attach(__GLcontext *gc, __GLdrawablePrivate *glPriv) +{ + __GLXdrawablePrivate *glxPriv; + + if (glPriv == NULL) { + // attaching to nothing + GLAQUA_DEBUG_MSG("unattaching\n"); + aglSetDrawable(gc->ctx, NULL); + gc->isAttached = FALSE; + return; + } + + // Note that when resizing, the X11 WindowPtr already has its + // new size and position, but the Aqua window does not. + + glxPriv = (__GLXdrawablePrivate *)glPriv->other; + + if (glxPriv->type == DRAWABLE_WINDOW) { + WindowPtr pWin = (WindowPtr) glxPriv->pDraw; + WindowPtr topWin = quartzProcs->TopLevelParent(pWin); + CRWindowPtr crWinPtr; + AGLDrawable newPort; + + if (glPriv->width <= 0 || glPriv->height <= 0) { + // attach to zero size drawable - will really attach later + GLAQUA_DEBUG_MSG("couldn't attach to zero size drawable\n"); + aglSetDrawable(gc->ctx, NULL); + gc->isAttached = FALSE; + return; + } + + crWinPtr = (CRWindowPtr) quartzProcs->FrameForWindow(pWin, FALSE); + + if (crWinPtr) { + newPort = (AGLDrawable) crWinPtr->port; + } else { + newPort = NULL; + } + + if (newPort) { + // FIXME: won't be a CGrafPtr if currently offscreen or fullscreen + AGLDrawable oldPort = aglGetDrawable(gc->ctx); + // AGLDrawable newPort = GetWindowPort(window); + + // Frame is GLdrawable in X11 global coordinates + // FIXME: Does this work for multiple screens? + GLint frame[4] = {glPriv->xOrigin, glPriv->yOrigin, glPriv->width, glPriv->height}; + GLAQUA_DEBUG_MSG("global size %d %d %d %d\n", + frame[0], frame[1], frame[2], frame[3]); + + // Convert to window-local coordinates + frame[0] -= topWin->drawable.x - topWin->borderWidth; + frame[1] -= topWin->drawable.y - topWin->borderWidth; + + // AGL uses flipped coordinates + frame[1] = topWin->drawable.height + 2*topWin->borderWidth - + frame[1] - frame[3]; + + GLAQUA_DEBUG_MSG("local size %d %d %d %d\n", + frame[0], frame[1], frame[2], frame[3]); + + if (oldPort != newPort) { + // FIXME: retain/release windows + if (!aglSetDrawable(gc->ctx, newPort)) return; + } + if (!aglSetInteger(gc->ctx, AGL_BUFFER_RECT, frame)) return; + if (!aglEnable(gc->ctx, AGL_BUFFER_RECT)) return; + if (!aglSetInteger(gc->ctx, AGL_SWAP_RECT, frame)) return; + if (!aglEnable(gc->ctx, AGL_SWAP_RECT)) return; + if (!aglUpdateContext(gc->ctx)) return; + + gc->isAttached = TRUE; + GLAQUA_DEBUG_MSG("attached context 0x%x to window 0x%x\n", gc->ctx, + pWin->drawable.id); + } else { + // attach to not-yet-realized window - will really attach later + GLAQUA_DEBUG_MSG("couldn't attach to unrealized window\n"); + aglSetDrawable(gc->ctx, NULL); + gc->isAttached = FALSE; + } + } else { + GLAQUA_DEBUG_MSG("attach: attach to non-window unimplemented\n"); + aglSetDrawable(gc->ctx, NULL); + gc->isAttached = FALSE; + } +} + +static GLboolean glAquaMakeCurrent(__GLcontext *gc) +{ + __GLdrawablePrivate *glPriv = gc->interface.imports.getDrawablePrivate(gc); + + GLAQUA_DEBUG_MSG("glAquaMakeCurrent (ctx 0x%x)\n", gc->ctx); + + if (!gc->isAttached) { + attach(gc, glPriv); + } + + return aglSetCurrentContext(gc->ctx); +} + +static GLboolean glAquaShareContext(__GLcontext *gc, __GLcontext *gcShare) +{ + GLAQUA_DEBUG_MSG("glAquaShareContext unimplemented\n"); + + return GL_TRUE; +} + + +static GLboolean glAquaCopyContext(__GLcontext *dst, const __GLcontext *src, + GLuint mask) +{ + GLAQUA_DEBUG_MSG("glAquaCopyContext\n"); + + return aglCopyContext(src->ctx, dst->ctx, mask); +} + +static GLboolean glAquaForceCurrent(__GLcontext *gc) +{ + // GLAQUA_DEBUG_MSG("glAquaForceCurrent (ctx 0x%x)\n", gc->ctx); + return aglSetCurrentContext(gc->ctx); +} + +/* Drawing surface notification callbacks */ + +static GLboolean glAquaNotifyResize(__GLcontext *gc) +{ + GLAQUA_DEBUG_MSG("unimplemented glAquaNotifyResize"); + return GL_TRUE; +} + +static void glAquaNotifyDestroy(__GLcontext *gc) +{ + GLAQUA_DEBUG_MSG("unimplemented glAquaNotifyDestroy"); +} + +static void glAquaNotifySwapBuffers(__GLcontext *gc) +{ + GLAQUA_DEBUG_MSG("unimplemented glAquaNotifySwapBuffers"); +} + +/* Dispatch table override control for external agents like libGLS */ +static struct __GLdispatchStateRec* glAquaDispatchExec(__GLcontext *gc) +{ + GLAQUA_DEBUG_MSG("unimplemented glAquaDispatchExec"); + return NULL; +} + +static void glAquaBeginDispatchOverride(__GLcontext *gc) +{ + GLAQUA_DEBUG_MSG("unimplemented glAquaBeginDispatchOverride"); +} + +static void glAquaEndDispatchOverride(__GLcontext *gc) +{ + GLAQUA_DEBUG_MSG("unimplemented glAquaEndDispatchOverride"); +} + + +static AGLPixelFormat makeFormat(__GLcontextModes *mode) +{ + int i; + GLint attr[64]; // currently uses max of 30 + AGLPixelFormat result; + + GLAQUA_DEBUG_MSG("makeFormat\n"); + + i = 0; + + // attr [i++] = AGL_ACCELERATED; // require hwaccel - BAD for multiscreen + // attr [i++] = AGL_NO_RECOVERY; // disable fallback renderers - BAD + + if (mode->stereoMode) { + attr[i++] = AGL_STEREO; + } + if (mode->doubleBufferMode) { + attr[i++] = AGL_DOUBLEBUFFER; + } + + if (mode->colorIndexMode) { + attr[i++] = AGL_BUFFER_SIZE; + attr[i++] = mode->indexBits; + } + + if (mode->rgbMode) { + attr[i++] = AGL_RGBA; + attr[i++] = AGL_RED_SIZE; + attr[i++] = mode->redBits; + attr[i++] = AGL_GREEN_SIZE; + attr[i++] = mode->greenBits; + attr[i++] = AGL_BLUE_SIZE; + attr[i++] = mode->blueBits; + attr[i++] = AGL_ALPHA_SIZE; + attr[i++] = mode->alphaBits; + } + + if (mode->haveAccumBuffer) { + attr[i++] = AGL_ACCUM_RED_SIZE; + attr[i++] = mode->accumRedBits; + attr[i++] = AGL_ACCUM_GREEN_SIZE; + attr[i++] = mode->accumGreenBits; + attr[i++] = AGL_ACCUM_BLUE_SIZE; + attr[i++] = mode->accumBlueBits; + attr[i++] = AGL_ACCUM_ALPHA_SIZE; + attr[i++] = mode->accumAlphaBits; + } + if (mode->haveDepthBuffer) { + attr[i++] = AGL_DEPTH_SIZE; + attr[i++] = mode->depthBits; + } + if (mode->haveStencilBuffer) { + attr[i++] = AGL_STENCIL_SIZE; + attr[i++] = mode->stencilBits; + } + + attr[i++] = AGL_AUX_BUFFERS; + attr[i++] = mode->numAuxBuffers; + + attr[i++] = AGL_LEVEL; + attr[i++] = mode->level; + + // mode->pixmapMode ? + + attr[i++] = AGL_NONE; // end of option list + + GLAQUA_DEBUG_MSG("makeFormat almost done\n"); + result = aglChoosePixelFormat(NULL, 0, attr); + GLAQUA_DEBUG_MSG("makeFormat done (0x%x)\n", result); + return result; +} + +static __GLinterface *glAquaCreateContext(__GLimports *imports, + __GLcontextModes *mode, + __GLinterface *shareGC) +{ + __GLcontext *result; + __GLcontext *sharectx = (__GLcontext *)shareGC; + + GLAQUA_DEBUG_MSG("glAquaCreateContext\n"); + + result = (__GLcontext *)calloc(1, sizeof(__GLcontext)); + if (!result) return NULL; + + result->interface.imports = *imports; + result->interface.exports = glAquaExports; + + result->pixelFormat = makeFormat(mode); + if (!result->pixelFormat) { + free(result); + return NULL; + } + + result->ctx = aglCreateContext(result->pixelFormat, + (sharectx && sharectx->ctx) ? sharectx->ctx : NULL); + + if (!result->ctx) { + aglDestroyPixelFormat(result->pixelFormat); + free(result); + return NULL; + } + + result->isAttached = FALSE; + + GLAQUA_DEBUG_MSG("glAquaCreateContext done\n"); + return (__GLinterface *)result; +} + + +Bool +glAquaRealizeWindow(WindowPtr pWin) +{ + // If this window has GL contexts, tell them to reattach + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + glAquaScreenRec *screenPriv = &glAquaScreens[pScreen->myNum]; + __GLXdrawablePrivate *glxPriv; + + GLAQUA_DEBUG_MSG("glAquaRealizeWindow\n"); + + // Allow the window to be created (RootlessRealizeWindow is inside our wrap) + pScreen->RealizeWindow = screenPriv->RealizeWindow; + result = pScreen->RealizeWindow(pWin); + pScreen->RealizeWindow = glAquaRealizeWindow; + + // The Aqua window will already have been created (windows are + // realized from top down) + + // Re-attach this window's GL contexts, if any. + glxPriv = __glXFindDrawablePrivate(pWin->drawable.id); + if (glxPriv) { + __GLXcontext *gx; + __GLcontext *gc; + __GLdrawablePrivate *glPriv = &glxPriv->glPriv; + GLAQUA_DEBUG_MSG("glAquaRealizeWindow is GL drawable!\n"); + + // GL contexts bound to this window for drawing + for (gx = glxPriv->drawGlxc; gx != NULL; gx = gx->nextDrawPriv) { + gc = (__GLcontext *)gx->gc; + attach(gc, glPriv); + } + + // GL contexts bound to this window for reading + for (gx = glxPriv->readGlxc; gx != NULL; gx = gx->nextReadPriv) { + gc = (__GLcontext *)gx->gc; + attach(gc, glPriv); + } + } + + return result; +} + +Bool +glAquaUnrealizeWindow(WindowPtr pWin) +{ + // If this window has GL contexts, tell them to unattach + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + glAquaScreenRec *screenPriv = &glAquaScreens[pScreen->myNum]; + __GLXdrawablePrivate *glxPriv; + + GLAQUA_DEBUG_MSG("glAquaUnrealizeWindow\n"); + + // The Aqua window may have already been destroyed (windows + // are unrealized from top down) + + // Unattach this window's GL contexts, if any. + glxPriv = __glXFindDrawablePrivate(pWin->drawable.id); + if (glxPriv) { + __GLXcontext *gx; + __GLcontext *gc; + GLAQUA_DEBUG_MSG("glAquaUnealizeWindow is GL drawable!\n"); + + // GL contexts bound to this window for drawing + for (gx = glxPriv->drawGlxc; gx != NULL; gx = gx->nextDrawPriv) { + gc = (__GLcontext *)gx->gc; + attach(gc, NULL); + } + + // GL contexts bound to this window for reading + for (gx = glxPriv->readGlxc; gx != NULL; gx = gx->nextReadPriv) { + gc = (__GLcontext *)gx->gc; + attach(gc, NULL); + } + } + + pScreen->UnrealizeWindow = screenPriv->UnrealizeWindow; + result = pScreen->UnrealizeWindow(pWin); + pScreen->UnrealizeWindow = glAquaUnrealizeWindow; + + return result; +} + + +// Originally copied from Mesa + +static int numConfigs = 0; +static __GLXvisualConfig *visualConfigs = NULL; +static void **visualPrivates = NULL; + +/* + * In the case the driver defines no GLX visuals we'll use these. + * Note that for TrueColor and DirectColor visuals, bufferSize is the + * sum of redSize, greenSize, blueSize and alphaSize, which may be larger + * than the nplanes/rootDepth of the server's X11 visuals + */ +#define NUM_FALLBACK_CONFIGS 5 +static __GLXvisualConfig FallbackConfigs[NUM_FALLBACK_CONFIGS] = { + /* [0] = RGB, double buffered, Z */ + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 0, /* rgba sizes */ + -1, -1, -1, 0, /* rgba masks */ + 0, 0, 0, 0, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 0, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE, /* visualRating */ + GLX_NONE, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, + /* [1] = RGB, double buffered, Z, stencil, accum */ + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 0, /* rgba sizes */ + -1, -1, -1, 0, /* rgba masks */ + 16, 16, 16, 0, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 8, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE, /* visualRating */ + GLX_NONE, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, + /* [2] = RGB+Alpha, double buffered, Z, stencil, accum */ + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 8, /* rgba sizes */ + -1, -1, -1, -1, /* rgba masks */ + 16, 16, 16, 16, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 8, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE, /* visualRating */ + GLX_NONE, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, + /* [3] = RGB+Alpha, single buffered, Z, stencil, accum */ + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 8, /* rgba sizes */ + -1, -1, -1, -1, /* rgba masks */ + 16, 16, 16, 16, /* rgba accum sizes */ + False, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 8, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE, /* visualRating */ + GLX_NONE, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, + /* [4] = CI, double buffered, Z */ + { + -1, /* vid */ + -1, /* class */ + False, /* rgba? (false = color index) */ + -1, -1, -1, 0, /* rgba sizes */ + -1, -1, -1, 0, /* rgba masks */ + 0, 0, 0, 0, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 0, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE, /* visualRating */ + GLX_NONE, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, +}; + +static __GLXvisualConfig NullConfig = { + -1, /* vid */ + -1, /* class */ + False, /* rgba */ + -1, -1, -1, 0, /* rgba sizes */ + -1, -1, -1, 0, /* rgba masks */ + 0, 0, 0, 0, /* rgba accum sizes */ + False, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 0, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE_EXT, /* visualRating */ + 0, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ +}; + + +static int count_bits(unsigned int n) +{ + int bits = 0; + + while (n > 0) { + if (n & 1) bits++; + n >>= 1; + } + return bits; +} + + +static Bool init_visuals(int *nvisualp, VisualPtr *visualp, + VisualID *defaultVisp, + int ndepth, DepthPtr pdepth, + int rootDepth) +{ + int numRGBconfigs; + int numCIconfigs; + int numVisuals = *nvisualp; + int numNewVisuals; + int numNewConfigs; + VisualPtr pVisual = *visualp; + VisualPtr pVisualNew = NULL; + VisualID *orig_vid = NULL; + __GLcontextModes *modes; + __GLXvisualConfig *pNewVisualConfigs = NULL; + void **glXVisualPriv; + void **pNewVisualPriv; + int found_default; + int i, j, k; + + GLAQUA_DEBUG_MSG("init_visuals\n"); + + if (numConfigs > 0) + numNewConfigs = numConfigs; + else + numNewConfigs = NUM_FALLBACK_CONFIGS; + + /* Alloc space for the list of new GLX visuals */ + pNewVisualConfigs = (__GLXvisualConfig *) + __glXMalloc(numNewConfigs * sizeof(__GLXvisualConfig)); + if (!pNewVisualConfigs) { + return FALSE; + } + + /* Alloc space for the list of new GLX visual privates */ + pNewVisualPriv = (void **) __glXMalloc(numNewConfigs * sizeof(void *)); + if (!pNewVisualPriv) { + __glXFree(pNewVisualConfigs); + return FALSE; + } + + /* + ** If SetVisualConfigs was not called, then use default GLX + ** visual configs. + */ + if (numConfigs == 0) { + memcpy(pNewVisualConfigs, FallbackConfigs, + NUM_FALLBACK_CONFIGS * sizeof(__GLXvisualConfig)); + memset(pNewVisualPriv, 0, NUM_FALLBACK_CONFIGS * sizeof(void *)); + } + else { + /* copy driver's visual config info */ + for (i = 0; i < numConfigs; i++) { + pNewVisualConfigs[i] = visualConfigs[i]; + pNewVisualPriv[i] = visualPrivates[i]; + } + } + + /* Count the number of RGB and CI visual configs */ + numRGBconfigs = 0; + numCIconfigs = 0; + for (i = 0; i < numNewConfigs; i++) { + if (pNewVisualConfigs[i].rgba) + numRGBconfigs++; + else + numCIconfigs++; + } + + /* Count the total number of visuals to compute */ + numNewVisuals = 0; + for (i = 0; i < numVisuals; i++) { + int count; + + count = ((pVisual[i].class == TrueColor || + pVisual[i].class == DirectColor) + ? numRGBconfigs : numCIconfigs); + if (count == 0) + count = 1; /* preserve the existing visual */ + + numNewVisuals += count; + } + + /* Reset variables for use with the next screen/driver's visual configs */ + visualConfigs = NULL; + numConfigs = 0; + + /* Alloc temp space for the list of orig VisualIDs for each new visual */ + orig_vid = (VisualID *)__glXMalloc(numNewVisuals * sizeof(VisualID)); + if (!orig_vid) { + __glXFree(pNewVisualPriv); + __glXFree(pNewVisualConfigs); + return FALSE; + } + + /* Alloc space for the list of glXVisuals */ + modes = _gl_context_modes_create(numNewVisuals, sizeof(__GLcontextModes)); + if (modes == NULL) { + __glXFree(orig_vid); + __glXFree(pNewVisualPriv); + __glXFree(pNewVisualConfigs); + return FALSE; + } + + /* Alloc space for the list of glXVisualPrivates */ + glXVisualPriv = (void **)__glXMalloc(numNewVisuals * sizeof(void *)); + if (!glXVisualPriv) { + _gl_context_modes_destroy( modes ); + __glXFree(orig_vid); + __glXFree(pNewVisualPriv); + __glXFree(pNewVisualConfigs); + return FALSE; + } + + /* Alloc space for the new list of the X server's visuals */ + pVisualNew = (VisualPtr)__glXMalloc(numNewVisuals * sizeof(VisualRec)); + if (!pVisualNew) { + __glXFree(glXVisualPriv); + _gl_context_modes_destroy( modes ); + __glXFree(orig_vid); + __glXFree(pNewVisualPriv); + __glXFree(pNewVisualConfigs); + return FALSE; + } + + /* Initialize the new visuals */ + found_default = FALSE; + glAquaScreens[screenInfo.numScreens-1].modes = modes; + for (i = j = 0; i < numVisuals; i++) { + int is_rgb = (pVisual[i].class == TrueColor || + pVisual[i].class == DirectColor); + + if (!is_rgb) + { + /* We don't support non-rgb visuals for GL. But we don't + want to remove them either, so just pass them through + with null glX configs */ + + pVisualNew[j] = pVisual[i]; + pVisualNew[j].vid = FakeClientID(0); + + /* Check for the default visual */ + if (!found_default && pVisual[i].vid == *defaultVisp) { + *defaultVisp = pVisualNew[j].vid; + found_default = TRUE; + } + + /* Save the old VisualID */ + orig_vid[j] = pVisual[i].vid; + + /* Initialize the glXVisual */ + _gl_copy_visual_to_context_mode( modes, & NullConfig ); + modes->visualID = pVisualNew[j].vid; + + j++; + + continue; + } + + for (k = 0; k < numNewConfigs; k++) { + if (pNewVisualConfigs[k].rgba != is_rgb) + continue; + + assert( modes != NULL ); + + /* Initialize the new visual */ + pVisualNew[j] = pVisual[i]; + pVisualNew[j].vid = FakeClientID(0); + + /* Check for the default visual */ + if (!found_default && pVisual[i].vid == *defaultVisp) { + *defaultVisp = pVisualNew[j].vid; + found_default = TRUE; + } + + /* Save the old VisualID */ + orig_vid[j] = pVisual[i].vid; + + /* Initialize the glXVisual */ + _gl_copy_visual_to_context_mode( modes, & pNewVisualConfigs[k] ); + modes->visualID = pVisualNew[j].vid; + + /* + * If the class is -1, then assume the X visual information + * is identical to what GLX needs, and take them from the X + * visual. NOTE: if class != -1, then all other fields MUST + * be initialized. + */ + if (modes->visualType == GLX_NONE) { + modes->visualType = _gl_convert_from_x_visual_type( pVisual[i].class ); + modes->redBits = count_bits(pVisual[i].redMask); + modes->greenBits = count_bits(pVisual[i].greenMask); + modes->blueBits = count_bits(pVisual[i].blueMask); + modes->alphaBits = modes->alphaBits; + modes->redMask = pVisual[i].redMask; + modes->greenMask = pVisual[i].greenMask; + modes->blueMask = pVisual[i].blueMask; + modes->alphaMask = modes->alphaMask; + modes->rgbBits = (is_rgb) + ? (modes->redBits + modes->greenBits + + modes->blueBits + modes->alphaBits) + : rootDepth; + } + + /* Save the device-dependent private for this visual */ + glXVisualPriv[j] = pNewVisualPriv[k]; + + j++; + modes = modes->next; + } + } + + assert(j <= numNewVisuals); + + /* Save the GLX visuals in the screen structure */ + glAquaScreens[screenInfo.numScreens-1].num_vis = numNewVisuals; + glAquaScreens[screenInfo.numScreens-1].priv = glXVisualPriv; + + /* Set up depth's VisualIDs */ + for (i = 0; i < ndepth; i++) { + int numVids = 0; + VisualID *pVids = NULL; + int k, n = 0; + + /* Count the new number of VisualIDs at this depth */ + for (j = 0; j < pdepth[i].numVids; j++) + for (k = 0; k < numNewVisuals; k++) + if (pdepth[i].vids[j] == orig_vid[k]) + numVids++; + + /* Allocate a new list of VisualIDs for this depth */ + pVids = (VisualID *)__glXMalloc(numVids * sizeof(VisualID)); + + /* Initialize the new list of VisualIDs for this depth */ + for (j = 0; j < pdepth[i].numVids; j++) + for (k = 0; k < numNewVisuals; k++) + if (pdepth[i].vids[j] == orig_vid[k]) + pVids[n++] = pVisualNew[k].vid; + + /* Update this depth's list of VisualIDs */ + __glXFree(pdepth[i].vids); + pdepth[i].vids = pVids; + pdepth[i].numVids = numVids; + } + + /* Update the X server's visuals */ + *nvisualp = numNewVisuals; + *visualp = pVisualNew; + + /* Free the old list of the X server's visuals */ + __glXFree(pVisual); + + /* Clean up temporary allocations */ + __glXFree(orig_vid); + __glXFree(pNewVisualPriv); + __glXFree(pNewVisualConfigs); + + /* Free the private list created by DDX HW driver */ + if (visualPrivates) + xfree(visualPrivates); + visualPrivates = NULL; + + return TRUE; +} + +/* based on code in i830_dri.c + This ends calling glAquaSetVisualConfigs to set the static + numconfigs, etc. */ +static void +glAquaInitVisualConfigs(void) +{ + int lclNumConfigs = 0; + __GLXvisualConfig *lclVisualConfigs = NULL; + void **lclVisualPrivates = NULL; + + int depth, aux, buffers, stencil, accum; + int i = 0; + + GLAQUA_DEBUG_MSG("glAquaInitVisualConfigs "); + + /* count num configs: + 2 Z buffer (0, 24 bit) + 2 AUX buffer (0, 2) + 2 buffers (single, double) + 2 stencil (0, 8 bit) + 2 accum (0, 64 bit) + = 32 configs */ + + lclNumConfigs = 2 * 2 * 2 * 2 * 2; /* 32 */ + + /* alloc */ + lclVisualConfigs = xcalloc(sizeof(__GLXvisualConfig), lclNumConfigs); + lclVisualPrivates = xcalloc(sizeof(void *), lclNumConfigs); + + /* fill in configs */ + if (NULL != lclVisualConfigs) { + i = 0; /* current buffer */ + for (depth = 0; depth < 2; depth++) { + for (aux = 0; aux < 2; aux++) { + for (buffers = 0; buffers < 2; buffers++) { + for (stencil = 0; stencil < 2; stencil++) { + for (accum = 0; accum < 2; accum++) { + lclVisualConfigs[i].vid = -1; + lclVisualConfigs[i].class = -1; + lclVisualConfigs[i].rgba = TRUE; + lclVisualConfigs[i].redSize = -1; + lclVisualConfigs[i].greenSize = -1; + lclVisualConfigs[i].blueSize = -1; + lclVisualConfigs[i].redMask = -1; + lclVisualConfigs[i].greenMask = -1; + lclVisualConfigs[i].blueMask = -1; + lclVisualConfigs[i].alphaMask = 0; + if (accum) { + lclVisualConfigs[i].accumRedSize = 16; + lclVisualConfigs[i].accumGreenSize = 16; + lclVisualConfigs[i].accumBlueSize = 16; + lclVisualConfigs[i].accumAlphaSize = 16; + } + else { + lclVisualConfigs[i].accumRedSize = 0; + lclVisualConfigs[i].accumGreenSize = 0; + lclVisualConfigs[i].accumBlueSize = 0; + lclVisualConfigs[i].accumAlphaSize = 0; + } + lclVisualConfigs[i].doubleBuffer = buffers ? TRUE : FALSE; + lclVisualConfigs[i].stereo = FALSE; + lclVisualConfigs[i].bufferSize = -1; + + lclVisualConfigs[i].depthSize = depth? 24 : 0; + lclVisualConfigs[i].stencilSize = stencil ? 8 : 0; + lclVisualConfigs[i].auxBuffers = aux ? 2 : 0; + lclVisualConfigs[i].level = 0; + lclVisualConfigs[i].visualRating = GLX_NONE_EXT; + lclVisualConfigs[i].transparentPixel = 0; + lclVisualConfigs[i].transparentRed = 0; + lclVisualConfigs[i].transparentGreen = 0; + lclVisualConfigs[i].transparentBlue = 0; + lclVisualConfigs[i].transparentAlpha = 0; + lclVisualConfigs[i].transparentIndex = 0; + i++; + } + } + } + } + } + } + if (i != lclNumConfigs) + GLAQUA_DEBUG_MSG("glAquaInitVisualConfigs failed to alloc visual configs"); + + GlxSetVisualConfigs(lclNumConfigs, lclVisualConfigs, lclVisualPrivates); +} + + +static void glAquaSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs, + void **privates) +{ + GLAQUA_DEBUG_MSG("glAquaSetVisualConfigs\n"); + + numConfigs = nconfigs; + visualConfigs = configs; + visualPrivates = privates; +} + +static Bool glAquaInitVisuals(VisualPtr *visualp, DepthPtr *depthp, + int *nvisualp, int *ndepthp, + int *rootDepthp, VisualID *defaultVisp, + unsigned long sizes, int bitsPerRGB) +{ + GLAQUA_DEBUG_MSG("glAquaInitVisuals\n"); + + if (numConfigs == 0) /* if no configs */ + glAquaInitVisualConfigs(); /* ensure the visual configs are setup */ + + /* + * Setup the visuals supported by this particular screen. + */ + return init_visuals(nvisualp, visualp, defaultVisp, + *ndepthp, *depthp, *rootDepthp); +} + + +static void fixup_visuals(int screen) +{ + ScreenPtr pScreen = screenInfo.screens[screen]; + glAquaScreenRec *pScr = &glAquaScreens[screen]; + int j; + __GLcontextModes *modes; + + GLAQUA_DEBUG_MSG("fixup_visuals\n"); + + for ( modes = pScr->modes ; modes != NULL ; modes = modes->next ) { + const int vis_class = _gl_convert_to_x_visual_type( modes->visualType ); + const int nplanes = (modes->rgbBits - modes->alphaBits); + const VisualPtr pVis = pScreen->visuals; + + /* Find a visual that matches the GLX visual's class and size */ + for (j = 0; j < pScreen->numVisuals; j++) { + if (pVis[j].class == vis_class && + pVis[j].nplanes == nplanes) { + + /* Fixup the masks */ + modes->redMask = pVis[j].redMask; + modes->greenMask = pVis[j].greenMask; + modes->blueMask = pVis[j].blueMask; + + /* Recalc the sizes */ + modes->redBits = count_bits(modes->redMask); + modes->greenBits = count_bits(modes->greenMask); + modes->blueBits = count_bits(modes->blueMask); + } + } + } +} + +static void init_screen_visuals(int screen) +{ + ScreenPtr pScreen = screenInfo.screens[screen]; + __GLcontextModes *modes; + int *used; + int i, j; + + GLAQUA_DEBUG_MSG("init_screen_visuals\n"); + + /* FIXME: Change 'used' to be a array of bits (rather than of ints), + * FIXME: create a stack array of 8 or 16 bytes. If 'numVisuals' is less + * FIXME: than 64 or 128 the stack array can be used instead of calling + * FIXME: __glXMalloc / __glXFree. If nothing else, convert 'used' to + * FIXME: array of bytes instead of ints! + */ + used = (int *)__glXMalloc(pScreen->numVisuals * sizeof(int)); + __glXMemset(used, 0, pScreen->numVisuals * sizeof(int)); + + i = 0; + for ( modes = glAquaScreens[screen].modes + ; modes != NULL + ; modes = modes->next ) { + const int vis_class = _gl_convert_to_x_visual_type( modes->visualType ); + const int nplanes = (modes->rgbBits - modes->alphaBits); + const VisualPtr pVis = pScreen->visuals; + + for (j = 0; j < pScreen->numVisuals; j++) { + if (pVis[j].class == vis_class && + pVis[j].nplanes == nplanes && + pVis[j].redMask == modes->redMask && + pVis[j].greenMask == modes->greenMask && + pVis[j].blueMask == modes->blueMask && + !used[j]) { + + /* Set the VisualID */ + modes->visualID = pVis[j].vid; + + /* Mark this visual used */ + used[j] = 1; + break; + } + } + if ( j == pScreen->numVisuals ) { + ErrorF("No matching visual for __GLcontextMode with " + "visual class = %d (%d), nplanes = %u\n", + vis_class, + (int)modes->visualType, + (unsigned int)(modes->rgbBits - modes->alphaBits) ); + } + else if ( modes->visualID == -1 ) { + FatalError( "Matching visual found, but visualID still -1!\n" ); + } + + i++; + } + + __glXFree(used); +} + +static Bool glAquaScreenProbe(int screen) +{ + ScreenPtr pScreen; + glAquaScreenRec *screenPriv; + + GLAQUA_DEBUG_MSG("glAquaScreenProbe\n"); + + /* + * Set up the current screen's visuals. + */ + __glDDXScreenInfo.modes = glAquaScreens[screen].modes; + __glDDXScreenInfo.pVisualPriv = glAquaScreens[screen].priv; + __glDDXScreenInfo.numVisuals = + __glDDXScreenInfo.numUsableVisuals = glAquaScreens[screen].num_vis; + + /* + * Set the current screen's createContext routine. This could be + * wrapped by a DDX GLX context creation routine. + */ + __glDDXScreenInfo.createContext = glAquaCreateContext; + + /* + * The ordering of the rgb compenents might have been changed by the + * driver after mi initialized them. + */ + fixup_visuals(screen); + + /* + * Find the GLX visuals that are supported by this screen and create + * XMesa's visuals. + */ + init_screen_visuals(screen); + + /* + * Wrap RealizeWindow and UnrealizeWindow on this screen + */ + pScreen = screenInfo.screens[screen]; + screenPriv = &glAquaScreens[screen]; + screenPriv->RealizeWindow = pScreen->RealizeWindow; + pScreen->RealizeWindow = glAquaRealizeWindow; + screenPriv->UnrealizeWindow = pScreen->UnrealizeWindow; + pScreen->UnrealizeWindow = glAquaUnrealizeWindow; + + return TRUE; +} + + +static GLboolean glAquaResizeBuffers(__GLdrawableBuffer *buffer, + GLint x, GLint y, + GLuint width, GLuint height, + __GLdrawablePrivate *glPriv, + GLuint bufferMask) +{ + GLAquaDrawableRec *aquaPriv = (GLAquaDrawableRec *)glPriv->private; + __GLXdrawablePrivate *glxPriv = (__GLXdrawablePrivate *)glPriv->other; + __GLXcontext *gx; + __GLcontext *gc; + + GLAQUA_DEBUG_MSG("glAquaResizeBuffers to (%d %d %d %d)\n", x, y, width, height); + + // update all contexts that point at this drawable for drawing (hack?) + for (gx = glxPriv->drawGlxc; gx != NULL; gx = gx->nextDrawPriv) { + gc = (__GLcontext *)gx->gc; + attach(gc, glPriv); + } + + // update all contexts that point at this drawable for reading (hack?) + for (gx = glxPriv->readGlxc; gx != NULL; gx = gx->nextReadPriv) { + gc = (__GLcontext *)gx->gc; + attach(gc, glPriv); + } + + return aquaPriv->resize(buffer, x, y, width, height, glPriv, bufferMask); +} + + +static GLboolean glAquaSwapBuffers(__GLXdrawablePrivate *glxPriv) +{ + // fixme AGL software renderer will use properties of current QD port (bad) + + // swap buffers on only *one* of the contexts + // (e.g. the last one for drawing) + __GLcontext *gc = (__GLcontext *)glxPriv->drawGlxc->gc; + if (gc && gc->ctx) aglSwapBuffers(gc->ctx); + + return GL_TRUE; +} + +static void glAquaDestroyDrawablePrivate(__GLdrawablePrivate *glPriv) +{ + GLAQUA_DEBUG_MSG("glAquaDestroyDrawablePrivate\n"); + + free(glPriv->private); + glPriv->private = NULL; +} + +static void glAquaCreateBuffer(__GLXdrawablePrivate *glxPriv) +{ + GLAquaDrawableRec *aquaPriv = malloc(sizeof(GLAquaDrawableRec)); + __GLdrawablePrivate *glPriv = &glxPriv->glPriv; + + GLAQUA_DEBUG_MSG("glAquaCreateBuffer\n"); + + // replace swapBuffers (original is never called) + glxPriv->swapBuffers = glAquaSwapBuffers; + + // wrap front buffer resize + aquaPriv->resize = glPriv->frontBuffer.resize; + glPriv->frontBuffer.resize = glAquaResizeBuffers; + + // stash private data + glPriv->private = aquaPriv; + glPriv->freePrivate = glAquaDestroyDrawablePrivate; +} + + +static void glAquaResetExtension(void) +{ + GLAQUA_DEBUG_MSG("glAquaResetExtension\n"); + aglResetLibrary(); +} + + + +// Extra goodies for glx + +GLuint __glFloorLog2(GLuint val) +{ + int c = 0; + + while (val > 1) { + c++; + val >>= 1; + } + return c; +} diff --git a/xorg-server-1.4/GL/glx/Makefile.am b/xorg-server-1.4/GL/glx/Makefile.am new file mode 100644 index 0000000..7c1730e --- /dev/null +++ b/xorg-server-1.4/GL/glx/Makefile.am @@ -0,0 +1,83 @@ +if AIGLX +GLXDRI_LIBRARY = libglxdri.la +endif + +noinst_LTLIBRARIES = libglx.la $(GLXDRI_LIBRARY) + +AM_CFLAGS = \ + -I@MESA_SOURCE@/include \ + @DIX_CFLAGS@ \ + @GL_CFLAGS@ \ + @XLIB_CFLAGS@ \ + @LIBDRM_CFLAGS@ \ + @DRIPROTO_CFLAGS@ \ + -I@MESA_SOURCE@/src/mesa/glapi \ + -I@MESA_SOURCE@/src/mesa/main \ + -DXFree86Server \ + @GLX_DEFINES@ + +# none yet +#sdk_HEADERS = + +INCLUDES = \ + -I$(top_srcdir)/hw/xfree86/os-support \ + -I$(top_srcdir)/hw/xfree86/os-support/bus \ + -I$(top_srcdir)/hw/xfree86/common \ + -I$(top_srcdir)/hw/xfree86/dri \ + -I$(top_srcdir)/mi + + +nodist_libglx_la_SOURCES = indirect_size.h \ + glapi.c \ + glcontextmodes.c \ + glcontextmode.h \ + glthread.c + +libglxdri_la_SOURCES = \ + glxdri.c \ + extension_string.c \ + extension_string.h + +libglx_la_SOURCES = \ + g_disptab.h \ + glxbyteorder.h \ + glxcmds.c \ + glxcmdsswap.c \ + glxcontext.h \ + glxdrawable.h \ + glxext.c \ + glxext.h \ + glxglcore.c \ + glxscreens.c \ + glxscreens.h \ + glxserver.h \ + glxutil.c \ + glxutil.h \ + glxvisuals.c \ + indirect_dispatch.c \ + indirect_dispatch.h \ + indirect_dispatch_swap.c \ + indirect_program.c \ + indirect_reqsize.c \ + indirect_reqsize.h \ + indirect_size_get.c \ + indirect_size_get.h \ + indirect_table.c \ + indirect_table.h \ + indirect_texture_compression.c \ + indirect_util.c \ + indirect_util.h \ + render2.c \ + render2swap.c \ + renderpix.c \ + renderpixswap.c \ + rensize.c \ + single2.c \ + single2swap.c \ + singlepix.c \ + singlepixswap.c \ + singlesize.c \ + singlesize.h \ + swap_interval.c \ + unpack.h \ + xfont.c diff --git a/xorg-server-1.4/GL/glx/Makefile.in b/xorg-server-1.4/GL/glx/Makefile.in new file mode 100644 index 0000000..c880158 --- /dev/null +++ b/xorg-server-1.4/GL/glx/Makefile.in @@ -0,0 +1,743 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = GL/glx +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libglx_la_LIBADD = +am_libglx_la_OBJECTS = glxcmds.lo glxcmdsswap.lo glxext.lo \ + glxglcore.lo glxscreens.lo glxutil.lo glxvisuals.lo \ + indirect_dispatch.lo indirect_dispatch_swap.lo \ + indirect_program.lo indirect_reqsize.lo indirect_size_get.lo \ + indirect_table.lo indirect_texture_compression.lo \ + indirect_util.lo render2.lo render2swap.lo renderpix.lo \ + renderpixswap.lo rensize.lo single2.lo single2swap.lo \ + singlepix.lo singlepixswap.lo singlesize.lo swap_interval.lo \ + xfont.lo +nodist_libglx_la_OBJECTS = glapi.lo glcontextmodes.lo glthread.lo +libglx_la_OBJECTS = $(am_libglx_la_OBJECTS) \ + $(nodist_libglx_la_OBJECTS) +libglxdri_la_LIBADD = +am_libglxdri_la_OBJECTS = glxdri.lo extension_string.lo +libglxdri_la_OBJECTS = $(am_libglxdri_la_OBJECTS) +@AIGLX_TRUE@am_libglxdri_la_rpath = +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libglx_la_SOURCES) $(nodist_libglx_la_SOURCES) \ + $(libglxdri_la_SOURCES) +DIST_SOURCES = $(libglx_la_SOURCES) $(libglxdri_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +@AIGLX_TRUE@GLXDRI_LIBRARY = libglxdri.la +noinst_LTLIBRARIES = libglx.la $(GLXDRI_LIBRARY) +AM_CFLAGS = \ + -I@MESA_SOURCE@/include \ + @DIX_CFLAGS@ \ + @GL_CFLAGS@ \ + @XLIB_CFLAGS@ \ + @LIBDRM_CFLAGS@ \ + @DRIPROTO_CFLAGS@ \ + -I@MESA_SOURCE@/src/mesa/glapi \ + -I@MESA_SOURCE@/src/mesa/main \ + -DXFree86Server \ + @GLX_DEFINES@ + + +# none yet +#sdk_HEADERS = +INCLUDES = \ + -I$(top_srcdir)/hw/xfree86/os-support \ + -I$(top_srcdir)/hw/xfree86/os-support/bus \ + -I$(top_srcdir)/hw/xfree86/common \ + -I$(top_srcdir)/hw/xfree86/dri \ + -I$(top_srcdir)/mi + +nodist_libglx_la_SOURCES = indirect_size.h \ + glapi.c \ + glcontextmodes.c \ + glcontextmode.h \ + glthread.c + +libglxdri_la_SOURCES = \ + glxdri.c \ + extension_string.c \ + extension_string.h + +libglx_la_SOURCES = \ + g_disptab.h \ + glxbyteorder.h \ + glxcmds.c \ + glxcmdsswap.c \ + glxcontext.h \ + glxdrawable.h \ + glxext.c \ + glxext.h \ + glxglcore.c \ + glxscreens.c \ + glxscreens.h \ + glxserver.h \ + glxutil.c \ + glxutil.h \ + glxvisuals.c \ + indirect_dispatch.c \ + indirect_dispatch.h \ + indirect_dispatch_swap.c \ + indirect_program.c \ + indirect_reqsize.c \ + indirect_reqsize.h \ + indirect_size_get.c \ + indirect_size_get.h \ + indirect_table.c \ + indirect_table.h \ + indirect_texture_compression.c \ + indirect_util.c \ + indirect_util.h \ + render2.c \ + render2swap.c \ + renderpix.c \ + renderpixswap.c \ + rensize.c \ + single2.c \ + single2swap.c \ + singlepix.c \ + singlepixswap.c \ + singlesize.c \ + singlesize.h \ + swap_interval.c \ + unpack.h \ + xfont.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GL/glx/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign GL/glx/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libglx.la: $(libglx_la_OBJECTS) $(libglx_la_DEPENDENCIES) + $(LINK) $(libglx_la_OBJECTS) $(libglx_la_LIBADD) $(LIBS) +libglxdri.la: $(libglxdri_la_OBJECTS) $(libglxdri_la_DEPENDENCIES) + $(LINK) $(am_libglxdri_la_rpath) $(libglxdri_la_OBJECTS) $(libglxdri_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extension_string.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glapi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glcontextmodes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glthread.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxcmds.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxcmdsswap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxdri.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxglcore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxscreens.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxutil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxvisuals.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_dispatch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_dispatch_swap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_program.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_reqsize.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_size_get.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_table.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_texture_compression.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_util.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/render2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/render2swap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renderpix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renderpixswap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rensize.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/single2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/single2swap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/singlepix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/singlepixswap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/singlesize.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swap_interval.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfont.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/GL/glx/extension_string.c b/xorg-server-1.4/GL/glx/extension_string.c new file mode 100644 index 0000000..a4b202a --- /dev/null +++ b/xorg-server-1.4/GL/glx/extension_string.c @@ -0,0 +1,165 @@ +/* + * (C) Copyright IBM Corporation 2002-2006 + * 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, sub + * license, 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 + * THE COPYRIGHT HOLDERS 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. + */ + +/** + * \file extension_string.c + * Routines to manage the GLX extension string and GLX version for AIGLX + * drivers. This code is loosely based on src/glx/x11/glxextensions.c from + * Mesa. + * + * \author Ian Romanick + */ + +#include +#include "extension_string.h" + +#define SET_BIT(m,b) (m[ (b) / 8 ] |= (1U << ((b) % 8))) +#define CLR_BIT(m,b) (m[ (b) / 8 ] &= ~(1U << ((b) % 8))) +#define IS_SET(m,b) ((m[ (b) / 8 ] & (1U << ((b) % 8))) != 0) +#define CONCAT(a,b) a ## b +#define GLX(n) "GLX_" # n, 4 + sizeof( # n ) - 1, CONCAT(n,_bit) +#define VER(a,b) a, b +#define Y 1 +#define N 0 +#define EXT_ENABLED(bit,supported) (IS_SET(supported, bit)) + +struct extension_info { + const char * const name; + unsigned name_len; + + unsigned char bit; + + /** + * This is the lowest version of GLX that "requires" this extension. + * For example, GLX 1.3 requires SGIX_fbconfig, SGIX_pbuffer, and + * SGI_make_current_read. If the extension is not required by any known + * version of GLX, use 0, 0. + */ + unsigned char version_major; + unsigned char version_minor; + + /** + * Is driver support forced by the ABI? + */ + unsigned char driver_support; +}; + +static const struct extension_info known_glx_extensions[] = { +/* GLX_ARB_get_proc_address is implemented on the client. */ + { GLX(ARB_multisample), VER(1,4), Y, }, + + { GLX(EXT_import_context), VER(0,0), Y, }, + { GLX(EXT_texture_from_pixmap), VER(0,0), Y, }, + { GLX(EXT_visual_info), VER(0,0), Y, }, + { GLX(EXT_visual_rating), VER(0,0), Y, }, + + { GLX(MESA_copy_sub_buffer), VER(0,0), N, }, + { GLX(OML_swap_method), VER(0,0), Y, }, + { GLX(SGI_make_current_read), VER(1,3), N, }, + { GLX(SGI_swap_control), VER(0,0), N, }, + { GLX(SGIS_multisample), VER(0,0), Y, }, + { GLX(SGIX_fbconfig), VER(1,3), Y, }, + { GLX(SGIX_pbuffer), VER(1,3), N, }, + { GLX(SGIX_visual_select_group), VER(0,0), Y, }, + { NULL } +}; + + +/** + * Create a GLX extension string for a set of enable bits. + * + * Creates a GLX extension string for the set of bit in \c enable_bits. This + * string is then stored in \c buffer if buffer is not \c NULL. This allows + * two-pass operation. On the first pass the caller passes \c NULL for + * \c buffer, and the function determines how much space is required to store + * the extension string. The caller allocates the buffer and calls the + * function again. + * + * \param enable_bits Bits representing the enabled extensions. + * \param buffer Buffer to store the extension string. May be \c NULL. + * + * \return + * The number of characters in \c buffer that were written to. If \c buffer + * is \c NULL, this is the size of buffer that must be allocated by the + * caller. + */ +int +__glXGetExtensionString(const unsigned char *enable_bits, char *buffer) +{ + unsigned i; + int length = 0; + + + for (i = 0; known_glx_extensions[i].name != NULL; i++) { + const unsigned bit = known_glx_extensions[i].bit; + const size_t len = known_glx_extensions[i].name_len; + + if (EXT_ENABLED(bit, enable_bits)) { + if (buffer != NULL) { + (void) memcpy(& buffer[length], known_glx_extensions[i].name, + len); + + buffer[length + len + 0] = ' '; + buffer[length + len + 1] = '\0'; + } + + length += len + 1; + } + } + + return length + 1; +} + + +void +__glXEnableExtension(unsigned char *enable_bits, const char *ext) +{ + const size_t ext_name_len = strlen(ext); + unsigned i; + + + for (i = 0; known_glx_extensions[i].name != NULL; i++) { + if ((ext_name_len == known_glx_extensions[i].name_len) + && (memcmp(ext, known_glx_extensions[i].name, ext_name_len) == 0)) { + SET_BIT(enable_bits, known_glx_extensions[i].bit); + break; + } + } +} + + +void +__glXInitExtensionEnableBits(unsigned char *enable_bits) +{ + unsigned i; + + + (void) memset(enable_bits, 0, __GLX_EXT_BYTES); + + for (i = 0; known_glx_extensions[i].name != NULL; i++) { + if (known_glx_extensions[i].driver_support) { + SET_BIT(enable_bits, known_glx_extensions[i].bit); + } + } +} diff --git a/xorg-server-1.4/GL/glx/extension_string.h b/xorg-server-1.4/GL/glx/extension_string.h new file mode 100644 index 0000000..98e91bc --- /dev/null +++ b/xorg-server-1.4/GL/glx/extension_string.h @@ -0,0 +1,63 @@ +/* + * (C) Copyright IBM Corporation 2002-2006 + * 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, sub + * license, 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 + * THE COPYRIGHT HOLDERS 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. + */ + +/** + * \file extension_string.h + * Routines to manage the GLX extension string and GLX version for AIGLX + * drivers. This code is loosely based on src/glx/x11/glxextensions.c from + * Mesa. + * + * \author Ian Romanick + */ + +#ifndef GLX_EXTENSION_STRING_H +#define GLX_EXTENSION_STRING_H + +enum { +/* GLX_ARB_get_proc_address is implemented on the client. */ + ARB_multisample_bit = 0, + EXT_import_context_bit, + EXT_texture_from_pixmap_bit, + EXT_visual_info_bit, + EXT_visual_rating_bit, + MESA_copy_sub_buffer_bit, + OML_swap_method_bit, + SGI_make_current_read_bit, + SGI_swap_control_bit, + SGI_video_sync_bit, + SGIS_multisample_bit, + SGIX_fbconfig_bit, + SGIX_pbuffer_bit, + SGIX_visual_select_group_bit, + __NUM_GLX_EXTS, +}; + +#define __GLX_EXT_BYTES ((__NUM_GLX_EXTS + 7) / 8) + +extern int __glXGetExtensionString(const unsigned char *enable_bits, + char *buffer); +extern void __glXEnableExtension(unsigned char *enable_bits, const char *ext); +extern void __glXInitExtensionEnableBits(unsigned char *enable_bits); + +#endif /* GLX_EXTENSION_STRING_H */ diff --git a/xorg-server-1.4/GL/glx/g_disptab.h b/xorg-server-1.4/GL/glx/g_disptab.h new file mode 100644 index 0000000..f9a09cc --- /dev/null +++ b/xorg-server-1.4/GL/glx/g_disptab.h @@ -0,0 +1,53 @@ +/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _GLX_g_disptab_h_ +#define _GLX_g_disptab_h_ +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. +*/ + +extern int __glXDisp_GetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDisp_BindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDisp_QueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDisp_QueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDisp_DestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc); +extern int __glXDisp_QueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDisp_HyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc); + +extern int __glXDispSwap_GetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDispSwap_BindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDispSwap_QueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDispSwap_QueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDispSwap_DestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc); +extern int __glXDispSwap_QueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDispSwap_HyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc); + +#endif /* _GLX_g_disptab_h_ */ diff --git a/xorg-server-1.4/GL/glx/glxbyteorder.h b/xorg-server-1.4/GL/glx/glxbyteorder.h new file mode 100644 index 0000000..cdf6b15 --- /dev/null +++ b/xorg-server-1.4/GL/glx/glxbyteorder.h @@ -0,0 +1,61 @@ +/* + * (C) Copyright IBM Corporation 2006, 2007 + * 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, sub license, + * 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 + * THE COPYRIGHT HOLDERS, THE AUTHORS, 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. + */ + +/** + * \file glxbyteorder.h + * Platform glue for handling byte-ordering issues in GLX protocol. + * + * \author Ian Romanick + */ +#if !defined(__GLXBYTEORDER_H__) +#define __GLXBYTEORDER_H__ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#if HAVE_BYTESWAP_H +#include +#elif defined(USE_SYS_ENDIAN_H) +#include +#elif defined(__APPLE__) +#include +#define bswap_16 OSSwapInt16 +#define bswap_32 OSSwapInt32 +#define bswap_64 OSSwapInt64 +#else +#define bswap_16(value) \ + ((((value) & 0xff) << 8) | ((value) >> 8)) + +#define bswap_32(value) \ + (((uint32_t)bswap_16((uint16_t)((value) & 0xffff)) << 16) | \ + (uint32_t)bswap_16((uint16_t)((value) >> 16))) + +#define bswap_64(value) \ + (((uint64_t)bswap_32((uint32_t)((value) & 0xffffffff)) \ + << 32) | \ + (uint64_t)bswap_32((uint32_t)((value) >> 32))) +#endif + +#endif /* !defined(__GLXBYTEORDER_H__) */ diff --git a/xorg-server-1.4/GL/glx/glxcmds.c b/xorg-server-1.4/GL/glx/glxcmds.c new file mode 100644 index 0000000..900a347 --- /dev/null +++ b/xorg-server-1.4/GL/glx/glxcmds.c @@ -0,0 +1,2466 @@ +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#define NEED_REPLIES +#define FONT_PCF +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include + +#include "glxserver.h" +#include +#include +#include "g_disptab.h" +#include +#include +#include "glxutil.h" +#include "glxext.h" +#include "glcontextmodes.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" +#include "indirect_dispatch.h" +#include "indirect_table.h" +#include "indirect_util.h" + +/************************************************************************/ + +void +GlxSetRenderTables (struct _glapi_table *table) +{ + _glapi_set_dispatch (table); +} + + +/************************************************************************/ + +void +__glXContextDestroy(__GLXcontext *context) +{ + __glXFlushContextCache(); +} + + +static void __glXdirectContextDestroy(__GLXcontext *context) +{ + __glXContextDestroy(context); + xfree(context); +} + +static __GLXcontext *__glXdirectContextCreate(__GLXscreen *screen, + __GLcontextModes *modes, + __GLXcontext *shareContext) +{ + __GLXcontext *context; + + context = xalloc (sizeof (__GLXcontext)); + if (context == NULL) + return NULL; + + memset(context, 0, sizeof *context); + context->destroy = __glXdirectContextDestroy; + + return context; +} + +/** + * Create a GL context with the given properties. This routine is used + * to implement \c glXCreateContext, \c glXCreateNewContext, and + * \c glXCreateContextWithConfigSGIX. This works becuase of the hack way + * that GLXFBConfigs are implemented. Basically, the FBConfigID is the + * same as the VisualID. + */ + +int DoCreateContext(__GLXclientState *cl, GLXContextID gcId, + GLXContextID shareList, VisualID visual, + GLuint screen, GLboolean isDirect) +{ + ClientPtr client = cl->client; + VisualPtr pVisual; + ScreenPtr pScreen; + __GLXcontext *glxc, *shareglxc; + __GLcontextModes *modes; + __GLXscreen *pGlxScreen; + GLint i; + + LEGAL_NEW_RESOURCE(gcId, client); + + /* + ** Check if screen exists. + */ + if (screen >= screenInfo.numScreens) { + client->errorValue = screen; + return BadValue; + } + pScreen = screenInfo.screens[screen]; + pGlxScreen = __glXActiveScreens[screen]; + + /* + ** Check if the visual ID is valid for this screen. + */ + pVisual = pScreen->visuals; + for (i = 0; i < pScreen->numVisuals; i++, pVisual++) { + if (pVisual->vid == visual) { + break; + } + } + if (i == pScreen->numVisuals) { + client->errorValue = visual; + return BadValue; + } + + /* + ** Get configuration of the visual. This assumes that the + ** glXActiveScreens structure contains visual configurations only for the + ** subset of Visuals that are supported by this implementation of the + ** OpenGL. + */ + + modes = _gl_context_modes_find_visual( pGlxScreen->modes, visual ); + if (modes == NULL) { + /* + ** Visual not support on this screen by this OpenGL implementation. + */ + client->errorValue = visual; + return BadValue; + } + + /* + ** Find the display list space that we want to share. + ** + ** NOTE: In a multithreaded X server, we would need to keep a reference + ** count for each display list so that if one client detroyed a list that + ** another client was using, the list would not really be freed until it + ** was no longer in use. Since this sample implementation has no support + ** for multithreaded servers, we don't do this. + */ + if (shareList == None) { + shareglxc = 0; + } else { + shareglxc = (__GLXcontext *) LookupIDByType(shareList, __glXContextRes); + if (!shareglxc) { + client->errorValue = shareList; + return __glXError(GLXBadContext); + } + if (shareglxc->isDirect) { + /* + ** NOTE: no support for sharing display lists between direct + ** contexts, even if they are in the same address space. + */ +#if 0 + /* Disabling this code seems to allow shared display lists + * and texture objects to work. We'll leave it disabled for now. + */ + client->errorValue = shareList; + return BadMatch; +#endif + } else { + /* + ** Create an indirect context regardless of what the client asked + ** for; this way we can share display list space with shareList. + */ + isDirect = GL_FALSE; + } + } + + /* + ** Allocate memory for the new context + */ + if (!isDirect) + glxc = pGlxScreen->createContext(pGlxScreen, modes, shareglxc); + else + glxc = __glXdirectContextCreate(pGlxScreen, modes, shareglxc); + if (!glxc) { + return BadAlloc; + } + + /* + ** Initially, setup the part of the context that could be used by + ** a GL core that needs windowing information (e.g., Mesa). + */ + glxc->pScreen = pScreen; + glxc->pGlxScreen = pGlxScreen; + glxc->pVisual = pVisual; + glxc->modes = modes; + + /* + ** Register this context as a resource. + */ + if (!AddResource(gcId, __glXContextRes, (pointer)glxc)) { + (*glxc->destroy)(glxc); + client->errorValue = gcId; + return BadAlloc; + } + + /* + ** Finally, now that everything is working, setup the rest of the + ** context. + */ + glxc->id = gcId; + glxc->share_id = shareList; + glxc->idExists = GL_TRUE; + glxc->isCurrent = GL_FALSE; + glxc->isDirect = isDirect; + glxc->renderMode = GL_RENDER; + + return Success; +} + + +int __glXDisp_CreateContext(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc; + return DoCreateContext( cl, req->context, req->shareList, req->visual, + req->screen, req->isDirect ); +} + + +int __glXDisp_CreateNewContext(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc; + return DoCreateContext( cl, req->context, req->shareList, req->fbconfig, + req->screen, req->isDirect ); +} + + +int __glXDisp_CreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreateContextWithConfigSGIXReq *req = + (xGLXCreateContextWithConfigSGIXReq *) pc; + return DoCreateContext( cl, req->context, req->shareList, req->fbconfig, + req->screen, req->isDirect ); +} + +/* +** Destroy a GL context as an X resource. +*/ +int __glXDisp_DestroyContext(__GLXclientState *cl, GLbyte *pc) +{ + ClientPtr client = cl->client; + xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc; + GLXContextID gcId = req->context; + __GLXcontext *glxc; + + glxc = (__GLXcontext *) LookupIDByType(gcId, __glXContextRes); + if (glxc) { + /* + ** Just free the resource; don't actually destroy the context, + ** because it might be in use. The + ** destroy method will be called by the resource destruction routine + ** if necessary. + */ + FreeResourceByType(gcId, __glXContextRes, FALSE); + return Success; + } else { + client->errorValue = gcId; + return __glXError(GLXBadContext); + } +} + +/*****************************************************************************/ + +/* +** For each client, the server keeps a table of all the contexts that are +** current for that client (each thread of a client may have its own current +** context). These routines add, change, and lookup contexts in the table. +*/ + +/* +** Add a current context, and return the tag that will be used to refer to it. +*/ +static int AddCurrentContext(__GLXclientState *cl, __GLXcontext *glxc) +{ + int i; + int num = cl->numCurrentContexts; + __GLXcontext **table = cl->currentContexts; + + if (!glxc) return -1; + + /* + ** Try to find an empty slot and use it. + */ + for (i=0; i < num; i++) { + if (!table[i]) { + table[i] = glxc; + return i+1; + } + } + /* + ** Didn't find a free slot, so we'll have to grow the table. + */ + if (!num) { + table = (__GLXcontext **) xalloc(sizeof(__GLXcontext *)); + } else { + table = (__GLXcontext **) xrealloc(table, + (num+1)*sizeof(__GLXcontext *)); + } + table[num] = glxc; + cl->currentContexts = table; + cl->numCurrentContexts++; + return num+1; +} + +/* +** Given a tag, change the current context for the corresponding entry. +*/ +static void ChangeCurrentContext(__GLXclientState *cl, __GLXcontext *glxc, + GLXContextTag tag) +{ + __GLXcontext **table = cl->currentContexts; + table[tag-1] = glxc; +} + +/* +** For this implementation we have chosen to simply use the index of the +** context's entry in the table as the context tag. A tag must be greater +** than 0. +*/ +__GLXcontext *__glXLookupContextByTag(__GLXclientState *cl, GLXContextTag tag) +{ + int num = cl->numCurrentContexts; + + if (tag < 1 || tag > num) { + return 0; + } else { + return cl->currentContexts[tag-1]; + } +} + +/*****************************************************************************/ + +static void StopUsingContext(__GLXcontext *glxc) +{ + if (glxc) { + if (glxc == __glXLastContext) { + /* Tell server GL library */ + __glXLastContext = 0; + } + glxc->isCurrent = GL_FALSE; + if (!glxc->idExists) { + __glXFreeContext(glxc); + } + } +} + +static void StartUsingContext(__GLXclientState *cl, __GLXcontext *glxc) +{ + glxc->isCurrent = GL_TRUE; +} + +/*****************************************************************************/ +/* +** Make an OpenGL context and drawable current. +*/ + +int __glXDisp_MakeCurrent(__GLXclientState *cl, GLbyte *pc) +{ + xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc; + + return DoMakeCurrent( cl, req->drawable, req->drawable, + req->context, req->oldContextTag ); +} + +int __glXDisp_MakeContextCurrent(__GLXclientState *cl, GLbyte *pc) +{ + xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc; + + return DoMakeCurrent( cl, req->drawable, req->readdrawable, + req->context, req->oldContextTag ); +} + +int __glXDisp_MakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc) +{ + xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc; + + return DoMakeCurrent( cl, req->drawable, req->readable, + req->context, req->oldContextTag ); +} + + +/** + * Given a drawable ID, get the associated drawable and / or pixmap. + * + * If the specified drawable ID is not a pixmap, \c ppPixmap will be set + * to \c NULL on return. In either case, \c ppDraw will be set to a drawable. + * In the case where the drawable ID is a pixmap, \c ppDraw will be set to + * the drawable associated with that pixmap. + * + * \param glxc Associated GLX context. + * \param drawId ID of the drawable. + * \param ppDraw Location to store the pointer to the drawable. + * \param ppPixmap Location to store the pointer to the pixmap. + * \param client Pointer to the client state. + * \return Zero is returned on success. Otherwise a GLX / X11 protocol error + * is returned. + * + * \notes This function will need some modification when support pbuffers + * is added. + */ +static int GetDrawableOrPixmap( __GLXcontext *glxc, GLXDrawable drawId, + __GLXdrawable **ppGlxDraw, + __GLXpixmap **ppPixmap, + ClientPtr client ) +{ + DrawablePtr pDraw; + __GLcontextModes *modes; + __GLXdrawable *pGlxDraw; + __GLXpixmap *drawPixmap = NULL; + int rc; + + /* This is the GLX 1.3 case - the client passes in a GLXWindow and + * we just return the __GLXdrawable. The first time a GLXPixmap + * comes in, it doesn't have a corresponding __GLXdrawable, so it + * falls through to the else-case below, but after that it'll have + * a __GLXdrawable and we'll handle it here. */ + pGlxDraw = (__GLXdrawable *) LookupIDByType(drawId, __glXDrawableRes); + if (pGlxDraw != NULL) { + if (glxc != NULL && pGlxDraw->modes != glxc->modes) { + client->errorValue = drawId; + return BadMatch; + } + + *ppGlxDraw = pGlxDraw; + *ppPixmap = pGlxDraw->pGlxPixmap; + return Success; + } + + /* The drawId wasn't a GLXWindow, so presumably it's a regular X + * window. In that case, we create a shadow GLXWindow for it on + * demand here for pre GLX 1.3 compatibility and use the X Window + * XID as its GLXWindow XID. The client can't explicitly create a + * GLXWindow with the same XID as an X Window, so we wont get any + * resource ID clashes. Effectively, the X Window is now also a + * GLXWindow. */ + rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixUnknownAccess); + if (rc == Success) { + if (pDraw->type == DRAWABLE_WINDOW) { + VisualID vid = wVisual((WindowPtr)pDraw); + + modes = _gl_context_modes_find_visual(glxc->pGlxScreen->modes, + vid); + } else { + /* + ** An X Pixmap is not allowed as a parameter (a GLX Pixmap + ** is, but it must first be created with glxCreateGLXPixmap). + */ + client->errorValue = drawId; + return __glXError(GLXBadDrawable); + } + } else { + drawPixmap = (__GLXpixmap *) LookupIDByType(drawId, __glXPixmapRes); + if (drawPixmap) { + pDraw = drawPixmap->pDraw; + modes = drawPixmap->modes; + } else { + /* + ** Drawable is neither a Window nor a GLXPixmap. + */ + client->errorValue = drawId; + return __glXError(GLXBadDrawable); + } + } + + /* If we're not given a context, don't create the __GLXdrawable */ + if (glxc == NULL) { + *ppPixmap = NULL; + *ppGlxDraw = NULL; + return Success; + } + + /* We're binding an X Window or a GLX Pixmap for the first time + * and need to create a GLX drawable for it. First check that the + * drawable screen and fbconfig matches the context ditto. */ + if (pDraw->pScreen != glxc->pScreen || modes != glxc->modes) { + client->errorValue = drawId; + return BadMatch; + } + + pGlxDraw = + glxc->pGlxScreen->createDrawable(glxc->pGlxScreen, + pDraw, drawId, modes); + + /* since we are creating the drawablePrivate, drawId should be new */ + if (!AddResource(drawId, __glXDrawableRes, pGlxDraw)) { + pGlxDraw->destroy (pGlxDraw); + return BadAlloc; + } + + *ppPixmap = drawPixmap; + *ppGlxDraw = pGlxDraw; + + return 0; +} + + +int DoMakeCurrent( __GLXclientState *cl, + GLXDrawable drawId, GLXDrawable readId, + GLXContextID contextId, GLXContextTag tag ) +{ + ClientPtr client = cl->client; + xGLXMakeCurrentReply reply; + __GLXpixmap *drawPixmap = NULL; + __GLXpixmap *readPixmap = NULL; + __GLXcontext *glxc, *prevglxc; + __GLXdrawable *drawPriv = NULL; + __GLXdrawable *readPriv = NULL; + GLint error; + GLuint mask; + + /* + ** If one is None and the other isn't, it's a bad match. + */ + + mask = (drawId == None) ? (1 << 0) : 0; + mask |= (readId == None) ? (1 << 1) : 0; + mask |= (contextId == None) ? (1 << 2) : 0; + + if ( (mask != 0x00) && (mask != 0x07) ) { + return BadMatch; + } + + /* + ** Lookup old context. If we have one, it must be in a usable state. + */ + if (tag != 0) { + prevglxc = __glXLookupContextByTag(cl, tag); + if (!prevglxc) { + /* + ** Tag for previous context is invalid. + */ + return __glXError(GLXBadContextTag); + } + if (prevglxc->renderMode != GL_RENDER) { + /* Oops. Not in render mode render. */ + client->errorValue = prevglxc->id; + return __glXError(GLXBadContextState); + } + } else { + prevglxc = 0; + } + + /* + ** Lookup new context. It must not be current for someone else. + */ + if (contextId != None) { + int status; + + glxc = (__GLXcontext *) LookupIDByType(contextId, __glXContextRes); + if (!glxc) { + client->errorValue = contextId; + return __glXError(GLXBadContext); + } + if ((glxc != prevglxc) && glxc->isCurrent) { + /* Context is current to somebody else */ + return BadAccess; + } + + assert( drawId != None ); + assert( readId != None ); + + status = GetDrawableOrPixmap(glxc, drawId, &drawPriv, &drawPixmap, + client); + if ( status != 0 ) { + return status; + } + + if ( readId != drawId ) { + status = GetDrawableOrPixmap(glxc, readId, &readPriv, &readPixmap, + client); + if ( status != 0 ) { + return status; + } + } else { + readPriv = drawPriv; + } + + } else { + /* Switching to no context. Ignore new drawable. */ + glxc = 0; + drawPriv = 0; + readPriv = 0; + } + + + if (prevglxc) { + /* + ** Flush the previous context if needed. + */ + if (__GLX_HAS_UNFLUSHED_CMDS(prevglxc)) { + if (__glXForceCurrent(cl, tag, (int *)&error)) { + CALL_Flush( GET_DISPATCH(), () ); + __GLX_NOTE_FLUSHED_CMDS(prevglxc); + } else { + return error; + } + } + + /* + ** Make the previous context not current. + */ + if (!(*prevglxc->loseCurrent)(prevglxc)) { + return __glXError(GLXBadContext); + } + __glXFlushContextCache(); + __glXDeassociateContext(prevglxc); + } + + + if ((glxc != 0) && !glxc->isDirect) { + + glxc->drawPriv = drawPriv; + glxc->readPriv = readPriv; + + /* make the context current */ + if (!(*glxc->makeCurrent)(glxc)) { + glxc->drawPriv = NULL; + glxc->readPriv = NULL; + return __glXError(GLXBadContext); + } + + /* resize the buffers */ + if (!(*drawPriv->resize)(drawPriv)) { + /* could not do initial resize. make current failed */ + (*glxc->loseCurrent)(glxc); + glxc->drawPriv = NULL; + glxc->readPriv = NULL; + return __glXError(GLXBadContext); + } + + glxc->isCurrent = GL_TRUE; + __glXAssociateContext(glxc); + assert(drawPriv->drawGlxc == glxc); + assert(readPriv->readGlxc == glxc); + } + + if (prevglxc) { + if (prevglxc->drawPixmap) { + if (prevglxc->readPixmap && + prevglxc->drawPixmap != prevglxc->readPixmap) { + /* + ** The previous drawable was a glx pixmap, release it. + */ + prevglxc->readPixmap->refcnt--; + if (!prevglxc->readPixmap->idExists && + !prevglxc->readPixmap->refcnt) { + PixmapPtr pPixmap = (PixmapPtr) prevglxc->readPixmap->pDraw; + /* + ** The DestroyPixmap routine should decrement the + ** refcount of the X pixmap and free only if it's zero. + */ + (*prevglxc->readPixmap->pScreen->DestroyPixmap)(pPixmap); + xfree(prevglxc->readPixmap); + } + } + + /* + ** The previous drawable was a glx pixmap, release it. + */ + prevglxc->drawPixmap->refcnt--; + if (!prevglxc->drawPixmap->idExists && + !prevglxc->drawPixmap->refcnt) { + PixmapPtr pPixmap = (PixmapPtr) prevglxc->drawPixmap->pDraw; + /* + ** The DestroyPixmap routine should decrement the + ** refcount of the X pixmap and free only if it's zero. + */ + (*prevglxc->drawPixmap->pScreen->DestroyPixmap)(pPixmap); + xfree(prevglxc->drawPixmap); + } + + prevglxc->drawPixmap = NULL; + } + ChangeCurrentContext(cl, glxc, tag); + StopUsingContext(prevglxc); + } else { + tag = AddCurrentContext(cl, glxc); + } + + if (glxc) { + if (drawPixmap) { + drawPixmap->refcnt++; + glxc->drawPixmap = drawPixmap; + } + + if (readPixmap && (readPixmap != drawPixmap)) { + readPixmap->refcnt++; + glxc->readPixmap = readPixmap; + } + + StartUsingContext(cl, glxc); + reply.contextTag = tag; + } else { + reply.contextTag = 0; + } + + reply.length = 0; + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + + if (client->swapped) { + __glXSwapMakeCurrentReply(client, &reply); + } else { + WriteToClient(client, sz_xGLXMakeCurrentReply, (char *)&reply); + } + return Success; +} + +int __glXDisp_IsDirect(__GLXclientState *cl, GLbyte *pc) +{ + ClientPtr client = cl->client; + xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc; + xGLXIsDirectReply reply; + __GLXcontext *glxc; + + /* + ** Find the GL context. + */ + glxc = (__GLXcontext *) LookupIDByType(req->context, __glXContextRes); + if (!glxc) { + client->errorValue = req->context; + return __glXError(GLXBadContext); + } + + reply.isDirect = glxc->isDirect; + reply.length = 0; + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + + if (client->swapped) { + __glXSwapIsDirectReply(client, &reply); + } else { + WriteToClient(client, sz_xGLXIsDirectReply, (char *)&reply); + } + + return Success; +} + +int __glXDisp_QueryVersion(__GLXclientState *cl, GLbyte *pc) +{ + ClientPtr client = cl->client; + xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc; + xGLXQueryVersionReply reply; + GLuint major, minor; + + major = req->majorVersion; + minor = req->minorVersion; + (void)major; + (void)minor; + + /* + ** Server should take into consideration the version numbers sent by the + ** client if it wants to work with older clients; however, in this + ** implementation the server just returns its version number. + */ + reply.majorVersion = GLX_SERVER_MAJOR_VERSION; + reply.minorVersion = GLX_SERVER_MINOR_VERSION; + reply.length = 0; + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + + if (client->swapped) { + __glXSwapQueryVersionReply(client, &reply); + } else { + WriteToClient(client, sz_xGLXQueryVersionReply, (char *)&reply); + } + return Success; +} + +int __glXDisp_WaitGL(__GLXclientState *cl, GLbyte *pc) +{ + xGLXWaitGLReq *req = (xGLXWaitGLReq *)pc; + int error; + + if (!__glXForceCurrent(cl, req->contextTag, &error)) { + return error; + } + CALL_Finish( GET_DISPATCH(), () ); + return Success; +} + +int __glXDisp_WaitX(__GLXclientState *cl, GLbyte *pc) +{ + xGLXWaitXReq *req = (xGLXWaitXReq *)pc; + int error; + + if (!__glXForceCurrent(cl, req->contextTag, &error)) { + return error; + } + /* + ** In a multithreaded server that had separate X and GL threads, we would + ** have to wait for the X thread to finish before returning. As it stands, + ** this sample implementation only supports singlethreaded servers, and + ** nothing needs to be done here. + */ + return Success; +} + +int __glXDisp_CopyContext(__GLXclientState *cl, GLbyte *pc) +{ + ClientPtr client = cl->client; + xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc; + GLXContextID source = req->source; + GLXContextID dest = req->dest; + GLXContextTag tag = req->contextTag; + unsigned long mask = req->mask; + __GLXcontext *src, *dst; + int error; + + /* + ** Check that each context exists. + */ + src = (__GLXcontext *) LookupIDByType(source, __glXContextRes); + if (!src) { + client->errorValue = source; + return __glXError(GLXBadContext); + } + dst = (__GLXcontext *) LookupIDByType(dest, __glXContextRes); + if (!dst) { + client->errorValue = dest; + return __glXError(GLXBadContext); + } + + /* + ** They must be in the same address space, and same screen. + ** NOTE: no support for direct rendering contexts here. + */ + if (src->isDirect || dst->isDirect || + (src->pGlxScreen != dst->pGlxScreen)) { + client->errorValue = source; + return BadMatch; + } + + /* + ** The destination context must not be current for any client. + */ + if (dst->isCurrent) { + client->errorValue = dest; + return BadAccess; + } + + if (tag) { + __GLXcontext *tagcx = __glXLookupContextByTag(cl, tag); + + if (!tagcx) { + return __glXError(GLXBadContextTag); + } + if (tagcx != src) { + /* + ** This would be caused by a faulty implementation of the client + ** library. + */ + return BadMatch; + } + /* + ** In this case, glXCopyContext is in both GL and X streams, in terms + ** of sequentiality. + */ + if (__glXForceCurrent(cl, tag, &error)) { + /* + ** Do whatever is needed to make sure that all preceding requests + ** in both streams are completed before the copy is executed. + */ + CALL_Finish( GET_DISPATCH(), () ); + __GLX_NOTE_FLUSHED_CMDS(tagcx); + } else { + return error; + } + } + /* + ** Issue copy. The only reason for failure is a bad mask. + */ + if (!(*dst->copy)(dst, src, mask)) { + client->errorValue = mask; + return BadValue; + } + return Success; +} + + +int DoGetVisualConfigs(__GLXclientState *cl, unsigned screen, + GLboolean do_swap) +{ + ClientPtr client = cl->client; + xGLXGetVisualConfigsReply reply; + __GLXscreen *pGlxScreen; + __GLcontextModes *modes; + CARD32 buf[__GLX_TOTAL_CONFIG]; + int p; + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + + if (screen >= screenInfo.numScreens) { + /* The client library must send a valid screen number. */ + client->errorValue = screen; + return BadValue; + } + pGlxScreen = __glXActiveScreens[screen]; + + reply.numVisuals = pGlxScreen->numUsableVisuals; + reply.numProps = __GLX_TOTAL_CONFIG; + reply.length = (pGlxScreen->numUsableVisuals * __GLX_SIZE_CARD32 * + __GLX_TOTAL_CONFIG) >> 2; + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + + if ( do_swap ) { + __GLX_SWAP_SHORT(&reply.sequenceNumber); + __GLX_SWAP_INT(&reply.length); + __GLX_SWAP_INT(&reply.numVisuals); + __GLX_SWAP_INT(&reply.numProps); + } + + WriteToClient(client, sz_xGLXGetVisualConfigsReply, (char *)&reply); + + for ( modes = pGlxScreen->modes ; modes != NULL ; modes = modes->next ) { + if (modes->visualID == 0) { + /* not a usable visual */ + continue; + } + p = 0; + buf[p++] = modes->visualID; + buf[p++] = _gl_convert_to_x_visual_type( modes->visualType ); + buf[p++] = modes->rgbMode; + + buf[p++] = modes->redBits; + buf[p++] = modes->greenBits; + buf[p++] = modes->blueBits; + buf[p++] = modes->alphaBits; + buf[p++] = modes->accumRedBits; + buf[p++] = modes->accumGreenBits; + buf[p++] = modes->accumBlueBits; + buf[p++] = modes->accumAlphaBits; + + buf[p++] = modes->doubleBufferMode; + buf[p++] = modes->stereoMode; + + buf[p++] = modes->rgbBits; + buf[p++] = modes->depthBits; + buf[p++] = modes->stencilBits; + buf[p++] = modes->numAuxBuffers; + buf[p++] = modes->level; + /* + ** Add token/value pairs for extensions. + */ + buf[p++] = GLX_VISUAL_CAVEAT_EXT; + buf[p++] = modes->visualRating; + buf[p++] = GLX_TRANSPARENT_TYPE; + buf[p++] = modes->transparentPixel; + buf[p++] = GLX_TRANSPARENT_RED_VALUE; + buf[p++] = modes->transparentRed; + buf[p++] = GLX_TRANSPARENT_GREEN_VALUE; + buf[p++] = modes->transparentGreen; + buf[p++] = GLX_TRANSPARENT_BLUE_VALUE; + buf[p++] = modes->transparentBlue; + buf[p++] = GLX_TRANSPARENT_ALPHA_VALUE; + buf[p++] = modes->transparentAlpha; + buf[p++] = GLX_TRANSPARENT_INDEX_VALUE; + buf[p++] = modes->transparentIndex; + + if ( do_swap ) { + __GLX_SWAP_INT_ARRAY(buf, __GLX_TOTAL_CONFIG); + } + WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG, + (char *)buf); + } + return Success; +} + +int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc) +{ + xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc; + return DoGetVisualConfigs( cl, req->screen, GL_FALSE ); +} + + +/* Composite adds a 32 bit ARGB visual after glxvisuals.c have created + * the context modes for the screens. This visual is useful for GLX + * pixmaps, so we create a single mode for this visual with no extra + * buffers. */ +static void +__glXCreateARGBConfig(__GLXscreen *screen) +{ + __GLcontextModes *modes; + VisualPtr visual; + int i; + + /* search for a 32-bit visual */ + visual = NULL; + for (i = 0; i < screen->pScreen->numVisuals; i++) + if (screen->pScreen->visuals[i].nplanes == 32) { + visual = &screen->pScreen->visuals[i]; + break; + } + + if (visual == NULL || visual->class != TrueColor) + return; + + /* Stop now if we already added the mode. */ + if (_gl_context_modes_find_visual (screen->modes, visual->vid)) + return; + + modes = _gl_context_modes_create(1, sizeof(__GLcontextModes)); + if (modes == NULL) + return; + + /* Insert this new mode at the TAIL of the linked list. + * Previously, the mode was incorrectly inserted at the head of the + * list, causing find_mesa_visual() to be off by one. This would + * GLX clients to blow up if they attempted to use the last mode + * in the list! + */ + { + __GLcontextModes *prev = NULL, *m; + for (m = screen->modes; m; m = m->next) + prev = m; + if (prev) + prev->next = modes; + else + screen->modes = modes; + } + + screen->numUsableVisuals++; + screen->numVisuals++; + + modes->visualID = visual->vid; + modes->fbconfigID = visual->vid; + modes->visualType = GLX_TRUE_COLOR; + modes->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT; + modes->renderType = GLX_RGBA_BIT; + modes->xRenderable = GL_TRUE; + modes->rgbMode = TRUE; + modes->colorIndexMode = FALSE; + modes->doubleBufferMode = FALSE; + modes->stereoMode = FALSE; + modes->haveAccumBuffer = FALSE; + + modes->redBits = visual->bitsPerRGBValue;; + modes->greenBits = visual->bitsPerRGBValue; + modes->blueBits = visual->bitsPerRGBValue; + modes->alphaBits = visual->bitsPerRGBValue; + + modes->rgbBits = 4 * visual->bitsPerRGBValue; + modes->indexBits = 0; + modes->level = 0; + modes->numAuxBuffers = 0; + + modes->haveDepthBuffer = FALSE; + modes->depthBits = 0; + modes->haveStencilBuffer = FALSE; + modes->stencilBits = 0; + + modes->visualRating = GLX_NON_CONFORMANT_CONFIG; +} + + +#define __GLX_TOTAL_FBCONFIG_ATTRIBS (28) +#define __GLX_FBCONFIG_ATTRIBS_LENGTH (__GLX_TOTAL_FBCONFIG_ATTRIBS * 2) +/** + * Send the set of GLXFBConfigs to the client. There is not currently + * and interface into the driver on the server-side to get GLXFBConfigs, + * so we "invent" some based on the \c __GLXvisualConfig structures that + * the driver does supply. + * + * The reply format for both \c glXGetFBConfigs and \c glXGetFBConfigsSGIX + * is the same, so this routine pulls double duty. + */ + +int DoGetFBConfigs(__GLXclientState *cl, unsigned screen, GLboolean do_swap) +{ + ClientPtr client = cl->client; + xGLXGetFBConfigsReply reply; + __GLXscreen *pGlxScreen; + CARD32 buf[__GLX_FBCONFIG_ATTRIBS_LENGTH]; + int p; + __GLcontextModes *modes; + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + + + if (screen >= screenInfo.numScreens) { + /* The client library must send a valid screen number. */ + client->errorValue = screen; + return BadValue; + } + pGlxScreen = __glXActiveScreens[screen]; + + /* Create the "extra" 32bpp ARGB visual, if not already added. + * XXX This is questionable place to do so! Re-examine this someday. + */ + __glXCreateARGBConfig(pGlxScreen); + + reply.numFBConfigs = pGlxScreen->numUsableVisuals; + reply.numAttribs = __GLX_TOTAL_FBCONFIG_ATTRIBS; + reply.length = (__GLX_FBCONFIG_ATTRIBS_LENGTH * reply.numFBConfigs); + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + + if ( do_swap ) { + __GLX_SWAP_SHORT(&reply.sequenceNumber); + __GLX_SWAP_INT(&reply.length); + __GLX_SWAP_INT(&reply.numFBConfigs); + __GLX_SWAP_INT(&reply.numAttribs); + } + + WriteToClient(client, sz_xGLXGetFBConfigsReply, (char *)&reply); + + for ( modes = pGlxScreen->modes ; modes != NULL ; modes = modes->next ) { + if (modes->visualID == 0) { + /* not a usable visual */ + continue; + } + p = 0; + +#define WRITE_PAIR(tag,value) \ + do { buf[p++] = tag ; buf[p++] = value ; } while( 0 ) + + WRITE_PAIR( GLX_VISUAL_ID, modes->visualID ); + WRITE_PAIR( GLX_FBCONFIG_ID, modes->visualID ); + WRITE_PAIR( GLX_X_RENDERABLE, GL_TRUE ); + + WRITE_PAIR( GLX_RGBA, modes->rgbMode ); + WRITE_PAIR( GLX_DOUBLEBUFFER, modes->doubleBufferMode ); + WRITE_PAIR( GLX_STEREO, modes->stereoMode ); + + WRITE_PAIR( GLX_BUFFER_SIZE, modes->rgbBits ); + WRITE_PAIR( GLX_LEVEL, modes->level ); + WRITE_PAIR( GLX_AUX_BUFFERS, modes->numAuxBuffers ); + WRITE_PAIR( GLX_RED_SIZE, modes->redBits ); + WRITE_PAIR( GLX_GREEN_SIZE, modes->greenBits ); + WRITE_PAIR( GLX_BLUE_SIZE, modes->blueBits ); + WRITE_PAIR( GLX_ALPHA_SIZE, modes->alphaBits ); + WRITE_PAIR( GLX_ACCUM_RED_SIZE, modes->accumRedBits ); + WRITE_PAIR( GLX_ACCUM_GREEN_SIZE, modes->accumGreenBits ); + WRITE_PAIR( GLX_ACCUM_BLUE_SIZE, modes->accumBlueBits ); + WRITE_PAIR( GLX_ACCUM_ALPHA_SIZE, modes->accumAlphaBits ); + WRITE_PAIR( GLX_DEPTH_SIZE, modes->depthBits ); + WRITE_PAIR( GLX_STENCIL_SIZE, modes->stencilBits ); + + WRITE_PAIR( GLX_X_VISUAL_TYPE, modes->visualType ); + + /* + ** Add token/value pairs for extensions. + */ + WRITE_PAIR( GLX_CONFIG_CAVEAT, modes->visualRating ); + WRITE_PAIR( GLX_TRANSPARENT_TYPE, modes->transparentPixel ); + WRITE_PAIR( GLX_TRANSPARENT_RED_VALUE, modes->transparentRed ); + WRITE_PAIR( GLX_TRANSPARENT_GREEN_VALUE, modes->transparentGreen ); + WRITE_PAIR( GLX_TRANSPARENT_BLUE_VALUE, modes->transparentBlue ); + WRITE_PAIR( GLX_TRANSPARENT_ALPHA_VALUE, modes->transparentAlpha ); + WRITE_PAIR( GLX_TRANSPARENT_INDEX_VALUE, modes->transparentIndex ); + WRITE_PAIR( GLX_SWAP_METHOD_OML, modes->swapMethod ); + + if ( do_swap ) { + __GLX_SWAP_INT_ARRAY(buf, __GLX_FBCONFIG_ATTRIBS_LENGTH); + } + WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_FBCONFIG_ATTRIBS_LENGTH, + (char *)buf); + } + return Success; +} + + +int __glXDisp_GetFBConfigs(__GLXclientState *cl, GLbyte *pc) +{ + xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc; + return DoGetFBConfigs( cl, req->screen, GL_FALSE ); +} + + +int __glXDisp_GetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc) +{ + xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *) pc; + return DoGetFBConfigs( cl, req->screen, GL_FALSE ); +} + +static int ValidateCreateDrawable(ClientPtr client, + int screenNum, XID fbconfigId, + XID drawablId, XID glxDrawableId, + int type, __GLcontextModes **modes, + DrawablePtr *ppDraw) +{ + DrawablePtr pDraw; + ScreenPtr pScreen; + VisualPtr pVisual; + __GLXscreen *pGlxScreen; + int i, rc; + + LEGAL_NEW_RESOURCE(glxDrawableId, client); + + rc = dixLookupDrawable(&pDraw, drawablId, client, 0, DixUnknownAccess); + if (rc != Success || pDraw->type != type) { + client->errorValue = drawablId; + return type == DRAWABLE_WINDOW ? BadWindow : BadPixmap; + } + + /* Check if screen of the fbconfig matches screen of drawable. */ + pScreen = pDraw->pScreen; + if (screenNum != pScreen->myNum) { + return BadMatch; + } + + /* If this fbconfig has a corresponding VisualRec the number of + * planes must match the drawable depth. */ + pVisual = pScreen->visuals; + for (i = 0; i < pScreen->numVisuals; i++, pVisual++) { + if (pVisual->vid == fbconfigId && pVisual->nplanes != pDraw->depth) + return BadMatch; + } + + /* Get configuration of the visual. */ + pGlxScreen = __glXgetActiveScreen(screenNum); + *modes = _gl_context_modes_find_visual(pGlxScreen->modes, fbconfigId); + if (*modes == NULL) { + /* Visual not support on this screen by this OpenGL implementation. */ + client->errorValue = fbconfigId; + return BadValue; + } + + *ppDraw = pDraw; + + return Success; +} + +/* +** Create a GLX Pixmap from an X Pixmap. +*/ +int DoCreateGLXPixmap(__GLXclientState *cl, XID fbconfigId, + GLuint screenNum, XID pixmapId, XID glxPixmapId, + CARD32 *attribs, CARD32 numAttribs) +{ + ClientPtr client = cl->client; + DrawablePtr pDraw; + __GLXpixmap *pGlxPixmap; + __GLcontextModes *modes; + GLenum target = 0; + int retval, i; + + retval = ValidateCreateDrawable (client, screenNum, fbconfigId, + pixmapId, glxPixmapId, + DRAWABLE_PIXMAP, &modes, &pDraw); + if (retval != Success) + return retval; + + pGlxPixmap = (__GLXpixmap *) xalloc(sizeof(__GLXpixmap)); + if (!pGlxPixmap) { + return BadAlloc; + } + if (!(AddResource(glxPixmapId, __glXPixmapRes, pGlxPixmap))) { + return BadAlloc; + } + pGlxPixmap->pDraw = pDraw; + pGlxPixmap->pGlxScreen = __glXgetActiveScreen(screenNum); + pGlxPixmap->pScreen = pDraw->pScreen; + pGlxPixmap->idExists = True; +#ifdef XF86DRI + pGlxPixmap->pDamage = NULL; +#endif + pGlxPixmap->refcnt = 0; + + pGlxPixmap->modes = modes; + + for (i = 0; i < numAttribs; i++) { + if (attribs[2 * i] == GLX_TEXTURE_TARGET_EXT) { + switch (attribs[2 * i + 1]) { + case GLX_TEXTURE_2D_EXT: + target = GL_TEXTURE_2D; + break; + case GLX_TEXTURE_RECTANGLE_EXT: + target = GL_TEXTURE_RECTANGLE_ARB; + break; + } + } + } + + if (!target) { + int w = pDraw->width, h = pDraw->height; + + if (h & (h - 1) || w & (w - 1)) + target = GL_TEXTURE_RECTANGLE_ARB; + else + target = GL_TEXTURE_2D; + } + + pGlxPixmap->target = target; + + /* + ** Bump the ref count on the X pixmap so it won't disappear. + */ + ((PixmapPtr) pDraw)->refcnt++; + + return Success; +} + +int __glXDisp_CreateGLXPixmap(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc; + return DoCreateGLXPixmap( cl, req->visual, req->screen, + req->pixmap, req->glxpixmap, NULL, 0 ); +} + +int __glXDisp_CreatePixmap(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc; + return DoCreateGLXPixmap( cl, req->fbconfig, req->screen, + req->pixmap, req->glxpixmap, + (CARD32*)(req + 1), + req->numAttribs ); +} + +int __glXDisp_CreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreateGLXPixmapWithConfigSGIXReq *req = + (xGLXCreateGLXPixmapWithConfigSGIXReq *) pc; + return DoCreateGLXPixmap( cl, req->fbconfig, req->screen, + req->pixmap, req->glxpixmap, NULL, 0 ); +} + + +int DoDestroyPixmap(__GLXclientState *cl, XID glxpixmap) +{ + ClientPtr client = cl->client; + + /* + ** Check if it's a valid GLX pixmap. + */ + if (!LookupIDByType(glxpixmap, __glXPixmapRes)) { + client->errorValue = glxpixmap; + return __glXError(GLXBadPixmap); + } + FreeResource(glxpixmap, FALSE); + + return Success; +} + +int __glXDisp_DestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc) +{ + xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc; + + return DoDestroyPixmap(cl, req->glxpixmap); +} + +int __glXDisp_DestroyPixmap(__GLXclientState *cl, GLbyte *pc) +{ + xGLXDestroyPixmapReq *req = (xGLXDestroyPixmapReq *) pc; + + return DoDestroyPixmap(cl, req->glxpixmap); +} + +int __glXDisp_CreatePbuffer(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc; + + (void) req; + + return BadRequest; +} + +int __glXDisp_DestroyPbuffer(__GLXclientState *cl, GLbyte *pc) +{ + xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc; + + (void) req; + + return BadRequest; +} + +int __glXDisp_ChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc) +{ + xGLXChangeDrawableAttributesReq *req = + (xGLXChangeDrawableAttributesReq *) pc; + + (void) req; + + return BadRequest; +} + +int __glXDisp_CreateWindow(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc; + ClientPtr client = cl->client; + DrawablePtr pDraw; + __GLXdrawable *glxPriv; + __GLXscreen *screen; + __GLcontextModes *modes; + int retval; + + retval = ValidateCreateDrawable (client, req->screen, req->fbconfig, + req->window, req->glxwindow, + DRAWABLE_WINDOW, &modes, &pDraw); + if (retval != Success) + return retval; + + /* FIXME: We need to check that the window visual is compatible + * with the specified fbconfig. */ + + screen = __glXgetActiveScreen(req->screen); + glxPriv = screen->createDrawable(screen, pDraw, req->glxwindow, modes); + if (glxPriv == NULL) + return BadAlloc; + + if (!AddResource(req->glxwindow, __glXDrawableRes, glxPriv)) { + glxPriv->destroy (glxPriv); + return BadAlloc; + } + + return Success; +} + +int __glXDisp_DestroyWindow(__GLXclientState *cl, GLbyte *pc) +{ + xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc; + ClientPtr client = cl->client; + + /* + ** Check if it's a valid GLX window. + */ + if (!LookupIDByType(req->glxwindow, __glXDrawableRes)) { + client->errorValue = req->glxwindow; + return __glXError(GLXBadWindow); + } + FreeResource(req->glxwindow, FALSE); + + return Success; +} + + +/*****************************************************************************/ + +/* +** NOTE: There is no portable implementation for swap buffers as of +** this time that is of value. Consequently, this code must be +** implemented by somebody other than SGI. +*/ +int __glXDisp_SwapBuffers(__GLXclientState *cl, GLbyte *pc) +{ + ClientPtr client = cl->client; + xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc; + GLXContextTag tag = req->contextTag; + XID drawId = req->drawable; + __GLXcontext *glxc = NULL; + __GLXdrawable *pGlxDraw; + __GLXpixmap *pPixmap; + int error; + + if (tag) { + glxc = __glXLookupContextByTag(cl, tag); + if (!glxc) { + return __glXError(GLXBadContextTag); + } + /* + ** The calling thread is swapping its current drawable. In this case, + ** glxSwapBuffers is in both GL and X streams, in terms of + ** sequentiality. + */ + if (__glXForceCurrent(cl, tag, &error)) { + /* + ** Do whatever is needed to make sure that all preceding requests + ** in both streams are completed before the swap is executed. + */ + CALL_Finish( GET_DISPATCH(), () ); + __GLX_NOTE_FLUSHED_CMDS(glxc); + } else { + return error; + } + } + + error = GetDrawableOrPixmap(glxc, drawId, &pGlxDraw, &pPixmap, client); + if (error != Success) + return error; + + if (pGlxDraw != NULL && pGlxDraw->type == DRAWABLE_WINDOW && + (*pGlxDraw->swapBuffers)(pGlxDraw) == GL_FALSE) + return __glXError(GLXBadDrawable); + + return Success; +} + + +int DoQueryContext(__GLXclientState *cl, GLXContextID gcId) +{ + ClientPtr client = cl->client; + __GLXcontext *ctx; + xGLXQueryContextInfoEXTReply reply; + int nProps; + int *sendBuf, *pSendBuf; + int nReplyBytes; + + ctx = (__GLXcontext *) LookupIDByType(gcId, __glXContextRes); + if (!ctx) { + client->errorValue = gcId; + return __glXError(GLXBadContext); + } + + nProps = 3; + reply.length = nProps << 1; + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + reply.n = nProps; + + nReplyBytes = reply.length << 2; + sendBuf = (int *)xalloc((size_t)nReplyBytes); + if (sendBuf == NULL) { + return __glXError(GLXBadContext); /* XXX: Is this correct? */ + } + pSendBuf = sendBuf; + *pSendBuf++ = GLX_SHARE_CONTEXT_EXT; + *pSendBuf++ = (int)(ctx->share_id); + *pSendBuf++ = GLX_VISUAL_ID_EXT; + *pSendBuf++ = (int)(ctx->pVisual->vid); + *pSendBuf++ = GLX_SCREEN_EXT; + *pSendBuf++ = (int)(ctx->pScreen->myNum); + + if (client->swapped) { + __glXSwapQueryContextInfoEXTReply(client, &reply, sendBuf); + } else { + WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *)&reply); + WriteToClient(client, nReplyBytes, (char *)sendBuf); + } + xfree((char *)sendBuf); + + return Success; +} + +int __glXDisp_QueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc; + + return DoQueryContext(cl, req->context); +} + +int __glXDisp_QueryContext(__GLXclientState *cl, GLbyte *pc) +{ + xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc; + + return DoQueryContext(cl, req->context); +} + +int __glXDisp_BindTexImageEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + ClientPtr client = cl->client; + __GLXpixmap *pGlxPixmap; + __GLXcontext *context; + GLXDrawable drawId; + int buffer; + int error; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = *((CARD32 *) (pc)); + buffer = *((INT32 *) (pc + 4)); + + if (buffer != GLX_FRONT_LEFT_EXT) + return __glXError(GLXBadPixmap); + + context = __glXForceCurrent (cl, req->contextTag, &error); + if (!context) + return error; + + pGlxPixmap = (__GLXpixmap *)LookupIDByType(drawId, __glXPixmapRes); + if (!pGlxPixmap) { + client->errorValue = drawId; + return __glXError(GLXBadPixmap); + } + + if (!context->textureFromPixmap) + return __glXError(GLXUnsupportedPrivateRequest); + + return context->textureFromPixmap->bindTexImage(context, + buffer, + pGlxPixmap); +} + +int __glXDisp_ReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + ClientPtr client = cl->client; + __GLXpixmap *pGlxPixmap; + __GLXcontext *context; + GLXDrawable drawId; + int buffer; + int error; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = *((CARD32 *) (pc)); + buffer = *((INT32 *) (pc + 4)); + + context = __glXForceCurrent (cl, req->contextTag, &error); + if (!context) + return error; + + pGlxPixmap = (__GLXpixmap *)LookupIDByType(drawId, __glXPixmapRes); + if (!pGlxPixmap) { + client->errorValue = drawId; + return __glXError(GLXBadDrawable); + } + + if (!context->textureFromPixmap) + return __glXError(GLXUnsupportedPrivateRequest); + + return context->textureFromPixmap->releaseTexImage(context, + buffer, + pGlxPixmap); +} + +int __glXDisp_CopySubBufferMESA(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLXContextTag tag = req->contextTag; + __GLXcontext *glxc = NULL; + __GLXdrawable *pGlxDraw; + __GLXpixmap *pPixmap; + ClientPtr client = cl->client; + GLXDrawable drawId; + int error; + int x, y, width, height; + + (void) client; + (void) req; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = *((CARD32 *) (pc)); + x = *((INT32 *) (pc + 4)); + y = *((INT32 *) (pc + 8)); + width = *((INT32 *) (pc + 12)); + height = *((INT32 *) (pc + 16)); + + if (tag) { + glxc = __glXLookupContextByTag(cl, tag); + if (!glxc) { + return __glXError(GLXBadContextTag); + } + /* + ** The calling thread is swapping its current drawable. In this case, + ** glxSwapBuffers is in both GL and X streams, in terms of + ** sequentiality. + */ + if (__glXForceCurrent(cl, tag, &error)) { + /* + ** Do whatever is needed to make sure that all preceding requests + ** in both streams are completed before the swap is executed. + */ + CALL_Finish( GET_DISPATCH(), () ); + __GLX_NOTE_FLUSHED_CMDS(glxc); + } else { + return error; + } + } + + error = GetDrawableOrPixmap(glxc, drawId, &pGlxDraw, &pPixmap, client); + if (error != Success) + return error; + + if (pGlxDraw == NULL || + pGlxDraw->type != DRAWABLE_WINDOW || + pGlxDraw->copySubBuffer == NULL) + return __glXError(GLXBadDrawable); + + (*pGlxDraw->copySubBuffer)(pGlxDraw, x, y, width, height); + + return Success; +} + +/* +** Get drawable attributes +*/ +static int +DoGetDrawableAttributes(__GLXclientState *cl, XID drawId) +{ + ClientPtr client = cl->client; + __GLXpixmap *glxPixmap; + xGLXGetDrawableAttributesReply reply; + CARD32 attributes[4]; + int numAttribs; + + glxPixmap = (__GLXpixmap *)LookupIDByType(drawId, __glXPixmapRes); + if (!glxPixmap) { + client->errorValue = drawId; + return __glXError(GLXBadPixmap); + } + + numAttribs = 2; + reply.length = numAttribs << 1; + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + reply.numAttribs = numAttribs; + + attributes[0] = GLX_TEXTURE_TARGET_EXT; + attributes[1] = glxPixmap->target == GL_TEXTURE_2D ? GLX_TEXTURE_2D_EXT : + GLX_TEXTURE_RECTANGLE_EXT; + attributes[2] = GLX_Y_INVERTED_EXT; + attributes[3] = GL_FALSE; + + if (client->swapped) { + __glXSwapGetDrawableAttributesReply(client, &reply, attributes); + } else { + WriteToClient(client, sz_xGLXGetDrawableAttributesReply, + (char *)&reply); + WriteToClient(client, reply.length * sizeof (CARD32), + (char *)attributes); + } + + return Success; +} + +int __glXDisp_GetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateWithReplyReq *req = (xGLXVendorPrivateWithReplyReq *)pc; + CARD32 *data; + XID drawable; + + data = (CARD32 *) (req + 1); + drawable = data[0]; + + return DoGetDrawableAttributes(cl, drawable); +} + +int __glXDisp_GetDrawableAttributes(__GLXclientState *cl, GLbyte *pc) +{ + xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *)pc; + + return DoGetDrawableAttributes(cl, req->drawable); +} + +/************************************************************************/ + +/* +** Render and Renderlarge are not in the GLX API. They are used by the GLX +** client library to send batches of GL rendering commands. +*/ + +int DoRender(__GLXclientState *cl, GLbyte *pc, int do_swap) +{ + xGLXRenderReq *req; + ClientPtr client= cl->client; + int left, cmdlen, error; + int commandsDone; + CARD16 opcode; + __GLXrenderHeader *hdr; + __GLXcontext *glxc; + __GLX_DECLARE_SWAP_VARIABLES; + + + req = (xGLXRenderReq *) pc; + if (do_swap) { + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + } + + glxc = __glXForceCurrent(cl, req->contextTag, &error); + if (!glxc) { + return error; + } + + commandsDone = 0; + pc += sz_xGLXRenderReq; + left = (req->length << 2) - sz_xGLXRenderReq; + while (left > 0) { + __GLXrenderSizeData entry; + int extra; + __GLXdispatchRenderProcPtr proc; + int err; + + /* + ** Verify that the header length and the overall length agree. + ** Also, each command must be word aligned. + */ + hdr = (__GLXrenderHeader *) pc; + if (do_swap) { + __GLX_SWAP_SHORT(&hdr->length); + __GLX_SWAP_SHORT(&hdr->opcode); + } + cmdlen = hdr->length; + opcode = hdr->opcode; + + /* + ** Check for core opcodes and grab entry data. + */ + err = __glXGetProtocolSizeData(& Render_dispatch_info, opcode, & entry); + proc = (__GLXdispatchRenderProcPtr) + __glXGetProtocolDecodeFunction(& Render_dispatch_info, opcode, do_swap); + + if ((err < 0) || (proc == NULL)) { + client->errorValue = commandsDone; + return __glXError(GLXBadRenderRequest); + } + + if (entry.varsize) { + /* variable size command */ + extra = (*entry.varsize)(pc + __GLX_RENDER_HDR_SIZE, do_swap); + if (extra < 0) { + extra = 0; + } + if (cmdlen != __GLX_PAD(entry.bytes + extra)) { + return BadLength; + } + } else { + /* constant size command */ + if (cmdlen != __GLX_PAD(entry.bytes)) { + return BadLength; + } + } + if (left < cmdlen) { + return BadLength; + } + + /* + ** Skip over the header and execute the command. We allow the + ** caller to trash the command memory. This is useful especially + ** for things that require double alignment - they can just shift + ** the data towards lower memory (trashing the header) by 4 bytes + ** and achieve the required alignment. + */ + (*proc)(pc + __GLX_RENDER_HDR_SIZE); + pc += cmdlen; + left -= cmdlen; + commandsDone++; + } + __GLX_NOTE_UNFLUSHED_CMDS(glxc); + return Success; +} + +/* +** Execute all the drawing commands in a request. +*/ +int __glXDisp_Render(__GLXclientState *cl, GLbyte *pc) +{ + return DoRender(cl, pc, False); +} + +int DoRenderLarge(__GLXclientState *cl, GLbyte *pc, int do_swap) +{ + xGLXRenderLargeReq *req; + ClientPtr client= cl->client; + size_t dataBytes; + __GLXrenderLargeHeader *hdr; + __GLXcontext *glxc; + int error; + CARD16 opcode; + __GLX_DECLARE_SWAP_VARIABLES; + + + req = (xGLXRenderLargeReq *) pc; + if (do_swap) { + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(&req->dataBytes); + __GLX_SWAP_SHORT(&req->requestNumber); + __GLX_SWAP_SHORT(&req->requestTotal); + } + + glxc = __glXForceCurrent(cl, req->contextTag, &error); + if (!glxc) { + /* Reset in case this isn't 1st request. */ + __glXResetLargeCommandStatus(cl); + return error; + } + dataBytes = req->dataBytes; + + /* + ** Check the request length. + */ + if ((req->length << 2) != __GLX_PAD(dataBytes) + sz_xGLXRenderLargeReq) { + client->errorValue = req->length; + /* Reset in case this isn't 1st request. */ + __glXResetLargeCommandStatus(cl); + return BadLength; + } + pc += sz_xGLXRenderLargeReq; + + if (cl->largeCmdRequestsSoFar == 0) { + __GLXrenderSizeData entry; + int extra; + size_t cmdlen; + int err; + + /* + ** This is the first request of a multi request command. + ** Make enough space in the buffer, then copy the entire request. + */ + if (req->requestNumber != 1) { + client->errorValue = req->requestNumber; + return __glXError(GLXBadLargeRequest); + } + + hdr = (__GLXrenderLargeHeader *) pc; + if (do_swap) { + __GLX_SWAP_INT(&hdr->length); + __GLX_SWAP_INT(&hdr->opcode); + } + cmdlen = hdr->length; + opcode = hdr->opcode; + + /* + ** Check for core opcodes and grab entry data. + */ + err = __glXGetProtocolSizeData(& Render_dispatch_info, opcode, & entry); + if (err < 0) { + client->errorValue = opcode; + return __glXError(GLXBadLargeRequest); + } + + if (entry.varsize) { + /* + ** If it's a variable-size command (a command whose length must + ** be computed from its parameters), all the parameters needed + ** will be in the 1st request, so it's okay to do this. + */ + extra = (*entry.varsize)(pc + __GLX_RENDER_LARGE_HDR_SIZE, do_swap); + if (extra < 0) { + extra = 0; + } + /* large command's header is 4 bytes longer, so add 4 */ + if (cmdlen != __GLX_PAD(entry.bytes + 4 + extra)) { + return BadLength; + } + } else { + /* constant size command */ + if (cmdlen != __GLX_PAD(entry.bytes + 4)) { + return BadLength; + } + } + /* + ** Make enough space in the buffer, then copy the entire request. + */ + if (cl->largeCmdBufSize < cmdlen) { + if (!cl->largeCmdBuf) { + cl->largeCmdBuf = (GLbyte *) xalloc(cmdlen); + } else { + cl->largeCmdBuf = (GLbyte *) xrealloc(cl->largeCmdBuf, cmdlen); + } + if (!cl->largeCmdBuf) { + return BadAlloc; + } + cl->largeCmdBufSize = cmdlen; + } + memcpy(cl->largeCmdBuf, pc, dataBytes); + + cl->largeCmdBytesSoFar = dataBytes; + cl->largeCmdBytesTotal = cmdlen; + cl->largeCmdRequestsSoFar = 1; + cl->largeCmdRequestsTotal = req->requestTotal; + return Success; + + } else { + /* + ** We are receiving subsequent (i.e. not the first) requests of a + ** multi request command. + */ + + /* + ** Check the request number and the total request count. + */ + if (req->requestNumber != cl->largeCmdRequestsSoFar + 1) { + client->errorValue = req->requestNumber; + __glXResetLargeCommandStatus(cl); + return __glXError(GLXBadLargeRequest); + } + if (req->requestTotal != cl->largeCmdRequestsTotal) { + client->errorValue = req->requestTotal; + __glXResetLargeCommandStatus(cl); + return __glXError(GLXBadLargeRequest); + } + + /* + ** Check that we didn't get too much data. + */ + if ((cl->largeCmdBytesSoFar + dataBytes) > cl->largeCmdBytesTotal) { + client->errorValue = dataBytes; + __glXResetLargeCommandStatus(cl); + return __glXError(GLXBadLargeRequest); + } + memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar, pc, dataBytes); + cl->largeCmdBytesSoFar += dataBytes; + cl->largeCmdRequestsSoFar++; + + if (req->requestNumber == cl->largeCmdRequestsTotal) { + __GLXdispatchRenderProcPtr proc; + + /* + ** This is the last request; it must have enough bytes to complete + ** the command. + */ + /* NOTE: the two pad macros have been added below; they are needed + ** because the client library pads the total byte count, but not + ** the per-request byte counts. The Protocol Encoding says the + ** total byte count should not be padded, so a proposal will be + ** made to the ARB to relax the padding constraint on the total + ** byte count, thus preserving backward compatibility. Meanwhile, + ** the padding done below fixes a bug that did not allow + ** large commands of odd sizes to be accepted by the server. + */ + if (__GLX_PAD(cl->largeCmdBytesSoFar) != + __GLX_PAD(cl->largeCmdBytesTotal)) { + client->errorValue = dataBytes; + __glXResetLargeCommandStatus(cl); + return __glXError(GLXBadLargeRequest); + } + hdr = (__GLXrenderLargeHeader *) cl->largeCmdBuf; + /* + ** The opcode and length field in the header had already been + ** swapped when the first request was received. + ** + ** Use the opcode to index into the procedure table. + */ + opcode = hdr->opcode; + + proc = (__GLXdispatchRenderProcPtr) + __glXGetProtocolDecodeFunction(& Render_dispatch_info, opcode, do_swap); + if (proc == NULL) { + client->errorValue = opcode; + return __glXError(GLXBadLargeRequest); + } + + /* + ** Skip over the header and execute the command. + */ + (*proc)(cl->largeCmdBuf + __GLX_RENDER_LARGE_HDR_SIZE); + __GLX_NOTE_UNFLUSHED_CMDS(glxc); + + /* + ** Reset for the next RenderLarge series. + */ + __glXResetLargeCommandStatus(cl); + } else { + /* + ** This is neither the first nor the last request. + */ + } + return Success; + } +} + +/* +** Execute a large rendering request (one that spans multiple X requests). +*/ +int __glXDisp_RenderLarge(__GLXclientState *cl, GLbyte *pc) +{ + return DoRenderLarge(cl, pc, False); +} + +extern RESTYPE __glXSwapBarrierRes; + +int __glXDisp_BindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc) +{ + ClientPtr client = cl->client; + xGLXBindSwapBarrierSGIXReq *req = (xGLXBindSwapBarrierSGIXReq *) pc; + XID drawable = req->drawable; + int barrier = req->barrier; + DrawablePtr pDraw; + int screen, rc; + + rc = dixLookupDrawable(&pDraw, drawable, client, 0, DixUnknownAccess); + if (rc == Success && (pDraw->type == DRAWABLE_WINDOW)) { + screen = pDraw->pScreen->myNum; + if (__glXSwapBarrierFuncs && + __glXSwapBarrierFuncs[screen].bindSwapBarrierFunc) { + int ret = __glXSwapBarrierFuncs[screen].bindSwapBarrierFunc(screen, drawable, barrier); + if (ret == Success) { + if (barrier) + /* add source for cleanup when drawable is gone */ + AddResource(drawable, __glXSwapBarrierRes, (pointer)screen); + else + /* delete source */ + FreeResourceByType(drawable, __glXSwapBarrierRes, FALSE); + } + return ret; + } + } + client->errorValue = drawable; + return __glXError(GLXBadDrawable); +} + + +int __glXDisp_QueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc) +{ + ClientPtr client = cl->client; + xGLXQueryMaxSwapBarriersSGIXReq *req = + (xGLXQueryMaxSwapBarriersSGIXReq *) pc; + xGLXQueryMaxSwapBarriersSGIXReply reply; + int screen = req->screen; + + if (__glXSwapBarrierFuncs && + __glXSwapBarrierFuncs[screen].queryMaxSwapBarriersFunc) + reply.max = __glXSwapBarrierFuncs[screen].queryMaxSwapBarriersFunc(screen); + else + reply.max = 0; + + + reply.length = 0; + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + + if (client->swapped) { + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_SWAP_SHORT(&reply.sequenceNumber); + } + + WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply, + (char *) &reply); + return Success; +} + +#define GLX_BAD_HYPERPIPE_SGIX 92 + +int __glXDisp_QueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc) +{ + ClientPtr client = cl->client; + xGLXQueryHyperpipeNetworkSGIXReq * req = (xGLXQueryHyperpipeNetworkSGIXReq *) pc; + xGLXQueryHyperpipeNetworkSGIXReply reply; + int screen = req->screen; + void *rdata = NULL; + + int length=0; + int npipes=0; + + int n= 0; + + if (__glXHyperpipeFuncs && + __glXHyperpipeFuncs[screen].queryHyperpipeNetworkFunc != NULL) { + rdata = + (__glXHyperpipeFuncs[screen].queryHyperpipeNetworkFunc(screen, &npipes, &n)); + } + length = __GLX_PAD(n) >> 2; + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + reply.length = length; + reply.n = n; + reply.npipes = npipes; + + if (client->swapped) { + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_SWAP_SHORT(&reply.sequenceNumber); + __GLX_SWAP_INT(&reply.length); + __GLX_SWAP_INT(&reply.n); + __GLX_SWAP_INT(&reply.npipes); + } + WriteToClient(client, sz_xGLXQueryHyperpipeNetworkSGIXReply, + (char *) &reply); + + WriteToClient(client, length << 2, (char *)rdata); + + return Success; +} + +int __glXDisp_DestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc) +{ + ClientPtr client = cl->client; + xGLXDestroyHyperpipeConfigSGIXReq * req = + (xGLXDestroyHyperpipeConfigSGIXReq *) pc; + xGLXDestroyHyperpipeConfigSGIXReply reply; + int screen = req->screen; + int success = GLX_BAD_HYPERPIPE_SGIX; + int hpId ; + + hpId = req->hpId; + + + if (__glXHyperpipeFuncs && + __glXHyperpipeFuncs[screen].destroyHyperpipeConfigFunc != NULL) { + success = __glXHyperpipeFuncs[screen].destroyHyperpipeConfigFunc(screen, hpId); + } + + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + reply.length = __GLX_PAD(0) >> 2; + reply.n = 0; + reply.success = success; + + + if (client->swapped) { + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_SWAP_SHORT(&reply.sequenceNumber); + } + WriteToClient(client, + sz_xGLXDestroyHyperpipeConfigSGIXReply, + (char *) &reply); + return Success; +} + +int __glXDisp_QueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) +{ + ClientPtr client = cl->client; + xGLXQueryHyperpipeConfigSGIXReq * req = + (xGLXQueryHyperpipeConfigSGIXReq *) pc; + xGLXQueryHyperpipeConfigSGIXReply reply; + int screen = req->screen; + void *rdata = NULL; + int length; + int npipes=0; + int n= 0; + int hpId; + + hpId = req->hpId; + + if (__glXHyperpipeFuncs && + __glXHyperpipeFuncs[screen].queryHyperpipeConfigFunc != NULL) { + rdata = __glXHyperpipeFuncs[screen].queryHyperpipeConfigFunc(screen, hpId,&npipes, &n); + } + + length = __GLX_PAD(n) >> 2; + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + reply.length = length; + reply.n = n; + reply.npipes = npipes; + + + if (client->swapped) { + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_SWAP_SHORT(&reply.sequenceNumber); + __GLX_SWAP_INT(&reply.length); + __GLX_SWAP_INT(&reply.n); + __GLX_SWAP_INT(&reply.npipes); + } + + WriteToClient(client, sz_xGLXQueryHyperpipeConfigSGIXReply, + (char *) &reply); + + WriteToClient(client, length << 2, (char *)rdata); + + return Success; +} + +int __glXDisp_HyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) +{ + ClientPtr client = cl->client; + xGLXHyperpipeConfigSGIXReq * req = + (xGLXHyperpipeConfigSGIXReq *) pc; + xGLXHyperpipeConfigSGIXReply reply; + int screen = req->screen; + void *rdata; + + int npipes=0, networkId; + int hpId=-1; + + networkId = (int)req->networkId; + npipes = (int)req->npipes; + rdata = (void *)(req +1); + + if (__glXHyperpipeFuncs && + __glXHyperpipeFuncs[screen].hyperpipeConfigFunc != NULL) { + __glXHyperpipeFuncs[screen].hyperpipeConfigFunc(screen,networkId, + &hpId, &npipes, + (void *) rdata); + } + + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + reply.length = __GLX_PAD(0) >> 2; + reply.n = 0; + reply.npipes = npipes; + reply.hpId = hpId; + + if (client->swapped) { + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_SWAP_SHORT(&reply.sequenceNumber); + __GLX_SWAP_INT(&reply.npipes); + __GLX_SWAP_INT(&reply.hpId); + } + + WriteToClient(client, sz_xGLXHyperpipeConfigSGIXReply, + (char *) &reply); + + return Success; +} + + +/************************************************************************/ + +/* +** No support is provided for the vendor-private requests other than +** allocating the entry points in the dispatch table. +*/ + +int __glXDisp_VendorPrivate(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLint vendorcode = req->vendorCode; + __GLXdispatchVendorPrivProcPtr proc; + + + proc = (__GLXdispatchVendorPrivProcPtr) + __glXGetProtocolDecodeFunction(& VendorPriv_dispatch_info, + vendorcode, 0); + if (proc != NULL) { + (*proc)(cl, (GLbyte*)req); + return Success; + } + + cl->client->errorValue = req->vendorCode; + return __glXError(GLXUnsupportedPrivateRequest); +} + +int __glXDisp_VendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLint vendorcode = req->vendorCode; + __GLXdispatchVendorPrivProcPtr proc; + + + proc = (__GLXdispatchVendorPrivProcPtr) + __glXGetProtocolDecodeFunction(& VendorPriv_dispatch_info, + vendorcode, 0); + if (proc != NULL) { + return (*proc)(cl, (GLbyte*)req); + } + + cl->client->errorValue = vendorcode; + return __glXError(GLXUnsupportedPrivateRequest); +} + +int __glXDisp_QueryExtensionsString(__GLXclientState *cl, GLbyte *pc) +{ + ClientPtr client = cl->client; + xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc; + xGLXQueryExtensionsStringReply reply; + GLuint screen; + size_t n, length; + const char *ptr; + char *buf; + + screen = req->screen; + /* + ** Check if screen exists. + */ + if (screen >= screenInfo.numScreens) { + client->errorValue = screen; + return BadValue; + } + + ptr = __glXActiveScreens[screen]->GLXextensions; + + n = strlen(ptr) + 1; + length = __GLX_PAD(n) >> 2; + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + reply.length = length; + reply.n = n; + + /* Allocate buffer to make sure it's a multiple of 4 bytes big.*/ + buf = (char *) xalloc(length << 2); + if (buf == NULL) + return BadAlloc; + memcpy(buf, ptr, n); + + if (client->swapped) { + glxSwapQueryExtensionsStringReply(client, &reply, buf); + } else { + WriteToClient(client, sz_xGLXQueryExtensionsStringReply,(char *)&reply); + WriteToClient(client, (int)(length << 2), (char *)buf); + } + + xfree(buf); + return Success; +} + +int __glXDisp_QueryServerString(__GLXclientState *cl, GLbyte *pc) +{ + ClientPtr client = cl->client; + xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc; + xGLXQueryServerStringReply reply; + int name; + GLuint screen; + size_t n, length; + const char *ptr; + char *buf; + + name = req->name; + screen = req->screen; + /* + ** Check if screen exists. + */ + if (screen >= screenInfo.numScreens) { + client->errorValue = screen; + return BadValue; + } + switch(name) { + case GLX_VENDOR: + ptr = __glXActiveScreens[screen]->GLXvendor; + break; + case GLX_VERSION: + ptr = __glXActiveScreens[screen]->GLXversion; + break; + case GLX_EXTENSIONS: + ptr = __glXActiveScreens[screen]->GLXextensions; + break; + default: + return BadValue; + } + + n = strlen(ptr) + 1; + length = __GLX_PAD(n) >> 2; + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + reply.length = length; + reply.n = n; + + buf = (char *) xalloc(length << 2); + if (buf == NULL) { + return BadAlloc; + } + memcpy(buf, ptr, n); + + if (client->swapped) { + glxSwapQueryServerStringReply(client, &reply, buf); + } else { + WriteToClient(client, sz_xGLXQueryServerStringReply, (char *)&reply); + WriteToClient(client, (int)(length << 2), buf); + } + + xfree(buf); + return Success; +} + +int __glXDisp_ClientInfo(__GLXclientState *cl, GLbyte *pc) +{ + xGLXClientInfoReq *req = (xGLXClientInfoReq *) pc; + const char *buf; + + cl->GLClientmajorVersion = req->major; + cl->GLClientminorVersion = req->minor; + if (cl->GLClientextensions) + xfree(cl->GLClientextensions); + buf = (const char *)(req+1); + cl->GLClientextensions = xstrdup(buf); + + return Success; +} diff --git a/xorg-server-1.4/GL/glx/glxcmdsswap.c b/xorg-server-1.4/GL/glx/glxcmdsswap.c new file mode 100644 index 0000000..12bc030 --- /dev/null +++ b/xorg-server-1.4/GL/glx/glxcmdsswap.c @@ -0,0 +1,714 @@ +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#define NEED_REPLIES +#define FONT_PCF +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "glxserver.h" +#include "glxutil.h" +#include +#include +#include "g_disptab.h" +#include +#include +#include "glxext.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" +#include "indirect_dispatch.h" +#include "indirect_table.h" +#include "indirect_util.h" + + +/************************************************************************/ + +/* +** Byteswapping versions of GLX commands. In most cases they just swap +** the incoming arguments and then call the unswapped routine. For commands +** that have replies, a separate swapping routine for the reply is provided; +** it is called at the end of the unswapped routine. +*/ + +int __glXDispSwap_CreateContext(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->context); + __GLX_SWAP_INT(&req->visual); + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->shareList); + + return DoCreateContext( cl, req->context, req->shareList, req->visual, + req->screen, req->isDirect ); +} + +int __glXDispSwap_CreateNewContext(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->context); + __GLX_SWAP_INT(&req->fbconfig); + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->renderType); + __GLX_SWAP_INT(&req->shareList); + + return DoCreateContext( cl, req->context, req->shareList, req->fbconfig, + req->screen, req->isDirect ); +} + +int __glXDispSwap_CreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreateContextWithConfigSGIXReq *req = + (xGLXCreateContextWithConfigSGIXReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->context); + __GLX_SWAP_INT(&req->fbconfig); + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->renderType); + __GLX_SWAP_INT(&req->shareList); + + return DoCreateContext( cl, req->context, req->shareList, req->fbconfig, + req->screen, req->isDirect ); +} + +int __glXDispSwap_DestroyContext(__GLXclientState *cl, GLbyte *pc) +{ + xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->context); + + return __glXDisp_DestroyContext(cl, pc); +} + +int __glXDispSwap_MakeCurrent(__GLXclientState *cl, GLbyte *pc) +{ + xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->drawable); + __GLX_SWAP_INT(&req->context); + __GLX_SWAP_INT(&req->oldContextTag); + + return DoMakeCurrent( cl, req->drawable, req->drawable, + req->context, req->oldContextTag ); +} + +int __glXDispSwap_MakeContextCurrent(__GLXclientState *cl, GLbyte *pc) +{ + xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->drawable); + __GLX_SWAP_INT(&req->readdrawable); + __GLX_SWAP_INT(&req->context); + __GLX_SWAP_INT(&req->oldContextTag); + + return DoMakeCurrent( cl, req->drawable, req->readdrawable, + req->context, req->oldContextTag ); +} + +int __glXDispSwap_MakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc) +{ + xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->drawable); + __GLX_SWAP_INT(&req->readable); + __GLX_SWAP_INT(&req->context); + __GLX_SWAP_INT(&req->oldContextTag); + + return DoMakeCurrent( cl, req->drawable, req->readable, + req->context, req->oldContextTag ); +} + +int __glXDispSwap_IsDirect(__GLXclientState *cl, GLbyte *pc) +{ + xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->context); + + return __glXDisp_IsDirect(cl, pc); +} + +int __glXDispSwap_QueryVersion(__GLXclientState *cl, GLbyte *pc) +{ + xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->majorVersion); + __GLX_SWAP_INT(&req->minorVersion); + + return __glXDisp_QueryVersion(cl, pc); +} + +int __glXDispSwap_WaitGL(__GLXclientState *cl, GLbyte *pc) +{ + xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + + return __glXDisp_WaitGL(cl, pc); +} + +int __glXDispSwap_WaitX(__GLXclientState *cl, GLbyte *pc) +{ + xGLXWaitXReq *req = (xGLXWaitXReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + + return __glXDisp_WaitX(cl, pc); +} + +int __glXDispSwap_CopyContext(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->source); + __GLX_SWAP_INT(&req->dest); + __GLX_SWAP_INT(&req->mask); + + return __glXDisp_CopyContext(cl, pc); +} + +int __glXDispSwap_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc) +{ + xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&req->screen); + return DoGetVisualConfigs( cl, req->screen, GL_TRUE ); +} + +int __glXDispSwap_GetFBConfigs(__GLXclientState *cl, GLbyte *pc) +{ + xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&req->screen); + return DoGetFBConfigs( cl, req->screen, GL_TRUE ); +} + +int __glXDispSwap_GetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc) +{ + xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&req->screen); + return DoGetFBConfigs( cl, req->screen, GL_TRUE ); +} + +int __glXDispSwap_CreateGLXPixmap(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->visual); + __GLX_SWAP_INT(&req->pixmap); + __GLX_SWAP_INT(&req->glxpixmap); + + return DoCreateGLXPixmap( cl, req->visual, req->screen, + req->pixmap, req->glxpixmap, NULL, 0 ); +} + +int __glXDispSwap_CreatePixmap(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->fbconfig); + __GLX_SWAP_INT(&req->pixmap); + __GLX_SWAP_INT(&req->glxpixmap); + __GLX_SWAP_INT(&req->numAttribs); + + return DoCreateGLXPixmap( cl, req->fbconfig, req->screen, + req->pixmap, req->glxpixmap, + (CARD32*)(req + 1), + req->numAttribs ); +} + +int __glXDispSwap_CreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreateGLXPixmapWithConfigSGIXReq *req = + (xGLXCreateGLXPixmapWithConfigSGIXReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->fbconfig); + __GLX_SWAP_INT(&req->pixmap); + __GLX_SWAP_INT(&req->glxpixmap); + + return DoCreateGLXPixmap( cl, req->fbconfig, req->screen, + req->pixmap, req->glxpixmap, NULL, 0 ); +} + +int __glXDispSwap_DestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc) +{ + xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->glxpixmap); + + return __glXDisp_DestroyGLXPixmap(cl, pc); +} + +int __glXDispSwap_DestroyPixmap(__GLXclientState *cl, GLbyte *pc) +{ + xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->glxpixmap); + + return __glXDisp_DestroyGLXPixmap(cl, pc); +} + +int __glXDispSwap_QueryContext(__GLXclientState *cl, GLbyte *pc) +{ + xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc; + + (void) req; + + return BadRequest; +} + +int __glXDispSwap_CreatePbuffer(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc; + + (void) req; + + return BadRequest; +} + +int __glXDispSwap_DestroyPbuffer(__GLXclientState *cl, GLbyte *pc) +{ + xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) req; + + return BadRequest; +} + +int __glXDispSwap_ChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc) +{ + xGLXChangeDrawableAttributesReq *req = + (xGLXChangeDrawableAttributesReq *) req; + + return BadRequest; +} + +int __glXDispSwap_CreateWindow(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc; + + (void) req; + + return BadRequest; +} + +int __glXDispSwap_DestroyWindow(__GLXclientState *cl, GLbyte *pc) +{ + xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc; + + (void) req; + + return BadRequest; +} + +int __glXDispSwap_SwapBuffers(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(&req->drawable); + + return __glXDisp_SwapBuffers(cl, pc); +} + +int __glXDispSwap_UseXFont(__GLXclientState *cl, GLbyte *pc) +{ + xGLXUseXFontReq *req = (xGLXUseXFontReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(&req->font); + __GLX_SWAP_INT(&req->first); + __GLX_SWAP_INT(&req->count); + __GLX_SWAP_INT(&req->listBase); + + return __glXDisp_UseXFont(cl, pc); +} + + +int __glXDispSwap_QueryExtensionsString(__GLXclientState *cl, GLbyte *pc) +{ + xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *)pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->screen); + + return __glXDisp_QueryExtensionsString(cl, pc); +} + +int __glXDispSwap_QueryServerString(__GLXclientState *cl, GLbyte *pc) +{ + xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *)pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->name); + + return __glXDisp_QueryServerString(cl, pc); +} + +int __glXDispSwap_ClientInfo(__GLXclientState *cl, GLbyte *pc) +{ + xGLXClientInfoReq *req = (xGLXClientInfoReq *)pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->major); + __GLX_SWAP_INT(&req->minor); + __GLX_SWAP_INT(&req->numbytes); + + return __glXDisp_ClientInfo(cl, pc); +} + +int __glXDispSwap_QueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->context); + + return __glXDisp_QueryContextInfoEXT(cl, pc); +} + +int __glXDispSwap_BindTexImageEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLXDrawable *drawId; + int *buffer; + + __GLX_DECLARE_SWAP_VARIABLES; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = ((GLXDrawable *) (pc)); + buffer = ((int *) (pc + 4)); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(drawId); + __GLX_SWAP_INT(buffer); + + return __glXDisp_BindTexImageEXT(cl, (GLbyte *)pc); +} + +int __glXDispSwap_ReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLXDrawable *drawId; + int *buffer; + + __GLX_DECLARE_SWAP_VARIABLES; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = ((GLXDrawable *) (pc)); + buffer = ((int *) (pc + 4)); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(drawId); + __GLX_SWAP_INT(buffer); + + return __glXDisp_ReleaseTexImageEXT(cl, (GLbyte *)pc); +} + +int __glXDispSwap_CopySubBufferMESA(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLXDrawable *drawId; + int *buffer; + + __GLX_DECLARE_SWAP_VARIABLES; + + (void) drawId; + (void) buffer; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(pc); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + __GLX_SWAP_INT(pc + 12); + __GLX_SWAP_INT(pc + 16); + + return __glXDisp_CopySubBufferMESA(cl, pc); + +} + +int __glXDispSwap_GetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateWithReplyReq *req = (xGLXVendorPrivateWithReplyReq *)pc; + CARD32 *data; + + __GLX_DECLARE_SWAP_VARIABLES; + + data = (CARD32 *) (req + 1); + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(data); + + return __glXDisp_GetDrawableAttributesSGIX(cl, pc); +} + +int __glXDispSwap_GetDrawableAttributes(__GLXclientState *cl, GLbyte *pc) +{ + xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *)pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->drawable); + + return __glXDisp_GetDrawableAttributes(cl, pc); +} + + +/************************************************************************/ + +/* +** Swap replies. +*/ + +void __glXSwapMakeCurrentReply(ClientPtr client, xGLXMakeCurrentReply *reply) +{ + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_SWAP_SHORT(&reply->sequenceNumber); + __GLX_SWAP_INT(&reply->length); + __GLX_SWAP_INT(&reply->contextTag); + WriteToClient(client, sz_xGLXMakeCurrentReply, (char *)reply); +} + +void __glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply *reply) +{ + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_SWAP_SHORT(&reply->sequenceNumber); + __GLX_SWAP_INT(&reply->length); + WriteToClient(client, sz_xGLXIsDirectReply, (char *)reply); +} + +void __glXSwapQueryVersionReply(ClientPtr client, xGLXQueryVersionReply *reply) +{ + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_SWAP_SHORT(&reply->sequenceNumber); + __GLX_SWAP_INT(&reply->length); + __GLX_SWAP_INT(&reply->majorVersion); + __GLX_SWAP_INT(&reply->minorVersion); + WriteToClient(client, sz_xGLXQueryVersionReply, (char *)reply); +} + +void glxSwapQueryExtensionsStringReply(ClientPtr client, + xGLXQueryExtensionsStringReply *reply, char *buf) +{ + int length = reply->length; + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + __GLX_SWAP_SHORT(&reply->sequenceNumber); + __GLX_SWAP_INT(&reply->length); + __GLX_SWAP_INT(&reply->n); + WriteToClient(client, sz_xGLXQueryExtensionsStringReply, (char *)reply); + __GLX_SWAP_INT_ARRAY((int *)buf, length); + WriteToClient(client, length << 2, buf); +} + +void glxSwapQueryServerStringReply(ClientPtr client, + xGLXQueryServerStringReply *reply, char *buf) +{ + int length = reply->length; + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_SWAP_SHORT(&reply->sequenceNumber); + __GLX_SWAP_INT(&reply->length); + __GLX_SWAP_INT(&reply->n); + WriteToClient(client, sz_xGLXQueryServerStringReply, (char *)reply); + /** no swap is needed for an array of chars **/ + /* __GLX_SWAP_INT_ARRAY((int *)buf, length); */ + WriteToClient(client, length << 2, buf); +} + +void __glXSwapQueryContextInfoEXTReply(ClientPtr client, xGLXQueryContextInfoEXTReply *reply, int *buf) +{ + int length = reply->length; + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + __GLX_SWAP_SHORT(&reply->sequenceNumber); + __GLX_SWAP_INT(&reply->length); + __GLX_SWAP_INT(&reply->n); + WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *)reply); + __GLX_SWAP_INT_ARRAY((int *)buf, length); + WriteToClient(client, length << 2, (char *)buf); +} + +void __glXSwapGetDrawableAttributesReply(ClientPtr client, + xGLXGetDrawableAttributesReply *reply, CARD32 *buf) +{ + int length = reply->length; + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + __GLX_SWAP_SHORT(&reply->sequenceNumber); + __GLX_SWAP_INT(&reply->length); + __GLX_SWAP_INT(&reply->numAttribs); + WriteToClient(client, sz_xGLXGetDrawableAttributesReply, (char *)reply); + __GLX_SWAP_INT_ARRAY((int *)buf, length); + WriteToClient(client, length << 2, (char *)buf); +} + +/************************************************************************/ + +/* +** Render and Renderlarge are not in the GLX API. They are used by the GLX +** client library to send batches of GL rendering commands. +*/ + +int __glXDispSwap_Render(__GLXclientState *cl, GLbyte *pc) +{ + return DoRender(cl, pc, True); +} + +/* +** Execute a large rendering request (one that spans multiple X requests). +*/ +int __glXDispSwap_RenderLarge(__GLXclientState *cl, GLbyte *pc) +{ + return DoRenderLarge(cl, pc, True); +} + +/************************************************************************/ + +/* +** No support is provided for the vendor-private requests other than +** allocating these entry points in the dispatch table. +*/ + +int __glXDispSwap_VendorPrivate(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req; + GLint vendorcode; + __GLXdispatchVendorPrivProcPtr proc; + + __GLX_DECLARE_SWAP_VARIABLES; + + req = (xGLXVendorPrivateReq *) pc; + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->vendorCode); + + vendorcode = req->vendorCode; + + proc = (__GLXdispatchVendorPrivProcPtr) + __glXGetProtocolDecodeFunction(& VendorPriv_dispatch_info, + vendorcode, 1); + if (proc != NULL) { + (*proc)(cl, (GLbyte*)req); + return Success; + } + + cl->client->errorValue = req->vendorCode; + return __glXError(GLXUnsupportedPrivateRequest); +} + + +int __glXDispSwap_VendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateWithReplyReq *req; + GLint vendorcode; + __GLXdispatchVendorPrivProcPtr proc; + + __GLX_DECLARE_SWAP_VARIABLES; + + req = (xGLXVendorPrivateWithReplyReq *) pc; + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->vendorCode); + + vendorcode = req->vendorCode; + + proc = (__GLXdispatchVendorPrivProcPtr) + __glXGetProtocolDecodeFunction(& VendorPriv_dispatch_info, + vendorcode, 1); + if (proc != NULL) { + return (*proc)(cl, (GLbyte*)req); + } + + cl->client->errorValue = req->vendorCode; + return __glXError(GLXUnsupportedPrivateRequest); +} diff --git a/xorg-server-1.4/GL/glx/glxcontext.h b/xorg-server-1.4/GL/glx/glxcontext.h new file mode 100644 index 0000000..eb10ee2 --- /dev/null +++ b/xorg-server-1.4/GL/glx/glxcontext.h @@ -0,0 +1,174 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _GLX_context_h_ +#define _GLX_context_h_ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#include "GL/internal/glcore.h" + +typedef struct __GLXtextureFromPixmap __GLXtextureFromPixmap; +struct __GLXtextureFromPixmap { + int (*bindTexImage) (__GLXcontext *baseContext, + int buffer, + __GLXpixmap *pixmap); + int (*releaseTexImage) (__GLXcontext *baseContext, + int buffer, + __GLXpixmap *pixmap); +}; + + +struct __GLXcontext { + void (*destroy) (__GLXcontext *context); + int (*makeCurrent) (__GLXcontext *context); + int (*loseCurrent) (__GLXcontext *context); + int (*copy) (__GLXcontext *dst, + __GLXcontext *src, + unsigned long mask); + int (*forceCurrent) (__GLXcontext *context); + + __GLXtextureFromPixmap *textureFromPixmap; + + /* + ** list of context structs + */ + __GLXcontext *last; + __GLXcontext *next; + + /* + ** list of contexts bound to the same drawable + */ + __GLXcontext *nextDrawPriv; + __GLXcontext *nextReadPriv; + + /* + ** mode struct for this context + */ + __GLcontextModes *modes; + + /* + ** Pointer to screen info data for this context. This is set + ** when the context is created. + */ + ScreenPtr pScreen; + __GLXscreen *pGlxScreen; + + /* + ** This context is created with respect to this visual. + */ + VisualRec *pVisual; + + /* + ** The XID of this context. + */ + XID id; + + /* + ** The XID of the shareList context. + */ + XID share_id; + + /* + ** Visual id. + */ + VisualID vid; + + /* + ** screen number. + */ + GLint screen; + + /* + ** Whether this context's ID still exists. + */ + GLboolean idExists; + + /* + ** Whether this context is current for some client. + */ + GLboolean isCurrent; + + /* + ** Whether this context is a direct rendering context. + */ + GLboolean isDirect; + + /* + ** Window pending state + */ + GLuint pendingState; + + /* + ** This flag keeps track of whether there are unflushed GL commands. + */ + GLboolean hasUnflushedCommands; + + /* + ** Current rendering mode for this context. + */ + GLenum renderMode; + + /* + ** Buffers for feedback and selection. + */ + GLfloat *feedbackBuf; + GLint feedbackBufSize; /* number of elements allocated */ + GLuint *selectBuf; + GLint selectBufSize; /* number of elements allocated */ + + /* + ** Set only if current drawable is a glx pixmap. + */ + __GLXpixmap *drawPixmap; + __GLXpixmap *readPixmap; + + /* + ** The drawable private this context is bound to + */ + __GLXdrawable *drawPriv; + __GLXdrawable *readPriv; +}; + +/* pending state defines */ +#define __GLX_PENDING_RESIZE 0x1 +#define __GLX_PENDING_DESTROY 0x2 +#define __GLX_PENDING_SWAP 0x4 + +void __glXContextDestroy(__GLXcontext *context); + +#endif /* !__GLX_context_h__ */ diff --git a/xorg-server-1.4/GL/glx/glxdrawable.h b/xorg-server-1.4/GL/glx/glxdrawable.h new file mode 100644 index 0000000..b7ecad9 --- /dev/null +++ b/xorg-server-1.4/GL/glx/glxdrawable.h @@ -0,0 +1,110 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _GLX_drawable_h_ +#define _GLX_drawable_h_ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#include + +#ifdef XF86DRI +#include +#endif + +typedef struct { + + DrawablePtr pDraw; + __GLcontextModes *modes; + __GLXscreen *pGlxScreen; + ScreenPtr pScreen; + Bool idExists; + int refcnt; + GLenum target; +#ifdef XF86DRI + DamagePtr pDamage; + __DRIcontext *pDRICtx; + GLint texname; + unsigned long offset; +#endif +} __GLXpixmap; + +struct __GLXdrawable { + void (*destroy)(__GLXdrawable *private); + GLboolean (*resize)(__GLXdrawable *private); + GLboolean (*swapBuffers)(__GLXdrawable *); + void (*copySubBuffer)(__GLXdrawable *drawable, + int x, int y, int w, int h); + + /* + ** list of drawable private structs + */ + __GLXdrawable *last; + __GLXdrawable *next; + + DrawablePtr pDraw; + XID drawId; + __GLXpixmap *pGlxPixmap; + + /* + ** Either DRAWABLE_PIXMAP or DRAWABLE_WINDOW, copied from pDraw above. + ** Needed by the resource freer because pDraw might already have been + ** freed. + */ + int type; + + /* + ** Configuration of the visual to which this drawable was created. + */ + __GLcontextModes *modes; + + /* + ** Lists of contexts bound to this drawable. There are two lists here. + ** One list is of the contexts that have this drawable bound for drawing, + ** and the other is the list of contexts that have this drawable bound + ** for reading. + */ + __GLXcontext *drawGlxc; + __GLXcontext *readGlxc; + + /* + ** reference count + */ + int refCount; +}; + +#endif /* !__GLX_drawable_h__ */ diff --git a/xorg-server-1.4/GL/glx/glxdri.c b/xorg-server-1.4/GL/glx/glxdri.c new file mode 100644 index 0000000..685683d --- /dev/null +++ b/xorg-server-1.4/GL/glx/glxdri.c @@ -0,0 +1,1249 @@ +/* + * Copyright © 2006 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 Red Hat, + * Inc not be used in advertising or publicity pertaining to + * distribution of the software without specific, written prior + * permission. Red Hat, Inc makes no representations about the + * suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * RED HAT, INC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN + * NO EVENT SHALL RED HAT, INC 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_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#define _XF86DRI_SERVER_ +#include +#include +#include +#include +#include +#include + +#define DRI_NEW_INTERFACE_ONLY +#include "glxserver.h" +#include "glxutil.h" +#include "glcontextmodes.h" + +#include "g_disptab.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" +#include "extension_string.h" + + +#define STRINGIFY(macro_or_string) STRINGIFY_ARG (macro_or_string) +#define STRINGIFY_ARG(contents) #contents + +typedef struct __GLXDRIscreen __GLXDRIscreen; +typedef struct __GLXDRIcontext __GLXDRIcontext; +typedef struct __GLXDRIdrawable __GLXDRIdrawable; + +struct __GLXDRIscreen { + __GLXscreen base; + + __DRIscreen driScreen; + void *driver; + + xf86EnterVTProc *enterVT; + xf86LeaveVTProc *leaveVT; + + DRITexOffsetStartProcPtr texOffsetStart; + DRITexOffsetFinishProcPtr texOffsetFinish; + __GLXpixmap* texOffsetOverride[16]; + GLuint lastTexOffsetOverride; + + unsigned char glx_enable_bits[__GLX_EXT_BYTES]; +}; + +struct __GLXDRIcontext { + __GLXcontext base; + + __DRIcontext driContext; +}; + +struct __GLXDRIdrawable { + __GLXdrawable base; + + __DRIdrawable *driDrawable; +}; + +/* History: + * 20021121 - Initial version + * 20021128 - Added __glXWindowExists() function + * 20021207 - Added support for dynamic GLX extensions, + * GLX_SGI_swap_control, GLX_SGI_video_sync, + * GLX_OML_sync_control, and GLX_MESA_swap_control. + * Never officially released. Do NOT test against + * this version. Use 20030317 instead. + * 20030317 - Added support GLX_SGIX_fbconfig, + * GLX_MESA_swap_frame_usage, GLX_OML_swap_method, + * GLX_{ARB,SGIS}_multisample, and + * GLX_SGIX_visual_select_group. + * 20030606 - Added support for GLX_SGI_make_current_read. + * 20030813 - Made support for dynamic extensions multi-head aware. + * 20030818 - Added support for GLX_MESA_allocate_memory in place of the + * deprecated GLX_NV_vertex_array_range & GLX_MESA_agp_offset + * interfaces. + * 20031201 - Added support for the first round of DRI interface changes. + * Do NOT test against this version! It has binary + * compatibility bugs, use 20040317 instead. + * 20040317 - Added the 'mode' field to __DRIcontextRec. + * 20040415 - Added support for bindContext3 and unbindContext3. + * 20040602 - Add __glXGetDrawableInfo. I though that was there + * months ago. :( + * 20050727 - Gut all the old interfaces. This breaks compatability with + * any DRI driver built to any previous version. + * 20060314 - Added support for GLX_MESA_copy_sub_buffer. + */ + +#define INTERNAL_VERSION 20050727 + +static const char CREATE_NEW_SCREEN_FUNC[] = + "__driCreateNewScreen_" STRINGIFY (INTERNAL_VERSION); + + +static void +__glXDRIleaveServer(GLboolean rendering) +{ + int i; + + for (i = 0; rendering && i < screenInfo.numScreens; i++) { + __GLXDRIscreen * const screen = + (__GLXDRIscreen *) __glXgetActiveScreen(i); + GLuint lastOverride = screen->lastTexOffsetOverride; + + if (lastOverride) { + __GLXpixmap **texOffsetOverride = screen->texOffsetOverride; + int j; + + for (j = 0; j < lastOverride; j++) { + __GLXpixmap *pGlxPix = texOffsetOverride[j]; + + if (pGlxPix && pGlxPix->texname) { + pGlxPix->offset = + screen->texOffsetStart((PixmapPtr)pGlxPix->pDraw); + } + } + } + } + + DRIBlockHandler(NULL, NULL, NULL); + + for (i = 0; rendering && i < screenInfo.numScreens; i++) { + __GLXDRIscreen * const screen = + (__GLXDRIscreen *) __glXgetActiveScreen(i); + GLuint lastOverride = screen->lastTexOffsetOverride; + + if (lastOverride) { + __GLXpixmap **texOffsetOverride = screen->texOffsetOverride; + int j; + + for (j = 0; j < lastOverride; j++) { + __GLXpixmap *pGlxPix = texOffsetOverride[j]; + + if (pGlxPix && pGlxPix->texname) { + screen->driScreen.setTexOffset(pGlxPix->pDRICtx, + pGlxPix->texname, + pGlxPix->offset, + pGlxPix->pDraw->depth, + ((PixmapPtr)pGlxPix->pDraw)-> + devKind); + } + } + } + } +} + +static void +__glXDRIenterServer(GLboolean rendering) +{ + int i; + + for (i = 0; rendering && i < screenInfo.numScreens; i++) { + __GLXDRIscreen * const screen = + (__GLXDRIscreen *) __glXgetActiveScreen(i); + + if (screen->lastTexOffsetOverride) { + CALL_Flush(GET_DISPATCH(), ()); + break; + } + } + + DRIWakeupHandler(NULL, 0, NULL); +} + +/** + * \bug + * We're jumping through hoops here to get the DRIdrawable which the DRI + * driver tries to keep to it self... cf. FIXME in \c createDrawable. + */ +static void +__glXDRIdrawableFoo(__GLXDRIdrawable *draw) +{ + __GLXDRIscreen * const screen = + (__GLXDRIscreen *) __glXgetActiveScreen(draw->base.pDraw->pScreen->myNum); + + draw->driDrawable = (*screen->driScreen.getDrawable)(NULL, + draw->base.drawId, + screen->driScreen.private); +} + +static void +__glXDRIdrawableDestroy(__GLXdrawable *private) +{ +#if 0 + (*glxPriv->driDrawable.destroyDrawable)(NULL, + glxPriv->driDrawable.private); +#endif + + xfree(private); +} + +static GLboolean +__glXDRIdrawableResize(__GLXdrawable *glxPriv) +{ + /* Nothing to do here, the DRI driver asks the server for drawable + * geometry when it sess the SAREA timestamps change.*/ + + return GL_TRUE; +} + +static GLboolean +__glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate; + + __glXDRIdrawableFoo(private); + + (*private->driDrawable->swapBuffers)(NULL, + private->driDrawable->private); + + return TRUE; +} + + +static int +__glXDRIdrawableSwapInterval(__GLXdrawable *baseDrawable, int interval) +{ + __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseDrawable; + + __glXDRIdrawableFoo(draw); + + draw->driDrawable->swap_interval = interval; + return 0; +} + + +static void +__glXDRIdrawableCopySubBuffer(__GLXdrawable *basePrivate, + int x, int y, int w, int h) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate; + + __glXDRIdrawableFoo(private); + + (*private->driDrawable->copySubBuffer)(NULL, + private->driDrawable->private, + x, y, w, h); +} + +static void +__glXDRIcontextDestroy(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + + context->driContext.destroyContext(NULL, + context->base.pScreen->myNum, + context->driContext.private); + __glXContextDestroy(&context->base); + xfree(context); +} + +static int +__glXDRIcontextMakeCurrent(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + + return (*context->driContext.bindContext)(NULL, + context->base.pScreen->myNum, + baseContext->drawPriv->drawId, + baseContext->readPriv->drawId, + &context->driContext); +} + +static int +__glXDRIcontextLoseCurrent(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + + return (*context->driContext.unbindContext)(NULL, + context->base.pScreen->myNum, + baseContext->drawPriv->drawId, + baseContext->readPriv->drawId, + &context->driContext); +} + +static int +__glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc, + unsigned long mask) +{ + __GLXDRIcontext *dst = (__GLXDRIcontext *) baseDst; + __GLXDRIcontext *src = (__GLXDRIcontext *) baseSrc; + + /* FIXME: We will need to add DRIcontext::copyContext for this. */ + + (void) dst; + (void) src; + + return FALSE; +} + +static int +__glXDRIcontextForceCurrent(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + + return (*context->driContext.bindContext)(NULL, + context->base.pScreen->myNum, + baseContext->drawPriv->drawId, + baseContext->readPriv->drawId, + &context->driContext); +} + +static void +glxFillAlphaChannel (PixmapPtr pixmap, int x, int y, int width, int height) +{ + int i; + CARD32 *p, *end, *pixels = (CARD32 *)pixmap->devPrivate.ptr; + CARD32 rowstride = pixmap->devKind / 4; + + for (i = y; i < y + height; i++) + { + p = &pixels[i * rowstride + x]; + end = p + width; + while (p < end) + *p++ |= 0xFF000000; + } +} + +/* + * (sticking this here for lack of a better place) + * Known issues with the GLX_EXT_texture_from_pixmap implementation: + * - In general we ignore the fbconfig, lots of examples follow + * - No fbconfig handling for multiple mipmap levels + * - No fbconfig handling for 1D textures + * - No fbconfig handling for TEXTURE_TARGET + * - No fbconfig exposure of Y inversion state + * - No GenerateMipmapEXT support (due to no FBO support) + * - No support for anything but 16bpp and 32bpp-sparse pixmaps + */ + +static int +__glXDRIbindTexImage(__GLXcontext *baseContext, + int buffer, + __GLXpixmap *glxPixmap) +{ + RegionPtr pRegion = NULL; + PixmapPtr pixmap; + int bpp, override = 0; + GLenum format, type; + ScreenPtr pScreen = glxPixmap->pScreen; + __GLXDRIscreen * const screen = + (__GLXDRIscreen *) __glXgetActiveScreen(pScreen->myNum); + + pixmap = (PixmapPtr) glxPixmap->pDraw; + + if (screen->texOffsetStart && screen->driScreen.setTexOffset) { + __GLXpixmap **texOffsetOverride = screen->texOffsetOverride; + int i, firstEmpty = 16, texname; + + for (i = 0; i < 16; i++) { + if (texOffsetOverride[i] == glxPixmap) + goto alreadyin; + + if (firstEmpty == 16 && !texOffsetOverride[i]) + firstEmpty = i; + } + + if (firstEmpty == 16) { + ErrorF("%s: Failed to register texture offset override\n", __func__); + goto nooverride; + } + + if (firstEmpty >= screen->lastTexOffsetOverride) + screen->lastTexOffsetOverride = firstEmpty + 1; + + texOffsetOverride[firstEmpty] = glxPixmap; + +alreadyin: + override = 1; + + glxPixmap->pDRICtx = &((__GLXDRIcontext*)baseContext)->driContext; + + CALL_GetIntegerv(GET_DISPATCH(), (glxPixmap->target == GL_TEXTURE_2D ? + GL_TEXTURE_BINDING_2D : + GL_TEXTURE_BINDING_RECTANGLE_NV, + &texname)); + + if (texname == glxPixmap->texname) + return Success; + + glxPixmap->texname = texname; + + screen->driScreen.setTexOffset(glxPixmap->pDRICtx, texname, 0, + pixmap->drawable.depth, pixmap->devKind); + } +nooverride: + + if (!glxPixmap->pDamage) { + if (!override) { + glxPixmap->pDamage = DamageCreate(NULL, NULL, DamageReportNone, + TRUE, pScreen, NULL); + if (!glxPixmap->pDamage) + return BadAlloc; + + DamageRegister ((DrawablePtr) pixmap, glxPixmap->pDamage); + } + + pRegion = NULL; + } else { + pRegion = DamageRegion(glxPixmap->pDamage); + if (REGION_NIL(pRegion)) + return Success; + } + + /* XXX 24bpp packed, 8, etc */ + if (pixmap->drawable.depth >= 24) { + bpp = 4; + format = GL_BGRA; + type = +#if X_BYTE_ORDER == X_BIG_ENDIAN + !override ? GL_UNSIGNED_INT_8_8_8_8_REV : +#endif + GL_UNSIGNED_BYTE; + } else { + bpp = 2; + format = GL_RGB; + type = GL_UNSIGNED_SHORT_5_6_5; + } + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, + pixmap->devKind / bpp) ); + + if (pRegion == NULL) + { + if (!override && pixmap->drawable.depth == 24) + glxFillAlphaChannel(pixmap, + pixmap->drawable.x, + pixmap->drawable.y, + pixmap->drawable.width, + pixmap->drawable.height); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, + pixmap->drawable.x) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, + pixmap->drawable.y) ); + + CALL_TexImage2D( GET_DISPATCH(), + (glxPixmap->target, + 0, + bpp == 4 ? 4 : 3, + pixmap->drawable.width, + pixmap->drawable.height, + 0, + format, + type, + override ? NULL : pixmap->devPrivate.ptr) ); + } else if (!override) { + int i, numRects; + BoxPtr p; + + numRects = REGION_NUM_RECTS (pRegion); + p = REGION_RECTS (pRegion); + for (i = 0; i < numRects; i++) + { + if (pixmap->drawable.depth == 24) + glxFillAlphaChannel(pixmap, + pixmap->drawable.x + p[i].x1, + pixmap->drawable.y + p[i].y1, + p[i].x2 - p[i].x1, + p[i].y2 - p[i].y1); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, + pixmap->drawable.x + p[i].x1) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, + pixmap->drawable.y + p[i].y1) ); + + CALL_TexSubImage2D( GET_DISPATCH(), + (glxPixmap->target, + 0, + p[i].x1, p[i].y1, + p[i].x2 - p[i].x1, p[i].y2 - p[i].y1, + format, + type, + pixmap->devPrivate.ptr) ); + } + } + + if (!override) + DamageEmpty(glxPixmap->pDamage); + + return Success; +} + +static int +__glXDRIreleaseTexImage(__GLXcontext *baseContext, + int buffer, + __GLXpixmap *pixmap) +{ + ScreenPtr pScreen = pixmap->pScreen; + __GLXDRIscreen * const screen = + (__GLXDRIscreen *) __glXgetActiveScreen(pScreen->myNum); + GLuint lastOverride = screen->lastTexOffsetOverride; + + if (lastOverride) { + __GLXpixmap **texOffsetOverride = screen->texOffsetOverride; + int i; + + for (i = 0; i < lastOverride; i++) { + if (texOffsetOverride[i] == pixmap) { + if (screen->texOffsetFinish) + screen->texOffsetFinish((PixmapPtr)pixmap->pDraw); + + texOffsetOverride[i] = NULL; + + if (i + 1 == lastOverride) { + lastOverride = 0; + + while (i--) { + if (texOffsetOverride[i]) { + lastOverride = i + 1; + break; + } + } + + screen->lastTexOffsetOverride = lastOverride; + + break; + } + } + } + } + + return Success; +} + +static __GLXtextureFromPixmap __glXDRItextureFromPixmap = { + __glXDRIbindTexImage, + __glXDRIreleaseTexImage +}; + +static void +__glXDRIscreenDestroy(__GLXscreen *baseScreen) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; + + screen->driScreen.destroyScreen(NULL, + screen->base.pScreen->myNum, + screen->driScreen.private); + + dlclose(screen->driver); + + __glXScreenDestroy(baseScreen); + + xfree(screen); +} + +static __GLXcontext * +__glXDRIscreenCreateContext(__GLXscreen *baseScreen, + __GLcontextModes *modes, + __GLXcontext *baseShareContext) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; + __GLXDRIcontext *context, *shareContext; + void *sharePrivate; + + shareContext = (__GLXDRIcontext *) baseShareContext; + if (shareContext) + sharePrivate = shareContext->driContext.private; + else + sharePrivate = NULL; + + context = xalloc(sizeof *context); + if (context == NULL) + return NULL; + + memset(context, 0, sizeof *context); + context->base.destroy = __glXDRIcontextDestroy; + context->base.makeCurrent = __glXDRIcontextMakeCurrent; + context->base.loseCurrent = __glXDRIcontextLoseCurrent; + context->base.copy = __glXDRIcontextCopy; + context->base.forceCurrent = __glXDRIcontextForceCurrent; + context->base.pScreen = screen->base.pScreen; + + context->base.textureFromPixmap = &__glXDRItextureFromPixmap; + + context->driContext.private = + screen->driScreen.createNewContext(NULL, modes, + 0, /* render type */ + sharePrivate, + &context->driContext); + + context->driContext.mode = modes; + + return &context->base; +} + +static __GLXdrawable * +__glXDRIscreenCreateDrawable(__GLXscreen *screen, + DrawablePtr pDraw, + XID drawId, + __GLcontextModes *modes) +{ + __GLXDRIdrawable *private; + + private = xalloc(sizeof *private); + if (private == NULL) + return NULL; + + memset(private, 0, sizeof *private); + + if (!__glXDrawableInit(&private->base, screen, pDraw, drawId, modes)) { + xfree(private); + return NULL; + } + + private->base.destroy = __glXDRIdrawableDestroy; + private->base.resize = __glXDRIdrawableResize; + private->base.swapBuffers = __glXDRIdrawableSwapBuffers; + private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer; + +#if 0 + /* FIXME: It would only be natural that we called + * driScreen->createNewDrawable here but the DRI drivers manage + * them a little oddly. FIXME: describe this better.*/ + + /* The last argument is 'attrs', which is used with pbuffers which + * we currently don't support. */ + + glxPriv->driDrawable.private = + (screen->driScreen.createNewDrawable)(NULL, modes, + drawId, + &glxPriv->driDrawable, + 0, + NULL); +#endif + + return &private->base; +} + + +static unsigned +filter_modes(__GLcontextModes **server_modes, + const __GLcontextModes *driver_modes) +{ + __GLcontextModes * m; + __GLcontextModes ** prev_next; + const __GLcontextModes * check; + unsigned modes_count = 0; + + if ( driver_modes == NULL ) { + LogMessage(X_WARNING, + "AIGLX: 3D driver returned no fbconfigs.\n"); + return 0; + } + + /* For each mode in server_modes, check to see if a matching mode exists + * in driver_modes. If not, then the mode is not available. + */ + + prev_next = server_modes; + for ( m = *prev_next ; m != NULL ; m = *prev_next ) { + GLboolean do_delete = GL_TRUE; + + for ( check = driver_modes ; check != NULL ; check = check->next ) { + if ( _gl_context_modes_are_same( m, check ) ) { + do_delete = GL_FALSE; + break; + } + } + + /* The 3D has to support all the modes that match the GLX visuals + * sent from the X server. + */ + if ( do_delete && (m->visualID != 0) ) { + do_delete = GL_FALSE; + + LogMessage(X_WARNING, + "AIGLX: 3D driver claims to not support " + "visual 0x%02x\n", m->visualID); + } + + if ( do_delete ) { + *prev_next = m->next; + + m->next = NULL; + _gl_context_modes_destroy( m ); + } + else { + modes_count++; + prev_next = & m->next; + } + } + + return modes_count; +} + + +static void +enable_glx_extension(void *psc, const char *ext_name) +{ + __GLXDRIscreen * const screen = (__GLXDRIscreen *) psc; + + __glXEnableExtension(screen->glx_enable_bits, ext_name); +} + + +static __DRIfuncPtr getProcAddress(const char *proc_name) +{ + if (strcmp(proc_name, "glxEnableExtension") == 0) { + return (__DRIfuncPtr) enable_glx_extension; + } + + return NULL; +} + +static __DRIscreen *findScreen(__DRInativeDisplay *dpy, int scrn) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) __glXgetActiveScreen(scrn); + + return &screen->driScreen; +} + +static GLboolean windowExists(__DRInativeDisplay *dpy, __DRIid draw) +{ + DrawablePtr pDrawable = (DrawablePtr) LookupIDByType(draw, RT_WINDOW); + int unused; + drm_clip_rect_t *pRects; + + return pDrawable ? DRIGetDrawableInfo(pDrawable->pScreen, pDrawable, + (unsigned*)&unused, (unsigned*)&unused, + &unused, &unused, &unused, &unused, + &unused, &pRects, &unused, &unused, + &unused, &pRects) + : GL_FALSE; +} + +static GLboolean createContext(__DRInativeDisplay *dpy, int screen, + int configID, void *contextID, + drm_context_t *hw_context) +{ + XID fakeID; + VisualPtr visual; + int i; + ScreenPtr pScreen; + GLboolean retval; + + pScreen = screenInfo.screens[screen]; + + /* Find the requested X visual */ + visual = pScreen->visuals; + for (i = 0; i < pScreen->numVisuals; i++, visual++) + if (visual->vid == configID) + break; + if (i == pScreen->numVisuals) + return GL_FALSE; + + fakeID = FakeClientID(0); + *(XID *) contextID = fakeID; + + __glXDRIenterServer(GL_FALSE); + retval = DRICreateContext(pScreen, visual, fakeID, hw_context); + __glXDRIleaveServer(GL_FALSE); + return retval; +} + +static GLboolean destroyContext(__DRInativeDisplay *dpy, int screen, + __DRIid context) +{ + GLboolean retval; + + __glXDRIenterServer(GL_FALSE); + retval = DRIDestroyContext(screenInfo.screens[screen], context); + __glXDRIleaveServer(GL_FALSE); + return retval; +} + +static GLboolean +createDrawable(__DRInativeDisplay *dpy, int screen, + __DRIid drawable, drm_drawable_t *hHWDrawable) +{ + DrawablePtr pDrawable; + GLboolean retval; + + pDrawable = (DrawablePtr) LookupIDByClass(drawable, RC_DRAWABLE); + if (!pDrawable) + return GL_FALSE; + + __glXDRIenterServer(GL_FALSE); + retval = DRICreateDrawable(screenInfo.screens[screen], __pGlxClient, + pDrawable, hHWDrawable); + __glXDRIleaveServer(GL_FALSE); + return retval; +} + +static GLboolean +destroyDrawable(__DRInativeDisplay *dpy, int screen, __DRIid drawable) +{ + DrawablePtr pDrawable; + GLboolean retval; + + pDrawable = (DrawablePtr) LookupIDByClass(drawable, RC_DRAWABLE); + if (!pDrawable) + return GL_FALSE; + + __glXDRIenterServer(GL_FALSE); + retval = DRIDestroyDrawable(screenInfo.screens[screen], __pGlxClient, + pDrawable); + __glXDRIleaveServer(GL_FALSE); + return retval; +} + +static GLboolean +getDrawableInfo(__DRInativeDisplay *dpy, int screen, + __DRIid drawable, unsigned int *index, unsigned int *stamp, + int *x, int *y, int *width, int *height, + int *numClipRects, drm_clip_rect_t **ppClipRects, + int *backX, int *backY, + int *numBackClipRects, drm_clip_rect_t **ppBackClipRects) +{ + DrawablePtr pDrawable; + drm_clip_rect_t *pClipRects, *pBackClipRects; + GLboolean retval; + size_t size; + + pDrawable = (DrawablePtr) LookupIDByClass(drawable, RC_DRAWABLE); + if (!pDrawable) { + ErrorF("getDrawableInfo failed to look up window\n"); + + *index = 0; + *stamp = 0; + *x = 0; + *y = 0; + *width = 0; + *height = 0; + *numClipRects = 0; + *ppClipRects = NULL; + *backX = 0; + *backY = 0; + *numBackClipRects = 0; + *ppBackClipRects = NULL; + + return GL_FALSE; + } + + __glXDRIenterServer(GL_FALSE); + retval = DRIGetDrawableInfo(screenInfo.screens[screen], + pDrawable, index, stamp, + x, y, width, height, + numClipRects, &pClipRects, + backX, backY, + numBackClipRects, &pBackClipRects); + __glXDRIleaveServer(GL_FALSE); + + if (*numClipRects > 0) { + size = sizeof (drm_clip_rect_t) * *numClipRects; + *ppClipRects = xalloc (size); + + /* Clip cliprects to screen dimensions (redirected windows) */ + if (*ppClipRects != NULL) { + ScreenPtr pScreen = screenInfo.screens[screen]; + int i, j; + + for (i = 0, j = 0; i < *numClipRects; i++) { + (*ppClipRects)[j].x1 = max(pClipRects[i].x1, 0); + (*ppClipRects)[j].y1 = max(pClipRects[i].y1, 0); + (*ppClipRects)[j].x2 = min(pClipRects[i].x2, pScreen->width); + (*ppClipRects)[j].y2 = min(pClipRects[i].y2, pScreen->height); + + if ((*ppClipRects)[j].x1 < (*ppClipRects)[j].x2 && + (*ppClipRects)[j].y1 < (*ppClipRects)[j].y2) { + j++; + } + } + + if (*numClipRects != j) { + *numClipRects = j; + *ppClipRects = xrealloc (*ppClipRects, + sizeof (drm_clip_rect_t) * + *numClipRects); + } + } else + *numClipRects = 0; + } + else { + *ppClipRects = NULL; + } + + if (*numBackClipRects > 0) { + size = sizeof (drm_clip_rect_t) * *numBackClipRects; + *ppBackClipRects = xalloc (size); + if (*ppBackClipRects != NULL) + memcpy (*ppBackClipRects, pBackClipRects, size); + } + else { + *ppBackClipRects = NULL; + } + + return retval; +} + +static int +getUST(int64_t *ust) +{ + struct timeval tv; + + if (ust == NULL) + return -EFAULT; + + if (gettimeofday(&tv, NULL) == 0) { + ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec; + return 0; + } else { + return -errno; + } +} + +/* Table of functions that we export to the driver. */ +static const __DRIinterfaceMethods interface_methods = { + getProcAddress, + + _gl_context_modes_create, + _gl_context_modes_destroy, + + findScreen, + windowExists, + + createContext, + destroyContext, + + createDrawable, + destroyDrawable, + getDrawableInfo, + + getUST, + NULL, /* glXGetMscRateOML, */ +}; + +static const char dri_driver_path[] = DRI_DRIVER_PATH; + +static Bool +glxDRIEnterVT (int index, int flags) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) __glXgetActiveScreen(index); + + LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n"); + + if (!(*screen->enterVT) (index, flags)) + return FALSE; + + glxResumeClients(); + + return TRUE; +} + +static void +glxDRILeaveVT (int index, int flags) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) __glXgetActiveScreen(index); + + LogMessage(X_INFO, "AIGLX: Suspending AIGLX clients for VT switch\n"); + + glxSuspendClients(); + + return (*screen->leaveVT) (index, flags); +} + +static __GLXscreen * +__glXDRIscreenProbe(ScreenPtr pScreen) +{ + PFNCREATENEWSCREENFUNC createNewScreen; + drm_handle_t hSAREA; + drmAddress pSAREA = NULL; + char *BusID; + __DRIversion ddx_version; + __DRIversion dri_version; + __DRIversion drm_version; + __DRIframebuffer framebuffer; + int fd = -1; + int status; + int api_ver = 20070121; + drm_magic_t magic; + drmVersionPtr version; + int newlyopened; + char *driverName; + drm_handle_t hFB; + int junk; + __GLcontextModes * driver_modes; + __GLXDRIscreen *screen; + void *dev_priv = NULL; + char filename[128]; + Bool isCapable; + size_t buffer_size; + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + + if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable") || + !DRIQueryDirectRenderingCapable(pScreen, &isCapable) || + !isCapable) { + LogMessage(X_INFO, + "AIGLX: Screen %d is not DRI capable\n", pScreen->myNum); + return NULL; + } + + screen = xalloc(sizeof *screen); + if (screen == NULL) + return NULL; + memset(screen, 0, sizeof *screen); + + screen->base.destroy = __glXDRIscreenDestroy; + screen->base.createContext = __glXDRIscreenCreateContext; + screen->base.createDrawable = __glXDRIscreenCreateDrawable; + screen->base.swapInterval = __glXDRIdrawableSwapInterval; + screen->base.pScreen = pScreen; + + __glXInitExtensionEnableBits(screen->glx_enable_bits); + screen->driScreen.screenConfigs = screen; + + + /* DRI protocol version. */ + dri_version.major = XF86DRI_MAJOR_VERSION; + dri_version.minor = XF86DRI_MINOR_VERSION; + dri_version.patch = XF86DRI_PATCH_VERSION; + + framebuffer.base = NULL; + framebuffer.dev_priv = NULL; + + if (!DRIOpenConnection(pScreen, &hSAREA, &BusID)) { + LogMessage(X_ERROR, "AIGLX error: DRIOpenConnection failed\n"); + goto handle_error; + } + + fd = drmOpenOnce(NULL, BusID, &newlyopened); + + if (fd < 0) { + LogMessage(X_ERROR, "AIGLX error: drmOpenOnce failed (%s)\n", + strerror(-fd)); + goto handle_error; + } + + if (drmGetMagic(fd, &magic)) { + LogMessage(X_ERROR, "AIGLX error: drmGetMagic failed\n"); + goto handle_error; + } + + version = drmGetVersion(fd); + if (version) { + drm_version.major = version->version_major; + drm_version.minor = version->version_minor; + drm_version.patch = version->version_patchlevel; + drmFreeVersion(version); + } + else { + drm_version.major = -1; + drm_version.minor = -1; + drm_version.patch = -1; + } + + if (newlyopened && !DRIAuthConnection(pScreen, magic)) { + LogMessage(X_ERROR, "AIGLX error: DRIAuthConnection failed\n"); + goto handle_error; + } + + /* Get device name (like "tdfx") and the ddx version numbers. + * We'll check the version in each DRI driver's "createNewScreen" + * function. */ + if (!DRIGetClientDriverName(pScreen, + &ddx_version.major, + &ddx_version.minor, + &ddx_version.patch, + &driverName)) { + LogMessage(X_ERROR, "AIGLX error: DRIGetClientDriverName failed\n"); + goto handle_error; + } + + snprintf(filename, sizeof filename, "%s/%s_dri.so", + dri_driver_path, driverName); + + screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL); + if (screen->driver == NULL) { + LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n", + filename, dlerror()); + goto handle_error; + } + + createNewScreen = dlsym(screen->driver, CREATE_NEW_SCREEN_FUNC); + if (createNewScreen == NULL) { + LogMessage(X_ERROR, "AIGLX error: dlsym for %s failed (%s)\n", + CREATE_NEW_SCREEN_FUNC, dlerror()); + goto handle_error; + } + + /* + * Get device-specific info. pDevPriv will point to a struct + * (such as DRIRADEONRec in xfree86/driver/ati/radeon_dri.h) that + * has information about the screen size, depth, pitch, ancilliary + * buffers, DRM mmap handles, etc. + */ + if (!DRIGetDeviceInfo(pScreen, &hFB, &junk, + &framebuffer.size, &framebuffer.stride, + &framebuffer.dev_priv_size, &framebuffer.dev_priv)) { + LogMessage(X_ERROR, "AIGLX error: XF86DRIGetDeviceInfo failed"); + goto handle_error; + } + + /* Sigh... the DRI interface is broken; the DRI driver will free + * the dev private pointer using _mesa_free() on screen destroy, + * but we can't use _mesa_malloc() here. In fact, the DRI driver + * shouldn't free data it didn't allocate itself, but what can you + * do... */ + dev_priv = xalloc(framebuffer.dev_priv_size); + if (dev_priv == NULL) { + LogMessage(X_ERROR, "AIGLX error: dev_priv allocation failed"); + goto handle_error; + } + memcpy(dev_priv, framebuffer.dev_priv, framebuffer.dev_priv_size); + framebuffer.dev_priv = dev_priv; + + framebuffer.width = pScreen->width; + framebuffer.height = pScreen->height; + + /* Map the framebuffer region. */ + status = drmMap(fd, hFB, framebuffer.size, + (drmAddressPtr)&framebuffer.base); + if (status != 0) { + LogMessage(X_ERROR, "AIGLX error: drmMap of framebuffer failed (%s)", + strerror(-status)); + goto handle_error; + } + + /* Map the SAREA region. Further mmap regions may be setup in + * each DRI driver's "createNewScreen" function. + */ + status = drmMap(fd, hSAREA, SAREA_MAX, &pSAREA); + if (status != 0) { + LogMessage(X_ERROR, "AIGLX error: drmMap of SAREA failed (%s)", + strerror(-status)); + goto handle_error; + } + + driver_modes = NULL; + screen->driScreen.private = + (*createNewScreen)(NULL, pScreen->myNum, + &screen->driScreen, + screen->base.modes, + &ddx_version, + &dri_version, + &drm_version, + &framebuffer, + pSAREA, + fd, + api_ver, + &interface_methods, + &driver_modes); + + if (screen->driScreen.private == NULL) { + LogMessage(X_ERROR, "AIGLX error: Calling driver entry point failed"); + goto handle_error; + } + + DRIGetTexOffsetFuncs(pScreen, &screen->texOffsetStart, + &screen->texOffsetFinish); + + __glXScreenInit(&screen->base, pScreen); + + buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL); + if (buffer_size > 0) { + if (screen->base.GLXextensions != NULL) { + xfree(screen->base.GLXextensions); + } + + screen->base.GLXextensions = xnfalloc(buffer_size); + (void) __glXGetExtensionString(screen->glx_enable_bits, + screen->base.GLXextensions); + } + + + filter_modes(&screen->base.modes, driver_modes); + _gl_context_modes_destroy(driver_modes); + + __glXsetEnterLeaveServerFuncs(__glXDRIenterServer, __glXDRIleaveServer); + + screen->enterVT = pScrn->EnterVT; + pScrn->EnterVT = glxDRIEnterVT; + screen->leaveVT = pScrn->LeaveVT; + pScrn->LeaveVT = glxDRILeaveVT; + + LogMessage(X_INFO, + "AIGLX: Loaded and initialized %s\n", filename); + + return &screen->base; + + handle_error: + if (pSAREA != NULL) + drmUnmap(pSAREA, SAREA_MAX); + + if (framebuffer.base != NULL) + drmUnmap((drmAddress)framebuffer.base, framebuffer.size); + + if (dev_priv != NULL) + xfree(dev_priv); + + if (fd >= 0) + drmCloseOnce(fd); + + DRICloseConnection(pScreen); + + if (screen->driver) + dlclose(screen->driver); + + xfree(screen); + + LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); + + return NULL; +} + +__GLXprovider __glXDRIProvider = { + __glXDRIscreenProbe, + "DRI", + NULL +}; diff --git a/xorg-server-1.4/GL/glx/glxext.c b/xorg-server-1.4/GL/glx/glxext.c new file mode 100644 index 0000000..b35175e --- /dev/null +++ b/xorg-server-1.4/GL/glx/glxext.c @@ -0,0 +1,570 @@ +/* +** The contents of this file are subject to the GLX Public License Version 1.0 +** (the "License"). You may not use this file except in compliance with the +** License. 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/glx/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 GLX version 1.2 source code, released February, +** 1999. The developer of the Original Software is Silicon Graphics, Inc. +** Those portions of the Subject Software created by Silicon Graphics, Inc. +** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +** +*/ + +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "glxserver.h" +#include +#include +#include +#include "g_disptab.h" +#include "unpack.h" +#include "glxutil.h" +#include "glxext.h" +#include "indirect_table.h" +#include "indirect_util.h" + +/* +** The last context used by the server. It is the context that is current +** from the server's perspective. +*/ +__GLXcontext *__glXLastContext; + +/* +** X resources. +*/ +RESTYPE __glXContextRes; +RESTYPE __glXClientRes; +RESTYPE __glXPixmapRes; +RESTYPE __glXDrawableRes; +RESTYPE __glXSwapBarrierRes; + +/* +** Reply for most singles. +*/ +xGLXSingleReply __glXReply; + +/* +** A set of state for each client. The 0th one is unused because client +** indices start at 1, not 0. +*/ +static __GLXclientState *__glXClients[MAXCLIENTS + 1]; + +/* +** Client that called into GLX dispatch. +*/ +ClientPtr __pGlxClient; + +/* +** Forward declarations. +*/ +static int __glXDispatch(ClientPtr); + +/* +** Called when the extension is reset. +*/ +static void ResetExtension(ExtensionEntry* extEntry) +{ + __glXFlushContextCache(); + __glXResetScreens(); +} + +/* +** Initialize the per-client context storage. +*/ +static void ResetClientState(int clientIndex) +{ + __GLXclientState *cl = __glXClients[clientIndex]; + + if (cl->returnBuf) xfree(cl->returnBuf); + if (cl->largeCmdBuf) xfree(cl->largeCmdBuf); + if (cl->currentContexts) xfree(cl->currentContexts); + memset(cl, 0, sizeof(__GLXclientState)); + /* + ** By default, assume that the client supports + ** GLX major version 1 minor version 0 protocol. + */ + cl->GLClientmajorVersion = 1; + cl->GLClientminorVersion = 0; + if (cl->GLClientextensions) + xfree(cl->GLClientextensions); + +} + +/* +** Reset state used to keep track of large (multi-request) commands. +*/ +void __glXResetLargeCommandStatus(__GLXclientState *cl) +{ + cl->largeCmdBytesSoFar = 0; + cl->largeCmdBytesTotal = 0; + cl->largeCmdRequestsSoFar = 0; + cl->largeCmdRequestsTotal = 0; +} + +/* +** This procedure is called when the client who created the context goes +** away OR when glXDestroyContext is called. In either case, all we do is +** flag that the ID is no longer valid, and (maybe) free the context. +** use. +*/ +static int ContextGone(__GLXcontext* cx, XID id) +{ + cx->idExists = GL_FALSE; + if (!cx->isCurrent) { + __glXFreeContext(cx); + } + + return True; +} + +/* +** Free a client's state. +*/ +static int ClientGone(int clientIndex, XID id) +{ + __GLXcontext *cx; + __GLXclientState *cl = __glXClients[clientIndex]; + int i; + + if (cl) { + /* + ** Free all the contexts that are current for this client. + */ + for (i=0; i < cl->numCurrentContexts; i++) { + cx = cl->currentContexts[i]; + if (cx) { + __glXDeassociateContext(cx); + cx->isCurrent = GL_FALSE; + if (!cx->idExists) { + __glXFreeContext(cx); + } + } + } + /* + ** Re-initialize the client state structure. Don't free it because + ** we'll probably get another client with this index and use the struct + ** again. There is a maximum of MAXCLIENTS of these structures. + */ + ResetClientState(clientIndex); + } + + return True; +} + +/* +** Free a GLX Pixmap. +*/ +static int PixmapGone(__GLXpixmap *pGlxPixmap, XID id) +{ + PixmapPtr pPixmap = (PixmapPtr) pGlxPixmap->pDraw; + + pGlxPixmap->idExists = False; + if (!pGlxPixmap->refcnt) { +#ifdef XF86DRI + if (pGlxPixmap->pDamage) { + DamageUnregister (pGlxPixmap->pDraw, pGlxPixmap->pDamage); + DamageDestroy(pGlxPixmap->pDamage); + } +#endif + /* + ** The DestroyPixmap routine should decrement the refcount and free + ** only if it's zero. + */ + (*pGlxPixmap->pScreen->DestroyPixmap)(pPixmap); + xfree(pGlxPixmap); + } + + return True; +} + +/* +** Destroy routine that gets called when a drawable is freed. A drawable +** contains the ancillary buffers needed for rendering. +*/ +static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid) +{ + __GLXcontext *cx, *cx1; + + /* + ** Use glxPriv->type to figure out what kind of drawable this is. Don't + ** use glxPriv->pDraw->type because by the time this routine is called, + ** the pDraw might already have been freed. + */ + if (glxPriv->type == DRAWABLE_WINDOW) { + /* + ** When a window is destroyed, notify all context bound to + ** it, that there are no longer bound to anything. + */ + for (cx = glxPriv->drawGlxc; cx; cx = cx1) { + cx1 = cx->nextDrawPriv; + cx->pendingState |= __GLX_PENDING_DESTROY; + } + + for (cx = glxPriv->readGlxc; cx; cx = cx1) { + cx1 = cx->nextReadPriv; + cx->pendingState |= __GLX_PENDING_DESTROY; + } + } + + __glXUnrefDrawable(glxPriv); + + return True; +} + +static __GLXcontext *glxPendingDestroyContexts; +static int glxServerLeaveCount; +static int glxBlockClients; + +/* +** Free a context. +*/ +GLboolean __glXFreeContext(__GLXcontext *cx) +{ + if (cx->idExists || cx->isCurrent) return GL_FALSE; + + if (cx->feedbackBuf) xfree(cx->feedbackBuf); + if (cx->selectBuf) xfree(cx->selectBuf); + if (cx == __glXLastContext) { + __glXFlushContextCache(); + } + + /* We can get here through both regular dispatching from + * __glXDispatch() or as a callback from the resource manager. In + * the latter case we need to lift the DRI lock manually. */ + + if (!glxBlockClients) { + __glXleaveServer(GL_FALSE); + cx->destroy(cx); + __glXenterServer(GL_FALSE); + } else { + cx->next = glxPendingDestroyContexts; + glxPendingDestroyContexts = cx; + } + + return GL_TRUE; +} + +extern RESTYPE __glXSwapBarrierRes; + +static int SwapBarrierGone(int screen, XID drawable) +{ + if (__glXSwapBarrierFuncs && + __glXSwapBarrierFuncs[screen].bindSwapBarrierFunc != NULL) { + __glXSwapBarrierFuncs[screen].bindSwapBarrierFunc(screen, drawable, 0); + } + FreeResourceByType(drawable, __glXSwapBarrierRes, FALSE); + return True; +} + +/************************************************************************/ + +/* +** These routines can be used to check whether a particular GL command +** has caused an error. Specifically, we use them to check whether a +** given query has caused an error, in which case a zero-length data +** reply is sent to the client. +*/ + +static GLboolean errorOccured = GL_FALSE; + +/* +** The GL was will call this routine if an error occurs. +*/ +void __glXErrorCallBack(GLenum code) +{ + errorOccured = GL_TRUE; +} + +/* +** Clear the error flag before calling the GL command. +*/ +void __glXClearErrorOccured(void) +{ + errorOccured = GL_FALSE; +} + +/* +** Check if the GL command caused an error. +*/ +GLboolean __glXErrorOccured(void) +{ + return errorOccured; +} + +static int __glXErrorBase; + +int __glXError(int error) +{ + return __glXErrorBase + error; +} + +/************************************************************************/ + +/* +** Initialize the GLX extension. +*/ +void GlxExtensionInit(void) +{ + ExtensionEntry *extEntry; + int i; + + __glXContextRes = CreateNewResourceType((DeleteType)ContextGone); + __glXClientRes = CreateNewResourceType((DeleteType)ClientGone); + __glXPixmapRes = CreateNewResourceType((DeleteType)PixmapGone); + __glXDrawableRes = CreateNewResourceType((DeleteType)DrawableGone); + __glXSwapBarrierRes = CreateNewResourceType((DeleteType)SwapBarrierGone); + + /* + ** Add extension to server extensions. + */ + extEntry = AddExtension(GLX_EXTENSION_NAME, __GLX_NUMBER_EVENTS, + __GLX_NUMBER_ERRORS, __glXDispatch, + __glXDispatch, ResetExtension, + StandardMinorOpcode); + if (!extEntry) { + FatalError("__glXExtensionInit: AddExtensions failed\n"); + return; + } + if (!AddExtensionAlias(GLX_EXTENSION_ALIAS, extEntry)) { + ErrorF("__glXExtensionInit: AddExtensionAlias failed\n"); + return; + } + + __glXErrorBase = extEntry->errorBase; + + /* + ** Initialize table of client state. There is never a client 0. + */ + for (i = 1; i <= MAXCLIENTS; i++) { + __glXClients[i] = 0; + } + + /* + ** Initialize screen specific data. + */ + __glXInitScreens(); +} + +/************************************************************************/ + +void __glXFlushContextCache(void) +{ + __glXLastContext = 0; +} + +/* +** Make a context the current one for the GL (in this implementation, there +** is only one instance of the GL, and we use it to serve all GL clients by +** switching it between different contexts). While we are at it, look up +** a context by its tag and return its (__GLXcontext *). +*/ +__GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag, + int *error) +{ + __GLXcontext *cx; + + /* + ** See if the context tag is legal; it is managed by the extension, + ** so if it's invalid, we have an implementation error. + */ + cx = (__GLXcontext *) __glXLookupContextByTag(cl, tag); + if (!cx) { + cl->client->errorValue = tag; + *error = __glXError(GLXBadContextTag); + return 0; + } + + if (!cx->isDirect) { + if (cx->drawPriv == NULL) { + /* + ** The drawable has vanished. It must be a window, because only + ** windows can be destroyed from under us; GLX pixmaps are + ** refcounted and don't go away until no one is using them. + */ + *error = __glXError(GLXBadCurrentWindow); + return 0; + } + } + + if (cx == __glXLastContext) { + /* No need to re-bind */ + return cx; + } + + /* Make this context the current one for the GL. */ + if (!cx->isDirect) { + if (!(*cx->forceCurrent)(cx)) { + /* Bind failed, and set the error code. Bummer */ + cl->client->errorValue = cx->id; + *error = __glXError(GLXBadContextState); + return 0; + } + } + __glXLastContext = cx; + return cx; +} + +/************************************************************************/ + +void glxSuspendClients(void) +{ + int i; + + for (i = 1; i <= MAXCLIENTS; i++) { + if (__glXClients[i] == NULL || !__glXClients[i]->inUse) + continue; + + IgnoreClient(__glXClients[i]->client); + } + + glxBlockClients = TRUE; +} + +void glxResumeClients(void) +{ + __GLXcontext *cx, *next; + int i; + + glxBlockClients = FALSE; + + for (i = 1; i <= MAXCLIENTS; i++) { + if (__glXClients[i] == NULL || !__glXClients[i]->inUse) + continue; + + AttendClient(__glXClients[i]->client); + } + + __glXleaveServer(GL_FALSE); + for (cx = glxPendingDestroyContexts; cx != NULL; cx = next) { + next = cx->next; + + cx->destroy(cx); + } + glxPendingDestroyContexts = NULL; + __glXenterServer(GL_FALSE); +} + +static void +__glXnopEnterServer(GLboolean rendering) +{ +} + +static void +__glXnopLeaveServer(GLboolean rendering) +{ +} + +static void (*__glXenterServerFunc)(GLboolean) = __glXnopEnterServer; +static void (*__glXleaveServerFunc)(GLboolean) = __glXnopLeaveServer; + +void __glXsetEnterLeaveServerFuncs(void (*enter)(GLboolean), + void (*leave)(GLboolean)) +{ + __glXenterServerFunc = enter; + __glXleaveServerFunc = leave; +} + + +void __glXenterServer(GLboolean rendering) +{ + glxServerLeaveCount--; + + if (glxServerLeaveCount == 0) + (*__glXenterServerFunc)(rendering); +} + +void __glXleaveServer(GLboolean rendering) +{ + if (glxServerLeaveCount == 0) + (*__glXleaveServerFunc)(rendering); + + glxServerLeaveCount++; +} + +/* +** Top level dispatcher; all commands are executed from here down. +*/ +static int __glXDispatch(ClientPtr client) +{ + REQUEST(xGLXSingleReq); + CARD8 opcode; + __GLXdispatchSingleProcPtr proc; + __GLXclientState *cl; + int retval; + + opcode = stuff->glxCode; + cl = __glXClients[client->index]; + if (!cl) { + cl = (__GLXclientState *) xalloc(sizeof(__GLXclientState)); + __glXClients[client->index] = cl; + if (!cl) { + return BadAlloc; + } + memset(cl, 0, sizeof(__GLXclientState)); + } + + if (!cl->inUse) { + /* + ** This is first request from this client. Associate a resource + ** with the client so we will be notified when the client dies. + */ + XID xid = FakeClientID(client->index); + if (!AddResource( xid, __glXClientRes, (pointer)(long)client->index)) { + return BadAlloc; + } + ResetClientState(client->index); + cl->inUse = GL_TRUE; + cl->client = client; + } + + /* + ** If we're expecting a glXRenderLarge request, this better be one. + */ + if ((cl->largeCmdRequestsSoFar != 0) && (opcode != X_GLXRenderLarge)) { + client->errorValue = stuff->glxCode; + return __glXError(GLXBadLargeRequest); + } + + /* If we're currently blocking GLX clients, just put this guy to + * sleep, reset the request and return. */ + if (glxBlockClients) { + ResetCurrentRequest(client); + client->sequence--; + IgnoreClient(client); + return(client->noClientException); + } + + /* + ** Use the opcode to index into the procedure table. + */ + proc = (__GLXdispatchSingleProcPtr) __glXGetProtocolDecodeFunction(& Single_dispatch_info, + opcode, + client->swapped); + if (proc != NULL) { + GLboolean rendering = opcode <= X_GLXRenderLarge; + __glXleaveServer(rendering); + + __pGlxClient = client; + + retval = (*proc)(cl, (GLbyte *) stuff); + + __glXenterServer(rendering); + } + else { + retval = BadRequest; + } + + return retval; +} diff --git a/xorg-server-1.4/GL/glx/glxext.h b/xorg-server-1.4/GL/glx/glxext.h new file mode 100644 index 0000000..6774e4d --- /dev/null +++ b/xorg-server-1.4/GL/glx/glxext.h @@ -0,0 +1,130 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _glxext_h_ +#define _glxext_h_ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +/* + * Added by VA Linux for XFree86 4.0.x + */ +typedef struct { + int type; + void (*resetExtension)(void); + Bool (*initVisuals)( + VisualPtr * visualp, + DepthPtr * depthp, + int * nvisualp, + int * ndepthp, + int * rootDepthp, + VisualID * defaultVisp, + unsigned long sizes, + int bitsPerRGB + ); + void (*setVisualConfigs)( + int nconfigs, + __GLXvisualConfig *configs, + void **privates + ); +} __GLXextensionInfo; + +extern GLboolean __glXFreeContext(__GLXcontext *glxc); +extern void __glXFlushContextCache(void); + +extern void __glXErrorCallBack(GLenum code); +extern void __glXClearErrorOccured(void); +extern GLboolean __glXErrorOccured(void); +extern void __glXResetLargeCommandStatus(__GLXclientState*); + +extern int DoMakeCurrent( __GLXclientState *cl, GLXDrawable drawId, + GLXDrawable readId, GLXContextID contextId, GLXContextTag tag ); +extern int DoGetVisualConfigs(__GLXclientState *cl, unsigned screen, + GLboolean do_swap); +extern int DoGetFBConfigs(__GLXclientState *cl, unsigned screen, + GLboolean do_swap); +extern int DoCreateContext(__GLXclientState *cl, GLXContextID gcId, + GLXContextID shareList, VisualID visual, GLuint screen, GLboolean isDirect); +extern int DoCreateGLXPixmap(__GLXclientState *cl, XID fbconfigId, + GLuint screenNum, XID pixmapId, XID glxpixmapId, CARD32 *attribs, + CARD32 numAttribs); +extern int DoDestroyPixmap(__GLXclientState *cl, XID glxpixmapId); + +extern int DoQueryContext(__GLXclientState *cl, GLXContextID gcId); + +extern int DoRender(__GLXclientState *cl, GLbyte *pc, int do_swap); +extern int DoRenderLarge(__GLXclientState *cl, GLbyte *pc, int do_swap); + +extern void GlxExtensionInit(void); + +extern const char GLServerVersion[]; +extern int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap); + +extern int GlxInitVisuals( + VisualPtr * visualp, + DepthPtr * depthp, + int * nvisualp, + int * ndepthp, + int * rootDepthp, + VisualID * defaultVisp, + unsigned long sizes, + int bitsPerRGB, + int preferredVis +); + +typedef struct { + void * (* queryHyperpipeNetworkFunc)(int, int *, int *); + void * (* queryHyperpipeConfigFunc)(int, int, int *, int *); + int (* destroyHyperpipeConfigFunc)(int, int); + void * (* hyperpipeConfigFunc)(int, int, int *, int *, void *); +} __GLXHyperpipeExtensionFuncs; + +extern void __glXHyperpipeInit(int screen, __GLXHyperpipeExtensionFuncs *funcs); + +extern __GLXHyperpipeExtensionFuncs *__glXHyperpipeFuncs; + +typedef struct { + int (* bindSwapBarrierFunc)(int, XID, int); + int (* queryMaxSwapBarriersFunc)(int); +} __GLXSwapBarrierExtensionFuncs; + +extern void __glXSwapBarrierInit(int screen, __GLXSwapBarrierExtensionFuncs *funcs); + +extern __GLXSwapBarrierExtensionFuncs *__glXSwapBarrierFuncs; + +#endif /* _glxext_h_ */ + diff --git a/xorg-server-1.4/GL/glx/glxglcore.c b/xorg-server-1.4/GL/glx/glxglcore.c new file mode 100644 index 0000000..679d55c --- /dev/null +++ b/xorg-server-1.4/GL/glx/glxglcore.c @@ -0,0 +1,414 @@ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +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, sub license, 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 PRECISION INSIGHT AND/OR ITS 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: + * Kevin E. Martin + * Brian E. Paul + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "glcontextmodes.h" +#include "os.h" + +typedef struct __GLXMESAscreen __GLXMESAscreen; +typedef struct __GLXMESAcontext __GLXMESAcontext; +typedef struct __GLXMESAdrawable __GLXMESAdrawable; + +struct __GLXMESAscreen { + __GLXscreen base; + int index; + int num_vis; + XMesaVisual *xm_vis; +}; + +struct __GLXMESAcontext { + __GLXcontext base; + XMesaContext xmesa; +}; + +struct __GLXMESAdrawable { + __GLXdrawable base; + XMesaBuffer xm_buf; +}; + +static XMesaVisual find_mesa_visual(__GLXscreen *screen, VisualID vid); + + +static void +__glXMesaDrawableDestroy(__GLXdrawable *base) +{ + __GLXMESAdrawable *glxPriv = (__GLXMESAdrawable *) base; + + if (glxPriv->xm_buf != NULL) + XMesaDestroyBuffer(glxPriv->xm_buf); + xfree(glxPriv); +} + +static GLboolean +__glXMesaDrawableResize(__GLXdrawable *base) +{ + __GLXMESAdrawable *glxPriv = (__GLXMESAdrawable *) base; + + XMesaResizeBuffers(glxPriv->xm_buf); + + return GL_TRUE; +} + +static GLboolean +__glXMesaDrawableSwapBuffers(__GLXdrawable *base) +{ + __GLXMESAdrawable *glxPriv = (__GLXMESAdrawable *) base; + + /* This is terrifying: XMesaSwapBuffers() ends up calling CopyArea + * to do the buffer swap, but this assumes that the server holds + * the lock and has its context visible. If another screen uses a + * DRI driver, that will have installed the DRI enter/leave server + * functions, which lifts the lock during GLX dispatch. This is + * why we need to re-take the lock and swap in the server context + * before calling XMesaSwapBuffers() here. /me shakes head. */ + + __glXenterServer(GL_FALSE); + + XMesaSwapBuffers(glxPriv->xm_buf); + + __glXleaveServer(GL_FALSE); + + return GL_TRUE; +} + + +static __GLXdrawable * +__glXMesaScreenCreateDrawable(__GLXscreen *screen, + DrawablePtr pDraw, + XID drawId, + __GLcontextModes *modes) +{ + __GLXMESAdrawable *glxPriv; + XMesaVisual xm_vis; + + glxPriv = xalloc(sizeof *glxPriv); + if (glxPriv == NULL) + return NULL; + + memset(glxPriv, 0, sizeof *glxPriv); + + if (!__glXDrawableInit(&glxPriv->base, screen, pDraw, drawId, modes)) { + xfree(glxPriv); + return NULL; + } + + glxPriv->base.destroy = __glXMesaDrawableDestroy; + glxPriv->base.resize = __glXMesaDrawableResize; + glxPriv->base.swapBuffers = __glXMesaDrawableSwapBuffers; + + xm_vis = find_mesa_visual(screen, modes->visualID); + if (xm_vis == NULL) { + ErrorF("find_mesa_visual returned NULL for visualID = 0x%04x\n", + modes->visualID); + xfree(glxPriv); + return NULL; + } + + if (glxPriv->base.type == DRAWABLE_WINDOW) { + glxPriv->xm_buf = XMesaCreateWindowBuffer(xm_vis, (WindowPtr)pDraw); + } else { + glxPriv->xm_buf = XMesaCreatePixmapBuffer(xm_vis, (PixmapPtr)pDraw, 0); + } + + return &glxPriv->base; +} + +static void +__glXMesaContextDestroy(__GLXcontext *baseContext) +{ + __GLXMESAcontext *context = (__GLXMESAcontext *) baseContext; + + XMesaDestroyContext(context->xmesa); + __glXContextDestroy(&context->base); + xfree(context); +} + +static int +__glXMesaContextMakeCurrent(__GLXcontext *baseContext) + +{ + __GLXMESAcontext *context = (__GLXMESAcontext *) baseContext; + __GLXMESAdrawable *drawPriv = (__GLXMESAdrawable *) context->base.drawPriv; + __GLXMESAdrawable *readPriv = (__GLXMESAdrawable *) context->base.readPriv; + + return XMesaMakeCurrent2(context->xmesa, + drawPriv->xm_buf, + readPriv->xm_buf); +} + +static int +__glXMesaContextLoseCurrent(__GLXcontext *baseContext) +{ + __GLXMESAcontext *context = (__GLXMESAcontext *) baseContext; + + return XMesaLoseCurrent(context->xmesa); +} + +static int +__glXMesaContextCopy(__GLXcontext *baseDst, + __GLXcontext *baseSrc, + unsigned long mask) +{ + __GLXMESAcontext *dst = (__GLXMESAcontext *) baseDst; + __GLXMESAcontext *src = (__GLXMESAcontext *) baseSrc; + + return XMesaCopyContext(src->xmesa, dst->xmesa, mask); +} + +static int +__glXMesaContextForceCurrent(__GLXcontext *baseContext) +{ + __GLXMESAcontext *context = (__GLXMESAcontext *) baseContext; + + /* GlxSetRenderTables() call for XGL moved in XMesaForceCurrent() */ + + return XMesaForceCurrent(context->xmesa); +} + +static __GLXcontext * +__glXMesaScreenCreateContext(__GLXscreen *screen, + __GLcontextModes *modes, + __GLXcontext *baseShareContext) +{ + __GLXMESAcontext *context; + __GLXMESAcontext *shareContext = (__GLXMESAcontext *) baseShareContext; + XMesaVisual xm_vis; + XMesaContext xm_share; + + context = xalloc (sizeof (__GLXMESAcontext)); + if (context == NULL) + return NULL; + + memset(context, 0, sizeof *context); + + context->base.pGlxScreen = screen; + context->base.modes = modes; + + context->base.destroy = __glXMesaContextDestroy; + context->base.makeCurrent = __glXMesaContextMakeCurrent; + context->base.loseCurrent = __glXMesaContextLoseCurrent; + context->base.copy = __glXMesaContextCopy; + context->base.forceCurrent = __glXMesaContextForceCurrent; + + xm_vis = find_mesa_visual(screen, modes->visualID); + if (!xm_vis) { + ErrorF("find_mesa_visual returned NULL for visualID = 0x%04x\n", + modes->visualID); + xfree(context); + return NULL; + } + + xm_share = shareContext ? shareContext->xmesa : NULL; + context->xmesa = XMesaCreateContext(xm_vis, xm_share); + if (!context->xmesa) { + xfree(context); + return NULL; + } + + return &context->base; +} + +static void +__glXMesaScreenDestroy(__GLXscreen *screen) +{ + __GLXMESAscreen *mesaScreen = (__GLXMESAscreen *) screen; + int i; + + if (mesaScreen->xm_vis) { + for (i = 0; i < mesaScreen->num_vis; i++) { + if (mesaScreen->xm_vis[i]) + XMesaDestroyVisual(mesaScreen->xm_vis[i]); + } + + xfree(mesaScreen->xm_vis); + } + + __glXScreenDestroy(screen); + + xfree(screen); +} + +static XMesaVisual +find_mesa_visual(__GLXscreen *screen, VisualID vid) +{ + __GLXMESAscreen *mesaScreen = (__GLXMESAscreen *) screen; + const __GLcontextModes *modes; + unsigned i = 0; + + for ( modes = screen->modes ; modes != NULL ; modes = modes->next ) { + if ( modes->visualID == vid ) { + break; + } + + i++; + } + + return (modes != NULL) ? mesaScreen->xm_vis[i] : NULL; +} + +static void init_screen_visuals(__GLXMESAscreen *screen) +{ + ScreenPtr pScreen = screen->base.pScreen; + __GLcontextModes *modes; + XMesaVisual *pXMesaVisual; + int *used; + int num_vis, j, size; + + /* Alloc space for the list of XMesa visuals */ + size = screen->base.numVisuals * sizeof(XMesaVisual); + pXMesaVisual = (XMesaVisual *) xalloc(size); + memset(pXMesaVisual, 0, size); + + /* FIXME: Change 'used' to be a array of bits (rather than of ints), + * FIXME: create a stack array of 8 or 16 bytes. If 'numVisuals' is less + * FIXME: than 64 or 128 the stack array can be used instead of calling + * FIXME: __glXMalloc / __glXFree. If nothing else, convert 'used' to + * FIXME: array of bytes instead of ints! + */ + used = (int *) xalloc(pScreen->numVisuals * sizeof(int)); + memset(used, 0, pScreen->numVisuals * sizeof(int)); + + num_vis = 0; + for ( modes = screen->base.modes; modes != NULL; modes = modes->next ) { + const int vis_class = _gl_convert_to_x_visual_type( modes->visualType ); + const int nplanes = (modes->rgbBits - modes->alphaBits); + const VisualPtr pVis = pScreen->visuals; + + for (j = 0; j < pScreen->numVisuals; j++) { + if (pVis[j].class == vis_class && + pVis[j].nplanes == nplanes && + pVis[j].redMask == modes->redMask && + pVis[j].greenMask == modes->greenMask && + pVis[j].blueMask == modes->blueMask && + !used[j]) { + + /* Create the XMesa visual */ + assert(num_vis < screen->base.numVisuals); + pXMesaVisual[num_vis] = + XMesaCreateVisual(pScreen, + &pVis[j], + modes->rgbMode, + (modes->alphaBits > 0), + modes->doubleBufferMode, + modes->stereoMode, + GL_TRUE, /* ximage_flag */ + modes->depthBits, + modes->stencilBits, + modes->accumRedBits, + modes->accumGreenBits, + modes->accumBlueBits, + modes->accumAlphaBits, + modes->samples, + modes->level, + modes->visualRating); + /* Set the VisualID */ + modes->visualID = pVis[j].vid; + + /* Mark this visual used */ + used[j] = 1; + break; + } + } + + if ( j == pScreen->numVisuals ) { + ErrorF("No matching visual for __GLcontextMode with " + "visual class = %d (%d), nplanes = %u\n", + vis_class, + modes->visualType, + (modes->rgbBits - modes->alphaBits) ); + } + else if ( modes->visualID == -1 ) { + FatalError( "Matching visual found, but visualID still -1!\n" ); + } + + num_vis++; + } + + xfree(used); + + screen->num_vis = num_vis; + screen->xm_vis = pXMesaVisual; + + assert(screen->num_vis <= screen->base.numVisuals); +} + +static __GLXscreen * +__glXMesaScreenProbe(ScreenPtr pScreen) +{ + __GLXMESAscreen *screen; + + screen = xalloc(sizeof *screen); + if (screen == NULL) + return NULL; + + __glXScreenInit(&screen->base, pScreen); + + screen->base.destroy = __glXMesaScreenDestroy; + screen->base.createContext = __glXMesaScreenCreateContext; + screen->base.createDrawable = __glXMesaScreenCreateDrawable; + screen->base.pScreen = pScreen; + + /* + * Find the GLX visuals that are supported by this screen and create + * XMesa's visuals. + */ + init_screen_visuals(screen); + + return &screen->base; +} + +__GLXprovider __glXMesaProvider = { + __glXMesaScreenProbe, + "MESA", + NULL +}; + +__GLXprovider * +GlxGetMesaProvider (void) +{ + return &__glXMesaProvider; +} diff --git a/xorg-server-1.4/GL/glx/glxscreens.c b/xorg-server-1.4/GL/glx/glxscreens.c new file mode 100644 index 0000000..43447a4 --- /dev/null +++ b/xorg-server-1.4/GL/glx/glxscreens.c @@ -0,0 +1,368 @@ +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include + +#include "glxserver.h" +#include "glxutil.h" +#include "glxext.h" + +const char GLServerVersion[] = "1.4"; +static const char GLServerExtensions[] = + "GL_ARB_depth_texture " + "GL_ARB_draw_buffers " + "GL_ARB_fragment_program " + "GL_ARB_fragment_program_shadow " + "GL_ARB_imaging " + "GL_ARB_multisample " + "GL_ARB_multitexture " + "GL_ARB_occlusion_query " + "GL_ARB_point_parameters " + "GL_ARB_point_sprite " + "GL_ARB_shadow " + "GL_ARB_shadow_ambient " + "GL_ARB_texture_border_clamp " + "GL_ARB_texture_compression " + "GL_ARB_texture_cube_map " + "GL_ARB_texture_env_add " + "GL_ARB_texture_env_combine " + "GL_ARB_texture_env_crossbar " + "GL_ARB_texture_env_dot3 " + "GL_ARB_texture_mirrored_repeat " + "GL_ARB_texture_non_power_of_two " + "GL_ARB_transpose_matrix " + "GL_ARB_vertex_program " + "GL_ARB_window_pos " + "GL_EXT_abgr " + "GL_EXT_bgra " + "GL_EXT_blend_color " + "GL_EXT_blend_equation_separate " + "GL_EXT_blend_func_separate " + "GL_EXT_blend_logic_op " + "GL_EXT_blend_minmax " + "GL_EXT_blend_subtract " + "GL_EXT_clip_volume_hint " + "GL_EXT_copy_texture " + "GL_EXT_draw_range_elements " + "GL_EXT_fog_coord " + "GL_EXT_framebuffer_object " + "GL_EXT_multi_draw_arrays " + "GL_EXT_packed_pixels " + "GL_EXT_paletted_texture " + "GL_EXT_point_parameters " + "GL_EXT_polygon_offset " + "GL_EXT_rescale_normal " + "GL_EXT_secondary_color " + "GL_EXT_separate_specular_color " + "GL_EXT_shadow_funcs " + "GL_EXT_shared_texture_palette " + "GL_EXT_stencil_two_side " + "GL_EXT_stencil_wrap " + "GL_EXT_subtexture " + "GL_EXT_texture " + "GL_EXT_texture3D " + "GL_EXT_texture_compression_dxt1 " + "GL_EXT_texture_compression_s3tc " + "GL_EXT_texture_edge_clamp " + "GL_EXT_texture_env_add " + "GL_EXT_texture_env_combine " + "GL_EXT_texture_env_dot3 " + "GL_EXT_texture_filter_ansiotropic " + "GL_EXT_texture_lod " + "GL_EXT_texture_lod_bias " + "GL_EXT_texture_mirror_clamp " + "GL_EXT_texture_object " + "GL_EXT_texture_rectangle " + "GL_EXT_vertex_array " + "GL_3DFX_texture_compression_FXT1 " + "GL_APPLE_packed_pixels " + "GL_ATI_draw_buffers " + "GL_ATI_texture_env_combine3 " + "GL_ATI_texture_mirror_once " + "GL_HP_occlusion_test " + "GL_IBM_texture_mirrored_repeat " + "GL_INGR_blend_func_separate " + "GL_MESA_pack_invert " + "GL_MESA_ycbcr_texture " + "GL_NV_blend_square " + "GL_NV_depth_clamp " + "GL_NV_fog_distance " + "GL_NV_fragment_program " + "GL_NV_fragment_program_option " + "GL_NV_fragment_program2 " + "GL_NV_light_max_exponent " + "GL_NV_multisample_filter_hint " + "GL_NV_point_sprite " + "GL_NV_texgen_reflection " + "GL_NV_texture_compression_vtc " + "GL_NV_texture_env_combine4 " + "GL_NV_texture_expand_normal " + "GL_NV_texture_rectangle " + "GL_NV_vertex_program " + "GL_NV_vertex_program1_1 " + "GL_NV_vertex_program2 " + "GL_NV_vertex_program2_option " + "GL_NV_vertex_program3 " + "GL_OES_compressed_paletted_texture " + "GL_SGI_color_matrix " + "GL_SGI_color_table " + "GL_SGIS_generate_mipmap " + "GL_SGIS_multisample " + "GL_SGIS_point_parameters " + "GL_SGIS_texture_border_clamp " + "GL_SGIS_texture_edge_clamp " + "GL_SGIS_texture_lod " + "GL_SGIX_depth_texture " + "GL_SGIX_shadow " + "GL_SGIX_shadow_ambient " + "GL_SUN_slice_accum " + ; + +/* +** We have made the simplifying assuption that the same extensions are +** supported across all screens in a multi-screen system. +*/ +static char GLXServerVendorName[] = "SGI"; +static char GLXServerVersion[] = "1.2"; +static char GLXServerExtensions[] = + "GLX_ARB_multisample " + "GLX_EXT_visual_info " + "GLX_EXT_visual_rating " + "GLX_EXT_import_context " + "GLX_EXT_texture_from_pixmap " + "GLX_OML_swap_method " + "GLX_SGI_make_current_read " +#ifndef __DARWIN__ + "GLX_SGIS_multisample " + "GLX_SGIX_hyperpipe " + "GLX_SGIX_swap_barrier " +#endif + "GLX_SGIX_fbconfig " + "GLX_MESA_copy_sub_buffer " + ; + +__GLXscreen **__glXActiveScreens; + +__GLXSwapBarrierExtensionFuncs *__glXSwapBarrierFuncs = NULL; +static int __glXNumSwapBarrierFuncs = 0; +__GLXHyperpipeExtensionFuncs *__glXHyperpipeFuncs = NULL; +static int __glXNumHyperpipeFuncs = 0; + +__GLXscreen *__glXgetActiveScreen(int num) { + return __glXActiveScreens[num]; +} + + +/* +** This hook gets called when a window moves or changes size. +*/ +static Bool PositionWindow(WindowPtr pWin, int x, int y) +{ + ScreenPtr pScreen; + __GLXcontext *glxc; + __GLXdrawable *glxPriv; + Bool ret; + + /* + ** Call wrapped position window routine + */ + pScreen = pWin->drawable.pScreen; + pScreen->PositionWindow = + __glXActiveScreens[pScreen->myNum]->WrappedPositionWindow; + ret = (*pScreen->PositionWindow)(pWin, x, y); + pScreen->PositionWindow = PositionWindow; + + /* + ** Tell all contexts rendering into this window that the window size + ** has changed. + */ + glxPriv = (__GLXdrawable *) LookupIDByType(pWin->drawable.id, + __glXDrawableRes); + if (glxPriv == NULL) { + /* + ** This window is not being used by the OpenGL. + */ + return ret; + } + + /* + ** resize the drawable + */ + /* first change the drawable size */ + if (glxPriv->resize(glxPriv) == GL_FALSE) { + /* resize failed! */ + /* XXX: what can we possibly do here? */ + ret = False; + } + + /* mark contexts as needing resize */ + + for (glxc = glxPriv->drawGlxc; glxc; glxc = glxc->nextDrawPriv) { + glxc->pendingState |= __GLX_PENDING_RESIZE; + } + + for (glxc = glxPriv->readGlxc; glxc; glxc = glxc->nextReadPriv) { + glxc->pendingState |= __GLX_PENDING_RESIZE; + } + + return ret; +} + +/* + * If your DDX driver wants to register support for swap barriers or hyperpipe + * topology, it should call __glXHyperpipeInit() or __glXSwapBarrierInit() + * with a dispatch table of functions to handle the requests. In the XFree86 + * DDX, for example, you would call these near the bottom of the driver's + * ScreenInit method, after DRI has been initialized. + * + * This should be replaced with a better method when we teach the server how + * to load DRI drivers. + */ + +void __glXHyperpipeInit(int screen, __GLXHyperpipeExtensionFuncs *funcs) +{ + if (__glXNumHyperpipeFuncs < screen + 1) { + __glXHyperpipeFuncs = xrealloc(__glXHyperpipeFuncs, + (screen+1) * sizeof(__GLXHyperpipeExtensionFuncs)); + __glXNumHyperpipeFuncs = screen + 1; + } + + __glXHyperpipeFuncs[screen].queryHyperpipeNetworkFunc = + *funcs->queryHyperpipeNetworkFunc; + __glXHyperpipeFuncs[screen].queryHyperpipeConfigFunc = + *funcs->queryHyperpipeConfigFunc; + __glXHyperpipeFuncs[screen].destroyHyperpipeConfigFunc = + *funcs->destroyHyperpipeConfigFunc; + __glXHyperpipeFuncs[screen].hyperpipeConfigFunc = + *funcs->hyperpipeConfigFunc; +} + +void __glXSwapBarrierInit(int screen, __GLXSwapBarrierExtensionFuncs *funcs) +{ + if (__glXNumSwapBarrierFuncs < screen + 1) { + __glXSwapBarrierFuncs = xrealloc(__glXSwapBarrierFuncs, + (screen+1) * sizeof(__GLXSwapBarrierExtensionFuncs)); + __glXNumSwapBarrierFuncs = screen + 1; + } + + __glXSwapBarrierFuncs[screen].bindSwapBarrierFunc = + funcs->bindSwapBarrierFunc; + __glXSwapBarrierFuncs[screen].queryMaxSwapBarriersFunc = + funcs->queryMaxSwapBarriersFunc; +} + +static __GLXprovider *__glXProviderStack; + +void GlxPushProvider(__GLXprovider *provider) +{ + provider->next = __glXProviderStack; + __glXProviderStack = provider; +} + +void __glXScreenInit(__GLXscreen *screen, ScreenPtr pScreen) +{ + screen->pScreen = pScreen; + screen->GLextensions = xstrdup(GLServerExtensions); + screen->GLXvendor = xstrdup(GLXServerVendorName); + screen->GLXversion = xstrdup(GLXServerVersion); + screen->GLXextensions = xstrdup(GLXServerExtensions); + + screen->WrappedPositionWindow = pScreen->PositionWindow; + pScreen->PositionWindow = PositionWindow; + + __glXScreenInitVisuals(screen); +} + +void +__glXScreenDestroy(__GLXscreen *screen) +{ + xfree(screen->GLXvendor); + xfree(screen->GLXversion); + xfree(screen->GLXextensions); + xfree(screen->GLextensions); +} + +void __glXInitScreens(void) +{ + GLint i; + ScreenPtr pScreen; + __GLXprovider *p; + size_t size; + + /* + ** This alloc has to work or else the server might as well core dump. + */ + size = screenInfo.numScreens * sizeof(__GLXscreen *); + __glXActiveScreens = xalloc(size); + memset(__glXActiveScreens, 0, size); + + for (i = 0; i < screenInfo.numScreens; i++) { + pScreen = screenInfo.screens[i]; + + for (p = __glXProviderStack; p != NULL; p = p->next) { + __glXActiveScreens[i] = p->screenProbe(pScreen); + if (__glXActiveScreens[i] != NULL) { + LogMessage(X_INFO, + "GLX: Initialized %s GL provider for screen %d\n", + p->name, i); + break; + } + } + } +} + +void __glXResetScreens(void) +{ + int i; + + for (i = 0; i < screenInfo.numScreens; i++) + if (__glXActiveScreens[i]) + __glXActiveScreens[i]->destroy(__glXActiveScreens[i]); + + xfree(__glXActiveScreens); + xfree(__glXHyperpipeFuncs); + xfree(__glXSwapBarrierFuncs); + __glXNumHyperpipeFuncs = 0; + __glXNumSwapBarrierFuncs = 0; + __glXHyperpipeFuncs = NULL; + __glXSwapBarrierFuncs = NULL; + __glXActiveScreens = NULL; +} diff --git a/xorg-server-1.4/GL/glx/glxscreens.h b/xorg-server-1.4/GL/glx/glxscreens.h new file mode 100644 index 0000000..bba4557 --- /dev/null +++ b/xorg-server-1.4/GL/glx/glxscreens.h @@ -0,0 +1,96 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _GLX_screens_h_ +#define _GLX_screens_h_ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#include "GL/internal/glcore.h" + +/* +** Screen dependent data. These methods are the interface between the DIX +** and DDX layers of the GLX server extension. The methods provide an +** interface for context management on a screen. +*/ +typedef struct __GLXscreen __GLXscreen; +struct __GLXscreen { + void (*destroy) (__GLXscreen *screen); + + __GLXcontext *(*createContext) (__GLXscreen *screen, + __GLcontextModes *modes, + __GLXcontext *shareContext); + + __GLXdrawable *(*createDrawable)(__GLXscreen *context, + DrawablePtr pDraw, + XID drawId, + __GLcontextModes *modes); + int (*swapInterval) (__GLXdrawable *drawable, + int interval); + + ScreenPtr pScreen; + + /** + * Linked list of valid context modes for this screen. + */ + __GLcontextModes *modes; + + void **pVisualPriv; + GLint numVisuals; + GLint numUsableVisuals; + + char *GLextensions; + + char *GLXvendor; + char *GLXversion; + char *GLXextensions; + + /* + ** Things that are not statically set. + */ + Bool (*WrappedPositionWindow)(WindowPtr pWin, int x, int y); + +}; + + +void __glXScreenInit(__GLXscreen *screen, ScreenPtr pScreen); +void __glXScreenDestroy(__GLXscreen *screen); + +void __glXInitScreens(void); +extern void __glXResetScreens(void); + +#endif /* !__GLX_screens_h__ */ diff --git a/xorg-server-1.4/GL/glx/glxserver.h b/xorg-server-1.4/GL/glx/glxserver.h new file mode 100644 index 0000000..b6b5592 --- /dev/null +++ b/xorg-server-1.4/GL/glx/glxserver.h @@ -0,0 +1,257 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _GLX_server_h_ +#define _GLX_server_h_ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* +** The X header misc.h defines these math functions. +*/ +#undef abs +#undef fabs + +#define GL_GLEXT_PROTOTYPES /* we want prototypes */ +#include +#include +#include + +/* For glxscreens.h */ +typedef struct __GLXdrawable __GLXdrawable; +typedef struct __GLXcontext __GLXcontext; + +#include "glxscreens.h" +#include "glxdrawable.h" +#include "glxcontext.h" + + +#define GLX_SERVER_MAJOR_VERSION 1 +#define GLX_SERVER_MINOR_VERSION 2 + +#ifndef True +#define True 1 +#endif +#ifndef False +#define False 0 +#endif + +/* +** GLX resources. +*/ +typedef XID GLXContextID; +typedef XID GLXPixmap; +typedef XID GLXDrawable; + +typedef struct __GLXclientStateRec __GLXclientState; + +extern __GLXscreen **__glXActiveScreens; +extern GLint __glXNumActiveScreens; +extern __GLXscreen *__glXgetActiveScreen(int num); + +/************************************************************************/ + +void GlxSetVisualConfigs(int nconfigs, + __GLXvisualConfig *configs, void **privates); + +struct _glapi_table; +void GlxSetRenderTables (struct _glapi_table *table); + +void __glXScreenInitVisuals(__GLXscreen *screen); + +/* +** The last context used (from the server's persective) is cached. +*/ +extern __GLXcontext *__glXLastContext; +extern __GLXcontext *__glXForceCurrent(__GLXclientState*, GLXContextTag, int*); + +extern ClientPtr __pGlxClient; + +int __glXError(int error); + +/* +** Macros to set, unset, and retrieve the flag that says whether a context +** has unflushed commands. +*/ +#define __GLX_NOTE_UNFLUSHED_CMDS(glxc) glxc->hasUnflushedCommands = GL_TRUE +#define __GLX_NOTE_FLUSHED_CMDS(glxc) glxc->hasUnflushedCommands = GL_FALSE +#define __GLX_HAS_UNFLUSHED_CMDS(glxc) (glxc->hasUnflushedCommands) + +/************************************************************************/ + +typedef struct __GLXprovider __GLXprovider; +struct __GLXprovider { + __GLXscreen *(*screenProbe)(ScreenPtr pScreen); + const char *name; + __GLXprovider *next; +}; + +void GlxPushProvider(__GLXprovider *provider); + +void __glXsetEnterLeaveServerFuncs(void (*enter)(GLboolean), + void (*leave)(GLboolean)); +void __glXenterServer(GLboolean rendering); +void __glXleaveServer(GLboolean rendering); + +void glxSuspendClients(void); +void glxResumeClients(void); + +/* +** State kept per client. +*/ +struct __GLXclientStateRec { + /* + ** Whether this structure is currently being used to support a client. + */ + Bool inUse; + + /* + ** Buffer for returned data. + */ + GLbyte *returnBuf; + GLint returnBufSize; + + /* + ** Keep track of large rendering commands, which span multiple requests. + */ + GLint largeCmdBytesSoFar; /* bytes received so far */ + GLint largeCmdBytesTotal; /* total bytes expected */ + GLint largeCmdRequestsSoFar; /* requests received so far */ + GLint largeCmdRequestsTotal; /* total requests expected */ + GLbyte *largeCmdBuf; + GLint largeCmdBufSize; + + /* + ** Keep a list of all the contexts that are current for this client's + ** threads. + */ + __GLXcontext **currentContexts; + GLint numCurrentContexts; + + /* Back pointer to X client record */ + ClientPtr client; + + int GLClientmajorVersion; + int GLClientminorVersion; + char *GLClientextensions; +}; + +/************************************************************************/ + +/* +** Dispatch tables. +*/ +typedef void (*__GLXdispatchRenderProcPtr)(GLbyte *); +typedef int (*__GLXdispatchSingleProcPtr)(__GLXclientState *, GLbyte *); +typedef int (*__GLXdispatchVendorPrivProcPtr)(__GLXclientState *, GLbyte *); + +/* + * Dispatch for GLX commands. + */ +typedef int (*__GLXprocPtr)(__GLXclientState *, char *pc); + +/* + * Tables for computing the size of each rendering command. + */ +typedef int (*gl_proto_size_func)(const GLbyte *, Bool); + +typedef struct { + int bytes; + gl_proto_size_func varsize; +} __GLXrenderSizeData; + +/************************************************************************/ + +/* +** X resources. +*/ +extern RESTYPE __glXContextRes; +extern RESTYPE __glXClientRes; +extern RESTYPE __glXPixmapRes; +extern RESTYPE __glXDrawableRes; + +/************************************************************************/ + +/* +** Prototypes. +*/ + +extern char *__glXcombine_strings(const char *, const char *); + +/* +** Routines for sending swapped replies. +*/ + +extern void __glXSwapMakeCurrentReply(ClientPtr client, + xGLXMakeCurrentReply *reply); +extern void __glXSwapIsDirectReply(ClientPtr client, + xGLXIsDirectReply *reply); +extern void __glXSwapQueryVersionReply(ClientPtr client, + xGLXQueryVersionReply *reply); +extern void __glXSwapQueryContextInfoEXTReply(ClientPtr client, + xGLXQueryContextInfoEXTReply *reply, + int *buf); +extern void __glXSwapGetDrawableAttributesReply(ClientPtr client, + xGLXGetDrawableAttributesReply *reply, CARD32 *buf); +extern void glxSwapQueryExtensionsStringReply(ClientPtr client, + xGLXQueryExtensionsStringReply *reply, char *buf); +extern void glxSwapQueryServerStringReply(ClientPtr client, + xGLXQueryServerStringReply *reply, char *buf); + + +/* + * Routines for computing the size of variably-sized rendering commands. + */ + +extern int __glXTypeSize(GLenum enm); +extern int __glXImageSize(GLenum format, GLenum type, + GLenum target, GLsizei w, GLsizei h, GLsizei d, + GLint imageHeight, GLint rowLength, GLint skipImages, GLint skipRows, + GLint alignment); + +#endif /* !__GLX_server_h__ */ diff --git a/xorg-server-1.4/GL/glx/glxutil.c b/xorg-server-1.4/GL/glx/glxutil.c new file mode 100644 index 0000000..1f17292 --- /dev/null +++ b/xorg-server-1.4/GL/glx/glxutil.c @@ -0,0 +1,156 @@ +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#define NEED_REPLIES +#define FONT_PCF +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "glxserver.h" +#include +#include +#include +#include +#include "glxutil.h" +#include "GL/internal/glcore.h" +#include "GL/glxint.h" +#include "glcontextmodes.h" + +/************************************************************************/ +/* Context stuff */ + + +/* +** associate a context with a drawable +*/ +void +__glXAssociateContext(__GLXcontext *glxc) +{ + glxc->nextDrawPriv = glxc->drawPriv->drawGlxc; + glxc->drawPriv->drawGlxc = glxc; + + __glXRefDrawable(glxc->drawPriv); + + + glxc->nextReadPriv = glxc->readPriv->readGlxc; + glxc->readPriv->readGlxc = glxc; + + __glXRefDrawable(glxc->readPriv); +} + +/* +** Deassociate a context from a drawable +*/ +void +__glXDeassociateContext(__GLXcontext *glxc) +{ + __GLXcontext *curr, *prev; + + prev = NULL; + for ( curr = glxc->drawPriv->drawGlxc + ; curr != NULL + ; prev = curr, curr = curr->nextDrawPriv ) { + if (curr == glxc) { + /* found context. Deassociate. */ + if (prev == NULL) { + glxc->drawPriv->drawGlxc = curr->nextDrawPriv; + } else { + prev->nextDrawPriv = curr->nextDrawPriv; + } + curr->nextDrawPriv = NULL; + __glXUnrefDrawable(glxc->drawPriv); + break; + } + } + + + prev = NULL; + for ( curr = glxc->readPriv->readGlxc + ; curr != NULL + ; prev = curr, curr = curr->nextReadPriv ) { + if (curr == glxc) { + /* found context. Deassociate. */ + if (prev == NULL) { + glxc->readPriv->readGlxc = curr->nextReadPriv; + } else { + prev->nextReadPriv = curr->nextReadPriv; + } + curr->nextReadPriv = NULL; + __glXUnrefDrawable(glxc->readPriv); + break; + } + } +} + +/*****************************************************************************/ +/* Drawable private stuff */ + +void +__glXRefDrawable(__GLXdrawable *glxPriv) +{ + glxPriv->refCount++; +} + +void +__glXUnrefDrawable(__GLXdrawable *glxPriv) +{ + glxPriv->refCount--; + if (glxPriv->refCount == 0) { + /* remove the drawable from the drawable list */ + FreeResourceByType(glxPriv->drawId, __glXDrawableRes, FALSE); + glxPriv->destroy(glxPriv); + } +} + +GLboolean +__glXDrawableInit(__GLXdrawable *drawable, + __GLXscreen *screen, DrawablePtr pDraw, XID drawId, + __GLcontextModes *modes) +{ + drawable->type = pDraw->type; + drawable->pDraw = pDraw; + drawable->drawId = drawId; + drawable->refCount = 1; + drawable->modes = modes; + + /* if not a pixmap, lookup will fail, so pGlxPixmap will be NULL */ + drawable->pGlxPixmap = (__GLXpixmap *) + LookupIDByType(drawId, __glXPixmapRes); + + return GL_TRUE; +} diff --git a/xorg-server-1.4/GL/glx/glxutil.h b/xorg-server-1.4/GL/glx/glxutil.h new file mode 100644 index 0000000..1937ef2 --- /dev/null +++ b/xorg-server-1.4/GL/glx/glxutil.h @@ -0,0 +1,63 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _glxcmds_h_ +#define _glxcmds_h_ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +/* relate contexts with drawables */ +extern void __glXAssociateContext(__GLXcontext *glxc); +extern void __glXDeassociateContext(__GLXcontext *glxc); + +/* drawable management */ +extern void __glXRefDrawable(__GLXdrawable *glxPriv); +extern void __glXUnrefDrawable(__GLXdrawable *glxPriv); + +extern GLboolean __glXDrawableInit(__GLXdrawable *drawable, + __GLXscreen *screen, + DrawablePtr pDraw, XID drawID, + __GLcontextModes *modes); + +/* context helper routines */ +extern __GLXcontext *__glXLookupContextByTag(__GLXclientState*, GLXContextTag); + +/* init helper routines */ +extern void *__glXglDDXScreenInfo(void); +extern void *__glXglDDXExtensionInfo(void); + +#endif /* _glxcmds_h_ */ diff --git a/xorg-server-1.4/GL/glx/glxvisuals.c b/xorg-server-1.4/GL/glx/glxvisuals.c new file mode 100644 index 0000000..0e9bded --- /dev/null +++ b/xorg-server-1.4/GL/glx/glxvisuals.c @@ -0,0 +1,518 @@ +/* + * Copyright © 2006 Red Hat, Inc. + * (C) Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. + * 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, sub license, + * 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, INC, OR PRECISION INSIGHT 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: + * Kevin E. Martin + * Brian Paul + * Kristian Høgsberg + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void GlxWrapInitVisuals(miInitVisualsProcPtr *); + +#include "glcontextmodes.h" + +struct ScreenVisualsRec { + int num_vis; + void *private; + __GLcontextModes *modes; +}; +typedef struct ScreenVisualsRec ScreenVisuals; + +static ScreenVisuals screenVisuals[MAXSCREENS]; + +static int numConfigs = 0; +static __GLXvisualConfig *visualConfigs = NULL; +static void **visualPrivates = NULL; + +static int count_bits(unsigned int n) +{ + int bits = 0; + + while (n > 0) { + if (n & 1) bits++; + n >>= 1; + } + return bits; +} + +/* + * In the case the driver defines no GLX visuals we'll use these. + * Note that for TrueColor and DirectColor visuals, bufferSize is the + * sum of redSize, greenSize, blueSize and alphaSize, which may be larger + * than the nplanes/rootDepth of the server's X11 visuals + */ +#define NUM_FALLBACK_CONFIGS 5 +static __GLXvisualConfig FallbackConfigs[NUM_FALLBACK_CONFIGS] = { + /* [0] = RGB, double buffered, Z */ + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 0, /* rgba sizes */ + -1, -1, -1, 0, /* rgba masks */ + 0, 0, 0, 0, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 0, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE, /* visualRating */ + GLX_NONE, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, + /* [1] = RGB, double buffered, Z, stencil, accum */ + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 0, /* rgba sizes */ + -1, -1, -1, 0, /* rgba masks */ + 16, 16, 16, 0, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 8, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE, /* visualRating */ + GLX_NONE, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, + /* [2] = RGB+Alpha, double buffered, Z, stencil, accum */ + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 8, /* rgba sizes */ + -1, -1, -1, -1, /* rgba masks */ + 16, 16, 16, 16, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 8, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE, /* visualRating */ + GLX_NONE, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, + /* [3] = RGB+Alpha, single buffered, Z, stencil, accum */ + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 8, /* rgba sizes */ + -1, -1, -1, -1, /* rgba masks */ + 16, 16, 16, 16, /* rgba accum sizes */ + False, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 8, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE, /* visualRating */ + GLX_NONE, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, + /* [4] = CI, double buffered, Z */ + { + -1, /* vid */ + -1, /* class */ + False, /* rgba? (false = color index) */ + -1, -1, -1, 0, /* rgba sizes */ + -1, -1, -1, 0, /* rgba masks */ + 0, 0, 0, 0, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 0, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE, /* visualRating */ + GLX_NONE, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, +}; + + +static Bool init_visuals(int *nvisualp, VisualPtr *visualp, + VisualID *defaultVisp, + int ndepth, DepthPtr pdepth, + int rootDepth) +{ + int numRGBconfigs; + int numCIconfigs; + int numVisuals = *nvisualp; + int numNewVisuals; + int numNewConfigs; + VisualPtr pVisual = *visualp; + VisualPtr pVisualNew = NULL; + VisualID *orig_vid = NULL; + __GLcontextModes *modes; + __GLXvisualConfig *pNewVisualConfigs = NULL; + void **glXVisualPriv; + void **pNewVisualPriv; + int found_default; + int i, j, k; + + if (numConfigs > 0) + numNewConfigs = numConfigs; + else + numNewConfigs = NUM_FALLBACK_CONFIGS; + + /* Alloc space for the list of new GLX visuals */ + pNewVisualConfigs = (__GLXvisualConfig *) + xalloc(numNewConfigs * sizeof(__GLXvisualConfig)); + if (!pNewVisualConfigs) { + return FALSE; + } + + /* Alloc space for the list of new GLX visual privates */ + pNewVisualPriv = (void **) xalloc(numNewConfigs * sizeof(void *)); + if (!pNewVisualPriv) { + xfree(pNewVisualConfigs); + return FALSE; + } + + /* + ** If SetVisualConfigs was not called, then use default GLX + ** visual configs. + */ + if (numConfigs == 0) { + memcpy(pNewVisualConfigs, FallbackConfigs, + NUM_FALLBACK_CONFIGS * sizeof(__GLXvisualConfig)); + memset(pNewVisualPriv, 0, NUM_FALLBACK_CONFIGS * sizeof(void *)); + } + else { + /* copy driver's visual config info */ + for (i = 0; i < numConfigs; i++) { + pNewVisualConfigs[i] = visualConfigs[i]; + pNewVisualPriv[i] = visualPrivates[i]; + } + } + + /* Count the number of RGB and CI visual configs */ + numRGBconfigs = 0; + numCIconfigs = 0; + for (i = 0; i < numNewConfigs; i++) { + if (pNewVisualConfigs[i].rgba) + numRGBconfigs++; + else + numCIconfigs++; + } + + /* Count the total number of visuals to compute */ + numNewVisuals = 0; + for (i = 0; i < numVisuals; i++) { + numNewVisuals += + (pVisual[i].class == TrueColor || pVisual[i].class == DirectColor) + ? numRGBconfigs : numCIconfigs; + } + + /* Reset variables for use with the next screen/driver's visual configs */ + visualConfigs = NULL; + numConfigs = 0; + + /* Alloc temp space for the list of orig VisualIDs for each new visual */ + orig_vid = (VisualID *) xalloc(numNewVisuals * sizeof(VisualID)); + if (!orig_vid) { + xfree(pNewVisualPriv); + xfree(pNewVisualConfigs); + return FALSE; + } + + /* Alloc space for the list of glXVisuals */ + modes = _gl_context_modes_create(numNewVisuals, sizeof(__GLcontextModes)); + if (modes == NULL) { + xfree(orig_vid); + xfree(pNewVisualPriv); + xfree(pNewVisualConfigs); + return FALSE; + } + + /* Alloc space for the list of glXVisualPrivates */ + glXVisualPriv = (void **)xalloc(numNewVisuals * sizeof(void *)); + if (!glXVisualPriv) { + _gl_context_modes_destroy( modes ); + xfree(orig_vid); + xfree(pNewVisualPriv); + xfree(pNewVisualConfigs); + return FALSE; + } + + /* Alloc space for the new list of the X server's visuals */ + pVisualNew = (VisualPtr)xalloc(numNewVisuals * sizeof(VisualRec)); + if (!pVisualNew) { + xfree(glXVisualPriv); + _gl_context_modes_destroy( modes ); + xfree(orig_vid); + xfree(pNewVisualPriv); + xfree(pNewVisualConfigs); + return FALSE; + } + + /* Initialize the new visuals */ + found_default = FALSE; + screenVisuals[screenInfo.numScreens-1].modes = modes; + for (i = j = 0; i < numVisuals; i++) { + int is_rgb = (pVisual[i].class == TrueColor || + pVisual[i].class == DirectColor); + + for (k = 0; k < numNewConfigs; k++) { + if (pNewVisualConfigs[k].rgba != is_rgb) + continue; + + assert( modes != NULL ); + + /* Initialize the new visual */ + pVisualNew[j] = pVisual[i]; + pVisualNew[j].vid = FakeClientID(0); + + /* Check for the default visual */ + if (!found_default && pVisual[i].vid == *defaultVisp) { + *defaultVisp = pVisualNew[j].vid; + found_default = TRUE; + } + + /* Save the old VisualID */ + orig_vid[j] = pVisual[i].vid; + + /* Initialize the glXVisual */ + _gl_copy_visual_to_context_mode( modes, & pNewVisualConfigs[k] ); + modes->visualID = pVisualNew[j].vid; + if (modes->fbconfigID == GLX_DONT_CARE) + modes->fbconfigID = modes->visualID; + + /* + * If the class is -1, then assume the X visual information + * is identical to what GLX needs, and take them from the X + * visual. NOTE: if class != -1, then all other fields MUST + * be initialized. + */ + if (modes->visualType == GLX_NONE) { + modes->visualType = _gl_convert_from_x_visual_type( pVisual[i].class ); + modes->redBits = count_bits(pVisual[i].redMask); + modes->greenBits = count_bits(pVisual[i].greenMask); + modes->blueBits = count_bits(pVisual[i].blueMask); + modes->alphaBits = modes->alphaBits; + modes->redMask = pVisual[i].redMask; + modes->greenMask = pVisual[i].greenMask; + modes->blueMask = pVisual[i].blueMask; + modes->alphaMask = modes->alphaMask; + modes->rgbBits = (is_rgb) + ? (modes->redBits + modes->greenBits + + modes->blueBits + modes->alphaBits) + : rootDepth; + } + + /* Save the device-dependent private for this visual */ + glXVisualPriv[j] = pNewVisualPriv[k]; + + j++; + modes = modes->next; + } + } + + assert(j <= numNewVisuals); + + /* Save the GLX visuals in the screen structure */ + screenVisuals[screenInfo.numScreens-1].num_vis = numNewVisuals; + screenVisuals[screenInfo.numScreens-1].private = glXVisualPriv; + + /* Set up depth's VisualIDs */ + for (i = 0; i < ndepth; i++) { + int numVids = 0; + VisualID *pVids = NULL; + int k, n = 0; + + /* Count the new number of VisualIDs at this depth */ + for (j = 0; j < pdepth[i].numVids; j++) + for (k = 0; k < numNewVisuals; k++) + if (pdepth[i].vids[j] == orig_vid[k]) + numVids++; + + /* Allocate a new list of VisualIDs for this depth */ + pVids = (VisualID *)xalloc(numVids * sizeof(VisualID)); + + /* Initialize the new list of VisualIDs for this depth */ + for (j = 0; j < pdepth[i].numVids; j++) + for (k = 0; k < numNewVisuals; k++) + if (pdepth[i].vids[j] == orig_vid[k]) + pVids[n++] = pVisualNew[k].vid; + + /* Update this depth's list of VisualIDs */ + xfree(pdepth[i].vids); + pdepth[i].vids = pVids; + pdepth[i].numVids = numVids; + } + + /* Update the X server's visuals */ + *nvisualp = numNewVisuals; + *visualp = pVisualNew; + + /* Free the old list of the X server's visuals */ + xfree(pVisual); + + /* Clean up temporary allocations */ + xfree(orig_vid); + xfree(pNewVisualPriv); + xfree(pNewVisualConfigs); + + /* Free the private list created by DDX HW driver */ + if (visualPrivates) + xfree(visualPrivates); + visualPrivates = NULL; + + return TRUE; +} + +void GlxSetVisualConfigs(int nconfigs, + __GLXvisualConfig *configs, void **privates) +{ + numConfigs = nconfigs; + visualConfigs = configs; + visualPrivates = privates; +} + +static miInitVisualsProcPtr saveInitVisualsProc; + +Bool GlxInitVisuals(VisualPtr *visualp, DepthPtr *depthp, + int *nvisualp, int *ndepthp, + int *rootDepthp, VisualID *defaultVisp, + unsigned long sizes, int bitsPerRGB, + int preferredVis) +{ + Bool ret; + + if (saveInitVisualsProc) { + ret = saveInitVisualsProc(visualp, depthp, nvisualp, ndepthp, + rootDepthp, defaultVisp, sizes, bitsPerRGB, + preferredVis); + if (!ret) + return False; + } + + /* + * Setup the visuals supported by this particular screen. + */ + init_visuals(nvisualp, visualp, defaultVisp, + *ndepthp, *depthp, *rootDepthp); + + + return True; +} + + +/************************************************************************/ + + +void +GlxWrapInitVisuals(miInitVisualsProcPtr *initVisProc) +{ + saveInitVisualsProc = *initVisProc; + *initVisProc = GlxInitVisuals; +} + +static void fixup_visuals(int screen) +{ + ScreenPtr pScreen = screenInfo.screens[screen]; + ScreenVisuals *psv = &screenVisuals[screen]; + int j; + __GLcontextModes *modes; + + for ( modes = psv->modes ; modes != NULL ; modes = modes->next ) { + const int vis_class = _gl_convert_to_x_visual_type( modes->visualType ); + const int nplanes = (modes->rgbBits - modes->alphaBits); + const VisualPtr pVis = pScreen->visuals; + + /* Find a visual that matches the GLX visual's class and size */ + for (j = 0; j < pScreen->numVisuals; j++) { + if (pVis[j].class == vis_class && + pVis[j].nplanes == nplanes) { + + /* Fixup the masks */ + modes->redMask = pVis[j].redMask; + modes->greenMask = pVis[j].greenMask; + modes->blueMask = pVis[j].blueMask; + + /* Recalc the sizes */ + modes->redBits = count_bits(modes->redMask); + modes->greenBits = count_bits(modes->greenMask); + modes->blueBits = count_bits(modes->blueMask); + } + } + } +} + +void __glXScreenInitVisuals(__GLXscreen *screen) +{ + int index = screen->pScreen->myNum; + + screen->modes = screenVisuals[index].modes; + screen->pVisualPriv = screenVisuals[index].private; + screen->numVisuals = screenVisuals[index].num_vis; + screen->numUsableVisuals = screenVisuals[index].num_vis; + + /* + * The ordering of the rgb compenents might have been changed by the + * driver after mi initialized them. + */ + fixup_visuals(index); +} diff --git a/xorg-server-1.4/GL/glx/indirect_dispatch.c b/xorg-server-1.4/GL/glx/indirect_dispatch.c new file mode 100644 index 0000000..00a9f96 --- /dev/null +++ b/xorg-server-1.4/GL/glx/indirect_dispatch.c @@ -0,0 +1,5914 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * 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, sub license, + * 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 + * IBM, + * 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. + */ + +#include +#include +#include +#include +#include "indirect_size.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glxserver.h" +#include "glxbyteorder.h" +#include "indirect_util.h" +#include "singlesize.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + +#define __GLX_PAD(x) (((x) + 3) & ~3) + +typedef struct { + __GLX_PIXEL_3D_HDR; +} __GLXpixel3DHeader; + +extern GLboolean __glXErrorOccured( void ); +extern void __glXClearErrorOccured( void ); + +static const unsigned dummy_answer[2] = {0, 0}; + +int __glXDisp_NewList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_NewList( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +int __glXDisp_EndList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_EndList( GET_DISPATCH(), () ); + error = Success; + } + + return error; +} + +void __glXDisp_CallList(GLbyte * pc) +{ + CALL_CallList( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_CallLists(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + const GLenum type = *(GLenum *)(pc + 4); + const GLvoid * lists = (const GLvoid *)(pc + 8); + + lists = (const GLvoid *) (pc + 8); + + CALL_CallLists( GET_DISPATCH(), ( + n, + type, + lists + ) ); +} + +int __glXDisp_DeleteLists(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_DeleteLists( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + *(GLsizei *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +int __glXDisp_GenLists(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLuint retval; + retval = CALL_GenLists( GET_DISPATCH(), ( + *(GLsizei *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_ListBase(GLbyte * pc) +{ + CALL_ListBase( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_Begin(GLbyte * pc) +{ + CALL_Begin( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_Bitmap(GLbyte * pc) +{ + const GLubyte * const bitmap = (const GLubyte *) (pc + 44); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_Bitmap( GET_DISPATCH(), ( + *(GLsizei *)(pc + 20), + *(GLsizei *)(pc + 24), + *(GLfloat *)(pc + 28), + *(GLfloat *)(pc + 32), + *(GLfloat *)(pc + 36), + *(GLfloat *)(pc + 40), + bitmap + ) ); +} + +void __glXDisp_Color3bv(GLbyte * pc) +{ + CALL_Color3bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDisp_Color3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Color3dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Color3fv(GLbyte * pc) +{ + CALL_Color3fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Color3iv(GLbyte * pc) +{ + CALL_Color3iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Color3sv(GLbyte * pc) +{ + CALL_Color3sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Color3ubv(GLbyte * pc) +{ + CALL_Color3ubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDisp_Color3uiv(GLbyte * pc) +{ + CALL_Color3uiv( GET_DISPATCH(), ( + (const GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_Color3usv(GLbyte * pc) +{ + CALL_Color3usv( GET_DISPATCH(), ( + (const GLushort *)(pc + 0) + ) ); +} + +void __glXDisp_Color4bv(GLbyte * pc) +{ + CALL_Color4bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDisp_Color4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Color4dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Color4fv(GLbyte * pc) +{ + CALL_Color4fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Color4iv(GLbyte * pc) +{ + CALL_Color4iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Color4sv(GLbyte * pc) +{ + CALL_Color4sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Color4ubv(GLbyte * pc) +{ + CALL_Color4ubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDisp_Color4uiv(GLbyte * pc) +{ + CALL_Color4uiv( GET_DISPATCH(), ( + (const GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_Color4usv(GLbyte * pc) +{ + CALL_Color4usv( GET_DISPATCH(), ( + (const GLushort *)(pc + 0) + ) ); +} + +void __glXDisp_EdgeFlagv(GLbyte * pc) +{ + CALL_EdgeFlagv( GET_DISPATCH(), ( + (const GLboolean *)(pc + 0) + ) ); +} + +void __glXDisp_End(GLbyte * pc) +{ + CALL_End( GET_DISPATCH(), () ); +} + +void __glXDisp_Indexdv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_Indexdv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Indexfv(GLbyte * pc) +{ + CALL_Indexfv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Indexiv(GLbyte * pc) +{ + CALL_Indexiv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Indexsv(GLbyte * pc) +{ + CALL_Indexsv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Normal3bv(GLbyte * pc) +{ + CALL_Normal3bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDisp_Normal3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Normal3dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Normal3fv(GLbyte * pc) +{ + CALL_Normal3fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Normal3iv(GLbyte * pc) +{ + CALL_Normal3iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Normal3sv(GLbyte * pc) +{ + CALL_Normal3sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_RasterPos2dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos2fv(GLbyte * pc) +{ + CALL_RasterPos2fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos2iv(GLbyte * pc) +{ + CALL_RasterPos2iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos2sv(GLbyte * pc) +{ + CALL_RasterPos2sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_RasterPos3dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos3fv(GLbyte * pc) +{ + CALL_RasterPos3fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos3iv(GLbyte * pc) +{ + CALL_RasterPos3iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos3sv(GLbyte * pc) +{ + CALL_RasterPos3sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_RasterPos4dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos4fv(GLbyte * pc) +{ + CALL_RasterPos4fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos4iv(GLbyte * pc) +{ + CALL_RasterPos4iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos4sv(GLbyte * pc) +{ + CALL_RasterPos4sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Rectdv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Rectdv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0), + (const GLdouble *)(pc + 16) + ) ); +} + +void __glXDisp_Rectfv(GLbyte * pc) +{ + CALL_Rectfv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0), + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_Rectiv(GLbyte * pc) +{ + CALL_Rectiv( GET_DISPATCH(), ( + (const GLint *)(pc + 0), + (const GLint *)(pc + 8) + ) ); +} + +void __glXDisp_Rectsv(GLbyte * pc) +{ + CALL_Rectsv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_TexCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_TexCoord1dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord1fv(GLbyte * pc) +{ + CALL_TexCoord1fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord1iv(GLbyte * pc) +{ + CALL_TexCoord1iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord1sv(GLbyte * pc) +{ + CALL_TexCoord1sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_TexCoord2dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord2fv(GLbyte * pc) +{ + CALL_TexCoord2fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord2iv(GLbyte * pc) +{ + CALL_TexCoord2iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord2sv(GLbyte * pc) +{ + CALL_TexCoord2sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_TexCoord3dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord3fv(GLbyte * pc) +{ + CALL_TexCoord3fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord3iv(GLbyte * pc) +{ + CALL_TexCoord3iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord3sv(GLbyte * pc) +{ + CALL_TexCoord3sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_TexCoord4dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord4fv(GLbyte * pc) +{ + CALL_TexCoord4fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord4iv(GLbyte * pc) +{ + CALL_TexCoord4iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord4sv(GLbyte * pc) +{ + CALL_TexCoord4sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_Vertex2dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex2fv(GLbyte * pc) +{ + CALL_Vertex2fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex2iv(GLbyte * pc) +{ + CALL_Vertex2iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex2sv(GLbyte * pc) +{ + CALL_Vertex2sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Vertex3dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex3fv(GLbyte * pc) +{ + CALL_Vertex3fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex3iv(GLbyte * pc) +{ + CALL_Vertex3iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex3sv(GLbyte * pc) +{ + CALL_Vertex3sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Vertex4dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex4fv(GLbyte * pc) +{ + CALL_Vertex4fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex4iv(GLbyte * pc) +{ + CALL_Vertex4iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex4sv(GLbyte * pc) +{ + CALL_Vertex4sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_ClipPlane(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_ClipPlane( GET_DISPATCH(), ( + *(GLenum *)(pc + 32), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_ColorMaterial(GLbyte * pc) +{ + CALL_ColorMaterial( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); +} + +void __glXDisp_CullFace(GLbyte * pc) +{ + CALL_CullFace( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_Fogf(GLbyte * pc) +{ + CALL_Fogf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_Fogfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLfloat * params; + + params = (const GLfloat *) (pc + 4); + + CALL_Fogfv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_Fogi(GLbyte * pc) +{ + CALL_Fogi( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4) + ) ); +} + +void __glXDisp_Fogiv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLint * params; + + params = (const GLint *) (pc + 4); + + CALL_Fogiv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_FrontFace(GLbyte * pc) +{ + CALL_FrontFace( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_Hint(GLbyte * pc) +{ + CALL_Hint( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); +} + +void __glXDisp_Lightf(GLbyte * pc) +{ + CALL_Lightf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_Lightfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_Lightfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_Lighti(GLbyte * pc) +{ + CALL_Lighti( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_Lightiv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_Lightiv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_LightModelf(GLbyte * pc) +{ + CALL_LightModelf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_LightModelfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLfloat * params; + + params = (const GLfloat *) (pc + 4); + + CALL_LightModelfv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_LightModeli(GLbyte * pc) +{ + CALL_LightModeli( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4) + ) ); +} + +void __glXDisp_LightModeliv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLint * params; + + params = (const GLint *) (pc + 4); + + CALL_LightModeliv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_LineStipple(GLbyte * pc) +{ + CALL_LineStipple( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLushort *)(pc + 4) + ) ); +} + +void __glXDisp_LineWidth(GLbyte * pc) +{ + CALL_LineWidth( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Materialf(GLbyte * pc) +{ + CALL_Materialf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_Materialfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_Materialfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_Materiali(GLbyte * pc) +{ + CALL_Materiali( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_Materialiv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_Materialiv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_PointSize(GLbyte * pc) +{ + CALL_PointSize( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_PolygonMode(GLbyte * pc) +{ + CALL_PolygonMode( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); +} + +void __glXDisp_PolygonStipple(GLbyte * pc) +{ + const GLubyte * const mask = (const GLubyte *) (pc + 20); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_PolygonStipple( GET_DISPATCH(), ( + mask + ) ); +} + +void __glXDisp_Scissor(GLbyte * pc) +{ + CALL_Scissor( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLint *)(pc + 4), + *(GLsizei *)(pc + 8), + *(GLsizei *)(pc + 12) + ) ); +} + +void __glXDisp_ShadeModel(GLbyte * pc) +{ + CALL_ShadeModel( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_TexParameterf(GLbyte * pc) +{ + CALL_TexParameterf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_TexParameterfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_TexParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexParameteri(GLbyte * pc) +{ + CALL_TexParameteri( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_TexParameteriv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_TexParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexImage1D(GLbyte * pc) +{ + const GLvoid * const pixels = (const GLvoid *) (pc + 52); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_TexImage1D( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLint *)(pc + 24), + *(GLint *)(pc + 28), + *(GLsizei *)(pc + 32), + *(GLint *)(pc + 40), + *(GLenum *)(pc + 44), + *(GLenum *)(pc + 48), + pixels + ) ); +} + +void __glXDisp_TexImage2D(GLbyte * pc) +{ + const GLvoid * const pixels = (const GLvoid *) (pc + 52); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_TexImage2D( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLint *)(pc + 24), + *(GLint *)(pc + 28), + *(GLsizei *)(pc + 32), + *(GLsizei *)(pc + 36), + *(GLint *)(pc + 40), + *(GLenum *)(pc + 44), + *(GLenum *)(pc + 48), + pixels + ) ); +} + +void __glXDisp_TexEnvf(GLbyte * pc) +{ + CALL_TexEnvf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_TexEnvfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_TexEnvfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexEnvi(GLbyte * pc) +{ + CALL_TexEnvi( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_TexEnviv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_TexEnviv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexGend(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_TexGend( GET_DISPATCH(), ( + *(GLenum *)(pc + 8), + *(GLenum *)(pc + 12), + *(GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_TexGendv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLdouble * params; + +#ifdef __GLX_ALIGN64 + const GLuint compsize = __glTexGendv_size(pname); + const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + params = (const GLdouble *) (pc + 8); + + CALL_TexGendv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexGenf(GLbyte * pc) +{ + CALL_TexGenf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_TexGenfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_TexGenfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexGeni(GLbyte * pc) +{ + CALL_TexGeni( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_TexGeniv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_TexGeniv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_InitNames(GLbyte * pc) +{ + CALL_InitNames( GET_DISPATCH(), () ); +} + +void __glXDisp_LoadName(GLbyte * pc) +{ + CALL_LoadName( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_PassThrough(GLbyte * pc) +{ + CALL_PassThrough( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_PopName(GLbyte * pc) +{ + CALL_PopName( GET_DISPATCH(), () ); +} + +void __glXDisp_PushName(GLbyte * pc) +{ + CALL_PushName( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_DrawBuffer(GLbyte * pc) +{ + CALL_DrawBuffer( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_Clear(GLbyte * pc) +{ + CALL_Clear( GET_DISPATCH(), ( + *(GLbitfield *)(pc + 0) + ) ); +} + +void __glXDisp_ClearAccum(GLbyte * pc) +{ + CALL_ClearAccum( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8), + *(GLfloat *)(pc + 12) + ) ); +} + +void __glXDisp_ClearIndex(GLbyte * pc) +{ + CALL_ClearIndex( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_ClearColor(GLbyte * pc) +{ + CALL_ClearColor( GET_DISPATCH(), ( + *(GLclampf *)(pc + 0), + *(GLclampf *)(pc + 4), + *(GLclampf *)(pc + 8), + *(GLclampf *)(pc + 12) + ) ); +} + +void __glXDisp_ClearStencil(GLbyte * pc) +{ + CALL_ClearStencil( GET_DISPATCH(), ( + *(GLint *)(pc + 0) + ) ); +} + +void __glXDisp_ClearDepth(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_ClearDepth( GET_DISPATCH(), ( + *(GLclampd *)(pc + 0) + ) ); +} + +void __glXDisp_StencilMask(GLbyte * pc) +{ + CALL_StencilMask( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_ColorMask(GLbyte * pc) +{ + CALL_ColorMask( GET_DISPATCH(), ( + *(GLboolean *)(pc + 0), + *(GLboolean *)(pc + 1), + *(GLboolean *)(pc + 2), + *(GLboolean *)(pc + 3) + ) ); +} + +void __glXDisp_DepthMask(GLbyte * pc) +{ + CALL_DepthMask( GET_DISPATCH(), ( + *(GLboolean *)(pc + 0) + ) ); +} + +void __glXDisp_IndexMask(GLbyte * pc) +{ + CALL_IndexMask( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_Accum(GLbyte * pc) +{ + CALL_Accum( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_Disable(GLbyte * pc) +{ + CALL_Disable( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_Enable(GLbyte * pc) +{ + CALL_Enable( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_PopAttrib(GLbyte * pc) +{ + CALL_PopAttrib( GET_DISPATCH(), () ); +} + +void __glXDisp_PushAttrib(GLbyte * pc) +{ + CALL_PushAttrib( GET_DISPATCH(), ( + *(GLbitfield *)(pc + 0) + ) ); +} + +void __glXDisp_MapGrid1d(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_MapGrid1d( GET_DISPATCH(), ( + *(GLint *)(pc + 16), + *(GLdouble *)(pc + 0), + *(GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_MapGrid1f(GLbyte * pc) +{ + CALL_MapGrid1f( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_MapGrid2d(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_MapGrid2d( GET_DISPATCH(), ( + *(GLint *)(pc + 32), + *(GLdouble *)(pc + 0), + *(GLdouble *)(pc + 8), + *(GLint *)(pc + 36), + *(GLdouble *)(pc + 16), + *(GLdouble *)(pc + 24) + ) ); +} + +void __glXDisp_MapGrid2f(GLbyte * pc) +{ + CALL_MapGrid2f( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8), + *(GLint *)(pc + 12), + *(GLfloat *)(pc + 16), + *(GLfloat *)(pc + 20) + ) ); +} + +void __glXDisp_EvalCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_EvalCoord1dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_EvalCoord1fv(GLbyte * pc) +{ + CALL_EvalCoord1fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_EvalCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_EvalCoord2dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_EvalCoord2fv(GLbyte * pc) +{ + CALL_EvalCoord2fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_EvalMesh1(GLbyte * pc) +{ + CALL_EvalMesh1( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_EvalPoint1(GLbyte * pc) +{ + CALL_EvalPoint1( GET_DISPATCH(), ( + *(GLint *)(pc + 0) + ) ); +} + +void __glXDisp_EvalMesh2(GLbyte * pc) +{ + CALL_EvalMesh2( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16) + ) ); +} + +void __glXDisp_EvalPoint2(GLbyte * pc) +{ + CALL_EvalPoint2( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLint *)(pc + 4) + ) ); +} + +void __glXDisp_AlphaFunc(GLbyte * pc) +{ + CALL_AlphaFunc( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLclampf *)(pc + 4) + ) ); +} + +void __glXDisp_BlendFunc(GLbyte * pc) +{ + CALL_BlendFunc( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); +} + +void __glXDisp_LogicOp(GLbyte * pc) +{ + CALL_LogicOp( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_StencilFunc(GLbyte * pc) +{ + CALL_StencilFunc( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLuint *)(pc + 8) + ) ); +} + +void __glXDisp_StencilOp(GLbyte * pc) +{ + CALL_StencilOp( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8) + ) ); +} + +void __glXDisp_DepthFunc(GLbyte * pc) +{ + CALL_DepthFunc( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_PixelZoom(GLbyte * pc) +{ + CALL_PixelZoom( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_PixelTransferf(GLbyte * pc) +{ + CALL_PixelTransferf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_PixelTransferi(GLbyte * pc) +{ + CALL_PixelTransferi( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4) + ) ); +} + +int __glXDisp_PixelStoref(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_PixelStoref( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +int __glXDisp_PixelStorei(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_PixelStorei( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +void __glXDisp_PixelMapfv(GLbyte * pc) +{ + const GLsizei mapsize = *(GLsizei *)(pc + 4); + + CALL_PixelMapfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + mapsize, + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_PixelMapuiv(GLbyte * pc) +{ + const GLsizei mapsize = *(GLsizei *)(pc + 4); + + CALL_PixelMapuiv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + mapsize, + (const GLuint *)(pc + 8) + ) ); +} + +void __glXDisp_PixelMapusv(GLbyte * pc) +{ + const GLsizei mapsize = *(GLsizei *)(pc + 4); + + CALL_PixelMapusv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + mapsize, + (const GLushort *)(pc + 8) + ) ); +} + +void __glXDisp_ReadBuffer(GLbyte * pc) +{ + CALL_ReadBuffer( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_CopyPixels(GLbyte * pc) +{ + CALL_CopyPixels( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLint *)(pc + 4), + *(GLsizei *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLenum *)(pc + 16) + ) ); +} + +void __glXDisp_DrawPixels(GLbyte * pc) +{ + const GLvoid * const pixels = (const GLvoid *) (pc + 36); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_DrawPixels( GET_DISPATCH(), ( + *(GLsizei *)(pc + 20), + *(GLsizei *)(pc + 24), + *(GLenum *)(pc + 28), + *(GLenum *)(pc + 32), + pixels + ) ); +} + +int __glXDisp_GetBooleanv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 0); + + const GLuint compsize = __glGetBooleanv_size(pname); + GLboolean answerBuffer[200]; + GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetBooleanv( GET_DISPATCH(), ( + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 1, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetClipPlane(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLdouble equation[4]; + CALL_GetClipPlane( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + equation + ) ); + __glXSendReply(cl->client, equation, 4, 8, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetDoublev(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 0); + + const GLuint compsize = __glGetDoublev_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetDoublev( GET_DISPATCH(), ( + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetError(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLenum retval; + retval = CALL_GetError( GET_DISPATCH(), () ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDisp_GetFloatv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 0); + + const GLuint compsize = __glGetFloatv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetFloatv( GET_DISPATCH(), ( + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetIntegerv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 0); + + const GLuint compsize = __glGetIntegerv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetIntegerv( GET_DISPATCH(), ( + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetLightfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetLightfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetLightfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetLightiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetLightiv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetLightiv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMapdv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum target = *(GLenum *)(pc + 0); + const GLenum query = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMapdv_size(target,query); + GLdouble answerBuffer[200]; + GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapdv( GET_DISPATCH(), ( + target, + query, + v + ) ); + __glXSendReply(cl->client, v, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMapfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum target = *(GLenum *)(pc + 0); + const GLenum query = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMapfv_size(target,query); + GLfloat answerBuffer[200]; + GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapfv( GET_DISPATCH(), ( + target, + query, + v + ) ); + __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMapiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum target = *(GLenum *)(pc + 0); + const GLenum query = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMapiv_size(target,query); + GLint answerBuffer[200]; + GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapiv( GET_DISPATCH(), ( + target, + query, + v + ) ); + __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMaterialfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMaterialfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMaterialfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMaterialiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMaterialiv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMaterialiv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum map = *(GLenum *)(pc + 0); + + const GLuint compsize = __glGetPixelMapfv_size(map); + GLfloat answerBuffer[200]; + GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapfv( GET_DISPATCH(), ( + map, + values + ) ); + __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum map = *(GLenum *)(pc + 0); + + const GLuint compsize = __glGetPixelMapuiv_size(map); + GLuint answerBuffer[200]; + GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapuiv( GET_DISPATCH(), ( + map, + values + ) ); + __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum map = *(GLenum *)(pc + 0); + + const GLuint compsize = __glGetPixelMapusv_size(map); + GLushort answerBuffer[200]; + GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapusv( GET_DISPATCH(), ( + map, + values + ) ); + __glXSendReply(cl->client, values, compsize, 2, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetTexEnvfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexEnvfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexEnviv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetTexEnviv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexEnviv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexGendv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetTexGendv_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexGendv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexGenfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetTexGenfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexGenfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexGeniv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetTexGeniv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexGeniv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetTexParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetTexParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 8); + + const GLuint compsize = __glGetTexLevelParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexLevelParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 8); + + const GLuint compsize = __glGetTexLevelParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexLevelParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_IsEnabled(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsEnabled( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDisp_IsList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsList( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_DepthRange(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_DepthRange( GET_DISPATCH(), ( + *(GLclampd *)(pc + 0), + *(GLclampd *)(pc + 8) + ) ); +} + +void __glXDisp_Frustum(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 48); + pc -= 4; + } +#endif + + CALL_Frustum( GET_DISPATCH(), ( + *(GLdouble *)(pc + 0), + *(GLdouble *)(pc + 8), + *(GLdouble *)(pc + 16), + *(GLdouble *)(pc + 24), + *(GLdouble *)(pc + 32), + *(GLdouble *)(pc + 40) + ) ); +} + +void __glXDisp_LoadIdentity(GLbyte * pc) +{ + CALL_LoadIdentity( GET_DISPATCH(), () ); +} + +void __glXDisp_LoadMatrixf(GLbyte * pc) +{ + CALL_LoadMatrixf( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_LoadMatrixd(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 128); + pc -= 4; + } +#endif + + CALL_LoadMatrixd( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_MatrixMode(GLbyte * pc) +{ + CALL_MatrixMode( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_MultMatrixf(GLbyte * pc) +{ + CALL_MultMatrixf( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_MultMatrixd(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 128); + pc -= 4; + } +#endif + + CALL_MultMatrixd( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Ortho(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 48); + pc -= 4; + } +#endif + + CALL_Ortho( GET_DISPATCH(), ( + *(GLdouble *)(pc + 0), + *(GLdouble *)(pc + 8), + *(GLdouble *)(pc + 16), + *(GLdouble *)(pc + 24), + *(GLdouble *)(pc + 32), + *(GLdouble *)(pc + 40) + ) ); +} + +void __glXDisp_PopMatrix(GLbyte * pc) +{ + CALL_PopMatrix( GET_DISPATCH(), () ); +} + +void __glXDisp_PushMatrix(GLbyte * pc) +{ + CALL_PushMatrix( GET_DISPATCH(), () ); +} + +void __glXDisp_Rotated(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Rotated( GET_DISPATCH(), ( + *(GLdouble *)(pc + 0), + *(GLdouble *)(pc + 8), + *(GLdouble *)(pc + 16), + *(GLdouble *)(pc + 24) + ) ); +} + +void __glXDisp_Rotatef(GLbyte * pc) +{ + CALL_Rotatef( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8), + *(GLfloat *)(pc + 12) + ) ); +} + +void __glXDisp_Scaled(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Scaled( GET_DISPATCH(), ( + *(GLdouble *)(pc + 0), + *(GLdouble *)(pc + 8), + *(GLdouble *)(pc + 16) + ) ); +} + +void __glXDisp_Scalef(GLbyte * pc) +{ + CALL_Scalef( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_Translated(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Translated( GET_DISPATCH(), ( + *(GLdouble *)(pc + 0), + *(GLdouble *)(pc + 8), + *(GLdouble *)(pc + 16) + ) ); +} + +void __glXDisp_Translatef(GLbyte * pc) +{ + CALL_Translatef( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_Viewport(GLbyte * pc) +{ + CALL_Viewport( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLint *)(pc + 4), + *(GLsizei *)(pc + 8), + *(GLsizei *)(pc + 12) + ) ); +} + +void __glXDisp_BindTexture(GLbyte * pc) +{ + CALL_BindTexture( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_Indexubv(GLbyte * pc) +{ + CALL_Indexubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDisp_PolygonOffset(GLbyte * pc) +{ + CALL_PolygonOffset( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +int __glXDisp_AreTexturesResident(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = CALL_AreTexturesResident( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4), + residences + ) ); + __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +} + +int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = CALL_AreTexturesResident( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4), + residences + ) ); + __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_CopyTexImage1D(GLbyte * pc) +{ + CALL_CopyTexImage1D( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLsizei *)(pc + 20), + *(GLint *)(pc + 24) + ) ); +} + +void __glXDisp_CopyTexImage2D(GLbyte * pc) +{ + CALL_CopyTexImage2D( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLsizei *)(pc + 20), + *(GLsizei *)(pc + 24), + *(GLint *)(pc + 28) + ) ); +} + +void __glXDisp_CopyTexSubImage1D(GLbyte * pc) +{ + CALL_CopyTexSubImage1D( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLsizei *)(pc + 20) + ) ); +} + +void __glXDisp_CopyTexSubImage2D(GLbyte * pc) +{ + CALL_CopyTexSubImage2D( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLint *)(pc + 20), + *(GLsizei *)(pc + 24), + *(GLsizei *)(pc + 28) + ) ); +} + +int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteTextures( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteTextures( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +int __glXDisp_GenTextures(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenTextures( GET_DISPATCH(), ( + n, + textures + ) ); + __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenTextures( GET_DISPATCH(), ( + n, + textures + ) ); + __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsTexture( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsTexture( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_PrioritizeTextures(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_PrioritizeTextures( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4), + (const GLclampf *)(pc + 4) + ) ); +} + +void __glXDisp_TexSubImage1D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_TexSubImage1D( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLint *)(pc + 24), + *(GLint *)(pc + 28), + *(GLsizei *)(pc + 36), + *(GLenum *)(pc + 44), + *(GLenum *)(pc + 48), + pixels + ) ); +} + +void __glXDisp_TexSubImage2D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_TexSubImage2D( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLint *)(pc + 24), + *(GLint *)(pc + 28), + *(GLint *)(pc + 32), + *(GLsizei *)(pc + 36), + *(GLsizei *)(pc + 40), + *(GLenum *)(pc + 44), + *(GLenum *)(pc + 48), + pixels + ) ); +} + +void __glXDisp_BlendColor(GLbyte * pc) +{ + CALL_BlendColor( GET_DISPATCH(), ( + *(GLclampf *)(pc + 0), + *(GLclampf *)(pc + 4), + *(GLclampf *)(pc + 8), + *(GLclampf *)(pc + 12) + ) ); +} + +void __glXDisp_BlendEquation(GLbyte * pc) +{ + CALL_BlendEquation( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_ColorTable(GLbyte * pc) +{ + const GLvoid * const table = (const GLvoid *) (pc + 40); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_ColorTable( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLenum *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLenum *)(pc + 32), + *(GLenum *)(pc + 36), + table + ) ); +} + +void __glXDisp_ColorTableParameterfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_ColorTableParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_ColorTableParameteriv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_ColorTableParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_CopyColorTable(GLbyte * pc) +{ + CALL_CopyColorTable( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16) + ) ); +} + +int __glXDisp_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetColorTableParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetColorTableParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetColorTableParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetColorTableParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDisp_ColorSubTable(GLbyte * pc) +{ + const GLvoid * const data = (const GLvoid *) (pc + 40); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_ColorSubTable( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLsizei *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLenum *)(pc + 32), + *(GLenum *)(pc + 36), + data + ) ); +} + +void __glXDisp_CopyColorSubTable(GLbyte * pc) +{ + CALL_CopyColorSubTable( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLsizei *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16) + ) ); +} + +void __glXDisp_ConvolutionFilter1D(GLbyte * pc) +{ + const GLvoid * const image = (const GLvoid *) (pc + 44); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_ConvolutionFilter1D( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLenum *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLenum *)(pc + 36), + *(GLenum *)(pc + 40), + image + ) ); +} + +void __glXDisp_ConvolutionFilter2D(GLbyte * pc) +{ + const GLvoid * const image = (const GLvoid *) (pc + 44); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_ConvolutionFilter2D( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLenum *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLsizei *)(pc + 32), + *(GLenum *)(pc + 36), + *(GLenum *)(pc + 40), + image + ) ); +} + +void __glXDisp_ConvolutionParameterf(GLbyte * pc) +{ + CALL_ConvolutionParameterf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_ConvolutionParameterfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_ConvolutionParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_ConvolutionParameteri(GLbyte * pc) +{ + CALL_ConvolutionParameteri( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_ConvolutionParameteriv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_ConvolutionParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc) +{ + CALL_CopyConvolutionFilter1D( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16) + ) ); +} + +void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc) +{ + CALL_CopyConvolutionFilter2D( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16), + *(GLsizei *)(pc + 20) + ) ); +} + +int __glXDisp_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetConvolutionParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetConvolutionParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetConvolutionParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetConvolutionParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetHistogramParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetHistogramParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetHistogramParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetHistogramParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMinmaxParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMinmaxParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMinmaxParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMinmaxParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDisp_Histogram(GLbyte * pc) +{ + CALL_Histogram( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLsizei *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLboolean *)(pc + 12) + ) ); +} + +void __glXDisp_Minmax(GLbyte * pc) +{ + CALL_Minmax( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLboolean *)(pc + 8) + ) ); +} + +void __glXDisp_ResetHistogram(GLbyte * pc) +{ + CALL_ResetHistogram( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_ResetMinmax(GLbyte * pc) +{ + CALL_ResetMinmax( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_TexImage3D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 76); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80); + __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_TexImage3D( GET_DISPATCH(), ( + *(GLenum *)(pc + 36), + *(GLint *)(pc + 40), + *(GLint *)(pc + 44), + *(GLsizei *)(pc + 48), + *(GLsizei *)(pc + 52), + *(GLsizei *)(pc + 56), + *(GLint *)(pc + 64), + *(GLenum *)(pc + 68), + *(GLenum *)(pc + 72), + pixels + ) ); +} + +void __glXDisp_TexSubImage3D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 84); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 88); + __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_TexSubImage3D( GET_DISPATCH(), ( + *(GLenum *)(pc + 36), + *(GLint *)(pc + 40), + *(GLint *)(pc + 44), + *(GLint *)(pc + 48), + *(GLint *)(pc + 52), + *(GLsizei *)(pc + 60), + *(GLsizei *)(pc + 64), + *(GLsizei *)(pc + 68), + *(GLenum *)(pc + 76), + *(GLenum *)(pc + 80), + pixels + ) ); +} + +void __glXDisp_CopyTexSubImage3D(GLbyte * pc) +{ + CALL_CopyTexSubImage3D( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLint *)(pc + 20), + *(GLint *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLsizei *)(pc + 32) + ) ); +} + +void __glXDisp_ActiveTextureARB(GLbyte * pc) +{ + CALL_ActiveTextureARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_MultiTexCoord1dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_MultiTexCoord1dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 8), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord1fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord1ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord1ivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord1svARB(GLbyte * pc) +{ + CALL_MultiTexCoord1svARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord2dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_MultiTexCoord2dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 16), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord2fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord2ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord2ivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord2svARB(GLbyte * pc) +{ + CALL_MultiTexCoord2svARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord3dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_MultiTexCoord3dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 24), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord3fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord3ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord3ivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord3svARB(GLbyte * pc) +{ + CALL_MultiTexCoord3svARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_MultiTexCoord4dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 32), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord4fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord4ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord4ivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord4svARB(GLbyte * pc) +{ + CALL_MultiTexCoord4svARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_SampleCoverageARB(GLbyte * pc) +{ + CALL_SampleCoverageARB( GET_DISPATCH(), ( + *(GLclampf *)(pc + 0), + *(GLboolean *)(pc + 4) + ) ); +} + +void __glXDisp_CompressedTexImage1DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 20); + + CALL_CompressedTexImage1DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLint *)(pc + 16), + imageSize, + (const GLvoid *)(pc + 24) + ) ); +} + +void __glXDisp_CompressedTexImage2DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 24); + + CALL_CompressedTexImage2DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLsizei *)(pc + 16), + *(GLint *)(pc + 20), + imageSize, + (const GLvoid *)(pc + 28) + ) ); +} + +void __glXDisp_CompressedTexImage3DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 28); + + CALL_CompressedTexImage3DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLsizei *)(pc + 16), + *(GLsizei *)(pc + 20), + *(GLint *)(pc + 24), + imageSize, + (const GLvoid *)(pc + 32) + ) ); +} + +void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 20); + + CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLenum *)(pc + 16), + imageSize, + (const GLvoid *)(pc + 24) + ) ); +} + +void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 28); + + CALL_CompressedTexSubImage2DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16), + *(GLsizei *)(pc + 20), + *(GLenum *)(pc + 24), + imageSize, + (const GLvoid *)(pc + 32) + ) ); +} + +void __glXDisp_CompressedTexSubImage3DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 36); + + CALL_CompressedTexSubImage3DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLsizei *)(pc + 20), + *(GLsizei *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLenum *)(pc + 32), + imageSize, + (const GLvoid *)(pc + 40) + ) ); +} + +int __glXDisp_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLdouble params[4]; + CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLfloat params[4]; + CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLdouble params[4]; + CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLfloat params[4]; + CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetProgramivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetProgramivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetVertexAttribdvARB_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribdvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetVertexAttribfvARB_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribfvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetVertexAttribivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc) +{ + CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc) +{ + CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_ProgramStringARB(GLbyte * pc) +{ + const GLsizei len = *(GLsizei *)(pc + 8); + + CALL_ProgramStringARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + len, + (const GLvoid *)(pc + 12) + ) ); +} + +void __glXDisp_VertexAttrib1dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_VertexAttrib1dvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib1fvARB(GLbyte * pc) +{ + CALL_VertexAttrib1fvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib1svARB(GLbyte * pc) +{ + CALL_VertexAttrib1svARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_VertexAttrib2dvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2fvARB(GLbyte * pc) +{ + CALL_VertexAttrib2fvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2svARB(GLbyte * pc) +{ + CALL_VertexAttrib2svARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_VertexAttrib3dvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3fvARB(GLbyte * pc) +{ + CALL_VertexAttrib3fvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3svARB(GLbyte * pc) +{ + CALL_VertexAttrib3svARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NbvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NbvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLbyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NivARB(GLbyte * pc) +{ + CALL_VertexAttrib4NivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NsvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NsvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NubvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc) +{ + CALL_VertexAttrib4NuivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NusvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLushort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4bvARB(GLbyte * pc) +{ + CALL_VertexAttrib4bvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLbyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_VertexAttrib4dvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4fvARB(GLbyte * pc) +{ + CALL_VertexAttrib4fvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4ivARB(GLbyte * pc) +{ + CALL_VertexAttrib4ivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4svARB(GLbyte * pc) +{ + CALL_VertexAttrib4svARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc) +{ + CALL_VertexAttrib4ubvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4uivARB(GLbyte * pc) +{ + CALL_VertexAttrib4uivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4usvARB(GLbyte * pc) +{ + CALL_VertexAttrib4usvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLushort *)(pc + 4) + ) ); +} + +void __glXDisp_BeginQueryARB(GLbyte * pc) +{ + CALL_BeginQueryARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4) + ) ); +} + +int __glXDisp_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteQueriesARB( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +void __glXDisp_EndQueryARB(GLbyte * pc) +{ + CALL_EndQueryARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +int __glXDisp_GenQueriesARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenQueriesARB( GET_DISPATCH(), ( + n, + ids + ) ); + __glXSendReply(cl->client, ids, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetQueryObjectivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryObjectivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetQueryObjectuivARB_size(pname); + GLuint answerBuffer[200]; + GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryObjectuivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetQueryivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetQueryivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_IsQueryARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsQueryARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_DrawBuffersARB(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DrawBuffersARB( GET_DISPATCH(), ( + n, + (const GLenum *)(pc + 4) + ) ); +} + +void __glXDisp_SampleMaskSGIS(GLbyte * pc) +{ + CALL_SampleMaskSGIS( GET_DISPATCH(), ( + *(GLclampf *)(pc + 0), + *(GLboolean *)(pc + 4) + ) ); +} + +void __glXDisp_SamplePatternSGIS(GLbyte * pc) +{ + CALL_SamplePatternSGIS( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_PointParameterfEXT(GLbyte * pc) +{ + CALL_PointParameterfEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_PointParameterfvEXT(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLfloat * params; + + params = (const GLfloat *) (pc + 4); + + CALL_PointParameterfvEXT( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_SecondaryColor3bvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3bvEXT( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3dvEXT(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_SecondaryColor3dvEXT( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3fvEXT( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc) +{ + CALL_SecondaryColor3ivEXT( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3svEXT(GLbyte * pc) +{ + CALL_SecondaryColor3svEXT( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3ubvEXT( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc) +{ + CALL_SecondaryColor3uivEXT( GET_DISPATCH(), ( + (const GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3usvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3usvEXT( GET_DISPATCH(), ( + (const GLushort *)(pc + 0) + ) ); +} + +void __glXDisp_FogCoorddvEXT(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_FogCoorddvEXT( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_FogCoordfvEXT(GLbyte * pc) +{ + CALL_FogCoordfvEXT( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc) +{ + CALL_BlendFuncSeparateEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLenum *)(pc + 12) + ) ); +} + +void __glXDisp_WindowPos3fvMESA(GLbyte * pc) +{ + CALL_WindowPos3fvMESA( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +int __glXDisp_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = CALL_AreProgramsResidentNV( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4), + residences + ) ); + __glXSendReply(cl->client, residences, n, 1, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_BindProgramNV(GLbyte * pc) +{ + CALL_BindProgramNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4) + ) ); +} + +int __glXDisp_DeleteProgramsNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteProgramsNV( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +void __glXDisp_ExecuteProgramNV(GLbyte * pc) +{ + CALL_ExecuteProgramNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLfloat *)(pc + 8) + ) ); +} + +int __glXDisp_GenProgramsNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenProgramsNV( GET_DISPATCH(), ( + n, + programs + ) ); + __glXSendReply(cl->client, programs, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramParameterdvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLdouble params[4]; + CALL_GetProgramParameterdvNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + *(GLenum *)(pc + 8), + params + ) ); + __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramParameterfvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLfloat params[4]; + CALL_GetProgramParameterfvNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + *(GLenum *)(pc + 8), + params + ) ); + __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramivNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetProgramivNV_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetProgramivNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLint params[1]; + CALL_GetTrackMatrixivNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + *(GLenum *)(pc + 8), + params + ) ); + __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetVertexAttribdvNV_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribdvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetVertexAttribfvNV_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribfvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetVertexAttribivNV_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribivNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_IsProgramNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsProgramNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_LoadProgramNV(GLbyte * pc) +{ + const GLsizei len = *(GLsizei *)(pc + 8); + + CALL_LoadProgramNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + len, + (const GLubyte *)(pc + 12) + ) ); +} + +void __glXDisp_ProgramParameter4dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_ProgramParameter4dvNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_ProgramParameter4fvNV(GLbyte * pc) +{ + CALL_ProgramParameter4fvNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_ProgramParameters4dvNV(GLbyte * pc) +{ + const GLuint num = *(GLuint *)(pc + 8); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_ProgramParameters4dvNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + num, + (const GLdouble *)(pc + 12) + ) ); +} + +void __glXDisp_ProgramParameters4fvNV(GLbyte * pc) +{ + const GLuint num = *(GLuint *)(pc + 8); + + CALL_ProgramParameters4fvNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + num, + (const GLfloat *)(pc + 12) + ) ); +} + +void __glXDisp_RequestResidentProgramsNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_RequestResidentProgramsNV( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_TrackMatrixNV(GLbyte * pc) +{ + CALL_TrackMatrixNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLenum *)(pc + 12) + ) ); +} + +void __glXDisp_VertexAttrib1dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_VertexAttrib1dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib1fvNV(GLbyte * pc) +{ + CALL_VertexAttrib1fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib1svNV(GLbyte * pc) +{ + CALL_VertexAttrib1svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_VertexAttrib2dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2fvNV(GLbyte * pc) +{ + CALL_VertexAttrib2fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2svNV(GLbyte * pc) +{ + CALL_VertexAttrib2svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_VertexAttrib3dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3fvNV(GLbyte * pc) +{ + CALL_VertexAttrib3fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3svNV(GLbyte * pc) +{ + CALL_VertexAttrib3svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_VertexAttrib4dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4fvNV(GLbyte * pc) +{ + CALL_VertexAttrib4fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4svNV(GLbyte * pc) +{ + CALL_VertexAttrib4svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc) +{ + CALL_VertexAttrib4ubvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttribs1dvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_VertexAttribs1dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs1fvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs1fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs1svNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs1svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLshort *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs2dvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_VertexAttribs2dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs2fvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs2fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs2svNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs2svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLshort *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs3dvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_VertexAttribs3dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs3fvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs3fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs3svNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs3svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLshort *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs4dvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_VertexAttribs4dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs4fvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs4fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs4svNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs4svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLshort *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs4ubvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLubyte *)(pc + 8) + ) ); +} + +void __glXDisp_PointParameteriNV(GLbyte * pc) +{ + CALL_PointParameteriNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4) + ) ); +} + +void __glXDisp_PointParameterivNV(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLint * params; + + params = (const GLint *) (pc + 4); + + CALL_PointParameterivNV( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc) +{ + CALL_ActiveStencilFaceEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +int __glXDisp_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei len = *(GLsizei *)(pc + 4); + + GLdouble params[4]; + CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + len, + (const GLubyte *)(pc + 8), + params + ) ); + __glXSendReply(cl->client, params, 4, 8, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei len = *(GLsizei *)(pc + 4); + + GLfloat params[4]; + CALL_GetProgramNamedParameterfvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + len, + (const GLubyte *)(pc + 8), + params + ) ); + __glXSendReply(cl->client, params, 4, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc) +{ + const GLsizei len = *(GLsizei *)(pc + 36); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 44 + __GLX_PAD(len) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 32), + len, + (const GLubyte *)(pc + 40), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc) +{ + const GLsizei len = *(GLsizei *)(pc + 4); + + CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + len, + (const GLubyte *)(pc + 24), + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_BlendEquationSeparateEXT(GLbyte * pc) +{ + CALL_BlendEquationSeparateEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); +} + +void __glXDisp_BindFramebufferEXT(GLbyte * pc) +{ + CALL_BindFramebufferEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_BindRenderbufferEXT(GLbyte * pc) +{ + CALL_BindRenderbufferEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4) + ) ); +} + +int __glXDisp_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLenum retval; + retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteFramebuffersEXT( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteRenderbuffersEXT( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc) +{ + CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLuint *)(pc + 12) + ) ); +} + +void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture1DEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLuint *)(pc + 12), + *(GLint *)(pc + 16) + ) ); +} + +void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture2DEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLuint *)(pc + 12), + *(GLint *)(pc + 16) + ) ); +} + +void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture3DEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLuint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLint *)(pc + 20) + ) ); +} + +int __glXDisp_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenFramebuffersEXT( GET_DISPATCH(), ( + n, + framebuffers + ) ); + __glXSendReply(cl->client, framebuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenRenderbuffersEXT( GET_DISPATCH(), ( + n, + renderbuffers + ) ); + __glXSendReply(cl->client, renderbuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +void __glXDisp_GenerateMipmapEXT(GLbyte * pc) +{ + CALL_GenerateMipmapEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +int __glXDisp_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLint params[1]; + CALL_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + params + ) ); + __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetRenderbufferParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLint params[1]; + CALL_GetRenderbufferParameterivEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_IsFramebufferEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsFramebufferEXT( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDisp_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsRenderbufferEXT( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_RenderbufferStorageEXT(GLbyte * pc) +{ + CALL_RenderbufferStorageEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLsizei *)(pc + 8), + *(GLsizei *)(pc + 12) + ) ); +} + diff --git a/xorg-server-1.4/GL/glx/indirect_dispatch.h b/xorg-server-1.4/GL/glx/indirect_dispatch.h new file mode 100644 index 0000000..24f4bed --- /dev/null +++ b/xorg-server-1.4/GL/glx/indirect_dispatch.h @@ -0,0 +1,1045 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * 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, sub license, + * 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 + * IBM, + * 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. + */ + +#if !defined( _INDIRECT_DISPATCH_H_ ) +# define _INDIRECT_DISPATCH_H_ + +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) +# define HIDDEN __attribute__((visibility("hidden"))) +# else +# define HIDDEN +# endif +struct __GLXclientStateRec; + +extern HIDDEN void __glXDisp_MapGrid1d(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MapGrid1d(GLbyte * pc); +extern HIDDEN void __glXDisp_MapGrid1f(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MapGrid1f(GLbyte * pc); +extern HIDDEN int __glXDisp_NewList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_NewList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LoadIdentity(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LoadIdentity(GLbyte * pc); +extern HIDDEN void __glXDisp_SampleCoverageARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SampleCoverageARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ConvolutionFilter1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc); +extern HIDDEN void __glXDisp_BeginQueryARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BeginQueryARB(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos3dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos3dv(GLbyte * pc); +extern HIDDEN void __glXDisp_PointParameteriNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PointParameteriNV(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord1iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord1iv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord4sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord4sv(GLbyte * pc); +extern HIDDEN void __glXDisp_ActiveTextureARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ActiveTextureARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Histogram(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Histogram(GLbyte * pc); +extern HIDDEN int __glXDisp_GetMapfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMapfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_RasterPos4dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos4dv(GLbyte * pc); +extern HIDDEN void __glXDisp_PolygonStipple(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PolygonStipple(GLbyte * pc); +extern HIDDEN void __glXDisp_BlendEquationSeparateEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BlendEquationSeparateEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Color3uiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3uiv(GLbyte * pc); +extern HIDDEN int __glXDisp_IsEnabled(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsEnabled(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib4svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc); +extern HIDDEN void __glXDisp_EvalCoord2fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalCoord2fv(GLbyte * pc); +extern HIDDEN int __glXDisp_DestroyPixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DestroyPixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMapiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMapiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_SwapBuffers(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_SwapBuffers(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Indexubv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Indexubv(GLbyte * pc); +extern HIDDEN int __glXDisp_Render(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_Render(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetQueryivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetQueryivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexImage3D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexImage3D(GLbyte * pc); +extern HIDDEN int __glXDisp_MakeContextCurrent(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_MakeContextCurrent(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetFBConfigs(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetFBConfigs(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Color3ubv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3ubv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetQueryObjectivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetQueryObjectivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Vertex3dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex3dv(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc); +extern HIDDEN void __glXDisp_LightModeliv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LightModeliv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib1svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs1dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Normal3bv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Normal3bv(GLbyte * pc); +extern HIDDEN int __glXDisp_VendorPrivate(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_VendorPrivate(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib1fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex3iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex3iv(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc); +extern HIDDEN void __glXDisp_BlendColor(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BlendColor(GLbyte * pc); +extern HIDDEN void __glXDisp_Scalef(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Scalef(GLbyte * pc); +extern HIDDEN void __glXDisp_Normal3iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Normal3iv(GLbyte * pc); +extern HIDDEN void __glXDisp_PassThrough(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PassThrough(GLbyte * pc); +extern HIDDEN void __glXDisp_Viewport(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Viewport(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyTexSubImage2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc); +extern HIDDEN void __glXDisp_DepthRange(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DepthRange(GLbyte * pc); +extern HIDDEN void __glXDisp_ResetHistogram(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ResetHistogram(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_PointParameterfEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PointParameterfEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramParameter4dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramParameter4dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord2sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord2sv(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex4dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex4dv(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexImage3DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexImage3DARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3sv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Vertex2dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex2dv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord3iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord3iv(GLbyte * pc); +extern HIDDEN int __glXDisp_CopyContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CopyContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Color3fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3fv(GLbyte * pc); +extern HIDDEN void __glXDisp_PointSize(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PointSize(GLbyte * pc); +extern HIDDEN void __glXDisp_PopName(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PopName(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NbvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NbvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex4sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex4sv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LineStipple(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LineStipple(GLbyte * pc); +extern HIDDEN void __glXDisp_TexEnvi(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexEnvi(GLbyte * pc); +extern HIDDEN int __glXDisp_GetClipPlane(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetClipPlane(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttribs3dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_LightModeli(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LightModeli(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs4fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Scaled(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Scaled(GLbyte * pc); +extern HIDDEN void __glXDisp_CallLists(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CallLists(GLbyte * pc); +extern HIDDEN void __glXDisp_AlphaFunc(GLbyte * pc); +extern HIDDEN void __glXDispSwap_AlphaFunc(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord2iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord2iv(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexImage1DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc); +extern HIDDEN int __glXDisp_ReadPixels(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_ReadPixels(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_EdgeFlagv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EdgeFlagv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexParameterf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexParameterf(GLbyte * pc); +extern HIDDEN void __glXDisp_TexParameteri(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexParameteri(GLbyte * pc); +extern HIDDEN int __glXDisp_DestroyContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DestroyContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_DrawPixels(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DrawPixels(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord2svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord2svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs3fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_GenerateMipmapEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GenLists(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenLists(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_MapGrid2d(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MapGrid2d(GLbyte * pc); +extern HIDDEN void __glXDisp_MapGrid2f(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MapGrid2f(GLbyte * pc); +extern HIDDEN void __glXDisp_Scissor(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Scissor(GLbyte * pc); +extern HIDDEN void __glXDisp_Fogf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Fogf(GLbyte * pc); +extern HIDDEN void __glXDisp_TexSubImage1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexSubImage1D(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4usv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4usv(GLbyte * pc); +extern HIDDEN void __glXDisp_Fogi(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Fogi(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos3iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos3iv(GLbyte * pc); +extern HIDDEN void __glXDisp_PixelMapfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelMapfv(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3usv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3usv(GLbyte * pc); +extern HIDDEN int __glXDisp_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_PointParameterfvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PointParameterfvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3bv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3bv(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3bvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3bvEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramLocalParameterfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramLocalParameterfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_RenderbufferStorageEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_ColorTable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorTable(GLbyte * pc); +extern HIDDEN void __glXDisp_Accum(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Accum(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexImage(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexImage(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ConvolutionFilter2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc); +extern HIDDEN int __glXDisp_Finish(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_Finish(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ClearStencil(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClearStencil(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib3dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_ConvolutionParameteriv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos2fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos2fv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord1fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord1fv(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos4fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos4fv(GLbyte * pc); +extern HIDDEN void __glXDisp_ClearIndex(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClearIndex(GLbyte * pc); +extern HIDDEN void __glXDisp_LoadMatrixd(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LoadMatrixd(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos2dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos2dv(GLbyte * pc); +extern HIDDEN void __glXDisp_ConvolutionParameterfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexGendv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexGendv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LoadProgramNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LoadProgramNV(GLbyte * pc); +extern HIDDEN int __glXDisp_EndList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_EndList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib4fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_EvalCoord1fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalCoord1fv(GLbyte * pc); +extern HIDDEN void __glXDisp_EvalMesh2(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalMesh2(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex4fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex4fv(GLbyte * pc); +extern HIDDEN int __glXDisp_CheckFramebufferStatusEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CheckFramebufferStatusEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetVertexAttribivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetFBConfigsSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetFBConfigsSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_CreateNewContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateNewContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMinmax(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMinmax(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Normal3fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Normal3fv(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4ivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4ivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_End(GLbyte * pc); +extern HIDDEN void __glXDispSwap_End(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs2dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_BindTexture(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BindTexture(GLbyte * pc); +extern HIDDEN void __glXDisp_TexSubImage2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexSubImage2D(GLbyte * pc); +extern HIDDEN void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_TexGenfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGenfv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4bvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_CreateContextWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateContextWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_CopySubBufferMESA(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CopySubBufferMESA(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_BlendEquation(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BlendEquation(GLbyte * pc); +extern HIDDEN int __glXDisp_GetError(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetError(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexCoord3dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord3dv(GLbyte * pc); +extern HIDDEN void __glXDisp_Indexdv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Indexdv(GLbyte * pc); +extern HIDDEN void __glXDisp_PushName(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PushName(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord2dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord1svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord1svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_EndQueryARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EndQueryARB(GLbyte * pc); +extern HIDDEN void __glXDisp_DepthMask(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DepthMask(GLbyte * pc); +extern HIDDEN void __glXDisp_Rotated(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rotated(GLbyte * pc); +extern HIDDEN int __glXDisp_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_StencilOp(GLbyte * pc); +extern HIDDEN void __glXDispSwap_StencilOp(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord3svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_TexEnvfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexEnvfv(GLbyte * pc); +extern HIDDEN int __glXDisp_QueryServerString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_QueryServerString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LoadMatrixf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LoadMatrixf(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4bv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4bv(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3usvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3usvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib2fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_DeleteLists(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DeleteLists(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LogicOp(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LogicOp(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord4fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord4fv(GLbyte * pc); +extern HIDDEN int __glXDisp_WaitX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_WaitX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib1dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GenTextures(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenTextures(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ProgramParameter4fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramParameter4fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos2sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos2sv(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4ubv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4ubv(GLbyte * pc); +extern HIDDEN void __glXDisp_DrawBuffer(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DrawBuffer(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord2fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord2fv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord1sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord1sv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexGeniv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGeniv(GLbyte * pc); +extern HIDDEN void __glXDisp_DepthFunc(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DepthFunc(GLbyte * pc); +extern HIDDEN void __glXDisp_PixelMapusv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelMapusv(GLbyte * pc); +extern HIDDEN void __glXDisp_PointParameterivNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PointParameterivNV(GLbyte * pc); +extern HIDDEN void __glXDisp_BlendFunc(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BlendFunc(GLbyte * pc); +extern HIDDEN int __glXDisp_WaitGL(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_WaitGL(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_MultiTexCoord3dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_Flush(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_Flush(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Color4uiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4uiv(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos3sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos3sv(GLbyte * pc); +extern HIDDEN void __glXDisp_BindFramebufferEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BindFramebufferEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_PushAttrib(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PushAttrib(GLbyte * pc); +extern HIDDEN int __glXDisp_DestroyPbuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DestroyPbuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexParameteriv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexParameteriv(GLbyte * pc); +extern HIDDEN void __glXDisp_WindowPos3fvMESA(GLbyte * pc); +extern HIDDEN void __glXDispSwap_WindowPos3fvMESA(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib1svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc); +extern HIDDEN int __glXDisp_QueryExtensionsString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_QueryExtensionsString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_RasterPos3fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos3fv(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyTexSubImage3D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc); +extern HIDDEN int __glXDisp_GetColorTable(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetColorTable(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Indexiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Indexiv(GLbyte * pc); +extern HIDDEN int __glXDisp_CreateContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_CopyColorTable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyColorTable(GLbyte * pc); +extern HIDDEN int __glXDisp_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Frustum(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Frustum(GLbyte * pc); +extern HIDDEN int __glXDisp_GetString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_CreateGLXPixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateGLXPixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexEnvf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexEnvf(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_MultiTexCoord3ivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib1dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_DeleteTextures(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DeleteTextures(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ClearAccum(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClearAccum(GLbyte * pc); +extern HIDDEN int __glXDisp_QueryVersion(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_QueryVersion(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetVertexAttribfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord4iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord4iv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_SampleMaskSGIS(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SampleMaskSGIS(GLbyte * pc); +extern HIDDEN void __glXDisp_ColorTableParameteriv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorTableParameteriv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyTexImage2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyTexImage2D(GLbyte * pc); +extern HIDDEN void __glXDisp_Lightfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Lightfv(GLbyte * pc); +extern HIDDEN void __glXDisp_ClearDepth(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClearDepth(GLbyte * pc); +extern HIDDEN void __glXDisp_ColorSubTable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorSubTable(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4fv(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord4ivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc); +extern HIDDEN int __glXDisp_CreatePixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreatePixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Lightiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Lightiv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetQueryObjectuivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetQueryObjectuivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetTexParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GenRenderbuffersEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenRenderbuffersEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib2dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs2svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Rectdv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rectdv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Materialiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Materialiv(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_PolygonMode(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PolygonMode(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib2dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_IsQueryARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsQueryARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexGeni(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGeni(GLbyte * pc); +extern HIDDEN void __glXDisp_TexGenf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGenf(GLbyte * pc); +extern HIDDEN void __glXDisp_TexGend(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGend(GLbyte * pc); +extern HIDDEN int __glXDisp_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib2svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs1fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc); +extern HIDDEN int __glXDisp_DestroyWindow(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DestroyWindow(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Color4sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4sv(GLbyte * pc); +extern HIDDEN int __glXDisp_IsProgramNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsProgramNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_PixelZoom(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelZoom(GLbyte * pc); +extern HIDDEN void __glXDisp_ColorTableParameterfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorTableParameterfv(GLbyte * pc); +extern HIDDEN void __glXDisp_PixelMapuiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelMapuiv(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3dv(GLbyte * pc); +extern HIDDEN int __glXDisp_IsTexture(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsTexture(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMapdv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMapdv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_DestroyGLXPixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DestroyGLXPixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_SamplePatternSGIS(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SamplePatternSGIS(GLbyte * pc); +extern HIDDEN int __glXDisp_PixelStoref(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_PixelStoref(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_PrioritizeTextures(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PrioritizeTextures(GLbyte * pc); +extern HIDDEN int __glXDisp_PixelStorei(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_PixelStorei(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib4usvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4iv(GLbyte * pc); +extern HIDDEN void __glXDisp_EvalCoord2dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalCoord2dv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib3svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ColorMaterial(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorMaterial(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexSubImage3DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexSubImage3DARB(GLbyte * pc); +extern HIDDEN int __glXDisp_IsFramebufferEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsFramebufferEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_RequestResidentProgramsNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc); +extern HIDDEN int __glXDisp_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_RasterPos2iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos2iv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexImage1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexImage1D(GLbyte * pc); +extern HIDDEN void __glXDisp_FrontFace(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FrontFace(GLbyte * pc); +extern HIDDEN int __glXDisp_RenderLarge(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_RenderLarge(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib4dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_PolygonOffset(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PolygonOffset(GLbyte * pc); +extern HIDDEN void __glXDisp_ExecuteProgramNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ExecuteProgramNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Normal3dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Normal3dv(GLbyte * pc); +extern HIDDEN void __glXDisp_Lightf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Lightf(GLbyte * pc); +extern HIDDEN void __glXDisp_MatrixMode(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MatrixMode(GLbyte * pc); +extern HIDDEN void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Lighti(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Lighti(GLbyte * pc); +extern HIDDEN int __glXDisp_GetFramebufferAttachmentParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_MultiTexCoord4dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_CreatePbuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreatePbuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetDoublev(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetDoublev(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_MultMatrixd(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultMatrixd(GLbyte * pc); +extern HIDDEN void __glXDisp_MultMatrixf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultMatrixf(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_TrackMatrixNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TrackMatrixNV(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos4sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos4sv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NsvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NsvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib3fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ClearColor(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClearColor(GLbyte * pc); +extern HIDDEN int __glXDisp_IsDirect(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsDirect(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_TexEnviv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexEnviv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexSubImage3D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexSubImage3D(GLbyte * pc); +extern HIDDEN int __glXDisp_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Bitmap(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Bitmap(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GenFramebuffersEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenFramebuffersEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetProgramParameterdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramParameterdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Vertex2sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex2sv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetIntegerv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetIntegerv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetProgramEnvParameterfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramEnvParameterfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetTrackMatrixivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTrackMatrixivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib3svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_VendorPrivateWithReply(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_VendorPrivateWithReply(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_SeparableFilter2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SeparableFilter2D(GLbyte * pc); +extern HIDDEN void __glXDisp_Map1d(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Map1d(GLbyte * pc); +extern HIDDEN void __glXDisp_Map1f(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Map1f(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexImage2DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexImage2DARB(GLbyte * pc); +extern HIDDEN void __glXDisp_TexImage2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexImage2D(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramParameters4fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_PixelTransferf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelTransferf(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyTexImage1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyTexImage1D(GLbyte * pc); +extern HIDDEN void __glXDisp_PushMatrix(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PushMatrix(GLbyte * pc); +extern HIDDEN void __glXDisp_Fogiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Fogiv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord1dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord1dv(GLbyte * pc); +extern HIDDEN void __glXDisp_PixelTransferi(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelTransferi(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib3fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Clear(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Clear(GLbyte * pc); +extern HIDDEN void __glXDisp_ReadBuffer(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ReadBuffer(GLbyte * pc); +extern HIDDEN void __glXDisp_ConvolutionParameteri(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionParameteri(GLbyte * pc); +extern HIDDEN void __glXDisp_Ortho(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Ortho(GLbyte * pc); +extern HIDDEN void __glXDisp_ListBase(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ListBase(GLbyte * pc); +extern HIDDEN void __glXDisp_ConvolutionParameterf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionParameterf(GLbyte * pc); +extern HIDDEN int __glXDisp_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_CallList(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CallList(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs2fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Rectiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rectiv(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3dvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3dvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex2fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex2fv(GLbyte * pc); +extern HIDDEN void __glXDisp_BindRenderbufferEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex3sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex3sv(GLbyte * pc); +extern HIDDEN int __glXDisp_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_EvalMesh1(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalMesh1(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord1dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex2iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex2iv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramStringNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramStringNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LineWidth(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LineWidth(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib2fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_TexGendv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGendv(GLbyte * pc); +extern HIDDEN void __glXDisp_ResetMinmax(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ResetMinmax(GLbyte * pc); +extern HIDDEN int __glXDisp_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttribs4dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_UseXFont(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_UseXFont(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ShadeModel(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ShadeModel(GLbyte * pc); +extern HIDDEN void __glXDisp_Materialfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Materialfv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord3fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord3fv(GLbyte * pc); +extern HIDDEN void __glXDisp_FogCoordfvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FogCoordfvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord1ivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord2ivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_DrawArrays(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DrawArrays(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3iv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Rotatef(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rotatef(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BlendFuncSeparateEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramParameters4dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_EvalPoint2(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalPoint2(GLbyte * pc); +extern HIDDEN void __glXDisp_EvalPoint1(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalPoint1(GLbyte * pc); +extern HIDDEN void __glXDisp_PopMatrix(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PopMatrix(GLbyte * pc); +extern HIDDEN int __glXDisp_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_MakeCurrent(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_MakeCurrent(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Map2d(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Map2d(GLbyte * pc); +extern HIDDEN void __glXDisp_Map2f(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Map2f(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramStringARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramStringARB(GLbyte * pc); +extern HIDDEN int __glXDisp_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetHistogram(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetHistogram(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_Materialf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Materialf(GLbyte * pc); +extern HIDDEN void __glXDisp_Materiali(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Materiali(GLbyte * pc); +extern HIDDEN void __glXDisp_Indexsv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Indexsv(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord4svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord4svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_LightModelfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LightModelfv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord2dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord2dv(GLbyte * pc); +extern HIDDEN int __glXDisp_GenQueriesARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenQueriesARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_EvalCoord1dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalCoord1dv(GLbyte * pc); +extern HIDDEN void __glXDisp_Translated(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Translated(GLbyte * pc); +extern HIDDEN void __glXDisp_Translatef(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Translatef(GLbyte * pc); +extern HIDDEN void __glXDisp_StencilMask(GLbyte * pc); +extern HIDDEN void __glXDispSwap_StencilMask(GLbyte * pc); +extern HIDDEN int __glXDisp_CreateWindow(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateWindow(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetLightiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetLightiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_IsList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_RenderMode(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_RenderMode(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_DrawBuffersARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DrawBuffersARB(GLbyte * pc); +extern HIDDEN void __glXDisp_LoadName(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LoadName(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyTexSubImage1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc); +extern HIDDEN void __glXDisp_CullFace(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CullFace(GLbyte * pc); +extern HIDDEN int __glXDisp_QueryContextInfoEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_QueryContextInfoEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttribs3svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc); +extern HIDDEN void __glXDisp_StencilFunc(GLbyte * pc); +extern HIDDEN void __glXDispSwap_StencilFunc(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyPixels(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyPixels(GLbyte * pc); +extern HIDDEN void __glXDisp_Rectsv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rectsv(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc); +extern HIDDEN void __glXDisp_TexParameterfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexParameterfv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4uivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ClipPlane(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClipPlane(GLbyte * pc); +extern HIDDEN int __glXDisp_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Indexfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Indexfv(GLbyte * pc); +extern HIDDEN int __glXDisp_QueryContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_QueryContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_SecondaryColor3svEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_IndexMask(GLbyte * pc); +extern HIDDEN void __glXDispSwap_IndexMask(GLbyte * pc); +extern HIDDEN void __glXDisp_BindProgramNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BindProgramNV(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4svARB(GLbyte * pc); +extern HIDDEN int __glXDisp_GetFloatv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetFloatv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexCoord3sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord3sv(GLbyte * pc); +extern HIDDEN void __glXDisp_PopAttrib(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PopAttrib(GLbyte * pc); +extern HIDDEN void __glXDisp_Fogfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Fogfv(GLbyte * pc); +extern HIDDEN void __glXDisp_InitNames(GLbyte * pc); +extern HIDDEN void __glXDispSwap_InitNames(GLbyte * pc); +extern HIDDEN void __glXDisp_Normal3sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Normal3sv(GLbyte * pc); +extern HIDDEN void __glXDisp_Minmax(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Minmax(GLbyte * pc); +extern HIDDEN void __glXDisp_FogCoorddvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FogCoorddvEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GetBooleanv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetBooleanv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Hint(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Hint(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4dv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib2svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2svARB(GLbyte * pc); +extern HIDDEN int __glXDisp_AreProgramsResidentNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_AreProgramsResidentNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_CopyColorSubTable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyColorSubTable(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib3dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex4iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex4iv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramEnvParameterdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramEnvParameterdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexCoord4dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord4dv(GLbyte * pc); +extern HIDDEN void __glXDisp_Begin(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Begin(GLbyte * pc); +extern HIDDEN int __glXDisp_ClientInfo(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_ClientInfo(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Rectfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rectfv(GLbyte * pc); +extern HIDDEN void __glXDisp_LightModelf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LightModelf(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetLightfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetLightfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Disable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Disable(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_GetRenderbufferParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetRenderbufferParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_SelectBuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_SelectBuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ColorMask(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorMask(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos4iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos4iv(GLbyte * pc); +extern HIDDEN void __glXDisp_Enable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Enable(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs4svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib1fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs1svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex3fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex3fv(GLbyte * pc); +extern HIDDEN int __glXDisp_GenProgramsNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenProgramsNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib4dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc); + +# undef HIDDEN + +#endif /* !defined( _INDIRECT_DISPATCH_H_ ) */ diff --git a/xorg-server-1.4/GL/glx/indirect_dispatch_swap.c b/xorg-server-1.4/GL/glx/indirect_dispatch_swap.c new file mode 100644 index 0000000..c0bb71c --- /dev/null +++ b/xorg-server-1.4/GL/glx/indirect_dispatch_swap.c @@ -0,0 +1,6076 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * 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, sub license, + * 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 + * IBM, + * 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. + */ + +#include +#include +#include +#include +#include "indirect_size.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glxserver.h" +#include "glxbyteorder.h" +#include "indirect_util.h" +#include "singlesize.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + +#define __GLX_PAD(x) (((x) + 3) & ~3) + +typedef struct { + __GLX_PIXEL_3D_HDR; +} __GLXpixel3DHeader; + +extern GLboolean __glXErrorOccured( void ); +extern void __glXClearErrorOccured( void ); + +static const unsigned dummy_answer[2] = {0, 0}; + +static GLsizei +bswap_CARD32( const void * src ) +{ + union { uint32_t dst; GLsizei ret; } x; + x.dst = bswap_32( *(uint32_t *) src ); + return x.ret; +} + +static GLshort +bswap_CARD16( const void * src ) +{ + union { uint16_t dst; GLshort ret; } x; + x.dst = bswap_16( *(uint16_t *) src ); + return x.ret; +} + +static GLenum +bswap_ENUM( const void * src ) +{ + union { uint32_t dst; GLenum ret; } x; + x.dst = bswap_32( *(uint32_t *) src ); + return x.ret; +} + +static GLdouble +bswap_FLOAT64( const void * src ) +{ + union { uint64_t dst; GLdouble ret; } x; + x.dst = bswap_64( *(uint64_t *) src ); + return x.ret; +} + +static GLfloat +bswap_FLOAT32( const void * src ) +{ + union { uint32_t dst; GLfloat ret; } x; + x.dst = bswap_32( *(uint32_t *) src ); + return x.ret; +} + +static void * +bswap_16_array( uint16_t * src, unsigned count ) +{ + unsigned i; + + for ( i = 0 ; i < count ; i++ ) { + uint16_t temp = bswap_16( src[i] ); + src[i] = temp; + } + + return src; +} + +static void * +bswap_32_array( uint32_t * src, unsigned count ) +{ + unsigned i; + + for ( i = 0 ; i < count ; i++ ) { + uint32_t temp = bswap_32( src[i] ); + src[i] = temp; + } + + return src; +} + +static void * +bswap_64_array( uint64_t * src, unsigned count ) +{ + unsigned i; + + for ( i = 0 ; i < count ; i++ ) { + uint64_t temp = bswap_64( src[i] ); + src[i] = temp; + } + + return src; +} + +int __glXDispSwap_NewList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_NewList( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); + error = Success; + } + + return error; +} + +int __glXDispSwap_EndList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_EndList( GET_DISPATCH(), () ); + error = Success; + } + + return error; +} + +void __glXDispSwap_CallList(GLbyte * pc) +{ + CALL_CallList( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_CallLists(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + const GLenum type = (GLenum )bswap_ENUM ( pc + 4 ); + const GLvoid * lists; + + switch(type) { + case GL_BYTE: + case GL_UNSIGNED_BYTE: + case GL_2_BYTES: + case GL_3_BYTES: + case GL_4_BYTES: + lists = (const GLvoid *) (pc + 8); break; + case GL_SHORT: + case GL_UNSIGNED_SHORT: + lists = (const GLvoid *) bswap_16_array( (uint16_t *) (pc + 8), n ); break; + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + lists = (const GLvoid *) bswap_32_array( (uint32_t *) (pc + 8), n ); break; + default: + return; + } + + CALL_CallLists( GET_DISPATCH(), ( + n, + type, + lists + ) ); +} + +int __glXDispSwap_DeleteLists(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_DeleteLists( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (GLsizei )bswap_CARD32 ( pc + 4 ) + ) ); + error = Success; + } + + return error; +} + +int __glXDispSwap_GenLists(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLuint retval; + retval = CALL_GenLists( GET_DISPATCH(), ( + (GLsizei )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_ListBase(GLbyte * pc) +{ + CALL_ListBase( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Begin(GLbyte * pc) +{ + CALL_Begin( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Bitmap(GLbyte * pc) +{ + const GLubyte * const bitmap = (const GLubyte *) (pc + 44); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_Bitmap( GET_DISPATCH(), ( + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLsizei )bswap_CARD32 ( pc + 24 ), + (GLfloat )bswap_FLOAT32( pc + 28 ), + (GLfloat )bswap_FLOAT32( pc + 32 ), + (GLfloat )bswap_FLOAT32( pc + 36 ), + (GLfloat )bswap_FLOAT32( pc + 40 ), + bitmap + ) ); +} + +void __glXDispSwap_Color3bv(GLbyte * pc) +{ + CALL_Color3bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_Color3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Color3dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color3fv(GLbyte * pc) +{ + CALL_Color3fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color3iv(GLbyte * pc) +{ + CALL_Color3iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color3sv(GLbyte * pc) +{ + CALL_Color3sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color3ubv(GLbyte * pc) +{ + CALL_Color3ubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_Color3uiv(GLbyte * pc) +{ + CALL_Color3uiv( GET_DISPATCH(), ( + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color3usv(GLbyte * pc) +{ + CALL_Color3usv( GET_DISPATCH(), ( + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color4bv(GLbyte * pc) +{ + CALL_Color4bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_Color4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Color4dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Color4fv(GLbyte * pc) +{ + CALL_Color4fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Color4iv(GLbyte * pc) +{ + CALL_Color4iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Color4sv(GLbyte * pc) +{ + CALL_Color4sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Color4ubv(GLbyte * pc) +{ + CALL_Color4ubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_Color4uiv(GLbyte * pc) +{ + CALL_Color4uiv( GET_DISPATCH(), ( + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Color4usv(GLbyte * pc) +{ + CALL_Color4usv( GET_DISPATCH(), ( + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_EdgeFlagv(GLbyte * pc) +{ + CALL_EdgeFlagv( GET_DISPATCH(), ( + (const GLboolean *)(pc + 0) + ) ); +} + +void __glXDispSwap_End(GLbyte * pc) +{ + CALL_End( GET_DISPATCH(), () ); +} + +void __glXDispSwap_Indexdv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_Indexdv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_Indexfv(GLbyte * pc) +{ + CALL_Indexfv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_Indexiv(GLbyte * pc) +{ + CALL_Indexiv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_Indexsv(GLbyte * pc) +{ + CALL_Indexsv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_Normal3bv(GLbyte * pc) +{ + CALL_Normal3bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_Normal3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Normal3dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Normal3fv(GLbyte * pc) +{ + CALL_Normal3fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Normal3iv(GLbyte * pc) +{ + CALL_Normal3iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Normal3sv(GLbyte * pc) +{ + CALL_Normal3sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_RasterPos2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_RasterPos2dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_RasterPos2fv(GLbyte * pc) +{ + CALL_RasterPos2fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_RasterPos2iv(GLbyte * pc) +{ + CALL_RasterPos2iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_RasterPos2sv(GLbyte * pc) +{ + CALL_RasterPos2sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_RasterPos3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_RasterPos3dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_RasterPos3fv(GLbyte * pc) +{ + CALL_RasterPos3fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_RasterPos3iv(GLbyte * pc) +{ + CALL_RasterPos3iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_RasterPos3sv(GLbyte * pc) +{ + CALL_RasterPos3sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_RasterPos4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_RasterPos4dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_RasterPos4fv(GLbyte * pc) +{ + CALL_RasterPos4fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_RasterPos4iv(GLbyte * pc) +{ + CALL_RasterPos4iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_RasterPos4sv(GLbyte * pc) +{ + CALL_RasterPos4sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Rectdv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Rectdv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 16), 2 ) + ) ); +} + +void __glXDispSwap_Rectfv(GLbyte * pc) +{ + CALL_Rectfv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 2 ) + ) ); +} + +void __glXDispSwap_Rectiv(GLbyte * pc) +{ + CALL_Rectiv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 8), 2 ) + ) ); +} + +void __glXDispSwap_Rectsv(GLbyte * pc) +{ + CALL_Rectsv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_TexCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_TexCoord1dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_TexCoord1fv(GLbyte * pc) +{ + CALL_TexCoord1fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_TexCoord1iv(GLbyte * pc) +{ + CALL_TexCoord1iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_TexCoord1sv(GLbyte * pc) +{ + CALL_TexCoord1sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_TexCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_TexCoord2dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_TexCoord2fv(GLbyte * pc) +{ + CALL_TexCoord2fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_TexCoord2iv(GLbyte * pc) +{ + CALL_TexCoord2iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_TexCoord2sv(GLbyte * pc) +{ + CALL_TexCoord2sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_TexCoord3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_TexCoord3dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_TexCoord3fv(GLbyte * pc) +{ + CALL_TexCoord3fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_TexCoord3iv(GLbyte * pc) +{ + CALL_TexCoord3iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_TexCoord3sv(GLbyte * pc) +{ + CALL_TexCoord3sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_TexCoord4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_TexCoord4dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_TexCoord4fv(GLbyte * pc) +{ + CALL_TexCoord4fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_TexCoord4iv(GLbyte * pc) +{ + CALL_TexCoord4iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_TexCoord4sv(GLbyte * pc) +{ + CALL_TexCoord4sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Vertex2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_Vertex2dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_Vertex2fv(GLbyte * pc) +{ + CALL_Vertex2fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_Vertex2iv(GLbyte * pc) +{ + CALL_Vertex2iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_Vertex2sv(GLbyte * pc) +{ + CALL_Vertex2sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_Vertex3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Vertex3dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Vertex3fv(GLbyte * pc) +{ + CALL_Vertex3fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Vertex3iv(GLbyte * pc) +{ + CALL_Vertex3iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Vertex3sv(GLbyte * pc) +{ + CALL_Vertex3sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Vertex4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Vertex4dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Vertex4fv(GLbyte * pc) +{ + CALL_Vertex4fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Vertex4iv(GLbyte * pc) +{ + CALL_Vertex4iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Vertex4sv(GLbyte * pc) +{ + CALL_Vertex4sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_ClipPlane(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_ClipPlane( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 32 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_ColorMaterial(GLbyte * pc) +{ + CALL_ColorMaterial( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); +} + +void __glXDispSwap_CullFace(GLbyte * pc) +{ + CALL_CullFace( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Fogf(GLbyte * pc) +{ + CALL_Fogf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_Fogfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glFogfv_size(pname) ); + + CALL_Fogfv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_Fogi(GLbyte * pc) +{ + CALL_Fogi( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_Fogiv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glFogiv_size(pname) ); + + CALL_Fogiv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_FrontFace(GLbyte * pc) +{ + CALL_FrontFace( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Hint(GLbyte * pc) +{ + CALL_Hint( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); +} + +void __glXDispSwap_Lightf(GLbyte * pc) +{ + CALL_Lightf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_Lightfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glLightfv_size(pname) ); + + CALL_Lightfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_Lighti(GLbyte * pc) +{ + CALL_Lighti( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_Lightiv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glLightiv_size(pname) ); + + CALL_Lightiv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_LightModelf(GLbyte * pc) +{ + CALL_LightModelf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_LightModelfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModelfv_size(pname) ); + + CALL_LightModelfv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_LightModeli(GLbyte * pc) +{ + CALL_LightModeli( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_LightModeliv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModeliv_size(pname) ); + + CALL_LightModeliv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_LineStipple(GLbyte * pc) +{ + CALL_LineStipple( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLushort)bswap_CARD16 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_LineWidth(GLbyte * pc) +{ + CALL_LineWidth( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ) + ) ); +} + +void __glXDispSwap_Materialf(GLbyte * pc) +{ + CALL_Materialf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_Materialfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialfv_size(pname) ); + + CALL_Materialfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_Materiali(GLbyte * pc) +{ + CALL_Materiali( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_Materialiv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialiv_size(pname) ); + + CALL_Materialiv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_PointSize(GLbyte * pc) +{ + CALL_PointSize( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ) + ) ); +} + +void __glXDispSwap_PolygonMode(GLbyte * pc) +{ + CALL_PolygonMode( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); +} + +void __glXDispSwap_PolygonStipple(GLbyte * pc) +{ + const GLubyte * const mask = (const GLubyte *) (pc + 20); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_PolygonStipple( GET_DISPATCH(), ( + mask + ) ); +} + +void __glXDispSwap_Scissor(GLbyte * pc) +{ + CALL_Scissor( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLsizei )bswap_CARD32 ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ) + ) ); +} + +void __glXDispSwap_ShadeModel(GLbyte * pc) +{ + CALL_ShadeModel( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_TexParameterf(GLbyte * pc) +{ + CALL_TexParameterf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexParameterfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameterfv_size(pname) ); + + CALL_TexParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexParameteri(GLbyte * pc) +{ + CALL_TexParameteri( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexParameteriv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameteriv_size(pname) ); + + CALL_TexParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexImage1D(GLbyte * pc) +{ + const GLvoid * const pixels = (const GLvoid *) (pc + 52); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_TexImage1D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 20 ), + (GLint )bswap_CARD32 ( pc + 24 ), + (GLint )bswap_CARD32 ( pc + 28 ), + (GLsizei )bswap_CARD32 ( pc + 32 ), + (GLint )bswap_CARD32 ( pc + 40 ), + (GLenum )bswap_ENUM ( pc + 44 ), + (GLenum )bswap_ENUM ( pc + 48 ), + pixels + ) ); +} + +void __glXDispSwap_TexImage2D(GLbyte * pc) +{ + const GLvoid * const pixels = (const GLvoid *) (pc + 52); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_TexImage2D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 20 ), + (GLint )bswap_CARD32 ( pc + 24 ), + (GLint )bswap_CARD32 ( pc + 28 ), + (GLsizei )bswap_CARD32 ( pc + 32 ), + (GLsizei )bswap_CARD32 ( pc + 36 ), + (GLint )bswap_CARD32 ( pc + 40 ), + (GLenum )bswap_ENUM ( pc + 44 ), + (GLenum )bswap_ENUM ( pc + 48 ), + pixels + ) ); +} + +void __glXDispSwap_TexEnvf(GLbyte * pc) +{ + CALL_TexEnvf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexEnvfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnvfv_size(pname) ); + + CALL_TexEnvfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexEnvi(GLbyte * pc) +{ + CALL_TexEnvi( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexEnviv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnviv_size(pname) ); + + CALL_TexEnviv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexGend(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_TexGend( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 8 ), + (GLenum )bswap_ENUM ( pc + 12 ), + (GLdouble)bswap_FLOAT64( pc + 0 ) + ) ); +} + +void __glXDispSwap_TexGendv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLdouble * params; + +#ifdef __GLX_ALIGN64 + const GLuint compsize = __glTexGendv_size(pname); + const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + params = (const GLdouble *) bswap_64_array( (uint64_t *) (pc + 8), __glTexGendv_size(pname) ); + + CALL_TexGendv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexGenf(GLbyte * pc) +{ + CALL_TexGenf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexGenfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGenfv_size(pname) ); + + CALL_TexGenfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexGeni(GLbyte * pc) +{ + CALL_TexGeni( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexGeniv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGeniv_size(pname) ); + + CALL_TexGeniv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_InitNames(GLbyte * pc) +{ + CALL_InitNames( GET_DISPATCH(), () ); +} + +void __glXDispSwap_LoadName(GLbyte * pc) +{ + CALL_LoadName( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_PassThrough(GLbyte * pc) +{ + CALL_PassThrough( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ) + ) ); +} + +void __glXDispSwap_PopName(GLbyte * pc) +{ + CALL_PopName( GET_DISPATCH(), () ); +} + +void __glXDispSwap_PushName(GLbyte * pc) +{ + CALL_PushName( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_DrawBuffer(GLbyte * pc) +{ + CALL_DrawBuffer( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Clear(GLbyte * pc) +{ + CALL_Clear( GET_DISPATCH(), ( + (GLbitfield)bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_ClearAccum(GLbyte * pc) +{ + CALL_ClearAccum( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ), + (GLfloat )bswap_FLOAT32( pc + 12 ) + ) ); +} + +void __glXDispSwap_ClearIndex(GLbyte * pc) +{ + CALL_ClearIndex( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ) + ) ); +} + +void __glXDispSwap_ClearColor(GLbyte * pc) +{ + CALL_ClearColor( GET_DISPATCH(), ( + (GLclampf)bswap_FLOAT32( pc + 0 ), + (GLclampf)bswap_FLOAT32( pc + 4 ), + (GLclampf)bswap_FLOAT32( pc + 8 ), + (GLclampf)bswap_FLOAT32( pc + 12 ) + ) ); +} + +void __glXDispSwap_ClearStencil(GLbyte * pc) +{ + CALL_ClearStencil( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_ClearDepth(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_ClearDepth( GET_DISPATCH(), ( + (GLclampd)bswap_FLOAT64( pc + 0 ) + ) ); +} + +void __glXDispSwap_StencilMask(GLbyte * pc) +{ + CALL_StencilMask( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_ColorMask(GLbyte * pc) +{ + CALL_ColorMask( GET_DISPATCH(), ( + *(GLboolean *)(pc + 0), + *(GLboolean *)(pc + 1), + *(GLboolean *)(pc + 2), + *(GLboolean *)(pc + 3) + ) ); +} + +void __glXDispSwap_DepthMask(GLbyte * pc) +{ + CALL_DepthMask( GET_DISPATCH(), ( + *(GLboolean *)(pc + 0) + ) ); +} + +void __glXDispSwap_IndexMask(GLbyte * pc) +{ + CALL_IndexMask( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Accum(GLbyte * pc) +{ + CALL_Accum( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_Disable(GLbyte * pc) +{ + CALL_Disable( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Enable(GLbyte * pc) +{ + CALL_Enable( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_PopAttrib(GLbyte * pc) +{ + CALL_PopAttrib( GET_DISPATCH(), () ); +} + +void __glXDispSwap_PushAttrib(GLbyte * pc) +{ + CALL_PushAttrib( GET_DISPATCH(), ( + (GLbitfield)bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_MapGrid1d(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_MapGrid1d( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 16 ), + (GLdouble)bswap_FLOAT64( pc + 0 ), + (GLdouble)bswap_FLOAT64( pc + 8 ) + ) ); +} + +void __glXDispSwap_MapGrid1f(GLbyte * pc) +{ + CALL_MapGrid1f( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_MapGrid2d(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_MapGrid2d( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 32 ), + (GLdouble)bswap_FLOAT64( pc + 0 ), + (GLdouble)bswap_FLOAT64( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 36 ), + (GLdouble)bswap_FLOAT64( pc + 16 ), + (GLdouble)bswap_FLOAT64( pc + 24 ) + ) ); +} + +void __glXDispSwap_MapGrid2f(GLbyte * pc) +{ + CALL_MapGrid2f( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLfloat )bswap_FLOAT32( pc + 16 ), + (GLfloat )bswap_FLOAT32( pc + 20 ) + ) ); +} + +void __glXDispSwap_EvalCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_EvalCoord1dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_EvalCoord1fv(GLbyte * pc) +{ + CALL_EvalCoord1fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_EvalCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_EvalCoord2dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_EvalCoord2fv(GLbyte * pc) +{ + CALL_EvalCoord2fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_EvalMesh1(GLbyte * pc) +{ + CALL_EvalMesh1( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_EvalPoint1(GLbyte * pc) +{ + CALL_EvalPoint1( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_EvalMesh2(GLbyte * pc) +{ + CALL_EvalMesh2( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ) + ) ); +} + +void __glXDispSwap_EvalPoint2(GLbyte * pc) +{ + CALL_EvalPoint2( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_AlphaFunc(GLbyte * pc) +{ + CALL_AlphaFunc( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLclampf)bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_BlendFunc(GLbyte * pc) +{ + CALL_BlendFunc( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); +} + +void __glXDispSwap_LogicOp(GLbyte * pc) +{ + CALL_LogicOp( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_StencilFunc(GLbyte * pc) +{ + CALL_StencilFunc( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLuint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_StencilOp(GLbyte * pc) +{ + CALL_StencilOp( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ) + ) ); +} + +void __glXDispSwap_DepthFunc(GLbyte * pc) +{ + CALL_DepthFunc( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_PixelZoom(GLbyte * pc) +{ + CALL_PixelZoom( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_PixelTransferf(GLbyte * pc) +{ + CALL_PixelTransferf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_PixelTransferi(GLbyte * pc) +{ + CALL_PixelTransferi( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +int __glXDispSwap_PixelStoref(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_PixelStoref( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); + error = Success; + } + + return error; +} + +int __glXDispSwap_PixelStorei(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_PixelStorei( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); + error = Success; + } + + return error; +} + +void __glXDispSwap_PixelMapfv(GLbyte * pc) +{ + const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_PixelMapfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + mapsize, + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_PixelMapuiv(GLbyte * pc) +{ + const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_PixelMapuiv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + mapsize, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_PixelMapusv(GLbyte * pc) +{ + const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_PixelMapusv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + mapsize, + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_ReadBuffer(GLbyte * pc) +{ + CALL_ReadBuffer( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_CopyPixels(GLbyte * pc) +{ + CALL_CopyPixels( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLsizei )bswap_CARD32 ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ), + (GLenum )bswap_ENUM ( pc + 16 ) + ) ); +} + +void __glXDispSwap_DrawPixels(GLbyte * pc) +{ + const GLvoid * const pixels = (const GLvoid *) (pc + 36); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_DrawPixels( GET_DISPATCH(), ( + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLsizei )bswap_CARD32 ( pc + 24 ), + (GLenum )bswap_ENUM ( pc + 28 ), + (GLenum )bswap_ENUM ( pc + 32 ), + pixels + ) ); +} + +int __glXDispSwap_GetBooleanv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + + const GLuint compsize = __glGetBooleanv_size(pname); + GLboolean answerBuffer[200]; + GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetBooleanv( GET_DISPATCH(), ( + pname, + params + ) ); + __glXSendReplySwap(cl->client, params, compsize, 1, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetClipPlane(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLdouble equation[4]; + CALL_GetClipPlane( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + equation + ) ); + (void) bswap_64_array( (uint64_t *) equation, 4 ); + __glXSendReplySwap(cl->client, equation, 4, 8, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetDoublev(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + + const GLuint compsize = __glGetDoublev_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetDoublev( GET_DISPATCH(), ( + pname, + params + ) ); + (void) bswap_64_array( (uint64_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetError(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLenum retval; + retval = CALL_GetError( GET_DISPATCH(), () ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetFloatv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + + const GLuint compsize = __glGetFloatv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetFloatv( GET_DISPATCH(), ( + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetIntegerv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + + const GLuint compsize = __glGetIntegerv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetIntegerv( GET_DISPATCH(), ( + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetLightfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetLightfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetLightfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetLightiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetLightiv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetLightiv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMapdv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum target = (GLenum )bswap_ENUM ( pc + 0 ); + const GLenum query = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMapdv_size(target,query); + GLdouble answerBuffer[200]; + GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapdv( GET_DISPATCH(), ( + target, + query, + v + ) ); + (void) bswap_64_array( (uint64_t *) v, compsize ); + __glXSendReplySwap(cl->client, v, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMapfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum target = (GLenum )bswap_ENUM ( pc + 0 ); + const GLenum query = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMapfv_size(target,query); + GLfloat answerBuffer[200]; + GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapfv( GET_DISPATCH(), ( + target, + query, + v + ) ); + (void) bswap_32_array( (uint32_t *) v, compsize ); + __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMapiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum target = (GLenum )bswap_ENUM ( pc + 0 ); + const GLenum query = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMapiv_size(target,query); + GLint answerBuffer[200]; + GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapiv( GET_DISPATCH(), ( + target, + query, + v + ) ); + (void) bswap_32_array( (uint32_t *) v, compsize ); + __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMaterialfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMaterialfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMaterialfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMaterialiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMaterialiv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMaterialiv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum map = (GLenum )bswap_ENUM ( pc + 0 ); + + const GLuint compsize = __glGetPixelMapfv_size(map); + GLfloat answerBuffer[200]; + GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapfv( GET_DISPATCH(), ( + map, + values + ) ); + (void) bswap_32_array( (uint32_t *) values, compsize ); + __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum map = (GLenum )bswap_ENUM ( pc + 0 ); + + const GLuint compsize = __glGetPixelMapuiv_size(map); + GLuint answerBuffer[200]; + GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapuiv( GET_DISPATCH(), ( + map, + values + ) ); + (void) bswap_32_array( (uint32_t *) values, compsize ); + __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum map = (GLenum )bswap_ENUM ( pc + 0 ); + + const GLuint compsize = __glGetPixelMapusv_size(map); + GLushort answerBuffer[200]; + GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapusv( GET_DISPATCH(), ( + map, + values + ) ); + (void) bswap_16_array( (uint16_t *) values, compsize ); + __glXSendReplySwap(cl->client, values, compsize, 2, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetTexEnvfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexEnvfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexEnviv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetTexEnviv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexEnviv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexGendv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetTexGendv_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexGendv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_64_array( (uint64_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexGenfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetTexGenfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexGenfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexGeniv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetTexGeniv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexGeniv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetTexParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetTexParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 8 ); + + const GLuint compsize = __glGetTexLevelParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexLevelParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 8 ); + + const GLuint compsize = __glGetTexLevelParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexLevelParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsEnabled(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsEnabled( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsList( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_DepthRange(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_DepthRange( GET_DISPATCH(), ( + (GLclampd)bswap_FLOAT64( pc + 0 ), + (GLclampd)bswap_FLOAT64( pc + 8 ) + ) ); +} + +void __glXDispSwap_Frustum(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 48); + pc -= 4; + } +#endif + + CALL_Frustum( GET_DISPATCH(), ( + (GLdouble)bswap_FLOAT64( pc + 0 ), + (GLdouble)bswap_FLOAT64( pc + 8 ), + (GLdouble)bswap_FLOAT64( pc + 16 ), + (GLdouble)bswap_FLOAT64( pc + 24 ), + (GLdouble)bswap_FLOAT64( pc + 32 ), + (GLdouble)bswap_FLOAT64( pc + 40 ) + ) ); +} + +void __glXDispSwap_LoadIdentity(GLbyte * pc) +{ + CALL_LoadIdentity( GET_DISPATCH(), () ); +} + +void __glXDispSwap_LoadMatrixf(GLbyte * pc) +{ + CALL_LoadMatrixf( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 16 ) + ) ); +} + +void __glXDispSwap_LoadMatrixd(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 128); + pc -= 4; + } +#endif + + CALL_LoadMatrixd( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 16 ) + ) ); +} + +void __glXDispSwap_MatrixMode(GLbyte * pc) +{ + CALL_MatrixMode( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_MultMatrixf(GLbyte * pc) +{ + CALL_MultMatrixf( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 16 ) + ) ); +} + +void __glXDispSwap_MultMatrixd(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 128); + pc -= 4; + } +#endif + + CALL_MultMatrixd( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 16 ) + ) ); +} + +void __glXDispSwap_Ortho(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 48); + pc -= 4; + } +#endif + + CALL_Ortho( GET_DISPATCH(), ( + (GLdouble)bswap_FLOAT64( pc + 0 ), + (GLdouble)bswap_FLOAT64( pc + 8 ), + (GLdouble)bswap_FLOAT64( pc + 16 ), + (GLdouble)bswap_FLOAT64( pc + 24 ), + (GLdouble)bswap_FLOAT64( pc + 32 ), + (GLdouble)bswap_FLOAT64( pc + 40 ) + ) ); +} + +void __glXDispSwap_PopMatrix(GLbyte * pc) +{ + CALL_PopMatrix( GET_DISPATCH(), () ); +} + +void __glXDispSwap_PushMatrix(GLbyte * pc) +{ + CALL_PushMatrix( GET_DISPATCH(), () ); +} + +void __glXDispSwap_Rotated(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Rotated( GET_DISPATCH(), ( + (GLdouble)bswap_FLOAT64( pc + 0 ), + (GLdouble)bswap_FLOAT64( pc + 8 ), + (GLdouble)bswap_FLOAT64( pc + 16 ), + (GLdouble)bswap_FLOAT64( pc + 24 ) + ) ); +} + +void __glXDispSwap_Rotatef(GLbyte * pc) +{ + CALL_Rotatef( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ), + (GLfloat )bswap_FLOAT32( pc + 12 ) + ) ); +} + +void __glXDispSwap_Scaled(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Scaled( GET_DISPATCH(), ( + (GLdouble)bswap_FLOAT64( pc + 0 ), + (GLdouble)bswap_FLOAT64( pc + 8 ), + (GLdouble)bswap_FLOAT64( pc + 16 ) + ) ); +} + +void __glXDispSwap_Scalef(GLbyte * pc) +{ + CALL_Scalef( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_Translated(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Translated( GET_DISPATCH(), ( + (GLdouble)bswap_FLOAT64( pc + 0 ), + (GLdouble)bswap_FLOAT64( pc + 8 ), + (GLdouble)bswap_FLOAT64( pc + 16 ) + ) ); +} + +void __glXDispSwap_Translatef(GLbyte * pc) +{ + CALL_Translatef( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_Viewport(GLbyte * pc) +{ + CALL_Viewport( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLsizei )bswap_CARD32 ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ) + ) ); +} + +void __glXDispSwap_BindTexture(GLbyte * pc) +{ + CALL_BindTexture( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_Indexubv(GLbyte * pc) +{ + CALL_Indexubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_PolygonOffset(GLbyte * pc) +{ + CALL_PolygonOffset( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +int __glXDispSwap_AreTexturesResident(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = CALL_AreTexturesResident( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), + residences + ) ); + __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +} + +int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = CALL_AreTexturesResident( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), + residences + ) ); + __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_CopyTexImage1D(GLbyte * pc) +{ + CALL_CopyTexImage1D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLint )bswap_CARD32 ( pc + 24 ) + ) ); +} + +void __glXDispSwap_CopyTexImage2D(GLbyte * pc) +{ + CALL_CopyTexImage2D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLsizei )bswap_CARD32 ( pc + 24 ), + (GLint )bswap_CARD32 ( pc + 28 ) + ) ); +} + +void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc) +{ + CALL_CopyTexSubImage1D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ) + ) ); +} + +void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc) +{ + CALL_CopyTexSubImage2D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + (GLint )bswap_CARD32 ( pc + 20 ), + (GLsizei )bswap_CARD32 ( pc + 24 ), + (GLsizei )bswap_CARD32 ( pc + 28 ) + ) ); +} + +int __glXDispSwap_DeleteTextures(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteTextures( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); + error = Success; + } + + return error; +} + +int __glXDispSwap_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteTextures( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); + error = Success; + } + + return error; +} + +int __glXDispSwap_GenTextures(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenTextures( GET_DISPATCH(), ( + n, + textures + ) ); + (void) bswap_32_array( (uint32_t *) textures, n ); + __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenTextures( GET_DISPATCH(), ( + n, + textures + ) ); + (void) bswap_32_array( (uint32_t *) textures, n ); + __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsTexture( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsTexture( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_PrioritizeTextures(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_PrioritizeTextures( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), + (const GLclampf *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); +} + +void __glXDispSwap_TexSubImage1D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_TexSubImage1D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 20 ), + (GLint )bswap_CARD32 ( pc + 24 ), + (GLint )bswap_CARD32 ( pc + 28 ), + (GLsizei )bswap_CARD32 ( pc + 36 ), + (GLenum )bswap_ENUM ( pc + 44 ), + (GLenum )bswap_ENUM ( pc + 48 ), + pixels + ) ); +} + +void __glXDispSwap_TexSubImage2D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_TexSubImage2D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 20 ), + (GLint )bswap_CARD32 ( pc + 24 ), + (GLint )bswap_CARD32 ( pc + 28 ), + (GLint )bswap_CARD32 ( pc + 32 ), + (GLsizei )bswap_CARD32 ( pc + 36 ), + (GLsizei )bswap_CARD32 ( pc + 40 ), + (GLenum )bswap_ENUM ( pc + 44 ), + (GLenum )bswap_ENUM ( pc + 48 ), + pixels + ) ); +} + +void __glXDispSwap_BlendColor(GLbyte * pc) +{ + CALL_BlendColor( GET_DISPATCH(), ( + (GLclampf)bswap_FLOAT32( pc + 0 ), + (GLclampf)bswap_FLOAT32( pc + 4 ), + (GLclampf)bswap_FLOAT32( pc + 8 ), + (GLclampf)bswap_FLOAT32( pc + 12 ) + ) ); +} + +void __glXDispSwap_BlendEquation(GLbyte * pc) +{ + CALL_BlendEquation( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_ColorTable(GLbyte * pc) +{ + const GLvoid * const table = (const GLvoid *) (pc + 40); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_ColorTable( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 20 ), + (GLenum )bswap_ENUM ( pc + 24 ), + (GLsizei )bswap_CARD32 ( pc + 28 ), + (GLenum )bswap_ENUM ( pc + 32 ), + (GLenum )bswap_ENUM ( pc + 36 ), + table + ) ); +} + +void __glXDispSwap_ColorTableParameterfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameterfv_size(pname) ); + + CALL_ColorTableParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_ColorTableParameteriv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameteriv_size(pname) ); + + CALL_ColorTableParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_CopyColorTable(GLbyte * pc) +{ + CALL_CopyColorTable( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ) + ) ); +} + +int __glXDispSwap_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetColorTableParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetColorTableParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetColorTableParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetColorTableParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDispSwap_ColorSubTable(GLbyte * pc) +{ + const GLvoid * const data = (const GLvoid *) (pc + 40); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_ColorSubTable( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 20 ), + (GLsizei )bswap_CARD32 ( pc + 24 ), + (GLsizei )bswap_CARD32 ( pc + 28 ), + (GLenum )bswap_ENUM ( pc + 32 ), + (GLenum )bswap_ENUM ( pc + 36 ), + data + ) ); +} + +void __glXDispSwap_CopyColorSubTable(GLbyte * pc) +{ + CALL_CopyColorSubTable( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLsizei )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ) + ) ); +} + +void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc) +{ + const GLvoid * const image = (const GLvoid *) (pc + 44); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_ConvolutionFilter1D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 20 ), + (GLenum )bswap_ENUM ( pc + 24 ), + (GLsizei )bswap_CARD32 ( pc + 28 ), + (GLenum )bswap_ENUM ( pc + 36 ), + (GLenum )bswap_ENUM ( pc + 40 ), + image + ) ); +} + +void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc) +{ + const GLvoid * const image = (const GLvoid *) (pc + 44); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_ConvolutionFilter2D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 20 ), + (GLenum )bswap_ENUM ( pc + 24 ), + (GLsizei )bswap_CARD32 ( pc + 28 ), + (GLsizei )bswap_CARD32 ( pc + 32 ), + (GLenum )bswap_ENUM ( pc + 36 ), + (GLenum )bswap_ENUM ( pc + 40 ), + image + ) ); +} + +void __glXDispSwap_ConvolutionParameterf(GLbyte * pc) +{ + CALL_ConvolutionParameterf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameterfv_size(pname) ); + + CALL_ConvolutionParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_ConvolutionParameteri(GLbyte * pc) +{ + CALL_ConvolutionParameteri( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameteriv_size(pname) ); + + CALL_ConvolutionParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc) +{ + CALL_CopyConvolutionFilter1D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ) + ) ); +} + +void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc) +{ + CALL_CopyConvolutionFilter2D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ) + ) ); +} + +int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetConvolutionParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetConvolutionParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetConvolutionParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetConvolutionParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetHistogramParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetHistogramParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetHistogramParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetHistogramParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMinmaxParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMinmaxParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMinmaxParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMinmaxParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDispSwap_Histogram(GLbyte * pc) +{ + CALL_Histogram( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLsizei )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + *(GLboolean *)(pc + 12) + ) ); +} + +void __glXDispSwap_Minmax(GLbyte * pc) +{ + CALL_Minmax( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + *(GLboolean *)(pc + 8) + ) ); +} + +void __glXDispSwap_ResetHistogram(GLbyte * pc) +{ + CALL_ResetHistogram( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_ResetMinmax(GLbyte * pc) +{ + CALL_ResetMinmax( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_TexImage3D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 76); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80); + __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32( & hdr->imageHeight )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) bswap_CARD32( & hdr->skipImages )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_TexImage3D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 36 ), + (GLint )bswap_CARD32 ( pc + 40 ), + (GLint )bswap_CARD32 ( pc + 44 ), + (GLsizei )bswap_CARD32 ( pc + 48 ), + (GLsizei )bswap_CARD32 ( pc + 52 ), + (GLsizei )bswap_CARD32 ( pc + 56 ), + (GLint )bswap_CARD32 ( pc + 64 ), + (GLenum )bswap_ENUM ( pc + 68 ), + (GLenum )bswap_ENUM ( pc + 72 ), + pixels + ) ); +} + +void __glXDispSwap_TexSubImage3D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 84); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 88); + __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32( & hdr->imageHeight )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) bswap_CARD32( & hdr->skipImages )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_TexSubImage3D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 36 ), + (GLint )bswap_CARD32 ( pc + 40 ), + (GLint )bswap_CARD32 ( pc + 44 ), + (GLint )bswap_CARD32 ( pc + 48 ), + (GLint )bswap_CARD32 ( pc + 52 ), + (GLsizei )bswap_CARD32 ( pc + 60 ), + (GLsizei )bswap_CARD32 ( pc + 64 ), + (GLsizei )bswap_CARD32 ( pc + 68 ), + (GLenum )bswap_ENUM ( pc + 76 ), + (GLenum )bswap_ENUM ( pc + 80 ), + pixels + ) ); +} + +void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc) +{ + CALL_CopyTexSubImage3D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + (GLint )bswap_CARD32 ( pc + 20 ), + (GLint )bswap_CARD32 ( pc + 24 ), + (GLsizei )bswap_CARD32 ( pc + 28 ), + (GLsizei )bswap_CARD32 ( pc + 32 ) + ) ); +} + +void __glXDispSwap_ActiveTextureARB(GLbyte * pc) +{ + CALL_ActiveTextureARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_MultiTexCoord1dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 8 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord1fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord1ivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord1svARB(GLbyte * pc) +{ + CALL_MultiTexCoord1svARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_MultiTexCoord2dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 16 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord2fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord2ivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord2svARB(GLbyte * pc) +{ + CALL_MultiTexCoord2svARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_MultiTexCoord3dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 24 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord3fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord3ivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc) +{ + CALL_MultiTexCoord3svARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_MultiTexCoord4dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 32 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord4fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord4ivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord4svARB(GLbyte * pc) +{ + CALL_MultiTexCoord4svARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_SampleCoverageARB(GLbyte * pc) +{ + CALL_SampleCoverageARB( GET_DISPATCH(), ( + (GLclampf)bswap_FLOAT32( pc + 0 ), + *(GLboolean *)(pc + 4) + ) ); +} + +void __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 20 ); + + CALL_CompressedTexImage1DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + imageSize, + (const GLvoid *)(pc + 24) + ) ); +} + +void __glXDispSwap_CompressedTexImage2DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 24 ); + + CALL_CompressedTexImage2DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ), + (GLint )bswap_CARD32 ( pc + 20 ), + imageSize, + (const GLvoid *)(pc + 28) + ) ); +} + +void __glXDispSwap_CompressedTexImage3DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 28 ); + + CALL_CompressedTexImage3DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLint )bswap_CARD32 ( pc + 24 ), + imageSize, + (const GLvoid *)(pc + 32) + ) ); +} + +void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 20 ); + + CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ), + (GLenum )bswap_ENUM ( pc + 16 ), + imageSize, + (const GLvoid *)(pc + 24) + ) ); +} + +void __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 28 ); + + CALL_CompressedTexSubImage2DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLenum )bswap_ENUM ( pc + 24 ), + imageSize, + (const GLvoid *)(pc + 32) + ) ); +} + +void __glXDispSwap_CompressedTexSubImage3DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 36 ); + + CALL_CompressedTexSubImage3DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLsizei )bswap_CARD32 ( pc + 24 ), + (GLsizei )bswap_CARD32 ( pc + 28 ), + (GLenum )bswap_ENUM ( pc + 32 ), + imageSize, + (const GLvoid *)(pc + 40) + ) ); +} + +int __glXDispSwap_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLdouble params[4]; + CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + params + ) ); + (void) bswap_64_array( (uint64_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLfloat params[4]; + CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLdouble params[4]; + CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + params + ) ); + (void) bswap_64_array( (uint64_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLfloat params[4]; + CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetProgramivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetProgramivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetVertexAttribdvARB_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribdvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_64_array( (uint64_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetVertexAttribfvARB_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribfvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetVertexAttribivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) + ) ); +} + +void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc) +{ + CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) + ) ); +} + +void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) + ) ); +} + +void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc) +{ + CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) + ) ); +} + +void __glXDispSwap_ProgramStringARB(GLbyte * pc) +{ + const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 8 ); + + CALL_ProgramStringARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + len, + (const GLvoid *)(pc + 12) + ) ); +} + +void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_VertexAttrib1dvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc) +{ + CALL_VertexAttrib1fvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1svARB(GLbyte * pc) +{ + CALL_VertexAttrib1svARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_VertexAttrib2dvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc) +{ + CALL_VertexAttrib2fvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2svARB(GLbyte * pc) +{ + CALL_VertexAttrib2svARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_VertexAttrib3dvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc) +{ + CALL_VertexAttrib3fvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3svARB(GLbyte * pc) +{ + CALL_VertexAttrib3svARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NbvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NbvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLbyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc) +{ + CALL_VertexAttrib4NivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NsvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NsvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NubvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc) +{ + CALL_VertexAttrib4NuivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NusvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc) +{ + CALL_VertexAttrib4bvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLbyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_VertexAttrib4dvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc) +{ + CALL_VertexAttrib4fvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4ivARB(GLbyte * pc) +{ + CALL_VertexAttrib4ivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4svARB(GLbyte * pc) +{ + CALL_VertexAttrib4svARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc) +{ + CALL_VertexAttrib4ubvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc) +{ + CALL_VertexAttrib4uivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc) +{ + CALL_VertexAttrib4usvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_BeginQueryARB(GLbyte * pc) +{ + CALL_BeginQueryARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +int __glXDispSwap_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteQueriesARB( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); + error = Success; + } + + return error; +} + +void __glXDispSwap_EndQueryARB(GLbyte * pc) +{ + CALL_EndQueryARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +int __glXDispSwap_GenQueriesARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenQueriesARB( GET_DISPATCH(), ( + n, + ids + ) ); + (void) bswap_32_array( (uint32_t *) ids, n ); + __glXSendReplySwap(cl->client, ids, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetQueryObjectivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryObjectivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetQueryObjectuivARB_size(pname); + GLuint answerBuffer[200]; + GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryObjectuivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetQueryivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetQueryivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsQueryARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsQueryARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_DrawBuffersARB(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DrawBuffersARB( GET_DISPATCH(), ( + n, + (const GLenum *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); +} + +void __glXDispSwap_SampleMaskSGIS(GLbyte * pc) +{ + CALL_SampleMaskSGIS( GET_DISPATCH(), ( + (GLclampf)bswap_FLOAT32( pc + 0 ), + *(GLboolean *)(pc + 4) + ) ); +} + +void __glXDispSwap_SamplePatternSGIS(GLbyte * pc) +{ + CALL_SamplePatternSGIS( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_PointParameterfEXT(GLbyte * pc) +{ + CALL_PointParameterfEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_PointParameterfvEXT(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterfvEXT_size(pname) ); + + CALL_PointParameterfvEXT( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_SecondaryColor3bvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3bvEXT( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_SecondaryColor3dvEXT(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_SecondaryColor3dvEXT( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3fvEXT( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc) +{ + CALL_SecondaryColor3ivEXT( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc) +{ + CALL_SecondaryColor3svEXT( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3ubvEXT( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc) +{ + CALL_SecondaryColor3uivEXT( GET_DISPATCH(), ( + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_SecondaryColor3usvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3usvEXT( GET_DISPATCH(), ( + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_FogCoorddvEXT(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_FogCoorddvEXT( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_FogCoordfvEXT(GLbyte * pc) +{ + CALL_FogCoordfvEXT( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_BlendFuncSeparateEXT(GLbyte * pc) +{ + CALL_BlendFuncSeparateEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLenum )bswap_ENUM ( pc + 12 ) + ) ); +} + +void __glXDispSwap_WindowPos3fvMESA(GLbyte * pc) +{ + CALL_WindowPos3fvMESA( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +int __glXDispSwap_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = CALL_AreProgramsResidentNV( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), + residences + ) ); + __glXSendReplySwap(cl->client, residences, n, 1, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_BindProgramNV(GLbyte * pc) +{ + CALL_BindProgramNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +int __glXDispSwap_DeleteProgramsNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteProgramsNV( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); + error = Success; + } + + return error; +} + +void __glXDispSwap_ExecuteProgramNV(GLbyte * pc) +{ + CALL_ExecuteProgramNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) + ) ); +} + +int __glXDispSwap_GenProgramsNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenProgramsNV( GET_DISPATCH(), ( + n, + programs + ) ); + (void) bswap_32_array( (uint32_t *) programs, n ); + __glXSendReplySwap(cl->client, programs, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramParameterdvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLdouble params[4]; + CALL_GetProgramParameterdvNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + params + ) ); + (void) bswap_64_array( (uint64_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramParameterfvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLfloat params[4]; + CALL_GetProgramParameterfvNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramivNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetProgramivNV_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetProgramivNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLint params[1]; + CALL_GetTrackMatrixivNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 1 ); + __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetVertexAttribdvNV_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribdvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_64_array( (uint64_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetVertexAttribfvNV_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribfvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetVertexAttribivNV_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribivNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsProgramNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsProgramNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_LoadProgramNV(GLbyte * pc) +{ + const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 8 ); + + CALL_LoadProgramNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + len, + (const GLubyte *)(pc + 12) + ) ); +} + +void __glXDispSwap_ProgramParameter4dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_ProgramParameter4dvNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) + ) ); +} + +void __glXDispSwap_ProgramParameter4fvNV(GLbyte * pc) +{ + CALL_ProgramParameter4fvNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) + ) ); +} + +void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc) +{ + const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 ); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_ProgramParameters4dvNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + num, + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 12), 0 ) + ) ); +} + +void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc) +{ + const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 ); + + CALL_ProgramParameters4fvNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + num, + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 12), 0 ) + ) ); +} + +void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_RequestResidentProgramsNV( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); +} + +void __glXDispSwap_TrackMatrixNV(GLbyte * pc) +{ + CALL_TrackMatrixNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLenum )bswap_ENUM ( pc + 12 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_VertexAttrib1dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc) +{ + CALL_VertexAttrib1fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc) +{ + CALL_VertexAttrib1svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_VertexAttrib2dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc) +{ + CALL_VertexAttrib2fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc) +{ + CALL_VertexAttrib2svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_VertexAttrib3dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc) +{ + CALL_VertexAttrib3fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc) +{ + CALL_VertexAttrib3svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_VertexAttrib4dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc) +{ + CALL_VertexAttrib4fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc) +{ + CALL_VertexAttrib4svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc) +{ + CALL_VertexAttrib4ubvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_VertexAttribs1dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs1fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs1svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_VertexAttribs2dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs2fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs2svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_VertexAttribs3dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs3fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs3svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_VertexAttribs4dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs4fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs4svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs4ubvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLubyte *)(pc + 8) + ) ); +} + +void __glXDispSwap_PointParameteriNV(GLbyte * pc) +{ + CALL_PointParameteriNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_PointParameterivNV(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterivNV_size(pname) ); + + CALL_PointParameterivNV( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc) +{ + CALL_ActiveStencilFaceEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +int __glXDispSwap_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 ); + + GLdouble params[4]; + CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + len, + (const GLubyte *)(pc + 8), + params + ) ); + (void) bswap_64_array( (uint64_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 8, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 ); + + GLfloat params[4]; + CALL_GetProgramNamedParameterfvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + len, + (const GLubyte *)(pc + 8), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +void __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc) +{ + const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 36 ); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 44 + __GLX_PAD(len) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 32 ), + len, + (const GLubyte *)(pc + 40), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc) +{ + const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + len, + (const GLubyte *)(pc + 24), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) + ) ); +} + +void __glXDispSwap_BlendEquationSeparateEXT(GLbyte * pc) +{ + CALL_BlendEquationSeparateEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); +} + +void __glXDispSwap_BindFramebufferEXT(GLbyte * pc) +{ + CALL_BindFramebufferEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc) +{ + CALL_BindRenderbufferEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +int __glXDispSwap_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLenum retval; + retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteFramebuffersEXT( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); +} + +void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteRenderbuffersEXT( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); +} + +void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc) +{ + CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLuint )bswap_CARD32 ( pc + 12 ) + ) ); +} + +void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture1DEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLuint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ) + ) ); +} + +void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture2DEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLuint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ) + ) ); +} + +void __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture3DEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLuint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + (GLint )bswap_CARD32 ( pc + 20 ) + ) ); +} + +int __glXDispSwap_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenFramebuffersEXT( GET_DISPATCH(), ( + n, + framebuffers + ) ); + (void) bswap_32_array( (uint32_t *) framebuffers, n ); + __glXSendReplySwap(cl->client, framebuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenRenderbuffersEXT( GET_DISPATCH(), ( + n, + renderbuffers + ) ); + (void) bswap_32_array( (uint32_t *) renderbuffers, n ); + __glXSendReplySwap(cl->client, renderbuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc) +{ + CALL_GenerateMipmapEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLint params[1]; + CALL_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 1 ); + __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetRenderbufferParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLint params[1]; + CALL_GetRenderbufferParameterivEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 1 ); + __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsFramebufferEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsFramebufferEXT( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsRenderbufferEXT( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc) +{ + CALL_RenderbufferStorageEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLsizei )bswap_CARD32 ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ) + ) ); +} + diff --git a/xorg-server-1.4/GL/glx/indirect_program.c b/xorg-server-1.4/GL/glx/indirect_program.c new file mode 100644 index 0000000..d23a0a9 --- /dev/null +++ b/xorg-server-1.4/GL/glx/indirect_program.c @@ -0,0 +1,150 @@ +/* + * (C) Copyright IBM Corporation 2005, 2006 + * 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, sub license, + * 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 + * THE COPYRIGHT HOLDERS, THE AUTHORS, 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. + */ + +/** + * \file indirect_program.c + * Hand-coded routines needed to support programmable pipeline extensions. + * + * \author Ian Romanick + */ + +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "glxbyteorder.h" +#include "glxext.h" +#include "singlesize.h" +#include "unpack.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" +#include "glapioffsets.h" + +static int DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte *pc, + unsigned get_programiv_offset, unsigned get_program_string_offset, + Bool do_swap); + +/** + * Handle both types of glGetProgramString calls. + * + * This single function handles both \c glGetProgramStringARB and + * \c glGetProgramStringNV. The dispatch offsets for the functions to use + * for \c glGetProgramivARB and \c glGetProgramStringARB are passed in by the + * caller. These can be the offsets of either the ARB versions or the NV + * versions. + */ +int DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte *pc, + unsigned get_programiv_offset, + unsigned get_program_string_offset, + Bool do_swap) +{ + xGLXVendorPrivateWithReplyReq * const req = + (xGLXVendorPrivateWithReplyReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, & error); + ClientPtr client = cl->client; + + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLenum target; + GLenum pname; + GLint compsize = 0; + char *answer = NULL, answerBuffer[200]; + + if (do_swap) { + target = (GLenum) bswap_32(*(int *)(pc + 0)); + pname = (GLenum) bswap_32(*(int *)(pc + 4)); + } + else { + target = *(GLenum *)(pc + 0); + pname = *(GLuint *)(pc + 4); + } + + /* The value of the GL_PROGRAM_LENGTH_ARB and GL_PROGRAM_LENGTH_NV + * enumerants is the same. + */ + CALL_by_offset(GET_DISPATCH(), + (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), + get_programiv_offset, + (target, GL_PROGRAM_LENGTH_ARB, &compsize)); + + if (compsize != 0) { + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + + CALL_by_offset(GET_DISPATCH(), + (void (GLAPIENTRYP)(GLuint, GLenum, GLubyte *)), + get_program_string_offset, + (target, pname, answer)); + } + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetTexImageReply *)&__glXReply)->width = compsize; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte *pc) +{ + return DoGetProgramString(cl, pc, _gloffset_GetProgramivARB, + _gloffset_GetProgramStringARB, False); +} + + +int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte *pc) +{ + return DoGetProgramString(cl, pc, _gloffset_GetProgramivARB, + _gloffset_GetProgramStringARB, True); +} + + +int __glXDisp_GetProgramStringNV(struct __GLXclientStateRec *cl, GLbyte *pc) +{ + return DoGetProgramString(cl, pc, _gloffset_GetProgramivNV, + _gloffset_GetProgramStringNV, False); +} + + +int __glXDispSwap_GetProgramStringNV(struct __GLXclientStateRec *cl, GLbyte *pc) +{ + return DoGetProgramString(cl, pc, _gloffset_GetProgramivNV, + _gloffset_GetProgramStringNV, True); +} diff --git a/xorg-server-1.4/GL/glx/indirect_reqsize.c b/xorg-server-1.4/GL/glx/indirect_reqsize.c new file mode 100644 index 0000000..954eecd --- /dev/null +++ b/xorg-server-1.4/GL/glx/indirect_reqsize.c @@ -0,0 +1,832 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * 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, sub license, + * 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 + * IBM, + * 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. + */ + + +#include +#include "glxserver.h" +#include "glxbyteorder.h" +#include "indirect_size.h" +#include "indirect_reqsize.h" + +#define __GLX_PAD(x) (((x) + 3) & ~3) + +#if defined(__CYGWIN__) || defined(__MINGW32__) +# undef HAVE_ALIAS +#endif +#ifdef HAVE_ALIAS +# define ALIAS2(from,to) \ + GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ + __attribute__ ((alias( # to ))); +# define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize ) +#else +# define ALIAS(from,to) \ + GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ + { return __glX ## to ## ReqSize( pc, swap ); } +#endif + + +int +__glXCallListsReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 0); + GLenum type = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + n = bswap_32(n); + type = bswap_32(type); + } + + compsize = __glCallLists_size(type); + return __GLX_PAD((compsize * n)); +} + +int +__glXBitmapReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLsizei width = *(GLsizei *) (pc + 20); + GLsizei height = *(GLsizei *) (pc + 24); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + width = bswap_32(width); + height = bswap_32(height); + } + + return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXFogfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 0); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glFogfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXLightfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glLightfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXLightModelfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 0); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glLightModelfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXMaterialfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glMaterialfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXPolygonStippleReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + } + + return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, 32, 32, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexParameterfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glTexParameterfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXTexImage1DReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 32); + GLenum format = *(GLenum *) (pc + 44); + GLenum type = *(GLenum *) (pc + 48); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexImage2DReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 32); + GLsizei height = *(GLsizei *) (pc + 36); + GLenum format = *(GLenum *) (pc + 44); + GLenum type = *(GLenum *) (pc + 48); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + height = bswap_32(height); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexEnvfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glTexEnvfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXTexGendvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glTexGendv_size(pname); + return __GLX_PAD((compsize * 8)); +} + +int +__glXTexGenfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glTexGenfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXPixelMapfvReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei mapsize = *(GLsizei *) (pc + 4); + + if (swap) { + mapsize = bswap_32(mapsize); + } + + return __GLX_PAD((mapsize * 4)); +} + +int +__glXPixelMapusvReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei mapsize = *(GLsizei *) (pc + 4); + + if (swap) { + mapsize = bswap_32(mapsize); + } + + return __GLX_PAD((mapsize * 2)); +} + +int +__glXDrawPixelsReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLsizei width = *(GLsizei *) (pc + 20); + GLsizei height = *(GLsizei *) (pc + 24); + GLenum format = *(GLenum *) (pc + 28); + GLenum type = *(GLenum *) (pc + 32); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + width = bswap_32(width); + height = bswap_32(height); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, 0, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 0); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 4) + (n * 4)); +} + +int +__glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 36); + GLenum format = *(GLenum *) (pc + 44); + GLenum type = *(GLenum *) (pc + 48); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 36); + GLsizei height = *(GLsizei *) (pc + 40); + GLenum format = *(GLenum *) (pc + 44); + GLenum type = *(GLenum *) (pc + 48); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + height = bswap_32(height); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXColorTableReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 28); + GLenum format = *(GLenum *) (pc + 32); + GLenum type = *(GLenum *) (pc + 36); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glColorTableParameterfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXColorSubTableReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei count = *(GLsizei *) (pc + 28); + GLenum format = *(GLenum *) (pc + 32); + GLenum type = *(GLenum *) (pc + 36); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + count = bswap_32(count); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, count, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 28); + GLenum format = *(GLenum *) (pc + 36); + GLenum type = *(GLenum *) (pc + 40); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 28); + GLsizei height = *(GLsizei *) (pc + 32); + GLenum format = *(GLenum *) (pc + 36); + GLenum type = *(GLenum *) (pc + 40); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + height = bswap_32(height); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glConvolutionParameterfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXTexImage3DReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = *(GLint *) (pc + 8); + GLint skip_rows = *(GLint *) (pc + 16); + GLint skip_images = *(GLint *) (pc + 20); + GLint alignment = *(GLint *) (pc + 32); + GLenum target = *(GLenum *) (pc + 36); + GLsizei width = *(GLsizei *) (pc + 48); + GLsizei height = *(GLsizei *) (pc + 52); + GLsizei depth = *(GLsizei *) (pc + 56); + GLenum format = *(GLenum *) (pc + 68); + GLenum type = *(GLenum *) (pc + 72); + + if (swap) { + row_length = bswap_32(row_length); + image_height = bswap_32(image_height); + skip_rows = bswap_32(skip_rows); + skip_images = bswap_32(skip_images); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + height = bswap_32(height); + depth = bswap_32(depth); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, height, depth, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = *(GLint *) (pc + 8); + GLint skip_rows = *(GLint *) (pc + 16); + GLint skip_images = *(GLint *) (pc + 20); + GLint alignment = *(GLint *) (pc + 32); + GLenum target = *(GLenum *) (pc + 36); + GLsizei width = *(GLsizei *) (pc + 60); + GLsizei height = *(GLsizei *) (pc + 64); + GLsizei depth = *(GLsizei *) (pc + 68); + GLenum format = *(GLenum *) (pc + 76); + GLenum type = *(GLenum *) (pc + 80); + + if (swap) { + row_length = bswap_32(row_length); + image_height = bswap_32(image_height); + skip_rows = bswap_32(skip_rows); + skip_images = bswap_32(skip_images); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + height = bswap_32(height); + depth = bswap_32(depth); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, height, depth, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei imageSize = *(GLsizei *) (pc + 20); + + if (swap) { + imageSize = bswap_32(imageSize); + } + + return __GLX_PAD(imageSize); +} + +int +__glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei imageSize = *(GLsizei *) (pc + 24); + + if (swap) { + imageSize = bswap_32(imageSize); + } + + return __GLX_PAD(imageSize); +} + +int +__glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei imageSize = *(GLsizei *) (pc + 28); + + if (swap) { + imageSize = bswap_32(imageSize); + } + + return __GLX_PAD(imageSize); +} + +int +__glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei imageSize = *(GLsizei *) (pc + 36); + + if (swap) { + imageSize = bswap_32(imageSize); + } + + return __GLX_PAD(imageSize); +} + +int +__glXProgramStringARBReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei len = *(GLsizei *) (pc + 8); + + if (swap) { + len = bswap_32(len); + } + + return __GLX_PAD(len); +} + +int +__glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 0); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 4)); +} + +int +__glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 0); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glPointParameterfvEXT_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap) +{ + GLuint num = *(GLuint *) (pc + 8); + + if (swap) { + num = bswap_32(num); + } + + return __GLX_PAD((num * 32)); +} + +int +__glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap) +{ + GLuint num = *(GLuint *) (pc + 8); + + if (swap) { + num = bswap_32(num); + } + + return __GLX_PAD((num * 16)); +} + +int +__glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 8)); +} + +int +__glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 16)); +} + +int +__glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 24)); +} + +int +__glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 12)); +} + +int +__glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 6)); +} + +int +__glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 32)); +} + +int +__glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei len = *(GLsizei *) (pc + 4); + + if (swap) { + len = bswap_32(len); + } + + return __GLX_PAD(len); +} + +ALIAS(Fogiv, Fogfv) + ALIAS(Lightiv, Lightfv) + ALIAS(LightModeliv, LightModelfv) + ALIAS(Materialiv, Materialfv) + ALIAS(TexParameteriv, TexParameterfv) + ALIAS(TexEnviv, TexEnvfv) + ALIAS(TexGeniv, TexGenfv) + ALIAS(PixelMapuiv, PixelMapfv) + ALIAS(ColorTableParameteriv, ColorTableParameterfv) + ALIAS(ConvolutionParameteriv, ConvolutionParameterfv) + ALIAS(CompressedTexSubImage1DARB, CompressedTexImage1DARB) + ALIAS(CompressedTexSubImage2DARB, CompressedTexImage3DARB) + ALIAS(LoadProgramNV, ProgramStringARB) + ALIAS(RequestResidentProgramsNV, DrawBuffersARB) + ALIAS(VertexAttribs1fvNV, PixelMapfv) + ALIAS(VertexAttribs1svNV, PixelMapusv) + ALIAS(VertexAttribs2fvNV, VertexAttribs1dvNV) + ALIAS(VertexAttribs2svNV, PixelMapfv) + ALIAS(VertexAttribs4fvNV, VertexAttribs2dvNV) + ALIAS(VertexAttribs4svNV, VertexAttribs1dvNV) + ALIAS(VertexAttribs4ubvNV, PixelMapfv) + ALIAS(PointParameterivNV, PointParameterfvEXT) + ALIAS(ProgramNamedParameter4dvNV, CompressedTexSubImage3DARB) + ALIAS(DeleteFramebuffersEXT, DrawBuffersARB) + ALIAS(DeleteRenderbuffersEXT, DrawBuffersARB) diff --git a/xorg-server-1.4/GL/glx/indirect_reqsize.h b/xorg-server-1.4/GL/glx/indirect_reqsize.h new file mode 100644 index 0000000..26211ee --- /dev/null +++ b/xorg-server-1.4/GL/glx/indirect_reqsize.h @@ -0,0 +1,121 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * 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, sub license, + * 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 + * IBM, + * 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. + */ + +#if !defined( _INDIRECT_REQSIZE_H_ ) +# define _INDIRECT_REQSIZE_H_ + +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) +# define HIDDEN __attribute__((visibility("hidden"))) +# else +# define HIDDEN +# endif + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define PURE __attribute__((pure)) +# else +# define PURE +# endif + +extern PURE HIDDEN int __glXCallListsReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXBitmapReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXFogfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXFogivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLightfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLightivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLightModelfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLightModelivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMaterialfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMaterialivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPolygonStippleReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexParameterfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexParameterivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexImage1DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexImage2DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexEnvfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexEnvivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexGendvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexGenfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexGenivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMap1dReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMap1fReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMap2dReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMap2fReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPixelMapfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPixelMapuivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPixelMapusvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDrawPixelsReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDrawArraysReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXColorTableReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXColorTableParameterivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXColorSubTableReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXConvolutionParameterivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXSeparableFilter2DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexImage3DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexSubImage1DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexSubImage2DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramStringARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLoadProgramNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXRequestResidentProgramsNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs1fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs1svNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs2fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs2svNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs4fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs4svNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs4ubvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPointParameterivNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramNamedParameter4dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDeleteFramebuffersEXTReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDeleteRenderbuffersEXTReqSize(const GLbyte *pc, Bool swap); + +# undef HIDDEN +# undef PURE + +#endif /* !defined( _INDIRECT_REQSIZE_H_ ) */ diff --git a/xorg-server-1.4/GL/glx/indirect_size_get.c b/xorg-server-1.4/GL/glx/indirect_size_get.c new file mode 100644 index 0000000..f29ae47 --- /dev/null +++ b/xorg-server-1.4/GL/glx/indirect_size_get.c @@ -0,0 +1,1192 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2004 + * 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, sub license, + * 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 + * IBM, + * 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. + */ + + +#include +#include "indirect_size_get.h" +#include "glxserver.h" +#include "indirect_util.h" +#include "indirect_size.h" + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define PURE __attribute__((pure)) +# else +# define PURE +# endif + +# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) +# define FASTCALL __attribute__((fastcall)) +# else +# define FASTCALL +# endif + +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) +# define INTERNAL __attribute__((visibility("internal"))) +# else +# define INTERNAL +# endif + + +#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) +# undef HAVE_ALIAS +#endif +#ifdef HAVE_ALIAS +# define ALIAS2(from,to) \ + INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ + __attribute__ ((alias( # to ))); +# define ALIAS(from,to) ALIAS2( from, __gl ## to ## _size ) +#else +# define ALIAS(from,to) \ + INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ + { return __gl ## to ## _size( e ); } +#endif + + +INTERNAL PURE FASTCALL GLint +__glCallLists_size(GLenum e) +{ + switch (e) { + case GL_BYTE: + case GL_UNSIGNED_BYTE: + return 1; + case GL_SHORT: + case GL_UNSIGNED_SHORT: + case GL_2_BYTES: + return 2; + case GL_3_BYTES: + return 3; + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + case GL_4_BYTES: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glFogfv_size(GLenum e) +{ + switch (e) { + case GL_FOG_INDEX: + case GL_FOG_DENSITY: + case GL_FOG_START: + case GL_FOG_END: + case GL_FOG_MODE: + case GL_FOG_OFFSET_VALUE_SGIX: + case GL_FOG_DISTANCE_MODE_NV: + return 1; + case GL_FOG_COLOR: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glLightfv_size(GLenum e) +{ + switch (e) { + case GL_SPOT_EXPONENT: + case GL_SPOT_CUTOFF: + case GL_CONSTANT_ATTENUATION: + case GL_LINEAR_ATTENUATION: + case GL_QUADRATIC_ATTENUATION: + return 1; + case GL_SPOT_DIRECTION: + return 3; + case GL_AMBIENT: + case GL_DIFFUSE: + case GL_SPECULAR: + case GL_POSITION: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glLightModelfv_size(GLenum e) +{ + switch (e) { + case GL_LIGHT_MODEL_LOCAL_VIEWER: + case GL_LIGHT_MODEL_TWO_SIDE: + case GL_LIGHT_MODEL_COLOR_CONTROL: +/* case GL_LIGHT_MODEL_COLOR_CONTROL_EXT:*/ + return 1; + case GL_LIGHT_MODEL_AMBIENT: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glMaterialfv_size(GLenum e) +{ + switch (e) { + case GL_SHININESS: + return 1; + case GL_COLOR_INDEXES: + return 3; + case GL_AMBIENT: + case GL_DIFFUSE: + case GL_SPECULAR: + case GL_EMISSION: + case GL_AMBIENT_AND_DIFFUSE: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glTexParameterfv_size(GLenum e) +{ + switch (e) { + case GL_TEXTURE_MAG_FILTER: + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_PRIORITY: + case GL_TEXTURE_WRAP_R: + case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: +/* case GL_SHADOW_AMBIENT_SGIX:*/ + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_CLIPMAP_FRAME_SGIX: + case GL_TEXTURE_LOD_BIAS_S_SGIX: + case GL_TEXTURE_LOD_BIAS_T_SGIX: + case GL_TEXTURE_LOD_BIAS_R_SGIX: + case GL_GENERATE_MIPMAP: +/* case GL_GENERATE_MIPMAP_SGIS:*/ + case GL_TEXTURE_COMPARE_SGIX: + case GL_TEXTURE_COMPARE_OPERATOR_SGIX: + case GL_TEXTURE_MAX_CLAMP_S_SGIX: + case GL_TEXTURE_MAX_CLAMP_T_SGIX: + case GL_TEXTURE_MAX_CLAMP_R_SGIX: + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + case GL_TEXTURE_LOD_BIAS: +/* case GL_TEXTURE_LOD_BIAS_EXT:*/ + case GL_DEPTH_TEXTURE_MODE: +/* case GL_DEPTH_TEXTURE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_MODE: +/* case GL_TEXTURE_COMPARE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_FUNC: +/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ + case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: + return 1; + case GL_TEXTURE_CLIPMAP_CENTER_SGIX: + case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: + return 2; + case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: + return 3; + case GL_TEXTURE_BORDER_COLOR: + case GL_POST_TEXTURE_FILTER_BIAS_SGIX: + case GL_POST_TEXTURE_FILTER_SCALE_SGIX: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glTexEnvfv_size(GLenum e) +{ + switch (e) { + case GL_ALPHA_SCALE: + case GL_TEXTURE_ENV_MODE: + case GL_TEXTURE_LOD_BIAS: + case GL_COMBINE_RGB: + case GL_COMBINE_ALPHA: + case GL_RGB_SCALE: + case GL_SOURCE0_RGB: + case GL_SOURCE1_RGB: + case GL_SOURCE2_RGB: + case GL_SOURCE3_RGB_NV: + case GL_SOURCE0_ALPHA: + case GL_SOURCE1_ALPHA: + case GL_SOURCE2_ALPHA: + case GL_SOURCE3_ALPHA_NV: + case GL_OPERAND0_RGB: + case GL_OPERAND1_RGB: + case GL_OPERAND2_RGB: + case GL_OPERAND3_RGB_NV: + case GL_OPERAND0_ALPHA: + case GL_OPERAND1_ALPHA: + case GL_OPERAND2_ALPHA: + case GL_OPERAND3_ALPHA_NV: + case GL_COORD_REPLACE_ARB: +/* case GL_COORD_REPLACE_NV:*/ + return 1; + case GL_TEXTURE_ENV_COLOR: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glTexGendv_size(GLenum e) +{ + switch (e) { + case GL_TEXTURE_GEN_MODE: + return 1; + case GL_OBJECT_PLANE: + case GL_EYE_PLANE: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glMap1d_size(GLenum e) +{ + switch (e) { + case GL_MAP1_INDEX: + case GL_MAP1_TEXTURE_COORD_1: + return 1; + case GL_MAP1_TEXTURE_COORD_2: + return 2; + case GL_MAP1_NORMAL: + case GL_MAP1_TEXTURE_COORD_3: + case GL_MAP1_VERTEX_3: + return 3; + case GL_MAP1_COLOR_4: + case GL_MAP1_TEXTURE_COORD_4: + case GL_MAP1_VERTEX_4: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glMap2d_size(GLenum e) +{ + switch (e) { + case GL_MAP2_INDEX: + case GL_MAP2_TEXTURE_COORD_1: + return 1; + case GL_MAP2_TEXTURE_COORD_2: + return 2; + case GL_MAP2_NORMAL: + case GL_MAP2_TEXTURE_COORD_3: + case GL_MAP2_VERTEX_3: + return 3; + case GL_MAP2_COLOR_4: + case GL_MAP2_TEXTURE_COORD_4: + case GL_MAP2_VERTEX_4: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetBooleanv_size(GLenum e) +{ + switch (e) { + case GL_CURRENT_INDEX: + case GL_CURRENT_RASTER_INDEX: + case GL_CURRENT_RASTER_POSITION_VALID: + case GL_CURRENT_RASTER_DISTANCE: + case GL_POINT_SMOOTH: + case GL_POINT_SIZE: + case GL_SMOOTH_POINT_SIZE_GRANULARITY: + case GL_LINE_SMOOTH: + case GL_LINE_WIDTH: + case GL_LINE_WIDTH_GRANULARITY: + case GL_LINE_STIPPLE: + case GL_LINE_STIPPLE_PATTERN: + case GL_LINE_STIPPLE_REPEAT: + case GL_LIST_MODE: + case GL_MAX_LIST_NESTING: + case GL_LIST_BASE: + case GL_LIST_INDEX: + case GL_POLYGON_SMOOTH: + case GL_POLYGON_STIPPLE: + case GL_EDGE_FLAG: + case GL_CULL_FACE: + case GL_CULL_FACE_MODE: + case GL_FRONT_FACE: + case GL_LIGHTING: + case GL_LIGHT_MODEL_LOCAL_VIEWER: + case GL_LIGHT_MODEL_TWO_SIDE: + case GL_SHADE_MODEL: + case GL_COLOR_MATERIAL_FACE: + case GL_COLOR_MATERIAL_PARAMETER: + case GL_COLOR_MATERIAL: + case GL_FOG: + case GL_FOG_INDEX: + case GL_FOG_DENSITY: + case GL_FOG_START: + case GL_FOG_END: + case GL_FOG_MODE: + case GL_DEPTH_TEST: + case GL_DEPTH_WRITEMASK: + case GL_DEPTH_CLEAR_VALUE: + case GL_DEPTH_FUNC: + case GL_STENCIL_TEST: + case GL_STENCIL_CLEAR_VALUE: + case GL_STENCIL_FUNC: + case GL_STENCIL_VALUE_MASK: + case GL_STENCIL_FAIL: + case GL_STENCIL_PASS_DEPTH_FAIL: + case GL_STENCIL_PASS_DEPTH_PASS: + case GL_STENCIL_REF: + case GL_STENCIL_WRITEMASK: + case GL_MATRIX_MODE: + case GL_NORMALIZE: + case GL_MODELVIEW_STACK_DEPTH: + case GL_PROJECTION_STACK_DEPTH: + case GL_TEXTURE_STACK_DEPTH: + case GL_ATTRIB_STACK_DEPTH: + case GL_CLIENT_ATTRIB_STACK_DEPTH: + case GL_ALPHA_TEST: + case GL_ALPHA_TEST_FUNC: + case GL_ALPHA_TEST_REF: + case GL_DITHER: + case GL_BLEND_DST: + case GL_BLEND_SRC: + case GL_BLEND: + case GL_LOGIC_OP_MODE: + case GL_LOGIC_OP: + case GL_AUX_BUFFERS: + case GL_DRAW_BUFFER: + case GL_READ_BUFFER: + case GL_SCISSOR_TEST: + case GL_INDEX_CLEAR_VALUE: + case GL_INDEX_WRITEMASK: + case GL_INDEX_MODE: + case GL_RGBA_MODE: + case GL_DOUBLEBUFFER: + case GL_STEREO: + case GL_RENDER_MODE: + case GL_PERSPECTIVE_CORRECTION_HINT: + case GL_POINT_SMOOTH_HINT: + case GL_LINE_SMOOTH_HINT: + case GL_POLYGON_SMOOTH_HINT: + case GL_FOG_HINT: + case GL_TEXTURE_GEN_S: + case GL_TEXTURE_GEN_T: + case GL_TEXTURE_GEN_R: + case GL_TEXTURE_GEN_Q: + case GL_PIXEL_MAP_I_TO_I: + case GL_PIXEL_MAP_I_TO_I_SIZE: + case GL_PIXEL_MAP_S_TO_S_SIZE: + case GL_PIXEL_MAP_I_TO_R_SIZE: + case GL_PIXEL_MAP_I_TO_G_SIZE: + case GL_PIXEL_MAP_I_TO_B_SIZE: + case GL_PIXEL_MAP_I_TO_A_SIZE: + case GL_PIXEL_MAP_R_TO_R_SIZE: + case GL_PIXEL_MAP_G_TO_G_SIZE: + case GL_PIXEL_MAP_B_TO_B_SIZE: + case GL_PIXEL_MAP_A_TO_A_SIZE: + case GL_UNPACK_SWAP_BYTES: + case GL_UNPACK_LSB_FIRST: + case GL_UNPACK_ROW_LENGTH: + case GL_UNPACK_SKIP_ROWS: + case GL_UNPACK_SKIP_PIXELS: + case GL_UNPACK_ALIGNMENT: + case GL_PACK_SWAP_BYTES: + case GL_PACK_LSB_FIRST: + case GL_PACK_ROW_LENGTH: + case GL_PACK_SKIP_ROWS: + case GL_PACK_SKIP_PIXELS: + case GL_PACK_ALIGNMENT: + case GL_MAP_COLOR: + case GL_MAP_STENCIL: + case GL_INDEX_SHIFT: + case GL_INDEX_OFFSET: + case GL_RED_SCALE: + case GL_RED_BIAS: + case GL_ZOOM_X: + case GL_ZOOM_Y: + case GL_GREEN_SCALE: + case GL_GREEN_BIAS: + case GL_BLUE_SCALE: + case GL_BLUE_BIAS: + case GL_ALPHA_SCALE: + case GL_ALPHA_BIAS: + case GL_DEPTH_SCALE: + case GL_DEPTH_BIAS: + case GL_MAX_EVAL_ORDER: + case GL_MAX_LIGHTS: + case GL_MAX_CLIP_PLANES: + case GL_MAX_TEXTURE_SIZE: + case GL_MAX_PIXEL_MAP_TABLE: + case GL_MAX_ATTRIB_STACK_DEPTH: + case GL_MAX_MODELVIEW_STACK_DEPTH: + case GL_MAX_NAME_STACK_DEPTH: + case GL_MAX_PROJECTION_STACK_DEPTH: + case GL_MAX_TEXTURE_STACK_DEPTH: + case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: + case GL_SUBPIXEL_BITS: + case GL_INDEX_BITS: + case GL_RED_BITS: + case GL_GREEN_BITS: + case GL_BLUE_BITS: + case GL_ALPHA_BITS: + case GL_DEPTH_BITS: + case GL_STENCIL_BITS: + case GL_ACCUM_RED_BITS: + case GL_ACCUM_GREEN_BITS: + case GL_ACCUM_BLUE_BITS: + case GL_ACCUM_ALPHA_BITS: + case GL_NAME_STACK_DEPTH: + case GL_AUTO_NORMAL: + case GL_MAP1_COLOR_4: + case GL_MAP1_INDEX: + case GL_MAP1_NORMAL: + case GL_MAP1_TEXTURE_COORD_1: + case GL_MAP1_TEXTURE_COORD_2: + case GL_MAP1_TEXTURE_COORD_3: + case GL_MAP1_TEXTURE_COORD_4: + case GL_MAP1_VERTEX_3: + case GL_MAP1_VERTEX_4: + case GL_MAP2_COLOR_4: + case GL_MAP2_INDEX: + case GL_MAP2_NORMAL: + case GL_MAP2_TEXTURE_COORD_1: + case GL_MAP2_TEXTURE_COORD_2: + case GL_MAP2_TEXTURE_COORD_3: + case GL_MAP2_TEXTURE_COORD_4: + case GL_MAP2_VERTEX_3: + case GL_MAP2_VERTEX_4: + case GL_MAP1_GRID_SEGMENTS: + case GL_TEXTURE_1D: + case GL_TEXTURE_2D: + case GL_POLYGON_OFFSET_UNITS: + case GL_CLIP_PLANE0: + case GL_CLIP_PLANE1: + case GL_CLIP_PLANE2: + case GL_CLIP_PLANE3: + case GL_CLIP_PLANE4: + case GL_CLIP_PLANE5: + case GL_LIGHT0: + case GL_LIGHT1: + case GL_LIGHT2: + case GL_LIGHT3: + case GL_LIGHT4: + case GL_LIGHT5: + case GL_LIGHT6: + case GL_LIGHT7: + case GL_BLEND_EQUATION: +/* case GL_BLEND_EQUATION_EXT:*/ + case GL_CONVOLUTION_1D: + case GL_CONVOLUTION_2D: + case GL_SEPARABLE_2D: + case GL_MAX_CONVOLUTION_WIDTH: +/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ + case GL_MAX_CONVOLUTION_HEIGHT: +/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ + case GL_POST_CONVOLUTION_RED_SCALE: +/* case GL_POST_CONVOLUTION_RED_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_GREEN_SCALE: +/* case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_BLUE_SCALE: +/* case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_ALPHA_SCALE: +/* case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_RED_BIAS: +/* case GL_POST_CONVOLUTION_RED_BIAS_EXT:*/ + case GL_POST_CONVOLUTION_GREEN_BIAS: +/* case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:*/ + case GL_POST_CONVOLUTION_BLUE_BIAS: +/* case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:*/ + case GL_POST_CONVOLUTION_ALPHA_BIAS: +/* case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:*/ + case GL_HISTOGRAM: + case GL_MINMAX: + case GL_POLYGON_OFFSET_FACTOR: + case GL_RESCALE_NORMAL: +/* case GL_RESCALE_NORMAL_EXT:*/ + case GL_TEXTURE_BINDING_1D: + case GL_TEXTURE_BINDING_2D: + case GL_TEXTURE_BINDING_3D: + case GL_PACK_SKIP_IMAGES: + case GL_PACK_IMAGE_HEIGHT: + case GL_UNPACK_SKIP_IMAGES: + case GL_UNPACK_IMAGE_HEIGHT: + case GL_TEXTURE_3D: + case GL_VERTEX_ARRAY: + case GL_NORMAL_ARRAY: + case GL_COLOR_ARRAY: + case GL_INDEX_ARRAY: + case GL_TEXTURE_COORD_ARRAY: + case GL_EDGE_FLAG_ARRAY: + case GL_VERTEX_ARRAY_SIZE: + case GL_VERTEX_ARRAY_TYPE: + case GL_VERTEX_ARRAY_STRIDE: + case GL_NORMAL_ARRAY_TYPE: + case GL_NORMAL_ARRAY_STRIDE: + case GL_COLOR_ARRAY_SIZE: + case GL_COLOR_ARRAY_TYPE: + case GL_COLOR_ARRAY_STRIDE: + case GL_INDEX_ARRAY_TYPE: + case GL_INDEX_ARRAY_STRIDE: + case GL_TEXTURE_COORD_ARRAY_SIZE: + case GL_TEXTURE_COORD_ARRAY_TYPE: + case GL_TEXTURE_COORD_ARRAY_STRIDE: + case GL_EDGE_FLAG_ARRAY_STRIDE: + case GL_MULTISAMPLE: +/* case GL_MULTISAMPLE_ARB:*/ + case GL_SAMPLE_ALPHA_TO_COVERAGE: +/* case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:*/ + case GL_SAMPLE_ALPHA_TO_ONE: +/* case GL_SAMPLE_ALPHA_TO_ONE_ARB:*/ + case GL_SAMPLE_COVERAGE: +/* case GL_SAMPLE_COVERAGE_ARB:*/ + case GL_SAMPLE_BUFFERS: +/* case GL_SAMPLE_BUFFERS_ARB:*/ + case GL_SAMPLES: +/* case GL_SAMPLES_ARB:*/ + case GL_SAMPLE_COVERAGE_VALUE: +/* case GL_SAMPLE_COVERAGE_VALUE_ARB:*/ + case GL_SAMPLE_COVERAGE_INVERT: +/* case GL_SAMPLE_COVERAGE_INVERT_ARB:*/ + case GL_COLOR_MATRIX_STACK_DEPTH: + case GL_MAX_COLOR_MATRIX_STACK_DEPTH: + case GL_POST_COLOR_MATRIX_RED_SCALE: + case GL_POST_COLOR_MATRIX_GREEN_SCALE: + case GL_POST_COLOR_MATRIX_BLUE_SCALE: + case GL_POST_COLOR_MATRIX_ALPHA_SCALE: + case GL_POST_COLOR_MATRIX_RED_BIAS: + case GL_POST_COLOR_MATRIX_GREEN_BIAS: + case GL_POST_COLOR_MATRIX_BLUE_BIAS: + case GL_POST_COLOR_MATRIX_ALPHA_BIAS: + case GL_BLEND_DST_RGB: + case GL_BLEND_SRC_RGB: + case GL_BLEND_DST_ALPHA: + case GL_BLEND_SRC_ALPHA: + case GL_COLOR_TABLE: + case GL_POST_CONVOLUTION_COLOR_TABLE: + case GL_POST_COLOR_MATRIX_COLOR_TABLE: + case GL_MAX_ELEMENTS_VERTICES: + case GL_MAX_ELEMENTS_INDICES: + case GL_CLIP_VOLUME_CLIPPING_HINT_EXT: + case GL_OCCLUSION_TEST_HP: + case GL_OCCLUSION_TEST_RESULT_HP: + case GL_LIGHT_MODEL_COLOR_CONTROL: + case GL_CURRENT_FOG_COORD: + case GL_FOG_COORDINATE_ARRAY_TYPE: + case GL_FOG_COORDINATE_ARRAY_STRIDE: + case GL_FOG_COORD_ARRAY: + case GL_COLOR_SUM_ARB: + case GL_SECONDARY_COLOR_ARRAY_SIZE: + case GL_SECONDARY_COLOR_ARRAY_TYPE: + case GL_SECONDARY_COLOR_ARRAY_STRIDE: + case GL_SECONDARY_COLOR_ARRAY: + case GL_ACTIVE_TEXTURE: +/* case GL_ACTIVE_TEXTURE_ARB:*/ + case GL_CLIENT_ACTIVE_TEXTURE: +/* case GL_CLIENT_ACTIVE_TEXTURE_ARB:*/ + case GL_MAX_TEXTURE_UNITS: +/* case GL_MAX_TEXTURE_UNITS_ARB:*/ + case GL_TEXTURE_COMPRESSION_HINT: +/* case GL_TEXTURE_COMPRESSION_HINT_ARB:*/ + case GL_TEXTURE_RECTANGLE_ARB: +/* case GL_TEXTURE_RECTANGLE_NV:*/ + case GL_TEXTURE_BINDING_RECTANGLE_ARB: +/* case GL_TEXTURE_BINDING_RECTANGLE_NV:*/ + case GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB: +/* case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:*/ + case GL_MAX_TEXTURE_LOD_BIAS: + case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: + case GL_MAX_SHININESS_NV: + case GL_MAX_SPOT_EXPONENT_NV: + case GL_TEXTURE_CUBE_MAP: +/* case GL_TEXTURE_CUBE_MAP_ARB:*/ + case GL_TEXTURE_BINDING_CUBE_MAP: +/* case GL_TEXTURE_BINDING_CUBE_MAP_ARB:*/ + case GL_MAX_CUBE_MAP_TEXTURE_SIZE: +/* case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:*/ + case GL_MULTISAMPLE_FILTER_HINT_NV: + case GL_FOG_DISTANCE_MODE_NV: + case GL_VERTEX_PROGRAM_ARB: + case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB: + case GL_MAX_PROGRAM_MATRICES_ARB: + case GL_CURRENT_MATRIX_STACK_DEPTH_ARB: + case GL_VERTEX_PROGRAM_POINT_SIZE_ARB: + case GL_VERTEX_PROGRAM_TWO_SIDE_ARB: + case GL_PROGRAM_ERROR_POSITION_ARB: + case GL_DEPTH_CLAMP_NV: + case GL_NUM_COMPRESSED_TEXTURE_FORMATS: +/* case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:*/ + case GL_MAX_VERTEX_UNITS_ARB: + case GL_ACTIVE_VERTEX_UNITS_ARB: + case GL_WEIGHT_SUM_UNITY_ARB: + case GL_VERTEX_BLEND_ARB: + case GL_CURRENT_WEIGHT_ARB: + case GL_WEIGHT_ARRAY_TYPE_ARB: + case GL_WEIGHT_ARRAY_STRIDE_ARB: + case GL_WEIGHT_ARRAY_SIZE_ARB: + case GL_WEIGHT_ARRAY_ARB: + case GL_PACK_INVERT_MESA: + case GL_FRAGMENT_PROGRAM_ARB: + case GL_MAX_DRAW_BUFFERS_ARB: +/* case GL_MAX_DRAW_BUFFERS_ATI:*/ + case GL_DRAW_BUFFER0_ARB: +/* case GL_DRAW_BUFFER0_ATI:*/ + case GL_DRAW_BUFFER1_ARB: +/* case GL_DRAW_BUFFER1_ATI:*/ + case GL_DRAW_BUFFER2_ARB: +/* case GL_DRAW_BUFFER2_ATI:*/ + case GL_DRAW_BUFFER3_ARB: +/* case GL_DRAW_BUFFER3_ATI:*/ + case GL_DRAW_BUFFER4_ARB: +/* case GL_DRAW_BUFFER4_ATI:*/ + case GL_DRAW_BUFFER5_ARB: +/* case GL_DRAW_BUFFER5_ATI:*/ + case GL_DRAW_BUFFER6_ARB: +/* case GL_DRAW_BUFFER6_ATI:*/ + case GL_DRAW_BUFFER7_ARB: +/* case GL_DRAW_BUFFER7_ATI:*/ + case GL_DRAW_BUFFER8_ARB: +/* case GL_DRAW_BUFFER8_ATI:*/ + case GL_DRAW_BUFFER9_ARB: +/* case GL_DRAW_BUFFER9_ATI:*/ + case GL_DRAW_BUFFER10_ARB: +/* case GL_DRAW_BUFFER10_ATI:*/ + case GL_DRAW_BUFFER11_ARB: +/* case GL_DRAW_BUFFER11_ATI:*/ + case GL_DRAW_BUFFER12_ARB: +/* case GL_DRAW_BUFFER12_ATI:*/ + case GL_DRAW_BUFFER13_ARB: +/* case GL_DRAW_BUFFER13_ATI:*/ + case GL_DRAW_BUFFER14_ARB: +/* case GL_DRAW_BUFFER14_ATI:*/ + case GL_DRAW_BUFFER15_ARB: +/* case GL_DRAW_BUFFER15_ATI:*/ + case GL_BLEND_EQUATION_ALPHA_EXT: + case GL_MATRIX_PALETTE_ARB: + case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB: + case GL_MAX_PALETTE_MATRICES_ARB: + case GL_CURRENT_PALETTE_MATRIX_ARB: + case GL_MATRIX_INDEX_ARRAY_ARB: + case GL_CURRENT_MATRIX_INDEX_ARB: + case GL_MATRIX_INDEX_ARRAY_SIZE_ARB: + case GL_MATRIX_INDEX_ARRAY_TYPE_ARB: + case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB: + case GL_POINT_SPRITE_ARB: +/* case GL_POINT_SPRITE_NV:*/ + case GL_POINT_SPRITE_R_MODE_NV: + case GL_MAX_VERTEX_ATTRIBS_ARB: + case GL_MAX_TEXTURE_COORDS_ARB: + case GL_MAX_TEXTURE_IMAGE_UNITS_ARB: + case GL_DEPTH_BOUNDS_TEST_EXT: + case GL_STENCIL_TEST_TWO_SIDE_EXT: + case GL_ACTIVE_STENCIL_FACE_EXT: + case GL_RASTER_POSITION_UNCLIPPED_IBM: + return 1; + case GL_SMOOTH_POINT_SIZE_RANGE: + case GL_LINE_WIDTH_RANGE: + case GL_POLYGON_MODE: + case GL_DEPTH_RANGE: + case GL_MAX_VIEWPORT_DIMS: + case GL_MAP1_GRID_DOMAIN: + case GL_MAP2_GRID_SEGMENTS: + case GL_ALIASED_POINT_SIZE_RANGE: + case GL_ALIASED_LINE_WIDTH_RANGE: + case GL_DEPTH_BOUNDS_EXT: + return 2; + case GL_CURRENT_NORMAL: + return 3; + case GL_CURRENT_COLOR: + case GL_CURRENT_TEXTURE_COORDS: + case GL_CURRENT_RASTER_COLOR: + case GL_CURRENT_RASTER_TEXTURE_COORDS: + case GL_CURRENT_RASTER_POSITION: + case GL_LIGHT_MODEL_AMBIENT: + case GL_FOG_COLOR: + case GL_ACCUM_CLEAR_VALUE: + case GL_VIEWPORT: + case GL_SCISSOR_BOX: + case GL_COLOR_CLEAR_VALUE: + case GL_COLOR_WRITEMASK: + case GL_MAP2_GRID_DOMAIN: + case GL_BLEND_COLOR: +/* case GL_BLEND_COLOR_EXT:*/ + case GL_CURRENT_SECONDARY_COLOR: + return 4; + case GL_MODELVIEW_MATRIX: + case GL_PROJECTION_MATRIX: + case GL_TEXTURE_MATRIX: + case GL_MODELVIEW0_ARB: + case GL_COLOR_MATRIX: + case GL_MODELVIEW1_ARB: + case GL_CURRENT_MATRIX_ARB: + case GL_MODELVIEW2_ARB: + case GL_MODELVIEW3_ARB: + case GL_MODELVIEW4_ARB: + case GL_MODELVIEW5_ARB: + case GL_MODELVIEW6_ARB: + case GL_MODELVIEW7_ARB: + case GL_MODELVIEW8_ARB: + case GL_MODELVIEW9_ARB: + case GL_MODELVIEW10_ARB: + case GL_MODELVIEW11_ARB: + case GL_MODELVIEW12_ARB: + case GL_MODELVIEW13_ARB: + case GL_MODELVIEW14_ARB: + case GL_MODELVIEW15_ARB: + case GL_MODELVIEW16_ARB: + case GL_MODELVIEW17_ARB: + case GL_MODELVIEW18_ARB: + case GL_MODELVIEW19_ARB: + case GL_MODELVIEW20_ARB: + case GL_MODELVIEW21_ARB: + case GL_MODELVIEW22_ARB: + case GL_MODELVIEW23_ARB: + case GL_MODELVIEW24_ARB: + case GL_MODELVIEW25_ARB: + case GL_MODELVIEW26_ARB: + case GL_MODELVIEW27_ARB: + case GL_MODELVIEW28_ARB: + case GL_MODELVIEW29_ARB: + case GL_MODELVIEW30_ARB: + case GL_MODELVIEW31_ARB: + case GL_TRANSPOSE_CURRENT_MATRIX_ARB: + return 16; + case GL_FOG_COORDINATE_SOURCE: + case GL_COMPRESSED_TEXTURE_FORMATS: + return __glGetBooleanv_variable_size(e); + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetTexParameterfv_size(GLenum e) +{ + switch (e) { + case GL_TEXTURE_MAG_FILTER: + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_PRIORITY: + case GL_TEXTURE_RESIDENT: + case GL_TEXTURE_WRAP_R: + case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: +/* case GL_SHADOW_AMBIENT_SGIX:*/ + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_CLIPMAP_FRAME_SGIX: + case GL_TEXTURE_LOD_BIAS_S_SGIX: + case GL_TEXTURE_LOD_BIAS_T_SGIX: + case GL_TEXTURE_LOD_BIAS_R_SGIX: + case GL_GENERATE_MIPMAP: +/* case GL_GENERATE_MIPMAP_SGIS:*/ + case GL_TEXTURE_COMPARE_SGIX: + case GL_TEXTURE_COMPARE_OPERATOR_SGIX: + case GL_TEXTURE_MAX_CLAMP_S_SGIX: + case GL_TEXTURE_MAX_CLAMP_T_SGIX: + case GL_TEXTURE_MAX_CLAMP_R_SGIX: + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + case GL_TEXTURE_LOD_BIAS: +/* case GL_TEXTURE_LOD_BIAS_EXT:*/ + case GL_DEPTH_TEXTURE_MODE: +/* case GL_DEPTH_TEXTURE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_MODE: +/* case GL_TEXTURE_COMPARE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_FUNC: +/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ + case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: + return 1; + case GL_TEXTURE_CLIPMAP_CENTER_SGIX: + case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: + return 2; + case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: + return 3; + case GL_TEXTURE_BORDER_COLOR: + case GL_POST_TEXTURE_FILTER_BIAS_SGIX: + case GL_POST_TEXTURE_FILTER_SCALE_SGIX: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetTexLevelParameterfv_size(GLenum e) +{ + switch (e) { + case GL_TEXTURE_WIDTH: + case GL_TEXTURE_HEIGHT: + case GL_TEXTURE_COMPONENTS: + case GL_TEXTURE_BORDER: + case GL_TEXTURE_RED_SIZE: +/* case GL_TEXTURE_RED_SIZE_EXT:*/ + case GL_TEXTURE_GREEN_SIZE: +/* case GL_TEXTURE_GREEN_SIZE_EXT:*/ + case GL_TEXTURE_BLUE_SIZE: +/* case GL_TEXTURE_BLUE_SIZE_EXT:*/ + case GL_TEXTURE_ALPHA_SIZE: +/* case GL_TEXTURE_ALPHA_SIZE_EXT:*/ + case GL_TEXTURE_LUMINANCE_SIZE: +/* case GL_TEXTURE_LUMINANCE_SIZE_EXT:*/ + case GL_TEXTURE_INTENSITY_SIZE: +/* case GL_TEXTURE_INTENSITY_SIZE_EXT:*/ + case GL_TEXTURE_DEPTH: + case GL_TEXTURE_INDEX_SIZE_EXT: + case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: +/* case GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB:*/ + case GL_TEXTURE_COMPRESSED: +/* case GL_TEXTURE_COMPRESSED_ARB:*/ + case GL_TEXTURE_DEPTH_SIZE: +/* case GL_TEXTURE_DEPTH_SIZE_ARB:*/ + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glColorTableParameterfv_size(GLenum e) +{ + switch (e) { + case GL_COLOR_TABLE_SCALE: + case GL_COLOR_TABLE_BIAS: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetColorTableParameterfv_size(GLenum e) +{ + switch (e) { + case GL_COLOR_TABLE_FORMAT: +/* case GL_COLOR_TABLE_FORMAT_EXT:*/ + case GL_COLOR_TABLE_WIDTH: +/* case GL_COLOR_TABLE_WIDTH_EXT:*/ + case GL_COLOR_TABLE_RED_SIZE: +/* case GL_COLOR_TABLE_RED_SIZE_EXT:*/ + case GL_COLOR_TABLE_GREEN_SIZE: +/* case GL_COLOR_TABLE_GREEN_SIZE_EXT:*/ + case GL_COLOR_TABLE_BLUE_SIZE: +/* case GL_COLOR_TABLE_BLUE_SIZE_EXT:*/ + case GL_COLOR_TABLE_ALPHA_SIZE: +/* case GL_COLOR_TABLE_ALPHA_SIZE_EXT:*/ + case GL_COLOR_TABLE_LUMINANCE_SIZE: +/* case GL_COLOR_TABLE_LUMINANCE_SIZE_EXT:*/ + case GL_COLOR_TABLE_INTENSITY_SIZE: +/* case GL_COLOR_TABLE_INTENSITY_SIZE_EXT:*/ + return 1; + case GL_COLOR_TABLE_SCALE: + case GL_COLOR_TABLE_BIAS: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glConvolutionParameterfv_size(GLenum e) +{ + switch (e) { + case GL_CONVOLUTION_BORDER_MODE: +/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ + return 1; + case GL_CONVOLUTION_FILTER_SCALE: +/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ + case GL_CONVOLUTION_FILTER_BIAS: +/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ + case GL_CONVOLUTION_BORDER_COLOR: +/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetConvolutionParameterfv_size(GLenum e) +{ + switch (e) { + case GL_CONVOLUTION_BORDER_MODE: +/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ + case GL_CONVOLUTION_FORMAT: +/* case GL_CONVOLUTION_FORMAT_EXT:*/ + case GL_CONVOLUTION_WIDTH: +/* case GL_CONVOLUTION_WIDTH_EXT:*/ + case GL_CONVOLUTION_HEIGHT: +/* case GL_CONVOLUTION_HEIGHT_EXT:*/ + case GL_MAX_CONVOLUTION_WIDTH: +/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ + case GL_MAX_CONVOLUTION_HEIGHT: +/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ + return 1; + case GL_CONVOLUTION_FILTER_SCALE: +/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ + case GL_CONVOLUTION_FILTER_BIAS: +/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ + case GL_CONVOLUTION_BORDER_COLOR: +/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetHistogramParameterfv_size(GLenum e) +{ + switch (e) { + case GL_HISTOGRAM_WIDTH: + case GL_HISTOGRAM_FORMAT: + case GL_HISTOGRAM_RED_SIZE: + case GL_HISTOGRAM_GREEN_SIZE: + case GL_HISTOGRAM_BLUE_SIZE: + case GL_HISTOGRAM_ALPHA_SIZE: + case GL_HISTOGRAM_LUMINANCE_SIZE: + case GL_HISTOGRAM_SINK: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetMinmaxParameterfv_size(GLenum e) +{ + switch (e) { + case GL_MINMAX_FORMAT: + case GL_MINMAX_SINK: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetProgramivARB_size(GLenum e) +{ + switch (e) { + case GL_PROGRAM_LENGTH_ARB: + case GL_PROGRAM_BINDING_ARB: + case GL_PROGRAM_ALU_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEX_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEX_INDIRECTIONS_ARB: + case GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: + case GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: + case GL_PROGRAM_FORMAT_ARB: + case GL_PROGRAM_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEMPORARIES_ARB: + case GL_MAX_PROGRAM_TEMPORARIES_ARB: + case GL_PROGRAM_NATIVE_TEMPORARIES_ARB: + case GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB: + case GL_PROGRAM_PARAMETERS_ARB: + case GL_MAX_PROGRAM_PARAMETERS_ARB: + case GL_PROGRAM_NATIVE_PARAMETERS_ARB: + case GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB: + case GL_PROGRAM_ATTRIBS_ARB: + case GL_MAX_PROGRAM_ATTRIBS_ARB: + case GL_PROGRAM_NATIVE_ATTRIBS_ARB: + case GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB: + case GL_PROGRAM_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB: + case GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB: + case GL_MAX_PROGRAM_ENV_PARAMETERS_ARB: + case GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB: + case GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV: + case GL_MAX_PROGRAM_CALL_DEPTH_NV: + case GL_MAX_PROGRAM_IF_DEPTH_NV: + case GL_MAX_PROGRAM_LOOP_DEPTH_NV: + case GL_MAX_PROGRAM_LOOP_COUNT_NV: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetVertexAttribdvARB_size(GLenum e) +{ + switch (e) { + case GL_VERTEX_PROGRAM_ARB: + case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB: + case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB: + case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB: + case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB: + case GL_CURRENT_VERTEX_ATTRIB_ARB: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetQueryObjectivARB_size(GLenum e) +{ + switch (e) { + case GL_QUERY_RESULT_ARB: + case GL_QUERY_RESULT_AVAILABLE_ARB: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetQueryivARB_size(GLenum e) +{ + switch (e) { + case GL_QUERY_COUNTER_BITS_ARB: + case GL_CURRENT_QUERY_ARB: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glPointParameterfvEXT_size(GLenum e) +{ + switch (e) { + case GL_POINT_SIZE_MIN: +/* case GL_POINT_SIZE_MIN_ARB:*/ +/* case GL_POINT_SIZE_MIN_SGIS:*/ + case GL_POINT_SIZE_MAX: +/* case GL_POINT_SIZE_MAX_ARB:*/ +/* case GL_POINT_SIZE_MAX_SGIS:*/ + case GL_POINT_FADE_THRESHOLD_SIZE: +/* case GL_POINT_FADE_THRESHOLD_SIZE_ARB:*/ +/* case GL_POINT_FADE_THRESHOLD_SIZE_SGIS:*/ + case GL_POINT_SPRITE_R_MODE_NV: + case GL_POINT_SPRITE_COORD_ORIGIN: + return 1; + case GL_POINT_DISTANCE_ATTENUATION: +/* case GL_POINT_DISTANCE_ATTENUATION_ARB:*/ +/* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/ + return 3; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetProgramivNV_size(GLenum e) +{ + switch (e) { + case GL_PROGRAM_LENGTH_NV: + case GL_PROGRAM_TARGET_NV: + case GL_PROGRAM_RESIDENT_NV: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetVertexAttribdvNV_size(GLenum e) +{ + switch (e) { + case GL_ATTRIB_ARRAY_SIZE_NV: + case GL_ATTRIB_ARRAY_STRIDE_NV: + case GL_ATTRIB_ARRAY_TYPE_NV: + case GL_CURRENT_ATTRIB_NV: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetFramebufferAttachmentParameterivEXT_size(GLenum e) +{ + switch (e) { + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT: + return 1; + default: + return 0; + } +} + +ALIAS(Fogiv, Fogfv) + ALIAS(Lightiv, Lightfv) + ALIAS(LightModeliv, LightModelfv) + ALIAS(Materialiv, Materialfv) + ALIAS(TexParameteriv, TexParameterfv) + ALIAS(TexEnviv, TexEnvfv) + ALIAS(TexGenfv, TexGendv) + ALIAS(TexGeniv, TexGendv) + ALIAS(Map1f, Map1d) + ALIAS(Map2f, Map2d) + ALIAS(GetDoublev, GetBooleanv) + ALIAS(GetFloatv, GetBooleanv) + ALIAS(GetIntegerv, GetBooleanv) + ALIAS(GetLightfv, Lightfv) + ALIAS(GetLightiv, Lightfv) + ALIAS(GetMaterialfv, Materialfv) + ALIAS(GetMaterialiv, Materialfv) + ALIAS(GetTexEnvfv, TexEnvfv) + ALIAS(GetTexEnviv, TexEnvfv) + ALIAS(GetTexGendv, TexGendv) + ALIAS(GetTexGenfv, TexGendv) + ALIAS(GetTexGeniv, TexGendv) + ALIAS(GetTexParameteriv, GetTexParameterfv) + ALIAS(GetTexLevelParameteriv, GetTexLevelParameterfv) + ALIAS(ColorTableParameteriv, ColorTableParameterfv) + ALIAS(GetColorTableParameteriv, GetColorTableParameterfv) + ALIAS(ConvolutionParameteriv, ConvolutionParameterfv) + ALIAS(GetConvolutionParameteriv, GetConvolutionParameterfv) + ALIAS(GetHistogramParameteriv, GetHistogramParameterfv) + ALIAS(GetMinmaxParameteriv, GetMinmaxParameterfv) + ALIAS(GetVertexAttribfvARB, GetVertexAttribdvARB) + ALIAS(GetVertexAttribivARB, GetVertexAttribdvARB) + ALIAS(GetQueryObjectuivARB, GetQueryObjectivARB) + ALIAS(GetVertexAttribfvNV, GetVertexAttribdvNV) + ALIAS(GetVertexAttribivNV, GetVertexAttribdvNV) + ALIAS(PointParameterivNV, PointParameterfvEXT) +# undef PURE +# undef FASTCALL +# undef INTERNAL diff --git a/xorg-server-1.4/GL/glx/indirect_size_get.h b/xorg-server-1.4/GL/glx/indirect_size_get.h new file mode 100644 index 0000000..4fcb55b --- /dev/null +++ b/xorg-server-1.4/GL/glx/indirect_size_get.h @@ -0,0 +1,102 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2004 + * 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, sub license, + * 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 + * IBM, + * 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. + */ + +#if !defined( _INDIRECT_SIZE_GET_H_ ) +# define _INDIRECT_SIZE_GET_H_ + +/** + * \file + * Prototypes for functions used to determine the number of data elements in + * various GLX protocol messages. + * + * \author Ian Romanick + */ + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define PURE __attribute__((pure)) +# else +# define PURE +# endif + +# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) +# define FASTCALL __attribute__((fastcall)) +# else +# define FASTCALL +# endif + +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) +# define INTERNAL __attribute__((visibility("internal"))) +# else +# define INTERNAL +# endif + +extern INTERNAL PURE FASTCALL GLint __glGetBooleanv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetDoublev_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetFloatv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetIntegerv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetLightfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetLightiv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMaterialfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMaterialiv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexEnvfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexEnviv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexGendv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexGenfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexGeniv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint +__glGetConvolutionParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint +__glGetConvolutionParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetProgramivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectuivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvNV_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvNV_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivNV_size(GLenum); +extern INTERNAL PURE FASTCALL GLint +__glGetFramebufferAttachmentParameterivEXT_size(GLenum); + +# undef PURE +# undef FASTCALL +# undef INTERNAL + +#endif /* !defined( _INDIRECT_SIZE_GET_H_ ) */ diff --git a/xorg-server-1.4/GL/glx/indirect_table.c b/xorg-server-1.4/GL/glx/indirect_table.c new file mode 100644 index 0000000..9d0383c --- /dev/null +++ b/xorg-server-1.4/GL/glx/indirect_table.c @@ -0,0 +1,1596 @@ +/* DO NOT EDIT - This file generated automatically by glX_server_table.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005, 2006 + * 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, sub license, + * 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 + * IBM, + * 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. + */ + +#include +#include "glxserver.h" +#include "glxext.h" +#include "indirect_dispatch.h" +#include "indirect_reqsize.h" +#include "g_disptab.h" +#include "indirect_table.h" + +/*****************************************************************/ +/* tree depth = 3 */ +static const int_fast16_t Single_dispatch_tree[24] = { + /* [0] -> opcode range [0, 256], node depth 1 */ + 2, + 5, + 13, + 16, + EMPTY_LEAF, + + /* [5] -> opcode range [0, 64], node depth 2 */ + 2, + LEAF(0), + LEAF(16), + 10, + EMPTY_LEAF, + + /* [10] -> opcode range [32, 48], node depth 3 */ + 1, + LEAF(32), + EMPTY_LEAF, + + /* [13] -> opcode range [64, 128], node depth 2 */ + 1, + EMPTY_LEAF, + LEAF(40), + + /* [16] -> opcode range [128, 192], node depth 2 */ + 2, + LEAF(72), + LEAF(88), + 21, + EMPTY_LEAF, + + /* [21] -> opcode range [160, 176], node depth 3 */ + 1, + LEAF(104), + EMPTY_LEAF, + +}; + +static const void *Single_function_table[112][2] = { + /* [ 0] = 0 */ {NULL, NULL}, + /* [ 1] = 1 */ {__glXDisp_Render, __glXDispSwap_Render}, + /* [ 2] = 2 */ {__glXDisp_RenderLarge, __glXDispSwap_RenderLarge}, + /* [ 3] = 3 */ {__glXDisp_CreateContext, __glXDispSwap_CreateContext}, + /* [ 4] = 4 */ {__glXDisp_DestroyContext, __glXDispSwap_DestroyContext}, + /* [ 5] = 5 */ {__glXDisp_MakeCurrent, __glXDispSwap_MakeCurrent}, + /* [ 6] = 6 */ {__glXDisp_IsDirect, __glXDispSwap_IsDirect}, + /* [ 7] = 7 */ {__glXDisp_QueryVersion, __glXDispSwap_QueryVersion}, + /* [ 8] = 8 */ {__glXDisp_WaitGL, __glXDispSwap_WaitGL}, + /* [ 9] = 9 */ {__glXDisp_WaitX, __glXDispSwap_WaitX}, + /* [ 10] = 10 */ {__glXDisp_CopyContext, __glXDispSwap_CopyContext}, + /* [ 11] = 11 */ {__glXDisp_SwapBuffers, __glXDispSwap_SwapBuffers}, + /* [ 12] = 12 */ {__glXDisp_UseXFont, __glXDispSwap_UseXFont}, + /* [ 13] = 13 */ {__glXDisp_CreateGLXPixmap, __glXDispSwap_CreateGLXPixmap}, + /* [ 14] = 14 */ {__glXDisp_GetVisualConfigs, __glXDispSwap_GetVisualConfigs}, + /* [ 15] = 15 */ {__glXDisp_DestroyGLXPixmap, __glXDispSwap_DestroyGLXPixmap}, + /* [ 16] = 16 */ {__glXDisp_VendorPrivate, __glXDispSwap_VendorPrivate}, + /* [ 17] = 17 */ {__glXDisp_VendorPrivateWithReply, __glXDispSwap_VendorPrivateWithReply}, + /* [ 18] = 18 */ {__glXDisp_QueryExtensionsString, __glXDispSwap_QueryExtensionsString}, + /* [ 19] = 19 */ {__glXDisp_QueryServerString, __glXDispSwap_QueryServerString}, + /* [ 20] = 20 */ {__glXDisp_ClientInfo, __glXDispSwap_ClientInfo}, + /* [ 21] = 21 */ {__glXDisp_GetFBConfigs, __glXDispSwap_GetFBConfigs}, + /* [ 22] = 22 */ {__glXDisp_CreatePixmap, __glXDispSwap_CreatePixmap}, + /* [ 23] = 23 */ {__glXDisp_DestroyPixmap, __glXDispSwap_DestroyPixmap}, + /* [ 24] = 24 */ {__glXDisp_CreateNewContext, __glXDispSwap_CreateNewContext}, + /* [ 25] = 25 */ {__glXDisp_QueryContext, __glXDispSwap_QueryContext}, + /* [ 26] = 26 */ {__glXDisp_MakeContextCurrent, __glXDispSwap_MakeContextCurrent}, + /* [ 27] = 27 */ {__glXDisp_CreatePbuffer, __glXDispSwap_CreatePbuffer}, + /* [ 28] = 28 */ {__glXDisp_DestroyPbuffer, __glXDispSwap_DestroyPbuffer}, + /* [ 29] = 29 */ {__glXDisp_GetDrawableAttributes, __glXDispSwap_GetDrawableAttributes}, + /* [ 30] = 30 */ {__glXDisp_ChangeDrawableAttributes, __glXDispSwap_ChangeDrawableAttributes}, + /* [ 31] = 31 */ {__glXDisp_CreateWindow, __glXDispSwap_CreateWindow}, + /* [ 32] = 32 */ {__glXDisp_DestroyWindow, __glXDispSwap_DestroyWindow}, + /* [ 33] = 33 */ {NULL, NULL}, + /* [ 34] = 34 */ {NULL, NULL}, + /* [ 35] = 35 */ {NULL, NULL}, + /* [ 36] = 36 */ {NULL, NULL}, + /* [ 37] = 37 */ {NULL, NULL}, + /* [ 38] = 38 */ {NULL, NULL}, + /* [ 39] = 39 */ {NULL, NULL}, + /* [ 40] = 96 */ {NULL, NULL}, + /* [ 41] = 97 */ {NULL, NULL}, + /* [ 42] = 98 */ {NULL, NULL}, + /* [ 43] = 99 */ {NULL, NULL}, + /* [ 44] = 100 */ {NULL, NULL}, + /* [ 45] = 101 */ {__glXDisp_NewList, __glXDispSwap_NewList}, + /* [ 46] = 102 */ {__glXDisp_EndList, __glXDispSwap_EndList}, + /* [ 47] = 103 */ {__glXDisp_DeleteLists, __glXDispSwap_DeleteLists}, + /* [ 48] = 104 */ {__glXDisp_GenLists, __glXDispSwap_GenLists}, + /* [ 49] = 105 */ {__glXDisp_FeedbackBuffer, __glXDispSwap_FeedbackBuffer}, + /* [ 50] = 106 */ {__glXDisp_SelectBuffer, __glXDispSwap_SelectBuffer}, + /* [ 51] = 107 */ {__glXDisp_RenderMode, __glXDispSwap_RenderMode}, + /* [ 52] = 108 */ {__glXDisp_Finish, __glXDispSwap_Finish}, + /* [ 53] = 109 */ {__glXDisp_PixelStoref, __glXDispSwap_PixelStoref}, + /* [ 54] = 110 */ {__glXDisp_PixelStorei, __glXDispSwap_PixelStorei}, + /* [ 55] = 111 */ {__glXDisp_ReadPixels, __glXDispSwap_ReadPixels}, + /* [ 56] = 112 */ {__glXDisp_GetBooleanv, __glXDispSwap_GetBooleanv}, + /* [ 57] = 113 */ {__glXDisp_GetClipPlane, __glXDispSwap_GetClipPlane}, + /* [ 58] = 114 */ {__glXDisp_GetDoublev, __glXDispSwap_GetDoublev}, + /* [ 59] = 115 */ {__glXDisp_GetError, __glXDispSwap_GetError}, + /* [ 60] = 116 */ {__glXDisp_GetFloatv, __glXDispSwap_GetFloatv}, + /* [ 61] = 117 */ {__glXDisp_GetIntegerv, __glXDispSwap_GetIntegerv}, + /* [ 62] = 118 */ {__glXDisp_GetLightfv, __glXDispSwap_GetLightfv}, + /* [ 63] = 119 */ {__glXDisp_GetLightiv, __glXDispSwap_GetLightiv}, + /* [ 64] = 120 */ {__glXDisp_GetMapdv, __glXDispSwap_GetMapdv}, + /* [ 65] = 121 */ {__glXDisp_GetMapfv, __glXDispSwap_GetMapfv}, + /* [ 66] = 122 */ {__glXDisp_GetMapiv, __glXDispSwap_GetMapiv}, + /* [ 67] = 123 */ {__glXDisp_GetMaterialfv, __glXDispSwap_GetMaterialfv}, + /* [ 68] = 124 */ {__glXDisp_GetMaterialiv, __glXDispSwap_GetMaterialiv}, + /* [ 69] = 125 */ {__glXDisp_GetPixelMapfv, __glXDispSwap_GetPixelMapfv}, + /* [ 70] = 126 */ {__glXDisp_GetPixelMapuiv, __glXDispSwap_GetPixelMapuiv}, + /* [ 71] = 127 */ {__glXDisp_GetPixelMapusv, __glXDispSwap_GetPixelMapusv}, + /* [ 72] = 128 */ {__glXDisp_GetPolygonStipple, __glXDispSwap_GetPolygonStipple}, + /* [ 73] = 129 */ {__glXDisp_GetString, __glXDispSwap_GetString}, + /* [ 74] = 130 */ {__glXDisp_GetTexEnvfv, __glXDispSwap_GetTexEnvfv}, + /* [ 75] = 131 */ {__glXDisp_GetTexEnviv, __glXDispSwap_GetTexEnviv}, + /* [ 76] = 132 */ {__glXDisp_GetTexGendv, __glXDispSwap_GetTexGendv}, + /* [ 77] = 133 */ {__glXDisp_GetTexGenfv, __glXDispSwap_GetTexGenfv}, + /* [ 78] = 134 */ {__glXDisp_GetTexGeniv, __glXDispSwap_GetTexGeniv}, + /* [ 79] = 135 */ {__glXDisp_GetTexImage, __glXDispSwap_GetTexImage}, + /* [ 80] = 136 */ {__glXDisp_GetTexParameterfv, __glXDispSwap_GetTexParameterfv}, + /* [ 81] = 137 */ {__glXDisp_GetTexParameteriv, __glXDispSwap_GetTexParameteriv}, + /* [ 82] = 138 */ {__glXDisp_GetTexLevelParameterfv, __glXDispSwap_GetTexLevelParameterfv}, + /* [ 83] = 139 */ {__glXDisp_GetTexLevelParameteriv, __glXDispSwap_GetTexLevelParameteriv}, + /* [ 84] = 140 */ {__glXDisp_IsEnabled, __glXDispSwap_IsEnabled}, + /* [ 85] = 141 */ {__glXDisp_IsList, __glXDispSwap_IsList}, + /* [ 86] = 142 */ {__glXDisp_Flush, __glXDispSwap_Flush}, + /* [ 87] = 143 */ {__glXDisp_AreTexturesResident, __glXDispSwap_AreTexturesResident}, + /* [ 88] = 144 */ {__glXDisp_DeleteTextures, __glXDispSwap_DeleteTextures}, + /* [ 89] = 145 */ {__glXDisp_GenTextures, __glXDispSwap_GenTextures}, + /* [ 90] = 146 */ {__glXDisp_IsTexture, __glXDispSwap_IsTexture}, + /* [ 91] = 147 */ {__glXDisp_GetColorTable, __glXDispSwap_GetColorTable}, + /* [ 92] = 148 */ {__glXDisp_GetColorTableParameterfv, __glXDispSwap_GetColorTableParameterfv}, + /* [ 93] = 149 */ {__glXDisp_GetColorTableParameteriv, __glXDispSwap_GetColorTableParameteriv}, + /* [ 94] = 150 */ {__glXDisp_GetConvolutionFilter, __glXDispSwap_GetConvolutionFilter}, + /* [ 95] = 151 */ {__glXDisp_GetConvolutionParameterfv, __glXDispSwap_GetConvolutionParameterfv}, + /* [ 96] = 152 */ {__glXDisp_GetConvolutionParameteriv, __glXDispSwap_GetConvolutionParameteriv}, + /* [ 97] = 153 */ {__glXDisp_GetSeparableFilter, __glXDispSwap_GetSeparableFilter}, + /* [ 98] = 154 */ {__glXDisp_GetHistogram, __glXDispSwap_GetHistogram}, + /* [ 99] = 155 */ {__glXDisp_GetHistogramParameterfv, __glXDispSwap_GetHistogramParameterfv}, + /* [ 100] = 156 */ {__glXDisp_GetHistogramParameteriv, __glXDispSwap_GetHistogramParameteriv}, + /* [ 101] = 157 */ {__glXDisp_GetMinmax, __glXDispSwap_GetMinmax}, + /* [ 102] = 158 */ {__glXDisp_GetMinmaxParameterfv, __glXDispSwap_GetMinmaxParameterfv}, + /* [ 103] = 159 */ {__glXDisp_GetMinmaxParameteriv, __glXDispSwap_GetMinmaxParameteriv}, + /* [ 104] = 160 */ {__glXDisp_GetCompressedTexImageARB, __glXDispSwap_GetCompressedTexImageARB}, + /* [ 105] = 161 */ {__glXDisp_DeleteQueriesARB, __glXDispSwap_DeleteQueriesARB}, + /* [ 106] = 162 */ {__glXDisp_GenQueriesARB, __glXDispSwap_GenQueriesARB}, + /* [ 107] = 163 */ {__glXDisp_IsQueryARB, __glXDispSwap_IsQueryARB}, + /* [ 108] = 164 */ {__glXDisp_GetQueryivARB, __glXDispSwap_GetQueryivARB}, + /* [ 109] = 165 */ {__glXDisp_GetQueryObjectivARB, __glXDispSwap_GetQueryObjectivARB}, + /* [ 110] = 166 */ {__glXDisp_GetQueryObjectuivARB, __glXDispSwap_GetQueryObjectuivARB}, + /* [ 111] = 167 */ {NULL, NULL}, +}; + +const struct __glXDispatchInfo Single_dispatch_info = { + 8, + Single_dispatch_tree, + Single_function_table, + NULL, + NULL +}; + +/*****************************************************************/ +/* tree depth = 8 */ +static const int_fast16_t Render_dispatch_tree[95] = { + /* [0] -> opcode range [0, 8192], node depth 1 */ + 2, + 5, + 31, + 54, + EMPTY_LEAF, + + /* [5] -> opcode range [0, 2048], node depth 2 */ + 1, + 8, + EMPTY_LEAF, + + /* [8] -> opcode range [0, 1024], node depth 3 */ + 1, + 11, + EMPTY_LEAF, + + /* [11] -> opcode range [0, 512], node depth 4 */ + 1, + 14, + EMPTY_LEAF, + + /* [14] -> opcode range [0, 256], node depth 5 */ + 4, + LEAF(0), + LEAF(16), + LEAF(32), + LEAF(48), + LEAF(64), + LEAF(80), + LEAF(96), + LEAF(112), + LEAF(128), + LEAF(144), + LEAF(160), + LEAF(176), + LEAF(192), + LEAF(208), + LEAF(224), + EMPTY_LEAF, + + /* [31] -> opcode range [2048, 4096], node depth 2 */ + 1, + 34, + EMPTY_LEAF, + + /* [34] -> opcode range [2048, 3072], node depth 3 */ + 1, + 37, + EMPTY_LEAF, + + /* [37] -> opcode range [2048, 2560], node depth 4 */ + 1, + 40, + EMPTY_LEAF, + + /* [40] -> opcode range [2048, 2304], node depth 5 */ + 1, + 43, + EMPTY_LEAF, + + /* [43] -> opcode range [2048, 2176], node depth 6 */ + 1, + 46, + EMPTY_LEAF, + + /* [46] -> opcode range [2048, 2112], node depth 7 */ + 1, + 49, + EMPTY_LEAF, + + /* [49] -> opcode range [2048, 2080], node depth 8 */ + 2, + LEAF(240), + LEAF(248), + LEAF(256), + EMPTY_LEAF, + + /* [54] -> opcode range [4096, 6144], node depth 2 */ + 1, + 57, + EMPTY_LEAF, + + /* [57] -> opcode range [4096, 5120], node depth 3 */ + 1, + 60, + EMPTY_LEAF, + + /* [60] -> opcode range [4096, 4608], node depth 4 */ + 1, + 63, + EMPTY_LEAF, + + /* [63] -> opcode range [4096, 4352], node depth 5 */ + 4, + LEAF(264), + LEAF(280), + 80, + EMPTY_LEAF, + EMPTY_LEAF, + LEAF(296), + LEAF(312), + LEAF(328), + LEAF(344), + EMPTY_LEAF, + 83, + 86, + EMPTY_LEAF, + 89, + 92, + EMPTY_LEAF, + + /* [80] -> opcode range [4128, 4144], node depth 6 */ + 1, + LEAF(360), + EMPTY_LEAF, + + /* [83] -> opcode range [4256, 4272], node depth 6 */ + 1, + EMPTY_LEAF, + LEAF(368), + + /* [86] -> opcode range [4272, 4288], node depth 6 */ + 1, + LEAF(376), + EMPTY_LEAF, + + /* [89] -> opcode range [4304, 4320], node depth 6 */ + 1, + EMPTY_LEAF, + LEAF(384), + + /* [92] -> opcode range [4320, 4336], node depth 6 */ + 1, + LEAF(392), + EMPTY_LEAF, + +}; + +static const void *Render_function_table[400][2] = { + /* [ 0] = 0 */ {NULL, NULL}, + /* [ 1] = 1 */ {__glXDisp_CallList, __glXDispSwap_CallList}, + /* [ 2] = 2 */ {__glXDisp_CallLists, __glXDispSwap_CallLists}, + /* [ 3] = 3 */ {__glXDisp_ListBase, __glXDispSwap_ListBase}, + /* [ 4] = 4 */ {__glXDisp_Begin, __glXDispSwap_Begin}, + /* [ 5] = 5 */ {__glXDisp_Bitmap, __glXDispSwap_Bitmap}, + /* [ 6] = 6 */ {__glXDisp_Color3bv, __glXDispSwap_Color3bv}, + /* [ 7] = 7 */ {__glXDisp_Color3dv, __glXDispSwap_Color3dv}, + /* [ 8] = 8 */ {__glXDisp_Color3fv, __glXDispSwap_Color3fv}, + /* [ 9] = 9 */ {__glXDisp_Color3iv, __glXDispSwap_Color3iv}, + /* [ 10] = 10 */ {__glXDisp_Color3sv, __glXDispSwap_Color3sv}, + /* [ 11] = 11 */ {__glXDisp_Color3ubv, __glXDispSwap_Color3ubv}, + /* [ 12] = 12 */ {__glXDisp_Color3uiv, __glXDispSwap_Color3uiv}, + /* [ 13] = 13 */ {__glXDisp_Color3usv, __glXDispSwap_Color3usv}, + /* [ 14] = 14 */ {__glXDisp_Color4bv, __glXDispSwap_Color4bv}, + /* [ 15] = 15 */ {__glXDisp_Color4dv, __glXDispSwap_Color4dv}, + /* [ 16] = 16 */ {__glXDisp_Color4fv, __glXDispSwap_Color4fv}, + /* [ 17] = 17 */ {__glXDisp_Color4iv, __glXDispSwap_Color4iv}, + /* [ 18] = 18 */ {__glXDisp_Color4sv, __glXDispSwap_Color4sv}, + /* [ 19] = 19 */ {__glXDisp_Color4ubv, __glXDispSwap_Color4ubv}, + /* [ 20] = 20 */ {__glXDisp_Color4uiv, __glXDispSwap_Color4uiv}, + /* [ 21] = 21 */ {__glXDisp_Color4usv, __glXDispSwap_Color4usv}, + /* [ 22] = 22 */ {__glXDisp_EdgeFlagv, __glXDispSwap_EdgeFlagv}, + /* [ 23] = 23 */ {__glXDisp_End, __glXDispSwap_End}, + /* [ 24] = 24 */ {__glXDisp_Indexdv, __glXDispSwap_Indexdv}, + /* [ 25] = 25 */ {__glXDisp_Indexfv, __glXDispSwap_Indexfv}, + /* [ 26] = 26 */ {__glXDisp_Indexiv, __glXDispSwap_Indexiv}, + /* [ 27] = 27 */ {__glXDisp_Indexsv, __glXDispSwap_Indexsv}, + /* [ 28] = 28 */ {__glXDisp_Normal3bv, __glXDispSwap_Normal3bv}, + /* [ 29] = 29 */ {__glXDisp_Normal3dv, __glXDispSwap_Normal3dv}, + /* [ 30] = 30 */ {__glXDisp_Normal3fv, __glXDispSwap_Normal3fv}, + /* [ 31] = 31 */ {__glXDisp_Normal3iv, __glXDispSwap_Normal3iv}, + /* [ 32] = 32 */ {__glXDisp_Normal3sv, __glXDispSwap_Normal3sv}, + /* [ 33] = 33 */ {__glXDisp_RasterPos2dv, __glXDispSwap_RasterPos2dv}, + /* [ 34] = 34 */ {__glXDisp_RasterPos2fv, __glXDispSwap_RasterPos2fv}, + /* [ 35] = 35 */ {__glXDisp_RasterPos2iv, __glXDispSwap_RasterPos2iv}, + /* [ 36] = 36 */ {__glXDisp_RasterPos2sv, __glXDispSwap_RasterPos2sv}, + /* [ 37] = 37 */ {__glXDisp_RasterPos3dv, __glXDispSwap_RasterPos3dv}, + /* [ 38] = 38 */ {__glXDisp_RasterPos3fv, __glXDispSwap_RasterPos3fv}, + /* [ 39] = 39 */ {__glXDisp_RasterPos3iv, __glXDispSwap_RasterPos3iv}, + /* [ 40] = 40 */ {__glXDisp_RasterPos3sv, __glXDispSwap_RasterPos3sv}, + /* [ 41] = 41 */ {__glXDisp_RasterPos4dv, __glXDispSwap_RasterPos4dv}, + /* [ 42] = 42 */ {__glXDisp_RasterPos4fv, __glXDispSwap_RasterPos4fv}, + /* [ 43] = 43 */ {__glXDisp_RasterPos4iv, __glXDispSwap_RasterPos4iv}, + /* [ 44] = 44 */ {__glXDisp_RasterPos4sv, __glXDispSwap_RasterPos4sv}, + /* [ 45] = 45 */ {__glXDisp_Rectdv, __glXDispSwap_Rectdv}, + /* [ 46] = 46 */ {__glXDisp_Rectfv, __glXDispSwap_Rectfv}, + /* [ 47] = 47 */ {__glXDisp_Rectiv, __glXDispSwap_Rectiv}, + /* [ 48] = 48 */ {__glXDisp_Rectsv, __glXDispSwap_Rectsv}, + /* [ 49] = 49 */ {__glXDisp_TexCoord1dv, __glXDispSwap_TexCoord1dv}, + /* [ 50] = 50 */ {__glXDisp_TexCoord1fv, __glXDispSwap_TexCoord1fv}, + /* [ 51] = 51 */ {__glXDisp_TexCoord1iv, __glXDispSwap_TexCoord1iv}, + /* [ 52] = 52 */ {__glXDisp_TexCoord1sv, __glXDispSwap_TexCoord1sv}, + /* [ 53] = 53 */ {__glXDisp_TexCoord2dv, __glXDispSwap_TexCoord2dv}, + /* [ 54] = 54 */ {__glXDisp_TexCoord2fv, __glXDispSwap_TexCoord2fv}, + /* [ 55] = 55 */ {__glXDisp_TexCoord2iv, __glXDispSwap_TexCoord2iv}, + /* [ 56] = 56 */ {__glXDisp_TexCoord2sv, __glXDispSwap_TexCoord2sv}, + /* [ 57] = 57 */ {__glXDisp_TexCoord3dv, __glXDispSwap_TexCoord3dv}, + /* [ 58] = 58 */ {__glXDisp_TexCoord3fv, __glXDispSwap_TexCoord3fv}, + /* [ 59] = 59 */ {__glXDisp_TexCoord3iv, __glXDispSwap_TexCoord3iv}, + /* [ 60] = 60 */ {__glXDisp_TexCoord3sv, __glXDispSwap_TexCoord3sv}, + /* [ 61] = 61 */ {__glXDisp_TexCoord4dv, __glXDispSwap_TexCoord4dv}, + /* [ 62] = 62 */ {__glXDisp_TexCoord4fv, __glXDispSwap_TexCoord4fv}, + /* [ 63] = 63 */ {__glXDisp_TexCoord4iv, __glXDispSwap_TexCoord4iv}, + /* [ 64] = 64 */ {__glXDisp_TexCoord4sv, __glXDispSwap_TexCoord4sv}, + /* [ 65] = 65 */ {__glXDisp_Vertex2dv, __glXDispSwap_Vertex2dv}, + /* [ 66] = 66 */ {__glXDisp_Vertex2fv, __glXDispSwap_Vertex2fv}, + /* [ 67] = 67 */ {__glXDisp_Vertex2iv, __glXDispSwap_Vertex2iv}, + /* [ 68] = 68 */ {__glXDisp_Vertex2sv, __glXDispSwap_Vertex2sv}, + /* [ 69] = 69 */ {__glXDisp_Vertex3dv, __glXDispSwap_Vertex3dv}, + /* [ 70] = 70 */ {__glXDisp_Vertex3fv, __glXDispSwap_Vertex3fv}, + /* [ 71] = 71 */ {__glXDisp_Vertex3iv, __glXDispSwap_Vertex3iv}, + /* [ 72] = 72 */ {__glXDisp_Vertex3sv, __glXDispSwap_Vertex3sv}, + /* [ 73] = 73 */ {__glXDisp_Vertex4dv, __glXDispSwap_Vertex4dv}, + /* [ 74] = 74 */ {__glXDisp_Vertex4fv, __glXDispSwap_Vertex4fv}, + /* [ 75] = 75 */ {__glXDisp_Vertex4iv, __glXDispSwap_Vertex4iv}, + /* [ 76] = 76 */ {__glXDisp_Vertex4sv, __glXDispSwap_Vertex4sv}, + /* [ 77] = 77 */ {__glXDisp_ClipPlane, __glXDispSwap_ClipPlane}, + /* [ 78] = 78 */ {__glXDisp_ColorMaterial, __glXDispSwap_ColorMaterial}, + /* [ 79] = 79 */ {__glXDisp_CullFace, __glXDispSwap_CullFace}, + /* [ 80] = 80 */ {__glXDisp_Fogf, __glXDispSwap_Fogf}, + /* [ 81] = 81 */ {__glXDisp_Fogfv, __glXDispSwap_Fogfv}, + /* [ 82] = 82 */ {__glXDisp_Fogi, __glXDispSwap_Fogi}, + /* [ 83] = 83 */ {__glXDisp_Fogiv, __glXDispSwap_Fogiv}, + /* [ 84] = 84 */ {__glXDisp_FrontFace, __glXDispSwap_FrontFace}, + /* [ 85] = 85 */ {__glXDisp_Hint, __glXDispSwap_Hint}, + /* [ 86] = 86 */ {__glXDisp_Lightf, __glXDispSwap_Lightf}, + /* [ 87] = 87 */ {__glXDisp_Lightfv, __glXDispSwap_Lightfv}, + /* [ 88] = 88 */ {__glXDisp_Lighti, __glXDispSwap_Lighti}, + /* [ 89] = 89 */ {__glXDisp_Lightiv, __glXDispSwap_Lightiv}, + /* [ 90] = 90 */ {__glXDisp_LightModelf, __glXDispSwap_LightModelf}, + /* [ 91] = 91 */ {__glXDisp_LightModelfv, __glXDispSwap_LightModelfv}, + /* [ 92] = 92 */ {__glXDisp_LightModeli, __glXDispSwap_LightModeli}, + /* [ 93] = 93 */ {__glXDisp_LightModeliv, __glXDispSwap_LightModeliv}, + /* [ 94] = 94 */ {__glXDisp_LineStipple, __glXDispSwap_LineStipple}, + /* [ 95] = 95 */ {__glXDisp_LineWidth, __glXDispSwap_LineWidth}, + /* [ 96] = 96 */ {__glXDisp_Materialf, __glXDispSwap_Materialf}, + /* [ 97] = 97 */ {__glXDisp_Materialfv, __glXDispSwap_Materialfv}, + /* [ 98] = 98 */ {__glXDisp_Materiali, __glXDispSwap_Materiali}, + /* [ 99] = 99 */ {__glXDisp_Materialiv, __glXDispSwap_Materialiv}, + /* [ 100] = 100 */ {__glXDisp_PointSize, __glXDispSwap_PointSize}, + /* [ 101] = 101 */ {__glXDisp_PolygonMode, __glXDispSwap_PolygonMode}, + /* [ 102] = 102 */ {__glXDisp_PolygonStipple, __glXDispSwap_PolygonStipple}, + /* [ 103] = 103 */ {__glXDisp_Scissor, __glXDispSwap_Scissor}, + /* [ 104] = 104 */ {__glXDisp_ShadeModel, __glXDispSwap_ShadeModel}, + /* [ 105] = 105 */ {__glXDisp_TexParameterf, __glXDispSwap_TexParameterf}, + /* [ 106] = 106 */ {__glXDisp_TexParameterfv, __glXDispSwap_TexParameterfv}, + /* [ 107] = 107 */ {__glXDisp_TexParameteri, __glXDispSwap_TexParameteri}, + /* [ 108] = 108 */ {__glXDisp_TexParameteriv, __glXDispSwap_TexParameteriv}, + /* [ 109] = 109 */ {__glXDisp_TexImage1D, __glXDispSwap_TexImage1D}, + /* [ 110] = 110 */ {__glXDisp_TexImage2D, __glXDispSwap_TexImage2D}, + /* [ 111] = 111 */ {__glXDisp_TexEnvf, __glXDispSwap_TexEnvf}, + /* [ 112] = 112 */ {__glXDisp_TexEnvfv, __glXDispSwap_TexEnvfv}, + /* [ 113] = 113 */ {__glXDisp_TexEnvi, __glXDispSwap_TexEnvi}, + /* [ 114] = 114 */ {__glXDisp_TexEnviv, __glXDispSwap_TexEnviv}, + /* [ 115] = 115 */ {__glXDisp_TexGend, __glXDispSwap_TexGend}, + /* [ 116] = 116 */ {__glXDisp_TexGendv, __glXDispSwap_TexGendv}, + /* [ 117] = 117 */ {__glXDisp_TexGenf, __glXDispSwap_TexGenf}, + /* [ 118] = 118 */ {__glXDisp_TexGenfv, __glXDispSwap_TexGenfv}, + /* [ 119] = 119 */ {__glXDisp_TexGeni, __glXDispSwap_TexGeni}, + /* [ 120] = 120 */ {__glXDisp_TexGeniv, __glXDispSwap_TexGeniv}, + /* [ 121] = 121 */ {__glXDisp_InitNames, __glXDispSwap_InitNames}, + /* [ 122] = 122 */ {__glXDisp_LoadName, __glXDispSwap_LoadName}, + /* [ 123] = 123 */ {__glXDisp_PassThrough, __glXDispSwap_PassThrough}, + /* [ 124] = 124 */ {__glXDisp_PopName, __glXDispSwap_PopName}, + /* [ 125] = 125 */ {__glXDisp_PushName, __glXDispSwap_PushName}, + /* [ 126] = 126 */ {__glXDisp_DrawBuffer, __glXDispSwap_DrawBuffer}, + /* [ 127] = 127 */ {__glXDisp_Clear, __glXDispSwap_Clear}, + /* [ 128] = 128 */ {__glXDisp_ClearAccum, __glXDispSwap_ClearAccum}, + /* [ 129] = 129 */ {__glXDisp_ClearIndex, __glXDispSwap_ClearIndex}, + /* [ 130] = 130 */ {__glXDisp_ClearColor, __glXDispSwap_ClearColor}, + /* [ 131] = 131 */ {__glXDisp_ClearStencil, __glXDispSwap_ClearStencil}, + /* [ 132] = 132 */ {__glXDisp_ClearDepth, __glXDispSwap_ClearDepth}, + /* [ 133] = 133 */ {__glXDisp_StencilMask, __glXDispSwap_StencilMask}, + /* [ 134] = 134 */ {__glXDisp_ColorMask, __glXDispSwap_ColorMask}, + /* [ 135] = 135 */ {__glXDisp_DepthMask, __glXDispSwap_DepthMask}, + /* [ 136] = 136 */ {__glXDisp_IndexMask, __glXDispSwap_IndexMask}, + /* [ 137] = 137 */ {__glXDisp_Accum, __glXDispSwap_Accum}, + /* [ 138] = 138 */ {__glXDisp_Disable, __glXDispSwap_Disable}, + /* [ 139] = 139 */ {__glXDisp_Enable, __glXDispSwap_Enable}, + /* [ 140] = 140 */ {NULL, NULL}, + /* [ 141] = 141 */ {__glXDisp_PopAttrib, __glXDispSwap_PopAttrib}, + /* [ 142] = 142 */ {__glXDisp_PushAttrib, __glXDispSwap_PushAttrib}, + /* [ 143] = 143 */ {__glXDisp_Map1d, __glXDispSwap_Map1d}, + /* [ 144] = 144 */ {__glXDisp_Map1f, __glXDispSwap_Map1f}, + /* [ 145] = 145 */ {__glXDisp_Map2d, __glXDispSwap_Map2d}, + /* [ 146] = 146 */ {__glXDisp_Map2f, __glXDispSwap_Map2f}, + /* [ 147] = 147 */ {__glXDisp_MapGrid1d, __glXDispSwap_MapGrid1d}, + /* [ 148] = 148 */ {__glXDisp_MapGrid1f, __glXDispSwap_MapGrid1f}, + /* [ 149] = 149 */ {__glXDisp_MapGrid2d, __glXDispSwap_MapGrid2d}, + /* [ 150] = 150 */ {__glXDisp_MapGrid2f, __glXDispSwap_MapGrid2f}, + /* [ 151] = 151 */ {__glXDisp_EvalCoord1dv, __glXDispSwap_EvalCoord1dv}, + /* [ 152] = 152 */ {__glXDisp_EvalCoord1fv, __glXDispSwap_EvalCoord1fv}, + /* [ 153] = 153 */ {__glXDisp_EvalCoord2dv, __glXDispSwap_EvalCoord2dv}, + /* [ 154] = 154 */ {__glXDisp_EvalCoord2fv, __glXDispSwap_EvalCoord2fv}, + /* [ 155] = 155 */ {__glXDisp_EvalMesh1, __glXDispSwap_EvalMesh1}, + /* [ 156] = 156 */ {__glXDisp_EvalPoint1, __glXDispSwap_EvalPoint1}, + /* [ 157] = 157 */ {__glXDisp_EvalMesh2, __glXDispSwap_EvalMesh2}, + /* [ 158] = 158 */ {__glXDisp_EvalPoint2, __glXDispSwap_EvalPoint2}, + /* [ 159] = 159 */ {__glXDisp_AlphaFunc, __glXDispSwap_AlphaFunc}, + /* [ 160] = 160 */ {__glXDisp_BlendFunc, __glXDispSwap_BlendFunc}, + /* [ 161] = 161 */ {__glXDisp_LogicOp, __glXDispSwap_LogicOp}, + /* [ 162] = 162 */ {__glXDisp_StencilFunc, __glXDispSwap_StencilFunc}, + /* [ 163] = 163 */ {__glXDisp_StencilOp, __glXDispSwap_StencilOp}, + /* [ 164] = 164 */ {__glXDisp_DepthFunc, __glXDispSwap_DepthFunc}, + /* [ 165] = 165 */ {__glXDisp_PixelZoom, __glXDispSwap_PixelZoom}, + /* [ 166] = 166 */ {__glXDisp_PixelTransferf, __glXDispSwap_PixelTransferf}, + /* [ 167] = 167 */ {__glXDisp_PixelTransferi, __glXDispSwap_PixelTransferi}, + /* [ 168] = 168 */ {__glXDisp_PixelMapfv, __glXDispSwap_PixelMapfv}, + /* [ 169] = 169 */ {__glXDisp_PixelMapuiv, __glXDispSwap_PixelMapuiv}, + /* [ 170] = 170 */ {__glXDisp_PixelMapusv, __glXDispSwap_PixelMapusv}, + /* [ 171] = 171 */ {__glXDisp_ReadBuffer, __glXDispSwap_ReadBuffer}, + /* [ 172] = 172 */ {__glXDisp_CopyPixels, __glXDispSwap_CopyPixels}, + /* [ 173] = 173 */ {__glXDisp_DrawPixels, __glXDispSwap_DrawPixels}, + /* [ 174] = 174 */ {__glXDisp_DepthRange, __glXDispSwap_DepthRange}, + /* [ 175] = 175 */ {__glXDisp_Frustum, __glXDispSwap_Frustum}, + /* [ 176] = 176 */ {__glXDisp_LoadIdentity, __glXDispSwap_LoadIdentity}, + /* [ 177] = 177 */ {__glXDisp_LoadMatrixf, __glXDispSwap_LoadMatrixf}, + /* [ 178] = 178 */ {__glXDisp_LoadMatrixd, __glXDispSwap_LoadMatrixd}, + /* [ 179] = 179 */ {__glXDisp_MatrixMode, __glXDispSwap_MatrixMode}, + /* [ 180] = 180 */ {__glXDisp_MultMatrixf, __glXDispSwap_MultMatrixf}, + /* [ 181] = 181 */ {__glXDisp_MultMatrixd, __glXDispSwap_MultMatrixd}, + /* [ 182] = 182 */ {__glXDisp_Ortho, __glXDispSwap_Ortho}, + /* [ 183] = 183 */ {__glXDisp_PopMatrix, __glXDispSwap_PopMatrix}, + /* [ 184] = 184 */ {__glXDisp_PushMatrix, __glXDispSwap_PushMatrix}, + /* [ 185] = 185 */ {__glXDisp_Rotated, __glXDispSwap_Rotated}, + /* [ 186] = 186 */ {__glXDisp_Rotatef, __glXDispSwap_Rotatef}, + /* [ 187] = 187 */ {__glXDisp_Scaled, __glXDispSwap_Scaled}, + /* [ 188] = 188 */ {__glXDisp_Scalef, __glXDispSwap_Scalef}, + /* [ 189] = 189 */ {__glXDisp_Translated, __glXDispSwap_Translated}, + /* [ 190] = 190 */ {__glXDisp_Translatef, __glXDispSwap_Translatef}, + /* [ 191] = 191 */ {__glXDisp_Viewport, __glXDispSwap_Viewport}, + /* [ 192] = 192 */ {__glXDisp_PolygonOffset, __glXDispSwap_PolygonOffset}, + /* [ 193] = 193 */ {__glXDisp_DrawArrays, __glXDispSwap_DrawArrays}, + /* [ 194] = 194 */ {__glXDisp_Indexubv, __glXDispSwap_Indexubv}, + /* [ 195] = 195 */ {__glXDisp_ColorSubTable, __glXDispSwap_ColorSubTable}, + /* [ 196] = 196 */ {__glXDisp_CopyColorSubTable, __glXDispSwap_CopyColorSubTable}, + /* [ 197] = 197 */ {__glXDisp_ActiveTextureARB, __glXDispSwap_ActiveTextureARB}, + /* [ 198] = 198 */ {__glXDisp_MultiTexCoord1dvARB, __glXDispSwap_MultiTexCoord1dvARB}, + /* [ 199] = 199 */ {__glXDisp_MultiTexCoord1fvARB, __glXDispSwap_MultiTexCoord1fvARB}, + /* [ 200] = 200 */ {__glXDisp_MultiTexCoord1ivARB, __glXDispSwap_MultiTexCoord1ivARB}, + /* [ 201] = 201 */ {__glXDisp_MultiTexCoord1svARB, __glXDispSwap_MultiTexCoord1svARB}, + /* [ 202] = 202 */ {__glXDisp_MultiTexCoord2dvARB, __glXDispSwap_MultiTexCoord2dvARB}, + /* [ 203] = 203 */ {__glXDisp_MultiTexCoord2fvARB, __glXDispSwap_MultiTexCoord2fvARB}, + /* [ 204] = 204 */ {__glXDisp_MultiTexCoord2ivARB, __glXDispSwap_MultiTexCoord2ivARB}, + /* [ 205] = 205 */ {__glXDisp_MultiTexCoord2svARB, __glXDispSwap_MultiTexCoord2svARB}, + /* [ 206] = 206 */ {__glXDisp_MultiTexCoord3dvARB, __glXDispSwap_MultiTexCoord3dvARB}, + /* [ 207] = 207 */ {__glXDisp_MultiTexCoord3fvARB, __glXDispSwap_MultiTexCoord3fvARB}, + /* [ 208] = 208 */ {__glXDisp_MultiTexCoord3ivARB, __glXDispSwap_MultiTexCoord3ivARB}, + /* [ 209] = 209 */ {__glXDisp_MultiTexCoord3svARB, __glXDispSwap_MultiTexCoord3svARB}, + /* [ 210] = 210 */ {__glXDisp_MultiTexCoord4dvARB, __glXDispSwap_MultiTexCoord4dvARB}, + /* [ 211] = 211 */ {__glXDisp_MultiTexCoord4fvARB, __glXDispSwap_MultiTexCoord4fvARB}, + /* [ 212] = 212 */ {__glXDisp_MultiTexCoord4ivARB, __glXDispSwap_MultiTexCoord4ivARB}, + /* [ 213] = 213 */ {__glXDisp_MultiTexCoord4svARB, __glXDispSwap_MultiTexCoord4svARB}, + /* [ 214] = 214 */ {__glXDisp_CompressedTexImage1DARB, __glXDispSwap_CompressedTexImage1DARB}, + /* [ 215] = 215 */ {__glXDisp_CompressedTexImage2DARB, __glXDispSwap_CompressedTexImage2DARB}, + /* [ 216] = 216 */ {__glXDisp_CompressedTexImage3DARB, __glXDispSwap_CompressedTexImage3DARB}, + /* [ 217] = 217 */ {__glXDisp_CompressedTexSubImage1DARB, __glXDispSwap_CompressedTexSubImage1DARB}, + /* [ 218] = 218 */ {__glXDisp_CompressedTexSubImage2DARB, __glXDispSwap_CompressedTexSubImage2DARB}, + /* [ 219] = 219 */ {__glXDisp_CompressedTexSubImage3DARB, __glXDispSwap_CompressedTexSubImage3DARB}, + /* [ 220] = 220 */ {NULL, NULL}, + /* [ 221] = 221 */ {NULL, NULL}, + /* [ 222] = 222 */ {NULL, NULL}, + /* [ 223] = 223 */ {NULL, NULL}, + /* [ 224] = 224 */ {NULL, NULL}, + /* [ 225] = 225 */ {NULL, NULL}, + /* [ 226] = 226 */ {NULL, NULL}, + /* [ 227] = 227 */ {NULL, NULL}, + /* [ 228] = 228 */ {NULL, NULL}, + /* [ 229] = 229 */ {__glXDisp_SampleCoverageARB, __glXDispSwap_SampleCoverageARB}, + /* [ 230] = 230 */ {__glXDisp_WindowPos3fvMESA, __glXDispSwap_WindowPos3fvMESA}, + /* [ 231] = 231 */ {__glXDisp_BeginQueryARB, __glXDispSwap_BeginQueryARB}, + /* [ 232] = 232 */ {__glXDisp_EndQueryARB, __glXDispSwap_EndQueryARB}, + /* [ 233] = 233 */ {__glXDisp_DrawBuffersARB, __glXDispSwap_DrawBuffersARB}, + /* [ 234] = 234 */ {NULL, NULL}, + /* [ 235] = 235 */ {NULL, NULL}, + /* [ 236] = 236 */ {NULL, NULL}, + /* [ 237] = 237 */ {NULL, NULL}, + /* [ 238] = 238 */ {NULL, NULL}, + /* [ 239] = 239 */ {NULL, NULL}, + /* [ 240] = 2048 */ {__glXDisp_SampleMaskSGIS, __glXDispSwap_SampleMaskSGIS}, + /* [ 241] = 2049 */ {__glXDisp_SamplePatternSGIS, __glXDispSwap_SamplePatternSGIS}, + /* [ 242] = 2050 */ {NULL, NULL}, + /* [ 243] = 2051 */ {NULL, NULL}, + /* [ 244] = 2052 */ {NULL, NULL}, + /* [ 245] = 2053 */ {__glXDisp_ColorTable, __glXDispSwap_ColorTable}, + /* [ 246] = 2054 */ {__glXDisp_ColorTableParameterfv, __glXDispSwap_ColorTableParameterfv}, + /* [ 247] = 2055 */ {__glXDisp_ColorTableParameteriv, __glXDispSwap_ColorTableParameteriv}, + /* [ 248] = 2056 */ {__glXDisp_CopyColorTable, __glXDispSwap_CopyColorTable}, + /* [ 249] = 2057 */ {NULL, NULL}, + /* [ 250] = 2058 */ {NULL, NULL}, + /* [ 251] = 2059 */ {NULL, NULL}, + /* [ 252] = 2060 */ {NULL, NULL}, + /* [ 253] = 2061 */ {NULL, NULL}, + /* [ 254] = 2062 */ {NULL, NULL}, + /* [ 255] = 2063 */ {NULL, NULL}, + /* [ 256] = 2064 */ {NULL, NULL}, + /* [ 257] = 2065 */ {__glXDisp_PointParameterfEXT, __glXDispSwap_PointParameterfEXT}, + /* [ 258] = 2066 */ {__glXDisp_PointParameterfvEXT, __glXDispSwap_PointParameterfvEXT}, + /* [ 259] = 2067 */ {NULL, NULL}, + /* [ 260] = 2068 */ {NULL, NULL}, + /* [ 261] = 2069 */ {NULL, NULL}, + /* [ 262] = 2070 */ {NULL, NULL}, + /* [ 263] = 2071 */ {NULL, NULL}, + /* [ 264] = 4096 */ {__glXDisp_BlendColor, __glXDispSwap_BlendColor}, + /* [ 265] = 4097 */ {__glXDisp_BlendEquation, __glXDispSwap_BlendEquation}, + /* [ 266] = 4098 */ {NULL, NULL}, + /* [ 267] = 4099 */ {__glXDisp_TexSubImage1D, __glXDispSwap_TexSubImage1D}, + /* [ 268] = 4100 */ {__glXDisp_TexSubImage2D, __glXDispSwap_TexSubImage2D}, + /* [ 269] = 4101 */ {__glXDisp_ConvolutionFilter1D, __glXDispSwap_ConvolutionFilter1D}, + /* [ 270] = 4102 */ {__glXDisp_ConvolutionFilter2D, __glXDispSwap_ConvolutionFilter2D}, + /* [ 271] = 4103 */ {__glXDisp_ConvolutionParameterf, __glXDispSwap_ConvolutionParameterf}, + /* [ 272] = 4104 */ {__glXDisp_ConvolutionParameterfv, __glXDispSwap_ConvolutionParameterfv}, + /* [ 273] = 4105 */ {__glXDisp_ConvolutionParameteri, __glXDispSwap_ConvolutionParameteri}, + /* [ 274] = 4106 */ {__glXDisp_ConvolutionParameteriv, __glXDispSwap_ConvolutionParameteriv}, + /* [ 275] = 4107 */ {__glXDisp_CopyConvolutionFilter1D, __glXDispSwap_CopyConvolutionFilter1D}, + /* [ 276] = 4108 */ {__glXDisp_CopyConvolutionFilter2D, __glXDispSwap_CopyConvolutionFilter2D}, + /* [ 277] = 4109 */ {__glXDisp_SeparableFilter2D, __glXDispSwap_SeparableFilter2D}, + /* [ 278] = 4110 */ {__glXDisp_Histogram, __glXDispSwap_Histogram}, + /* [ 279] = 4111 */ {__glXDisp_Minmax, __glXDispSwap_Minmax}, + /* [ 280] = 4112 */ {__glXDisp_ResetHistogram, __glXDispSwap_ResetHistogram}, + /* [ 281] = 4113 */ {__glXDisp_ResetMinmax, __glXDispSwap_ResetMinmax}, + /* [ 282] = 4114 */ {__glXDisp_TexImage3D, __glXDispSwap_TexImage3D}, + /* [ 283] = 4115 */ {__glXDisp_TexSubImage3D, __glXDispSwap_TexSubImage3D}, + /* [ 284] = 4116 */ {NULL, NULL}, + /* [ 285] = 4117 */ {__glXDisp_BindTexture, __glXDispSwap_BindTexture}, + /* [ 286] = 4118 */ {__glXDisp_PrioritizeTextures, __glXDispSwap_PrioritizeTextures}, + /* [ 287] = 4119 */ {__glXDisp_CopyTexImage1D, __glXDispSwap_CopyTexImage1D}, + /* [ 288] = 4120 */ {__glXDisp_CopyTexImage2D, __glXDispSwap_CopyTexImage2D}, + /* [ 289] = 4121 */ {__glXDisp_CopyTexSubImage1D, __glXDispSwap_CopyTexSubImage1D}, + /* [ 290] = 4122 */ {__glXDisp_CopyTexSubImage2D, __glXDispSwap_CopyTexSubImage2D}, + /* [ 291] = 4123 */ {__glXDisp_CopyTexSubImage3D, __glXDispSwap_CopyTexSubImage3D}, + /* [ 292] = 4124 */ {__glXDisp_FogCoordfvEXT, __glXDispSwap_FogCoordfvEXT}, + /* [ 293] = 4125 */ {__glXDisp_FogCoorddvEXT, __glXDispSwap_FogCoorddvEXT}, + /* [ 294] = 4126 */ {__glXDisp_SecondaryColor3bvEXT, __glXDispSwap_SecondaryColor3bvEXT}, + /* [ 295] = 4127 */ {__glXDisp_SecondaryColor3svEXT, __glXDispSwap_SecondaryColor3svEXT}, + /* [ 296] = 4176 */ {NULL, NULL}, + /* [ 297] = 4177 */ {NULL, NULL}, + /* [ 298] = 4178 */ {NULL, NULL}, + /* [ 299] = 4179 */ {NULL, NULL}, + /* [ 300] = 4180 */ {__glXDisp_BindProgramNV, __glXDispSwap_BindProgramNV}, + /* [ 301] = 4181 */ {__glXDisp_ExecuteProgramNV, __glXDispSwap_ExecuteProgramNV}, + /* [ 302] = 4182 */ {__glXDisp_RequestResidentProgramsNV, __glXDispSwap_RequestResidentProgramsNV}, + /* [ 303] = 4183 */ {__glXDisp_LoadProgramNV, __glXDispSwap_LoadProgramNV}, + /* [ 304] = 4184 */ {__glXDisp_ProgramParameter4fvNV, __glXDispSwap_ProgramParameter4fvNV}, + /* [ 305] = 4185 */ {__glXDisp_ProgramEnvParameter4dvARB, __glXDispSwap_ProgramEnvParameter4dvARB}, + /* [ 306] = 4186 */ {__glXDisp_ProgramParameters4fvNV, __glXDispSwap_ProgramParameters4fvNV}, + /* [ 307] = 4187 */ {__glXDisp_ProgramParameters4dvNV, __glXDispSwap_ProgramParameters4dvNV}, + /* [ 308] = 4188 */ {__glXDisp_TrackMatrixNV, __glXDispSwap_TrackMatrixNV}, + /* [ 309] = 4189 */ {__glXDisp_VertexAttrib1svARB, __glXDispSwap_VertexAttrib1svARB}, + /* [ 310] = 4190 */ {__glXDisp_VertexAttrib2svARB, __glXDispSwap_VertexAttrib2svARB}, + /* [ 311] = 4191 */ {__glXDisp_VertexAttrib3svARB, __glXDispSwap_VertexAttrib3svARB}, + /* [ 312] = 4192 */ {__glXDisp_VertexAttrib4svARB, __glXDispSwap_VertexAttrib4svARB}, + /* [ 313] = 4193 */ {__glXDisp_VertexAttrib1fvARB, __glXDispSwap_VertexAttrib1fvARB}, + /* [ 314] = 4194 */ {__glXDisp_VertexAttrib2fvARB, __glXDispSwap_VertexAttrib2fvARB}, + /* [ 315] = 4195 */ {__glXDisp_VertexAttrib3fvARB, __glXDispSwap_VertexAttrib3fvARB}, + /* [ 316] = 4196 */ {__glXDisp_VertexAttrib4fvARB, __glXDispSwap_VertexAttrib4fvARB}, + /* [ 317] = 4197 */ {__glXDisp_VertexAttrib1dvARB, __glXDispSwap_VertexAttrib1dvARB}, + /* [ 318] = 4198 */ {__glXDisp_VertexAttrib2dvARB, __glXDispSwap_VertexAttrib2dvARB}, + /* [ 319] = 4199 */ {__glXDisp_VertexAttrib3dvARB, __glXDispSwap_VertexAttrib3dvARB}, + /* [ 320] = 4200 */ {__glXDisp_VertexAttrib4dvARB, __glXDispSwap_VertexAttrib4dvARB}, + /* [ 321] = 4201 */ {__glXDisp_VertexAttrib4NubvARB, __glXDispSwap_VertexAttrib4NubvARB}, + /* [ 322] = 4202 */ {__glXDisp_VertexAttribs1svNV, __glXDispSwap_VertexAttribs1svNV}, + /* [ 323] = 4203 */ {__glXDisp_VertexAttribs2svNV, __glXDispSwap_VertexAttribs2svNV}, + /* [ 324] = 4204 */ {__glXDisp_VertexAttribs3svNV, __glXDispSwap_VertexAttribs3svNV}, + /* [ 325] = 4205 */ {__glXDisp_VertexAttribs4svNV, __glXDispSwap_VertexAttribs4svNV}, + /* [ 326] = 4206 */ {__glXDisp_VertexAttribs1fvNV, __glXDispSwap_VertexAttribs1fvNV}, + /* [ 327] = 4207 */ {__glXDisp_VertexAttribs2fvNV, __glXDispSwap_VertexAttribs2fvNV}, + /* [ 328] = 4208 */ {__glXDisp_VertexAttribs3fvNV, __glXDispSwap_VertexAttribs3fvNV}, + /* [ 329] = 4209 */ {__glXDisp_VertexAttribs4fvNV, __glXDispSwap_VertexAttribs4fvNV}, + /* [ 330] = 4210 */ {__glXDisp_VertexAttribs1dvNV, __glXDispSwap_VertexAttribs1dvNV}, + /* [ 331] = 4211 */ {__glXDisp_VertexAttribs2dvNV, __glXDispSwap_VertexAttribs2dvNV}, + /* [ 332] = 4212 */ {__glXDisp_VertexAttribs3dvNV, __glXDispSwap_VertexAttribs3dvNV}, + /* [ 333] = 4213 */ {__glXDisp_VertexAttribs4dvNV, __glXDispSwap_VertexAttribs4dvNV}, + /* [ 334] = 4214 */ {__glXDisp_VertexAttribs4ubvNV, __glXDispSwap_VertexAttribs4ubvNV}, + /* [ 335] = 4215 */ {__glXDisp_ProgramLocalParameter4fvARB, __glXDispSwap_ProgramLocalParameter4fvARB}, + /* [ 336] = 4216 */ {__glXDisp_ProgramLocalParameter4dvARB, __glXDispSwap_ProgramLocalParameter4dvARB}, + /* [ 337] = 4217 */ {__glXDisp_ProgramStringARB, __glXDispSwap_ProgramStringARB}, + /* [ 338] = 4218 */ {__glXDisp_ProgramNamedParameter4fvNV, __glXDispSwap_ProgramNamedParameter4fvNV}, + /* [ 339] = 4219 */ {__glXDisp_ProgramNamedParameter4dvNV, __glXDispSwap_ProgramNamedParameter4dvNV}, + /* [ 340] = 4220 */ {__glXDisp_ActiveStencilFaceEXT, __glXDispSwap_ActiveStencilFaceEXT}, + /* [ 341] = 4221 */ {__glXDisp_PointParameteriNV, __glXDispSwap_PointParameteriNV}, + /* [ 342] = 4222 */ {__glXDisp_PointParameterivNV, __glXDispSwap_PointParameterivNV}, + /* [ 343] = 4223 */ {NULL, NULL}, + /* [ 344] = 4224 */ {NULL, NULL}, + /* [ 345] = 4225 */ {NULL, NULL}, + /* [ 346] = 4226 */ {NULL, NULL}, + /* [ 347] = 4227 */ {NULL, NULL}, + /* [ 348] = 4228 */ {__glXDisp_BlendEquationSeparateEXT, __glXDispSwap_BlendEquationSeparateEXT}, + /* [ 349] = 4229 */ {NULL, NULL}, + /* [ 350] = 4230 */ {__glXDisp_VertexAttrib4bvARB, __glXDispSwap_VertexAttrib4bvARB}, + /* [ 351] = 4231 */ {__glXDisp_VertexAttrib4ivARB, __glXDispSwap_VertexAttrib4ivARB}, + /* [ 352] = 4232 */ {__glXDisp_VertexAttrib4ubvARB, __glXDispSwap_VertexAttrib4ubvARB}, + /* [ 353] = 4233 */ {__glXDisp_VertexAttrib4usvARB, __glXDispSwap_VertexAttrib4usvARB}, + /* [ 354] = 4234 */ {__glXDisp_VertexAttrib4uivARB, __glXDispSwap_VertexAttrib4uivARB}, + /* [ 355] = 4235 */ {__glXDisp_VertexAttrib4NbvARB, __glXDispSwap_VertexAttrib4NbvARB}, + /* [ 356] = 4236 */ {__glXDisp_VertexAttrib4NsvARB, __glXDispSwap_VertexAttrib4NsvARB}, + /* [ 357] = 4237 */ {__glXDisp_VertexAttrib4NivARB, __glXDispSwap_VertexAttrib4NivARB}, + /* [ 358] = 4238 */ {__glXDisp_VertexAttrib4NusvARB, __glXDispSwap_VertexAttrib4NusvARB}, + /* [ 359] = 4239 */ {__glXDisp_VertexAttrib4NuivARB, __glXDispSwap_VertexAttrib4NuivARB}, + /* [ 360] = 4128 */ {__glXDisp_SecondaryColor3ivEXT, __glXDispSwap_SecondaryColor3ivEXT}, + /* [ 361] = 4129 */ {__glXDisp_SecondaryColor3fvEXT, __glXDispSwap_SecondaryColor3fvEXT}, + /* [ 362] = 4130 */ {__glXDisp_SecondaryColor3dvEXT, __glXDispSwap_SecondaryColor3dvEXT}, + /* [ 363] = 4131 */ {__glXDisp_SecondaryColor3ubvEXT, __glXDispSwap_SecondaryColor3ubvEXT}, + /* [ 364] = 4132 */ {__glXDisp_SecondaryColor3usvEXT, __glXDispSwap_SecondaryColor3usvEXT}, + /* [ 365] = 4133 */ {__glXDisp_SecondaryColor3uivEXT, __glXDispSwap_SecondaryColor3uivEXT}, + /* [ 366] = 4134 */ {__glXDisp_BlendFuncSeparateEXT, __glXDispSwap_BlendFuncSeparateEXT}, + /* [ 367] = 4135 */ {NULL, NULL}, + /* [ 368] = 4264 */ {NULL, NULL}, + /* [ 369] = 4265 */ {__glXDisp_VertexAttrib1svNV, __glXDispSwap_VertexAttrib1svNV}, + /* [ 370] = 4266 */ {__glXDisp_VertexAttrib2svNV, __glXDispSwap_VertexAttrib2svNV}, + /* [ 371] = 4267 */ {__glXDisp_VertexAttrib3svNV, __glXDispSwap_VertexAttrib3svNV}, + /* [ 372] = 4268 */ {__glXDisp_VertexAttrib4svNV, __glXDispSwap_VertexAttrib4svNV}, + /* [ 373] = 4269 */ {__glXDisp_VertexAttrib1fvNV, __glXDispSwap_VertexAttrib1fvNV}, + /* [ 374] = 4270 */ {__glXDisp_VertexAttrib2fvNV, __glXDispSwap_VertexAttrib2fvNV}, + /* [ 375] = 4271 */ {__glXDisp_VertexAttrib3fvNV, __glXDispSwap_VertexAttrib3fvNV}, + /* [ 376] = 4272 */ {__glXDisp_VertexAttrib4fvNV, __glXDispSwap_VertexAttrib4fvNV}, + /* [ 377] = 4273 */ {__glXDisp_VertexAttrib1dvNV, __glXDispSwap_VertexAttrib1dvNV}, + /* [ 378] = 4274 */ {__glXDisp_VertexAttrib2dvNV, __glXDispSwap_VertexAttrib2dvNV}, + /* [ 379] = 4275 */ {__glXDisp_VertexAttrib3dvNV, __glXDispSwap_VertexAttrib3dvNV}, + /* [ 380] = 4276 */ {__glXDisp_VertexAttrib4dvNV, __glXDispSwap_VertexAttrib4dvNV}, + /* [ 381] = 4277 */ {__glXDisp_VertexAttrib4ubvNV, __glXDispSwap_VertexAttrib4ubvNV}, + /* [ 382] = 4278 */ {NULL, NULL}, + /* [ 383] = 4279 */ {NULL, NULL}, + /* [ 384] = 4312 */ {NULL, NULL}, + /* [ 385] = 4313 */ {NULL, NULL}, + /* [ 386] = 4314 */ {NULL, NULL}, + /* [ 387] = 4315 */ {NULL, NULL}, + /* [ 388] = 4316 */ {__glXDisp_BindRenderbufferEXT, __glXDispSwap_BindRenderbufferEXT}, + /* [ 389] = 4317 */ {__glXDisp_DeleteRenderbuffersEXT, __glXDispSwap_DeleteRenderbuffersEXT}, + /* [ 390] = 4318 */ {__glXDisp_RenderbufferStorageEXT, __glXDispSwap_RenderbufferStorageEXT}, + /* [ 391] = 4319 */ {__glXDisp_BindFramebufferEXT, __glXDispSwap_BindFramebufferEXT}, + /* [ 392] = 4320 */ {__glXDisp_DeleteFramebuffersEXT, __glXDispSwap_DeleteFramebuffersEXT}, + /* [ 393] = 4321 */ {__glXDisp_FramebufferTexture1DEXT, __glXDispSwap_FramebufferTexture1DEXT}, + /* [ 394] = 4322 */ {__glXDisp_FramebufferTexture2DEXT, __glXDispSwap_FramebufferTexture2DEXT}, + /* [ 395] = 4323 */ {__glXDisp_FramebufferTexture3DEXT, __glXDispSwap_FramebufferTexture3DEXT}, + /* [ 396] = 4324 */ {__glXDisp_FramebufferRenderbufferEXT, __glXDispSwap_FramebufferRenderbufferEXT}, + /* [ 397] = 4325 */ {__glXDisp_GenerateMipmapEXT, __glXDispSwap_GenerateMipmapEXT}, + /* [ 398] = 4326 */ {NULL, NULL}, + /* [ 399] = 4327 */ {NULL, NULL}, +}; + +static const int_fast16_t Render_size_table[400][2] = { + /* [ 0] = 0 */ { 0, ~0}, + /* [ 1] = 1 */ { 8, ~0}, + /* [ 2] = 2 */ { 12, 0}, + /* [ 3] = 3 */ { 8, ~0}, + /* [ 4] = 4 */ { 8, ~0}, + /* [ 5] = 5 */ { 48, 1}, + /* [ 6] = 6 */ { 8, ~0}, + /* [ 7] = 7 */ { 28, ~0}, + /* [ 8] = 8 */ { 16, ~0}, + /* [ 9] = 9 */ { 16, ~0}, + /* [ 10] = 10 */ { 12, ~0}, + /* [ 11] = 11 */ { 8, ~0}, + /* [ 12] = 12 */ { 16, ~0}, + /* [ 13] = 13 */ { 12, ~0}, + /* [ 14] = 14 */ { 8, ~0}, + /* [ 15] = 15 */ { 36, ~0}, + /* [ 16] = 16 */ { 20, ~0}, + /* [ 17] = 17 */ { 20, ~0}, + /* [ 18] = 18 */ { 12, ~0}, + /* [ 19] = 19 */ { 8, ~0}, + /* [ 20] = 20 */ { 20, ~0}, + /* [ 21] = 21 */ { 12, ~0}, + /* [ 22] = 22 */ { 8, ~0}, + /* [ 23] = 23 */ { 4, ~0}, + /* [ 24] = 24 */ { 12, ~0}, + /* [ 25] = 25 */ { 8, ~0}, + /* [ 26] = 26 */ { 8, ~0}, + /* [ 27] = 27 */ { 8, ~0}, + /* [ 28] = 28 */ { 8, ~0}, + /* [ 29] = 29 */ { 28, ~0}, + /* [ 30] = 30 */ { 16, ~0}, + /* [ 31] = 31 */ { 16, ~0}, + /* [ 32] = 32 */ { 12, ~0}, + /* [ 33] = 33 */ { 20, ~0}, + /* [ 34] = 34 */ { 12, ~0}, + /* [ 35] = 35 */ { 12, ~0}, + /* [ 36] = 36 */ { 8, ~0}, + /* [ 37] = 37 */ { 28, ~0}, + /* [ 38] = 38 */ { 16, ~0}, + /* [ 39] = 39 */ { 16, ~0}, + /* [ 40] = 40 */ { 12, ~0}, + /* [ 41] = 41 */ { 36, ~0}, + /* [ 42] = 42 */ { 20, ~0}, + /* [ 43] = 43 */ { 20, ~0}, + /* [ 44] = 44 */ { 12, ~0}, + /* [ 45] = 45 */ { 36, ~0}, + /* [ 46] = 46 */ { 20, ~0}, + /* [ 47] = 47 */ { 20, ~0}, + /* [ 48] = 48 */ { 12, ~0}, + /* [ 49] = 49 */ { 12, ~0}, + /* [ 50] = 50 */ { 8, ~0}, + /* [ 51] = 51 */ { 8, ~0}, + /* [ 52] = 52 */ { 8, ~0}, + /* [ 53] = 53 */ { 20, ~0}, + /* [ 54] = 54 */ { 12, ~0}, + /* [ 55] = 55 */ { 12, ~0}, + /* [ 56] = 56 */ { 8, ~0}, + /* [ 57] = 57 */ { 28, ~0}, + /* [ 58] = 58 */ { 16, ~0}, + /* [ 59] = 59 */ { 16, ~0}, + /* [ 60] = 60 */ { 12, ~0}, + /* [ 61] = 61 */ { 36, ~0}, + /* [ 62] = 62 */ { 20, ~0}, + /* [ 63] = 63 */ { 20, ~0}, + /* [ 64] = 64 */ { 12, ~0}, + /* [ 65] = 65 */ { 20, ~0}, + /* [ 66] = 66 */ { 12, ~0}, + /* [ 67] = 67 */ { 12, ~0}, + /* [ 68] = 68 */ { 8, ~0}, + /* [ 69] = 69 */ { 28, ~0}, + /* [ 70] = 70 */ { 16, ~0}, + /* [ 71] = 71 */ { 16, ~0}, + /* [ 72] = 72 */ { 12, ~0}, + /* [ 73] = 73 */ { 36, ~0}, + /* [ 74] = 74 */ { 20, ~0}, + /* [ 75] = 75 */ { 20, ~0}, + /* [ 76] = 76 */ { 12, ~0}, + /* [ 77] = 77 */ { 40, ~0}, + /* [ 78] = 78 */ { 12, ~0}, + /* [ 79] = 79 */ { 8, ~0}, + /* [ 80] = 80 */ { 12, ~0}, + /* [ 81] = 81 */ { 8, 2}, + /* [ 82] = 82 */ { 12, ~0}, + /* [ 83] = 83 */ { 8, 3}, + /* [ 84] = 84 */ { 8, ~0}, + /* [ 85] = 85 */ { 12, ~0}, + /* [ 86] = 86 */ { 16, ~0}, + /* [ 87] = 87 */ { 12, 4}, + /* [ 88] = 88 */ { 16, ~0}, + /* [ 89] = 89 */ { 12, 5}, + /* [ 90] = 90 */ { 12, ~0}, + /* [ 91] = 91 */ { 8, 6}, + /* [ 92] = 92 */ { 12, ~0}, + /* [ 93] = 93 */ { 8, 7}, + /* [ 94] = 94 */ { 12, ~0}, + /* [ 95] = 95 */ { 8, ~0}, + /* [ 96] = 96 */ { 16, ~0}, + /* [ 97] = 97 */ { 12, 8}, + /* [ 98] = 98 */ { 16, ~0}, + /* [ 99] = 99 */ { 12, 9}, + /* [100] = 100 */ { 8, ~0}, + /* [101] = 101 */ { 12, ~0}, + /* [102] = 102 */ { 24, 10}, + /* [103] = 103 */ { 20, ~0}, + /* [104] = 104 */ { 8, ~0}, + /* [105] = 105 */ { 16, ~0}, + /* [106] = 106 */ { 12, 11}, + /* [107] = 107 */ { 16, ~0}, + /* [108] = 108 */ { 12, 12}, + /* [109] = 109 */ { 56, 13}, + /* [110] = 110 */ { 56, 14}, + /* [111] = 111 */ { 16, ~0}, + /* [112] = 112 */ { 12, 15}, + /* [113] = 113 */ { 16, ~0}, + /* [114] = 114 */ { 12, 16}, + /* [115] = 115 */ { 20, ~0}, + /* [116] = 116 */ { 12, 17}, + /* [117] = 117 */ { 16, ~0}, + /* [118] = 118 */ { 12, 18}, + /* [119] = 119 */ { 16, ~0}, + /* [120] = 120 */ { 12, 19}, + /* [121] = 121 */ { 4, ~0}, + /* [122] = 122 */ { 8, ~0}, + /* [123] = 123 */ { 8, ~0}, + /* [124] = 124 */ { 4, ~0}, + /* [125] = 125 */ { 8, ~0}, + /* [126] = 126 */ { 8, ~0}, + /* [127] = 127 */ { 8, ~0}, + /* [128] = 128 */ { 20, ~0}, + /* [129] = 129 */ { 8, ~0}, + /* [130] = 130 */ { 20, ~0}, + /* [131] = 131 */ { 8, ~0}, + /* [132] = 132 */ { 12, ~0}, + /* [133] = 133 */ { 8, ~0}, + /* [134] = 134 */ { 8, ~0}, + /* [135] = 135 */ { 8, ~0}, + /* [136] = 136 */ { 8, ~0}, + /* [137] = 137 */ { 12, ~0}, + /* [138] = 138 */ { 8, ~0}, + /* [139] = 139 */ { 8, ~0}, + /* [140] = 140 */ { 0, ~0}, + /* [141] = 141 */ { 4, ~0}, + /* [142] = 142 */ { 8, ~0}, + /* [143] = 143 */ { 28, 20}, + /* [144] = 144 */ { 20, 21}, + /* [145] = 145 */ { 48, 22}, + /* [146] = 146 */ { 32, 23}, + /* [147] = 147 */ { 24, ~0}, + /* [148] = 148 */ { 16, ~0}, + /* [149] = 149 */ { 44, ~0}, + /* [150] = 150 */ { 28, ~0}, + /* [151] = 151 */ { 12, ~0}, + /* [152] = 152 */ { 8, ~0}, + /* [153] = 153 */ { 20, ~0}, + /* [154] = 154 */ { 12, ~0}, + /* [155] = 155 */ { 16, ~0}, + /* [156] = 156 */ { 8, ~0}, + /* [157] = 157 */ { 24, ~0}, + /* [158] = 158 */ { 12, ~0}, + /* [159] = 159 */ { 12, ~0}, + /* [160] = 160 */ { 12, ~0}, + /* [161] = 161 */ { 8, ~0}, + /* [162] = 162 */ { 16, ~0}, + /* [163] = 163 */ { 16, ~0}, + /* [164] = 164 */ { 8, ~0}, + /* [165] = 165 */ { 12, ~0}, + /* [166] = 166 */ { 12, ~0}, + /* [167] = 167 */ { 12, ~0}, + /* [168] = 168 */ { 12, 24}, + /* [169] = 169 */ { 12, 25}, + /* [170] = 170 */ { 12, 26}, + /* [171] = 171 */ { 8, ~0}, + /* [172] = 172 */ { 24, ~0}, + /* [173] = 173 */ { 40, 27}, + /* [174] = 174 */ { 20, ~0}, + /* [175] = 175 */ { 52, ~0}, + /* [176] = 176 */ { 4, ~0}, + /* [177] = 177 */ { 68, ~0}, + /* [178] = 178 */ {132, ~0}, + /* [179] = 179 */ { 8, ~0}, + /* [180] = 180 */ { 68, ~0}, + /* [181] = 181 */ {132, ~0}, + /* [182] = 182 */ { 52, ~0}, + /* [183] = 183 */ { 4, ~0}, + /* [184] = 184 */ { 4, ~0}, + /* [185] = 185 */ { 36, ~0}, + /* [186] = 186 */ { 20, ~0}, + /* [187] = 187 */ { 28, ~0}, + /* [188] = 188 */ { 16, ~0}, + /* [189] = 189 */ { 28, ~0}, + /* [190] = 190 */ { 16, ~0}, + /* [191] = 191 */ { 20, ~0}, + /* [192] = 192 */ { 12, ~0}, + /* [193] = 193 */ { 16, 28}, + /* [194] = 194 */ { 8, ~0}, + /* [195] = 195 */ { 44, 29}, + /* [196] = 196 */ { 24, ~0}, + /* [197] = 197 */ { 8, ~0}, + /* [198] = 198 */ { 16, ~0}, + /* [199] = 199 */ { 12, ~0}, + /* [200] = 200 */ { 12, ~0}, + /* [201] = 201 */ { 12, ~0}, + /* [202] = 202 */ { 24, ~0}, + /* [203] = 203 */ { 16, ~0}, + /* [204] = 204 */ { 16, ~0}, + /* [205] = 205 */ { 12, ~0}, + /* [206] = 206 */ { 32, ~0}, + /* [207] = 207 */ { 20, ~0}, + /* [208] = 208 */ { 20, ~0}, + /* [209] = 209 */ { 16, ~0}, + /* [210] = 210 */ { 40, ~0}, + /* [211] = 211 */ { 24, ~0}, + /* [212] = 212 */ { 24, ~0}, + /* [213] = 213 */ { 16, ~0}, + /* [214] = 214 */ { 28, 30}, + /* [215] = 215 */ { 32, 31}, + /* [216] = 216 */ { 36, 32}, + /* [217] = 217 */ { 28, 33}, + /* [218] = 218 */ { 36, 34}, + /* [219] = 219 */ { 44, 35}, + /* [220] = 220 */ { 0, ~0}, + /* [221] = 221 */ { 0, ~0}, + /* [222] = 222 */ { 0, ~0}, + /* [223] = 223 */ { 0, ~0}, + /* [224] = 224 */ { 0, ~0}, + /* [225] = 225 */ { 0, ~0}, + /* [226] = 226 */ { 0, ~0}, + /* [227] = 227 */ { 0, ~0}, + /* [228] = 228 */ { 0, ~0}, + /* [229] = 229 */ { 12, ~0}, + /* [230] = 230 */ { 16, ~0}, + /* [231] = 231 */ { 12, ~0}, + /* [232] = 232 */ { 8, ~0}, + /* [233] = 233 */ { 8, 36}, + /* [234] = 234 */ { 0, ~0}, + /* [235] = 235 */ { 0, ~0}, + /* [236] = 236 */ { 0, ~0}, + /* [237] = 237 */ { 0, ~0}, + /* [238] = 238 */ { 0, ~0}, + /* [239] = 239 */ { 0, ~0}, + /* [240] = 2048 */ { 12, ~0}, + /* [241] = 2049 */ { 8, ~0}, + /* [242] = 2050 */ { 0, ~0}, + /* [243] = 2051 */ { 0, ~0}, + /* [244] = 2052 */ { 0, ~0}, + /* [245] = 2053 */ { 44, 37}, + /* [246] = 2054 */ { 12, 38}, + /* [247] = 2055 */ { 12, 39}, + /* [248] = 2056 */ { 24, ~0}, + /* [249] = 2057 */ { 0, ~0}, + /* [250] = 2058 */ { 0, ~0}, + /* [251] = 2059 */ { 0, ~0}, + /* [252] = 2060 */ { 0, ~0}, + /* [253] = 2061 */ { 0, ~0}, + /* [254] = 2062 */ { 0, ~0}, + /* [255] = 2063 */ { 0, ~0}, + /* [256] = 2064 */ { 0, ~0}, + /* [257] = 2065 */ { 12, ~0}, + /* [258] = 2066 */ { 8, 40}, + /* [259] = 2067 */ { 0, ~0}, + /* [260] = 2068 */ { 0, ~0}, + /* [261] = 2069 */ { 0, ~0}, + /* [262] = 2070 */ { 0, ~0}, + /* [263] = 2071 */ { 0, ~0}, + /* [264] = 4096 */ { 20, ~0}, + /* [265] = 4097 */ { 8, ~0}, + /* [266] = 4098 */ { 0, ~0}, + /* [267] = 4099 */ { 60, 41}, + /* [268] = 4100 */ { 60, 42}, + /* [269] = 4101 */ { 48, 43}, + /* [270] = 4102 */ { 48, 44}, + /* [271] = 4103 */ { 16, ~0}, + /* [272] = 4104 */ { 12, 45}, + /* [273] = 4105 */ { 16, ~0}, + /* [274] = 4106 */ { 12, 46}, + /* [275] = 4107 */ { 24, ~0}, + /* [276] = 4108 */ { 28, ~0}, + /* [277] = 4109 */ { 32, 47}, + /* [278] = 4110 */ { 20, ~0}, + /* [279] = 4111 */ { 16, ~0}, + /* [280] = 4112 */ { 8, ~0}, + /* [281] = 4113 */ { 8, ~0}, + /* [282] = 4114 */ { 84, 48}, + /* [283] = 4115 */ { 92, 49}, + /* [284] = 4116 */ { 0, ~0}, + /* [285] = 4117 */ { 12, ~0}, + /* [286] = 4118 */ { 8, 50}, + /* [287] = 4119 */ { 32, ~0}, + /* [288] = 4120 */ { 36, ~0}, + /* [289] = 4121 */ { 28, ~0}, + /* [290] = 4122 */ { 36, ~0}, + /* [291] = 4123 */ { 40, ~0}, + /* [292] = 4124 */ { 8, ~0}, + /* [293] = 4125 */ { 12, ~0}, + /* [294] = 4126 */ { 8, ~0}, + /* [295] = 4127 */ { 12, ~0}, + /* [296] = 4176 */ { 0, ~0}, + /* [297] = 4177 */ { 0, ~0}, + /* [298] = 4178 */ { 0, ~0}, + /* [299] = 4179 */ { 0, ~0}, + /* [300] = 4180 */ { 12, ~0}, + /* [301] = 4181 */ { 28, ~0}, + /* [302] = 4182 */ { 8, 51}, + /* [303] = 4183 */ { 16, 52}, + /* [304] = 4184 */ { 28, ~0}, + /* [305] = 4185 */ { 44, ~0}, + /* [306] = 4186 */ { 16, 53}, + /* [307] = 4187 */ { 16, 54}, + /* [308] = 4188 */ { 20, ~0}, + /* [309] = 4189 */ { 12, ~0}, + /* [310] = 4190 */ { 12, ~0}, + /* [311] = 4191 */ { 16, ~0}, + /* [312] = 4192 */ { 16, ~0}, + /* [313] = 4193 */ { 12, ~0}, + /* [314] = 4194 */ { 16, ~0}, + /* [315] = 4195 */ { 20, ~0}, + /* [316] = 4196 */ { 24, ~0}, + /* [317] = 4197 */ { 16, ~0}, + /* [318] = 4198 */ { 24, ~0}, + /* [319] = 4199 */ { 32, ~0}, + /* [320] = 4200 */ { 40, ~0}, + /* [321] = 4201 */ { 12, ~0}, + /* [322] = 4202 */ { 12, 55}, + /* [323] = 4203 */ { 12, 56}, + /* [324] = 4204 */ { 12, 57}, + /* [325] = 4205 */ { 12, 58}, + /* [326] = 4206 */ { 12, 59}, + /* [327] = 4207 */ { 12, 60}, + /* [328] = 4208 */ { 12, 61}, + /* [329] = 4209 */ { 12, 62}, + /* [330] = 4210 */ { 12, 63}, + /* [331] = 4211 */ { 12, 64}, + /* [332] = 4212 */ { 12, 65}, + /* [333] = 4213 */ { 12, 66}, + /* [334] = 4214 */ { 12, 67}, + /* [335] = 4215 */ { 28, ~0}, + /* [336] = 4216 */ { 44, ~0}, + /* [337] = 4217 */ { 16, 68}, + /* [338] = 4218 */ { 28, 69}, + /* [339] = 4219 */ { 44, 70}, + /* [340] = 4220 */ { 8, ~0}, + /* [341] = 4221 */ { 12, ~0}, + /* [342] = 4222 */ { 8, 71}, + /* [343] = 4223 */ { 0, ~0}, + /* [344] = 4224 */ { 0, ~0}, + /* [345] = 4225 */ { 0, ~0}, + /* [346] = 4226 */ { 0, ~0}, + /* [347] = 4227 */ { 0, ~0}, + /* [348] = 4228 */ { 12, ~0}, + /* [349] = 4229 */ { 0, ~0}, + /* [350] = 4230 */ { 12, ~0}, + /* [351] = 4231 */ { 24, ~0}, + /* [352] = 4232 */ { 12, ~0}, + /* [353] = 4233 */ { 16, ~0}, + /* [354] = 4234 */ { 24, ~0}, + /* [355] = 4235 */ { 12, ~0}, + /* [356] = 4236 */ { 16, ~0}, + /* [357] = 4237 */ { 24, ~0}, + /* [358] = 4238 */ { 16, ~0}, + /* [359] = 4239 */ { 24, ~0}, + /* [360] = 4128 */ { 16, ~0}, + /* [361] = 4129 */ { 16, ~0}, + /* [362] = 4130 */ { 28, ~0}, + /* [363] = 4131 */ { 8, ~0}, + /* [364] = 4132 */ { 12, ~0}, + /* [365] = 4133 */ { 16, ~0}, + /* [366] = 4134 */ { 20, ~0}, + /* [367] = 4135 */ { 0, ~0}, + /* [368] = 4264 */ { 0, ~0}, + /* [369] = 4265 */ { 12, ~0}, + /* [370] = 4266 */ { 12, ~0}, + /* [371] = 4267 */ { 16, ~0}, + /* [372] = 4268 */ { 16, ~0}, + /* [373] = 4269 */ { 12, ~0}, + /* [374] = 4270 */ { 16, ~0}, + /* [375] = 4271 */ { 20, ~0}, + /* [376] = 4272 */ { 24, ~0}, + /* [377] = 4273 */ { 16, ~0}, + /* [378] = 4274 */ { 24, ~0}, + /* [379] = 4275 */ { 32, ~0}, + /* [380] = 4276 */ { 40, ~0}, + /* [381] = 4277 */ { 12, ~0}, + /* [382] = 4278 */ { 0, ~0}, + /* [383] = 4279 */ { 0, ~0}, + /* [384] = 4312 */ { 0, ~0}, + /* [385] = 4313 */ { 0, ~0}, + /* [386] = 4314 */ { 0, ~0}, + /* [387] = 4315 */ { 0, ~0}, + /* [388] = 4316 */ { 12, ~0}, + /* [389] = 4317 */ { 8, 72}, + /* [390] = 4318 */ { 20, ~0}, + /* [391] = 4319 */ { 12, ~0}, + /* [392] = 4320 */ { 8, 73}, + /* [393] = 4321 */ { 24, ~0}, + /* [394] = 4322 */ { 24, ~0}, + /* [395] = 4323 */ { 28, ~0}, + /* [396] = 4324 */ { 20, ~0}, + /* [397] = 4325 */ { 8, ~0}, + /* [398] = 4326 */ { 0, ~0}, + /* [399] = 4327 */ { 0, ~0}, +}; + +static const gl_proto_size_func Render_size_func_table[74] = { + __glXCallListsReqSize, + __glXBitmapReqSize, + __glXFogfvReqSize, + __glXFogivReqSize, + __glXLightfvReqSize, + __glXLightivReqSize, + __glXLightModelfvReqSize, + __glXLightModelivReqSize, + __glXMaterialfvReqSize, + __glXMaterialivReqSize, + __glXPolygonStippleReqSize, + __glXTexParameterfvReqSize, + __glXTexParameterivReqSize, + __glXTexImage1DReqSize, + __glXTexImage2DReqSize, + __glXTexEnvfvReqSize, + __glXTexEnvivReqSize, + __glXTexGendvReqSize, + __glXTexGenfvReqSize, + __glXTexGenivReqSize, + __glXMap1dReqSize, + __glXMap1fReqSize, + __glXMap2dReqSize, + __glXMap2fReqSize, + __glXPixelMapfvReqSize, + __glXPixelMapuivReqSize, + __glXPixelMapusvReqSize, + __glXDrawPixelsReqSize, + __glXDrawArraysReqSize, + __glXColorSubTableReqSize, + __glXCompressedTexImage1DARBReqSize, + __glXCompressedTexImage2DARBReqSize, + __glXCompressedTexImage3DARBReqSize, + __glXCompressedTexSubImage1DARBReqSize, + __glXCompressedTexSubImage2DARBReqSize, + __glXCompressedTexSubImage3DARBReqSize, + __glXDrawBuffersARBReqSize, + __glXColorTableReqSize, + __glXColorTableParameterfvReqSize, + __glXColorTableParameterivReqSize, + __glXPointParameterfvEXTReqSize, + __glXTexSubImage1DReqSize, + __glXTexSubImage2DReqSize, + __glXConvolutionFilter1DReqSize, + __glXConvolutionFilter2DReqSize, + __glXConvolutionParameterfvReqSize, + __glXConvolutionParameterivReqSize, + __glXSeparableFilter2DReqSize, + __glXTexImage3DReqSize, + __glXTexSubImage3DReqSize, + __glXPrioritizeTexturesReqSize, + __glXRequestResidentProgramsNVReqSize, + __glXLoadProgramNVReqSize, + __glXProgramParameters4fvNVReqSize, + __glXProgramParameters4dvNVReqSize, + __glXVertexAttribs1svNVReqSize, + __glXVertexAttribs2svNVReqSize, + __glXVertexAttribs3svNVReqSize, + __glXVertexAttribs4svNVReqSize, + __glXVertexAttribs1fvNVReqSize, + __glXVertexAttribs2fvNVReqSize, + __glXVertexAttribs3fvNVReqSize, + __glXVertexAttribs4fvNVReqSize, + __glXVertexAttribs1dvNVReqSize, + __glXVertexAttribs2dvNVReqSize, + __glXVertexAttribs3dvNVReqSize, + __glXVertexAttribs4dvNVReqSize, + __glXVertexAttribs4ubvNVReqSize, + __glXProgramStringARBReqSize, + __glXProgramNamedParameter4fvNVReqSize, + __glXProgramNamedParameter4dvNVReqSize, + __glXPointParameterivNVReqSize, + __glXDeleteRenderbuffersEXTReqSize, + __glXDeleteFramebuffersEXTReqSize, +}; + +const struct __glXDispatchInfo Render_dispatch_info = { + 13, + Render_dispatch_tree, + Render_function_table, + Render_size_table, + Render_size_func_table +}; + +/*****************************************************************/ +/* tree depth = 12 */ +static const int_fast16_t VendorPriv_dispatch_tree[152] = { + /* [0] -> opcode range [0, 131072], node depth 1 */ + 2, + 5, + EMPTY_LEAF, + 119, + EMPTY_LEAF, + + /* [5] -> opcode range [0, 32768], node depth 2 */ + 1, + 8, + EMPTY_LEAF, + + /* [8] -> opcode range [0, 16384], node depth 3 */ + 1, + 11, + EMPTY_LEAF, + + /* [11] -> opcode range [0, 8192], node depth 4 */ + 2, + 16, + EMPTY_LEAF, + 78, + EMPTY_LEAF, + + /* [16] -> opcode range [0, 2048], node depth 5 */ + 2, + 21, + EMPTY_LEAF, + 36, + EMPTY_LEAF, + + /* [21] -> opcode range [0, 512], node depth 6 */ + 1, + 24, + EMPTY_LEAF, + + /* [24] -> opcode range [0, 256], node depth 7 */ + 1, + 27, + EMPTY_LEAF, + + /* [27] -> opcode range [0, 128], node depth 8 */ + 1, + 30, + EMPTY_LEAF, + + /* [30] -> opcode range [0, 64], node depth 9 */ + 1, + 33, + EMPTY_LEAF, + + /* [33] -> opcode range [0, 32], node depth 10 */ + 1, + LEAF(0), + EMPTY_LEAF, + + /* [36] -> opcode range [1024, 1536], node depth 6 */ + 2, + 41, + EMPTY_LEAF, + 53, + 67, + + /* [41] -> opcode range [1024, 1152], node depth 7 */ + 1, + 44, + EMPTY_LEAF, + + /* [44] -> opcode range [1024, 1088], node depth 8 */ + 1, + 47, + EMPTY_LEAF, + + /* [47] -> opcode range [1024, 1056], node depth 9 */ + 1, + 50, + EMPTY_LEAF, + + /* [50] -> opcode range [1024, 1040], node depth 10 */ + 1, + LEAF(16), + EMPTY_LEAF, + + /* [53] -> opcode range [1280, 1408], node depth 7 */ + 1, + 56, + EMPTY_LEAF, + + /* [56] -> opcode range [1280, 1344], node depth 8 */ + 2, + 61, + LEAF(24), + EMPTY_LEAF, + 64, + + /* [61] -> opcode range [1280, 1296], node depth 9 */ + 1, + EMPTY_LEAF, + LEAF(40), + + /* [64] -> opcode range [1328, 1344], node depth 9 */ + 1, + LEAF(48), + EMPTY_LEAF, + + /* [67] -> opcode range [1408, 1536], node depth 7 */ + 1, + 70, + EMPTY_LEAF, + + /* [70] -> opcode range [1408, 1472], node depth 8 */ + 1, + 73, + EMPTY_LEAF, + + /* [73] -> opcode range [1408, 1440], node depth 9 */ + 2, + EMPTY_LEAF, + LEAF(56), + LEAF(64), + EMPTY_LEAF, + + /* [78] -> opcode range [4096, 6144], node depth 5 */ + 2, + 83, + EMPTY_LEAF, + 101, + EMPTY_LEAF, + + /* [83] -> opcode range [4096, 4608], node depth 6 */ + 1, + 86, + EMPTY_LEAF, + + /* [86] -> opcode range [4096, 4352], node depth 7 */ + 1, + 89, + EMPTY_LEAF, + + /* [89] -> opcode range [4096, 4224], node depth 8 */ + 1, + 92, + EMPTY_LEAF, + + /* [92] -> opcode range [4096, 4160], node depth 9 */ + 1, + 95, + EMPTY_LEAF, + + /* [95] -> opcode range [4096, 4128], node depth 10 */ + 1, + 98, + EMPTY_LEAF, + + /* [98] -> opcode range [4096, 4112], node depth 11 */ + 1, + LEAF(72), + EMPTY_LEAF, + + /* [101] -> opcode range [5120, 5632], node depth 6 */ + 1, + 104, + EMPTY_LEAF, + + /* [104] -> opcode range [5120, 5376], node depth 7 */ + 1, + 107, + EMPTY_LEAF, + + /* [107] -> opcode range [5120, 5248], node depth 8 */ + 1, + 110, + EMPTY_LEAF, + + /* [110] -> opcode range [5120, 5184], node depth 9 */ + 1, + EMPTY_LEAF, + 113, + + /* [113] -> opcode range [5152, 5184], node depth 10 */ + 1, + 116, + EMPTY_LEAF, + + /* [116] -> opcode range [5152, 5168], node depth 11 */ + 1, + LEAF(80), + EMPTY_LEAF, + + /* [119] -> opcode range [65536, 98304], node depth 2 */ + 1, + 122, + EMPTY_LEAF, + + /* [122] -> opcode range [65536, 81920], node depth 3 */ + 1, + 125, + EMPTY_LEAF, + + /* [125] -> opcode range [65536, 73728], node depth 4 */ + 1, + 128, + EMPTY_LEAF, + + /* [128] -> opcode range [65536, 69632], node depth 5 */ + 1, + 131, + EMPTY_LEAF, + + /* [131] -> opcode range [65536, 67584], node depth 6 */ + 1, + 134, + EMPTY_LEAF, + + /* [134] -> opcode range [65536, 66560], node depth 7 */ + 1, + 137, + EMPTY_LEAF, + + /* [137] -> opcode range [65536, 66048], node depth 8 */ + 1, + 140, + EMPTY_LEAF, + + /* [140] -> opcode range [65536, 65792], node depth 9 */ + 1, + 143, + EMPTY_LEAF, + + /* [143] -> opcode range [65536, 65664], node depth 10 */ + 1, + 146, + EMPTY_LEAF, + + /* [146] -> opcode range [65536, 65600], node depth 11 */ + 1, + 149, + EMPTY_LEAF, + + /* [149] -> opcode range [65536, 65568], node depth 12 */ + 1, + LEAF(88), + EMPTY_LEAF, + +}; + +static const void *VendorPriv_function_table[104][2] = { + /* [ 0] = 0 */ {NULL, NULL}, + /* [ 1] = 1 */ {__glXDisp_GetConvolutionFilterEXT, __glXDispSwap_GetConvolutionFilterEXT}, + /* [ 2] = 2 */ {__glXDisp_GetConvolutionParameterfvEXT, __glXDispSwap_GetConvolutionParameterfvEXT}, + /* [ 3] = 3 */ {__glXDisp_GetConvolutionParameterivEXT, __glXDispSwap_GetConvolutionParameterivEXT}, + /* [ 4] = 4 */ {__glXDisp_GetSeparableFilterEXT, __glXDispSwap_GetSeparableFilterEXT}, + /* [ 5] = 5 */ {__glXDisp_GetHistogramEXT, __glXDispSwap_GetHistogramEXT}, + /* [ 6] = 6 */ {__glXDisp_GetHistogramParameterfvEXT, __glXDispSwap_GetHistogramParameterfvEXT}, + /* [ 7] = 7 */ {__glXDisp_GetHistogramParameterivEXT, __glXDispSwap_GetHistogramParameterivEXT}, + /* [ 8] = 8 */ {__glXDisp_GetMinmaxEXT, __glXDispSwap_GetMinmaxEXT}, + /* [ 9] = 9 */ {__glXDisp_GetMinmaxParameterfvEXT, __glXDispSwap_GetMinmaxParameterfvEXT}, + /* [ 10] = 10 */ {__glXDisp_GetMinmaxParameterivEXT, __glXDispSwap_GetMinmaxParameterivEXT}, + /* [ 11] = 11 */ {__glXDisp_AreTexturesResidentEXT, __glXDispSwap_AreTexturesResidentEXT}, + /* [ 12] = 12 */ {__glXDisp_DeleteTexturesEXT, __glXDispSwap_DeleteTexturesEXT}, + /* [ 13] = 13 */ {__glXDisp_GenTexturesEXT, __glXDispSwap_GenTexturesEXT}, + /* [ 14] = 14 */ {__glXDisp_IsTextureEXT, __glXDispSwap_IsTextureEXT}, + /* [ 15] = 15 */ {NULL, NULL}, + /* [ 16] = 1024 */ {__glXDisp_QueryContextInfoEXT, __glXDispSwap_QueryContextInfoEXT}, + /* [ 17] = 1025 */ {NULL, NULL}, + /* [ 18] = 1026 */ {NULL, NULL}, + /* [ 19] = 1027 */ {NULL, NULL}, + /* [ 20] = 1028 */ {NULL, NULL}, + /* [ 21] = 1029 */ {NULL, NULL}, + /* [ 22] = 1030 */ {NULL, NULL}, + /* [ 23] = 1031 */ {NULL, NULL}, + /* [ 24] = 1296 */ {__glXDisp_GetProgramEnvParameterfvARB, __glXDispSwap_GetProgramEnvParameterfvARB}, + /* [ 25] = 1297 */ {__glXDisp_GetProgramEnvParameterdvARB, __glXDispSwap_GetProgramEnvParameterdvARB}, + /* [ 26] = 1298 */ {__glXDisp_GetProgramivNV, __glXDispSwap_GetProgramivNV}, + /* [ 27] = 1299 */ {__glXDisp_GetProgramStringNV, __glXDispSwap_GetProgramStringNV}, + /* [ 28] = 1300 */ {__glXDisp_GetTrackMatrixivNV, __glXDispSwap_GetTrackMatrixivNV}, + /* [ 29] = 1301 */ {__glXDisp_GetVertexAttribdvARB, __glXDispSwap_GetVertexAttribdvARB}, + /* [ 30] = 1302 */ {__glXDisp_GetVertexAttribfvNV, __glXDispSwap_GetVertexAttribfvNV}, + /* [ 31] = 1303 */ {__glXDisp_GetVertexAttribivNV, __glXDispSwap_GetVertexAttribivNV}, + /* [ 32] = 1304 */ {__glXDisp_IsProgramNV, __glXDispSwap_IsProgramNV}, + /* [ 33] = 1305 */ {__glXDisp_GetProgramLocalParameterfvARB, __glXDispSwap_GetProgramLocalParameterfvARB}, + /* [ 34] = 1306 */ {__glXDisp_GetProgramLocalParameterdvARB, __glXDispSwap_GetProgramLocalParameterdvARB}, + /* [ 35] = 1307 */ {__glXDisp_GetProgramivARB, __glXDispSwap_GetProgramivARB}, + /* [ 36] = 1308 */ {__glXDisp_GetProgramStringARB, __glXDispSwap_GetProgramStringARB}, + /* [ 37] = 1309 */ {NULL, NULL}, + /* [ 38] = 1310 */ {__glXDisp_GetProgramNamedParameterfvNV, __glXDispSwap_GetProgramNamedParameterfvNV}, + /* [ 39] = 1311 */ {__glXDisp_GetProgramNamedParameterdvNV, __glXDispSwap_GetProgramNamedParameterdvNV}, + /* [ 40] = 1288 */ {NULL, NULL}, + /* [ 41] = 1289 */ {NULL, NULL}, + /* [ 42] = 1290 */ {NULL, NULL}, + /* [ 43] = 1291 */ {NULL, NULL}, + /* [ 44] = 1292 */ {NULL, NULL}, + /* [ 45] = 1293 */ {__glXDisp_AreProgramsResidentNV, __glXDispSwap_AreProgramsResidentNV}, + /* [ 46] = 1294 */ {__glXDisp_DeleteProgramsNV, __glXDispSwap_DeleteProgramsNV}, + /* [ 47] = 1295 */ {__glXDisp_GenProgramsNV, __glXDispSwap_GenProgramsNV}, + /* [ 48] = 1328 */ {NULL, NULL}, + /* [ 49] = 1329 */ {NULL, NULL}, + /* [ 50] = 1330 */ {__glXDisp_BindTexImageEXT, __glXDispSwap_BindTexImageEXT}, + /* [ 51] = 1331 */ {__glXDisp_ReleaseTexImageEXT, __glXDispSwap_ReleaseTexImageEXT}, + /* [ 52] = 1332 */ {NULL, NULL}, + /* [ 53] = 1333 */ {NULL, NULL}, + /* [ 54] = 1334 */ {NULL, NULL}, + /* [ 55] = 1335 */ {NULL, NULL}, + /* [ 56] = 1416 */ {NULL, NULL}, + /* [ 57] = 1417 */ {NULL, NULL}, + /* [ 58] = 1418 */ {NULL, NULL}, + /* [ 59] = 1419 */ {NULL, NULL}, + /* [ 60] = 1420 */ {NULL, NULL}, + /* [ 61] = 1421 */ {NULL, NULL}, + /* [ 62] = 1422 */ {__glXDisp_IsRenderbufferEXT, __glXDispSwap_IsRenderbufferEXT}, + /* [ 63] = 1423 */ {__glXDisp_GenRenderbuffersEXT, __glXDispSwap_GenRenderbuffersEXT}, + /* [ 64] = 1424 */ {__glXDisp_GetRenderbufferParameterivEXT, __glXDispSwap_GetRenderbufferParameterivEXT}, + /* [ 65] = 1425 */ {__glXDisp_IsFramebufferEXT, __glXDispSwap_IsFramebufferEXT}, + /* [ 66] = 1426 */ {__glXDisp_GenFramebuffersEXT, __glXDispSwap_GenFramebuffersEXT}, + /* [ 67] = 1427 */ {__glXDisp_CheckFramebufferStatusEXT, __glXDispSwap_CheckFramebufferStatusEXT}, + /* [ 68] = 1428 */ {__glXDisp_GetFramebufferAttachmentParameterivEXT, __glXDispSwap_GetFramebufferAttachmentParameterivEXT}, + /* [ 69] = 1429 */ {NULL, NULL}, + /* [ 70] = 1430 */ {NULL, NULL}, + /* [ 71] = 1431 */ {NULL, NULL}, + /* [ 72] = 4096 */ {NULL, NULL}, + /* [ 73] = 4097 */ {NULL, NULL}, + /* [ 74] = 4098 */ {__glXDisp_GetColorTableSGI, __glXDispSwap_GetColorTableSGI}, + /* [ 75] = 4099 */ {__glXDisp_GetColorTableParameterfvSGI, __glXDispSwap_GetColorTableParameterfvSGI}, + /* [ 76] = 4100 */ {__glXDisp_GetColorTableParameterivSGI, __glXDispSwap_GetColorTableParameterivSGI}, + /* [ 77] = 4101 */ {NULL, NULL}, + /* [ 78] = 4102 */ {NULL, NULL}, + /* [ 79] = 4103 */ {NULL, NULL}, + /* [ 80] = 5152 */ {NULL, NULL}, + /* [ 81] = 5153 */ {NULL, NULL}, + /* [ 82] = 5154 */ {__glXDisp_CopySubBufferMESA, __glXDispSwap_CopySubBufferMESA}, + /* [ 83] = 5155 */ {NULL, NULL}, + /* [ 84] = 5156 */ {NULL, NULL}, + /* [ 85] = 5157 */ {NULL, NULL}, + /* [ 86] = 5158 */ {NULL, NULL}, + /* [ 87] = 5159 */ {NULL, NULL}, + /* [ 88] = 65536 */ {__glXDisp_SwapIntervalSGI, __glXDispSwap_SwapIntervalSGI}, + /* [ 89] = 65537 */ {__glXDisp_MakeCurrentReadSGI, __glXDispSwap_MakeCurrentReadSGI}, + /* [ 90] = 65538 */ {NULL, NULL}, + /* [ 91] = 65539 */ {NULL, NULL}, + /* [ 92] = 65540 */ {__glXDisp_GetFBConfigsSGIX, __glXDispSwap_GetFBConfigsSGIX}, + /* [ 93] = 65541 */ {__glXDisp_CreateContextWithConfigSGIX, __glXDispSwap_CreateContextWithConfigSGIX}, + /* [ 94] = 65542 */ {__glXDisp_CreateGLXPixmapWithConfigSGIX, __glXDispSwap_CreateGLXPixmapWithConfigSGIX}, + /* [ 95] = 65543 */ {NULL, NULL}, + /* [ 96] = 65544 */ {NULL, NULL}, + /* [ 97] = 65545 */ {NULL, NULL}, + /* [ 98] = 65546 */ {__glXDisp_GetDrawableAttributesSGIX, __glXDispSwap_GetDrawableAttributesSGIX}, + /* [ 99] = 65547 */ {NULL, NULL}, + /* [ 100] = 65548 */ {NULL, NULL}, + /* [ 101] = 65549 */ {NULL, NULL}, + /* [ 102] = 65550 */ {NULL, NULL}, + /* [ 103] = 65551 */ {NULL, NULL}, +}; + +const struct __glXDispatchInfo VendorPriv_dispatch_info = { + 17, + VendorPriv_dispatch_tree, + VendorPriv_function_table, + NULL, + NULL +}; + diff --git a/xorg-server-1.4/GL/glx/indirect_table.h b/xorg-server-1.4/GL/glx/indirect_table.h new file mode 100644 index 0000000..4af1ccb --- /dev/null +++ b/xorg-server-1.4/GL/glx/indirect_table.h @@ -0,0 +1,106 @@ +/* + * (C) Copyright IBM Corporation 2005, 2006 + * 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, sub license, + * 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 + * IBM, + * 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. + */ + +/** + * \file indirect_table.h + * + * \author Ian Romanick + */ + +#ifndef INDIRECT_TABLE_H +#define INDIRECT_TABLE_H + +#include + +/** + */ +struct __glXDispatchInfo { + /** + * Number of significant bits in the protocol opcode. Opcodes with values + * larger than ((1 << bits) - 1) are invalid. + */ + unsigned bits; + + /** + */ + const int_fast16_t * dispatch_tree; + + /** + * Array of protocol decode and dispatch functions index by the opcode + * search tree (i.e., \c dispatch_tree). The first element in each pair + * is the non-byte-swapped version, and the second element is the + * byte-swapped version. + */ + const void *(*dispatch_functions)[2]; + + /** + * Pointer to size validation data. This table is indexed with the same + * value as ::dispatch_functions. + * + * The first element in the pair is the size, in bytes, of the fixed-size + * portion of the protocol. + * + * For opcodes that have a variable-size portion, the second value is an + * index in \c size_func_table to calculate that size. If there is no + * variable-size portion, this index will be ~0. + * + * \note + * If size checking is not to be performed on this type of protocol + * data, this pointer will be \c NULL. + */ + const int_fast16_t (*size_table)[2]; + + /** + * Array of functions used to calculate the variable-size portion of + * protocol messages. Indexed by the second element of the entries + * in \c ::size_table. + * + * \note + * If size checking is not to be performed on this type of protocol + * data, this pointer will be \c NULL. + */ + const gl_proto_size_func *size_func_table; +}; + +/** + * Sentinel value for an empty leaf in the \c dispatch_tree. + */ +#define EMPTY_LEAF INT_FAST16_MIN + +/** + * Declare the index \c x as a leaf index. + */ +#define LEAF(x) -x + +/** + * Determine if an index is a leaf index. + */ +#define IS_LEAF_INDEX(x) ((x) <= 0) + +extern const struct __glXDispatchInfo Single_dispatch_info; +extern const struct __glXDispatchInfo Render_dispatch_info; +extern const struct __glXDispatchInfo VendorPriv_dispatch_info; + +#endif /* INDIRECT_TABLE_H */ diff --git a/xorg-server-1.4/GL/glx/indirect_texture_compression.c b/xorg-server-1.4/GL/glx/indirect_texture_compression.c new file mode 100644 index 0000000..3c09663 --- /dev/null +++ b/xorg-server-1.4/GL/glx/indirect_texture_compression.c @@ -0,0 +1,120 @@ +/* + * (C) Copyright IBM Corporation 2005, 2006 + * 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, sub license, + * 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 + * IBM, + * 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. + */ + +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "glxbyteorder.h" +#include "glxext.h" +#include "singlesize.h" +#include "unpack.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + +int __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent( cl, req->contextTag, & error ); + ClientPtr client = cl->client; + + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum target = *(GLenum *)(pc + 0); + const GLint level = *(GLint *)(pc + 4); + GLint compsize = 0; + char *answer, answerBuffer[200]; + + CALL_GetTexLevelParameteriv(GET_DISPATCH(), (target, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, &compsize)); + + if ( compsize != 0 ) { + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + CALL_GetCompressedTexImageARB(GET_DISPATCH(), (target, level, answer)); + } + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetTexImageReply *)&__glXReply)->width = compsize; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + error = Success; + } + + return error; +} + + +int __glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent( cl, bswap_32( req->contextTag ), & error ); + ClientPtr client = cl->client; + + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum target = (GLenum) bswap_32( *(int *)(pc + 0) ); + const GLint level = (GLint ) bswap_32( *(int *)(pc + 4) ); + GLint compsize = 0; + char *answer, answerBuffer[200]; + + CALL_GetTexLevelParameteriv(GET_DISPATCH(), (target, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, &compsize)); + + if ( compsize != 0 ) { + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + CALL_GetCompressedTexImageARB(GET_DISPATCH(), (target, level, answer)); + } + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetTexImageReply *)&__glXReply)->width = compsize; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + error = Success; + } + + return error; +} diff --git a/xorg-server-1.4/GL/glx/indirect_util.c b/xorg-server-1.4/GL/glx/indirect_util.c new file mode 100644 index 0000000..58c194c --- /dev/null +++ b/xorg-server-1.4/GL/glx/indirect_util.c @@ -0,0 +1,310 @@ +/* + * (C) Copyright IBM Corporation 2005 + * 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, sub license, + * 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 + * IBM, + * 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include +#include +#include +#include "indirect_size.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glxserver.h" +#include "glxbyteorder.h" +#include "singlesize.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" +#include "glxext.h" +#include "indirect_table.h" +#include "indirect_util.h" + + +#define __GLX_PAD(a) (((a)+3)&~3) + +extern xGLXSingleReply __glXReply; + + +GLint +__glGetBooleanv_variable_size( GLenum e ) +{ + if ( e == GL_COMPRESSED_TEXTURE_FORMATS ) { + GLint temp; + + CALL_GetIntegerv( GET_DISPATCH(), + (GL_NUM_COMPRESSED_TEXTURE_FORMATS, & temp) ); + return temp; + } + else { + return 0; + } +} + + +/** + * Get a properly aligned buffer to hold reply data. + * + * \warning + * This function assumes that \c local_buffer is already properly aligned. + * It also assumes that \c alignment is a power of two. + */ +void * +__glXGetAnswerBuffer( __GLXclientState * cl, size_t required_size, + void * local_buffer, size_t local_size, unsigned alignment ) +{ + void * buffer = local_buffer; + const unsigned mask = alignment - 1; + + if ( local_size < required_size ) { + const size_t worst_case_size = required_size + alignment; + intptr_t temp_buf; + + if ( cl->returnBufSize < worst_case_size ) { + void * temp = xrealloc( cl->returnBuf, worst_case_size ); + + if ( temp == NULL ) { + return NULL; + } + + cl->returnBuf = temp; + cl->returnBufSize = worst_case_size; + } + + temp_buf = (intptr_t) cl->returnBuf; + temp_buf = (temp_buf + mask) & ~mask; + buffer = (void *) temp_buf; + } + + return buffer; +} + + +/** + * Send a GLX reply to the client. + * + * Technically speaking, there are several different ways to encode a GLX + * reply. The primary difference is whether or not certain fields (e.g., + * retval, size, and "pad3") are set. This function gets around that by + * always setting all of the fields to "reasonable" values. This does no + * harm to clients, but it does make the server-side code much more compact. + */ +void +__glXSendReply( ClientPtr client, const void * data, size_t elements, + size_t element_size, GLboolean always_array, CARD32 retval ) +{ + size_t reply_ints = 0; + + if ( __glXErrorOccured() ) { + elements = 0; + } + else if ( (elements > 1) || always_array ) { + reply_ints = ((elements * element_size) + 3) >> 2; + } + + __glXReply.length = reply_ints; + __glXReply.type = X_Reply; + __glXReply.sequenceNumber = client->sequence; + __glXReply.size = elements; + __glXReply.retval = retval; + + + /* It is faster on almost always every architecture to just copy the 8 + * bytes, even when not necessary, than check to see of the value of + * elements requires it. Copying the data when not needed will do no + * harm. + */ + + (void) memcpy( & __glXReply.pad3, data, 8 ); + WriteToClient( client, sz_xGLXSingleReply, (char *) & __glXReply ); + + if ( reply_ints != 0 ) { + WriteToClient( client, reply_ints * 4, (char *) data ); + } +} + + +/** + * Send a GLX reply to the client. + * + * Technically speaking, there are several different ways to encode a GLX + * reply. The primary difference is whether or not certain fields (e.g., + * retval, size, and "pad3") are set. This function gets around that by + * always setting all of the fields to "reasonable" values. This does no + * harm to clients, but it does make the server-side code much more compact. + * + * \warning + * This function assumes that values stored in \c data will be byte-swapped + * by the caller if necessary. + */ +void +__glXSendReplySwap( ClientPtr client, const void * data, size_t elements, + size_t element_size, GLboolean always_array, CARD32 retval ) +{ + size_t reply_ints = 0; + + if ( __glXErrorOccured() ) { + elements = 0; + } + else if ( (elements > 1) || always_array ) { + reply_ints = ((elements * element_size) + 3) >> 2; + } + + __glXReply.length = bswap_32( reply_ints ); + __glXReply.type = X_Reply; + __glXReply.sequenceNumber = bswap_16( client->sequence ); + __glXReply.size = bswap_32( elements ); + __glXReply.retval = bswap_32( retval ); + + + /* It is faster on almost always every architecture to just copy the 8 + * bytes, even when not necessary, than check to see of the value of + * elements requires it. Copying the data when not needed will do no + * harm. + */ + + (void) memcpy( & __glXReply.pad3, data, 8 ); + WriteToClient( client, sz_xGLXSingleReply, (char *) & __glXReply ); + + if ( reply_ints != 0 ) { + WriteToClient( client, reply_ints * 4, (char *) data ); + } +} + + +static int +get_decode_index(const struct __glXDispatchInfo *dispatch_info, + unsigned opcode) +{ + int remaining_bits; + int next_remain; + const int_fast16_t * const tree = dispatch_info->dispatch_tree; + int_fast16_t index; + + + remaining_bits = dispatch_info->bits; + if (opcode >= (1U << remaining_bits)) { + return -1; + } + + index = 0; + for (/* empty */; remaining_bits > 0; remaining_bits = next_remain) { + unsigned mask; + unsigned child_index; + + + /* Calculate the slice of bits used by this node. + * + * If remaining_bits = 8 and tree[index] = 3, the mask of just the + * remaining bits is 0x00ff and the mask for the remaining bits after + * this node is 0x001f. By taking 0x00ff & ~0x001f, we get 0x00e0. + * This masks the 3 bits that we would want for this node. + */ + + next_remain = remaining_bits - tree[index]; + mask = ((1 << remaining_bits) - 1) & + ~((1 << next_remain) - 1); + + + /* Using the mask, calculate the index of the opcode in the node. + * With that index, fetch the index of the next node. + */ + + child_index = (opcode & mask) >> next_remain; + index = tree[index + 1 + child_index]; + + + /* If the next node is an empty leaf, the opcode is for a non-existant + * function. We're done. + * + * If the next node is a non-empty leaf, look up the function pointer + * and return it. + */ + + if (index == EMPTY_LEAF) { + return -1; + } + else if (IS_LEAF_INDEX(index)) { + unsigned func_index; + + + /* The value stored in the tree for a leaf node is the base of + * the function pointers for that leaf node. The offset for the + * function for a particular opcode is the remaining bits in the + * opcode. + */ + + func_index = -index; + func_index += opcode & ((1 << next_remain) - 1); + return func_index; + } + } + + /* We should *never* get here!!! + */ + return -1; +} + + +void * +__glXGetProtocolDecodeFunction(const struct __glXDispatchInfo *dispatch_info, + int opcode, int swapped_version) +{ + const int func_index = get_decode_index(dispatch_info, opcode); + + return (func_index < 0) + ? NULL + : (void *) dispatch_info->dispatch_functions[func_index][swapped_version]; +} + + +int +__glXGetProtocolSizeData(const struct __glXDispatchInfo *dispatch_info, + int opcode, __GLXrenderSizeData *data) +{ + if (dispatch_info->size_table != NULL) { + const int func_index = get_decode_index(dispatch_info, opcode); + + if ((func_index >= 0) + && (dispatch_info->size_table[func_index][0] != 0)) { + const int var_offset = + dispatch_info->size_table[func_index][1]; + + data->bytes = dispatch_info->size_table[func_index][0]; + data->varsize = (var_offset != ~0) + ? dispatch_info->size_func_table[var_offset] + : NULL; + + return 0; + } + } + + return -1; +} diff --git a/xorg-server-1.4/GL/glx/indirect_util.h b/xorg-server-1.4/GL/glx/indirect_util.h new file mode 100644 index 0000000..b00727a --- /dev/null +++ b/xorg-server-1.4/GL/glx/indirect_util.h @@ -0,0 +1,53 @@ +/* + * (C) Copyright IBM Corporation 2005 + * 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, sub license, + * 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 + * IBM, + * 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. + */ + +#ifndef __GLX_INDIRECT_UTIL_H__ +#define __GLX_INDIRECT_UTIL_H__ + +extern GLint __glGetBooleanv_variable_size( GLenum e ); + +extern void * __glXGetAnswerBuffer( __GLXclientState * cl, + size_t required_size, void * local_buffer, size_t local_size, + unsigned alignment ); + +extern void __glXSendReply( ClientPtr client, const void * data, + size_t elements, size_t element_size, GLboolean always_array, + CARD32 retval ); + +extern void __glXSendReplySwap( ClientPtr client, const void * data, + size_t elements, size_t element_size, GLboolean always_array, + CARD32 retval ); + +struct __glXDispatchInfo; + +extern void *__glXGetProtocolDecodeFunction( + const struct __glXDispatchInfo *dispatch_info, int opcode, + int swapped_version); + +extern int __glXGetProtocolSizeData( + const struct __glXDispatchInfo *dispatch_info, int opcode, + __GLXrenderSizeData *data); + +#endif /* __GLX_INDIRECT_UTIL_H__ */ diff --git a/xorg-server-1.4/GL/glx/render2.c b/xorg-server-1.4/GL/glx/render2.c new file mode 100644 index 0000000..5b3d3e6 --- /dev/null +++ b/xorg-server-1.4/GL/glx/render2.c @@ -0,0 +1,264 @@ +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +/* #define NEED_REPLIES */ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "unpack.h" +#include "indirect_size.h" +#include "indirect_dispatch.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + + +void __glXDisp_Map1f(GLbyte *pc) +{ + GLint order, k; + GLfloat u1, u2, *points; + GLenum target; + + target = *(GLenum *)(pc + 0); + order = *(GLint *)(pc + 12); + u1 = *(GLfloat *)(pc + 4); + u2 = *(GLfloat *)(pc + 8); + points = (GLfloat *)(pc + 16); + k = __glMap1f_size(target); + + CALL_Map1f( GET_DISPATCH(), (target, u1, u2, k, order, points) ); +} + +void __glXDisp_Map2f(GLbyte *pc) +{ + GLint uorder, vorder, ustride, vstride, k; + GLfloat u1, u2, v1, v2, *points; + GLenum target; + + target = *(GLenum *)(pc + 0); + uorder = *(GLint *)(pc + 12); + vorder = *(GLint *)(pc + 24); + u1 = *(GLfloat *)(pc + 4); + u2 = *(GLfloat *)(pc + 8); + v1 = *(GLfloat *)(pc + 16); + v2 = *(GLfloat *)(pc + 20); + points = (GLfloat *)(pc + 28); + + k = __glMap2f_size(target); + ustride = vorder * k; + vstride = k; + + CALL_Map2f( GET_DISPATCH(), (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points) ); +} + +void __glXDisp_Map1d(GLbyte *pc) +{ + GLint order, k; +#ifdef __GLX_ALIGN64 + GLint compsize; +#endif + GLenum target; + GLdouble u1, u2, *points; + + target = *(GLenum*) (pc + 16); + order = *(GLint*) (pc + 20); + k = __glMap1d_size(target); + +#ifdef __GLX_ALIGN64 + if (order < 0 || k < 0) { + compsize = 0; + } else { + compsize = order * k; + } +#endif + + __GLX_GET_DOUBLE(u1,pc); + __GLX_GET_DOUBLE(u2,pc+8); + pc += 24; + +#ifdef __GLX_ALIGN64 + if (((unsigned long)pc) & 7) { + /* + ** Copy the doubles up 4 bytes, trashing the command but aligning + ** the data in the process + */ + __GLX_MEM_COPY(pc-4, pc, compsize*8); + points = (GLdouble*) (pc - 4); + } else { + points = (GLdouble*) pc; + } +#else + points = (GLdouble*) pc; +#endif + CALL_Map1d( GET_DISPATCH(), (target, u1, u2, k, order, points) ); +} + +void __glXDisp_Map2d(GLbyte *pc) +{ + GLdouble u1, u2, v1, v2, *points; + GLint uorder, vorder, ustride, vstride, k; +#ifdef __GLX_ALIGN64 + GLint compsize; +#endif + GLenum target; + + target = *(GLenum *)(pc + 32); + uorder = *(GLint *)(pc + 36); + vorder = *(GLint *)(pc + 40); + k = __glMap2d_size(target); + +#ifdef __GLX_ALIGN64 + if (vorder < 0 || uorder < 0 || k < 0) { + compsize = 0; + } else { + compsize = uorder * vorder * k; + } +#endif + + __GLX_GET_DOUBLE(u1,pc); + __GLX_GET_DOUBLE(u2,pc+8); + __GLX_GET_DOUBLE(v1,pc+16); + __GLX_GET_DOUBLE(v2,pc+24); + pc += 44; + + ustride = vorder * k; + vstride = k; + +#ifdef __GLX_ALIGN64 + if (((unsigned long)pc) & 7) { + /* + ** Copy the doubles up 4 bytes, trashing the command but aligning + ** the data in the process + */ + __GLX_MEM_COPY(pc-4, pc, compsize*8); + points = (GLdouble*) (pc - 4); + } else { + points = (GLdouble*) pc; + } +#else + points = (GLdouble*) pc; +#endif + CALL_Map2d( GET_DISPATCH(), (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points) ); +} + +void __glXDisp_DrawArrays(GLbyte *pc) +{ + __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *)pc; + __GLXdispatchDrawArraysComponentHeader *compHeader; + GLint numVertexes = hdr->numVertexes; + GLint numComponents = hdr->numComponents; + GLenum primType = hdr->primType; + GLint stride = 0; + int i; + + pc += sizeof(__GLXdispatchDrawArraysHeader); + compHeader = (__GLXdispatchDrawArraysComponentHeader *)pc; + + /* compute stride (same for all component arrays) */ + for (i = 0; i < numComponents; i++) { + GLenum datatype = compHeader[i].datatype; + GLint numVals = compHeader[i].numVals; + + stride += __GLX_PAD(numVals * __glXTypeSize(datatype)); + } + + pc += numComponents * sizeof(__GLXdispatchDrawArraysComponentHeader); + + /* set up component arrays */ + for (i = 0; i < numComponents; i++) { + GLenum datatype = compHeader[i].datatype; + GLint numVals = compHeader[i].numVals; + GLenum component = compHeader[i].component; + + switch (component) { + case GL_VERTEX_ARRAY: + CALL_EnableClientState( GET_DISPATCH(), (GL_VERTEX_ARRAY) ); + CALL_VertexPointer( GET_DISPATCH(), (numVals, datatype, stride, pc) ); + break; + case GL_NORMAL_ARRAY: + CALL_EnableClientState( GET_DISPATCH(), (GL_NORMAL_ARRAY) ); + CALL_NormalPointer( GET_DISPATCH(), (datatype, stride, pc) ); + break; + case GL_COLOR_ARRAY: + CALL_EnableClientState( GET_DISPATCH(), (GL_COLOR_ARRAY) ); + CALL_ColorPointer( GET_DISPATCH(), (numVals, datatype, stride, pc) ); + break; + case GL_INDEX_ARRAY: + CALL_EnableClientState( GET_DISPATCH(), (GL_INDEX_ARRAY) ); + CALL_IndexPointer( GET_DISPATCH(), (datatype, stride, pc) ); + break; + case GL_TEXTURE_COORD_ARRAY: + CALL_EnableClientState( GET_DISPATCH(), (GL_TEXTURE_COORD_ARRAY) ); + CALL_TexCoordPointer( GET_DISPATCH(), (numVals, datatype, stride, pc) ); + break; + case GL_EDGE_FLAG_ARRAY: + CALL_EnableClientState( GET_DISPATCH(), (GL_EDGE_FLAG_ARRAY) ); + CALL_EdgeFlagPointer( GET_DISPATCH(), (stride, (const GLboolean *)pc) ); + break; + case GL_SECONDARY_COLOR_ARRAY: + CALL_EnableClientState( GET_DISPATCH(), (GL_SECONDARY_COLOR_ARRAY) ); + CALL_SecondaryColorPointerEXT( GET_DISPATCH(), (numVals, datatype, stride, pc) ); + break; + case GL_FOG_COORD_ARRAY: + CALL_EnableClientState( GET_DISPATCH(), (GL_FOG_COORD_ARRAY) ); + CALL_FogCoordPointerEXT( GET_DISPATCH(), (datatype, stride, pc) ); + break; + default: + break; + } + + pc += __GLX_PAD(numVals * __glXTypeSize(datatype)); + } + + CALL_DrawArrays( GET_DISPATCH(), (primType, 0, numVertexes) ); + + /* turn off anything we might have turned on */ + CALL_DisableClientState( GET_DISPATCH(), (GL_VERTEX_ARRAY) ); + CALL_DisableClientState( GET_DISPATCH(), (GL_NORMAL_ARRAY) ); + CALL_DisableClientState( GET_DISPATCH(), (GL_COLOR_ARRAY) ); + CALL_DisableClientState( GET_DISPATCH(), (GL_INDEX_ARRAY) ); + CALL_DisableClientState( GET_DISPATCH(), (GL_TEXTURE_COORD_ARRAY) ); + CALL_DisableClientState( GET_DISPATCH(), (GL_EDGE_FLAG_ARRAY) ); + CALL_DisableClientState( GET_DISPATCH(), (GL_SECONDARY_COLOR_ARRAY) ); + CALL_DisableClientState( GET_DISPATCH(), (GL_FOG_COORD_ARRAY) ); +} + +void __glXDisp_DrawArraysEXT(GLbyte *pc) +{ + __glXDisp_DrawArrays(pc); +} diff --git a/xorg-server-1.4/GL/glx/render2swap.c b/xorg-server-1.4/GL/glx/render2swap.c new file mode 100644 index 0000000..23b7ebd --- /dev/null +++ b/xorg-server-1.4/GL/glx/render2swap.c @@ -0,0 +1,375 @@ +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +/* #define NEED_REPLIES */ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "unpack.h" +#include "indirect_size.h" +#include "indirect_dispatch.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + + +void __glXDispSwap_Map1f(GLbyte *pc) +{ + GLint order, k; + GLfloat u1, u2, *points; + GLenum target; + GLint compsize; + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 12); + __GLX_SWAP_FLOAT(pc + 4); + __GLX_SWAP_FLOAT(pc + 8); + + target = *(GLenum *)(pc + 0); + order = *(GLint *)(pc + 12); + u1 = *(GLfloat *)(pc + 4); + u2 = *(GLfloat *)(pc + 8); + points = (GLfloat *)(pc + 16); + k = __glMap1f_size(target); + + if (order <= 0 || k < 0) { + /* Erroneous command. */ + compsize = 0; + } else { + compsize = order * k; + } + __GLX_SWAP_FLOAT_ARRAY(points, compsize); + + CALL_Map1f( GET_DISPATCH(), (target, u1, u2, k, order, points) ); +} + +void __glXDispSwap_Map2f(GLbyte *pc) +{ + GLint uorder, vorder, ustride, vstride, k; + GLfloat u1, u2, v1, v2, *points; + GLenum target; + GLint compsize; + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 12); + __GLX_SWAP_INT(pc + 24); + __GLX_SWAP_FLOAT(pc + 4); + __GLX_SWAP_FLOAT(pc + 8); + __GLX_SWAP_FLOAT(pc + 16); + __GLX_SWAP_FLOAT(pc + 20); + + target = *(GLenum *)(pc + 0); + uorder = *(GLint *)(pc + 12); + vorder = *(GLint *)(pc + 24); + u1 = *(GLfloat *)(pc + 4); + u2 = *(GLfloat *)(pc + 8); + v1 = *(GLfloat *)(pc + 16); + v2 = *(GLfloat *)(pc + 20); + points = (GLfloat *)(pc + 28); + + k = __glMap2f_size(target); + ustride = vorder * k; + vstride = k; + + if (vorder <= 0 || uorder <= 0 || k < 0) { + /* Erroneous command. */ + compsize = 0; + } else { + compsize = uorder * vorder * k; + } + __GLX_SWAP_FLOAT_ARRAY(points, compsize); + + CALL_Map2f( GET_DISPATCH(), (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points) ); +} + +void __glXDispSwap_Map1d(GLbyte *pc) +{ + GLint order, k, compsize; + GLenum target; + GLdouble u1, u2, *points; + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + + __GLX_SWAP_DOUBLE(pc + 0); + __GLX_SWAP_DOUBLE(pc + 8); + __GLX_SWAP_INT(pc + 16); + __GLX_SWAP_INT(pc + 20); + + target = *(GLenum*) (pc + 16); + order = *(GLint*) (pc + 20); + k = __glMap1d_size(target); + if (order <= 0 || k < 0) { + /* Erroneous command. */ + compsize = 0; + } else { + compsize = order * k; + } + __GLX_GET_DOUBLE(u1,pc); + __GLX_GET_DOUBLE(u2,pc+8); + __GLX_SWAP_DOUBLE_ARRAY(pc+24, compsize); + pc += 24; + +#ifdef __GLX_ALIGN64 + if (((unsigned long)pc) & 7) { + /* + ** Copy the doubles up 4 bytes, trashing the command but aligning + ** the data in the process + */ + __GLX_MEM_COPY(pc-4, pc, compsize*8); + points = (GLdouble*) (pc - 4); + } else { + points = (GLdouble*) pc; + } +#else + points = (GLdouble*) pc; +#endif + CALL_Map1d( GET_DISPATCH(), (target, u1, u2, k, order, points) ); +} + +void __glXDispSwap_Map2d(GLbyte *pc) +{ + GLdouble u1, u2, v1, v2, *points; + GLint uorder, vorder, ustride, vstride, k, compsize; + GLenum target; + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + + __GLX_SWAP_DOUBLE(pc + 0); + __GLX_SWAP_DOUBLE(pc + 8); + __GLX_SWAP_DOUBLE(pc + 16); + __GLX_SWAP_DOUBLE(pc + 24); + __GLX_SWAP_INT(pc + 32); + __GLX_SWAP_INT(pc + 36); + __GLX_SWAP_INT(pc + 40); + + target = *(GLenum *)(pc + 32); + uorder = *(GLint *)(pc + 36); + vorder = *(GLint *)(pc + 40); + k = __glMap2d_size(target); + if (vorder <= 0 || uorder <= 0 || k < 0) { + /* Erroneous command. */ + compsize = 0; + } else { + compsize = uorder * vorder * k; + } + __GLX_GET_DOUBLE(u1,pc); + __GLX_GET_DOUBLE(u2,pc+8); + __GLX_GET_DOUBLE(v1,pc+16); + __GLX_GET_DOUBLE(v2,pc+24); + __GLX_SWAP_DOUBLE_ARRAY(pc+44, compsize); + pc += 44; + ustride = vorder * k; + vstride = k; + +#ifdef __GLX_ALIGN64 + if (((unsigned long)pc) & 7) { + /* + ** Copy the doubles up 4 bytes, trashing the command but aligning + ** the data in the process + */ + __GLX_MEM_COPY(pc-4, pc, compsize*8); + points = (GLdouble*) (pc - 4); + } else { + points = (GLdouble*) pc; + } +#else + points = (GLdouble*) pc; +#endif + CALL_Map2d( GET_DISPATCH(), (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points) ); +} + +static void swapArray(GLint numVals, GLenum datatype, + GLint stride, GLint numVertexes, GLbyte *pc) +{ + int i,j; + __GLX_DECLARE_SWAP_VARIABLES; + + switch (datatype) { + case GL_BYTE: + case GL_UNSIGNED_BYTE: + /* don't need to swap */ + return; + case GL_SHORT: + case GL_UNSIGNED_SHORT: + for (i=0; inumVertexes; + GLint numComponents = hdr->numComponents; + GLenum primType = hdr->primType; + GLint stride = 0; + int i; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&numVertexes); + __GLX_SWAP_INT(&numComponents); + __GLX_SWAP_INT(&primType); + + pc += sizeof(__GLXdispatchDrawArraysHeader); + compHeader = (__GLXdispatchDrawArraysComponentHeader *) pc; + + /* compute stride (same for all component arrays) */ + for (i=0; i +#endif + +#include "glxserver.h" +#include "unpack.h" +#include "indirect_dispatch.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + +void __glXDisp_SeparableFilter2D(GLbyte *pc) +{ + __GLXdispatchConvolutionFilterHeader *hdr = + (__GLXdispatchConvolutionFilterHeader *) pc; + GLint hdrlen, image1len; + + hdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_DISPATCH_HDR_SIZE); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, hdr->alignment) ); + + /* XXX check this usage - internal code called + ** a version without the packing parameters + */ + image1len = __glXImageSize(hdr->format, hdr->type, 0, hdr->width, 1, 1, + 0, hdr->rowLength, 0, hdr->skipRows, + hdr->alignment); + image1len = __GLX_PAD(image1len); + + CALL_SeparableFilter2D( GET_DISPATCH(), (hdr->target, hdr->internalformat, + hdr->width, hdr->height, hdr->format, hdr->type, + ((GLubyte *)hdr+hdrlen), ((GLubyte *)hdr+hdrlen+image1len)) ); +} diff --git a/xorg-server-1.4/GL/glx/renderpixswap.c b/xorg-server-1.4/GL/glx/renderpixswap.c new file mode 100644 index 0000000..8455807 --- /dev/null +++ b/xorg-server-1.4/GL/glx/renderpixswap.c @@ -0,0 +1,93 @@ +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "unpack.h" +#include "indirect_dispatch.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + +void __glXDispSwap_SeparableFilter2D(GLbyte *pc) +{ + __GLXdispatchConvolutionFilterHeader *hdr = + (__GLXdispatchConvolutionFilterHeader *) pc; + GLint hdrlen, image1len; + __GLX_DECLARE_SWAP_VARIABLES; + + hdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_HDR_SIZE); + + __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); + __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); + __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); + __GLX_SWAP_INT((GLbyte *)&hdr->alignment); + + __GLX_SWAP_INT((GLbyte *)&hdr->target); + __GLX_SWAP_INT((GLbyte *)&hdr->internalformat); + __GLX_SWAP_INT((GLbyte *)&hdr->width); + __GLX_SWAP_INT((GLbyte *)&hdr->height); + __GLX_SWAP_INT((GLbyte *)&hdr->format); + __GLX_SWAP_INT((GLbyte *)&hdr->type); + + /* + ** Just invert swapBytes flag; the GL will figure out if it needs to swap + ** the pixel data. + */ + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, !hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, hdr->alignment) ); + + /* XXX check this usage - internal code called + ** a version without the packing parameters + */ + image1len = __glXImageSize(hdr->format, hdr->type, 0, hdr->width, 1, 1, + 0, hdr->rowLength, 0, hdr->skipRows, + hdr->alignment); + image1len = __GLX_PAD(image1len); + + + CALL_SeparableFilter2D( GET_DISPATCH(), (hdr->target, hdr->internalformat, + hdr->width, hdr->height, hdr->format, hdr->type, + ((GLubyte *)hdr+hdrlen), ((GLubyte *)hdr+hdrlen+image1len)) ); +} diff --git a/xorg-server-1.4/GL/glx/rensize.c b/xorg-server-1.4/GL/glx/rensize.c new file mode 100644 index 0000000..c69619a --- /dev/null +++ b/xorg-server-1.4/GL/glx/rensize.c @@ -0,0 +1,423 @@ +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "glxserver.h" +#include "GL/glxproto.h" +#include "unpack.h" +#include "indirect_size.h" +#include "indirect_reqsize.h" + +#define SWAPL(a) \ + (((a & 0xff000000U)>>24) | ((a & 0xff0000U)>>8) | \ + ((a & 0xff00U)<<8) | ((a & 0xffU)<<24)) + +static int Map1Size( GLint k, GLint order) +{ + if (order <= 0 || k < 0) return -1; + return k * order; +} + +int __glXMap1dReqSize( const GLbyte *pc, Bool swap ) +{ + GLenum target; + GLint order, k; + + target = *(GLenum*) (pc + 16); + order = *(GLint*) (pc + 20); + if (swap) { + target = SWAPL( target ); + order = SWAPL( order ); + } + k = __glMap1d_size( target ); + return 8 * Map1Size( k, order ); +} + +int __glXMap1fReqSize( const GLbyte *pc, Bool swap ) +{ + GLenum target; + GLint order, k; + + target = *(GLenum *)(pc + 0); + order = *(GLint *)(pc + 12); + if (swap) { + target = SWAPL( target ); + order = SWAPL( order ); + } + k = __glMap1f_size(target); + return 4 * Map1Size(k, order); +} + +static int Map2Size(int k, int majorOrder, int minorOrder) +{ + if (majorOrder <= 0 || minorOrder <= 0 || k < 0) return -1; + return k * majorOrder * minorOrder; +} + +int __glXMap2dReqSize( const GLbyte *pc, Bool swap ) +{ + GLenum target; + GLint uorder, vorder, k; + + target = *(GLenum *)(pc + 32); + uorder = *(GLint *)(pc + 36); + vorder = *(GLint *)(pc + 40); + if (swap) { + target = SWAPL( target ); + uorder = SWAPL( uorder ); + vorder = SWAPL( vorder ); + } + k = __glMap2d_size( target ); + return 8 * Map2Size( k, uorder, vorder ); +} + +int __glXMap2fReqSize( const GLbyte *pc, Bool swap ) +{ + GLenum target; + GLint uorder, vorder, k; + + target = *(GLenum *)(pc + 0); + uorder = *(GLint *)(pc + 12); + vorder = *(GLint *)(pc + 24); + if (swap) { + target = SWAPL( target ); + uorder = SWAPL( uorder ); + vorder = SWAPL( vorder ); + } + k = __glMap2f_size( target ); + return 4 * Map2Size( k, uorder, vorder ); +} + +/** + * Calculate the size of an image. + * + * The size of an image sent to the server from the client or sent from the + * server to the client is calculated. The size is based on the dimensions + * of the image, the type of pixel data, padding in the image, and the + * alignment requirements of the image. + * + * \param format Format of the pixels. Same as the \c format parameter + * to \c glTexImage1D + * \param type Type of the pixel data. Same as the \c type parameter + * to \c glTexImage1D + * \param target Typically the texture target of the image. If the + * target is one of \c GL_PROXY_*, the size returned is + * always zero. For uses that do not have a texture target + * (e.g, glDrawPixels), zero should be specified. + * \param w Width of the image data. Must be >= 1. + * \param h Height of the image data. Must be >= 1, even for 1D + * images. + * \param d Depth of the image data. Must be >= 1, even for 1D or + * 2D images. + * \param imageHeight If non-zero, defines the true height of a volumetric + * image. This value will be used instead of \c h for + * calculating the size of the image. + * \param rowLength If non-zero, defines the true width of an image. This + * value will be used instead of \c w for calculating the + * size of the image. + * \param skipImages Number of extra layers of image data in a volumtric + * image that are to be skipped before the real data. + * \param skipRows Number of extra rows of image data in an image that are + * to be skipped before the real data. + * \param alignment Specifies the alignment for the start of each pixel row + * in memory. This value must be one of 1, 2, 4, or 8. + * + * \returns + * The size of the image is returned. If the specified \c format and \c type + * are invalid, -1 is returned. If \c target is one of \c GL_PROXY_*, zero + * is returned. + */ +int __glXImageSize( GLenum format, GLenum type, GLenum target, + GLsizei w, GLsizei h, GLsizei d, + GLint imageHeight, GLint rowLength, + GLint skipImages, GLint skipRows, GLint alignment ) +{ + GLint bytesPerElement, elementsPerGroup, groupsPerRow; + GLint groupSize, rowSize, padding, imageSize; + + if (w < 0 || h < 0 || d < 0 || + (type == GL_BITMAP && + (format != GL_COLOR_INDEX && format != GL_STENCIL_INDEX))) { + return -1; + } + if (w==0 || h==0 || d == 0) return 0; + + switch( target ) { + case GL_PROXY_TEXTURE_1D: + case GL_PROXY_TEXTURE_2D: + case GL_PROXY_TEXTURE_3D: + case GL_PROXY_TEXTURE_4D_SGIS: + case GL_PROXY_TEXTURE_CUBE_MAP: + case GL_PROXY_TEXTURE_RECTANGLE_ARB: + case GL_PROXY_HISTOGRAM: + case GL_PROXY_COLOR_TABLE: + case GL_PROXY_TEXTURE_COLOR_TABLE_SGI: + case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE: + case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE: + case GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP: + return 0; + } + + if (type == GL_BITMAP) { + if (rowLength > 0) { + groupsPerRow = rowLength; + } else { + groupsPerRow = w; + } + rowSize = (groupsPerRow + 7) >> 3; + padding = (rowSize % alignment); + if (padding) { + rowSize += alignment - padding; + } + return ((h + skipRows) * rowSize); + } else { + switch(format) { + case GL_COLOR_INDEX: + case GL_STENCIL_INDEX: + case GL_DEPTH_COMPONENT: + case GL_RED: + case GL_GREEN: + case GL_BLUE: + case GL_ALPHA: + case GL_LUMINANCE: + case GL_INTENSITY: + elementsPerGroup = 1; + break; + case GL_422_EXT: + case GL_422_REV_EXT: + case GL_422_AVERAGE_EXT: + case GL_422_REV_AVERAGE_EXT: + case GL_DEPTH_STENCIL_NV: + case GL_DEPTH_STENCIL_MESA: + case GL_YCBCR_MESA: + case GL_LUMINANCE_ALPHA: + elementsPerGroup = 2; + break; + case GL_RGB: + case GL_BGR: + elementsPerGroup = 3; + break; + case GL_RGBA: + case GL_BGRA: + case GL_ABGR_EXT: + elementsPerGroup = 4; + break; + default: + return -1; + } + switch(type) { + case GL_UNSIGNED_BYTE: + case GL_BYTE: + bytesPerElement = 1; + break; + case GL_UNSIGNED_BYTE_3_3_2: + case GL_UNSIGNED_BYTE_2_3_3_REV: + bytesPerElement = 1; + elementsPerGroup = 1; + break; + case GL_UNSIGNED_SHORT: + case GL_SHORT: + bytesPerElement = 2; + break; + case GL_UNSIGNED_SHORT_5_6_5: + case GL_UNSIGNED_SHORT_5_6_5_REV: + case GL_UNSIGNED_SHORT_4_4_4_4: + case GL_UNSIGNED_SHORT_4_4_4_4_REV: + case GL_UNSIGNED_SHORT_5_5_5_1: + case GL_UNSIGNED_SHORT_1_5_5_5_REV: + case GL_UNSIGNED_SHORT_8_8_APPLE: + case GL_UNSIGNED_SHORT_8_8_REV_APPLE: + case GL_UNSIGNED_SHORT_15_1_MESA: + case GL_UNSIGNED_SHORT_1_15_REV_MESA: + bytesPerElement = 2; + elementsPerGroup = 1; + break; + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + bytesPerElement = 4; + break; + case GL_UNSIGNED_INT_8_8_8_8: + case GL_UNSIGNED_INT_8_8_8_8_REV: + case GL_UNSIGNED_INT_10_10_10_2: + case GL_UNSIGNED_INT_2_10_10_10_REV: + case GL_UNSIGNED_INT_24_8_NV: + case GL_UNSIGNED_INT_24_8_MESA: + case GL_UNSIGNED_INT_8_24_REV_MESA: + bytesPerElement = 4; + elementsPerGroup = 1; + break; + default: + return -1; + } + groupSize = bytesPerElement * elementsPerGroup; + if (rowLength > 0) { + groupsPerRow = rowLength; + } else { + groupsPerRow = w; + } + rowSize = groupsPerRow * groupSize; + padding = (rowSize % alignment); + if (padding) { + rowSize += alignment - padding; + } + if (imageHeight > 0) { + imageSize = (imageHeight + skipRows) * rowSize; + } else { + imageSize = (h + skipRows) * rowSize; + } + return ((d + skipImages) * imageSize); + } +} + + +/* XXX this is used elsewhere - should it be exported from glxserver.h? */ +int __glXTypeSize(GLenum enm) +{ + switch(enm) { + case GL_BYTE: return sizeof(GLbyte); + case GL_UNSIGNED_BYTE: return sizeof(GLubyte); + case GL_SHORT: return sizeof(GLshort); + case GL_UNSIGNED_SHORT: return sizeof(GLushort); + case GL_INT: return sizeof(GLint); + case GL_UNSIGNED_INT: return sizeof(GLint); + case GL_FLOAT: return sizeof(GLfloat); + case GL_DOUBLE: return sizeof(GLdouble); + default: return -1; + } +} + +int __glXDrawArraysReqSize( const GLbyte *pc, Bool swap ) +{ + __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *) pc; + __GLXdispatchDrawArraysComponentHeader *compHeader; + GLint numVertexes = hdr->numVertexes; + GLint numComponents = hdr->numComponents; + GLint arrayElementSize = 0; + int i; + + if (swap) { + numVertexes = SWAPL( numVertexes ); + numComponents = SWAPL( numComponents ); + } + + pc += sizeof(__GLXdispatchDrawArraysHeader); + compHeader = (__GLXdispatchDrawArraysComponentHeader *) pc; + + for (i=0; iformat; + GLenum type = hdr->type; + GLint w = hdr->width; + GLint h = hdr->height; + GLint rowLength = hdr->rowLength; + GLint alignment = hdr->alignment; + + if (swap) { + format = SWAPL( format ); + type = SWAPL( type ); + w = SWAPL( w ); + h = SWAPL( h ); + rowLength = SWAPL( rowLength ); + alignment = SWAPL( alignment ); + } + + /* XXX Should rowLength be used for either or both image? */ + image1size = __glXImageSize( format, type, 0, w, 1, 1, + 0, rowLength, 0, 0, alignment ); + image1size = __GLX_PAD(image1size); + image2size = __glXImageSize( format, type, 0, h, 1, 1, + 0, rowLength, 0, 0, alignment ); + return image1size + image2size; + +} diff --git a/xorg-server-1.4/GL/glx/single2.c b/xorg-server-1.4/GL/glx/single2.c new file mode 100644 index 0000000..3387af2 --- /dev/null +++ b/xorg-server-1.4/GL/glx/single2.c @@ -0,0 +1,394 @@ +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include + +#include "glxserver.h" +#include "glxutil.h" +#include "glxext.h" +#include "indirect_dispatch.h" +#include "unpack.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + +int __glXDisp_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc) +{ + GLsizei size; + GLenum type; + __GLXcontext *cx; + int error; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + size = *(GLsizei *)(pc+0); + type = *(GLenum *)(pc+4); + if (cx->feedbackBufSize < size) { + cx->feedbackBuf = (GLfloat *) xrealloc(cx->feedbackBuf, + (size_t)size + * __GLX_SIZE_FLOAT32); + if (!cx->feedbackBuf) { + cl->client->errorValue = size; + return BadAlloc; + } + cx->feedbackBufSize = size; + } + CALL_FeedbackBuffer( GET_DISPATCH(), (size, type, cx->feedbackBuf) ); + __GLX_NOTE_UNFLUSHED_CMDS(cx); + return Success; +} + +int __glXDisp_SelectBuffer(__GLXclientState *cl, GLbyte *pc) +{ + __GLXcontext *cx; + GLsizei size; + int error; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + size = *(GLsizei *)(pc+0); + if (cx->selectBufSize < size) { + cx->selectBuf = (GLuint *) xrealloc(cx->selectBuf, + (size_t) size + * __GLX_SIZE_CARD32); + if (!cx->selectBuf) { + cl->client->errorValue = size; + return BadAlloc; + } + cx->selectBufSize = size; + } + CALL_SelectBuffer( GET_DISPATCH(), (size, cx->selectBuf) ); + __GLX_NOTE_UNFLUSHED_CMDS(cx); + return Success; +} + +int __glXDisp_RenderMode(__GLXclientState *cl, GLbyte *pc) +{ + ClientPtr client; + xGLXRenderModeReply reply; + __GLXcontext *cx; + GLint nitems=0, retBytes=0, retval, newModeCheck; + GLubyte *retBuffer = NULL; + GLenum newMode; + int error; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + newMode = *(GLenum*) pc; + retval = CALL_RenderMode( GET_DISPATCH(), (newMode) ); + + /* Check that render mode worked */ + CALL_GetIntegerv( GET_DISPATCH(), (GL_RENDER_MODE, &newModeCheck) ); + if (newModeCheck != newMode) { + /* Render mode change failed. Bail */ + newMode = newModeCheck; + goto noChangeAllowed; + } + + /* + ** Render mode might have still failed if we get here. But in this + ** case we can't really tell, nor does it matter. If it did fail, it + ** will return 0, and thus we won't send any data across the wire. + */ + + switch (cx->renderMode) { + case GL_RENDER: + cx->renderMode = newMode; + break; + case GL_FEEDBACK: + if (retval < 0) { + /* Overflow happened. Copy the entire buffer */ + nitems = cx->feedbackBufSize; + } else { + nitems = retval; + } + retBytes = nitems * __GLX_SIZE_FLOAT32; + retBuffer = (GLubyte*) cx->feedbackBuf; + cx->renderMode = newMode; + break; + case GL_SELECT: + if (retval < 0) { + /* Overflow happened. Copy the entire buffer */ + nitems = cx->selectBufSize; + } else { + GLuint *bp = cx->selectBuf; + GLint i; + + /* + ** Figure out how many bytes of data need to be sent. Parse + ** the selection buffer to determine this fact as the + ** return value is the number of hits, not the number of + ** items in the buffer. + */ + nitems = 0; + i = retval; + while (--i >= 0) { + GLuint n; + + /* Parse select data for this hit */ + n = *bp; + bp += 3 + n; + } + nitems = bp - cx->selectBuf; + } + retBytes = nitems * __GLX_SIZE_CARD32; + retBuffer = (GLubyte*) cx->selectBuf; + cx->renderMode = newMode; + break; + } + + /* + ** First reply is the number of elements returned in the feedback or + ** selection array, as per the API for glRenderMode itself. + */ + noChangeAllowed:; + client = cl->client; + reply.length = nitems; + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + reply.retval = retval; + reply.size = nitems; + reply.newMode = newMode; + WriteToClient(client, sz_xGLXRenderModeReply, (char *)&reply); + if (retBytes) { + WriteToClient(client, retBytes, (char *)retBuffer); + } + return Success; +} + +int __glXDisp_Flush(__GLXclientState *cl, GLbyte *pc) +{ + __GLXcontext *cx; + int error; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + CALL_Flush( GET_DISPATCH(), () ); + __GLX_NOTE_FLUSHED_CMDS(cx); + return Success; +} + +int __glXDisp_Finish(__GLXclientState *cl, GLbyte *pc) +{ + __GLXcontext *cx; + ClientPtr client; + int error; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + /* Do a local glFinish */ + CALL_Finish( GET_DISPATCH(), () ); + __GLX_NOTE_FLUSHED_CMDS(cx); + + /* Send empty reply packet to indicate finish is finished */ + client = cl->client; + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + return Success; +} + +#define SEPARATOR " " + +char *__glXcombine_strings(const char *cext_string, const char *sext_string) +{ + size_t clen, slen; + char *combo_string, *token, *s1; + const char *s2, *end; + + /* safeguard to prevent potentially fatal errors in the string functions */ + if (!cext_string) + cext_string = ""; + if (!sext_string) + sext_string = ""; + + /* + ** String can't be longer than min(cstring, sstring) + ** pull tokens out of shortest string + ** include space in combo_string for final separator and null terminator + */ + clen = strlen(cext_string); + slen = strlen(sext_string); + if (clen > slen) { + combo_string = (char *) xalloc(slen + 2); + s1 = (char *) xalloc(slen + 2); + if (s1) strcpy(s1, sext_string); + s2 = cext_string; + } else { + combo_string = (char *) xalloc(clen + 2); + s1 = (char *) xalloc(clen + 2); + if (s1) strcpy(s1, cext_string); + s2 = sext_string; + } + if (!combo_string || !s1) { + if (combo_string) + xfree(combo_string); + if (s1) + xfree(s1); + return NULL; + } + combo_string[0] = '\0'; + + /* Get first extension token */ + token = strtok( s1, SEPARATOR); + while ( token != NULL ) { + + /* + ** if token in second string then save it + ** beware of extension names which are prefixes of other extension names + */ + const char *p = s2; + end = p + strlen(p); + while (p < end) { + size_t n = strcspn(p, SEPARATOR); + if ((strlen(token) == n) && (strncmp(token, p, n) == 0)) { + combo_string = strcat(combo_string, token); + combo_string = strcat(combo_string, SEPARATOR); + } + p += (n + 1); + } + + /* Get next extension token */ + token = strtok( NULL, SEPARATOR); + } + xfree(s1); + return combo_string; +} + +int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap) +{ + ClientPtr client; + __GLXcontext *cx; + GLenum name; + const char *string; + __GLX_DECLARE_SWAP_VARIABLES; + int error; + char *buf = NULL, *buf1 = NULL; + GLint length = 0; + + /* If the client has the opposite byte order, swap the contextTag and + * the name. + */ + if ( need_swap ) { + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + __GLX_SINGLE_HDR_SIZE); + } + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + name = *(GLenum *)(pc + 0); + string = (const char *) CALL_GetString( GET_DISPATCH(), (name) ); + client = cl->client; + + /* + ** Restrict extensions to those that are supported by both the + ** implementation and the connection. That is, return the + ** intersection of client, server, and core extension strings. + */ + if (name == GL_EXTENSIONS) { + buf1 = __glXcombine_strings(string, + cl->GLClientextensions); + buf = __glXcombine_strings(buf1, + cx->pGlxScreen->GLextensions); + if (buf1 != NULL) { + xfree(buf1); + } + string = buf; + } + else if ( name == GL_VERSION ) { + if ( atof( string ) > atof( GLServerVersion ) ) { + buf = xalloc( strlen( string ) + strlen( GLServerVersion ) + 4 ); + if ( buf == NULL ) { + string = GLServerVersion; + } + else { + sprintf( buf, "%s (%s)", GLServerVersion, string ); + string = buf; + } + } + } + if (string) { + length = strlen((const char *) string) + 1; + } + + __GLX_BEGIN_REPLY(length); + __GLX_PUT_SIZE(length); + + if ( need_swap ) { + __GLX_SWAP_REPLY_SIZE(); + __GLX_SWAP_REPLY_HEADER(); + } + + __GLX_SEND_HEADER(); + WriteToClient(client, length, (char *) string); + if (buf != NULL) + xfree(buf); + + return Success; +} + +int __glXDisp_GetString(__GLXclientState *cl, GLbyte *pc) +{ + return DoGetString(cl, pc, GL_FALSE); +} diff --git a/xorg-server-1.4/GL/glx/single2swap.c b/xorg-server-1.4/GL/glx/single2swap.c new file mode 100644 index 0000000..41a42bb --- /dev/null +++ b/xorg-server-1.4/GL/glx/single2swap.c @@ -0,0 +1,272 @@ +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "glxutil.h" +#include "glxext.h" +#include "indirect_dispatch.h" +#include "unpack.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + +int __glXDispSwap_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc) +{ + GLsizei size; + GLenum type; + __GLX_DECLARE_SWAP_VARIABLES; + __GLXcontext *cx; + int error; + + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc+0); + __GLX_SWAP_INT(pc+4); + size = *(GLsizei *)(pc+0); + type = *(GLenum *)(pc+4); + if (cx->feedbackBufSize < size) { + cx->feedbackBuf = (GLfloat *) xrealloc(cx->feedbackBuf, + (size_t) size + * __GLX_SIZE_FLOAT32); + if (!cx->feedbackBuf) { + cl->client->errorValue = size; + return BadAlloc; + } + cx->feedbackBufSize = size; + } + CALL_FeedbackBuffer( GET_DISPATCH(), (size, type, cx->feedbackBuf) ); + __GLX_NOTE_UNFLUSHED_CMDS(cx); + return Success; +} + +int __glXDispSwap_SelectBuffer(__GLXclientState *cl, GLbyte *pc) +{ + __GLXcontext *cx; + GLsizei size; + __GLX_DECLARE_SWAP_VARIABLES; + int error; + + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc+0); + size = *(GLsizei *)(pc+0); + if (cx->selectBufSize < size) { + cx->selectBuf = (GLuint *) xrealloc(cx->selectBuf, + (size_t) size + * __GLX_SIZE_CARD32); + if (!cx->selectBuf) { + cl->client->errorValue = size; + return BadAlloc; + } + cx->selectBufSize = size; + } + CALL_SelectBuffer( GET_DISPATCH(), (size, cx->selectBuf) ); + __GLX_NOTE_UNFLUSHED_CMDS(cx); + return Success; +} + +int __glXDispSwap_RenderMode(__GLXclientState *cl, GLbyte *pc) +{ + ClientPtr client; + __GLXcontext *cx; + xGLXRenderModeReply reply; + GLint nitems=0, retBytes=0, retval, newModeCheck; + GLubyte *retBuffer = NULL; + GLenum newMode; + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + int error; + + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc); + newMode = *(GLenum*) pc; + retval = CALL_RenderMode( GET_DISPATCH(), (newMode) ); + + /* Check that render mode worked */ + CALL_GetIntegerv( GET_DISPATCH(), (GL_RENDER_MODE, &newModeCheck) ); + if (newModeCheck != newMode) { + /* Render mode change failed. Bail */ + newMode = newModeCheck; + goto noChangeAllowed; + } + + /* + ** Render mode might have still failed if we get here. But in this + ** case we can't really tell, nor does it matter. If it did fail, it + ** will return 0, and thus we won't send any data across the wire. + */ + + switch (cx->renderMode) { + case GL_RENDER: + cx->renderMode = newMode; + break; + case GL_FEEDBACK: + if (retval < 0) { + /* Overflow happened. Copy the entire buffer */ + nitems = cx->feedbackBufSize; + } else { + nitems = retval; + } + retBytes = nitems * __GLX_SIZE_FLOAT32; + retBuffer = (GLubyte*) cx->feedbackBuf; + __GLX_SWAP_FLOAT_ARRAY((GLbyte *)retBuffer, nitems); + cx->renderMode = newMode; + break; + case GL_SELECT: + if (retval < 0) { + /* Overflow happened. Copy the entire buffer */ + nitems = cx->selectBufSize; + } else { + GLuint *bp = cx->selectBuf; + GLint i; + + /* + ** Figure out how many bytes of data need to be sent. Parse + ** the selection buffer to determine this fact as the + ** return value is the number of hits, not the number of + ** items in the buffer. + */ + nitems = 0; + i = retval; + while (--i >= 0) { + GLuint n; + + /* Parse select data for this hit */ + n = *bp; + bp += 3 + n; + } + nitems = bp - cx->selectBuf; + } + retBytes = nitems * __GLX_SIZE_CARD32; + retBuffer = (GLubyte*) cx->selectBuf; + __GLX_SWAP_INT_ARRAY((GLbyte *)retBuffer, nitems); + cx->renderMode = newMode; + break; + } + + /* + ** First reply is the number of elements returned in the feedback or + ** selection array, as per the API for glRenderMode itself. + */ + noChangeAllowed:; + client = cl->client; + reply.length = nitems; + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + reply.retval = retval; + reply.size = nitems; + reply.newMode = newMode; + __GLX_SWAP_SHORT(&reply.sequenceNumber); + __GLX_SWAP_INT(&reply.length); + __GLX_SWAP_INT(&reply.retval); + __GLX_SWAP_INT(&reply.size); + __GLX_SWAP_INT(&reply.newMode); + WriteToClient(client, sz_xGLXRenderModeReply, (char *)&reply); + if (retBytes) { + WriteToClient(client, retBytes, (char *)retBuffer); + } + return Success; +} + +int __glXDispSwap_Flush(__GLXclientState *cl, GLbyte *pc) +{ + __GLXcontext *cx; + int error; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + CALL_Flush( GET_DISPATCH(), () ); + __GLX_NOTE_FLUSHED_CMDS(cx); + return Success; +} + +int __glXDispSwap_Finish(__GLXclientState *cl, GLbyte *pc) +{ + __GLXcontext *cx; + ClientPtr client; + int error; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + /* Do a local glFinish */ + CALL_Finish( GET_DISPATCH(), () ); + __GLX_NOTE_FLUSHED_CMDS(cx); + + /* Send empty reply packet to indicate finish is finished */ + client = cl->client; + __GLX_BEGIN_REPLY(0); + __GLX_PUT_RETVAL(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_HEADER(); + + return Success; +} + +int __glXDispSwap_GetString(__GLXclientState *cl, GLbyte *pc) +{ + return DoGetString(cl, pc, GL_TRUE); +} diff --git a/xorg-server-1.4/GL/glx/singlepix.c b/xorg-server-1.4/GL/glx/singlepix.c new file mode 100644 index 0000000..d6b96de --- /dev/null +++ b/xorg-server-1.4/GL/glx/singlepix.c @@ -0,0 +1,533 @@ +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "glxext.h" +#include "singlesize.h" +#include "unpack.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + +int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc) +{ + GLsizei width, height; + GLenum format, type; + GLboolean swapBytes, lsbFirst; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + width = *(GLsizei *)(pc + 8); + height = *(GLsizei *)(pc + 12); + format = *(GLenum *)(pc + 16); + type = *(GLenum *)(pc + 20); + swapBytes = *(GLboolean *)(pc + 24); + lsbFirst = *(GLboolean *)(pc + 25); + compsize = __glReadPixels_size(format,type,width,height); + if (compsize < 0) compsize = 0; + + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_LSB_FIRST, lsbFirst) ); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + CALL_ReadPixels( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLint *)(pc + 4), + *(GLsizei *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLenum *)(pc + 16), + *(GLenum *)(pc + 20), + answer + ) ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + return Success; +} + +int __glXDisp_GetTexImage(__GLXclientState *cl, GLbyte *pc) +{ + GLint level, compsize; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + GLint width=0, height=0, depth=1; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + level = *(GLint *)(pc + 4); + format = *(GLenum *)(pc + 8); + type = *(GLenum *)(pc + 12); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 16); + + CALL_GetTexLevelParameteriv( GET_DISPATCH(), (target, level, GL_TEXTURE_WIDTH, &width) ); + CALL_GetTexLevelParameteriv( GET_DISPATCH(), (target, level, GL_TEXTURE_HEIGHT, &height) ); + if ( target == GL_TEXTURE_3D) { + CALL_GetTexLevelParameteriv( GET_DISPATCH(), (target, level, GL_TEXTURE_DEPTH, &depth) ); + } + /* + * The three queries above might fail if we're in a state where queries + * are illegal, but then width, height, and depth would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,level,format,type,width,height,depth); + if (compsize < 0) compsize = 0; + + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) ); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + CALL_GetTexImage( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLenum *)(pc + 12), + answer + ) ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetTexImageReply *)&__glXReply)->width = width; + ((xGLXGetTexImageReply *)&__glXReply)->height = height; + ((xGLXGetTexImageReply *)&__glXReply)->depth = depth; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + return Success; +} + +int __glXDisp_GetPolygonStipple(__GLXclientState *cl, GLbyte *pc) +{ + GLboolean lsbFirst; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLubyte answerBuffer[200]; + char *answer; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + lsbFirst = *(GLboolean *)(pc + 0); + + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_LSB_FIRST, lsbFirst) ); + __GLX_GET_ANSWER_BUFFER(answer,cl,128,1); + + __glXClearErrorOccured(); + CALL_GetPolygonStipple( GET_DISPATCH(), ((GLubyte *) answer) ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(128); + __GLX_SEND_HEADER(); + __GLX_SEND_BYTE_ARRAY(128); + } + return Success; +} + +static int GetSeparableFilter(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag) +{ + GLint compsize, compsize2; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + GLint width=0, height=0; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + + /* target must be SEPARABLE_2D, however I guess we can let the GL + barf on this one.... */ + + CALL_GetConvolutionParameteriv(GET_DISPATCH(), (target, GL_CONVOLUTION_WIDTH, &width)); + CALL_GetConvolutionParameteriv(GET_DISPATCH(), (target, GL_CONVOLUTION_HEIGHT, &height)); + /* + * The two queries above might fail if we're in a state where queries + * are illegal, but then width and height would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,1,format,type,width,1,1); + compsize2 = __glGetTexImage_size(target,1,format,type,height,1,1); + + if (compsize < 0) compsize = 0; + if (compsize2 < 0) compsize2 = 0; + compsize = __GLX_PAD(compsize); + compsize2 = __GLX_PAD(compsize2); + + CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes)); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize + compsize2,1); + __glXClearErrorOccured(); + CALL_GetSeparableFilter( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + answer, + answer + compsize, + NULL + ) ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize + compsize2); + ((xGLXGetSeparableFilterReply *)&__glXReply)->width = width; + ((xGLXGetSeparableFilterReply *)&__glXReply)->height = height; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize + compsize2); + } + + return Success; +} + +int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetSeparableFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int __glXDisp_GetSeparableFilterEXT(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetSeparableFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} + +static int GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc, + GLXContextTag tag) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + GLint width=0, height=0; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + + CALL_GetConvolutionParameteriv(GET_DISPATCH(), + (target, GL_CONVOLUTION_WIDTH, &width)); + if (target == GL_CONVOLUTION_1D) { + height = 1; + } else { + CALL_GetConvolutionParameteriv(GET_DISPATCH(), + (target, GL_CONVOLUTION_HEIGHT, &height)); + } + /* + * The two queries above might fail if we're in a state where queries + * are illegal, but then width and height would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,1,format,type,width,height,1); + if (compsize < 0) compsize = 0; + + CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes)); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + CALL_GetConvolutionFilter( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + answer + ) ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetConvolutionFilterReply *)&__glXReply)->width = width; + ((xGLXGetConvolutionFilterReply *)&__glXReply)->height = height; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetConvolutionFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int __glXDisp_GetConvolutionFilterEXT(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetConvolutionFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} + +static int GetHistogram(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes, reset; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + GLint width=0; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + reset = *(GLboolean *)(pc + 13); + + CALL_GetHistogramParameteriv(GET_DISPATCH(), + (target, GL_HISTOGRAM_WIDTH, &width)); + /* + * The one query above might fail if we're in a state where queries + * are illegal, but then width would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,1,format,type,width,1,1); + if (compsize < 0) compsize = 0; + + CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes)); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + CALL_GetHistogram(GET_DISPATCH(), (target, reset, format, type, answer)); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetHistogramReply *)&__glXReply)->width = width; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetHistogram(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int __glXDisp_GetHistogramEXT(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetHistogram(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} + +static int GetMinmax(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes, reset; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + reset = *(GLboolean *)(pc + 13); + + compsize = __glGetTexImage_size(target,1,format,type,2,1,1); + if (compsize < 0) compsize = 0; + + CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes)); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + CALL_GetMinmax(GET_DISPATCH(), (target, reset, format, type, answer)); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetMinmax(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int __glXDisp_GetMinmaxEXT(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetMinmax(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} + +static int GetColorTable(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + GLint width=0; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + target = *(GLenum *)(pc + 0); + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + swapBytes = *(GLboolean *)(pc + 12); + + CALL_GetColorTableParameteriv(GET_DISPATCH(), + (target, GL_COLOR_TABLE_WIDTH, &width)); + /* + * The one query above might fail if we're in a state where queries + * are illegal, but then width would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,1,format,type,width,1,1); + if (compsize < 0) compsize = 0; + + CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes)); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + CALL_GetColorTable( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + answer + ) ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetColorTableReply *)&__glXReply)->width = width; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetColorTable(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int __glXDisp_GetColorTableSGI(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetColorTable(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} diff --git a/xorg-server-1.4/GL/glx/singlepixswap.c b/xorg-server-1.4/GL/glx/singlepixswap.c new file mode 100644 index 0000000..032b427 --- /dev/null +++ b/xorg-server-1.4/GL/glx/singlepixswap.c @@ -0,0 +1,584 @@ +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "glxext.h" +#include "singlesize.h" +#include "unpack.h" +#include "indirect_dispatch.h" +#include "indirect_size_get.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + +int __glXDispSwap_ReadPixels(__GLXclientState *cl, GLbyte *pc) +{ + GLsizei width, height; + GLenum format, type; + GLboolean swapBytes, lsbFirst; + GLint compsize; + __GLX_DECLARE_SWAP_VARIABLES; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc+0); + __GLX_SWAP_INT(pc+4); + __GLX_SWAP_INT(pc+8); + __GLX_SWAP_INT(pc+12); + __GLX_SWAP_INT(pc+16); + __GLX_SWAP_INT(pc+20); + + width = *(GLsizei *)(pc + 8); + height = *(GLsizei *)(pc + 12); + format = *(GLenum *)(pc + 16); + type = *(GLenum *)(pc + 20); + swapBytes = *(GLboolean *)(pc + 24); + lsbFirst = *(GLboolean *)(pc + 25); + compsize = __glReadPixels_size(format,type,width,height); + if (compsize < 0) compsize = 0; + + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_LSB_FIRST, lsbFirst) ); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + CALL_ReadPixels( GET_DISPATCH(), + (*(GLint *)(pc + 0), + *(GLint *)(pc + 4), + *(GLsizei *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLenum *)(pc + 16), + *(GLenum *)(pc + 20), + answer) + ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + return Success; +} + +int __glXDispSwap_GetTexImage(__GLXclientState *cl, GLbyte *pc) +{ + GLint level, compsize; + GLenum format, type, target; + GLboolean swapBytes; + __GLX_DECLARE_SWAP_VARIABLES; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + GLint width=0, height=0, depth=1; + + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc+0); + __GLX_SWAP_INT(pc+4); + __GLX_SWAP_INT(pc+8); + __GLX_SWAP_INT(pc+12); + + level = *(GLint *)(pc + 4); + format = *(GLenum *)(pc + 8); + type = *(GLenum *)(pc + 12); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 16); + + CALL_GetTexLevelParameteriv( GET_DISPATCH(), (target, level, GL_TEXTURE_WIDTH, &width) ); + CALL_GetTexLevelParameteriv( GET_DISPATCH(), (target, level, GL_TEXTURE_HEIGHT, &height) ); + if ( target == GL_TEXTURE_3D) { + CALL_GetTexLevelParameteriv( GET_DISPATCH(), (target, level, GL_TEXTURE_DEPTH, &depth) ); + } + /* + * The three queries above might fail if we're in a state where queries + * are illegal, but then width, height, and depth would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,level,format,type,width,height,depth); + if (compsize < 0) compsize = 0; + + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes) ); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + CALL_GetTexImage( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLenum *)(pc + 12), + answer + ) ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SWAP_INT(&width); + __GLX_SWAP_INT(&height); + __GLX_SWAP_INT(&depth); + ((xGLXGetTexImageReply *)&__glXReply)->width = width; + ((xGLXGetTexImageReply *)&__glXReply)->height = height; + ((xGLXGetTexImageReply *)&__glXReply)->depth = depth; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + return Success; +} + +int __glXDispSwap_GetPolygonStipple(__GLXclientState *cl, GLbyte *pc) +{ + GLboolean lsbFirst; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLubyte answerBuffer[200]; + char *answer; + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + lsbFirst = *(GLboolean *)(pc + 0); + + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_LSB_FIRST, lsbFirst) ); + __GLX_GET_ANSWER_BUFFER(answer,cl,128,1); + + __glXClearErrorOccured(); + CALL_GetPolygonStipple( GET_DISPATCH(), ((GLubyte *) answer) ); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_HEADER(); + } else { + __GLX_BEGIN_REPLY(128); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_HEADER(); + __GLX_SEND_BYTE_ARRAY(128); + } + return Success; +} + +static int GetSeparableFilter(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag) +{ + GLint compsize, compsize2; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + __GLX_DECLARE_SWAP_VARIABLES; + char *answer, answerBuffer[200]; + GLint width=0, height=0; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + __GLX_SWAP_INT(pc+0); + __GLX_SWAP_INT(pc+4); + __GLX_SWAP_INT(pc+8); + + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + + /* target must be SEPARABLE_2D, however I guess we can let the GL + barf on this one.... */ + + CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_WIDTH, &width) ); + CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_HEIGHT, &height) ); + /* + * The two queries above might fail if we're in a state where queries + * are illegal, but then width and height would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,1,format,type,width,1,1); + compsize2 = __glGetTexImage_size(target,1,format,type,height,1,1); + + if (compsize < 0) compsize = 0; + if (compsize2 < 0) compsize2 = 0; + compsize = __GLX_PAD(compsize); + compsize2 = __GLX_PAD(compsize2); + + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes) ); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize + compsize2,1); + __glXClearErrorOccured(); + CALL_GetSeparableFilter( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + answer, + answer + compsize, + NULL + ) ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize + compsize2); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SWAP_INT(&width); + __GLX_SWAP_INT(&height); + ((xGLXGetSeparableFilterReply *)&__glXReply)->width = width; + ((xGLXGetSeparableFilterReply *)&__glXReply)->height = height; + __GLX_SEND_VOID_ARRAY(compsize + compsize2); + } + + return Success; +} + +int __glXDispSwap_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetSeparableFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int __glXDispSwap_GetSeparableFilterEXT(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetSeparableFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} + +static int GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + __GLX_DECLARE_SWAP_VARIABLES; + char *answer, answerBuffer[200]; + GLint width=0, height=0; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + __GLX_SWAP_INT(pc+0); + __GLX_SWAP_INT(pc+4); + __GLX_SWAP_INT(pc+8); + + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + + CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_WIDTH, &width) ); + if (target == GL_CONVOLUTION_2D) { + height = 1; + } else { + CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_HEIGHT, &height) ); + } + /* + * The two queries above might fail if we're in a state where queries + * are illegal, but then width and height would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,1,format,type,width,height,1); + if (compsize < 0) compsize = 0; + + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes) ); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + CALL_GetConvolutionFilter( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + answer + ) ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SWAP_INT(&width); + __GLX_SWAP_INT(&height); + ((xGLXGetConvolutionFilterReply *)&__glXReply)->width = width; + ((xGLXGetConvolutionFilterReply *)&__glXReply)->height = height; + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int __glXDispSwap_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetConvolutionFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int __glXDispSwap_GetConvolutionFilterEXT(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetConvolutionFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} + +static int GetHistogram(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes, reset; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + __GLX_DECLARE_SWAP_VARIABLES; + char *answer, answerBuffer[200]; + GLint width=0; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + __GLX_SWAP_INT(pc+0); + __GLX_SWAP_INT(pc+4); + __GLX_SWAP_INT(pc+8); + + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + reset = *(GLboolean *)(pc + 13); + + CALL_GetHistogramParameteriv( GET_DISPATCH(), (target, GL_HISTOGRAM_WIDTH, &width) ); + /* + * The one query above might fail if we're in a state where queries + * are illegal, but then width would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,1,format,type,width,1,1); + if (compsize < 0) compsize = 0; + + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes) ); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + CALL_GetHistogram( GET_DISPATCH(), (target, reset, format, type, answer) ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SWAP_INT(&width); + ((xGLXGetHistogramReply *)&__glXReply)->width = width; + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int __glXDispSwap_GetHistogram(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetHistogram(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int __glXDispSwap_GetHistogramEXT(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetHistogram(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} + +static int GetMinmax(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes, reset; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + __GLX_DECLARE_SWAP_VARIABLES; + char *answer, answerBuffer[200]; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + __GLX_SWAP_INT(pc+0); + __GLX_SWAP_INT(pc+4); + __GLX_SWAP_INT(pc+8); + + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + reset = *(GLboolean *)(pc + 13); + + compsize = __glGetTexImage_size(target,1,format,type,2,1,1); + if (compsize < 0) compsize = 0; + + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes) ); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + CALL_GetMinmax( GET_DISPATCH(), (target, reset, format, type, answer) ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int __glXDispSwap_GetMinmax(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetMinmax(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int __glXDispSwap_GetMinmaxEXT(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetMinmax(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} + +static int GetColorTable(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + __GLX_DECLARE_SWAP_VARIABLES; + char *answer, answerBuffer[200]; + GLint width=0; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + __GLX_SWAP_INT(pc+0); + __GLX_SWAP_INT(pc+4); + __GLX_SWAP_INT(pc+8); + + format = *(GLenum *)(pc + 4); + type = *(GLenum *)(pc + 8); + target = *(GLenum *)(pc + 0); + swapBytes = *(GLboolean *)(pc + 12); + + CALL_GetColorTableParameteriv( GET_DISPATCH(), (target, GL_COLOR_TABLE_WIDTH, &width) ); + /* + * The one query above might fail if we're in a state where queries + * are illegal, but then width would still be zero anyway. + */ + compsize = __glGetTexImage_size(target,1,format,type,width,1,1); + if (compsize < 0) compsize = 0; + + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes) ); + __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); + __glXClearErrorOccured(); + CALL_GetColorTable( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + answer + ) ); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + } else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SWAP_INT(&width); + ((xGLXGetColorTableReply *)&__glXReply)->width = width; + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetColorTable(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int __glXDispSwap_GetColorTableSGI(__GLXclientState *cl, GLbyte *pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetColorTable(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} diff --git a/xorg-server-1.4/GL/glx/singlesize.c b/xorg-server-1.4/GL/glx/singlesize.c new file mode 100644 index 0000000..b5a74f3 --- /dev/null +++ b/xorg-server-1.4/GL/glx/singlesize.c @@ -0,0 +1,198 @@ +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "glxserver.h" +#include "singlesize.h" +#include "indirect_size_get.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + +/* +** These routines compute the size of variable-size returned parameters. +** Unlike the similar routines that do the same thing for variable-size +** incoming parameters, the samplegl library itself doesn't use these routines. +** Hence, they are located here, in the GLX extension library. +*/ + +GLint __glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h) +{ + return __glXImageSize( format, type, 0, w, h, 1, 0, 0, 0, 0, 4 ); +} + +GLint __glGetMap_size(GLenum target, GLenum query) +{ + GLint k, order=0, majorMinor[2]; + + /* + ** Assume target and query are both valid. + */ + switch (target) { + case GL_MAP1_COLOR_4: + case GL_MAP1_NORMAL: + case GL_MAP1_INDEX: + case GL_MAP1_TEXTURE_COORD_1: + case GL_MAP1_TEXTURE_COORD_2: + case GL_MAP1_TEXTURE_COORD_3: + case GL_MAP1_TEXTURE_COORD_4: + case GL_MAP1_VERTEX_3: + case GL_MAP1_VERTEX_4: + switch (query) { + case GL_COEFF: + k = __glMap1d_size(target); + CALL_GetMapiv( GET_DISPATCH(), (target, GL_ORDER, &order) ); + /* + ** The query above might fail, but then order will be zero anyway. + */ + return (order * k); + case GL_DOMAIN: + return 2; + case GL_ORDER: + return 1; + } + break; + case GL_MAP2_COLOR_4: + case GL_MAP2_NORMAL: + case GL_MAP2_INDEX: + case GL_MAP2_TEXTURE_COORD_1: + case GL_MAP2_TEXTURE_COORD_2: + case GL_MAP2_TEXTURE_COORD_3: + case GL_MAP2_TEXTURE_COORD_4: + case GL_MAP2_VERTEX_3: + case GL_MAP2_VERTEX_4: + switch (query) { + case GL_COEFF: + k = __glMap2d_size(target); + majorMinor[0] = majorMinor[1] = 0; + CALL_GetMapiv( GET_DISPATCH(), (target, GL_ORDER, majorMinor) ); + /* + ** The query above might fail, but then majorMinor will be zeroes + */ + return (majorMinor[0] * majorMinor[1] * k); + case GL_DOMAIN: + return 4; + case GL_ORDER: + return 2; + } + break; + } + return -1; +} + +GLint __glGetMapdv_size(GLenum target, GLenum query) +{ + return __glGetMap_size(target, query); +} + +GLint __glGetMapfv_size(GLenum target, GLenum query) +{ + return __glGetMap_size(target, query); +} + +GLint __glGetMapiv_size(GLenum target, GLenum query) +{ + return __glGetMap_size(target, query); +} + +GLint __glGetPixelMap_size(GLenum map) +{ + GLint size; + GLenum query; + + switch (map) { + case GL_PIXEL_MAP_I_TO_I: + query = GL_PIXEL_MAP_I_TO_I_SIZE; + break; + case GL_PIXEL_MAP_S_TO_S: + query = GL_PIXEL_MAP_S_TO_S_SIZE; + break; + case GL_PIXEL_MAP_I_TO_R: + query = GL_PIXEL_MAP_I_TO_R_SIZE; + break; + case GL_PIXEL_MAP_I_TO_G: + query = GL_PIXEL_MAP_I_TO_G_SIZE; + break; + case GL_PIXEL_MAP_I_TO_B: + query = GL_PIXEL_MAP_I_TO_B_SIZE; + break; + case GL_PIXEL_MAP_I_TO_A: + query = GL_PIXEL_MAP_I_TO_A_SIZE; + break; + case GL_PIXEL_MAP_R_TO_R: + query = GL_PIXEL_MAP_R_TO_R_SIZE; + break; + case GL_PIXEL_MAP_G_TO_G: + query = GL_PIXEL_MAP_G_TO_G_SIZE; + break; + case GL_PIXEL_MAP_B_TO_B: + query = GL_PIXEL_MAP_B_TO_B_SIZE; + break; + case GL_PIXEL_MAP_A_TO_A: + query = GL_PIXEL_MAP_A_TO_A_SIZE; + break; + default: + return -1; + } + CALL_GetIntegerv( GET_DISPATCH(), (query, &size) ); + return size; +} + +GLint __glGetPixelMapfv_size(GLenum map) +{ + return __glGetPixelMap_size(map); +} + +GLint __glGetPixelMapuiv_size(GLenum map) +{ + return __glGetPixelMap_size(map); +} + +GLint __glGetPixelMapusv_size(GLenum map) +{ + return __glGetPixelMap_size(map); +} + +GLint __glGetTexImage_size(GLenum target, GLint level, GLenum format, + GLenum type, GLint width, GLint height, GLint depth) +{ + return __glXImageSize( format, type, target, width, height, depth, + 0, 0, 0, 0, 4 ); +} diff --git a/xorg-server-1.4/GL/glx/singlesize.h b/xorg-server-1.4/GL/glx/singlesize.h new file mode 100644 index 0000000..1cce1bc --- /dev/null +++ b/xorg-server-1.4/GL/glx/singlesize.h @@ -0,0 +1,59 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _singlesize_h_ +#define _singlesize_h_ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#include "indirect_size.h" + +extern GLint __glReadPixels_size(GLenum format, GLenum type, + GLint width, GLint height); +extern GLint __glGetMap_size(GLenum pname, GLenum query); +extern GLint __glGetMapdv_size(GLenum target, GLenum query); +extern GLint __glGetMapfv_size(GLenum target, GLenum query); +extern GLint __glGetMapiv_size(GLenum target, GLenum query); +extern GLint __glGetPixelMap_size(GLenum map); +extern GLint __glGetPixelMapfv_size(GLenum map); +extern GLint __glGetPixelMapuiv_size(GLenum map); +extern GLint __glGetPixelMapusv_size(GLenum map); +extern GLint __glGetTexImage_size(GLenum target, GLint level, GLenum format, + GLenum type, GLint width, GLint height, + GLint depth); + +#endif /* _singlesize_h_ */ diff --git a/xorg-server-1.4/GL/glx/swap_interval.c b/xorg-server-1.4/GL/glx/swap_interval.c new file mode 100644 index 0000000..24abd69 --- /dev/null +++ b/xorg-server-1.4/GL/glx/swap_interval.c @@ -0,0 +1,92 @@ +/* + * (C) Copyright IBM Corporation 2006 + * 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, sub + * license, 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 + * THE COPYRIGHT HOLDERS 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. + */ + +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "glxutil.h" +#include "glxext.h" +#include "singlesize.h" +#include "unpack.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" +#include "glapioffsets.h" +#include "glxbyteorder.h" + +static int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap); + +int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + ClientPtr client = cl->client; + const GLXContextTag tag = req->contextTag; + __GLXcontext *cx; + GLint interval; + + + cx = __glXLookupContextByTag(cl, tag); + + LogMessage(X_ERROR, "%s: cx = %p, GLX screen = %p\n", __func__, + cx, (cx == NULL) ? NULL : cx->pGlxScreen); + if ((cx == NULL) || (cx->pGlxScreen == NULL)) { + client->errorValue = tag; + return __glXError(GLXBadContext); + } + + if (cx->pGlxScreen->swapInterval == NULL) { + LogMessage(X_ERROR, "AIGLX: cx->pGlxScreen->swapInterval == NULL\n"); + client->errorValue = tag; + return __glXError(GLXUnsupportedPrivateRequest); + } + + if (cx->drawPriv == NULL) { + client->errorValue = tag; + return __glXError(GLXBadDrawable); + } + + pc += __GLX_VENDPRIV_HDR_SIZE; + interval = (do_swap) + ? bswap_32(*(int *)(pc + 0)) + : *(int *)(pc + 0); + + (void) (*cx->pGlxScreen->swapInterval)(cx->drawPriv, interval); + return Success; +} + +int __glXDisp_SwapIntervalSGI(__GLXclientState *cl, GLbyte *pc) +{ + return DoSwapInterval(cl, pc, 0); +} + +int __glXDispSwap_SwapIntervalSGI(__GLXclientState *cl, GLbyte *pc) +{ + return DoSwapInterval(cl, pc, 1); +} diff --git a/xorg-server-1.4/GL/glx/unpack.h b/xorg-server-1.4/GL/glx/unpack.h new file mode 100644 index 0000000..70ba1a8 --- /dev/null +++ b/xorg-server-1.4/GL/glx/unpack.h @@ -0,0 +1,239 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef __GLX_unpack_h__ +#define __GLX_unpack_h__ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#define __GLX_PAD(s) (((s)+3) & (GLuint)~3) + +/* +** Fetch the context-id out of a SingleReq request pointed to by pc. +*/ +#define __GLX_GET_SINGLE_CONTEXT_TAG(pc) (((xGLXSingleReq*)pc)->contextTag) +#define __GLX_GET_VENDPRIV_CONTEXT_TAG(pc) (((xGLXVendorPrivateReq*)pc)->contextTag) + +/* +** Fetch a double from potentially unaligned memory. +*/ +#ifdef __GLX_ALIGN64 +#define __GLX_MEM_COPY(dst,src,n) if (src && dst) memcpy(dst,src,n) +#define __GLX_GET_DOUBLE(dst,src) __GLX_MEM_COPY(&dst,src,8) +#else +#define __GLX_GET_DOUBLE(dst,src) (dst) = *((GLdouble*)(src)) +#endif + +extern void __glXMemInit(void); + +extern xGLXSingleReply __glXReply; + +#define __GLX_BEGIN_REPLY(size) \ + __glXReply.length = __GLX_PAD(size) >> 2; \ + __glXReply.type = X_Reply; \ + __glXReply.sequenceNumber = client->sequence; + +#define __GLX_SEND_HEADER() \ + WriteToClient( client, sz_xGLXSingleReply, (char *)&__glXReply); + +#define __GLX_PUT_RETVAL(a) \ + __glXReply.retval = (a); + +#define __GLX_PUT_SIZE(a) \ + __glXReply.size = (a); + +#define __GLX_PUT_RENDERMODE(m) \ + __glXReply.pad3 = (m) + +/* +** Get a buffer to hold returned data, with the given alignment. If we have +** to realloc, allocate size+align, in case the pointer has to be bumped for +** alignment. The answerBuffer should already be aligned. +** +** NOTE: the cast (long)res below assumes a long is large enough to hold a +** pointer. +*/ +#define __GLX_GET_ANSWER_BUFFER(res,cl,size,align) \ + if ((size) > sizeof(answerBuffer)) { \ + int bump; \ + if ((cl)->returnBufSize < (size)+(align)) { \ + (cl)->returnBuf = (GLbyte*)Xrealloc((cl)->returnBuf, \ + (size)+(align)); \ + if (!(cl)->returnBuf) { \ + return BadAlloc; \ + } \ + (cl)->returnBufSize = (size)+(align); \ + } \ + res = (char*)cl->returnBuf; \ + bump = (long)(res) % (align); \ + if (bump) res += (align) - (bump); \ + } else { \ + res = (char *)answerBuffer; \ + } + +#define __GLX_PUT_BYTE() \ + *(GLbyte *)&__glXReply.pad3 = *(GLbyte *)answer + +#define __GLX_PUT_SHORT() \ + *(GLshort *)&__glXReply.pad3 = *(GLshort *)answer + +#define __GLX_PUT_INT() \ + *(GLint *)&__glXReply.pad3 = *(GLint *)answer + +#define __GLX_PUT_FLOAT() \ + *(GLfloat *)&__glXReply.pad3 = *(GLfloat *)answer + +#define __GLX_PUT_DOUBLE() \ + *(GLdouble *)&__glXReply.pad3 = *(GLdouble *)answer + +#define __GLX_SEND_BYTE_ARRAY(len) \ + WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT8), (char *)answer) + +#define __GLX_SEND_SHORT_ARRAY(len) \ + WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT16), (char *)answer) + +#define __GLX_SEND_INT_ARRAY(len) \ + WriteToClient(client, (len)*__GLX_SIZE_INT32, (char *)answer) + +#define __GLX_SEND_FLOAT_ARRAY(len) \ + WriteToClient(client, (len)*__GLX_SIZE_FLOAT32, (char *)answer) + +#define __GLX_SEND_DOUBLE_ARRAY(len) \ + WriteToClient(client, (len)*__GLX_SIZE_FLOAT64, (char *)answer) + + +#define __GLX_SEND_VOID_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len) +#define __GLX_SEND_UBYTE_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len) +#define __GLX_SEND_USHORT_ARRAY(len) __GLX_SEND_SHORT_ARRAY(len) +#define __GLX_SEND_UINT_ARRAY(len) __GLX_SEND_INT_ARRAY(len) + +/* +** PERFORMANCE NOTE: +** Machine dependent optimizations abound here; these swapping macros can +** conceivably be replaced with routines that do the job faster. +*/ +#define __GLX_DECLARE_SWAP_VARIABLES \ + GLbyte sw + +#define __GLX_DECLARE_SWAP_ARRAY_VARIABLES \ + GLbyte *swapPC; \ + GLbyte *swapEnd + + +#define __GLX_SWAP_INT(pc) \ + sw = ((GLbyte *)(pc))[0]; \ + ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \ + ((GLbyte *)(pc))[3] = sw; \ + sw = ((GLbyte *)(pc))[1]; \ + ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \ + ((GLbyte *)(pc))[2] = sw; + +#define __GLX_SWAP_SHORT(pc) \ + sw = ((GLbyte *)(pc))[0]; \ + ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[1]; \ + ((GLbyte *)(pc))[1] = sw; + +#define __GLX_SWAP_DOUBLE(pc) \ + sw = ((GLbyte *)(pc))[0]; \ + ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[7]; \ + ((GLbyte *)(pc))[7] = sw; \ + sw = ((GLbyte *)(pc))[1]; \ + ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[6]; \ + ((GLbyte *)(pc))[6] = sw; \ + sw = ((GLbyte *)(pc))[2]; \ + ((GLbyte *)(pc))[2] = ((GLbyte *)(pc))[5]; \ + ((GLbyte *)(pc))[5] = sw; \ + sw = ((GLbyte *)(pc))[3]; \ + ((GLbyte *)(pc))[3] = ((GLbyte *)(pc))[4]; \ + ((GLbyte *)(pc))[4] = sw; + +#define __GLX_SWAP_FLOAT(pc) \ + sw = ((GLbyte *)(pc))[0]; \ + ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \ + ((GLbyte *)(pc))[3] = sw; \ + sw = ((GLbyte *)(pc))[1]; \ + ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \ + ((GLbyte *)(pc))[2] = sw; + +#define __GLX_SWAP_INT_ARRAY(pc, count) \ + swapPC = ((GLbyte *)(pc)); \ + swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT32;\ + while (swapPC < swapEnd) { \ + __GLX_SWAP_INT(swapPC); \ + swapPC += __GLX_SIZE_INT32; \ + } + +#define __GLX_SWAP_SHORT_ARRAY(pc, count) \ + swapPC = ((GLbyte *)(pc)); \ + swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT16;\ + while (swapPC < swapEnd) { \ + __GLX_SWAP_SHORT(swapPC); \ + swapPC += __GLX_SIZE_INT16; \ + } + +#define __GLX_SWAP_DOUBLE_ARRAY(pc, count) \ + swapPC = ((GLbyte *)(pc)); \ + swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT64;\ + while (swapPC < swapEnd) { \ + __GLX_SWAP_DOUBLE(swapPC); \ + swapPC += __GLX_SIZE_FLOAT64; \ + } + +#define __GLX_SWAP_FLOAT_ARRAY(pc, count) \ + swapPC = ((GLbyte *)(pc)); \ + swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT32;\ + while (swapPC < swapEnd) { \ + __GLX_SWAP_FLOAT(swapPC); \ + swapPC += __GLX_SIZE_FLOAT32; \ + } + +#define __GLX_SWAP_REPLY_HEADER() \ + __GLX_SWAP_SHORT(&__glXReply.sequenceNumber); \ + __GLX_SWAP_INT(&__glXReply.length); + +#define __GLX_SWAP_REPLY_RETVAL() \ + __GLX_SWAP_INT(&__glXReply.retval) + +#define __GLX_SWAP_REPLY_SIZE() \ + __GLX_SWAP_INT(&__glXReply.size) + +#endif /* !__GLX_unpack_h__ */ + + + + + diff --git a/xorg-server-1.4/GL/glx/xfont.c b/xorg-server-1.4/GL/glx/xfont.c new file mode 100644 index 0000000..9629cf1 --- /dev/null +++ b/xorg-server-1.4/GL/glx/xfont.c @@ -0,0 +1,201 @@ +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "glxutil.h" +#include "unpack.h" +#include "g_disptab.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" +#include "indirect_dispatch.h" +#include +#include +#include +#include + +extern XID clientErrorValue; /* imported kludge from dix layer */ + +/* +** Make a single GL bitmap from a single X glyph +*/ +static int __glXMakeBitmapFromGlyph(FontPtr font, CharInfoPtr pci) +{ + int i, j; + int widthPadded; /* width of glyph in bytes, as padded by X */ + int allocBytes; /* bytes to allocate to store bitmap */ + int w; /* width of glyph in bits */ + int h; /* height of glyph */ + register unsigned char *pglyph; + register unsigned char *p; + unsigned char *allocbuf; +#define __GL_CHAR_BUF_SIZE 2048 + unsigned char buf[__GL_CHAR_BUF_SIZE]; + + w = GLYPHWIDTHPIXELS(pci); + h = GLYPHHEIGHTPIXELS(pci); + widthPadded = GLYPHWIDTHBYTESPADDED(pci); + + /* + ** Use the local buf if possible, otherwise malloc. + */ + allocBytes = widthPadded * h; + if (allocBytes <= __GL_CHAR_BUF_SIZE) { + p = buf; + allocbuf = 0; + } else { + p = (unsigned char *) xalloc(allocBytes); + if (!p) + return BadAlloc; + allocbuf = p; + } + + /* + ** We have to reverse the picture, top to bottom + */ + + pglyph = FONTGLYPHBITS(FONTGLYPHS(font), pci) + (h-1)*widthPadded; + for (j=0; j < h; j++) { + for (i=0; i < widthPadded; i++) { + p[i] = pglyph[i]; + } + pglyph -= widthPadded; + p += widthPadded; + } + CALL_Bitmap( GET_DISPATCH(), (w, h, -pci->metrics.leftSideBearing, + pci->metrics.descent, + pci->metrics.characterWidth, 0, + allocbuf ? allocbuf : buf) ); + + if (allocbuf) { + xfree(allocbuf); + } + return Success; +#undef __GL_CHAR_BUF_SIZE +} + +/* +** Create a GL bitmap for each character in the X font. The bitmap is stored +** in a display list. +*/ + +static int +MakeBitmapsFromFont(FontPtr pFont, int first, int count, int list_base) +{ + unsigned long i, nglyphs; + CARD8 chs[2]; /* the font index we are going after */ + CharInfoPtr pci; + int rv; /* return value */ + int encoding = (FONTLASTROW(pFont) == 0) ? Linear16Bit : TwoD16Bit; + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, FALSE) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, BITMAP_BIT_ORDER == LSBFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, 0) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, 0) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, 0) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, GLYPHPADBYTES) ); + for (i=0; i < count; i++) { + chs[0] = (first + i) >> 8; /* high byte is first byte */ + chs[1] = first + i; + + (*pFont->get_glyphs)(pFont, 1, chs, (FontEncoding)encoding, + &nglyphs, &pci); + + /* + ** Define a display list containing just a glBitmap() call. + */ + CALL_NewList( GET_DISPATCH(), (list_base + i, GL_COMPILE) ); + if (nglyphs ) { + rv = __glXMakeBitmapFromGlyph(pFont, pci); + if (rv) { + return rv; + } + } + CALL_EndList( GET_DISPATCH(), () ); + } + return Success; +} + +/************************************************************************/ + +int __glXDisp_UseXFont(__GLXclientState *cl, GLbyte *pc) +{ + ClientPtr client = cl->client; + xGLXUseXFontReq *req; + FontPtr pFont; + GC *pGC; + GLuint currentListIndex; + __GLXcontext *cx; + int error; + + req = (xGLXUseXFontReq *) pc; + cx = __glXForceCurrent(cl, req->contextTag, &error); + if (!cx) { + return error; + } + + CALL_GetIntegerv( GET_DISPATCH(), (GL_LIST_INDEX, (GLint*) ¤tListIndex) ); + if (currentListIndex != 0) { + /* + ** A display list is currently being made. It is an error + ** to try to make a font during another lists construction. + */ + client->errorValue = cx->id; + return __glXError(GLXBadContextState); + } + + /* + ** Font can actually be either the ID of a font or the ID of a GC + ** containing a font. + */ + pFont = (FontPtr)LookupIDByType(req->font, RT_FONT); + if (!pFont) { + pGC = (GC *)LookupIDByType(req->font, RT_GC); + if (!pGC) { + client->errorValue = req->font; + return BadFont; + } + pFont = pGC->font; + } + + return MakeBitmapsFromFont(pFont, req->first, req->count, + req->listBase); +} diff --git a/xorg-server-1.4/GL/mesa/Makefile.am b/xorg-server-1.4/GL/mesa/Makefile.am new file mode 100644 index 0000000..99d3834 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/Makefile.am @@ -0,0 +1,15 @@ +SUBDIRS = main math swrast swrast_setup tnl shader X glapi vbo + +noinst_LTLIBRARIES = libGLcore.la + +libGLcore_la_SOURCES = dummy.c +libGLcore_la_LIBADD = main/libmain.la \ + math/libmath.la \ + swrast/libswrast.la \ + swrast_setup/libss.la \ + tnl/libtnl.la \ + shader/libshader.la \ + shader/grammar/libgrammar.la \ + shader/slang/libslang.la \ + vbo/libvbo.la \ + X/libX.la diff --git a/xorg-server-1.4/GL/mesa/Makefile.in b/xorg-server-1.4/GL/mesa/Makefile.in new file mode 100644 index 0000000..0585192 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/Makefile.in @@ -0,0 +1,747 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = GL/mesa +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libGLcore_la_DEPENDENCIES = main/libmain.la math/libmath.la \ + swrast/libswrast.la swrast_setup/libss.la tnl/libtnl.la \ + shader/libshader.la shader/grammar/libgrammar.la \ + shader/slang/libslang.la vbo/libvbo.la X/libX.la +am_libGLcore_la_OBJECTS = dummy.lo +libGLcore_la_OBJECTS = $(am_libGLcore_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libGLcore_la_SOURCES) +DIST_SOURCES = $(libGLcore_la_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +SUBDIRS = main math swrast swrast_setup tnl shader X glapi vbo +noinst_LTLIBRARIES = libGLcore.la +libGLcore_la_SOURCES = dummy.c +libGLcore_la_LIBADD = main/libmain.la \ + math/libmath.la \ + swrast/libswrast.la \ + swrast_setup/libss.la \ + tnl/libtnl.la \ + shader/libshader.la \ + shader/grammar/libgrammar.la \ + shader/slang/libslang.la \ + vbo/libvbo.la \ + X/libX.la + +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GL/mesa/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign GL/mesa/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libGLcore.la: $(libGLcore_la_OBJECTS) $(libGLcore_la_DEPENDENCIES) + $(LINK) $(libGLcore_la_OBJECTS) $(libGLcore_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(LTLIBRARIES) +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/GL/mesa/X/Makefile.am b/xorg-server-1.4/GL/mesa/X/Makefile.am new file mode 100644 index 0000000..ace1181 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/X/Makefile.am @@ -0,0 +1,33 @@ +noinst_LTLIBRARIES = libX.la + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I../../glx \ + -I$(top_srcdir)/GL/glx \ + -I$(top_srcdir)/GL/include \ + -I$(top_srcdir)/hw/xfree86/os-support + +# -DXFree86Server is required because the X11 driver in Mesa thinks that +# symbol means "being built in the server" +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +nodist_libX_la_SOURCES = \ + xm_api.c \ + xm_buffer.c \ + xm_dd.c \ + xm_image.c \ + xm_line.c \ + xm_span.c \ + xm_tri.c \ + drivers/common/driverfuncs.c diff --git a/xorg-server-1.4/GL/mesa/X/Makefile.in b/xorg-server-1.4/GL/mesa/X/Makefile.in new file mode 100644 index 0000000..cce2544 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/X/Makefile.in @@ -0,0 +1,665 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = GL/mesa/X +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libX_la_LIBADD = +nodist_libX_la_OBJECTS = xm_api.lo xm_buffer.lo xm_dd.lo xm_image.lo \ + xm_line.lo xm_span.lo xm_tri.lo driverfuncs.lo +libX_la_OBJECTS = $(nodist_libX_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(nodist_libX_la_SOURCES) +DIST_SOURCES = +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libX.la +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I../../glx \ + -I$(top_srcdir)/GL/glx \ + -I$(top_srcdir)/GL/include \ + -I$(top_srcdir)/hw/xfree86/os-support + + +# -DXFree86Server is required because the X11 driver in Mesa thinks that +# symbol means "being built in the server" +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +nodist_libX_la_SOURCES = \ + xm_api.c \ + xm_buffer.c \ + xm_dd.c \ + xm_image.c \ + xm_line.c \ + xm_span.c \ + xm_tri.c \ + drivers/common/driverfuncs.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GL/mesa/X/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign GL/mesa/X/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libX.la: $(libX_la_OBJECTS) $(libX_la_DEPENDENCIES) + $(LINK) $(libX_la_OBJECTS) $(libX_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driverfuncs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xm_api.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xm_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xm_dd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xm_image.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xm_line.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xm_span.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xm_tri.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +driverfuncs.lo: drivers/common/driverfuncs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT driverfuncs.lo -MD -MP -MF $(DEPDIR)/driverfuncs.Tpo -c -o driverfuncs.lo `test -f 'drivers/common/driverfuncs.c' || echo '$(srcdir)/'`drivers/common/driverfuncs.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/driverfuncs.Tpo $(DEPDIR)/driverfuncs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drivers/common/driverfuncs.c' object='driverfuncs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o driverfuncs.lo `test -f 'drivers/common/driverfuncs.c' || echo '$(srcdir)/'`drivers/common/driverfuncs.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/GL/mesa/dummy.c b/xorg-server-1.4/GL/mesa/dummy.c new file mode 100644 index 0000000..e69de29 diff --git a/xorg-server-1.4/GL/mesa/glapi/Makefile.am b/xorg-server-1.4/GL/mesa/glapi/Makefile.am new file mode 100644 index 0000000..db79114 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/glapi/Makefile.am @@ -0,0 +1,20 @@ +noinst_LTLIBRARIES = libglapi.la + +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libglapi_la_SOURCES = glapi.c glthread.c diff --git a/xorg-server-1.4/GL/mesa/glapi/Makefile.in b/xorg-server-1.4/GL/mesa/glapi/Makefile.in new file mode 100644 index 0000000..4670ae6 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/glapi/Makefile.in @@ -0,0 +1,636 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = GL/mesa/glapi +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libglapi_la_LIBADD = +nodist_libglapi_la_OBJECTS = glapi.lo glthread.lo +libglapi_la_OBJECTS = $(nodist_libglapi_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(nodist_libglapi_la_SOURCES) +DIST_SOURCES = +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libglapi.la +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libglapi_la_SOURCES = glapi.c glthread.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GL/mesa/glapi/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign GL/mesa/glapi/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libglapi.la: $(libglapi_la_OBJECTS) $(libglapi_la_DEPENDENCIES) + $(LINK) $(libglapi_la_OBJECTS) $(libglapi_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glapi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glthread.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/GL/mesa/main/Makefile.am b/xorg-server-1.4/GL/mesa/main/Makefile.am new file mode 100644 index 0000000..f8ce137 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/main/Makefile.am @@ -0,0 +1,86 @@ +noinst_LTLIBRARIES = libmain.la + +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +if NEED_VSNPRINTF +VSNPRINTF_SOURCES = vsnprintf.c +endif + +nodist_libmain_la_SOURCES = accum.c \ + api_arrayelt.c \ + api_loopback.c \ + api_noop.c \ + api_validate.c \ + arrayobj.c \ + attrib.c \ + blend.c \ + bufferobj.c \ + buffers.c \ + clip.c \ + colortab.c \ + context.c \ + convolve.c \ + debug.c \ + depth.c \ + depthstencil.c \ + dlist.c \ + drawpix.c \ + enable.c \ + enums.c \ + eval.c \ + execmem.c \ + extensions.c \ + fbobject.c \ + feedback.c \ + fog.c \ + framebuffer.c \ + get.c \ + getstring.c \ + hash.c \ + hint.c \ + histogram.c \ + image.c \ + imports.c \ + light.c \ + lines.c \ + matrix.c \ + mipmap.c \ + mm.c \ + pixel.c \ + points.c \ + polygon.c \ + queryobj.c \ + rastpos.c \ + rbadaptors.c \ + renderbuffer.c \ + shaders.c \ + state.c \ + stencil.c \ + texcompress.c \ + texcompress_fxt1.c \ + texcompress_s3tc.c \ + texenvprogram.c \ + texformat.c \ + teximage.c \ + texobj.c \ + texrender.c \ + texstate.c \ + texstore.c \ + varray.c \ + $(VSNPRINTF_SOURCES) \ + vtxfmt.c diff --git a/xorg-server-1.4/GL/mesa/main/Makefile.in b/xorg-server-1.4/GL/mesa/main/Makefile.in new file mode 100644 index 0000000..deed7a0 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/main/Makefile.in @@ -0,0 +1,774 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = GL/mesa/main +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libmain_la_LIBADD = +@NEED_VSNPRINTF_TRUE@am__objects_1 = vsnprintf.lo +nodist_libmain_la_OBJECTS = accum.lo api_arrayelt.lo api_loopback.lo \ + api_noop.lo api_validate.lo arrayobj.lo attrib.lo blend.lo \ + bufferobj.lo buffers.lo clip.lo colortab.lo context.lo \ + convolve.lo debug.lo depth.lo depthstencil.lo dlist.lo \ + drawpix.lo enable.lo enums.lo eval.lo execmem.lo extensions.lo \ + fbobject.lo feedback.lo fog.lo framebuffer.lo get.lo \ + getstring.lo hash.lo hint.lo histogram.lo image.lo imports.lo \ + light.lo lines.lo matrix.lo mipmap.lo mm.lo pixel.lo points.lo \ + polygon.lo queryobj.lo rastpos.lo rbadaptors.lo \ + renderbuffer.lo shaders.lo state.lo stencil.lo texcompress.lo \ + texcompress_fxt1.lo texcompress_s3tc.lo texenvprogram.lo \ + texformat.lo teximage.lo texobj.lo texrender.lo texstate.lo \ + texstore.lo varray.lo $(am__objects_1) vtxfmt.lo +libmain_la_OBJECTS = $(nodist_libmain_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(nodist_libmain_la_SOURCES) +DIST_SOURCES = +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libmain.la +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +@NEED_VSNPRINTF_TRUE@VSNPRINTF_SOURCES = vsnprintf.c +nodist_libmain_la_SOURCES = accum.c \ + api_arrayelt.c \ + api_loopback.c \ + api_noop.c \ + api_validate.c \ + arrayobj.c \ + attrib.c \ + blend.c \ + bufferobj.c \ + buffers.c \ + clip.c \ + colortab.c \ + context.c \ + convolve.c \ + debug.c \ + depth.c \ + depthstencil.c \ + dlist.c \ + drawpix.c \ + enable.c \ + enums.c \ + eval.c \ + execmem.c \ + extensions.c \ + fbobject.c \ + feedback.c \ + fog.c \ + framebuffer.c \ + get.c \ + getstring.c \ + hash.c \ + hint.c \ + histogram.c \ + image.c \ + imports.c \ + light.c \ + lines.c \ + matrix.c \ + mipmap.c \ + mm.c \ + pixel.c \ + points.c \ + polygon.c \ + queryobj.c \ + rastpos.c \ + rbadaptors.c \ + renderbuffer.c \ + shaders.c \ + state.c \ + stencil.c \ + texcompress.c \ + texcompress_fxt1.c \ + texcompress_s3tc.c \ + texenvprogram.c \ + texformat.c \ + teximage.c \ + texobj.c \ + texrender.c \ + texstate.c \ + texstore.c \ + varray.c \ + $(VSNPRINTF_SOURCES) \ + vtxfmt.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GL/mesa/main/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign GL/mesa/main/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libmain.la: $(libmain_la_OBJECTS) $(libmain_la_DEPENDENCIES) + $(LINK) $(libmain_la_OBJECTS) $(libmain_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accum.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/api_arrayelt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/api_loopback.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/api_noop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/api_validate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arrayobj.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attrib.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blend.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferobj.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffers.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colortab.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/context.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convolve.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/depth.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/depthstencil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drawpix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enable.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enums.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execmem.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extensions.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbobject.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/feedback.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fog.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framebuffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getstring.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hint.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/histogram.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imports.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/light.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lines.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mipmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pixel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/points.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polygon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/queryobj.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rastpos.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rbadaptors.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renderbuffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shaders.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stencil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texcompress.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texcompress_fxt1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texcompress_s3tc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texenvprogram.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texformat.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/teximage.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texobj.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texrender.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texstate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texstore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/varray.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsnprintf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vtxfmt.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/GL/mesa/math/Makefile.am b/xorg-server-1.4/GL/mesa/math/Makefile.am new file mode 100644 index 0000000..c7c5642 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/math/Makefile.am @@ -0,0 +1,27 @@ +noinst_LTLIBRARIES = libmath.la + +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libmath_la_SOURCES = m_debug_clip.c \ + m_debug_norm.c \ + m_debug_xform.c \ + m_eval.c \ + m_matrix.c \ + m_translate.c \ + m_vector.c \ + m_xform.c diff --git a/xorg-server-1.4/GL/mesa/math/Makefile.in b/xorg-server-1.4/GL/mesa/math/Makefile.in new file mode 100644 index 0000000..40dc5e3 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/math/Makefile.in @@ -0,0 +1,652 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = GL/mesa/math +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libmath_la_LIBADD = +nodist_libmath_la_OBJECTS = m_debug_clip.lo m_debug_norm.lo \ + m_debug_xform.lo m_eval.lo m_matrix.lo m_translate.lo \ + m_vector.lo m_xform.lo +libmath_la_OBJECTS = $(nodist_libmath_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(nodist_libmath_la_SOURCES) +DIST_SOURCES = +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libmath.la +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libmath_la_SOURCES = m_debug_clip.c \ + m_debug_norm.c \ + m_debug_xform.c \ + m_eval.c \ + m_matrix.c \ + m_translate.c \ + m_vector.c \ + m_xform.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GL/mesa/math/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign GL/mesa/math/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libmath.la: $(libmath_la_OBJECTS) $(libmath_la_DEPENDENCIES) + $(LINK) $(libmath_la_OBJECTS) $(libmath_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_debug_clip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_debug_norm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_debug_xform.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_eval.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_matrix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_translate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_vector.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_xform.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/GL/mesa/shader/Makefile.am b/xorg-server-1.4/GL/mesa/shader/Makefile.am new file mode 100644 index 0000000..abde275 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/shader/Makefile.am @@ -0,0 +1,39 @@ +SUBDIRS = grammar slang + +noinst_LTLIBRARIES = libshader.la + +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../shader/grammar \ + -I../shader/slang \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libshader_la_SOURCES = \ + arbprogparse.c \ + arbprogram.c \ + atifragshader.c \ + nvfragparse.c \ + nvprogram.c \ + nvvertparse.c \ + prog_debug.c \ + prog_execute.c \ + prog_instruction.c \ + prog_parameter.c \ + prog_print.c \ + program.c \ + programopt.c \ + prog_statevars.c \ + shader_api.c diff --git a/xorg-server-1.4/GL/mesa/shader/Makefile.in b/xorg-server-1.4/GL/mesa/shader/Makefile.in new file mode 100644 index 0000000..73ef527 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/shader/Makefile.in @@ -0,0 +1,786 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = GL/mesa/shader +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libshader_la_LIBADD = +nodist_libshader_la_OBJECTS = arbprogparse.lo arbprogram.lo \ + atifragshader.lo nvfragparse.lo nvprogram.lo nvvertparse.lo \ + prog_debug.lo prog_execute.lo prog_instruction.lo \ + prog_parameter.lo prog_print.lo program.lo programopt.lo \ + prog_statevars.lo shader_api.lo +libshader_la_OBJECTS = $(nodist_libshader_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(nodist_libshader_la_SOURCES) +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +SUBDIRS = grammar slang +noinst_LTLIBRARIES = libshader.la +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../shader/grammar \ + -I../shader/slang \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libshader_la_SOURCES = \ + arbprogparse.c \ + arbprogram.c \ + atifragshader.c \ + nvfragparse.c \ + nvprogram.c \ + nvvertparse.c \ + prog_debug.c \ + prog_execute.c \ + prog_instruction.c \ + prog_parameter.c \ + prog_print.c \ + program.c \ + programopt.c \ + prog_statevars.c \ + shader_api.c + +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GL/mesa/shader/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign GL/mesa/shader/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libshader.la: $(libshader_la_OBJECTS) $(libshader_la_DEPENDENCIES) + $(LINK) $(libshader_la_OBJECTS) $(libshader_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arbprogparse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arbprogram.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atifragshader.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nvfragparse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nvprogram.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nvvertparse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prog_debug.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prog_execute.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prog_instruction.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prog_parameter.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prog_print.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prog_statevars.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/program.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/programopt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shader_api.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(LTLIBRARIES) +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/GL/mesa/shader/grammar/Makefile.am b/xorg-server-1.4/GL/mesa/shader/grammar/Makefile.am new file mode 100644 index 0000000..332c8e9 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/shader/grammar/Makefile.am @@ -0,0 +1,20 @@ +noinst_LTLIBRARIES = libgrammar.la + +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../../X \ + -I../../glapi \ + -I../../main \ + -I../../math \ + -I../../shader \ + -I../../swrast \ + -I../../swrast_setup \ + -I../../tnl \ + -I../.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libgrammar_la_SOURCES = grammar_mesa.c diff --git a/xorg-server-1.4/GL/mesa/shader/grammar/Makefile.in b/xorg-server-1.4/GL/mesa/shader/grammar/Makefile.in new file mode 100644 index 0000000..383e24b --- /dev/null +++ b/xorg-server-1.4/GL/mesa/shader/grammar/Makefile.in @@ -0,0 +1,635 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = GL/mesa/shader/grammar +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgrammar_la_LIBADD = +nodist_libgrammar_la_OBJECTS = grammar_mesa.lo +libgrammar_la_OBJECTS = $(nodist_libgrammar_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(nodist_libgrammar_la_SOURCES) +DIST_SOURCES = +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libgrammar.la +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../../X \ + -I../../glapi \ + -I../../main \ + -I../../math \ + -I../../shader \ + -I../../swrast \ + -I../../swrast_setup \ + -I../../tnl \ + -I../.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libgrammar_la_SOURCES = grammar_mesa.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GL/mesa/shader/grammar/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign GL/mesa/shader/grammar/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgrammar.la: $(libgrammar_la_OBJECTS) $(libgrammar_la_DEPENDENCIES) + $(LINK) $(libgrammar_la_OBJECTS) $(libgrammar_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grammar_mesa.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/GL/mesa/shader/slang/Makefile.am b/xorg-server-1.4/GL/mesa/shader/slang/Makefile.am new file mode 100644 index 0000000..71498ee --- /dev/null +++ b/xorg-server-1.4/GL/mesa/shader/slang/Makefile.am @@ -0,0 +1,41 @@ +noinst_LTLIBRARIES = libslang.la + +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../grammar \ + -I../../X \ + -I../../glapi \ + -I../../main \ + -I../../math \ + -I../../shader \ + -I../../swrast \ + -I../../swrast_setup \ + -I../../tnl \ + -I../.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libslang_la_SOURCES = slang_builtin.c \ + slang_codegen.c \ + slang_compile.c \ + slang_compile_function.c \ + slang_compile_operation.c \ + slang_compile_struct.c \ + slang_compile_variable.c \ + slang_emit.c \ + slang_ir.c \ + slang_label.c \ + slang_library_noise.c \ + slang_link.c \ + slang_log.c \ + slang_mem.c \ + slang_preprocess.c \ + slang_print.c \ + slang_simplify.c \ + slang_storage.c \ + slang_typeinfo.c \ + slang_utility.c \ + slang_vartable.c diff --git a/xorg-server-1.4/GL/mesa/shader/slang/Makefile.in b/xorg-server-1.4/GL/mesa/shader/slang/Makefile.in new file mode 100644 index 0000000..8be1362 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/shader/slang/Makefile.in @@ -0,0 +1,684 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = GL/mesa/shader/slang +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libslang_la_LIBADD = +nodist_libslang_la_OBJECTS = slang_builtin.lo slang_codegen.lo \ + slang_compile.lo slang_compile_function.lo \ + slang_compile_operation.lo slang_compile_struct.lo \ + slang_compile_variable.lo slang_emit.lo slang_ir.lo \ + slang_label.lo slang_library_noise.lo slang_link.lo \ + slang_log.lo slang_mem.lo slang_preprocess.lo slang_print.lo \ + slang_simplify.lo slang_storage.lo slang_typeinfo.lo \ + slang_utility.lo slang_vartable.lo +libslang_la_OBJECTS = $(nodist_libslang_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(nodist_libslang_la_SOURCES) +DIST_SOURCES = +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libslang.la +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../grammar \ + -I../../X \ + -I../../glapi \ + -I../../main \ + -I../../math \ + -I../../shader \ + -I../../swrast \ + -I../../swrast_setup \ + -I../../tnl \ + -I../.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libslang_la_SOURCES = slang_builtin.c \ + slang_codegen.c \ + slang_compile.c \ + slang_compile_function.c \ + slang_compile_operation.c \ + slang_compile_struct.c \ + slang_compile_variable.c \ + slang_emit.c \ + slang_ir.c \ + slang_label.c \ + slang_library_noise.c \ + slang_link.c \ + slang_log.c \ + slang_mem.c \ + slang_preprocess.c \ + slang_print.c \ + slang_simplify.c \ + slang_storage.c \ + slang_typeinfo.c \ + slang_utility.c \ + slang_vartable.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GL/mesa/shader/slang/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign GL/mesa/shader/slang/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libslang.la: $(libslang_la_OBJECTS) $(libslang_la_DEPENDENCIES) + $(LINK) $(libslang_la_OBJECTS) $(libslang_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_builtin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_codegen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_compile.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_compile_function.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_compile_operation.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_compile_struct.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_compile_variable.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_emit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_ir.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_label.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_library_noise.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_link.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_log.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_mem.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_preprocess.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_print.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_simplify.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_storage.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_typeinfo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_utility.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slang_vartable.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/GL/mesa/swrast/Makefile.am b/xorg-server-1.4/GL/mesa/swrast/Makefile.am new file mode 100644 index 0000000..bffb1e7 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/swrast/Makefile.am @@ -0,0 +1,50 @@ +noinst_LTLIBRARIES = libswrast.la + +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../shader/slang \ + -I../shader/slang \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libswrast_la_SOURCES = s_aaline.c \ + s_aatriangle.c \ + s_accum.c \ + s_alpha.c \ + s_atifragshader.c \ + s_bitmap.c \ + s_blend.c \ + s_blit.c \ + s_buffers.c \ + s_context.c \ + s_copypix.c \ + s_depth.c \ + s_drawpix.c \ + s_feedback.c \ + s_fog.c \ + s_fragprog.c \ + s_imaging.c \ + s_lines.c \ + s_logic.c \ + s_masking.c \ + s_points.c \ + s_readpix.c \ + s_span.c \ + s_stencil.c \ + s_texcombine.c \ + s_texfilter.c \ + s_texstore.c \ + s_triangle.c \ + s_zoom.c diff --git a/xorg-server-1.4/GL/mesa/swrast/Makefile.in b/xorg-server-1.4/GL/mesa/swrast/Makefile.in new file mode 100644 index 0000000..c9f61af --- /dev/null +++ b/xorg-server-1.4/GL/mesa/swrast/Makefile.in @@ -0,0 +1,700 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = GL/mesa/swrast +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libswrast_la_LIBADD = +nodist_libswrast_la_OBJECTS = s_aaline.lo s_aatriangle.lo s_accum.lo \ + s_alpha.lo s_atifragshader.lo s_bitmap.lo s_blend.lo s_blit.lo \ + s_buffers.lo s_context.lo s_copypix.lo s_depth.lo s_drawpix.lo \ + s_feedback.lo s_fog.lo s_fragprog.lo s_imaging.lo s_lines.lo \ + s_logic.lo s_masking.lo s_points.lo s_readpix.lo s_span.lo \ + s_stencil.lo s_texcombine.lo s_texfilter.lo s_texstore.lo \ + s_triangle.lo s_zoom.lo +libswrast_la_OBJECTS = $(nodist_libswrast_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(nodist_libswrast_la_SOURCES) +DIST_SOURCES = +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libswrast.la +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../shader/slang \ + -I../shader/slang \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libswrast_la_SOURCES = s_aaline.c \ + s_aatriangle.c \ + s_accum.c \ + s_alpha.c \ + s_atifragshader.c \ + s_bitmap.c \ + s_blend.c \ + s_blit.c \ + s_buffers.c \ + s_context.c \ + s_copypix.c \ + s_depth.c \ + s_drawpix.c \ + s_feedback.c \ + s_fog.c \ + s_fragprog.c \ + s_imaging.c \ + s_lines.c \ + s_logic.c \ + s_masking.c \ + s_points.c \ + s_readpix.c \ + s_span.c \ + s_stencil.c \ + s_texcombine.c \ + s_texfilter.c \ + s_texstore.c \ + s_triangle.c \ + s_zoom.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GL/mesa/swrast/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign GL/mesa/swrast/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libswrast.la: $(libswrast_la_OBJECTS) $(libswrast_la_DEPENDENCIES) + $(LINK) $(libswrast_la_OBJECTS) $(libswrast_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_aaline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_aatriangle.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_accum.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_alpha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_atifragshader.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_bitmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_blend.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_blit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_buffers.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_context.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_copypix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_depth.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_drawpix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_feedback.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_fog.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_fragprog.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_imaging.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_lines.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_logic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_masking.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_points.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_readpix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_span.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_stencil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_texcombine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_texfilter.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_texstore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_triangle.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_zoom.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/GL/mesa/swrast_setup/Makefile.am b/xorg-server-1.4/GL/mesa/swrast_setup/Makefile.am new file mode 100644 index 0000000..1f3c031 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/swrast_setup/Makefile.am @@ -0,0 +1,20 @@ +noinst_LTLIBRARIES = libss.la + +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libss_la_SOURCES = ss_context.c ss_triangle.c diff --git a/xorg-server-1.4/GL/mesa/swrast_setup/Makefile.in b/xorg-server-1.4/GL/mesa/swrast_setup/Makefile.in new file mode 100644 index 0000000..139c8c9 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/swrast_setup/Makefile.in @@ -0,0 +1,636 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = GL/mesa/swrast_setup +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libss_la_LIBADD = +nodist_libss_la_OBJECTS = ss_context.lo ss_triangle.lo +libss_la_OBJECTS = $(nodist_libss_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(nodist_libss_la_SOURCES) +DIST_SOURCES = +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libss.la +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libss_la_SOURCES = ss_context.c ss_triangle.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GL/mesa/swrast_setup/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign GL/mesa/swrast_setup/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libss.la: $(libss_la_OBJECTS) $(libss_la_DEPENDENCIES) + $(LINK) $(libss_la_OBJECTS) $(libss_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ss_context.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ss_triangle.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/GL/mesa/tnl/Makefile.am b/xorg-server-1.4/GL/mesa/tnl/Makefile.am new file mode 100644 index 0000000..b3c8206 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/tnl/Makefile.am @@ -0,0 +1,37 @@ +noinst_LTLIBRARIES = libtnl.la + +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../shader/slang \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libtnl_la_SOURCES = t_context.c \ + t_draw.c \ + t_pipeline.c \ + t_vb_cull.c \ + t_vb_fog.c \ + t_vb_light.c \ + t_vb_normals.c \ + t_vb_points.c \ + t_vb_program.c \ + t_vb_render.c \ + t_vb_texgen.c \ + t_vb_texmat.c \ + t_vb_vertex.c \ + t_vertex.c \ + t_vertex_generic.c \ + t_vertex_sse.c \ + t_vp_build.c diff --git a/xorg-server-1.4/GL/mesa/tnl/Makefile.in b/xorg-server-1.4/GL/mesa/tnl/Makefile.in new file mode 100644 index 0000000..8de4793 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/tnl/Makefile.in @@ -0,0 +1,673 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = GL/mesa/tnl +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libtnl_la_LIBADD = +nodist_libtnl_la_OBJECTS = t_context.lo t_draw.lo t_pipeline.lo \ + t_vb_cull.lo t_vb_fog.lo t_vb_light.lo t_vb_normals.lo \ + t_vb_points.lo t_vb_program.lo t_vb_render.lo t_vb_texgen.lo \ + t_vb_texmat.lo t_vb_vertex.lo t_vertex.lo t_vertex_generic.lo \ + t_vertex_sse.lo t_vp_build.lo +libtnl_la_OBJECTS = $(nodist_libtnl_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(nodist_libtnl_la_SOURCES) +DIST_SOURCES = +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libtnl.la +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../shader/slang \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libtnl_la_SOURCES = t_context.c \ + t_draw.c \ + t_pipeline.c \ + t_vb_cull.c \ + t_vb_fog.c \ + t_vb_light.c \ + t_vb_normals.c \ + t_vb_points.c \ + t_vb_program.c \ + t_vb_render.c \ + t_vb_texgen.c \ + t_vb_texmat.c \ + t_vb_vertex.c \ + t_vertex.c \ + t_vertex_generic.c \ + t_vertex_sse.c \ + t_vp_build.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GL/mesa/tnl/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign GL/mesa/tnl/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libtnl.la: $(libtnl_la_OBJECTS) $(libtnl_la_DEPENDENCIES) + $(LINK) $(libtnl_la_OBJECTS) $(libtnl_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_context.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_draw.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_pipeline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_vb_cull.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_vb_fog.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_vb_light.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_vb_normals.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_vb_points.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_vb_program.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_vb_render.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_vb_texgen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_vb_texmat.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_vb_vertex.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_vertex.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_vertex_generic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_vertex_sse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_vp_build.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/GL/mesa/vbo/Makefile.am b/xorg-server-1.4/GL/mesa/vbo/Makefile.am new file mode 100644 index 0000000..9943f2a --- /dev/null +++ b/xorg-server-1.4/GL/mesa/vbo/Makefile.am @@ -0,0 +1,35 @@ +noinst_LTLIBRARIES = libvbo.la + +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../shader/slang \ + -I../shader/slang \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libvbo_la_SOURCES = vbo_context.c \ + vbo_exec_api.c \ + vbo_exec_array.c \ + vbo_exec.c \ + vbo_exec_draw.c \ + vbo_exec_eval.c \ + vbo_rebase.c \ + vbo_save_api.c \ + vbo_save.c \ + vbo_save_draw.c \ + vbo_save_loopback.c \ + vbo_split.c \ + vbo_split_copy.c \ + vbo_split_inplace.c diff --git a/xorg-server-1.4/GL/mesa/vbo/Makefile.in b/xorg-server-1.4/GL/mesa/vbo/Makefile.in new file mode 100644 index 0000000..1606d06 --- /dev/null +++ b/xorg-server-1.4/GL/mesa/vbo/Makefile.in @@ -0,0 +1,668 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = GL/mesa/vbo +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libvbo_la_LIBADD = +nodist_libvbo_la_OBJECTS = vbo_context.lo vbo_exec_api.lo \ + vbo_exec_array.lo vbo_exec.lo vbo_exec_draw.lo \ + vbo_exec_eval.lo vbo_rebase.lo vbo_save_api.lo vbo_save.lo \ + vbo_save_draw.lo vbo_save_loopback.lo vbo_split.lo \ + vbo_split_copy.lo vbo_split_inplace.lo +libvbo_la_OBJECTS = $(nodist_libvbo_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(nodist_libvbo_la_SOURCES) +DIST_SOURCES = +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libvbo.la +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -DXFree86Server \ + @GLX_DEFINES@ + +INCLUDES = -I@MESA_SOURCE@/include \ + -I../X \ + -I../glapi \ + -I../main \ + -I../math \ + -I../shader \ + -I../shader/slang \ + -I../shader/slang \ + -I../swrast \ + -I../swrast_setup \ + -I../tnl \ + -I.. \ + -I$(top_srcdir)/hw/xfree86/os-support + +nodist_libvbo_la_SOURCES = vbo_context.c \ + vbo_exec_api.c \ + vbo_exec_array.c \ + vbo_exec.c \ + vbo_exec_draw.c \ + vbo_exec_eval.c \ + vbo_rebase.c \ + vbo_save_api.c \ + vbo_save.c \ + vbo_save_draw.c \ + vbo_save_loopback.c \ + vbo_split.c \ + vbo_split_copy.c \ + vbo_split_inplace.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GL/mesa/vbo/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign GL/mesa/vbo/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libvbo.la: $(libvbo_la_OBJECTS) $(libvbo_la_DEPENDENCIES) + $(LINK) $(libvbo_la_OBJECTS) $(libvbo_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbo_context.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbo_exec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbo_exec_api.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbo_exec_array.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbo_exec_draw.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbo_exec_eval.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbo_rebase.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbo_save.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbo_save_api.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbo_save_draw.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbo_save_loopback.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbo_split.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbo_split_copy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbo_split_inplace.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/GL/symlink-mesa.sh b/xorg-server-1.4/GL/symlink-mesa.sh new file mode 100755 index 0000000..0cfe1c9 --- /dev/null +++ b/xorg-server-1.4/GL/symlink-mesa.sh @@ -0,0 +1,336 @@ +#!/bin/sh + +# +# A script that symlinks source files from Mesa to modular +# +# Author: Soren Sandmann (sandmann@redhat.com) (original) +# adapted for Mesa by Adam Jackson (ajax@nwnk.net) + +# +# Things we would like to do +# +# - Check that all the relevant files exist +# - AUTHORS, autogen.sh, configure.ac, ... +# - Check that we have actually linked everything +# - if a file doesn't need to be linked, then it needs +# to be listed as "not-linked" +# - Compute diffs between all the files (shouldn't be necessary) +# - possibly check that files are listet in Makefile.am's +# - Clean target directory of irrelevant files +# + +check_destinations () { + # don't do anything - we are relying on the side + # effect of dst_dir + true +} + +check_exist() { + # Check whether $1 exists + + if [ ! -e $1 ] ; then + error "$1 not found" + fi +} + +delete_existing() { + # Delete $2 + + rm -f $2 +} + +link_files() { + # Link $1 to $2 + + if [ ! -e $2 ] ; then + ln -s $1 $2 + fi +} + +main() { + check_args $1 $2 + + run check_destinations "Creating destination directories" + run check_exist "Checking that the source files exist" + run delete_existing "Deleting existing files" + run link_files "Linking files" +} + +## actual symlinking + +symlink_mesa_glapi() { + src_dir src/mesa/glapi + dst_dir mesa/glapi + + for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do + action `basename $src` + done +} + +symlink_mesa_main() { + src_dir src/mesa/main + dst_dir mesa/main + + for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do + action `basename $src` + done +} + +symlink_mesa_math() { + src_dir src/mesa/math + dst_dir mesa/math + + for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do + action `basename $src` + done +} + +symlink_mesa_swrast() { + src_dir src/mesa/swrast + dst_dir mesa/swrast + + for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do + action `basename $src` + done +} + +symlink_mesa_ss() { + src_dir src/mesa/swrast_setup + dst_dir mesa/swrast_setup + + for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do + action `basename $src` + done +} + +symlink_mesa_tnl() { + src_dir src/mesa/tnl + dst_dir mesa/tnl + + for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do + action `basename $src` + done +} + +symlink_mesa_shader() { + src_dir src/mesa/shader + dst_dir mesa/shader + + for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do + action `basename $src` + done +} + +symlink_mesa_shader_grammar() { + src_dir src/mesa/shader/grammar + dst_dir mesa/shader/grammar + + for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do + action `basename $src` + done +} + +symlink_mesa_shader_slang() { + src_dir src/mesa/shader/slang + dst_dir mesa/shader/slang + + for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do + action `basename $src` + done +} + +symlink_mesa_shader_slang_library() { + src_dir src/mesa/shader/slang/library + dst_dir mesa/shader/slang/library + + for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do + action `basename $src` + done +} + +symlink_mesa_vbo() { + src_dir src/mesa/vbo + dst_dir mesa/vbo + + for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do + action `basename $src` + done +} + +symlink_mesa_x() { + src_dir src/mesa/drivers/x11 + dst_dir mesa/X + + # action glxapi.h + action glxheader.h + # action realglx.h + # action xfonts.h + action xm_api.c + action xm_buffer.c + action xm_dd.c + action xm_image.c + action xm_image.h + action xm_line.c + action xm_span.c + action xm_tri.c + action xmesaP.h + + # another hack + src_dir src/mesa/drivers/common + dst_dir mesa/X/drivers/common + action driverfuncs.c + action driverfuncs.h +} + +symlink_mesa_ppc() { + src_dir src/mesa/ppc + dst_dir mesa/ppc +} + +symlink_mesa_sparc() { + src_dir src/mesa/sparc + dst_dir mesa/sparc +} + +symlink_mesa_x86() { + src_dir src/mesa/x86 + dst_dir mesa/x86 +} + +symlink_mesa_x8664() { + src_dir src/mesa/x86-64 + dst_dir mesa/x86-64 +} + +symlink_mesa() { + symlink_mesa_main + symlink_mesa_math + symlink_mesa_swrast + symlink_mesa_ss + symlink_mesa_tnl + symlink_mesa_shader + symlink_mesa_shader_grammar + symlink_mesa_shader_slang + symlink_mesa_shader_slang_library + symlink_mesa_x + symlink_mesa_glapi + symlink_mesa_ppc + symlink_mesa_sparc + symlink_mesa_vbo + symlink_mesa_x86 + symlink_mesa_x8664 +} + +symlink_glx() { + # this is... unpleasant + src_dir src/glx/x11 + dst_dir glx + + action indirect_size.h + action glcontextmodes.c + action glcontextmodes.h + + src_dir src/mesa/glapi + + action glapi.c + action glthread.c +} + +######### +# +# Helper functions +# +######### + +error() { + echo + echo \ \ \ error:\ \ \ $1 + exit 1 +} + +# printing out what's going on +run_module() { + # $1 module + # $2 explanation + echo -n $EXPLANATION for $1 module ...\ + symlink_$1 + echo DONE +} + +run() { + # $1 what to do + # $2 explanation + + ACTION=$1 EXPLANATION=$2 run_module mesa + ACTION=$1 EXPLANATION=$2 run_module glx +} + +src_dir() { + REAL_SRC_DIR=$SRC_DIR/$1 + if [ ! -d $REAL_SRC_DIR ] ; then + error "Source directory $REAL_SRC_DIR does not exist" + fi +} + +dst_dir() { + REAL_DST_DIR=$DST_DIR/$1 + if [ ! -d $REAL_DST_DIR ] ; then + mkdir -p $REAL_DST_DIR + fi +} + +action() { + if [ -z $2 ] ; then + $ACTION $REAL_SRC_DIR/$1 $REAL_DST_DIR/$1 + else + $ACTION $REAL_SRC_DIR/$1 $REAL_DST_DIR/$2 + fi +} + +usage() { + echo symlink-mesa.sh src-dir dst-dir + echo src-dir: the Mesa source directory + echo dst-dir: the GL subdirectory of the Xserver modular tree +} + +# Check commandline args +check_args() { + if [ -z $1 ] ; then + echo Missing source dir + usage + exit 1 + fi + + if [ -z $2 ] ; then + echo Missing destination dir + usage + exit 1 + fi + + if [ ! -d $1 ] ; then + echo $1 is not a dir + usage + exit 1 + fi + + if [ ! -d $2 ] ; then + echo $2 is not a dir + usage + exit 1 + fi + + if [ $1 = $2 ] ; then + echo source and destination can\'t be the same + usage + exit 1 + fi + + D=`dirname "$relpath"` + B=`basename "$relpath"` + abspath="`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`/$B" + + SRC_DIR=`( cd $1 ; pwd )` + DST_DIR=`(cd $2 ; pwd )` +} + +main $1 $2 diff --git a/xorg-server-1.4/GL/windows/ChangeLog b/xorg-server-1.4/GL/windows/ChangeLog new file mode 100644 index 0000000..43a817d --- /dev/null +++ b/xorg-server-1.4/GL/windows/ChangeLog @@ -0,0 +1,64 @@ +2005-09-27 Ian Romanick + + * indirect.c: + Remove __glEvalComputeK. It is no longer used. + + +2005-04-09 Alexander Gottwald + + * indirect.c: + Fix passing of non-RGB visuals. The old code did not initialize the + structure properly which lead to a crash in 8bpp mode + +2005-03-01 Alexander Gottwald + + * indirect.c: + * glwindows.h: + If a context is already attached copy it instead of reattaching to keep + displaylists and share displaylists + Enable tracing of often called functions with GLWIN_ENABLE_TRACE + ForceCurrent is a no-op now + +2005-02-02 Alexander Gottwald + + * Imakefile: + Bugzilla #1866 (https://bugs.freedesktop.org/show_bug.cgi?id=1866) + attachment #1819 (https://bugs.freedesktop.org/attachment.cgi?id=1819): + Define APIENTRY on windows to prevent from loading + +2005-02-02 Alexander Gottwald + + * glwrap.c: + * glwindows.h: + Bugzilla #1866 (https://bugs.freedesktop.org/show_bug.cgi?id=1866) + attachment #1818 (https://bugs.freedesktop.org/attachment.cgi?id=1818): + Include Xwindows.h before GL/gl.h to prevent loading windows.h which + pollutes our namespace with some symbols. + +2005-01-27 Alexander Gottwald + + * glwrap.c: + Functions like glGenTextures and glBindTexture are in OpenGL 1.1 + and can be resolved at linktime. + +2004-11-15 Alexander Gottwald + + * indirect.c: + Bugzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 + Added mingw (Win32) port + +2004-08-13 Alexander Gottwald + + * Imakefile: Added $(MESASRCDIR)/src/mesa/glapi to INCLUDES. + Removed $(SERVERSRC)/mi from INCLUDES. + Rearranged INCLUDES for better readability. + * glwindows.h: Removed mipointrst.h and miscstruct.h from #include + since they are not used anymore. + +2004-05-27 Alexander Gottwald + + * glwindows.h: write current function and line in debug output + * indirect.c: moved actual setup and creation of windows GL context to + glWinCreateContextReal. + * indirect.c (glWinCreateContext): Deferred context creation to attach. + * indirect.c (glWinMakeCurrent): Check if context is NULL. Fixes segfault. diff --git a/xorg-server-1.4/GL/windows/glwindows.h b/xorg-server-1.4/GL/windows/glwindows.h new file mode 100644 index 0000000..74e81f2 --- /dev/null +++ b/xorg-server-1.4/GL/windows/glwindows.h @@ -0,0 +1,64 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +typedef struct { + unsigned enableDebug : 1; + unsigned enableTrace : 1; + unsigned dumpPFD : 1; + unsigned dumpHWND : 1; + unsigned dumpDC : 1; +} glWinDebugSettingsRec, *glWinDebugSettingsPtr; +extern glWinDebugSettingsRec glWinDebugSettings; + +typedef struct { + int num_vis; + __GLcontextModes *modes; + void **priv; + + /* wrapped screen functions */ + RealizeWindowProcPtr RealizeWindow; + UnrealizeWindowProcPtr UnrealizeWindow; + CopyWindowProcPtr CopyWindow; +} glWinScreenRec; + +extern glWinScreenRec glWinScreens[MAXSCREENS]; + +#define glWinGetScreenPriv(pScreen) &glWinScreens[pScreen->myNum] +#define glWinScreenPriv(pScreen) glWinScreenRec *pScreenPriv = glWinGetScreenPriv(pScreen); + +#if 1 +#define GLWIN_TRACE() if (glWinDebugSettings.enableTrace) ErrorF("%s:%d: Trace\n", __FUNCTION__, __LINE__ ) +#define GLWIN_TRACE_MSG(msg, args...) if (glWinDebugSettings.enableTrace) ErrorF("%s:%d: " msg, __FUNCTION__, __LINE__, ##args ) +#define GLWIN_DEBUG_MSG(msg, args...) if (glWinDebugSettings.enableDebug) ErrorF("%s:%d: " msg, __FUNCTION__, __LINE__, ##args ) +#define GLWIN_DEBUG_MSG2(msg, args...) if (glWinDebugSettings.enableDebug) ErrorF(msg, ##args ) +#else +#define GLWIN_TRACE() +#define GLWIN_TRACE_MSG(a, ...) +#define GLWIN_DEBUG_MSG(a, ...) +#define GLWIN_DEBUG_MSG2(a, ...) +#endif + diff --git a/xorg-server-1.4/GL/windows/glwrap.c b/xorg-server-1.4/GL/windows/glwrap.c new file mode 100755 index 0000000..f0b38b2 --- /dev/null +++ b/xorg-server-1.4/GL/windows/glwrap.c @@ -0,0 +1,583 @@ +/* + * GLX implementation that uses Win32's OpenGL + * Wrapper functions for Win32's OpenGL + * + * Authors: Alexander Gottwald + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include + +#define RESOLVE_RET(procname, symbol, retval) \ + static Bool init = TRUE; \ + static procname proc = NULL; \ + if (init) { \ + proc = (procname)wglGetProcAddress(symbol); \ + init = FALSE; \ + if (proc == NULL) { \ + ErrorF("glwrap: Can't resolve \"%s\"\n", symbol); \ + } else \ + ErrorF("glwrap: resolved \"%s\"\n", symbol); \ + } \ + if (proc == NULL) { \ + __glXErrorCallBack(NULL, 0); \ + return retval; \ + } +#define RESOLVE(procname, symbol) RESOLVE_RET(procname, symbol,) + + +/* + * GL_ARB_imaging + */ + + +GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat, + GLsizei width, GLenum format, + GLenum type, const GLvoid *table ) +{ + RESOLVE(PFNGLCOLORTABLEPROC, "glColorTable"); + proc(target, internalformat, width, format, type, table); +} + +GLAPI void GLAPIENTRY glColorSubTable( GLenum target, + GLsizei start, GLsizei count, + GLenum format, GLenum type, + const GLvoid *data ) +{ + RESOLVE(PFNGLCOLORSUBTABLEPROC, "glColorSubTable"); + proc(target, start, count, format, type, data); +} + +GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname, + const GLint *params) +{ + RESOLVE(PFNGLCOLORTABLEPARAMETERIVPROC, "glColorTableParameteriv"); + proc(target, pname, params); +} + +GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname, + const GLfloat *params) +{ + RESOLVE(PFNGLCOLORTABLEPARAMETERFVPROC, "glColorTableParameterfv"); + proc(target, pname, params); +} + +GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start, + GLint x, GLint y, GLsizei width ) +{ + RESOLVE(PFNGLCOPYCOLORSUBTABLEPROC, "glCopyColorSubTable"); + proc(target, start, x, y, width); +} + +GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat, + GLint x, GLint y, GLsizei width ) +{ + RESOLVE(PFNGLCOPYCOLORTABLEPROC, "glCopyColorTable"); + proc(target, internalformat, x, y, width); +} + + +GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format, + GLenum type, GLvoid *table ) +{ + RESOLVE(PFNGLGETCOLORTABLEPROC, "glGetColorTable"); + proc(target, format, type, table); +} + +GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname, + GLfloat *params ) +{ + RESOLVE(PFNGLGETCOLORTABLEPARAMETERFVPROC, "glGetColorTableParameterfv"); + proc(target, pname, params); +} + +GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname, + GLint *params ) +{ + RESOLVE(PFNGLGETCOLORTABLEPARAMETERIVPROC, "glGetColorTableParameteriv"); + proc(target, pname, params); +} + +GLAPI void GLAPIENTRY glBlendEquation( GLenum mode ) +{ + RESOLVE(PFNGLBLENDEQUATIONPROC, "glBlendEquation"); + proc(mode); +} + +GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green, + GLclampf blue, GLclampf alpha ) +{ + RESOLVE(PFNGLBLENDCOLORPROC, "glBlendColor"); + proc(red, green, blue, alpha); +} + +GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width, + GLenum internalformat, GLboolean sink ) +{ + RESOLVE(PFNGLHISTOGRAMPROC, "glHistogram"); + proc(target, width, internalformat, sink); +} + +GLAPI void GLAPIENTRY glResetHistogram( GLenum target ) +{ + RESOLVE(PFNGLRESETHISTOGRAMPROC, "glResetHistogram"); + proc(target); +} + +GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset, + GLenum format, GLenum type, + GLvoid *values ) +{ + RESOLVE(PFNGLGETHISTOGRAMPROC, "glGetHistogram"); + proc(target, reset, format, type, values); +}; + +GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname, + GLfloat *params ) +{ + RESOLVE(PFNGLGETHISTOGRAMPARAMETERFVPROC, "glGetHistogramParameterfv"); + proc(target, pname, params); +} + +GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname, + GLint *params ) +{ + RESOLVE(PFNGLGETHISTOGRAMPARAMETERIVPROC, "glGetHistogramParameteriv"); + proc(target, pname, params); +} + +GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat, + GLboolean sink ) +{ + RESOLVE(PFNGLMINMAXPROC, "glMinmax"); + proc(target, internalformat, sink); +} + +GLAPI void GLAPIENTRY glResetMinmax( GLenum target ) +{ + RESOLVE(PFNGLRESETMINMAXPROC, "glResetMinmax"); + proc(target); +} + +GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset, + GLenum format, GLenum types, + GLvoid *values ) +{ + RESOLVE(PFNGLGETMINMAXPROC, "glGetMinmax"); + proc(target, reset, format, types, values); +} + +GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname, + GLfloat *params ) +{ + RESOLVE(PFNGLGETMINMAXPARAMETERFVPROC, "glGetMinmaxParameterfv"); + proc(target, pname, params); +} + +GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname, + GLint *params ) +{ + RESOLVE(PFNGLGETMINMAXPARAMETERIVPROC, "glGetMinmaxParameteriv"); + proc(target, pname, params); +} + +GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target, + GLenum internalformat, GLsizei width, GLenum format, GLenum type, + const GLvoid *image ) +{ + RESOLVE(PFNGLCONVOLUTIONFILTER1DPROC, "glConvolutionFilter1D"); + proc(target, internalformat, width, format, type, image); +} + +GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target, + GLenum internalformat, GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *image ) +{ + RESOLVE(PFNGLCONVOLUTIONFILTER2DPROC, "glConvolutionFilter2D"); + proc(target, internalformat, width, height, format, type, image); +} + +GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname, + GLfloat params ) +{ + RESOLVE(PFNGLCONVOLUTIONPARAMETERFPROC, "glConvolutionParameterf"); + proc(target, pname, params); +} + +GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname, + const GLfloat *params ) +{ + RESOLVE(PFNGLCONVOLUTIONPARAMETERFVPROC, "glConvolutionParameterfv"); + proc(target, pname, params); +} + +GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname, + GLint params ) +{ + RESOLVE(PFNGLCONVOLUTIONPARAMETERIPROC, "glConvolutionParameteri"); + proc(target, pname, params); +} + +GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname, + const GLint *params ) +{ + RESOLVE(PFNGLCONVOLUTIONPARAMETERIVPROC, "glConvolutionParameteriv"); + proc(target, pname, params); +} + +GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target, + GLenum internalformat, GLint x, GLint y, GLsizei width ) +{ + RESOLVE(PFNGLCOPYCONVOLUTIONFILTER1DPROC, "glCopyConvolutionFilter1D"); + proc(target, internalformat, x, y, width); +} + +GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target, + GLenum internalformat, GLint x, GLint y, GLsizei width, + GLsizei height) +{ + RESOLVE(PFNGLCOPYCONVOLUTIONFILTER2DPROC, "glCopyConvolutionFilter2D"); + proc(target, internalformat, x, y, width, height); +} + +GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format, + GLenum type, GLvoid *image ) +{ + RESOLVE(PFNGLGETCONVOLUTIONFILTERPROC, "glGetConvolutionFilter"); + proc(target, format, type, image); +} + +GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname, + GLfloat *params ) +{ + RESOLVE(PFNGLGETCONVOLUTIONPARAMETERFVPROC, "glGetConvolutionParameterfv"); + proc(target, pname, params); +} + +GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname, + GLint *params ) +{ + RESOLVE(PFNGLGETCONVOLUTIONPARAMETERIVPROC, "glGetConvolutionParameteriv"); + proc(target, pname, params); +} + +GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target, + GLenum internalformat, GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *row, const GLvoid *column ) +{ + RESOLVE(PFNGLSEPARABLEFILTER2DPROC, "glSeparableFilter2D"); + proc(target, internalformat, width, height, format, type, row, column); +} + +GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format, + GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ) +{ + RESOLVE(PFNGLGETSEPARABLEFILTERPROC, "glGetSeparableFilter"); + proc(target, format, type, row, column, span); +} + +/* + * OpenGL 1.2 + */ + +GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLsizei height, + GLsizei depth, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels ) +{ + RESOLVE(PFNGLTEXIMAGE3DPROC, "glTexImage3D"); + proc(target, level, internalFormat, width, height, depth, border, format, type, pixels); +} + +GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLenum format, + GLenum type, const GLvoid *pixels) +{ + RESOLVE(PFNGLTEXSUBIMAGE3DPROC, "glTexSubImage3D"); + proc(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); +} + +GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLint x, + GLint y, GLsizei width, + GLsizei height ) +{ + RESOLVE(PFNGLCOPYTEXSUBIMAGE3DPROC, "glCopyTexSubImage3D"); + proc(target, level, xoffset, yoffset, zoffset, x, y, width, height); +} + + +/* + * 20. GL_EXT_texture_object + */ +GLAPI void GLAPIENTRY glGenTexturesEXT( GLsizei n, GLuint *textures ) +{ + glGenTextures(n, textures); +} + +GLAPI void GLAPIENTRY glDeleteTexturesEXT( GLsizei n, const GLuint *textures) +{ + glDeleteTextures(n, textures); +} + +GLAPI void GLAPIENTRY glBindTextureEXT( GLenum target, GLuint texture ) +{ + glBindTexture(target, target); +} + +GLAPI void GLAPIENTRY glPrioritizeTexturesEXT( GLsizei n, const GLuint *textures, const GLclampf *priorities ) +{ + glPrioritizeTextures(n, textures, priorities); +} + +GLAPI GLboolean GLAPIENTRY glAreTexturesResidentEXT( GLsizei n, const GLuint *textures, GLboolean *residences ) +{ + return glAreTexturesResident(n, textures, residences); +} + +GLAPI GLboolean GLAPIENTRY glIsTextureEXT( GLuint texture ) +{ + return glIsTexture(texture); +} + +/* + * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1) + */ + +GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture) +{ + RESOLVE(PFNGLACTIVETEXTUREARBPROC, "glActiveTextureARB"); + proc(texture); +} + +GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v) +{ + RESOLVE(PFNGLMULTITEXCOORD1DVARBPROC, "glMultiTexCoord1dvARB"); + proc(target, v); +} + +GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v) +{ + RESOLVE(PFNGLMULTITEXCOORD1FVARBPROC, "glMultiTexCoord1fvARB"); + proc(target, v); +} + +GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v) +{ + RESOLVE(PFNGLMULTITEXCOORD1IVARBPROC, "glMultiTexCoord1ivARB"); + proc(target, v); +} + +GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v) +{ + RESOLVE(PFNGLMULTITEXCOORD1SVARBPROC, "glMultiTexCoord1svARB"); + proc(target, v); +} +GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v) +{ + RESOLVE(PFNGLMULTITEXCOORD2DVARBPROC, "glMultiTexCoord2dvARB"); + proc(target, v); +} +GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v) +{ + RESOLVE(PFNGLMULTITEXCOORD2FVARBPROC, "glMultiTexCoord2fvARB"); + proc(target, v); +} +GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v) +{ + RESOLVE(PFNGLMULTITEXCOORD2IVARBPROC, "glMultiTexCoord2ivARB"); + proc(target, v); +} +GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v) +{ + RESOLVE(PFNGLMULTITEXCOORD1SVARBPROC, "glMultiTexCoord1svARB"); + proc(target, v); +} +GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v) +{ + RESOLVE(PFNGLMULTITEXCOORD3DVARBPROC, "glMultiTexCoord3dvARB"); + proc(target, v); +} +GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v) +{ + RESOLVE(PFNGLMULTITEXCOORD3FVARBPROC, "glMultiTexCoord3fvARB"); + proc(target, v); +} +GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v) +{ + RESOLVE(PFNGLMULTITEXCOORD3IVARBPROC, "glMultiTexCoord3ivARB"); + proc(target, v); +} +GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v) +{ + RESOLVE(PFNGLMULTITEXCOORD1SVARBPROC, "glMultiTexCoord1svARB"); + proc(target, v); +} +GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v) +{ + RESOLVE(PFNGLMULTITEXCOORD4DVARBPROC, "glMultiTexCoord4dvARB"); + proc(target, v); +} +GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v) +{ + RESOLVE(PFNGLMULTITEXCOORD4FVARBPROC, "glMultiTexCoord4fvARB"); + proc(target, v); +} +GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v) +{ + RESOLVE(PFNGLMULTITEXCOORD4IVARBPROC, "glMultiTexCoord4ivARB"); + proc(target, v); +} +GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v) +{ + RESOLVE(PFNGLMULTITEXCOORD1SVARBPROC, "glMultiTexCoord1svARB"); + proc(target, v); +} + + +GLAPI void GLAPIENTRY glActiveStencilFaceEXT(GLenum face) +{ + RESOLVE(PFNGLACTIVESTENCILFACEEXTPROC, "glActiveStencilFaceEXT"); + proc(face); +} + +GLAPI void APIENTRY glPointParameterfARB(GLenum pname, GLfloat param) +{ + RESOLVE(PFNGLPOINTPARAMETERFARBPROC, "glPointParameterfARB"); + proc(pname, param); +} + +GLAPI void APIENTRY glPointParameterfvARB(GLenum pname, const GLfloat *params) +{ + RESOLVE(PFNGLPOINTPARAMETERFVARBPROC, "glPointParameterfvARB"); + proc(pname, params); +} + + +GLAPI void APIENTRY glWindowPos3fARB(GLfloat x, GLfloat y, GLfloat z) +{ + RESOLVE(PFNGLWINDOWPOS3FARBPROC, "glWindowPos3fARB"); + proc(x, y, z); +} + +GLAPI void APIENTRY glPointParameteri(GLenum pname, GLint param) +{ + RESOLVE(PFNGLPOINTPARAMETERIPROC, "glPointParameteri"); + proc(pname, param); +} + +GLAPI void APIENTRY glPointParameteriv(GLenum pname, const GLint *params) +{ + RESOLVE(PFNGLPOINTPARAMETERIVPROC, "glPointParameteriv"); + proc(pname, params); +} + +GLAPI void APIENTRY glPointParameteriNV(GLenum pname, GLint param) +{ + RESOLVE(PFNGLPOINTPARAMETERINVPROC, "glPointParameteriNV"); + proc(pname, param); +} + +GLAPI void APIENTRY glPointParameterivNV(GLenum pname, const GLint *params) +{ + RESOLVE(PFNGLPOINTPARAMETERIVNVPROC, "glPointParameterivNV"); + proc(pname, params); +} + +GLAPI void APIENTRY glSecondaryColor3bv(const GLbyte *v) +{ + RESOLVE(PFNGLSECONDARYCOLOR3BVPROC, "glSecondaryColor3bv"); + proc(v); +} +GLAPI void APIENTRY glSecondaryColor3dv(const GLdouble *v) +{ + RESOLVE(PFNGLSECONDARYCOLOR3DVPROC, "glSecondaryColor3dv"); + proc(v); +} +GLAPI void APIENTRY glSecondaryColor3fv(const GLfloat *v) +{ + RESOLVE(PFNGLSECONDARYCOLOR3FVPROC, "glSecondaryColor3fv"); + proc(v); +} +GLAPI void APIENTRY glSecondaryColor3iv(const GLint *v) +{ + RESOLVE(PFNGLSECONDARYCOLOR3IVPROC, "glSecondaryColor3iv"); + proc(v); +} +GLAPI void APIENTRY glSecondaryColor3sv(const GLshort *v) +{ + RESOLVE(PFNGLSECONDARYCOLOR3SVPROC, "glSecondaryColor3sv"); + proc(v); +} +GLAPI void APIENTRY glSecondaryColor3ubv(const GLubyte *v) +{ + RESOLVE(PFNGLSECONDARYCOLOR3UBVPROC, "glSecondaryColor3ubv"); + proc(v); +} +GLAPI void APIENTRY glSecondaryColor3uiv(const GLuint *v) +{ + RESOLVE(PFNGLSECONDARYCOLOR3UIVPROC, "glSecondaryColor3uiv"); + proc(v); +} +GLAPI void APIENTRY glSecondaryColor3usv(const GLushort *v) +{ + RESOLVE(PFNGLSECONDARYCOLOR3USVPROC, "glSecondaryColor3usv"); + proc(v); +} +GLAPI void APIENTRY glSecondaryColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) +{ + RESOLVE(PFNGLSECONDARYCOLORPOINTERPROC, "glSecondaryColorPointer"); + proc(size, type, stride, pointer); +} + + +GLAPI void APIENTRY glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) +{ + RESOLVE(PFNGLBLENDFUNCSEPARATEPROC, "glBlendFuncSeparate"); + proc(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); +} +GLAPI void APIENTRY glFogCoordfv(const GLfloat *coord) +{ + RESOLVE(PFNGLFOGCOORDFVPROC, "glFogCoordfv"); + proc(coord); +} +GLAPI void APIENTRY glFogCoorddv(const GLdouble *coord) +{ + RESOLVE(PFNGLFOGCOORDDVPROC, "glFogCoorddv"); + proc(coord); +} +GLAPI void APIENTRY glFogCoordPointer(GLenum type, GLsizei stride, const GLvoid *pointer) +{ + RESOLVE(PFNGLFOGCOORDPOINTERPROC, "glFogCoordPointer"); + proc(type, stride, pointer); +} + + +GLAPI void APIENTRY glSampleCoverageARB(GLclampf value, GLboolean invert) +{ + RESOLVE(PFNGLSAMPLECOVERAGEARBPROC, "glSampleCoverageARB"); + proc(value, invert); +} +GLAPI void APIENTRY glSampleMaskSGIS(GLclampf value, GLboolean invert) +{ + RESOLVE(PFNGLSAMPLEMASKSGISPROC, "glSampleMaskSGIS"); + proc(value, invert); +} +GLAPI void APIENTRY glSamplePatternSGIS(GLenum pattern) +{ + RESOLVE(PFNGLSAMPLEPATTERNSGISPROC, "glSamplePatternSGIS"); + proc(pattern); +} diff --git a/xorg-server-1.4/GL/windows/indirect.c b/xorg-server-1.4/GL/windows/indirect.c new file mode 100755 index 0000000..5e12022 --- /dev/null +++ b/xorg-server-1.4/GL/windows/indirect.c @@ -0,0 +1,1605 @@ +/* + * GLX implementation that uses Windows OpenGL library + * (Indirect rendering path) + * + * Authors: Alexander Gottwald + */ +/* + * Portions of this file are copied from GL/apple/indirect.c, + * which contains the following copyright: + * + * Copyright (c) 2002 Greg Parker. All Rights Reserved. + * Copyright (c) 2002 Apple Computer, Inc. + * + * Portions of this file are copied from xf86glx.c, + * which contains the following copyright: + * + * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. + * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glwindows.h" +#include +#include + +#include + +#define GLWIN_DEBUG_HWND(hwnd) \ + if (glWinDebugSettings.dumpHWND) { \ + char buffer[1024]; \ + if (GetWindowText(hwnd, buffer, sizeof(buffer))==0) *buffer=0; \ + GLWIN_DEBUG_MSG("Got HWND %s (%p)\n", buffer, hwnd); \ + } + + +/* ggs: needed to call back to glx with visual configs */ +extern void GlxSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs, void **configprivs); + +glWinDebugSettingsRec glWinDebugSettings = { 1, 0, 0, 0, 0}; + +static void glWinInitDebugSettings(void) +{ + char *envptr; + + envptr = getenv("GLWIN_ENABLE_DEBUG"); + if (envptr != NULL) + glWinDebugSettings.enableDebug = (atoi(envptr) == 1); + + envptr = getenv("GLWIN_ENABLE_TRACE"); + if (envptr != NULL) + glWinDebugSettings.enableTrace = (atoi(envptr) == 1); + + envptr = getenv("GLWIN_DUMP_PFD"); + if (envptr != NULL) + glWinDebugSettings.dumpPFD = (atoi(envptr) == 1); + + envptr = getenv("GLWIN_DUMP_HWND"); + if (envptr != NULL) + glWinDebugSettings.dumpHWND = (atoi(envptr) == 1); + + envptr = getenv("GLWIN_DUMP_DC"); + if (envptr != NULL) + glWinDebugSettings.dumpDC = (atoi(envptr) == 1); +} + +static char errorbuffer[1024]; +const char *glWinErrorMessage(void) +{ + if (!FormatMessage( + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + GetLastError(), + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR) &errorbuffer, + sizeof(errorbuffer), + NULL )) + { + snprintf(errorbuffer, sizeof(errorbuffer), "Unknown error in FormatMessage: %08x!\n", (unsigned)GetLastError()); + } + return errorbuffer; +} + +/* + * GLX implementation that uses Win32's OpenGL + */ + +/* + * Server-side GLX uses these functions which are normally defined + * in the OpenGL SI. + */ + +GLuint __glFloorLog2(GLuint val) +{ + int c = 0; + + while (val > 1) { + c++; + val >>= 1; + } + return c; +} + +/* some prototypes */ +static Bool glWinScreenProbe(int screen); +static Bool glWinInitVisuals(VisualPtr *visualp, DepthPtr *depthp, + int *nvisualp, int *ndepthp, + int *rootDepthp, VisualID *defaultVisp, + unsigned long sizes, int bitsPerRGB); +static void glWinSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs, + void **privates); +static __GLinterface *glWinCreateContext(__GLimports *imports, + __GLcontextModes *mode, + __GLinterface *shareGC); +static void glWinCreateBuffer(__GLXdrawablePrivate *glxPriv); +static void glWinResetExtension(void); + +/* + * This structure is statically allocated in the __glXScreens[] + * structure. This struct is not used anywhere other than in + * __glXScreenInit to initialize each of the active screens + * (__glXActiveScreens[]). Several of the fields must be initialized by + * the screenProbe routine before they are copied to the active screens + * struct. In particular, the contextCreate, pGlxVisual, numVisuals, + * and numUsableVisuals fields must be initialized. + */ +static __GLXscreenInfo __glDDXScreenInfo = { + glWinScreenProbe, /* Must be generic and handle all screens */ + glWinCreateContext, /* Substitute screen's createContext routine */ + glWinCreateBuffer, /* Substitute screen's createBuffer routine */ + NULL, /* Set up pGlxVisual in probe */ + NULL, /* Set up pVisualPriv in probe */ + 0, /* Set up numVisuals in probe */ + 0, /* Set up numUsableVisuals in probe */ + "Vendor String", /* GLXvendor is overwritten by __glXScreenInit */ + "Version String", /* GLXversion is overwritten by __glXScreenInit */ + "Extensions String", /* GLXextensions is overwritten by __glXScreenInit */ + NULL /* WrappedPositionWindow is overwritten */ +}; + +void *__glXglDDXScreenInfo(void) { + return &__glDDXScreenInfo; +} + +static __GLXextensionInfo __glDDXExtensionInfo = { + GL_CORE_WINDOWS, + glWinResetExtension, + glWinInitVisuals, + glWinSetVisualConfigs +}; + +void *__glXglDDXExtensionInfo(void) { + return &__glDDXExtensionInfo; +} + +/* prototypes */ + +static GLboolean glWinDestroyContext(__GLcontext *gc); +static GLboolean glWinLoseCurrent(__GLcontext *gc); +static GLboolean glWinMakeCurrent(__GLcontext *gc); +static GLboolean glWinShareContext(__GLcontext *gc, __GLcontext *gcShare); +static GLboolean glWinCopyContext(__GLcontext *dst, const __GLcontext *src, + GLuint mask); +static GLboolean glWinForceCurrent(__GLcontext *gc); + +/* Drawing surface notification callbacks */ +static GLboolean glWinNotifyResize(__GLcontext *gc); +static void glWinNotifyDestroy(__GLcontext *gc); +static void glWinNotifySwapBuffers(__GLcontext *gc); + +/* Dispatch table override control for external agents like libGLS */ +static struct __GLdispatchStateRec* glWinDispatchExec(__GLcontext *gc); +static void glWinBeginDispatchOverride(__GLcontext *gc); +static void glWinEndDispatchOverride(__GLcontext *gc); + +/* Debug output */ +static void pfdOut(const PIXELFORMATDESCRIPTOR *pfd); + +static __GLexports glWinExports = { + glWinDestroyContext, + glWinLoseCurrent, + glWinMakeCurrent, + glWinShareContext, + glWinCopyContext, + glWinForceCurrent, + + glWinNotifyResize, + glWinNotifyDestroy, + glWinNotifySwapBuffers, + + glWinDispatchExec, + glWinBeginDispatchOverride, + glWinEndDispatchOverride +}; + +glWinScreenRec glWinScreens[MAXSCREENS]; + +/* __GLdrawablePrivate->private */ +typedef struct { + DrawablePtr pDraw; + /* xp_surface_id sid; */ +} GLWinDrawableRec; + +struct __GLcontextRec { + struct __GLinterfaceRec interface; /* required to be first */ + + HGLRC ctx; /* Windows GL Context */ + + HDC dc; /* Windows Device Context */ + winWindowInfoRec winInfo; /* Window info from XWin */ + + PIXELFORMATDESCRIPTOR pfd; /* Pixelformat flags */ + int pixelFormat; /* Pixelformat index */ + + unsigned isAttached :1; /* Flag to track if context is attached */ +}; + +static HDC glWinMakeDC(__GLcontext *gc) +{ + HDC dc; + + /*if (gc->winInfo.hrgn == NULL) + { + GLWIN_DEBUG_MSG("Creating region from RECT(%ld,%ld,%ld,%ld):", + gc->winInfo.rect.left, + gc->winInfo.rect.top, + gc->winInfo.rect.right, + gc->winInfo.rect.bottom); + gc->winInfo.hrgn = CreateRectRgnIndirect(&gc->winInfo.rect); + GLWIN_DEBUG_MSG2("%p\n", gc->winInfo.hrgn); + }*/ + + if (glWinDebugSettings.enableTrace) + GLWIN_DEBUG_HWND(gc->winInfo.hwnd); + + dc = GetDC(gc->winInfo.hwnd); + /*dc = GetDCEx(gc->winInfo.hwnd, gc->winInfo.hrgn, + DCX_WINDOW | DCX_NORESETATTRS ); */ + + if (dc == NULL) + ErrorF("GetDC error: %s\n", glWinErrorMessage()); + return dc; +} + +static void unattach(__GLcontext *gc) +{ + BOOL ret; + GLWIN_DEBUG_MSG("unattach (ctx %p)\n", gc->ctx); + if (!gc->isAttached) + { + ErrorF("called unattach on an unattached context\n"); + return; + } + + if (gc->ctx) + { + ret = wglDeleteContext(gc->ctx); + if (!ret) + ErrorF("wglDeleteContext error: %s\n", glWinErrorMessage()); + gc->ctx = NULL; + } + + if (gc->winInfo.hrgn) + { + ret = DeleteObject(gc->winInfo.hrgn); + if (!ret) + ErrorF("DeleteObject error: %s\n", glWinErrorMessage()); + gc->winInfo.hrgn = NULL; + } + + gc->isAttached = 0; +} + +static BOOL glWinAdjustHWND(__GLcontext *gc, WindowPtr pWin) +{ + HDC dc; + BOOL ret; + HGLRC newctx; + HWND oldhwnd; + + GLWIN_DEBUG_MSG("glWinAdjustHWND (ctx %p, pWin %p)\n", gc->ctx, pWin); + + if (pWin == NULL) + { + GLWIN_DEBUG_MSG("Deferring until window is created\n"); + return FALSE; + } + + oldhwnd = gc->winInfo.hwnd; + winGetWindowInfo(pWin, &gc->winInfo); + + GLWIN_DEBUG_HWND(gc->winInfo.hwnd); + if (gc->winInfo.hwnd == NULL) + { + GLWIN_DEBUG_MSG("Deferring until window is created\n"); + return FALSE; + } + + dc = glWinMakeDC(gc); + + if (glWinDebugSettings.dumpDC) + GLWIN_DEBUG_MSG("Got HDC %p\n", dc); + + gc->pixelFormat = ChoosePixelFormat(dc, &gc->pfd); + if (gc->pixelFormat == 0) + { + ErrorF("ChoosePixelFormat error: %s\n", glWinErrorMessage()); + ReleaseDC(gc->winInfo.hwnd, dc); + return FALSE; + } + + ret = SetPixelFormat(dc, gc->pixelFormat, &gc->pfd); + if (!ret) { + ErrorF("SetPixelFormat error: %s\n", glWinErrorMessage()); + ReleaseDC(gc->winInfo.hwnd, dc); + return FALSE; + } + + newctx = wglCreateContext(dc); + if (newctx == NULL) { + ErrorF("wglCreateContext error: %s\n", glWinErrorMessage()); + ReleaseDC(gc->winInfo.hwnd, dc); + return FALSE; + } + + GLWIN_DEBUG_MSG("wglCreateContext (ctx %p)\n", newctx); + + if (!wglShareLists(gc->ctx, newctx)) + { + ErrorF("wglShareLists error: %s\n", glWinErrorMessage()); + ReleaseDC(gc->winInfo.hwnd, dc); + return FALSE; + } + + if (oldhwnd != gc->winInfo.hwnd) + { + GLWIN_DEBUG_MSG("Trying wglCopyContext\n"); + if (!wglCopyContext(gc->ctx, newctx, GL_ALL_ATTRIB_BITS)) + { + ErrorF("wglCopyContext error: %s\n", glWinErrorMessage()); + ReleaseDC(gc->winInfo.hwnd, dc); + return FALSE; + } + } + + if (!wglDeleteContext(gc->ctx)) + { + ErrorF("wglDeleteContext error: %s\n", glWinErrorMessage()); + } + + gc->ctx = newctx; + + if (!wglMakeCurrent(dc, gc->ctx)) { + ErrorF("glMakeCurrent error: %s\n", glWinErrorMessage()); + ReleaseDC(gc->winInfo.hwnd, dc); + return FALSE; + } + + ReleaseDC(gc->winInfo.hwnd, dc); + + return TRUE; +} + +static BOOL glWinCreateContextReal(__GLcontext *gc, WindowPtr pWin) +{ + HDC dc; + BOOL ret; + + GLWIN_DEBUG_MSG("glWinCreateContextReal (pWin %p)\n", pWin); + + if (pWin == NULL) + { + GLWIN_DEBUG_MSG("Deferring until window is created\n"); + return FALSE; + } + + winGetWindowInfo(pWin, &gc->winInfo); + + GLWIN_DEBUG_HWND(gc->winInfo.hwnd); + if (gc->winInfo.hwnd == NULL) + { + GLWIN_DEBUG_MSG("Deferring until window is created\n"); + return FALSE; + } + + + dc = glWinMakeDC(gc); + + if (glWinDebugSettings.dumpDC) + GLWIN_DEBUG_MSG("Got HDC %p\n", dc); + + gc->pixelFormat = ChoosePixelFormat(dc, &gc->pfd); + if (gc->pixelFormat == 0) + { + ErrorF("ChoosePixelFormat error: %s\n", glWinErrorMessage()); + ReleaseDC(gc->winInfo.hwnd, dc); + return FALSE; + } + + ret = SetPixelFormat(dc, gc->pixelFormat, &gc->pfd); + if (!ret) { + ErrorF("SetPixelFormat error: %s\n", glWinErrorMessage()); + ReleaseDC(gc->winInfo.hwnd, dc); + return FALSE; + } + + gc->ctx = wglCreateContext(dc); + if (gc->ctx == NULL) { + ErrorF("wglCreateContext error: %s\n", glWinErrorMessage()); + ReleaseDC(gc->winInfo.hwnd, dc); + return FALSE; + } + + GLWIN_DEBUG_MSG("glWinCreateContextReal (ctx %p)\n", gc->ctx); + + if (!wglMakeCurrent(dc, gc->ctx)) { + ErrorF("glMakeCurrent error: %s\n", glWinErrorMessage()); + ReleaseDC(gc->winInfo.hwnd, dc); + return FALSE; + } + + ReleaseDC(gc->winInfo.hwnd, dc); + + return TRUE; +} + +static void attach(__GLcontext *gc, __GLdrawablePrivate *glPriv) +{ + __GLXdrawablePrivate *glxPriv = (__GLXdrawablePrivate *)glPriv->other; + + GLWIN_DEBUG_MSG("attach (ctx %p)\n", gc->ctx); + + if (gc->isAttached) + { + ErrorF("called attach on an attached context\n"); + return; + } + + if (glxPriv->type == DRAWABLE_WINDOW) + { + WindowPtr pWin = (WindowPtr) glxPriv->pDraw; + if (pWin == NULL) + { + GLWIN_DEBUG_MSG("Deferring ChoosePixelFormat until window is created\n"); + } else + { + if (glWinCreateContextReal(gc, pWin)) + { + gc->isAttached = TRUE; + GLWIN_DEBUG_MSG("attached\n"); + } + } + } +} + +static GLboolean glWinLoseCurrent(__GLcontext *gc) +{ + GLWIN_TRACE_MSG("glWinLoseCurrent (ctx %p)\n", gc->ctx); + + __glXLastContext = NULL; /* Mesa does this; why? */ + + return GL_TRUE; +} + +/* Context manipulation; return GL_FALSE on failure */ +static GLboolean glWinDestroyContext(__GLcontext *gc) +{ + GLWIN_DEBUG_MSG("glWinDestroyContext (ctx %p)\n", gc->ctx); + + if (gc != NULL) + { + if (gc->isAttached) + unattach(gc); + if (gc->dc != NULL) + DeleteDC(gc->dc); + free(gc); + } + + return GL_TRUE; +} + +static GLboolean glWinMakeCurrent(__GLcontext *gc) +{ + __GLdrawablePrivate *glPriv = gc->interface.imports.getDrawablePrivate(gc); + BOOL ret; + HDC dc; + + GLWIN_TRACE_MSG(" (ctx %p)\n", gc->ctx); + + if (!gc->isAttached) + attach(gc, glPriv); + + if (gc->ctx == NULL) { + ErrorF("Context is NULL\n"); + return GL_FALSE; + } + + dc = glWinMakeDC(gc); + ret = wglMakeCurrent(dc, gc->ctx); + if (!ret) + ErrorF("glMakeCurrent error: %s\n", glWinErrorMessage()); + ReleaseDC(gc->winInfo.hwnd, dc); + + return ret?GL_TRUE:GL_FALSE; +} + +static GLboolean glWinShareContext(__GLcontext *gc, __GLcontext *gcShare) +{ + GLWIN_DEBUG_MSG("glWinShareContext unimplemented\n"); + + return GL_TRUE; +} + +static GLboolean glWinCopyContext(__GLcontext *dst, const __GLcontext *src, + GLuint mask) +{ + BOOL ret; + + GLWIN_DEBUG_MSG("glWinCopyContext\n"); + + ret = wglCopyContext(src->ctx, dst->ctx, mask); + if (!ret) + { + ErrorF("wglCopyContext error: %s\n", glWinErrorMessage()); + return GL_FALSE; + } + + return GL_TRUE; +} + +static GLboolean glWinForceCurrent(__GLcontext *gc) +{ + GLWIN_TRACE_MSG(" (ctx %p)\n", gc->ctx); + + return GL_TRUE; +} + +/* Drawing surface notification callbacks */ + +static GLboolean glWinNotifyResize(__GLcontext *gc) +{ + GLWIN_DEBUG_MSG("unimplemented glWinNotifyResize"); + return GL_TRUE; +} + +static void glWinNotifyDestroy(__GLcontext *gc) +{ + GLWIN_DEBUG_MSG("unimplemented glWinNotifyDestroy"); +} + +static void glWinNotifySwapBuffers(__GLcontext *gc) +{ + GLWIN_DEBUG_MSG("unimplemented glWinNotifySwapBuffers"); +} + +/* Dispatch table override control for external agents like libGLS */ +static struct __GLdispatchStateRec* glWinDispatchExec(__GLcontext *gc) +{ + GLWIN_DEBUG_MSG("unimplemented glWinDispatchExec"); + return NULL; +} + +static void glWinBeginDispatchOverride(__GLcontext *gc) +{ + GLWIN_DEBUG_MSG("unimplemented glWinBeginDispatchOverride"); +} + +static void glWinEndDispatchOverride(__GLcontext *gc) +{ + GLWIN_DEBUG_MSG("unimplemented glWinEndDispatchOverride"); +} + +#define DUMP_PFD_FLAG(flag) \ + if (pfd->dwFlags & flag) { \ + ErrorF("%s%s", pipesym, #flag); \ + pipesym = " | "; \ + } + +static void pfdOut(const PIXELFORMATDESCRIPTOR *pfd) +{ + const char *pipesym = ""; /* will be set after first flag dump */ + ErrorF("PIXELFORMATDESCRIPTOR:\n"); + ErrorF("nSize = %u\n", pfd->nSize); + ErrorF("nVersion = %u\n", pfd->nVersion); + ErrorF("dwFlags = %lu = {", pfd->dwFlags); + DUMP_PFD_FLAG(PFD_MAIN_PLANE); + DUMP_PFD_FLAG(PFD_OVERLAY_PLANE); + DUMP_PFD_FLAG(PFD_UNDERLAY_PLANE); + DUMP_PFD_FLAG(PFD_DOUBLEBUFFER); + DUMP_PFD_FLAG(PFD_STEREO); + DUMP_PFD_FLAG(PFD_DRAW_TO_WINDOW); + DUMP_PFD_FLAG(PFD_DRAW_TO_BITMAP); + DUMP_PFD_FLAG(PFD_SUPPORT_GDI); + DUMP_PFD_FLAG(PFD_SUPPORT_OPENGL); + DUMP_PFD_FLAG(PFD_GENERIC_FORMAT); + DUMP_PFD_FLAG(PFD_NEED_PALETTE); + DUMP_PFD_FLAG(PFD_NEED_SYSTEM_PALETTE); + DUMP_PFD_FLAG(PFD_SWAP_EXCHANGE); + DUMP_PFD_FLAG(PFD_SWAP_COPY); + DUMP_PFD_FLAG(PFD_SWAP_LAYER_BUFFERS); + DUMP_PFD_FLAG(PFD_GENERIC_ACCELERATED); + DUMP_PFD_FLAG(PFD_DEPTH_DONTCARE); + DUMP_PFD_FLAG(PFD_DOUBLEBUFFER_DONTCARE); + DUMP_PFD_FLAG(PFD_STEREO_DONTCARE); + ErrorF("}\n"); + + ErrorF("iPixelType = %hu = %s\n", pfd->iPixelType, + (pfd->iPixelType == PFD_TYPE_RGBA ? "PFD_TYPE_RGBA" : "PFD_TYPE_COLORINDEX")); + ErrorF("cColorBits = %hhu\n", pfd->cColorBits); + ErrorF("cRedBits = %hhu\n", pfd->cRedBits); + ErrorF("cRedShift = %hhu\n", pfd->cRedShift); + ErrorF("cGreenBits = %hhu\n", pfd->cGreenBits); + ErrorF("cGreenShift = %hhu\n", pfd->cGreenShift); + ErrorF("cBlueBits = %hhu\n", pfd->cBlueBits); + ErrorF("cBlueShift = %hhu\n", pfd->cBlueShift); + ErrorF("cAlphaBits = %hhu\n", pfd->cAlphaBits); + ErrorF("cAlphaShift = %hhu\n", pfd->cAlphaShift); + ErrorF("cAccumBits = %hhu\n", pfd->cAccumBits); + ErrorF("cAccumRedBits = %hhu\n", pfd->cAccumRedBits); + ErrorF("cAccumGreenBits = %hhu\n", pfd->cAccumGreenBits); + ErrorF("cAccumBlueBits = %hhu\n", pfd->cAccumBlueBits); + ErrorF("cAccumAlphaBits = %hhu\n", pfd->cAccumAlphaBits); + ErrorF("cDepthBits = %hhu\n", pfd->cDepthBits); + ErrorF("cStencilBits = %hhu\n", pfd->cStencilBits); + ErrorF("cAuxBuffers = %hhu\n", pfd->cAuxBuffers); + ErrorF("iLayerType = %hhu\n", pfd->iLayerType); + ErrorF("bReserved = %hhu\n", pfd->bReserved); + ErrorF("dwLayerMask = %lu\n", pfd->dwLayerMask); + ErrorF("dwVisibleMask = %lu\n", pfd->dwVisibleMask); + ErrorF("dwDamageMask = %lu\n", pfd->dwDamageMask); + ErrorF("\n"); +} + +static int makeFormat(__GLcontextModes *mode, PIXELFORMATDESCRIPTOR *pfdret) +{ + PIXELFORMATDESCRIPTOR pfd = { + sizeof(PIXELFORMATDESCRIPTOR), /* size of this pfd */ + 1, /* version number */ + PFD_DRAW_TO_WINDOW | /* support window */ + PFD_SUPPORT_OPENGL, /* support OpenGL */ + PFD_TYPE_RGBA, /* RGBA type */ + 24, /* 24-bit color depth */ + 0, 0, 0, 0, 0, 0, /* color bits ignored */ + 0, /* no alpha buffer */ + 0, /* shift bit ignored */ + 0, /* no accumulation buffer */ + 0, 0, 0, 0, /* accum bits ignored */ + 0, /* 32-bit z-buffer */ + 0, /* no stencil buffer */ + 0, /* no auxiliary buffer */ + PFD_MAIN_PLANE, /* main layer */ + 0, /* reserved */ + 0, 0, 0 /* layer masks ignored */ + }, *result = &pfd; + + /* disable anything but rgba. must get rgba to work first */ + if (!mode->rgbMode) + return -1; + + if (mode->stereoMode) { + result->dwFlags |= PFD_STEREO; + } + if (mode->doubleBufferMode) { + result->dwFlags |= PFD_DOUBLEBUFFER; + } + + if (mode->colorIndexMode) { + /* ignored, see above */ + result->iPixelType = PFD_TYPE_COLORINDEX; + result->cColorBits = mode->redBits + mode->greenBits + mode->blueBits; + result->cRedBits = mode->redBits; + result->cRedShift = 0; /* FIXME */ + result->cGreenBits = mode->greenBits; + result->cGreenShift = 0; /* FIXME */ + result->cBlueBits = mode->blueBits; + result->cBlueShift = 0; /* FIXME */ + result->cAlphaBits = mode->alphaBits; + result->cAlphaShift = 0; /* FIXME */ + } + + if (mode->rgbMode) { + result->iPixelType = PFD_TYPE_RGBA; + result->cColorBits = mode->redBits + mode->greenBits + mode->blueBits; + result->cRedBits = mode->redBits; + result->cRedShift = 0; /* FIXME */ + result->cGreenBits = mode->greenBits; + result->cGreenShift = 0; /* FIXME */ + result->cBlueBits = mode->blueBits; + result->cBlueShift = 0; /* FIXME */ + result->cAlphaBits = mode->alphaBits; + result->cAlphaShift = 0; /* FIXME */ + } + + if (mode->haveAccumBuffer) { + result->cAccumBits = mode->accumRedBits + mode->accumGreenBits + + mode->accumBlueBits + mode->accumAlphaBits; + result->cAccumRedBits = mode->accumRedBits; + result->cAccumGreenBits = mode->accumGreenBits; + result->cAccumBlueBits = mode->accumBlueBits; + result->cAccumAlphaBits = mode->accumAlphaBits; + } + + if (mode->haveDepthBuffer) { + result->cDepthBits = mode->depthBits; + } + if (mode->haveStencilBuffer) { + result->cStencilBits = mode->stencilBits; + } + + /* result->cAuxBuffers = mode->numAuxBuffers; */ + + /* mode->level ignored */ + + /* mode->pixmapMode ? */ + + *pfdret = pfd; + + return 0; +} + +static __GLinterface *glWinCreateContext(__GLimports *imports, + __GLcontextModes *mode, + __GLinterface *shareGC) +{ + __GLcontext *result; + + GLWIN_DEBUG_MSG("glWinCreateContext\n"); + + result = (__GLcontext *)calloc(1, sizeof(__GLcontext)); + if (!result) + return NULL; + + result->interface.imports = *imports; + result->interface.exports = glWinExports; + + if (makeFormat(mode, &result->pfd)) + { + ErrorF("makeFormat failed\n"); + free(result); + return NULL; + } + + if (glWinDebugSettings.dumpPFD) + pfdOut(&result->pfd); + + GLWIN_DEBUG_MSG("glWinCreateContext done\n"); + return (__GLinterface *)result; +} + +Bool +glWinRealizeWindow(WindowPtr pWin) +{ + /* If this window has GL contexts, tell them to reattach */ + /* reattaching is bad: display lists and parameters get lost */ + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + glWinScreenRec *screenPriv = &glWinScreens[pScreen->myNum]; + __GLXdrawablePrivate *glxPriv; + + GLWIN_DEBUG_MSG("glWinRealizeWindow\n"); + + /* Allow the window to be created (RootlessRealizeWindow is inside our wrap) */ + pScreen->RealizeWindow = screenPriv->RealizeWindow; + result = pScreen->RealizeWindow(pWin); + pScreen->RealizeWindow = glWinRealizeWindow; + + /* Re-attach this window's GL contexts, if any. */ + glxPriv = __glXFindDrawablePrivate(pWin->drawable.id); + if (glxPriv) { + __GLXcontext *gx; + __GLcontext *gc; + __GLdrawablePrivate *glPriv = &glxPriv->glPriv; + GLWIN_DEBUG_MSG("glWinRealizeWindow is GL drawable!\n"); + + /* GL contexts bound to this window for drawing */ + for (gx = glxPriv->drawGlxc; gx != NULL; gx = gx->next) { + gc = (__GLcontext *)gx->gc; + if (gc->isAttached) +#if 1 + { + GLWIN_DEBUG_MSG("context is already bound! Adjusting HWND.\n"); + glWinAdjustHWND(gc, pWin); + continue; + } +#else + unattach(gc); +#endif + attach(gc, glPriv); + } + + /* GL contexts bound to this window for reading */ + for (gx = glxPriv->readGlxc; gx != NULL; gx = gx->next) { + gc = (__GLcontext *)gx->gc; + if (gc->isAttached) +#if 1 + { + GLWIN_DEBUG_MSG("context is already bound! Adjusting HWND.\n"); + glWinAdjustHWND(gc, pWin); + continue; + } +#else + unattach(gc); +#endif + attach(gc, glPriv); + } + } + + return result; +} + + +void +glWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWindow->drawable.pScreen; + glWinScreenRec *screenPriv = &glWinScreens[pScreen->myNum]; + __GLXdrawablePrivate *glxPriv; + + GLWIN_TRACE_MSG(" (pWindow %p)\n", pWindow); + + /* Check if the window is attached and discard any drawing request */ + glxPriv = __glXFindDrawablePrivate(pWindow->drawable.id); + if (glxPriv) { + __GLXcontext *gx; + + /* GL contexts bound to this window for drawing */ + for (gx = glxPriv->drawGlxc; gx != NULL; gx = gx->next) { +/* + GLWIN_DEBUG_MSG("glWinCopyWindow - calling glDrawBuffer\n"); + glDrawBuffer(GL_FRONT); + */ + + return; + } + + /* GL contexts bound to this window for reading */ + for (gx = glxPriv->readGlxc; gx != NULL; gx = gx->next) { + return; + } + } + + GLWIN_DEBUG_MSG("glWinCopyWindow - passing to hw layer\n"); + + pScreen->CopyWindow = screenPriv->CopyWindow; + pScreen->CopyWindow(pWindow, ptOldOrg, prgnSrc); + pScreen->CopyWindow = glWinCopyWindow; +} + +Bool +glWinUnrealizeWindow(WindowPtr pWin) +{ + /* If this window has GL contexts, tell them to unattach */ + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + glWinScreenRec *screenPriv = &glWinScreens[pScreen->myNum]; + __GLXdrawablePrivate *glxPriv; + + GLWIN_DEBUG_MSG("glWinUnrealizeWindow\n"); + + /* The Aqua window may have already been destroyed (windows + * are unrealized from top down) + */ + + /* Unattach this window's GL contexts, if any. */ + glxPriv = __glXFindDrawablePrivate(pWin->drawable.id); + if (glxPriv) { + __GLXcontext *gx; + __GLcontext *gc; + GLWIN_DEBUG_MSG("glWinUnealizeWindow is GL drawable!\n"); + + /* GL contexts bound to this window for drawing */ + for (gx = glxPriv->drawGlxc; gx != NULL; gx = gx->next) { + gc = (__GLcontext *)gx->gc; + unattach(gc); + } + + /* GL contexts bound to this window for reading */ + for (gx = glxPriv->readGlxc; gx != NULL; gx = gx->next) { + gc = (__GLcontext *)gx->gc; + unattach(gc); + } + } + + pScreen->UnrealizeWindow = screenPriv->UnrealizeWindow; + result = pScreen->UnrealizeWindow(pWin); + pScreen->UnrealizeWindow = glWinUnrealizeWindow; + + return result; +} + + +/* + * In the case the driver has no GLX visuals we'll use these. + * [0] = RGB, double buffered + * [1] = RGB, double buffered, stencil, accum + */ +/* Originally copied from Mesa */ + +static int numConfigs = 0; +static __GLXvisualConfig *visualConfigs = NULL; +static void **visualPrivates = NULL; + +#define NUM_FALLBACK_CONFIGS 2 +static __GLXvisualConfig FallbackConfigs[NUM_FALLBACK_CONFIGS] = { + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 0, /* rgba sizes */ + -1, -1, -1, 0, /* rgba masks */ + 0, 0, 0, 0, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 0, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE_EXT, /* visualRating */ + 0, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 0, /* rgba sizes */ + -1, -1, -1, 0, /* rgba masks */ + 16, 16, 16, 0, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 8, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE_EXT, /* visualRating */ + 0, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + } +}; + +static __GLXvisualConfig NullConfig = { + -1, /* vid */ + -1, /* class */ + False, /* rgba */ + -1, -1, -1, 0, /* rgba sizes */ + -1, -1, -1, 0, /* rgba masks */ + 0, 0, 0, 0, /* rgba accum sizes */ + False, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 0, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE_EXT, /* visualRating */ + 0, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ +}; + +static inline int count_bits(uint32_t x) +{ + x = x - ((x >> 1) & 0x55555555); + x = (x & 0x33333333) + ((x >> 2) & 0x33333333); + x = (x + (x >> 4)) & 0x0f0f0f0f; + x = x + (x >> 8); + x = x + (x >> 16); + return x & 63; +} + +/* Mostly copied from Mesa's xf86glx.c */ +static Bool init_visuals(int *nvisualp, VisualPtr *visualp, + VisualID *defaultVisp, + int ndepth, DepthPtr pdepth, + int rootDepth) +{ + int numRGBconfigs; + int numCIconfigs; + int numVisuals = *nvisualp; + int numNewVisuals; + int numNewConfigs; + VisualPtr pVisual = *visualp; + VisualPtr pVisualNew = NULL; + VisualID *orig_vid = NULL; + __GLcontextModes *modes = NULL; + __GLXvisualConfig *pNewVisualConfigs = NULL; + void **glXVisualPriv; + void **pNewVisualPriv; + int found_default; + int i, j, k; + + GLWIN_DEBUG_MSG("init_visuals\n"); + + if (numConfigs > 0) + numNewConfigs = numConfigs; + else + numNewConfigs = NUM_FALLBACK_CONFIGS; + + /* Alloc space for the list of new GLX visuals */ + pNewVisualConfigs = (__GLXvisualConfig *) + __glXMalloc(numNewConfigs * sizeof(__GLXvisualConfig)); + if (!pNewVisualConfigs) { + return FALSE; + } + + /* Alloc space for the list of new GLX visual privates */ + pNewVisualPriv = (void **) __glXMalloc(numNewConfigs * sizeof(void *)); + if (!pNewVisualPriv) { + __glXFree(pNewVisualConfigs); + return FALSE; + } + + /* + ** If SetVisualConfigs was not called, then use default GLX + ** visual configs. + */ + if (numConfigs == 0) { + memcpy(pNewVisualConfigs, FallbackConfigs, + NUM_FALLBACK_CONFIGS * sizeof(__GLXvisualConfig)); + memset(pNewVisualPriv, 0, NUM_FALLBACK_CONFIGS * sizeof(void *)); + } + else { + /* copy driver's visual config info */ + for (i = 0; i < numConfigs; i++) { + pNewVisualConfigs[i] = visualConfigs[i]; + pNewVisualPriv[i] = visualPrivates[i]; + } + } + + /* Count the number of RGB and CI visual configs */ + numRGBconfigs = 0; + numCIconfigs = 0; + for (i = 0; i < numNewConfigs; i++) { + if (pNewVisualConfigs[i].rgba) + numRGBconfigs++; + else + numCIconfigs++; + } + + /* Count the total number of visuals to compute */ + numNewVisuals = 0; + for (i = 0; i < numVisuals; i++) { + int count; + + count = ((pVisual[i].class == TrueColor + || pVisual[i].class == DirectColor) + ? numRGBconfigs : numCIconfigs); + if (count == 0) + count = 1; /* preserve the existing visual */ + + numNewVisuals += count; + } + + /* Reset variables for use with the next screen/driver's visual configs */ + visualConfigs = NULL; + numConfigs = 0; + + /* Alloc temp space for the list of orig VisualIDs for each new visual */ + orig_vid = (VisualID *)__glXMalloc(numNewVisuals * sizeof(VisualID)); + if (!orig_vid) { + __glXFree(pNewVisualPriv); + __glXFree(pNewVisualConfigs); + return FALSE; + } + + /* Alloc space for the list of glXVisuals */ + modes = _gl_context_modes_create(numNewVisuals, sizeof(__GLcontextModes)); + if (modes == NULL) { + __glXFree(orig_vid); + __glXFree(pNewVisualPriv); + __glXFree(pNewVisualConfigs); + return FALSE; + } + + /* Alloc space for the list of glXVisualPrivates */ + glXVisualPriv = (void **)__glXMalloc(numNewVisuals * sizeof(void *)); + if (!glXVisualPriv) { + _gl_context_modes_destroy( modes ); + __glXFree(orig_vid); + __glXFree(pNewVisualPriv); + __glXFree(pNewVisualConfigs); + return FALSE; + } + + /* Alloc space for the new list of the X server's visuals */ + pVisualNew = (VisualPtr)__glXMalloc(numNewVisuals * sizeof(VisualRec)); + if (!pVisualNew) { + __glXFree(glXVisualPriv); + _gl_context_modes_destroy( modes ); + __glXFree(orig_vid); + __glXFree(pNewVisualPriv); + __glXFree(pNewVisualConfigs); + return FALSE; + } + + /* Initialize the new visuals */ + found_default = FALSE; + glWinScreens[screenInfo.numScreens-1].modes = modes; + for (i = j = 0; i < numVisuals; i++) { + int is_rgb = (pVisual[i].class == TrueColor || + pVisual[i].class == DirectColor); + + if (!is_rgb) + { + /* We don't support non-rgb visuals for GL. But we don't + want to remove them either, so just pass them through + with null glX configs */ + + pVisualNew[j] = pVisual[i]; + pVisualNew[j].vid = FakeClientID(0); + + /* Check for the default visual */ + if (!found_default && pVisual[i].vid == *defaultVisp) { + *defaultVisp = pVisualNew[j].vid; + found_default = TRUE; + } + + /* Save the old VisualID */ + orig_vid[j] = pVisual[i].vid; + + /* Initialize the glXVisual */ + _gl_copy_visual_to_context_mode( modes, & NullConfig ); + modes->visualID = pVisualNew[j].vid; + + j++; + + continue; + } + + for (k = 0; k < numNewConfigs; k++) { + if (pNewVisualConfigs[k].rgba != is_rgb) + continue; + + assert( modes != NULL ); + + /* Initialize the new visual */ + pVisualNew[j] = pVisual[i]; + pVisualNew[j].vid = FakeClientID(0); + + /* Check for the default visual */ + if (!found_default && pVisual[i].vid == *defaultVisp) { + *defaultVisp = pVisualNew[j].vid; + found_default = TRUE; + } + + /* Save the old VisualID */ + orig_vid[j] = pVisual[i].vid; + + /* Initialize the glXVisual */ + _gl_copy_visual_to_context_mode( modes, & pNewVisualConfigs[k] ); + modes->visualID = pVisualNew[j].vid; + + /* + * If the class is -1, then assume the X visual information + * is identical to what GLX needs, and take them from the X + * visual. NOTE: if class != -1, then all other fields MUST + * be initialized. + */ + if (modes->visualType == GLX_NONE) { + modes->visualType = _gl_convert_from_x_visual_type( pVisual[i].class ); + modes->redBits = count_bits(pVisual[i].redMask); + modes->greenBits = count_bits(pVisual[i].greenMask); + modes->blueBits = count_bits(pVisual[i].blueMask); + modes->alphaBits = modes->alphaBits; + modes->redMask = pVisual[i].redMask; + modes->greenMask = pVisual[i].greenMask; + modes->blueMask = pVisual[i].blueMask; + modes->alphaMask = modes->alphaMask; + modes->rgbBits = (is_rgb) + ? (modes->redBits + modes->greenBits + + modes->blueBits + modes->alphaBits) + : rootDepth; + } + + /* Save the device-dependent private for this visual */ + glXVisualPriv[j] = pNewVisualPriv[k]; + + j++; + modes = modes->next; + } + } + + assert(j <= numNewVisuals); + + /* Save the GLX visuals in the screen structure */ + glWinScreens[screenInfo.numScreens-1].num_vis = numNewVisuals; + glWinScreens[screenInfo.numScreens-1].priv = glXVisualPriv; + + /* Set up depth's VisualIDs */ + for (i = 0; i < ndepth; i++) { + int numVids = 0; + VisualID *pVids = NULL; + int k, n = 0; + + /* Count the new number of VisualIDs at this depth */ + for (j = 0; j < pdepth[i].numVids; j++) + for (k = 0; k < numNewVisuals; k++) + if (pdepth[i].vids[j] == orig_vid[k]) + numVids++; + + /* Allocate a new list of VisualIDs for this depth */ + pVids = (VisualID *)__glXMalloc(numVids * sizeof(VisualID)); + + /* Initialize the new list of VisualIDs for this depth */ + for (j = 0; j < pdepth[i].numVids; j++) + for (k = 0; k < numNewVisuals; k++) + if (pdepth[i].vids[j] == orig_vid[k]) + pVids[n++] = pVisualNew[k].vid; + + /* Update this depth's list of VisualIDs */ + __glXFree(pdepth[i].vids); + pdepth[i].vids = pVids; + pdepth[i].numVids = numVids; + } + + /* Update the X server's visuals */ + *nvisualp = numNewVisuals; + *visualp = pVisualNew; + + /* Free the old list of the X server's visuals */ + __glXFree(pVisual); + + /* Clean up temporary allocations */ + __glXFree(orig_vid); + __glXFree(pNewVisualPriv); + __glXFree(pNewVisualConfigs); + + /* Free the private list created by DDX HW driver */ + if (visualPrivates) + xfree(visualPrivates); + visualPrivates = NULL; + + return TRUE; +} + + +static void fixup_visuals(int screen) +{ + ScreenPtr pScreen = screenInfo.screens[screen]; + glWinScreenRec *pScr = &glWinScreens[screen]; + __GLcontextModes *modes; + int j; + + GLWIN_DEBUG_MSG("fixup_visuals\n"); + + for (modes = pScr->modes; modes != NULL; modes = modes->next ) { + const int vis_class = _gl_convert_to_x_visual_type( modes->visualType ); + const int nplanes = (modes->rgbBits - modes->alphaBits); + VisualPtr pVis = pScreen->visuals; + + /* Find a visual that matches the GLX visual's class and size */ + for (j = 0; j < pScreen->numVisuals; j++) { + if (pVis[j].class == vis_class && + pVis[j].nplanes == nplanes) { + + /* Fixup the masks */ + modes->redMask = pVis[j].redMask; + modes->greenMask = pVis[j].greenMask; + modes->blueMask = pVis[j].blueMask; + + /* Recalc the sizes */ + modes->redBits = count_bits(modes->redMask); + modes->greenBits = count_bits(modes->greenMask); + modes->blueBits = count_bits(modes->blueMask); + } + } + } +} + +static void init_screen_visuals(int screen) +{ + ScreenPtr pScreen = screenInfo.screens[screen]; + __GLcontextModes *modes; + int *used; + int i, j; + + GLWIN_DEBUG_MSG("init_screen_visuals\n"); + + used = (int *)__glXMalloc(pScreen->numVisuals * sizeof(int)); + __glXMemset(used, 0, pScreen->numVisuals * sizeof(int)); + + i = 0; + for ( modes = glWinScreens[screen].modes + ; modes != NULL + ; modes = modes->next) { + const int vis_class = _gl_convert_to_x_visual_type( modes->visualType ); + const int nplanes = (modes->rgbBits - modes->alphaBits); + const VisualPtr pVis = pScreen->visuals; + + for (j = 0; j < pScreen->numVisuals; j++) { + + if (pVis[j].class == vis_class && + pVis[j].nplanes == nplanes && + pVis[j].redMask == modes->redMask && + pVis[j].greenMask == modes->greenMask && + pVis[j].blueMask == modes->blueMask && + !used[j]) { + +#if 0 + /* Create the XMesa visual */ + pXMesaVisual[i] = + XMesaCreateVisual(pScreen, + pVis, + modes->rgbMode, + (modes->alphaBits > 0), + modes->doubleBufferMode, + modes->stereoMode, + GL_TRUE, /* ximage_flag */ + modes->depthBits, + modes->stencilBits, + modes->accumRedBits, + modes->accumGreenBits, + modes->accumBlueBits, + modes->accumAlphaBits, + modes->samples, + modes->level, + modes->visualRating); +#endif + + /* Set the VisualID */ + modes->visualID = pVis[j].vid; + + /* Mark this visual used */ + used[j] = 1; + break; + } + } + + if ( j == pScreen->numVisuals ) { + ErrorF("No matching visual for __GLcontextMode with " + "visual class = %d (%d), nplanes = %u\n", + vis_class, + modes->visualType, + (modes->rgbBits - modes->alphaBits) ); + } + else if ( modes->visualID == -1 ) { + FatalError( "Matching visual found, but visualID still -1!\n" ); + } + + i++; + + } + + __glXFree(used); + + /* glWinScreens[screen].xm_vis = pXMesaVisual; */ +} + +static Bool glWinScreenProbe(int screen) +{ + ScreenPtr pScreen; + glWinScreenRec *screenPriv; + + GLWIN_DEBUG_MSG("glWinScreenProbe\n"); + + /* + * Set up the current screen's visuals. + */ + __glDDXScreenInfo.modes = glWinScreens[screen].modes; + __glDDXScreenInfo.pVisualPriv = glWinScreens[screen].priv; + __glDDXScreenInfo.numVisuals = + __glDDXScreenInfo.numUsableVisuals = glWinScreens[screen].num_vis; + + /* + * Set the current screen's createContext routine. This could be + * wrapped by a DDX GLX context creation routine. + */ + __glDDXScreenInfo.createContext = glWinCreateContext; + + /* + * The ordering of the rgb compenents might have been changed by the + * driver after mi initialized them. + */ + fixup_visuals(screen); + + /* + * Find the GLX visuals that are supported by this screen and create + * XMesa's visuals. + */ + init_screen_visuals(screen); + + /* Wrap RealizeWindow and UnrealizeWindow on this screen */ + pScreen = screenInfo.screens[screen]; + screenPriv = &glWinScreens[screen]; + screenPriv->RealizeWindow = pScreen->RealizeWindow; + pScreen->RealizeWindow = glWinRealizeWindow; + screenPriv->UnrealizeWindow = pScreen->UnrealizeWindow; + pScreen->UnrealizeWindow = glWinUnrealizeWindow; + screenPriv->CopyWindow = pScreen->CopyWindow; + pScreen->CopyWindow = glWinCopyWindow; + + return TRUE; +} + +static GLboolean glWinSwapBuffers(__GLXdrawablePrivate *glxPriv) +{ + /* swap buffers on only *one* of the contexts + * (e.g. the last one for drawing) + */ + __GLcontext *gc = (__GLcontext *)glxPriv->drawGlxc->gc; + HDC dc; + BOOL ret; + + GLWIN_TRACE_MSG("glWinSwapBuffers (ctx %p)\n", (gc!=NULL?gc->ctx:NULL)); + + if (gc != NULL && gc->ctx != NULL) + { + dc = glWinMakeDC(gc); + if (dc == NULL) + return GL_FALSE; + + ret = SwapBuffers(dc); + if (!ret) + ErrorF("SwapBuffers failed: %s\n", glWinErrorMessage()); + + ReleaseDC(gc->winInfo.hwnd, dc); + if (!ret) + return GL_FALSE; + } + + return GL_TRUE; +} + +static void glWinDestroyDrawablePrivate(__GLdrawablePrivate *glPriv) +{ + GLWIN_DEBUG_MSG("glWinDestroyDrawablePrivate\n"); + + /* It doesn't work to call DRIDestroySurface here, the drawable's + already gone.. But dri.c notices the window destruction and + frees the surface itself. */ + + free(glPriv->private); + glPriv->private = NULL; +} + + +static void glWinCreateBuffer(__GLXdrawablePrivate *glxPriv) +{ + GLWinDrawableRec *winPriv = malloc(sizeof(GLWinDrawableRec)); + __GLdrawablePrivate *glPriv = &glxPriv->glPriv; + + /*winPriv->sid = 0; */ + winPriv->pDraw = NULL; + + GLWIN_DEBUG_MSG("glWinCreateBuffer\n"); + + /* replace swapBuffers (original is never called) */ + glxPriv->swapBuffers = glWinSwapBuffers; + + /* stash private data */ + glPriv->private = winPriv; + glPriv->freePrivate = glWinDestroyDrawablePrivate; +} + +static void glWinResetExtension(void) +{ + GLWIN_DEBUG_MSG("glWinResetExtension\n"); +} + +/* based on code in apples/indirect.c which is based on i830_dri.c */ +static void +glWinInitVisualConfigs(void) +{ + int lclNumConfigs = 0; + __GLXvisualConfig *lclVisualConfigs = NULL; + void **lclVisualPrivates = NULL; + + int depth, aux, buffers, stencil, accum; + int i = 0; + + GLWIN_DEBUG_MSG("glWinInitVisualConfigs "); + + /* count num configs: + 2 Z buffer (0, 24 bit) + 2 AUX buffer (0, 2) + 2 buffers (single, double) + 2 stencil (0, 8 bit) + 2 accum (0, 64 bit) + = 32 configs */ + + lclNumConfigs = 2 * 2 * 2 * 2 * 2; /* 32 */ + + /* alloc */ + lclVisualConfigs = xcalloc(sizeof(__GLXvisualConfig), lclNumConfigs); + lclVisualPrivates = xcalloc(sizeof(void *), lclNumConfigs); + + /* fill in configs */ + if (NULL != lclVisualConfigs) { + i = 0; /* current buffer */ + for (depth = 0; depth < 2; depth++) { + for (aux = 0; aux < 2; aux++) { + for (buffers = 0; buffers < 2; buffers++) { + for (stencil = 0; stencil < 2; stencil++) { + for (accum = 0; accum < 2; accum++) { + lclVisualConfigs[i].vid = -1; + lclVisualConfigs[i].class = -1; + lclVisualConfigs[i].rgba = TRUE; + lclVisualConfigs[i].redSize = -1; + lclVisualConfigs[i].greenSize = -1; + lclVisualConfigs[i].blueSize = -1; + lclVisualConfigs[i].redMask = -1; + lclVisualConfigs[i].greenMask = -1; + lclVisualConfigs[i].blueMask = -1; + lclVisualConfigs[i].alphaMask = 0; + if (accum) { + lclVisualConfigs[i].accumRedSize = 16; + lclVisualConfigs[i].accumGreenSize = 16; + lclVisualConfigs[i].accumBlueSize = 16; + lclVisualConfigs[i].accumAlphaSize = 16; + } + else { + lclVisualConfigs[i].accumRedSize = 0; + lclVisualConfigs[i].accumGreenSize = 0; + lclVisualConfigs[i].accumBlueSize = 0; + lclVisualConfigs[i].accumAlphaSize = 0; + } + lclVisualConfigs[i].doubleBuffer = buffers ? TRUE : FALSE; + lclVisualConfigs[i].stereo = FALSE; + lclVisualConfigs[i].bufferSize = -1; + + lclVisualConfigs[i].depthSize = depth? 24 : 0; + lclVisualConfigs[i].stencilSize = stencil ? 8 : 0; + lclVisualConfigs[i].auxBuffers = aux ? 2 : 0; + lclVisualConfigs[i].level = 0; + lclVisualConfigs[i].visualRating = GLX_NONE_EXT; + lclVisualConfigs[i].transparentPixel = 0; + lclVisualConfigs[i].transparentRed = 0; + lclVisualConfigs[i].transparentGreen = 0; + lclVisualConfigs[i].transparentBlue = 0; + lclVisualConfigs[i].transparentAlpha = 0; + lclVisualConfigs[i].transparentIndex = 0; + i++; + } + } + } + } + } + } + if (i != lclNumConfigs) + GLWIN_DEBUG_MSG("glWinInitVisualConfigs failed to alloc visual configs"); + + GlxSetVisualConfigs(lclNumConfigs, lclVisualConfigs, lclVisualPrivates); +} + +/* Copied from Mesa */ +static void glWinSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs, + void **privates) +{ + GLWIN_DEBUG_MSG("glWinSetVisualConfigs\n"); + + numConfigs = nconfigs; + visualConfigs = configs; + visualPrivates = privates; +} + +/* Copied from Mesa */ +static Bool glWinInitVisuals(VisualPtr *visualp, DepthPtr *depthp, + int *nvisualp, int *ndepthp, + int *rootDepthp, VisualID *defaultVisp, + unsigned long sizes, int bitsPerRGB) +{ + glWinInitDebugSettings(); + + GLWIN_DEBUG_MSG("glWinInitVisuals\n"); + + if (0 == numConfigs) /* if no configs */ + glWinInitVisualConfigs(); /* ensure the visula configs are setup */ + + /* + * Setup the visuals supported by this particular screen. + */ + return init_visuals(nvisualp, visualp, defaultVisp, + *ndepthp, *depthp, *rootDepthp); +} diff --git a/xorg-server-1.4/Makefile.am b/xorg-server-1.4/Makefile.am new file mode 100644 index 0000000..e382d58 --- /dev/null +++ b/xorg-server-1.4/Makefile.am @@ -0,0 +1,109 @@ +AUTOMAKE_OPTIONS=dist-bzip2 foreign nostdinc +DISTCHECK_CONFIGURE_FLAGS=--disable-xorgcfg + +if COMPOSITE +COMPOSITE_DIR=composite +endif + +if XTRAP +XTRAP_DIR=XTrap +endif + +if CFB +CFB_DIR=cfb +CFB32_DIR=cfb32 +endif + +if AFB +AFB_DIR=afb +endif + +if MFB +MFB_DIR=mfb +endif + +if GLX +GLX_DIR=GL +endif + +if DBE +DBE_DIR=dbe +endif + +SUBDIRS = \ + doc \ + include \ + dix \ + fb \ + mi \ + Xext \ + miext \ + os \ + randr \ + render \ + Xi \ + xkb \ + $(DBE_DIR) \ + $(MFB_DIR) \ + $(AFB_DIR) \ + $(CFB_DIR) \ + $(CFB32_DIR) \ + record \ + xfixes \ + damageext \ + $(XTRAP_DIR) \ + $(COMPOSITE_DIR) \ + $(GLX_DIR) \ + exa \ + config \ + hw + +aclocaldir = $(datadir)/aclocal +aclocal_DATA = xorg-server.m4 + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = xorg-server.pc + +EXTRA_DIST = xorg-server.pc.in xorg-server.m4 ChangeLog autogen.sh + +MAINTAINERCLEANFILES=ChangeLog + +.PHONY: ChangeLog + +ChangeLog: + (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || \ + (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + +dist-hook: ChangeLog + +DIST_SUBDIRS = \ + doc \ + include \ + dix \ + fb \ + mi \ + Xext \ + miext \ + os \ + randr \ + render \ + Xi \ + xkb \ + dbe \ + mfb \ + afb \ + cfb \ + cfb32 \ + record \ + xfixes \ + damageext \ + XTrap \ + composite \ + GL \ + exa \ + config \ + hw + +# gross hack +relink: all + $(MAKE) -C hw relink diff --git a/xorg-server-1.4/Makefile.in b/xorg-server-1.4/Makefile.in new file mode 100644 index 0000000..f21584e --- /dev/null +++ b/xorg-server-1.4/Makefile.in @@ -0,0 +1,932 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/xorg-server.pc.in \ + $(top_srcdir)/configure COPYING ChangeLog config.guess \ + config.sub depcomp install-sh ltmain.sh missing ylwrap +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = xorg-server.pc +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(aclocaldir)" \ + "$(DESTDIR)$(pkgconfigdir)" +aclocalDATA_INSTALL = $(INSTALL_DATA) +pkgconfigDATA_INSTALL = $(INSTALL_DATA) +DATA = $(aclocal_DATA) $(pkgconfig_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +AUTOMAKE_OPTIONS = dist-bzip2 foreign nostdinc +DISTCHECK_CONFIGURE_FLAGS = --disable-xorgcfg +@COMPOSITE_TRUE@COMPOSITE_DIR = composite +@XTRAP_TRUE@XTRAP_DIR = XTrap +@CFB_TRUE@CFB_DIR = cfb +@CFB_TRUE@CFB32_DIR = cfb32 +@AFB_TRUE@AFB_DIR = afb +@MFB_TRUE@MFB_DIR = mfb +@GLX_TRUE@GLX_DIR = GL +@DBE_TRUE@DBE_DIR = dbe +SUBDIRS = \ + doc \ + include \ + dix \ + fb \ + mi \ + Xext \ + miext \ + os \ + randr \ + render \ + Xi \ + xkb \ + $(DBE_DIR) \ + $(MFB_DIR) \ + $(AFB_DIR) \ + $(CFB_DIR) \ + $(CFB32_DIR) \ + record \ + xfixes \ + damageext \ + $(XTRAP_DIR) \ + $(COMPOSITE_DIR) \ + $(GLX_DIR) \ + exa \ + config \ + hw + +aclocaldir = $(datadir)/aclocal +aclocal_DATA = xorg-server.m4 +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = xorg-server.pc +EXTRA_DIST = xorg-server.pc.in xorg-server.m4 ChangeLog autogen.sh +MAINTAINERCLEANFILES = ChangeLog +DIST_SUBDIRS = \ + doc \ + include \ + dix \ + fb \ + mi \ + Xext \ + miext \ + os \ + randr \ + render \ + Xi \ + xkb \ + dbe \ + mfb \ + afb \ + cfb \ + cfb32 \ + record \ + xfixes \ + damageext \ + XTrap \ + composite \ + GL \ + exa \ + config \ + hw + +all: all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +xorg-server.pc: $(top_builddir)/config.status $(srcdir)/xorg-server.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +install-aclocalDATA: $(aclocal_DATA) + @$(NORMAL_INSTALL) + test -z "$(aclocaldir)" || $(MKDIR_P) "$(DESTDIR)$(aclocaldir)" + @list='$(aclocal_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(aclocalDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(aclocaldir)/$$f'"; \ + $(aclocalDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(aclocaldir)/$$f"; \ + done + +uninstall-aclocalDATA: + @$(NORMAL_UNINSTALL) + @list='$(aclocal_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(aclocaldir)/$$f'"; \ + rm -f "$(DESTDIR)$(aclocaldir)/$$f"; \ + done +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(aclocaldir)" "$(DESTDIR)$(pkgconfigdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-aclocalDATA install-pkgconfigDATA + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-aclocalDATA uninstall-pkgconfigDATA + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \ + distclean distclean-generic distclean-libtool distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-aclocalDATA install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-aclocalDATA \ + uninstall-am uninstall-pkgconfigDATA + + +.PHONY: ChangeLog + +ChangeLog: + (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || \ + (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + +dist-hook: ChangeLog + +# gross hack +relink: all + $(MAKE) -C hw relink +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/XTrap/Makefile.am b/xorg-server-1.4/XTrap/Makefile.am new file mode 100644 index 0000000..1eddd4f --- /dev/null +++ b/xorg-server-1.4/XTrap/Makefile.am @@ -0,0 +1,5 @@ +noinst_LTLIBRARIES = libxtrap.la + +AM_CFLAGS = $(DIX_CFLAGS) + +libxtrap_la_SOURCES = xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c diff --git a/xorg-server-1.4/XTrap/Makefile.in b/xorg-server-1.4/XTrap/Makefile.in new file mode 100644 index 0000000..29a0117 --- /dev/null +++ b/xorg-server-1.4/XTrap/Makefile.in @@ -0,0 +1,623 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = XTrap +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libxtrap_la_LIBADD = +am_libxtrap_la_OBJECTS = xtrapddmi.lo xtrapdi.lo xtrapdiswp.lo \ + xtrapditbl.lo +libxtrap_la_OBJECTS = $(am_libxtrap_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libxtrap_la_SOURCES) +DIST_SOURCES = $(libxtrap_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libxtrap.la +AM_CFLAGS = $(DIX_CFLAGS) +libxtrap_la_SOURCES = xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign XTrap/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign XTrap/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libxtrap.la: $(libxtrap_la_OBJECTS) $(libxtrap_la_DEPENDENCIES) + $(LINK) $(libxtrap_la_OBJECTS) $(libxtrap_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xtrapddmi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xtrapdi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xtrapdiswp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xtrapditbl.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/XTrap/xtrapddmi.c b/xorg-server-1.4/XTrap/xtrapddmi.c new file mode 100644 index 0000000..73a20c1 --- /dev/null +++ b/xorg-server-1.4/XTrap/xtrapddmi.c @@ -0,0 +1,160 @@ +/***************************************************************************** +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 + +#include +#include +#ifdef PC +# include "fcntl.h" +# include "io.h" +# define O_NDELAY 0L +#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 */ diff --git a/xorg-server-1.4/XTrap/xtrapdi.c b/xorg-server-1.4/XTrap/xtrapdi.c new file mode 100644 index 0000000..23d3bde --- /dev/null +++ b/xorg-server-1.4/XTrap/xtrapdi.c @@ -0,0 +1,2151 @@ +/***************************************************************************** +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 + +#include +#include +#include +#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 )(void), int (**f2 )(void)); +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(pointer 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, + (pointer)(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]), (int_function *)&(ProcVector[i])); + } + } + else + { /* Client wants the *real* rtn */ + if (--(vectored_requests[i]) <= 0L) + { /* No more clients using, so do it */ + _SwapProc(&(XETrapProcVector[i]), (int_function *)&(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)) + { + if (Success != dixLookupDrawable(&window_ptr, stuff->id, + client, 0, DixUnknownAccess)) + { /* 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)(void), register int (**f2)(void)) +{ + register int (*t1)(void) = *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/xorg-server-1.4/XTrap/xtrapdiswp.c b/xorg-server-1.4/XTrap/xtrapdiswp.c new file mode 100644 index 0000000..86c2403 --- /dev/null +++ b/xorg-server-1.4/XTrap/xtrapdiswp.c @@ -0,0 +1,937 @@ +/**************************************************************************** +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; + EventSwapPtr proc; + swapl(&(data->destination), n); + swapl(&(data->eventMask), n); + + /* Swap event */ + proc = EventSwapVector[data->event.u.u.type & 0177]; + if (!proc || proc == 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 */ +} diff --git a/xorg-server-1.4/XTrap/xtrapditbl.c b/xorg-server-1.4/XTrap/xtrapditbl.c new file mode 100644 index 0000000..db78c26 --- /dev/null +++ b/xorg-server-1.4/XTrap/xtrapditbl.c @@ -0,0 +1,243 @@ +/**************************************************************************** +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 + +#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/xorg-server-1.4/Xext/EVI.c b/xorg-server-1.4/Xext/EVI.c new file mode 100644 index 0000000..8fe3481 --- /dev/null +++ b/xorg-server-1.4/Xext/EVI.c @@ -0,0 +1,200 @@ +/************************************************************ +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. +********************************************************/ + +#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" + +#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 n, n_conflict, n_info, sz_info, sz_conflict; + VisualID32 *conflict; + xExtendedVisualInfo *eviInfo; + int status; + 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/xorg-server-1.4/Xext/EVIstruct.h b/xorg-server-1.4/Xext/EVIstruct.h new file mode 100644 index 0000000..e658190 --- /dev/null +++ b/xorg-server-1.4/Xext/EVIstruct.h @@ -0,0 +1,58 @@ +/************************************************************ +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. +********************************************************/ + +#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/xorg-server-1.4/Xext/Makefile.am b/xorg-server-1.4/Xext/Makefile.am new file mode 100644 index 0000000..d0d23b7 --- /dev/null +++ b/xorg-server-1.4/Xext/Makefile.am @@ -0,0 +1,181 @@ +# libXext.la: includes all extensions and should be linked into Xvfb, +# Xnest, Xdmx and Xprt +# libXextbuiltin.la: includes those extensions that are built directly into +# Xorg by default +# libXextmodule.la: includes those extensions that are built into a module +# that Xorg loads +if XORG +noinst_LTLIBRARIES = libXext.la libXextbuiltin.la libXextmodule.la +else +noinst_LTLIBRARIES = libXext.la +endif + +INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod + +AM_CFLAGS = $(DIX_CFLAGS) + +if XORG +sdk_HEADERS = xvdix.h xvmcext.h +endif + +# Sources always included in libXextbuiltin.la & libXext.la +BUILTIN_SRCS = \ + shape.c \ + sleepuntil.c \ + sleepuntil.h \ + xtest.c + +# Sources always included in libXextmodule.la & libXext.la +MODULE_SRCS = \ + bigreq.c \ + mitmisc.c \ + shape.c \ + sync.c \ + xcmisc.c + +# Extra configuration files ship with some extensions +SERVERCONFIG_DATA = + +# Optional sources included if extension enabled by configure.ac rules + +# MIT Shared Memory extension +MITSHM_SRCS = shm.c shmint.h +if MITSHM +BUILTIN_SRCS += $(MITSHM_SRCS) +endif + +# XVideo extension +XV_SRCS = xvmain.c xvdisp.c xvmc.c xvdix.h xvmcext.h xvdisp.h +if XV +MODULE_SRCS += $(XV_SRCS) +endif + +# XResource extension: lets clients get data about per-client resource usage +RES_SRCS = xres.c +if RES +MODULE_SRCS += $(RES_SRCS) +endif + +# MIT ScreenSaver extension +SCREENSAVER_SRCS = saver.c +if SCREENSAVER +MODULE_SRCS += $(SCREENSAVER_SRCS) +endif + +# Xinerama extension: making multiple video devices act as one virtual screen +XINERAMA_SRCS = panoramiX.c panoramiX.h panoramiXh.h panoramiXsrv.h panoramiXprocs.c panoramiXSwap.c +if XINERAMA +BUILTIN_SRCS += $(XINERAMA_SRCS) +endif + +# X-ACE extension: provides hooks for building security policy extensions +# like XC-Security, X-SELinux & XTSol +XACE_SRCS = xace.c xace.h xacestr.h +if XACE +BUILTIN_SRCS += $(XACE_SRCS) +endif + +# Security extension: multi-level security to protect clients from each other +XCSECURITY_SRCS = security.c securitysrv.h +if XCSECURITY +BUILTIN_SRCS += $(XCSECURITY_SRCS) + +SERVERCONFIG_DATA += SecurityPolicy +AM_CFLAGS += -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGdir)/SecurityPolicy\" +endif + +XCALIBRATE_SRCS = xcalibrate.c +if XCALIBRATE +BUILTIN_SRCS += $(XCALIBRATE_SRCS) +# XCalibrare needs tslib +endif + +# X EVent Interception Extension: allows accessibility helpers & composite +# managers to intercept events from input devices and transform as needed +# before the clients see them. +XEVIE_SRCS = xevie.c +if XEVIE +BUILTIN_SRCS += $(XEVIE_SRCS) +endif + +# XPrint: Printing via X Protocol +XPRINT_SRCS = xprint.c +if XPRINT +BUILTIN_SRCS += $(XPRINT_SRCS) +endif + +# AppGroup +APPGROUP_SRCS = appgroup.c appgroup.h +if APPGROUP +BUILTIN_SRCS += $(APPGROUP_SRCS) +endif + +# Colormap Utilization Protocol: Less flashing when switching between +# PsuedoColor apps and better sharing of limited colormap slots +CUP_SRCS = cup.c +if CUP +MODULE_SRCS += $(CUP_SRCS) +endif + +# Extended Visual Information +EVI_SRCS = EVI.c sampleEVI.c EVIstruct.h +if EVI +MODULE_SRCS += $(EVI_SRCS) +endif + +# Multi-buffering extension +MULTIBUFFER_SRCS = mbuf.c +EXTRA_MULTIBUFFER_SRCS = mbufbf.c mbufpx.c +if MULTIBUFFER +MODULE_SRCS += $(MULTIBUFFER_SRCS) +endif + +# Font Cache extension +FONTCACHE_SRCS = fontcache.c +if FONTCACHE +MODULE_SRCS += $(FONTCACHE_SRCS) +endif + +# XF86 Big Font extension +BIGFONT_SRCS = xf86bigfont.c +if XF86BIGFONT +BUILTIN_SRCS += $(BIGFONT_SRCS) +endif + +# DPMS extension +DPMS_SRCS = dpms.c dpmsproc.h +if DPMSExtension +MODULE_SRCS += $(DPMS_SRCS) +endif + +# Now take all of the above, mix well, bake for 10 minutes and get libXext*.la + +libXext_la_SOURCES = $(BUILTIN_SRCS) $(MODULE_SRCS) + +if XORG +libXextbuiltin_la_SOURCES = $(BUILTIN_SRCS) + +libXextmodule_la_SOURCES = $(MODULE_SRCS) +endif + +EXTRA_DIST = \ + $(SERVERCONFIG_DATA) \ + $(MITSHM_SRCS) \ + $(XV_SRCS) \ + $(RES_SRCS) \ + $(SCREENSAVER_SRCS) \ + $(XACE_SRCS) \ + $(XCSECURITY_SRCS) \ + $(XCALIBRATE_SRCS) \ + $(XINERAMA_SRCS) \ + $(XEVIE_SRCS) \ + $(XPRINT_SRCS) \ + $(APPGROUP_SRCS) \ + $(CUP_SRCS) \ + $(EVI_SRCS) \ + $(MULTIBUFFER_SRCS) \ + $(EXTRA_MULTIBUFFER_SRCS) \ + $(FONTCACHE_SRCS) \ + $(BIGFONT_SRCS) \ + $(DPMS_SRCS) + diff --git a/xorg-server-1.4/Xext/Makefile.in b/xorg-server-1.4/Xext/Makefile.in new file mode 100644 index 0000000..6e28df3 --- /dev/null +++ b/xorg-server-1.4/Xext/Makefile.in @@ -0,0 +1,903 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@MITSHM_TRUE@am__append_1 = $(MITSHM_SRCS) +@XV_TRUE@am__append_2 = $(XV_SRCS) +@RES_TRUE@am__append_3 = $(RES_SRCS) +@SCREENSAVER_TRUE@am__append_4 = $(SCREENSAVER_SRCS) +@XINERAMA_TRUE@am__append_5 = $(XINERAMA_SRCS) +@XACE_TRUE@am__append_6 = $(XACE_SRCS) +@XCSECURITY_TRUE@am__append_7 = $(XCSECURITY_SRCS) +@XCSECURITY_TRUE@am__append_8 = SecurityPolicy +@XCSECURITY_TRUE@am__append_9 = -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGdir)/SecurityPolicy\" +@XCALIBRATE_TRUE@am__append_10 = $(XCALIBRATE_SRCS) +@XEVIE_TRUE@am__append_11 = $(XEVIE_SRCS) +@XPRINT_TRUE@am__append_12 = $(XPRINT_SRCS) +@APPGROUP_TRUE@am__append_13 = $(APPGROUP_SRCS) +@CUP_TRUE@am__append_14 = $(CUP_SRCS) +@EVI_TRUE@am__append_15 = $(EVI_SRCS) +@MULTIBUFFER_TRUE@am__append_16 = $(MULTIBUFFER_SRCS) +@FONTCACHE_TRUE@am__append_17 = $(FONTCACHE_SRCS) +@XF86BIGFONT_TRUE@am__append_18 = $(BIGFONT_SRCS) +@DPMSExtension_TRUE@am__append_19 = $(DPMS_SRCS) +subdir = Xext +DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libXext_la_LIBADD = +am__libXext_la_SOURCES_DIST = shape.c sleepuntil.c sleepuntil.h \ + xtest.c shm.c shmint.h panoramiX.c panoramiX.h panoramiXh.h \ + panoramiXsrv.h panoramiXprocs.c panoramiXSwap.c xace.c xace.h \ + xacestr.h security.c securitysrv.h xcalibrate.c xevie.c \ + xprint.c appgroup.c appgroup.h xf86bigfont.c bigreq.c \ + mitmisc.c sync.c xcmisc.c xvmain.c xvdisp.c xvmc.c xvdix.h \ + xvmcext.h xvdisp.h xres.c saver.c cup.c EVI.c sampleEVI.c \ + EVIstruct.h mbuf.c fontcache.c dpms.c dpmsproc.h +am__objects_1 = shm.lo +@MITSHM_TRUE@am__objects_2 = $(am__objects_1) +am__objects_3 = panoramiX.lo panoramiXprocs.lo panoramiXSwap.lo +@XINERAMA_TRUE@am__objects_4 = $(am__objects_3) +am__objects_5 = xace.lo +@XACE_TRUE@am__objects_6 = $(am__objects_5) +am__objects_7 = security.lo +@XCSECURITY_TRUE@am__objects_8 = $(am__objects_7) +am__objects_9 = xcalibrate.lo +@XCALIBRATE_TRUE@am__objects_10 = $(am__objects_9) +am__objects_11 = xevie.lo +@XEVIE_TRUE@am__objects_12 = $(am__objects_11) +am__objects_13 = xprint.lo +@XPRINT_TRUE@am__objects_14 = $(am__objects_13) +am__objects_15 = appgroup.lo +@APPGROUP_TRUE@am__objects_16 = $(am__objects_15) +am__objects_17 = xf86bigfont.lo +@XF86BIGFONT_TRUE@am__objects_18 = $(am__objects_17) +am__objects_19 = shape.lo sleepuntil.lo xtest.lo $(am__objects_2) \ + $(am__objects_4) $(am__objects_6) $(am__objects_8) \ + $(am__objects_10) $(am__objects_12) $(am__objects_14) \ + $(am__objects_16) $(am__objects_18) +am__objects_20 = xvmain.lo xvdisp.lo xvmc.lo +@XV_TRUE@am__objects_21 = $(am__objects_20) +am__objects_22 = xres.lo +@RES_TRUE@am__objects_23 = $(am__objects_22) +am__objects_24 = saver.lo +@SCREENSAVER_TRUE@am__objects_25 = $(am__objects_24) +am__objects_26 = cup.lo +@CUP_TRUE@am__objects_27 = $(am__objects_26) +am__objects_28 = EVI.lo sampleEVI.lo +@EVI_TRUE@am__objects_29 = $(am__objects_28) +am__objects_30 = mbuf.lo +@MULTIBUFFER_TRUE@am__objects_31 = $(am__objects_30) +am__objects_32 = fontcache.lo +@FONTCACHE_TRUE@am__objects_33 = $(am__objects_32) +am__objects_34 = dpms.lo +@DPMSExtension_TRUE@am__objects_35 = $(am__objects_34) +am__objects_36 = bigreq.lo mitmisc.lo shape.lo sync.lo xcmisc.lo \ + $(am__objects_21) $(am__objects_23) $(am__objects_25) \ + $(am__objects_27) $(am__objects_29) $(am__objects_31) \ + $(am__objects_33) $(am__objects_35) +am_libXext_la_OBJECTS = $(am__objects_19) $(am__objects_36) +libXext_la_OBJECTS = $(am_libXext_la_OBJECTS) +@XORG_FALSE@am_libXext_la_rpath = +@XORG_TRUE@am_libXext_la_rpath = +libXextbuiltin_la_LIBADD = +am__libXextbuiltin_la_SOURCES_DIST = shape.c sleepuntil.c sleepuntil.h \ + xtest.c shm.c shmint.h panoramiX.c panoramiX.h panoramiXh.h \ + panoramiXsrv.h panoramiXprocs.c panoramiXSwap.c xace.c xace.h \ + xacestr.h security.c securitysrv.h xcalibrate.c xevie.c \ + xprint.c appgroup.c appgroup.h xf86bigfont.c +@XORG_TRUE@am_libXextbuiltin_la_OBJECTS = $(am__objects_19) +libXextbuiltin_la_OBJECTS = $(am_libXextbuiltin_la_OBJECTS) +@XORG_TRUE@am_libXextbuiltin_la_rpath = +libXextmodule_la_LIBADD = +am__libXextmodule_la_SOURCES_DIST = bigreq.c mitmisc.c shape.c sync.c \ + xcmisc.c xvmain.c xvdisp.c xvmc.c xvdix.h xvmcext.h xvdisp.h \ + xres.c saver.c cup.c EVI.c sampleEVI.c EVIstruct.h mbuf.c \ + fontcache.c dpms.c dpmsproc.h +@XORG_TRUE@am_libXextmodule_la_OBJECTS = $(am__objects_36) +libXextmodule_la_OBJECTS = $(am_libXextmodule_la_OBJECTS) +@XORG_TRUE@am_libXextmodule_la_rpath = +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libXext_la_SOURCES) $(libXextbuiltin_la_SOURCES) \ + $(libXextmodule_la_SOURCES) +DIST_SOURCES = $(am__libXext_la_SOURCES_DIST) \ + $(am__libXextbuiltin_la_SOURCES_DIST) \ + $(am__libXextmodule_la_SOURCES_DIST) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(SERVERCONFIGdir)" "$(DESTDIR)$(sdkdir)" +SERVERCONFIGDATA_INSTALL = $(INSTALL_DATA) +DATA = $(SERVERCONFIG_DATA) +am__sdk_HEADERS_DIST = xvdix.h xvmcext.h +sdkHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(sdk_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +@XORG_FALSE@noinst_LTLIBRARIES = libXext.la + +# libXext.la: includes all extensions and should be linked into Xvfb, +# Xnest, Xdmx and Xprt +# libXextbuiltin.la: includes those extensions that are built directly into +# Xorg by default +# libXextmodule.la: includes those extensions that are built into a module +# that Xorg loads +@XORG_TRUE@noinst_LTLIBRARIES = libXext.la libXextbuiltin.la libXextmodule.la +INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod +AM_CFLAGS = $(DIX_CFLAGS) $(am__append_9) +@XORG_TRUE@sdk_HEADERS = xvdix.h xvmcext.h + +# Sources always included in libXextbuiltin.la & libXext.la +BUILTIN_SRCS = shape.c sleepuntil.c sleepuntil.h xtest.c \ + $(am__append_1) $(am__append_5) $(am__append_6) \ + $(am__append_7) $(am__append_10) $(am__append_11) \ + $(am__append_12) $(am__append_13) $(am__append_18) + +# Sources always included in libXextmodule.la & libXext.la +MODULE_SRCS = bigreq.c mitmisc.c shape.c sync.c xcmisc.c \ + $(am__append_2) $(am__append_3) $(am__append_4) \ + $(am__append_14) $(am__append_15) $(am__append_16) \ + $(am__append_17) $(am__append_19) + +# Extra configuration files ship with some extensions +SERVERCONFIG_DATA = $(am__append_8) + +# Optional sources included if extension enabled by configure.ac rules + +# MIT Shared Memory extension +MITSHM_SRCS = shm.c shmint.h + +# XVideo extension +XV_SRCS = xvmain.c xvdisp.c xvmc.c xvdix.h xvmcext.h xvdisp.h + +# XResource extension: lets clients get data about per-client resource usage +RES_SRCS = xres.c + +# MIT ScreenSaver extension +SCREENSAVER_SRCS = saver.c + +# Xinerama extension: making multiple video devices act as one virtual screen +XINERAMA_SRCS = panoramiX.c panoramiX.h panoramiXh.h panoramiXsrv.h panoramiXprocs.c panoramiXSwap.c + +# X-ACE extension: provides hooks for building security policy extensions +# like XC-Security, X-SELinux & XTSol +XACE_SRCS = xace.c xace.h xacestr.h + +# Security extension: multi-level security to protect clients from each other +XCSECURITY_SRCS = security.c securitysrv.h +XCALIBRATE_SRCS = xcalibrate.c +# XCalibrare needs tslib + +# X EVent Interception Extension: allows accessibility helpers & composite +# managers to intercept events from input devices and transform as needed +# before the clients see them. +XEVIE_SRCS = xevie.c + +# XPrint: Printing via X Protocol +XPRINT_SRCS = xprint.c + +# AppGroup +APPGROUP_SRCS = appgroup.c appgroup.h + +# Colormap Utilization Protocol: Less flashing when switching between +# PsuedoColor apps and better sharing of limited colormap slots +CUP_SRCS = cup.c + +# Extended Visual Information +EVI_SRCS = EVI.c sampleEVI.c EVIstruct.h + +# Multi-buffering extension +MULTIBUFFER_SRCS = mbuf.c +EXTRA_MULTIBUFFER_SRCS = mbufbf.c mbufpx.c + +# Font Cache extension +FONTCACHE_SRCS = fontcache.c + +# XF86 Big Font extension +BIGFONT_SRCS = xf86bigfont.c + +# DPMS extension +DPMS_SRCS = dpms.c dpmsproc.h + +# Now take all of the above, mix well, bake for 10 minutes and get libXext*.la +libXext_la_SOURCES = $(BUILTIN_SRCS) $(MODULE_SRCS) +@XORG_TRUE@libXextbuiltin_la_SOURCES = $(BUILTIN_SRCS) +@XORG_TRUE@libXextmodule_la_SOURCES = $(MODULE_SRCS) +EXTRA_DIST = \ + $(SERVERCONFIG_DATA) \ + $(MITSHM_SRCS) \ + $(XV_SRCS) \ + $(RES_SRCS) \ + $(SCREENSAVER_SRCS) \ + $(XACE_SRCS) \ + $(XCSECURITY_SRCS) \ + $(XCALIBRATE_SRCS) \ + $(XINERAMA_SRCS) \ + $(XEVIE_SRCS) \ + $(XPRINT_SRCS) \ + $(APPGROUP_SRCS) \ + $(CUP_SRCS) \ + $(EVI_SRCS) \ + $(MULTIBUFFER_SRCS) \ + $(EXTRA_MULTIBUFFER_SRCS) \ + $(FONTCACHE_SRCS) \ + $(BIGFONT_SRCS) \ + $(DPMS_SRCS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Xext/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign Xext/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libXext.la: $(libXext_la_OBJECTS) $(libXext_la_DEPENDENCIES) + $(LINK) $(am_libXext_la_rpath) $(libXext_la_OBJECTS) $(libXext_la_LIBADD) $(LIBS) +libXextbuiltin.la: $(libXextbuiltin_la_OBJECTS) $(libXextbuiltin_la_DEPENDENCIES) + $(LINK) $(am_libXextbuiltin_la_rpath) $(libXextbuiltin_la_OBJECTS) $(libXextbuiltin_la_LIBADD) $(LIBS) +libXextmodule.la: $(libXextmodule_la_OBJECTS) $(libXextmodule_la_DEPENDENCIES) + $(LINK) $(am_libXextmodule_la_rpath) $(libXextmodule_la_OBJECTS) $(libXextmodule_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EVI.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/appgroup.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bigreq.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cup.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dpms.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontcache.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mitmisc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panoramiX.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panoramiXSwap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panoramiXprocs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sampleEVI.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/saver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/security.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleepuntil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xace.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xcalibrate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xcmisc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xevie.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86bigfont.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprint.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xres.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xtest.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvdisp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvmain.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvmc.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-SERVERCONFIGDATA: $(SERVERCONFIG_DATA) + @$(NORMAL_INSTALL) + test -z "$(SERVERCONFIGdir)" || $(MKDIR_P) "$(DESTDIR)$(SERVERCONFIGdir)" + @list='$(SERVERCONFIG_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(SERVERCONFIGDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(SERVERCONFIGdir)/$$f'"; \ + $(SERVERCONFIGDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(SERVERCONFIGdir)/$$f"; \ + done + +uninstall-SERVERCONFIGDATA: + @$(NORMAL_UNINSTALL) + @list='$(SERVERCONFIG_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(SERVERCONFIGdir)/$$f'"; \ + rm -f "$(DESTDIR)$(SERVERCONFIGdir)/$$f"; \ + done +install-sdkHEADERS: $(sdk_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(sdkdir)" || $(MKDIR_P) "$(DESTDIR)$(sdkdir)" + @list='$(sdk_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(sdkHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(sdkdir)/$$f'"; \ + $(sdkHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(sdkdir)/$$f"; \ + done + +uninstall-sdkHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(sdk_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(sdkdir)/$$f'"; \ + rm -f "$(DESTDIR)$(sdkdir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(SERVERCONFIGdir)" "$(DESTDIR)$(sdkdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-SERVERCONFIGDATA install-sdkHEADERS + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-SERVERCONFIGDATA uninstall-sdkHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-SERVERCONFIGDATA install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-sdkHEADERS install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-SERVERCONFIGDATA uninstall-am \ + uninstall-sdkHEADERS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/Xext/SecurityPolicy b/xorg-server-1.4/Xext/SecurityPolicy new file mode 100644 index 0000000..cc521c2 --- /dev/null +++ b/xorg-server-1.4/Xext/SecurityPolicy @@ -0,0 +1,88 @@ +version-1 + +# $Xorg: SecurityPolicy,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ + +# The site policy fields are interpreted by the XC-QUERY-SECURITY-1 +# authorization protocol. The values are arbitrary and site-specific. +# Refer to the Security Extension Specification for the usage of the policies. +#sitepolicy A +#sitepolicy B +#sitepolicy C + +# Property access rules: +# property +# ::= any | root | +# ::= | = +# :== [ | | ]* +# :== r | w | d +# r read +# w write +# d delete +# :== a | i | e +# a allow +# i ignore +# e error + +# Allow reading of application resources, but not writing. +property RESOURCE_MANAGER root ar iw +property SCREEN_RESOURCES root ar iw + +# Ignore attempts to use cut buffers. Giving errors causes apps to crash, +# and allowing access may give away too much information. +property CUT_BUFFER0 root irw +property CUT_BUFFER1 root irw +property CUT_BUFFER2 root irw +property CUT_BUFFER3 root irw +property CUT_BUFFER4 root irw +property CUT_BUFFER5 root irw +property CUT_BUFFER6 root irw +property CUT_BUFFER7 root irw + +# If you are using Motif, you probably want these. +property _MOTIF_DEFAULT_BINDINGS root ar iw +property _MOTIF_DRAG_WINDOW root ar iw +property _MOTIF_DRAG_TARGETS any ar iw +property _MOTIF_DRAG_ATOMS any ar iw +property _MOTIF_DRAG_ATOM_PAIRS any ar iw + +# If you are running CDE you also need these +property _MOTIF_WM_INFO root arw +property TT_SESSION root irw +property WM_ICON_SIZE root irw +property "SDT Pixel Set" any irw + +# The next two rules let xwininfo -tree work when untrusted. +property WM_NAME any ar + +# Allow read of WM_CLASS, but only for windows with WM_NAME. +# This might be more restrictive than necessary, but demonstrates +# the facility, and is also an attempt to +# say "top level windows only." +property WM_CLASS WM_NAME ar + +# These next three let xlsclients work untrusted. Think carefully +# before including these; giving away the client machine name and command +# may be exposing too much. +property WM_STATE WM_NAME ar +property WM_CLIENT_MACHINE WM_NAME ar +property WM_COMMAND WM_NAME ar + +# To let untrusted clients use the standard colormaps created by +# xstdcmap, include these lines. +property RGB_DEFAULT_MAP root ar +property RGB_BEST_MAP root ar +property RGB_RED_MAP root ar +property RGB_GREEN_MAP root ar +property RGB_BLUE_MAP root ar +property RGB_GRAY_MAP root ar + +# To let untrusted clients use the color management database created +# by xcmsdb, include these lines. +property XDCCC_LINEAR_RGB_CORRECTION root ar +property XDCCC_LINEAR_RGB_MATRICES root ar +property XDCCC_GRAY_SCREENWHITEPOINT root ar +property XDCCC_GRAY_CORRECTION root ar + +# To let untrusted clients use the overlay visuals that many vendors +# support, include this line. +property SERVER_OVERLAY_VISUALS root ar diff --git a/xorg-server-1.4/Xext/appgroup.c b/xorg-server-1.4/Xext/appgroup.c new file mode 100644 index 0000000..7bd2055 --- /dev/null +++ b/xorg-server-1.4/Xext/appgroup.c @@ -0,0 +1,773 @@ +/* +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. +*/ + +#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 "xacestr.h" +#include "securitysrv.h" +#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); + +static int XagCallbackRefCount = 0; + +static RESTYPE RT_APPGROUP; +static AppGroupPtr appGrpList = NULL; + +extern xConnSetupPrefix connSetupPrefix; +extern char* ConnectionInfo; +extern int connBlockScreenStart; + +static +int XagAppGroupFree( + pointer what, + XID id) /* unused */ +{ + int i; + AppGroupPtr pAppGrp = (AppGroupPtr) what; + + if (pAppGrp->leader) + for (i = 0; i < pAppGrp->nclients; i++) { + if (pAppGrp->clients[i] == NULL) continue; + 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, + pointer nulldata, + pointer calldata) +{ + NewClientInfoRec* pci = (NewClientInfoRec*) calldata; + ClientPtr pClient = pci->client; + AppGroupPtr pAppGrp = pClient->appgroup; + int slot; + + if (!pAppGrp) + return; + + switch (pClient->clientState) { + case ClientStateAuthenticating: + case ClientStateRunning: + case ClientStateCheckingSecurity: + break; + + case ClientStateInitial: + case ClientStateCheckedSecurity: + slot = -1; + /* see the comment above about Initial vs. CheckedSecurity */ + if (pAppGrp->nclients != 0) { + /* 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; + if (slot == -1 && pAppGrp->clients[i] == NULL) + slot = i; + } + if (slot == -1) { + slot = pAppGrp->nclients++; + pAppGrp->clients = (ClientPtr*) xrealloc (pAppGrp->clients, + pAppGrp->nclients * sizeof (ClientPtr)); + } + pAppGrp->clients[slot] = 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; + } + } + pClient->appgroup = NULL; /* redundant, pClient will be freed */ + break; + } +} + +/*ARGSUSED*/ +static +void XagResetProc( + ExtensionEntry* extEntry) +{ + DeleteCallback (&ClientStateCallback, XagClientStateChange, NULL); + XagCallbackRefCount = 0; + while (appGrpList) XagAppGroupFree ((pointer) 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, rc; + ScreenPtr pScreen; + DepthPtr pDepth; + ColormapPtr pColormap; + + rc = dixLookupWindow(&pWin, pAppGrp->default_root, client, + DixUnknownAccess); + if (rc != Success) + return rc; + 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 ((pointer)pAppGrp, (XID)0); + return ret; + } + if (pAppGrp->single_screen) { + CreateConnectionInfo (pAppGrp); + if (!pAppGrp->ConnectionInfo) + return BadAlloc; + } + if (!AddResource (stuff->app_group, RT_APPGROUP, (pointer)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, DixReadAccess); + 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, DixReadAccess); + 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, rc; + + REQUEST_SIZE_MATCH (xXagQueryReq); + rc = dixLookupClient(&pClient, stuff->resource, client, DixUnknownAccess); + if (rc != Success) + return rc; + + 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); +} + +static void XagCallClientStateChange( + CallbackListPtr *pcbl, + pointer nulldata, + pointer calldata) +{ + XaceAuthAvailRec* rec = (XaceAuthAvailRec*) calldata; + ClientPtr pClient = rec->client; + + if (!pClient->appgroup) { + SecurityAuthorizationPtr pAuth; + XID authId = rec->authId; + + /* can't use SecurityLookupIDByType here -- client + * security state hasn't been setup yet. + */ + pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId, + SecurityAuthorizationResType); + if (!pAuth) + return; + + pClient->appgroup = (AppGroupPtr)LookupIDByType(pAuth->group, + RT_APPGROUP); + } + + if (pClient->appgroup) { + NewClientInfoRec clientinfo; + + clientinfo.client = pClient; + XagClientStateChange (NULL, NULL, (pointer)&clientinfo); + } +} + +void +XagExtensionInit(INITARGS) +{ + if (AddExtension (XAGNAME, + 0, + XagNumberErrors, + ProcXagDispatch, + SProcXagDispatch, + XagResetProc, + StandardMinorOpcode)) { + RT_APPGROUP = CreateNewResourceType (XagAppGroupFree); + XaceRegisterCallback(XACE_AUTH_AVAIL, XagCallClientStateChange, NULL); + } +} diff --git a/xorg-server-1.4/Xext/appgroup.h b/xorg-server-1.4/Xext/appgroup.h new file mode 100644 index 0000000..778da5d --- /dev/null +++ b/xorg-server-1.4/Xext/appgroup.h @@ -0,0 +1,67 @@ +/* +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. +*/ + +#ifndef _APPGROUP_SRV_H_ +#define _APPGROUP_SRV_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 Bool XagIsControlledRoot ( + ClientPtr /* client */, + WindowPtr /* pParent */ +); + +extern XID XagId ( + ClientPtr /* client */ +); + +_XFUNCPROTOEND + +#endif /* _APPGROUP_SRV_H_ */ + + + diff --git a/xorg-server-1.4/Xext/bigreq.c b/xorg-server-1.4/Xext/bigreq.c new file mode 100644 index 0000000..fcd848a --- /dev/null +++ b/xorg-server-1.4/Xext/bigreq.c @@ -0,0 +1,105 @@ +/* + +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. + +*/ + +#define NEED_EVENTS +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include +#include "opaque.h" +#include "modinit.h" + +#if 0 +static unsigned char XBigReqCode; +#endif + +static void BigReqResetProc( + ExtensionEntry * /* extEntry */ +); + +static DISPATCH_PROC(ProcBigReqDispatch); + +void +BigReqExtensionInit(INITARGS) +{ +#if 0 + ExtensionEntry *extEntry; + + if ((extEntry = AddExtension(XBigReqExtensionName, 0, 0, + ProcBigReqDispatch, ProcBigReqDispatch, + BigReqResetProc, StandardMinorOpcode)) != 0) + XBigReqCode = (unsigned char)extEntry->base; +#else + (void) AddExtension(XBigReqExtensionName, 0, 0, + ProcBigReqDispatch, ProcBigReqDispatch, + BigReqResetProc, StandardMinorOpcode); +#endif + + DeclareExtensionSecurity(XBigReqExtensionName, TRUE); +} + +/*ARGSUSED*/ +static void +BigReqResetProc (extEntry) + ExtensionEntry *extEntry; +{ +} + +static int +ProcBigReqDispatch (client) + register ClientPtr client; +{ + REQUEST(xBigReqEnableReq); + xBigReqEnableReply rep; + register int n; + + if (client->swapped) { + swaps(&stuff->length, n); + } + if (stuff->brReqType != X_BigReqEnable) + return BadRequest; + REQUEST_SIZE_MATCH(xBigReqEnableReq); + client->big_requests = TRUE; + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.max_request_size = maxBigRequestSize; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.max_request_size, n); + } + WriteToClient(client, sizeof(xBigReqEnableReply), (char *)&rep); + return(client->noClientException); +} diff --git a/xorg-server-1.4/Xext/cup.c b/xorg-server-1.4/Xext/cup.c new file mode 100644 index 0000000..6bfa278 --- /dev/null +++ b/xorg-server-1.4/Xext/cup.c @@ -0,0 +1,358 @@ +/* + +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. + +*/ + +#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 + +#include "../os/osdep.h" + +#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); + +#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, DixWriteAccess); + + 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/xorg-server-1.4/Xext/dpms.c b/xorg-server-1.4/Xext/dpms.c new file mode 100644 index 0000000..aced406 --- /dev/null +++ b/xorg-server-1.4/Xext/dpms.c @@ -0,0 +1,448 @@ +/***************************************************************** + +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. + +******************************************************************/ + +/* + * HISTORY + * + * @(#)RCSfile: dpms.c,v Revision: 1.1.4.5 (DEC) Date: 1996/03/04 15:27:00 + */ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "opaque.h" +#define DPMS_SERVER +#include +#include +#include "dpmsproc.h" +#include "modinit.h" + +#if 0 +static unsigned char DPMSCode; +#endif +static DISPATCH_PROC(ProcDPMSDispatch); +static DISPATCH_PROC(SProcDPMSDispatch); +static DISPATCH_PROC(ProcDPMSGetVersion); +static DISPATCH_PROC(SProcDPMSGetVersion); +static DISPATCH_PROC(ProcDPMSGetTimeouts); +static DISPATCH_PROC(SProcDPMSGetTimeouts); +static DISPATCH_PROC(ProcDPMSSetTimeouts); +static DISPATCH_PROC(SProcDPMSSetTimeouts); +static DISPATCH_PROC(ProcDPMSEnable); +static DISPATCH_PROC(SProcDPMSEnable); +static DISPATCH_PROC(ProcDPMSDisable); +static DISPATCH_PROC(SProcDPMSDisable); +static DISPATCH_PROC(ProcDPMSForceLevel); +static DISPATCH_PROC(SProcDPMSForceLevel); +static DISPATCH_PROC(ProcDPMSInfo); +static DISPATCH_PROC(SProcDPMSInfo); +static DISPATCH_PROC(ProcDPMSCapable); +static DISPATCH_PROC(SProcDPMSCapable); +static void DPMSResetProc(ExtensionEntry* extEntry); + +void +DPMSExtensionInit(INITARGS) +{ +#if 0 + ExtensionEntry *extEntry; + + if ((extEntry = AddExtension(DPMSExtensionName, 0, 0, + ProcDPMSDispatch, SProcDPMSDispatch, + DPMSResetProc, StandardMinorOpcode))) + DPMSCode = (unsigned char)extEntry->base; +#else + (void) AddExtension(DPMSExtensionName, 0, 0, + ProcDPMSDispatch, SProcDPMSDispatch, + DPMSResetProc, StandardMinorOpcode); +#endif +} + +/*ARGSUSED*/ +static void +DPMSResetProc (extEntry) + ExtensionEntry *extEntry; +{ +} + +static int +ProcDPMSGetVersion(client) + register ClientPtr client; +{ + /* REQUEST(xDPMSGetVersionReq); */ + xDPMSGetVersionReply rep; + register int n; + + REQUEST_SIZE_MATCH(xDPMSGetVersionReq); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.majorVersion = DPMSMajorVersion; + rep.minorVersion = DPMSMinorVersion; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swaps(&rep.majorVersion, n); + swaps(&rep.minorVersion, n); + } + WriteToClient(client, sizeof(xDPMSGetVersionReply), (char *)&rep); + return(client->noClientException); +} + +static int +ProcDPMSCapable(register ClientPtr client) +{ + /* REQUEST(xDPMSCapableReq); */ + xDPMSCapableReply rep; + register int n; + + REQUEST_SIZE_MATCH(xDPMSCapableReq); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.capable = DPMSCapableFlag; + + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + } + WriteToClient(client, sizeof(xDPMSCapableReply), (char *)&rep); + return(client->noClientException); +} + +static int +ProcDPMSGetTimeouts(client) + register ClientPtr client; +{ + /* REQUEST(xDPMSGetTimeoutsReq); */ + xDPMSGetTimeoutsReply rep; + register int n; + + REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.standby = DPMSStandbyTime / MILLI_PER_SECOND; + rep.suspend = DPMSSuspendTime / MILLI_PER_SECOND; + rep.off = DPMSOffTime / MILLI_PER_SECOND; + + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swaps(&rep.standby, n); + swaps(&rep.suspend, n); + swaps(&rep.off, n); + } + WriteToClient(client, sizeof(xDPMSGetTimeoutsReply), (char *)&rep); + return(client->noClientException); +} + +static int +ProcDPMSSetTimeouts(client) + register ClientPtr client; +{ + REQUEST(xDPMSSetTimeoutsReq); + + REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq); + + if ((stuff->off != 0)&&(stuff->off < stuff->suspend)) + { + client->errorValue = stuff->off; + return BadValue; + } + if ((stuff->suspend != 0)&&(stuff->suspend < stuff->standby)) + { + client->errorValue = stuff->suspend; + return BadValue; + } + + DPMSStandbyTime = stuff->standby * MILLI_PER_SECOND; + DPMSSuspendTime = stuff->suspend * MILLI_PER_SECOND; + DPMSOffTime = stuff->off * MILLI_PER_SECOND; + SetScreenSaverTimer(); + + return(client->noClientException); +} + +static int +ProcDPMSEnable(client) + register ClientPtr client; +{ + /* REQUEST(xDPMSEnableReq); */ + + REQUEST_SIZE_MATCH(xDPMSEnableReq); + + if (DPMSCapableFlag) + DPMSEnabled = TRUE; + + return(client->noClientException); +} + +static int +ProcDPMSDisable(client) + register ClientPtr client; +{ + /* REQUEST(xDPMSDisableReq); */ + + REQUEST_SIZE_MATCH(xDPMSDisableReq); + + DPMSSet(DPMSModeOn); + + DPMSEnabled = FALSE; + + return(client->noClientException); +} + +static int +ProcDPMSForceLevel(client) + register ClientPtr client; +{ + REQUEST(xDPMSForceLevelReq); + + REQUEST_SIZE_MATCH(xDPMSForceLevelReq); + + if (!DPMSEnabled) + return BadMatch; + + if (stuff->level == DPMSModeOn) { + lastDeviceEventTime.milliseconds = + GetTimeInMillis(); + } else if (stuff->level == DPMSModeStandby) { + lastDeviceEventTime.milliseconds = + GetTimeInMillis() - DPMSStandbyTime; + } else if (stuff->level == DPMSModeSuspend) { + lastDeviceEventTime.milliseconds = + GetTimeInMillis() - DPMSSuspendTime; + } else if (stuff->level == DPMSModeOff) { + lastDeviceEventTime.milliseconds = + GetTimeInMillis() - DPMSOffTime; + } else { + client->errorValue = stuff->level; + return BadValue; + } + + DPMSSet(stuff->level); + + return(client->noClientException); +} + +static int +ProcDPMSInfo(register ClientPtr client) +{ + /* REQUEST(xDPMSInfoReq); */ + xDPMSInfoReply rep; + register int n; + + REQUEST_SIZE_MATCH(xDPMSInfoReq); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.power_level = DPMSPowerLevel; + rep.state = DPMSEnabled; + + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swaps(&rep.power_level, n); + } + WriteToClient(client, sizeof(xDPMSInfoReply), (char *)&rep); + return(client->noClientException); +} + +static int +ProcDPMSDispatch (client) + register ClientPtr client; +{ + REQUEST(xReq); + + switch (stuff->data) + { + case X_DPMSGetVersion: + return ProcDPMSGetVersion(client); + case X_DPMSCapable: + return ProcDPMSCapable(client); + case X_DPMSGetTimeouts: + return ProcDPMSGetTimeouts(client); + case X_DPMSSetTimeouts: + return ProcDPMSSetTimeouts(client); + case X_DPMSEnable: + return ProcDPMSEnable(client); + case X_DPMSDisable: + return ProcDPMSDisable(client); + case X_DPMSForceLevel: + return ProcDPMSForceLevel(client); + case X_DPMSInfo: + return ProcDPMSInfo(client); + default: + return BadRequest; + } +} + +static int +SProcDPMSGetVersion(client) + register ClientPtr client; +{ + register int n; + REQUEST(xDPMSGetVersionReq); + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xDPMSGetVersionReq); + swaps(&stuff->majorVersion, n); + swaps(&stuff->minorVersion, n); + return ProcDPMSGetVersion(client); +} + +static int +SProcDPMSCapable(register ClientPtr client) +{ + REQUEST(xDPMSCapableReq); + register int n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xDPMSCapableReq); + + return ProcDPMSCapable(client); +} + +static int +SProcDPMSGetTimeouts(client) + register ClientPtr client; +{ + REQUEST(xDPMSGetTimeoutsReq); + register int n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq); + + return ProcDPMSGetTimeouts(client); +} + +static int +SProcDPMSSetTimeouts(client) + register ClientPtr client; +{ + REQUEST(xDPMSSetTimeoutsReq); + register int n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq); + + swaps(&stuff->standby, n); + swaps(&stuff->suspend, n); + swaps(&stuff->off, n); + return ProcDPMSSetTimeouts(client); +} + +static int +SProcDPMSEnable(client) + register ClientPtr client; +{ + REQUEST(xDPMSEnableReq); + register int n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xDPMSEnableReq); + + return ProcDPMSEnable(client); +} + +static int +SProcDPMSDisable(client) + register ClientPtr client; +{ + REQUEST(xDPMSDisableReq); + register int n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xDPMSDisableReq); + + return ProcDPMSDisable(client); +} + +static int +SProcDPMSForceLevel(client) + register ClientPtr client; +{ + REQUEST(xDPMSForceLevelReq); + register int n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xDPMSForceLevelReq); + + swaps(&stuff->level, n); + + return ProcDPMSForceLevel(client); +} + +static int +SProcDPMSInfo(client) + register ClientPtr client; +{ + REQUEST(xDPMSInfoReq); + register int n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xDPMSInfoReq); + + return ProcDPMSInfo(client); +} + +static int +SProcDPMSDispatch (client) + register ClientPtr client; +{ + REQUEST(xReq); + switch (stuff->data) + { + case X_DPMSGetVersion: + return SProcDPMSGetVersion(client); + case X_DPMSCapable: + return SProcDPMSCapable(client); + case X_DPMSGetTimeouts: + return SProcDPMSGetTimeouts(client); + case X_DPMSSetTimeouts: + return SProcDPMSSetTimeouts(client); + case X_DPMSEnable: + return SProcDPMSEnable(client); + case X_DPMSDisable: + return SProcDPMSDisable(client); + case X_DPMSForceLevel: + return SProcDPMSForceLevel(client); + case X_DPMSInfo: + return SProcDPMSInfo(client); + default: + return BadRequest; + } +} diff --git a/xorg-server-1.4/Xext/dpmsproc.h b/xorg-server-1.4/Xext/dpmsproc.h new file mode 100644 index 0000000..f5485ea --- /dev/null +++ b/xorg-server-1.4/Xext/dpmsproc.h @@ -0,0 +1,15 @@ + +/* Prototypes for functions that the DDX must provide */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _DPMSPROC_H_ +#define _DPMSPROC_H_ + +void DPMSSet(int level); +int DPMSGet(int *plevel); +Bool DPMSSupported(void); + +#endif diff --git a/xorg-server-1.4/Xext/dpmsstubs.c b/xorg-server-1.4/Xext/dpmsstubs.c new file mode 100644 index 0000000..9f99a2d --- /dev/null +++ b/xorg-server-1.4/Xext/dpmsstubs.c @@ -0,0 +1,52 @@ +/***************************************************************** + +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. + +******************************************************************/ + +typedef int Bool; + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "dpmsproc.h" + +#define FALSE 0 + +Bool DPMSSupported(void) +{ + return FALSE; +} + +int DPMSGet(int *plevel) +{ + return -1; +} + +void DPMSSet(int level) +{ + +} diff --git a/xorg-server-1.4/Xext/fontcache.c b/xorg-server-1.4/Xext/fontcache.c new file mode 100644 index 0000000..c54340b --- /dev/null +++ b/xorg-server-1.4/Xext/fontcache.c @@ -0,0 +1,330 @@ +/*- + * 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. + */ + +/* 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 +#include +#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/xorg-server-1.4/Xext/mbuf.c b/xorg-server-1.4/Xext/mbuf.c new file mode 100644 index 0000000..ed352e2 --- /dev/null +++ b/xorg-server-1.4/Xext/mbuf.c @@ -0,0 +1,1782 @@ +/************************************************************ + +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. + +********************************************************/ + +#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 + +#include +#if !defined(WIN32) && !defined(Lynx) +#include +#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 ( + pointer /* 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 ( + pointer /* 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 ( + pointer /* 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 ( + pointer /* 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 = (pointer) 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; +{ + pointer 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] = (pointer) background.pixel; + gcvalues[1] = (pointer) FillSolid; + gcmask = GCForeground|GCFillStyle; + break; + + case BackgroundPixmap: + gcvalues[0] = (pointer) FillTiled; + gcvalues[1] = (pointer) background.pixmap; + gcvalues[2] = (pointer)(long) ts_x_origin; + gcvalues[3] = (pointer)(long) ts_y_origin; + gcmask = GCFillStyle|GCTile|GCTileStipXOrigin|GCTileStipYOrigin; + break; + + default: + gcvalues[0] = (pointer) 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, (pointer) 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, (pointer) pMultibuffer)) + break; + pMultibuffer->pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, depth); + if (!pMultibuffer->pPixmap) + break; + if (!AddResource (ids[i], MultibufferDrawableResType, (pointer) 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 = (pointer) 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, i, err, rc; + + REQUEST_AT_LEAST_SIZE (xMbufCreateImageBuffersReq); + len = stuff->length - (sizeof(xMbufCreateImageBuffersReq) >> 2); + if (len == 0) + return BadLength; + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; + 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; + int rc; + + REQUEST_SIZE_MATCH (xMbufDestroyImageBuffersReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; + DestroyImageBuffers (pWin); + return Success; +} + +static int +ProcSetMBufferAttributes (client) + register ClientPtr client; +{ + REQUEST (xMbufSetMBufferAttributesReq); + WindowPtr pWin; + MultibuffersPtr pMultibuffers; + int len, rc; + Mask vmask; + Mask index2; + CARD32 updateHint; + XID *vlist; + + REQUEST_AT_LEAST_SIZE (xMbufSetMBufferAttributesReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; + 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, rc; + + REQUEST_SIZE_MATCH (xMbufGetMBufferAttributesReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; + 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((pointer) 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, n, rc; + xMbufBufferInfo *pInfo; + int nInfo; + DepthPtr pDepth; + + rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, + DixUnknownAccess); + if (rc != Success) + return rc; + 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), (pointer) &rep); + WriteToClient (client, (int) nInfo * sizeof (xMbufBufferInfo), (pointer) pInfo); + DEALLOCATE_LOCAL ((pointer) 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; + REGION_INIT(pScreen, ®ion, &box, 1); + MultibufferExpose(pMultibuffer, ®ion); + REGION_UNINIT(pScreen, ®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. + */ + REGION_TRANSLATE(pWin->drawable.pScreen, pWinSize, + -pWin->drawable.x, -pWin->drawable.y); + REGION_INTERSECT(pWin->drawable.pScreen, pExposed, + pExposed, pWinSize); + REGION_DESTROY(pWin->drawable.pScreen, pWinSize); + MultibufferExpose (pPrevMultibuffer, pExposed); + REGION_DESTROY(pWin->drawable.pScreen, 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 && !REGION_NIL(pRegion)) + { + xEvent *pEvent; + PixmapPtr pPixmap; + register xEvent *pe; + register BoxPtr pBox; + register int i; + int numRects; + + pPixmap = pMultibuffer->pPixmap; + REGION_TRANSLATE(pPixmap->drawable.pScreen, pRegion, + -pPixmap->drawable.x, -pPixmap->drawable.y); + /* XXX MultibufferExpose "knows" the region representation */ + numRects = REGION_NUM_RECTS(pRegion); + pBox = REGION_RECTS(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, + (pointer) pMultibuffer->pPixmap); + } + /* + * make the new association + */ + pMultibuffer = &pMultibuffers->buffers[i]; + ChangeResourceValue (pMultibuffer->pPixmap->drawable.id, + MultibufferDrawableResType, + (pointer) 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, + (pointer) pPixmap); + } + } + FreeScratchGC (pGC); + return TRUE; +} + +/* Resource delete func for MultibufferDrawableResType */ +/*ARGSUSED*/ +static int +MultibufferDrawableDelete (value, id) + pointer 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) + pointer 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) + pointer 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) + pointer 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, (pointer) 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/xorg-server-1.4/Xext/mbufbf.c b/xorg-server-1.4/Xext/mbufbf.c new file mode 100644 index 0000000..04fc487 --- /dev/null +++ b/xorg-server-1.4/Xext/mbufbf.c @@ -0,0 +1,1028 @@ +/* + +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. + +*/ + + +#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 = (pointer) 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; + REGION_INIT(pScreen, &pMBPriv->backBuffer, &box, 1); + REGION_INIT(pScreen, &pMBPriv->subtractRgn, &box, 1); + REGION_NULL(pScreen, &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 = (pointer) REGION_CREATE(pScreen, 0,0); + if (!pMBWindow->devPrivate.ptr) + return(0); + REGION_COPY(pScreen, (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, + (pointer) 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); + REGION_SUBTRACT(pScreen, &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]; + + REGION_DESTROY(pScreen, (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; + REGION_INIT(pScreen, ®, &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); + } + + REGION_INTERSECT(pScreen, ®, ®, &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 + REGION_UNINIT(pScreen, ®); + if (pBSReg) + REGION_DESTROY(pScreen, 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 + */ + + REGION_UNINIT(pScreen, &pMBPriv->backBuffer); + REGION_UNINIT(pScreen, &pMBPriv->subtractRgn); + REGION_UNINIT(pScreen, &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 (REGION_NUM_RECTS(prgn) == 0) + return; + + pDrawable = (DrawablePtr) selectPlane.ptr; + pGC = GetScratchGC (pDrawable->depth, pScreen); + if (!pGC) + return; + + prect = (xRectangle *)ALLOCATE_LOCAL(REGION_NUM_RECTS(prgn) * + sizeof(xRectangle)); + if (!prect) + { + FreeScratchGC(pGC); + return; + } + + value = (XID) bufferNum; + DoChangeGC(pGC, GCForeground, &value, 0); + ValidateGC(pDrawable, pGC); + + numRects = REGION_NUM_RECTS(prgn); + pbox = REGION_RECTS(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) + REGION_UNION(pScreen, backBuffer, backBuffer, + &pWin->clipList); + else + REGION_SUBTRACT(pScreen, 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; + REGION_VALIDATE(pScreen, pSubtractRgn, &overlap); +#ifdef DEBUG + if (overlap) + FatalError("bufPostValidateTree: subtractRgn overlaps"); +#endif + REGION_VALIDATE(pScreen, pUnionRgn, &overlap); +#ifdef DEBUG + if (overlap) + FatalError("bufPostValidateTree: unionRgn overlaps"); +#endif + + /* Update backBuffer: subtract must come before union */ + REGION_SUBTRACT(pScreen, &pMBPriv->backBuffer, &pMBPriv->backBuffer, + pSubtractRgn); + REGION_UNION(pScreen, &pMBPriv->backBuffer, &pMBPriv->backBuffer, + pUnionRgn); + + /* Paint gained and lost backbuffer areas in select plane */ + REGION_NULL(pScreen, &exposed); + REGION_SUBTRACT(pScreen, &exposed, pSubtractRgn, pUnionRgn); + (* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane, + &exposed, FRONT_BUFFER); + + REGION_SUBTRACT(pScreen, &exposed, pUnionRgn, pSubtractRgn); + (* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane, + &exposed, BACK_BUFFER); + + REGION_UNINIT(pScreen, &exposed); + REGION_EMPTY(pScreen, pSubtractRgn); + REGION_EMPTY(pScreen, 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 (! REGION_EQUAL(pScreen, pOldClipList, &pWin->clipList)) + { + if (pMBWindow->displayedMultibuffer == BACK_BUFFER) + { + pMBPriv->rgnChanged = TRUE; + REGION_APPEND(pScreen, &pMBPriv->subtractRgn, pOldClipList); + REGION_APPEND(pScreen, &pMBPriv->unionRgn, &pWin->clipList); + } + + REGION_COPY(pScreen, 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 && !REGION_NIL(prgn)); + + /* miWindowExposures munges prgn and other_exposed. */ + if (handleBuffers) + { + REGION_NULL(pScreen, &tmp_rgn); + REGION_COPY(pScreen, &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); + } + + REGION_UNINIT(pScreen, &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. */ + REGION_TRANSLATE(pScreen, 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/xorg-server-1.4/Xext/mbufpx.c b/xorg-server-1.4/Xext/mbufpx.c new file mode 100644 index 0000000..16717d3 --- /dev/null +++ b/xorg-server-1.4/Xext/mbufpx.c @@ -0,0 +1,649 @@ +/************************************************************ + +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. + +********************************************************/ + +#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 = (pointer) 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, + (pointer) 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 = REGION_NUM_RECTS(pRegion); + BoxPtr pbox = REGION_RECTS(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. + */ + REGION_TRANSLATE(pScreen, pWinSize, + -pWin->drawable.x, + -pWin->drawable.y); + REGION_INTERSECT(pScreen, pExposed, pExposed, pWinSize); + REGION_DESTROY(pScreen, pWinSize); + MultibufferExpose (pPrevMBBuffer, pExposed); + REGION_DESTROY(pScreen, 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; + REGION_INIT(pScreen, &exposedRegion, &box, 1); + if (pWin->bitGravity != ForgetGravity) + { + RegionRec preservedRegion; + box.x1 = destx; + box.y1 = desty; + box.x2 = destx + savewidth; + box.y2 = desty + saveheight; + REGION_INIT(pScreen, &preservedRegion, &box, 1); + REGION_SUBTRACT(pScreen, &exposedRegion, &exposedRegion, &preservedRegion); + REGION_UNINIT(pScreen, &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, + (pointer) pPixmap); + } + } + FreeScratchGC (pGC); + if (clear) + REGION_UNINIT(pScreen, &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; + + REGION_INIT(pScreen, ®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); + + REGION_UNINIT(pScreen, ®ion); +} + +static void +pixDeleteBufferDrawable(pDrawable) + DrawablePtr pDrawable; +{ + (* pDrawable->pScreen->DestroyPixmap)((PixmapPtr) pDrawable); +} diff --git a/xorg-server-1.4/Xext/mitmisc.c b/xorg-server-1.4/Xext/mitmisc.c new file mode 100644 index 0000000..924b880 --- /dev/null +++ b/xorg-server-1.4/Xext/mitmisc.c @@ -0,0 +1,168 @@ +/************************************************************ + +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 */ + + +#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" + +#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 != xFalse) + return BadRequest; + 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 = FALSE; + 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/xorg-server-1.4/Xext/panoramiX.c b/xorg-server-1.4/Xext/panoramiX.c new file mode 100644 index 0000000..95df043 --- /dev/null +++ b/xorg-server-1.4/Xext/panoramiX.c @@ -0,0 +1,1265 @@ +/***************************************************************** +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. +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifdef HAVE_DMX_CONFIG_H +#include +#endif + +#define NEED_REPLIES +#include +#include +#include +#include +#include "misc.h" +#include "cursor.h" +#include "cursorstr.h" +#include "extnsionst.h" +#include "dixstruct.h" +#include "gc.h" +#include "gcstruct.h" +#include "scrnintstr.h" +#include "window.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "panoramiX.h" +#include +#include "panoramiXsrv.h" +#include "globals.h" +#include "servermd.h" +#include "resource.h" +#ifdef RENDER +#include "picturestr.h" +#endif +#include "modinit.h" + + +#ifdef GLXPROXY +extern VisualPtr glxMatchVisual(ScreenPtr pScreen, + VisualPtr pVisual, + ScreenPtr pMatchScreen); +#endif + +#if 0 +static unsigned char PanoramiXReqCode = 0; +#endif +/* + * PanoramiX data declarations + */ + +int PanoramiXPixWidth = 0; +int PanoramiXPixHeight = 0; +_X_EXPORT int PanoramiXNumScreens = 0; + +_X_EXPORT PanoramiXData *panoramiXdataPtr = NULL; +static RegionRec PanoramiXScreenRegion = {{0, 0, 0, 0}, NULL}; + +static int PanoramiXNumDepths; +static DepthPtr PanoramiXDepths; +static int PanoramiXNumVisuals; +static VisualPtr PanoramiXVisuals; + +/* We support at most 256 visuals */ +_X_EXPORT XID *PanoramiXVisualTable = NULL; + +_X_EXPORT unsigned long XRC_DRAWABLE; +_X_EXPORT unsigned long XRT_WINDOW; +_X_EXPORT unsigned long XRT_PIXMAP; +_X_EXPORT unsigned long XRT_GC; +_X_EXPORT unsigned long XRT_COLORMAP; + +/* + * Function prototypes + */ + +static int panoramiXGeneration; +static int ProcPanoramiXDispatch(ClientPtr client); + +static void PanoramiXResetProc(ExtensionEntry*); + +/* + * External references for functions and data variables + */ + +#include "panoramiXh.h" + +int (* SavedProcVector[256]) (ClientPtr client) = { NULL, }; + +static int PanoramiXGCIndex = -1; +static int PanoramiXScreenIndex = -1; + +typedef struct { + DDXPointRec clipOrg; + DDXPointRec patOrg; + GCFuncs *wrapFuncs; +} PanoramiXGCRec, *PanoramiXGCPtr; + +typedef struct { + CreateGCProcPtr CreateGC; + CloseScreenProcPtr CloseScreen; +} PanoramiXScreenRec, *PanoramiXScreenPtr; + +RegionRec XineramaScreenRegions[MAXSCREENS]; + +static void XineramaValidateGC(GCPtr, unsigned long, DrawablePtr); +static void XineramaChangeGC(GCPtr, unsigned long); +static void XineramaCopyGC(GCPtr, unsigned long, GCPtr); +static void XineramaDestroyGC(GCPtr); +static void XineramaChangeClip(GCPtr, int, pointer, int); +static void XineramaDestroyClip(GCPtr); +static void XineramaCopyClip(GCPtr, GCPtr); + +static GCFuncs XineramaGCFuncs = { + XineramaValidateGC, XineramaChangeGC, XineramaCopyGC, XineramaDestroyGC, + XineramaChangeClip, XineramaDestroyClip, XineramaCopyClip +}; + +#define Xinerama_GC_FUNC_PROLOGUE(pGC)\ + PanoramiXGCPtr pGCPriv = \ + (PanoramiXGCPtr) (pGC)->devPrivates[PanoramiXGCIndex].ptr;\ + (pGC)->funcs = pGCPriv->wrapFuncs; + +#define Xinerama_GC_FUNC_EPILOGUE(pGC)\ + pGCPriv->wrapFuncs = (pGC)->funcs;\ + (pGC)->funcs = &XineramaGCFuncs; + + +static Bool +XineramaCloseScreen (int i, ScreenPtr pScreen) +{ + PanoramiXScreenPtr pScreenPriv = + (PanoramiXScreenPtr) pScreen->devPrivates[PanoramiXScreenIndex].ptr; + + pScreen->CloseScreen = pScreenPriv->CloseScreen; + pScreen->CreateGC = pScreenPriv->CreateGC; + + REGION_UNINIT(pScreen, &XineramaScreenRegions[pScreen->myNum]); + if (pScreen->myNum == 0) + REGION_UNINIT(pScreen, &PanoramiXScreenRegion); + + xfree ((pointer) pScreenPriv); + + return (*pScreen->CloseScreen) (i, pScreen); +} + +static Bool +XineramaCreateGC(GCPtr pGC) +{ + ScreenPtr pScreen = pGC->pScreen; + PanoramiXScreenPtr pScreenPriv = + (PanoramiXScreenPtr) pScreen->devPrivates[PanoramiXScreenIndex].ptr; + Bool ret; + + pScreen->CreateGC = pScreenPriv->CreateGC; + if((ret = (*pScreen->CreateGC)(pGC))) { + PanoramiXGCPtr pGCPriv = + (PanoramiXGCPtr) pGC->devPrivates[PanoramiXGCIndex].ptr; + + pGCPriv->wrapFuncs = pGC->funcs; + pGC->funcs = &XineramaGCFuncs; + + pGCPriv->clipOrg.x = pGC->clipOrg.x; + pGCPriv->clipOrg.y = pGC->clipOrg.y; + pGCPriv->patOrg.x = pGC->patOrg.x; + pGCPriv->patOrg.y = pGC->patOrg.y; + } + pScreen->CreateGC = XineramaCreateGC; + + return ret; +} + +static void +XineramaValidateGC( + GCPtr pGC, + unsigned long changes, + DrawablePtr pDraw +){ + Xinerama_GC_FUNC_PROLOGUE (pGC); + + if((pDraw->type == DRAWABLE_WINDOW) && !(((WindowPtr)pDraw)->parent)) { + /* the root window */ + int x_off = panoramiXdataPtr[pGC->pScreen->myNum].x; + int y_off = panoramiXdataPtr[pGC->pScreen->myNum].y; + int new_val; + + new_val = pGCPriv->clipOrg.x - x_off; + if(pGC->clipOrg.x != new_val) { + pGC->clipOrg.x = new_val; + changes |= GCClipXOrigin; + } + new_val = pGCPriv->clipOrg.y - y_off; + if(pGC->clipOrg.y != new_val) { + pGC->clipOrg.y = new_val; + changes |= GCClipYOrigin; + } + new_val = pGCPriv->patOrg.x - x_off; + if(pGC->patOrg.x != new_val) { + pGC->patOrg.x = new_val; + changes |= GCTileStipXOrigin; + } + new_val = pGCPriv->patOrg.y - y_off; + if(pGC->patOrg.y != new_val) { + pGC->patOrg.y = new_val; + changes |= GCTileStipYOrigin; + } + } else { + if(pGC->clipOrg.x != pGCPriv->clipOrg.x) { + pGC->clipOrg.x = pGCPriv->clipOrg.x; + changes |= GCClipXOrigin; + } + if(pGC->clipOrg.y != pGCPriv->clipOrg.y) { + pGC->clipOrg.y = pGCPriv->clipOrg.y; + changes |= GCClipYOrigin; + } + if(pGC->patOrg.x != pGCPriv->patOrg.x) { + pGC->patOrg.x = pGCPriv->patOrg.x; + changes |= GCTileStipXOrigin; + } + if(pGC->patOrg.y != pGCPriv->patOrg.y) { + pGC->patOrg.y = pGCPriv->patOrg.y; + changes |= GCTileStipYOrigin; + } + } + + (*pGC->funcs->ValidateGC)(pGC, changes, pDraw); + Xinerama_GC_FUNC_EPILOGUE (pGC); +} + +static void +XineramaDestroyGC(GCPtr pGC) +{ + Xinerama_GC_FUNC_PROLOGUE (pGC); + (*pGC->funcs->DestroyGC)(pGC); + Xinerama_GC_FUNC_EPILOGUE (pGC); +} + +static void +XineramaChangeGC ( + GCPtr pGC, + unsigned long mask +){ + Xinerama_GC_FUNC_PROLOGUE (pGC); + + if(mask & GCTileStipXOrigin) + pGCPriv->patOrg.x = pGC->patOrg.x; + if(mask & GCTileStipYOrigin) + pGCPriv->patOrg.y = pGC->patOrg.y; + if(mask & GCClipXOrigin) + pGCPriv->clipOrg.x = pGC->clipOrg.x; + if(mask & GCClipYOrigin) + pGCPriv->clipOrg.y = pGC->clipOrg.y; + + (*pGC->funcs->ChangeGC) (pGC, mask); + Xinerama_GC_FUNC_EPILOGUE (pGC); +} + +static void +XineramaCopyGC ( + GCPtr pGCSrc, + unsigned long mask, + GCPtr pGCDst +){ + PanoramiXGCPtr pSrcPriv = + (PanoramiXGCPtr) pGCSrc->devPrivates[PanoramiXGCIndex].ptr; + Xinerama_GC_FUNC_PROLOGUE (pGCDst); + + if(mask & GCTileStipXOrigin) + pGCPriv->patOrg.x = pSrcPriv->patOrg.x; + if(mask & GCTileStipYOrigin) + pGCPriv->patOrg.y = pSrcPriv->patOrg.y; + if(mask & GCClipXOrigin) + pGCPriv->clipOrg.x = pSrcPriv->clipOrg.x; + if(mask & GCClipYOrigin) + pGCPriv->clipOrg.y = pSrcPriv->clipOrg.y; + + (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); + Xinerama_GC_FUNC_EPILOGUE (pGCDst); +} + +static void +XineramaChangeClip ( + GCPtr pGC, + int type, + pointer pvalue, + int nrects +){ + Xinerama_GC_FUNC_PROLOGUE (pGC); + (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); + Xinerama_GC_FUNC_EPILOGUE (pGC); +} + +static void +XineramaCopyClip(GCPtr pgcDst, GCPtr pgcSrc) +{ + Xinerama_GC_FUNC_PROLOGUE (pgcDst); + (* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc); + Xinerama_GC_FUNC_EPILOGUE (pgcDst); +} + +static void +XineramaDestroyClip(GCPtr pGC) +{ + Xinerama_GC_FUNC_PROLOGUE (pGC); + (* pGC->funcs->DestroyClip)(pGC); + Xinerama_GC_FUNC_EPILOGUE (pGC); +} + +_X_EXPORT int +XineramaDeleteResource(pointer data, XID id) +{ + xfree(data); + return 1; +} + +typedef struct { + int screen; + int id; +} PanoramiXSearchData; + +static Bool +XineramaFindIDByScrnum(pointer resource, XID id, pointer privdata) +{ + PanoramiXRes *res = (PanoramiXRes*)resource; + PanoramiXSearchData *data = (PanoramiXSearchData*)privdata; + + return (res->info[data->screen].id == data->id); +} + +PanoramiXRes * +PanoramiXFindIDByScrnum(RESTYPE type, XID id, int screen) +{ + PanoramiXSearchData data; + + if(!screen) + return LookupIDByType(id, type); + + data.screen = screen; + data.id = id; + + return LookupClientResourceComplex(clients[CLIENT_ID(id)], type, + XineramaFindIDByScrnum, &data); +} + +typedef struct _connect_callback_list { + void (*func)(void); + struct _connect_callback_list *next; +} XineramaConnectionCallbackList; + +static XineramaConnectionCallbackList *ConnectionCallbackList = NULL; + +_X_EXPORT Bool +XineramaRegisterConnectionBlockCallback(void (*func)(void)) +{ + XineramaConnectionCallbackList *newlist; + + if(!(newlist = xalloc(sizeof(XineramaConnectionCallbackList)))) + return FALSE; + + newlist->next = ConnectionCallbackList; + newlist->func = func; + ConnectionCallbackList = newlist; + + return TRUE; +} + +static void XineramaInitData(ScreenPtr pScreen) +{ + int i, w, h; + + REGION_NULL(pScreen, &PanoramiXScreenRegion) + for (i = 0; i < PanoramiXNumScreens; i++) { + BoxRec TheBox; + + pScreen = screenInfo.screens[i]; + + panoramiXdataPtr[i].x = dixScreenOrigins[i].x; + panoramiXdataPtr[i].y = dixScreenOrigins[i].y; + panoramiXdataPtr[i].width = pScreen->width; + panoramiXdataPtr[i].height = pScreen->height; + + TheBox.x1 = panoramiXdataPtr[i].x; + TheBox.x2 = TheBox.x1 + panoramiXdataPtr[i].width; + TheBox.y1 = panoramiXdataPtr[i].y; + TheBox.y2 = TheBox.y1 + panoramiXdataPtr[i].height; + + REGION_INIT(pScreen, &XineramaScreenRegions[i], &TheBox, 1); + REGION_UNION(pScreen, &PanoramiXScreenRegion, &PanoramiXScreenRegion, + &XineramaScreenRegions[i]); + } + + PanoramiXPixWidth = panoramiXdataPtr[0].x + panoramiXdataPtr[0].width; + PanoramiXPixHeight = panoramiXdataPtr[0].y + panoramiXdataPtr[0].height; + + for (i = 1; i < PanoramiXNumScreens; i++) { + w = panoramiXdataPtr[i].x + panoramiXdataPtr[i].width; + h = panoramiXdataPtr[i].y + panoramiXdataPtr[i].height; + + if (PanoramiXPixWidth < w) + PanoramiXPixWidth = w; + if (PanoramiXPixHeight < h) + PanoramiXPixHeight = h; + } +} + +void XineramaReinitData(ScreenPtr pScreen) +{ + int i; + + REGION_UNINIT(pScreen, &PanoramiXScreenRegion); + for (i = 0; i < PanoramiXNumScreens; i++) + REGION_UNINIT(pScreen, &XineramaScreenRegions[i]); + + XineramaInitData(pScreen); +} + +/* + * PanoramiXExtensionInit(): + * Called from InitExtensions in main(). + * Register PanoramiXeen Extension + * Initialize global variables. + */ + +void PanoramiXExtensionInit(int argc, char *argv[]) +{ + int i; + Bool success = FALSE; + ExtensionEntry *extEntry; + ScreenPtr pScreen = screenInfo.screens[0]; + PanoramiXScreenPtr pScreenPriv; + + if (noPanoramiXExtension) + return; + + PanoramiXNumScreens = screenInfo.numScreens; + if (PanoramiXNumScreens == 1) { /* Only 1 screen */ + noPanoramiXExtension = TRUE; + return; + } + + while (panoramiXGeneration != serverGeneration) { + extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0,0, + ProcPanoramiXDispatch, + SProcPanoramiXDispatch, PanoramiXResetProc, + StandardMinorOpcode); + if (!extEntry) { + ErrorF("PanoramiXExtensionInit(): failed to AddExtension\n"); + break; + } + +#if 0 + PanoramiXReqCode = (unsigned char)extEntry->base; +#endif + + /* + * First make sure all the basic allocations succeed. If not, + * run in non-PanoramiXeen mode. + */ + + panoramiXdataPtr = (PanoramiXData *) + xcalloc(PanoramiXNumScreens, sizeof(PanoramiXData)); + + BREAK_IF(!panoramiXdataPtr); + BREAK_IF((PanoramiXGCIndex = AllocateGCPrivateIndex()) < 0); + BREAK_IF((PanoramiXScreenIndex = AllocateScreenPrivateIndex()) < 0); + + for (i = 0; i < PanoramiXNumScreens; i++) { + pScreen = screenInfo.screens[i]; + if(!AllocateGCPrivate(pScreen, PanoramiXGCIndex, + sizeof(PanoramiXGCRec))) { + noPanoramiXExtension = TRUE; + return; + } + + pScreenPriv = xalloc(sizeof(PanoramiXScreenRec)); + pScreen->devPrivates[PanoramiXScreenIndex].ptr = + (pointer)pScreenPriv; + if(!pScreenPriv) { + noPanoramiXExtension = TRUE; + return; + } + + pScreenPriv->CreateGC = pScreen->CreateGC; + pScreenPriv->CloseScreen = pScreen->CloseScreen; + + pScreen->CreateGC = XineramaCreateGC; + pScreen->CloseScreen = XineramaCloseScreen; + } + + XRC_DRAWABLE = CreateNewResourceClass(); + XRT_WINDOW = CreateNewResourceType(XineramaDeleteResource) | + XRC_DRAWABLE; + XRT_PIXMAP = CreateNewResourceType(XineramaDeleteResource) | + XRC_DRAWABLE; + XRT_GC = CreateNewResourceType(XineramaDeleteResource); + XRT_COLORMAP = CreateNewResourceType(XineramaDeleteResource); + + panoramiXGeneration = serverGeneration; + success = TRUE; + } + + if (!success) { + noPanoramiXExtension = TRUE; + ErrorF("%s Extension failed to initialize\n", PANORAMIX_PROTOCOL_NAME); + return; + } + + XineramaInitData(pScreen); + + /* + * Put our processes into the ProcVector + */ + + for (i = 256; i--; ) + SavedProcVector[i] = ProcVector[i]; + + ProcVector[X_CreateWindow] = PanoramiXCreateWindow; + ProcVector[X_ChangeWindowAttributes] = PanoramiXChangeWindowAttributes; + ProcVector[X_DestroyWindow] = PanoramiXDestroyWindow; + ProcVector[X_DestroySubwindows] = PanoramiXDestroySubwindows; + ProcVector[X_ChangeSaveSet] = PanoramiXChangeSaveSet; + ProcVector[X_ReparentWindow] = PanoramiXReparentWindow; + ProcVector[X_MapWindow] = PanoramiXMapWindow; + ProcVector[X_MapSubwindows] = PanoramiXMapSubwindows; + ProcVector[X_UnmapWindow] = PanoramiXUnmapWindow; + ProcVector[X_UnmapSubwindows] = PanoramiXUnmapSubwindows; + ProcVector[X_ConfigureWindow] = PanoramiXConfigureWindow; + ProcVector[X_CirculateWindow] = PanoramiXCirculateWindow; + ProcVector[X_GetGeometry] = PanoramiXGetGeometry; + ProcVector[X_TranslateCoords] = PanoramiXTranslateCoords; + ProcVector[X_CreatePixmap] = PanoramiXCreatePixmap; + ProcVector[X_FreePixmap] = PanoramiXFreePixmap; + ProcVector[X_CreateGC] = PanoramiXCreateGC; + ProcVector[X_ChangeGC] = PanoramiXChangeGC; + ProcVector[X_CopyGC] = PanoramiXCopyGC; + ProcVector[X_SetDashes] = PanoramiXSetDashes; + ProcVector[X_SetClipRectangles] = PanoramiXSetClipRectangles; + ProcVector[X_FreeGC] = PanoramiXFreeGC; + ProcVector[X_ClearArea] = PanoramiXClearToBackground; + ProcVector[X_CopyArea] = PanoramiXCopyArea;; + ProcVector[X_CopyPlane] = PanoramiXCopyPlane;; + ProcVector[X_PolyPoint] = PanoramiXPolyPoint; + ProcVector[X_PolyLine] = PanoramiXPolyLine; + ProcVector[X_PolySegment] = PanoramiXPolySegment; + ProcVector[X_PolyRectangle] = PanoramiXPolyRectangle; + ProcVector[X_PolyArc] = PanoramiXPolyArc; + ProcVector[X_FillPoly] = PanoramiXFillPoly; + ProcVector[X_PolyFillRectangle] = PanoramiXPolyFillRectangle; + ProcVector[X_PolyFillArc] = PanoramiXPolyFillArc; + ProcVector[X_PutImage] = PanoramiXPutImage; + ProcVector[X_GetImage] = PanoramiXGetImage; + ProcVector[X_PolyText8] = PanoramiXPolyText8; + ProcVector[X_PolyText16] = PanoramiXPolyText16; + ProcVector[X_ImageText8] = PanoramiXImageText8; + ProcVector[X_ImageText16] = PanoramiXImageText16; + ProcVector[X_CreateColormap] = PanoramiXCreateColormap; + ProcVector[X_FreeColormap] = PanoramiXFreeColormap; + ProcVector[X_CopyColormapAndFree] = PanoramiXCopyColormapAndFree; + ProcVector[X_InstallColormap] = PanoramiXInstallColormap; + ProcVector[X_UninstallColormap] = PanoramiXUninstallColormap; + ProcVector[X_AllocColor] = PanoramiXAllocColor; + ProcVector[X_AllocNamedColor] = PanoramiXAllocNamedColor; + ProcVector[X_AllocColorCells] = PanoramiXAllocColorCells; + ProcVector[X_AllocColorPlanes] = PanoramiXAllocColorPlanes; + ProcVector[X_FreeColors] = PanoramiXFreeColors; + ProcVector[X_StoreColors] = PanoramiXStoreColors; + ProcVector[X_StoreNamedColor] = PanoramiXStoreNamedColor; + +#ifdef RENDER + PanoramiXRenderInit (); +#endif +} + +extern Bool CreateConnectionBlock(void); + +Bool PanoramiXCreateConnectionBlock(void) +{ + int i, j, length; + Bool disableBackingStore = FALSE; + Bool disableSaveUnders = FALSE; + int old_width, old_height; + float width_mult, height_mult; + xWindowRoot *root; + xVisualType *visual; + xDepth *depth; + VisualPtr pVisual; + ScreenPtr pScreen; + + /* + * Do normal CreateConnectionBlock but faking it for only one screen + */ + + if(!PanoramiXNumDepths) { + ErrorF("PanoramiX error: Incompatible screens. No common visuals\n"); + return FALSE; + } + + for(i = 1; i < screenInfo.numScreens; i++) { + pScreen = screenInfo.screens[i]; + if(pScreen->rootDepth != screenInfo.screens[0]->rootDepth) { + ErrorF("PanoramiX error: Incompatible screens. Root window depths differ\n"); + return FALSE; + } + if(pScreen->backingStoreSupport != screenInfo.screens[0]->backingStoreSupport) + disableBackingStore = TRUE; + if(pScreen->saveUnderSupport != screenInfo.screens[0]->saveUnderSupport) + disableSaveUnders = TRUE; + } + + if(disableBackingStore || disableSaveUnders) { + for(i = 0; i < screenInfo.numScreens; i++) { + pScreen = screenInfo.screens[i]; + if(disableBackingStore) + pScreen->backingStoreSupport = NotUseful; + if(disableSaveUnders) + pScreen->saveUnderSupport = NotUseful; + } + } + + i = screenInfo.numScreens; + screenInfo.numScreens = 1; + if (!CreateConnectionBlock()) { + screenInfo.numScreens = i; + return FALSE; + } + + screenInfo.numScreens = i; + + root = (xWindowRoot *) (ConnectionInfo + connBlockScreenStart); + length = connBlockScreenStart + sizeof(xWindowRoot); + + /* overwrite the connection block */ + root->nDepths = PanoramiXNumDepths; + + for (i = 0; i < PanoramiXNumDepths; i++) { + depth = (xDepth *) (ConnectionInfo + length); + depth->depth = PanoramiXDepths[i].depth; + depth->nVisuals = PanoramiXDepths[i].numVids; + length += sizeof(xDepth); + visual = (xVisualType *)(ConnectionInfo + length); + + for (j = 0; j < depth->nVisuals; j++, visual++) { + visual->visualID = PanoramiXDepths[i].vids[j]; + + for (pVisual = PanoramiXVisuals; + pVisual->vid != visual->visualID; + pVisual++) + ; + + visual->class = pVisual->class; + visual->bitsPerRGB = pVisual->bitsPerRGBValue; + visual->colormapEntries = pVisual->ColormapEntries; + visual->redMask = pVisual->redMask; + visual->greenMask = pVisual->greenMask; + visual->blueMask = pVisual->blueMask; + } + + length += (depth->nVisuals * sizeof(xVisualType)); + } + + connSetupPrefix.length = length >> 2; + + xfree(PanoramiXVisuals); + for (i = 0; i < PanoramiXNumDepths; i++) + xfree(PanoramiXDepths[i].vids); + xfree(PanoramiXDepths); + + /* + * OK, change some dimensions so it looks as if it were one big screen + */ + + old_width = root->pixWidth; + old_height = root->pixHeight; + + root->pixWidth = PanoramiXPixWidth; + root->pixHeight = PanoramiXPixHeight; + width_mult = (1.0 * root->pixWidth) / old_width; + height_mult = (1.0 * root->pixHeight) / old_height; + root->mmWidth *= width_mult; + root->mmHeight *= height_mult; + + while(ConnectionCallbackList) { + pointer tmp; + + tmp = (pointer)ConnectionCallbackList; + (*ConnectionCallbackList->func)(); + ConnectionCallbackList = ConnectionCallbackList->next; + xfree(tmp); + } + + return TRUE; +} + +extern +void PanoramiXConsolidate(void) +{ + int i, j, k; + VisualPtr pVisual, pVisual2; + ScreenPtr pScreen, pScreen2; + DepthPtr pDepth, pDepth2; + PanoramiXRes *root, *defmap, *saver; + Bool foundDepth, missingDepth; + + if(!PanoramiXVisualTable) + PanoramiXVisualTable = xcalloc(256 * MAXSCREENS, sizeof(XID)); + + pScreen = screenInfo.screens[0]; + pVisual = pScreen->visuals; + pDepth = pScreen->allowedDepths; + + PanoramiXNumDepths = 0; + PanoramiXDepths = xcalloc(pScreen->numDepths,sizeof(DepthRec)); + PanoramiXNumVisuals = 0; + PanoramiXVisuals = xcalloc(pScreen->numVisuals,sizeof(VisualRec)); + + for (i = 0; i < pScreen->numDepths; i++, pDepth++) { + missingDepth = FALSE; + for (j = 1; j < PanoramiXNumScreens; j++) { + pScreen2 = screenInfo.screens[j]; + pDepth2 = pScreen2->allowedDepths; + + foundDepth = FALSE; + for (k = 0; k < pScreen2->numDepths; k++, pDepth2++) { + if(pDepth2->depth == pDepth->depth) { + foundDepth = TRUE; + break; + } + } + + if(!foundDepth) { + missingDepth = TRUE; + break; + } + } + + if(!missingDepth) { + PanoramiXDepths[PanoramiXNumDepths].depth = pDepth->depth; + PanoramiXDepths[PanoramiXNumDepths].numVids = 0; + if(pDepth->numVids) + PanoramiXDepths[PanoramiXNumDepths].vids = + xalloc(sizeof(VisualID) * pDepth->numVids); + else + PanoramiXDepths[PanoramiXNumDepths].vids = NULL; + PanoramiXNumDepths++; + } + } + + for (i = 0; i < pScreen->numVisuals; i++, pVisual++) { + PanoramiXVisualTable[pVisual->vid * MAXSCREENS] = pVisual->vid; + + /* check if the visual exists on all screens */ + for (j = 1; j < PanoramiXNumScreens; j++) { + pScreen2 = screenInfo.screens[j]; + +#ifdef GLXPROXY + pVisual2 = glxMatchVisual(pScreen, pVisual, pScreen2); + if (pVisual2) { + PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j] = + pVisual2->vid; + continue; + } else if (glxMatchVisual(pScreen, pVisual, pScreen)) { + PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j] = 0; + break; + } +#endif + pVisual2 = pScreen2->visuals; + + for (k = 0; k < pScreen2->numVisuals; k++, pVisual2++) { + if ((pVisual->class == pVisual2->class) && + (pVisual->ColormapEntries == pVisual2->ColormapEntries) && + (pVisual->nplanes == pVisual2->nplanes) && + (pVisual->redMask == pVisual2->redMask) && + (pVisual->greenMask == pVisual2->greenMask) && + (pVisual->blueMask == pVisual2->blueMask) && + (pVisual->offsetRed == pVisual2->offsetRed) && + (pVisual->offsetGreen == pVisual2->offsetGreen) && + (pVisual->offsetBlue == pVisual2->offsetBlue)) + { + /* We merely assign the first visual that matches. OpenGL + will need to get involved at some point if you want + match GLX visuals */ + PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j] = + pVisual2->vid; + break; + } + } + } + + /* if it doesn't exist on all screens we can't use it */ + for (j = 0; j < PanoramiXNumScreens; j++) { + if (!PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j]) { + PanoramiXVisualTable[pVisual->vid * MAXSCREENS] = 0; + break; + } + } + + /* if it does, make sure it's in the list of supported depths and visuals */ + if(PanoramiXVisualTable[pVisual->vid * MAXSCREENS]) { + PanoramiXVisuals[PanoramiXNumVisuals].vid = pVisual->vid; + PanoramiXVisuals[PanoramiXNumVisuals].class = pVisual->class; + PanoramiXVisuals[PanoramiXNumVisuals].bitsPerRGBValue = pVisual->bitsPerRGBValue; + PanoramiXVisuals[PanoramiXNumVisuals].ColormapEntries = pVisual->ColormapEntries; + PanoramiXVisuals[PanoramiXNumVisuals].nplanes = pVisual->nplanes; + PanoramiXVisuals[PanoramiXNumVisuals].redMask = pVisual->redMask; + PanoramiXVisuals[PanoramiXNumVisuals].greenMask = pVisual->greenMask; + PanoramiXVisuals[PanoramiXNumVisuals].blueMask = pVisual->blueMask; + PanoramiXVisuals[PanoramiXNumVisuals].offsetRed = pVisual->offsetRed; + PanoramiXVisuals[PanoramiXNumVisuals].offsetGreen = pVisual->offsetGreen; + PanoramiXVisuals[PanoramiXNumVisuals].offsetBlue = pVisual->offsetBlue; + PanoramiXNumVisuals++; + + for (j = 0; j < PanoramiXNumDepths; j++) { + if (PanoramiXDepths[j].depth == pVisual->nplanes) { + PanoramiXDepths[j].vids[PanoramiXDepths[j].numVids] = pVisual->vid; + PanoramiXDepths[j].numVids++; + break; + } + } + } + } + + + root = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)); + root->type = XRT_WINDOW; + defmap = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)); + defmap->type = XRT_COLORMAP; + saver = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)); + saver->type = XRT_WINDOW; + + + for (i = 0; i < PanoramiXNumScreens; i++) { + root->info[i].id = WindowTable[i]->drawable.id; + root->u.win.class = InputOutput; + root->u.win.root = TRUE; + saver->info[i].id = savedScreenInfo[i].wid; + saver->u.win.class = InputOutput; + saver->u.win.root = TRUE; + defmap->info[i].id = (screenInfo.screens[i])->defColormap; + } + + AddResource(root->info[0].id, XRT_WINDOW, root); + AddResource(saver->info[0].id, XRT_WINDOW, saver); + AddResource(defmap->info[0].id, XRT_COLORMAP, defmap); +} + + +/* + * PanoramiXResetProc() + * Exit, deallocating as needed. + */ + +static void PanoramiXResetProc(ExtensionEntry* extEntry) +{ + int i; + +#ifdef RENDER + PanoramiXRenderReset (); +#endif + screenInfo.numScreens = PanoramiXNumScreens; + for (i = 256; i--; ) + ProcVector[i] = SavedProcVector[i]; + + Xfree(panoramiXdataPtr); +} + + +int +ProcPanoramiXQueryVersion (ClientPtr client) +{ + /* REQUEST(xPanoramiXQueryVersionReq); */ + xPanoramiXQueryVersionReply rep; + register int n; + + REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.majorVersion = PANORAMIX_MAJOR_VERSION; + rep.minorVersion = PANORAMIX_MINOR_VERSION; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swaps(&rep.majorVersion, n); + swaps(&rep.minorVersion, n); + } + WriteToClient(client, sizeof (xPanoramiXQueryVersionReply), (char *)&rep); + return (client->noClientException); +} + +int +ProcPanoramiXGetState(ClientPtr client) +{ + REQUEST(xPanoramiXGetStateReq); + WindowPtr pWin; + xPanoramiXGetStateReply rep; + register int n, rc; + + REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.state = !noPanoramiXExtension; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swaps (&rep.state, n); + } + WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep); + return client->noClientException; + +} + +int +ProcPanoramiXGetScreenCount(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenCountReq); + WindowPtr pWin; + xPanoramiXGetScreenCountReply rep; + register int n, rc; + + REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.ScreenCount = PanoramiXNumScreens; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swaps (&rep.ScreenCount, n); + } + WriteToClient (client, sizeof (xPanoramiXGetScreenCountReply), (char *) &rep); + return client->noClientException; +} + +int +ProcPanoramiXGetScreenSize(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenSizeReq); + WindowPtr pWin; + xPanoramiXGetScreenSizeReply rep; + register int n, rc; + + REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + /* screen dimensions */ + rep.width = panoramiXdataPtr[stuff->screen].width; + rep.height = panoramiXdataPtr[stuff->screen].height; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swaps (&rep.width, n); + swaps (&rep.height, n); + } + WriteToClient (client, sizeof (xPanoramiXGetScreenSizeReply), (char *) &rep); + return client->noClientException; +} + + +int +ProcXineramaIsActive(ClientPtr client) +{ + /* REQUEST(xXineramaIsActiveReq); */ + xXineramaIsActiveReply rep; + + REQUEST_SIZE_MATCH(xXineramaIsActiveReq); + + 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. */ + rep.state = !noPanoramiXExtension && !PanoramiXExtensionDisabledHack; + } +#else + rep.state = !noPanoramiXExtension; +#endif + if (client->swapped) { + register int n; + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.state, n); + } + WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep); + return client->noClientException; +} + + +int +ProcXineramaQueryScreens(ClientPtr client) +{ + /* REQUEST(xXineramaQueryScreensReq); */ + xXineramaQueryScreensReply rep; + + REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens; + rep.length = rep.number * sz_XineramaScreenInfo >> 2; + if (client->swapped) { + register int n; + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.number, n); + } + WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep); + + if(!noPanoramiXExtension) { + xXineramaScreenInfo scratch; + int i; + + for(i = 0; i < PanoramiXNumScreens; i++) { + scratch.x_org = panoramiXdataPtr[i].x; + scratch.y_org = panoramiXdataPtr[i].y; + scratch.width = panoramiXdataPtr[i].width; + scratch.height = panoramiXdataPtr[i].height; + + if(client->swapped) { + register int n; + swaps (&scratch.x_org, n); + swaps (&scratch.y_org, n); + swaps (&scratch.width, n); + swaps (&scratch.height, n); + } + WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch); + } + } + + return client->noClientException; +} + + +static int +ProcPanoramiXDispatch (ClientPtr client) +{ REQUEST(xReq); + switch (stuff->data) + { + case X_PanoramiXQueryVersion: + return ProcPanoramiXQueryVersion(client); + case X_PanoramiXGetState: + return ProcPanoramiXGetState(client); + case X_PanoramiXGetScreenCount: + return ProcPanoramiXGetScreenCount(client); + case X_PanoramiXGetScreenSize: + return ProcPanoramiXGetScreenSize(client); + case X_XineramaIsActive: + return ProcXineramaIsActive(client); + case X_XineramaQueryScreens: + return ProcXineramaQueryScreens(client); + } + return BadRequest; +} + + +#if X_BYTE_ORDER == X_LITTLE_ENDIAN +#define SHIFT_L(v,s) (v) << (s) +#define SHIFT_R(v,s) (v) >> (s) +#else +#define SHIFT_L(v,s) (v) >> (s) +#define SHIFT_R(v,s) (v) << (s) +#endif + +static void +CopyBits(char *dst, int shiftL, char *src, int bytes) +{ + /* Just get it to work. Worry about speed later */ + int shiftR = 8 - shiftL; + + while(bytes--) { + *dst |= SHIFT_L(*src, shiftL); + *(dst + 1) |= SHIFT_R(*src, shiftR); + dst++; src++; + } +} + + +/* Caution. This doesn't support 2 and 4 bpp formats. We expect + 1 bpp and planar data to be already cleared when presented + to this function */ + +void +XineramaGetImageData( + DrawablePtr *pDrawables, + int left, + int top, + int width, + int height, + unsigned int format, + unsigned long planemask, + char *data, + int pitch, + Bool isRoot +){ + RegionRec SrcRegion, GrabRegion; + BoxRec SrcBox, *pbox; + int x, y, w, h, i, j, nbox, size, sizeNeeded, ScratchPitch, inOut, depth; + DrawablePtr pDraw = pDrawables[0]; + char *ScratchMem = NULL; + + size = 0; + + /* find box in logical screen space */ + SrcBox.x1 = left; + SrcBox.y1 = top; + if(!isRoot) { + SrcBox.x1 += pDraw->x + panoramiXdataPtr[0].x; + SrcBox.y1 += pDraw->y + panoramiXdataPtr[0].y; + } + SrcBox.x2 = SrcBox.x1 + width; + SrcBox.y2 = SrcBox.y1 + height; + + REGION_INIT(pScreen, &SrcRegion, &SrcBox, 1); + REGION_NULL(pScreen, &GrabRegion); + + depth = (format == XYPixmap) ? 1 : pDraw->depth; + + for(i = 0; i < PanoramiXNumScreens; i++) { + pDraw = pDrawables[i]; + + inOut = RECT_IN_REGION(pScreen,&XineramaScreenRegions[i],&SrcBox); + + if(inOut == rgnIN) { + (*pDraw->pScreen->GetImage)(pDraw, + SrcBox.x1 - pDraw->x - panoramiXdataPtr[i].x, + SrcBox.y1 - pDraw->y - panoramiXdataPtr[i].y, + width, height, format, planemask, data); + break; + } else if (inOut == rgnOUT) + continue; + + REGION_INTERSECT(pScreen, &GrabRegion, &SrcRegion, + &XineramaScreenRegions[i]); + + nbox = REGION_NUM_RECTS(&GrabRegion); + + if(nbox) { + pbox = REGION_RECTS(&GrabRegion); + + while(nbox--) { + w = pbox->x2 - pbox->x1; + h = pbox->y2 - pbox->y1; + ScratchPitch = PixmapBytePad(w, depth); + sizeNeeded = ScratchPitch * h; + + if(sizeNeeded > size) { + char *tmpdata = ScratchMem; + ScratchMem = xrealloc(ScratchMem, sizeNeeded); + if(ScratchMem) + size = sizeNeeded; + else { + ScratchMem = tmpdata; + break; + } + } + + x = pbox->x1 - pDraw->x - panoramiXdataPtr[i].x; + y = pbox->y1 - pDraw->y - panoramiXdataPtr[i].y; + + (*pDraw->pScreen->GetImage)(pDraw, x, y, w, h, + format, planemask, ScratchMem); + + /* copy the memory over */ + + if(depth == 1) { + int k, shift, leftover, index, index2; + + x = pbox->x1 - SrcBox.x1; + y = pbox->y1 - SrcBox.y1; + shift = x & 7; + x >>= 3; + leftover = w & 7; + w >>= 3; + + /* clean up the edge */ + if(leftover) { + int mask = (1 << leftover) - 1; + for(j = h, k = w; j--; k += ScratchPitch) + ScratchMem[k] &= mask; + } + + for(j = 0, index = (pitch * y) + x, index2 = 0; j < h; + j++, index += pitch, index2 += ScratchPitch) + { + if(w) { + if(!shift) + memcpy(data + index, ScratchMem + index2, w); + else + CopyBits(data + index, shift, + ScratchMem + index2, w); + } + + if(leftover) { + data[index + w] |= + SHIFT_L(ScratchMem[index2 + w], shift); + if((shift + leftover) > 8) + data[index + w + 1] |= + SHIFT_R(ScratchMem[index2 + w],(8 - shift)); + } + } + } else { + j = BitsPerPixel(depth) >> 3; + x = (pbox->x1 - SrcBox.x1) * j; + y = pbox->y1 - SrcBox.y1; + w *= j; + + for(j = 0; j < h; j++) { + memcpy(data + (pitch * (y + j)) + x, + ScratchMem + (ScratchPitch * j), w); + } + } + pbox++; + } + + REGION_SUBTRACT(pScreen, &SrcRegion, &SrcRegion, &GrabRegion); + if(!REGION_NOTEMPTY(pScreen, &SrcRegion)) + break; + } + + } + + if(ScratchMem) + xfree(ScratchMem); + + REGION_UNINIT(pScreen, &SrcRegion); + REGION_UNINIT(pScreen, &GrabRegion); +} diff --git a/xorg-server-1.4/Xext/panoramiX.h b/xorg-server-1.4/Xext/panoramiX.h new file mode 100644 index 0000000..89c7547 --- /dev/null +++ b/xorg-server-1.4/Xext/panoramiX.h @@ -0,0 +1,100 @@ +/***************************************************************** + +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. + +******************************************************************/ + + +/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */ + +/* + * PanoramiX definitions + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _PANORAMIX_H_ +#define _PANORAMIX_H_ + +#include +#include "gcstruct.h" + + +typedef struct _PanoramiXData { + int x; + int y; + int width; + int height; +} PanoramiXData; + +typedef struct _PanoramiXInfo { + XID id ; +} PanoramiXInfo; + +typedef struct { + PanoramiXInfo info[MAXSCREENS]; + RESTYPE type; + union { + struct { + char visibility; + char class; + char root; + } win; + struct { + Bool shared; + } pix; +#ifdef RENDER + struct { + Bool root; + } pict; +#endif + char raw_data[4]; + } u; +} PanoramiXRes; + +#define FOR_NSCREENS_FORWARD(j) for(j = 0; j < PanoramiXNumScreens; j++) +#define FOR_NSCREENS_BACKWARD(j) for(j = PanoramiXNumScreens - 1; j >= 0; j--) +#define FOR_NSCREENS(j) FOR_NSCREENS_FORWARD(j) + +#define BREAK_IF(a) if ((a)) break +#define IF_RETURN(a,b) if ((a)) return (b) + +#define FORCE_ROOT(a) { \ + int _j; \ + for (_j = PanoramiXNumScreens - 1; _j; _j--) \ + if ((a).root == WindowTable[_j]->drawable.id) \ + break; \ + (a).rootX += panoramiXdataPtr[_j].x; \ + (a).rootY += panoramiXdataPtr[_j].y; \ + (a).root = WindowTable[0]->drawable.id; \ +} + +#define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared) + +#define SKIP_FAKE_WINDOW(a) if(!LookupIDByType(a, XRT_WINDOW)) return + +#endif /* _PANORAMIX_H_ */ diff --git a/xorg-server-1.4/Xext/panoramiXSwap.c b/xorg-server-1.4/Xext/panoramiXSwap.c new file mode 100644 index 0000000..da445ff --- /dev/null +++ b/xorg-server-1.4/Xext/panoramiXSwap.c @@ -0,0 +1,142 @@ +/***************************************************************** +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. +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include "misc.h" +#include "cursor.h" +#include "cursorstr.h" +#include "extnsionst.h" +#include "dixstruct.h" +#include "gc.h" +#include "gcstruct.h" +#include "scrnintstr.h" +#include "window.h" +#include "windowstr.h" +#include "pixmapstr.h" +#if 0 +#include +#include +#endif +#include "panoramiX.h" +#include +#include "panoramiXsrv.h" +#include "globals.h" +#include "panoramiXh.h" + +static int +SProcPanoramiXQueryVersion (ClientPtr client) +{ + REQUEST(xPanoramiXQueryVersionReq); + register int n; + + swaps(&stuff->length,n); + REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq); + return ProcPanoramiXQueryVersion(client); +} + +static int +SProcPanoramiXGetState(ClientPtr client) +{ + REQUEST(xPanoramiXGetStateReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + return ProcPanoramiXGetState(client); +} + +static int +SProcPanoramiXGetScreenCount(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenCountReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + return ProcPanoramiXGetScreenCount(client); +} + +static int +SProcPanoramiXGetScreenSize(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenSizeReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + return ProcPanoramiXGetScreenSize(client); +} + + +static int +SProcXineramaIsActive(ClientPtr client) +{ + REQUEST(xXineramaIsActiveReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xXineramaIsActiveReq); + return ProcXineramaIsActive(client); +} + + +static int +SProcXineramaQueryScreens(ClientPtr client) +{ + REQUEST(xXineramaQueryScreensReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); + return ProcXineramaQueryScreens(client); +} + + +int +SProcPanoramiXDispatch (ClientPtr client) +{ REQUEST(xReq); + switch (stuff->data) + { + case X_PanoramiXQueryVersion: + return SProcPanoramiXQueryVersion(client); + case X_PanoramiXGetState: + return SProcPanoramiXGetState(client); + case X_PanoramiXGetScreenCount: + return SProcPanoramiXGetScreenCount(client); + case X_PanoramiXGetScreenSize: + return SProcPanoramiXGetScreenSize(client); + case X_XineramaIsActive: + return SProcXineramaIsActive(client); + case X_XineramaQueryScreens: + return SProcXineramaQueryScreens(client); + } + return BadRequest; +} diff --git a/xorg-server-1.4/Xext/panoramiXh.h b/xorg-server-1.4/Xext/panoramiXh.h new file mode 100644 index 0000000..1a76a45 --- /dev/null +++ b/xorg-server-1.4/Xext/panoramiXh.h @@ -0,0 +1,74 @@ + +/* + * Server dispatcher function replacements + */ + +extern int PanoramiXCreateWindow(ClientPtr client); +extern int PanoramiXChangeWindowAttributes(ClientPtr client); +extern int PanoramiXDestroyWindow(ClientPtr client); +extern int PanoramiXDestroySubwindows(ClientPtr client); +extern int PanoramiXChangeSaveSet(ClientPtr client); +extern int PanoramiXReparentWindow(ClientPtr client); +extern int PanoramiXMapWindow(ClientPtr client); +extern int PanoramiXMapSubwindows(ClientPtr client); +extern int PanoramiXUnmapWindow(ClientPtr client); +extern int PanoramiXUnmapSubwindows(ClientPtr client); +extern int PanoramiXConfigureWindow(ClientPtr client); +extern int PanoramiXCirculateWindow(ClientPtr client); +extern int PanoramiXGetGeometry(ClientPtr client); +extern int PanoramiXTranslateCoords(ClientPtr client); +extern int PanoramiXCreatePixmap(ClientPtr client); +extern int PanoramiXFreePixmap(ClientPtr client); +extern int PanoramiXChangeGC(ClientPtr client); +extern int PanoramiXCopyGC(ClientPtr client); +extern int PanoramiXCopyColormapAndFree(ClientPtr client); +extern int PanoramiXCreateGC(ClientPtr client); +extern int PanoramiXSetDashes(ClientPtr client); +extern int PanoramiXSetClipRectangles(ClientPtr client); +extern int PanoramiXFreeGC(ClientPtr client); +extern int PanoramiXClearToBackground(ClientPtr client); +extern int PanoramiXCopyArea(ClientPtr client); +extern int PanoramiXCopyPlane(ClientPtr client); +extern int PanoramiXPolyPoint(ClientPtr client); +extern int PanoramiXPolyLine(ClientPtr client); +extern int PanoramiXPolySegment(ClientPtr client); +extern int PanoramiXPolyRectangle(ClientPtr client); +extern int PanoramiXPolyArc(ClientPtr client); +extern int PanoramiXFillPoly(ClientPtr client); +extern int PanoramiXPolyFillArc(ClientPtr client); +extern int PanoramiXPolyFillRectangle(ClientPtr client); +extern int PanoramiXPutImage(ClientPtr client); +extern int PanoramiXGetImage(ClientPtr client); +extern int PanoramiXPolyText8(ClientPtr client); +extern int PanoramiXPolyText16(ClientPtr client); +extern int PanoramiXImageText8(ClientPtr client); +extern int PanoramiXImageText16(ClientPtr client); +extern int PanoramiXCreateColormap(ClientPtr client); +extern int PanoramiXFreeColormap(ClientPtr client); +extern int PanoramiXInstallColormap(ClientPtr client); +extern int PanoramiXUninstallColormap(ClientPtr client); +extern int PanoramiXAllocColor(ClientPtr client); +extern int PanoramiXAllocNamedColor(ClientPtr client); +extern int PanoramiXAllocColorCells(ClientPtr client); +extern int PanoramiXStoreNamedColor(ClientPtr client); +extern int PanoramiXFreeColors(ClientPtr client); +extern int PanoramiXStoreColors(ClientPtr client); +extern int PanoramiXAllocColorPlanes(ClientPtr client); + +#define PROC_EXTERN(pfunc) extern int pfunc(ClientPtr) + +PROC_EXTERN(ProcPanoramiXQueryVersion); +PROC_EXTERN(ProcPanoramiXGetState); +PROC_EXTERN(ProcPanoramiXGetScreenCount); +PROC_EXTERN(ProcPanoramiXGetScreenSize); + +PROC_EXTERN(ProcXineramaQueryScreens); +PROC_EXTERN(ProcXineramaIsActive); + +extern int SProcPanoramiXDispatch(ClientPtr client); + +extern char *ConnectionInfo; +extern int connBlockScreenStart; +extern xConnSetupPrefix connSetupPrefix; + +extern int (* SavedProcVector[256]) (ClientPtr client); diff --git a/xorg-server-1.4/Xext/panoramiXprocs.c b/xorg-server-1.4/Xext/panoramiXprocs.c new file mode 100644 index 0000000..1c53a1e --- /dev/null +++ b/xorg-server-1.4/Xext/panoramiXprocs.c @@ -0,0 +1,2390 @@ +/***************************************************************** +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. +******************************************************************/ + +/* Massively rewritten by Mark Vojkovich */ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#define NEED_REPLIES +#define NEED_EVENTS +#include +#include "windowstr.h" +#include "dixfontstr.h" +#include "gcstruct.h" +#include "colormapst.h" +#include "scrnintstr.h" +#include "opaque.h" +#include "inputstr.h" +#include "migc.h" +#include "misc.h" +#include "dixstruct.h" +#include "panoramiX.h" +#include "panoramiXsrv.h" +#include "resource.h" +#include "panoramiXh.h" + +#define XINERAMA_IMAGE_BUFSIZE (256*1024) +#define INPUTONLY_LEGAL_MASK (CWWinGravity | CWEventMask | \ + CWDontPropagate | CWOverrideRedirect | CWCursor ) + +#if 0 +extern void (* EventSwapVector[128]) (fsError *, fsError *); + +extern void Swap32Write(); +extern void SLHostsExtend(); +extern void SQColorsExtend(); +WriteSConnectionInfo(); +extern void WriteSConnSetupPrefix(); +#endif + +/* Various of the DIX function interfaces were not designed to allow + * the client->errorValue to be set on BadValue and other errors. + * Rather than changing interfaces and breaking untold code we introduce + * a new global that dispatch can use. + */ +extern XID clientErrorValue; /* XXX this is a kludge */ + +int PanoramiXCreateWindow(ClientPtr client) +{ + PanoramiXRes *parent, *newWin; + PanoramiXRes *backPix = NULL; + PanoramiXRes *bordPix = NULL; + PanoramiXRes *cmap = NULL; + REQUEST(xCreateWindowReq); + int pback_offset = 0, pbord_offset = 0, cmap_offset = 0; + int result = 0, len, j; + int orig_x, orig_y; + XID orig_visual, tmp; + Bool parentIsRoot; + + REQUEST_AT_LEAST_SIZE(xCreateWindowReq); + + len = client->req_len - (sizeof(xCreateWindowReq) >> 2); + if (Ones(stuff->mask) != len) + return BadLength; + + if (!(parent = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->parent, XRT_WINDOW, DixWriteAccess))) + return BadWindow; + + if(stuff->class == CopyFromParent) + stuff->class = parent->u.win.class; + + if((stuff->class == InputOnly) && (stuff->mask & (~INPUTONLY_LEGAL_MASK))) + return BadMatch; + + if ((Mask)stuff->mask & CWBackPixmap) { + pback_offset = Ones((Mask)stuff->mask & (CWBackPixmap - 1)); + tmp = *((CARD32 *) &stuff[1] + pback_offset); + if ((tmp != None) && (tmp != ParentRelative)) { + if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType( + client, tmp, XRT_PIXMAP, DixReadAccess))) + return BadPixmap; + } + } + if ((Mask)stuff->mask & CWBorderPixmap) { + pbord_offset = Ones((Mask)stuff->mask & (CWBorderPixmap - 1)); + tmp = *((CARD32 *) &stuff[1] + pbord_offset); + if (tmp != CopyFromParent) { + if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType( + client, tmp, XRT_PIXMAP, DixReadAccess))) + return BadPixmap; + } + } + if ((Mask)stuff->mask & CWColormap) { + cmap_offset = Ones((Mask)stuff->mask & (CWColormap - 1)); + tmp = *((CARD32 *) &stuff[1] + cmap_offset); + if ((tmp != CopyFromParent) && (tmp != None)) { + if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType( + client, tmp, XRT_COLORMAP, DixReadAccess))) + return BadColor; + } + } + + if(!(newWin = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + return BadAlloc; + + newWin->type = XRT_WINDOW; + newWin->u.win.visibility = VisibilityNotViewable; + newWin->u.win.class = stuff->class; + newWin->u.win.root = FALSE; + newWin->info[0].id = stuff->wid; + for(j = 1; j < PanoramiXNumScreens; j++) + newWin->info[j].id = FakeClientID(client->index); + + if (stuff->class == InputOnly) + stuff->visual = CopyFromParent; + orig_visual = stuff->visual; + orig_x = stuff->x; + orig_y = stuff->y; + parentIsRoot = (stuff->parent == WindowTable[0]->drawable.id) || + (stuff->parent == savedScreenInfo[0].wid); + FOR_NSCREENS_BACKWARD(j) { + stuff->wid = newWin->info[j].id; + stuff->parent = parent->info[j].id; + if (parentIsRoot) { + stuff->x = orig_x - panoramiXdataPtr[j].x; + stuff->y = orig_y - panoramiXdataPtr[j].y; + } + if (backPix) + *((CARD32 *) &stuff[1] + pback_offset) = backPix->info[j].id; + if (bordPix) + *((CARD32 *) &stuff[1] + pbord_offset) = bordPix->info[j].id; + if (cmap) + *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[j].id; + if ( orig_visual != CopyFromParent ) + stuff->visual = PanoramiXVisualTable[(orig_visual*MAXSCREENS) + j]; + result = (*SavedProcVector[X_CreateWindow])(client); + if(result != Success) break; + } + + if (result == Success) + AddResource(newWin->info[0].id, XRT_WINDOW, newWin); + else + xfree(newWin); + + return (result); +} + + +int PanoramiXChangeWindowAttributes(ClientPtr client) +{ + PanoramiXRes *win; + PanoramiXRes *backPix = NULL; + PanoramiXRes *bordPix = NULL; + PanoramiXRes *cmap = NULL; + REQUEST(xChangeWindowAttributesReq); + int pback_offset = 0, pbord_offset = 0, cmap_offset = 0; + int result = 0, len, j; + XID tmp; + + REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); + + len = client->req_len - (sizeof(xChangeWindowAttributesReq) >> 2); + if (Ones(stuff->valueMask) != len) + return BadLength; + + if (!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->window, XRT_WINDOW, DixWriteAccess))) + return BadWindow; + + if((win->u.win.class == InputOnly) && + (stuff->valueMask & (~INPUTONLY_LEGAL_MASK))) + return BadMatch; + + if ((Mask)stuff->valueMask & CWBackPixmap) { + pback_offset = Ones((Mask)stuff->valueMask & (CWBackPixmap - 1)); + tmp = *((CARD32 *) &stuff[1] + pback_offset); + if ((tmp != None) && (tmp != ParentRelative)) { + if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType( + client, tmp, XRT_PIXMAP, DixReadAccess))) + return BadPixmap; + } + } + if ((Mask)stuff->valueMask & CWBorderPixmap) { + pbord_offset = Ones((Mask)stuff->valueMask & (CWBorderPixmap - 1)); + tmp = *((CARD32 *) &stuff[1] + pbord_offset); + if (tmp != CopyFromParent) { + if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType( + client, tmp, XRT_PIXMAP, DixReadAccess))) + return BadPixmap; + } + } + if ((Mask)stuff->valueMask & CWColormap) { + cmap_offset = Ones((Mask)stuff->valueMask & (CWColormap - 1)); + tmp = *((CARD32 *) &stuff[1] + cmap_offset); + if ((tmp != CopyFromParent) && (tmp != None)) { + if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType( + client, tmp, XRT_COLORMAP, DixReadAccess))) + return BadColor; + } + } + + FOR_NSCREENS_BACKWARD(j) { + stuff->window = win->info[j].id; + if (backPix) + *((CARD32 *) &stuff[1] + pback_offset) = backPix->info[j].id; + if (bordPix) + *((CARD32 *) &stuff[1] + pbord_offset) = bordPix->info[j].id; + if (cmap) + *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[j].id; + result = (*SavedProcVector[X_ChangeWindowAttributes])(client); + } + + return (result); +} + + +int PanoramiXDestroyWindow(ClientPtr client) +{ + PanoramiXRes *win; + int result = 0, j; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + if(!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->id, XRT_WINDOW, DixDestroyAccess))) + return BadWindow; + + FOR_NSCREENS_BACKWARD(j) { + stuff->id = win->info[j].id; + result = (*SavedProcVector[X_DestroyWindow])(client); + if(result != Success) break; + } + + /* Since ProcDestroyWindow is using FreeResource, it will free + our resource for us on the last pass through the loop above */ + + return (result); +} + + +int PanoramiXDestroySubwindows(ClientPtr client) +{ + PanoramiXRes *win; + int result = 0, j; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + if(!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->id, XRT_WINDOW, DixDestroyAccess))) + return BadWindow; + + FOR_NSCREENS_BACKWARD(j) { + stuff->id = win->info[j].id; + result = (*SavedProcVector[X_DestroySubwindows])(client); + if(result != Success) break; + } + + /* DestroySubwindows is using FreeResource which will free + our resources for us on the last pass through the loop above */ + + return (result); +} + + +int PanoramiXChangeSaveSet(ClientPtr client) +{ + PanoramiXRes *win; + int result = 0, j; + REQUEST(xChangeSaveSetReq); + + REQUEST_SIZE_MATCH(xChangeSaveSetReq); + + if(!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->window, XRT_WINDOW, DixReadAccess))) + return BadWindow; + + FOR_NSCREENS_BACKWARD(j) { + stuff->window = win->info[j].id; + result = (*SavedProcVector[X_ChangeSaveSet])(client); + if(result != Success) break; + } + + return (result); +} + + +int PanoramiXReparentWindow(ClientPtr client) +{ + PanoramiXRes *win, *parent; + int result = 0, j; + int x, y; + Bool parentIsRoot; + REQUEST(xReparentWindowReq); + + REQUEST_SIZE_MATCH(xReparentWindowReq); + + if(!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->window, XRT_WINDOW, DixWriteAccess))) + return BadWindow; + + if(!(parent = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->parent, XRT_WINDOW, DixWriteAccess))) + return BadWindow; + + x = stuff->x; + y = stuff->y; + parentIsRoot = (stuff->parent == WindowTable[0]->drawable.id) || + (stuff->parent == savedScreenInfo[0].wid); + FOR_NSCREENS_BACKWARD(j) { + stuff->window = win->info[j].id; + stuff->parent = parent->info[j].id; + if(parentIsRoot) { + stuff->x = x - panoramiXdataPtr[j].x; + stuff->y = y - panoramiXdataPtr[j].y; + } + result = (*SavedProcVector[X_ReparentWindow])(client); + if(result != Success) break; + } + + return (result); +} + + +int PanoramiXMapWindow(ClientPtr client) +{ + PanoramiXRes *win; + int result = 0, j; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + if(!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->id, XRT_WINDOW, DixReadAccess))) + return BadWindow; + + FOR_NSCREENS_FORWARD(j) { + stuff->id = win->info[j].id; + result = (*SavedProcVector[X_MapWindow])(client); + if(result != Success) break; + } + + return (result); +} + + +int PanoramiXMapSubwindows(ClientPtr client) +{ + PanoramiXRes *win; + int result = 0, j; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + if(!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->id, XRT_WINDOW, DixReadAccess))) + return BadWindow; + + FOR_NSCREENS_FORWARD(j) { + stuff->id = win->info[j].id; + result = (*SavedProcVector[X_MapSubwindows])(client); + if(result != Success) break; + } + + return (result); +} + + +int PanoramiXUnmapWindow(ClientPtr client) +{ + PanoramiXRes *win; + int result = 0, j; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + if(!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->id, XRT_WINDOW, DixReadAccess))) + return BadWindow; + + FOR_NSCREENS_FORWARD(j) { + stuff->id = win->info[j].id; + result = (*SavedProcVector[X_UnmapWindow])(client); + if(result != Success) break; + } + + return (result); +} + + +int PanoramiXUnmapSubwindows(ClientPtr client) +{ + PanoramiXRes *win; + int result = 0, j; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + if(!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->id, XRT_WINDOW, DixReadAccess))) + return BadWindow; + + FOR_NSCREENS_FORWARD(j) { + stuff->id = win->info[j].id; + result = (*SavedProcVector[X_UnmapSubwindows])(client); + if(result != Success) break; + } + + return (result); +} + + +int PanoramiXConfigureWindow(ClientPtr client) +{ + PanoramiXRes *win; + PanoramiXRes *sib = NULL; + WindowPtr pWin; + int result = 0, j, len, sib_offset = 0, x = 0, y = 0; + int x_offset = -1; + int y_offset = -1; + REQUEST(xConfigureWindowReq); + + REQUEST_AT_LEAST_SIZE(xConfigureWindowReq); + + len = client->req_len - (sizeof(xConfigureWindowReq) >> 2); + if (Ones(stuff->mask) != len) + return BadLength; + + /* because we need the parent */ + if (!(pWin = (WindowPtr)SecurityLookupIDByType( + client, stuff->window, RT_WINDOW, DixWriteAccess))) + return BadWindow; + + if (!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->window, XRT_WINDOW, DixWriteAccess))) + return BadWindow; + + if ((Mask)stuff->mask & CWSibling) { + XID tmp; + sib_offset = Ones((Mask)stuff->mask & (CWSibling - 1)); + if ((tmp = *((CARD32 *) &stuff[1] + sib_offset))) { + if(!(sib = (PanoramiXRes*) SecurityLookupIDByType( + client, tmp, XRT_WINDOW, DixReadAccess))) + return BadWindow; + } + } + + if(pWin->parent && ((pWin->parent == WindowTable[0]) || + (pWin->parent->drawable.id == savedScreenInfo[0].wid))) + { + if ((Mask)stuff->mask & CWX) { + x_offset = 0; + x = *((CARD32 *)&stuff[1]); + } + if ((Mask)stuff->mask & CWY) { + y_offset = (x_offset == -1) ? 0 : 1; + y = *((CARD32 *) &stuff[1] + y_offset); + } + } + + /* have to go forward or you get expose events before + ConfigureNotify events */ + FOR_NSCREENS_FORWARD(j) { + stuff->window = win->info[j].id; + if(sib) + *((CARD32 *) &stuff[1] + sib_offset) = sib->info[j].id; + if(x_offset >= 0) + *((CARD32 *) &stuff[1] + x_offset) = x - panoramiXdataPtr[j].x; + if(y_offset >= 0) + *((CARD32 *) &stuff[1] + y_offset) = y - panoramiXdataPtr[j].y; + result = (*SavedProcVector[X_ConfigureWindow])(client); + if(result != Success) break; + } + + return (result); +} + + +int PanoramiXCirculateWindow(ClientPtr client) +{ + PanoramiXRes *win; + int result = 0, j; + REQUEST(xCirculateWindowReq); + + REQUEST_SIZE_MATCH(xCirculateWindowReq); + + if(!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->window, XRT_WINDOW, DixWriteAccess))) + return BadWindow; + + FOR_NSCREENS_FORWARD(j) { + stuff->window = win->info[j].id; + result = (*SavedProcVector[X_CirculateWindow])(client); + if(result != Success) break; + } + + return (result); +} + + +int PanoramiXGetGeometry(ClientPtr client) +{ + xGetGeometryReply rep; + DrawablePtr pDraw; + int rc; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupDrawable(&pDraw, stuff->id, client, M_ANY, DixUnknownAccess); + if (rc != Success) + return rc; + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.root = WindowTable[0]->drawable.id; + rep.depth = pDraw->depth; + rep.width = pDraw->width; + rep.height = pDraw->height; + rep.x = rep.y = rep.borderWidth = 0; + + if (stuff->id == rep.root) { + xWindowRoot *root = (xWindowRoot *) + (ConnectionInfo + connBlockScreenStart); + + rep.width = root->pixWidth; + rep.height = root->pixHeight; + } else + if ((pDraw->type == UNDRAWABLE_WINDOW) || (pDraw->type == DRAWABLE_WINDOW)) + { + WindowPtr pWin = (WindowPtr)pDraw; + rep.x = pWin->origin.x - wBorderWidth (pWin); + rep.y = pWin->origin.y - wBorderWidth (pWin); + if((pWin->parent == WindowTable[0]) || + (pWin->parent->drawable.id == savedScreenInfo[0].wid)) + { + rep.x += panoramiXdataPtr[0].x; + rep.y += panoramiXdataPtr[0].y; + } + rep.borderWidth = pWin->borderWidth; + } + + WriteReplyToClient(client, sizeof(xGetGeometryReply), &rep); + return (client->noClientException); +} + +int PanoramiXTranslateCoords(ClientPtr client) +{ + INT16 x, y; + REQUEST(xTranslateCoordsReq); + int rc; + WindowPtr pWin, pDst; + xTranslateCoordsReply rep; + + REQUEST_SIZE_MATCH(xTranslateCoordsReq); + rc = dixLookupWindow(&pWin, stuff->srcWid, client, DixReadAccess); + if (rc != Success) + return rc; + rc = dixLookupWindow(&pDst, stuff->dstWid, client, DixReadAccess); + if (rc != Success) + return rc; + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.sameScreen = xTrue; + rep.child = None; + + if((pWin == WindowTable[0]) || + (pWin->drawable.id == savedScreenInfo[0].wid)) + { + x = stuff->srcX - panoramiXdataPtr[0].x; + y = stuff->srcY - panoramiXdataPtr[0].y; + } else { + x = pWin->drawable.x + stuff->srcX; + y = pWin->drawable.y + stuff->srcY; + } + pWin = pDst->firstChild; + while (pWin) { +#ifdef SHAPE + BoxRec box; +#endif + if ((pWin->mapped) && + (x >= pWin->drawable.x - wBorderWidth (pWin)) && + (x < pWin->drawable.x + (int)pWin->drawable.width + + wBorderWidth (pWin)) && + (y >= pWin->drawable.y - wBorderWidth (pWin)) && + (y < pWin->drawable.y + (int)pWin->drawable.height + + wBorderWidth (pWin)) +#ifdef SHAPE + /* When a window is shaped, a further check + * is made to see if the point is inside + * borderSize + */ + && (!wBoundingShape(pWin) || + POINT_IN_REGION(pWin->drawable.pScreen, + wBoundingShape(pWin), + x - pWin->drawable.x, + y - pWin->drawable.y, &box)) +#endif + ) + { + rep.child = pWin->drawable.id; + pWin = (WindowPtr) NULL; + } + else + pWin = pWin->nextSib; + } + rep.dstX = x - pDst->drawable.x; + rep.dstY = y - pDst->drawable.y; + if((pDst == WindowTable[0]) || + (pDst->drawable.id == savedScreenInfo[0].wid)) + { + rep.dstX += panoramiXdataPtr[0].x; + rep.dstY += panoramiXdataPtr[0].y; + } + + WriteReplyToClient(client, sizeof(xTranslateCoordsReply), &rep); + return(client->noClientException); +} + +int PanoramiXCreatePixmap(ClientPtr client) +{ + PanoramiXRes *refDraw, *newPix; + int result = 0, j; + REQUEST(xCreatePixmapReq); + + REQUEST_SIZE_MATCH(xCreatePixmapReq); + client->errorValue = stuff->pid; + + if(!(refDraw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixReadAccess))) + return BadDrawable; + + if(!(newPix = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + return BadAlloc; + + newPix->type = XRT_PIXMAP; + newPix->u.pix.shared = FALSE; + newPix->info[0].id = stuff->pid; + for(j = 1; j < PanoramiXNumScreens; j++) + newPix->info[j].id = FakeClientID(client->index); + + FOR_NSCREENS_BACKWARD(j) { + stuff->pid = newPix->info[j].id; + stuff->drawable = refDraw->info[j].id; + result = (*SavedProcVector[X_CreatePixmap])(client); + if(result != Success) break; + } + + if (result == Success) + AddResource(newPix->info[0].id, XRT_PIXMAP, newPix); + else + xfree(newPix); + + return (result); +} + + +int PanoramiXFreePixmap(ClientPtr client) +{ + PanoramiXRes *pix; + int result = 0, j; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + client->errorValue = stuff->id; + + if(!(pix = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->id, XRT_PIXMAP, DixDestroyAccess))) + return BadPixmap; + + FOR_NSCREENS_BACKWARD(j) { + stuff->id = pix->info[j].id; + result = (*SavedProcVector[X_FreePixmap])(client); + if(result != Success) break; + } + + /* Since ProcFreePixmap is using FreeResource, it will free + our resource for us on the last pass through the loop above */ + + return (result); +} + + +int PanoramiXCreateGC(ClientPtr client) +{ + PanoramiXRes *refDraw; + PanoramiXRes *newGC; + PanoramiXRes *stip = NULL; + PanoramiXRes *tile = NULL; + PanoramiXRes *clip = NULL; + REQUEST(xCreateGCReq); + int tile_offset = 0, stip_offset = 0, clip_offset = 0; + int result = 0, len, j; + XID tmp; + + REQUEST_AT_LEAST_SIZE(xCreateGCReq); + + client->errorValue = stuff->gc; + len = client->req_len - (sizeof(xCreateGCReq) >> 2); + if (Ones(stuff->mask) != len) + return BadLength; + + if (!(refDraw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixReadAccess))) + return BadDrawable; + + if ((Mask)stuff->mask & GCTile) { + tile_offset = Ones((Mask)stuff->mask & (GCTile - 1)); + if ((tmp = *((CARD32 *) &stuff[1] + tile_offset))) { + if(!(tile = (PanoramiXRes*) SecurityLookupIDByType( + client, tmp, XRT_PIXMAP, DixReadAccess))) + return BadPixmap; + } + } + if ((Mask)stuff->mask & GCStipple) { + stip_offset = Ones((Mask)stuff->mask & (GCStipple - 1)); + if ((tmp = *((CARD32 *) &stuff[1] + stip_offset))) { + if(!(stip = (PanoramiXRes*) SecurityLookupIDByType( + client, tmp, XRT_PIXMAP, DixReadAccess))) + return BadPixmap; + } + } + if ((Mask)stuff->mask & GCClipMask) { + clip_offset = Ones((Mask)stuff->mask & (GCClipMask - 1)); + if ((tmp = *((CARD32 *) &stuff[1] + clip_offset))) { + if(!(clip = (PanoramiXRes*) SecurityLookupIDByType( + client, tmp, XRT_PIXMAP, DixReadAccess))) + return BadPixmap; + } + } + + if(!(newGC = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + return BadAlloc; + + newGC->type = XRT_GC; + newGC->info[0].id = stuff->gc; + for(j = 1; j < PanoramiXNumScreens; j++) + newGC->info[j].id = FakeClientID(client->index); + + FOR_NSCREENS_BACKWARD(j) { + stuff->gc = newGC->info[j].id; + stuff->drawable = refDraw->info[j].id; + if (tile) + *((CARD32 *) &stuff[1] + tile_offset) = tile->info[j].id; + if (stip) + *((CARD32 *) &stuff[1] + stip_offset) = stip->info[j].id; + if (clip) + *((CARD32 *) &stuff[1] + clip_offset) = clip->info[j].id; + result = (*SavedProcVector[X_CreateGC])(client); + if(result != Success) break; + } + + if (result == Success) + AddResource(newGC->info[0].id, XRT_GC, newGC); + else + xfree(newGC); + + return (result); +} + +int PanoramiXChangeGC(ClientPtr client) +{ + PanoramiXRes *gc; + PanoramiXRes *stip = NULL; + PanoramiXRes *tile = NULL; + PanoramiXRes *clip = NULL; + REQUEST(xChangeGCReq); + int tile_offset = 0, stip_offset = 0, clip_offset = 0; + int result = 0, len, j; + XID tmp; + + REQUEST_AT_LEAST_SIZE(xChangeGCReq); + + len = client->req_len - (sizeof(xChangeGCReq) >> 2); + if (Ones(stuff->mask) != len) + return BadLength; + + if (!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + if ((Mask)stuff->mask & GCTile) { + tile_offset = Ones((Mask)stuff->mask & (GCTile - 1)); + if ((tmp = *((CARD32 *) &stuff[1] + tile_offset))) { + if(!(tile = (PanoramiXRes*) SecurityLookupIDByType( + client, tmp, XRT_PIXMAP, DixReadAccess))) + return BadPixmap; + } + } + if ((Mask)stuff->mask & GCStipple) { + stip_offset = Ones((Mask)stuff->mask & (GCStipple - 1)); + if ((tmp = *((CARD32 *) &stuff[1] + stip_offset))) { + if(!(stip = (PanoramiXRes*) SecurityLookupIDByType( + client, tmp, XRT_PIXMAP, DixReadAccess))) + return BadPixmap; + } + } + if ((Mask)stuff->mask & GCClipMask) { + clip_offset = Ones((Mask)stuff->mask & (GCClipMask - 1)); + if ((tmp = *((CARD32 *) &stuff[1] + clip_offset))) { + if(!(clip = (PanoramiXRes*) SecurityLookupIDByType( + client, tmp, XRT_PIXMAP, DixReadAccess))) + return BadPixmap; + } + } + + + FOR_NSCREENS_BACKWARD(j) { + stuff->gc = gc->info[j].id; + if (tile) + *((CARD32 *) &stuff[1] + tile_offset) = tile->info[j].id; + if (stip) + *((CARD32 *) &stuff[1] + stip_offset) = stip->info[j].id; + if (clip) + *((CARD32 *) &stuff[1] + clip_offset) = clip->info[j].id; + result = (*SavedProcVector[X_ChangeGC])(client); + if(result != Success) break; + } + + return (result); +} + + +int PanoramiXCopyGC(ClientPtr client) +{ + PanoramiXRes *srcGC, *dstGC; + int result = 0, j; + REQUEST(xCopyGCReq); + + REQUEST_SIZE_MATCH(xCopyGCReq); + + if(!(srcGC = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->srcGC, XRT_GC, DixReadAccess))) + return BadGC; + + if(!(dstGC = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->dstGC, XRT_GC, DixWriteAccess))) + return BadGC; + + FOR_NSCREENS(j) { + stuff->srcGC = srcGC->info[j].id; + stuff->dstGC = dstGC->info[j].id; + result = (*SavedProcVector[X_CopyGC])(client); + if(result != Success) break; + } + + return (result); +} + + +int PanoramiXSetDashes(ClientPtr client) +{ + PanoramiXRes *gc; + int result = 0, j; + REQUEST(xSetDashesReq); + + REQUEST_FIXED_SIZE(xSetDashesReq, stuff->nDashes); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixWriteAccess))) + return BadGC; + + FOR_NSCREENS_BACKWARD(j) { + stuff->gc = gc->info[j].id; + result = (*SavedProcVector[X_SetDashes])(client); + if(result != Success) break; + } + + return (result); +} + + +int PanoramiXSetClipRectangles(ClientPtr client) +{ + PanoramiXRes *gc; + int result = 0, j; + REQUEST(xSetClipRectanglesReq); + + REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixWriteAccess))) + return BadGC; + + FOR_NSCREENS_BACKWARD(j) { + stuff->gc = gc->info[j].id; + result = (*SavedProcVector[X_SetClipRectangles])(client); + if(result != Success) break; + } + + return (result); +} + + +int PanoramiXFreeGC(ClientPtr client) +{ + PanoramiXRes *gc; + int result = 0, j; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->id, XRT_GC, DixDestroyAccess))) + return BadGC; + + FOR_NSCREENS_BACKWARD(j) { + stuff->id = gc->info[j].id; + result = (*SavedProcVector[X_FreeGC])(client); + if(result != Success) break; + } + + /* Since ProcFreeGC is using FreeResource, it will free + our resource for us on the last pass through the loop above */ + + return (result); +} + + +int PanoramiXClearToBackground(ClientPtr client) +{ + PanoramiXRes *win; + int result = 0, j, x, y; + Bool isRoot; + REQUEST(xClearAreaReq); + + REQUEST_SIZE_MATCH(xClearAreaReq); + + if(!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->window, XRT_WINDOW, DixWriteAccess))) + return BadWindow; + + x = stuff->x; + y = stuff->y; + isRoot = win->u.win.root; + FOR_NSCREENS_BACKWARD(j) { + stuff->window = win->info[j].id; + if(isRoot) { + stuff->x = x - panoramiXdataPtr[j].x; + stuff->y = y - panoramiXdataPtr[j].y; + } + result = (*SavedProcVector[X_ClearArea])(client); + if(result != Success) break; + } + + return (result); +} + + +/* + For Window to Pixmap copies you're screwed since each screen's + pixmap will look like what it sees on its screen. Unless the + screens overlap and the window lies on each, the two copies + will be out of sync. To remedy this we do a GetImage and PutImage + in place of the copy. Doing this as a single Image isn't quite + correct since it will include the obscured areas but we will + have to fix this later. (MArk). +*/ + +int PanoramiXCopyArea(ClientPtr client) +{ + int j, result = 0, srcx, srcy, dstx, dsty; + PanoramiXRes *gc, *src, *dst; + Bool srcIsRoot = FALSE; + Bool dstIsRoot = FALSE; + Bool srcShared, dstShared; + REQUEST(xCopyAreaReq); + + REQUEST_SIZE_MATCH(xCopyAreaReq); + + if(!(src = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->srcDrawable, XRC_DRAWABLE, DixReadAccess))) + return BadDrawable; + + srcShared = IS_SHARED_PIXMAP(src); + + if(!(dst = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->dstDrawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + dstShared = IS_SHARED_PIXMAP(dst); + + if(dstShared && srcShared) + return (* SavedProcVector[X_CopyArea])(client); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + if((dst->type == XRT_WINDOW) && dst->u.win.root) + dstIsRoot = TRUE; + if((src->type == XRT_WINDOW) && src->u.win.root) + srcIsRoot = TRUE; + + srcx = stuff->srcX; srcy = stuff->srcY; + dstx = stuff->dstX; dsty = stuff->dstY; + if((dst->type == XRT_PIXMAP) && (src->type == XRT_WINDOW)) { + DrawablePtr drawables[MAXSCREENS]; + DrawablePtr pDst; + GCPtr pGC; + char *data; + int pitch, rc; + + FOR_NSCREENS(j) { + rc = dixLookupDrawable(drawables+j, src->info[j].id, client, 0, + DixUnknownAccess); + if (rc != Success) + return rc; + } + + pitch = PixmapBytePad(stuff->width, drawables[0]->depth); + if(!(data = xcalloc(1, stuff->height * pitch))) + return BadAlloc; + + XineramaGetImageData(drawables, srcx, srcy, + stuff->width, stuff->height, ZPixmap, ~0, data, pitch, + srcIsRoot); + + FOR_NSCREENS_BACKWARD(j) { + stuff->gc = gc->info[j].id; + VALIDATE_DRAWABLE_AND_GC(dst->info[j].id, pDst, pGC, client); + + if(drawables[0]->depth != pDst->depth) { + client->errorValue = stuff->dstDrawable; + xfree(data); + return (BadMatch); + } + + (*pGC->ops->PutImage) (pDst, pGC, pDst->depth, dstx, dsty, + stuff->width, stuff->height, + 0, ZPixmap, data); + + if(dstShared) break; + } + + xfree(data); + + result = Success; + } else { + DrawablePtr pDst = NULL, pSrc = NULL; + GCPtr pGC = NULL; + RegionPtr pRgn[MAXSCREENS]; + int rc; + + FOR_NSCREENS_BACKWARD(j) { + stuff->dstDrawable = dst->info[j].id; + stuff->srcDrawable = src->info[j].id; + stuff->gc = gc->info[j].id; + if (srcIsRoot) { + stuff->srcX = srcx - panoramiXdataPtr[j].x; + stuff->srcY = srcy - panoramiXdataPtr[j].y; + } + if (dstIsRoot) { + stuff->dstX = dstx - panoramiXdataPtr[j].x; + stuff->dstY = dsty - panoramiXdataPtr[j].y; + } + + VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, pGC, client); + if (stuff->dstDrawable != stuff->srcDrawable) { + rc = dixLookupDrawable(&pSrc, stuff->srcDrawable, client, 0, + DixReadAccess); + if (rc != Success) + return rc; + + if ((pDst->pScreen != pSrc->pScreen) || + (pDst->depth != pSrc->depth)) { + client->errorValue = stuff->dstDrawable; + return (BadMatch); + } + } else + pSrc = pDst; + + pRgn[j] = (*pGC->ops->CopyArea)(pSrc, pDst, pGC, + stuff->srcX, stuff->srcY, + stuff->width, stuff->height, + stuff->dstX, stuff->dstY); + + if(dstShared) { + while(j--) pRgn[j] = NULL; + break; + } + } + + if(pGC->graphicsExposures) { + ScreenPtr pScreen = pDst->pScreen; + RegionRec totalReg; + Bool overlap; + + REGION_NULL(pScreen, &totalReg); + FOR_NSCREENS_BACKWARD(j) { + if(pRgn[j]) { + if(srcIsRoot) { + REGION_TRANSLATE(pScreen, pRgn[j], + panoramiXdataPtr[j].x, panoramiXdataPtr[j].y); + } + REGION_APPEND(pScreen, &totalReg, pRgn[j]); + REGION_DESTROY(pScreen, pRgn[j]); + } + } + REGION_VALIDATE(pScreen, &totalReg, &overlap); + (*pScreen->SendGraphicsExpose)( + client, &totalReg, stuff->dstDrawable, X_CopyArea, 0); + REGION_UNINIT(pScreen, &totalReg); + } + + result = client->noClientException; + } + + return (result); +} + + +int PanoramiXCopyPlane(ClientPtr client) +{ + int j, srcx, srcy, dstx, dsty, rc; + PanoramiXRes *gc, *src, *dst; + Bool srcIsRoot = FALSE; + Bool dstIsRoot = FALSE; + Bool srcShared, dstShared; + DrawablePtr psrcDraw, pdstDraw = NULL; + GCPtr pGC = NULL; + RegionPtr pRgn[MAXSCREENS]; + REQUEST(xCopyPlaneReq); + + REQUEST_SIZE_MATCH(xCopyPlaneReq); + + if(!(src = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->srcDrawable, XRC_DRAWABLE, DixReadAccess))) + return BadDrawable; + + srcShared = IS_SHARED_PIXMAP(src); + + if(!(dst = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->dstDrawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + dstShared = IS_SHARED_PIXMAP(dst); + + if(dstShared && srcShared) + return (* SavedProcVector[X_CopyPlane])(client); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + if((dst->type == XRT_WINDOW) && dst->u.win.root) + dstIsRoot = TRUE; + if((src->type == XRT_WINDOW) && src->u.win.root) + srcIsRoot = TRUE; + + srcx = stuff->srcX; srcy = stuff->srcY; + dstx = stuff->dstX; dsty = stuff->dstY; + + FOR_NSCREENS_BACKWARD(j) { + stuff->dstDrawable = dst->info[j].id; + stuff->srcDrawable = src->info[j].id; + stuff->gc = gc->info[j].id; + if (srcIsRoot) { + stuff->srcX = srcx - panoramiXdataPtr[j].x; + stuff->srcY = srcy - panoramiXdataPtr[j].y; + } + if (dstIsRoot) { + stuff->dstX = dstx - panoramiXdataPtr[j].x; + stuff->dstY = dsty - panoramiXdataPtr[j].y; + } + + VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, pGC, client); + if (stuff->dstDrawable != stuff->srcDrawable) { + rc = dixLookupDrawable(&psrcDraw, stuff->srcDrawable, client, 0, + DixReadAccess); + if (rc != Success) + return rc; + + if (pdstDraw->pScreen != psrcDraw->pScreen) { + client->errorValue = stuff->dstDrawable; + return (BadMatch); + } + } else + psrcDraw = pdstDraw; + + if(stuff->bitPlane == 0 || (stuff->bitPlane & (stuff->bitPlane - 1)) || + (stuff->bitPlane > (1L << (psrcDraw->depth - 1)))) { + client->errorValue = stuff->bitPlane; + return(BadValue); + } + + pRgn[j] = (*pGC->ops->CopyPlane)(psrcDraw, pdstDraw, pGC, + stuff->srcX, stuff->srcY, + stuff->width, stuff->height, + stuff->dstX, stuff->dstY, stuff->bitPlane); + + if(dstShared) { + while(j--) pRgn[j] = NULL; + break; + } + } + + if(pGC->graphicsExposures) { + ScreenPtr pScreen = pdstDraw->pScreen; + RegionRec totalReg; + Bool overlap; + + REGION_NULL(pScreen, &totalReg); + FOR_NSCREENS_BACKWARD(j) { + if(pRgn[j]) { + REGION_APPEND(pScreen, &totalReg, pRgn[j]); + REGION_DESTROY(pScreen, pRgn[j]); + } + } + REGION_VALIDATE(pScreen, &totalReg, &overlap); + (*pScreen->SendGraphicsExpose)( + client, &totalReg, stuff->dstDrawable, X_CopyPlane, 0); + REGION_UNINIT(pScreen, &totalReg); + } + + return (client->noClientException); +} + + +int PanoramiXPolyPoint(ClientPtr client) +{ + PanoramiXRes *gc, *draw; + int result = 0, npoint, j; + xPoint *origPts; + Bool isRoot; + REQUEST(xPolyPointReq); + + REQUEST_AT_LEAST_SIZE(xPolyPointReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolyPoint])(client); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + npoint = ((client->req_len << 2) - sizeof(xPolyPointReq)) >> 2; + if (npoint > 0) { + origPts = (xPoint *) ALLOCATE_LOCAL(npoint * sizeof(xPoint)); + memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint)); + FOR_NSCREENS_FORWARD(j){ + + if(j) memcpy(&stuff[1], origPts, npoint * sizeof(xPoint)); + + if (isRoot) { + int x_off = panoramiXdataPtr[j].x; + int y_off = panoramiXdataPtr[j].y; + + if(x_off || y_off) { + xPoint *pnts = (xPoint*)&stuff[1]; + int i = (stuff->coordMode==CoordModePrevious) ? 1 : npoint; + + while(i--) { + pnts->x -= x_off; + pnts->y -= y_off; + pnts++; + } + } + } + + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (* SavedProcVector[X_PolyPoint])(client); + if(result != Success) break; + } + DEALLOCATE_LOCAL(origPts); + return (result); + } else + return (client->noClientException); +} + + +int PanoramiXPolyLine(ClientPtr client) +{ + PanoramiXRes *gc, *draw; + int result = 0, npoint, j; + xPoint *origPts; + Bool isRoot; + REQUEST(xPolyLineReq); + + REQUEST_AT_LEAST_SIZE(xPolyLineReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolyLine])(client); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + npoint = ((client->req_len << 2) - sizeof(xPolyLineReq)) >> 2; + if (npoint > 0){ + origPts = (xPoint *) ALLOCATE_LOCAL(npoint * sizeof(xPoint)); + memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint)); + FOR_NSCREENS_FORWARD(j){ + + if(j) memcpy(&stuff[1], origPts, npoint * sizeof(xPoint)); + + if (isRoot) { + int x_off = panoramiXdataPtr[j].x; + int y_off = panoramiXdataPtr[j].y; + + if(x_off || y_off) { + xPoint *pnts = (xPoint*)&stuff[1]; + int i = (stuff->coordMode==CoordModePrevious) ? 1 : npoint; + + while(i--) { + pnts->x -= x_off; + pnts->y -= y_off; + pnts++; + } + } + } + + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (* SavedProcVector[X_PolyLine])(client); + if(result != Success) break; + } + DEALLOCATE_LOCAL(origPts); + return (result); + } else + return (client->noClientException); +} + + +int PanoramiXPolySegment(ClientPtr client) +{ + int result = 0, nsegs, i, j; + PanoramiXRes *gc, *draw; + xSegment *origSegs; + Bool isRoot; + REQUEST(xPolySegmentReq); + + REQUEST_AT_LEAST_SIZE(xPolySegmentReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolySegment])(client); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + nsegs = (client->req_len << 2) - sizeof(xPolySegmentReq); + if(nsegs & 4) return BadLength; + nsegs >>= 3; + if (nsegs > 0) { + origSegs = (xSegment *) ALLOCATE_LOCAL(nsegs * sizeof(xSegment)); + memcpy((char *) origSegs, (char *) &stuff[1], nsegs * sizeof(xSegment)); + FOR_NSCREENS_FORWARD(j){ + + if(j) memcpy(&stuff[1], origSegs, nsegs * sizeof(xSegment)); + + if (isRoot) { + int x_off = panoramiXdataPtr[j].x; + int y_off = panoramiXdataPtr[j].y; + + if(x_off || y_off) { + xSegment *segs = (xSegment*)&stuff[1]; + + for (i = nsegs; i--; segs++) { + segs->x1 -= x_off; + segs->x2 -= x_off; + segs->y1 -= y_off; + segs->y2 -= y_off; + } + } + } + + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (* SavedProcVector[X_PolySegment])(client); + if(result != Success) break; + } + DEALLOCATE_LOCAL(origSegs); + return (result); + } else + return (client->noClientException); +} + + +int PanoramiXPolyRectangle(ClientPtr client) +{ + int result = 0, nrects, i, j; + PanoramiXRes *gc, *draw; + Bool isRoot; + xRectangle *origRecs; + REQUEST(xPolyRectangleReq); + + REQUEST_AT_LEAST_SIZE(xPolyRectangleReq); + + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolyRectangle])(client); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + nrects = (client->req_len << 2) - sizeof(xPolyRectangleReq); + if(nrects & 4) return BadLength; + nrects >>= 3; + if (nrects > 0){ + origRecs = (xRectangle *) ALLOCATE_LOCAL(nrects * sizeof(xRectangle)); + memcpy((char *)origRecs,(char *)&stuff[1],nrects * sizeof(xRectangle)); + FOR_NSCREENS_FORWARD(j){ + + if(j) memcpy(&stuff[1], origRecs, nrects * sizeof(xRectangle)); + + if (isRoot) { + int x_off = panoramiXdataPtr[j].x; + int y_off = panoramiXdataPtr[j].y; + + + if(x_off || y_off) { + xRectangle *rects = (xRectangle *) &stuff[1]; + + for (i = nrects; i--; rects++) { + rects->x -= x_off; + rects->y -= y_off; + } + } + } + + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (* SavedProcVector[X_PolyRectangle])(client); + if(result != Success) break; + } + DEALLOCATE_LOCAL(origRecs); + return (result); + } else + return (client->noClientException); +} + + +int PanoramiXPolyArc(ClientPtr client) +{ + int result = 0, narcs, i, j; + PanoramiXRes *gc, *draw; + Bool isRoot; + xArc *origArcs; + REQUEST(xPolyArcReq); + + REQUEST_AT_LEAST_SIZE(xPolyArcReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolyArc])(client); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + narcs = (client->req_len << 2) - sizeof(xPolyArcReq); + if(narcs % sizeof(xArc)) return BadLength; + narcs /= sizeof(xArc); + if (narcs > 0){ + origArcs = (xArc *) ALLOCATE_LOCAL(narcs * sizeof(xArc)); + memcpy((char *) origArcs, (char *) &stuff[1], narcs * sizeof(xArc)); + FOR_NSCREENS_FORWARD(j){ + + if(j) memcpy(&stuff[1], origArcs, narcs * sizeof(xArc)); + + if (isRoot) { + int x_off = panoramiXdataPtr[j].x; + int y_off = panoramiXdataPtr[j].y; + + if(x_off || y_off) { + xArc *arcs = (xArc *) &stuff[1]; + + for (i = narcs; i--; arcs++) { + arcs->x -= x_off; + arcs->y -= y_off; + } + } + } + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (* SavedProcVector[X_PolyArc])(client); + if(result != Success) break; + } + DEALLOCATE_LOCAL(origArcs); + return (result); + } else + return (client->noClientException); +} + + +int PanoramiXFillPoly(ClientPtr client) +{ + int result = 0, count, j; + PanoramiXRes *gc, *draw; + Bool isRoot; + DDXPointPtr locPts; + REQUEST(xFillPolyReq); + + REQUEST_AT_LEAST_SIZE(xFillPolyReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_FillPoly])(client); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + count = ((client->req_len << 2) - sizeof(xFillPolyReq)) >> 2; + if (count > 0){ + locPts = (DDXPointPtr) ALLOCATE_LOCAL(count * sizeof(DDXPointRec)); + memcpy((char *)locPts, (char *)&stuff[1], count * sizeof(DDXPointRec)); + FOR_NSCREENS_FORWARD(j){ + + if(j) memcpy(&stuff[1], locPts, count * sizeof(DDXPointRec)); + + if (isRoot) { + int x_off = panoramiXdataPtr[j].x; + int y_off = panoramiXdataPtr[j].y; + + if(x_off || y_off) { + DDXPointPtr pnts = (DDXPointPtr)&stuff[1]; + int i = (stuff->coordMode==CoordModePrevious) ? 1 : count; + + while(i--) { + pnts->x -= x_off; + pnts->y -= y_off; + pnts++; + } + } + } + + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (* SavedProcVector[X_FillPoly])(client); + if(result != Success) break; + } + DEALLOCATE_LOCAL(locPts); + return (result); + } else + return (client->noClientException); +} + + +int PanoramiXPolyFillRectangle(ClientPtr client) +{ + int result = 0, things, i, j; + PanoramiXRes *gc, *draw; + Bool isRoot; + xRectangle *origRects; + REQUEST(xPolyFillRectangleReq); + + REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolyFillRectangle])(client); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + things = (client->req_len << 2) - sizeof(xPolyFillRectangleReq); + if(things & 4) return BadLength; + things >>= 3; + if (things > 0){ + origRects = (xRectangle *) ALLOCATE_LOCAL(things * sizeof(xRectangle)); + memcpy((char*)origRects,(char*)&stuff[1], things * sizeof(xRectangle)); + FOR_NSCREENS_FORWARD(j){ + + if(j) memcpy(&stuff[1], origRects, things * sizeof(xRectangle)); + + if (isRoot) { + int x_off = panoramiXdataPtr[j].x; + int y_off = panoramiXdataPtr[j].y; + + if(x_off || y_off) { + xRectangle *rects = (xRectangle *) &stuff[1]; + + for (i = things; i--; rects++) { + rects->x -= x_off; + rects->y -= y_off; + } + } + } + + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (* SavedProcVector[X_PolyFillRectangle])(client); + if(result != Success) break; + } + DEALLOCATE_LOCAL(origRects); + return (result); + } else + return (client->noClientException); +} + + +int PanoramiXPolyFillArc(ClientPtr client) +{ + PanoramiXRes *gc, *draw; + Bool isRoot; + int result = 0, narcs, i, j; + xArc *origArcs; + REQUEST(xPolyFillArcReq); + + REQUEST_AT_LEAST_SIZE(xPolyFillArcReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolyFillArc])(client); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq); + IF_RETURN((narcs % sizeof(xArc)), BadLength); + narcs /= sizeof(xArc); + if (narcs > 0) { + origArcs = (xArc *) ALLOCATE_LOCAL(narcs * sizeof(xArc)); + memcpy((char *) origArcs, (char *)&stuff[1], narcs * sizeof(xArc)); + FOR_NSCREENS_FORWARD(j){ + + if(j) memcpy(&stuff[1], origArcs, narcs * sizeof(xArc)); + + if (isRoot) { + int x_off = panoramiXdataPtr[j].x; + int y_off = panoramiXdataPtr[j].y; + + if(x_off || y_off) { + xArc *arcs = (xArc *) &stuff[1]; + + for (i = narcs; i--; arcs++) { + arcs->x -= x_off; + arcs->y -= y_off; + } + } + } + + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (* SavedProcVector[X_PolyFillArc])(client); + if(result != Success) break; + } + DEALLOCATE_LOCAL(origArcs); + return (result); + } else + return (client->noClientException); +} + + +int PanoramiXPutImage(ClientPtr client) +{ + PanoramiXRes *gc, *draw; + Bool isRoot; + int j, result = 0, orig_x, orig_y; + REQUEST(xPutImageReq); + + REQUEST_AT_LEAST_SIZE(xPutImageReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PutImage])(client); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + orig_x = stuff->dstX; + orig_y = stuff->dstY; + FOR_NSCREENS_BACKWARD(j){ + if (isRoot) { + stuff->dstX = orig_x - panoramiXdataPtr[j].x; + stuff->dstY = orig_y - panoramiXdataPtr[j].y; + } + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (* SavedProcVector[X_PutImage])(client); + if(result != Success) break; + } + return (result); +} + + +int PanoramiXGetImage(ClientPtr client) +{ + DrawablePtr drawables[MAXSCREENS]; + DrawablePtr pDraw; + PanoramiXRes *draw; + xGetImageReply xgi; + Bool isRoot; + char *pBuf; + int i, x, y, w, h, format, rc; + Mask plane = 0, planemask; + int linesDone, nlines, linesPerBuf; + long widthBytesLine, length; + + REQUEST(xGetImageReq); + + REQUEST_SIZE_MATCH(xGetImageReq); + + if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) { + client->errorValue = stuff->format; + return(BadValue); + } + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(draw->type == XRT_PIXMAP) + return (*SavedProcVector[X_GetImage])(client); + + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixUnknownAccess); + if (rc != Success) + return rc; + + if(!((WindowPtr)pDraw)->realized) + return(BadMatch); + + x = stuff->x; + y = stuff->y; + w = stuff->width; + h = stuff->height; + format = stuff->format; + planemask = stuff->planeMask; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + if(isRoot) { + if( /* check for being onscreen */ + x < 0 || x + w > PanoramiXPixWidth || + y < 0 || y + h > PanoramiXPixHeight ) + return(BadMatch); + } else { + if( /* check for being onscreen */ + panoramiXdataPtr[0].x + pDraw->x + x < 0 || + panoramiXdataPtr[0].x + pDraw->x + x + w > PanoramiXPixWidth || + panoramiXdataPtr[0].y + pDraw->y + y < 0 || + panoramiXdataPtr[0].y + pDraw->y + y + h > PanoramiXPixHeight || + /* check for being inside of border */ + x < - wBorderWidth((WindowPtr)pDraw) || + x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width || + y < -wBorderWidth((WindowPtr)pDraw) || + y + h > wBorderWidth ((WindowPtr)pDraw) + (int)pDraw->height) + return(BadMatch); + } + + drawables[0] = pDraw; + for(i = 1; i < PanoramiXNumScreens; i++) { + rc = dixLookupDrawable(drawables+i, draw->info[i].id, client, 0, + DixUnknownAccess); + if (rc != Success) + return rc; + } + + xgi.visual = wVisual (((WindowPtr) pDraw)); + xgi.type = X_Reply; + xgi.sequenceNumber = client->sequence; + xgi.depth = pDraw->depth; + if(format == ZPixmap) { + widthBytesLine = PixmapBytePad(w, pDraw->depth); + length = widthBytesLine * h; + + + } else { + widthBytesLine = BitmapBytePad(w); + plane = ((Mask)1) << (pDraw->depth - 1); + /* only planes asked for */ + length = widthBytesLine * h * + Ones(planemask & (plane | (plane - 1))); + + } + + xgi.length = (length + 3) >> 2; + + if (widthBytesLine == 0 || h == 0) + linesPerBuf = 0; + else if (widthBytesLine >= XINERAMA_IMAGE_BUFSIZE) + linesPerBuf = 1; + else { + linesPerBuf = XINERAMA_IMAGE_BUFSIZE / widthBytesLine; + if (linesPerBuf > h) + linesPerBuf = h; + } + length = linesPerBuf * widthBytesLine; + if(!(pBuf = xalloc(length))) + return (BadAlloc); + + WriteReplyToClient(client, sizeof (xGetImageReply), &xgi); + + if (linesPerBuf == 0) { + /* nothing to do */ + } + else if (format == ZPixmap) { + linesDone = 0; + while (h - linesDone > 0) { + nlines = min(linesPerBuf, h - linesDone); + + if(pDraw->depth == 1) + bzero(pBuf, nlines * widthBytesLine); + + XineramaGetImageData(drawables, x, y + linesDone, w, nlines, + format, planemask, pBuf, widthBytesLine, isRoot); + + (void)WriteToClient(client, + (int)(nlines * widthBytesLine), + pBuf); + linesDone += nlines; + } + } else { /* XYPixmap */ + for (; plane; plane >>= 1) { + if (planemask & plane) { + linesDone = 0; + while (h - linesDone > 0) { + nlines = min(linesPerBuf, h - linesDone); + + bzero(pBuf, nlines * widthBytesLine); + + XineramaGetImageData(drawables, x, y + linesDone, w, + nlines, format, plane, pBuf, + widthBytesLine, isRoot); + + (void)WriteToClient(client, + (int)(nlines * widthBytesLine), + pBuf); + + linesDone += nlines; + } + } + } + } + xfree(pBuf); + return (client->noClientException); +} + + +/* The text stuff should be rewritten so that duplication happens + at the GlyphBlt level. That is, loading the font and getting + the glyphs should only happen once */ + +int +PanoramiXPolyText8(ClientPtr client) +{ + PanoramiXRes *gc, *draw; + Bool isRoot; + int result = 0, j; + int orig_x, orig_y; + REQUEST(xPolyTextReq); + + REQUEST_AT_LEAST_SIZE(xPolyTextReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolyText8])(client); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + orig_x = stuff->x; + orig_y = stuff->y; + FOR_NSCREENS_BACKWARD(j){ + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + if (isRoot) { + stuff->x = orig_x - panoramiXdataPtr[j].x; + stuff->y = orig_y - panoramiXdataPtr[j].y; + } + result = (*SavedProcVector[X_PolyText8])(client); + if(result != Success) break; + } + return (result); +} + +int +PanoramiXPolyText16(ClientPtr client) +{ + PanoramiXRes *gc, *draw; + Bool isRoot; + int result = 0, j; + int orig_x, orig_y; + REQUEST(xPolyTextReq); + + REQUEST_AT_LEAST_SIZE(xPolyTextReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolyText16])(client); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + orig_x = stuff->x; + orig_y = stuff->y; + FOR_NSCREENS_BACKWARD(j){ + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + if (isRoot) { + stuff->x = orig_x - panoramiXdataPtr[j].x; + stuff->y = orig_y - panoramiXdataPtr[j].y; + } + result = (*SavedProcVector[X_PolyText16])(client); + if(result != Success) break; + } + return (result); +} + + +int PanoramiXImageText8(ClientPtr client) +{ + int result = 0, j; + PanoramiXRes *gc, *draw; + Bool isRoot; + int orig_x, orig_y; + REQUEST(xImageTextReq); + + REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_ImageText8])(client); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + orig_x = stuff->x; + orig_y = stuff->y; + FOR_NSCREENS_BACKWARD(j){ + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + if (isRoot) { + stuff->x = orig_x - panoramiXdataPtr[j].x; + stuff->y = orig_y - panoramiXdataPtr[j].y; + } + result = (*SavedProcVector[X_ImageText8])(client); + if(result != Success) break; + } + return (result); +} + + +int PanoramiXImageText16(ClientPtr client) +{ + int result = 0, j; + PanoramiXRes *gc, *draw; + Bool isRoot; + int orig_x, orig_y; + REQUEST(xImageTextReq); + + REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars << 1); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_ImageText16])(client); + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + orig_x = stuff->x; + orig_y = stuff->y; + FOR_NSCREENS_BACKWARD(j){ + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + if (isRoot) { + stuff->x = orig_x - panoramiXdataPtr[j].x; + stuff->y = orig_y - panoramiXdataPtr[j].y; + } + result = (*SavedProcVector[X_ImageText16])(client); + if(result != Success) break; + } + return (result); +} + + + +int PanoramiXCreateColormap(ClientPtr client) +{ + PanoramiXRes *win, *newCmap; + int result = 0, j, orig_visual; + REQUEST(xCreateColormapReq); + + REQUEST_SIZE_MATCH(xCreateColormapReq); + + if(!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->window, XRT_WINDOW, DixReadAccess))) + return BadWindow; + + if(!stuff->visual || (stuff->visual > 255)) + return BadValue; + + if(!(newCmap = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + return BadAlloc; + + newCmap->type = XRT_COLORMAP; + newCmap->info[0].id = stuff->mid; + for(j = 1; j < PanoramiXNumScreens; j++) + newCmap->info[j].id = FakeClientID(client->index); + + orig_visual = stuff->visual; + FOR_NSCREENS_BACKWARD(j){ + stuff->mid = newCmap->info[j].id; + stuff->window = win->info[j].id; + stuff->visual = PanoramiXVisualTable[(orig_visual * MAXSCREENS) + j]; + result = (* SavedProcVector[X_CreateColormap])(client); + if(result != Success) break; + } + + if (result == Success) + AddResource(newCmap->info[0].id, XRT_COLORMAP, newCmap); + else + xfree(newCmap); + + return (result); +} + + +int PanoramiXFreeColormap(ClientPtr client) +{ + PanoramiXRes *cmap; + int result = 0, j; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + client->errorValue = stuff->id; + + if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->id, XRT_COLORMAP, DixDestroyAccess))) + return BadColor; + + FOR_NSCREENS_BACKWARD(j) { + stuff->id = cmap->info[j].id; + result = (* SavedProcVector[X_FreeColormap])(client); + if(result != Success) break; + } + + /* Since ProcFreeColormap is using FreeResource, it will free + our resource for us on the last pass through the loop above */ + + return (result); +} + + +int +PanoramiXCopyColormapAndFree(ClientPtr client) +{ + PanoramiXRes *cmap, *newCmap; + int result = 0, j; + REQUEST(xCopyColormapAndFreeReq); + + REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq); + + client->errorValue = stuff->srcCmap; + + if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->srcCmap, XRT_COLORMAP, + DixReadAccess | DixWriteAccess))) + return BadColor; + + if(!(newCmap = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + return BadAlloc; + + newCmap->type = XRT_COLORMAP; + newCmap->info[0].id = stuff->mid; + for(j = 1; j < PanoramiXNumScreens; j++) + newCmap->info[j].id = FakeClientID(client->index); + + FOR_NSCREENS_BACKWARD(j){ + stuff->srcCmap = cmap->info[j].id; + stuff->mid = newCmap->info[j].id; + result = (* SavedProcVector[X_CopyColormapAndFree])(client); + if(result != Success) break; + } + + if (result == Success) + AddResource(newCmap->info[0].id, XRT_COLORMAP, newCmap); + else + xfree(newCmap); + + return (result); +} + + +int PanoramiXInstallColormap(ClientPtr client) +{ + REQUEST(xResourceReq); + int result = 0, j; + PanoramiXRes *cmap; + + REQUEST_SIZE_MATCH(xResourceReq); + + client->errorValue = stuff->id; + + if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->id, XRT_COLORMAP, DixReadAccess))) + return BadColor; + + FOR_NSCREENS_BACKWARD(j){ + stuff->id = cmap->info[j].id; + result = (* SavedProcVector[X_InstallColormap])(client); + if(result != Success) break; + } + return (result); +} + + +int PanoramiXUninstallColormap(ClientPtr client) +{ + REQUEST(xResourceReq); + int result = 0, j; + PanoramiXRes *cmap; + + REQUEST_SIZE_MATCH(xResourceReq); + + client->errorValue = stuff->id; + + if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->id, XRT_COLORMAP, DixReadAccess))) + return BadColor; + + FOR_NSCREENS_BACKWARD(j) { + stuff->id = cmap->info[j].id; + result = (* SavedProcVector[X_UninstallColormap])(client); + if(result != Success) break; + } + return (result); +} + + +int PanoramiXAllocColor(ClientPtr client) +{ + int result = 0, j; + PanoramiXRes *cmap; + REQUEST(xAllocColorReq); + + REQUEST_SIZE_MATCH(xAllocColorReq); + + client->errorValue = stuff->cmap; + + if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->cmap, XRT_COLORMAP, DixWriteAccess))) + return BadColor; + + FOR_NSCREENS_BACKWARD(j){ + stuff->cmap = cmap->info[j].id; + result = (* SavedProcVector[X_AllocColor])(client); + if(result != Success) break; + } + return (result); +} + + +int PanoramiXAllocNamedColor(ClientPtr client) +{ + int result = 0, j; + PanoramiXRes *cmap; + REQUEST(xAllocNamedColorReq); + + REQUEST_FIXED_SIZE(xAllocNamedColorReq, stuff->nbytes); + + client->errorValue = stuff->cmap; + + if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->cmap, XRT_COLORMAP, DixWriteAccess))) + return BadColor; + + FOR_NSCREENS_BACKWARD(j){ + stuff->cmap = cmap->info[j].id; + result = (* SavedProcVector[X_AllocNamedColor])(client); + if(result != Success) break; + } + return (result); +} + + +int PanoramiXAllocColorCells(ClientPtr client) +{ + int result = 0, j; + PanoramiXRes *cmap; + REQUEST(xAllocColorCellsReq); + + REQUEST_SIZE_MATCH(xAllocColorCellsReq); + + client->errorValue = stuff->cmap; + + if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->cmap, XRT_COLORMAP, DixWriteAccess))) + return BadColor; + + FOR_NSCREENS_BACKWARD(j){ + stuff->cmap = cmap->info[j].id; + result = (* SavedProcVector[X_AllocColorCells])(client); + if(result != Success) break; + } + return (result); +} + + +int PanoramiXAllocColorPlanes(ClientPtr client) +{ + int result = 0, j; + PanoramiXRes *cmap; + REQUEST(xAllocColorPlanesReq); + + REQUEST_SIZE_MATCH(xAllocColorPlanesReq); + + client->errorValue = stuff->cmap; + + if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->cmap, XRT_COLORMAP, DixWriteAccess))) + return BadColor; + + FOR_NSCREENS_BACKWARD(j){ + stuff->cmap = cmap->info[j].id; + result = (* SavedProcVector[X_AllocColorPlanes])(client); + if(result != Success) break; + } + return (result); +} + + + +int PanoramiXFreeColors(ClientPtr client) +{ + int result = 0, j; + PanoramiXRes *cmap; + REQUEST(xFreeColorsReq); + + REQUEST_AT_LEAST_SIZE(xFreeColorsReq); + + client->errorValue = stuff->cmap; + + if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->cmap, XRT_COLORMAP, DixWriteAccess))) + return BadColor; + + FOR_NSCREENS_BACKWARD(j) { + stuff->cmap = cmap->info[j].id; + result = (* SavedProcVector[X_FreeColors])(client); + } + return (result); +} + + +int PanoramiXStoreColors(ClientPtr client) +{ + int result = 0, j; + PanoramiXRes *cmap; + REQUEST(xStoreColorsReq); + + REQUEST_AT_LEAST_SIZE(xStoreColorsReq); + + client->errorValue = stuff->cmap; + + if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->cmap, XRT_COLORMAP, DixWriteAccess))) + return BadColor; + + FOR_NSCREENS_BACKWARD(j){ + stuff->cmap = cmap->info[j].id; + result = (* SavedProcVector[X_StoreColors])(client); + if(result != Success) break; + } + return (result); +} + + +int PanoramiXStoreNamedColor(ClientPtr client) +{ + int result = 0, j; + PanoramiXRes *cmap; + REQUEST(xStoreNamedColorReq); + + REQUEST_FIXED_SIZE(xStoreNamedColorReq, stuff->nbytes); + + client->errorValue = stuff->cmap; + + if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->cmap, XRT_COLORMAP, DixWriteAccess))) + return BadColor; + + FOR_NSCREENS_BACKWARD(j){ + stuff->cmap = cmap->info[j].id; + result = (* SavedProcVector[X_StoreNamedColor])(client); + if(result != Success) break; + } + return (result); +} diff --git a/xorg-server-1.4/Xext/panoramiXsrv.h b/xorg-server-1.4/Xext/panoramiXsrv.h new file mode 100644 index 0000000..ae90244 --- /dev/null +++ b/xorg-server-1.4/Xext/panoramiXsrv.h @@ -0,0 +1,46 @@ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _PANORAMIXSRV_H_ +#define _PANORAMIXSRV_H_ + +#include "panoramiX.h" + +extern int PanoramiXNumScreens; +extern PanoramiXData *panoramiXdataPtr; +extern int PanoramiXPixWidth; +extern int PanoramiXPixHeight; +extern XID *PanoramiXVisualTable; + +extern void PanoramiXConsolidate(void); +extern Bool PanoramiXCreateConnectionBlock(void); +extern PanoramiXRes * PanoramiXFindIDByScrnum(RESTYPE, XID, int); +extern Bool XineramaRegisterConnectionBlockCallback(void (*func)(void)); +extern int XineramaDeleteResource(pointer, XID); + +extern void XineramaReinitData(ScreenPtr); + +extern RegionRec XineramaScreenRegions[MAXSCREENS]; + +extern unsigned long XRC_DRAWABLE; +extern unsigned long XRT_WINDOW; +extern unsigned long XRT_PIXMAP; +extern unsigned long XRT_GC; +extern unsigned long XRT_COLORMAP; + +extern void XineramaGetImageData( + DrawablePtr *pDrawables, + int left, + int top, + int width, + int height, + unsigned int format, + unsigned long planemask, + char *data, + int pitch, + Bool isRoot +); + +#endif /* _PANORAMIXSRV_H_ */ diff --git a/xorg-server-1.4/Xext/sampleEVI.c b/xorg-server-1.4/Xext/sampleEVI.c new file mode 100644 index 0000000..7508aa7 --- /dev/null +++ b/xorg-server-1.4/Xext/sampleEVI.c @@ -0,0 +1,104 @@ +/************************************************************ +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. +********************************************************/ + +#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" +static int sampleGetVisualInfo( + VisualID32 *visual, + int n_visual, + xExtendedVisualInfo **evi_rn, + int *n_info_rn, + VisualID32 **conflict_rn, + int *n_conflict_rn) +{ + int max_sz_evi = n_visual * sz_xExtendedVisualInfo * screenInfo.numScreens; + VisualID32 *temp_conflict; + xExtendedVisualInfo *evi; + int max_visuals = 0, max_sz_conflict, sz_conflict = 0; + register int visualI, scrI, sz_evi = 0, conflictI, n_conflict; + *evi_rn = evi = (xExtendedVisualInfo *)xalloc(max_sz_evi); + if (!*evi_rn) + return BadAlloc; + for (scrI = 0; scrI < screenInfo.numScreens; scrI++) { + if (screenInfo.screens[scrI]->numVisuals > max_visuals) + max_visuals = screenInfo.screens[scrI]->numVisuals; + } + max_sz_conflict = n_visual * sz_VisualID32 * screenInfo.numScreens * max_visuals; + 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/xorg-server-1.4/Xext/saver.c b/xorg-server-1.4/Xext/saver.c new file mode 100644 index 0000000..a9f1dd3 --- /dev/null +++ b/xorg-server-1.4/Xext/saver.c @@ -0,0 +1,1557 @@ +/* + * +Copyright (c) 1992 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + * + * Author: Keith Packard, MIT X Consortium + */ + + +#define NEED_REPLIES +#define NEED_EVENTS +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#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 +#include "gcstruct.h" +#include "cursorstr.h" +#include "colormapst.h" +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif +#ifdef DPMSExtension +#define DPMS_SERVER +#include +#endif + +#include + +#include "modinit.h" + +#if 0 +static unsigned char ScreenSaverReqCode = 0; +#endif +static int ScreenSaverEventBase = 0; + +static DISPATCH_PROC(ProcScreenSaverQueryInfo); +static DISPATCH_PROC(ProcScreenSaverDispatch); +static DISPATCH_PROC(ProcScreenSaverQueryVersion); +static DISPATCH_PROC(ProcScreenSaverSelectInput); +static DISPATCH_PROC(ProcScreenSaverSetAttributes); +static DISPATCH_PROC(ProcScreenSaverUnsetAttributes); +static DISPATCH_PROC(ProcScreenSaverSuspend); +static DISPATCH_PROC(SProcScreenSaverDispatch); +static DISPATCH_PROC(SProcScreenSaverQueryInfo); +static DISPATCH_PROC(SProcScreenSaverQueryVersion); +static DISPATCH_PROC(SProcScreenSaverSelectInput); +static DISPATCH_PROC(SProcScreenSaverSetAttributes); +static DISPATCH_PROC(SProcScreenSaverUnsetAttributes); +static DISPATCH_PROC(SProcScreenSaverSuspend); + +static Bool ScreenSaverHandle ( + ScreenPtr /* pScreen */, + int /* xstate */, + Bool /* force */ + ); + +static Bool +CreateSaverWindow ( + ScreenPtr /* pScreen */ + ); + +static Bool +DestroySaverWindow ( + ScreenPtr /* pScreen */ + ); + +static void +UninstallSaverColormap ( + ScreenPtr /* pScreen */ + ); + +static void +CheckScreenPrivate ( + ScreenPtr /* pScreen */ + ); + +static void SScreenSaverNotifyEvent ( + xScreenSaverNotifyEvent * /* from */, + xScreenSaverNotifyEvent * /* to */ + ); + +static void ScreenSaverResetProc ( + ExtensionEntry * /* extEntry */ + ); + +static RESTYPE SuspendType; /* resource type for suspension records */ + +typedef struct _ScreenSaverSuspension *ScreenSaverSuspensionPtr; + +/* List of clients that are suspending the screensaver. */ +static ScreenSaverSuspensionPtr suspendingClients = NULL; + +/* + * clientResource is a resource ID that's added when the record is + * allocated, so the record is freed and the screensaver resumed when + * the client disconnects. count is the number of times the client has + * requested the screensaver be suspended. + */ +typedef struct _ScreenSaverSuspension +{ + ScreenSaverSuspensionPtr next; + ClientPtr pClient; + XID clientResource; + int count; +} ScreenSaverSuspensionRec; + +static int ScreenSaverFreeSuspend( + pointer /*value */, + XID /* id */ +); + +/* + * each screen has a list of clients requesting + * ScreenSaverNotify events. Each client has a resource + * for each screen it selects ScreenSaverNotify input for, + * this resource is used to delete the ScreenSaverNotifyRec + * entry from the per-screen queue. + */ + +static RESTYPE EventType; /* resource type for event masks */ + +typedef struct _ScreenSaverEvent *ScreenSaverEventPtr; + +typedef struct _ScreenSaverEvent { + ScreenSaverEventPtr next; + ClientPtr client; + ScreenPtr screen; + XID resource; + CARD32 mask; +} ScreenSaverEventRec; + +static int ScreenSaverFreeEvents( + pointer /* value */, + XID /* id */ +); + +static Bool setEventMask ( + ScreenPtr /* pScreen */, + ClientPtr /* client */, + unsigned long /* mask */ +); + +static unsigned long getEventMask ( + ScreenPtr /* pScreen */, + ClientPtr /* client */ +); + +/* + * when a client sets the screen saver attributes, a resource is + * kept to be freed when the client exits + */ + +static RESTYPE AttrType; /* resource type for attributes */ + +typedef struct _ScreenSaverAttr { + ScreenPtr screen; + ClientPtr client; + XID resource; + short x, y; + unsigned short width, height, borderWidth; + unsigned char class; + unsigned char depth; + VisualID visual; + CursorPtr pCursor; + PixmapPtr pBackgroundPixmap; + PixmapPtr pBorderPixmap; + Colormap colormap; + unsigned long mask; /* no pixmaps or cursors */ + unsigned long *values; +} ScreenSaverAttrRec, *ScreenSaverAttrPtr; + +static int ScreenSaverFreeAttr ( + pointer /* value */, + XID /* id */ +); + +static void FreeAttrs ( + ScreenSaverAttrPtr /* pAttr */ +); + +static void FreeScreenAttr ( + ScreenSaverAttrPtr /* pAttr */ +); + +static void +SendScreenSaverNotify ( + ScreenPtr /* pScreen */, + int /* state */, + Bool /* forced */ +); + +typedef struct _ScreenSaverScreenPrivate { + ScreenSaverEventPtr events; + ScreenSaverAttrPtr attr; + Bool hasWindow; + Colormap installedMap; +} ScreenSaverScreenPrivateRec, *ScreenSaverScreenPrivatePtr; + +static ScreenSaverScreenPrivatePtr +MakeScreenPrivate ( + ScreenPtr /* pScreen */ + ); + +static int ScreenPrivateIndex; + +#define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr)(s)->devPrivates[ScreenPrivateIndex].ptr) +#define SetScreenPrivate(s,v) ((s)->devPrivates[ScreenPrivateIndex].ptr = (pointer) v); +#define SetupScreen(s) ScreenSaverScreenPrivatePtr pPriv = (s ? GetScreenPrivate(s) : NULL) + +#define New(t) ((t *) xalloc (sizeof (t))) + +/**************** + * ScreenSaverExtensionInit + * + * Called from InitExtensions in main() or from QueryExtension() if the + * extension is dynamically loaded. + * + ****************/ + +void +ScreenSaverExtensionInit(INITARGS) +{ + ExtensionEntry *extEntry; + int i; + ScreenPtr pScreen; + + AttrType = CreateNewResourceType(ScreenSaverFreeAttr); + EventType = CreateNewResourceType(ScreenSaverFreeEvents); + SuspendType = CreateNewResourceType(ScreenSaverFreeSuspend); + ScreenPrivateIndex = AllocateScreenPrivateIndex (); + + for (i = 0; i < screenInfo.numScreens; i++) + { + pScreen = screenInfo.screens[i]; + SetScreenPrivate (pScreen, NULL); + } + if (AttrType && EventType && SuspendType && ScreenPrivateIndex != -1 && + (extEntry = AddExtension(ScreenSaverName, ScreenSaverNumberEvents, 0, + ProcScreenSaverDispatch, SProcScreenSaverDispatch, + ScreenSaverResetProc, StandardMinorOpcode))) + { +#if 0 + ScreenSaverReqCode = (unsigned char)extEntry->base; +#endif + ScreenSaverEventBase = extEntry->eventBase; + EventSwapVector[ScreenSaverEventBase] = (EventSwapPtr) SScreenSaverNotifyEvent; + } +} + +/*ARGSUSED*/ +static void +ScreenSaverResetProc (extEntry) +ExtensionEntry *extEntry; +{ +} + +static void +CheckScreenPrivate (pScreen) + ScreenPtr pScreen; +{ + SetupScreen (pScreen); + + if (!pPriv) + return; + if (!pPriv->attr && !pPriv->events && + !pPriv->hasWindow && pPriv->installedMap == None) + { + xfree (pPriv); + SetScreenPrivate (pScreen, NULL); + savedScreenInfo[pScreen->myNum].ExternalScreenSaver = NULL; + } +} + +static ScreenSaverScreenPrivatePtr +MakeScreenPrivate (pScreen) + ScreenPtr pScreen; +{ + SetupScreen (pScreen); + + if (pPriv) + return pPriv; + pPriv = New (ScreenSaverScreenPrivateRec); + if (!pPriv) + return 0; + pPriv->events = 0; + pPriv->attr = 0; + pPriv->hasWindow = FALSE; + pPriv->installedMap = None; + SetScreenPrivate (pScreen, pPriv); + savedScreenInfo[pScreen->myNum].ExternalScreenSaver = ScreenSaverHandle; + return pPriv; +} + +static unsigned long +getEventMask (pScreen, client) + ScreenPtr pScreen; + ClientPtr client; +{ + SetupScreen(pScreen); + ScreenSaverEventPtr 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 (pScreen, client, mask) + ScreenPtr pScreen; + ClientPtr client; + unsigned long mask; +{ + SetupScreen(pScreen); + ScreenSaverEventPtr pEv, *pPrev; + + if (getEventMask (pScreen, client) == mask) + return TRUE; + if (!pPriv) + { + pPriv = MakeScreenPrivate (pScreen); + if (!pPriv) + return FALSE; + } + for (pPrev = &pPriv->events; (pEv = *pPrev) != 0; pPrev = &pEv->next) + if (pEv->client == client) + break; + if (mask == 0) + { + FreeResource (pEv->resource, EventType); + *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); + if (!AddResource (pEv->resource, EventType, (pointer) pEv)) + return FALSE; + } + pEv->mask = mask; + } + return TRUE; +} + +static void +FreeAttrs (pAttr) + ScreenSaverAttrPtr pAttr; +{ + PixmapPtr pPixmap; + CursorPtr pCursor; + + if ((pPixmap = pAttr->pBackgroundPixmap) != 0) + (*pPixmap->drawable.pScreen->DestroyPixmap)(pPixmap); + if ((pPixmap = pAttr->pBorderPixmap) != 0) + (*pPixmap->drawable.pScreen->DestroyPixmap)(pPixmap); + if ((pCursor = pAttr->pCursor) != 0) + FreeCursor (pCursor, (Cursor) 0); +} + +static void +FreeScreenAttr (pAttr) + ScreenSaverAttrPtr pAttr; +{ + FreeAttrs (pAttr); + xfree (pAttr->values); + xfree (pAttr); +} + +static int +ScreenSaverFreeEvents (value, id) + pointer value; + XID id; +{ + ScreenSaverEventPtr pOld = (ScreenSaverEventPtr)value; + ScreenPtr pScreen = pOld->screen; + SetupScreen (pScreen); + ScreenSaverEventPtr pEv, *pPrev; + + if (!pPriv) + return TRUE; + for (pPrev = &pPriv->events; (pEv = *pPrev) != 0; pPrev = &pEv->next) + if (pEv == pOld) + break; + if (!pEv) + return TRUE; + *pPrev = pEv->next; + xfree (pEv); + CheckScreenPrivate (pScreen); + return TRUE; +} + +static int +ScreenSaverFreeAttr (value, id) + pointer value; + XID id; +{ + ScreenSaverAttrPtr pOldAttr = (ScreenSaverAttrPtr)value; + ScreenPtr pScreen = pOldAttr->screen; + SetupScreen (pScreen); + + if (!pPriv) + return TRUE; + if (pPriv->attr != pOldAttr) + return TRUE; + FreeScreenAttr (pOldAttr); + pPriv->attr = NULL; + if (pPriv->hasWindow) + { + SaveScreens (SCREEN_SAVER_FORCER, ScreenSaverReset); + SaveScreens (SCREEN_SAVER_FORCER, ScreenSaverActive); + } + CheckScreenPrivate (pScreen); + return TRUE; +} + +static int +ScreenSaverFreeSuspend (pointer value, XID id) +{ + ScreenSaverSuspensionPtr data = (ScreenSaverSuspensionPtr) value; + ScreenSaverSuspensionPtr *prev, this; + + /* Unlink and free the suspension record for the client */ + for (prev = &suspendingClients; (this = *prev); prev = &this->next) + { + if (this == data) + { + *prev = this->next; + xfree (this); + break; + } + } + + /* Reenable the screensaver if this was the last client suspending it. */ + if (screenSaverSuspended && suspendingClients == NULL) + { + screenSaverSuspended = FALSE; + + /* The screensaver could be active, since suspending it (by design) + doesn't prevent it from being forceably activated */ +#ifdef DPMSExtension + if (screenIsSaved != SCREEN_SAVER_ON && DPMSPowerLevel == DPMSModeOn) +#else + if (screenIsSaved != SCREEN_SAVER_ON) +#endif + { + UpdateCurrentTimeIf(); + lastDeviceEventTime = currentTime; + SetScreenSaverTimer(); + } + } + + return Success; +} + +static void +SendScreenSaverNotify (pScreen, state, forced) + ScreenPtr pScreen; + int state; + Bool forced; +{ + ScreenSaverScreenPrivatePtr pPriv; + ScreenSaverEventPtr pEv; + unsigned long mask; + xScreenSaverNotifyEvent ev; + ClientPtr client; + int kind; + + UpdateCurrentTimeIf (); + mask = ScreenSaverNotifyMask; + if (state == ScreenSaverCycle) + mask = ScreenSaverCycleMask; + pScreen = screenInfo.screens[pScreen->myNum]; + pPriv = GetScreenPrivate(pScreen); + if (!pPriv) + return; + if (pPriv->attr) + kind = ScreenSaverExternal; + else if (ScreenSaverBlanking != DontPreferBlanking) + kind = ScreenSaverBlanked; + else + kind = ScreenSaverInternal; + for (pEv = pPriv->events; pEv; pEv = pEv->next) + { + client = pEv->client; + if (client->clientGone) + continue; + if (!(pEv->mask & mask)) + continue; + ev.type = ScreenSaverNotify + ScreenSaverEventBase; + ev.state = state; + ev.sequenceNumber = client->sequence; + ev.timestamp = currentTime.milliseconds; + ev.root = WindowTable[pScreen->myNum]->drawable.id; + ev.window = savedScreenInfo[pScreen->myNum].wid; + ev.kind = kind; + ev.forced = forced; + WriteEventsToClient (client, 1, (xEvent *) &ev); + } +} + +static void +SScreenSaverNotifyEvent (from, to) + xScreenSaverNotifyEvent *from, *to; +{ + to->type = from->type; + to->state = from->state; + cpswaps (from->sequenceNumber, to->sequenceNumber); + cpswapl (from->timestamp, to->timestamp); + cpswapl (from->root, to->root); + cpswapl (from->window, to->window); + to->kind = from->kind; + to->forced = from->forced; +} + +static void +UninstallSaverColormap (pScreen) + ScreenPtr pScreen; +{ + SetupScreen(pScreen); + ColormapPtr pCmap; + + if (pPriv && pPriv->installedMap != None) + { + pCmap = (ColormapPtr) LookupIDByType (pPriv->installedMap, RT_COLORMAP); + if (pCmap) + (*pCmap->pScreen->UninstallColormap) (pCmap); + pPriv->installedMap = None; + CheckScreenPrivate (pScreen); + } +} + +static Bool +CreateSaverWindow (pScreen) + ScreenPtr pScreen; +{ + SetupScreen (pScreen); + ScreenSaverStuffPtr pSaver; + ScreenSaverAttrPtr pAttr; + WindowPtr pWin; + int result; + unsigned long mask; + Colormap *installedMaps; + int numInstalled; + int i; + Colormap wantMap; + ColormapPtr pCmap; + + pSaver = &savedScreenInfo[pScreen->myNum]; + if (pSaver->pWindow) + { + pSaver->pWindow = NullWindow; + FreeResource (pSaver->wid, RT_NONE); + if (pPriv) + { + UninstallSaverColormap (pScreen); + pPriv->hasWindow = FALSE; + CheckScreenPrivate (pScreen); + } + } + + if (!pPriv || !(pAttr = pPriv->attr)) + return FALSE; + + pPriv->installedMap = None; + + if (GrabInProgress && GrabInProgress != pAttr->client->index) + return FALSE; + + pWin = CreateWindow (pSaver->wid, WindowTable[pScreen->myNum], + pAttr->x, pAttr->y, pAttr->width, pAttr->height, + pAttr->borderWidth, pAttr->class, + pAttr->mask, (XID *)pAttr->values, + pAttr->depth, serverClient, pAttr->visual, + &result); + if (!pWin) + return FALSE; + + if (!AddResource(pWin->drawable.id, RT_WINDOW, pWin)) + return FALSE; + + mask = 0; + if (pAttr->pBackgroundPixmap) + { + pWin->backgroundState = BackgroundPixmap; + pWin->background.pixmap = pAttr->pBackgroundPixmap; + pAttr->pBackgroundPixmap->refcnt++; + mask |= CWBackPixmap; + } + if (pAttr->pBorderPixmap) + { + pWin->borderIsPixel = FALSE; + pWin->border.pixmap = pAttr->pBorderPixmap; + pAttr->pBorderPixmap->refcnt++; + mask |= CWBorderPixmap; + } + if (pAttr->pCursor) + { + if (!pWin->optional) + if (!MakeWindowOptional (pWin)) + { + FreeResource (pWin->drawable.id, RT_NONE); + return FALSE; + } + if (pWin->optional->cursor) + FreeCursor (pWin->optional->cursor, (Cursor)0); + pWin->optional->cursor = pAttr->pCursor; + pAttr->pCursor->refcnt++; + pWin->cursorIsNone = FALSE; + CheckWindowOptionalNeed (pWin); + mask |= CWCursor; + } + if (mask) + (*pScreen->ChangeWindowAttributes) (pWin, mask); + + if (pAttr->colormap != None) + (void) ChangeWindowAttributes (pWin, CWColormap, &pAttr->colormap, + serverClient); + + MapWindow (pWin, serverClient); + + pPriv->hasWindow = TRUE; + pSaver->pWindow = pWin; + + /* check and install our own colormap if it isn't installed now */ + wantMap = wColormap (pWin); + if (wantMap == None) + return TRUE; + installedMaps = (Colormap *) ALLOCATE_LOCAL (pScreen->maxInstalledCmaps * + sizeof (Colormap)); + numInstalled = (*pWin->drawable.pScreen->ListInstalledColormaps) + (pScreen, installedMaps); + for (i = 0; i < numInstalled; i++) + if (installedMaps[i] == wantMap) + break; + + DEALLOCATE_LOCAL ((char *) installedMaps); + + if (i < numInstalled) + return TRUE; + + pCmap = (ColormapPtr) LookupIDByType (wantMap, RT_COLORMAP); + if (!pCmap) + return TRUE; + + pPriv->installedMap = wantMap; + + (*pCmap->pScreen->InstallColormap) (pCmap); + + return TRUE; +} + +static Bool +DestroySaverWindow (pScreen) + ScreenPtr pScreen; +{ + SetupScreen(pScreen); + ScreenSaverStuffPtr pSaver; + + if (!pPriv || !pPriv->hasWindow) + return FALSE; + + pSaver = &savedScreenInfo[pScreen->myNum]; + if (pSaver->pWindow) + { + pSaver->pWindow = NullWindow; + FreeResource (pSaver->wid, RT_NONE); + } + pPriv->hasWindow = FALSE; + CheckScreenPrivate (pScreen); + UninstallSaverColormap (pScreen); + return TRUE; +} + +static Bool +ScreenSaverHandle (pScreen, xstate, force) + ScreenPtr pScreen; + int xstate; + Bool force; +{ + int state = 0; + Bool ret = FALSE; + ScreenSaverScreenPrivatePtr pPriv; + + switch (xstate) + { + case SCREEN_SAVER_ON: + state = ScreenSaverOn; + ret = CreateSaverWindow (pScreen); + break; + case SCREEN_SAVER_OFF: + state = ScreenSaverOff; + ret = DestroySaverWindow (pScreen); + break; + case SCREEN_SAVER_CYCLE: + state = ScreenSaverCycle; + pPriv = GetScreenPrivate (pScreen); + if (pPriv && pPriv->hasWindow) + ret = TRUE; + + } +#ifdef PANORAMIX + if(noPanoramiXExtension || !pScreen->myNum) +#endif + SendScreenSaverNotify (pScreen, state, force); + return ret; +} + +static int +ProcScreenSaverQueryVersion (client) + register ClientPtr client; +{ + xScreenSaverQueryVersionReply rep; + register int n; + + REQUEST_SIZE_MATCH (xScreenSaverQueryVersionReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.majorVersion = ScreenSaverMajorVersion; + rep.minorVersion = ScreenSaverMinorVersion; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + } + WriteToClient(client, sizeof (xScreenSaverQueryVersionReply), (char *)&rep); + return (client->noClientException); +} + +static int +ProcScreenSaverQueryInfo (client) + register ClientPtr client; +{ + REQUEST(xScreenSaverQueryInfoReq); + xScreenSaverQueryInfoReply rep; + register int n, rc; + ScreenSaverStuffPtr pSaver; + DrawablePtr pDraw; + CARD32 lastInput; + ScreenSaverScreenPrivatePtr pPriv; + + REQUEST_SIZE_MATCH (xScreenSaverQueryInfoReq); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixUnknownAccess); + if (rc != Success) + return rc; + + pSaver = &savedScreenInfo[pDraw->pScreen->myNum]; + pPriv = GetScreenPrivate (pDraw->pScreen); + + UpdateCurrentTime (); + lastInput = GetTimeInMillis() - lastDeviceEventTime.milliseconds; + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.window = pSaver->wid; + if (screenIsSaved != SCREEN_SAVER_OFF) + { + rep.state = ScreenSaverOn; + if (ScreenSaverTime) + rep.tilOrSince = lastInput - ScreenSaverTime; + else + rep.tilOrSince = 0; + } + else + { + if (ScreenSaverTime) + { + rep.state = ScreenSaverOff; + if (ScreenSaverTime < lastInput) + rep.tilOrSince = 0; + else + rep.tilOrSince = ScreenSaverTime - lastInput; + } + else + { + rep.state = ScreenSaverDisabled; + rep.tilOrSince = 0; + } + } + rep.idle = lastInput; + rep.eventMask = getEventMask (pDraw->pScreen, client); + if (pPriv && pPriv->attr) + rep.kind = ScreenSaverExternal; + else if (ScreenSaverBlanking != DontPreferBlanking) + rep.kind = ScreenSaverBlanked; + else + rep.kind = ScreenSaverInternal; + if (client->swapped) + { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.window, n); + swapl (&rep.tilOrSince, n); + swapl (&rep.idle, n); + swapl (&rep.eventMask, n); + } + WriteToClient(client, sizeof (xScreenSaverQueryInfoReply), (char *)&rep); + return (client->noClientException); +} + +static int +ProcScreenSaverSelectInput (client) + register ClientPtr client; +{ + REQUEST(xScreenSaverSelectInputReq); + DrawablePtr pDraw; + int rc; + + REQUEST_SIZE_MATCH (xScreenSaverSelectInputReq); + rc = dixLookupDrawable (&pDraw, stuff->drawable, client, 0, + DixUnknownAccess); + if (rc != Success) + return rc; + if (!setEventMask (pDraw->pScreen, client, stuff->eventMask)) + return BadAlloc; + return Success; +} + +static int +ScreenSaverSetAttributes (ClientPtr client) +{ + REQUEST(xScreenSaverSetAttributesReq); + DrawablePtr pDraw; + WindowPtr pParent; + ScreenPtr pScreen; + ScreenSaverScreenPrivatePtr pPriv = 0; + ScreenSaverAttrPtr pAttr = 0; + int ret, len, class, bw, depth; + unsigned long visual; + int idepth, ivisual; + Bool fOK; + DepthPtr pDepth; + WindowOptPtr ancwopt; + unsigned int *pVlist; + unsigned long *values = 0; + unsigned long tmask, imask; + unsigned long val; + Pixmap pixID; + PixmapPtr pPixmap; + Cursor cursorID; + CursorPtr pCursor; + Colormap cmap; + ColormapPtr pCmap; + + REQUEST_AT_LEAST_SIZE (xScreenSaverSetAttributesReq); + ret = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixUnknownAccess); + if (ret != Success) + return ret; + pScreen = pDraw->pScreen; + pParent = WindowTable[pScreen->myNum]; + + len = stuff->length - (sizeof(xScreenSaverSetAttributesReq) >> 2); + if (Ones(stuff->mask) != len) + return BadLength; + if (!stuff->width || !stuff->height) + { + client->errorValue = 0; + return BadValue; + } + switch (class = stuff->c_class) + { + case CopyFromParent: + case InputOnly: + case InputOutput: + break; + default: + client->errorValue = class; + return BadValue; + } + bw = stuff->borderWidth; + depth = stuff->depth; + visual = stuff->visualID; + + /* copied directly from CreateWindow */ + + if (class == CopyFromParent) + class = pParent->drawable.class; + + if ((class != InputOutput) && (class != InputOnly)) + { + client->errorValue = class; + return BadValue; + } + + if ((class != InputOnly) && (pParent->drawable.class == InputOnly)) + return BadMatch; + + if ((class == InputOnly) && ((bw != 0) || (depth != 0))) + return BadMatch; + + if ((class == InputOutput) && (depth == 0)) + depth = pParent->drawable.depth; + ancwopt = pParent->optional; + if (!ancwopt) + ancwopt = FindWindowWithOptional(pParent)->optional; + if (visual == CopyFromParent) + visual = ancwopt->visual; + + /* Find out if the depth and visual are acceptable for this Screen */ + if ((visual != ancwopt->visual) || (depth != pParent->drawable.depth)) + { + fOK = FALSE; + for(idepth = 0; idepth < pScreen->numDepths; idepth++) + { + pDepth = (DepthPtr) &pScreen->allowedDepths[idepth]; + if ((depth == pDepth->depth) || (depth == 0)) + { + for (ivisual = 0; ivisual < pDepth->numVids; ivisual++) + { + if (visual == pDepth->vids[ivisual]) + { + fOK = TRUE; + break; + } + } + } + } + if (fOK == FALSE) + return BadMatch; + } + + if (((stuff->mask & (CWBorderPixmap | CWBorderPixel)) == 0) && + (class != InputOnly) && + (depth != pParent->drawable.depth)) + { + return BadMatch; + } + + if (((stuff->mask & CWColormap) == 0) && + (class != InputOnly) && + ((visual != ancwopt->visual) || (ancwopt->colormap == None))) + { + return BadMatch; + } + + /* end of errors from CreateWindow */ + + pPriv = GetScreenPrivate (pScreen); + if (pPriv && pPriv->attr) + { + if (pPriv->attr->client != client) + return BadAccess; + } + if (!pPriv) + { + pPriv = MakeScreenPrivate (pScreen); + if (!pPriv) + return FALSE; + } + pAttr = New (ScreenSaverAttrRec); + if (!pAttr) + { + ret = BadAlloc; + goto bail; + } + /* over allocate for override redirect */ + values = (unsigned long *) xalloc ((len + 1) * sizeof (unsigned long)); + if (!values) + { + ret = BadAlloc; + goto bail; + } + pAttr->screen = pScreen; + pAttr->client = client; + pAttr->x = stuff->x; + pAttr->y = stuff->y; + pAttr->width = stuff->width; + pAttr->height = stuff->height; + pAttr->borderWidth = stuff->borderWidth; + pAttr->class = stuff->c_class; + pAttr->depth = depth; + pAttr->visual = visual; + pAttr->colormap = None; + pAttr->pCursor = NullCursor; + pAttr->pBackgroundPixmap = NullPixmap; + pAttr->pBorderPixmap = NullPixmap; + pAttr->values = values; + /* + * go through the mask, checking the values, + * looking up pixmaps and cursors and hold a reference + * to them. + */ + pAttr->mask = tmask = stuff->mask | CWOverrideRedirect; + pVlist = (unsigned int *) (stuff + 1); + while (tmask) { + imask = lowbit (tmask); + tmask &= ~imask; + switch (imask) + { + case CWBackPixmap: + pixID = (Pixmap )*pVlist; + if (pixID == None) + { + *values++ = None; + } + else if (pixID == ParentRelative) + { + if (depth != pParent->drawable.depth) + { + ret = BadMatch; + goto PatchUp; + } + *values++ = ParentRelative; + } + else + { + pPixmap = (PixmapPtr)LookupIDByType(pixID, RT_PIXMAP); + if (pPixmap != (PixmapPtr) NULL) + { + if ((pPixmap->drawable.depth != depth) || + (pPixmap->drawable.pScreen != pScreen)) + { + ret = BadMatch; + goto PatchUp; + } + pAttr->pBackgroundPixmap = pPixmap; + pPixmap->refcnt++; + pAttr->mask &= ~CWBackPixmap; + } + else + { + ret = BadPixmap; + client->errorValue = pixID; + goto PatchUp; + } + } + break; + case CWBackPixel: + *values++ = (CARD32) *pVlist; + break; + case CWBorderPixmap: + pixID = (Pixmap ) *pVlist; + if (pixID == CopyFromParent) + { + if (depth != pParent->drawable.depth) + { + ret = BadMatch; + goto PatchUp; + } + *values++ = CopyFromParent; + } + else + { + pPixmap = (PixmapPtr)LookupIDByType(pixID, RT_PIXMAP); + if (pPixmap) + { + if ((pPixmap->drawable.depth != depth) || + (pPixmap->drawable.pScreen != pScreen)) + { + ret = BadMatch; + goto PatchUp; + } + pAttr->pBorderPixmap = pPixmap; + pPixmap->refcnt++; + pAttr->mask &= ~CWBorderPixmap; + } + else + { + ret = BadPixmap; + client->errorValue = pixID; + goto PatchUp; + } + } + break; + case CWBorderPixel: + *values++ = (CARD32) *pVlist; + break; + case CWBitGravity: + val = (CARD8 )*pVlist; + if (val > StaticGravity) + { + ret = BadValue; + client->errorValue = val; + goto PatchUp; + } + *values++ = val; + break; + case CWWinGravity: + val = (CARD8 )*pVlist; + if (val > StaticGravity) + { + ret = BadValue; + client->errorValue = val; + goto PatchUp; + } + *values++ = val; + break; + case CWBackingStore: + val = (CARD8 )*pVlist; + if ((val != NotUseful) && (val != WhenMapped) && (val != Always)) + { + ret = BadValue; + client->errorValue = val; + goto PatchUp; + } + *values++ = val; + break; + case CWBackingPlanes: + *values++ = (CARD32) *pVlist; + break; + case CWBackingPixel: + *values++ = (CARD32) *pVlist; + break; + case CWSaveUnder: + val = (BOOL) *pVlist; + if ((val != xTrue) && (val != xFalse)) + { + ret = BadValue; + client->errorValue = val; + goto PatchUp; + } + *values++ = val; + break; + case CWEventMask: + *values++ = (CARD32) *pVlist; + break; + case CWDontPropagate: + *values++ = (CARD32) *pVlist; + break; + case CWOverrideRedirect: + if (!(stuff->mask & CWOverrideRedirect)) + pVlist--; + else + { + val = (BOOL ) *pVlist; + if ((val != xTrue) && (val != xFalse)) + { + ret = BadValue; + client->errorValue = val; + goto PatchUp; + } + } + *values++ = xTrue; + break; + case CWColormap: + cmap = (Colormap) *pVlist; + pCmap = (ColormapPtr)LookupIDByType(cmap, RT_COLORMAP); + if (!pCmap) + { + ret = BadColor; + client->errorValue = cmap; + goto PatchUp; + } + if (pCmap->pVisual->vid != visual || pCmap->pScreen != pScreen) + { + ret = BadMatch; + goto PatchUp; + } + pAttr->colormap = cmap; + pAttr->mask &= ~CWColormap; + break; + case CWCursor: + cursorID = (Cursor ) *pVlist; + if ( cursorID == None) + { + *values++ = None; + } + else + { + pCursor = (CursorPtr)LookupIDByType(cursorID, RT_CURSOR); + if (!pCursor) + { + ret = BadCursor; + client->errorValue = cursorID; + goto PatchUp; + } + pCursor->refcnt++; + pAttr->pCursor = pCursor; + pAttr->mask &= ~CWCursor; + } + break; + default: + ret = BadValue; + client->errorValue = stuff->mask; + goto PatchUp; + } + pVlist++; + } + if (pPriv->attr) + FreeScreenAttr (pPriv->attr); + pPriv->attr = pAttr; + pAttr->resource = FakeClientID (client->index); + if (!AddResource (pAttr->resource, AttrType, (pointer) pAttr)) + return BadAlloc; + return Success; +PatchUp: + FreeAttrs (pAttr); +bail: + CheckScreenPrivate (pScreen); + if (pAttr) xfree (pAttr->values); + xfree (pAttr); + return ret; +} + +static int +ScreenSaverUnsetAttributes (ClientPtr client) +{ + REQUEST(xScreenSaverSetAttributesReq); + DrawablePtr pDraw; + ScreenSaverScreenPrivatePtr pPriv; + int rc; + + REQUEST_SIZE_MATCH (xScreenSaverUnsetAttributesReq); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixUnknownAccess); + if (rc != Success) + return rc; + pPriv = GetScreenPrivate (pDraw->pScreen); + if (pPriv && pPriv->attr && pPriv->attr->client == client) + { + FreeResource (pPriv->attr->resource, AttrType); + FreeScreenAttr (pPriv->attr); + pPriv->attr = NULL; + CheckScreenPrivate (pDraw->pScreen); + } + return Success; +} + +static int +ProcScreenSaverSetAttributes (ClientPtr client) +{ +#ifdef PANORAMIX + if(!noPanoramiXExtension) { + REQUEST(xScreenSaverSetAttributesReq); + PanoramiXRes *draw; + PanoramiXRes *backPix = NULL; + PanoramiXRes *bordPix = NULL; + PanoramiXRes *cmap = NULL; + int i, status = 0, len; + int pback_offset = 0, pbord_offset = 0, cmap_offset = 0; + XID orig_visual, tmp; + + REQUEST_AT_LEAST_SIZE (xScreenSaverSetAttributesReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + len = stuff->length - (sizeof(xScreenSaverSetAttributesReq) >> 2); + if (Ones(stuff->mask) != len) + return BadLength; + + if((Mask)stuff->mask & CWBackPixmap) { + pback_offset = Ones((Mask)stuff->mask & (CWBackPixmap - 1)); + tmp = *((CARD32 *) &stuff[1] + pback_offset); + if ((tmp != None) && (tmp != ParentRelative)) { + if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType( + client, tmp, XRT_PIXMAP, DixReadAccess))) + return BadPixmap; + } + } + + if ((Mask)stuff->mask & CWBorderPixmap) { + pbord_offset = Ones((Mask)stuff->mask & (CWBorderPixmap - 1)); + tmp = *((CARD32 *) &stuff[1] + pbord_offset); + if (tmp != CopyFromParent) { + if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType( + client, tmp, XRT_PIXMAP, DixReadAccess))) + return BadPixmap; + } + } + + if ((Mask)stuff->mask & CWColormap) { + cmap_offset = Ones((Mask)stuff->mask & (CWColormap - 1)); + tmp = *((CARD32 *) &stuff[1] + cmap_offset); + if ((tmp != CopyFromParent) && (tmp != None)) { + if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType( + client, tmp, XRT_COLORMAP, DixReadAccess))) + return BadColor; + } + } + + orig_visual = stuff->visualID; + + FOR_NSCREENS_BACKWARD(i) { + stuff->drawable = draw->info[i].id; + if (backPix) + *((CARD32 *) &stuff[1] + pback_offset) = backPix->info[i].id; + if (bordPix) + *((CARD32 *) &stuff[1] + pbord_offset) = bordPix->info[i].id; + if (cmap) + *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[i].id; + + if (orig_visual != CopyFromParent) + stuff->visualID = + PanoramiXVisualTable[(orig_visual*MAXSCREENS) + i]; + + status = ScreenSaverSetAttributes(client); + } + + return status; + } +#endif + + return ScreenSaverSetAttributes(client); +} + +static int +ProcScreenSaverUnsetAttributes (ClientPtr client) +{ +#ifdef PANORAMIX + if(!noPanoramiXExtension) { + REQUEST(xScreenSaverUnsetAttributesReq); + PanoramiXRes *draw; + int i; + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + for(i = PanoramiXNumScreens - 1; i > 0; i--) { + stuff->drawable = draw->info[i].id; + ScreenSaverUnsetAttributes(client); + } + + stuff->drawable = draw->info[0].id; + } +#endif + + return ScreenSaverUnsetAttributes(client); +} + +static int +ProcScreenSaverSuspend (ClientPtr client) +{ + ScreenSaverSuspensionPtr *prev, this; + + REQUEST(xScreenSaverSuspendReq); + REQUEST_SIZE_MATCH(xScreenSaverSuspendReq); + + /* Check if this client is suspending the screensaver */ + for (prev = &suspendingClients; (this = *prev); prev = &this->next) + if (this->pClient == client) + break; + + if (this) + { + if (stuff->suspend == TRUE) + this->count++; + else if (--this->count == 0) + FreeResource (this->clientResource, RT_NONE); + + return Success; + } + + /* If we get to this point, this client isn't suspending the screensaver */ + if (stuff->suspend == FALSE) + return Success; + + /* + * Allocate a suspension record for the client, and stop the screensaver + * if it isn't already suspended by another client. We attach a resource ID + * to the record, so the screensaver will be reenabled and the record freed + * if the client disconnects without reenabling it first. + */ + this = (ScreenSaverSuspensionPtr) xalloc (sizeof (ScreenSaverSuspensionRec)); + + if (!this) + return BadAlloc; + + this->next = NULL; + this->pClient = client; + this->count = 1; + this->clientResource = FakeClientID (client->index); + + if (!AddResource (this->clientResource, SuspendType, (pointer) this)) + { + xfree (this); + return BadAlloc; + } + + *prev = this; + if (!screenSaverSuspended) + { + screenSaverSuspended = TRUE; + FreeScreenSaverTimer(); + } + + return (client->noClientException); +} + +static DISPATCH_PROC((*NormalVector[])) = { + ProcScreenSaverQueryVersion, + ProcScreenSaverQueryInfo, + ProcScreenSaverSelectInput, + ProcScreenSaverSetAttributes, + ProcScreenSaverUnsetAttributes, + ProcScreenSaverSuspend, +}; + +#define NUM_REQUESTS ((sizeof NormalVector) / (sizeof NormalVector[0])) + +static int +ProcScreenSaverDispatch (client) + ClientPtr client; +{ + REQUEST(xReq); + + if (stuff->data < NUM_REQUESTS) + return (*NormalVector[stuff->data])(client); + return BadRequest; +} + +static int +SProcScreenSaverQueryVersion (client) + ClientPtr client; +{ + REQUEST(xScreenSaverQueryVersionReq); + int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xScreenSaverQueryVersionReq); + return ProcScreenSaverQueryVersion (client); +} + +static int +SProcScreenSaverQueryInfo (client) + ClientPtr client; +{ + REQUEST(xScreenSaverQueryInfoReq); + int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq); + swapl (&stuff->drawable, n); + return ProcScreenSaverQueryInfo (client); +} + +static int +SProcScreenSaverSelectInput (client) + ClientPtr client; +{ + REQUEST(xScreenSaverSelectInputReq); + int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xScreenSaverSelectInputReq); + swapl (&stuff->drawable, n); + swapl (&stuff->eventMask, n); + return ProcScreenSaverSelectInput (client); +} + +static int +SProcScreenSaverSetAttributes (client) + ClientPtr client; +{ + REQUEST(xScreenSaverSetAttributesReq); + int n; + + swaps (&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq); + swapl (&stuff->drawable, n); + swaps (&stuff->x, n); + swaps (&stuff->y, n); + swaps (&stuff->width, n); + swaps (&stuff->height, n); + swaps (&stuff->borderWidth, n); + swapl (&stuff->visualID, n); + swapl (&stuff->mask, n); + SwapRestL(stuff); + return ProcScreenSaverSetAttributes (client); +} + +static int +SProcScreenSaverUnsetAttributes (client) + ClientPtr client; +{ + REQUEST(xScreenSaverUnsetAttributesReq); + int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq); + swapl (&stuff->drawable, n); + return ProcScreenSaverUnsetAttributes (client); +} + +static int +SProcScreenSaverSuspend (ClientPtr client) +{ + int n; + REQUEST(xScreenSaverSuspendReq); + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xScreenSaverSuspendReq); + swapl(&stuff->suspend, n); + return ProcScreenSaverSuspend (client); +} + +static DISPATCH_PROC((*SwappedVector[])) = { + SProcScreenSaverQueryVersion, + SProcScreenSaverQueryInfo, + SProcScreenSaverSelectInput, + SProcScreenSaverSetAttributes, + SProcScreenSaverUnsetAttributes, + SProcScreenSaverSuspend, +}; + +static int +SProcScreenSaverDispatch (client) + ClientPtr client; +{ + REQUEST(xReq); + + if (stuff->data < NUM_REQUESTS) + return (*SwappedVector[stuff->data])(client); + return BadRequest; +} diff --git a/xorg-server-1.4/Xext/security.c b/xorg-server-1.4/Xext/security.c new file mode 100644 index 0000000..ba057de --- /dev/null +++ b/xorg-server-1.4/Xext/security.c @@ -0,0 +1,1939 @@ +/* + +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. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "dixstruct.h" +#include "extnsionst.h" +#include "windowstr.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "colormapst.h" +#include "propertyst.h" +#include "xacestr.h" +#include "securitysrv.h" +#include +#include +#include +#ifdef XAPPGROUP +#include "appgroup.h" +#endif +#include /* for file reading operations */ +#include /* for XA_STRING */ + +#ifndef DEFAULTPOLICYFILE +# define DEFAULTPOLICYFILE NULL +#endif +#if defined(WIN32) || defined(__CYGWIN__) +#include +#undef index +#endif + +#include "modinit.h" + +static int SecurityErrorBase; /* first Security error number */ +static int SecurityEventBase; /* first Security event number */ +static int securityClientPrivateIndex; +static int securityExtnsnPrivateIndex; + +/* this is what we store as client security state */ +typedef struct { + unsigned int trustLevel; + XID authId; +} SecurityClientStateRec; + +#define STATEVAL(extnsn) \ + ((extnsn)->devPrivates[securityExtnsnPrivateIndex].val) +#define STATEPTR(client) \ + ((client)->devPrivates[securityClientPrivateIndex].ptr) +#define TRUSTLEVEL(client) \ + (((SecurityClientStateRec*)STATEPTR(client))->trustLevel) +#define AUTHID(client) \ + (((SecurityClientStateRec*)STATEPTR(client))->authId) + +static CallbackListPtr SecurityValidateGroupCallback = NULL; + +RESTYPE SecurityAuthorizationResType; /* resource type for authorizations */ + +static RESTYPE RTEventClient; + +#define CALLBACK(name) static void \ +name(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) + +/* SecurityAudit + * + * Arguments: + * format is the formatting string to be used to interpret the + * remaining arguments. + * + * Returns: nothing. + * + * Side Effects: + * Writes the message to the log file if security logging is on. + */ + +static void +SecurityAudit(char *format, ...) +{ + va_list args; + + if (auditTrailLevel < SECURITY_AUDIT_LEVEL) + return; + va_start(args, format); + VAuditF(format, args); + va_end(args); +} /* SecurityAudit */ + +#define rClient(obj) (clients[CLIENT_ID((obj)->resource)]) + +/* SecurityDeleteAuthorization + * + * Arguments: + * value is the authorization to delete. + * id is its resource ID. + * + * Returns: Success. + * + * Side Effects: + * Frees everything associated with the authorization. + */ + +static int +SecurityDeleteAuthorization( + pointer value, + XID id) +{ + SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)value; + unsigned short name_len, data_len; + char *name, *data; + int status; + int i; + OtherClientsPtr pEventClient; + + /* Remove the auth using the os layer auth manager */ + + status = AuthorizationFromID(pAuth->id, &name_len, &name, + &data_len, &data); + assert(status); + status = RemoveAuthorization(name_len, name, data_len, data); + assert(status); + (void)status; + + /* free the auth timer if there is one */ + + if (pAuth->timer) TimerFree(pAuth->timer); + + /* send revoke events */ + + while ((pEventClient = pAuth->eventClients)) + { + /* send revocation event event */ + ClientPtr client = rClient(pEventClient); + + if (!client->clientGone) + { + xSecurityAuthorizationRevokedEvent are; + are.type = SecurityEventBase + XSecurityAuthorizationRevoked; + are.sequenceNumber = client->sequence; + are.authId = pAuth->id; + WriteEventsToClient(client, 1, (xEvent *)&are); + } + FreeResource(pEventClient->resource, RT_NONE); + } + + /* kill all clients using this auth */ + + for (i = 1; iid)) + CloseDownClient(clients[i]); + } + + SecurityAudit("revoked authorization ID %d\n", pAuth->id); + xfree(pAuth); + return Success; + +} /* SecurityDeleteAuthorization */ + + +/* resource delete function for RTEventClient */ +static int +SecurityDeleteAuthorizationEventClient( + pointer value, + XID id) +{ + OtherClientsPtr pEventClient, prev = NULL; + SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)value; + + for (pEventClient = pAuth->eventClients; + pEventClient; + pEventClient = pEventClient->next) + { + if (pEventClient->resource == id) + { + if (prev) + prev->next = pEventClient->next; + else + pAuth->eventClients = pEventClient->next; + xfree(pEventClient); + return(Success); + } + prev = pEventClient; + } + /*NOTREACHED*/ + return -1; /* make compiler happy */ +} /* SecurityDeleteAuthorizationEventClient */ + + +/* SecurityComputeAuthorizationTimeout + * + * Arguments: + * pAuth is the authorization for which we are computing the timeout + * seconds is the number of seconds we want to wait + * + * Returns: + * the number of milliseconds that the auth timer should be set to + * + * Side Effects: + * Sets pAuth->secondsRemaining to any "overflow" amount of time + * that didn't fit in 32 bits worth of milliseconds + */ + +static CARD32 +SecurityComputeAuthorizationTimeout( + SecurityAuthorizationPtr pAuth, + unsigned int seconds) +{ + /* maxSecs is the number of full seconds that can be expressed in + * 32 bits worth of milliseconds + */ + CARD32 maxSecs = (CARD32)(~0) / (CARD32)MILLI_PER_SECOND; + + if (seconds > maxSecs) + { /* only come here if we want to wait more than 49 days */ + pAuth->secondsRemaining = seconds - maxSecs; + return maxSecs * MILLI_PER_SECOND; + } + else + { /* by far the common case */ + pAuth->secondsRemaining = 0; + return seconds * MILLI_PER_SECOND; + } +} /* SecurityStartAuthorizationTimer */ + +/* SecurityAuthorizationExpired + * + * This function is passed as an argument to TimerSet and gets called from + * the timer manager in the os layer when its time is up. + * + * Arguments: + * timer is the timer for this authorization. + * time is the current time. + * pval is the authorization whose time is up. + * + * Returns: + * A new time delay in milliseconds if the timer should wait some + * more, else zero. + * + * Side Effects: + * Frees the authorization resource if the timeout period is really + * over, otherwise recomputes pAuth->secondsRemaining. + */ + +static CARD32 +SecurityAuthorizationExpired( + OsTimerPtr timer, + CARD32 time, + pointer pval) +{ + SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)pval; + + assert(pAuth->timer == timer); + + if (pAuth->secondsRemaining) + { + return SecurityComputeAuthorizationTimeout(pAuth, + pAuth->secondsRemaining); + } + else + { + FreeResource(pAuth->id, RT_NONE); + return 0; + } +} /* SecurityAuthorizationExpired */ + +/* SecurityStartAuthorizationTimer + * + * Arguments: + * pAuth is the authorization whose timer should be started. + * + * Returns: nothing. + * + * Side Effects: + * A timer is started, set to expire after the timeout period for + * this authorization. When it expires, the function + * SecurityAuthorizationExpired will be called. + */ + +static void +SecurityStartAuthorizationTimer( + SecurityAuthorizationPtr pAuth) +{ + pAuth->timer = TimerSet(pAuth->timer, 0, + SecurityComputeAuthorizationTimeout(pAuth, pAuth->timeout), + SecurityAuthorizationExpired, pAuth); +} /* SecurityStartAuthorizationTimer */ + + +/* Proc functions all take a client argument, execute the request in + * client->requestBuffer, and return a protocol error status. + */ + +static int +ProcSecurityQueryVersion( + ClientPtr client) +{ + /* REQUEST(xSecurityQueryVersionReq); */ + xSecurityQueryVersionReply rep; + + /* paranoia: this "can't happen" because this extension is hidden + * from untrusted clients, but just in case... + */ + if (TRUSTLEVEL(client) != XSecurityClientTrusted) + return BadRequest; + + REQUEST_SIZE_MATCH(xSecurityQueryVersionReq); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + rep.majorVersion = SECURITY_MAJOR_VERSION; + rep.minorVersion = SECURITY_MINOR_VERSION; + if(client->swapped) + { + register char n; + swaps(&rep.sequenceNumber, n); + swaps(&rep.majorVersion, n); + swaps(&rep.minorVersion, n); + } + (void)WriteToClient(client, SIZEOF(xSecurityQueryVersionReply), + (char *)&rep); + return (client->noClientException); +} /* ProcSecurityQueryVersion */ + + +static int +SecurityEventSelectForAuthorization( + SecurityAuthorizationPtr pAuth, + ClientPtr client, + Mask mask) +{ + OtherClients *pEventClient; + + for (pEventClient = pAuth->eventClients; + pEventClient; + pEventClient = pEventClient->next) + { + if (SameClient(pEventClient, client)) + { + if (mask == 0) + FreeResource(pEventClient->resource, RT_NONE); + else + pEventClient->mask = mask; + return Success; + } + } + + pEventClient = (OtherClients *) xalloc(sizeof(OtherClients)); + if (!pEventClient) + return BadAlloc; + pEventClient->mask = mask; + pEventClient->resource = FakeClientID(client->index); + pEventClient->next = pAuth->eventClients; + if (!AddResource(pEventClient->resource, RTEventClient, + (pointer)pAuth)) + { + xfree(pEventClient); + return BadAlloc; + } + pAuth->eventClients = pEventClient; + + return Success; +} /* SecurityEventSelectForAuthorization */ + + +static int +ProcSecurityGenerateAuthorization( + ClientPtr client) +{ + REQUEST(xSecurityGenerateAuthorizationReq); + int len; /* request length in CARD32s*/ + Bool removeAuth = FALSE; /* if bailout, call RemoveAuthorization? */ + SecurityAuthorizationPtr pAuth = NULL; /* auth we are creating */ + int err; /* error to return from this function */ + XID authId; /* authorization ID assigned by os layer */ + xSecurityGenerateAuthorizationReply rep; /* reply struct */ + unsigned int trustLevel; /* trust level of new auth */ + XID group; /* group of new auth */ + CARD32 timeout; /* timeout of new auth */ + CARD32 *values; /* list of supplied attributes */ + char *protoname; /* auth proto name sent in request */ + char *protodata; /* auth proto data sent in request */ + unsigned int authdata_len; /* # bytes of generated auth data */ + char *pAuthdata; /* generated auth data */ + Mask eventMask; /* what events on this auth does client want */ + + /* paranoia: this "can't happen" because this extension is hidden + * from untrusted clients, but just in case... + */ + if (TRUSTLEVEL(client) != XSecurityClientTrusted) + return BadRequest; + + /* check request length */ + + REQUEST_AT_LEAST_SIZE(xSecurityGenerateAuthorizationReq); + len = SIZEOF(xSecurityGenerateAuthorizationReq) >> 2; + len += (stuff->nbytesAuthProto + (unsigned)3) >> 2; + len += (stuff->nbytesAuthData + (unsigned)3) >> 2; + values = ((CARD32 *)stuff) + len; + len += Ones(stuff->valueMask); + if (client->req_len != len) + return BadLength; + + /* check valuemask */ + if (stuff->valueMask & ~XSecurityAllAuthorizationAttributes) + { + client->errorValue = stuff->valueMask; + return BadValue; + } + + /* check timeout */ + timeout = 60; + if (stuff->valueMask & XSecurityTimeout) + { + timeout = *values++; + } + + /* check trustLevel */ + trustLevel = XSecurityClientUntrusted; + if (stuff->valueMask & XSecurityTrustLevel) + { + trustLevel = *values++; + if (trustLevel != XSecurityClientTrusted && + trustLevel != XSecurityClientUntrusted) + { + client->errorValue = trustLevel; + return BadValue; + } + } + + /* check group */ + group = None; + if (stuff->valueMask & XSecurityGroup) + { + group = *values++; + if (SecurityValidateGroupCallback) + { + SecurityValidateGroupInfoRec vgi; + vgi.group = group; + vgi.valid = FALSE; + CallCallbacks(&SecurityValidateGroupCallback, (pointer)&vgi); + + /* if nobody said they recognized it, it's an error */ + + if (!vgi.valid) + { + client->errorValue = group; + return BadValue; + } + } + } + + /* check event mask */ + eventMask = 0; + if (stuff->valueMask & XSecurityEventMask) + { + eventMask = *values++; + if (eventMask & ~XSecurityAllEventMasks) + { + client->errorValue = eventMask; + return BadValue; + } + } + + protoname = (char *)&stuff[1]; + protodata = protoname + ((stuff->nbytesAuthProto + (unsigned)3) >> 2); + + /* call os layer to generate the authorization */ + + authId = GenerateAuthorization(stuff->nbytesAuthProto, protoname, + stuff->nbytesAuthData, protodata, + &authdata_len, &pAuthdata); + if ((XID) ~0L == authId) + { + err = SecurityErrorBase + XSecurityBadAuthorizationProtocol; + goto bailout; + } + + /* now that we've added the auth, remember to remove it if we have to + * abort the request for some reason (like allocation failure) + */ + removeAuth = TRUE; + + /* associate additional information with this auth ID */ + + pAuth = (SecurityAuthorizationPtr)xalloc(sizeof(SecurityAuthorizationRec)); + if (!pAuth) + { + err = BadAlloc; + goto bailout; + } + + /* fill in the auth fields */ + + pAuth->id = authId; + pAuth->timeout = timeout; + pAuth->group = group; + pAuth->trustLevel = trustLevel; + pAuth->refcnt = 0; /* the auth was just created; nobody's using it yet */ + pAuth->secondsRemaining = 0; + pAuth->timer = NULL; + pAuth->eventClients = NULL; + + /* handle event selection */ + if (eventMask) + { + err = SecurityEventSelectForAuthorization(pAuth, client, eventMask); + if (err != Success) + goto bailout; + } + + if (!AddResource(authId, SecurityAuthorizationResType, pAuth)) + { + err = BadAlloc; + goto bailout; + } + + /* start the timer ticking */ + + if (pAuth->timeout != 0) + SecurityStartAuthorizationTimer(pAuth); + + /* tell client the auth id and data */ + + rep.type = X_Reply; + rep.length = (authdata_len + 3) >> 2; + rep.sequenceNumber = client->sequence; + rep.authId = authId; + rep.dataLength = authdata_len; + + if (client->swapped) + { + register char n; + swapl(&rep.length, n); + swaps(&rep.sequenceNumber, n); + swapl(&rep.authId, n); + swaps(&rep.dataLength, n); + } + + WriteToClient(client, SIZEOF(xSecurityGenerateAuthorizationReply), + (char *)&rep); + WriteToClient(client, authdata_len, pAuthdata); + + SecurityAudit("client %d generated authorization %d trust %d timeout %d group %d events %d\n", + client->index, pAuth->id, pAuth->trustLevel, pAuth->timeout, + pAuth->group, eventMask); + + /* the request succeeded; don't call RemoveAuthorization or free pAuth */ + + removeAuth = FALSE; + pAuth = NULL; + err = client->noClientException; + +bailout: + if (removeAuth) + RemoveAuthorization(stuff->nbytesAuthProto, protoname, + authdata_len, pAuthdata); + if (pAuth) xfree(pAuth); + return err; + +} /* ProcSecurityGenerateAuthorization */ + +static int +ProcSecurityRevokeAuthorization( + ClientPtr client) +{ + REQUEST(xSecurityRevokeAuthorizationReq); + SecurityAuthorizationPtr pAuth; + + /* paranoia: this "can't happen" because this extension is hidden + * from untrusted clients, but just in case... + */ + if (TRUSTLEVEL(client) != XSecurityClientTrusted) + return BadRequest; + + REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq); + + pAuth = (SecurityAuthorizationPtr)SecurityLookupIDByType(client, + stuff->authId, SecurityAuthorizationResType, DixDestroyAccess); + if (!pAuth) + return SecurityErrorBase + XSecurityBadAuthorization; + + FreeResource(stuff->authId, RT_NONE); + return Success; +} /* ProcSecurityRevokeAuthorization */ + + +static int +ProcSecurityDispatch( + ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) + { + case X_SecurityQueryVersion: + return ProcSecurityQueryVersion(client); + case X_SecurityGenerateAuthorization: + return ProcSecurityGenerateAuthorization(client); + case X_SecurityRevokeAuthorization: + return ProcSecurityRevokeAuthorization(client); + default: + return BadRequest; + } +} /* ProcSecurityDispatch */ + +static int +SProcSecurityQueryVersion( + ClientPtr client) +{ + REQUEST(xSecurityQueryVersionReq); + register char n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xSecurityQueryVersionReq); + swaps(&stuff->majorVersion, n); + swaps(&stuff->minorVersion,n); + return ProcSecurityQueryVersion(client); +} /* SProcSecurityQueryVersion */ + + +static int +SProcSecurityGenerateAuthorization( + ClientPtr client) +{ + REQUEST(xSecurityGenerateAuthorizationReq); + register char n; + CARD32 *values; + unsigned long nvalues; + + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xSecurityGenerateAuthorizationReq); + swaps(&stuff->nbytesAuthProto, n); + swaps(&stuff->nbytesAuthData, n); + swapl(&stuff->valueMask, n); + values = (CARD32 *)(&stuff[1]) + + ((stuff->nbytesAuthProto + (unsigned)3) >> 2) + + ((stuff->nbytesAuthData + (unsigned)3) >> 2); + nvalues = (((CARD32 *)stuff) + stuff->length) - values; + SwapLongs(values, nvalues); + return ProcSecurityGenerateAuthorization(client); +} /* SProcSecurityGenerateAuthorization */ + + +static int +SProcSecurityRevokeAuthorization( + ClientPtr client) +{ + REQUEST(xSecurityRevokeAuthorizationReq); + register char n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq); + swapl(&stuff->authId, n); + return ProcSecurityRevokeAuthorization(client); +} /* SProcSecurityRevokeAuthorization */ + + +static int +SProcSecurityDispatch( + ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) + { + case X_SecurityQueryVersion: + return SProcSecurityQueryVersion(client); + case X_SecurityGenerateAuthorization: + return SProcSecurityGenerateAuthorization(client); + case X_SecurityRevokeAuthorization: + return SProcSecurityRevokeAuthorization(client); + default: + return BadRequest; + } +} /* SProcSecurityDispatch */ + +static void +SwapSecurityAuthorizationRevokedEvent( + xSecurityAuthorizationRevokedEvent *from, + xSecurityAuthorizationRevokedEvent *to) +{ + to->type = from->type; + to->detail = from->detail; + cpswaps(from->sequenceNumber, to->sequenceNumber); + cpswapl(from->authId, to->authId); +} + +/* SecurityDetermineEventPropogationLimits + * + * This is a helper function for SecurityCheckDeviceAccess. + * + * Arguments: + * dev is the device for which the starting and stopping windows for + * event propogation should be determined. + * The values pointed to by ppWin and ppStopWin are not used. + * + * Returns: + * ppWin is filled in with a pointer to the window at which event + * propogation for the given device should start given the current + * state of the server (pointer position, window layout, etc.) + * ppStopWin is filled in with the window at which event propogation + * should stop; events should not go to ppStopWin. + * + * Side Effects: none. + */ + +static void +SecurityDetermineEventPropogationLimits( + DeviceIntPtr dev, + WindowPtr *ppWin, + WindowPtr *ppStopWin) +{ + WindowPtr pFocusWin = dev->focus ? dev->focus->win : NoneWin; + + if (pFocusWin == NoneWin) + { /* no focus -- events don't go anywhere */ + *ppWin = *ppStopWin = NULL; + return; + } + + if (pFocusWin == PointerRootWin) + { /* focus follows the pointer */ + *ppWin = GetSpriteWindow(); + *ppStopWin = NULL; /* propogate all the way to the root */ + } + else + { /* a real window is set for the focus */ + WindowPtr pSpriteWin = GetSpriteWindow(); + *ppStopWin = pFocusWin->parent; /* don't go past the focus window */ + + /* if the pointer is in a subwindow of the focus window, start + * at that subwindow, else start at the focus window itself + */ + if (IsParent(pFocusWin, pSpriteWin)) + *ppWin = pSpriteWin; + else *ppWin = pFocusWin; + } +} /* SecurityDetermineEventPropogationLimits */ + + +/* SecurityCheckDeviceAccess + * + * Arguments: + * client is the client attempting to access a device. + * dev is the device being accessed. + * fromRequest is TRUE if the device access is a direct result of + * the client executing some request and FALSE if it is a + * result of the server trying to send an event (e.g. KeymapNotify) + * to the client. + * Returns: + * TRUE if the device access should be allowed, else FALSE. + * + * Side Effects: + * An audit message is generated if access is denied. + */ + +CALLBACK(SecurityCheckDeviceAccess) +{ + XaceDeviceAccessRec *rec = (XaceDeviceAccessRec*)calldata; + ClientPtr client = rec->client; + DeviceIntPtr dev = rec->dev; + Bool fromRequest = rec->fromRequest; + WindowPtr pWin, pStopWin; + Bool untrusted_got_event; + Bool found_event_window; + Mask eventmask; + int reqtype = 0; + + /* trusted clients always allowed to do anything */ + if (TRUSTLEVEL(client) == XSecurityClientTrusted) + return; + + /* device security other than keyboard is not implemented yet */ + if (dev != inputInfo.keyboard) + return; + + /* some untrusted client wants access */ + + if (fromRequest) + { + reqtype = ((xReq *)client->requestBuffer)->reqType; + switch (reqtype) + { + /* never allow these */ + case X_ChangeKeyboardMapping: + case X_ChangeKeyboardControl: + case X_SetModifierMapping: + SecurityAudit("client %d attempted request %d\n", + client->index, reqtype); + rec->rval = FALSE; + return; + default: + break; + } + } + + untrusted_got_event = FALSE; + found_event_window = FALSE; + + if (dev->grab) + { + untrusted_got_event = + (TRUSTLEVEL(rClient(dev->grab)) != XSecurityClientTrusted); + } + else + { + SecurityDetermineEventPropogationLimits(dev, &pWin, &pStopWin); + + eventmask = KeyPressMask | KeyReleaseMask; + while ( (pWin != pStopWin) && !found_event_window) + { + OtherClients *other; + + if (pWin->eventMask & eventmask) + { + found_event_window = TRUE; + client = wClient(pWin); + if (TRUSTLEVEL(client) != XSecurityClientTrusted) + { + untrusted_got_event = TRUE; + } + } + if (wOtherEventMasks(pWin) & eventmask) + { + found_event_window = TRUE; + for (other = wOtherClients(pWin); other; other = other->next) + { + if (other->mask & eventmask) + { + client = rClient(other); + if (TRUSTLEVEL(client) != XSecurityClientTrusted) + { + untrusted_got_event = TRUE; + break; + } + } + } + } + if (wDontPropagateMask(pWin) & eventmask) + break; + pWin = pWin->parent; + } /* while propogating the event */ + } + + /* allow access by untrusted clients only if an event would have gone + * to an untrusted client + */ + + if (!untrusted_got_event) + { + char *devname = dev->name; + if (!devname) devname = "unnamed"; + if (fromRequest) + SecurityAudit("client %d attempted request %d device %d (%s)\n", + client->index, reqtype, dev->id, devname); + else + SecurityAudit("client %d attempted to access device %d (%s)\n", + client->index, dev->id, devname); + rec->rval = FALSE; + } + return; +} /* SecurityCheckDeviceAccess */ + + + +/* SecurityAuditResourceIDAccess + * + * Arguments: + * client is the client doing the resource access. + * id is the resource id. + * + * Returns: NULL + * + * Side Effects: + * An audit message is generated with details of the denied + * resource access. + */ + +static pointer +SecurityAuditResourceIDAccess( + ClientPtr client, + XID id) +{ + int cid = CLIENT_ID(id); + int reqtype = ((xReq *)client->requestBuffer)->reqType; + switch (reqtype) + { + case X_ChangeProperty: + case X_DeleteProperty: + case X_GetProperty: + { + xChangePropertyReq *req = + (xChangePropertyReq *)client->requestBuffer; + int propertyatom = req->property; + char *propertyname = NameForAtom(propertyatom); + + SecurityAudit("client %d attempted request %d with window 0x%x property %s of client %d\n", + client->index, reqtype, id, propertyname, cid); + break; + } + default: + { + SecurityAudit("client %d attempted request %d with resource 0x%x of client %d\n", + client->index, reqtype, id, cid); + break; + } + } + return NULL; +} /* SecurityAuditResourceIDAccess */ + + +/* SecurityCheckResourceIDAccess + * + * This function gets plugged into client->CheckAccess and is called from + * SecurityLookupIDByType/Class to determine if the client can access the + * resource. + * + * Arguments: + * client is the client doing the resource access. + * id is the resource id. + * rtype is its type or class. + * access_mode represents the intended use of the resource; see + * resource.h. + * res is a pointer to the resource structure for this resource. + * + * Returns: + * If access is granted, the value of rval that was passed in, else FALSE. + * + * Side Effects: + * Disallowed resource accesses are audited. + */ + +CALLBACK(SecurityCheckResourceIDAccess) +{ + XaceResourceAccessRec *rec = (XaceResourceAccessRec*)calldata; + ClientPtr client = rec->client; + XID id = rec->id; + RESTYPE rtype = rec->rtype; + Mask access_mode = rec->access_mode; + pointer rval = rec->res; + int cid, reqtype; + + if (TRUSTLEVEL(client) == XSecurityClientTrusted || + DixUnknownAccess == access_mode) + return; /* for compatibility, we have to allow access */ + + cid = CLIENT_ID(id); + reqtype = ((xReq *)client->requestBuffer)->reqType; + switch (reqtype) + { /* these are always allowed */ + case X_QueryTree: + case X_TranslateCoords: + case X_GetGeometry: + /* property access is controlled in SecurityCheckPropertyAccess */ + case X_GetProperty: + case X_ChangeProperty: + case X_DeleteProperty: + case X_RotateProperties: + case X_ListProperties: + return; + default: + break; + } + + if (cid != 0) + { /* not a server-owned resource */ + /* + * The following 'if' restricts clients to only access resources at + * the same trustLevel. Since there are currently only two trust levels, + * and trusted clients never call this function, this degenerates into + * saying that untrusted clients can only access resources of other + * untrusted clients. One way to add the notion of groups would be to + * allow values other than Trusted (0) and Untrusted (1) for this field. + * Clients at the same trust level would be able to use each other's + * resources, but not those of clients at other trust levels. I haven't + * tried it, but this probably mostly works already. The obvious + * competing alternative for grouping clients for security purposes is to + * use app groups. dpw + */ + if (TRUSTLEVEL(client) == TRUSTLEVEL(clients[cid]) +#ifdef XAPPGROUP + || (RT_COLORMAP == rtype && + XagDefaultColormap (client) == (Colormap) id) +#endif + ) + return; + else + goto deny; + } + else /* server-owned resource - probably a default colormap or root window */ + { + if (RT_WINDOW == rtype || RC_DRAWABLE == rtype) + { + switch (reqtype) + { /* the following operations are allowed on root windows */ + case X_CreatePixmap: + case X_CreateGC: + case X_CreateWindow: + case X_CreateColormap: + case X_ListProperties: + case X_GrabPointer: + case X_UngrabButton: + case X_QueryBestSize: + case X_GetWindowAttributes: + break; + case X_SendEvent: + { /* see if it is an event specified by the ICCCM */ + xSendEventReq *req = (xSendEventReq *) + (client->requestBuffer); + if (req->propagate == xTrue + || + (req->eventMask != ColormapChangeMask && + req->eventMask != StructureNotifyMask && + req->eventMask != + (SubstructureRedirectMask|SubstructureNotifyMask) + ) + || + (req->event.u.u.type != UnmapNotify && + req->event.u.u.type != ConfigureRequest && + req->event.u.u.type != ClientMessage + ) + ) + { /* not an ICCCM event */ + goto deny; + } + break; + } /* case X_SendEvent on root */ + + case X_ChangeWindowAttributes: + { /* Allow selection of PropertyNotify and StructureNotify + * events on the root. + */ + xChangeWindowAttributesReq *req = + (xChangeWindowAttributesReq *)(client->requestBuffer); + if (req->valueMask == CWEventMask) + { + CARD32 value = *((CARD32 *)(req + 1)); + if ( (value & + ~(PropertyChangeMask|StructureNotifyMask)) == 0) + break; + } + goto deny; + } /* case X_ChangeWindowAttributes on root */ + + default: + { + /* others not allowed */ + goto deny; + } + } + } /* end server-owned window or drawable */ + else if (SecurityAuthorizationResType == rtype) + { + SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)rval; + if (pAuth->trustLevel != TRUSTLEVEL(client)) + goto deny; + } + else if (RT_COLORMAP != rtype) + { /* don't allow anything else besides colormaps */ + goto deny; + } + } + return; + deny: + SecurityAuditResourceIDAccess(client, id); + rec->rval = FALSE; /* deny access */ +} /* SecurityCheckResourceIDAccess */ + + +/* SecurityClientStateCallback + * + * Arguments: + * pcbl is &ClientStateCallback. + * nullata is NULL. + * calldata is a pointer to a NewClientInfoRec (include/dixstruct.h) + * which contains information about client state changes. + * + * Returns: nothing. + * + * Side Effects: + * + * If a new client is connecting, its authorization ID is copied to + * client->authID. If this is a generated authorization, its reference + * count is bumped, its timer is cancelled if it was running, and its + * trustlevel is copied to TRUSTLEVEL(client). + * + * If a client is disconnecting and the client was using a generated + * authorization, the authorization's reference count is decremented, and + * if it is now zero, the timer for this authorization is started. + */ + +CALLBACK(SecurityClientStateCallback) +{ + NewClientInfoRec *pci = (NewClientInfoRec *)calldata; + ClientPtr client = pci->client; + + switch (client->clientState) + { + case ClientStateInitial: + TRUSTLEVEL(client) = XSecurityClientTrusted; + AUTHID(client) = None; + break; + + case ClientStateRunning: + { + XID authId = AuthorizationIDOfClient(client); + SecurityAuthorizationPtr pAuth; + + TRUSTLEVEL(client) = XSecurityClientTrusted; + AUTHID(client) = authId; + pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId, + SecurityAuthorizationResType); + if (pAuth) + { /* it is a generated authorization */ + pAuth->refcnt++; + if (pAuth->refcnt == 1) + { + if (pAuth->timer) TimerCancel(pAuth->timer); + } + TRUSTLEVEL(client) = pAuth->trustLevel; + } + break; + } + case ClientStateGone: + case ClientStateRetained: /* client disconnected */ + { + SecurityAuthorizationPtr pAuth; + + /* client may not have any state (bad authorization) */ + if (!STATEPTR(client)) + break; + + pAuth = (SecurityAuthorizationPtr)LookupIDByType(AUTHID(client), + SecurityAuthorizationResType); + if (pAuth) + { /* it is a generated authorization */ + pAuth->refcnt--; + if (pAuth->refcnt == 0) + { + SecurityStartAuthorizationTimer(pAuth); + } + } + break; + } + default: break; + } +} /* SecurityClientStateCallback */ + +CALLBACK(SecurityCheckDrawableAccess) +{ + XaceDrawableAccessRec *rec = (XaceDrawableAccessRec*)calldata; + + if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted) + rec->rval = FALSE; +} + +CALLBACK(SecurityCheckMapAccess) +{ + XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; + WindowPtr pWin = rec->pWin; + + if (STATEPTR(rec->client) && + (TRUSTLEVEL(rec->client) != XSecurityClientTrusted) && + (pWin->drawable.class == InputOnly) && + pWin->parent && pWin->parent->parent && + (TRUSTLEVEL(wClient(pWin->parent)) == XSecurityClientTrusted)) + + rec->rval = FALSE; +} + +CALLBACK(SecurityCheckBackgrndAccess) +{ + XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; + + if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted) + rec->rval = FALSE; +} + +CALLBACK(SecurityCheckExtAccess) +{ + XaceExtAccessRec *rec = (XaceExtAccessRec*)calldata; + + if ((TRUSTLEVEL(rec->client) != XSecurityClientTrusted) && + !STATEVAL(rec->ext)) + + rec->rval = FALSE; +} + +CALLBACK(SecurityCheckHostlistAccess) +{ + XaceHostlistAccessRec *rec = (XaceHostlistAccessRec*)calldata; + + if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted) + { + rec->rval = FALSE; + if (rec->access_mode == DixWriteAccess) + SecurityAudit("client %d attempted to change host access\n", + rec->client->index); + else + SecurityAudit("client %d attempted to list hosts\n", + rec->client->index); + } +} + +CALLBACK(SecurityDeclareExtSecure) +{ + XaceDeclareExtSecureRec *rec = (XaceDeclareExtSecureRec*)calldata; + + /* security state for extensions is simply a boolean trust value */ + STATEVAL(rec->ext) = rec->secure; +} + +/**********************************************************************/ + +typedef struct _PropertyAccessRec { + ATOM name; + ATOM mustHaveProperty; + char *mustHaveValue; + char windowRestriction; +#define SecurityAnyWindow 0 +#define SecurityRootWindow 1 +#define SecurityWindowWithProperty 2 + char readAction; + char writeAction; + char destroyAction; + struct _PropertyAccessRec *next; +} PropertyAccessRec, *PropertyAccessPtr; + +static PropertyAccessPtr PropertyAccessList = NULL; +static char SecurityDefaultAction = XaceErrorOperation; +static char *SecurityPolicyFile = DEFAULTPOLICYFILE; +static ATOM SecurityMaxPropertyName = 0; + +static char *SecurityKeywords[] = { +#define SecurityKeywordComment 0 + "#", +#define SecurityKeywordProperty 1 + "property", +#define SecurityKeywordSitePolicy 2 + "sitepolicy", +#define SecurityKeywordRoot 3 + "root", +#define SecurityKeywordAny 4 + "any" +}; + +#define NUMKEYWORDS (sizeof(SecurityKeywords) / sizeof(char *)) + +#undef PROPDEBUG +/*#define PROPDEBUG 1*/ + +static void +SecurityFreePropertyAccessList(void) +{ + while (PropertyAccessList) + { + PropertyAccessPtr freeit = PropertyAccessList; + PropertyAccessList = PropertyAccessList->next; + xfree(freeit); + } +} /* SecurityFreePropertyAccessList */ + +#define SecurityIsWhitespace(c) ( (c == ' ') || (c == '\t') || (c == '\n') ) + +static char * +SecuritySkipWhitespace( + char *p) +{ + while (SecurityIsWhitespace(*p)) + p++; + return p; +} /* SecuritySkipWhitespace */ + + +static char * +SecurityParseString( + char **rest) +{ + char *startOfString; + char *s = *rest; + char endChar = 0; + + s = SecuritySkipWhitespace(s); + + if (*s == '"' || *s == '\'') + { + endChar = *s++; + startOfString = s; + while (*s && (*s != endChar)) + s++; + } + else + { + startOfString = s; + while (*s && !SecurityIsWhitespace(*s)) + s++; + } + if (*s) + { + *s = '\0'; + *rest = s + 1; + return startOfString; + } + else + { + *rest = s; + return (endChar) ? NULL : startOfString; + } +} /* SecurityParseString */ + + +static int +SecurityParseKeyword( + char **p) +{ + int i; + char *s = *p; + s = SecuritySkipWhitespace(s); + for (i = 0; i < NUMKEYWORDS; i++) + { + int len = strlen(SecurityKeywords[i]); + if (strncmp(s, SecurityKeywords[i], len) == 0) + { + *p = s + len; + return (i); + } + } + *p = s; + return -1; +} /* SecurityParseKeyword */ + + +static Bool +SecurityParsePropertyAccessRule( + char *p) +{ + char *propname; + char c; + char action = SecurityDefaultAction; + char readAction, writeAction, destroyAction; + PropertyAccessPtr pacl, prev, cur; + char *mustHaveProperty = NULL; + char *mustHaveValue = NULL; + Bool invalid; + char windowRestriction; + int size; + int keyword; + + /* get property name */ + propname = SecurityParseString(&p); + if (!propname || (strlen(propname) == 0)) + return FALSE; + + /* get window on which property must reside for rule to apply */ + + keyword = SecurityParseKeyword(&p); + if (keyword == SecurityKeywordRoot) + windowRestriction = SecurityRootWindow; + else if (keyword == SecurityKeywordAny) + windowRestriction = SecurityAnyWindow; + else /* not root or any, must be a property name */ + { + mustHaveProperty = SecurityParseString(&p); + if (!mustHaveProperty || (strlen(mustHaveProperty) == 0)) + return FALSE; + windowRestriction = SecurityWindowWithProperty; + p = SecuritySkipWhitespace(p); + if (*p == '=') + { /* property value is specified too */ + p++; /* skip over '=' */ + mustHaveValue = SecurityParseString(&p); + if (!mustHaveValue) + return FALSE; + } + } + + /* get operations and actions */ + + invalid = FALSE; + readAction = writeAction = destroyAction = SecurityDefaultAction; + while ( (c = *p++) && !invalid) + { + switch (c) + { + case 'i': action = XaceIgnoreOperation; break; + case 'a': action = XaceAllowOperation; break; + case 'e': action = XaceErrorOperation; break; + + case 'r': readAction = action; break; + case 'w': writeAction = action; break; + case 'd': destroyAction = action; break; + + default : + if (!SecurityIsWhitespace(c)) + invalid = TRUE; + break; + } + } + if (invalid) + return FALSE; + + /* We've successfully collected all the information needed for this + * property access rule. Now record it in a PropertyAccessRec. + */ + size = sizeof(PropertyAccessRec); + + /* If there is a property value string, allocate space for it + * right after the PropertyAccessRec. + */ + if (mustHaveValue) + size += strlen(mustHaveValue) + 1; + pacl = (PropertyAccessPtr)Xalloc(size); + if (!pacl) + return FALSE; + + pacl->name = MakeAtom(propname, strlen(propname), TRUE); + if (pacl->name == BAD_RESOURCE) + { + Xfree(pacl); + return FALSE; + } + if (mustHaveProperty) + { + pacl->mustHaveProperty = MakeAtom(mustHaveProperty, + strlen(mustHaveProperty), TRUE); + if (pacl->mustHaveProperty == BAD_RESOURCE) + { + Xfree(pacl); + return FALSE; + } + } + else + pacl->mustHaveProperty = 0; + + if (mustHaveValue) + { + pacl->mustHaveValue = (char *)(pacl + 1); + strcpy(pacl->mustHaveValue, mustHaveValue); + } + else + pacl->mustHaveValue = NULL; + + SecurityMaxPropertyName = max(SecurityMaxPropertyName, pacl->name); + + pacl->windowRestriction = windowRestriction; + pacl->readAction = readAction; + pacl->writeAction = writeAction; + pacl->destroyAction = destroyAction; + + /* link the new rule into the list of rules in order of increasing + * property name (atom) value to make searching easier + */ + + for (prev = NULL, cur = PropertyAccessList; + cur && cur->name <= pacl->name; + prev = cur, cur = cur->next) + ; + if (!prev) + { + pacl->next = cur; + PropertyAccessList = pacl; + } + else + { + prev->next = pacl; + pacl->next = cur; + } + return TRUE; +} /* SecurityParsePropertyAccessRule */ + +static char **SecurityPolicyStrings = NULL; +static int nSecurityPolicyStrings = 0; + +static Bool +SecurityParseSitePolicy( + char *p) +{ + char *policyStr = SecurityParseString(&p); + char *copyPolicyStr; + char **newStrings; + + if (!policyStr) + return FALSE; + + copyPolicyStr = (char *)Xalloc(strlen(policyStr) + 1); + if (!copyPolicyStr) + return TRUE; + strcpy(copyPolicyStr, policyStr); + newStrings = (char **)Xrealloc(SecurityPolicyStrings, + sizeof (char *) * (nSecurityPolicyStrings + 1)); + if (!newStrings) + { + Xfree(copyPolicyStr); + return TRUE; + } + + SecurityPolicyStrings = newStrings; + SecurityPolicyStrings[nSecurityPolicyStrings++] = copyPolicyStr; + + return TRUE; + +} /* SecurityParseSitePolicy */ + + +char ** +SecurityGetSitePolicyStrings(n) + int *n; +{ + *n = nSecurityPolicyStrings; + return SecurityPolicyStrings; +} /* SecurityGetSitePolicyStrings */ + +static void +SecurityFreeSitePolicyStrings(void) +{ + if (SecurityPolicyStrings) + { + assert(nSecurityPolicyStrings); + while (nSecurityPolicyStrings--) + { + Xfree(SecurityPolicyStrings[nSecurityPolicyStrings]); + } + Xfree(SecurityPolicyStrings); + SecurityPolicyStrings = NULL; + nSecurityPolicyStrings = 0; + } +} /* SecurityFreeSitePolicyStrings */ + + +static void +SecurityLoadPropertyAccessList(void) +{ + FILE *f; + int lineNumber = 0; + + SecurityMaxPropertyName = 0; + + if (!SecurityPolicyFile) + return; + + f = fopen(SecurityPolicyFile, "r"); + if (!f) + { + ErrorF("error opening security policy file %s\n", + SecurityPolicyFile); + return; + } + + while (!feof(f)) + { + char buf[200]; + Bool validLine; + char *p; + + if (!(p = fgets(buf, sizeof(buf), f))) + break; + lineNumber++; + + /* if first line, check version number */ + if (lineNumber == 1) + { + char *v = SecurityParseString(&p); + if (strcmp(v, SECURITY_POLICY_FILE_VERSION) != 0) + { + ErrorF("%s: invalid security policy file version, ignoring file\n", + SecurityPolicyFile); + break; + } + validLine = TRUE; + } + else + { + switch (SecurityParseKeyword(&p)) + { + case SecurityKeywordComment: + validLine = TRUE; + break; + + case SecurityKeywordProperty: + validLine = SecurityParsePropertyAccessRule(p); + break; + + case SecurityKeywordSitePolicy: + validLine = SecurityParseSitePolicy(p); + break; + + default: + validLine = (*p == '\0'); /* blank lines OK, others not */ + break; + } + } + + if (!validLine) + ErrorF("Line %d of %s invalid, ignoring\n", + lineNumber, SecurityPolicyFile); + } /* end while more input */ + +#ifdef PROPDEBUG + { + PropertyAccessPtr pacl; + char *op = "aie"; + for (pacl = PropertyAccessList; pacl; pacl = pacl->next) + { + ErrorF("property %s ", NameForAtom(pacl->name)); + switch (pacl->windowRestriction) + { + case SecurityAnyWindow: ErrorF("any "); break; + case SecurityRootWindow: ErrorF("root "); break; + case SecurityWindowWithProperty: + { + ErrorF("%s ", NameForAtom(pacl->mustHaveProperty)); + if (pacl->mustHaveValue) + ErrorF(" = \"%s\" ", pacl->mustHaveValue); + + } + break; + } + ErrorF("%cr %cw %cd\n", op[pacl->readAction], + op[pacl->writeAction], op[pacl->destroyAction]); + } + } +#endif /* PROPDEBUG */ + + fclose(f); +} /* SecurityLoadPropertyAccessList */ + + +static Bool +SecurityMatchString( + char *ws, + char *cs) +{ + while (*ws && *cs) + { + if (*ws == '*') + { + Bool match = FALSE; + ws++; + while (!(match = SecurityMatchString(ws, cs)) && *cs) + { + cs++; + } + return match; + } + else if (*ws == *cs) + { + ws++; + cs++; + } + else break; + } + return ( ( (*ws == '\0') || ((*ws == '*') && *(ws+1) == '\0') ) + && (*cs == '\0') ); +} /* SecurityMatchString */ + +#ifdef PROPDEBUG +#include +#include +#endif + + +CALLBACK(SecurityCheckPropertyAccess) +{ + XacePropertyAccessRec *rec = (XacePropertyAccessRec*)calldata; + ClientPtr client = rec->client; + WindowPtr pWin = rec->pWin; + ATOM propertyName = rec->propertyName; + Mask access_mode = rec->access_mode; + PropertyAccessPtr pacl; + char action = SecurityDefaultAction; + + /* if client trusted or window untrusted, allow operation */ + + if ( (TRUSTLEVEL(client) == XSecurityClientTrusted) || + (TRUSTLEVEL(wClient(pWin)) != XSecurityClientTrusted) ) + return; + +#ifdef PROPDEBUG + /* For testing, it's more convenient if the property rules file gets + * reloaded whenever it changes, so we can rapidly try things without + * having to reset the server. + */ + { + struct stat buf; + static time_t lastmod = 0; + int ret = stat(SecurityPolicyFile , &buf); + if ( (ret == 0) && (buf.st_mtime > lastmod) ) + { + ErrorF("reloading property rules\n"); + SecurityFreePropertyAccessList(); + SecurityLoadPropertyAccessList(); + lastmod = buf.st_mtime; + } + } +#endif + + /* If the property atom is bigger than any atoms on the list, + * we know we won't find it, so don't even bother looking. + */ + if (propertyName <= SecurityMaxPropertyName) + { + /* untrusted client operating on trusted window; see if it's allowed */ + + for (pacl = PropertyAccessList; pacl; pacl = pacl->next) + { + if (pacl->name < propertyName) + continue; + if (pacl->name > propertyName) + break; + + /* pacl->name == propertyName, so see if it applies to this window */ + + switch (pacl->windowRestriction) + { + case SecurityAnyWindow: /* always applies */ + break; + + case SecurityRootWindow: + { + /* if not a root window, this rule doesn't apply */ + if (pWin->parent) + continue; + } + break; + + case SecurityWindowWithProperty: + { + PropertyPtr pProp = wUserProps (pWin); + Bool match = FALSE; + char *p; + char *pEndData; + + while (pProp) + { + if (pProp->propertyName == pacl->mustHaveProperty) + break; + pProp = pProp->next; + } + if (!pProp) + continue; + if (!pacl->mustHaveValue) + break; + if (pProp->type != XA_STRING || pProp->format != 8) + continue; + + p = pProp->data; + pEndData = ((char *)pProp->data) + pProp->size; + while (!match && p < pEndData) + { + if (SecurityMatchString(pacl->mustHaveValue, p)) + match = TRUE; + else + { /* skip to the next string */ + while (*p++ && p < pEndData) + ; + } + } + if (!match) + continue; + } + break; /* end case SecurityWindowWithProperty */ + } /* end switch on windowRestriction */ + + /* If we get here, the property access rule pacl applies. + * If pacl doesn't apply, something above should have + * executed a continue, which will skip the follwing code. + */ + action = XaceAllowOperation; + if (access_mode & DixReadAccess) + action = max(action, pacl->readAction); + if (access_mode & DixWriteAccess) + action = max(action, pacl->writeAction); + if (access_mode & DixDestroyAccess) + action = max(action, pacl->destroyAction); + break; + } /* end for each pacl */ + } /* end if propertyName <= SecurityMaxPropertyName */ + + if (XaceAllowOperation != action) + { /* audit the access violation */ + int cid = CLIENT_ID(pWin->drawable.id); + int reqtype = ((xReq *)client->requestBuffer)->reqType; + char *actionstr = (XaceIgnoreOperation == action) ? + "ignored" : "error"; + SecurityAudit("client %d attempted request %d with window 0x%x property %s (atom 0x%x) of client %d, %s\n", + client->index, reqtype, pWin->drawable.id, + NameForAtom(propertyName), propertyName, cid, actionstr); + } + /* return codes increase with strictness */ + if (action > rec->rval) + rec->rval = action; +} /* SecurityCheckPropertyAccess */ + + +/* SecurityResetProc + * + * Arguments: + * extEntry is the extension information for the security extension. + * + * Returns: nothing. + * + * Side Effects: + * Performs any cleanup needed by Security at server shutdown time. + */ + +static void +SecurityResetProc( + ExtensionEntry *extEntry) +{ + SecurityFreePropertyAccessList(); + SecurityFreeSitePolicyStrings(); +} /* SecurityResetProc */ + + +int +XSecurityOptions(argc, argv, i) + int argc; + char **argv; + int i; +{ + if (strcmp(argv[i], "-sp") == 0) + { + if (i < argc) + SecurityPolicyFile = argv[++i]; + return (i + 1); + } + return (i); +} /* XSecurityOptions */ + + +/* SecurityExtensionSetup + * + * Arguments: none. + * + * Returns: nothing. + * + * Side Effects: + * Sets up the Security extension if possible. + * This function contains things that need to be done + * before any other extension init functions get called. + */ + +void +SecurityExtensionSetup(INITARGS) +{ + /* Allocate the client private index */ + securityClientPrivateIndex = AllocateClientPrivateIndex(); + if (!AllocateClientPrivate(securityClientPrivateIndex, + sizeof (SecurityClientStateRec))) + FatalError("SecurityExtensionSetup: Can't allocate client private.\n"); + + /* Allocate the extension private index */ + securityExtnsnPrivateIndex = AllocateExtensionPrivateIndex(); + if (!AllocateExtensionPrivate(securityExtnsnPrivateIndex, 0)) + FatalError("SecurityExtensionSetup: Can't allocate extnsn private.\n"); + + /* register callbacks */ +#define XaceRC XaceRegisterCallback + XaceRC(XACE_RESOURCE_ACCESS, SecurityCheckResourceIDAccess, NULL); + XaceRC(XACE_DEVICE_ACCESS, SecurityCheckDeviceAccess, NULL); + XaceRC(XACE_PROPERTY_ACCESS, SecurityCheckPropertyAccess, NULL); + XaceRC(XACE_DRAWABLE_ACCESS, SecurityCheckDrawableAccess, NULL); + XaceRC(XACE_MAP_ACCESS, SecurityCheckMapAccess, NULL); + XaceRC(XACE_BACKGRND_ACCESS, SecurityCheckBackgrndAccess, NULL); + XaceRC(XACE_EXT_DISPATCH, SecurityCheckExtAccess, NULL); + XaceRC(XACE_EXT_ACCESS, SecurityCheckExtAccess, NULL); + XaceRC(XACE_HOSTLIST_ACCESS, SecurityCheckHostlistAccess, NULL); + XaceRC(XACE_DECLARE_EXT_SECURE, SecurityDeclareExtSecure, NULL); +} /* SecurityExtensionSetup */ + + +/* SecurityExtensionInit + * + * Arguments: none. + * + * Returns: nothing. + * + * Side Effects: + * Enables the Security extension if possible. + */ + +void +SecurityExtensionInit(INITARGS) +{ + ExtensionEntry *extEntry; + + SecurityAuthorizationResType = + CreateNewResourceType(SecurityDeleteAuthorization); + + RTEventClient = CreateNewResourceType( + SecurityDeleteAuthorizationEventClient); + + if (!SecurityAuthorizationResType || !RTEventClient) + return; + + RTEventClient |= RC_NEVERRETAIN; + + if (!AddCallback(&ClientStateCallback, SecurityClientStateCallback, NULL)) + return; + + extEntry = AddExtension(SECURITY_EXTENSION_NAME, + XSecurityNumberEvents, XSecurityNumberErrors, + ProcSecurityDispatch, SProcSecurityDispatch, + SecurityResetProc, StandardMinorOpcode); + + SecurityErrorBase = extEntry->errorBase; + SecurityEventBase = extEntry->eventBase; + + EventSwapVector[SecurityEventBase + XSecurityAuthorizationRevoked] = + (EventSwapPtr)SwapSecurityAuthorizationRevokedEvent; + + SecurityLoadPropertyAccessList(); + +} /* SecurityExtensionInit */ diff --git a/xorg-server-1.4/Xext/securitysrv.h b/xorg-server-1.4/Xext/securitysrv.h new file mode 100644 index 0000000..67d864e --- /dev/null +++ b/xorg-server-1.4/Xext/securitysrv.h @@ -0,0 +1,89 @@ +/* +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. +*/ + +/* Xserver internals for Security extension - moved here from + _SECURITY_SERVER section of */ + +#ifndef _SECURITY_SRV_H +#define _SECURITY_SRV_H + +/* Allow client side portions of to compile */ +#ifndef Status +# define Status int +# define NEED_UNDEF_Status +#endif +#ifndef Display +# define Display void +# define NEED_UNDEF_Display +#endif + +#include + +#ifdef NEED_UNDEF_Status +# undef Status +# undef NEED_UNDEF_Status +#endif +#ifdef NEED_UNDEF_Display +# undef Display +# undef NEED_UNDEF_Display +#endif + + +#include "input.h" /* for DeviceIntPtr */ +#include "property.h" /* for PropertyPtr */ +#include "pixmap.h" /* for DrawablePtr */ +#include "resource.h" /* for RESTYPE */ + +/* resource type to pass in LookupIDByType for authorizations */ +extern RESTYPE SecurityAuthorizationResType; + +/* this is what we store for an authorization */ +typedef struct { + XID id; /* resource ID */ + CARD32 timeout; /* how long to live in seconds after refcnt == 0 */ + unsigned int trustLevel; /* trusted/untrusted */ + XID group; /* see embedding extension */ + unsigned int refcnt; /* how many clients connected with this auth */ + unsigned int secondsRemaining; /* overflow time amount for >49 days */ + OsTimerPtr timer; /* timer for this auth */ + struct _OtherClients *eventClients; /* clients wanting events */ +} SecurityAuthorizationRec, *SecurityAuthorizationPtr; + +typedef struct { + XID group; /* the group that was sent in GenerateAuthorization */ + Bool valid; /* did anyone recognize it? if so, set to TRUE */ +} SecurityValidateGroupInfoRec; + +extern int XSecurityOptions(int argc, char **argv, int i); + +/* Give this value or higher to the -audit option to get security messages */ +#define SECURITY_AUDIT_LEVEL 4 + +#define SECURITY_POLICY_FILE_VERSION "version-1" + +extern char **SecurityGetSitePolicyStrings(int *n); + +#endif /* _SECURITY_SRV_H */ diff --git a/xorg-server-1.4/Xext/shape.c b/xorg-server-1.4/Xext/shape.c new file mode 100644 index 0000000..928eeee --- /dev/null +++ b/xorg-server-1.4/Xext/shape.c @@ -0,0 +1,1335 @@ +/************************************************************ + +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. + +********************************************************/ + +#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" +#define _SHAPE_SERVER_ /* don't want Xlib structures */ +#include +#include "regionstr.h" +#include "gcstruct.h" +#include "modinit.h" + +typedef RegionPtr (*CreateDftPtr)( + WindowPtr /* pWin */ + ); + +static int ShapeFreeClient( + pointer /* data */, + XID /* id */ + ); +static int ShapeFreeEvents( + pointer /* data */, + XID /* id */ + ); +static void ShapeResetProc( + ExtensionEntry * /* extEntry */ + ); +static void SShapeNotifyEvent( + xShapeNotifyEvent * /* from */, + xShapeNotifyEvent * /* to */ + ); +static int +RegionOperate ( + ClientPtr /* client */, + WindowPtr /* pWin */, + int /* kind */, + RegionPtr * /* destRgnp */, + RegionPtr /* srcRgn */, + int /* op */, + int /* xoff */, + int /* yoff */, + CreateDftPtr /* create */ + ); + +/* SendShapeNotify, CreateBoundingShape and CreateClipShape are used + * externally by the Xfixes extension and are now defined in window.h + */ + +static DISPATCH_PROC(ProcShapeCombine); +static DISPATCH_PROC(ProcShapeDispatch); +static DISPATCH_PROC(ProcShapeGetRectangles); +static DISPATCH_PROC(ProcShapeInputSelected); +static DISPATCH_PROC(ProcShapeMask); +static DISPATCH_PROC(ProcShapeOffset); +static DISPATCH_PROC(ProcShapeQueryExtents); +static DISPATCH_PROC(ProcShapeQueryVersion); +static DISPATCH_PROC(ProcShapeRectangles); +static DISPATCH_PROC(ProcShapeSelectInput); +static DISPATCH_PROC(SProcShapeCombine); +static DISPATCH_PROC(SProcShapeDispatch); +static DISPATCH_PROC(SProcShapeGetRectangles); +static DISPATCH_PROC(SProcShapeInputSelected); +static DISPATCH_PROC(SProcShapeMask); +static DISPATCH_PROC(SProcShapeOffset); +static DISPATCH_PROC(SProcShapeQueryExtents); +static DISPATCH_PROC(SProcShapeQueryVersion); +static DISPATCH_PROC(SProcShapeRectangles); +static DISPATCH_PROC(SProcShapeSelectInput); + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif + +#if 0 +static unsigned char ShapeReqCode = 0; +#endif +static int ShapeEventBase = 0; +static RESTYPE ClientType, EventType; /* resource types for event masks */ + +/* + * each window has a list of clients requesting + * ShapeNotify events. Each client has a resource + * for each window it selects ShapeNotify input for, + * this resource is used to delete the ShapeNotifyRec + * entry from the per-window queue. + */ + +typedef struct _ShapeEvent *ShapeEventPtr; + +typedef struct _ShapeEvent { + ShapeEventPtr next; + ClientPtr client; + WindowPtr window; + XID clientResource; +} ShapeEventRec; + +/**************** + * ShapeExtensionInit + * + * Called from InitExtensions in main() or from QueryExtension() if the + * extension is dynamically loaded. + * + ****************/ + +void +ShapeExtensionInit(void) +{ + ExtensionEntry *extEntry; + + ClientType = CreateNewResourceType(ShapeFreeClient); + EventType = CreateNewResourceType(ShapeFreeEvents); + if (ClientType && EventType && + (extEntry = AddExtension(SHAPENAME, ShapeNumberEvents, 0, + ProcShapeDispatch, SProcShapeDispatch, + ShapeResetProc, StandardMinorOpcode))) + { +#if 0 + ShapeReqCode = (unsigned char)extEntry->base; +#endif + ShapeEventBase = extEntry->eventBase; + EventSwapVector[ShapeEventBase] = (EventSwapPtr) SShapeNotifyEvent; + } +} + +/*ARGSUSED*/ +static void +ShapeResetProc (extEntry) +ExtensionEntry *extEntry; +{ +} + +static int +RegionOperate (client, pWin, kind, destRgnp, srcRgn, op, xoff, yoff, create) + ClientPtr client; + WindowPtr pWin; + int kind; + RegionPtr *destRgnp, srcRgn; + int op; + int xoff, yoff; + CreateDftPtr create; /* creates a reasonable *destRgnp */ +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + if (srcRgn && (xoff || yoff)) + REGION_TRANSLATE(pScreen, srcRgn, xoff, yoff); + if (!pWin->parent) + { + if (srcRgn) + REGION_DESTROY(pScreen, srcRgn); + return Success; + } + + /* May/30/2001: + * The shape.PS specs say if src is None, existing shape is to be + * removed (and so the op-code has no meaning in such removal); + * see shape.PS, page 3, ShapeMask. + */ + if (srcRgn == NULL) { + if (*destRgnp != NULL) { + REGION_DESTROY (pScreen, *destRgnp); + *destRgnp = 0; + /* go on to remove shape and generate ShapeNotify */ + } + else { + /* May/30/2001: + * The target currently has no shape in effect, so nothing to + * do here. The specs say that ShapeNotify is generated whenever + * the client region is "modified"; since no modification is done + * here, we do not generate that event. The specs does not say + * "it is an error to request removal when there is no shape in + * effect", so we return good status. + */ + return Success; + } + } + else switch (op) { + case ShapeSet: + if (*destRgnp) + REGION_DESTROY(pScreen, *destRgnp); + *destRgnp = srcRgn; + srcRgn = 0; + break; + case ShapeUnion: + if (*destRgnp) + REGION_UNION(pScreen, *destRgnp, *destRgnp, srcRgn); + break; + case ShapeIntersect: + if (*destRgnp) + REGION_INTERSECT(pScreen, *destRgnp, *destRgnp, srcRgn); + else { + *destRgnp = srcRgn; + srcRgn = 0; + } + break; + case ShapeSubtract: + if (!*destRgnp) + *destRgnp = (*create)(pWin); + REGION_SUBTRACT(pScreen, *destRgnp, *destRgnp, srcRgn); + break; + case ShapeInvert: + if (!*destRgnp) + *destRgnp = REGION_CREATE(pScreen, (BoxPtr) 0, 0); + else + REGION_SUBTRACT(pScreen, *destRgnp, srcRgn, *destRgnp); + break; + default: + client->errorValue = op; + return BadValue; + } + if (srcRgn) + REGION_DESTROY(pScreen, srcRgn); + (*pScreen->SetShape) (pWin); + SendShapeNotify (pWin, kind); + return Success; +} + +RegionPtr +CreateBoundingShape (pWin) + WindowPtr pWin; +{ + BoxRec extents; + + extents.x1 = -wBorderWidth (pWin); + extents.y1 = -wBorderWidth (pWin); + extents.x2 = pWin->drawable.width + wBorderWidth (pWin); + extents.y2 = pWin->drawable.height + wBorderWidth (pWin); + return REGION_CREATE(pWin->drawable.pScreen, &extents, 1); +} + +RegionPtr +CreateClipShape (pWin) + WindowPtr pWin; +{ + BoxRec extents; + + extents.x1 = 0; + extents.y1 = 0; + extents.x2 = pWin->drawable.width; + extents.y2 = pWin->drawable.height; + return REGION_CREATE(pWin->drawable.pScreen, &extents, 1); +} + +static int +ProcShapeQueryVersion (client) + register ClientPtr client; +{ + xShapeQueryVersionReply rep; + register int n; + + REQUEST_SIZE_MATCH (xShapeQueryVersionReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.majorVersion = SHAPE_MAJOR_VERSION; + rep.minorVersion = SHAPE_MINOR_VERSION; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swaps(&rep.majorVersion, n); + swaps(&rep.minorVersion, n); + } + WriteToClient(client, sizeof (xShapeQueryVersionReply), (char *)&rep); + return (client->noClientException); +} + +/***************** + * ProcShapeRectangles + * + *****************/ + +static int +ProcShapeRectangles (client) + register ClientPtr client; +{ + WindowPtr pWin; + ScreenPtr pScreen; + REQUEST(xShapeRectanglesReq); + xRectangle *prects; + int nrects, ctype, rc; + RegionPtr srcRgn; + RegionPtr *destRgn; + CreateDftPtr createDefault; + + REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq); + UpdateCurrentTime(); + rc = dixLookupWindow(&pWin, stuff->dest, client, DixUnknownAccess); + if (rc != Success) + return rc; + switch (stuff->destKind) { + case ShapeBounding: + createDefault = CreateBoundingShape; + break; + case ShapeClip: + createDefault = CreateClipShape; + break; + case ShapeInput: + createDefault = CreateBoundingShape; + break; + default: + client->errorValue = stuff->destKind; + return BadValue; + } + if ((stuff->ordering != Unsorted) && (stuff->ordering != YSorted) && + (stuff->ordering != YXSorted) && (stuff->ordering != YXBanded)) + { + client->errorValue = stuff->ordering; + return BadValue; + } + pScreen = pWin->drawable.pScreen; + nrects = ((stuff->length << 2) - sizeof(xShapeRectanglesReq)); + if (nrects & 4) + return BadLength; + nrects >>= 3; + prects = (xRectangle *) &stuff[1]; + ctype = VerifyRectOrder(nrects, prects, (int)stuff->ordering); + if (ctype < 0) + return BadMatch; + srcRgn = RECTS_TO_REGION(pScreen, nrects, prects, ctype); + + if (!pWin->optional) + MakeWindowOptional (pWin); + switch (stuff->destKind) { + case ShapeBounding: + destRgn = &pWin->optional->boundingShape; + break; + case ShapeClip: + destRgn = &pWin->optional->clipShape; + break; + case ShapeInput: + destRgn = &pWin->optional->inputShape; + break; + default: + return BadValue; + } + + return RegionOperate (client, pWin, (int)stuff->destKind, + destRgn, srcRgn, (int)stuff->op, + stuff->xOff, stuff->yOff, createDefault); +} + +#ifdef PANORAMIX +static int +ProcPanoramiXShapeRectangles( + register ClientPtr client) +{ + REQUEST(xShapeRectanglesReq); + PanoramiXRes *win; + int j, result = 0; + + REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq); + + if(!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->dest, XRT_WINDOW, DixWriteAccess))) + return BadWindow; + + FOR_NSCREENS(j) { + stuff->dest = win->info[j].id; + result = ProcShapeRectangles (client); + BREAK_IF(result != Success); + } + return (result); +} +#endif + + +/************** + * ProcShapeMask + **************/ + + +static int +ProcShapeMask (client) + register ClientPtr client; +{ + WindowPtr pWin; + ScreenPtr pScreen; + REQUEST(xShapeMaskReq); + RegionPtr srcRgn; + RegionPtr *destRgn; + PixmapPtr pPixmap; + CreateDftPtr createDefault; + int rc; + + REQUEST_SIZE_MATCH (xShapeMaskReq); + UpdateCurrentTime(); + rc = dixLookupWindow(&pWin, stuff->dest, client, DixWriteAccess); + if (rc != Success) + return rc; + switch (stuff->destKind) { + case ShapeBounding: + createDefault = CreateBoundingShape; + break; + case ShapeClip: + createDefault = CreateClipShape; + break; + case ShapeInput: + createDefault = CreateBoundingShape; + break; + default: + client->errorValue = stuff->destKind; + return BadValue; + } + pScreen = pWin->drawable.pScreen; + if (stuff->src == None) + srcRgn = 0; + else { + pPixmap = (PixmapPtr) SecurityLookupIDByType(client, stuff->src, + RT_PIXMAP, DixReadAccess); + if (!pPixmap) + return BadPixmap; + if (pPixmap->drawable.pScreen != pScreen || + pPixmap->drawable.depth != 1) + return BadMatch; + srcRgn = BITMAP_TO_REGION(pScreen, pPixmap); + if (!srcRgn) + return BadAlloc; + } + + if (!pWin->optional) + MakeWindowOptional (pWin); + switch (stuff->destKind) { + case ShapeBounding: + destRgn = &pWin->optional->boundingShape; + break; + case ShapeClip: + destRgn = &pWin->optional->clipShape; + break; + case ShapeInput: + destRgn = &pWin->optional->inputShape; + break; + default: + return BadValue; + } + + return RegionOperate (client, pWin, (int)stuff->destKind, + destRgn, srcRgn, (int)stuff->op, + stuff->xOff, stuff->yOff, createDefault); +} + +#ifdef PANORAMIX +static int +ProcPanoramiXShapeMask( + register ClientPtr client) +{ + REQUEST(xShapeMaskReq); + PanoramiXRes *win, *pmap; + int j, result = 0; + + REQUEST_SIZE_MATCH (xShapeMaskReq); + + if(!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->dest, XRT_WINDOW, DixWriteAccess))) + return BadWindow; + + if(stuff->src != None) { + if(!(pmap = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->src, XRT_PIXMAP, DixReadAccess))) + return BadPixmap; + } else + pmap = NULL; + + FOR_NSCREENS(j) { + stuff->dest = win->info[j].id; + if(pmap) + stuff->src = pmap->info[j].id; + result = ProcShapeMask (client); + BREAK_IF(result != Success); + } + return (result); +} +#endif + + +/************ + * ProcShapeCombine + ************/ + +static int +ProcShapeCombine (client) + register ClientPtr client; +{ + WindowPtr pSrcWin, pDestWin; + ScreenPtr pScreen; + REQUEST(xShapeCombineReq); + RegionPtr srcRgn; + RegionPtr *destRgn; + CreateDftPtr createDefault; + CreateDftPtr createSrc; + RegionPtr tmp; + int rc; + + REQUEST_SIZE_MATCH (xShapeCombineReq); + UpdateCurrentTime(); + rc = dixLookupWindow(&pDestWin, stuff->dest, client, DixUnknownAccess); + if (rc != Success) + return rc; + if (!pDestWin->optional) + MakeWindowOptional (pDestWin); + switch (stuff->destKind) { + case ShapeBounding: + createDefault = CreateBoundingShape; + break; + case ShapeClip: + createDefault = CreateClipShape; + break; + case ShapeInput: + createDefault = CreateBoundingShape; + break; + default: + client->errorValue = stuff->destKind; + return BadValue; + } + pScreen = pDestWin->drawable.pScreen; + + rc = dixLookupWindow(&pSrcWin, stuff->src, client, DixUnknownAccess); + if (rc != Success) + return rc; + switch (stuff->srcKind) { + case ShapeBounding: + srcRgn = wBoundingShape (pSrcWin); + createSrc = CreateBoundingShape; + break; + case ShapeClip: + srcRgn = wClipShape (pSrcWin); + createSrc = CreateClipShape; + break; + case ShapeInput: + srcRgn = wInputShape (pSrcWin); + createSrc = CreateBoundingShape; + break; + default: + client->errorValue = stuff->srcKind; + return BadValue; + } + if (pSrcWin->drawable.pScreen != pScreen) + { + return BadMatch; + } + + if (srcRgn) { + tmp = REGION_CREATE(pScreen, (BoxPtr) 0, 0); + REGION_COPY(pScreen, tmp, srcRgn); + srcRgn = tmp; + } else + srcRgn = (*createSrc) (pSrcWin); + + if (!pDestWin->optional) + MakeWindowOptional (pDestWin); + switch (stuff->destKind) { + case ShapeBounding: + destRgn = &pDestWin->optional->boundingShape; + break; + case ShapeClip: + destRgn = &pDestWin->optional->clipShape; + break; + case ShapeInput: + destRgn = &pDestWin->optional->inputShape; + break; + default: + return BadValue; + } + + return RegionOperate (client, pDestWin, (int)stuff->destKind, + destRgn, srcRgn, (int)stuff->op, + stuff->xOff, stuff->yOff, createDefault); +} + + +#ifdef PANORAMIX +static int +ProcPanoramiXShapeCombine( + register ClientPtr client) +{ + REQUEST(xShapeCombineReq); + PanoramiXRes *win, *win2; + int j, result = 0; + + REQUEST_AT_LEAST_SIZE (xShapeCombineReq); + + if(!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->dest, XRT_WINDOW, DixWriteAccess))) + return BadWindow; + + if(!(win2 = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->src, XRT_WINDOW, DixReadAccess))) + return BadWindow; + + FOR_NSCREENS(j) { + stuff->dest = win->info[j].id; + stuff->src = win2->info[j].id; + result = ProcShapeCombine (client); + BREAK_IF(result != Success); + } + return (result); +} +#endif + +/************* + * ProcShapeOffset + *************/ + +static int +ProcShapeOffset (client) + register ClientPtr client; +{ + WindowPtr pWin; + ScreenPtr pScreen; + REQUEST(xShapeOffsetReq); + RegionPtr srcRgn; + int rc; + + REQUEST_SIZE_MATCH (xShapeOffsetReq); + UpdateCurrentTime(); + rc = dixLookupWindow(&pWin, stuff->dest, client, DixUnknownAccess); + if (rc != Success) + return rc; + switch (stuff->destKind) { + case ShapeBounding: + srcRgn = wBoundingShape (pWin); + break; + case ShapeClip: + srcRgn = wClipShape(pWin); + break; + case ShapeInput: + srcRgn = wInputShape (pWin); + break; + default: + client->errorValue = stuff->destKind; + return BadValue; + } + pScreen = pWin->drawable.pScreen; + if (srcRgn) + { + REGION_TRANSLATE(pScreen, srcRgn, stuff->xOff, stuff->yOff); + (*pScreen->SetShape) (pWin); + } + SendShapeNotify (pWin, (int)stuff->destKind); + return Success; +} + + +#ifdef PANORAMIX +static int +ProcPanoramiXShapeOffset( + register ClientPtr client) +{ + REQUEST(xShapeOffsetReq); + PanoramiXRes *win; + int j, result = 0; + + REQUEST_AT_LEAST_SIZE (xShapeOffsetReq); + + if(!(win = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->dest, XRT_WINDOW, DixWriteAccess))) + return BadWindow; + + FOR_NSCREENS(j) { + stuff->dest = win->info[j].id; + result = ProcShapeOffset (client); + if(result != Success) break; + } + return (result); +} +#endif + + +static int +ProcShapeQueryExtents (client) + register ClientPtr client; +{ + REQUEST(xShapeQueryExtentsReq); + WindowPtr pWin; + xShapeQueryExtentsReply rep; + BoxRec extents, *pExtents; + register int n, rc; + RegionPtr region; + + REQUEST_SIZE_MATCH (xShapeQueryExtentsReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.boundingShaped = (wBoundingShape(pWin) != 0); + rep.clipShaped = (wClipShape(pWin) != 0); + if ((region = wBoundingShape(pWin))) { + /* this is done in two steps because of a compiler bug on SunOS 4.1.3 */ + pExtents = REGION_EXTENTS(pWin->drawable.pScreen, region); + extents = *pExtents; + } else { + extents.x1 = -wBorderWidth (pWin); + extents.y1 = -wBorderWidth (pWin); + extents.x2 = pWin->drawable.width + wBorderWidth (pWin); + extents.y2 = pWin->drawable.height + wBorderWidth (pWin); + } + rep.xBoundingShape = extents.x1; + rep.yBoundingShape = extents.y1; + rep.widthBoundingShape = extents.x2 - extents.x1; + rep.heightBoundingShape = extents.y2 - extents.y1; + if ((region = wClipShape(pWin))) { + /* this is done in two steps because of a compiler bug on SunOS 4.1.3 */ + pExtents = REGION_EXTENTS(pWin->drawable.pScreen, region); + extents = *pExtents; + } else { + extents.x1 = 0; + extents.y1 = 0; + extents.x2 = pWin->drawable.width; + extents.y2 = pWin->drawable.height; + } + rep.xClipShape = extents.x1; + rep.yClipShape = extents.y1; + rep.widthClipShape = extents.x2 - extents.x1; + rep.heightClipShape = extents.y2 - extents.y1; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swaps(&rep.xBoundingShape, n); + swaps(&rep.yBoundingShape, n); + swaps(&rep.widthBoundingShape, n); + swaps(&rep.heightBoundingShape, n); + swaps(&rep.xClipShape, n); + swaps(&rep.yClipShape, n); + swaps(&rep.widthClipShape, n); + swaps(&rep.heightClipShape, n); + } + WriteToClient(client, sizeof (xShapeQueryExtentsReply), (char *)&rep); + return (client->noClientException); +} + +/*ARGSUSED*/ +static int +ShapeFreeClient (data, id) + pointer data; + XID id; +{ + ShapeEventPtr pShapeEvent; + WindowPtr pWin; + ShapeEventPtr *pHead, pCur, pPrev; + + pShapeEvent = (ShapeEventPtr) data; + pWin = pShapeEvent->window; + pHead = (ShapeEventPtr *) LookupIDByType(pWin->drawable.id, EventType); + if (pHead) { + pPrev = 0; + for (pCur = *pHead; pCur && pCur != pShapeEvent; pCur=pCur->next) + pPrev = pCur; + if (pCur) + { + if (pPrev) + pPrev->next = pShapeEvent->next; + else + *pHead = pShapeEvent->next; + } + } + xfree ((pointer) pShapeEvent); + return 1; +} + +/*ARGSUSED*/ +static int +ShapeFreeEvents (data, id) + pointer data; + XID id; +{ + ShapeEventPtr *pHead, pCur, pNext; + + pHead = (ShapeEventPtr *) data; + for (pCur = *pHead; pCur; pCur = pNext) { + pNext = pCur->next; + FreeResource (pCur->clientResource, ClientType); + xfree ((pointer) pCur); + } + xfree ((pointer) pHead); + return 1; +} + +static int +ProcShapeSelectInput (client) + register ClientPtr client; +{ + REQUEST(xShapeSelectInputReq); + WindowPtr pWin; + ShapeEventPtr pShapeEvent, pNewShapeEvent, *pHead; + XID clientResource; + int rc; + + REQUEST_SIZE_MATCH (xShapeSelectInputReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) + return rc; + pHead = (ShapeEventPtr *)SecurityLookupIDByType(client, + pWin->drawable.id, EventType, DixWriteAccess); + switch (stuff->enable) { + case xTrue: + if (pHead) { + + /* check for existing entry. */ + for (pShapeEvent = *pHead; + pShapeEvent; + pShapeEvent = pShapeEvent->next) + { + if (pShapeEvent->client == client) + return Success; + } + } + + /* build the entry */ + pNewShapeEvent = (ShapeEventPtr) + xalloc (sizeof (ShapeEventRec)); + if (!pNewShapeEvent) + return BadAlloc; + pNewShapeEvent->next = 0; + pNewShapeEvent->client = client; + pNewShapeEvent->window = pWin; + /* + * add a resource that will be deleted when + * the client goes away + */ + clientResource = FakeClientID (client->index); + pNewShapeEvent->clientResource = clientResource; + if (!AddResource (clientResource, ClientType, (pointer)pNewShapeEvent)) + return BadAlloc; + /* + * create a resource to contain a pointer to the list + * of clients selecting input. This must be indirect as + * the list may be arbitrarily rearranged which cannot be + * done through the resource database. + */ + if (!pHead) + { + pHead = (ShapeEventPtr *) xalloc (sizeof (ShapeEventPtr)); + if (!pHead || + !AddResource (pWin->drawable.id, EventType, (pointer)pHead)) + { + FreeResource (clientResource, RT_NONE); + return BadAlloc; + } + *pHead = 0; + } + pNewShapeEvent->next = *pHead; + *pHead = pNewShapeEvent; + break; + case xFalse: + /* delete the interest */ + if (pHead) { + pNewShapeEvent = 0; + for (pShapeEvent = *pHead; pShapeEvent; pShapeEvent = pShapeEvent->next) { + if (pShapeEvent->client == client) + break; + pNewShapeEvent = pShapeEvent; + } + if (pShapeEvent) { + FreeResource (pShapeEvent->clientResource, ClientType); + if (pNewShapeEvent) + pNewShapeEvent->next = pShapeEvent->next; + else + *pHead = pShapeEvent->next; + xfree (pShapeEvent); + } + } + break; + default: + client->errorValue = stuff->enable; + return BadValue; + } + return Success; +} + +/* + * deliver the event + */ + +void +SendShapeNotify (pWin, which) + WindowPtr pWin; + int which; +{ + ShapeEventPtr *pHead, pShapeEvent; + ClientPtr client; + xShapeNotifyEvent se; + BoxRec extents; + RegionPtr region; + BYTE shaped; + + pHead = (ShapeEventPtr *) LookupIDByType(pWin->drawable.id, EventType); + if (!pHead) + return; + switch (which) { + case ShapeBounding: + region = wBoundingShape(pWin); + if (region) { + extents = *REGION_EXTENTS(pWin->drawable.pScreen, region); + shaped = xTrue; + } else { + extents.x1 = -wBorderWidth (pWin); + extents.y1 = -wBorderWidth (pWin); + extents.x2 = pWin->drawable.width + wBorderWidth (pWin); + extents.y2 = pWin->drawable.height + wBorderWidth (pWin); + shaped = xFalse; + } + break; + case ShapeClip: + region = wClipShape(pWin); + if (region) { + extents = *REGION_EXTENTS(pWin->drawable.pScreen, region); + shaped = xTrue; + } else { + extents.x1 = 0; + extents.y1 = 0; + extents.x2 = pWin->drawable.width; + extents.y2 = pWin->drawable.height; + shaped = xFalse; + } + break; + case ShapeInput: + region = wInputShape(pWin); + if (region) { + extents = *REGION_EXTENTS(pWin->drawable.pScreen, region); + shaped = xTrue; + } else { + extents.x1 = -wBorderWidth (pWin); + extents.y1 = -wBorderWidth (pWin); + extents.x2 = pWin->drawable.width + wBorderWidth (pWin); + extents.y2 = pWin->drawable.height + wBorderWidth (pWin); + shaped = xFalse; + } + break; + default: + return; + } + for (pShapeEvent = *pHead; pShapeEvent; pShapeEvent = pShapeEvent->next) { + client = pShapeEvent->client; + if (client == serverClient || client->clientGone) + continue; + se.type = ShapeNotify + ShapeEventBase; + se.kind = which; + se.window = pWin->drawable.id; + se.sequenceNumber = client->sequence; + se.x = extents.x1; + se.y = extents.y1; + se.width = extents.x2 - extents.x1; + se.height = extents.y2 - extents.y1; + se.time = currentTime.milliseconds; + se.shaped = shaped; + WriteEventsToClient (client, 1, (xEvent *) &se); + } +} + +static int +ProcShapeInputSelected (client) + register ClientPtr client; +{ + REQUEST(xShapeInputSelectedReq); + WindowPtr pWin; + ShapeEventPtr pShapeEvent, *pHead; + int enabled, rc; + xShapeInputSelectedReply rep; + register int n; + + REQUEST_SIZE_MATCH (xShapeInputSelectedReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; + pHead = (ShapeEventPtr *) SecurityLookupIDByType(client, + pWin->drawable.id, EventType, DixReadAccess); + enabled = xFalse; + if (pHead) { + for (pShapeEvent = *pHead; + pShapeEvent; + pShapeEvent = pShapeEvent->next) + { + if (pShapeEvent->client == client) { + enabled = xTrue; + break; + } + } + } + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.enabled = enabled; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + } + WriteToClient (client, sizeof (xShapeInputSelectedReply), (char *) &rep); + return (client->noClientException); +} + +static int +ProcShapeGetRectangles (client) + register ClientPtr client; +{ + REQUEST(xShapeGetRectanglesReq); + WindowPtr pWin; + xShapeGetRectanglesReply rep; + xRectangle *rects; + int nrects, i, rc; + RegionPtr region; + register int n; + + REQUEST_SIZE_MATCH(xShapeGetRectanglesReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; + switch (stuff->kind) { + case ShapeBounding: + region = wBoundingShape(pWin); + break; + case ShapeClip: + region = wClipShape(pWin); + break; + case ShapeInput: + region = wInputShape (pWin); + break; + default: + client->errorValue = stuff->kind; + return BadValue; + } + if (!region) { + nrects = 1; + rects = (xRectangle *) ALLOCATE_LOCAL (sizeof (xRectangle)); + if (!rects) + return BadAlloc; + switch (stuff->kind) { + case ShapeBounding: + rects->x = - (int) wBorderWidth (pWin); + rects->y = - (int) wBorderWidth (pWin); + rects->width = pWin->drawable.width + wBorderWidth (pWin); + rects->height = pWin->drawable.height + wBorderWidth (pWin); + break; + case ShapeClip: + rects->x = 0; + rects->y = 0; + rects->width = pWin->drawable.width; + rects->height = pWin->drawable.height; + break; + case ShapeInput: + rects->x = - (int) wBorderWidth (pWin); + rects->y = - (int) wBorderWidth (pWin); + rects->width = pWin->drawable.width + wBorderWidth (pWin); + rects->height = pWin->drawable.height + wBorderWidth (pWin); + break; + } + } else { + BoxPtr box; + nrects = REGION_NUM_RECTS(region); + box = REGION_RECTS(region); + rects = (xRectangle *) ALLOCATE_LOCAL (nrects * sizeof (xRectangle)); + if (!rects && nrects) + return BadAlloc; + for (i = 0; i < nrects; i++, box++) { + rects[i].x = box->x1; + rects[i].y = box->y1; + rects[i].width = box->x2 - box->x1; + rects[i].height = box->y2 - box->y1; + } + } + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = (nrects * sizeof (xRectangle)) >> 2; + rep.ordering = YXBanded; + rep.nrects = nrects; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.nrects, n); + SwapShorts ((short *)rects, (unsigned long)nrects * 4); + } + WriteToClient (client, sizeof (rep), (char *) &rep); + WriteToClient (client, nrects * sizeof (xRectangle), (char *) rects); + DEALLOCATE_LOCAL (rects); + return client->noClientException; +} + +static int +ProcShapeDispatch (client) + register ClientPtr client; +{ + REQUEST(xReq); + switch (stuff->data) { + case X_ShapeQueryVersion: + return ProcShapeQueryVersion (client); + case X_ShapeRectangles: +#ifdef PANORAMIX + if ( !noPanoramiXExtension ) + return ProcPanoramiXShapeRectangles (client); + else +#endif + return ProcShapeRectangles (client); + case X_ShapeMask: +#ifdef PANORAMIX + if ( !noPanoramiXExtension ) + return ProcPanoramiXShapeMask (client); + else +#endif + return ProcShapeMask (client); + case X_ShapeCombine: +#ifdef PANORAMIX + if ( !noPanoramiXExtension ) + return ProcPanoramiXShapeCombine (client); + else +#endif + return ProcShapeCombine (client); + case X_ShapeOffset: +#ifdef PANORAMIX + if ( !noPanoramiXExtension ) + return ProcPanoramiXShapeOffset (client); + else +#endif + return ProcShapeOffset (client); + case X_ShapeQueryExtents: + return ProcShapeQueryExtents (client); + case X_ShapeSelectInput: + return ProcShapeSelectInput (client); + case X_ShapeInputSelected: + return ProcShapeInputSelected (client); + case X_ShapeGetRectangles: + return ProcShapeGetRectangles (client); + default: + return BadRequest; + } +} + +static void +SShapeNotifyEvent(from, to) + xShapeNotifyEvent *from, *to; +{ + to->type = from->type; + to->kind = from->kind; + cpswapl (from->window, to->window); + cpswaps (from->sequenceNumber, to->sequenceNumber); + cpswaps (from->x, to->x); + cpswaps (from->y, to->y); + cpswaps (from->width, to->width); + cpswaps (from->height, to->height); + cpswapl (from->time, to->time); + to->shaped = from->shaped; +} + +static int +SProcShapeQueryVersion (client) + register ClientPtr client; +{ + register int n; + REQUEST (xShapeQueryVersionReq); + + swaps (&stuff->length, n); + return ProcShapeQueryVersion (client); +} + +static int +SProcShapeRectangles (client) + register ClientPtr client; +{ + register char n; + REQUEST (xShapeRectanglesReq); + + swaps (&stuff->length, n); + REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq); + swapl (&stuff->dest, n); + swaps (&stuff->xOff, n); + swaps (&stuff->yOff, n); + SwapRestS(stuff); + return ProcShapeRectangles (client); +} + +static int +SProcShapeMask (client) + register ClientPtr client; +{ + register char n; + REQUEST (xShapeMaskReq); + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH (xShapeMaskReq); + swapl (&stuff->dest, n); + swaps (&stuff->xOff, n); + swaps (&stuff->yOff, n); + swapl (&stuff->src, n); + return ProcShapeMask (client); +} + +static int +SProcShapeCombine (client) + register ClientPtr client; +{ + register char n; + REQUEST (xShapeCombineReq); + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH (xShapeCombineReq); + swapl (&stuff->dest, n); + swaps (&stuff->xOff, n); + swaps (&stuff->yOff, n); + swapl (&stuff->src, n); + return ProcShapeCombine (client); +} + +static int +SProcShapeOffset (client) + register ClientPtr client; +{ + register char n; + REQUEST (xShapeOffsetReq); + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH (xShapeOffsetReq); + swapl (&stuff->dest, n); + swaps (&stuff->xOff, n); + swaps (&stuff->yOff, n); + return ProcShapeOffset (client); +} + +static int +SProcShapeQueryExtents (client) + register ClientPtr client; +{ + register char n; + REQUEST (xShapeQueryExtentsReq); + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH (xShapeQueryExtentsReq); + swapl (&stuff->window, n); + return ProcShapeQueryExtents (client); +} + +static int +SProcShapeSelectInput (client) + register ClientPtr client; +{ + register char n; + REQUEST (xShapeSelectInputReq); + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH (xShapeSelectInputReq); + swapl (&stuff->window, n); + return ProcShapeSelectInput (client); +} + +static int +SProcShapeInputSelected (client) + register ClientPtr client; +{ + register int n; + REQUEST (xShapeInputSelectedReq); + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH (xShapeInputSelectedReq); + swapl (&stuff->window, n); + return ProcShapeInputSelected (client); +} + +static int +SProcShapeGetRectangles (client) + register ClientPtr client; +{ + REQUEST(xShapeGetRectanglesReq); + register char n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xShapeGetRectanglesReq); + swapl (&stuff->window, n); + return ProcShapeGetRectangles (client); +} + +static int +SProcShapeDispatch (client) + register ClientPtr client; +{ + REQUEST(xReq); + switch (stuff->data) { + case X_ShapeQueryVersion: + return SProcShapeQueryVersion (client); + case X_ShapeRectangles: + return SProcShapeRectangles (client); + case X_ShapeMask: + return SProcShapeMask (client); + case X_ShapeCombine: + return SProcShapeCombine (client); + case X_ShapeOffset: + return SProcShapeOffset (client); + case X_ShapeQueryExtents: + return SProcShapeQueryExtents (client); + case X_ShapeSelectInput: + return SProcShapeSelectInput (client); + case X_ShapeInputSelected: + return SProcShapeInputSelected (client); + case X_ShapeGetRectangles: + return SProcShapeGetRectangles (client); + default: + return BadRequest; + } +} diff --git a/xorg-server-1.4/Xext/shm.c b/xorg-server-1.4/Xext/shm.c new file mode 100644 index 0000000..ac587be --- /dev/null +++ b/xorg-server-1.4/Xext/shm.c @@ -0,0 +1,1257 @@ +/************************************************************ + +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. + +********************************************************/ + +/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ + + +#define SHM + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#ifndef Lynx +#include +#include +#else +#include +#include +#endif +#include +#include +#define NEED_REPLIES +#define NEED_EVENTS +#include +#include +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "resource.h" +#include "scrnintstr.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "gcstruct.h" +#include "extnsionst.h" +#include "servermd.h" +#define _XSHM_SERVER_ +#include +#include + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif + +#include "modinit.h" + +typedef struct _ShmDesc { + struct _ShmDesc *next; + int shmid; + int refcnt; + char *addr; + Bool writable; + unsigned long size; +} ShmDescRec, *ShmDescPtr; + +static void miShmPutImage(XSHM_PUT_IMAGE_ARGS); +static void fbShmPutImage(XSHM_PUT_IMAGE_ARGS); +static PixmapPtr fbShmCreatePixmap(XSHM_CREATE_PIXMAP_ARGS); +static int ShmDetachSegment( + pointer /* value */, + XID /* shmseg */ + ); +static void ShmResetProc( + ExtensionEntry * /* extEntry */ + ); +static void SShmCompletionEvent( + xShmCompletionEvent * /* from */, + xShmCompletionEvent * /* to */ + ); + +static Bool ShmDestroyPixmap (PixmapPtr pPixmap); + +static DISPATCH_PROC(ProcShmAttach); +static DISPATCH_PROC(ProcShmCreatePixmap); +static DISPATCH_PROC(ProcShmDetach); +static DISPATCH_PROC(ProcShmDispatch); +static DISPATCH_PROC(ProcShmGetImage); +static DISPATCH_PROC(ProcShmPutImage); +static DISPATCH_PROC(ProcShmQueryVersion); +static DISPATCH_PROC(SProcShmAttach); +static DISPATCH_PROC(SProcShmCreatePixmap); +static DISPATCH_PROC(SProcShmDetach); +static DISPATCH_PROC(SProcShmDispatch); +static DISPATCH_PROC(SProcShmGetImage); +static DISPATCH_PROC(SProcShmPutImage); +static DISPATCH_PROC(SProcShmQueryVersion); + +static unsigned char ShmReqCode; +_X_EXPORT int ShmCompletionCode; +_X_EXPORT int BadShmSegCode; +_X_EXPORT RESTYPE ShmSegType; +static ShmDescPtr Shmsegs; +static Bool sharedPixmaps; +static int pixmapFormat; +static int shmPixFormat[MAXSCREENS]; +static ShmFuncsPtr shmFuncs[MAXSCREENS]; +static DestroyPixmapProcPtr destroyPixmap[MAXSCREENS]; +static int shmPixmapPrivate; +static ShmFuncs miFuncs = {NULL, miShmPutImage}; +static ShmFuncs fbFuncs = {fbShmCreatePixmap, fbShmPutImage}; + +#define VERIFY_SHMSEG(shmseg,shmdesc,client) \ +{ \ + shmdesc = (ShmDescPtr)LookupIDByType(shmseg, ShmSegType); \ + if (!shmdesc) \ + { \ + client->errorValue = shmseg; \ + return BadShmSegCode; \ + } \ +} + +#define VERIFY_SHMPTR(shmseg,offset,needwrite,shmdesc,client) \ +{ \ + VERIFY_SHMSEG(shmseg, shmdesc, client); \ + if ((offset & 3) || (offset > shmdesc->size)) \ + { \ + client->errorValue = offset; \ + return BadValue; \ + } \ + if (needwrite && !shmdesc->writable) \ + return BadAccess; \ +} + +#define VERIFY_SHMSIZE(shmdesc,offset,len,client) \ +{ \ + if ((offset + len) > shmdesc->size) \ + { \ + return BadAccess; \ + } \ +} + + +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) +#include + +static Bool badSysCall = FALSE; + +static void +SigSysHandler(signo) +int signo; +{ + badSysCall = TRUE; +} + +static Bool CheckForShmSyscall() +{ + void (*oldHandler)(); + int shmid = -1; + + /* If no SHM support in the kernel, the bad syscall will generate SIGSYS */ + oldHandler = signal(SIGSYS, SigSysHandler); + + badSysCall = FALSE; + shmid = shmget(IPC_PRIVATE, 4096, IPC_CREAT); + + if (shmid != -1) + { + /* Successful allocation - clean up */ + shmctl(shmid, IPC_RMID, (struct shmid_ds *)NULL); + } + else + { + /* Allocation failed */ + badSysCall = TRUE; + } + signal(SIGSYS, oldHandler); + return(!badSysCall); +} + +#define MUST_CHECK_FOR_SHM_SYSCALL + +#endif + +void +ShmExtensionInit(INITARGS) +{ + ExtensionEntry *extEntry; + int i; + +#ifdef MUST_CHECK_FOR_SHM_SYSCALL + if (!CheckForShmSyscall()) + { + ErrorF("MIT-SHM extension disabled due to lack of kernel support\n"); + return; + } +#endif + + sharedPixmaps = xFalse; + pixmapFormat = 0; + { + sharedPixmaps = xTrue; + pixmapFormat = shmPixFormat[0]; + for (i = 0; i < screenInfo.numScreens; i++) + { + if (!shmFuncs[i]) + shmFuncs[i] = &miFuncs; + if (!shmFuncs[i]->CreatePixmap) + sharedPixmaps = xFalse; + if (shmPixFormat[i] && (shmPixFormat[i] != pixmapFormat)) + { + sharedPixmaps = xFalse; + pixmapFormat = 0; + } + } + if (!pixmapFormat) + pixmapFormat = ZPixmap; + if (sharedPixmaps) + { + for (i = 0; i < screenInfo.numScreens; i++) + { + destroyPixmap[i] = screenInfo.screens[i]->DestroyPixmap; + screenInfo.screens[i]->DestroyPixmap = ShmDestroyPixmap; + } + shmPixmapPrivate = AllocatePixmapPrivateIndex(); + for (i = 0; i < screenInfo.numScreens; i++) + { + if (!AllocatePixmapPrivate(screenInfo.screens[i], + shmPixmapPrivate, 0)) + return; + } + } + } + ShmSegType = CreateNewResourceType(ShmDetachSegment); + if (ShmSegType && + (extEntry = AddExtension(SHMNAME, ShmNumberEvents, ShmNumberErrors, + ProcShmDispatch, SProcShmDispatch, + ShmResetProc, StandardMinorOpcode))) + { + ShmReqCode = (unsigned char)extEntry->base; + ShmCompletionCode = extEntry->eventBase; + BadShmSegCode = extEntry->errorBase; + EventSwapVector[ShmCompletionCode] = (EventSwapPtr) SShmCompletionEvent; + } +} + +/*ARGSUSED*/ +static void +ShmResetProc (extEntry) +ExtensionEntry *extEntry; +{ + int i; + + for (i = 0; i < MAXSCREENS; i++) + { + shmFuncs[i] = (ShmFuncsPtr)NULL; + shmPixFormat[i] = 0; + } +} + +void +ShmRegisterFuncs( + ScreenPtr pScreen, + ShmFuncsPtr funcs) +{ + shmFuncs[pScreen->myNum] = funcs; +} + +void +ShmSetPixmapFormat( + ScreenPtr pScreen, + int format) +{ + shmPixFormat[pScreen->myNum] = format; +} + +static Bool +ShmDestroyPixmap (PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + Bool ret; + if (pPixmap->refcnt == 1) + { + ShmDescPtr shmdesc; + shmdesc = (ShmDescPtr) pPixmap->devPrivates[shmPixmapPrivate].ptr; + if (shmdesc) + ShmDetachSegment ((pointer) shmdesc, pPixmap->drawable.id); + } + + pScreen->DestroyPixmap = destroyPixmap[pScreen->myNum]; + ret = (*pScreen->DestroyPixmap) (pPixmap); + destroyPixmap[pScreen->myNum] = pScreen->DestroyPixmap; + pScreen->DestroyPixmap = ShmDestroyPixmap; + return ret; +} + +void +ShmRegisterFbFuncs(pScreen) + ScreenPtr pScreen; +{ + shmFuncs[pScreen->myNum] = &fbFuncs; +} + +static int +ProcShmQueryVersion(client) + register ClientPtr client; +{ + xShmQueryVersionReply rep; + register int n; + + REQUEST_SIZE_MATCH(xShmQueryVersionReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.sharedPixmaps = sharedPixmaps; + rep.pixmapFormat = pixmapFormat; + rep.majorVersion = SHM_MAJOR_VERSION; + rep.minorVersion = SHM_MINOR_VERSION; + rep.uid = geteuid(); + rep.gid = getegid(); + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swaps(&rep.majorVersion, n); + swaps(&rep.minorVersion, n); + swaps(&rep.uid, n); + swaps(&rep.gid, n); + } + WriteToClient(client, sizeof(xShmQueryVersionReply), (char *)&rep); + return (client->noClientException); +} + +/* + * Simulate the access() system call for a shared memory segement, + * using the credentials from the client if available + */ +static int +shm_access(ClientPtr client, struct ipc_perm *perm, int readonly) +{ + int uid, gid; + mode_t mask; + + if (LocalClientCred(client, &uid, &gid) != -1) { + + /* User id 0 always gets access */ + if (uid == 0) { + return 0; + } + /* Check the owner */ + if (perm->uid == uid || perm->cuid == uid) { + mask = S_IRUSR; + if (!readonly) { + mask |= S_IWUSR; + } + return (perm->mode & mask) == mask ? 0 : -1; + } + /* Check the group */ + if (perm->gid == gid || perm->cgid == gid) { + mask = S_IRGRP; + if (!readonly) { + mask |= S_IWGRP; + } + return (perm->mode & mask) == mask ? 0 : -1; + } + } + /* Otherwise, check everyone else */ + mask = S_IROTH; + if (!readonly) { + mask |= S_IWOTH; + } + return (perm->mode & mask) == mask ? 0 : -1; +} + +static int +ProcShmAttach(client) + register ClientPtr client; +{ + struct shmid_ds buf; + ShmDescPtr shmdesc; + REQUEST(xShmAttachReq); + + REQUEST_SIZE_MATCH(xShmAttachReq); + LEGAL_NEW_RESOURCE(stuff->shmseg, client); + if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) + { + client->errorValue = stuff->readOnly; + return(BadValue); + } + for (shmdesc = Shmsegs; + shmdesc && (shmdesc->shmid != stuff->shmid); + shmdesc = shmdesc->next) + ; + if (shmdesc) + { + if (!stuff->readOnly && !shmdesc->writable) + return BadAccess; + shmdesc->refcnt++; + } + else + { + shmdesc = (ShmDescPtr) xalloc(sizeof(ShmDescRec)); + if (!shmdesc) + return BadAlloc; + shmdesc->addr = shmat(stuff->shmid, 0, + stuff->readOnly ? SHM_RDONLY : 0); + if ((shmdesc->addr == ((char *)-1)) || + shmctl(stuff->shmid, IPC_STAT, &buf)) + { + xfree(shmdesc); + return BadAccess; + } + + /* The attach was performed with root privs. We must + * do manual checking of access rights for the credentials + * of the client */ + + if (shm_access(client, &(buf.shm_perm), stuff->readOnly) == -1) { + shmdt(shmdesc->addr); + xfree(shmdesc); + return BadAccess; + } + + shmdesc->shmid = stuff->shmid; + shmdesc->refcnt = 1; + shmdesc->writable = !stuff->readOnly; + shmdesc->size = buf.shm_segsz; + shmdesc->next = Shmsegs; + Shmsegs = shmdesc; + } + if (!AddResource(stuff->shmseg, ShmSegType, (pointer)shmdesc)) + return BadAlloc; + return(client->noClientException); +} + +/*ARGSUSED*/ +static int +ShmDetachSegment(value, shmseg) + pointer value; /* must conform to DeleteType */ + XID shmseg; +{ + ShmDescPtr shmdesc = (ShmDescPtr)value; + ShmDescPtr *prev; + + if (--shmdesc->refcnt) + return TRUE; + shmdt(shmdesc->addr); + for (prev = &Shmsegs; *prev != shmdesc; prev = &(*prev)->next) + ; + *prev = shmdesc->next; + xfree(shmdesc); + return Success; +} + +static int +ProcShmDetach(client) + register ClientPtr client; +{ + ShmDescPtr shmdesc; + REQUEST(xShmDetachReq); + + REQUEST_SIZE_MATCH(xShmDetachReq); + VERIFY_SHMSEG(stuff->shmseg, shmdesc, client); + FreeResource(stuff->shmseg, RT_NONE); + return(client->noClientException); +} + +static void +miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) + DrawablePtr dst; + GCPtr pGC; + int depth, w, h, sx, sy, sw, sh, dx, dy; + unsigned int format; + char *data; +{ + PixmapPtr pmap; + GCPtr putGC; + + putGC = GetScratchGC(depth, dst->pScreen); + if (!putGC) + return; + pmap = (*dst->pScreen->CreatePixmap)(dst->pScreen, sw, sh, depth); + if (!pmap) + { + FreeScratchGC(putGC); + return; + } + ValidateGC((DrawablePtr)pmap, putGC); + (*putGC->ops->PutImage)((DrawablePtr)pmap, putGC, depth, -sx, -sy, w, h, 0, + (format == XYPixmap) ? XYPixmap : ZPixmap, data); + FreeScratchGC(putGC); + if (format == XYBitmap) + (void)(*pGC->ops->CopyPlane)((DrawablePtr)pmap, dst, pGC, 0, 0, sw, sh, + dx, dy, 1L); + else + (void)(*pGC->ops->CopyArea)((DrawablePtr)pmap, dst, pGC, 0, 0, sw, sh, + dx, dy); + (*pmap->drawable.pScreen->DestroyPixmap)(pmap); +} + +static void +fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) + DrawablePtr dst; + GCPtr pGC; + int depth, w, h, sx, sy, sw, sh, dx, dy; + unsigned int format; + char *data; +{ + if ((format == ZPixmap) || (depth == 1)) + { + PixmapPtr pPixmap; + + pPixmap = GetScratchPixmapHeader(dst->pScreen, w, h, depth, + BitsPerPixel(depth), PixmapBytePad(w, depth), (pointer)data); + if (!pPixmap) + return; + if (format == XYBitmap) + (void)(*pGC->ops->CopyPlane)((DrawablePtr)pPixmap, dst, pGC, + sx, sy, sw, sh, dx, dy, 1L); + else + (void)(*pGC->ops->CopyArea)((DrawablePtr)pPixmap, dst, pGC, + sx, sy, sw, sh, dx, dy); + FreeScratchPixmapHeader(pPixmap); + } + else + miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, + data); +} + + +#ifdef PANORAMIX +static int +ProcPanoramiXShmPutImage(register ClientPtr client) +{ + int j, result = 0, orig_x, orig_y; + PanoramiXRes *draw, *gc; + Bool sendEvent, isRoot; + + REQUEST(xShmPutImageReq); + REQUEST_SIZE_MATCH(xShmPutImageReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + orig_x = stuff->dstX; + orig_y = stuff->dstY; + sendEvent = stuff->sendEvent; + stuff->sendEvent = 0; + FOR_NSCREENS(j) { + if(!j) stuff->sendEvent = sendEvent; + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + if (isRoot) { + stuff->dstX = orig_x - panoramiXdataPtr[j].x; + stuff->dstY = orig_y - panoramiXdataPtr[j].y; + } + result = ProcShmPutImage(client); + if(result != client->noClientException) break; + } + return(result); +} + +static int +ProcPanoramiXShmGetImage(ClientPtr client) +{ + PanoramiXRes *draw; + DrawablePtr drawables[MAXSCREENS]; + DrawablePtr pDraw; + xShmGetImageReply xgi; + ShmDescPtr shmdesc; + int i, x, y, w, h, format, rc; + Mask plane = 0, planemask; + long lenPer = 0, length, widthBytesLine; + Bool isRoot; + + REQUEST(xShmGetImageReq); + + REQUEST_SIZE_MATCH(xShmGetImageReq); + + if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) { + client->errorValue = stuff->format; + return(BadValue); + } + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if (draw->type == XRT_PIXMAP) + return ProcShmGetImage(client); + + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixUnknownAccess); + if (rc != Success) + return rc; + + VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); + + x = stuff->x; + y = stuff->y; + w = stuff->width; + h = stuff->height; + format = stuff->format; + planemask = stuff->planeMask; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + if(isRoot) { + if( /* check for being onscreen */ + x < 0 || x + w > PanoramiXPixWidth || + y < 0 || y + h > PanoramiXPixHeight ) + return(BadMatch); + } else { + if( /* check for being onscreen */ + panoramiXdataPtr[0].x + pDraw->x + x < 0 || + panoramiXdataPtr[0].x + pDraw->x + x + w > PanoramiXPixWidth || + panoramiXdataPtr[0].y + pDraw->y + y < 0 || + panoramiXdataPtr[0].y + pDraw->y + y + h > PanoramiXPixHeight || + /* check for being inside of border */ + x < - wBorderWidth((WindowPtr)pDraw) || + x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width || + y < -wBorderWidth((WindowPtr)pDraw) || + y + h > wBorderWidth ((WindowPtr)pDraw) + (int)pDraw->height) + return(BadMatch); + } + + drawables[0] = pDraw; + for(i = 1; i < PanoramiXNumScreens; i++) { + rc = dixLookupDrawable(drawables+i, draw->info[i].id, client, 0, + DixUnknownAccess); + if (rc != Success) + return rc; + } + + xgi.visual = wVisual(((WindowPtr)pDraw)); + xgi.type = X_Reply; + xgi.length = 0; + xgi.sequenceNumber = client->sequence; + xgi.depth = pDraw->depth; + + if(format == ZPixmap) { + widthBytesLine = PixmapBytePad(w, pDraw->depth); + length = widthBytesLine * h; + } else { + widthBytesLine = PixmapBytePad(w, 1); + lenPer = widthBytesLine * h; + plane = ((Mask)1) << (pDraw->depth - 1); + length = lenPer * Ones(planemask & (plane | (plane - 1))); + } + + VERIFY_SHMSIZE(shmdesc, stuff->offset, length, client); + xgi.size = length; + + if (length == 0) {/* nothing to do */ } + else if (format == ZPixmap) { + XineramaGetImageData(drawables, x, y, w, h, format, planemask, + shmdesc->addr + stuff->offset, + widthBytesLine, isRoot); + } else { + + length = stuff->offset; + for (; plane; plane >>= 1) { + if (planemask & plane) { + XineramaGetImageData(drawables, x, y, w, h, + format, plane, shmdesc->addr + length, + widthBytesLine, isRoot); + length += lenPer; + } + } + } + + if (client->swapped) { + register int n; + swaps(&xgi.sequenceNumber, n); + swapl(&xgi.length, n); + swapl(&xgi.visual, n); + swapl(&xgi.size, n); + } + WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi); + + return(client->noClientException); +} + +static int +ProcPanoramiXShmCreatePixmap( + register ClientPtr client) +{ + ScreenPtr pScreen = NULL; + PixmapPtr pMap = NULL; + DrawablePtr pDraw; + DepthPtr pDepth; + int i, j, result, rc; + ShmDescPtr shmdesc; + REQUEST(xShmCreatePixmapReq); + PanoramiXRes *newPix; + + REQUEST_SIZE_MATCH(xShmCreatePixmapReq); + client->errorValue = stuff->pid; + if (!sharedPixmaps) + return BadImplementation; + LEGAL_NEW_RESOURCE(stuff->pid, client); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, + DixUnknownAccess); + if (rc != Success) + return rc; + + VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); + if (!stuff->width || !stuff->height) + { + client->errorValue = 0; + return BadValue; + } + if (stuff->depth != 1) + { + pDepth = pDraw->pScreen->allowedDepths; + for (i=0; ipScreen->numDepths; i++, pDepth++) + if (pDepth->depth == stuff->depth) + goto CreatePmap; + client->errorValue = stuff->depth; + return BadValue; + } +CreatePmap: + VERIFY_SHMSIZE(shmdesc, stuff->offset, + PixmapBytePad(stuff->width, stuff->depth) * stuff->height, + client); + + if(!(newPix = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + return BadAlloc; + + newPix->type = XRT_PIXMAP; + newPix->u.pix.shared = TRUE; + newPix->info[0].id = stuff->pid; + for(j = 1; j < PanoramiXNumScreens; j++) + newPix->info[j].id = FakeClientID(client->index); + + result = (client->noClientException); + + FOR_NSCREENS(j) { + pScreen = screenInfo.screens[j]; + + pMap = (*shmFuncs[j]->CreatePixmap)(pScreen, + stuff->width, stuff->height, stuff->depth, + shmdesc->addr + stuff->offset); + + if (pMap) { + pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc; + shmdesc->refcnt++; + pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + pMap->drawable.id = newPix->info[j].id; + if (!AddResource(newPix->info[j].id, RT_PIXMAP, (pointer)pMap)) { + (*pScreen->DestroyPixmap)(pMap); + result = BadAlloc; + break; + } + } else { + result = BadAlloc; + break; + } + } + + if(result == BadAlloc) { + while(j--) { + (*pScreen->DestroyPixmap)(pMap); + FreeResource(newPix->info[j].id, RT_NONE); + } + xfree(newPix); + } else + AddResource(stuff->pid, XRT_PIXMAP, newPix); + + return result; +} + +#endif + +static int +ProcShmPutImage(client) + register ClientPtr client; +{ + GCPtr pGC; + DrawablePtr pDraw; + long length; + ShmDescPtr shmdesc; + REQUEST(xShmPutImageReq); + + REQUEST_SIZE_MATCH(xShmPutImageReq); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VERIFY_SHMPTR(stuff->shmseg, stuff->offset, FALSE, shmdesc, client); + if ((stuff->sendEvent != xTrue) && (stuff->sendEvent != xFalse)) + return BadValue; + if (stuff->format == XYBitmap) + { + if (stuff->depth != 1) + return BadMatch; + length = PixmapBytePad(stuff->totalWidth, 1); + } + else if (stuff->format == XYPixmap) + { + if (pDraw->depth != stuff->depth) + return BadMatch; + length = PixmapBytePad(stuff->totalWidth, 1); + length *= stuff->depth; + } + else if (stuff->format == ZPixmap) + { + if (pDraw->depth != stuff->depth) + return BadMatch; + length = PixmapBytePad(stuff->totalWidth, stuff->depth); + } + else + { + client->errorValue = stuff->format; + return BadValue; + } + + VERIFY_SHMSIZE(shmdesc, stuff->offset, length * stuff->totalHeight, + client); + if (stuff->srcX > stuff->totalWidth) + { + client->errorValue = stuff->srcX; + return BadValue; + } + if (stuff->srcY > stuff->totalHeight) + { + client->errorValue = stuff->srcY; + return BadValue; + } + if ((stuff->srcX + stuff->srcWidth) > stuff->totalWidth) + { + client->errorValue = stuff->srcWidth; + return BadValue; + } + if ((stuff->srcY + stuff->srcHeight) > stuff->totalHeight) + { + client->errorValue = stuff->srcHeight; + return BadValue; + } + + if ((((stuff->format == ZPixmap) && (stuff->srcX == 0)) || + ((stuff->format != ZPixmap) && + (stuff->srcX < screenInfo.bitmapScanlinePad) && + ((stuff->format == XYBitmap) || + ((stuff->srcY == 0) && + (stuff->srcHeight == stuff->totalHeight))))) && + ((stuff->srcX + stuff->srcWidth) == stuff->totalWidth)) + (*pGC->ops->PutImage) (pDraw, pGC, stuff->depth, + stuff->dstX, stuff->dstY, + stuff->totalWidth, stuff->srcHeight, + stuff->srcX, stuff->format, + shmdesc->addr + stuff->offset + + (stuff->srcY * length)); + else + (*shmFuncs[pDraw->pScreen->myNum]->PutImage)( + pDraw, pGC, stuff->depth, stuff->format, + stuff->totalWidth, stuff->totalHeight, + stuff->srcX, stuff->srcY, + stuff->srcWidth, stuff->srcHeight, + stuff->dstX, stuff->dstY, + shmdesc->addr + stuff->offset); + + if (stuff->sendEvent) + { + xShmCompletionEvent ev; + + ev.type = ShmCompletionCode; + ev.drawable = stuff->drawable; + ev.sequenceNumber = client->sequence; + ev.minorEvent = X_ShmPutImage; + ev.majorEvent = ShmReqCode; + ev.shmseg = stuff->shmseg; + ev.offset = stuff->offset; + WriteEventsToClient(client, 1, (xEvent *) &ev); + } + + return (client->noClientException); +} + + + +static int +ProcShmGetImage(client) + register ClientPtr client; +{ + DrawablePtr pDraw; + long lenPer = 0, length; + Mask plane = 0; + xShmGetImageReply xgi; + ShmDescPtr shmdesc; + int n, rc; + + REQUEST(xShmGetImageReq); + + REQUEST_SIZE_MATCH(xShmGetImageReq); + if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) + { + client->errorValue = stuff->format; + return(BadValue); + } + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixUnknownAccess); + if (rc != Success) + return rc; + VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); + if (pDraw->type == DRAWABLE_WINDOW) + { + if( /* check for being viewable */ + !((WindowPtr) pDraw)->realized || + /* check for being on screen */ + pDraw->x + stuff->x < 0 || + pDraw->x + stuff->x + (int)stuff->width > pDraw->pScreen->width || + pDraw->y + stuff->y < 0 || + pDraw->y + stuff->y + (int)stuff->height > pDraw->pScreen->height || + /* check for being inside of border */ + stuff->x < - wBorderWidth((WindowPtr)pDraw) || + stuff->x + (int)stuff->width > + wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width || + stuff->y < -wBorderWidth((WindowPtr)pDraw) || + stuff->y + (int)stuff->height > + wBorderWidth((WindowPtr)pDraw) + (int)pDraw->height + ) + return(BadMatch); + xgi.visual = wVisual(((WindowPtr)pDraw)); + } + else + { + if (stuff->x < 0 || + stuff->x+(int)stuff->width > pDraw->width || + stuff->y < 0 || + stuff->y+(int)stuff->height > pDraw->height + ) + return(BadMatch); + xgi.visual = None; + } + xgi.type = X_Reply; + xgi.length = 0; + xgi.sequenceNumber = client->sequence; + xgi.depth = pDraw->depth; + if(stuff->format == ZPixmap) + { + length = PixmapBytePad(stuff->width, pDraw->depth) * stuff->height; + } + else + { + lenPer = PixmapBytePad(stuff->width, 1) * stuff->height; + plane = ((Mask)1) << (pDraw->depth - 1); + /* only planes asked for */ + length = lenPer * Ones(stuff->planeMask & (plane | (plane - 1))); + } + + VERIFY_SHMSIZE(shmdesc, stuff->offset, length, client); + xgi.size = length; + + if (length == 0) + { + /* nothing to do */ + } + else if (stuff->format == ZPixmap) + { + (*pDraw->pScreen->GetImage)(pDraw, stuff->x, stuff->y, + stuff->width, stuff->height, + stuff->format, stuff->planeMask, + shmdesc->addr + stuff->offset); + } + else + { + + length = stuff->offset; + for (; plane; plane >>= 1) + { + if (stuff->planeMask & plane) + { + (*pDraw->pScreen->GetImage)(pDraw, + stuff->x, stuff->y, + stuff->width, stuff->height, + stuff->format, plane, + shmdesc->addr + length); + length += lenPer; + } + } + } + + if (client->swapped) { + swaps(&xgi.sequenceNumber, n); + swapl(&xgi.length, n); + swapl(&xgi.visual, n); + swapl(&xgi.size, n); + } + WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi); + + return(client->noClientException); +} + +static PixmapPtr +fbShmCreatePixmap (pScreen, width, height, depth, addr) + ScreenPtr pScreen; + int width; + int height; + int depth; + char *addr; +{ + register PixmapPtr pPixmap; + + pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth); + if (!pPixmap) + return NullPixmap; + + if (!(*pScreen->ModifyPixmapHeader)(pPixmap, width, height, depth, + BitsPerPixel(depth), PixmapBytePad(width, depth), (pointer)addr)) { + (*pScreen->DestroyPixmap)(pPixmap); + return NullPixmap; + } + return pPixmap; +} + +static int +ProcShmCreatePixmap(client) + register ClientPtr client; +{ + PixmapPtr pMap; + DrawablePtr pDraw; + DepthPtr pDepth; + register int i, rc; + ShmDescPtr shmdesc; + REQUEST(xShmCreatePixmapReq); + + REQUEST_SIZE_MATCH(xShmCreatePixmapReq); + client->errorValue = stuff->pid; + if (!sharedPixmaps) + return BadImplementation; + LEGAL_NEW_RESOURCE(stuff->pid, client); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, + DixUnknownAccess); + if (rc != Success) + return rc; + + VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); + if (!stuff->width || !stuff->height) + { + client->errorValue = 0; + return BadValue; + } + if (stuff->depth != 1) + { + pDepth = pDraw->pScreen->allowedDepths; + for (i=0; ipScreen->numDepths; i++, pDepth++) + if (pDepth->depth == stuff->depth) + goto CreatePmap; + client->errorValue = stuff->depth; + return BadValue; + } +CreatePmap: + VERIFY_SHMSIZE(shmdesc, stuff->offset, + PixmapBytePad(stuff->width, stuff->depth) * stuff->height, + client); + pMap = (*shmFuncs[pDraw->pScreen->myNum]->CreatePixmap)( + pDraw->pScreen, stuff->width, + stuff->height, stuff->depth, + shmdesc->addr + stuff->offset); + if (pMap) + { + pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc; + shmdesc->refcnt++; + pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + pMap->drawable.id = stuff->pid; + if (AddResource(stuff->pid, RT_PIXMAP, (pointer)pMap)) + { + return(client->noClientException); + } + } + return (BadAlloc); +} + +static int +ProcShmDispatch (client) + register ClientPtr client; +{ + REQUEST(xReq); + switch (stuff->data) + { + case X_ShmQueryVersion: + return ProcShmQueryVersion(client); + case X_ShmAttach: + return ProcShmAttach(client); + case X_ShmDetach: + return ProcShmDetach(client); + case X_ShmPutImage: +#ifdef PANORAMIX + if ( !noPanoramiXExtension ) + return ProcPanoramiXShmPutImage(client); +#endif + return ProcShmPutImage(client); + case X_ShmGetImage: +#ifdef PANORAMIX + if ( !noPanoramiXExtension ) + return ProcPanoramiXShmGetImage(client); +#endif + return ProcShmGetImage(client); + case X_ShmCreatePixmap: +#ifdef PANORAMIX + if ( !noPanoramiXExtension ) + return ProcPanoramiXShmCreatePixmap(client); +#endif + return ProcShmCreatePixmap(client); + default: + return BadRequest; + } +} + +static void +SShmCompletionEvent(from, to) + xShmCompletionEvent *from, *to; +{ + to->type = from->type; + cpswaps(from->sequenceNumber, to->sequenceNumber); + cpswapl(from->drawable, to->drawable); + cpswaps(from->minorEvent, to->minorEvent); + to->majorEvent = from->majorEvent; + cpswapl(from->shmseg, to->shmseg); + cpswapl(from->offset, to->offset); +} + +static int +SProcShmQueryVersion(client) + register ClientPtr client; +{ + register int n; + REQUEST(xShmQueryVersionReq); + + swaps(&stuff->length, n); + return ProcShmQueryVersion(client); +} + +static int +SProcShmAttach(client) + ClientPtr client; +{ + register int n; + REQUEST(xShmAttachReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xShmAttachReq); + swapl(&stuff->shmseg, n); + swapl(&stuff->shmid, n); + return ProcShmAttach(client); +} + +static int +SProcShmDetach(client) + ClientPtr client; +{ + register int n; + REQUEST(xShmDetachReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xShmDetachReq); + swapl(&stuff->shmseg, n); + return ProcShmDetach(client); +} + +static int +SProcShmPutImage(client) + ClientPtr client; +{ + register int n; + REQUEST(xShmPutImageReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xShmPutImageReq); + swapl(&stuff->drawable, n); + swapl(&stuff->gc, n); + swaps(&stuff->totalWidth, n); + swaps(&stuff->totalHeight, n); + swaps(&stuff->srcX, n); + swaps(&stuff->srcY, n); + swaps(&stuff->srcWidth, n); + swaps(&stuff->srcHeight, n); + swaps(&stuff->dstX, n); + swaps(&stuff->dstY, n); + swapl(&stuff->shmseg, n); + swapl(&stuff->offset, n); + return ProcShmPutImage(client); +} + +static int +SProcShmGetImage(client) + ClientPtr client; +{ + register int n; + REQUEST(xShmGetImageReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xShmGetImageReq); + swapl(&stuff->drawable, n); + swaps(&stuff->x, n); + swaps(&stuff->y, n); + swaps(&stuff->width, n); + swaps(&stuff->height, n); + swapl(&stuff->planeMask, n); + swapl(&stuff->shmseg, n); + swapl(&stuff->offset, n); + return ProcShmGetImage(client); +} + +static int +SProcShmCreatePixmap(client) + ClientPtr client; +{ + register int n; + REQUEST(xShmCreatePixmapReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xShmCreatePixmapReq); + swapl(&stuff->pid, n); + swapl(&stuff->drawable, n); + swaps(&stuff->width, n); + swaps(&stuff->height, n); + swapl(&stuff->shmseg, n); + swapl(&stuff->offset, n); + return ProcShmCreatePixmap(client); +} + +static int +SProcShmDispatch (client) + register ClientPtr client; +{ + REQUEST(xReq); + switch (stuff->data) + { + case X_ShmQueryVersion: + return SProcShmQueryVersion(client); + case X_ShmAttach: + return SProcShmAttach(client); + case X_ShmDetach: + return SProcShmDetach(client); + case X_ShmPutImage: + return SProcShmPutImage(client); + case X_ShmGetImage: + return SProcShmGetImage(client); + case X_ShmCreatePixmap: + return SProcShmCreatePixmap(client); + default: + return BadRequest; + } +} diff --git a/xorg-server-1.4/Xext/shmint.h b/xorg-server-1.4/Xext/shmint.h new file mode 100644 index 0000000..fc056bc --- /dev/null +++ b/xorg-server-1.4/Xext/shmint.h @@ -0,0 +1,42 @@ +/* + * 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 _SHMINT_H_ +#define _SHMINT_H_ + +#define _XSHM_SERVER_ +#include + +#include "screenint.h" +#include "pixmap.h" +#include "gc.h" + +void +ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs); + +void +ShmSetPixmapFormat(ScreenPtr pScreen, int format); + +void +ShmRegisterFbFuncs(ScreenPtr pScreen); + +#endif /* _SHMINT_H_ */ diff --git a/xorg-server-1.4/Xext/sleepuntil.c b/xorg-server-1.4/Xext/sleepuntil.c new file mode 100644 index 0000000..f8cedbe --- /dev/null +++ b/xorg-server-1.4/Xext/sleepuntil.c @@ -0,0 +1,237 @@ +/* + * +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. + * + * Author: Keith Packard, MIT X Consortium + */ + +/* dixsleep.c - implement millisecond timeouts for X clients */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "sleepuntil.h" +#include +#include +#include "misc.h" +#include "windowstr.h" +#include "dixstruct.h" +#include "pixmapstr.h" +#include "scrnintstr.h" + +typedef struct _Sertafied { + struct _Sertafied *next; + TimeStamp revive; + ClientPtr pClient; + XID id; + void (*notifyFunc)( + ClientPtr /* client */, + pointer /* closure */ + ); + + pointer closure; +} SertafiedRec, *SertafiedPtr; + +static SertafiedPtr pPending; +static RESTYPE SertafiedResType; +static Bool BlockHandlerRegistered; +static int SertafiedGeneration; + +static void ClientAwaken( + ClientPtr /* client */, + pointer /* closure */ +); +static int SertafiedDelete( + pointer /* value */, + XID /* id */ +); +static void SertafiedBlockHandler( + pointer /* data */, + OSTimePtr /* wt */, + pointer /* LastSelectMask */ +); +static void SertafiedWakeupHandler( + pointer /* data */, + int /* i */, + pointer /* LastSelectMask */ +); + +_X_EXPORT int +ClientSleepUntil (client, revive, notifyFunc, closure) + ClientPtr client; + TimeStamp *revive; + void (*notifyFunc)( + ClientPtr /* client */, + pointer /* closure */); + pointer closure; +{ + SertafiedPtr pRequest, pReq, pPrev; + + if (SertafiedGeneration != serverGeneration) + { + SertafiedResType = CreateNewResourceType (SertafiedDelete); + if (!SertafiedResType) + return FALSE; + SertafiedGeneration = serverGeneration; + BlockHandlerRegistered = FALSE; + } + pRequest = (SertafiedPtr) xalloc (sizeof (SertafiedRec)); + if (!pRequest) + return FALSE; + pRequest->pClient = client; + pRequest->revive = *revive; + pRequest->id = FakeClientID (client->index); + pRequest->closure = closure; + if (!BlockHandlerRegistered) + { + if (!RegisterBlockAndWakeupHandlers (SertafiedBlockHandler, + SertafiedWakeupHandler, + (pointer) 0)) + { + xfree (pRequest); + return FALSE; + } + BlockHandlerRegistered = TRUE; + } + pRequest->notifyFunc = 0; + if (!AddResource (pRequest->id, SertafiedResType, (pointer) pRequest)) + return FALSE; + if (!notifyFunc) + notifyFunc = ClientAwaken; + pRequest->notifyFunc = notifyFunc; + /* Insert into time-ordered queue, with earliest activation time coming first. */ + pPrev = 0; + for (pReq = pPending; pReq; pReq = pReq->next) + { + if (CompareTimeStamps (pReq->revive, *revive) == LATER) + break; + pPrev = pReq; + } + if (pPrev) + pPrev->next = pRequest; + else + pPending = pRequest; + pRequest->next = pReq; + IgnoreClient (client); + return TRUE; +} + +static void +ClientAwaken (client, closure) + ClientPtr client; + pointer closure; +{ + if (!client->clientGone) + AttendClient (client); +} + + +static int +SertafiedDelete (value, id) + pointer value; + XID id; +{ + SertafiedPtr pRequest = (SertafiedPtr)value; + SertafiedPtr pReq, pPrev; + + pPrev = 0; + for (pReq = pPending; pReq; pPrev = pReq, pReq = pReq->next) + if (pReq == pRequest) + { + if (pPrev) + pPrev->next = pReq->next; + else + pPending = pReq->next; + break; + } + if (pRequest->notifyFunc) + (*pRequest->notifyFunc) (pRequest->pClient, pRequest->closure); + xfree (pRequest); + return TRUE; +} + +static void +SertafiedBlockHandler (data, wt, LastSelectMask) + pointer data; /* unused */ + OSTimePtr wt; /* wait time */ + pointer LastSelectMask; +{ + SertafiedPtr pReq, pNext; + unsigned long delay; + TimeStamp now; + + if (!pPending) + return; + now.milliseconds = GetTimeInMillis (); + now.months = currentTime.months; + if ((int) (now.milliseconds - currentTime.milliseconds) < 0) + now.months++; + for (pReq = pPending; pReq; pReq = pNext) + { + pNext = pReq->next; + if (CompareTimeStamps (pReq->revive, now) == LATER) + break; + FreeResource (pReq->id, RT_NONE); + + /* AttendClient() may have been called via the resource delete + * function so a client may have input to be processed and so + * set delay to 0 to prevent blocking in WaitForSomething(). + */ + AdjustWaitForDelay (wt, 0); + } + pReq = pPending; + if (!pReq) + return; + delay = pReq->revive.milliseconds - now.milliseconds; + AdjustWaitForDelay (wt, delay); +} + +static void +SertafiedWakeupHandler (data, i, LastSelectMask) + pointer data; + int i; + pointer LastSelectMask; +{ + SertafiedPtr pReq, pNext; + TimeStamp now; + + now.milliseconds = GetTimeInMillis (); + now.months = currentTime.months; + if ((int) (now.milliseconds - currentTime.milliseconds) < 0) + now.months++; + for (pReq = pPending; pReq; pReq = pNext) + { + pNext = pReq->next; + if (CompareTimeStamps (pReq->revive, now) == LATER) + break; + FreeResource (pReq->id, RT_NONE); + } + if (!pPending) + { + RemoveBlockAndWakeupHandlers (SertafiedBlockHandler, + SertafiedWakeupHandler, + (pointer) 0); + BlockHandlerRegistered = FALSE; + } +} diff --git a/xorg-server-1.4/Xext/sleepuntil.h b/xorg-server-1.4/Xext/sleepuntil.h new file mode 100644 index 0000000..a3618d9 --- /dev/null +++ b/xorg-server-1.4/Xext/sleepuntil.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2001 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _SLEEPUNTIL_H_ +#define _SLEEPUNTIL_H_ 1 + +#include "dix.h" + +extern int ClientSleepUntil( + ClientPtr client, + TimeStamp *revive, + void (*notifyFunc)( + ClientPtr /* client */, + pointer /* closure */ + ), + pointer Closure +); + +#endif diff --git a/xorg-server-1.4/Xext/sync.c b/xorg-server-1.4/Xext/sync.c new file mode 100644 index 0000000..d9b6a9f --- /dev/null +++ b/xorg-server-1.4/Xext/sync.c @@ -0,0 +1,2642 @@ +/* + +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 +make no representations about the suitability of this software +for any purpose. It is provided "as is" without express or implied warranty. + +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. + +*/ + +#define NEED_REPLIES +#define NEED_EVENTS +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include +#include +#include "misc.h" +#include "os.h" +#include "extnsionst.h" +#include "dixstruct.h" +#include "resource.h" +#include "opaque.h" +#define _SYNC_SERVER +#include +#include + +#include +#if !defined(WIN32) && !defined(Lynx) +#include +#endif + +#include "modinit.h" + +/* + * Local Global Variables + */ +static int SyncEventBase; +static int SyncErrorBase; +static RESTYPE RTCounter = 0; +static RESTYPE RTAwait; +static RESTYPE RTAlarm; +static RESTYPE RTAlarmClient; +static int SyncNumSystemCounters = 0; +static SyncCounter **SysCounterList = NULL; + +#define IsSystemCounter(pCounter) \ + (pCounter && (pCounter->client == NULL)) + +/* these are all the alarm attributes that pertain to the alarm's trigger */ +#define XSyncCAAllTrigger \ + (XSyncCACounter | XSyncCAValueType | XSyncCAValue | XSyncCATestType) + +static int +FreeAlarm( + pointer /* addr */, + XID /* id */ +); + +static int +FreeAlarmClient( + pointer /* value */, + XID /* id */ +); + +static int +FreeAwait( + pointer /* addr */, + XID /* id */ +); + +static void +ServertimeBracketValues( + pointer /* pCounter */, + CARD64 * /* pbracket_less */, + CARD64 * /* pbracket_greater */ +); + +static void +ServertimeQueryValue( + pointer /* pCounter */, + CARD64 * /* pValue_return */ +); + +static void +ServertimeWakeupHandler( + pointer /* env */, + int /* rc */, + pointer /* LastSelectMask */ +); + +static int +SyncInitTrigger( + ClientPtr /* client */, + SyncTrigger * /* pTrigger */, + XSyncCounter /* counter */, + Mask /* changes */ +); + +static void +SAlarmNotifyEvent( + xSyncAlarmNotifyEvent * /* from */, + xSyncAlarmNotifyEvent * /* to */ +); + +static void +SCounterNotifyEvent( + xSyncCounterNotifyEvent * /* from */, + xSyncCounterNotifyEvent * /* to */ +); + +static void +ServertimeBlockHandler( + pointer /* env */, + struct timeval ** /* wt */, + pointer /* LastSelectMask */ +); + +static int +SyncAddTriggerToCounter( + SyncTrigger * /* pTrigger */ +); + +extern void +SyncAlarmCounterDestroyed( + SyncTrigger * /* pTrigger */ +); + +static void +SyncAlarmTriggerFired( + SyncTrigger * /* pTrigger */ +); + +static void +SyncAwaitTriggerFired( + SyncTrigger * /* pTrigger */ +); + +static int +SyncChangeAlarmAttributes( + ClientPtr /* client */, + SyncAlarm * /* pAlarm */, + Mask /* mask */, + CARD32 * /* values */ +); + +static Bool +SyncCheckTriggerNegativeComparison( + SyncTrigger * /* pTrigger */, + CARD64 /* oldval */ +); + +static Bool +SyncCheckTriggerNegativeTransition( + SyncTrigger * /* pTrigger */, + CARD64 /* oldval */ +); + +static Bool +SyncCheckTriggerPositiveComparison( + SyncTrigger * /* pTrigger */, + CARD64 /* oldval */ +); + +static Bool +SyncCheckTriggerPositiveTransition( + SyncTrigger * /* pTrigger */, + CARD64 /* oldval */ +); + +static SyncCounter * +SyncCreateCounter( + ClientPtr /* client */, + XSyncCounter /* id */, + CARD64 /* initialvalue */ +); + +static void SyncComputeBracketValues( + SyncCounter * /* pCounter */, + Bool /* startOver */ +); + +static void +SyncDeleteTriggerFromCounter( + SyncTrigger * /* pTrigger */ +); + +static Bool +SyncEventSelectForAlarm( + SyncAlarm * /* pAlarm */, + ClientPtr /* client */, + Bool /* wantevents */ +); + +static void +SyncInitServerTime( + void +); + +static void +SyncInitIdleTime( + void +); + +static void +SyncResetProc( + ExtensionEntry * /* extEntry */ +); + +static void +SyncSendAlarmNotifyEvents( + SyncAlarm * /* pAlarm */ +); + +static void +SyncSendCounterNotifyEvents( + ClientPtr /* client */, + SyncAwait ** /* ppAwait */, + int /* num_events */ +); + +static DISPATCH_PROC(ProcSyncAwait); +static DISPATCH_PROC(ProcSyncChangeAlarm); +static DISPATCH_PROC(ProcSyncChangeCounter); +static DISPATCH_PROC(ProcSyncCreateAlarm); +static DISPATCH_PROC(ProcSyncCreateCounter); +static DISPATCH_PROC(ProcSyncDestroyAlarm); +static DISPATCH_PROC(ProcSyncDestroyCounter); +static DISPATCH_PROC(ProcSyncDispatch); +static DISPATCH_PROC(ProcSyncGetPriority); +static DISPATCH_PROC(ProcSyncInitialize); +static DISPATCH_PROC(ProcSyncListSystemCounters); +static DISPATCH_PROC(ProcSyncQueryAlarm); +static DISPATCH_PROC(ProcSyncQueryCounter); +static DISPATCH_PROC(ProcSyncSetCounter); +static DISPATCH_PROC(ProcSyncSetPriority); +static DISPATCH_PROC(SProcSyncAwait); +static DISPATCH_PROC(SProcSyncChangeAlarm); +static DISPATCH_PROC(SProcSyncChangeCounter); +static DISPATCH_PROC(SProcSyncCreateAlarm); +static DISPATCH_PROC(SProcSyncCreateCounter); +static DISPATCH_PROC(SProcSyncDestroyAlarm); +static DISPATCH_PROC(SProcSyncDestroyCounter); +static DISPATCH_PROC(SProcSyncDispatch); +static DISPATCH_PROC(SProcSyncGetPriority); +static DISPATCH_PROC(SProcSyncInitialize); +static DISPATCH_PROC(SProcSyncListSystemCounters); +static DISPATCH_PROC(SProcSyncQueryAlarm); +static DISPATCH_PROC(SProcSyncQueryCounter); +static DISPATCH_PROC(SProcSyncSetCounter); +static DISPATCH_PROC(SProcSyncSetPriority); + +/* Each counter maintains a simple linked list of triggers that are + * interested in the counter. The two functions below are used to + * delete and add triggers on this list. + */ +static void +SyncDeleteTriggerFromCounter(pTrigger) + SyncTrigger *pTrigger; +{ + SyncTriggerList *pCur; + SyncTriggerList *pPrev; + + /* pCounter needs to be stored in pTrigger before calling here. */ + + if (!pTrigger->pCounter) + return; + + pPrev = NULL; + pCur = pTrigger->pCounter->pTriglist; + + while (pCur) + { + if (pCur->pTrigger == pTrigger) + { + if (pPrev) + pPrev->next = pCur->next; + else + pTrigger->pCounter->pTriglist = pCur->next; + + xfree(pCur); + break; + } + + pPrev = pCur; + pCur = pCur->next; + } + + if (IsSystemCounter(pTrigger->pCounter)) + SyncComputeBracketValues(pTrigger->pCounter, /*startOver*/ TRUE); +} + + +static int +SyncAddTriggerToCounter(pTrigger) + SyncTrigger *pTrigger; +{ + SyncTriggerList *pCur; + + if (!pTrigger->pCounter) + return Success; + + /* don't do anything if it's already there */ + for (pCur = pTrigger->pCounter->pTriglist; pCur; pCur = pCur->next) + { + if (pCur->pTrigger == pTrigger) + return Success; + } + + if (!(pCur = (SyncTriggerList *)xalloc(sizeof(SyncTriggerList)))) + return BadAlloc; + + pCur->pTrigger = pTrigger; + pCur->next = pTrigger->pCounter->pTriglist; + pTrigger->pCounter->pTriglist = pCur; + + if (IsSystemCounter(pTrigger->pCounter)) + SyncComputeBracketValues(pTrigger->pCounter, /*startOver*/ TRUE); + + return Success; +} + + +/* Below are four possible functions that can be plugged into + * pTrigger->CheckTrigger, corresponding to the four possible + * test-types. These functions are called after the counter's + * value changes but are also passed the old counter value + * so they can inspect both the old and new values. + * (PositiveTransition and NegativeTransition need to see both + * pieces of information.) These functions return the truth value + * of the trigger. + * + * All of them include the condition pTrigger->pCounter == NULL. + * This is because the spec says that a trigger with a counter value + * of None is always TRUE. + */ + +static Bool +SyncCheckTriggerPositiveComparison(pTrigger, oldval) + SyncTrigger *pTrigger; + CARD64 oldval; +{ + return (pTrigger->pCounter == NULL || + XSyncValueGreaterOrEqual(pTrigger->pCounter->value, + pTrigger->test_value)); +} + +static Bool +SyncCheckTriggerNegativeComparison(pTrigger, oldval) + SyncTrigger *pTrigger; + CARD64 oldval; +{ + return (pTrigger->pCounter == NULL || + XSyncValueLessOrEqual(pTrigger->pCounter->value, + pTrigger->test_value)); +} + +static Bool +SyncCheckTriggerPositiveTransition(pTrigger, oldval) + SyncTrigger *pTrigger; + CARD64 oldval; +{ + return (pTrigger->pCounter == NULL || + (XSyncValueLessThan(oldval, pTrigger->test_value) && + XSyncValueGreaterOrEqual(pTrigger->pCounter->value, + pTrigger->test_value))); +} + +static Bool +SyncCheckTriggerNegativeTransition(pTrigger, oldval) + SyncTrigger *pTrigger; + CARD64 oldval; +{ + return (pTrigger->pCounter == NULL || + (XSyncValueGreaterThan(oldval, pTrigger->test_value) && + XSyncValueLessOrEqual(pTrigger->pCounter->value, + pTrigger->test_value))); +} + + + +static int +SyncInitTrigger(client, pTrigger, counter, changes) + ClientPtr client; /* so we can set errorValue */ + SyncTrigger *pTrigger; + XSyncCounter counter; + Mask changes; +{ + SyncCounter *pCounter = pTrigger->pCounter; + int status; + Bool newcounter = FALSE; + + if (changes & XSyncCACounter) + { + if (counter == None) + pCounter = NULL; + else if (!(pCounter = (SyncCounter *)SecurityLookupIDByType( + client, counter, RTCounter, DixReadAccess))) + { + client->errorValue = counter; + return SyncErrorBase + XSyncBadCounter; + } + if (pCounter != pTrigger->pCounter) + { /* new counter for trigger */ + SyncDeleteTriggerFromCounter(pTrigger); + pTrigger->pCounter = pCounter; + newcounter = TRUE; + } + } + + /* if system counter, ask it what the current value is */ + + if (IsSystemCounter(pCounter)) + { + (*pCounter->pSysCounterInfo->QueryValue) ((pointer) pCounter, + &pCounter->value); + } + + if (changes & XSyncCAValueType) + { + if (pTrigger->value_type != XSyncRelative && + pTrigger->value_type != XSyncAbsolute) + { + client->errorValue = pTrigger->value_type; + return BadValue; + } + } + + if (changes & XSyncCATestType) + { + if (pTrigger->test_type != XSyncPositiveTransition && + pTrigger->test_type != XSyncNegativeTransition && + pTrigger->test_type != XSyncPositiveComparison && + pTrigger->test_type != XSyncNegativeComparison) + { + client->errorValue = pTrigger->test_type; + return BadValue; + } + /* select appropriate CheckTrigger function */ + + switch (pTrigger->test_type) + { + case XSyncPositiveTransition: + pTrigger->CheckTrigger = SyncCheckTriggerPositiveTransition; + break; + case XSyncNegativeTransition: + pTrigger->CheckTrigger = SyncCheckTriggerNegativeTransition; + break; + case XSyncPositiveComparison: + pTrigger->CheckTrigger = SyncCheckTriggerPositiveComparison; + break; + case XSyncNegativeComparison: + pTrigger->CheckTrigger = SyncCheckTriggerNegativeComparison; + break; + } + } + + if (changes & (XSyncCAValueType | XSyncCAValue)) + { + if (pTrigger->value_type == XSyncAbsolute) + pTrigger->test_value = pTrigger->wait_value; + else /* relative */ + { + Bool overflow; + if (pCounter == NULL) + return BadMatch; + + XSyncValueAdd(&pTrigger->test_value, pCounter->value, + pTrigger->wait_value, &overflow); + if (overflow) + { + client->errorValue = XSyncValueHigh32(pTrigger->wait_value); + return BadValue; + } + } + } + + /* we wait until we're sure there are no errors before registering + * a new counter on a trigger + */ + if (newcounter) + { + if ((status = SyncAddTriggerToCounter(pTrigger)) != Success) + return status; + } + else if (IsSystemCounter(pCounter)) + { + SyncComputeBracketValues(pCounter, /*startOver*/ TRUE); + } + + return Success; +} + +/* AlarmNotify events happen in response to actions taken on an Alarm or + * the counter used by the alarm. AlarmNotify may be sent to multiple + * clients. The alarm maintains a list of clients interested in events. + */ +static void +SyncSendAlarmNotifyEvents(pAlarm) + SyncAlarm *pAlarm; +{ + SyncAlarmClientList *pcl; + xSyncAlarmNotifyEvent ane; + SyncTrigger *pTrigger = &pAlarm->trigger; + + UpdateCurrentTime(); + + ane.type = SyncEventBase + XSyncAlarmNotify; + ane.kind = XSyncAlarmNotify; + ane.sequenceNumber = pAlarm->client->sequence; + ane.alarm = pAlarm->alarm_id; + if (pTrigger->pCounter) + { + ane.counter_value_hi = XSyncValueHigh32(pTrigger->pCounter->value); + ane.counter_value_lo = XSyncValueLow32(pTrigger->pCounter->value); + } + else + { /* XXX what else can we do if there's no counter? */ + ane.counter_value_hi = ane.counter_value_lo = 0; + } + + ane.alarm_value_hi = XSyncValueHigh32(pTrigger->test_value); + ane.alarm_value_lo = XSyncValueLow32(pTrigger->test_value); + ane.time = currentTime.milliseconds; + ane.state = pAlarm->state; + + /* send to owner */ + if (pAlarm->events && !pAlarm->client->clientGone) + WriteEventsToClient(pAlarm->client, 1, (xEvent *) &ane); + + /* send to other interested clients */ + for (pcl = pAlarm->pEventClients; pcl; pcl = pcl->next) + { + if (!pAlarm->client->clientGone) + { + ane.sequenceNumber = pcl->client->sequence; + WriteEventsToClient(pcl->client, 1, (xEvent *) &ane); + } + } +} + + +/* CounterNotify events only occur in response to an Await. The events + * go only to the Awaiting client. + */ +static void +SyncSendCounterNotifyEvents(client, ppAwait, num_events) + ClientPtr client; + SyncAwait **ppAwait; + int num_events; +{ + xSyncCounterNotifyEvent *pEvents, *pev; + int i; + + if (client->clientGone) + return; + pev = pEvents = (xSyncCounterNotifyEvent *) + ALLOCATE_LOCAL(num_events * sizeof(xSyncCounterNotifyEvent)); + if (!pEvents) + return; + UpdateCurrentTime(); + for (i = 0; i < num_events; i++, ppAwait++, pev++) + { + SyncTrigger *pTrigger = &(*ppAwait)->trigger; + pev->type = SyncEventBase + XSyncCounterNotify; + pev->kind = XSyncCounterNotify; + pev->sequenceNumber = client->sequence; + pev->counter = pTrigger->pCounter->id; + pev->wait_value_lo = XSyncValueLow32(pTrigger->test_value); + pev->wait_value_hi = XSyncValueHigh32(pTrigger->test_value); + pev->counter_value_lo = XSyncValueLow32(pTrigger->pCounter->value); + pev->counter_value_hi = XSyncValueHigh32(pTrigger->pCounter->value); + pev->time = currentTime.milliseconds; + pev->count = num_events - i - 1; /* events remaining */ + pev->destroyed = pTrigger->pCounter->beingDestroyed; + } + /* swapping will be taken care of by this */ + WriteEventsToClient(client, num_events, (xEvent *)pEvents); + DEALLOCATE_LOCAL(pEvents); +} + + +/* This function is called when an alarm's counter is destroyed. + * It is plugged into pTrigger->CounterDestroyed (for alarm triggers). + */ +void +SyncAlarmCounterDestroyed(pTrigger) + SyncTrigger *pTrigger; +{ + SyncAlarm *pAlarm = (SyncAlarm *)pTrigger; + + pAlarm->state = XSyncAlarmInactive; + SyncSendAlarmNotifyEvents(pAlarm); + pTrigger->pCounter = NULL; +} + + +/* This function is called when an alarm "goes off." + * It is plugged into pTrigger->TriggerFired (for alarm triggers). + */ +static void +SyncAlarmTriggerFired(pTrigger) + SyncTrigger *pTrigger; +{ + SyncAlarm *pAlarm = (SyncAlarm *)pTrigger; + CARD64 new_test_value; + + /* no need to check alarm unless it's active */ + if (pAlarm->state != XSyncAlarmActive) + return; + + /* " if the counter value is None, or if the delta is 0 and + * the test-type is PositiveComparison or NegativeComparison, + * no change is made to value (test-value) and the alarm + * state is changed to Inactive before the event is generated." + */ + if (pAlarm->trigger.pCounter == NULL + || (XSyncValueIsZero(pAlarm->delta) + && (pAlarm->trigger.test_type == XSyncPositiveComparison + || pAlarm->trigger.test_type == XSyncNegativeComparison))) + pAlarm->state = XSyncAlarmInactive; + + new_test_value = pAlarm->trigger.test_value; + + if (pAlarm->state == XSyncAlarmActive) + { + Bool overflow; + CARD64 oldvalue; + SyncTrigger *paTrigger = &pAlarm->trigger; + + /* "The alarm is updated by repeatedly adding delta to the + * value of the trigger and re-initializing it until it + * becomes FALSE." + */ + oldvalue = paTrigger->test_value; + + /* XXX really should do something smarter here */ + + do + { + XSyncValueAdd(&paTrigger->test_value, paTrigger->test_value, + pAlarm->delta, &overflow); + } while (!overflow && + (*paTrigger->CheckTrigger)(paTrigger, + paTrigger->pCounter->value)); + + new_test_value = paTrigger->test_value; + paTrigger->test_value = oldvalue; + + /* "If this update would cause value to fall outside the range + * for an INT64...no change is made to value (test-value) and + * the alarm state is changed to Inactive before the event is + * generated." + */ + if (overflow) + { + new_test_value = oldvalue; + pAlarm->state = XSyncAlarmInactive; + } + } + /* The AlarmNotify event has to have the "new state of the alarm" + * which we can't be sure of until this point. However, it has + * to have the "old" trigger test value. That's the reason for + * all the newvalue/oldvalue shuffling above. After we send the + * events, give the trigger its new test value. + */ + SyncSendAlarmNotifyEvents(pAlarm); + pTrigger->test_value = new_test_value; +} + + +/* This function is called when an Await unblocks, either as a result + * of the trigger firing OR the counter being destroyed. + * It goes into pTrigger->TriggerFired AND pTrigger->CounterDestroyed + * (for Await triggers). + */ +static void +SyncAwaitTriggerFired(pTrigger) + SyncTrigger *pTrigger; +{ + SyncAwait *pAwait = (SyncAwait *)pTrigger; + int numwaits; + SyncAwaitUnion *pAwaitUnion; + SyncAwait **ppAwait; + int num_events = 0; + + pAwaitUnion = (SyncAwaitUnion *)pAwait->pHeader; + numwaits = pAwaitUnion->header.num_waitconditions; + ppAwait = (SyncAwait **)ALLOCATE_LOCAL(numwaits * sizeof(SyncAwait *)); + if (!ppAwait) + goto bail; + + pAwait = &(pAwaitUnion+1)->await; + + /* "When a client is unblocked, all the CounterNotify events for + * the Await request are generated contiguously. If count is 0 + * there are no more events to follow for this request. If + * count is n, there are at least n more events to follow." + * + * Thus, it is best to find all the counters for which events + * need to be sent first, so that an accurate count field can + * be stored in the events. + */ + for ( ; numwaits; numwaits--, pAwait++) + { + CARD64 diff; + Bool overflow, diffgreater, diffequal; + + /* "A CounterNotify event with the destroyed flag set to TRUE is + * always generated if the counter for one of the triggers is + * destroyed." + */ + if (pAwait->trigger.pCounter->beingDestroyed) + { + ppAwait[num_events++] = pAwait; + continue; + } + + /* "The difference between the counter and the test value is + * calculated by subtracting the test value from the value of + * the counter." + */ + XSyncValueSubtract(&diff, pAwait->trigger.pCounter->value, + pAwait->trigger.test_value, &overflow); + + /* "If the difference lies outside the range for an INT64, an + * event is not generated." + */ + if (overflow) + continue; + diffgreater = XSyncValueGreaterThan(diff, pAwait->event_threshold); + diffequal = XSyncValueEqual(diff, pAwait->event_threshold); + + /* "If the test-type is PositiveTransition or + * PositiveComparison, a CounterNotify event is generated if + * the difference is at least event-threshold. If the test-type + * is NegativeTransition or NegativeComparison, a CounterNotify + * event is generated if the difference is at most + * event-threshold." + */ + + if ( ((pAwait->trigger.test_type == XSyncPositiveComparison || + pAwait->trigger.test_type == XSyncPositiveTransition) + && (diffgreater || diffequal)) + || + ((pAwait->trigger.test_type == XSyncNegativeComparison || + pAwait->trigger.test_type == XSyncNegativeTransition) + && (!diffgreater) /* less or equal */ + ) + ) + { + ppAwait[num_events++] = pAwait; + } + } + if (num_events) + SyncSendCounterNotifyEvents(pAwaitUnion->header.client, ppAwait, + num_events); + DEALLOCATE_LOCAL(ppAwait); + +bail: + /* unblock the client */ + AttendClient(pAwaitUnion->header.client); + /* delete the await */ + FreeResource(pAwaitUnion->header.delete_id, RT_NONE); +} + + +/* This function should always be used to change a counter's value so that + * any triggers depending on the counter will be checked. + */ +void +SyncChangeCounter(pCounter, newval) + SyncCounter *pCounter; + CARD64 newval; +{ + SyncTriggerList *ptl, *pnext; + CARD64 oldval; + + oldval = pCounter->value; + pCounter->value = newval; + + /* run through triggers to see if any become true */ + for (ptl = pCounter->pTriglist; ptl; ptl = pnext) + { + pnext = ptl->next; + if ((*ptl->pTrigger->CheckTrigger)(ptl->pTrigger, oldval)) + (*ptl->pTrigger->TriggerFired)(ptl->pTrigger); + } + + if (IsSystemCounter(pCounter)) + { + SyncComputeBracketValues(pCounter, /* startOver */ FALSE); + } +} + + +/* loosely based on dix/events.c/EventSelectForWindow */ +static Bool +SyncEventSelectForAlarm(pAlarm, client, wantevents) + SyncAlarm *pAlarm; + ClientPtr client; + Bool wantevents; +{ + SyncAlarmClientList *pClients; + + if (client == pAlarm->client) /* alarm owner */ + { + pAlarm->events = wantevents; + return Success; + } + + /* see if the client is already on the list (has events selected) */ + + for (pClients = pAlarm->pEventClients; pClients; + pClients = pClients->next) + { + if (pClients->client == client) + { + /* client's presence on the list indicates desire for + * events. If the client doesn't want events, remove it + * from the list. If the client does want events, do + * nothing, since it's already got them. + */ + if (!wantevents) + { + FreeResource(pClients->delete_id, RT_NONE); + } + return Success; + } + } + + /* if we get here, this client does not currently have + * events selected on the alarm + */ + + if (!wantevents) + /* client doesn't want events, and we just discovered that it + * doesn't have them, so there's nothing to do. + */ + return Success; + + /* add new client to pAlarm->pEventClients */ + + pClients = (SyncAlarmClientList *) xalloc(sizeof(SyncAlarmClientList)); + if (!pClients) + return BadAlloc; + + /* register it as a resource so it will be cleaned up + * if the client dies + */ + + pClients->delete_id = FakeClientID(client->index); + if (!AddResource(pClients->delete_id, RTAlarmClient, pAlarm)) + { + xfree(pClients); + return BadAlloc; + } + + /* link it into list after we know all the allocations succeed */ + + pClients->next = pAlarm->pEventClients; + pAlarm->pEventClients = pClients; + pClients->client = client; + return Success; +} + +/* + * ** SyncChangeAlarmAttributes ** This is used by CreateAlarm and ChangeAlarm + */ +static int +SyncChangeAlarmAttributes(client, pAlarm, mask, values) + ClientPtr client; + SyncAlarm *pAlarm; + Mask mask; + CARD32 *values; +{ + int status; + XSyncCounter counter; + Mask origmask = mask; + + counter = pAlarm->trigger.pCounter ? pAlarm->trigger.pCounter->id : None; + + while (mask) + { + int index2 = lowbit(mask); + mask &= ~index2; + switch (index2) + { + case XSyncCACounter: + mask &= ~XSyncCACounter; + /* sanity check in SyncInitTrigger */ + counter = *values++; + break; + + case XSyncCAValueType: + mask &= ~XSyncCAValueType; + /* sanity check in SyncInitTrigger */ + pAlarm->trigger.value_type = *values++; + break; + + case XSyncCAValue: + mask &= ~XSyncCAValue; + XSyncIntsToValue(&pAlarm->trigger.wait_value, values[1], values[0]); + values += 2; + break; + + case XSyncCATestType: + mask &= ~XSyncCATestType; + /* sanity check in SyncInitTrigger */ + pAlarm->trigger.test_type = *values++; + break; + + case XSyncCADelta: + mask &= ~XSyncCADelta; + XSyncIntsToValue(&pAlarm->delta, values[1], values[0]); + values += 2; + break; + + case XSyncCAEvents: + mask &= ~XSyncCAEvents; + if ((*values != xTrue) && (*values != xFalse)) + { + client->errorValue = *values; + return BadValue; + } + status = SyncEventSelectForAlarm(pAlarm, client, + (Bool)(*values++)); + if (status != Success) + return status; + break; + + default: + client->errorValue = mask; + return BadValue; + } + } + + /* "If the test-type is PositiveComparison or PositiveTransition + * and delta is less than zero, or if the test-type is + * NegativeComparison or NegativeTransition and delta is + * greater than zero, a Match error is generated." + */ + if (origmask & (XSyncCADelta|XSyncCATestType)) + { + CARD64 zero; + XSyncIntToValue(&zero, 0); + if ((((pAlarm->trigger.test_type == XSyncPositiveComparison) || + (pAlarm->trigger.test_type == XSyncPositiveTransition)) + && XSyncValueLessThan(pAlarm->delta, zero)) + || + (((pAlarm->trigger.test_type == XSyncNegativeComparison) || + (pAlarm->trigger.test_type == XSyncNegativeTransition)) + && XSyncValueGreaterThan(pAlarm->delta, zero)) + ) + { + return BadMatch; + } + } + + /* postpone this until now, when we're sure nothing else can go wrong */ + if ((status = SyncInitTrigger(client, &pAlarm->trigger, counter, + origmask & XSyncCAAllTrigger)) != Success) + return status; + + /* XXX spec does not really say to do this - needs clarification */ + pAlarm->state = XSyncAlarmActive; + return Success; +} + + +static SyncCounter * +SyncCreateCounter(client, id, initialvalue) + ClientPtr client; + XSyncCounter id; + CARD64 initialvalue; +{ + SyncCounter *pCounter; + + if (!(pCounter = (SyncCounter *) xalloc(sizeof(SyncCounter)))) + return (SyncCounter *)NULL; + + if (!AddResource(id, RTCounter, (pointer) pCounter)) + { + xfree((pointer) pCounter); + return (SyncCounter *)NULL; + } + + pCounter->client = client; + pCounter->id = id; + pCounter->value = initialvalue; + pCounter->pTriglist = NULL; + pCounter->beingDestroyed = FALSE; + pCounter->pSysCounterInfo = NULL; + return pCounter; +} + +static int FreeCounter( + pointer /*env*/, + XID /*id*/ +); + +/* + * ***** System Counter utilities + */ + +pointer +SyncCreateSystemCounter(name, initial, resolution, counterType, + QueryValue, BracketValues) + char *name; + CARD64 initial; + CARD64 resolution; + SyncCounterType counterType; + void (*QueryValue) ( + pointer /* pCounter */, + CARD64 * /* pValue_return */); + void (*BracketValues) ( + pointer /* pCounter */, + CARD64 * /* pbracket_less */, + CARD64 * /* pbracket_greater */); +{ + SyncCounter *pCounter; + + SysCounterList = (SyncCounter **)xrealloc(SysCounterList, + (SyncNumSystemCounters+1)*sizeof(SyncCounter *)); + if (!SysCounterList) + return (pointer)NULL; + + /* this function may be called before SYNC has been initialized, so we + * have to make sure RTCounter is created. + */ + if (RTCounter == 0) + { + RTCounter = CreateNewResourceType(FreeCounter); + if (RTCounter == 0) + { + return (pointer)NULL; + } + } + + pCounter = SyncCreateCounter((ClientPtr)NULL, FakeClientID(0), initial); + + if (pCounter) + { + SysCounterInfo *psci; + + psci = (SysCounterInfo *)xalloc(sizeof(SysCounterInfo)); + if (!psci) + { + FreeResource(pCounter->id, RT_NONE); + return (pointer) pCounter; + } + pCounter->pSysCounterInfo = psci; + psci->name = name; + psci->resolution = resolution; + psci->counterType = counterType; + psci->QueryValue = QueryValue; + psci->BracketValues = BracketValues; + XSyncMaxValue(&psci->bracket_greater); + XSyncMinValue(&psci->bracket_less); + SysCounterList[SyncNumSystemCounters++] = pCounter; + } + return (pointer) pCounter; +} + +void +SyncDestroySystemCounter(pSysCounter) + pointer pSysCounter; +{ + SyncCounter *pCounter = (SyncCounter *)pSysCounter; + FreeResource(pCounter->id, RT_NONE); +} + +static void +SyncComputeBracketValues(pCounter, startOver) + SyncCounter *pCounter; + Bool startOver; +{ + SyncTriggerList *pCur; + SyncTrigger *pTrigger; + SysCounterInfo *psci; + CARD64 *pnewgtval = NULL; + CARD64 *pnewltval = NULL; + SyncCounterType ct; + + if (!pCounter) + return; + + psci = pCounter->pSysCounterInfo; + ct = pCounter->pSysCounterInfo->counterType; + if (ct == XSyncCounterNeverChanges) + return; + + if (startOver) + { + XSyncMaxValue(&psci->bracket_greater); + XSyncMinValue(&psci->bracket_less); + } + + for (pCur = pCounter->pTriglist; pCur; pCur = pCur->next) + { + pTrigger = pCur->pTrigger; + + if (pTrigger->test_type == XSyncPositiveComparison && + ct != XSyncCounterNeverIncreases) + { + if (XSyncValueLessThan(pCounter->value, pTrigger->test_value) && + XSyncValueLessThan(pTrigger->test_value, + psci->bracket_greater)) + { + psci->bracket_greater = pTrigger->test_value; + pnewgtval = &psci->bracket_greater; + } + } + else if (pTrigger->test_type == XSyncNegativeComparison && + ct != XSyncCounterNeverDecreases) + { + if (XSyncValueGreaterThan(pCounter->value, pTrigger->test_value) && + XSyncValueGreaterThan(pTrigger->test_value, + psci->bracket_less)) + { + psci->bracket_less = pTrigger->test_value; + pnewltval = &psci->bracket_less; + } + } + else if ( (pTrigger->test_type == XSyncPositiveTransition && + ct != XSyncCounterNeverIncreases) + || + (pTrigger->test_type == XSyncNegativeTransition && + ct != XSyncCounterNeverDecreases) + ) + { + if (XSyncValueLessThan(pCounter->value, pTrigger->test_value)) + { + if (XSyncValueLessThan(pTrigger->test_value, + psci->bracket_greater)) + { + psci->bracket_greater = pTrigger->test_value; + pnewgtval = &psci->bracket_greater; + } + else + if (XSyncValueGreaterThan(pTrigger->test_value, + psci->bracket_less)) + { + psci->bracket_less = pTrigger->test_value; + pnewltval = &psci->bracket_less; + } + } + } + } /* end for each trigger */ + + if (pnewgtval || pnewltval) + { + (*psci->BracketValues)((pointer)pCounter, pnewltval, pnewgtval); + } +} + +/* + * ***** Resource delete functions + */ + +/* ARGSUSED */ +static int +FreeAlarm(addr, id) + pointer addr; + XID id; +{ + SyncAlarm *pAlarm = (SyncAlarm *) addr; + + pAlarm->state = XSyncAlarmDestroyed; + + SyncSendAlarmNotifyEvents(pAlarm); + + /* delete event selections */ + + while (pAlarm->pEventClients) + FreeResource(pAlarm->pEventClients->delete_id, RT_NONE); + + SyncDeleteTriggerFromCounter(&pAlarm->trigger); + + xfree(pAlarm); + return Success; +} + + +/* + * ** Cleanup after the destruction of a Counter + */ +/* ARGSUSED */ +static int +FreeCounter(env, id) + pointer env; + XID id; +{ + SyncCounter *pCounter = (SyncCounter *) env; + SyncTriggerList *ptl, *pnext; + + pCounter->beingDestroyed = TRUE; + /* tell all the counter's triggers that the counter has been destroyed */ + for (ptl = pCounter->pTriglist; ptl; ptl = pnext) + { + (*ptl->pTrigger->CounterDestroyed)(ptl->pTrigger); + pnext = ptl->next; + xfree(ptl); /* destroy the trigger list as we go */ + } + if (IsSystemCounter(pCounter)) + { + int i, found = 0; + + xfree(pCounter->pSysCounterInfo); + + /* find the counter in the list of system counters and remove it */ + + if (SysCounterList) + { + for (i = 0; i < SyncNumSystemCounters; i++) + { + if (SysCounterList[i] == pCounter) + { + found = i; + break; + } + } + if (found < (SyncNumSystemCounters-1)) + { + for (i = found; i < SyncNumSystemCounters-1; i++) + { + SysCounterList[i] = SysCounterList[i+1]; + } + } + } + SyncNumSystemCounters--; + } + xfree(pCounter); + return Success; +} + +/* + * ** Cleanup after Await + */ +/* ARGSUSED */ +static int +FreeAwait(addr, id) + pointer addr; + XID id; +{ + SyncAwaitUnion *pAwaitUnion = (SyncAwaitUnion *) addr; + SyncAwait *pAwait; + int numwaits; + + pAwait = &(pAwaitUnion+1)->await; /* first await on list */ + + /* remove triggers from counters */ + + for (numwaits = pAwaitUnion->header.num_waitconditions; numwaits; + numwaits--, pAwait++) + { + /* If the counter is being destroyed, FreeCounter will delete + * the trigger list itself, so don't do it here. + */ + SyncCounter *pCounter = pAwait->trigger.pCounter; + if (pCounter && !pCounter->beingDestroyed) + SyncDeleteTriggerFromCounter(&pAwait->trigger); + } + xfree(pAwaitUnion); + return Success; +} + +/* loosely based on dix/events.c/OtherClientGone */ +static int +FreeAlarmClient(value, id) + pointer value; /* must conform to DeleteType */ + XID id; +{ + SyncAlarm *pAlarm = (SyncAlarm *)value; + SyncAlarmClientList *pCur, *pPrev; + + for (pPrev = NULL, pCur = pAlarm->pEventClients; + pCur; + pPrev = pCur, pCur = pCur->next) + { + if (pCur->delete_id == id) + { + if (pPrev) + pPrev->next = pCur->next; + else + pAlarm->pEventClients = pCur->next; + xfree(pCur); + return(Success); + } + } + FatalError("alarm client not on event list"); + /*NOTREACHED*/ +} + + +/* + * ***** Proc functions + */ + + +/* + * ** Initialize the extension + */ +static int +ProcSyncInitialize(client) + ClientPtr client; +{ + xSyncInitializeReply rep; + int n; + + REQUEST_SIZE_MATCH(xSyncInitializeReq); + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.majorVersion = SYNC_MAJOR_VERSION; + rep.minorVersion = SYNC_MINOR_VERSION; + rep.length = 0; + + if (client->swapped) + { + swaps(&rep.sequenceNumber, n); + } + WriteToClient(client, sizeof(rep), (char *) &rep); + return (client->noClientException); +} + +/* + * ** Get list of system counters available through the extension + */ +static int +ProcSyncListSystemCounters(client) + ClientPtr client; +{ + xSyncListSystemCountersReply rep; + int i, len; + xSyncSystemCounter *list = NULL, *walklist = NULL; + + REQUEST_SIZE_MATCH(xSyncListSystemCountersReq); + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.nCounters = SyncNumSystemCounters; + + for (i = len = 0; i < SyncNumSystemCounters; i++) + { + char *name = SysCounterList[i]->pSysCounterInfo->name; + /* pad to 4 byte boundary */ + len += (sz_xSyncSystemCounter + strlen(name) + 3) & ~3; + } + + if (len) + { + walklist = list = (xSyncSystemCounter *) ALLOCATE_LOCAL(len); + if (!list) + return BadAlloc; + } + + rep.length = len >> 2; + + if (client->swapped) + { + register char n; + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swapl(&rep.nCounters, n); + } + + for (i = 0; i < SyncNumSystemCounters; i++) + { + int namelen; + char *pname_in_reply; + SysCounterInfo *psci = SysCounterList[i]->pSysCounterInfo; + + walklist->counter = SysCounterList[i]->id; + walklist->resolution_hi = XSyncValueHigh32(psci->resolution); + walklist->resolution_lo = XSyncValueLow32(psci->resolution); + namelen = strlen(psci->name); + walklist->name_length = namelen; + + if (client->swapped) + { + register char n; + swapl(&walklist->counter, n); + swapl(&walklist->resolution_hi, n); + swapl(&walklist->resolution_lo, n); + swaps(&walklist->name_length, n); + } + + pname_in_reply = ((char *)walklist) + sz_xSyncSystemCounter; + strncpy(pname_in_reply, psci->name, namelen); + walklist = (xSyncSystemCounter *) (((char *)walklist) + + ((sz_xSyncSystemCounter + namelen + 3) & ~3)); + } + + WriteToClient(client, sizeof(rep), (char *) &rep); + if (len) + { + WriteToClient(client, len, (char *) list); + DEALLOCATE_LOCAL(list); + } + + return (client->noClientException); +} + +/* + * ** Set client Priority + */ +static int +ProcSyncSetPriority(client) + ClientPtr client; +{ + REQUEST(xSyncSetPriorityReq); + ClientPtr priorityclient; + int rc; + + REQUEST_SIZE_MATCH(xSyncSetPriorityReq); + + if (stuff->id == None) + priorityclient = client; + else { + rc = dixLookupClient(&priorityclient, stuff->id, client, + DixUnknownAccess); + if (rc != Success) + return rc; + } + + if (priorityclient->priority != stuff->priority) + { + priorityclient->priority = stuff->priority; + + /* The following will force the server back into WaitForSomething + * so that the change in this client's priority is immediately + * reflected. + */ + isItTimeToYield = TRUE; + dispatchException |= DE_PRIORITYCHANGE; + } + return Success; +} + +/* + * ** Get client Priority + */ +static int +ProcSyncGetPriority(client) + ClientPtr client; +{ + REQUEST(xSyncGetPriorityReq); + xSyncGetPriorityReply rep; + ClientPtr priorityclient; + int rc; + + REQUEST_SIZE_MATCH(xSyncGetPriorityReq); + + if (stuff->id == None) + priorityclient = client; + else { + rc = dixLookupClient(&priorityclient, stuff->id, client, + DixUnknownAccess); + if (rc != Success) + return rc; + } + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.priority = priorityclient->priority; + + if (client->swapped) + { + register char n; + swaps(&rep.sequenceNumber, n); + swapl(&rep.priority, n); + } + + WriteToClient(client, sizeof(xSyncGetPriorityReply), (char *) &rep); + + return (client->noClientException); +} + +/* + * ** Create a new counter + */ +static int +ProcSyncCreateCounter(client) + ClientPtr client; +{ + REQUEST(xSyncCreateCounterReq); + CARD64 initial; + + REQUEST_SIZE_MATCH(xSyncCreateCounterReq); + + LEGAL_NEW_RESOURCE(stuff->cid, client); + + XSyncIntsToValue(&initial, stuff->initial_value_lo, stuff->initial_value_hi); + if (!SyncCreateCounter(client, stuff->cid, initial)) + return BadAlloc; + + return (client->noClientException); +} + +/* + * ** Set Counter value + */ +static int +ProcSyncSetCounter(client) + ClientPtr client; +{ + REQUEST(xSyncSetCounterReq); + SyncCounter *pCounter; + CARD64 newvalue; + + REQUEST_SIZE_MATCH(xSyncSetCounterReq); + + pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->cid, + RTCounter, DixWriteAccess); + if (pCounter == NULL) + { + client->errorValue = stuff->cid; + return SyncErrorBase + XSyncBadCounter; + } + + if (IsSystemCounter(pCounter)) + { + client->errorValue = stuff->cid; + return BadAccess; + } + + XSyncIntsToValue(&newvalue, stuff->value_lo, stuff->value_hi); + SyncChangeCounter(pCounter, newvalue); + return Success; +} + +/* + * ** Change Counter value + */ +static int +ProcSyncChangeCounter(client) + ClientPtr client; +{ + REQUEST(xSyncChangeCounterReq); + SyncCounter *pCounter; + CARD64 newvalue; + Bool overflow; + + REQUEST_SIZE_MATCH(xSyncChangeCounterReq); + + pCounter = (SyncCounter *) SecurityLookupIDByType(client, stuff->cid, + RTCounter, DixWriteAccess); + if (pCounter == NULL) + { + client->errorValue = stuff->cid; + return SyncErrorBase + XSyncBadCounter; + } + + if (IsSystemCounter(pCounter)) + { + client->errorValue = stuff->cid; + return BadAccess; + } + + XSyncIntsToValue(&newvalue, stuff->value_lo, stuff->value_hi); + XSyncValueAdd(&newvalue, pCounter->value, newvalue, &overflow); + if (overflow) + { + /* XXX 64 bit value can't fit in 32 bits; do the best we can */ + client->errorValue = stuff->value_hi; + return BadValue; + } + SyncChangeCounter(pCounter, newvalue); + return Success; +} + +/* + * ** Destroy a counter + */ +static int +ProcSyncDestroyCounter(client) + ClientPtr client; +{ + REQUEST(xSyncDestroyCounterReq); + SyncCounter *pCounter; + + REQUEST_SIZE_MATCH(xSyncDestroyCounterReq); + + pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->counter, + RTCounter, DixDestroyAccess); + if (pCounter == NULL) + { + client->errorValue = stuff->counter; + return SyncErrorBase + XSyncBadCounter; + } + if (IsSystemCounter(pCounter)) + { + client->errorValue = stuff->counter; + return BadAccess; + } + FreeResource(pCounter->id, RT_NONE); + return Success; +} + + +/* + * ** Await + */ +static int +ProcSyncAwait(client) + ClientPtr client; +{ + REQUEST(xSyncAwaitReq); + int len, items; + int i; + xSyncWaitCondition *pProtocolWaitConds; + SyncAwaitUnion *pAwaitUnion; + SyncAwait *pAwait; + int status; + + REQUEST_AT_LEAST_SIZE(xSyncAwaitReq); + + len = client->req_len << 2; + len -= sz_xSyncAwaitReq; + items = len / sz_xSyncWaitCondition; + + if (items * sz_xSyncWaitCondition != len) + { + return BadLength; + } + if (items == 0) + { + client->errorValue = items; /* XXX protocol change */ + return BadValue; + } + + pProtocolWaitConds = (xSyncWaitCondition *) & stuff[1]; + + /* all the memory for the entire await list is allocated + * here in one chunk + */ + pAwaitUnion = (SyncAwaitUnion *)xalloc((items+1) * sizeof(SyncAwaitUnion)); + if (!pAwaitUnion) + return BadAlloc; + + /* first item is the header, remainder are real wait conditions */ + + pAwaitUnion->header.delete_id = FakeClientID(client->index); + if (!AddResource(pAwaitUnion->header.delete_id, RTAwait, pAwaitUnion)) + { + xfree(pAwaitUnion); + return BadAlloc; + } + + /* don't need to do any more memory allocation for this request! */ + + pAwaitUnion->header.client = client; + pAwaitUnion->header.num_waitconditions = 0; + + pAwait = &(pAwaitUnion+1)->await; /* skip over header */ + for (i = 0; i < items; i++, pProtocolWaitConds++, pAwait++) + { + if (pProtocolWaitConds->counter == None) /* XXX protocol change */ + { + /* this should take care of removing any triggers created by + * this request that have already been registered on counters + */ + FreeResource(pAwaitUnion->header.delete_id, RT_NONE); + client->errorValue = pProtocolWaitConds->counter; + return SyncErrorBase + XSyncBadCounter; + } + + /* sanity checks are in SyncInitTrigger */ + pAwait->trigger.pCounter = NULL; + pAwait->trigger.value_type = pProtocolWaitConds->value_type; + XSyncIntsToValue(&pAwait->trigger.wait_value, + pProtocolWaitConds->wait_value_lo, + pProtocolWaitConds->wait_value_hi); + pAwait->trigger.test_type = pProtocolWaitConds->test_type; + + status = SyncInitTrigger(client, &pAwait->trigger, + pProtocolWaitConds->counter, XSyncCAAllTrigger); + if (status != Success) + { + /* this should take care of removing any triggers created by + * this request that have already been registered on counters + */ + FreeResource(pAwaitUnion->header.delete_id, RT_NONE); + return status; + } + /* this is not a mistake -- same function works for both cases */ + pAwait->trigger.TriggerFired = SyncAwaitTriggerFired; + pAwait->trigger.CounterDestroyed = SyncAwaitTriggerFired; + XSyncIntsToValue(&pAwait->event_threshold, + pProtocolWaitConds->event_threshold_lo, + pProtocolWaitConds->event_threshold_hi); + pAwait->pHeader = &pAwaitUnion->header; + pAwaitUnion->header.num_waitconditions++; + } + + IgnoreClient(client); + + /* see if any of the triggers are already true */ + + pAwait = &(pAwaitUnion+1)->await; /* skip over header */ + for (i = 0; i < items; i++, pAwait++) + { + /* don't have to worry about NULL counters because the request + * errors before we get here out if they occur + */ + if ((*pAwait->trigger.CheckTrigger)(&pAwait->trigger, + pAwait->trigger.pCounter->value)) + { + (*pAwait->trigger.TriggerFired)(&pAwait->trigger); + break; /* once is enough */ + } + } + return Success; +} + + +/* + * ** Query a counter + */ +static int +ProcSyncQueryCounter(client) + ClientPtr client; +{ + REQUEST(xSyncQueryCounterReq); + xSyncQueryCounterReply rep; + SyncCounter *pCounter; + + REQUEST_SIZE_MATCH(xSyncQueryCounterReq); + + pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->counter, + RTCounter, DixReadAccess); + if (pCounter == NULL) + { + client->errorValue = stuff->counter; + return SyncErrorBase + XSyncBadCounter; + } + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + /* if system counter, ask it what the current value is */ + + if (IsSystemCounter(pCounter)) + { + (*pCounter->pSysCounterInfo->QueryValue) ((pointer) pCounter, + &pCounter->value); + } + + rep.value_hi = XSyncValueHigh32(pCounter->value); + rep.value_lo = XSyncValueLow32(pCounter->value); + if (client->swapped) + { + register char n; + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swapl(&rep.value_hi, n); + swapl(&rep.value_lo, n); + } + WriteToClient(client, sizeof(xSyncQueryCounterReply), (char *) &rep); + return (client->noClientException); +} + + +/* + * ** Create Alarm + */ +static int +ProcSyncCreateAlarm(client) + ClientPtr client; +{ + REQUEST(xSyncCreateAlarmReq); + SyncAlarm *pAlarm; + int status; + unsigned long len, vmask; + SyncTrigger *pTrigger; + + REQUEST_AT_LEAST_SIZE(xSyncCreateAlarmReq); + + LEGAL_NEW_RESOURCE(stuff->id, client); + + vmask = stuff->valueMask; + len = client->req_len - (sizeof(xSyncCreateAlarmReq) >> 2); + /* the "extra" call to Ones accounts for the presence of 64 bit values */ + if (len != (Ones(vmask) + Ones(vmask & (XSyncCAValue|XSyncCADelta)))) + return BadLength; + + if (!(pAlarm = (SyncAlarm *) xalloc(sizeof(SyncAlarm)))) + { + return BadAlloc; + } + + /* set up defaults */ + + pTrigger = &pAlarm->trigger; + pTrigger->pCounter = NULL; + pTrigger->value_type = XSyncAbsolute; + XSyncIntToValue(&pTrigger->wait_value, 0L); + pTrigger->test_type = XSyncPositiveComparison; + pTrigger->TriggerFired = SyncAlarmTriggerFired; + pTrigger->CounterDestroyed = SyncAlarmCounterDestroyed; + status = SyncInitTrigger(client, pTrigger, None, XSyncCAAllTrigger); + if (status != Success) + { + xfree(pAlarm); + return status; + } + + pAlarm->client = client; + pAlarm->alarm_id = stuff->id; + XSyncIntToValue(&pAlarm->delta, 1L); + pAlarm->events = TRUE; + pAlarm->state = XSyncAlarmInactive; + pAlarm->pEventClients = NULL; + status = SyncChangeAlarmAttributes(client, pAlarm, vmask, + (CARD32 *)&stuff[1]); + if (status != Success) + { + xfree(pAlarm); + return status; + } + + if (!AddResource(stuff->id, RTAlarm, pAlarm)) + { + xfree(pAlarm); + return BadAlloc; + } + + /* see if alarm already triggered. NULL counter will not trigger + * in CreateAlarm and sets alarm state to Inactive. + */ + + if (!pTrigger->pCounter) + { + pAlarm->state = XSyncAlarmInactive; /* XXX protocol change */ + } + else if ((*pTrigger->CheckTrigger)(pTrigger, pTrigger->pCounter->value)) + { + (*pTrigger->TriggerFired)(pTrigger); + } + + return Success; +} + +/* + * ** Change Alarm + */ +static int +ProcSyncChangeAlarm(client) + ClientPtr client; +{ + REQUEST(xSyncChangeAlarmReq); + SyncAlarm *pAlarm; + long vmask; + int len, status; + + REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq); + + if (!(pAlarm = (SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm, + RTAlarm, DixWriteAccess))) + { + client->errorValue = stuff->alarm; + return SyncErrorBase + XSyncBadAlarm; + } + + vmask = stuff->valueMask; + len = client->req_len - (sizeof(xSyncChangeAlarmReq) >> 2); + /* the "extra" call to Ones accounts for the presence of 64 bit values */ + if (len != (Ones(vmask) + Ones(vmask & (XSyncCAValue|XSyncCADelta)))) + return BadLength; + + if ((status = SyncChangeAlarmAttributes(client, pAlarm, vmask, + (CARD32 *)&stuff[1])) != Success) + return status; + + /* see if alarm already triggered. NULL counter WILL trigger + * in ChangeAlarm. + */ + + if (!pAlarm->trigger.pCounter || + (*pAlarm->trigger.CheckTrigger)(&pAlarm->trigger, + pAlarm->trigger.pCounter->value)) + { + (*pAlarm->trigger.TriggerFired)(&pAlarm->trigger); + } + return Success; +} + +static int +ProcSyncQueryAlarm(client) + ClientPtr client; +{ + REQUEST(xSyncQueryAlarmReq); + SyncAlarm *pAlarm; + xSyncQueryAlarmReply rep; + SyncTrigger *pTrigger; + + REQUEST_SIZE_MATCH(xSyncQueryAlarmReq); + + pAlarm = (SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm, + RTAlarm, DixReadAccess); + if (!pAlarm) + { + client->errorValue = stuff->alarm; + return (SyncErrorBase + XSyncBadAlarm); + } + + rep.type = X_Reply; + rep.length = (sizeof(xSyncQueryAlarmReply) - sizeof(xGenericReply)) >> 2; + rep.sequenceNumber = client->sequence; + + pTrigger = &pAlarm->trigger; + rep.counter = (pTrigger->pCounter) ? pTrigger->pCounter->id : None; + +#if 0 /* XXX unclear what to do, depends on whether relative value-types + * are "consumed" immediately and are considered absolute from then + * on. + */ + rep.value_type = pTrigger->value_type; + rep.wait_value_hi = XSyncValueHigh32(pTrigger->wait_value); + rep.wait_value_lo = XSyncValueLow32(pTrigger->wait_value); +#else + rep.value_type = XSyncAbsolute; + rep.wait_value_hi = XSyncValueHigh32(pTrigger->test_value); + rep.wait_value_lo = XSyncValueLow32(pTrigger->test_value); +#endif + + rep.test_type = pTrigger->test_type; + rep.delta_hi = XSyncValueHigh32(pAlarm->delta); + rep.delta_lo = XSyncValueLow32(pAlarm->delta); + rep.events = pAlarm->events; + rep.state = pAlarm->state; + + if (client->swapped) + { + register char n; + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swapl(&rep.counter, n); + swapl(&rep.wait_value_hi, n); + swapl(&rep.wait_value_lo, n); + swapl(&rep.test_type, n); + swapl(&rep.delta_hi, n); + swapl(&rep.delta_lo, n); + } + + WriteToClient(client, sizeof(xSyncQueryAlarmReply), (char *) &rep); + return (client->noClientException); +} + + +static int +ProcSyncDestroyAlarm(client) + ClientPtr client; +{ + REQUEST(xSyncDestroyAlarmReq); + + REQUEST_SIZE_MATCH(xSyncDestroyAlarmReq); + + if (!((SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm, + RTAlarm, DixDestroyAccess))) + { + client->errorValue = stuff->alarm; + return SyncErrorBase + XSyncBadAlarm; + } + + FreeResource(stuff->alarm, RT_NONE); + return (client->noClientException); +} + +/* + * ** Given an extension request, call the appropriate request procedure + */ +static int +ProcSyncDispatch(client) + ClientPtr client; +{ + REQUEST(xReq); + + switch (stuff->data) + { + + case X_SyncInitialize: + return ProcSyncInitialize(client); + case X_SyncListSystemCounters: + return ProcSyncListSystemCounters(client); + case X_SyncCreateCounter: + return ProcSyncCreateCounter(client); + case X_SyncSetCounter: + return ProcSyncSetCounter(client); + case X_SyncChangeCounter: + return ProcSyncChangeCounter(client); + case X_SyncQueryCounter: + return ProcSyncQueryCounter(client); + case X_SyncDestroyCounter: + return ProcSyncDestroyCounter(client); + case X_SyncAwait: + return ProcSyncAwait(client); + case X_SyncCreateAlarm: + return ProcSyncCreateAlarm(client); + case X_SyncChangeAlarm: + return ProcSyncChangeAlarm(client); + case X_SyncQueryAlarm: + return ProcSyncQueryAlarm(client); + case X_SyncDestroyAlarm: + return ProcSyncDestroyAlarm(client); + case X_SyncSetPriority: + return ProcSyncSetPriority(client); + case X_SyncGetPriority: + return ProcSyncGetPriority(client); + default: + return BadRequest; + } +} + +/* + * Boring Swapping stuff ... + */ + +static int +SProcSyncInitialize(client) + ClientPtr client; +{ + REQUEST(xSyncInitializeReq); + register char n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH (xSyncInitializeReq); + + return ProcSyncInitialize(client); +} + +static int +SProcSyncListSystemCounters(client) + ClientPtr client; +{ + REQUEST(xSyncListSystemCountersReq); + register char n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH (xSyncListSystemCountersReq); + + return ProcSyncListSystemCounters(client); +} + +static int +SProcSyncCreateCounter(client) + ClientPtr client; +{ + REQUEST(xSyncCreateCounterReq); + register char n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH (xSyncCreateCounterReq); + swapl(&stuff->cid, n); + swapl(&stuff->initial_value_lo, n); + swapl(&stuff->initial_value_hi, n); + + return ProcSyncCreateCounter(client); +} + +static int +SProcSyncSetCounter(client) + ClientPtr client; +{ + REQUEST(xSyncSetCounterReq); + register char n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH (xSyncSetCounterReq); + swapl(&stuff->cid, n); + swapl(&stuff->value_lo, n); + swapl(&stuff->value_hi, n); + + return ProcSyncSetCounter(client); +} + +static int +SProcSyncChangeCounter(client) + ClientPtr client; +{ + REQUEST(xSyncChangeCounterReq); + register char n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH (xSyncChangeCounterReq); + swapl(&stuff->cid, n); + swapl(&stuff->value_lo, n); + swapl(&stuff->value_hi, n); + + return ProcSyncChangeCounter(client); +} + +static int +SProcSyncQueryCounter(client) + ClientPtr client; +{ + REQUEST(xSyncQueryCounterReq); + register char n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH (xSyncQueryCounterReq); + swapl(&stuff->counter, n); + + return ProcSyncQueryCounter(client); +} + +static int +SProcSyncDestroyCounter(client) + ClientPtr client; +{ + REQUEST(xSyncDestroyCounterReq); + register char n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH (xSyncDestroyCounterReq); + swapl(&stuff->counter, n); + + return ProcSyncDestroyCounter(client); +} + +static int +SProcSyncAwait(client) + ClientPtr client; +{ + REQUEST(xSyncAwaitReq); + register char n; + + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xSyncAwaitReq); + SwapRestL(stuff); + + return ProcSyncAwait(client); +} + + +static int +SProcSyncCreateAlarm(client) + ClientPtr client; +{ + REQUEST(xSyncCreateAlarmReq); + register char n; + + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xSyncCreateAlarmReq); + swapl(&stuff->id, n); + swapl(&stuff->valueMask, n); + SwapRestL(stuff); + + return ProcSyncCreateAlarm(client); +} + +static int +SProcSyncChangeAlarm(client) + ClientPtr client; +{ + REQUEST(xSyncChangeAlarmReq); + register char n; + + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq); + swapl(&stuff->alarm, n); + swapl(&stuff->valueMask, n); + SwapRestL(stuff); + return ProcSyncChangeAlarm(client); +} + +static int +SProcSyncQueryAlarm(client) + ClientPtr client; +{ + REQUEST(xSyncQueryAlarmReq); + register char n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH (xSyncQueryAlarmReq); + swapl(&stuff->alarm, n); + + return ProcSyncQueryAlarm(client); +} + +static int +SProcSyncDestroyAlarm(client) + ClientPtr client; +{ + REQUEST(xSyncDestroyAlarmReq); + register char n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH (xSyncDestroyAlarmReq); + swapl(&stuff->alarm, n); + + return ProcSyncDestroyAlarm(client); +} + +static int +SProcSyncSetPriority(client) + ClientPtr client; +{ + REQUEST(xSyncSetPriorityReq); + register char n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH (xSyncSetPriorityReq); + swapl(&stuff->id, n); + swapl(&stuff->priority, n); + + return ProcSyncSetPriority(client); +} + +static int +SProcSyncGetPriority(client) + ClientPtr client; +{ + REQUEST(xSyncGetPriorityReq); + register char n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH (xSyncGetPriorityReq); + swapl(&stuff->id, n); + + return ProcSyncGetPriority(client); +} + + +static int +SProcSyncDispatch(client) + ClientPtr client; +{ + REQUEST(xReq); + + switch (stuff->data) + { + case X_SyncInitialize: + return SProcSyncInitialize(client); + case X_SyncListSystemCounters: + return SProcSyncListSystemCounters(client); + case X_SyncCreateCounter: + return SProcSyncCreateCounter(client); + case X_SyncSetCounter: + return SProcSyncSetCounter(client); + case X_SyncChangeCounter: + return SProcSyncChangeCounter(client); + case X_SyncQueryCounter: + return SProcSyncQueryCounter(client); + case X_SyncDestroyCounter: + return SProcSyncDestroyCounter(client); + case X_SyncAwait: + return SProcSyncAwait(client); + case X_SyncCreateAlarm: + return SProcSyncCreateAlarm(client); + case X_SyncChangeAlarm: + return SProcSyncChangeAlarm(client); + case X_SyncQueryAlarm: + return SProcSyncQueryAlarm(client); + case X_SyncDestroyAlarm: + return SProcSyncDestroyAlarm(client); + case X_SyncSetPriority: + return SProcSyncSetPriority(client); + case X_SyncGetPriority: + return SProcSyncGetPriority(client); + default: + return BadRequest; + } +} + +/* + * Event Swapping + */ + +static void +SCounterNotifyEvent(from, to) + xSyncCounterNotifyEvent *from, *to; +{ + to->type = from->type; + to->kind = from->kind; + cpswaps(from->sequenceNumber, to->sequenceNumber); + cpswapl(from->counter, to->counter); + cpswapl(from->wait_value_lo, to->wait_value_lo); + cpswapl(from->wait_value_hi, to->wait_value_hi); + cpswapl(from->counter_value_lo, to->counter_value_lo); + cpswapl(from->counter_value_hi, to->counter_value_hi); + cpswapl(from->time, to->time); + cpswaps(from->count, to->count); + to->destroyed = from->destroyed; +} + + +static void +SAlarmNotifyEvent(from, to) + xSyncAlarmNotifyEvent *from, *to; +{ + to->type = from->type; + to->kind = from->kind; + cpswaps(from->sequenceNumber, to->sequenceNumber); + cpswapl(from->alarm, to->alarm); + cpswapl(from->counter_value_lo, to->counter_value_lo); + cpswapl(from->counter_value_hi, to->counter_value_hi); + cpswapl(from->alarm_value_lo, to->alarm_value_lo); + cpswapl(from->alarm_value_hi, to->alarm_value_hi); + cpswapl(from->time, to->time); + to->state = from->state; +} + +/* + * ** Close everything down. ** This is fairly simple for now. + */ +/* ARGSUSED */ +static void +SyncResetProc(extEntry) + ExtensionEntry *extEntry; +{ + xfree(SysCounterList); + SysCounterList = NULL; + RTCounter = 0; +} + + +/* + * ** Initialise the extension. + */ +void +SyncExtensionInit(INITARGS) +{ + ExtensionEntry *extEntry; + + if (RTCounter == 0) + { + RTCounter = CreateNewResourceType(FreeCounter); + } + RTAlarm = CreateNewResourceType(FreeAlarm); + RTAwait = CreateNewResourceType(FreeAwait)|RC_NEVERRETAIN; + RTAlarmClient = CreateNewResourceType(FreeAlarmClient)|RC_NEVERRETAIN; + + if (RTCounter == 0 || RTAwait == 0 || RTAlarm == 0 || + RTAlarmClient == 0 || + (extEntry = AddExtension(SYNC_NAME, + XSyncNumberEvents, XSyncNumberErrors, + ProcSyncDispatch, SProcSyncDispatch, + SyncResetProc, + StandardMinorOpcode)) == NULL) + { + ErrorF("Sync Extension %d.%d failed to Initialise\n", + SYNC_MAJOR_VERSION, SYNC_MINOR_VERSION); + return; + } + + SyncEventBase = extEntry->eventBase; + SyncErrorBase = extEntry->errorBase; + EventSwapVector[SyncEventBase + XSyncCounterNotify] = (EventSwapPtr) SCounterNotifyEvent; + EventSwapVector[SyncEventBase + XSyncAlarmNotify] = (EventSwapPtr) SAlarmNotifyEvent; + + /* + * Although SERVERTIME is implemented by the OS layer, we initialise it + * here because doing it in OsInit() is too early. The resource database + * is not initialised when OsInit() is called. This is just about OK + * because there is always a servertime counter. + */ + SyncInitServerTime(); + SyncInitIdleTime(); + +#ifdef DEBUG + fprintf(stderr, "Sync Extension %d.%d\n", + SYNC_MAJOR_VERSION, SYNC_MINOR_VERSION); +#endif +} + + +/* + * ***** SERVERTIME implementation - should go in its own file in OS directory? + */ + + + +static pointer ServertimeCounter; +static XSyncValue Now; +static XSyncValue *pnext_time; + +#define GetTime()\ +{\ + unsigned long millis = GetTimeInMillis();\ + unsigned long maxis = XSyncValueHigh32(Now);\ + if (millis < XSyncValueLow32(Now)) maxis++;\ + XSyncIntsToValue(&Now, millis, maxis);\ +} + +/* +*** Server Block Handler +*** code inspired by multibuffer extension + */ +/*ARGSUSED*/ +static void ServertimeBlockHandler(env, wt, LastSelectMask) +pointer env; +struct timeval **wt; +pointer LastSelectMask; +{ + XSyncValue delay; + unsigned long timeout; + + if (pnext_time) + { + GetTime(); + + if (XSyncValueGreaterOrEqual(Now, *pnext_time)) + { + timeout = 0; + } + else + { + Bool overflow; + XSyncValueSubtract(&delay, *pnext_time, Now, &overflow); + (void)overflow; + timeout = XSyncValueLow32(delay); + } + AdjustWaitForDelay(wt, timeout); /* os/utils.c */ + } +} + +/* +*** Wakeup Handler + */ +/*ARGSUSED*/ +static void ServertimeWakeupHandler(env, rc, LastSelectMask) +pointer env; +int rc; +pointer LastSelectMask; +{ + if (pnext_time) + { + GetTime(); + + if (XSyncValueGreaterOrEqual(Now, *pnext_time)) + { + SyncChangeCounter(ServertimeCounter, Now); + } + } +} + +static void +ServertimeQueryValue(pCounter, pValue_return) + pointer pCounter; + CARD64 *pValue_return; +{ + GetTime(); + *pValue_return = Now; +} + +static void +ServertimeBracketValues(pCounter, pbracket_less, pbracket_greater) + pointer pCounter; + CARD64 *pbracket_less; + CARD64 *pbracket_greater; +{ + if (!pnext_time && pbracket_greater) + { + RegisterBlockAndWakeupHandlers(ServertimeBlockHandler, + ServertimeWakeupHandler, + NULL); + } + else if (pnext_time && !pbracket_greater) + { + RemoveBlockAndWakeupHandlers(ServertimeBlockHandler, + ServertimeWakeupHandler, + NULL); + } + pnext_time = pbracket_greater; +} + +static void +SyncInitServerTime(void) +{ + CARD64 resolution; + + XSyncIntsToValue(&Now, GetTimeInMillis(), 0); + XSyncIntToValue(&resolution, 4); + ServertimeCounter = SyncCreateSystemCounter("SERVERTIME", Now, resolution, + XSyncCounterNeverDecreases, + ServertimeQueryValue, ServertimeBracketValues); + pnext_time = NULL; +} + + + +/* + * IDLETIME implementation + */ + +static pointer IdleTimeCounter; +static XSyncValue *pIdleTimeValueLess; +static XSyncValue *pIdleTimeValueGreater; + +static void +IdleTimeQueryValue (pointer pCounter, CARD64 *pValue_return) +{ + CARD32 idle = GetTimeInMillis() - lastDeviceEventTime.milliseconds; + XSyncIntsToValue (pValue_return, idle, 0); +} + +static void +IdleTimeBlockHandler (pointer env, + struct timeval **wt, + pointer LastSelectMask) +{ + XSyncValue idle; + + if (!pIdleTimeValueLess && !pIdleTimeValueGreater) + return; + + IdleTimeQueryValue (NULL, &idle); + + if (pIdleTimeValueLess && + XSyncValueLessOrEqual (idle, *pIdleTimeValueLess)) + { + AdjustWaitForDelay (wt, 0); + } + else if (pIdleTimeValueGreater) + { + unsigned long timeout = 0; + + if (XSyncValueLessThan (idle, *pIdleTimeValueGreater)) + { + XSyncValue value; + Bool overflow; + + XSyncValueSubtract (&value, *pIdleTimeValueGreater, + idle, &overflow); + timeout = XSyncValueLow32 (value); + } + + AdjustWaitForDelay (wt, timeout); + } +} + +static void +IdleTimeWakeupHandler (pointer env, + int rc, + pointer LastSelectMask) +{ + XSyncValue idle; + + if (!pIdleTimeValueLess && !pIdleTimeValueGreater) + return; + + IdleTimeQueryValue (NULL, &idle); + + if ((pIdleTimeValueGreater && + XSyncValueGreaterOrEqual (idle, *pIdleTimeValueGreater)) || + (pIdleTimeValueLess && + XSyncValueLessOrEqual (idle, *pIdleTimeValueLess))) + { + SyncChangeCounter (IdleTimeCounter, idle); + } +} + +static void +IdleTimeBracketValues (pointer pCounter, + CARD64 *pbracket_less, + CARD64 *pbracket_greater) +{ + Bool registered = (pIdleTimeValueLess || pIdleTimeValueGreater); + + if (registered && !pbracket_less && !pbracket_greater) + { + RemoveBlockAndWakeupHandlers(IdleTimeBlockHandler, + IdleTimeWakeupHandler, + NULL); + } + else if (!registered && (pbracket_less || pbracket_greater)) + { + RegisterBlockAndWakeupHandlers(IdleTimeBlockHandler, + IdleTimeWakeupHandler, + NULL); + } + + pIdleTimeValueGreater = pbracket_greater; + pIdleTimeValueLess = pbracket_less; +} + +static void +SyncInitIdleTime (void) +{ + CARD64 resolution; + XSyncValue idle; + + IdleTimeQueryValue (NULL, &idle); + XSyncIntToValue (&resolution, 4); + + IdleTimeCounter = SyncCreateSystemCounter ("IDLETIME", idle, resolution, + XSyncCounterUnrestricted, + IdleTimeQueryValue, + IdleTimeBracketValues); + + pIdleTimeValueLess = pIdleTimeValueGreater = NULL; +} diff --git a/xorg-server-1.4/Xext/xace.c b/xorg-server-1.4/Xext/xace.c new file mode 100644 index 0000000..6385631 --- /dev/null +++ b/xorg-server-1.4/Xext/xace.c @@ -0,0 +1,498 @@ +/************************************************************ + +Author: Eamon Walsh + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. 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 +AUTHOR 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. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "windowstr.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "xacestr.h" +#include "modinit.h" + +CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = {0}; + +/* Proc vectors for untrusted clients, swapped and unswapped versions. + * These are the same as the normal proc vectors except that extensions + * that haven't declared themselves secure will have ProcBadRequest plugged + * in for their major opcode dispatcher. This prevents untrusted clients + * from guessing extension major opcodes and using the extension even though + * the extension can't be listed or queried. + */ +static int (*UntrustedProcVector[256])( + ClientPtr /*client*/ +); +static int (*SwappedUntrustedProcVector[256])( + ClientPtr /*client*/ +); + +/* Entry point for hook functions. Called by Xserver. + */ +int XaceHook(int hook, ...) +{ + pointer calldata; /* data passed to callback */ + int *prv = NULL; /* points to return value from callback */ + va_list ap; /* argument list */ + va_start(ap, hook); + + /* Marshal arguments for passing to callback. + * Each callback has its own case, which sets up a structure to hold + * the arguments and integer return parameter, or in some cases just + * sets calldata directly to a single argument (with no return result) + */ + switch (hook) + { + case XACE_CORE_DISPATCH: { + XaceCoreDispatchRec rec = { + va_arg(ap, ClientPtr), + TRUE /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_RESOURCE_ACCESS: { + XaceResourceAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, XID), + va_arg(ap, RESTYPE), + va_arg(ap, Mask), + va_arg(ap, pointer), + TRUE /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_DEVICE_ACCESS: { + XaceDeviceAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, DeviceIntPtr), + va_arg(ap, Bool), + TRUE /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_PROPERTY_ACCESS: { + XacePropertyAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, WindowPtr), + va_arg(ap, Atom), + va_arg(ap, Mask), + XaceAllowOperation /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_DRAWABLE_ACCESS: { + XaceDrawableAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, DrawablePtr), + TRUE /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_MAP_ACCESS: + case XACE_BACKGRND_ACCESS: { + XaceMapAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, WindowPtr), + TRUE /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_EXT_DISPATCH: + case XACE_EXT_ACCESS: { + XaceExtAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, ExtensionEntry*), + TRUE /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_HOSTLIST_ACCESS: { + XaceHostlistAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, Mask), + TRUE /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_SITE_POLICY: { + XaceSitePolicyRec rec = { + va_arg(ap, char*), + va_arg(ap, int), + FALSE /* default unrecognized */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_DECLARE_EXT_SECURE: { + XaceDeclareExtSecureRec rec = { + va_arg(ap, ExtensionEntry*), + va_arg(ap, Bool) + }; + calldata = &rec; + break; + } + case XACE_AUTH_AVAIL: { + XaceAuthAvailRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, XID) + }; + calldata = &rec; + break; + } + case XACE_KEY_AVAIL: { + XaceKeyAvailRec rec = { + va_arg(ap, xEventPtr), + va_arg(ap, DeviceIntPtr), + va_arg(ap, int) + }; + calldata = &rec; + break; + } + case XACE_WINDOW_INIT: { + XaceWindowRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, WindowPtr) + }; + calldata = &rec; + break; + } + case XACE_AUDIT_BEGIN: { + XaceAuditRec rec = { + va_arg(ap, ClientPtr), + 0 + }; + calldata = &rec; + break; + } + case XACE_AUDIT_END: { + XaceAuditRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, int) + }; + calldata = &rec; + break; + } + default: { + va_end(ap); + return 0; /* unimplemented hook number */ + } + } + va_end(ap); + + /* call callbacks and return result, if any. */ + CallCallbacks(&XaceHooks[hook], calldata); + return prv ? *prv : 0; +} + +static int +ProcXaceDispatch(ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) + { + default: + return BadRequest; + } +} /* ProcXaceDispatch */ + +static int +SProcXaceDispatch(ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) + { + default: + return BadRequest; + } +} /* SProcXaceDispatch */ + + +/* XaceResetProc + * + * Arguments: + * extEntry is the extension information for the XACE extension. + * + * Returns: nothing. + * + * Side Effects: + * Performs any cleanup needed by XACE at server shutdown time. + */ +static void +XaceResetProc(ExtensionEntry *extEntry) +{ + int i; + + for (i=0; ireqType; + + if (!ProcVector[major]) + return (BadRequest); + + if (!XaceHook(XACE_CORE_DISPATCH, client)) + return (BadAccess); + + return client->swapped ? + (* SwappedProcVector[major])(client) : + (* ProcVector[major])(client); +} + +static int +XaceCatchExtProc(ClientPtr client) +{ + REQUEST(xReq); + int major = stuff->reqType; + ExtensionEntry *ext = GetExtensionEntry(major); + + if (!ext || !ProcVector[major]) + return (BadRequest); + + if (!XaceHook(XACE_EXT_DISPATCH, client, ext)) + return (BadRequest); /* pretend extension doesn't exist */ + + return client->swapped ? + (* SwappedProcVector[major])(client) : + (* ProcVector[major])(client); +} + + +/* SecurityClientStateCallback + * + * Arguments: + * pcbl is &ClientStateCallback. + * nullata is NULL. + * calldata is a pointer to a NewClientInfoRec (include/dixstruct.h) + * which contains information about client state changes. + * + * Returns: nothing. + * + * Side Effects: + * + * If a new client is connecting, its authorization ID is copied to + * client->authID. If this is a generated authorization, its reference + * count is bumped, its timer is cancelled if it was running, and its + * trustlevel is copied to TRUSTLEVEL(client). + * + * If a client is disconnecting and the client was using a generated + * authorization, the authorization's reference count is decremented, and + * if it is now zero, the timer for this authorization is started. + */ + +static void +XaceClientStateCallback( + CallbackListPtr *pcbl, + pointer nulldata, + pointer calldata) +{ + NewClientInfoRec *pci = (NewClientInfoRec *)calldata; + ClientPtr client = pci->client; + + switch (client->clientState) + { + case ClientStateRunning: + { + client->requestVector = client->swapped ? + SwappedUntrustedProcVector : UntrustedProcVector; + break; + } + default: break; + } +} /* XaceClientStateCallback */ + +/* XaceExtensionInit + * + * Initialize the XACE Extension + */ +void XaceExtensionInit(INITARGS) +{ + ExtensionEntry *extEntry; + int i; + + if (!AddCallback(&ClientStateCallback, XaceClientStateCallback, NULL)) + return; + + extEntry = AddExtension(XACE_EXTENSION_NAME, + XaceNumberEvents, XaceNumberErrors, + ProcXaceDispatch, SProcXaceDispatch, + XaceResetProc, StandardMinorOpcode); + + /* initialize dispatching intercept functions */ + for (i = 0; i < 128; i++) + { + UntrustedProcVector[i] = XaceCatchDispatchProc; + SwappedUntrustedProcVector[i] = XaceCatchDispatchProc; + } + for (i = 128; i < 256; i++) + { + UntrustedProcVector[i] = XaceCatchExtProc; + SwappedUntrustedProcVector[i] = XaceCatchExtProc; + } +} + +/* XaceCensorImage + * + * Called after pScreen->GetImage to prevent pieces or trusted windows from + * being returned in image data from an untrusted window. + * + * Arguments: + * client is the client doing the GetImage. + * pVisibleRegion is the visible region of the window. + * widthBytesLine is the width in bytes of one horizontal line in pBuf. + * pDraw is the source window. + * x, y, w, h is the rectangle of image data from pDraw in pBuf. + * format is the format of the image data in pBuf: ZPixmap or XYPixmap. + * pBuf is the image data. + * + * Returns: nothing. + * + * Side Effects: + * Any part of the rectangle (x, y, w, h) that is outside the visible + * region of the window will be destroyed (overwritten) in pBuf. + */ +void +XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h, + format, pBuf) + ClientPtr client; + RegionPtr pVisibleRegion; + long widthBytesLine; + DrawablePtr pDraw; + int x, y, w, h; + unsigned int format; + char * pBuf; +{ + ScreenPtr pScreen; + RegionRec imageRegion; /* region representing x,y,w,h */ + RegionRec censorRegion; /* region to obliterate */ + BoxRec imageBox; + int nRects; + + pScreen = pDraw->pScreen; + + imageBox.x1 = x; + imageBox.y1 = y; + imageBox.x2 = x + w; + imageBox.y2 = y + h; + REGION_INIT(pScreen, &imageRegion, &imageBox, 1); + REGION_NULL(pScreen, &censorRegion); + + /* censorRegion = imageRegion - visibleRegion */ + REGION_SUBTRACT(pScreen, &censorRegion, &imageRegion, pVisibleRegion); + nRects = REGION_NUM_RECTS(&censorRegion); + if (nRects > 0) + { /* we have something to censor */ + GCPtr pScratchGC = NULL; + PixmapPtr pPix = NULL; + xRectangle *pRects = NULL; + Bool failed = FALSE; + int depth = 1; + int bitsPerPixel = 1; + int i; + BoxPtr pBox; + + /* convert region to list-of-rectangles for PolyFillRect */ + + pRects = (xRectangle *)ALLOCATE_LOCAL(nRects * sizeof(xRectangle *)); + if (!pRects) + { + failed = TRUE; + goto failSafe; + } + for (pBox = REGION_RECTS(&censorRegion), i = 0; + i < nRects; + i++, pBox++) + { + pRects[i].x = pBox->x1; + pRects[i].y = pBox->y1 - imageBox.y1; + pRects[i].width = pBox->x2 - pBox->x1; + pRects[i].height = pBox->y2 - pBox->y1; + } + + /* use pBuf as a fake pixmap */ + + if (format == ZPixmap) + { + depth = pDraw->depth; + bitsPerPixel = pDraw->bitsPerPixel; + } + + pPix = GetScratchPixmapHeader(pDraw->pScreen, w, h, + depth, bitsPerPixel, + widthBytesLine, (pointer)pBuf); + if (!pPix) + { + failed = TRUE; + goto failSafe; + } + + pScratchGC = GetScratchGC(depth, pPix->drawable.pScreen); + if (!pScratchGC) + { + failed = TRUE; + goto failSafe; + } + + ValidateGC(&pPix->drawable, pScratchGC); + (* pScratchGC->ops->PolyFillRect)(&pPix->drawable, + pScratchGC, nRects, pRects); + + failSafe: + if (failed) + { + /* Censoring was not completed above. To be safe, wipe out + * all the image data so that nothing trusted gets out. + */ + bzero(pBuf, (int)(widthBytesLine * h)); + } + if (pRects) DEALLOCATE_LOCAL(pRects); + if (pScratchGC) FreeScratchGC(pScratchGC); + if (pPix) FreeScratchPixmapHeader(pPix); + } + REGION_UNINIT(pScreen, &imageRegion); + REGION_UNINIT(pScreen, &censorRegion); +} /* XaceCensorImage */ diff --git a/xorg-server-1.4/Xext/xace.h b/xorg-server-1.4/Xext/xace.h new file mode 100644 index 0000000..4143cd4 --- /dev/null +++ b/xorg-server-1.4/Xext/xace.h @@ -0,0 +1,109 @@ +/************************************************************ + +Author: Eamon Walsh + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. 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 +AUTHOR 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. + +********************************************************/ + +#ifndef _XACE_H +#define _XACE_H + +/* Hook return codes */ +#define XaceErrorOperation 0 +#define XaceAllowOperation 1 +#define XaceIgnoreOperation 2 + +#ifdef XACE + +#define XACE_EXTENSION_NAME "XAccessControlExtension" +#define XACE_MAJOR_VERSION 1 +#define XACE_MINOR_VERSION 0 + +#include "pixmap.h" /* for DrawablePtr */ +#include "regionstr.h" /* for RegionPtr */ + +#define XaceNumberEvents 0 +#define XaceNumberErrors 0 + +/* security hooks */ +/* Constants used to identify the available security hooks + */ +#define XACE_CORE_DISPATCH 0 +#define XACE_EXT_DISPATCH 1 +#define XACE_RESOURCE_ACCESS 2 +#define XACE_DEVICE_ACCESS 3 +#define XACE_PROPERTY_ACCESS 4 +#define XACE_DRAWABLE_ACCESS 5 +#define XACE_MAP_ACCESS 6 +#define XACE_BACKGRND_ACCESS 7 +#define XACE_EXT_ACCESS 8 +#define XACE_HOSTLIST_ACCESS 9 +#define XACE_SITE_POLICY 10 +#define XACE_DECLARE_EXT_SECURE 11 +#define XACE_AUTH_AVAIL 12 +#define XACE_KEY_AVAIL 13 +#define XACE_WINDOW_INIT 14 +#define XACE_AUDIT_BEGIN 15 +#define XACE_AUDIT_END 16 +#define XACE_NUM_HOOKS 17 + +extern CallbackListPtr XaceHooks[XACE_NUM_HOOKS]; + +/* Entry point for hook functions. Called by Xserver. + */ +extern int XaceHook( + int /*hook*/, + ... /*appropriate args for hook*/ + ); + +/* Register a callback for a given hook. + */ +#define XaceRegisterCallback(hook,callback,data) \ + AddCallback(XaceHooks+(hook), callback, data) + +/* Unregister an existing callback for a given hook. + */ +#define XaceDeleteCallback(hook,callback,data) \ + DeleteCallback(XaceHooks+(hook), callback, data) + + +/* From the original Security extension... + */ + +extern void XaceCensorImage( + ClientPtr client, + RegionPtr pVisibleRegion, + long widthBytesLine, + DrawablePtr pDraw, + int x, int y, int w, int h, + unsigned int format, + char * pBuf + ); + +#else /* XACE */ + +/* Define calls away when XACE is not being built. */ + +#ifdef __GNUC__ +#define XaceHook(args...) XaceAllowOperation +#define XaceCensorImage(args...) { ; } +#else +#define XaceHook(...) XaceAllowOperation +#define XaceCensorImage(...) { ; } +#endif + +#endif /* XACE */ + +#endif /* _XACE_H */ diff --git a/xorg-server-1.4/Xext/xacestr.h b/xorg-server-1.4/Xext/xacestr.h new file mode 100644 index 0000000..7114d06 --- /dev/null +++ b/xorg-server-1.4/Xext/xacestr.h @@ -0,0 +1,135 @@ +/************************************************************ + +Author: Eamon Walsh + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. 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 +AUTHOR 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. + +********************************************************/ + +#ifndef _XACESTR_H +#define _XACESTR_H + +#include +#include "dixstruct.h" +#include "resource.h" +#include "extnsionst.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "inputstr.h" +#include "xace.h" + +/* XACE_CORE_DISPATCH */ +typedef struct { + ClientPtr client; + int rval; +} XaceCoreDispatchRec; + +/* XACE_RESOURCE_ACCESS */ +/* XACE_RESOURCE_CREATE */ +typedef struct { + ClientPtr client; + XID id; + RESTYPE rtype; + Mask access_mode; + pointer res; + int rval; +} XaceResourceAccessRec; + +/* XACE_DEVICE_ACCESS */ +typedef struct { + ClientPtr client; + DeviceIntPtr dev; + Bool fromRequest; + int rval; +} XaceDeviceAccessRec; + +/* XACE_PROPERTY_ACCESS */ +typedef struct { + ClientPtr client; + WindowPtr pWin; + Atom propertyName; + Mask access_mode; + int rval; +} XacePropertyAccessRec; + +/* XACE_DRAWABLE_ACCESS */ +typedef struct { + ClientPtr client; + DrawablePtr pDraw; + int rval; +} XaceDrawableAccessRec; + +/* XACE_MAP_ACCESS */ +/* XACE_BACKGRND_ACCESS */ +typedef struct { + ClientPtr client; + WindowPtr pWin; + int rval; +} XaceMapAccessRec; + +/* XACE_EXT_DISPATCH_ACCESS */ +/* XACE_EXT_ACCESS */ +typedef struct { + ClientPtr client; + ExtensionEntry *ext; + int rval; +} XaceExtAccessRec; + +/* XACE_HOSTLIST_ACCESS */ +typedef struct { + ClientPtr client; + Mask access_mode; + int rval; +} XaceHostlistAccessRec; + +/* XACE_SITE_POLICY */ +typedef struct { + char *policyString; + int len; + int rval; +} XaceSitePolicyRec; + +/* XACE_DECLARE_EXT_SECURE */ +typedef struct { + ExtensionEntry *ext; + Bool secure; +} XaceDeclareExtSecureRec; + +/* XACE_AUTH_AVAIL */ +typedef struct { + ClientPtr client; + XID authId; +} XaceAuthAvailRec; + +/* XACE_KEY_AVAIL */ +typedef struct { + xEventPtr event; + DeviceIntPtr keybd; + int count; +} XaceKeyAvailRec; + +/* XACE_WINDOW_INIT */ +typedef struct { + ClientPtr client; + WindowPtr pWin; +} XaceWindowRec; + +/* XACE_AUDIT_BEGIN */ +/* XACE_AUDIT_END */ +typedef struct { + ClientPtr client; + int requestResult; +} XaceAuditRec; + +#endif /* _XACESTR_H */ diff --git a/xorg-server-1.4/Xext/xcalibrate.c b/xorg-server-1.4/Xext/xcalibrate.c new file mode 100644 index 0000000..97ef3dc --- /dev/null +++ b/xorg-server-1.4/Xext/xcalibrate.c @@ -0,0 +1,260 @@ +/* + * Copyright © 2003 Philip Blundell + * + * 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 Philip Blundell not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Philip Blundell makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL PHILIP BLUNDELL 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_KDRIVE_CONFIG_H +#include +#endif + +#define NEED_EVENTS +#define NEED_REPLIES + +#include +#include +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "swaprep.h" + +#include +#include + +extern void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure); +extern void *tslib_raw_event_closure; + +static CARD8 XCalibrateReqCode; +int XCalibrateEventBase; +int XCalibrateReqBase; +int XCalibrateErrorBase; + +static ClientPtr xcalibrate_client; + +static void +xcalibrate_event_hook (int x, int y, int pressure, void *closure) +{ + ClientPtr pClient = (ClientPtr) closure; + xXCalibrateRawTouchscreenEvent ev; + + ev.type = XCalibrateEventBase + X_XCalibrateRawTouchscreen; + ev.sequenceNumber = pClient->sequence; + ev.x = x; + ev.y = y; + ev.pressure = pressure; + + if (!pClient->clientGone) + WriteEventsToClient (pClient, 1, (xEvent *) &ev); +} + +static int +ProcXCalibrateQueryVersion (ClientPtr client) +{ + REQUEST(xXCalibrateQueryVersionReq); + xXCalibrateQueryVersionReply rep; + CARD16 client_major, client_minor; /* not used */ + + REQUEST_SIZE_MATCH (xXCalibrateQueryVersionReq); + + client_major = stuff->majorVersion; + client_minor = stuff->minorVersion; + + fprintf(stderr, "%s(): called\n", __func__); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.majorVersion = XCALIBRATE_MAJOR_VERSION; + rep.minorVersion = XCALIBRATE_MINOR_VERSION; + if (client->swapped) { + int n; + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swaps(&rep.majorVersion, n); + swaps(&rep.minorVersion, n); + } + WriteToClient(client, sizeof (xXCalibrateQueryVersionReply), (char *)&rep); + return (client->noClientException); +} + +static int +SProcXCalibrateQueryVersion (ClientPtr client) +{ + REQUEST(xXCalibrateQueryVersionReq); + int n; + + REQUEST_SIZE_MATCH (xXCalibrateQueryVersionReq); + swaps(&stuff->majorVersion,n); + swaps(&stuff->minorVersion,n); + return ProcXCalibrateQueryVersion(client); +} + +static int +ProcXCalibrateSetRawMode (ClientPtr client) +{ + REQUEST(xXCalibrateRawModeReq); + xXCalibrateRawModeReply rep; + + REQUEST_SIZE_MATCH (xXCalibrateRawModeReq); + + memset (&rep, 0, sizeof (rep)); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + + if (stuff->on) + { + if (xcalibrate_client == NULL) + { + /* Start calibrating. */ + xcalibrate_client = client; + tslib_raw_event_hook = xcalibrate_event_hook; + tslib_raw_event_closure = client; + rep.status = GrabSuccess; + } + else + { + rep.status = AlreadyGrabbed; + } + } + else + { + if (xcalibrate_client == client) + { + /* Stop calibrating. */ + xcalibrate_client = NULL; + tslib_raw_event_hook = NULL; + tslib_raw_event_closure = NULL; + rep.status = GrabSuccess; + + /* Cycle input off and on to reload configuration. */ + KdDisableInput (); + KdEnableInput (); + } + else + { + rep.status = AlreadyGrabbed; + } + } + + if (client->swapped) + { + int n; + + swaps (&rep.sequenceNumber, n); + swaps (&rep.status, n); + } + WriteToClient(client, sizeof (rep), (char *) &rep); + return (client->noClientException); +} + + +static int +SProcXCalibrateSetRawMode (ClientPtr client) +{ + REQUEST(xXCalibrateRawModeReq); + int n; + + REQUEST_SIZE_MATCH (xXCalibrateRawModeReq); + + swaps(&stuff->on, n); + + return ProcXCalibrateSetRawMode(client); +} + +static void +XCalibrateResetProc (ExtensionEntry *extEntry) +{ +} + +static int +ProcXCalibrateDispatch (ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_XCalibrateQueryVersion: + return ProcXCalibrateQueryVersion(client); + case X_XCalibrateRawMode: + return ProcXCalibrateSetRawMode(client); + default: break; + } + + return BadRequest; +} + +static int +SProcXCalibrateDispatch (ClientPtr client) +{ + REQUEST(xReq); + int n; + + swaps(&stuff->length,n); + + switch (stuff->data) { + case X_XCalibrateQueryVersion: + return SProcXCalibrateQueryVersion(client); + case X_XCalibrateRawMode: + return SProcXCalibrateSetRawMode(client); + + default: break; + } + + return BadRequest; +} + +static void +XCalibrateClientCallback (CallbackListPtr *list, + pointer closure, + pointer data) +{ + NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; + ClientPtr pClient = clientinfo->client; + + if (clientinfo->setup == NULL + && xcalibrate_client != NULL + && xcalibrate_client == pClient) + { + /* Stop calibrating. */ + xcalibrate_client = NULL; + tslib_raw_event_hook = NULL; + tslib_raw_event_closure = NULL; + } +} + +void +XCalibrateExtensionInit(void) +{ + ExtensionEntry *extEntry; + + if (!AddCallback (&ClientStateCallback, XCalibrateClientCallback, 0)) + return; + + extEntry = AddExtension(XCALIBRATE_NAME, XCalibrateNumberEvents, XCalibrateNumberErrors, + ProcXCalibrateDispatch, SProcXCalibrateDispatch, + XCalibrateResetProc, StandardMinorOpcode); + + if (!extEntry) + return; + + XCalibrateReqCode = (unsigned char)extEntry->base; + XCalibrateEventBase = extEntry->eventBase; + XCalibrateErrorBase = extEntry->errorBase; + + xcalibrate_client = 0; +} diff --git a/xorg-server-1.4/Xext/xcmisc.c b/xorg-server-1.4/Xext/xcmisc.c new file mode 100644 index 0000000..8c7a86e --- /dev/null +++ b/xorg-server-1.4/Xext/xcmisc.c @@ -0,0 +1,251 @@ +/* + +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. + +*/ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "swaprep.h" +#include +#include "modinit.h" + +#if HAVE_STDINT_H +#include +#elif !defined(UINT32_MAX) +#define UINT32_MAX 0xffffffffU +#endif + +#if 0 +static unsigned char XCMiscCode; +#endif + +static void XCMiscResetProc( + ExtensionEntry * /* extEntry */ +); + +static DISPATCH_PROC(ProcXCMiscDispatch); +static DISPATCH_PROC(ProcXCMiscGetVersion); +static DISPATCH_PROC(ProcXCMiscGetXIDList); +static DISPATCH_PROC(ProcXCMiscGetXIDRange); +static DISPATCH_PROC(SProcXCMiscDispatch); +static DISPATCH_PROC(SProcXCMiscGetVersion); +static DISPATCH_PROC(SProcXCMiscGetXIDList); +static DISPATCH_PROC(SProcXCMiscGetXIDRange); + +void +XCMiscExtensionInit(INITARGS) +{ +#if 0 + ExtensionEntry *extEntry; + + if ((extEntry = AddExtension(XCMiscExtensionName, 0, 0, + ProcXCMiscDispatch, SProcXCMiscDispatch, + XCMiscResetProc, StandardMinorOpcode)) != 0) + XCMiscCode = (unsigned char)extEntry->base; +#else + (void) AddExtension(XCMiscExtensionName, 0, 0, + ProcXCMiscDispatch, SProcXCMiscDispatch, + XCMiscResetProc, StandardMinorOpcode); +#endif + + DeclareExtensionSecurity(XCMiscExtensionName, TRUE); +} + +/*ARGSUSED*/ +static void +XCMiscResetProc (extEntry) + ExtensionEntry *extEntry; +{ +} + +static int +ProcXCMiscGetVersion(client) + register ClientPtr client; +{ + xXCMiscGetVersionReply rep; + register int n; + + REQUEST_SIZE_MATCH(xXCMiscGetVersionReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.majorVersion = XCMiscMajorVersion; + rep.minorVersion = XCMiscMinorVersion; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swaps(&rep.majorVersion, n); + swaps(&rep.minorVersion, n); + } + WriteToClient(client, sizeof(xXCMiscGetVersionReply), (char *)&rep); + return(client->noClientException); +} + +static int +ProcXCMiscGetXIDRange(client) + register ClientPtr client; +{ + xXCMiscGetXIDRangeReply rep; + register int n; + XID min_id, max_id; + + REQUEST_SIZE_MATCH(xXCMiscGetXIDRangeReq); + GetXIDRange(client->index, FALSE, &min_id, &max_id); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.start_id = min_id; + rep.count = max_id - min_id + 1; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.start_id, n); + swapl(&rep.count, n); + } + WriteToClient(client, sizeof(xXCMiscGetXIDRangeReply), (char *)&rep); + return(client->noClientException); +} + +static int +ProcXCMiscGetXIDList(client) + register ClientPtr client; +{ + REQUEST(xXCMiscGetXIDListReq); + xXCMiscGetXIDListReply rep; + register int n; + XID *pids; + unsigned int count; + + REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq); + + if (stuff->count > UINT32_MAX / sizeof(XID)) + return BadAlloc; + + pids = (XID *)Xalloc(stuff->count * sizeof(XID)); + if (!pids) + { + return BadAlloc; + } + count = GetXIDList(client, stuff->count, pids); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = count; + rep.count = count; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swapl(&rep.count, n); + } + WriteToClient(client, sizeof(xXCMiscGetXIDListReply), (char *)&rep); + if (count) + { + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, count * sizeof(XID), pids); + } + Xfree(pids); + return(client->noClientException); +} + +static int +ProcXCMiscDispatch (client) + register ClientPtr client; +{ + REQUEST(xReq); + switch (stuff->data) + { + case X_XCMiscGetVersion: + return ProcXCMiscGetVersion(client); + case X_XCMiscGetXIDRange: + return ProcXCMiscGetXIDRange(client); + case X_XCMiscGetXIDList: + return ProcXCMiscGetXIDList(client); + default: + return BadRequest; + } +} + +static int +SProcXCMiscGetVersion(client) + register ClientPtr client; +{ + register int n; + REQUEST(xXCMiscGetVersionReq); + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xXCMiscGetVersionReq); + swaps(&stuff->majorVersion, n); + swaps(&stuff->minorVersion, n); + return ProcXCMiscGetVersion(client); +} + +static int +SProcXCMiscGetXIDRange(client) + register ClientPtr client; +{ + register int n; + REQUEST(xReq); + + swaps(&stuff->length, n); + return ProcXCMiscGetXIDRange(client); +} + +static int +SProcXCMiscGetXIDList(client) + register ClientPtr client; +{ + register int n; + REQUEST(xXCMiscGetXIDListReq); + + swaps(&stuff->length, n); + swapl(&stuff->count, n); + return ProcXCMiscGetXIDList(client); +} + +static int +SProcXCMiscDispatch (client) + register ClientPtr client; +{ + REQUEST(xReq); + switch (stuff->data) + { + case X_XCMiscGetVersion: + return SProcXCMiscGetVersion(client); + case X_XCMiscGetXIDRange: + return SProcXCMiscGetXIDRange(client); + case X_XCMiscGetXIDList: + return SProcXCMiscGetXIDList(client); + default: + return BadRequest; + } +} diff --git a/xorg-server-1.4/Xext/xevie.c b/xorg-server-1.4/Xext/xevie.c new file mode 100644 index 0000000..7922913 --- /dev/null +++ b/xorg-server-1.4/Xext/xevie.c @@ -0,0 +1,708 @@ +/************************************************************ + +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. + +************************************************************/ + +#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 + +#ifdef XKB +extern Bool noXkbExtension; +#endif +extern int xeviegrabState; + +static int ProcDispatch (register ClientPtr client), SProcDispatch (register ClientPtr client); +static void ResetProc (ExtensionEntry *extEntry); + +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 +static 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, pointer nulldata, + pointer calldata); +static void XevieServerGrabStateCallback(CallbackListPtr *pcbl, + pointer nulldata, + pointer calldata); + +static Bool XevieAdd(DeviceIntPtr device, pointer data); +static void XevieWrap(DeviceIntPtr device, ProcessInputProc proc); +static Bool XevieRemove(DeviceIntPtr device, pointer 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 (void) +{ + 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 (ExtensionEntry *extEntry) +{ +} + +static +int ProcQueryVersion (register ClientPtr client) +{ + xXevieQueryVersionReply rep; + + 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 (register ClientPtr client) +{ + xXevieStartReply rep; + + 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; +#ifdef XKB + if (!noXkbExtension) { + if (!XevieStart()) { + DeleteCallback(&ClientStateCallback,XevieClientStateCallback,NULL); + return BadAlloc; + } + } +#endif + + xevieModifiersOn = FALSE; + + rep.type = X_Reply; + rep.sequence_number = client->sequence; + WriteToClient (client, sizeof (xXevieStartReply), (char *)&rep); + return client->noClientException; +} + +static +int ProcEnd (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 (register ClientPtr client) +{ + REQUEST (xXevieSendReq); + xXevieSendReply rep; + xEvent *xE; + 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; +#ifdef XKB + if(!noXkbExtension) + doSendEvent(xE, inputInfo.keyboard); + else +#endif + CoreProcessKeyboardEvent (xE, xeviekb, 1); + break; + case ButtonPress: + case ButtonRelease: + case MotionNotify: + xevieEventSent = 1; +#ifdef XKB + if(!noXkbExtension) + doSendEvent(xE, inputInfo.pointer); + else +#endif + CoreProcessPointerEvent(xE, xeviemouse, 1); + break; + default: + break; + } + lastType = xE->u.u.type; + lastDetail = xE->u.u.detail; + return client->noClientException; +} + +static +int ProcSelectInput (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 (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 (register ClientPtr client) +{ + register int n; + + REQUEST(xXevieQueryVersionReq); + swaps(&stuff->length, n); + return ProcQueryVersion(client); +} + +static +int SProcStart (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 (ClientPtr client) +{ + register int n; + + REQUEST (xXevieEndReq); + swaps (&stuff->length, n); + REQUEST_AT_LEAST_SIZE (xXevieEndReq); + swapl(&stuff->cmap, n); + return ProcEnd (client); +} + +static +int SProcSend (ClientPtr client) +{ + register int n; + + REQUEST (xXevieSendReq); + swaps (&stuff->length, n); + REQUEST_AT_LEAST_SIZE (xXevieSendReq); + swapl(&stuff->event, n); + return ProcSend (client); +} + +static +int SProcSelectInput (ClientPtr client) +{ + register int n; + + REQUEST (xXevieSelectInputReq); + swaps (&stuff->length, n); + REQUEST_AT_LEAST_SIZE (xXevieSendReq); + swapl(&stuff->event_mask, n); + return ProcSelectInput (client); +} + + +static +int SProcDispatch (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; +#ifdef XKB + /* fix for bug5092586 */ + if(!noXkbExtension) { + switch(xE->u.u.type) { + case KeyPress: *kptr |= bit; break; + case KeyRelease: *kptr &= ~bit; break; + } + } +#endif + 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) { + +#ifdef XKB + 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); + } +#endif + + xevieFlag = 0; + xevieClientIndex = 0; + DeleteCallback (&ClientStateCallback, XevieClientStateCallback, NULL); + } +} + +static void +XevieClientStateCallback(CallbackListPtr *pcbl, pointer nulldata, + pointer calldata) +{ + NewClientInfoRec *pci = (NewClientInfoRec *)calldata; + ClientPtr client = pci->client; + if (client->clientState == ClientStateGone + || client->clientState == ClientStateRetained) + XevieEnd(client->index); +} + +static void +XevieServerGrabStateCallback(CallbackListPtr *pcbl, pointer nulldata, + pointer 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, pointer 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,pointer 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= (pointer)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/xorg-server-1.4/Xext/xf86bigfont.c b/xorg-server-1.4/Xext/xf86bigfont.c new file mode 100644 index 0000000..f50481f --- /dev/null +++ b/xorg-server-1.4/Xext/xf86bigfont.c @@ -0,0 +1,788 @@ +/* + * BIGFONT extension for sharing font metrics between clients (if possible) + * and for transmitting font metrics to clients in a compressed form. + * + * Copyright (c) 1999-2000 Bruno Haible + * Copyright (c) 1999-2000 The XFree86 Project, Inc. + */ + +/* THIS IS NOT AN X CONSORTIUM STANDARD */ + +/* + * Big fonts suffer from the following: All clients that have opened a + * font can access the complete glyph metrics array (the XFontStruct member + * `per_char') directly, without going through a macro. Moreover these + * glyph metrics are ink metrics, i.e. are not redundant even for a + * fixed-width font. For a Unicode font, the size of this array is 768 KB. + * + * Problems: 1. It eats a lot of memory in each client. 2. All this glyph + * metrics data is piped through the socket when the font is opened. + * + * This extension addresses these two problems for local clients, by using + * shared memory. It also addresses the second problem for non-local clients, + * by compressing the data before transmit by a factor of nearly 6. + * + * If you use this extension, your OS ought to nicely support shared memory. + * This means: Shared memory should be swappable to the swap, and the limits + * should be high enough (SHMMNI at least 64, SHMMAX at least 768 KB, + * SHMALL at least 48 MB). It is a plus if your OS allows shmat() calls + * on segments that have already been marked "removed", because it permits + * these segments to be cleaned up by the OS if the X server is killed with + * signal SIGKILL. + * + * This extension is transparently exploited by Xlib (functions XQueryFont, + * XLoadQueryFont). + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#ifdef HAS_SHM +#if defined(linux) && (!defined(__GNU_LIBRARY__) || __GNU_LIBRARY__ < 2) +/* libc4 does not define __GNU_LIBRARY__, libc5 defines __GNU_LIBRARY__ as 1 */ +/* Linux libc4 and libc5 only (because glibc doesn't include kernel headers): + Linux 2.0.x and 2.2.x define SHMLBA as PAGE_SIZE, but forget to define + PAGE_SIZE. It is defined in . */ +#include +#endif +#ifdef SVR4 +#include +#endif +#if defined(ISC) || defined(__CYGWIN__) || defined(__SCO__) +#include +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#endif + +#include +#include +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "gcstruct.h" +#include "dixfontstr.h" +#include "extnsionst.h" + +#define _XF86BIGFONT_SERVER_ +#include + +static void XF86BigfontResetProc( + ExtensionEntry * /* extEntry */ + ); + +static DISPATCH_PROC(ProcXF86BigfontDispatch); +static DISPATCH_PROC(ProcXF86BigfontQueryVersion); +static DISPATCH_PROC(ProcXF86BigfontQueryFont); +static DISPATCH_PROC(SProcXF86BigfontDispatch); +static DISPATCH_PROC(SProcXF86BigfontQueryVersion); +static DISPATCH_PROC(SProcXF86BigfontQueryFont); + +#if 0 +static unsigned char XF86BigfontReqCode; +#endif + +#ifdef HAS_SHM + +/* A random signature, transmitted to the clients so they can verify that the + shared memory segment they are attaching to was really established by the + X server they are talking to. */ +static CARD32 signature; + +/* Index for additional information stored in a FontRec's devPrivates array. */ +static int FontShmdescIndex; + +static unsigned int pagesize; + +static Bool badSysCall = FALSE; + +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) + +#include + +static void +SigSysHandler( + int signo) +{ + badSysCall = TRUE; +} + +static Bool +CheckForShmSyscall(void) +{ + void (*oldHandler)(int); + int shmid = -1; + + /* If no SHM support in the kernel, the bad syscall will generate SIGSYS */ + oldHandler = signal(SIGSYS, SigSysHandler); + + badSysCall = FALSE; + shmid = shmget(IPC_PRIVATE, 4096, IPC_CREAT); + if (shmid != -1) + { + /* Successful allocation - clean up */ + shmctl(shmid, IPC_RMID, (struct shmid_ds *)NULL); + } + else + { + /* Allocation failed */ + badSysCall = TRUE; + } + signal(SIGSYS, oldHandler); + return (!badSysCall); +} + +#define MUST_CHECK_FOR_SHM_SYSCALL + +#endif + +#endif + +void +XFree86BigfontExtensionInit() +{ +#if 0 + ExtensionEntry* extEntry; + + if ((extEntry = AddExtension(XF86BIGFONTNAME, + XF86BigfontNumberEvents, + XF86BigfontNumberErrors, + ProcXF86BigfontDispatch, + SProcXF86BigfontDispatch, + XF86BigfontResetProc, + StandardMinorOpcode))) { + XF86BigfontReqCode = (unsigned char) extEntry->base; +#else + if (AddExtension(XF86BIGFONTNAME, + XF86BigfontNumberEvents, + XF86BigfontNumberErrors, + ProcXF86BigfontDispatch, + SProcXF86BigfontDispatch, + XF86BigfontResetProc, + StandardMinorOpcode)) { +#endif +#ifdef HAS_SHM +#ifdef MUST_CHECK_FOR_SHM_SYSCALL + /* + * Note: Local-clients will not be optimized without shared memory + * support. Remote-client optimization does not depend on shared + * memory support. Thus, the extension is still registered even + * when shared memory support is not functional. + */ + if (!CheckForShmSyscall()) { + ErrorF(XF86BIGFONTNAME " extension local-client optimization disabled due to lack of shared memory support in the kernel\n"); + return; + } +#endif + + srand((unsigned int) time(NULL)); + signature = ((unsigned int) (65536.0/(RAND_MAX+1.0) * rand()) << 16) + + (unsigned int) (65536.0/(RAND_MAX+1.0) * rand()); + /* fprintf(stderr, "signature = 0x%08X\n", signature); */ + + FontShmdescIndex = AllocateFontPrivateIndex(); + +#if !defined(CSRG_BASED) && !defined(__CYGWIN__) + pagesize = SHMLBA; +#else +# ifdef _SC_PAGESIZE + pagesize = sysconf(_SC_PAGESIZE); +# else + pagesize = getpagesize(); +# endif +#endif +#endif + } +} + + +/* ========== Management of shared memory segments ========== */ + +#ifdef HAS_SHM + +#ifdef __linux__ +/* On Linux, shared memory marked as "removed" can still be attached. + Nice feature, because the kernel will automatically free the associated + storage when the server and all clients are gone. */ +#define EARLY_REMOVE +#endif + +typedef struct _ShmDesc { + struct _ShmDesc *next; + struct _ShmDesc **prev; + int shmid; + char *attach_addr; +} ShmDescRec, *ShmDescPtr; + +static ShmDescPtr ShmList = (ShmDescPtr) NULL; + +static ShmDescPtr +shmalloc( + unsigned int size) +{ + ShmDescPtr pDesc; + int shmid; + char *addr; + +#ifdef MUST_CHECK_FOR_SHM_SYSCALL + if (pagesize == 0) + return (ShmDescPtr) NULL; +#endif + + /* On some older Linux systems, the number of shared memory segments + system-wide is 127. In Linux 2.4, it is 4095. + Therefore there is a tradeoff to be made between allocating a + shared memory segment on one hand, and allocating memory and piping + the glyph metrics on the other hand. If the glyph metrics size is + small, we prefer the traditional way. */ + if (size < 3500) + return (ShmDescPtr) NULL; + + pDesc = (ShmDescRec *) xalloc(sizeof(ShmDescRec)); + if (!pDesc) + return (ShmDescPtr) NULL; + + size = (size + pagesize-1) & -pagesize; + shmid = shmget(IPC_PRIVATE, size, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH); + if (shmid == -1) { + ErrorF(XF86BIGFONTNAME " extension: shmget() failed, size = %u, errno = %d\n", + size, errno); + xfree(pDesc); + return (ShmDescPtr) NULL; + } + + if ((addr = shmat(shmid, 0, 0)) == (char *)-1) { + ErrorF(XF86BIGFONTNAME " extension: shmat() failed, size = %u, errno = %d\n", + size, errno); + shmctl(shmid, IPC_RMID, (void *) 0); + xfree(pDesc); + return (ShmDescPtr) NULL; + } + +#ifdef EARLY_REMOVE + shmctl(shmid, IPC_RMID, (void *) 0); +#endif + + pDesc->shmid = shmid; + pDesc->attach_addr = addr; + if (ShmList) ShmList->prev = &pDesc->next; + pDesc->next = ShmList; + pDesc->prev = &ShmList; + ShmList = pDesc; + + return pDesc; +} + +static void +shmdealloc( + ShmDescPtr pDesc) +{ +#ifndef EARLY_REMOVE + shmctl(pDesc->shmid, IPC_RMID, (void *) 0); +#endif + shmdt(pDesc->attach_addr); + + if (pDesc->next) pDesc->next->prev = pDesc->prev; + *pDesc->prev = pDesc->next; + xfree(pDesc); +} + +#endif + +/* Called when a font is closed. */ +void +XF86BigfontFreeFontShm( + FontPtr pFont) +{ +#ifdef HAS_SHM + ShmDescPtr pDesc; + + /* If during shutdown of the server, XF86BigfontCleanup() has already + * called shmdealloc() for all segments, we don't need to do it here. + */ + if (!ShmList) + return; + + pDesc = (ShmDescPtr) FontGetPrivate(pFont, FontShmdescIndex); + if (pDesc) + shmdealloc(pDesc); +#endif +} + +/* Called upon fatal signal. */ +void +XF86BigfontCleanup() +{ +#ifdef HAS_SHM + while (ShmList) + shmdealloc(ShmList); +#endif +} + +/* Called when a server generation dies. */ +static void +XF86BigfontResetProc( + ExtensionEntry* extEntry) +{ + /* This function is normally called from CloseDownExtensions(), called + * from main(). It will be followed by a call to FreeAllResources(), + * which will call XF86BigfontFreeFontShm() for each font. Thus it + * appears that we do not need to do anything in this function. -- + * But I prefer to write robust code, and not keep shared memory lying + * around when it's not needed any more. (Someone might close down the + * extension without calling FreeAllResources()...) + */ + XF86BigfontCleanup(); +} + + +/* ========== Handling of extension specific requests ========== */ + +static int +ProcXF86BigfontQueryVersion( + ClientPtr client) +{ + xXF86BigfontQueryVersionReply reply; + + REQUEST_SIZE_MATCH(xXF86BigfontQueryVersionReq); + reply.type = X_Reply; + reply.length = 0; + reply.sequenceNumber = client->sequence; + reply.majorVersion = XF86BIGFONT_MAJOR_VERSION; + reply.minorVersion = XF86BIGFONT_MINOR_VERSION; + reply.uid = geteuid(); + reply.gid = getegid(); +#ifdef HAS_SHM + reply.signature = signature; +#else + reply.signature = 0; /* This is redundant. Avoids uninitialized memory. */ +#endif + reply.capabilities = +#ifdef HAS_SHM + (LocalClient(client) && !client->swapped ? XF86Bigfont_CAP_LocalShm : 0) +#else + 0 +#endif + ; /* may add more bits here in future versions */ + if (client->swapped) { + char tmp; + swaps(&reply.sequenceNumber, tmp); + swapl(&reply.length, tmp); + swaps(&reply.majorVersion, tmp); + swaps(&reply.minorVersion, tmp); + swapl(&reply.uid, tmp); + swapl(&reply.gid, tmp); + swapl(&reply.signature, tmp); + } + WriteToClient(client, + sizeof(xXF86BigfontQueryVersionReply), (char *)&reply); + return client->noClientException; +} + +static void +swapCharInfo( + xCharInfo *pCI) +{ + char tmp; + + swaps(&pCI->leftSideBearing, tmp); + swaps(&pCI->rightSideBearing, tmp); + swaps(&pCI->characterWidth, tmp); + swaps(&pCI->ascent, tmp); + swaps(&pCI->descent, tmp); + swaps(&pCI->attributes, tmp); +} + +/* static CARD32 hashCI (xCharInfo *p); */ +#define hashCI(p) \ + (CARD32)(((p->leftSideBearing << 27) + (p->leftSideBearing >> 5) + \ + (p->rightSideBearing << 23) + (p->rightSideBearing >> 9) + \ + (p->characterWidth << 16) + \ + (p->ascent << 11) + (p->descent << 6)) ^ p->attributes) + +static int +ProcXF86BigfontQueryFont( + ClientPtr client) +{ + FontPtr pFont; + REQUEST(xXF86BigfontQueryFontReq); + CARD32 stuff_flags; + xCharInfo* pmax; + xCharInfo* pmin; + int nCharInfos; + int shmid; +#ifdef HAS_SHM + ShmDescPtr pDesc; +#else +#define pDesc 0 +#endif + xCharInfo* pCI; + CARD16* pIndex2UniqIndex; + CARD16* pUniqIndex2Index; + CARD32 nUniqCharInfos; + +#if 0 + REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq); +#else + switch (client->req_len) { + case 2: /* client with version 1.0 libX11 */ + stuff_flags = (LocalClient(client) && !client->swapped ? XF86Bigfont_FLAGS_Shm : 0); + break; + case 3: /* client with version 1.1 libX11 */ + stuff_flags = stuff->flags; + break; + default: + return BadLength; + } +#endif + client->errorValue = stuff->id; /* EITHER font or gc */ + pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT, + DixReadAccess); + if (!pFont) { + GC *pGC = (GC *) SecurityLookupIDByType(client, stuff->id, RT_GC, + DixReadAccess); + if (!pGC) { + client->errorValue = stuff->id; + return BadFont; /* procotol spec says only error is BadFont */ + } + pFont = pGC->font; + } + + pmax = FONTINKMAX(pFont); + pmin = FONTINKMIN(pFont); + nCharInfos = + (pmax->rightSideBearing == pmin->rightSideBearing + && pmax->leftSideBearing == pmin->leftSideBearing + && pmax->descent == pmin->descent + && pmax->ascent == pmin->ascent + && pmax->characterWidth == pmin->characterWidth) + ? 0 : N2dChars(pFont); + shmid = -1; + pCI = NULL; + pIndex2UniqIndex = NULL; + pUniqIndex2Index = NULL; + nUniqCharInfos = 0; + + if (nCharInfos > 0) { +#ifdef HAS_SHM + if (!badSysCall) + pDesc = (ShmDescPtr) FontGetPrivate(pFont, FontShmdescIndex); + else + pDesc = NULL; + if (pDesc) { + pCI = (xCharInfo *) pDesc->attach_addr; + if (stuff_flags & XF86Bigfont_FLAGS_Shm) + shmid = pDesc->shmid; + } else { + if (stuff_flags & XF86Bigfont_FLAGS_Shm && !badSysCall) + pDesc = shmalloc(nCharInfos * sizeof(xCharInfo) + + sizeof(CARD32)); + if (pDesc) { + pCI = (xCharInfo *) pDesc->attach_addr; + shmid = pDesc->shmid; + } else { +#endif + pCI = (xCharInfo *) + ALLOCATE_LOCAL(nCharInfos * sizeof(xCharInfo)); + if (!pCI) + return BadAlloc; +#ifdef HAS_SHM + } +#endif + /* Fill nCharInfos starting at pCI. */ + { + xCharInfo* prCI = pCI; + int ninfos = 0; + int ncols = pFont->info.lastCol - pFont->info.firstCol + 1; + int row; + for (row = pFont->info.firstRow; + row <= pFont->info.lastRow && ninfos < nCharInfos; + row++) { + unsigned char chars[512]; + xCharInfo* tmpCharInfos[256]; + unsigned long count; + int col; + unsigned long i; + i = 0; + for (col = pFont->info.firstCol; + col <= pFont->info.lastCol; + col++) { + chars[i++] = row; + chars[i++] = col; + } + (*pFont->get_metrics) (pFont, ncols, chars, TwoD16Bit, + &count, tmpCharInfos); + for (i = 0; i < count && ninfos < nCharInfos; i++) { + *prCI++ = *tmpCharInfos[i]; + ninfos++; + } + } + } +#ifdef HAS_SHM + if (pDesc && !badSysCall) { + *(CARD32 *)(pCI + nCharInfos) = signature; + if (!FontSetPrivate(pFont, FontShmdescIndex, pDesc)) { + shmdealloc(pDesc); + return BadAlloc; + } + } + } +#endif + if (shmid == -1) { + /* Cannot use shared memory, so remove-duplicates the xCharInfos + using a temporary hash table. */ + /* Note that CARD16 is suitable as index type, because + nCharInfos <= 0x10000. */ + CARD32 hashModulus; + CARD16* pHash2UniqIndex; + CARD16* pUniqIndex2NextUniqIndex; + CARD32 NextIndex; + CARD32 NextUniqIndex; + CARD16* tmp; + CARD32 i, j; + + hashModulus = 67; + if (hashModulus > nCharInfos+1) + hashModulus = nCharInfos+1; + + tmp = (CARD16*) + ALLOCATE_LOCAL((4*nCharInfos+1) * sizeof(CARD16)); + if (!tmp) { + if (!pDesc) DEALLOCATE_LOCAL(pCI); + return BadAlloc; + } + pIndex2UniqIndex = tmp; + /* nCharInfos elements */ + pUniqIndex2Index = tmp + nCharInfos; + /* max. nCharInfos elements */ + pUniqIndex2NextUniqIndex = tmp + 2*nCharInfos; + /* max. nCharInfos elements */ + pHash2UniqIndex = tmp + 3*nCharInfos; + /* hashModulus (<= nCharInfos+1) elements */ + + /* Note that we can use 0xffff as end-of-list indicator, because + even if nCharInfos = 0x10000, 0xffff can not occur as valid + entry before the last element has been inserted. And once the + last element has been inserted, we don't need the hash table + any more. */ + for (j = 0; j < hashModulus; j++) + pHash2UniqIndex[j] = (CARD16)(-1); + + NextUniqIndex = 0; + for (NextIndex = 0; NextIndex < nCharInfos; NextIndex++) { + xCharInfo* p = &pCI[NextIndex]; + CARD32 hashCode = hashCI(p) % hashModulus; + for (i = pHash2UniqIndex[hashCode]; + i != (CARD16)(-1); + i = pUniqIndex2NextUniqIndex[i]) { + j = pUniqIndex2Index[i]; + if (pCI[j].leftSideBearing == p->leftSideBearing + && pCI[j].rightSideBearing == p->rightSideBearing + && pCI[j].characterWidth == p->characterWidth + && pCI[j].ascent == p->ascent + && pCI[j].descent == p->descent + && pCI[j].attributes == p->attributes) + break; + } + if (i != (CARD16)(-1)) { + /* Found *p at Index j, UniqIndex i */ + pIndex2UniqIndex[NextIndex] = i; + } else { + /* Allocate a new entry in the Uniq table */ + if (hashModulus <= 2*NextUniqIndex + && hashModulus < nCharInfos+1) { + /* Time to increate hash table size */ + hashModulus = 2*hashModulus+1; + if (hashModulus > nCharInfos+1) + hashModulus = nCharInfos+1; + for (j = 0; j < hashModulus; j++) + pHash2UniqIndex[j] = (CARD16)(-1); + for (i = 0; i < NextUniqIndex; i++) + pUniqIndex2NextUniqIndex[i] = (CARD16)(-1); + for (i = 0; i < NextUniqIndex; i++) { + j = pUniqIndex2Index[i]; + p = &pCI[j]; + hashCode = hashCI(p) % hashModulus; + pUniqIndex2NextUniqIndex[i] = pHash2UniqIndex[hashCode]; + pHash2UniqIndex[hashCode] = i; + } + p = &pCI[NextIndex]; + hashCode = hashCI(p) % hashModulus; + } + i = NextUniqIndex++; + pUniqIndex2NextUniqIndex[i] = pHash2UniqIndex[hashCode]; + pHash2UniqIndex[hashCode] = i; + pUniqIndex2Index[i] = NextIndex; + pIndex2UniqIndex[NextIndex] = i; + } + } + nUniqCharInfos = NextUniqIndex; + /* fprintf(stderr, "font metrics: nCharInfos = %d, nUniqCharInfos = %d, hashModulus = %d\n", nCharInfos, nUniqCharInfos, hashModulus); */ + } + } + + { + int nfontprops = pFont->info.nprops; + int rlength = + sizeof(xXF86BigfontQueryFontReply) + + nfontprops * sizeof(xFontProp) + + (nCharInfos > 0 && shmid == -1 + ? nUniqCharInfos * sizeof(xCharInfo) + + (nCharInfos+1)/2 * 2 * sizeof(CARD16) + : 0); + xXF86BigfontQueryFontReply* reply = + (xXF86BigfontQueryFontReply *) ALLOCATE_LOCAL(rlength); + char* p; + if (!reply) { + if (nCharInfos > 0) { + if (shmid == -1) DEALLOCATE_LOCAL(pIndex2UniqIndex); + if (!pDesc) DEALLOCATE_LOCAL(pCI); + } + return BadAlloc; + } + reply->type = X_Reply; + reply->length = (rlength - sizeof(xGenericReply)) >> 2; + reply->sequenceNumber = client->sequence; + reply->minBounds = pFont->info.ink_minbounds; + reply->maxBounds = pFont->info.ink_maxbounds; + reply->minCharOrByte2 = pFont->info.firstCol; + reply->maxCharOrByte2 = pFont->info.lastCol; + reply->defaultChar = pFont->info.defaultCh; + reply->nFontProps = pFont->info.nprops; + reply->drawDirection = pFont->info.drawDirection; + reply->minByte1 = pFont->info.firstRow; + reply->maxByte1 = pFont->info.lastRow; + reply->allCharsExist = pFont->info.allExist; + reply->fontAscent = pFont->info.fontAscent; + reply->fontDescent = pFont->info.fontDescent; + reply->nCharInfos = nCharInfos; + reply->nUniqCharInfos = nUniqCharInfos; + reply->shmid = shmid; + reply->shmsegoffset = 0; + if (client->swapped) { + char tmp; + swaps(&reply->sequenceNumber, tmp); + swapl(&reply->length, tmp); + swapCharInfo(&reply->minBounds); + swapCharInfo(&reply->maxBounds); + swaps(&reply->minCharOrByte2, tmp); + swaps(&reply->maxCharOrByte2, tmp); + swaps(&reply->defaultChar, tmp); + swaps(&reply->nFontProps, tmp); + swaps(&reply->fontAscent, tmp); + swaps(&reply->fontDescent, tmp); + swapl(&reply->nCharInfos, tmp); + swapl(&reply->nUniqCharInfos, tmp); + swapl(&reply->shmid, tmp); + swapl(&reply->shmsegoffset, tmp); + } + p = (char*) &reply[1]; + { + FontPropPtr pFP; + xFontProp* prFP; + int i; + for (i = 0, pFP = pFont->info.props, prFP = (xFontProp *) p; + i < nfontprops; + i++, pFP++, prFP++) { + prFP->name = pFP->name; + prFP->value = pFP->value; + if (client->swapped) { + char tmp; + swapl(&prFP->name, tmp); + swapl(&prFP->value, tmp); + } + } + p = (char*) prFP; + } + if (nCharInfos > 0 && shmid == -1) { + xCharInfo* pci; + CARD16* ps; + int i, j; + pci = (xCharInfo*) p; + for (i = 0; i < nUniqCharInfos; i++, pci++) { + *pci = pCI[pUniqIndex2Index[i]]; + if (client->swapped) + swapCharInfo(pci); + } + ps = (CARD16*) pci; + for (j = 0; j < nCharInfos; j++, ps++) { + *ps = pIndex2UniqIndex[j]; + if (client->swapped) { + char tmp; + swaps(ps, tmp); + } + } + } + WriteToClient(client, rlength, (char *)reply); + DEALLOCATE_LOCAL(reply); + if (nCharInfos > 0) { + if (shmid == -1) DEALLOCATE_LOCAL(pIndex2UniqIndex); + if (!pDesc) DEALLOCATE_LOCAL(pCI); + } + return (client->noClientException); + } +} + +static int +ProcXF86BigfontDispatch( + ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) { + case X_XF86BigfontQueryVersion: + return ProcXF86BigfontQueryVersion(client); + case X_XF86BigfontQueryFont: + return ProcXF86BigfontQueryFont(client); + default: + return BadRequest; + } +} + +static int +SProcXF86BigfontQueryVersion( + ClientPtr client) +{ + REQUEST(xXF86BigfontQueryVersionReq); + char tmp; + + swaps(&stuff->length, tmp); + return ProcXF86BigfontQueryVersion(client); +} + +static int +SProcXF86BigfontQueryFont( + ClientPtr client) +{ + REQUEST(xXF86BigfontQueryFontReq); + char tmp; + + swaps(&stuff->length, tmp); + REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq); + swapl(&stuff->id, tmp); + return ProcXF86BigfontQueryFont(client); +} + +static int +SProcXF86BigfontDispatch( + ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) { + case X_XF86BigfontQueryVersion: + return SProcXF86BigfontQueryVersion(client); + case X_XF86BigfontQueryFont: + return SProcXF86BigfontQueryFont(client); + default: + return BadRequest; + } +} diff --git a/xorg-server-1.4/Xext/xprint.c b/xorg-server-1.4/Xext/xprint.c new file mode 100644 index 0000000..4ac13e6 --- /dev/null +++ b/xorg-server-1.4/Xext/xprint.c @@ -0,0 +1,2762 @@ +/* +(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. +** * +** ********************************************************* +** +********************************************************************/ + +#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 "../hw/xprint/DiPrint.h" +#include "../hw/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, + DixReadAccess)) + == (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, + DixWriteAccess)) + == (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, + DixReadAccess)) + == (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, + DixWriteAccess)) + == (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, + DixDestroyAccess)) + == (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, + DixReadAccess)) + == (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; + + result = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (result != Success) + return result; + if (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; + result = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixUnknownAccess); + if (result != Success) + return result; + if (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, + DixWriteAccess)) + == (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, + DixReadAccess)) + == (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, + DixWriteAccess)) + == (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, + DixReadAccess)) + == (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, + DixWriteAccess)) + == (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, + DixReadAccess)) + == (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/xorg-server-1.4/Xext/xres.c b/xorg-server-1.4/Xext/xres.c new file mode 100644 index 0000000..1617337 --- /dev/null +++ b/xorg-server-1.4/Xext/xres.c @@ -0,0 +1,401 @@ +/* + Copyright (c) 2002 XFree86 Inc +*/ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "swaprep.h" +#include +#include "pixmapstr.h" +#include "windowstr.h" +#include "gcstruct.h" +#include "modinit.h" + +static int +ProcXResQueryVersion (ClientPtr client) +{ + REQUEST(xXResQueryVersionReq); + xXResQueryVersionReply rep; + CARD16 client_major, client_minor; /* not used */ + + REQUEST_SIZE_MATCH (xXResQueryVersionReq); + + client_major = stuff->client_major; + client_minor = stuff->client_minor; + (void) client_major; + (void) client_minor; + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.server_major = XRES_MAJOR_VERSION; + rep.server_minor = XRES_MINOR_VERSION; + if (client->swapped) { + int n; + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swaps(&rep.server_major, n); + swaps(&rep.server_minor, n); + } + WriteToClient(client, sizeof (xXResQueryVersionReply), (char *)&rep); + return (client->noClientException); +} + +static int +ProcXResQueryClients (ClientPtr client) +{ + /* REQUEST(xXResQueryClientsReq); */ + xXResQueryClientsReply rep; + int *current_clients; + int i, num_clients; + + REQUEST_SIZE_MATCH(xXResQueryClientsReq); + + current_clients = ALLOCATE_LOCAL((currentMaxClients - 1) * sizeof(int)); + + num_clients = 0; + for(i = 1; i < currentMaxClients; i++) { + if(clients[i]) { + current_clients[num_clients] = i; + num_clients++; + } + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.num_clients = num_clients; + rep.length = rep.num_clients * sz_xXResClient >> 2; + if (client->swapped) { + int n; + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.num_clients, n); + } + WriteToClient (client, sizeof (xXResQueryClientsReply), (char *) &rep); + + if(num_clients) { + xXResClient scratch; + + for(i = 0; i < num_clients; i++) { + scratch.resource_base = clients[current_clients[i]]->clientAsMask; + scratch.resource_mask = RESOURCE_ID_MASK; + + if(client->swapped) { + register int n; + swapl (&scratch.resource_base, n); + swapl (&scratch.resource_mask, n); + } + WriteToClient (client, sz_xXResClient, (char *) &scratch); + } + } + + DEALLOCATE_LOCAL(current_clients); + + return (client->noClientException); +} + + +static void +ResFindAllRes (pointer value, XID id, RESTYPE type, pointer cdata) +{ + int *counts = (int *)cdata; + + counts[(type & TypeMask) - 1]++; +} + +static int +ProcXResQueryClientResources (ClientPtr client) +{ + REQUEST(xXResQueryClientResourcesReq); + xXResQueryClientResourcesReply rep; + int i, clientID, num_types; + int *counts; + + REQUEST_SIZE_MATCH(xXResQueryClientResourcesReq); + + clientID = CLIENT_ID(stuff->xid); + + /* we could remove the (clientID == 0) check if we wanted to allow + probing the X-server's resource usage */ + if(!clientID || (clientID >= currentMaxClients) || !clients[clientID]) { + client->errorValue = stuff->xid; + return BadValue; + } + + counts = ALLOCATE_LOCAL((lastResourceType + 1) * sizeof(int)); + + memset(counts, 0, (lastResourceType + 1) * sizeof(int)); + + FindAllClientResources(clients[clientID], ResFindAllRes, counts); + + num_types = 0; + + for(i = 0; i <= lastResourceType; i++) { + if(counts[i]) num_types++; + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.num_types = num_types; + rep.length = rep.num_types * sz_xXResType >> 2; + if (client->swapped) { + int n; + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.num_types, n); + } + + WriteToClient (client,sizeof(xXResQueryClientResourcesReply),(char*)&rep); + + if(num_types) { + xXResType scratch; + + for(i = 0; i < lastResourceType; i++) { + if(!counts[i]) continue; + + if(!ResourceNames[i + 1]) { + char buf[40]; + snprintf(buf, sizeof(buf), "Unregistered resource %i", i + 1); + RegisterResourceName(i + 1, buf); + } + + scratch.resource_type = ResourceNames[i + 1]; + scratch.count = counts[i]; + + if(client->swapped) { + register int n; + swapl (&scratch.resource_type, n); + swapl (&scratch.count, n); + } + WriteToClient (client, sz_xXResType, (char *) &scratch); + } + } + + DEALLOCATE_LOCAL(counts); + + return (client->noClientException); +} + +static unsigned long +ResGetApproxPixmapBytes (PixmapPtr pix) +{ + unsigned long nPixels; + int bytesPerPixel; + + bytesPerPixel = pix->drawable.bitsPerPixel>>3; + nPixels = pix->drawable.width * pix->drawable.height; + + /* Divide by refcnt as pixmap could be shared between clients, + * so total pixmap mem is shared between these. + */ + return ( nPixels * bytesPerPixel ) / pix->refcnt; +} + +static void +ResFindPixmaps (pointer value, XID id, pointer cdata) +{ + unsigned long *bytes = (unsigned long *)cdata; + PixmapPtr pix = (PixmapPtr)value; + + *bytes += ResGetApproxPixmapBytes(pix); +} + +static void +ResFindWindowPixmaps (pointer value, XID id, pointer cdata) +{ + unsigned long *bytes = (unsigned long *)cdata; + WindowPtr pWin = (WindowPtr)value; + + if (pWin->backgroundState == BackgroundPixmap) + *bytes += ResGetApproxPixmapBytes(pWin->background.pixmap); + + if (pWin->border.pixmap != NULL && !pWin->borderIsPixel) + *bytes += ResGetApproxPixmapBytes(pWin->border.pixmap); +} + +static void +ResFindGCPixmaps (pointer value, XID id, pointer cdata) +{ + unsigned long *bytes = (unsigned long *)cdata; + GCPtr pGC = (GCPtr)value; + + if (pGC->stipple != NULL) + *bytes += ResGetApproxPixmapBytes(pGC->stipple); + + if (pGC->tile.pixmap != NULL && !pGC->tileIsPixel) + *bytes += ResGetApproxPixmapBytes(pGC->tile.pixmap); +} + +static int +ProcXResQueryClientPixmapBytes (ClientPtr client) +{ + REQUEST(xXResQueryClientPixmapBytesReq); + xXResQueryClientPixmapBytesReply rep; + int clientID; + unsigned long bytes; + + REQUEST_SIZE_MATCH(xXResQueryClientPixmapBytesReq); + + clientID = CLIENT_ID(stuff->xid); + + /* we could remove the (clientID == 0) check if we wanted to allow + probing the X-server's resource usage */ + if(!clientID || (clientID >= currentMaxClients) || !clients[clientID]) { + client->errorValue = stuff->xid; + return BadValue; + } + + bytes = 0; + + FindClientResourcesByType(clients[clientID], RT_PIXMAP, ResFindPixmaps, + (pointer)(&bytes)); + + /* + * Make sure win background pixmaps also held to account. + */ + FindClientResourcesByType(clients[clientID], RT_WINDOW, + ResFindWindowPixmaps, + (pointer)(&bytes)); + + /* + * GC Tile & Stipple pixmaps too. + */ + FindClientResourcesByType(clients[clientID], RT_GC, + ResFindGCPixmaps, + (pointer)(&bytes)); + +#ifdef COMPOSITE + /* FIXME: include composite pixmaps too */ +#endif + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + rep.bytes = bytes; +#ifdef _XSERVER64 + rep.bytes_overflow = bytes >> 32; +#else + rep.bytes_overflow = 0; +#endif + if (client->swapped) { + int n; + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.bytes, n); + swapl (&rep.bytes_overflow, n); + } + WriteToClient (client,sizeof(xXResQueryClientPixmapBytesReply),(char*)&rep); + + return (client->noClientException); +} + + +static void +ResResetProc (ExtensionEntry *extEntry) { } + +static int +ProcResDispatch (ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_XResQueryVersion: + return ProcXResQueryVersion(client); + case X_XResQueryClients: + return ProcXResQueryClients(client); + case X_XResQueryClientResources: + return ProcXResQueryClientResources(client); + case X_XResQueryClientPixmapBytes: + return ProcXResQueryClientPixmapBytes(client); + default: break; + } + + return BadRequest; +} + +static int +SProcXResQueryVersion (ClientPtr client) +{ + REQUEST(xXResQueryVersionReq); + int n; + + REQUEST_SIZE_MATCH (xXResQueryVersionReq); + swaps(&stuff->client_major,n); + swaps(&stuff->client_minor,n); + return ProcXResQueryVersion(client); +} + +static int +SProcXResQueryClientResources (ClientPtr client) +{ + REQUEST(xXResQueryClientResourcesReq); + int n; + + REQUEST_SIZE_MATCH (xXResQueryClientResourcesReq); + swaps(&stuff->xid,n); + return ProcXResQueryClientResources(client); +} + +static int +SProcXResQueryClientPixmapBytes (ClientPtr client) +{ + REQUEST(xXResQueryClientPixmapBytesReq); + int n; + + REQUEST_SIZE_MATCH (xXResQueryClientPixmapBytesReq); + swaps(&stuff->xid,n); + return ProcXResQueryClientPixmapBytes(client); +} + +static int +SProcResDispatch (ClientPtr client) +{ + REQUEST(xReq); + int n; + + swaps(&stuff->length,n); + + switch (stuff->data) { + case X_XResQueryVersion: + return SProcXResQueryVersion(client); + case X_XResQueryClients: /* nothing to swap */ + return ProcXResQueryClients(client); + case X_XResQueryClientResources: + return SProcXResQueryClientResources(client); + case X_XResQueryClientPixmapBytes: + return SProcXResQueryClientPixmapBytes(client); + default: break; + } + + return BadRequest; +} + +void +ResExtensionInit(INITARGS) +{ + (void) AddExtension(XRES_NAME, 0, 0, + ProcResDispatch, SProcResDispatch, + ResResetProc, StandardMinorOpcode); + + RegisterResourceName(RT_NONE, "NONE"); + RegisterResourceName(RT_WINDOW, "WINDOW"); + RegisterResourceName(RT_PIXMAP, "PIXMAP"); + RegisterResourceName(RT_GC, "GC"); + RegisterResourceName(RT_FONT, "FONT"); + RegisterResourceName(RT_CURSOR, "CURSOR"); + RegisterResourceName(RT_COLORMAP, "COLORMAP"); + RegisterResourceName(RT_CMAPENTRY, "COLORMAP ENTRY"); + RegisterResourceName(RT_OTHERCLIENT, "OTHER CLIENT"); + RegisterResourceName(RT_PASSIVEGRAB, "PASSIVE GRAB"); +} diff --git a/xorg-server-1.4/Xext/xtest.c b/xorg-server-1.4/Xext/xtest.c new file mode 100644 index 0000000..94d8974 --- /dev/null +++ b/xorg-server-1.4/Xext/xtest.c @@ -0,0 +1,603 @@ +/* + +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. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#define NEED_EVENTS +#include +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "windowstr.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "dixevents.h" +#include "sleepuntil.h" +#define _XTEST_SERVER_ +#include +#include +#ifdef XINPUT +#include +#include +#define EXTENSION_EVENT_BASE 64 +#include "extinit.h" /* LookupDeviceIntRec */ +#endif /* XINPUT */ + +#include "modinit.h" + +#if 0 +static unsigned char XTestReqCode; +#endif + +#ifdef XINPUT +extern int DeviceValuator; +#endif /* XINPUT */ + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif + +static void XTestResetProc( + ExtensionEntry * /* extEntry */ +); +static int XTestSwapFakeInput( + ClientPtr /* client */, + xReq * /* req */ +); + +static DISPATCH_PROC(ProcXTestCompareCursor); +static DISPATCH_PROC(ProcXTestDispatch); +static DISPATCH_PROC(ProcXTestFakeInput); +static DISPATCH_PROC(ProcXTestGetVersion); +static DISPATCH_PROC(ProcXTestGrabControl); +static DISPATCH_PROC(SProcXTestCompareCursor); +static DISPATCH_PROC(SProcXTestDispatch); +static DISPATCH_PROC(SProcXTestFakeInput); +static DISPATCH_PROC(SProcXTestGetVersion); +static DISPATCH_PROC(SProcXTestGrabControl); + +void +XTestExtensionInit(INITARGS) +{ +#if 0 + ExtensionEntry *extEntry; + + if ((extEntry = AddExtension(XTestExtensionName, 0, 0, + ProcXTestDispatch, SProcXTestDispatch, + XTestResetProc, StandardMinorOpcode)) != 0) + XTestReqCode = (unsigned char)extEntry->base; +#else + (void) AddExtension(XTestExtensionName, 0, 0, + ProcXTestDispatch, SProcXTestDispatch, + XTestResetProc, StandardMinorOpcode); +#endif +} + +/*ARGSUSED*/ +static void +XTestResetProc (extEntry) +ExtensionEntry *extEntry; +{ +} + +static int +ProcXTestGetVersion(client) + register ClientPtr client; +{ + xXTestGetVersionReply rep; + register int n; + + REQUEST_SIZE_MATCH(xXTestGetVersionReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.majorVersion = XTestMajorVersion; + rep.minorVersion = XTestMinorVersion; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swaps(&rep.minorVersion, n); + } + WriteToClient(client, sizeof(xXTestGetVersionReply), (char *)&rep); + return(client->noClientException); +} + +static int +ProcXTestCompareCursor(client) + register ClientPtr client; +{ + REQUEST(xXTestCompareCursorReq); + xXTestCompareCursorReply rep; + WindowPtr pWin; + CursorPtr pCursor; + register int n, rc; + + REQUEST_SIZE_MATCH(xXTestCompareCursorReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; + if (stuff->cursor == None) + pCursor = NullCursor; + else if (stuff->cursor == XTestCurrentCursor) + pCursor = GetSpriteCursor(); + else { + pCursor = (CursorPtr)LookupIDByType(stuff->cursor, RT_CURSOR); + if (!pCursor) + { + client->errorValue = stuff->cursor; + return (BadCursor); + } + } + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.same = (wCursor(pWin) == pCursor); + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + } + WriteToClient(client, sizeof(xXTestCompareCursorReply), (char *)&rep); + return(client->noClientException); +} + +static int +ProcXTestFakeInput(client) + register ClientPtr client; +{ + REQUEST(xXTestFakeInputReq); + int nev, n, type, rc; + xEvent *ev; + DeviceIntPtr dev = NULL; + WindowPtr root; +#ifdef XINPUT + Bool extension = FALSE; + deviceValuator *dv = NULL; + int base; + int *values; +#endif /* XINPUT */ + + nev = (stuff->length << 2) - sizeof(xReq); + if ((nev % sizeof(xEvent)) || !nev) + return BadLength; + nev /= sizeof(xEvent); + UpdateCurrentTime(); + ev = (xEvent *)&((xReq *)stuff)[1]; + type = ev->u.u.type & 0177; +#ifdef XINPUT + if (type >= EXTENSION_EVENT_BASE) + { + type -= DeviceValuator; + switch (type) { + case XI_DeviceKeyPress: + case XI_DeviceKeyRelease: + case XI_DeviceButtonPress: + case XI_DeviceButtonRelease: + case XI_DeviceMotionNotify: + case XI_ProximityIn: + case XI_ProximityOut: + break; + default: + client->errorValue = ev->u.u.type; + return BadValue; + } + if (nev == 1 && type == XI_DeviceMotionNotify) + return BadLength; + if (type == XI_DeviceMotionNotify) + base = ((deviceValuator *)(ev+1))->first_valuator; + else + base = 0; + for (n = 1; n < nev; n++) + { + dv = (deviceValuator *)(ev + n); + if (dv->type != DeviceValuator) + { + client->errorValue = dv->type; + return BadValue; + } + if (dv->first_valuator != base) + { + client->errorValue = dv->first_valuator; + return BadValue; + } + if (!dv->num_valuators || dv->num_valuators > 6) + { + client->errorValue = dv->num_valuators; + return BadValue; + } + base += dv->num_valuators; + } + type = type - XI_DeviceKeyPress + KeyPress; + extension = TRUE; + } + else +#endif /* XINPUT */ + { + if (nev != 1) + return BadLength; + switch (type) + { + case KeyPress: + case KeyRelease: + case MotionNotify: + case ButtonPress: + case ButtonRelease: + break; + default: + client->errorValue = ev->u.u.type; + return BadValue; + } + } + if (ev->u.keyButtonPointer.time) + { + TimeStamp activateTime; + CARD32 ms; + + activateTime = currentTime; + ms = activateTime.milliseconds + ev->u.keyButtonPointer.time; + if (ms < activateTime.milliseconds) + activateTime.months++; + activateTime.milliseconds = ms; + ev->u.keyButtonPointer.time = 0; + + /* see mbuf.c:QueueDisplayRequest for code similar to this */ + + if (!ClientSleepUntil(client, &activateTime, NULL, NULL)) + { + return BadAlloc; + } + /* swap the request back so we can simply re-execute it */ + if (client->swapped) + { + (void) XTestSwapFakeInput(client, (xReq *)stuff); + swaps(&stuff->length, n); + } + ResetCurrentRequest (client); + client->sequence--; + return Success; + } +#ifdef XINPUT + if (extension) + { + dev = LookupDeviceIntRec(stuff->deviceid & 0177); + if (!dev) + { + client->errorValue = stuff->deviceid & 0177; + return BadValue; + } + if (nev > 1) + { + dv = (deviceValuator *)(ev + 1); + if (!dev->valuator || dv->first_valuator >= dev->valuator->numAxes) + { + client->errorValue = dv->first_valuator; + return BadValue; + } + if (dv->first_valuator + dv->num_valuators > + dev->valuator->numAxes) + { + client->errorValue = dv->num_valuators; + return BadValue; + } + } + } +#endif /* XINPUT */ + switch (type) + { + case KeyPress: + case KeyRelease: +#ifdef XINPUT + if (!extension) +#endif /* XINPUT */ + dev = (DeviceIntPtr)LookupKeyboardDevice(); + if (ev->u.u.detail < dev->key->curKeySyms.minKeyCode || + ev->u.u.detail > dev->key->curKeySyms.maxKeyCode) + { + client->errorValue = ev->u.u.detail; + return BadValue; + } + break; + case MotionNotify: +#ifdef XINPUT + if (extension) + { + if (ev->u.u.detail != xFalse && ev->u.u.detail != xTrue) + { + client->errorValue = ev->u.u.detail; + return BadValue; + } + if (ev->u.u.detail == xTrue && dev->valuator->mode == Absolute) + { + values = dev->valuator->axisVal + dv->first_valuator; + for (n = 1; n < nev; n++) + { + dv = (deviceValuator *)(ev + n); + switch (dv->num_valuators) + { + case 6: + dv->valuator5 += values[5]; + case 5: + dv->valuator4 += values[4]; + case 4: + dv->valuator3 += values[3]; + case 3: + dv->valuator2 += values[2]; + case 2: + dv->valuator1 += values[1]; + case 1: + dv->valuator0 += values[0]; + } + values += 6; + } + } + break; + } +#endif /* XINPUT */ + dev = (DeviceIntPtr)LookupPointerDevice(); + if (ev->u.keyButtonPointer.root == None) + root = GetCurrentRootWindow(); + else + { + rc = dixLookupWindow(&root, ev->u.keyButtonPointer.root, client, + DixUnknownAccess); + if (rc != Success) + return rc; + if (root->parent) + { + client->errorValue = ev->u.keyButtonPointer.root; + return BadValue; + } + } + if (ev->u.u.detail == xTrue) + { + int x, y; + GetSpritePosition(&x, &y); + ev->u.keyButtonPointer.rootX += x; + ev->u.keyButtonPointer.rootY += y; + } + else if (ev->u.u.detail != xFalse) + { + client->errorValue = ev->u.u.detail; + return BadValue; + } + +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + ScreenPtr pScreen = root->drawable.pScreen; + BoxRec box; + int i; + int x = ev->u.keyButtonPointer.rootX + panoramiXdataPtr[0].x; + int y = ev->u.keyButtonPointer.rootY + panoramiXdataPtr[0].y; + if (!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum], + x, y, &box)) { + FOR_NSCREENS(i) { + if (i == pScreen->myNum) continue; + if (POINT_IN_REGION(pScreen, + &XineramaScreenRegions[i], + x, y, &box)) { + root = WindowTable[i]; + x -= panoramiXdataPtr[i].x; + y -= panoramiXdataPtr[i].y; + ev->u.keyButtonPointer.rootX = x; + ev->u.keyButtonPointer.rootY = y; + break; + } + } + } + } +#endif + + if (ev->u.keyButtonPointer.rootX < 0) + ev->u.keyButtonPointer.rootX = 0; + else if (ev->u.keyButtonPointer.rootX >= root->drawable.width) + ev->u.keyButtonPointer.rootX = root->drawable.width - 1; + if (ev->u.keyButtonPointer.rootY < 0) + ev->u.keyButtonPointer.rootY = 0; + else if (ev->u.keyButtonPointer.rootY >= root->drawable.height) + ev->u.keyButtonPointer.rootY = root->drawable.height - 1; + +#ifdef PANORAMIX + if ((!noPanoramiXExtension + && root->drawable.pScreen->myNum != XineramaGetCursorScreen()) + || (noPanoramiXExtension && root != GetCurrentRootWindow())) + +#else + if (root != GetCurrentRootWindow()) +#endif + { + NewCurrentScreen(root->drawable.pScreen, + ev->u.keyButtonPointer.rootX, + ev->u.keyButtonPointer.rootY); + return client->noClientException; + } + (*root->drawable.pScreen->SetCursorPosition) + (root->drawable.pScreen, + ev->u.keyButtonPointer.rootX, + ev->u.keyButtonPointer.rootY, FALSE); + dev->valuator->lastx = ev->u.keyButtonPointer.rootX; + dev->valuator->lasty = ev->u.keyButtonPointer.rootY; + break; + case ButtonPress: + case ButtonRelease: +#ifdef XINPUT + if (!extension) +#endif /* XINPUT */ + dev = (DeviceIntPtr)LookupPointerDevice(); + if (!ev->u.u.detail || ev->u.u.detail > dev->button->numButtons) + { + client->errorValue = ev->u.u.detail; + return BadValue; + } + break; + } + if (screenIsSaved == SCREEN_SAVER_ON) + SaveScreens(SCREEN_SAVER_OFF, ScreenSaverReset); + ev->u.keyButtonPointer.time = currentTime.milliseconds; + (*dev->public.processInputProc)(ev, dev, nev); + return client->noClientException; +} + +static int +ProcXTestGrabControl(client) + register ClientPtr client; +{ + REQUEST(xXTestGrabControlReq); + + REQUEST_SIZE_MATCH(xXTestGrabControlReq); + if ((stuff->impervious != xTrue) && (stuff->impervious != xFalse)) + { + client->errorValue = stuff->impervious; + return(BadValue); + } + if (stuff->impervious) + MakeClientGrabImpervious(client); + else + MakeClientGrabPervious(client); + return(client->noClientException); +} + +static int +ProcXTestDispatch (client) + register ClientPtr client; +{ + REQUEST(xReq); + switch (stuff->data) + { + case X_XTestGetVersion: + return ProcXTestGetVersion(client); + case X_XTestCompareCursor: + return ProcXTestCompareCursor(client); + case X_XTestFakeInput: + return ProcXTestFakeInput(client); + case X_XTestGrabControl: + return ProcXTestGrabControl(client); + default: + return BadRequest; + } +} + +static int +SProcXTestGetVersion(client) + register ClientPtr client; +{ + register int n; + REQUEST(xXTestGetVersionReq); + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xXTestGetVersionReq); + swaps(&stuff->minorVersion, n); + return ProcXTestGetVersion(client); +} + +static int +SProcXTestCompareCursor(client) + register ClientPtr client; +{ + register int n; + REQUEST(xXTestCompareCursorReq); + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xXTestCompareCursorReq); + swapl(&stuff->window, n); + swapl(&stuff->cursor, n); + return ProcXTestCompareCursor(client); +} + +static int +XTestSwapFakeInput(client, req) + register ClientPtr client; + xReq *req; +{ + register int nev; + register xEvent *ev; + xEvent sev; + EventSwapPtr proc; + + nev = ((req->length << 2) - sizeof(xReq)) / sizeof(xEvent); + for (ev = (xEvent *)&req[1]; --nev >= 0; ev++) + { + /* Swap event */ + proc = EventSwapVector[ev->u.u.type & 0177]; + /* no swapping proc; invalid event type? */ + if (!proc || proc == NotImplemented) { + client->errorValue = ev->u.u.type; + return BadValue; + } + (*proc)(ev, &sev); + *ev = sev; + } + return Success; +} + +static int +SProcXTestFakeInput(client) + register ClientPtr client; +{ + register int n; + REQUEST(xReq); + + swaps(&stuff->length, n); + n = XTestSwapFakeInput(client, stuff); + if (n != Success) + return n; + return ProcXTestFakeInput(client); +} + +static int +SProcXTestGrabControl(client) + register ClientPtr client; +{ + register int n; + REQUEST(xXTestGrabControlReq); + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xXTestGrabControlReq); + return ProcXTestGrabControl(client); +} + +static int +SProcXTestDispatch (client) + register ClientPtr client; +{ + REQUEST(xReq); + switch (stuff->data) + { + case X_XTestGetVersion: + return SProcXTestGetVersion(client); + case X_XTestCompareCursor: + return SProcXTestCompareCursor(client); + case X_XTestFakeInput: + return SProcXTestFakeInput(client); + case X_XTestGrabControl: + return SProcXTestGrabControl(client); + default: + return BadRequest; + } +} diff --git a/xorg-server-1.4/Xext/xvdisp.c b/xorg-server-1.4/Xext/xvdisp.c new file mode 100644 index 0000000..21d00aa --- /dev/null +++ b/xorg-server-1.4/Xext/xvdisp.c @@ -0,0 +1,2206 @@ +/*********************************************************** +Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, +and the Massachusetts Institute of Technology, Cambridge, 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 names of Digital or MIT 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. + +******************************************************************/ + +/* +** File: +** +** xvdisp.c --- Xv server extension dispatch module. +** +** Author: +** +** David Carver (Digital Workstation Engineering/Project Athena) +** +** Revisions: +** +** 11.06.91 Carver +** - changed SetPortControl to SetPortAttribute +** - changed GetPortControl to GetPortAttribute +** - changed QueryBestSize +** +** 15.05.91 Carver +** - version 2.0 upgrade +** +** 24.01.91 Carver +** - version 1.4 upgrade +** +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include +#include "misc.h" +#include "scrnintstr.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "gcstruct.h" +#include "dixstruct.h" +#include "resource.h" +#include "opaque.h" + +#include +#include +#include "xvdix.h" +#ifdef MITSHM +#define _XSHM_SERVER_ +#include +#endif + +#include "xvdisp.h" + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" + +unsigned long XvXRTPort; + +#ifdef MITSHM +static int XineramaXvShmPutImage(ClientPtr); +#endif +static int XineramaXvPutImage(ClientPtr); +static int XineramaXvPutVideo(ClientPtr); +static int XineramaXvPutStill(ClientPtr); +static int XineramaXvSetPortAttribute(ClientPtr); +static int XineramaXvStopVideo(ClientPtr); +#endif + +/* INTERNAL */ + +static int ProcXvQueryExtension(ClientPtr); +static int ProcXvQueryAdaptors(ClientPtr); +static int ProcXvQueryEncodings(ClientPtr); +static int ProcXvPutVideo(ClientPtr); +static int ProcXvPutStill(ClientPtr); +static int ProcXvGetVideo(ClientPtr); +static int ProcXvGetStill(ClientPtr); +static int ProcXvGrabPort(ClientPtr); +static int ProcXvUngrabPort(ClientPtr); +static int ProcXvSelectVideoNotify(ClientPtr); +static int ProcXvSelectPortNotify(ClientPtr); +static int ProcXvStopVideo(ClientPtr); +static int ProcXvSetPortAttribute(ClientPtr); +static int ProcXvGetPortAttribute(ClientPtr); +static int ProcXvQueryBestSize(ClientPtr); +static int ProcXvQueryPortAttributes(ClientPtr); +static int ProcXvPutImage(ClientPtr); +#ifdef MITSHM +static int ProcXvShmPutImage(ClientPtr); +#endif +static int ProcXvQueryImageAttributes(ClientPtr); +static int ProcXvListImageFormats(ClientPtr); + +static int SProcXvQueryExtension(ClientPtr); +static int SProcXvQueryAdaptors(ClientPtr); +static int SProcXvQueryEncodings(ClientPtr); +static int SProcXvPutVideo(ClientPtr); +static int SProcXvPutStill(ClientPtr); +static int SProcXvGetVideo(ClientPtr); +static int SProcXvGetStill(ClientPtr); +static int SProcXvGrabPort(ClientPtr); +static int SProcXvUngrabPort(ClientPtr); +static int SProcXvSelectVideoNotify(ClientPtr); +static int SProcXvSelectPortNotify(ClientPtr); +static int SProcXvStopVideo(ClientPtr); +static int SProcXvSetPortAttribute(ClientPtr); +static int SProcXvGetPortAttribute(ClientPtr); +static int SProcXvQueryBestSize(ClientPtr); +static int SProcXvQueryPortAttributes(ClientPtr); +static int SProcXvPutImage(ClientPtr); +#ifdef MITSHM +static int SProcXvShmPutImage(ClientPtr); +#endif +static int SProcXvQueryImageAttributes(ClientPtr); +static int SProcXvListImageFormats(ClientPtr); + +static int SWriteQueryAdaptorsReply(ClientPtr, xvQueryAdaptorsReply *); +static int SWriteQueryExtensionReply(ClientPtr, xvQueryExtensionReply *); +static int SWriteQueryEncodingsReply(ClientPtr, xvQueryEncodingsReply *); +static int SWriteAdaptorInfo(ClientPtr, xvAdaptorInfo *); +static int SWriteEncodingInfo(ClientPtr, xvEncodingInfo *); +static int SWriteFormat(ClientPtr, xvFormat *); +static int SWriteAttributeInfo(ClientPtr, xvAttributeInfo *); +static int SWriteGrabPortReply(ClientPtr, xvGrabPortReply *); +static int SWriteGetPortAttributeReply(ClientPtr, xvGetPortAttributeReply *); +static int SWriteQueryBestSizeReply(ClientPtr, xvQueryBestSizeReply *); +static int SWriteQueryPortAttributesReply( + ClientPtr, xvQueryPortAttributesReply *); +static int SWriteQueryImageAttributesReply( + ClientPtr, xvQueryImageAttributesReply*); +static int SWriteListImageFormatsReply(ClientPtr, xvListImageFormatsReply*); +static int SWriteImageFormatInfo(ClientPtr, xvImageFormatInfo*); + +#define _WriteQueryAdaptorsReply(_c,_d) \ + if ((_c)->swapped) SWriteQueryAdaptorsReply(_c, _d); \ + else WriteToClient(_c, sz_xvQueryAdaptorsReply, (char*)_d) + +#define _WriteQueryExtensionReply(_c,_d) \ + if ((_c)->swapped) SWriteQueryExtensionReply(_c, _d); \ + else WriteToClient(_c, sz_xvQueryExtensionReply, (char*)_d) + +#define _WriteQueryEncodingsReply(_c,_d) \ + if ((_c)->swapped) SWriteQueryEncodingsReply(_c, _d); \ + else WriteToClient(_c, sz_xvQueryEncodingsReply, (char*)_d) + +#define _WriteAdaptorInfo(_c,_d) \ + if ((_c)->swapped) SWriteAdaptorInfo(_c, _d); \ + else WriteToClient(_c, sz_xvAdaptorInfo, (char*)_d) + +#define _WriteAttributeInfo(_c,_d) \ + if ((_c)->swapped) SWriteAttributeInfo(_c, _d); \ + else WriteToClient(_c, sz_xvAttributeInfo, (char*)_d) + +#define _WriteEncodingInfo(_c,_d) \ + if ((_c)->swapped) SWriteEncodingInfo(_c, _d); \ + else WriteToClient(_c, sz_xvEncodingInfo, (char*)_d) + +#define _WriteFormat(_c,_d) \ + if ((_c)->swapped) SWriteFormat(_c, _d); \ + else WriteToClient(_c, sz_xvFormat, (char*)_d) + +#define _WriteGrabPortReply(_c,_d) \ + if ((_c)->swapped) SWriteGrabPortReply(_c, _d); \ + else WriteToClient(_c, sz_xvGrabPortReply, (char*)_d) + +#define _WriteGetPortAttributeReply(_c,_d) \ + if ((_c)->swapped) SWriteGetPortAttributeReply(_c, _d); \ + else WriteToClient(_c, sz_xvGetPortAttributeReply, (char*)_d) + +#define _WriteQueryBestSizeReply(_c,_d) \ + if ((_c)->swapped) SWriteQueryBestSizeReply(_c, _d); \ + else WriteToClient(_c, sz_xvQueryBestSizeReply,(char*) _d) + +#define _WriteQueryPortAttributesReply(_c,_d) \ + if ((_c)->swapped) SWriteQueryPortAttributesReply(_c, _d); \ + else WriteToClient(_c, sz_xvQueryPortAttributesReply,(char*) _d) + +#define _WriteQueryImageAttributesReply(_c,_d) \ + if ((_c)->swapped) SWriteQueryImageAttributesReply(_c, _d); \ + else WriteToClient(_c, sz_xvQueryImageAttributesReply,(char*) _d) + +#define _WriteListImageFormatsReply(_c,_d) \ + if ((_c)->swapped) SWriteListImageFormatsReply(_c, _d); \ + else WriteToClient(_c, sz_xvListImageFormatsReply,(char*) _d) + +#define _WriteImageFormatInfo(_c,_d) \ + if ((_c)->swapped) SWriteImageFormatInfo(_c, _d); \ + else WriteToClient(_c, sz_xvImageFormatInfo, (char*)_d) + +#define _AllocatePort(_i,_p) \ + ((_p)->id != _i) ? (* (_p)->pAdaptor->ddAllocatePort)(_i,_p,&_p) : Success + +/* +** ProcXvDispatch +** +** +** +*/ + +int +ProcXvDispatch(ClientPtr client) +{ + REQUEST(xReq); + + UpdateCurrentTime(); + + switch (stuff->data) + { + case xv_QueryExtension: return(ProcXvQueryExtension(client)); + case xv_QueryAdaptors: return(ProcXvQueryAdaptors(client)); + case xv_QueryEncodings: return(ProcXvQueryEncodings(client)); + case xv_PutVideo: +#ifdef PANORAMIX + if(!noPanoramiXExtension) + return(XineramaXvPutVideo(client)); + else +#endif + return(ProcXvPutVideo(client)); + case xv_PutStill: +#ifdef PANORAMIX + if(!noPanoramiXExtension) + return(XineramaXvPutStill(client)); + else +#endif + return(ProcXvPutStill(client)); + case xv_GetVideo: return(ProcXvGetVideo(client)); + case xv_GetStill: return(ProcXvGetStill(client)); + case xv_GrabPort: return(ProcXvGrabPort(client)); + case xv_UngrabPort: return(ProcXvUngrabPort(client)); + case xv_SelectVideoNotify: return(ProcXvSelectVideoNotify(client)); + case xv_SelectPortNotify: return(ProcXvSelectPortNotify(client)); + case xv_StopVideo: +#ifdef PANORAMIX + if(!noPanoramiXExtension) + return(XineramaXvStopVideo(client)); + else +#endif + return(ProcXvStopVideo(client)); + case xv_SetPortAttribute: +#ifdef PANORAMIX + if(!noPanoramiXExtension) + return(XineramaXvSetPortAttribute(client)); + else +#endif + return(ProcXvSetPortAttribute(client)); + case xv_GetPortAttribute: return(ProcXvGetPortAttribute(client)); + case xv_QueryBestSize: return(ProcXvQueryBestSize(client)); + case xv_QueryPortAttributes: return(ProcXvQueryPortAttributes(client)); + case xv_PutImage: +#ifdef PANORAMIX + if(!noPanoramiXExtension) + return(XineramaXvPutImage(client)); + else +#endif + return(ProcXvPutImage(client)); +#ifdef MITSHM + case xv_ShmPutImage: +#ifdef PANORAMIX + if(!noPanoramiXExtension) + return(XineramaXvShmPutImage(client)); + else +#endif + return(ProcXvShmPutImage(client)); +#endif + case xv_QueryImageAttributes: return(ProcXvQueryImageAttributes(client)); + case xv_ListImageFormats: return(ProcXvListImageFormats(client)); + default: + if (stuff->data < xvNumRequests) + { + SendErrorToClient(client, XvReqCode, stuff->data, 0, + BadImplementation); + return(BadImplementation); + } + else + { + SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest); + return(BadRequest); + } + } +} + +int +SProcXvDispatch(ClientPtr client) +{ + REQUEST(xReq); + + UpdateCurrentTime(); + + switch (stuff->data) + { + case xv_QueryExtension: return(SProcXvQueryExtension(client)); + case xv_QueryAdaptors: return(SProcXvQueryAdaptors(client)); + case xv_QueryEncodings: return(SProcXvQueryEncodings(client)); + case xv_PutVideo: return(SProcXvPutVideo(client)); + case xv_PutStill: return(SProcXvPutStill(client)); + case xv_GetVideo: return(SProcXvGetVideo(client)); + case xv_GetStill: return(SProcXvGetStill(client)); + case xv_GrabPort: return(SProcXvGrabPort(client)); + case xv_UngrabPort: return(SProcXvUngrabPort(client)); + case xv_SelectVideoNotify: return(SProcXvSelectVideoNotify(client)); + case xv_SelectPortNotify: return(SProcXvSelectPortNotify(client)); + case xv_StopVideo: return(SProcXvStopVideo(client)); + case xv_SetPortAttribute: return(SProcXvSetPortAttribute(client)); + case xv_GetPortAttribute: return(SProcXvGetPortAttribute(client)); + case xv_QueryBestSize: return(SProcXvQueryBestSize(client)); + case xv_QueryPortAttributes: return(SProcXvQueryPortAttributes(client)); + case xv_PutImage: return(SProcXvPutImage(client)); +#ifdef MITSHM + case xv_ShmPutImage: return(SProcXvShmPutImage(client)); +#endif + case xv_QueryImageAttributes: return(SProcXvQueryImageAttributes(client)); + case xv_ListImageFormats: return(SProcXvListImageFormats(client)); + default: + if (stuff->data < xvNumRequests) + { + SendErrorToClient(client, XvReqCode, stuff->data, 0, + BadImplementation); + return(BadImplementation); + } + else + { + SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest); + return(BadRequest); + } + } +} + +static int +ProcXvQueryExtension(ClientPtr client) +{ + xvQueryExtensionReply rep; + /* REQUEST(xvQueryExtensionReq); */ + REQUEST_SIZE_MATCH(xvQueryExtensionReq); + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + rep.version = XvVersion; + rep.revision = XvRevision; + + _WriteQueryExtensionReply(client, &rep); + + return Success; + +} + +static int +ProcXvQueryAdaptors(ClientPtr client) +{ + xvFormat format; + xvAdaptorInfo ainfo; + xvQueryAdaptorsReply rep; + int totalSize, na, nf, rc; + XvAdaptorPtr pa; + XvFormatPtr pf; + WindowPtr pWin; + ScreenPtr pScreen; + XvScreenPtr pxvs; + + REQUEST(xvQueryAdaptorsReq); + REQUEST_SIZE_MATCH(xvQueryAdaptorsReq); + + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; + + pScreen = pWin->drawable.pScreen; + pxvs = (XvScreenPtr)pScreen->devPrivates[XvScreenIndex].ptr; + + if (!pxvs) + { + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.num_adaptors = 0; + rep.length = 0; + + _WriteQueryAdaptorsReply(client, &rep); + + return Success; + } + + (* pxvs->ddQueryAdaptors)(pScreen, &pxvs->pAdaptors, &pxvs->nAdaptors); + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.num_adaptors = pxvs->nAdaptors; + + /* CALCULATE THE TOTAL SIZE OF THE REPLY IN BYTES */ + + totalSize = pxvs->nAdaptors * sz_xvAdaptorInfo; + + /* FOR EACH ADPATOR ADD UP THE BYTES FOR ENCODINGS AND FORMATS */ + + na = pxvs->nAdaptors; + pa = pxvs->pAdaptors; + while (na--) + { + totalSize += (strlen(pa->name) + 3) & ~3; + totalSize += pa->nFormats * sz_xvFormat; + pa++; + } + + rep.length = totalSize >> 2; + + _WriteQueryAdaptorsReply(client, &rep); + + na = pxvs->nAdaptors; + pa = pxvs->pAdaptors; + while (na--) + { + + ainfo.base_id = pa->base_id; + ainfo.num_ports = pa->nPorts; + ainfo.type = pa->type; + ainfo.name_size = strlen(pa->name); + ainfo.num_formats = pa->nFormats; + + _WriteAdaptorInfo(client, &ainfo); + + WriteToClient(client, ainfo.name_size, pa->name); + + nf = pa->nFormats; + pf = pa->pFormats; + while (nf--) + { + format.depth = pf->depth; + format.visual = pf->visual; + _WriteFormat(client, &format); + pf++; + } + + pa++; + + } + + return (client->noClientException); + +} + +static int +ProcXvQueryEncodings(ClientPtr client) +{ + xvEncodingInfo einfo; + xvQueryEncodingsReply rep; + int totalSize; + XvPortPtr pPort; + int ne; + XvEncodingPtr pe; + int status; + + REQUEST(xvQueryEncodingsReq); + REQUEST_SIZE_MATCH(xvQueryEncodingsReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) + { + client->errorValue = stuff->port; + return (status); + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.num_encodings = pPort->pAdaptor->nEncodings; + + /* FOR EACH ENCODING ADD UP THE BYTES FOR ENCODING NAMES */ + + ne = pPort->pAdaptor->nEncodings; + pe = pPort->pAdaptor->pEncodings; + totalSize = ne * sz_xvEncodingInfo; + while (ne--) + { + totalSize += (strlen(pe->name) + 3) & ~3; + pe++; + } + + rep.length = totalSize >> 2; + + _WriteQueryEncodingsReply(client, &rep); + + ne = pPort->pAdaptor->nEncodings; + pe = pPort->pAdaptor->pEncodings; + while (ne--) + { + einfo.encoding = pe->id; + einfo.name_size = strlen(pe->name); + einfo.width = pe->width; + einfo.height = pe->height; + einfo.rate.numerator = pe->rate.numerator; + einfo.rate.denominator = pe->rate.denominator; + _WriteEncodingInfo(client, &einfo); + WriteToClient(client, einfo.name_size, pe->name); + pe++; + } + + return (client->noClientException); + +} + +static int +ProcXvPutVideo(ClientPtr client) +{ + DrawablePtr pDraw; + XvPortPtr pPort; + GCPtr pGC; + int status; + + REQUEST(xvPutVideoReq); + REQUEST_SIZE_MATCH(xvPutVideoReq); + + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) + { + client->errorValue = stuff->port; + return (status); + } + + if (!(pPort->pAdaptor->type & XvInputMask) || + !(pPort->pAdaptor->type & XvVideoMask)) + { + client->errorValue = stuff->port; + return (BadMatch); + } + + status = XVCALL(diMatchPort)(pPort, pDraw); + if (status != Success) + { + return status; + } + + return XVCALL(diPutVideo)(client, pDraw, pPort, pGC, + stuff->vid_x, stuff->vid_y, + stuff->vid_w, stuff->vid_h, + stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h); + +} + +static int +ProcXvPutStill(ClientPtr client) +{ + DrawablePtr pDraw; + XvPortPtr pPort; + GCPtr pGC; + int status; + + REQUEST(xvPutStillReq); + REQUEST_SIZE_MATCH(xvPutStillReq); + + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) + { + client->errorValue = stuff->port; + return (status); + } + + if (!(pPort->pAdaptor->type & XvInputMask) || + !(pPort->pAdaptor->type & XvStillMask)) + { + client->errorValue = stuff->port; + return (BadMatch); + } + + status = XVCALL(diMatchPort)(pPort, pDraw); + if (status != Success) + { + return status; + } + + return XVCALL(diPutStill)(client, pDraw, pPort, pGC, + stuff->vid_x, stuff->vid_y, + stuff->vid_w, stuff->vid_h, + stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h); + +} + + +static int +ProcXvGetVideo(ClientPtr client) +{ + DrawablePtr pDraw; + XvPortPtr pPort; + GCPtr pGC; + int status; + + REQUEST(xvGetVideoReq); + REQUEST_SIZE_MATCH(xvGetVideoReq); + + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) + { + client->errorValue = stuff->port; + return (status); + } + + if (!(pPort->pAdaptor->type & XvOutputMask) || + !(pPort->pAdaptor->type & XvVideoMask)) + { + client->errorValue = stuff->port; + return (BadMatch); + } + + status = XVCALL(diMatchPort)(pPort, pDraw); + if (status != Success) + { + return status; + } + + return XVCALL(diGetVideo)(client, pDraw, pPort, pGC, + stuff->vid_x, stuff->vid_y, + stuff->vid_w, stuff->vid_h, + stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h); + +} + + +static int +ProcXvGetStill(ClientPtr client) +{ + DrawablePtr pDraw; + XvPortPtr pPort; + GCPtr pGC; + int status; + + REQUEST(xvGetStillReq); + REQUEST_SIZE_MATCH(xvGetStillReq); + + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) + { + client->errorValue = stuff->port; + return (status); + } + + if (!(pPort->pAdaptor->type & XvOutputMask) || + !(pPort->pAdaptor->type & XvStillMask)) + { + client->errorValue = stuff->port; + return (BadMatch); + } + + status = XVCALL(diMatchPort)(pPort, pDraw); + if (status != Success) + { + return status; + } + + return XVCALL(diGetStill)(client, pDraw, pPort, pGC, + stuff->vid_x, stuff->vid_y, + stuff->vid_w, stuff->vid_h, + stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h); + +} + +static int +ProcXvSelectVideoNotify(ClientPtr client) +{ + DrawablePtr pDraw; + int rc; + REQUEST(xvSelectVideoNotifyReq); + REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq); + + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixUnknownAccess); + if (rc != Success) + return rc; + + return XVCALL(diSelectVideoNotify)(client, pDraw, stuff->onoff); + +} + +static int +ProcXvSelectPortNotify(ClientPtr client) +{ + int status; + XvPortPtr pPort; + REQUEST(xvSelectPortNotifyReq); + REQUEST_SIZE_MATCH(xvSelectPortNotifyReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) + { + client->errorValue = stuff->port; + return (status); + } + + return XVCALL(diSelectPortNotify)(client, pPort, stuff->onoff); + +} + +static int +ProcXvGrabPort(ClientPtr client) +{ + int result, status; + XvPortPtr pPort; + xvGrabPortReply rep; + REQUEST(xvGrabPortReq); + REQUEST_SIZE_MATCH(xvGrabPortReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) + { + client->errorValue = stuff->port; + return (status); + } + + status = XVCALL(diGrabPort)(client, pPort, stuff->time, &result); + + if (status != Success) + { + return status; + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + rep.result = result; + + _WriteGrabPortReply(client, &rep); + + return Success; + +} + +static int +ProcXvUngrabPort(ClientPtr client) +{ + int status; + XvPortPtr pPort; + REQUEST(xvGrabPortReq); + REQUEST_SIZE_MATCH(xvGrabPortReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) + { + client->errorValue = stuff->port; + return (status); + } + + return XVCALL(diUngrabPort)(client, pPort, stuff->time); + +} + + +static int +ProcXvStopVideo(ClientPtr client) +{ + int status, rc; + DrawablePtr pDraw; + XvPortPtr pPort; + REQUEST(xvStopVideoReq); + REQUEST_SIZE_MATCH(xvStopVideoReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) + { + client->errorValue = stuff->port; + return (status); + } + + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixUnknownAccess); + if (rc != Success) + return rc; + + return XVCALL(diStopVideo)(client, pPort, pDraw); + +} + +static int +ProcXvSetPortAttribute(ClientPtr client) +{ + int status; + XvPortPtr pPort; + REQUEST(xvSetPortAttributeReq); + REQUEST_SIZE_MATCH(xvSetPortAttributeReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) + { + client->errorValue = stuff->port; + return (status); + } + + if (!ValidAtom(stuff->attribute)) + { + client->errorValue = stuff->attribute; + return(BadAtom); + } + + status = XVCALL(diSetPortAttribute)(client, pPort, + stuff->attribute, stuff->value); + + if (status == BadMatch) + client->errorValue = stuff->attribute; + else + client->errorValue = stuff->value; + + return status; +} + +static int +ProcXvGetPortAttribute(ClientPtr client) +{ + INT32 value; + int status; + XvPortPtr pPort; + xvGetPortAttributeReply rep; + REQUEST(xvGetPortAttributeReq); + REQUEST_SIZE_MATCH(xvGetPortAttributeReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) + { + client->errorValue = stuff->port; + return (status); + } + + if (!ValidAtom(stuff->attribute)) + { + client->errorValue = stuff->attribute; + return(BadAtom); + } + + status = XVCALL(diGetPortAttribute)(client, pPort, stuff->attribute, &value); + if (status != Success) + { + client->errorValue = stuff->attribute; + return status; + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + rep.value = value; + + _WriteGetPortAttributeReply(client, &rep); + + return Success; +} + +static int +ProcXvQueryBestSize(ClientPtr client) +{ + int status; + unsigned int actual_width, actual_height; + XvPortPtr pPort; + xvQueryBestSizeReply rep; + REQUEST(xvQueryBestSizeReq); + REQUEST_SIZE_MATCH(xvQueryBestSizeReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) + { + client->errorValue = stuff->port; + return (status); + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + + (* pPort->pAdaptor->ddQueryBestSize)(client, pPort, stuff->motion, + stuff->vid_w, stuff->vid_h, + stuff->drw_w, stuff->drw_h, + &actual_width, &actual_height); + + rep.actual_width = actual_width; + rep.actual_height = actual_height; + + _WriteQueryBestSizeReply(client, &rep); + + return Success; +} + + +static int +ProcXvQueryPortAttributes(ClientPtr client) +{ + int status, size, i; + XvPortPtr pPort; + XvAttributePtr pAtt; + xvQueryPortAttributesReply rep; + xvAttributeInfo Info; + REQUEST(xvQueryPortAttributesReq); + REQUEST_SIZE_MATCH(xvQueryPortAttributesReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) + { + client->errorValue = stuff->port; + return (status); + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.num_attributes = pPort->pAdaptor->nAttributes; + rep.text_size = 0; + + for(i = 0, pAtt = pPort->pAdaptor->pAttributes; + i < rep.num_attributes; i++, pAtt++) + { + rep.text_size += (strlen(pAtt->name) + 1 + 3) & ~3L; + } + + rep.length = (rep.num_attributes * sz_xvAttributeInfo) + rep.text_size; + rep.length >>= 2; + + _WriteQueryPortAttributesReply(client, &rep); + + for(i = 0, pAtt = pPort->pAdaptor->pAttributes; + i < rep.num_attributes; i++, pAtt++) + { + size = strlen(pAtt->name) + 1; /* pass the NULL */ + Info.flags = pAtt->flags; + Info.min = pAtt->min_value; + Info.max = pAtt->max_value; + Info.size = (size + 3) & ~3L; + + _WriteAttributeInfo(client, &Info); + + WriteToClient(client, size, pAtt->name); + } + + return Success; +} + + + +static int +ProcXvPutImage(ClientPtr client) +{ + DrawablePtr pDraw; + XvPortPtr pPort; + XvImagePtr pImage = NULL; + GCPtr pGC; + int status, i, size; + CARD16 width, height; + + REQUEST(xvPutImageReq); + REQUEST_AT_LEAST_SIZE(xvPutImageReq); + + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) + { + client->errorValue = stuff->port; + return (status); + } + + if (!(pPort->pAdaptor->type & XvImageMask) || + !(pPort->pAdaptor->type & XvInputMask)) + { + client->errorValue = stuff->port; + return (BadMatch); + } + + status = XVCALL(diMatchPort)(pPort, pDraw); + if (status != Success) + { + return status; + } + + for(i = 0; i < pPort->pAdaptor->nImages; i++) { + if(pPort->pAdaptor->pImages[i].id == stuff->id) { + pImage = &(pPort->pAdaptor->pImages[i]); + break; + } + } + + if(!pImage) + return BadMatch; + + width = stuff->width; + height = stuff->height; + size = (*pPort->pAdaptor->ddQueryImageAttributes)(client, + pPort, pImage, &width, &height, NULL, NULL); + size += sizeof(xvPutImageReq); + size = (size + 3) >> 2; + + if((width < stuff->width) || (height < stuff->height)) + return BadValue; + + if(client->req_len < size) + return BadLength; + + return XVCALL(diPutImage)(client, pDraw, pPort, pGC, + stuff->src_x, stuff->src_y, + stuff->src_w, stuff->src_h, + stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h, + pImage, (unsigned char*)(&stuff[1]), FALSE, + stuff->width, stuff->height); +} + +#ifdef MITSHM +/* redefined here since it's not in any header file */ +typedef struct _ShmDesc { + struct _ShmDesc *next; + int shmid; + int refcnt; + char *addr; + Bool writable; + unsigned long size; +} ShmDescRec, *ShmDescPtr; + +extern RESTYPE ShmSegType; +extern int BadShmSegCode; +extern int ShmCompletionCode; + +static int +ProcXvShmPutImage(ClientPtr client) +{ + ShmDescPtr shmdesc; + DrawablePtr pDraw; + XvPortPtr pPort; + XvImagePtr pImage = NULL; + GCPtr pGC; + int status, size_needed, i; + CARD16 width, height; + + REQUEST(xvShmPutImageReq); + REQUEST_SIZE_MATCH(xvShmPutImageReq); + + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) + { + client->errorValue = stuff->port; + return (status); + } + + if (!(pPort->pAdaptor->type & XvImageMask) || + !(pPort->pAdaptor->type & XvInputMask)) + { + client->errorValue = stuff->port; + return (BadMatch); + } + + status = XVCALL(diMatchPort)(pPort, pDraw); + if (status != Success) + { + return status; + } + + for(i = 0; i < pPort->pAdaptor->nImages; i++) { + if(pPort->pAdaptor->pImages[i].id == stuff->id) { + pImage = &(pPort->pAdaptor->pImages[i]); + break; + } + } + + if(!pImage) + return BadMatch; + + if(!(shmdesc = (ShmDescPtr)LookupIDByType(stuff->shmseg, ShmSegType))) + { + client->errorValue = stuff->shmseg; + return BadShmSegCode; + } + + width = stuff->width; + height = stuff->height; + size_needed = (*pPort->pAdaptor->ddQueryImageAttributes)(client, + pPort, pImage, &width, &height, NULL, NULL); + if((size_needed + stuff->offset) > shmdesc->size) + return BadAccess; + + if((width < stuff->width) || (height < stuff->height)) + return BadValue; + + status = XVCALL(diPutImage)(client, pDraw, pPort, pGC, + stuff->src_x, stuff->src_y, + stuff->src_w, stuff->src_h, + stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h, pImage, + (unsigned char *)shmdesc->addr + stuff->offset, + stuff->send_event, stuff->width, stuff->height); + + if((status == Success) && stuff->send_event) { + xShmCompletionEvent ev; + + ev.type = ShmCompletionCode; + ev.drawable = stuff->drawable; + ev.sequenceNumber = client->sequence; + ev.minorEvent = xv_ShmPutImage; + ev.majorEvent = XvReqCode; + ev.shmseg = stuff->shmseg; + ev.offset = stuff->offset; + WriteEventsToClient(client, 1, (xEvent *) &ev); + } + + return status; +} +#endif + +#ifdef XvMCExtension +#include "xvmcext.h" +#endif + +static int +ProcXvQueryImageAttributes(ClientPtr client) +{ + xvQueryImageAttributesReply rep; + int size, num_planes, i; + CARD16 width, height; + XvImagePtr pImage = NULL; + XvPortPtr pPort; + int *offsets; + int *pitches; + REQUEST(xvQueryImageAttributesReq); + + REQUEST_SIZE_MATCH(xvQueryImageAttributesReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + for(i = 0; i < pPort->pAdaptor->nImages; i++) { + if(pPort->pAdaptor->pImages[i].id == stuff->id) { + pImage = &(pPort->pAdaptor->pImages[i]); + break; + } + } + +#ifdef XvMCExtension + if(!pImage) + pImage = XvMCFindXvImage(pPort, stuff->id); +#endif + + if(!pImage) + return BadMatch; + + num_planes = pImage->num_planes; + + if(!(offsets = xalloc(num_planes << 3))) + return BadAlloc; + pitches = offsets + num_planes; + + width = stuff->width; + height = stuff->height; + + size = (*pPort->pAdaptor->ddQueryImageAttributes)(client, pPort, pImage, + &width, &height, offsets, pitches); + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = num_planes << 1; + rep.num_planes = num_planes; + rep.width = width; + rep.height = height; + rep.data_size = size; + + _WriteQueryImageAttributesReply(client, &rep); + if(client->swapped) + SwapLongs((CARD32*)offsets, rep.length); + WriteToClient(client, rep.length << 2, (char*)offsets); + + xfree(offsets); + + return Success; +} + +static int +ProcXvListImageFormats(ClientPtr client) +{ + XvPortPtr pPort; + XvImagePtr pImage; + int i; + xvListImageFormatsReply rep; + xvImageFormatInfo info; + REQUEST(xvListImageFormatsReq); + + REQUEST_SIZE_MATCH(xvListImageFormatsReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client) )) + { + client->errorValue = stuff->port; + return (_XvBadPort); + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.num_formats = pPort->pAdaptor->nImages; + rep.length = rep.num_formats * sz_xvImageFormatInfo >> 2; + + _WriteListImageFormatsReply(client, &rep); + + pImage = pPort->pAdaptor->pImages; + + for(i = 0; i < rep.num_formats; i++, pImage++) { + info.id = pImage->id; + info.type = pImage->type; + info.byte_order = pImage->byte_order; + memcpy(&info.guid, pImage->guid, 16); + info.bpp = pImage->bits_per_pixel; + info.num_planes = pImage->num_planes; + info.depth = pImage->depth; + info.red_mask = pImage->red_mask; + info.green_mask = pImage->green_mask; + info.blue_mask = pImage->blue_mask; + info.format = pImage->format; + info.y_sample_bits = pImage->y_sample_bits; + info.u_sample_bits = pImage->u_sample_bits; + info.v_sample_bits = pImage->v_sample_bits; + info.horz_y_period = pImage->horz_y_period; + info.horz_u_period = pImage->horz_u_period; + info.horz_v_period = pImage->horz_v_period; + info.vert_y_period = pImage->vert_y_period; + info.vert_u_period = pImage->vert_u_period; + info.vert_v_period = pImage->vert_v_period; + memcpy(&info.comp_order, pImage->component_order, 32); + info.scanline_order = pImage->scanline_order; + _WriteImageFormatInfo(client, &info); + } + + return Success; +} + + + +/* Swapped Procs */ + +static int +SProcXvQueryExtension(ClientPtr client) +{ + register char n; + REQUEST(xvQueryExtensionReq); + swaps(&stuff->length, n); + return ProcXvQueryExtension(client); +} + +static int +SProcXvQueryAdaptors(ClientPtr client) +{ + register char n; + REQUEST(xvQueryAdaptorsReq); + swaps(&stuff->length, n); + swapl(&stuff->window, n); + return ProcXvQueryAdaptors(client); +} + +static int +SProcXvQueryEncodings(ClientPtr client) +{ + register char n; + REQUEST(xvQueryEncodingsReq); + swaps(&stuff->length, n); + swapl(&stuff->port, n); + return ProcXvQueryEncodings(client); +} + +static int +SProcXvGrabPort(ClientPtr client) +{ + register char n; + REQUEST(xvGrabPortReq); + swaps(&stuff->length, n); + swapl(&stuff->port, n); + swapl(&stuff->time, n); + return ProcXvGrabPort(client); +} + +static int +SProcXvUngrabPort(ClientPtr client) +{ + register char n; + REQUEST(xvUngrabPortReq); + swaps(&stuff->length, n); + swapl(&stuff->port, n); + swapl(&stuff->time, n); + return ProcXvUngrabPort(client); +} + +static int +SProcXvPutVideo(ClientPtr client) +{ + register char n; + REQUEST(xvPutVideoReq); + swaps(&stuff->length, n); + swapl(&stuff->port, n); + swapl(&stuff->drawable, n); + swapl(&stuff->gc, n); + swaps(&stuff->vid_x, n); + swaps(&stuff->vid_y, n); + swaps(&stuff->vid_w, n); + swaps(&stuff->vid_h, n); + swaps(&stuff->drw_x, n); + swaps(&stuff->drw_y, n); + swaps(&stuff->drw_w, n); + swaps(&stuff->drw_h, n); + return ProcXvPutVideo(client); +} + +static int +SProcXvPutStill(ClientPtr client) +{ + register char n; + REQUEST(xvPutStillReq); + swaps(&stuff->length, n); + swapl(&stuff->port, n); + swapl(&stuff->drawable, n); + swapl(&stuff->gc, n); + swaps(&stuff->vid_x, n); + swaps(&stuff->vid_y, n); + swaps(&stuff->vid_w, n); + swaps(&stuff->vid_h, n); + swaps(&stuff->drw_x, n); + swaps(&stuff->drw_y, n); + swaps(&stuff->drw_w, n); + swaps(&stuff->drw_h, n); + return ProcXvPutStill(client); +} + +static int +SProcXvGetVideo(ClientPtr client) +{ + register char n; + REQUEST(xvGetVideoReq); + swaps(&stuff->length, n); + swapl(&stuff->port, n); + swapl(&stuff->drawable, n); + swapl(&stuff->gc, n); + swaps(&stuff->vid_x, n); + swaps(&stuff->vid_y, n); + swaps(&stuff->vid_w, n); + swaps(&stuff->vid_h, n); + swaps(&stuff->drw_x, n); + swaps(&stuff->drw_y, n); + swaps(&stuff->drw_w, n); + swaps(&stuff->drw_h, n); + return ProcXvGetVideo(client); +} + +static int +SProcXvGetStill(ClientPtr client) +{ + register char n; + REQUEST(xvGetStillReq); + swaps(&stuff->length, n); + swapl(&stuff->port, n); + swapl(&stuff->drawable, n); + swapl(&stuff->gc, n); + swaps(&stuff->vid_x, n); + swaps(&stuff->vid_y, n); + swaps(&stuff->vid_w, n); + swaps(&stuff->vid_h, n); + swaps(&stuff->drw_x, n); + swaps(&stuff->drw_y, n); + swaps(&stuff->drw_w, n); + swaps(&stuff->drw_h, n); + return ProcXvGetStill(client); +} + +static int +SProcXvPutImage(ClientPtr client) +{ + register char n; + REQUEST(xvPutImageReq); + swaps(&stuff->length, n); + swapl(&stuff->port, n); + swapl(&stuff->drawable, n); + swapl(&stuff->gc, n); + swapl(&stuff->id, n); + swaps(&stuff->src_x, n); + swaps(&stuff->src_y, n); + swaps(&stuff->src_w, n); + swaps(&stuff->src_h, n); + swaps(&stuff->drw_x, n); + swaps(&stuff->drw_y, n); + swaps(&stuff->drw_w, n); + swaps(&stuff->drw_h, n); + swaps(&stuff->width, n); + swaps(&stuff->height, n); + return ProcXvPutImage(client); +} + +#ifdef MITSHM +static int +SProcXvShmPutImage(ClientPtr client) +{ + register char n; + REQUEST(xvShmPutImageReq); + swaps(&stuff->length, n); + swapl(&stuff->port, n); + swapl(&stuff->drawable, n); + swapl(&stuff->gc, n); + swapl(&stuff->shmseg, n); + swapl(&stuff->id, n); + swaps(&stuff->src_x, n); + swaps(&stuff->src_y, n); + swaps(&stuff->src_w, n); + swaps(&stuff->src_h, n); + swaps(&stuff->drw_x, n); + swaps(&stuff->drw_y, n); + swaps(&stuff->drw_w, n); + swaps(&stuff->drw_h, n); + swaps(&stuff->offset, n); + swaps(&stuff->width, n); + swaps(&stuff->height, n); + return ProcXvShmPutImage(client); +} +#endif + + +static int +SProcXvSelectVideoNotify(ClientPtr client) +{ + register char n; + REQUEST(xvSelectVideoNotifyReq); + swaps(&stuff->length, n); + swapl(&stuff->drawable, n); + return ProcXvSelectVideoNotify(client); +} + +static int +SProcXvSelectPortNotify(ClientPtr client) +{ + register char n; + REQUEST(xvSelectPortNotifyReq); + swaps(&stuff->length, n); + swapl(&stuff->port, n); + return ProcXvSelectPortNotify(client); +} + +static int +SProcXvStopVideo(ClientPtr client) +{ + register char n; + REQUEST(xvStopVideoReq); + swaps(&stuff->length, n); + swapl(&stuff->port, n); + swapl(&stuff->drawable, n); + return ProcXvStopVideo(client); +} + +static int +SProcXvSetPortAttribute(ClientPtr client) +{ + register char n; + REQUEST(xvSetPortAttributeReq); + swaps(&stuff->length, n); + swapl(&stuff->port, n); + swapl(&stuff->attribute, n); + return ProcXvSetPortAttribute(client); +} + +static int +SProcXvGetPortAttribute(ClientPtr client) +{ + register char n; + REQUEST(xvGetPortAttributeReq); + swaps(&stuff->length, n); + swapl(&stuff->port, n); + swapl(&stuff->attribute, n); + return ProcXvGetPortAttribute(client); +} + +static int +SProcXvQueryBestSize(ClientPtr client) +{ + register char n; + REQUEST(xvQueryBestSizeReq); + swaps(&stuff->length, n); + swapl(&stuff->port, n); + swaps(&stuff->vid_w, n); + swaps(&stuff->vid_h, n); + swaps(&stuff->drw_w, n); + swaps(&stuff->drw_h, n); + return ProcXvQueryBestSize(client); +} + +static int +SProcXvQueryPortAttributes(ClientPtr client) +{ + register char n; + REQUEST(xvQueryPortAttributesReq); + swaps(&stuff->length, n); + swapl(&stuff->port, n); + return ProcXvQueryPortAttributes(client); +} + +static int +SProcXvQueryImageAttributes(ClientPtr client) +{ + register char n; + REQUEST(xvQueryImageAttributesReq); + swaps(&stuff->length, n); + swapl(&stuff->id, n); + swaps(&stuff->width, n); + swaps(&stuff->width, n); + return ProcXvQueryImageAttributes(client); +} + +static int +SProcXvListImageFormats(ClientPtr client) +{ + register char n; + REQUEST(xvListImageFormatsReq); + swaps(&stuff->length, n); + swapl(&stuff->port, n); + return ProcXvListImageFormats(client); +} + + +static int +SWriteQueryExtensionReply( + ClientPtr client, + xvQueryExtensionReply *rep +){ + register char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->version, n); + swaps(&rep->revision, n); + + (void)WriteToClient(client, sz_xvQueryExtensionReply, (char *)&rep); + + return Success; +} + +static int +SWriteQueryAdaptorsReply( + ClientPtr client, + xvQueryAdaptorsReply *rep +){ + register char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->num_adaptors, n); + + (void)WriteToClient(client, sz_xvQueryAdaptorsReply, (char *)&rep); + + return Success; +} + +static int +SWriteQueryEncodingsReply( + ClientPtr client, + xvQueryEncodingsReply *rep +){ + register char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->num_encodings, n); + + (void)WriteToClient(client, sz_xvQueryEncodingsReply, (char *)&rep); + + return Success; +} + +static int +SWriteAdaptorInfo( + ClientPtr client, + xvAdaptorInfo *pAdaptor +){ + register char n; + + swapl(&pAdaptor->base_id, n); + swaps(&pAdaptor->name_size, n); + swaps(&pAdaptor->num_ports, n); + swaps(&pAdaptor->num_formats, n); + + (void)WriteToClient(client, sz_xvAdaptorInfo, (char *)pAdaptor); + + return Success; +} + +static int +SWriteEncodingInfo( + ClientPtr client, + xvEncodingInfo *pEncoding +){ + register char n; + + swapl(&pEncoding->encoding, n); + swaps(&pEncoding->name_size, n); + swaps(&pEncoding->width, n); + swaps(&pEncoding->height, n); + swapl(&pEncoding->rate.numerator, n); + swapl(&pEncoding->rate.denominator, n); + (void)WriteToClient(client, sz_xvEncodingInfo, (char *)pEncoding); + + return Success; +} + +static int +SWriteFormat( + ClientPtr client, + xvFormat *pFormat +){ + register char n; + + swapl(&pFormat->visual, n); + (void)WriteToClient(client, sz_xvFormat, (char *)pFormat); + + return Success; +} + +static int +SWriteAttributeInfo( + ClientPtr client, + xvAttributeInfo *pAtt +){ + register char n; + + swapl(&pAtt->flags, n); + swapl(&pAtt->size, n); + swapl(&pAtt->min, n); + swapl(&pAtt->max, n); + (void)WriteToClient(client, sz_xvAttributeInfo, (char *)pAtt); + + return Success; +} + +static int +SWriteImageFormatInfo( + ClientPtr client, + xvImageFormatInfo *pImage +){ + register char n; + + swapl(&pImage->id, n); + swapl(&pImage->red_mask, n); + swapl(&pImage->green_mask, n); + swapl(&pImage->blue_mask, n); + swapl(&pImage->y_sample_bits, n); + swapl(&pImage->u_sample_bits, n); + swapl(&pImage->v_sample_bits, n); + swapl(&pImage->horz_y_period, n); + swapl(&pImage->horz_u_period, n); + swapl(&pImage->horz_v_period, n); + swapl(&pImage->vert_y_period, n); + swapl(&pImage->vert_u_period, n); + swapl(&pImage->vert_v_period, n); + + (void)WriteToClient(client, sz_xvImageFormatInfo, (char *)pImage); + + return Success; +} + + + +static int +SWriteGrabPortReply( + ClientPtr client, + xvGrabPortReply *rep +){ + register char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + + (void)WriteToClient(client, sz_xvGrabPortReply, (char *)&rep); + + return Success; +} + +static int +SWriteGetPortAttributeReply( + ClientPtr client, + xvGetPortAttributeReply *rep +){ + register char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swapl(&rep->value, n); + + (void)WriteToClient(client, sz_xvGetPortAttributeReply, (char *)&rep); + + return Success; +} + +static int +SWriteQueryBestSizeReply( + ClientPtr client, + xvQueryBestSizeReply *rep +){ + register char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->actual_width, n); + swaps(&rep->actual_height, n); + + (void)WriteToClient(client, sz_xvQueryBestSizeReply, (char *)&rep); + + return Success; +} + +static int +SWriteQueryPortAttributesReply( + ClientPtr client, + xvQueryPortAttributesReply *rep +){ + register char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swapl(&rep->num_attributes, n); + swapl(&rep->text_size, n); + + (void)WriteToClient(client, sz_xvQueryPortAttributesReply, (char *)&rep); + + return Success; +} + +static int +SWriteQueryImageAttributesReply( + ClientPtr client, + xvQueryImageAttributesReply *rep +){ + register char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swapl(&rep->num_planes, n); + swapl(&rep->data_size, n); + swaps(&rep->width, n); + swaps(&rep->height, n); + + (void)WriteToClient(client, sz_xvQueryImageAttributesReply, (char *)&rep); + + return Success; +} + + +static int +SWriteListImageFormatsReply( + ClientPtr client, + xvListImageFormatsReply *rep +){ + register char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swapl(&rep->num_formats, n); + + (void)WriteToClient(client, sz_xvListImageFormatsReply, (char *)&rep); + + return Success; +} + + +#ifdef PANORAMIX + + + + +static int +XineramaXvStopVideo(ClientPtr client) +{ + int result = Success, i; + PanoramiXRes *draw, *port; + REQUEST(xvStopVideoReq); + REQUEST_SIZE_MATCH(xvStopVideoReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(!(port = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->port, XvXRTPort, DixReadAccess))) + return _XvBadPort; + + FOR_NSCREENS_BACKWARD(i) { + if(port->info[i].id) { + stuff->drawable = draw->info[i].id; + stuff->port = port->info[i].id; + result = ProcXvStopVideo(client); + } + } + + return result; +} + +static int +XineramaXvSetPortAttribute(ClientPtr client) +{ + REQUEST(xvSetPortAttributeReq); + PanoramiXRes *port; + int result = Success, i; + + REQUEST_SIZE_MATCH(xvSetPortAttributeReq); + + if(!(port = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->port, XvXRTPort, DixReadAccess))) + return _XvBadPort; + + FOR_NSCREENS_BACKWARD(i) { + if(port->info[i].id) { + stuff->port = port->info[i].id; + result = ProcXvSetPortAttribute(client); + } + } + return result; +} + + +#ifdef MITSHM +static int +XineramaXvShmPutImage(ClientPtr client) +{ + REQUEST(xvShmPutImageReq); + PanoramiXRes *draw, *gc, *port; + Bool send_event = stuff->send_event; + Bool isRoot; + int result = Success, i, x, y; + + REQUEST_SIZE_MATCH(xvShmPutImageReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + if(!(port = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->port, XvXRTPort, DixReadAccess))) + return _XvBadPort; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + x = stuff->drw_x; + y = stuff->drw_y; + + FOR_NSCREENS_BACKWARD(i) { + if(port->info[i].id) { + stuff->drawable = draw->info[i].id; + stuff->port = port->info[i].id; + stuff->gc = gc->info[i].id; + stuff->drw_x = x; + stuff->drw_y = y; + if(isRoot) { + stuff->drw_x -= panoramiXdataPtr[i].x; + stuff->drw_y -= panoramiXdataPtr[i].y; + } + stuff->send_event = (send_event && !i) ? 1 : 0; + + result = ProcXvShmPutImage(client); + } + } + return result; +} +#endif + +static int +XineramaXvPutImage(ClientPtr client) +{ + REQUEST(xvPutImageReq); + PanoramiXRes *draw, *gc, *port; + Bool isRoot; + int result = Success, i, x, y; + + REQUEST_AT_LEAST_SIZE(xvPutImageReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + if(!(port = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->port, XvXRTPort, DixReadAccess))) + return _XvBadPort; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + x = stuff->drw_x; + y = stuff->drw_y; + + FOR_NSCREENS_BACKWARD(i) { + if(port->info[i].id) { + stuff->drawable = draw->info[i].id; + stuff->port = port->info[i].id; + stuff->gc = gc->info[i].id; + stuff->drw_x = x; + stuff->drw_y = y; + if(isRoot) { + stuff->drw_x -= panoramiXdataPtr[i].x; + stuff->drw_y -= panoramiXdataPtr[i].y; + } + + result = ProcXvPutImage(client); + } + } + return result; +} + +static int +XineramaXvPutVideo(ClientPtr client) +{ + REQUEST(xvPutImageReq); + PanoramiXRes *draw, *gc, *port; + Bool isRoot; + int result = Success, i, x, y; + + REQUEST_AT_LEAST_SIZE(xvPutVideoReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + if(!(port = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->port, XvXRTPort, DixReadAccess))) + return _XvBadPort; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + x = stuff->drw_x; + y = stuff->drw_y; + + FOR_NSCREENS_BACKWARD(i) { + if(port->info[i].id) { + stuff->drawable = draw->info[i].id; + stuff->port = port->info[i].id; + stuff->gc = gc->info[i].id; + stuff->drw_x = x; + stuff->drw_y = y; + if(isRoot) { + stuff->drw_x -= panoramiXdataPtr[i].x; + stuff->drw_y -= panoramiXdataPtr[i].y; + } + + result = ProcXvPutVideo(client); + } + } + return result; +} + +static int +XineramaXvPutStill(ClientPtr client) +{ + REQUEST(xvPutImageReq); + PanoramiXRes *draw, *gc, *port; + Bool isRoot; + int result = Success, i, x, y; + + REQUEST_AT_LEAST_SIZE(xvPutImageReq); + + if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) + return BadDrawable; + + if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->gc, XRT_GC, DixReadAccess))) + return BadGC; + + if(!(port = (PanoramiXRes *)SecurityLookupIDByType( + client, stuff->port, XvXRTPort, DixReadAccess))) + return _XvBadPort; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + x = stuff->drw_x; + y = stuff->drw_y; + + FOR_NSCREENS_BACKWARD(i) { + if(port->info[i].id) { + stuff->drawable = draw->info[i].id; + stuff->port = port->info[i].id; + stuff->gc = gc->info[i].id; + stuff->drw_x = x; + stuff->drw_y = y; + if(isRoot) { + stuff->drw_x -= panoramiXdataPtr[i].x; + stuff->drw_y -= panoramiXdataPtr[i].y; + } + + result = ProcXvPutStill(client); + } + } + return result; +} + + +void XineramifyXv(void) +{ + ScreenPtr pScreen, screen0 = screenInfo.screens[0]; + XvScreenPtr xvsp0 = (XvScreenPtr)screen0->devPrivates[XvScreenIndex].ptr; + XvAdaptorPtr refAdapt, pAdapt; + XvAttributePtr pAttr; + XvScreenPtr xvsp; + Bool isOverlay, hasOverlay; + PanoramiXRes *port; + XvAdaptorPtr MatchingAdaptors[MAXSCREENS]; + int i, j, k, l; + + XvXRTPort = CreateNewResourceType(XineramaDeleteResource); + + if(!xvsp0) return; + + for(i = 0; i < xvsp0->nAdaptors; i++) { + refAdapt = xvsp0->pAdaptors + i; + + bzero(MatchingAdaptors, sizeof(XvAdaptorPtr) * MAXSCREENS); + + MatchingAdaptors[0] = refAdapt; + + if(!(refAdapt->type & XvInputMask)) continue; + + isOverlay = FALSE; + for(j = 0; j < refAdapt->nAttributes; j++) { + pAttr = refAdapt->pAttributes + j; + if(!strcmp(pAttr->name, "XV_COLORKEY")) { + isOverlay = TRUE; + break; + } + } + + for(j = 1; j < PanoramiXNumScreens; j++) { + pScreen = screenInfo.screens[j]; + xvsp = (XvScreenPtr)pScreen->devPrivates[XvScreenIndex].ptr; + + /* Do not try to go on if xv is not supported on this screen */ + if (xvsp==NULL) continue ; + + /* if the adaptor has the same name it's a perfect match */ + for(k = 0; k < xvsp->nAdaptors; k++) { + pAdapt = xvsp->pAdaptors + k; + if(!strcmp(refAdapt->name, pAdapt->name)) { + MatchingAdaptors[j] = pAdapt; + break; + } + } + if(MatchingAdaptors[j]) continue; /* found it */ + + /* otherwise we only look for XvImage adaptors */ + if(!(refAdapt->type & XvImageMask)) continue; + if(refAdapt->nImages <= 0) continue; + + /* prefer overlay/overlay non-overlay/non-overlay pairing */ + for(k = 0; k < xvsp->nAdaptors; k++) { + pAdapt = xvsp->pAdaptors + k; + if((pAdapt->type & XvImageMask) && (pAdapt->nImages > 0)) { + hasOverlay = FALSE; + for(l = 0; l < pAdapt->nAttributes; l++) { + if(!strcmp(pAdapt->name, "XV_COLORKEY")) { + hasOverlay = TRUE; + break; + } + } + if(isOverlay && hasOverlay) { + MatchingAdaptors[j] = pAdapt; + break; + } + else if(!isOverlay && !hasOverlay) { + MatchingAdaptors[j] = pAdapt; + break; + } + } + } + + if(MatchingAdaptors[j]) continue; /* found it */ + + /* but we'll take any XvImage pairing if we can get it */ + + for(k = 0; k < xvsp->nAdaptors; k++) { + pAdapt = xvsp->pAdaptors + k; + if((pAdapt->type & XvImageMask) && (pAdapt->nImages > 0)) { + MatchingAdaptors[j] = pAdapt; + break; + } + } + } + + /* now create a resource for each port */ + for(j = 0; j < refAdapt->nPorts; j++) { + if(!(port = xalloc(sizeof(PanoramiXRes)))) + break; + port->info[0].id = MatchingAdaptors[0]->base_id + j; + AddResource(port->info[0].id, XvXRTPort, port); + + for(k = 1; k < PanoramiXNumScreens; k++) { + if(MatchingAdaptors[k] && (MatchingAdaptors[k]->nPorts > j)) + port->info[k].id = MatchingAdaptors[k]->base_id + j; + else + port->info[k].id = 0; + } + } + } +} + +#endif diff --git a/xorg-server-1.4/Xext/xvdisp.h b/xorg-server-1.4/Xext/xvdisp.h new file mode 100644 index 0000000..75cacdd --- /dev/null +++ b/xorg-server-1.4/Xext/xvdisp.h @@ -0,0 +1 @@ +extern void XineramifyXv(void); diff --git a/xorg-server-1.4/Xext/xvdix.h b/xorg-server-1.4/Xext/xvdix.h new file mode 100644 index 0000000..9e94e05 --- /dev/null +++ b/xorg-server-1.4/Xext/xvdix.h @@ -0,0 +1,290 @@ +/*********************************************************** +Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, +and the Massachusetts Institute of Technology, Cambridge, 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 names of Digital or MIT 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. + +******************************************************************/ + +#ifndef XVDIX_H +#define XVDIX_H +/* +** File: +** +** xvdix.h --- Xv device independent header file +** +** Author: +** +** David Carver (Digital Workstation Engineering/Project Athena) +** +** Revisions: +** +** 29.08.91 Carver +** - removed UnrealizeWindow wrapper unrealizing windows no longer +** preempts video +** +** 11.06.91 Carver +** - changed SetPortControl to SetPortAttribute +** - changed GetPortControl to GetPortAttribute +** - changed QueryBestSize +** +** 15.05.91 Carver +** - version 2.0 upgrade +** +** 24.01.91 Carver +** - version 1.4 upgrade +** +*/ + +#include "scrnintstr.h" +#include + +extern int XvScreenIndex; +extern unsigned long XvExtensionGeneration; +extern unsigned long XvScreenGeneration; +extern unsigned long XvResourceGeneration; + +extern int XvReqCode; +extern int XvEventBase; +extern int XvErrorBase; + +extern unsigned long XvRTPort; +extern unsigned long XvRTEncoding; +extern unsigned long XvRTGrab; +extern unsigned long XvRTVideoNotify; +extern unsigned long XvRTVideoNotifyList; +extern unsigned long XvRTPortNotify; + +typedef struct { + int numerator; + int denominator; +} XvRationalRec, *XvRationalPtr; + +typedef struct { + char depth; + unsigned long visual; +} XvFormatRec, *XvFormatPtr; + +typedef struct { + unsigned long id; + ClientPtr client; +} XvGrabRec, *XvGrabPtr; + +typedef struct _XvVideoNotifyRec { + struct _XvVideoNotifyRec *next; + ClientPtr client; + unsigned long id; + unsigned long mask; +} XvVideoNotifyRec, *XvVideoNotifyPtr; + +typedef struct _XvPortNotifyRec { + struct _XvPortNotifyRec *next; + ClientPtr client; + unsigned long id; +} XvPortNotifyRec, *XvPortNotifyPtr; + +typedef struct { + int id; + ScreenPtr pScreen; + char *name; + unsigned short width, height; + XvRationalRec rate; +} XvEncodingRec, *XvEncodingPtr; + +typedef struct _XvAttributeRec { + int flags; + int min_value; + int max_value; + char *name; +} XvAttributeRec, *XvAttributePtr; + +typedef struct { + int id; + int type; + int byte_order; + char guid[16]; + int bits_per_pixel; + int format; + int num_planes; + + /* for RGB formats only */ + int depth; + unsigned int red_mask; + unsigned int green_mask; + unsigned int blue_mask; + + /* for YUV formats only */ + unsigned int y_sample_bits; + unsigned int u_sample_bits; + unsigned int v_sample_bits; + unsigned int horz_y_period; + unsigned int horz_u_period; + unsigned int horz_v_period; + unsigned int vert_y_period; + unsigned int vert_u_period; + unsigned int vert_v_period; + char component_order[32]; + int scanline_order; +} XvImageRec, *XvImagePtr; + +typedef struct { + unsigned long base_id; + unsigned char type; + char *name; + int nEncodings; + XvEncodingPtr pEncodings; + int nFormats; + XvFormatPtr pFormats; + int nAttributes; + XvAttributePtr pAttributes; + int nImages; + XvImagePtr pImages; + int nPorts; + struct _XvPortRec *pPorts; + ScreenPtr pScreen; + int (* ddAllocatePort)(unsigned long, struct _XvPortRec*, + struct _XvPortRec**); + int (* ddFreePort)(struct _XvPortRec*); + int (* ddPutVideo)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); + int (* ddPutStill)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); + int (* ddGetVideo)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); + int (* ddGetStill)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); + int (* ddStopVideo)(ClientPtr, struct _XvPortRec*, DrawablePtr); + int (* ddSetPortAttribute)(ClientPtr, struct _XvPortRec*, Atom, INT32); + int (* ddGetPortAttribute)(ClientPtr, struct _XvPortRec*, Atom, INT32*); + int (* ddQueryBestSize)(ClientPtr, struct _XvPortRec*, CARD8, + CARD16, CARD16,CARD16, CARD16, + unsigned int*, unsigned int*); + int (* ddPutImage)(ClientPtr, DrawablePtr, struct _XvPortRec*, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16, + XvImagePtr, unsigned char*, Bool, + CARD16, CARD16); + int (* ddQueryImageAttributes)(ClientPtr, struct _XvPortRec*, XvImagePtr, + CARD16*, CARD16*, int*, int*); + DevUnion devPriv; +} XvAdaptorRec, *XvAdaptorPtr; + +typedef struct _XvPortRec { + unsigned long id; + XvAdaptorPtr pAdaptor; + XvPortNotifyPtr pNotify; + DrawablePtr pDraw; + ClientPtr client; + XvGrabRec grab; + TimeStamp time; + DevUnion devPriv; +} XvPortRec, *XvPortPtr; + +#define LOOKUP_PORT(_id, client)\ + ((XvPortPtr)LookupIDByType(_id, XvRTPort)) + +#define LOOKUP_ENCODING(_id, client)\ + ((XvEncodingPtr)LookupIDByType(_id, XvRTEncoding)) + +#define LOOKUP_VIDEONOTIFY_LIST(_id, client)\ + ((XvVideoNotifyPtr)LookupIDByType(_id, XvRTVideoNotifyList)) + +#define LOOKUP_PORTNOTIFY_LIST(_id, client)\ + ((XvPortNotifyPtr)LookupIDByType(_id, XvRTPortNotifyList)) + +typedef struct { + int version, revision; + int nAdaptors; + XvAdaptorPtr pAdaptors; + DestroyWindowProcPtr DestroyWindow; + DestroyPixmapProcPtr DestroyPixmap; + CloseScreenProcPtr CloseScreen; + Bool (* ddCloseScreen)(int, ScreenPtr); + int (* ddQueryAdaptors)(ScreenPtr, XvAdaptorPtr*, int*); + DevUnion devPriv; +} XvScreenRec, *XvScreenPtr; + +#define SCREEN_PROLOGUE(pScreen, field)\ + ((pScreen)->field = \ + ((XvScreenPtr) \ + (pScreen)->devPrivates[XvScreenIndex].ptr)->field) + +#define SCREEN_EPILOGUE(pScreen, field, wrapper)\ + ((pScreen)->field = wrapper) + +/* Errors */ + +#define _XvBadPort (XvBadPort+XvErrorBase) +#define _XvBadEncoding (XvBadEncoding+XvErrorBase) + +extern int ProcXvDispatch(ClientPtr); +extern int SProcXvDispatch(ClientPtr); + +extern void XvExtensionInit(void); +extern int XvScreenInit(ScreenPtr); +extern int XvGetScreenIndex(void); +extern unsigned long XvGetRTPort(void); +extern int XvdiSendPortNotify(XvPortPtr, Atom, INT32); +extern int XvdiVideoStopped(XvPortPtr, int); + +extern int XvdiPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); +extern int XvdiPutStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); +extern int XvdiGetVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); +extern int XvdiGetStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); +extern int XvdiPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16, + XvImagePtr, unsigned char*, Bool, + CARD16, CARD16); +extern int XvdiSelectVideoNotify(ClientPtr, DrawablePtr, BOOL); +extern int XvdiSelectPortNotify(ClientPtr, XvPortPtr, BOOL); +extern int XvdiSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32); +extern int XvdiGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32*); +extern int XvdiStopVideo(ClientPtr, XvPortPtr, DrawablePtr); +extern int XvdiPreemptVideo(ClientPtr, XvPortPtr, DrawablePtr); +extern int XvdiMatchPort(XvPortPtr, DrawablePtr); +extern int XvdiGrabPort(ClientPtr, XvPortPtr, Time, int *); +extern int XvdiUngrabPort( ClientPtr, XvPortPtr, Time); + + +#if !defined(UNIXCPP) + +#define XVCALL(name) Xv##name + +#else + +#define XVCALL(name) Xv/**/name + +#endif + + +#endif /* XVDIX_H */ + diff --git a/xorg-server-1.4/Xext/xvmain.c b/xorg-server-1.4/Xext/xvmain.c new file mode 100644 index 0000000..ddf3d1d --- /dev/null +++ b/xorg-server-1.4/Xext/xvmain.c @@ -0,0 +1,1199 @@ +/*********************************************************** +Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, +and the Massachusetts Institute of Technology, Cambridge, 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 names of Digital or MIT 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. + +******************************************************************/ + +/* +** File: +** +** xvmain.c --- Xv server extension main device independent module. +** +** Author: +** +** David Carver (Digital Workstation Engineering/Project Athena) +** +** Revisions: +** +** 04.09.91 Carver +** - change: stop video always generates an event even when video +** wasn't active +** +** 29.08.91 Carver +** - change: unrealizing windows no longer preempts video +** +** 11.06.91 Carver +** - changed SetPortControl to SetPortAttribute +** - changed GetPortControl to GetPortAttribute +** - changed QueryBestSize +** +** 28.05.91 Carver +** - fixed Put and Get requests to not preempt operations to same drawable +** +** 15.05.91 Carver +** - version 2.0 upgrade +** +** 19.03.91 Carver +** - fixed Put and Get requests to honor grabbed ports. +** - fixed Video requests to update di structure with new drawable, and +** client after calling ddx. +** +** 24.01.91 Carver +** - version 1.4 upgrade +** +** Notes: +** +** Port structures reference client structures in a two different +** ways: when grabs, or video is active. Each reference is encoded +** as fake client resources and thus when the client is goes away so +** does the reference (it is zeroed). No other action is taken, so +** video doesn't necessarily stop. It probably will as a result of +** other resources going away, but if a client starts video using +** none of its own resources, then the video will continue to play +** after the client disappears. +** +** +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include +#include "misc.h" +#include "os.h" +#include "scrnintstr.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "gc.h" +#include "extnsionst.h" +#include "dixstruct.h" +#include "resource.h" +#include "opaque.h" +#include "input.h" + +#define GLOBAL + +#include +#include +#include "xvdix.h" + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#include "xvdisp.h" +#endif + +int XvScreenIndex = -1; +unsigned long XvExtensionGeneration = 0; +unsigned long XvScreenGeneration = 0; +unsigned long XvResourceGeneration = 0; + +int XvReqCode; +int XvEventBase; +int XvErrorBase; + +unsigned long XvRTPort; +unsigned long XvRTEncoding; +unsigned long XvRTGrab; +unsigned long XvRTVideoNotify; +unsigned long XvRTVideoNotifyList; +unsigned long XvRTPortNotify; + + + +/* EXTERNAL */ + +extern XID clientErrorValue; + +static void WriteSwappedVideoNotifyEvent(xvEvent *, xvEvent *); +static void WriteSwappedPortNotifyEvent(xvEvent *, xvEvent *); +static Bool CreateResourceTypes(void); + +static Bool XvCloseScreen(int, ScreenPtr); +static Bool XvDestroyPixmap(PixmapPtr); +static Bool XvDestroyWindow(WindowPtr); +static void XvResetProc(ExtensionEntry*); +static int XvdiDestroyGrab(pointer, XID); +static int XvdiDestroyEncoding(pointer, XID); +static int XvdiDestroyVideoNotify(pointer, XID); +static int XvdiDestroyPortNotify(pointer, XID); +static int XvdiDestroyVideoNotifyList(pointer, XID); +static int XvdiDestroyPort(pointer, XID); +static int XvdiSendVideoNotify(XvPortPtr, DrawablePtr, int); + + + + +/* +** XvExtensionInit +** +** +*/ + +void +XvExtensionInit(void) +{ + ExtensionEntry *extEntry; + + /* LOOK TO SEE IF ANY SCREENS WERE INITIALIZED; IF NOT THEN + INIT GLOBAL VARIABLES SO THE EXTENSION CAN FUNCTION */ + if (XvScreenGeneration != serverGeneration) + { + if (!CreateResourceTypes()) + { + ErrorF("XvExtensionInit: Unable to allocate resource types\n"); + return; + } + XvScreenIndex = AllocateScreenPrivateIndex (); + if (XvScreenIndex < 0) + { + ErrorF("XvExtensionInit: Unable to allocate screen private index\n"); + return; + } +#ifdef PANORAMIX + XineramaRegisterConnectionBlockCallback(XineramifyXv); +#endif + XvScreenGeneration = serverGeneration; + } + + if (XvExtensionGeneration != serverGeneration) + { + XvExtensionGeneration = serverGeneration; + + extEntry = AddExtension(XvName, XvNumEvents, XvNumErrors, + ProcXvDispatch, SProcXvDispatch, + XvResetProc, StandardMinorOpcode); + if (!extEntry) + { + FatalError("XvExtensionInit: AddExtensions failed\n"); + } + + XvReqCode = extEntry->base; + XvEventBase = extEntry->eventBase; + XvErrorBase = extEntry->errorBase; + + EventSwapVector[XvEventBase+XvVideoNotify] = + (EventSwapPtr)WriteSwappedVideoNotifyEvent; + EventSwapVector[XvEventBase+XvPortNotify] = + (EventSwapPtr)WriteSwappedPortNotifyEvent; + + (void)MakeAtom(XvName, strlen(XvName), xTrue); + + } +} + +static Bool +CreateResourceTypes(void) + +{ + + if (XvResourceGeneration == serverGeneration) return TRUE; + + XvResourceGeneration = serverGeneration; + + if (!(XvRTPort = CreateNewResourceType(XvdiDestroyPort))) + { + ErrorF("CreateResourceTypes: failed to allocate port resource.\n"); + return FALSE; + } + + if (!(XvRTGrab = CreateNewResourceType(XvdiDestroyGrab))) + { + ErrorF("CreateResourceTypes: failed to allocate grab resource.\n"); + return FALSE; + } + + if (!(XvRTEncoding = CreateNewResourceType(XvdiDestroyEncoding))) + { + ErrorF("CreateResourceTypes: failed to allocate encoding resource.\n"); + return FALSE; + } + + if (!(XvRTVideoNotify = CreateNewResourceType(XvdiDestroyVideoNotify))) + { + ErrorF("CreateResourceTypes: failed to allocate video notify resource.\n"); + return FALSE; + } + + if (!(XvRTVideoNotifyList = CreateNewResourceType(XvdiDestroyVideoNotifyList))) + { + ErrorF("CreateResourceTypes: failed to allocate video notify list resource.\n"); + return FALSE; + } + + if (!(XvRTPortNotify = CreateNewResourceType(XvdiDestroyPortNotify))) + { + ErrorF("CreateResourceTypes: failed to allocate port notify resource.\n"); + return FALSE; + } + + return TRUE; + +} + +_X_EXPORT int +XvScreenInit(ScreenPtr pScreen) +{ + XvScreenPtr pxvs; + + if (XvScreenGeneration != serverGeneration) + { + if (!CreateResourceTypes()) + { + ErrorF("XvScreenInit: Unable to allocate resource types\n"); + return BadAlloc; + } + XvScreenIndex = AllocateScreenPrivateIndex (); + if (XvScreenIndex < 0) + { + ErrorF("XvScreenInit: Unable to allocate screen private index\n"); + return BadAlloc; + } +#ifdef PANORAMIX + XineramaRegisterConnectionBlockCallback(XineramifyXv); +#endif + XvScreenGeneration = serverGeneration; + } + + if (pScreen->devPrivates[XvScreenIndex].ptr) + { + ErrorF("XvScreenInit: screen devPrivates ptr non-NULL before init\n"); + } + + /* ALLOCATE SCREEN PRIVATE RECORD */ + + pxvs = (XvScreenPtr) xalloc (sizeof (XvScreenRec)); + if (!pxvs) + { + ErrorF("XvScreenInit: Unable to allocate screen private structure\n"); + return BadAlloc; + } + + pScreen->devPrivates[XvScreenIndex].ptr = (pointer)pxvs; + + + pxvs->DestroyPixmap = pScreen->DestroyPixmap; + pxvs->DestroyWindow = pScreen->DestroyWindow; + pxvs->CloseScreen = pScreen->CloseScreen; + + pScreen->DestroyPixmap = XvDestroyPixmap; + pScreen->DestroyWindow = XvDestroyWindow; + pScreen->CloseScreen = XvCloseScreen; + + return Success; +} + +static Bool +XvCloseScreen( + int ii, + ScreenPtr pScreen +){ + + XvScreenPtr pxvs; + + pxvs = (XvScreenPtr) pScreen->devPrivates[XvScreenIndex].ptr; + + pScreen->DestroyPixmap = pxvs->DestroyPixmap; + pScreen->DestroyWindow = pxvs->DestroyWindow; + pScreen->CloseScreen = pxvs->CloseScreen; + + (* pxvs->ddCloseScreen)(ii, pScreen); + + xfree(pxvs); + + pScreen->devPrivates[XvScreenIndex].ptr = (pointer)NULL; + + return (*pScreen->CloseScreen)(ii, pScreen); + +} + +static void +XvResetProc(ExtensionEntry* extEntry) +{ +} + +_X_EXPORT int +XvGetScreenIndex(void) +{ + return XvScreenIndex; +} + +_X_EXPORT unsigned long +XvGetRTPort(void) +{ + return XvRTPort; +} + +static Bool +XvDestroyPixmap(PixmapPtr pPix) +{ + Bool status; + ScreenPtr pScreen; + XvScreenPtr pxvs; + XvAdaptorPtr pa; + int na; + XvPortPtr pp; + int np; + + pScreen = pPix->drawable.pScreen; + + SCREEN_PROLOGUE(pScreen, DestroyPixmap); + + pxvs = (XvScreenPtr)pScreen->devPrivates[XvScreenIndex].ptr; + + /* CHECK TO SEE IF THIS PORT IS IN USE */ + + pa = pxvs->pAdaptors; + na = pxvs->nAdaptors; + while (na--) + { + np = pa->nPorts; + pp = pa->pPorts; + + while (np--) + { + if (pp->pDraw == (DrawablePtr)pPix) + { + XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted); + + (void)(* pp->pAdaptor->ddStopVideo)((ClientPtr)NULL, pp, + pp->pDraw); + + pp->pDraw = (DrawablePtr)NULL; + pp->client = (ClientPtr)NULL; + pp->time = currentTime; + } + pp++; + } + pa++; + } + + status = (* pScreen->DestroyPixmap)(pPix); + + SCREEN_EPILOGUE(pScreen, DestroyPixmap, XvDestroyPixmap); + + return status; + +} + +static Bool +XvDestroyWindow(WindowPtr pWin) +{ + Bool status; + ScreenPtr pScreen; + XvScreenPtr pxvs; + XvAdaptorPtr pa; + int na; + XvPortPtr pp; + int np; + + pScreen = pWin->drawable.pScreen; + + SCREEN_PROLOGUE(pScreen, DestroyWindow); + + pxvs = (XvScreenPtr)pScreen->devPrivates[XvScreenIndex].ptr; + + /* CHECK TO SEE IF THIS PORT IS IN USE */ + + pa = pxvs->pAdaptors; + na = pxvs->nAdaptors; + while (na--) + { + np = pa->nPorts; + pp = pa->pPorts; + + while (np--) + { + if (pp->pDraw == (DrawablePtr)pWin) + { + XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted); + + (void)(* pp->pAdaptor->ddStopVideo)((ClientPtr)NULL, pp, + pp->pDraw); + + pp->pDraw = (DrawablePtr)NULL; + pp->client = (ClientPtr)NULL; + pp->time = currentTime; + } + pp++; + } + pa++; + } + + + status = (* pScreen->DestroyWindow)(pWin); + + SCREEN_EPILOGUE(pScreen, DestroyWindow, XvDestroyWindow); + + return status; + +} + +/* The XvdiVideoStopped procedure is a hook for the device dependent layer. + It provides a way for the dd layer to inform the di layer that video has + stopped in a port for reasons that the di layer had no control over; note + that it doesn't call back into the dd layer */ + +int +XvdiVideoStopped(XvPortPtr pPort, int reason) +{ + + /* IF PORT ISN'T ACTIVE THEN WE'RE DONE */ + + if (!pPort->pDraw) return Success; + + XvdiSendVideoNotify(pPort, pPort->pDraw, reason); + + pPort->pDraw = (DrawablePtr)NULL; + pPort->client = (ClientPtr)NULL; + pPort->time = currentTime; + + return Success; + +} + +static int +XvdiDestroyPort(pointer pPort, XID id) +{ + return (* ((XvPortPtr)pPort)->pAdaptor->ddFreePort)(pPort); +} + +static int +XvdiDestroyGrab(pointer pGrab, XID id) +{ + ((XvGrabPtr)pGrab)->client = (ClientPtr)NULL; + return Success; +} + +static int +XvdiDestroyVideoNotify(pointer pn, XID id) +{ + /* JUST CLEAR OUT THE client POINTER FIELD */ + + ((XvVideoNotifyPtr)pn)->client = (ClientPtr)NULL; + return Success; +} + +static int +XvdiDestroyPortNotify(pointer pn, XID id) +{ + /* JUST CLEAR OUT THE client POINTER FIELD */ + + ((XvPortNotifyPtr)pn)->client = (ClientPtr)NULL; + return Success; +} + +static int +XvdiDestroyVideoNotifyList(pointer pn, XID id) +{ + XvVideoNotifyPtr npn,cpn; + + /* ACTUALLY DESTROY THE NOTITY LIST */ + + cpn = (XvVideoNotifyPtr)pn; + + while (cpn) + { + npn = cpn->next; + if (cpn->client) FreeResource(cpn->id, XvRTVideoNotify); + xfree(cpn); + cpn = npn; + } + return Success; +} + +static int +XvdiDestroyEncoding(pointer value, XID id) +{ + return Success; +} + +static int +XvdiSendVideoNotify(pPort, pDraw, reason) + +XvPortPtr pPort; +DrawablePtr pDraw; +int reason; + +{ + xvEvent event; + XvVideoNotifyPtr pn; + + pn = (XvVideoNotifyPtr)LookupIDByType(pDraw->id, XvRTVideoNotifyList); + + while (pn) + { + if (pn->client) + { + event.u.u.type = XvEventBase + XvVideoNotify; + event.u.u.sequenceNumber = pn->client->sequence; + event.u.videoNotify.time = currentTime.milliseconds; + event.u.videoNotify.drawable = pDraw->id; + event.u.videoNotify.port = pPort->id; + event.u.videoNotify.reason = reason; + (void) TryClientEvents(pn->client, (xEventPtr)&event, 1, NoEventMask, + NoEventMask, NullGrab); + } + pn = pn->next; + } + + return Success; + +} + + +int +XvdiSendPortNotify( + XvPortPtr pPort, + Atom attribute, + INT32 value +){ + xvEvent event; + XvPortNotifyPtr pn; + + pn = pPort->pNotify; + + while (pn) + { + if (pn->client) + { + event.u.u.type = XvEventBase + XvPortNotify; + event.u.u.sequenceNumber = pn->client->sequence; + event.u.portNotify.time = currentTime.milliseconds; + event.u.portNotify.port = pPort->id; + event.u.portNotify.attribute = attribute; + event.u.portNotify.value = value; + (void) TryClientEvents(pn->client, (xEventPtr)&event, 1, NoEventMask, + NoEventMask, NullGrab); + } + pn = pn->next; + } + + return Success; + +} + + +#define CHECK_SIZE(dw, dh, sw, sh) { \ + if(!dw || !dh || !sw || !sh) return Success; \ + /* The region code will break these if they are too large */ \ + if((dw > 32767) || (dh > 32767) || (sw > 32767) || (sh > 32767)) \ + return BadValue; \ +} + + +int +XvdiPutVideo( + ClientPtr client, + DrawablePtr pDraw, + XvPortPtr pPort, + GCPtr pGC, + INT16 vid_x, INT16 vid_y, + CARD16 vid_w, CARD16 vid_h, + INT16 drw_x, INT16 drw_y, + CARD16 drw_w, CARD16 drw_h +){ + DrawablePtr pOldDraw; + + CHECK_SIZE(drw_w, drw_h, vid_w, vid_h); + + /* UPDATE TIME VARIABLES FOR USE IN EVENTS */ + + UpdateCurrentTime(); + + /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN + INFORM CLIENT OF ITS FAILURE */ + + if (pPort->grab.client && (pPort->grab.client != client)) + { + XvdiSendVideoNotify(pPort, pDraw, XvBusy); + return Success; + } + + /* CHECK TO SEE IF PORT IS IN USE; IF SO THEN WE MUST DELIVER INTERRUPTED + EVENTS TO ANY CLIENTS WHO WANT THEM */ + + pOldDraw = pPort->pDraw; + if ((pOldDraw) && (pOldDraw != pDraw)) + { + XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted); + } + + (void) (* pPort->pAdaptor->ddPutVideo)(client, pDraw, pPort, pGC, + vid_x, vid_y, vid_w, vid_h, + drw_x, drw_y, drw_w, drw_h); + + if ((pPort->pDraw) && (pOldDraw != pDraw)) + { + pPort->client = client; + XvdiSendVideoNotify(pPort, pPort->pDraw, XvStarted); + } + + pPort->time = currentTime; + + return (Success); + +} + +int +XvdiPutStill( + ClientPtr client, + DrawablePtr pDraw, + XvPortPtr pPort, + GCPtr pGC, + INT16 vid_x, INT16 vid_y, + CARD16 vid_w, CARD16 vid_h, + INT16 drw_x, INT16 drw_y, + CARD16 drw_w, CARD16 drw_h +){ + int status; + + CHECK_SIZE(drw_w, drw_h, vid_w, vid_h); + + /* UPDATE TIME VARIABLES FOR USE IN EVENTS */ + + UpdateCurrentTime(); + + /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN + INFORM CLIENT OF ITS FAILURE */ + + if (pPort->grab.client && (pPort->grab.client != client)) + { + XvdiSendVideoNotify(pPort, pDraw, XvBusy); + return Success; + } + + pPort->time = currentTime; + + status = (* pPort->pAdaptor->ddPutStill)(client, pDraw, pPort, pGC, + vid_x, vid_y, vid_w, vid_h, + drw_x, drw_y, drw_w, drw_h); + + return status; + +} + +int +XvdiPutImage( + ClientPtr client, + DrawablePtr pDraw, + XvPortPtr pPort, + GCPtr pGC, + INT16 src_x, INT16 src_y, + CARD16 src_w, CARD16 src_h, + INT16 drw_x, INT16 drw_y, + CARD16 drw_w, CARD16 drw_h, + XvImagePtr image, + unsigned char* data, + Bool sync, + CARD16 width, CARD16 height +){ + CHECK_SIZE(drw_w, drw_h, src_w, src_h); + + /* UPDATE TIME VARIABLES FOR USE IN EVENTS */ + + UpdateCurrentTime(); + + /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN + INFORM CLIENT OF ITS FAILURE */ + + if (pPort->grab.client && (pPort->grab.client != client)) + { + XvdiSendVideoNotify(pPort, pDraw, XvBusy); + return Success; + } + + pPort->time = currentTime; + + return (* pPort->pAdaptor->ddPutImage)(client, pDraw, pPort, pGC, + src_x, src_y, src_w, src_h, + drw_x, drw_y, drw_w, drw_h, + image, data, sync, width, height); +} + + +int +XvdiGetVideo( + ClientPtr client, + DrawablePtr pDraw, + XvPortPtr pPort, + GCPtr pGC, + INT16 vid_x, INT16 vid_y, + CARD16 vid_w, CARD16 vid_h, + INT16 drw_x, INT16 drw_y, + CARD16 drw_w, CARD16 drw_h +){ + DrawablePtr pOldDraw; + + CHECK_SIZE(drw_w, drw_h, vid_w, vid_h); + + /* UPDATE TIME VARIABLES FOR USE IN EVENTS */ + + UpdateCurrentTime(); + + /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN + INFORM CLIENT OF ITS FAILURE */ + + if (pPort->grab.client && (pPort->grab.client != client)) + { + XvdiSendVideoNotify(pPort, pDraw, XvBusy); + return Success; + } + + /* CHECK TO SEE IF PORT IS IN USE; IF SO THEN WE MUST DELIVER INTERRUPTED + EVENTS TO ANY CLIENTS WHO WANT THEM */ + + pOldDraw = pPort->pDraw; + if ((pOldDraw) && (pOldDraw != pDraw)) + { + XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted); + } + + (void) (* pPort->pAdaptor->ddGetVideo)(client, pDraw, pPort, pGC, + vid_x, vid_y, vid_w, vid_h, + drw_x, drw_y, drw_w, drw_h); + + if ((pPort->pDraw) && (pOldDraw != pDraw)) + { + pPort->client = client; + XvdiSendVideoNotify(pPort, pPort->pDraw, XvStarted); + } + + pPort->time = currentTime; + + return (Success); + +} + +int +XvdiGetStill( + ClientPtr client, + DrawablePtr pDraw, + XvPortPtr pPort, + GCPtr pGC, + INT16 vid_x, INT16 vid_y, + CARD16 vid_w, CARD16 vid_h, + INT16 drw_x, INT16 drw_y, + CARD16 drw_w, CARD16 drw_h +){ + int status; + + CHECK_SIZE(drw_w, drw_h, vid_w, vid_h); + + /* UPDATE TIME VARIABLES FOR USE IN EVENTS */ + + UpdateCurrentTime(); + + /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN + INFORM CLIENT OF ITS FAILURE */ + + if (pPort->grab.client && (pPort->grab.client != client)) + { + XvdiSendVideoNotify(pPort, pDraw, XvBusy); + return Success; + } + + status = (* pPort->pAdaptor->ddGetStill)(client, pDraw, pPort, pGC, + vid_x, vid_y, vid_w, vid_h, + drw_x, drw_y, drw_w, drw_h); + + pPort->time = currentTime; + + return status; + +} + +int +XvdiGrabPort( + ClientPtr client, + XvPortPtr pPort, + Time ctime, + int *p_result +){ + unsigned long id; + TimeStamp time; + + UpdateCurrentTime(); + time = ClientTimeToServerTime(ctime); + + if (pPort->grab.client && (client != pPort->grab.client)) + { + *p_result = XvAlreadyGrabbed; + return Success; + } + + if ((CompareTimeStamps(time, currentTime) == LATER) || + (CompareTimeStamps(time, pPort->time) == EARLIER)) + { + *p_result = XvInvalidTime; + return Success; + } + + if (client == pPort->grab.client) + { + *p_result = Success; + return Success; + } + + id = FakeClientID(client->index); + + if (!AddResource(id, XvRTGrab, &pPort->grab)) + { + return BadAlloc; + } + + /* IF THERE IS ACTIVE VIDEO THEN STOP IT */ + + if ((pPort->pDraw) && (client != pPort->client)) + { + XVCALL(diStopVideo)((ClientPtr)NULL, pPort, pPort->pDraw); + } + + pPort->grab.client = client; + pPort->grab.id = id; + + pPort->time = currentTime; + + *p_result = Success; + + return Success; + +} + +int +XvdiUngrabPort( + ClientPtr client, + XvPortPtr pPort, + Time ctime +){ + TimeStamp time; + + UpdateCurrentTime(); + time = ClientTimeToServerTime(ctime); + + if ((!pPort->grab.client) || (client != pPort->grab.client)) + { + return Success; + } + + if ((CompareTimeStamps(time, currentTime) == LATER) || + (CompareTimeStamps(time, pPort->time) == EARLIER)) + { + return Success; + } + + /* FREE THE GRAB RESOURCE; AND SET THE GRAB CLIENT TO NULL */ + + FreeResource(pPort->grab.id, XvRTGrab); + pPort->grab.client = (ClientPtr)NULL; + + pPort->time = currentTime; + + return Success; + +} + + +int +XvdiSelectVideoNotify( + ClientPtr client, + DrawablePtr pDraw, + BOOL onoff +){ + XvVideoNotifyPtr pn,tpn,fpn; + + /* FIND VideoNotify LIST */ + + pn = (XvVideoNotifyPtr)LookupIDByType(pDraw->id, XvRTVideoNotifyList); + + /* IF ONE DONES'T EXIST AND NO MASK, THEN JUST RETURN */ + + if (!onoff && !pn) return Success; + + /* IF ONE DOESN'T EXIST CREATE IT AND ADD A RESOURCE SO THAT THE LIST + WILL BE DELETED WHEN THE DRAWABLE IS DESTROYED */ + + if (!pn) + { + if (!(tpn = (XvVideoNotifyPtr)xalloc(sizeof(XvVideoNotifyRec)))) + return BadAlloc; + tpn->next = (XvVideoNotifyPtr)NULL; + if (!AddResource(pDraw->id, XvRTVideoNotifyList, tpn)) + { + xfree(tpn); + return BadAlloc; + } + } + else + { + /* LOOK TO SEE IF ENTRY ALREADY EXISTS */ + + fpn = (XvVideoNotifyPtr)NULL; + tpn = pn; + while (tpn) + { + if (tpn->client == client) + { + if (!onoff) tpn->client = (ClientPtr)NULL; + return Success; + } + if (!tpn->client) fpn = tpn; /* TAKE NOTE OF FREE ENTRY */ + tpn = tpn->next; + } + + /* IF TUNNING OFF, THEN JUST RETURN */ + + if (!onoff) return Success; + + /* IF ONE ISN'T FOUND THEN ALLOCATE ONE AND LINK IT INTO THE LIST */ + + if (fpn) + { + tpn = fpn; + } + else + { + if (!(tpn = (XvVideoNotifyPtr)xalloc(sizeof(XvVideoNotifyRec)))) + return BadAlloc; + tpn->next = pn->next; + pn->next = tpn; + } + } + + /* INIT CLIENT PTR IN CASE WE CAN'T ADD RESOURCE */ + /* ADD RESOURCE SO THAT IF CLIENT EXITS THE CLIENT PTR WILL BE CLEARED */ + + tpn->client = (ClientPtr)NULL; + tpn->id = FakeClientID(client->index); + AddResource(tpn->id, XvRTVideoNotify, tpn); + + tpn->client = client; + return Success; + +} + +int +XvdiSelectPortNotify( + ClientPtr client, + XvPortPtr pPort, + BOOL onoff +){ + XvPortNotifyPtr pn,tpn; + + /* SEE IF CLIENT IS ALREADY IN LIST */ + + tpn = (XvPortNotifyPtr)NULL; + pn = pPort->pNotify; + while (pn) + { + if (!pn->client) tpn = pn; /* TAKE NOTE OF FREE ENTRY */ + if (pn->client == client) break; + pn = pn->next; + } + + /* IS THE CLIENT ALREADY ON THE LIST? */ + + if (pn) + { + /* REMOVE IT? */ + + if (!onoff) + { + pn->client = (ClientPtr)NULL; + FreeResource(pn->id, XvRTPortNotify); + } + + return Success; + } + + /* DIDN'T FIND IT; SO REUSE LIST ELEMENT IF ONE IS FREE OTHERWISE + CREATE A NEW ONE AND ADD IT TO THE BEGINNING OF THE LIST */ + + if (!tpn) + { + if (!(tpn = (XvPortNotifyPtr)xalloc(sizeof(XvPortNotifyRec)))) + return BadAlloc; + tpn->next = pPort->pNotify; + pPort->pNotify = tpn; + } + + tpn->client = client; + tpn->id = FakeClientID(client->index); + AddResource(tpn->id, XvRTPortNotify, tpn); + + return Success; + +} + +int +XvdiStopVideo( + ClientPtr client, + XvPortPtr pPort, + DrawablePtr pDraw +){ + int status; + + /* IF PORT ISN'T ACTIVE THEN WE'RE DONE */ + + if (!pPort->pDraw || (pPort->pDraw != pDraw)) + { + XvdiSendVideoNotify(pPort, pDraw, XvStopped); + return Success; + } + + /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN + INFORM CLIENT OF ITS FAILURE */ + + if ((client) && (pPort->grab.client) && (pPort->grab.client != client)) + { + XvdiSendVideoNotify(pPort, pDraw, XvBusy); + return Success; + } + + XvdiSendVideoNotify(pPort, pDraw, XvStopped); + + status = (* pPort->pAdaptor->ddStopVideo)(client, pPort, pDraw); + + pPort->pDraw = (DrawablePtr)NULL; + pPort->client = (ClientPtr)client; + pPort->time = currentTime; + + return status; + +} + +int +XvdiPreemptVideo( + ClientPtr client, + XvPortPtr pPort, + DrawablePtr pDraw +){ + int status; + + /* IF PORT ISN'T ACTIVE THEN WE'RE DONE */ + + if (!pPort->pDraw || (pPort->pDraw != pDraw)) return Success; + + XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted); + + status = (* pPort->pAdaptor->ddStopVideo)(client, pPort, pPort->pDraw); + + pPort->pDraw = (DrawablePtr)NULL; + pPort->client = (ClientPtr)client; + pPort->time = currentTime; + + return status; + +} + +int +XvdiMatchPort( + XvPortPtr pPort, + DrawablePtr pDraw +){ + + XvAdaptorPtr pa; + XvFormatPtr pf; + int nf; + + pa = pPort->pAdaptor; + + if (pa->pScreen != pDraw->pScreen) return BadMatch; + + nf = pa->nFormats; + pf = pa->pFormats; + + while (nf--) + { + if ((pf->depth == pDraw->depth) +#if 0 + && ((pDraw->type == DRAWABLE_PIXMAP) || + (wVisual(((WindowPtr)pDraw)) == pf->visual)) +#endif + ) + return Success; + pf++; + } + + return BadMatch; + +} + +int +XvdiSetPortAttribute( + ClientPtr client, + XvPortPtr pPort, + Atom attribute, + INT32 value +){ + + XvdiSendPortNotify(pPort, attribute, value); + + return + (* pPort->pAdaptor->ddSetPortAttribute)(client, pPort, attribute, value); + +} + +int +XvdiGetPortAttribute( + ClientPtr client, + XvPortPtr pPort, + Atom attribute, + INT32 *p_value +){ + + return + (* pPort->pAdaptor->ddGetPortAttribute)(client, pPort, attribute, p_value); + +} + +static void +WriteSwappedVideoNotifyEvent(xvEvent *from, xvEvent *to) + +{ + + to->u.u.type = from->u.u.type; + to->u.u.detail = from->u.u.detail; + cpswaps(from->u.videoNotify.sequenceNumber, + to->u.videoNotify.sequenceNumber); + cpswapl(from->u.videoNotify.time, to->u.videoNotify.time); + cpswapl(from->u.videoNotify.drawable, to->u.videoNotify.drawable); + cpswapl(from->u.videoNotify.port, to->u.videoNotify.port); + +} + +static void +WriteSwappedPortNotifyEvent(xvEvent *from, xvEvent *to) + +{ + + to->u.u.type = from->u.u.type; + to->u.u.detail = from->u.u.detail; + cpswaps(from->u.portNotify.sequenceNumber, to->u.portNotify.sequenceNumber); + cpswapl(from->u.portNotify.time, to->u.portNotify.time); + cpswapl(from->u.portNotify.port, to->u.portNotify.port); + cpswapl(from->u.portNotify.value, to->u.portNotify.value); + +} diff --git a/xorg-server-1.4/Xext/xvmc.c b/xorg-server-1.4/Xext/xvmc.c new file mode 100644 index 0000000..ae35893 --- /dev/null +++ b/xorg-server-1.4/Xext/xvmc.c @@ -0,0 +1,797 @@ + +#define NEED_REPLIES +#define NEED_EVENTS +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "resource.h" +#include "scrnintstr.h" +#include "extnsionst.h" +#include "servermd.h" +#include +#include "xvdix.h" +#include +#include +#include +#include "xvmcext.h" + +#ifdef HAS_XVMCSHM +#ifndef Lynx +#include +#include +#include +#else +#include +#include +#endif /* Lynx */ +#endif /* HAS_XVMCSHM */ + + + +#define DR_CLIENT_DRIVER_NAME_SIZE 48 +#define DR_BUSID_SIZE 48 + +int XvMCScreenIndex = -1; + +unsigned long XvMCGeneration = 0; + +int XvMCReqCode; +int XvMCEventBase; +int XvMCErrorBase; + +unsigned long XvMCRTContext; +unsigned long XvMCRTSurface; +unsigned long XvMCRTSubpicture; + +typedef struct { + int num_adaptors; + XvMCAdaptorPtr adaptors; + CloseScreenProcPtr CloseScreen; + char clientDriverName[DR_CLIENT_DRIVER_NAME_SIZE]; + char busID[DR_BUSID_SIZE]; + int major; + int minor; + int patchLevel; +} XvMCScreenRec, *XvMCScreenPtr; + +#define XVMC_GET_PRIVATE(pScreen) \ + (XvMCScreenPtr)((pScreen)->devPrivates[XvMCScreenIndex].ptr) + + +static int +XvMCDestroyContextRes(pointer data, XID id) +{ + XvMCContextPtr pContext = (XvMCContextPtr)data; + + pContext->refcnt--; + + if(!pContext->refcnt) { + XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); + (*pScreenPriv->adaptors[pContext->adapt_num].DestroyContext)(pContext); + xfree(pContext); + } + + return Success; +} + +static int +XvMCDestroySurfaceRes(pointer data, XID id) +{ + XvMCSurfacePtr pSurface = (XvMCSurfacePtr)data; + XvMCContextPtr pContext = pSurface->context; + XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); + + (*pScreenPriv->adaptors[pContext->adapt_num].DestroySurface)(pSurface); + xfree(pSurface); + + XvMCDestroyContextRes((pointer)pContext, pContext->context_id); + + return Success; +} + + +static int +XvMCDestroySubpictureRes(pointer data, XID id) +{ + XvMCSubpicturePtr pSubpict = (XvMCSubpicturePtr)data; + XvMCContextPtr pContext = pSubpict->context; + XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); + + (*pScreenPriv->adaptors[pContext->adapt_num].DestroySubpicture)(pSubpict); + xfree(pSubpict); + + XvMCDestroyContextRes((pointer)pContext, pContext->context_id); + + return Success; +} + +static void +XvMCResetProc (ExtensionEntry *extEntry) +{ +} + + +static int +ProcXvMCQueryVersion(ClientPtr client) +{ + xvmcQueryVersionReply rep; + /* REQUEST(xvmcQueryVersionReq); */ + REQUEST_SIZE_MATCH(xvmcQueryVersionReq); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + rep.major = XvMCVersion; + rep.minor = XvMCRevision; + WriteToClient(client, sizeof(xvmcQueryVersionReply), (char*)&rep); + return Success; +} + + +static int +ProcXvMCListSurfaceTypes(ClientPtr client) +{ + XvPortPtr pPort; + int i; + XvMCScreenPtr pScreenPriv; + xvmcListSurfaceTypesReply rep; + xvmcSurfaceInfo info; + XvMCAdaptorPtr adaptor = NULL; + XvMCSurfaceInfoPtr surface; + REQUEST(xvmcListSurfaceTypesReq); + REQUEST_SIZE_MATCH(xvmcListSurfaceTypesReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client))) { + client->errorValue = stuff->port; + return _XvBadPort; + } + + if(XvMCScreenIndex >= 0) { /* any adaptors at all */ + ScreenPtr pScreen = pPort->pAdaptor->pScreen; + if((pScreenPriv = XVMC_GET_PRIVATE(pScreen))) { /* any this screen */ + for(i = 0; i < pScreenPriv->num_adaptors; i++) { + if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { + adaptor = &(pScreenPriv->adaptors[i]); + break; + } + } + } + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.num = (adaptor) ? adaptor->num_surfaces : 0; + rep.length = rep.num * sizeof(xvmcSurfaceInfo) >> 2; + + WriteToClient(client, sizeof(xvmcListSurfaceTypesReply), (char*)&rep); + + for(i = 0; i < rep.num; i++) { + surface = adaptor->surfaces[i]; + info.surface_type_id = surface->surface_type_id; + info.chroma_format = surface->chroma_format; + info.max_width = surface->max_width; + info.max_height = surface->max_height; + info.subpicture_max_width = surface->subpicture_max_width; + info.subpicture_max_height = surface->subpicture_max_height; + info.mc_type = surface->mc_type; + info.flags = surface->flags; + WriteToClient(client, sizeof(xvmcSurfaceInfo), (char*)&info); + } + + return Success; +} + +static int +ProcXvMCCreateContext(ClientPtr client) +{ + XvPortPtr pPort; + CARD32 *data = NULL; + int dwords = 0; + int i, result, adapt_num = -1; + ScreenPtr pScreen; + XvMCContextPtr pContext; + XvMCScreenPtr pScreenPriv; + XvMCAdaptorPtr adaptor = NULL; + XvMCSurfaceInfoPtr surface = NULL; + xvmcCreateContextReply rep; + REQUEST(xvmcCreateContextReq); + REQUEST_SIZE_MATCH(xvmcCreateContextReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client))) { + client->errorValue = stuff->port; + return _XvBadPort; + } + + pScreen = pPort->pAdaptor->pScreen; + + if(XvMCScreenIndex < 0) /* no XvMC adaptors */ + return BadMatch; + + if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) /* none this screen */ + return BadMatch; + + for(i = 0; i < pScreenPriv->num_adaptors; i++) { + if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { + adaptor = &(pScreenPriv->adaptors[i]); + adapt_num = i; + break; + } + } + + if(adapt_num < 0) /* none this port */ + return BadMatch; + + for(i = 0; i < adaptor->num_surfaces; i++) { + if(adaptor->surfaces[i]->surface_type_id == stuff->surface_type_id) { + surface = adaptor->surfaces[i]; + break; + } + } + + /* adaptor doesn't support this suface_type_id */ + if(!surface) return BadMatch; + + + if((stuff->width > surface->max_width) || + (stuff->height > surface->max_height)) + return BadValue; + + if(!(pContext = xalloc(sizeof(XvMCContextRec)))) { + return BadAlloc; + } + + + pContext->pScreen = pScreen; + pContext->adapt_num = adapt_num; + pContext->context_id = stuff->context_id; + pContext->surface_type_id = stuff->surface_type_id; + pContext->width = stuff->width; + pContext->height = stuff->height; + pContext->flags = stuff->flags; + pContext->refcnt = 1; + + result = (*adaptor->CreateContext)(pPort, pContext, &dwords, &data); + + if(result != Success) { + xfree(pContext); + return result; + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.width_actual = pContext->width; + rep.height_actual = pContext->height; + rep.flags_return = pContext->flags; + rep.length = dwords; + + WriteToClient(client, sizeof(xvmcCreateContextReply), (char*)&rep); + if(dwords) + WriteToClient(client, dwords << 2, (char*)data); + AddResource(pContext->context_id, XvMCRTContext, pContext); + + if(data) + xfree(data); + + return Success; +} + +static int +ProcXvMCDestroyContext(ClientPtr client) +{ + REQUEST(xvmcDestroyContextReq); + REQUEST_SIZE_MATCH(xvmcDestroyContextReq); + + if(!LookupIDByType(stuff->context_id, XvMCRTContext)) + return (XvMCBadContext + XvMCErrorBase); + + FreeResource(stuff->context_id, RT_NONE); + + return Success; +} + +static int +ProcXvMCCreateSurface(ClientPtr client) +{ + CARD32 *data = NULL; + int dwords = 0; + int result; + XvMCContextPtr pContext; + XvMCSurfacePtr pSurface; + XvMCScreenPtr pScreenPriv; + xvmcCreateSurfaceReply rep; + REQUEST(xvmcCreateSurfaceReq); + REQUEST_SIZE_MATCH(xvmcCreateSurfaceReq); + + if(!(pContext = LookupIDByType(stuff->context_id, XvMCRTContext))) + return (XvMCBadContext + XvMCErrorBase); + + pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); + + if(!(pSurface = xalloc(sizeof(XvMCSurfaceRec)))) + return BadAlloc; + + pSurface->surface_id = stuff->surface_id; + pSurface->surface_type_id = pContext->surface_type_id; + pSurface->context = pContext; + + result = (*pScreenPriv->adaptors[pContext->adapt_num].CreateSurface)( + pSurface, &dwords, &data); + + if(result != Success) { + xfree(pSurface); + return result; + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = dwords; + + WriteToClient(client, sizeof(xvmcCreateSurfaceReply), (char*)&rep); + if(dwords) + WriteToClient(client, dwords << 2, (char*)data); + AddResource(pSurface->surface_id, XvMCRTSurface, pSurface); + + if(data) + xfree(data); + + pContext->refcnt++; + + return Success; +} + +static int +ProcXvMCDestroySurface(ClientPtr client) +{ + REQUEST(xvmcDestroySurfaceReq); + REQUEST_SIZE_MATCH(xvmcDestroySurfaceReq); + + if(!LookupIDByType(stuff->surface_id, XvMCRTSurface)) + return (XvMCBadSurface + XvMCErrorBase); + + FreeResource(stuff->surface_id, RT_NONE); + + return Success; +} + +static int +ProcXvMCCreateSubpicture(ClientPtr client) +{ + Bool image_supported = FALSE; + CARD32 *data = NULL; + int i, result, dwords = 0; + XvMCContextPtr pContext; + XvMCSubpicturePtr pSubpicture; + XvMCScreenPtr pScreenPriv; + xvmcCreateSubpictureReply rep; + XvMCAdaptorPtr adaptor; + XvMCSurfaceInfoPtr surface = NULL; + REQUEST(xvmcCreateSubpictureReq); + REQUEST_SIZE_MATCH(xvmcCreateSubpictureReq); + + if(!(pContext = LookupIDByType(stuff->context_id, XvMCRTContext))) + return (XvMCBadContext + XvMCErrorBase); + + pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); + + adaptor = &(pScreenPriv->adaptors[pContext->adapt_num]); + + /* find which surface this context supports */ + for(i = 0; i < adaptor->num_surfaces; i++) { + if(adaptor->surfaces[i]->surface_type_id == pContext->surface_type_id){ + surface = adaptor->surfaces[i]; + break; + } + } + + if(!surface) return BadMatch; + + /* make sure this surface supports that xvimage format */ + if(!surface->compatible_subpictures) return BadMatch; + + for(i = 0; i < surface->compatible_subpictures->num_xvimages; i++) { + if(surface->compatible_subpictures->xvimage_ids[i] == stuff->xvimage_id) { + image_supported = TRUE; + break; + } + } + + if(!image_supported) return BadMatch; + + /* make sure the size is OK */ + if((stuff->width > surface->subpicture_max_width) || + (stuff->height > surface->subpicture_max_height)) + return BadValue; + + if(!(pSubpicture = xalloc(sizeof(XvMCSubpictureRec)))) + return BadAlloc; + + pSubpicture->subpicture_id = stuff->subpicture_id; + pSubpicture->xvimage_id = stuff->xvimage_id; + pSubpicture->width = stuff->width; + pSubpicture->height = stuff->height; + pSubpicture->num_palette_entries = 0; /* overwritten by DDX */ + pSubpicture->entry_bytes = 0; /* overwritten by DDX */ + pSubpicture->component_order[0] = 0; /* overwritten by DDX */ + pSubpicture->component_order[1] = 0; + pSubpicture->component_order[2] = 0; + pSubpicture->component_order[3] = 0; + pSubpicture->context = pContext; + + result = (*pScreenPriv->adaptors[pContext->adapt_num].CreateSubpicture)( + pSubpicture, &dwords, &data); + + if(result != Success) { + xfree(pSubpicture); + return result; + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.width_actual = pSubpicture->width; + rep.height_actual = pSubpicture->height; + rep.num_palette_entries = pSubpicture->num_palette_entries; + rep.entry_bytes = pSubpicture->entry_bytes; + rep.component_order[0] = pSubpicture->component_order[0]; + rep.component_order[1] = pSubpicture->component_order[1]; + rep.component_order[2] = pSubpicture->component_order[2]; + rep.component_order[3] = pSubpicture->component_order[3]; + rep.length = dwords; + + WriteToClient(client, sizeof(xvmcCreateSubpictureReply), (char*)&rep); + if(dwords) + WriteToClient(client, dwords << 2, (char*)data); + AddResource(pSubpicture->subpicture_id, XvMCRTSubpicture, pSubpicture); + + if(data) + xfree(data); + + pContext->refcnt++; + + return Success; +} + +static int +ProcXvMCDestroySubpicture(ClientPtr client) +{ + REQUEST(xvmcDestroySubpictureReq); + REQUEST_SIZE_MATCH(xvmcDestroySubpictureReq); + + if(!LookupIDByType(stuff->subpicture_id, XvMCRTSubpicture)) + return (XvMCBadSubpicture + XvMCErrorBase); + + FreeResource(stuff->subpicture_id, RT_NONE); + + return Success; +} + + +static int +ProcXvMCListSubpictureTypes(ClientPtr client) +{ + XvPortPtr pPort; + xvmcListSubpictureTypesReply rep; + XvMCScreenPtr pScreenPriv; + ScreenPtr pScreen; + XvMCAdaptorPtr adaptor = NULL; + XvMCSurfaceInfoPtr surface = NULL; + xvImageFormatInfo info; + XvImagePtr pImage; + int i, j; + REQUEST(xvmcListSubpictureTypesReq); + REQUEST_SIZE_MATCH(xvmcListSubpictureTypesReq); + + if(!(pPort = LOOKUP_PORT(stuff->port, client))) { + client->errorValue = stuff->port; + return _XvBadPort; + } + + pScreen = pPort->pAdaptor->pScreen; + + if(XvMCScreenIndex < 0) /* No XvMC adaptors */ + return BadMatch; + + if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) + return BadMatch; /* None this screen */ + + for(i = 0; i < pScreenPriv->num_adaptors; i++) { + if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { + adaptor = &(pScreenPriv->adaptors[i]); + break; + } + } + + if(!adaptor) return BadMatch; + + for(i = 0; i < adaptor->num_surfaces; i++) { + if(adaptor->surfaces[i]->surface_type_id == stuff->surface_type_id) { + surface = adaptor->surfaces[i]; + break; + } + } + + if(!surface) return BadMatch; + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.num = 0; + if(surface->compatible_subpictures) + rep.num = surface->compatible_subpictures->num_xvimages; + + rep.length = rep.num * sizeof(xvImageFormatInfo) >> 2; + + WriteToClient(client, sizeof(xvmcListSubpictureTypesReply), (char*)&rep); + + for(i = 0; i < rep.num; i++) { + pImage = NULL; + for(j = 0; j < adaptor->num_subpictures; j++) { + if(surface->compatible_subpictures->xvimage_ids[i] == + adaptor->subpictures[j]->id) + { + pImage = adaptor->subpictures[j]; + break; + } + } + if(!pImage) return BadImplementation; + + info.id = pImage->id; + info.type = pImage->type; + info.byte_order = pImage->byte_order; + memcpy(&info.guid, pImage->guid, 16); + info.bpp = pImage->bits_per_pixel; + info.num_planes = pImage->num_planes; + info.depth = pImage->depth; + info.red_mask = pImage->red_mask; + info.green_mask = pImage->green_mask; + info.blue_mask = pImage->blue_mask; + info.format = pImage->format; + info.y_sample_bits = pImage->y_sample_bits; + info.u_sample_bits = pImage->u_sample_bits; + info.v_sample_bits = pImage->v_sample_bits; + info.horz_y_period = pImage->horz_y_period; + info.horz_u_period = pImage->horz_u_period; + info.horz_v_period = pImage->horz_v_period; + info.vert_y_period = pImage->vert_y_period; + info.vert_u_period = pImage->vert_u_period; + info.vert_v_period = pImage->vert_v_period; + memcpy(&info.comp_order, pImage->component_order, 32); + info.scanline_order = pImage->scanline_order; + WriteToClient(client, sizeof(xvImageFormatInfo), (char*)&info); + } + + return Success; +} + +static int +ProcXvMCGetDRInfo(ClientPtr client) +{ + xvmcGetDRInfoReply rep; + XvPortPtr pPort; + ScreenPtr pScreen; + XvMCScreenPtr pScreenPriv; + +#ifdef HAS_XVMCSHM + volatile CARD32 *patternP; +#endif + + REQUEST(xvmcGetDRInfoReq); + REQUEST_SIZE_MATCH(xvmcGetDRInfoReq); + + + if(!(pPort = LOOKUP_PORT(stuff->port, client))) { + client->errorValue = stuff->port; + return _XvBadPort; + } + + pScreen = pPort->pAdaptor->pScreen; + pScreenPriv = XVMC_GET_PRIVATE(pScreen); + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.major = pScreenPriv->major; + rep.minor = pScreenPriv->minor; + rep.patchLevel = pScreenPriv->patchLevel; + rep.nameLen = (strlen(pScreenPriv->clientDriverName) + 4) >> 2; + rep.busIDLen = (strlen(pScreenPriv->busID) + 4) >> 2; + + rep.length = rep.nameLen + rep.busIDLen; + rep.nameLen <<=2; + rep.busIDLen <<=2; + + /* + * Read back to the client what she has put in the shared memory + * segment she prepared for us. + */ + + rep.isLocal = 1; +#ifdef HAS_XVMCSHM + patternP = (CARD32 *)shmat( stuff->shmKey, NULL, SHM_RDONLY ); + if ( -1 != (long) patternP) { + register volatile CARD32 *patternC = patternP; + register int i; + CARD32 magic = stuff->magic; + + rep.isLocal = 1; + i = 1024 / sizeof(CARD32); + + while ( i-- ) { + if (*patternC++ != magic) { + rep.isLocal = 0; + break; + } + magic = ~magic; + } + shmdt( (char *)patternP ); + } +#endif /* HAS_XVMCSHM */ + + WriteToClient(client, sizeof(xvmcGetDRInfoReply), + (char*)&rep); + if (rep.length) { + WriteToClient(client, rep.nameLen, + pScreenPriv->clientDriverName); + WriteToClient(client, rep.busIDLen, + pScreenPriv->busID); + } + return Success; +} + + +int (*ProcXvMCVector[xvmcNumRequest])(ClientPtr) = { + ProcXvMCQueryVersion, + ProcXvMCListSurfaceTypes, + ProcXvMCCreateContext, + ProcXvMCDestroyContext, + ProcXvMCCreateSurface, + ProcXvMCDestroySurface, + ProcXvMCCreateSubpicture, + ProcXvMCDestroySubpicture, + ProcXvMCListSubpictureTypes, + ProcXvMCGetDRInfo +}; + +static int +ProcXvMCDispatch (ClientPtr client) +{ + REQUEST(xReq); + + if(stuff->data < xvmcNumRequest) + return (*ProcXvMCVector[stuff->data])(client); + else + return BadRequest; +} + +static int +SProcXvMCDispatch (ClientPtr client) +{ + /* We only support local */ + return BadImplementation; +} + +void +XvMCExtensionInit(void) +{ + ExtensionEntry *extEntry; + + if(XvMCScreenIndex < 0) /* nobody supports it */ + return; + + if(!(XvMCRTContext = CreateNewResourceType(XvMCDestroyContextRes))) + return; + + if(!(XvMCRTSurface = CreateNewResourceType(XvMCDestroySurfaceRes))) + return; + + if(!(XvMCRTSubpicture = CreateNewResourceType(XvMCDestroySubpictureRes))) + return; + + extEntry = AddExtension(XvMCName, XvMCNumEvents, XvMCNumErrors, + ProcXvMCDispatch, SProcXvMCDispatch, + XvMCResetProc, StandardMinorOpcode); + + if(!extEntry) return; + + XvMCReqCode = extEntry->base; + XvMCEventBase = extEntry->eventBase; + XvMCErrorBase = extEntry->errorBase; +} + +static Bool +XvMCCloseScreen (int i, ScreenPtr pScreen) +{ + XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen); + + pScreen->CloseScreen = pScreenPriv->CloseScreen; + + xfree(pScreenPriv); + + return (*pScreen->CloseScreen)(i, pScreen); +} + + +int +XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt) +{ + XvMCScreenPtr pScreenPriv; + + if(XvMCGeneration != serverGeneration) { + if((XvMCScreenIndex = AllocateScreenPrivateIndex()) < 0) + return BadAlloc; + + XvMCGeneration = serverGeneration; + } + + if(!(pScreenPriv = (XvMCScreenPtr)xalloc(sizeof(XvMCScreenRec)))) + return BadAlloc; + + pScreen->devPrivates[XvMCScreenIndex].ptr = (pointer)pScreenPriv; + + pScreenPriv->CloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = XvMCCloseScreen; + + pScreenPriv->num_adaptors = num; + pScreenPriv->adaptors = pAdapt; + pScreenPriv->clientDriverName[0] = 0; + pScreenPriv->busID[0] = 0; + pScreenPriv->major = 0; + pScreenPriv->minor = 0; + pScreenPriv->patchLevel = 0; + + return Success; +} + +XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id) +{ + XvImagePtr pImage = NULL; + ScreenPtr pScreen = pPort->pAdaptor->pScreen; + XvMCScreenPtr pScreenPriv; + XvMCAdaptorPtr adaptor = NULL; + int i; + + if(XvMCScreenIndex < 0) return NULL; + + if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) + return NULL; + + for(i = 0; i < pScreenPriv->num_adaptors; i++) { + if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { + adaptor = &(pScreenPriv->adaptors[i]); + break; + } + } + + if(!adaptor) return NULL; + + for(i = 0; i < adaptor->num_subpictures; i++) { + if(adaptor->subpictures[i]->id == id) { + pImage = adaptor->subpictures[i]; + break; + } + } + + return pImage; +} + +int +xf86XvMCRegisterDRInfo(ScreenPtr pScreen, char *name, + char *busID, int major, int minor, + int patchLevel) +{ + XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen); + strncpy(pScreenPriv->clientDriverName, name, + DR_CLIENT_DRIVER_NAME_SIZE); + strncpy(pScreenPriv->busID, busID, DR_BUSID_SIZE); + pScreenPriv->major = major; + pScreenPriv->minor = minor; + pScreenPriv->patchLevel = patchLevel; + pScreenPriv->clientDriverName[DR_CLIENT_DRIVER_NAME_SIZE-1] = 0; + pScreenPriv->busID[DR_BUSID_SIZE-1] = 0; + return Success; +} + diff --git a/xorg-server-1.4/Xext/xvmcext.h b/xorg-server-1.4/Xext/xvmcext.h new file mode 100644 index 0000000..9c019fe --- /dev/null +++ b/xorg-server-1.4/Xext/xvmcext.h @@ -0,0 +1,115 @@ + +#ifndef _XVMC_H +#define _XVMC_H +#include +#include "xvdix.h" + +typedef struct { + int num_xvimages; + int *xvimage_ids; +} XvMCImageIDList; + +typedef struct { + int surface_type_id; + int chroma_format; + int color_description; + unsigned short max_width; + unsigned short max_height; + unsigned short subpicture_max_width; + unsigned short subpicture_max_height; + int mc_type; + int flags; + XvMCImageIDList *compatible_subpictures; +} XvMCSurfaceInfoRec, *XvMCSurfaceInfoPtr; + +typedef struct { + XID context_id; + ScreenPtr pScreen; + int adapt_num; + int surface_type_id; + unsigned short width; + unsigned short height; + CARD32 flags; + int refcnt; + pointer port_priv; + pointer driver_priv; +} XvMCContextRec, *XvMCContextPtr; + +typedef struct { + XID surface_id; + int surface_type_id; + XvMCContextPtr context; + pointer driver_priv; +} XvMCSurfaceRec, *XvMCSurfacePtr; + + +typedef struct { + XID subpicture_id; + int xvimage_id; + unsigned short width; + unsigned short height; + int num_palette_entries; + int entry_bytes; + char component_order[4]; + XvMCContextPtr context; + pointer driver_priv; +} XvMCSubpictureRec, *XvMCSubpicturePtr; + +typedef int (*XvMCCreateContextProcPtr) ( + XvPortPtr port, + XvMCContextPtr context, + int *num_priv, + CARD32 **priv +); + +typedef void (*XvMCDestroyContextProcPtr) ( + XvMCContextPtr context +); + +typedef int (*XvMCCreateSurfaceProcPtr) ( + XvMCSurfacePtr surface, + int *num_priv, + CARD32 **priv +); + +typedef void (*XvMCDestroySurfaceProcPtr) ( + XvMCSurfacePtr surface +); + +typedef int (*XvMCCreateSubpictureProcPtr) ( + XvMCSubpicturePtr subpicture, + int *num_priv, + CARD32 **priv +); + +typedef void (*XvMCDestroySubpictureProcPtr) ( + XvMCSubpicturePtr subpicture +); + + +typedef struct { + XvAdaptorPtr xv_adaptor; + int num_surfaces; + XvMCSurfaceInfoPtr *surfaces; + int num_subpictures; + XvImagePtr *subpictures; + XvMCCreateContextProcPtr CreateContext; + XvMCDestroyContextProcPtr DestroyContext; + XvMCCreateSurfaceProcPtr CreateSurface; + XvMCDestroySurfaceProcPtr DestroySurface; + XvMCCreateSubpictureProcPtr CreateSubpicture; + XvMCDestroySubpictureProcPtr DestroySubpicture; +} XvMCAdaptorRec, *XvMCAdaptorPtr; + +void XvMCExtensionInit(void); + +int XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr adapt); + +XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id); + +int xf86XvMCRegisterDRInfo(ScreenPtr pScreen, char *name, + char *busID, int major, int minor, + int patchLevel); + + +#endif /* _XVMC_H */ diff --git a/xorg-server-1.4/Xi/Makefile.am b/xorg-server-1.4/Xi/Makefile.am new file mode 100644 index 0000000..fbe4385 --- /dev/null +++ b/xorg-server-1.4/Xi/Makefile.am @@ -0,0 +1,80 @@ +noinst_LTLIBRARIES = libXi.la + +AM_CFLAGS = $(DIX_CFLAGS) + +libXi_la_SOURCES = \ + allowev.c \ + allowev.h \ + chgdctl.c \ + chgdctl.h \ + chgfctl.c \ + chgfctl.h \ + chgkbd.c \ + chgkbd.h \ + chgkmap.c \ + chgkmap.h \ + chgprop.c \ + chgprop.h \ + chgptr.c \ + chgptr.h \ + closedev.c \ + closedev.h \ + devbell.c \ + devbell.h \ + exevents.c \ + exglobals.h \ + extinit.c \ + getbmap.c \ + getbmap.h \ + getdctl.c \ + getdctl.h \ + getfctl.c \ + getfctl.h \ + getfocus.c \ + getfocus.h \ + getkmap.c \ + getkmap.h \ + getmmap.c \ + getmmap.h \ + getprop.c \ + getprop.h \ + getselev.c \ + getselev.h \ + getvers.c \ + getvers.h \ + grabdev.c \ + grabdev.h \ + grabdevb.c \ + grabdevb.h \ + grabdevk.c \ + grabdevk.h \ + gtmotion.c \ + gtmotion.h \ + listdev.c \ + listdev.h \ + opendev.c \ + opendev.h \ + queryst.c \ + queryst.h \ + selectev.c \ + selectev.h \ + sendexev.c \ + sendexev.h \ + setbmap.c \ + setbmap.h \ + setdval.c \ + setdval.h \ + setfocus.c \ + setfocus.h \ + setmmap.c \ + setmmap.h \ + setmode.c \ + setmode.h \ + ungrdev.c \ + ungrdev.h \ + ungrdevb.c \ + ungrdevb.h \ + ungrdevk.c \ + ungrdevk.h + +EXTRA_DIST = stubs.c diff --git a/xorg-server-1.4/Xi/Makefile.in b/xorg-server-1.4/Xi/Makefile.in new file mode 100644 index 0000000..3f82b6e --- /dev/null +++ b/xorg-server-1.4/Xi/Makefile.in @@ -0,0 +1,737 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = Xi +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libXi_la_LIBADD = +am_libXi_la_OBJECTS = allowev.lo chgdctl.lo chgfctl.lo chgkbd.lo \ + chgkmap.lo chgprop.lo chgptr.lo closedev.lo devbell.lo \ + exevents.lo extinit.lo getbmap.lo getdctl.lo getfctl.lo \ + getfocus.lo getkmap.lo getmmap.lo getprop.lo getselev.lo \ + getvers.lo grabdev.lo grabdevb.lo grabdevk.lo gtmotion.lo \ + listdev.lo opendev.lo queryst.lo selectev.lo sendexev.lo \ + setbmap.lo setdval.lo setfocus.lo setmmap.lo setmode.lo \ + ungrdev.lo ungrdevb.lo ungrdevk.lo +libXi_la_OBJECTS = $(am_libXi_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libXi_la_SOURCES) +DIST_SOURCES = $(libXi_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libXi.la +AM_CFLAGS = $(DIX_CFLAGS) +libXi_la_SOURCES = \ + allowev.c \ + allowev.h \ + chgdctl.c \ + chgdctl.h \ + chgfctl.c \ + chgfctl.h \ + chgkbd.c \ + chgkbd.h \ + chgkmap.c \ + chgkmap.h \ + chgprop.c \ + chgprop.h \ + chgptr.c \ + chgptr.h \ + closedev.c \ + closedev.h \ + devbell.c \ + devbell.h \ + exevents.c \ + exglobals.h \ + extinit.c \ + getbmap.c \ + getbmap.h \ + getdctl.c \ + getdctl.h \ + getfctl.c \ + getfctl.h \ + getfocus.c \ + getfocus.h \ + getkmap.c \ + getkmap.h \ + getmmap.c \ + getmmap.h \ + getprop.c \ + getprop.h \ + getselev.c \ + getselev.h \ + getvers.c \ + getvers.h \ + grabdev.c \ + grabdev.h \ + grabdevb.c \ + grabdevb.h \ + grabdevk.c \ + grabdevk.h \ + gtmotion.c \ + gtmotion.h \ + listdev.c \ + listdev.h \ + opendev.c \ + opendev.h \ + queryst.c \ + queryst.h \ + selectev.c \ + selectev.h \ + sendexev.c \ + sendexev.h \ + setbmap.c \ + setbmap.h \ + setdval.c \ + setdval.h \ + setfocus.c \ + setfocus.h \ + setmmap.c \ + setmmap.h \ + setmode.c \ + setmode.h \ + ungrdev.c \ + ungrdev.h \ + ungrdevb.c \ + ungrdevb.h \ + ungrdevk.c \ + ungrdevk.h + +EXTRA_DIST = stubs.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Xi/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign Xi/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libXi.la: $(libXi_la_OBJECTS) $(libXi_la_DEPENDENCIES) + $(LINK) $(libXi_la_OBJECTS) $(libXi_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allowev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgdctl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgfctl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgkbd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgkmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgprop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgptr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closedev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devbell.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exevents.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extinit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getbmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdctl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getfctl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getfocus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getkmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getmmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getprop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getselev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getvers.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grabdev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grabdevb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grabdevk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtmotion.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listdev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/queryst.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selectev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendexev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setbmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setdval.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfocus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setmmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setmode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ungrdev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ungrdevb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ungrdevk.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/Xi/allowev.c b/xorg-server-1.4/Xi/allowev.c new file mode 100644 index 0000000..85b6eaf --- /dev/null +++ b/xorg-server-1.4/Xi/allowev.c @@ -0,0 +1,137 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Function to allow frozen events to be routed from extension input devices. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include + +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "allowev.h" +#include "dixevents.h" + +/*********************************************************************** + * + * This procedure allows frozen events to be routed. + * + */ + +int +SProcXAllowDeviceEvents(ClientPtr client) +{ + char n; + + REQUEST(xAllowDeviceEventsReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xAllowDeviceEventsReq); + swapl(&stuff->time, n); + return (ProcXAllowDeviceEvents(client)); +} + +/*********************************************************************** + * + * This procedure allows frozen events to be routed. + * + */ + +int +ProcXAllowDeviceEvents(ClientPtr client) +{ + TimeStamp time; + DeviceIntPtr thisdev; + + REQUEST(xAllowDeviceEventsReq); + REQUEST_SIZE_MATCH(xAllowDeviceEventsReq); + + thisdev = LookupDeviceIntRec(stuff->deviceid); + if (thisdev == NULL) { + SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0, BadDevice); + return Success; + } + time = ClientTimeToServerTime(stuff->time); + + switch (stuff->mode) { + case ReplayThisDevice: + AllowSome(client, time, thisdev, NOT_GRABBED); + break; + case SyncThisDevice: + AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT); + break; + case AsyncThisDevice: + AllowSome(client, time, thisdev, THAWED); + break; + case AsyncOtherDevices: + AllowSome(client, time, thisdev, THAW_OTHERS); + break; + case SyncAll: + AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT); + break; + case AsyncAll: + AllowSome(client, time, thisdev, THAWED_BOTH); + break; + default: + SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0, BadValue); + client->errorValue = stuff->mode; + return Success; + } + return Success; +} diff --git a/xorg-server-1.4/Xi/allowev.h b/xorg-server-1.4/Xi/allowev.h new file mode 100644 index 0000000..199744f --- /dev/null +++ b/xorg-server-1.4/Xi/allowev.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef ALLOWEV_H +#define ALLOWEV_H 1 + +int SProcXAllowDeviceEvents(ClientPtr /* client */ + ); + +int ProcXAllowDeviceEvents(ClientPtr /* client */ + ); + +#endif /* ALLOWEV_H */ diff --git a/xorg-server-1.4/Xi/chgdctl.c b/xorg-server-1.4/Xi/chgdctl.c new file mode 100644 index 0000000..9676fb7 --- /dev/null +++ b/xorg-server-1.4/Xi/chgdctl.c @@ -0,0 +1,295 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/******************************************************************** + * + * Change Device control attributes for an extension device. + * + */ + +#define NEED_EVENTS /* for inputstr.h */ +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include /* control constants */ +#include "XIstubs.h" + +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" +#include "exevents.h" + +#include "chgdctl.h" + +/*********************************************************************** + * + * This procedure changes the control attributes for an extension device, + * for clients on machines with a different byte ordering than the server. + * + */ + +int +SProcXChangeDeviceControl(ClientPtr client) +{ + char n; + + REQUEST(xChangeDeviceControlReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq); + swaps(&stuff->control, n); + return (ProcXChangeDeviceControl(client)); +} + +/*********************************************************************** + * + * Change the control attributes. + * + */ + +int +ProcXChangeDeviceControl(ClientPtr client) +{ + unsigned len; + int i, status, ret = BadValue; + DeviceIntPtr dev; + xDeviceResolutionCtl *r; + xChangeDeviceControlReply rep; + AxisInfoPtr a; + CARD32 *resolution; + xDeviceAbsCalibCtl *calib; + xDeviceAbsAreaCtl *area; + xDeviceCoreCtl *c; + xDeviceEnableCtl *e; + devicePresenceNotify dpn; + + REQUEST(xChangeDeviceControlReq); + REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq); + + len = stuff->length - (sizeof(xChangeDeviceControlReq) >> 2); + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + ret = BadDevice; + goto out; + } + + rep.repType = X_Reply; + rep.RepType = X_ChangeDeviceControl; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + switch (stuff->control) { + case DEVICE_RESOLUTION: + r = (xDeviceResolutionCtl *) & stuff[1]; + if ((len < (sizeof(xDeviceResolutionCtl) >> 2)) || + (len != (sizeof(xDeviceResolutionCtl) >> 2) + r->num_valuators)) { + ret = BadLength; + goto out; + } + if (!dev->valuator) { + ret = BadMatch; + goto out; + } + if ((dev->grab) && !SameClient(dev->grab, client)) { + rep.status = AlreadyGrabbed; + ret = Success; + goto out; + } + resolution = (CARD32 *) (r + 1); + if (r->first_valuator + r->num_valuators > dev->valuator->numAxes) { + ret = BadValue; + goto out; + } + status = ChangeDeviceControl(client, dev, (xDeviceCtl *) r); + if (status == Success) { + a = &dev->valuator->axes[r->first_valuator]; + for (i = 0; i < r->num_valuators; i++) + if (*(resolution + i) < (a + i)->min_resolution || + *(resolution + i) > (a + i)->max_resolution) { + SendErrorToClient(client, IReqCode, + X_ChangeDeviceControl, 0, BadValue); + return Success; + } + for (i = 0; i < r->num_valuators; i++) + (a++)->resolution = *resolution++; + + ret = Success; + } else if (status == DeviceBusy) { + rep.status = DeviceBusy; + ret = Success; + } else { + ret = BadMatch; + } + break; + case DEVICE_ABS_CALIB: + calib = (xDeviceAbsCalibCtl *)&stuff[1]; + + if (calib->button_threshold < 0 || calib->button_threshold > 255) { + ret = BadValue; + goto out; + } + + status = ChangeDeviceControl(client, dev, (xDeviceCtl *) calib); + + if (status == Success) { + dev->absolute->min_x = calib->min_x; + dev->absolute->max_x = calib->max_x; + dev->absolute->min_y = calib->min_y; + dev->absolute->max_y = calib->max_y; + dev->absolute->flip_x = calib->flip_x; + dev->absolute->flip_y = calib->flip_y; + dev->absolute->rotation = calib->rotation; + dev->absolute->button_threshold = calib->button_threshold; + ret = Success; + } else if (status == DeviceBusy || status == BadValue) { + rep.status = status; + ret = Success; + } else { + ret = BadMatch; + } + + break; + case DEVICE_ABS_AREA: + area = (xDeviceAbsAreaCtl *)&stuff[1]; + + status = ChangeDeviceControl(client, dev, (xDeviceCtl *) area); + + if (status == Success) { + dev->absolute->offset_x = area->offset_x; + dev->absolute->offset_y = area->offset_y; + dev->absolute->width = area->width; + dev->absolute->height = area->height; + dev->absolute->screen = area->screen; + dev->absolute->following = area->following; + ret = Success; + } else if (status == DeviceBusy || status == BadValue) { + rep.status = status; + ret = Success; + } else { + ret = Success; + } + + break; + case DEVICE_CORE: + c = (xDeviceCoreCtl *)&stuff[1]; + + status = ChangeDeviceControl(client, dev, (xDeviceCtl *) c); + + if (status == Success) { + dev->coreEvents = c->status; + ret = Success; + } else if (status == DeviceBusy) { + rep.status = DeviceBusy; + ret = Success; + } else { + ret = BadMatch; + } + + break; + case DEVICE_ENABLE: + e = (xDeviceEnableCtl *)&stuff[1]; + + status = ChangeDeviceControl(client, dev, (xDeviceCtl *) e); + + if (status == Success) { + if (e->enable) + EnableDevice(dev); + else + DisableDevice(dev); + ret = Success; + } else if (status == DeviceBusy) { + rep.status = DeviceBusy; + ret = Success; + } else { + ret = BadMatch; + } + + break; + default: + ret = BadValue; + } + +out: + if (ret == Success) { + dpn.type = DevicePresenceNotify; + dpn.time = currentTime.milliseconds; + dpn.devchange = 1; + dpn.deviceid = dev->id; + dpn.control = stuff->control; + SendEventToAllWindows(dev, DevicePresenceNotifyMask, + (xEvent *) &dpn, 1); + + WriteReplyToClient(client, sizeof(xChangeDeviceControlReply), &rep); + } + else { + SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, 0, ret); + } + + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the xChangeDeviceControl function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXChangeDeviceControl(ClientPtr client, int size, + xChangeDeviceControlReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/chgdctl.h b/xorg-server-1.4/Xi/chgdctl.h new file mode 100644 index 0000000..9cda225 --- /dev/null +++ b/xorg-server-1.4/Xi/chgdctl.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef CHGDCTL_H +#define CHGDCTL_H 1 + +int SProcXChangeDeviceControl(ClientPtr /* client */ + ); + +int ProcXChangeDeviceControl(ClientPtr /* client */ + ); + +void SRepXChangeDeviceControl(ClientPtr /* client */ , + int /* size */ , + xChangeDeviceControlReply * /* rep */ + ); + +#endif /* CHGDCTL_H */ diff --git a/xorg-server-1.4/Xi/chgfctl.c b/xorg-server-1.4/Xi/chgfctl.c new file mode 100644 index 0000000..2e0e13c --- /dev/null +++ b/xorg-server-1.4/Xi/chgfctl.c @@ -0,0 +1,588 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/******************************************************************** + * + * Change feedback control attributes for an extension device. + * + */ + +#define NEED_EVENTS /* for inputstr.h */ +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include /* control constants */ + +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "chgfctl.h" + +#define DO_ALL (-1) + +/*********************************************************************** + * + * This procedure changes the control attributes for an extension device, + * for clients on machines with a different byte ordering than the server. + * + */ + +int +SProcXChangeFeedbackControl(ClientPtr client) +{ + char n; + + REQUEST(xChangeFeedbackControlReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq); + swapl(&stuff->mask, n); + return (ProcXChangeFeedbackControl(client)); +} + +/****************************************************************************** + * + * This procedure changes KbdFeedbackClass data. + * + */ + +static int +ChangeKbdFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, + KbdFeedbackPtr k, xKbdFeedbackCtl * f) +{ + char n; + KeybdCtrl kctrl; + int t; + int key = DO_ALL; + + if (client->swapped) { + swaps(&f->length, n); + swaps(&f->pitch, n); + swaps(&f->duration, n); + swapl(&f->led_mask, n); + swapl(&f->led_values, n); + } + + kctrl = k->ctrl; + if (mask & DvKeyClickPercent) { + t = f->click; + if (t == -1) + t = defaultKeyboardControl.click; + else if (t < 0 || t > 100) { + client->errorValue = t; + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, + BadValue); + return Success; + } + kctrl.click = t; + } + + if (mask & DvPercent) { + t = f->percent; + if (t == -1) + t = defaultKeyboardControl.bell; + else if (t < 0 || t > 100) { + client->errorValue = t; + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, + BadValue); + return Success; + } + kctrl.bell = t; + } + + if (mask & DvPitch) { + t = f->pitch; + if (t == -1) + t = defaultKeyboardControl.bell_pitch; + else if (t < 0) { + client->errorValue = t; + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, + BadValue); + return Success; + } + kctrl.bell_pitch = t; + } + + if (mask & DvDuration) { + t = f->duration; + if (t == -1) + t = defaultKeyboardControl.bell_duration; + else if (t < 0) { + client->errorValue = t; + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, + BadValue); + return Success; + } + kctrl.bell_duration = t; + } + + if (mask & DvLed) { + kctrl.leds &= ~(f->led_mask); + kctrl.leds |= (f->led_mask & f->led_values); + } + + if (mask & DvKey) { + key = (KeyCode) f->key; + if (key < 8 || key > 255) { + client->errorValue = key; + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, + BadValue); + return Success; + } + if (!(mask & DvAutoRepeatMode)) { + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, + BadMatch); + return Success; + } + } + + if (mask & DvAutoRepeatMode) { + int inx = (key >> 3); + int kmask = (1 << (key & 7)); + + t = (CARD8) f->auto_repeat_mode; + if (t == AutoRepeatModeOff) { + if (key == DO_ALL) + kctrl.autoRepeat = FALSE; + else + kctrl.autoRepeats[inx] &= ~kmask; + } else if (t == AutoRepeatModeOn) { + if (key == DO_ALL) + kctrl.autoRepeat = TRUE; + else + kctrl.autoRepeats[inx] |= kmask; + } else if (t == AutoRepeatModeDefault) { + if (key == DO_ALL) + kctrl.autoRepeat = defaultKeyboardControl.autoRepeat; + else + kctrl.autoRepeats[inx] &= ~kmask; + kctrl.autoRepeats[inx] = + (kctrl.autoRepeats[inx] & ~kmask) | + (defaultKeyboardControl.autoRepeats[inx] & kmask); + } else { + client->errorValue = t; + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, + BadValue); + return Success; + } + } + + k->ctrl = kctrl; + (*k->CtrlProc) (dev, &k->ctrl); + return Success; +} + +/****************************************************************************** + * + * This procedure changes PtrFeedbackClass data. + * + */ + +static int +ChangePtrFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, + PtrFeedbackPtr p, xPtrFeedbackCtl * f) +{ + char n; + PtrCtrl pctrl; /* might get BadValue part way through */ + + if (client->swapped) { + swaps(&f->length, n); + swaps(&f->num, n); + swaps(&f->denom, n); + swaps(&f->thresh, n); + } + + pctrl = p->ctrl; + if (mask & DvAccelNum) { + int accelNum; + + accelNum = f->num; + if (accelNum == -1) + pctrl.num = defaultPointerControl.num; + else if (accelNum < 0) { + client->errorValue = accelNum; + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, + BadValue); + return Success; + } else + pctrl.num = accelNum; + } + + if (mask & DvAccelDenom) { + int accelDenom; + + accelDenom = f->denom; + if (accelDenom == -1) + pctrl.den = defaultPointerControl.den; + else if (accelDenom <= 0) { + client->errorValue = accelDenom; + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, + BadValue); + return Success; + } else + pctrl.den = accelDenom; + } + + if (mask & DvThreshold) { + int threshold; + + threshold = f->thresh; + if (threshold == -1) + pctrl.threshold = defaultPointerControl.threshold; + else if (threshold < 0) { + client->errorValue = threshold; + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, + BadValue); + return Success; + } else + pctrl.threshold = threshold; + } + + p->ctrl = pctrl; + (*p->CtrlProc) (dev, &p->ctrl); + return Success; +} + +/****************************************************************************** + * + * This procedure changes IntegerFeedbackClass data. + * + */ + +static int +ChangeIntegerFeedback(ClientPtr client, DeviceIntPtr dev, + long unsigned int mask, IntegerFeedbackPtr i, + xIntegerFeedbackCtl * f) +{ + char n; + + if (client->swapped) { + swaps(&f->length, n); + swapl(&f->int_to_display, n); + } + + i->ctrl.integer_displayed = f->int_to_display; + (*i->CtrlProc) (dev, &i->ctrl); + return Success; +} + +/****************************************************************************** + * + * This procedure changes StringFeedbackClass data. + * + */ + +static int +ChangeStringFeedback(ClientPtr client, DeviceIntPtr dev, + long unsigned int mask, StringFeedbackPtr s, + xStringFeedbackCtl * f) +{ + char n; + long *p; + int i, j; + KeySym *syms, *sup_syms; + + syms = (KeySym *) (f + 1); + if (client->swapped) { + swaps(&f->length, n); /* swapped num_keysyms in calling proc */ + p = (long *)(syms); + for (i = 0; i < f->num_keysyms; i++) { + swapl(p, n); + p++; + } + } + + if (f->num_keysyms > s->ctrl.max_symbols) { + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, + BadValue); + return Success; + } + sup_syms = s->ctrl.symbols_supported; + for (i = 0; i < f->num_keysyms; i++) { + for (j = 0; j < s->ctrl.num_symbols_supported; j++) + if (*(syms + i) == *(sup_syms + j)) + break; + if (j == s->ctrl.num_symbols_supported) { + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, + BadMatch); + return Success; + } + } + + s->ctrl.num_symbols_displayed = f->num_keysyms; + for (i = 0; i < f->num_keysyms; i++) + *(s->ctrl.symbols_displayed + i) = *(syms + i); + (*s->CtrlProc) (dev, &s->ctrl); + return Success; +} + +/****************************************************************************** + * + * This procedure changes BellFeedbackClass data. + * + */ + +static int +ChangeBellFeedback(ClientPtr client, DeviceIntPtr dev, + long unsigned int mask, BellFeedbackPtr b, + xBellFeedbackCtl * f) +{ + char n; + int t; + BellCtrl bctrl; /* might get BadValue part way through */ + + if (client->swapped) { + swaps(&f->length, n); + swaps(&f->pitch, n); + swaps(&f->duration, n); + } + + bctrl = b->ctrl; + if (mask & DvPercent) { + t = f->percent; + if (t == -1) + t = defaultKeyboardControl.bell; + else if (t < 0 || t > 100) { + client->errorValue = t; + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, + BadValue); + return Success; + } + bctrl.percent = t; + } + + if (mask & DvPitch) { + t = f->pitch; + if (t == -1) + t = defaultKeyboardControl.bell_pitch; + else if (t < 0) { + client->errorValue = t; + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, + BadValue); + return Success; + } + bctrl.pitch = t; + } + + if (mask & DvDuration) { + t = f->duration; + if (t == -1) + t = defaultKeyboardControl.bell_duration; + else if (t < 0) { + client->errorValue = t; + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, + BadValue); + return Success; + } + bctrl.duration = t; + } + b->ctrl = bctrl; + (*b->CtrlProc) (dev, &b->ctrl); + return Success; +} + +/****************************************************************************** + * + * This procedure changes LedFeedbackClass data. + * + */ + +static int +ChangeLedFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, + LedFeedbackPtr l, xLedFeedbackCtl * f) +{ + char n; + LedCtrl lctrl; /* might get BadValue part way through */ + + if (client->swapped) { + swaps(&f->length, n); + swapl(&f->led_values, n); + swapl(&f->led_mask, n); + } + + f->led_mask &= l->ctrl.led_mask; /* set only supported leds */ + f->led_values &= l->ctrl.led_mask; /* set only supported leds */ + if (mask & DvLed) { + lctrl.led_mask = f->led_mask; + lctrl.led_values = f->led_values; + (*l->CtrlProc) (dev, &lctrl); + l->ctrl.led_values &= ~(f->led_mask); /* zero changed leds */ + l->ctrl.led_values |= (f->led_mask & f->led_values); /* OR in set leds */ + } + + return Success; +} + +/*********************************************************************** + * + * Change the control attributes. + * + */ + +int +ProcXChangeFeedbackControl(ClientPtr client) +{ + unsigned len; + DeviceIntPtr dev; + KbdFeedbackPtr k; + PtrFeedbackPtr p; + IntegerFeedbackPtr i; + StringFeedbackPtr s; + BellFeedbackPtr b; + LedFeedbackPtr l; + + REQUEST(xChangeFeedbackControlReq); + REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq); + + len = stuff->length - (sizeof(xChangeFeedbackControlReq) >> 2); + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, + BadDevice); + return Success; + } + + switch (stuff->feedbackid) { + case KbdFeedbackClass: + if (len != (sizeof(xKbdFeedbackCtl) >> 2)) { + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, + 0, BadLength); + return Success; + } + for (k = dev->kbdfeed; k; k = k->next) + if (k->ctrl.id == ((xKbdFeedbackCtl *) & stuff[1])->id) { + ChangeKbdFeedback(client, dev, stuff->mask, k, + (xKbdFeedbackCtl *) & stuff[1]); + return Success; + } + break; + case PtrFeedbackClass: + if (len != (sizeof(xPtrFeedbackCtl) >> 2)) { + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, + 0, BadLength); + return Success; + } + for (p = dev->ptrfeed; p; p = p->next) + if (p->ctrl.id == ((xPtrFeedbackCtl *) & stuff[1])->id) { + ChangePtrFeedback(client, dev, stuff->mask, p, + (xPtrFeedbackCtl *) & stuff[1]); + return Success; + } + break; + case StringFeedbackClass: + { + char n; + xStringFeedbackCtl *f = ((xStringFeedbackCtl *) & stuff[1]); + + if (client->swapped) { + swaps(&f->num_keysyms, n); + } + if (len != ((sizeof(xStringFeedbackCtl) >> 2) + f->num_keysyms)) { + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, + 0, BadLength); + return Success; + } + for (s = dev->stringfeed; s; s = s->next) + if (s->ctrl.id == ((xStringFeedbackCtl *) & stuff[1])->id) { + ChangeStringFeedback(client, dev, stuff->mask, s, + (xStringFeedbackCtl *) & stuff[1]); + return Success; + } + break; + } + case IntegerFeedbackClass: + if (len != (sizeof(xIntegerFeedbackCtl) >> 2)) { + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, + 0, BadLength); + return Success; + } + for (i = dev->intfeed; i; i = i->next) + if (i->ctrl.id == ((xIntegerFeedbackCtl *) & stuff[1])->id) { + ChangeIntegerFeedback(client, dev, stuff->mask, i, + (xIntegerFeedbackCtl *) & stuff[1]); + return Success; + } + break; + case LedFeedbackClass: + if (len != (sizeof(xLedFeedbackCtl) >> 2)) { + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, + 0, BadLength); + return Success; + } + for (l = dev->leds; l; l = l->next) + if (l->ctrl.id == ((xLedFeedbackCtl *) & stuff[1])->id) { + ChangeLedFeedback(client, dev, stuff->mask, l, + (xLedFeedbackCtl *) & stuff[1]); + return Success; + } + break; + case BellFeedbackClass: + if (len != (sizeof(xBellFeedbackCtl) >> 2)) { + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, + 0, BadLength); + return Success; + } + for (b = dev->bell; b; b = b->next) + if (b->ctrl.id == ((xBellFeedbackCtl *) & stuff[1])->id) { + ChangeBellFeedback(client, dev, stuff->mask, b, + (xBellFeedbackCtl *) & stuff[1]); + return Success; + } + break; + default: + break; + } + + SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, BadMatch); + return Success; +} + diff --git a/xorg-server-1.4/Xi/chgfctl.h b/xorg-server-1.4/Xi/chgfctl.h new file mode 100644 index 0000000..cfa9fc6 --- /dev/null +++ b/xorg-server-1.4/Xi/chgfctl.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef CHGFCTL_H +#define CHGFCTL_H 1 + +int SProcXChangeFeedbackControl(ClientPtr /* client */ + ); + +int ProcXChangeFeedbackControl(ClientPtr /* client */ + ); + +#endif /* CHGFCTL_H */ diff --git a/xorg-server-1.4/Xi/chgkbd.c b/xorg-server-1.4/Xi/chgkbd.c new file mode 100644 index 0000000..2cf8225 --- /dev/null +++ b/xorg-server-1.4/Xi/chgkbd.c @@ -0,0 +1,107 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to change the keyboard device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "XIstubs.h" +#include "globals.h" +#include "extnsionst.h" + +#include "exevents.h" +#include "exglobals.h" + +#include "chgkbd.h" +#include "chgptr.h" + +/*********************************************************************** + * + * This procedure changes the keyboard device. + * + */ + +int +SProcXChangeKeyboardDevice(ClientPtr client) +{ + char n; + + REQUEST(xChangeKeyboardDeviceReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq); + return (ProcXChangeKeyboardDevice(client)); +} + +/*********************************************************************** + * + * This procedure is invoked to swap the request bytes if the server and + * client have a different byte order. + * + */ + +int +ProcXChangeKeyboardDevice(ClientPtr client) +{ + REQUEST(xChangeKeyboardDeviceReq); + REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq); + + SendErrorToClient(client, IReqCode, X_ChangeKeyboardDevice, 0, + BadDevice); + return Success; +} diff --git a/xorg-server-1.4/Xi/chgkbd.h b/xorg-server-1.4/Xi/chgkbd.h new file mode 100644 index 0000000..5f99223 --- /dev/null +++ b/xorg-server-1.4/Xi/chgkbd.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef CHGKBD_H +#define CHGKBD_H 1 + +int SProcXChangeKeyboardDevice(ClientPtr /* client */ + ); + +int ProcXChangeKeyboardDevice(ClientPtr /* client */ + ); + +#endif /* CHGKBD_H */ diff --git a/xorg-server-1.4/Xi/chgkmap.c b/xorg-server-1.4/Xi/chgkmap.c new file mode 100644 index 0000000..eac520f --- /dev/null +++ b/xorg-server-1.4/Xi/chgkmap.c @@ -0,0 +1,128 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/******************************************************************** + * + * Change key mapping for an extension device. + * + */ + +#define NEED_EVENTS /* for inputstr.h */ +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" + +#include "chgkmap.h" + +/*********************************************************************** + * + * This procedure swaps the request when the client and + * server have different byte orderings. + * + */ + +int +SProcXChangeDeviceKeyMapping(ClientPtr client) +{ + char n; + long *p; + int i, count; + + REQUEST(xChangeDeviceKeyMappingReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq); + p = (long *)&stuff[1]; + count = stuff->keyCodes * stuff->keySymsPerKeyCode; + for (i = 0; i < count; i++) { + swapl(p, n); + p++; + } + return (ProcXChangeDeviceKeyMapping(client)); +} + +/*********************************************************************** + * + * Change the device key mapping. + * + */ + +int +ProcXChangeDeviceKeyMapping(ClientPtr client) +{ + int ret; + unsigned len; + DeviceIntPtr dev; + + REQUEST(xChangeDeviceKeyMappingReq); + REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq); + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_ChangeDeviceKeyMapping, 0, + BadDevice); + return Success; + } + len = stuff->length - (sizeof(xChangeDeviceKeyMappingReq) >> 2); + + ret = ChangeKeyMapping(client, dev, len, DeviceMappingNotify, + stuff->firstKeyCode, stuff->keyCodes, + stuff->keySymsPerKeyCode, (KeySym *) & stuff[1]); + + if (ret != Success) + SendErrorToClient(client, IReqCode, X_ChangeDeviceKeyMapping, 0, ret); + return Success; +} diff --git a/xorg-server-1.4/Xi/chgkmap.h b/xorg-server-1.4/Xi/chgkmap.h new file mode 100644 index 0000000..6ed6420 --- /dev/null +++ b/xorg-server-1.4/Xi/chgkmap.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef CHGKMAP_H +#define CHGKMAP_H 1 + +int SProcXChangeDeviceKeyMapping(ClientPtr /* client */ + ); + +int ProcXChangeDeviceKeyMapping(ClientPtr /* client */ + ); + +#endif /* CHGKMAP_H */ diff --git a/xorg-server-1.4/Xi/chgprop.c b/xorg-server-1.4/Xi/chgprop.c new file mode 100644 index 0000000..59a93c6 --- /dev/null +++ b/xorg-server-1.4/Xi/chgprop.c @@ -0,0 +1,164 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Function to modify the dont-propagate-list for an extension input device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ + +#include "exevents.h" +#include "exglobals.h" + +#include "chgprop.h" +#include "grabdev.h" + +/*********************************************************************** + * + * This procedure returns the extension version. + * + */ + +int +SProcXChangeDeviceDontPropagateList(ClientPtr client) +{ + char n; + long *p; + int i; + + REQUEST(xChangeDeviceDontPropagateListReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq); + swapl(&stuff->window, n); + swaps(&stuff->count, n); + p = (long *)&stuff[1]; + for (i = 0; i < stuff->count; i++) { + swapl(p, n); + p++; + } + return (ProcXChangeDeviceDontPropagateList(client)); +} + +/*********************************************************************** + * + * This procedure changes the dont-propagate list for the specified window. + * + */ + +int +ProcXChangeDeviceDontPropagateList(ClientPtr client) +{ + int i, rc; + WindowPtr pWin; + struct tmask tmp[EMASKSIZE]; + OtherInputMasks *others; + + REQUEST(xChangeDeviceDontPropagateListReq); + REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq); + + if (stuff->length != (sizeof(xChangeDeviceDontPropagateListReq) >> 2) + + stuff->count) { + SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0, + BadLength); + return Success; + } + + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) { + SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0, + rc); + return Success; + } + + if (stuff->mode != AddToList && stuff->mode != DeleteFromList) { + client->errorValue = stuff->window; + SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0, + BadMode); + return Success; + } + + if (CreateMaskFromList(client, (XEventClass *) & stuff[1], + stuff->count, tmp, NULL, + X_ChangeDeviceDontPropagateList) != Success) + return Success; + + others = wOtherInputMasks(pWin); + if (!others && stuff->mode == DeleteFromList) + return Success; + for (i = 0; i < EMASKSIZE; i++) { + if (tmp[i].mask == 0) + continue; + + if (stuff->mode == DeleteFromList) + tmp[i].mask = (others->dontPropagateMask[i] & ~tmp[i].mask); + else if (others) + tmp[i].mask |= others->dontPropagateMask[i]; + + if (DeviceEventSuppressForWindow(pWin, client, tmp[i].mask, i) != + Success) { + SendErrorToClient(client, IReqCode, + X_ChangeDeviceDontPropagateList, 0, BadClass); + return Success; + } + } + + return Success; +} diff --git a/xorg-server-1.4/Xi/chgprop.h b/xorg-server-1.4/Xi/chgprop.h new file mode 100644 index 0000000..3671618 --- /dev/null +++ b/xorg-server-1.4/Xi/chgprop.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef CHGPROP_H +#define CHGPROP_H 1 + +int SProcXChangeDeviceDontPropagateList(ClientPtr /* client */ + ); + +int ProcXChangeDeviceDontPropagateList(ClientPtr /* client */ + ); + +#endif /* CHGPROP_H */ diff --git a/xorg-server-1.4/Xi/chgptr.c b/xorg-server-1.4/Xi/chgptr.c new file mode 100644 index 0000000..a949068 --- /dev/null +++ b/xorg-server-1.4/Xi/chgptr.c @@ -0,0 +1,110 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to change the pointer device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "XIstubs.h" +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ + +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ + +#include "dixevents.h" +#include "exevents.h" +#include "exglobals.h" + +#include "chgptr.h" + +/*********************************************************************** + * + * This procedure is invoked to swap the request bytes if the server and + * client have a different byte order. + * + */ + +int +SProcXChangePointerDevice(ClientPtr client) +{ + char n; + + REQUEST(xChangePointerDeviceReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xChangePointerDeviceReq); + return (ProcXChangePointerDevice(client)); +} + +/*********************************************************************** + * + * This procedure changes the device used as the X pointer. + * + */ + +int +ProcXChangePointerDevice(ClientPtr client) +{ + REQUEST(xChangePointerDeviceReq); + REQUEST_SIZE_MATCH(xChangePointerDeviceReq); + + SendErrorToClient(client, IReqCode, X_ChangePointerDevice, 0, + BadDevice); + return Success; +} diff --git a/xorg-server-1.4/Xi/chgptr.h b/xorg-server-1.4/Xi/chgptr.h new file mode 100644 index 0000000..2d8ab66 --- /dev/null +++ b/xorg-server-1.4/Xi/chgptr.h @@ -0,0 +1,48 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef CHGPTR_H +#define CHGPTR_H 1 + +int SProcXChangePointerDevice(ClientPtr /* client */ + ); + +int ProcXChangePointerDevice(ClientPtr /* client */ + ); + +void DeleteFocusClassDeviceStruct(DeviceIntPtr /* dev */ + ); + +void SendEventToAllWindows(DeviceIntPtr /* dev */ , + Mask /* mask */ , + xEvent * /* ev */ , + int /* count */ + ); + +#endif /* CHGPTR_H */ diff --git a/xorg-server-1.4/Xi/closedev.c b/xorg-server-1.4/Xi/closedev.c new file mode 100644 index 0000000..8d38ec8 --- /dev/null +++ b/xorg-server-1.4/Xi/closedev.c @@ -0,0 +1,175 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to close an extension input device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include "XIstubs.h" +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "closedev.h" + +/*********************************************************************** + * + * This procedure closes an input device. + * + */ + +int +SProcXCloseDevice(ClientPtr client) +{ + char n; + + REQUEST(xCloseDeviceReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xCloseDeviceReq); + return (ProcXCloseDevice(client)); +} + +/*********************************************************************** + * + * Clear out event selections and passive grabs from a window for the + * specified device. + * + */ + +static void +DeleteDeviceEvents(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client) +{ + InputClientsPtr others; + OtherInputMasks *pOthers; + GrabPtr grab, next; + + if ((pOthers = wOtherInputMasks(pWin)) != 0) + for (others = pOthers->inputClients; others; others = others->next) + if (SameClient(others, client)) + others->mask[dev->id] = NoEventMask; + + for (grab = wPassiveGrabs(pWin); grab; grab = next) { + next = grab->next; + if ((grab->device == dev) && + (client->clientAsMask == CLIENT_BITS(grab->resource))) + FreeResource(grab->resource, RT_NONE); + } +} + +/*********************************************************************** + * + * Walk througth the window tree, deleting event selections for this client + * from this device from all windows. + * + */ + +static void +DeleteEventsFromChildren(DeviceIntPtr dev, WindowPtr p1, ClientPtr client) +{ + WindowPtr p2; + + while (p1) { + p2 = p1->firstChild; + DeleteDeviceEvents(dev, p1, client); + DeleteEventsFromChildren(dev, p2, client); + p1 = p1->nextSib; + } +} + +/*********************************************************************** + * + * This procedure closes an input device. + * + */ + +int +ProcXCloseDevice(ClientPtr client) +{ + int i; + WindowPtr pWin, p1; + DeviceIntPtr d; + + REQUEST(xCloseDeviceReq); + REQUEST_SIZE_MATCH(xCloseDeviceReq); + + d = LookupDeviceIntRec(stuff->deviceid); + if (d == NULL) { + SendErrorToClient(client, IReqCode, X_CloseDevice, 0, BadDevice); + return Success; + } + + if (d->grab && SameClient(d->grab, client)) + (*d->DeactivateGrab) (d); /* release active grab */ + + /* Remove event selections from all windows for events from this device + * and selected by this client. + * Delete passive grabs from all windows for this device. */ + + for (i = 0; i < screenInfo.numScreens; i++) { + pWin = WindowTable[i]; + DeleteDeviceEvents(d, pWin, client); + p1 = pWin->firstChild; + DeleteEventsFromChildren(d, p1, client); + } + + CloseInputDevice(d, client); + return Success; +} diff --git a/xorg-server-1.4/Xi/closedev.h b/xorg-server-1.4/Xi/closedev.h new file mode 100644 index 0000000..400aaa6 --- /dev/null +++ b/xorg-server-1.4/Xi/closedev.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef CLOSEDEV_H +#define CLOSEDEV_H 1 + +int SProcXCloseDevice(ClientPtr /* client */ + ); + +int ProcXCloseDevice(ClientPtr /* client */ + ); + +#endif /* CLOSEDEV_H */ diff --git a/xorg-server-1.4/Xi/devbell.c b/xorg-server-1.4/Xi/devbell.c new file mode 100644 index 0000000..ba873c7 --- /dev/null +++ b/xorg-server-1.4/Xi/devbell.c @@ -0,0 +1,159 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to change the keyboard device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "devbell.h" + +/*********************************************************************** + * + * This procedure is invoked to swap the request bytes if the server and + * client have a different byte order. + * + */ + +int +SProcXDeviceBell(ClientPtr client) +{ + char n; + + REQUEST(xDeviceBellReq); + swaps(&stuff->length, n); + return (ProcXDeviceBell(client)); +} + +/*********************************************************************** + * + * This procedure rings a bell on an extension device. + * + */ + +int +ProcXDeviceBell(ClientPtr client) +{ + DeviceIntPtr dev; + KbdFeedbackPtr k; + BellFeedbackPtr b; + int base; + int newpercent; + CARD8 class; + pointer ctrl; + BellProcPtr proc; + + REQUEST(xDeviceBellReq); + REQUEST_SIZE_MATCH(xDeviceBellReq); + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + client->errorValue = stuff->deviceid; + SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadDevice); + return Success; + } + + if (stuff->percent < -100 || stuff->percent > 100) { + client->errorValue = stuff->percent; + SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadValue); + return Success; + } + if (stuff->feedbackclass == KbdFeedbackClass) { + for (k = dev->kbdfeed; k; k = k->next) + if (k->ctrl.id == stuff->feedbackid) + break; + if (!k) { + client->errorValue = stuff->feedbackid; + SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadValue); + return Success; + } + base = k->ctrl.bell; + proc = k->BellProc; + ctrl = (pointer) & (k->ctrl); + class = KbdFeedbackClass; + } else if (stuff->feedbackclass == BellFeedbackClass) { + for (b = dev->bell; b; b = b->next) + if (b->ctrl.id == stuff->feedbackid) + break; + if (!b) { + client->errorValue = stuff->feedbackid; + SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadValue); + return Success; + } + base = b->ctrl.percent; + proc = b->BellProc; + ctrl = (pointer) & (b->ctrl); + class = BellFeedbackClass; + } else { + client->errorValue = stuff->feedbackclass; + SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadValue); + return Success; + } + newpercent = (base * stuff->percent) / 100; + if (stuff->percent < 0) + newpercent = base + newpercent; + else + newpercent = base - newpercent + stuff->percent; + (*proc) (newpercent, dev, ctrl, class); + + return Success; +} diff --git a/xorg-server-1.4/Xi/devbell.h b/xorg-server-1.4/Xi/devbell.h new file mode 100644 index 0000000..02a77a6 --- /dev/null +++ b/xorg-server-1.4/Xi/devbell.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef DEVBELL_H +#define DEVBELL_H 1 + +int SProcXDeviceBell(ClientPtr /* client */ + ); + +int ProcXDeviceBell(ClientPtr /* client */ + ); + +#endif /* DEVBELL_H */ diff --git a/xorg-server-1.4/Xi/exevents.c b/xorg-server-1.4/Xi/exevents.c new file mode 100644 index 0000000..fe297ab --- /dev/null +++ b/xorg-server-1.4/Xi/exevents.c @@ -0,0 +1,1260 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/******************************************************************** + * + * Routines to register and initialize extension input devices. + * This also contains ProcessOtherEvent, the routine called from DDX + * to route extension events. + * + */ + +#define NEED_EVENTS +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include "inputstr.h" +#include "windowstr.h" +#include "miscstruct.h" +#include "region.h" +#include "exevents.h" +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" +#include "dixevents.h" /* DeliverFocusedEvent */ +#include "dixgrabs.h" /* CreateGrab() */ +#include "scrnintstr.h" + +#define WID(w) ((w) ? ((w)->drawable.id) : 0) +#define AllModifiersMask ( \ + ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ + Mod3Mask | Mod4Mask | Mod5Mask ) +#define AllButtonsMask ( \ + Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask ) +#define Motion_Filter(class) (DevicePointerMotionMask | \ + (class)->state | (class)->motionMask) + +static Bool ShouldFreeInputMasks(WindowPtr /* pWin */ , + Bool /* ignoreSelectedEvents */ + ); +static Bool MakeInputMasks(WindowPtr /* pWin */ + ); + +/************************************************************************** + * + * Procedures for extension device event routing. + * + */ + +void +RegisterOtherDevice(DeviceIntPtr device) +{ + device->public.processInputProc = ProcessOtherEvent; + device->public.realInputProc = ProcessOtherEvent; + (device)->ActivateGrab = ActivateKeyboardGrab; + (device)->DeactivateGrab = DeactivateKeyboardGrab; +} + + /*ARGSUSED*/ void +ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) +{ + BYTE *kptr; + int i; + CARD16 modifiers; + CARD16 mask; + GrabPtr grab = other->grab; + Bool deactivateDeviceGrab = FALSE; + int key = 0, bit = 0, rootX, rootY; + ButtonClassPtr b = other->button; + KeyClassPtr k = other->key; + ValuatorClassPtr v = other->valuator; + deviceValuator *xV = (deviceValuator *) xE; + + if (xE->u.u.type != DeviceValuator) { + GetSpritePosition(&rootX, &rootY); + xE->u.keyButtonPointer.rootX = rootX; + xE->u.keyButtonPointer.rootY = rootY; + key = xE->u.u.detail; + NoticeEventTime(xE); + xE->u.keyButtonPointer.state = inputInfo.keyboard->key->state | + inputInfo.pointer->button->state; + bit = 1 << (key & 7); + } + if (DeviceEventCallback) { + DeviceEventInfoRec eventinfo; + + eventinfo.events = (xEventPtr) xE; + eventinfo.count = count; + CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo); + } + for (i = 1; i < count; i++) + if ((++xV)->type == DeviceValuator) { + int first = xV->first_valuator; + int *axisvals; + + if (xV->num_valuators + && (!v + || (xV->num_valuators + && (first + xV->num_valuators > v->numAxes)))) + FatalError("Bad valuators reported for device %s\n", + other->name); + xV->device_state = 0; + if (k) + xV->device_state |= k->state; + if (b) + xV->device_state |= b->state; + if (v && v->axisVal) { + axisvals = v->axisVal; + switch (xV->num_valuators) { + case 6: + *(axisvals + first + 5) = xV->valuator5; + case 5: + *(axisvals + first + 4) = xV->valuator4; + case 4: + *(axisvals + first + 3) = xV->valuator3; + case 3: + *(axisvals + first + 2) = xV->valuator2; + case 2: + *(axisvals + first + 1) = xV->valuator1; + case 1: + *(axisvals + first) = xV->valuator0; + case 0: + default: + break; + } + } + } + + if (xE->u.u.type == DeviceKeyPress) { + if (!k) + return; + + modifiers = k->modifierMap[key]; + kptr = &k->down[key >> 3]; + if (*kptr & bit) { /* allow ddx to generate multiple downs */ + if (!modifiers) { + xE->u.u.type = DeviceKeyRelease; + ProcessOtherEvent(xE, other, count); + xE->u.u.type = DeviceKeyPress; + /* release can have side effects, don't fall through */ + ProcessOtherEvent(xE, other, count); + } + return; + } + if (other->valuator) + other->valuator->motionHintWindow = NullWindow; + *kptr |= bit; + k->prev_state = k->state; + for (i = 0, mask = 1; modifiers; i++, mask <<= 1) { + if (mask & modifiers) { + /* This key affects modifier "i" */ + k->modifierKeyCount[i]++; + k->state |= mask; + modifiers &= ~mask; + } + } + if (!grab && CheckDeviceGrabs(other, xE, 0, count)) { + other->activatingKey = key; + return; + } + } else if (xE->u.u.type == DeviceKeyRelease) { + if (!k) + return; + + kptr = &k->down[key >> 3]; + if (!(*kptr & bit)) /* guard against duplicates */ + return; + modifiers = k->modifierMap[key]; + if (other->valuator) + other->valuator->motionHintWindow = NullWindow; + *kptr &= ~bit; + k->prev_state = k->state; + for (i = 0, mask = 1; modifiers; i++, mask <<= 1) { + if (mask & modifiers) { + /* This key affects modifier "i" */ + if (--k->modifierKeyCount[i] <= 0) { + k->modifierKeyCount[i] = 0; + k->state &= ~mask; + } + modifiers &= ~mask; + } + } + + if (other->fromPassiveGrab && (key == other->activatingKey)) + deactivateDeviceGrab = TRUE; + } else if (xE->u.u.type == DeviceButtonPress) { + if (!b) + return; + + kptr = &b->down[key >> 3]; + *kptr |= bit; + if (other->valuator) + other->valuator->motionHintWindow = NullWindow; + b->buttonsDown++; + b->motionMask = DeviceButtonMotionMask; + xE->u.u.detail = b->map[key]; + if (xE->u.u.detail == 0) + return; + if (xE->u.u.detail <= 5) + b->state |= (Button1Mask >> 1) << xE->u.u.detail; + SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); + if (!grab) + if (CheckDeviceGrabs(other, xE, 0, count)) + /* if a passive grab was activated, the event has been sent + * already */ + return; + + } else if (xE->u.u.type == DeviceButtonRelease) { + if (!b) + return; + + kptr = &b->down[key >> 3]; + *kptr &= ~bit; + if (other->valuator) + other->valuator->motionHintWindow = NullWindow; + if (b->buttonsDown >= 1 && !--b->buttonsDown) + b->motionMask = 0; + xE->u.u.detail = b->map[key]; + if (xE->u.u.detail == 0) + return; + if (xE->u.u.detail <= 5) + b->state &= ~((Button1Mask >> 1) << xE->u.u.detail); + SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); + if (!b->state && other->fromPassiveGrab) + deactivateDeviceGrab = TRUE; + } else if (xE->u.u.type == ProximityIn) + other->valuator->mode &= ~OutOfProximity; + else if (xE->u.u.type == ProximityOut) + other->valuator->mode |= OutOfProximity; + + if (grab) + DeliverGrabbedEvent(xE, other, deactivateDeviceGrab, count); + else if (other->focus) + DeliverFocusedEvent(other, xE, GetSpriteWindow(), count); + else + DeliverDeviceEvents(GetSpriteWindow(), xE, NullGrab, NullWindow, + other, count); + + if (deactivateDeviceGrab == TRUE) + (*other->DeactivateGrab) (other); +} + +_X_EXPORT int +InitProximityClassDeviceStruct(DeviceIntPtr dev) +{ + ProximityClassPtr proxc; + + proxc = (ProximityClassPtr) xalloc(sizeof(ProximityClassRec)); + if (!proxc) + return FALSE; + dev->proximity = proxc; + return TRUE; +} + +_X_EXPORT void +InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval, + int resolution, int min_res, int max_res) +{ + AxisInfoPtr ax; + + if (!dev || !dev->valuator) + return; + + ax = dev->valuator->axes + axnum; + + ax->min_value = minval; + ax->max_value = maxval; + ax->resolution = resolution; + ax->min_resolution = min_res; + ax->max_resolution = max_res; +} + +static void +FixDeviceStateNotify(DeviceIntPtr dev, deviceStateNotify * ev, KeyClassPtr k, + ButtonClassPtr b, ValuatorClassPtr v, int first) +{ + ev->type = DeviceStateNotify; + ev->deviceid = dev->id; + ev->time = currentTime.milliseconds; + ev->classes_reported = 0; + ev->num_keys = 0; + ev->num_buttons = 0; + ev->num_valuators = 0; + + if (b) { + ev->classes_reported |= (1 << ButtonClass); + ev->num_buttons = b->numButtons; + memmove((char *)&ev->buttons[0], (char *)b->down, 4); + } else if (k) { + ev->classes_reported |= (1 << KeyClass); + ev->num_keys = k->curKeySyms.maxKeyCode - k->curKeySyms.minKeyCode; + memmove((char *)&ev->keys[0], (char *)k->down, 4); + } + if (v) { + int nval = v->numAxes - first; + + ev->classes_reported |= (1 << ValuatorClass); + ev->classes_reported |= (dev->valuator->mode << ModeBitsShift); + ev->num_valuators = nval < 3 ? nval : 3; + switch (ev->num_valuators) { + case 3: + ev->valuator2 = v->axisVal[first + 2]; + case 2: + ev->valuator1 = v->axisVal[first + 1]; + case 1: + ev->valuator0 = v->axisVal[first]; + break; + } + } +} + +static void +FixDeviceValuator(DeviceIntPtr dev, deviceValuator * ev, ValuatorClassPtr v, + int first) +{ + int nval = v->numAxes - first; + + ev->type = DeviceValuator; + ev->deviceid = dev->id; + ev->num_valuators = nval < 3 ? nval : 3; + ev->first_valuator = first; + switch (ev->num_valuators) { + case 3: + ev->valuator2 = v->axisVal[first + 2]; + case 2: + ev->valuator1 = v->axisVal[first + 1]; + case 1: + ev->valuator0 = v->axisVal[first]; + break; + } + first += ev->num_valuators; +} + +void +DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, + WindowPtr pWin) +{ + deviceFocus event; + + if (type == FocusIn) + type = DeviceFocusIn; + else + type = DeviceFocusOut; + + event.deviceid = dev->id; + event.mode = mode; + event.type = type; + event.detail = detail; + event.window = pWin->drawable.id; + event.time = currentTime.milliseconds; + + (void)DeliverEventsToWindow(pWin, (xEvent *) & event, 1, + DeviceFocusChangeMask, NullGrab, dev->id); + + if ((type == DeviceFocusIn) && + (wOtherInputMasks(pWin)) && + (wOtherInputMasks(pWin)->inputEvents[dev->id] & DeviceStateNotifyMask)) + { + int evcount = 1; + deviceStateNotify *ev, *sev; + deviceKeyStateNotify *kev; + deviceButtonStateNotify *bev; + + KeyClassPtr k; + ButtonClassPtr b; + ValuatorClassPtr v; + int nval = 0, nkeys = 0, nbuttons = 0, first = 0; + + if ((b = dev->button) != NULL) { + nbuttons = b->numButtons; + if (nbuttons > 32) + evcount++; + } + if ((k = dev->key) != NULL) { + nkeys = k->curKeySyms.maxKeyCode - k->curKeySyms.minKeyCode; + if (nkeys > 32) + evcount++; + if (nbuttons > 0) { + evcount++; + } + } + if ((v = dev->valuator) != NULL) { + nval = v->numAxes; + + if (nval > 3) + evcount++; + if (nval > 6) { + if (!(k && b)) + evcount++; + if (nval > 9) + evcount += ((nval - 7) / 3); + } + } + + sev = ev = (deviceStateNotify *) xalloc(evcount * sizeof(xEvent)); + FixDeviceStateNotify(dev, ev, NULL, NULL, NULL, first); + + if (b != NULL) { + FixDeviceStateNotify(dev, ev++, NULL, b, v, first); + first += 3; + nval -= 3; + if (nbuttons > 32) { + (ev - 1)->deviceid |= MORE_EVENTS; + bev = (deviceButtonStateNotify *) ev++; + bev->type = DeviceButtonStateNotify; + bev->deviceid = dev->id; + memmove((char *)&bev->buttons[0], (char *)&b->down[4], 28); + } + if (nval > 0) { + (ev - 1)->deviceid |= MORE_EVENTS; + FixDeviceValuator(dev, (deviceValuator *) ev++, v, first); + first += 3; + nval -= 3; + } + } + + if (k != NULL) { + FixDeviceStateNotify(dev, ev++, k, NULL, v, first); + first += 3; + nval -= 3; + if (nkeys > 32) { + (ev - 1)->deviceid |= MORE_EVENTS; + kev = (deviceKeyStateNotify *) ev++; + kev->type = DeviceKeyStateNotify; + kev->deviceid = dev->id; + memmove((char *)&kev->keys[0], (char *)&k->down[4], 28); + } + if (nval > 0) { + (ev - 1)->deviceid |= MORE_EVENTS; + FixDeviceValuator(dev, (deviceValuator *) ev++, v, first); + first += 3; + nval -= 3; + } + } + + while (nval > 0) { + FixDeviceStateNotify(dev, ev++, NULL, NULL, v, first); + first += 3; + nval -= 3; + if (nval > 0) { + (ev - 1)->deviceid |= MORE_EVENTS; + FixDeviceValuator(dev, (deviceValuator *) ev++, v, first); + first += 3; + nval -= 3; + } + } + + (void)DeliverEventsToWindow(pWin, (xEvent *) sev, evcount, + DeviceStateNotifyMask, NullGrab, dev->id); + xfree(sev); + } +} + +int +GrabButton(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, + BYTE other_devices_mode, CARD16 modifiers, + DeviceIntPtr modifier_device, CARD8 button, Window grabWindow, + BOOL ownerEvents, Cursor rcursor, Window rconfineTo, Mask eventMask) +{ + WindowPtr pWin, confineTo; + CursorPtr cursor; + GrabPtr grab; + int rc; + + if ((this_device_mode != GrabModeSync) && + (this_device_mode != GrabModeAsync)) { + client->errorValue = this_device_mode; + return BadValue; + } + if ((other_devices_mode != GrabModeSync) && + (other_devices_mode != GrabModeAsync)) { + client->errorValue = other_devices_mode; + return BadValue; + } + if ((modifiers != AnyModifier) && (modifiers & ~AllModifiersMask)) { + client->errorValue = modifiers; + return BadValue; + } + if ((ownerEvents != xFalse) && (ownerEvents != xTrue)) { + client->errorValue = ownerEvents; + return BadValue; + } + rc = dixLookupWindow(&pWin, grabWindow, client, DixUnknownAccess); + if (rc != Success) + return rc; + if (rconfineTo == None) + confineTo = NullWindow; + else { + rc = dixLookupWindow(&confineTo, rconfineTo, client, DixUnknownAccess); + if (rc != Success) + return rc; + } + if (rcursor == None) + cursor = NullCursor; + else { + cursor = (CursorPtr) LookupIDByType(rcursor, RT_CURSOR); + if (!cursor) { + client->errorValue = rcursor; + return BadCursor; + } + } + + grab = CreateGrab(client->index, dev, pWin, eventMask, + (Bool) ownerEvents, (Bool) this_device_mode, + (Bool) other_devices_mode, modifier_device, modifiers, + DeviceButtonPress, button, confineTo, cursor); + if (!grab) + return BadAlloc; + return AddPassiveGrabToList(grab); +} + +int +GrabKey(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, + BYTE other_devices_mode, CARD16 modifiers, + DeviceIntPtr modifier_device, CARD8 key, Window grabWindow, + BOOL ownerEvents, Mask mask) +{ + WindowPtr pWin; + GrabPtr grab; + KeyClassPtr k = dev->key; + int rc; + + if (k == NULL) + return BadMatch; + if ((other_devices_mode != GrabModeSync) && + (other_devices_mode != GrabModeAsync)) { + client->errorValue = other_devices_mode; + return BadValue; + } + if ((this_device_mode != GrabModeSync) && + (this_device_mode != GrabModeAsync)) { + client->errorValue = this_device_mode; + return BadValue; + } + if (((key > k->curKeySyms.maxKeyCode) || (key < k->curKeySyms.minKeyCode)) + && (key != AnyKey)) { + client->errorValue = key; + return BadValue; + } + if ((modifiers != AnyModifier) && (modifiers & ~AllModifiersMask)) { + client->errorValue = modifiers; + return BadValue; + } + if ((ownerEvents != xTrue) && (ownerEvents != xFalse)) { + client->errorValue = ownerEvents; + return BadValue; + } + rc = dixLookupWindow(&pWin, grabWindow, client, DixUnknownAccess); + if (rc != Success) + return rc; + + grab = CreateGrab(client->index, dev, pWin, + mask, ownerEvents, this_device_mode, other_devices_mode, + modifier_device, modifiers, DeviceKeyPress, key, + NullWindow, NullCursor); + if (!grab) + return BadAlloc; + return AddPassiveGrabToList(grab); +} + +int +SelectForWindow(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client, + Mask mask, Mask exclusivemasks, Mask validmasks) +{ + int mskidx = dev->id; + int i, ret; + Mask check; + InputClientsPtr others; + + if (mask & ~validmasks) { + client->errorValue = mask; + return BadValue; + } + check = (mask & exclusivemasks); + if (wOtherInputMasks(pWin)) { + if (check & wOtherInputMasks(pWin)->inputEvents[mskidx]) { /* It is illegal for two different + * clients to select on any of the + * events for maskcheck. However, + * it is OK, for some client to + * continue selecting on one of those + * events. */ + for (others = wOtherInputMasks(pWin)->inputClients; others; + others = others->next) { + if (!SameClient(others, client) && (check & + others->mask[mskidx])) + return BadAccess; + } + } + for (others = wOtherInputMasks(pWin)->inputClients; others; + others = others->next) { + if (SameClient(others, client)) { + check = others->mask[mskidx]; + others->mask[mskidx] = mask; + if (mask == 0) { + for (i = 0; i < EMASKSIZE; i++) + if (i != mskidx && others->mask[i] != 0) + break; + if (i == EMASKSIZE) { + RecalculateDeviceDeliverableEvents(pWin); + if (ShouldFreeInputMasks(pWin, FALSE)) + FreeResource(others->resource, RT_NONE); + return Success; + } + } + goto maskSet; + } + } + } + check = 0; + if ((ret = AddExtensionClient(pWin, client, mask, mskidx)) != Success) + return ret; + maskSet: + if (dev->valuator) + if ((dev->valuator->motionHintWindow == pWin) && + (mask & DevicePointerMotionHintMask) && + !(check & DevicePointerMotionHintMask) && !dev->grab) + dev->valuator->motionHintWindow = NullWindow; + RecalculateDeviceDeliverableEvents(pWin); + return Success; +} + +int +AddExtensionClient(WindowPtr pWin, ClientPtr client, Mask mask, int mskidx) +{ + InputClientsPtr others; + + if (!pWin->optional && !MakeWindowOptional(pWin)) + return BadAlloc; + others = (InputClients *) xalloc(sizeof(InputClients)); + if (!others) + return BadAlloc; + if (!pWin->optional->inputMasks && !MakeInputMasks(pWin)) + return BadAlloc; + bzero((char *)&others->mask[0], sizeof(Mask) * EMASKSIZE); + others->mask[mskidx] = mask; + others->resource = FakeClientID(client->index); + others->next = pWin->optional->inputMasks->inputClients; + pWin->optional->inputMasks->inputClients = others; + if (!AddResource(others->resource, RT_INPUTCLIENT, (pointer) pWin)) + return BadAlloc; + return Success; +} + +static Bool +MakeInputMasks(WindowPtr pWin) +{ + struct _OtherInputMasks *imasks; + + imasks = (struct _OtherInputMasks *) + xalloc(sizeof(struct _OtherInputMasks)); + if (!imasks) + return FALSE; + bzero((char *)imasks, sizeof(struct _OtherInputMasks)); + pWin->optional->inputMasks = imasks; + return TRUE; +} + +void +RecalculateDeviceDeliverableEvents(WindowPtr pWin) +{ + InputClientsPtr others; + struct _OtherInputMasks *inputMasks; /* default: NULL */ + WindowPtr pChild, tmp; + int i; + + pChild = pWin; + while (1) { + if ((inputMasks = wOtherInputMasks(pChild)) != 0) { + for (others = inputMasks->inputClients; others; + others = others->next) { + for (i = 0; i < EMASKSIZE; i++) + inputMasks->inputEvents[i] |= others->mask[i]; + } + for (i = 0; i < EMASKSIZE; i++) + inputMasks->deliverableEvents[i] = inputMasks->inputEvents[i]; + for (tmp = pChild->parent; tmp; tmp = tmp->parent) + if (wOtherInputMasks(tmp)) + for (i = 0; i < EMASKSIZE; i++) + inputMasks->deliverableEvents[i] |= + (wOtherInputMasks(tmp)->deliverableEvents[i] + & ~inputMasks-> + dontPropagateMask[i] & PropagateMask[i]); + } + if (pChild->firstChild) { + pChild = pChild->firstChild; + continue; + } + while (!pChild->nextSib && (pChild != pWin)) + pChild = pChild->parent; + if (pChild == pWin) + break; + pChild = pChild->nextSib; + } +} + +int +InputClientGone(WindowPtr pWin, XID id) +{ + InputClientsPtr other, prev; + + if (!wOtherInputMasks(pWin)) + return (Success); + prev = 0; + for (other = wOtherInputMasks(pWin)->inputClients; other; + other = other->next) { + if (other->resource == id) { + if (prev) { + prev->next = other->next; + xfree(other); + } else if (!(other->next)) { + if (ShouldFreeInputMasks(pWin, TRUE)) { + wOtherInputMasks(pWin)->inputClients = other->next; + xfree(wOtherInputMasks(pWin)); + pWin->optional->inputMasks = (OtherInputMasks *) NULL; + CheckWindowOptionalNeed(pWin); + xfree(other); + } else { + other->resource = FakeClientID(0); + if (!AddResource(other->resource, RT_INPUTCLIENT, + (pointer) pWin)) + return BadAlloc; + } + } else { + wOtherInputMasks(pWin)->inputClients = other->next; + xfree(other); + } + RecalculateDeviceDeliverableEvents(pWin); + return (Success); + } + prev = other; + } + FatalError("client not on device event list"); +} + +int +SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate, + xEvent * ev, Mask mask, int count) +{ + WindowPtr pWin; + WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */ + WindowPtr spriteWin = GetSpriteWindow(); + + if (dest == PointerWindow) + pWin = spriteWin; + else if (dest == InputFocus) { + WindowPtr inputFocus; + + if (!d->focus) + inputFocus = spriteWin; + else + inputFocus = d->focus->win; + + if (inputFocus == FollowKeyboardWin) + inputFocus = inputInfo.keyboard->focus->win; + + if (inputFocus == NoneWin) + return Success; + + /* If the input focus is PointerRootWin, send the event to where + * the pointer is if possible, then perhaps propogate up to root. */ + if (inputFocus == PointerRootWin) + inputFocus = GetCurrentRootWindow(); + + if (IsParent(inputFocus, spriteWin)) { + effectiveFocus = inputFocus; + pWin = spriteWin; + } else + effectiveFocus = pWin = inputFocus; + } else + dixLookupWindow(&pWin, dest, client, DixUnknownAccess); + if (!pWin) + return BadWindow; + if ((propagate != xFalse) && (propagate != xTrue)) { + client->errorValue = propagate; + return BadValue; + } + ev->u.u.type |= 0x80; + if (propagate) { + for (; pWin; pWin = pWin->parent) { + if (DeliverEventsToWindow(pWin, ev, count, mask, NullGrab, d->id)) + return Success; + if (pWin == effectiveFocus) + return Success; + if (wOtherInputMasks(pWin)) + mask &= ~wOtherInputMasks(pWin)->dontPropagateMask[d->id]; + if (!mask) + break; + } + } else + (void)(DeliverEventsToWindow(pWin, ev, count, mask, NullGrab, d->id)); + return Success; +} + +int +SetButtonMapping(ClientPtr client, DeviceIntPtr dev, int nElts, BYTE * map) +{ + int i; + ButtonClassPtr b = dev->button; + + if (b == NULL) + return BadMatch; + + if (nElts != b->numButtons) { + client->errorValue = nElts; + return BadValue; + } + if (BadDeviceMap(&map[0], nElts, 1, 255, &client->errorValue)) + return BadValue; + for (i = 0; i < nElts; i++) + if ((b->map[i + 1] != map[i]) && BitIsOn(b->down, i + 1)) + return MappingBusy; + for (i = 0; i < nElts; i++) + b->map[i + 1] = map[i]; + return Success; +} + +int +SetModifierMapping(ClientPtr client, DeviceIntPtr dev, int len, int rlen, + int numKeyPerModifier, KeyCode * inputMap, KeyClassPtr * k) +{ + KeyCode *map = NULL; + int inputMapLen; + int i; + + *k = dev->key; + if (*k == NULL) + return BadMatch; + if (len != ((numKeyPerModifier << 1) + rlen)) + return BadLength; + + inputMapLen = 8 * numKeyPerModifier; + + /* + * Now enforce the restriction that "all of the non-zero keycodes must be + * in the range specified by min-keycode and max-keycode in the + * connection setup (else a Value error)" + */ + i = inputMapLen; + while (i--) { + if (inputMap[i] + && (inputMap[i] < (*k)->curKeySyms.minKeyCode + || inputMap[i] > (*k)->curKeySyms.maxKeyCode)) { + client->errorValue = inputMap[i]; + return -1; /* BadValue collides with MappingFailed */ + } + } + + /* + * Now enforce the restriction that none of the old or new + * modifier keys may be down while we change the mapping, and + * that the DDX layer likes the choice. + */ + if (!AllModifierKeysAreUp(dev, (*k)->modifierKeyMap, + (int)(*k)->maxKeysPerModifier, inputMap, + (int)numKeyPerModifier) + || !AllModifierKeysAreUp(dev, inputMap, (int)numKeyPerModifier, + (*k)->modifierKeyMap, + (int)(*k)->maxKeysPerModifier)) { + return MappingBusy; + } else { + for (i = 0; i < inputMapLen; i++) { + if (inputMap[i] && !LegalModifier(inputMap[i], dev)) { + return MappingFailed; + } + } + } + + /* + * Now build the keyboard's modifier bitmap from the + * list of keycodes. + */ + if (inputMapLen) { + map = (KeyCode *) xalloc(inputMapLen); + if (!map) + return BadAlloc; + } + if ((*k)->modifierKeyMap) + xfree((*k)->modifierKeyMap); + if (inputMapLen) { + (*k)->modifierKeyMap = map; + memmove((char *)(*k)->modifierKeyMap, (char *)inputMap, inputMapLen); + } else + (*k)->modifierKeyMap = NULL; + + (*k)->maxKeysPerModifier = numKeyPerModifier; + for (i = 0; i < MAP_LENGTH; i++) + (*k)->modifierMap[i] = 0; + for (i = 0; i < inputMapLen; i++) + if (inputMap[i]) { + (*k)->modifierMap[inputMap[i]] + |= (1 << (i / (*k)->maxKeysPerModifier)); + } + + return (MappingSuccess); +} + +void +SendDeviceMappingNotify(CARD8 request, + KeyCode firstKeyCode, CARD8 count, DeviceIntPtr dev) +{ + xEvent event; + deviceMappingNotify *ev = (deviceMappingNotify *) & event; + + ev->type = DeviceMappingNotify; + ev->request = request; + ev->deviceid = dev->id; + ev->time = currentTime.milliseconds; + if (request == MappingKeyboard) { + ev->firstKeyCode = firstKeyCode; + ev->count = count; + } + + SendEventToAllWindows(dev, DeviceMappingNotifyMask, (xEvent *) ev, 1); +} + +int +ChangeKeyMapping(ClientPtr client, + DeviceIntPtr dev, + unsigned len, + int type, + KeyCode firstKeyCode, + CARD8 keyCodes, CARD8 keySymsPerKeyCode, KeySym * map) +{ + KeySymsRec keysyms; + KeyClassPtr k = dev->key; + + if (k == NULL) + return (BadMatch); + + if (len != (keyCodes * keySymsPerKeyCode)) + return BadLength; + + if ((firstKeyCode < k->curKeySyms.minKeyCode) || + (firstKeyCode + keyCodes - 1 > k->curKeySyms.maxKeyCode)) { + client->errorValue = firstKeyCode; + return BadValue; + } + if (keySymsPerKeyCode == 0) { + client->errorValue = 0; + return BadValue; + } + keysyms.minKeyCode = firstKeyCode; + keysyms.maxKeyCode = firstKeyCode + keyCodes - 1; + keysyms.mapWidth = keySymsPerKeyCode; + keysyms.map = map; + if (!SetKeySymsMap(&k->curKeySyms, &keysyms)) + return BadAlloc; + SendDeviceMappingNotify(MappingKeyboard, firstKeyCode, keyCodes, dev); + return client->noClientException; +} + +static void +DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev) +{ + WindowPtr parent; + + /* Deactivate any grabs performed on this window, before making + * any input focus changes. + * Deactivating a device grab should cause focus events. */ + + if (dev->grab && (dev->grab->window == pWin)) + (*dev->DeactivateGrab) (dev); + + /* If the focus window is a root window (ie. has no parent) + * then don't delete the focus from it. */ + + if (dev->focus && (pWin == dev->focus->win) && (pWin->parent != NullWindow)) { + int focusEventMode = NotifyNormal; + + /* If a grab is in progress, then alter the mode of focus events. */ + + if (dev->grab) + focusEventMode = NotifyWhileGrabbed; + + switch (dev->focus->revert) { + case RevertToNone: + DoFocusEvents(dev, pWin, NoneWin, focusEventMode); + dev->focus->win = NoneWin; + dev->focus->traceGood = 0; + break; + case RevertToParent: + parent = pWin; + do { + parent = parent->parent; + dev->focus->traceGood--; + } + while (!parent->realized); + DoFocusEvents(dev, pWin, parent, focusEventMode); + dev->focus->win = parent; + dev->focus->revert = RevertToNone; + break; + case RevertToPointerRoot: + DoFocusEvents(dev, pWin, PointerRootWin, focusEventMode); + dev->focus->win = PointerRootWin; + dev->focus->traceGood = 0; + break; + case RevertToFollowKeyboard: + if (inputInfo.keyboard->focus->win) { + DoFocusEvents(dev, pWin, inputInfo.keyboard->focus->win, + focusEventMode); + dev->focus->win = FollowKeyboardWin; + dev->focus->traceGood = 0; + } else { + DoFocusEvents(dev, pWin, NoneWin, focusEventMode); + dev->focus->win = NoneWin; + dev->focus->traceGood = 0; + } + break; + } + } + + if (dev->valuator) + if (dev->valuator->motionHintWindow == pWin) + dev->valuator->motionHintWindow = NullWindow; +} + +void +DeleteWindowFromAnyExtEvents(WindowPtr pWin, Bool freeResources) +{ + int i; + DeviceIntPtr dev; + InputClientsPtr ic; + struct _OtherInputMasks *inputMasks; + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (dev == inputInfo.pointer || dev == inputInfo.keyboard) + continue; + DeleteDeviceFromAnyExtEvents(pWin, dev); + } + + for (dev = inputInfo.off_devices; dev; dev = dev->next) + DeleteDeviceFromAnyExtEvents(pWin, dev); + + if (freeResources) + while ((inputMasks = wOtherInputMasks(pWin)) != 0) { + ic = inputMasks->inputClients; + for (i = 0; i < EMASKSIZE; i++) + inputMasks->dontPropagateMask[i] = 0; + FreeResource(ic->resource, RT_NONE); + } +} + +int +MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer * pEvents, Mask mask) +{ + DeviceIntPtr dev; + + dev = LookupDeviceIntRec(pEvents->deviceid & DEVICE_BITS); + if (!dev) + return 0; + + if (pEvents->type == DeviceMotionNotify) { + if (mask & DevicePointerMotionHintMask) { + if (WID(dev->valuator->motionHintWindow) == pEvents->event) { + return 1; /* don't send, but pretend we did */ + } + pEvents->detail = NotifyHint; + } else { + pEvents->detail = NotifyNormal; + } + } + return (0); +} + +void +CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type, + deviceKeyButtonPointer * xE, GrabPtr grab, + ClientPtr client, Mask deliveryMask) +{ + DeviceIntPtr dev; + + dev = LookupDeviceIntRec(xE->deviceid & DEVICE_BITS); + if (!dev) + return; + + if (type == DeviceMotionNotify) + dev->valuator->motionHintWindow = pWin; + else if ((type == DeviceButtonPress) && (!grab) && + (deliveryMask & DeviceButtonGrabMask)) { + GrabRec tempGrab; + + tempGrab.device = dev; + tempGrab.resource = client->clientAsMask; + tempGrab.window = pWin; + tempGrab.ownerEvents = + (deliveryMask & DeviceOwnerGrabButtonMask) ? TRUE : FALSE; + tempGrab.eventMask = deliveryMask; + tempGrab.keyboardMode = GrabModeAsync; + tempGrab.pointerMode = GrabModeAsync; + tempGrab.confineTo = NullWindow; + tempGrab.cursor = NullCursor; + (*dev->ActivateGrab) (dev, &tempGrab, currentTime, TRUE); + } +} + +static Mask +DeviceEventMaskForClient(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client) +{ + InputClientsPtr other; + + if (!wOtherInputMasks(pWin)) + return 0; + for (other = wOtherInputMasks(pWin)->inputClients; other; + other = other->next) { + if (SameClient(other, client)) + return other->mask[dev->id]; + } + return 0; +} + +void +MaybeStopDeviceHint(DeviceIntPtr dev, ClientPtr client) +{ + WindowPtr pWin; + GrabPtr grab = dev->grab; + + pWin = dev->valuator->motionHintWindow; + + if ((grab && SameClient(grab, client) && + ((grab->eventMask & DevicePointerMotionHintMask) || + (grab->ownerEvents && + (DeviceEventMaskForClient(dev, pWin, client) & + DevicePointerMotionHintMask)))) || + (!grab && + (DeviceEventMaskForClient(dev, pWin, client) & + DevicePointerMotionHintMask))) + dev->valuator->motionHintWindow = NullWindow; +} + +int +DeviceEventSuppressForWindow(WindowPtr pWin, ClientPtr client, Mask mask, + int maskndx) +{ + struct _OtherInputMasks *inputMasks = wOtherInputMasks(pWin); + + if (mask & ~PropagateMask[maskndx]) { + client->errorValue = mask; + return BadValue; + } + + if (mask == 0) { + if (inputMasks) + inputMasks->dontPropagateMask[maskndx] = mask; + } else { + if (!inputMasks) + AddExtensionClient(pWin, client, 0, 0); + inputMasks = wOtherInputMasks(pWin); + inputMasks->dontPropagateMask[maskndx] = mask; + } + RecalculateDeviceDeliverableEvents(pWin); + if (ShouldFreeInputMasks(pWin, FALSE)) + FreeResource(inputMasks->inputClients->resource, RT_NONE); + return Success; +} + +static Bool +ShouldFreeInputMasks(WindowPtr pWin, Bool ignoreSelectedEvents) +{ + int i; + Mask allInputEventMasks = 0; + struct _OtherInputMasks *inputMasks = wOtherInputMasks(pWin); + + for (i = 0; i < EMASKSIZE; i++) + allInputEventMasks |= inputMasks->dontPropagateMask[i]; + if (!ignoreSelectedEvents) + for (i = 0; i < EMASKSIZE; i++) + allInputEventMasks |= inputMasks->inputEvents[i]; + if (allInputEventMasks == 0) + return TRUE; + else + return FALSE; +} + +/*********************************************************************** + * + * Walk through the window tree, finding all clients that want to know + * about the Event. + * + */ + +static void +FindInterestedChildren(DeviceIntPtr dev, WindowPtr p1, Mask mask, + xEvent * ev, int count) +{ + WindowPtr p2; + + while (p1) { + p2 = p1->firstChild; + (void)DeliverEventsToWindow(p1, ev, count, mask, NullGrab, dev->id); + FindInterestedChildren(dev, p2, mask, ev, count); + p1 = p1->nextSib; + } +} + +/*********************************************************************** + * + * Send an event to interested clients in all windows on all screens. + * + */ + +void +SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count) +{ + int i; + WindowPtr pWin, p1; + + for (i = 0; i < screenInfo.numScreens; i++) { + pWin = WindowTable[i]; + (void)DeliverEventsToWindow(pWin, ev, count, mask, NullGrab, dev->id); + p1 = pWin->firstChild; + FindInterestedChildren(dev, p1, mask, ev, count); + } +} diff --git a/xorg-server-1.4/Xi/exglobals.h b/xorg-server-1.4/Xi/exglobals.h new file mode 100644 index 0000000..50bb33f --- /dev/null +++ b/xorg-server-1.4/Xi/exglobals.h @@ -0,0 +1,74 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. + +********************************************************/ + +/***************************************************************** + * + * Globals referenced elsewhere in the server. + * + */ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef EXGLOBALS_H +#define EXGLOBALS_H 1 + +extern int IReqCode; +extern int BadDevice; +extern int BadMode; +extern int DeviceBusy; +extern int BadClass; + +extern Mask DevicePointerMotionMask; +extern Mask DevicePointerMotionHintMask; +extern Mask DeviceFocusChangeMask; +extern Mask DeviceStateNotifyMask; +extern Mask DeviceMappingNotifyMask; +extern Mask DeviceOwnerGrabButtonMask; +extern Mask DeviceButtonGrabMask; +extern Mask DeviceButtonMotionMask; +extern Mask DevicePresenceNotifyMask; +extern Mask PropagateMask[]; + +extern int DeviceValuator; +extern int DeviceKeyPress; +extern int DeviceKeyRelease; +extern int DeviceButtonPress; +extern int DeviceButtonRelease; +extern int DeviceMotionNotify; +extern int DeviceFocusIn; +extern int DeviceFocusOut; +extern int ProximityIn; +extern int ProximityOut; +extern int DeviceStateNotify; +extern int DeviceKeyStateNotify; +extern int DeviceButtonStateNotify; +extern int DeviceMappingNotify; +extern int ChangeDeviceNotify; +extern int DevicePresenceNotify; + +extern int RT_INPUTCLIENT; + +#endif /* EXGLOBALS_H */ diff --git a/xorg-server-1.4/Xi/extinit.c b/xorg-server-1.4/Xi/extinit.c new file mode 100644 index 0000000..b1ec321 --- /dev/null +++ b/xorg-server-1.4/Xi/extinit.c @@ -0,0 +1,986 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/******************************************************************** + * + * Dispatch routines and initialization routines for the X input extension. + * + */ + +#define NUMTYPES 15 + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "inputstr.h" +#include "gcstruct.h" /* pointer for extnsionst.h */ +#include "extnsionst.h" /* extension entry */ +#include +#include + +#include "dixevents.h" +#include "exevents.h" +#include "extinit.h" +#include "exglobals.h" +#include "swaprep.h" + +/* modules local to Xi */ +#include "allowev.h" +#include "chgdctl.h" +#include "chgfctl.h" +#include "chgkbd.h" +#include "chgprop.h" +#include "chgptr.h" +#include "closedev.h" +#include "devbell.h" +#include "getbmap.h" +#include "getbmap.h" +#include "getdctl.h" +#include "getfctl.h" +#include "getfocus.h" +#include "getkmap.h" +#include "getmmap.h" +#include "getprop.h" +#include "getselev.h" +#include "getvers.h" +#include "getvers.h" +#include "grabdev.h" +#include "grabdevb.h" +#include "grabdevk.h" +#include "gtmotion.h" +#include "listdev.h" +#include "opendev.h" +#include "queryst.h" +#include "selectev.h" +#include "sendexev.h" +#include "chgkmap.h" +#include "setbmap.h" +#include "setdval.h" +#include "setfocus.h" +#include "setmmap.h" +#include "setmode.h" +#include "ungrdev.h" +#include "ungrdevb.h" +#include "ungrdevk.h" + +static Mask lastExtEventMask = 1; +int ExtEventIndex; +Mask ExtValidMasks[EMASKSIZE]; +Mask ExtExclusiveMasks[EMASKSIZE]; + +static struct dev_type +{ + Atom type; + char *name; +} dev_type[] = { + { + 0, XI_KEYBOARD}, { + 0, XI_MOUSE}, { + 0, XI_TABLET}, { + 0, XI_TOUCHSCREEN}, { + 0, XI_TOUCHPAD}, { + 0, XI_BARCODE}, { + 0, XI_BUTTONBOX}, { + 0, XI_KNOB_BOX}, { + 0, XI_ONE_KNOB}, { + 0, XI_NINE_KNOB}, { + 0, XI_TRACKBALL}, { + 0, XI_QUADRATURE}, { + 0, XI_ID_MODULE}, { + 0, XI_SPACEBALL}, { + 0, XI_DATAGLOVE}, { + 0, XI_EYETRACKER}, { + 0, XI_CURSORKEYS}, { +0, XI_FOOTMOUSE}}; + +CARD8 event_base[numInputClasses]; +XExtEventInfo EventInfo[32]; + +/***************************************************************** + * + * Globals referenced elsewhere in the server. + * + */ + +int IReqCode = 0; +int BadDevice = 0; +static int BadEvent = 1; +int BadMode = 2; +int DeviceBusy = 3; +int BadClass = 4; + +Mask DevicePointerMotionMask; +Mask DevicePointerMotionHintMask; +Mask DeviceFocusChangeMask; +Mask DeviceStateNotifyMask; +static Mask ChangeDeviceNotifyMask; +Mask DeviceMappingNotifyMask; +Mask DeviceOwnerGrabButtonMask; +Mask DeviceButtonGrabMask; +Mask DeviceButtonMotionMask; +Mask DevicePresenceNotifyMask; + +int DeviceValuator; +int DeviceKeyPress; +int DeviceKeyRelease; +int DeviceButtonPress; +int DeviceButtonRelease; +int DeviceMotionNotify; +int DeviceFocusIn; +int DeviceFocusOut; +int ProximityIn; +int ProximityOut; +int DeviceStateNotify; +int DeviceKeyStateNotify; +int DeviceButtonStateNotify; +int DeviceMappingNotify; +int ChangeDeviceNotify; +int DevicePresenceNotify; + +int RT_INPUTCLIENT; + +/***************************************************************** + * + * Externs defined elsewhere in the X server. + * + */ + +extern XExtensionVersion AllExtensionVersions[]; + +Mask PropagateMask[MAX_DEVICES]; + +/***************************************************************** + * + * Declarations of local routines. + * + */ + +static XExtensionVersion thisversion = { XI_Present, + XI_Add_DevicePresenceNotify_Major, + XI_Add_DevicePresenceNotify_Minor +}; + +/************************************************************************* + * + * ProcIDispatch - main dispatch routine for requests to this extension. + * This routine is used if server and client have the same byte ordering. + * + */ + +static int +ProcIDispatch(ClientPtr client) +{ + REQUEST(xReq); + if (stuff->data == X_GetExtensionVersion) + return (ProcXGetExtensionVersion(client)); + if (stuff->data == X_ListInputDevices) + return (ProcXListInputDevices(client)); + else if (stuff->data == X_OpenDevice) + return (ProcXOpenDevice(client)); + else if (stuff->data == X_CloseDevice) + return (ProcXCloseDevice(client)); + else if (stuff->data == X_SetDeviceMode) + return (ProcXSetDeviceMode(client)); + else if (stuff->data == X_SelectExtensionEvent) + return (ProcXSelectExtensionEvent(client)); + else if (stuff->data == X_GetSelectedExtensionEvents) + return (ProcXGetSelectedExtensionEvents(client)); + else if (stuff->data == X_ChangeDeviceDontPropagateList) + return (ProcXChangeDeviceDontPropagateList(client)); + else if (stuff->data == X_GetDeviceDontPropagateList) + return (ProcXGetDeviceDontPropagateList(client)); + else if (stuff->data == X_GetDeviceMotionEvents) + return (ProcXGetDeviceMotionEvents(client)); + else if (stuff->data == X_ChangeKeyboardDevice) + return (ProcXChangeKeyboardDevice(client)); + else if (stuff->data == X_ChangePointerDevice) + return (ProcXChangePointerDevice(client)); + else if (stuff->data == X_GrabDevice) + return (ProcXGrabDevice(client)); + else if (stuff->data == X_UngrabDevice) + return (ProcXUngrabDevice(client)); + else if (stuff->data == X_GrabDeviceKey) + return (ProcXGrabDeviceKey(client)); + else if (stuff->data == X_UngrabDeviceKey) + return (ProcXUngrabDeviceKey(client)); + else if (stuff->data == X_GrabDeviceButton) + return (ProcXGrabDeviceButton(client)); + else if (stuff->data == X_UngrabDeviceButton) + return (ProcXUngrabDeviceButton(client)); + else if (stuff->data == X_AllowDeviceEvents) + return (ProcXAllowDeviceEvents(client)); + else if (stuff->data == X_GetDeviceFocus) + return (ProcXGetDeviceFocus(client)); + else if (stuff->data == X_SetDeviceFocus) + return (ProcXSetDeviceFocus(client)); + else if (stuff->data == X_GetFeedbackControl) + return (ProcXGetFeedbackControl(client)); + else if (stuff->data == X_ChangeFeedbackControl) + return (ProcXChangeFeedbackControl(client)); + else if (stuff->data == X_GetDeviceKeyMapping) + return (ProcXGetDeviceKeyMapping(client)); + else if (stuff->data == X_ChangeDeviceKeyMapping) + return (ProcXChangeDeviceKeyMapping(client)); + else if (stuff->data == X_GetDeviceModifierMapping) + return (ProcXGetDeviceModifierMapping(client)); + else if (stuff->data == X_SetDeviceModifierMapping) + return (ProcXSetDeviceModifierMapping(client)); + else if (stuff->data == X_GetDeviceButtonMapping) + return (ProcXGetDeviceButtonMapping(client)); + else if (stuff->data == X_SetDeviceButtonMapping) + return (ProcXSetDeviceButtonMapping(client)); + else if (stuff->data == X_QueryDeviceState) + return (ProcXQueryDeviceState(client)); + else if (stuff->data == X_SendExtensionEvent) + return (ProcXSendExtensionEvent(client)); + else if (stuff->data == X_DeviceBell) + return (ProcXDeviceBell(client)); + else if (stuff->data == X_SetDeviceValuators) + return (ProcXSetDeviceValuators(client)); + else if (stuff->data == X_GetDeviceControl) + return (ProcXGetDeviceControl(client)); + else if (stuff->data == X_ChangeDeviceControl) + return (ProcXChangeDeviceControl(client)); + else { + SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); + } + return (BadRequest); +} + +/******************************************************************************* + * + * SProcXDispatch + * + * Main swapped dispatch routine for requests to this extension. + * This routine is used if server and client do not have the same byte ordering. + * + */ + +static int +SProcIDispatch(ClientPtr client) +{ + REQUEST(xReq); + if (stuff->data == X_GetExtensionVersion) + return (SProcXGetExtensionVersion(client)); + if (stuff->data == X_ListInputDevices) + return (SProcXListInputDevices(client)); + else if (stuff->data == X_OpenDevice) + return (SProcXOpenDevice(client)); + else if (stuff->data == X_CloseDevice) + return (SProcXCloseDevice(client)); + else if (stuff->data == X_SetDeviceMode) + return (SProcXSetDeviceMode(client)); + else if (stuff->data == X_SelectExtensionEvent) + return (SProcXSelectExtensionEvent(client)); + else if (stuff->data == X_GetSelectedExtensionEvents) + return (SProcXGetSelectedExtensionEvents(client)); + else if (stuff->data == X_ChangeDeviceDontPropagateList) + return (SProcXChangeDeviceDontPropagateList(client)); + else if (stuff->data == X_GetDeviceDontPropagateList) + return (SProcXGetDeviceDontPropagateList(client)); + else if (stuff->data == X_GetDeviceMotionEvents) + return (SProcXGetDeviceMotionEvents(client)); + else if (stuff->data == X_ChangeKeyboardDevice) + return (SProcXChangeKeyboardDevice(client)); + else if (stuff->data == X_ChangePointerDevice) + return (SProcXChangePointerDevice(client)); + else if (stuff->data == X_GrabDevice) + return (SProcXGrabDevice(client)); + else if (stuff->data == X_UngrabDevice) + return (SProcXUngrabDevice(client)); + else if (stuff->data == X_GrabDeviceKey) + return (SProcXGrabDeviceKey(client)); + else if (stuff->data == X_UngrabDeviceKey) + return (SProcXUngrabDeviceKey(client)); + else if (stuff->data == X_GrabDeviceButton) + return (SProcXGrabDeviceButton(client)); + else if (stuff->data == X_UngrabDeviceButton) + return (SProcXUngrabDeviceButton(client)); + else if (stuff->data == X_AllowDeviceEvents) + return (SProcXAllowDeviceEvents(client)); + else if (stuff->data == X_GetDeviceFocus) + return (SProcXGetDeviceFocus(client)); + else if (stuff->data == X_SetDeviceFocus) + return (SProcXSetDeviceFocus(client)); + else if (stuff->data == X_GetFeedbackControl) + return (SProcXGetFeedbackControl(client)); + else if (stuff->data == X_ChangeFeedbackControl) + return (SProcXChangeFeedbackControl(client)); + else if (stuff->data == X_GetDeviceKeyMapping) + return (SProcXGetDeviceKeyMapping(client)); + else if (stuff->data == X_ChangeDeviceKeyMapping) + return (SProcXChangeDeviceKeyMapping(client)); + else if (stuff->data == X_GetDeviceModifierMapping) + return (SProcXGetDeviceModifierMapping(client)); + else if (stuff->data == X_SetDeviceModifierMapping) + return (SProcXSetDeviceModifierMapping(client)); + else if (stuff->data == X_GetDeviceButtonMapping) + return (SProcXGetDeviceButtonMapping(client)); + else if (stuff->data == X_SetDeviceButtonMapping) + return (SProcXSetDeviceButtonMapping(client)); + else if (stuff->data == X_QueryDeviceState) + return (SProcXQueryDeviceState(client)); + else if (stuff->data == X_SendExtensionEvent) + return (SProcXSendExtensionEvent(client)); + else if (stuff->data == X_DeviceBell) + return (SProcXDeviceBell(client)); + else if (stuff->data == X_SetDeviceValuators) + return (SProcXSetDeviceValuators(client)); + else if (stuff->data == X_GetDeviceControl) + return (SProcXGetDeviceControl(client)); + else if (stuff->data == X_ChangeDeviceControl) + return (SProcXChangeDeviceControl(client)); + else { + SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); + } + return (BadRequest); +} + +/********************************************************************** + * + * SReplyIDispatch + * Swap any replies defined in this extension. + * + */ + +/* FIXME: this would be more concise and readable in ANSI C */ +#define DISPATCH(code) \ + if (rep->RepType == X_##code) \ + SRepX##code (client, len, (x##code##Reply *) rep) + +static void +SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) + /* All we look at is the type field */ +{ /* This is common to all replies */ + if (rep->RepType == X_GetExtensionVersion) + SRepXGetExtensionVersion(client, len, + (xGetExtensionVersionReply *) rep); + else if (rep->RepType == X_ListInputDevices) + SRepXListInputDevices(client, len, (xListInputDevicesReply *) rep); + else if (rep->RepType == X_OpenDevice) + SRepXOpenDevice(client, len, (xOpenDeviceReply *) rep); + else if (rep->RepType == X_SetDeviceMode) + SRepXSetDeviceMode(client, len, (xSetDeviceModeReply *) rep); + else if (rep->RepType == X_GetSelectedExtensionEvents) + SRepXGetSelectedExtensionEvents(client, len, + (xGetSelectedExtensionEventsReply *) + rep); + else if (rep->RepType == X_GetDeviceDontPropagateList) + SRepXGetDeviceDontPropagateList(client, len, + (xGetDeviceDontPropagateListReply *) + rep); + else if (rep->RepType == X_GetDeviceMotionEvents) + SRepXGetDeviceMotionEvents(client, len, + (xGetDeviceMotionEventsReply *) rep); + else if (rep->RepType == X_GrabDevice) + SRepXGrabDevice(client, len, (xGrabDeviceReply *) rep); + else if (rep->RepType == X_GetDeviceFocus) + SRepXGetDeviceFocus(client, len, (xGetDeviceFocusReply *) rep); + else if (rep->RepType == X_GetFeedbackControl) + SRepXGetFeedbackControl(client, len, (xGetFeedbackControlReply *) rep); + else if (rep->RepType == X_GetDeviceKeyMapping) + SRepXGetDeviceKeyMapping(client, len, + (xGetDeviceKeyMappingReply *) rep); + else if (rep->RepType == X_GetDeviceModifierMapping) + SRepXGetDeviceModifierMapping(client, len, + (xGetDeviceModifierMappingReply *) rep); + else if (rep->RepType == X_SetDeviceModifierMapping) + SRepXSetDeviceModifierMapping(client, len, + (xSetDeviceModifierMappingReply *) rep); + else if (rep->RepType == X_GetDeviceButtonMapping) + SRepXGetDeviceButtonMapping(client, len, + (xGetDeviceButtonMappingReply *) rep); + else if (rep->RepType == X_SetDeviceButtonMapping) + SRepXSetDeviceButtonMapping(client, len, + (xSetDeviceButtonMappingReply *) rep); + else if (rep->RepType == X_QueryDeviceState) + SRepXQueryDeviceState(client, len, (xQueryDeviceStateReply *) rep); + else if (rep->RepType == X_SetDeviceValuators) + SRepXSetDeviceValuators(client, len, (xSetDeviceValuatorsReply *) rep); + else if (rep->RepType == X_GetDeviceControl) + SRepXGetDeviceControl(client, len, (xGetDeviceControlReply *) rep); + else if (rep->RepType == X_ChangeDeviceControl) + SRepXChangeDeviceControl(client, len, + (xChangeDeviceControlReply *) rep); + else { + FatalError("XINPUT confused sending swapped reply"); + } +} + +/************************************************************************ + * + * This function swaps the DeviceValuator event. + * + */ + +static void +SEventDeviceValuator(deviceValuator * from, deviceValuator * to) +{ + char n; + int i; + INT32 *ip B32; + + *to = *from; + swaps(&to->sequenceNumber, n); + swaps(&to->device_state, n); + ip = &to->valuator0; + for (i = 0; i < 6; i++) { + swapl((ip + i), n); /* macro - braces are required */ + } +} + +static void +SEventFocus(deviceFocus * from, deviceFocus * to) +{ + char n; + + *to = *from; + swaps(&to->sequenceNumber, n); + swapl(&to->time, n); + swapl(&to->window, n); +} + +static void +SDeviceStateNotifyEvent(deviceStateNotify * from, deviceStateNotify * to) +{ + int i; + char n; + INT32 *ip B32; + + *to = *from; + swaps(&to->sequenceNumber, n); + swapl(&to->time, n); + ip = &to->valuator0; + for (i = 0; i < 3; i++) { + swapl((ip + i), n); /* macro - braces are required */ + } +} + +static void +SDeviceKeyStateNotifyEvent(deviceKeyStateNotify * from, + deviceKeyStateNotify * to) +{ + char n; + + *to = *from; + swaps(&to->sequenceNumber, n); +} + +static void +SDeviceButtonStateNotifyEvent(deviceButtonStateNotify * from, + deviceButtonStateNotify * to) +{ + char n; + + *to = *from; + swaps(&to->sequenceNumber, n); +} + +static void +SChangeDeviceNotifyEvent(changeDeviceNotify * from, changeDeviceNotify * to) +{ + char n; + + *to = *from; + swaps(&to->sequenceNumber, n); + swapl(&to->time, n); +} + +static void +SDeviceMappingNotifyEvent(deviceMappingNotify * from, deviceMappingNotify * to) +{ + char n; + + *to = *from; + swaps(&to->sequenceNumber, n); + swapl(&to->time, n); +} + +static void +SDevicePresenceNotifyEvent (devicePresenceNotify *from, devicePresenceNotify *to) +{ + char n; + + *to = *from; + swaps(&to->sequenceNumber,n); + swapl(&to->time, n); + swaps(&to->control, n); +} + +/************************************************************************** + * + * Allow the specified event to have its propagation suppressed. + * The default is to not allow suppression of propagation. + * + */ + +static void +AllowPropagateSuppress(Mask mask) +{ + int i; + + for (i = 0; i < MAX_DEVICES; i++) + PropagateMask[i] |= mask; +} + +/************************************************************************** + * + * Return the next available extension event mask. + * + */ + +static Mask +GetNextExtEventMask(void) +{ + int i; + Mask mask = lastExtEventMask; + + if (lastExtEventMask == 0) { + FatalError("GetNextExtEventMask: no more events are available."); + } + lastExtEventMask <<= 1; + + for (i = 0; i < MAX_DEVICES; i++) + ExtValidMasks[i] |= mask; + return mask; +} + +/************************************************************************** + * + * Record an event mask where there is no unique corresponding event type. + * We can't call SetMaskForEvent, since that would clobber the existing + * mask for that event. MotionHint and ButtonMotion are examples. + * + * Since extension event types will never be less than 64, we can use + * 0-63 in the EventInfo array as the "type" to be used to look up this + * mask. This means that the corresponding macros such as + * DevicePointerMotionHint must have access to the same constants. + * + */ + +static void +SetEventInfo(Mask mask, int constant) +{ + EventInfo[ExtEventIndex].mask = mask; + EventInfo[ExtEventIndex++].type = constant; +} + +/************************************************************************** + * + * Allow the specified event to be restricted to being selected by one + * client at a time. + * The default is to allow more than one client to select the event. + * + */ + +static void +SetExclusiveAccess(Mask mask) +{ + int i; + + for (i = 0; i < MAX_DEVICES; i++) + ExtExclusiveMasks[i] |= mask; +} + +/************************************************************************** + * + * Assign the specified mask to the specified event. + * + */ + +static void +SetMaskForExtEvent(Mask mask, int event) +{ + + EventInfo[ExtEventIndex].mask = mask; + EventInfo[ExtEventIndex++].type = event; + + if ((event < LASTEvent) || (event >= 128)) + FatalError("MaskForExtensionEvent: bogus event number"); + SetMaskForEvent(mask, event); +} + +/************************************************************************ + * + * This function sets up extension event types and masks. + * + */ + +static void +FixExtensionEvents(ExtensionEntry * extEntry) +{ + Mask mask; + + DeviceValuator = extEntry->eventBase; + DeviceKeyPress = DeviceValuator + 1; + DeviceKeyRelease = DeviceKeyPress + 1; + DeviceButtonPress = DeviceKeyRelease + 1; + DeviceButtonRelease = DeviceButtonPress + 1; + DeviceMotionNotify = DeviceButtonRelease + 1; + DeviceFocusIn = DeviceMotionNotify + 1; + DeviceFocusOut = DeviceFocusIn + 1; + ProximityIn = DeviceFocusOut + 1; + ProximityOut = ProximityIn + 1; + DeviceStateNotify = ProximityOut + 1; + DeviceMappingNotify = DeviceStateNotify + 1; + ChangeDeviceNotify = DeviceMappingNotify + 1; + DeviceKeyStateNotify = ChangeDeviceNotify + 1; + DeviceButtonStateNotify = DeviceKeyStateNotify + 1; + DevicePresenceNotify = DeviceButtonStateNotify + 1; + + event_base[KeyClass] = DeviceKeyPress; + event_base[ButtonClass] = DeviceButtonPress; + event_base[ValuatorClass] = DeviceMotionNotify; + event_base[ProximityClass] = ProximityIn; + event_base[FocusClass] = DeviceFocusIn; + event_base[OtherClass] = DeviceStateNotify; + + BadDevice += extEntry->errorBase; + BadEvent += extEntry->errorBase; + BadMode += extEntry->errorBase; + DeviceBusy += extEntry->errorBase; + BadClass += extEntry->errorBase; + + mask = GetNextExtEventMask(); + SetMaskForExtEvent(mask, DeviceKeyPress); + AllowPropagateSuppress(mask); + + mask = GetNextExtEventMask(); + SetMaskForExtEvent(mask, DeviceKeyRelease); + AllowPropagateSuppress(mask); + + mask = GetNextExtEventMask(); + SetMaskForExtEvent(mask, DeviceButtonPress); + AllowPropagateSuppress(mask); + + mask = GetNextExtEventMask(); + SetMaskForExtEvent(mask, DeviceButtonRelease); + AllowPropagateSuppress(mask); + + mask = GetNextExtEventMask(); + SetMaskForExtEvent(mask, ProximityIn); + SetMaskForExtEvent(mask, ProximityOut); + AllowPropagateSuppress(mask); + + mask = GetNextExtEventMask(); + DeviceStateNotifyMask = mask; + SetMaskForExtEvent(mask, DeviceStateNotify); + + mask = GetNextExtEventMask(); + DevicePointerMotionMask = mask; + SetMaskForExtEvent(mask, DeviceMotionNotify); + AllowPropagateSuppress(mask); + + DevicePointerMotionHintMask = GetNextExtEventMask(); + SetEventInfo(DevicePointerMotionHintMask, _devicePointerMotionHint); + SetEventInfo(GetNextExtEventMask(), _deviceButton1Motion); + SetEventInfo(GetNextExtEventMask(), _deviceButton2Motion); + SetEventInfo(GetNextExtEventMask(), _deviceButton3Motion); + SetEventInfo(GetNextExtEventMask(), _deviceButton4Motion); + SetEventInfo(GetNextExtEventMask(), _deviceButton5Motion); + DeviceButtonMotionMask = GetNextExtEventMask(); + SetEventInfo(DeviceButtonMotionMask, _deviceButtonMotion); + + DeviceFocusChangeMask = GetNextExtEventMask(); + SetMaskForExtEvent(DeviceFocusChangeMask, DeviceFocusIn); + SetMaskForExtEvent(DeviceFocusChangeMask, DeviceFocusOut); + + mask = GetNextExtEventMask(); + SetMaskForExtEvent(mask, DeviceMappingNotify); + DeviceMappingNotifyMask = mask; + + mask = GetNextExtEventMask(); + SetMaskForExtEvent(mask, ChangeDeviceNotify); + ChangeDeviceNotifyMask = mask; + + DeviceButtonGrabMask = GetNextExtEventMask(); + SetEventInfo(DeviceButtonGrabMask, _deviceButtonGrab); + SetExclusiveAccess(DeviceButtonGrabMask); + + DeviceOwnerGrabButtonMask = GetNextExtEventMask(); + SetEventInfo(DeviceOwnerGrabButtonMask, _deviceOwnerGrabButton); + + DevicePresenceNotifyMask = GetNextExtEventMask(); + SetEventInfo(DevicePresenceNotifyMask, _devicePresence); + SetEventInfo(0, _noExtensionEvent); +} + +/************************************************************************ + * + * This function restores extension event types and masks to their + * initial state. + * + */ + +static void +RestoreExtensionEvents(void) +{ + int i; + + IReqCode = 0; + + for (i = 0; i < ExtEventIndex - 1; i++) { + if ((EventInfo[i].type >= LASTEvent) && (EventInfo[i].type < 128)) + SetMaskForEvent(0, EventInfo[i].type); + EventInfo[i].mask = 0; + EventInfo[i].type = 0; + } + ExtEventIndex = 0; + lastExtEventMask = 1; + DeviceValuator = 0; + DeviceKeyPress = 1; + DeviceKeyRelease = 2; + DeviceButtonPress = 3; + DeviceButtonRelease = 4; + DeviceMotionNotify = 5; + DeviceFocusIn = 6; + DeviceFocusOut = 7; + ProximityIn = 8; + ProximityOut = 9; + DeviceStateNotify = 10; + DeviceMappingNotify = 11; + ChangeDeviceNotify = 12; + DeviceKeyStateNotify = 13; + DeviceButtonStateNotify = 13; + DevicePresenceNotify = 14; + + BadDevice = 0; + BadEvent = 1; + BadMode = 2; + DeviceBusy = 3; + BadClass = 4; + +} + +/*********************************************************************** + * + * IResetProc. + * Remove reply-swapping routine. + * Remove event-swapping routine. + * + */ + +static void +IResetProc(ExtensionEntry * unused) +{ + + ReplySwapVector[IReqCode] = ReplyNotSwappd; + EventSwapVector[DeviceValuator] = NotImplemented; + EventSwapVector[DeviceKeyPress] = NotImplemented; + EventSwapVector[DeviceKeyRelease] = NotImplemented; + EventSwapVector[DeviceButtonPress] = NotImplemented; + EventSwapVector[DeviceButtonRelease] = NotImplemented; + EventSwapVector[DeviceMotionNotify] = NotImplemented; + EventSwapVector[DeviceFocusIn] = NotImplemented; + EventSwapVector[DeviceFocusOut] = NotImplemented; + EventSwapVector[ProximityIn] = NotImplemented; + EventSwapVector[ProximityOut] = NotImplemented; + EventSwapVector[DeviceStateNotify] = NotImplemented; + EventSwapVector[DeviceKeyStateNotify] = NotImplemented; + EventSwapVector[DeviceButtonStateNotify] = NotImplemented; + EventSwapVector[DeviceMappingNotify] = NotImplemented; + EventSwapVector[ChangeDeviceNotify] = NotImplemented; + EventSwapVector[DevicePresenceNotify] = NotImplemented; + RestoreExtensionEvents(); +} + +/*********************************************************************** + * + * Assign an id and type to an input device. + * + */ + +_X_EXPORT void +AssignTypeAndName(DeviceIntPtr dev, Atom type, char *name) +{ + dev->type = type; + dev->name = (char *)xalloc(strlen(name) + 1); + strcpy(dev->name, name); +} + +/*********************************************************************** + * + * Make device type atoms. + * + */ + +static void +MakeDeviceTypeAtoms(void) +{ + int i; + + for (i = 0; i < NUMTYPES; i++) + dev_type[i].type = + MakeAtom(dev_type[i].name, strlen(dev_type[i].name), 1); +} + +/************************************************************************** + * Return a DeviceIntPtr corresponding to a specified device id. + * + */ + +DeviceIntPtr +LookupDeviceIntRec(CARD8 id) +{ + DeviceIntPtr dev; + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (dev->id == id) + return dev; + } + + for (dev = inputInfo.off_devices; dev; dev = dev->next) { + if (dev->id == id) + return dev; + } + + return NULL; +} + +/***************************************************************************** + * + * SEventIDispatch + * + * Swap any events defined in this extension. + */ +#define DO_SWAP(func,type) func ((type *)from, (type *)to) + +static void +SEventIDispatch(xEvent * from, xEvent * to) +{ + int type = from->u.u.type & 0177; + + if (type == DeviceValuator) + DO_SWAP(SEventDeviceValuator, deviceValuator); + else if (type == DeviceKeyPress) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } else if (type == DeviceKeyRelease) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } else if (type == DeviceButtonPress) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } else if (type == DeviceButtonRelease) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } else if (type == DeviceMotionNotify) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } else if (type == DeviceFocusIn) + DO_SWAP(SEventFocus, deviceFocus); + else if (type == DeviceFocusOut) + DO_SWAP(SEventFocus, deviceFocus); + else if (type == ProximityIn) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } else if (type == ProximityOut) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } else if (type == DeviceStateNotify) + DO_SWAP(SDeviceStateNotifyEvent, deviceStateNotify); + else if (type == DeviceKeyStateNotify) + DO_SWAP(SDeviceKeyStateNotifyEvent, deviceKeyStateNotify); + else if (type == DeviceButtonStateNotify) + DO_SWAP(SDeviceButtonStateNotifyEvent, deviceButtonStateNotify); + else if (type == DeviceMappingNotify) + DO_SWAP(SDeviceMappingNotifyEvent, deviceMappingNotify); + else if (type == ChangeDeviceNotify) + DO_SWAP(SChangeDeviceNotifyEvent, changeDeviceNotify); + else { + FatalError("XInputExtension: Impossible event!\n"); + } +} + +/********************************************************************** + * + * IExtensionInit - initialize the input extension. + * + * Called from InitExtensions in main() or from QueryExtension() if the + * extension is dynamically loaded. + * + * This extension has several events and errors. + * + */ + +void +XInputExtensionInit(void) +{ + ExtensionEntry *extEntry; + + extEntry = AddExtension(INAME, IEVENTS, IERRORS, ProcIDispatch, + SProcIDispatch, IResetProc, StandardMinorOpcode); + if (extEntry) { + IReqCode = extEntry->base; + AllExtensionVersions[IReqCode - 128] = thisversion; + MakeDeviceTypeAtoms(); + RT_INPUTCLIENT = CreateNewResourceType((DeleteType) InputClientGone); + FixExtensionEvents(extEntry); + ReplySwapVector[IReqCode] = (ReplySwapPtr) SReplyIDispatch; + EventSwapVector[DeviceValuator] = SEventIDispatch; + EventSwapVector[DeviceKeyPress] = SEventIDispatch; + EventSwapVector[DeviceKeyRelease] = SEventIDispatch; + EventSwapVector[DeviceButtonPress] = SEventIDispatch; + EventSwapVector[DeviceButtonRelease] = SEventIDispatch; + EventSwapVector[DeviceMotionNotify] = SEventIDispatch; + EventSwapVector[DeviceFocusIn] = SEventIDispatch; + EventSwapVector[DeviceFocusOut] = SEventIDispatch; + EventSwapVector[ProximityIn] = SEventIDispatch; + EventSwapVector[ProximityOut] = SEventIDispatch; + EventSwapVector[DeviceStateNotify] = SEventIDispatch; + EventSwapVector[DeviceKeyStateNotify] = SEventIDispatch; + EventSwapVector[DeviceButtonStateNotify] = SEventIDispatch; + EventSwapVector[DeviceMappingNotify] = SEventIDispatch; + EventSwapVector[ChangeDeviceNotify] = SEventIDispatch; + } else { + FatalError("IExtensionInit: AddExtensions failed\n"); + } +} diff --git a/xorg-server-1.4/Xi/getbmap.c b/xorg-server-1.4/Xi/getbmap.c new file mode 100644 index 0000000..5e8cf07 --- /dev/null +++ b/xorg-server-1.4/Xi/getbmap.c @@ -0,0 +1,144 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to return the version of the extension. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "getbmap.h" + +/*********************************************************************** + * + * This procedure gets the button mapping for the specified device. + * + */ + +int +SProcXGetDeviceButtonMapping(ClientPtr client) +{ + char n; + + REQUEST(xGetDeviceButtonMappingReq); + swaps(&stuff->length, n); + return (ProcXGetDeviceButtonMapping(client)); +} + +/*********************************************************************** + * + * This procedure gets the button mapping for the specified device. + * + */ + +int +ProcXGetDeviceButtonMapping(ClientPtr client) +{ + DeviceIntPtr dev; + xGetDeviceButtonMappingReply rep; + ButtonClassPtr b; + + REQUEST(xGetDeviceButtonMappingReq); + REQUEST_SIZE_MATCH(xGetDeviceButtonMappingReq); + + rep.repType = X_Reply; + rep.RepType = X_GetDeviceButtonMapping; + rep.nElts = 0; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_GetDeviceButtonMapping, 0, + BadDevice); + return Success; + } + + b = dev->button; + if (b == NULL) { + SendErrorToClient(client, IReqCode, X_GetDeviceButtonMapping, 0, + BadMatch); + return Success; + } + rep.nElts = b->numButtons; + rep.length = (rep.nElts + (4 - 1)) / 4; + WriteReplyToClient(client, sizeof(xGetDeviceButtonMappingReply), &rep); + (void)WriteToClient(client, rep.nElts, (char *)&b->map[1]); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetDeviceButtonMapping function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetDeviceButtonMapping(ClientPtr client, int size, + xGetDeviceButtonMappingReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/getbmap.h b/xorg-server-1.4/Xi/getbmap.h new file mode 100644 index 0000000..d95b3c6 --- /dev/null +++ b/xorg-server-1.4/Xi/getbmap.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef GETBMAP_H +#define GETBMAP_H 1 + +int SProcXGetDeviceButtonMapping(ClientPtr /* client */ + ); + +int ProcXGetDeviceButtonMapping(ClientPtr /* client */ + ); + +void SRepXGetDeviceButtonMapping(ClientPtr /* client */ , + int /* size */ , + xGetDeviceButtonMappingReply * /* rep */ + ); + +#endif /* GETBMAP_H */ diff --git a/xorg-server-1.4/Xi/getdctl.c b/xorg-server-1.4/Xi/getdctl.c new file mode 100644 index 0000000..88f061e --- /dev/null +++ b/xorg-server-1.4/Xi/getdctl.c @@ -0,0 +1,334 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/******************************************************************** + * + * Get Device control attributes for an extension device. + * + */ + +#define NEED_EVENTS /* for inputstr.h */ +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "getdctl.h" + +/*********************************************************************** + * + * This procedure gets the control attributes for an extension device, + * for clients on machines with a different byte ordering than the server. + * + */ + +int +SProcXGetDeviceControl(ClientPtr client) +{ + char n; + + REQUEST(xGetDeviceControlReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xGetDeviceControlReq); + swaps(&stuff->control, n); + return (ProcXGetDeviceControl(client)); +} + +/*********************************************************************** + * + * This procedure copies DeviceResolution data, swapping if necessary. + * + */ + +static void +CopySwapDeviceResolution(ClientPtr client, ValuatorClassPtr v, char *buf, + int length) +{ + char n; + AxisInfoPtr a; + xDeviceResolutionState *r; + int i, *iptr; + + r = (xDeviceResolutionState *) buf; + r->control = DEVICE_RESOLUTION; + r->length = length; + r->num_valuators = v->numAxes; + buf += sizeof(xDeviceResolutionState); + iptr = (int *)buf; + for (i = 0, a = v->axes; i < v->numAxes; i++, a++) + *iptr++ = a->resolution; + for (i = 0, a = v->axes; i < v->numAxes; i++, a++) + *iptr++ = a->min_resolution; + for (i = 0, a = v->axes; i < v->numAxes; i++, a++) + *iptr++ = a->max_resolution; + if (client->swapped) { + swaps(&r->control, n); + swaps(&r->length, n); + swapl(&r->num_valuators, n); + iptr = (int *)buf; + for (i = 0; i < (3 * v->numAxes); i++, iptr++) { + swapl(iptr, n); + } + } +} + +static void CopySwapDeviceAbsCalib (ClientPtr client, AbsoluteClassPtr dts, + char *buf) +{ + char n; + xDeviceAbsCalibState *calib = (xDeviceAbsCalibState *) buf; + + calib->control = DEVICE_ABS_CALIB; + calib->length = sizeof(calib); + calib->min_x = dts->min_x; + calib->max_x = dts->max_x; + calib->min_y = dts->min_y; + calib->max_y = dts->max_y; + calib->flip_x = dts->flip_x; + calib->flip_y = dts->flip_y; + calib->rotation = dts->rotation; + calib->button_threshold = dts->button_threshold; + + if (client->swapped) { + swaps(&calib->control, n); + swaps(&calib->length, n); + swapl(&calib->min_x, n); + swapl(&calib->max_x, n); + swapl(&calib->min_y, n); + swapl(&calib->max_y, n); + swapl(&calib->flip_x, n); + swapl(&calib->flip_y, n); + swapl(&calib->rotation, n); + swapl(&calib->button_threshold, n); + } +} + +static void CopySwapDeviceAbsArea (ClientPtr client, AbsoluteClassPtr dts, + char *buf) +{ + char n; + xDeviceAbsAreaState *area = (xDeviceAbsAreaState *) buf; + + area->control = DEVICE_ABS_AREA; + area->length = sizeof(area); + area->offset_x = dts->offset_x; + area->offset_y = dts->offset_y; + area->width = dts->width; + area->height = dts->height; + area->screen = dts->screen; + area->following = dts->following; + + if (client->swapped) { + swaps(&area->control, n); + swaps(&area->length, n); + swapl(&area->offset_x, n); + swapl(&area->offset_y, n); + swapl(&area->width, n); + swapl(&area->height, n); + swapl(&area->screen, n); + swapl(&area->following, n); + } +} + +static void CopySwapDeviceCore (ClientPtr client, DeviceIntPtr dev, char *buf) +{ + char n; + xDeviceCoreState *c = (xDeviceCoreState *) buf; + + c->control = DEVICE_CORE; + c->length = sizeof(c); + c->status = dev->coreEvents; + c->iscore = (dev == inputInfo.keyboard || dev == inputInfo.pointer); + + if (client->swapped) { + swaps(&c->control, n); + swaps(&c->length, n); + swaps(&c->status, n); + } +} + +static void CopySwapDeviceEnable (ClientPtr client, DeviceIntPtr dev, char *buf) +{ + char n; + xDeviceEnableState *e = (xDeviceEnableState *) buf; + + e->control = DEVICE_ENABLE; + e->length = sizeof(e); + e->enable = dev->enabled; + + if (client->swapped) { + swaps(&e->control, n); + swaps(&e->length, n); + swaps(&e->enable, n); + } +} + +/*********************************************************************** + * + * This procedure writes the reply for the xGetDeviceControl function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetDeviceControl(ClientPtr client, int size, xGetDeviceControlReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} + +/*********************************************************************** + * + * Get the state of the specified device control. + * + */ + +int +ProcXGetDeviceControl(ClientPtr client) +{ + int total_length = 0; + char *buf, *savbuf; + DeviceIntPtr dev; + xGetDeviceControlReply rep; + + REQUEST(xGetDeviceControlReq); + REQUEST_SIZE_MATCH(xGetDeviceControlReq); + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, BadDevice); + return Success; + } + + rep.repType = X_Reply; + rep.RepType = X_GetDeviceControl; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + switch (stuff->control) { + case DEVICE_RESOLUTION: + if (!dev->valuator) { + SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, + BadMatch); + return Success; + } + total_length = sizeof(xDeviceResolutionState) + + (3 * sizeof(int) * dev->valuator->numAxes); + break; + case DEVICE_ABS_CALIB: + if (!dev->absolute) { + SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, + BadMatch); + return Success; + } + + total_length = sizeof(xDeviceAbsCalibCtl); + break; + case DEVICE_ABS_AREA: + if (!dev->absolute) { + SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, + BadMatch); + return Success; + } + + total_length = sizeof(xDeviceAbsAreaCtl); + break; + case DEVICE_CORE: + total_length = sizeof(xDeviceCoreCtl); + break; + case DEVICE_ENABLE: + total_length = sizeof(xDeviceEnableCtl); + break; + default: + SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, BadValue); + return Success; + } + + buf = (char *)xalloc(total_length); + if (!buf) { + SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, BadAlloc); + return Success; + } + savbuf = buf; + + switch (stuff->control) { + case DEVICE_RESOLUTION: + CopySwapDeviceResolution(client, dev->valuator, buf, total_length); + break; + case DEVICE_ABS_CALIB: + CopySwapDeviceAbsCalib(client, dev->absolute, buf); + break; + case DEVICE_ABS_AREA: + CopySwapDeviceAbsArea(client, dev->absolute, buf); + break; + case DEVICE_CORE: + CopySwapDeviceCore(client, dev, buf); + break; + case DEVICE_ENABLE: + CopySwapDeviceEnable(client, dev, buf); + break; + default: + break; + } + + rep.length = (total_length + 3) >> 2; + WriteReplyToClient(client, sizeof(xGetDeviceControlReply), &rep); + WriteToClient(client, total_length, savbuf); + xfree(savbuf); + return Success; +} diff --git a/xorg-server-1.4/Xi/getdctl.h b/xorg-server-1.4/Xi/getdctl.h new file mode 100644 index 0000000..19c189f --- /dev/null +++ b/xorg-server-1.4/Xi/getdctl.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef GETDCTL_H +#define GETDCTL_H 1 + +int SProcXGetDeviceControl(ClientPtr /* client */ + ); + +int ProcXGetDeviceControl(ClientPtr /* client */ + ); + +void SRepXGetDeviceControl(ClientPtr /* client */ , + int /* size */ , + xGetDeviceControlReply * /* rep */ + ); + +#endif /* GETDCTL_H */ diff --git a/xorg-server-1.4/Xi/getfctl.c b/xorg-server-1.4/Xi/getfctl.c new file mode 100644 index 0000000..5ca90db --- /dev/null +++ b/xorg-server-1.4/Xi/getfctl.c @@ -0,0 +1,378 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/******************************************************************** + * + * Get feedback control attributes for an extension device. + * + */ + +#define NEED_EVENTS /* for inputstr.h */ +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "getfctl.h" + +/*********************************************************************** + * + * This procedure gets the control attributes for an extension device, + * for clients on machines with a different byte ordering than the server. + * + */ + +int +SProcXGetFeedbackControl(ClientPtr client) +{ + char n; + + REQUEST(xGetFeedbackControlReq); + swaps(&stuff->length, n); + return (ProcXGetFeedbackControl(client)); +} + +/*********************************************************************** + * + * This procedure copies KbdFeedbackClass data, swapping if necessary. + * + */ + +static void +CopySwapKbdFeedback(ClientPtr client, KbdFeedbackPtr k, char **buf) +{ + int i; + char n; + xKbdFeedbackState *k2; + + k2 = (xKbdFeedbackState *) * buf; + k2->class = KbdFeedbackClass; + k2->length = sizeof(xKbdFeedbackState); + k2->id = k->ctrl.id; + k2->click = k->ctrl.click; + k2->percent = k->ctrl.bell; + k2->pitch = k->ctrl.bell_pitch; + k2->duration = k->ctrl.bell_duration; + k2->led_mask = k->ctrl.leds; + k2->global_auto_repeat = k->ctrl.autoRepeat; + for (i = 0; i < 32; i++) + k2->auto_repeats[i] = k->ctrl.autoRepeats[i]; + if (client->swapped) { + swaps(&k2->length, n); + swaps(&k2->pitch, n); + swaps(&k2->duration, n); + swapl(&k2->led_mask, n); + swapl(&k2->led_values, n); + } + *buf += sizeof(xKbdFeedbackState); +} + +/*********************************************************************** + * + * This procedure copies PtrFeedbackClass data, swapping if necessary. + * + */ + +static void +CopySwapPtrFeedback(ClientPtr client, PtrFeedbackPtr p, char **buf) +{ + char n; + xPtrFeedbackState *p2; + + p2 = (xPtrFeedbackState *) * buf; + p2->class = PtrFeedbackClass; + p2->length = sizeof(xPtrFeedbackState); + p2->id = p->ctrl.id; + p2->accelNum = p->ctrl.num; + p2->accelDenom = p->ctrl.den; + p2->threshold = p->ctrl.threshold; + if (client->swapped) { + swaps(&p2->length, n); + swaps(&p2->accelNum, n); + swaps(&p2->accelDenom, n); + swaps(&p2->threshold, n); + } + *buf += sizeof(xPtrFeedbackState); +} + +/*********************************************************************** + * + * This procedure copies IntegerFeedbackClass data, swapping if necessary. + * + */ + +static void +CopySwapIntegerFeedback(ClientPtr client, IntegerFeedbackPtr i, char **buf) +{ + char n; + xIntegerFeedbackState *i2; + + i2 = (xIntegerFeedbackState *) * buf; + i2->class = IntegerFeedbackClass; + i2->length = sizeof(xIntegerFeedbackState); + i2->id = i->ctrl.id; + i2->resolution = i->ctrl.resolution; + i2->min_value = i->ctrl.min_value; + i2->max_value = i->ctrl.max_value; + if (client->swapped) { + swaps(&i2->length, n); + swapl(&i2->resolution, n); + swapl(&i2->min_value, n); + swapl(&i2->max_value, n); + } + *buf += sizeof(xIntegerFeedbackState); +} + +/*********************************************************************** + * + * This procedure copies StringFeedbackClass data, swapping if necessary. + * + */ + +static void +CopySwapStringFeedback(ClientPtr client, StringFeedbackPtr s, char **buf) +{ + int i; + char n; + xStringFeedbackState *s2; + KeySym *kptr; + + s2 = (xStringFeedbackState *) * buf; + s2->class = StringFeedbackClass; + s2->length = sizeof(xStringFeedbackState) + + s->ctrl.num_symbols_supported * sizeof(KeySym); + s2->id = s->ctrl.id; + s2->max_symbols = s->ctrl.max_symbols; + s2->num_syms_supported = s->ctrl.num_symbols_supported; + *buf += sizeof(xStringFeedbackState); + kptr = (KeySym *) (*buf); + for (i = 0; i < s->ctrl.num_symbols_supported; i++) + *kptr++ = *(s->ctrl.symbols_supported + i); + if (client->swapped) { + swaps(&s2->length, n); + swaps(&s2->max_symbols, n); + swaps(&s2->num_syms_supported, n); + kptr = (KeySym *) (*buf); + for (i = 0; i < s->ctrl.num_symbols_supported; i++, kptr++) { + swapl(kptr, n); + } + } + *buf += (s->ctrl.num_symbols_supported * sizeof(KeySym)); +} + +/*********************************************************************** + * + * This procedure copies LedFeedbackClass data, swapping if necessary. + * + */ + +static void +CopySwapLedFeedback(ClientPtr client, LedFeedbackPtr l, char **buf) +{ + char n; + xLedFeedbackState *l2; + + l2 = (xLedFeedbackState *) * buf; + l2->class = LedFeedbackClass; + l2->length = sizeof(xLedFeedbackState); + l2->id = l->ctrl.id; + l2->led_values = l->ctrl.led_values; + l2->led_mask = l->ctrl.led_mask; + if (client->swapped) { + swaps(&l2->length, n); + swapl(&l2->led_values, n); + swapl(&l2->led_mask, n); + } + *buf += sizeof(xLedFeedbackState); +} + +/*********************************************************************** + * + * This procedure copies BellFeedbackClass data, swapping if necessary. + * + */ + +static void +CopySwapBellFeedback(ClientPtr client, BellFeedbackPtr b, char **buf) +{ + char n; + xBellFeedbackState *b2; + + b2 = (xBellFeedbackState *) * buf; + b2->class = BellFeedbackClass; + b2->length = sizeof(xBellFeedbackState); + b2->id = b->ctrl.id; + b2->percent = b->ctrl.percent; + b2->pitch = b->ctrl.pitch; + b2->duration = b->ctrl.duration; + if (client->swapped) { + swaps(&b2->length, n); + swaps(&b2->pitch, n); + swaps(&b2->duration, n); + } + *buf += sizeof(xBellFeedbackState); +} + +/*********************************************************************** + * + * This procedure writes the reply for the xGetFeedbackControl function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetFeedbackControl(ClientPtr client, int size, + xGetFeedbackControlReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->num_feedbacks, n); + WriteToClient(client, size, (char *)rep); +} + +/*********************************************************************** + * + * Get the feedback control state. + * + */ + +int +ProcXGetFeedbackControl(ClientPtr client) +{ + int total_length = 0; + char *buf, *savbuf; + DeviceIntPtr dev; + KbdFeedbackPtr k; + PtrFeedbackPtr p; + IntegerFeedbackPtr i; + StringFeedbackPtr s; + BellFeedbackPtr b; + LedFeedbackPtr l; + xGetFeedbackControlReply rep; + + REQUEST(xGetFeedbackControlReq); + REQUEST_SIZE_MATCH(xGetFeedbackControlReq); + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_GetFeedbackControl, 0, BadDevice); + return Success; + } + + rep.repType = X_Reply; + rep.RepType = X_GetFeedbackControl; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.num_feedbacks = 0; + + for (k = dev->kbdfeed; k; k = k->next) { + rep.num_feedbacks++; + total_length += sizeof(xKbdFeedbackState); + } + for (p = dev->ptrfeed; p; p = p->next) { + rep.num_feedbacks++; + total_length += sizeof(xPtrFeedbackState); + } + for (s = dev->stringfeed; s; s = s->next) { + rep.num_feedbacks++; + total_length += sizeof(xStringFeedbackState) + + (s->ctrl.num_symbols_supported * sizeof(KeySym)); + } + for (i = dev->intfeed; i; i = i->next) { + rep.num_feedbacks++; + total_length += sizeof(xIntegerFeedbackState); + } + for (l = dev->leds; l; l = l->next) { + rep.num_feedbacks++; + total_length += sizeof(xLedFeedbackState); + } + for (b = dev->bell; b; b = b->next) { + rep.num_feedbacks++; + total_length += sizeof(xBellFeedbackState); + } + + if (total_length == 0) { + SendErrorToClient(client, IReqCode, X_GetFeedbackControl, 0, BadMatch); + return Success; + } + + buf = (char *)xalloc(total_length); + if (!buf) { + SendErrorToClient(client, IReqCode, X_GetFeedbackControl, 0, BadAlloc); + return Success; + } + savbuf = buf; + + for (k = dev->kbdfeed; k; k = k->next) + CopySwapKbdFeedback(client, k, &buf); + for (p = dev->ptrfeed; p; p = p->next) + CopySwapPtrFeedback(client, p, &buf); + for (s = dev->stringfeed; s; s = s->next) + CopySwapStringFeedback(client, s, &buf); + for (i = dev->intfeed; i; i = i->next) + CopySwapIntegerFeedback(client, i, &buf); + for (l = dev->leds; l; l = l->next) + CopySwapLedFeedback(client, l, &buf); + for (b = dev->bell; b; b = b->next) + CopySwapBellFeedback(client, b, &buf); + + rep.length = (total_length + 3) >> 2; + WriteReplyToClient(client, sizeof(xGetFeedbackControlReply), &rep); + WriteToClient(client, total_length, savbuf); + xfree(savbuf); + return Success; +} diff --git a/xorg-server-1.4/Xi/getfctl.h b/xorg-server-1.4/Xi/getfctl.h new file mode 100644 index 0000000..0ad58aa --- /dev/null +++ b/xorg-server-1.4/Xi/getfctl.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef GETFCTL_H +#define GETFCTL_H 1 + +int SProcXGetFeedbackControl(ClientPtr /* client */ + ); + +int ProcXGetFeedbackControl(ClientPtr /* client */ + ); + +void SRepXGetFeedbackControl(ClientPtr /* client */ , + int /* size */ , + xGetFeedbackControlReply * /* rep */ + ); + +#endif /* GETFCTL_H */ diff --git a/xorg-server-1.4/Xi/getfocus.c b/xorg-server-1.4/Xi/getfocus.c new file mode 100644 index 0000000..245b5f1 --- /dev/null +++ b/xorg-server-1.4/Xi/getfocus.c @@ -0,0 +1,148 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to get the focus for an extension device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "windowstr.h" /* focus struct */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "getfocus.h" + +/*********************************************************************** + * + * This procedure gets the focus for a device. + * + */ + +int +SProcXGetDeviceFocus(ClientPtr client) +{ + char n; + + REQUEST(xGetDeviceFocusReq); + swaps(&stuff->length, n); + return (ProcXGetDeviceFocus(client)); +} + +/*********************************************************************** + * + * This procedure gets the focus for a device. + * + */ + +int +ProcXGetDeviceFocus(ClientPtr client) +{ + DeviceIntPtr dev; + FocusClassPtr focus; + xGetDeviceFocusReply rep; + + REQUEST(xGetDeviceFocusReq); + REQUEST_SIZE_MATCH(xGetDeviceFocusReq); + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL || !dev->focus) { + SendErrorToClient(client, IReqCode, X_GetDeviceFocus, 0, BadDevice); + return Success; + } + + rep.repType = X_Reply; + rep.RepType = X_GetDeviceFocus; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + focus = dev->focus; + + if (focus->win == NoneWin) + rep.focus = None; + else if (focus->win == PointerRootWin) + rep.focus = PointerRoot; + else if (focus->win == FollowKeyboardWin) + rep.focus = FollowKeyboard; + else + rep.focus = focus->win->drawable.id; + + rep.time = focus->time.milliseconds; + rep.revertTo = focus->revert; + WriteReplyToClient(client, sizeof(xGetDeviceFocusReply), &rep); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the GetDeviceFocus function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetDeviceFocus(ClientPtr client, int size, xGetDeviceFocusReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swapl(&rep->focus, n); + swapl(&rep->time, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/getfocus.h b/xorg-server-1.4/Xi/getfocus.h new file mode 100644 index 0000000..c3f2d67 --- /dev/null +++ b/xorg-server-1.4/Xi/getfocus.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef GETFOCUS_H +#define GETFOCUS_H 1 + +int SProcXGetDeviceFocus(ClientPtr /* client */ + ); + +int ProcXGetDeviceFocus(ClientPtr /* client */ + ); + +void SRepXGetDeviceFocus(ClientPtr /* client */ , + int /* size */ , + xGetDeviceFocusReply * /* rep */ + ); + +#endif /* GETFOCUS_H */ diff --git a/xorg-server-1.4/Xi/getkmap.c b/xorg-server-1.4/Xi/getkmap.c new file mode 100644 index 0000000..989f3d5 --- /dev/null +++ b/xorg-server-1.4/Xi/getkmap.c @@ -0,0 +1,162 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/******************************************************************** + * + * Get the key mapping for an extension device. + * + */ + +#define NEED_EVENTS /* for inputstr.h */ +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" +#include "swaprep.h" + +#include "getkmap.h" + +/*********************************************************************** + * + * This procedure gets the key mapping for an extension device, + * for clients on machines with a different byte ordering than the server. + * + */ + +int +SProcXGetDeviceKeyMapping(ClientPtr client) +{ + char n; + + REQUEST(xGetDeviceKeyMappingReq); + swaps(&stuff->length, n); + return (ProcXGetDeviceKeyMapping(client)); +} + +/*********************************************************************** + * + * Get the device key mapping. + * + */ + +int +ProcXGetDeviceKeyMapping(ClientPtr client) +{ + xGetDeviceKeyMappingReply rep; + DeviceIntPtr dev; + KeySymsPtr k; + + REQUEST(xGetDeviceKeyMappingReq); + REQUEST_SIZE_MATCH(xGetDeviceKeyMappingReq); + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0, + BadDevice); + return Success; + } + + if (dev->key == NULL) { + SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0, BadMatch); + return Success; + } + k = &dev->key->curKeySyms; + + if ((stuff->firstKeyCode < k->minKeyCode) || + (stuff->firstKeyCode > k->maxKeyCode)) { + client->errorValue = stuff->firstKeyCode; + SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0, BadValue); + return Success; + } + + if (stuff->firstKeyCode + stuff->count > k->maxKeyCode + 1) { + client->errorValue = stuff->count; + SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0, BadValue); + return Success; + } + + rep.repType = X_Reply; + rep.RepType = X_GetDeviceKeyMapping; + rep.sequenceNumber = client->sequence; + rep.keySymsPerKeyCode = k->mapWidth; + rep.length = (k->mapWidth * stuff->count); /* KeySyms are 4 bytes */ + WriteReplyToClient(client, sizeof(xGetDeviceKeyMappingReply), &rep); + + client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; + WriteSwappedDataToClient(client, + k->mapWidth * stuff->count * sizeof(KeySym), + &k->map[(stuff->firstKeyCode - k->minKeyCode) * + k->mapWidth]); + + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetDeviceKeyMapping function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetDeviceKeyMapping(ClientPtr client, int size, + xGetDeviceKeyMappingReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/getkmap.h b/xorg-server-1.4/Xi/getkmap.h new file mode 100644 index 0000000..58c8f12 --- /dev/null +++ b/xorg-server-1.4/Xi/getkmap.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef GETKMAP_H +#define GETKMAP_H 1 + +int SProcXGetDeviceKeyMapping(ClientPtr /* client */ + ); + +int ProcXGetDeviceKeyMapping(ClientPtr /* client */ + ); + +void SRepXGetDeviceKeyMapping(ClientPtr /* client */ , + int /* size */ , + xGetDeviceKeyMappingReply * /* rep */ + ); + +#endif /* GETKMAP_H */ diff --git a/xorg-server-1.4/Xi/getmmap.c b/xorg-server-1.4/Xi/getmmap.c new file mode 100644 index 0000000..038937e --- /dev/null +++ b/xorg-server-1.4/Xi/getmmap.c @@ -0,0 +1,149 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/******************************************************************** + * + * Get the modifier mapping for an extension device. + * + */ + +#define NEED_EVENTS /* for inputstr.h */ +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include /* Request macro */ +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "getmmap.h" + +/*********************************************************************** + * + * This procedure gets the modifier mapping for an extension device, + * for clients on machines with a different byte ordering than the server. + * + */ + +int +SProcXGetDeviceModifierMapping(ClientPtr client) +{ + char n; + + REQUEST(xGetDeviceModifierMappingReq); + swaps(&stuff->length, n); + return (ProcXGetDeviceModifierMapping(client)); +} + +/*********************************************************************** + * + * Get the device Modifier mapping. + * + */ + +int +ProcXGetDeviceModifierMapping(ClientPtr client) +{ + CARD8 maxkeys; + DeviceIntPtr dev; + xGetDeviceModifierMappingReply rep; + KeyClassPtr kp; + + REQUEST(xGetDeviceModifierMappingReq); + REQUEST_SIZE_MATCH(xGetDeviceModifierMappingReq); + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_GetDeviceModifierMapping, 0, + BadDevice); + return Success; + } + + kp = dev->key; + if (kp == NULL) { + SendErrorToClient(client, IReqCode, X_GetDeviceModifierMapping, 0, + BadMatch); + return Success; + } + maxkeys = kp->maxKeysPerModifier; + + rep.repType = X_Reply; + rep.RepType = X_GetDeviceModifierMapping; + rep.numKeyPerModifier = maxkeys; + rep.sequenceNumber = client->sequence; + /* length counts 4 byte quantities - there are 8 modifiers 1 byte big */ + rep.length = 2 * maxkeys; + + WriteReplyToClient(client, sizeof(xGetDeviceModifierMappingReply), &rep); + + /* Reply with the (modified by DDX) map that SetModifierMapping passed in */ + WriteToClient(client, 8 * maxkeys, (char *)kp->modifierKeyMap); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetDeviceModifierMapping function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetDeviceModifierMapping(ClientPtr client, int size, + xGetDeviceModifierMappingReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/getmmap.h b/xorg-server-1.4/Xi/getmmap.h new file mode 100644 index 0000000..9a93bb8 --- /dev/null +++ b/xorg-server-1.4/Xi/getmmap.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef GETMMAP_H +#define GETMMAP_H 1 + +int SProcXGetDeviceModifierMapping(ClientPtr /* client */ + ); + +int ProcXGetDeviceModifierMapping(ClientPtr /* client */ + ); + +void SRepXGetDeviceModifierMapping(ClientPtr /* client */ , + int /* size */ , + xGetDeviceModifierMappingReply * /* rep */ + ); + +#endif /* GETMMAP_H */ diff --git a/xorg-server-1.4/Xi/getprop.c b/xorg-server-1.4/Xi/getprop.c new file mode 100644 index 0000000..6fa1986 --- /dev/null +++ b/xorg-server-1.4/Xi/getprop.c @@ -0,0 +1,196 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Function to return the dont-propagate-list for an extension device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structs */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" +#include "swaprep.h" + +#include "getprop.h" + +extern XExtEventInfo EventInfo[]; +extern int ExtEventIndex; + +/*********************************************************************** + * + * Handle a request from a client with a different byte order. + * + */ + +int +SProcXGetDeviceDontPropagateList(ClientPtr client) +{ + char n; + + REQUEST(xGetDeviceDontPropagateListReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq); + swapl(&stuff->window, n); + return (ProcXGetDeviceDontPropagateList(client)); +} + +/*********************************************************************** + * + * This procedure lists the input devices available to the server. + * + */ + +int +ProcXGetDeviceDontPropagateList(ClientPtr client) +{ + CARD16 count = 0; + int i, rc; + XEventClass *buf = NULL, *tbuf; + WindowPtr pWin; + xGetDeviceDontPropagateListReply rep; + OtherInputMasks *others; + + REQUEST(xGetDeviceDontPropagateListReq); + REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq); + + rep.repType = X_Reply; + rep.RepType = X_GetDeviceDontPropagateList; + rep.sequenceNumber = client->sequence; + rep.length = 0; + rep.count = 0; + + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) { + SendErrorToClient(client, IReqCode, X_GetDeviceDontPropagateList, 0, + rc); + return Success; + } + + if ((others = wOtherInputMasks(pWin)) != 0) { + for (i = 0; i < EMASKSIZE; i++) + tbuf = ClassFromMask(NULL, others->dontPropagateMask[i], i, + &count, COUNT); + if (count) { + rep.count = count; + buf = (XEventClass *) xalloc(rep.count * sizeof(XEventClass)); + rep.length = (rep.count * sizeof(XEventClass) + 3) >> 2; + + tbuf = buf; + for (i = 0; i < EMASKSIZE; i++) + tbuf = ClassFromMask(tbuf, others->dontPropagateMask[i], i, + NULL, CREATE); + } + } + + WriteReplyToClient(client, sizeof(xGetDeviceDontPropagateListReply), &rep); + + if (count) { + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, count * sizeof(XEventClass), buf); + xfree(buf); + } + return Success; +} + +/*********************************************************************** + * + * This procedure gets a list of event classes from a mask word. + * A single mask may translate to more than one event class. + * + */ + +XEventClass + * ClassFromMask(XEventClass * buf, Mask mask, int maskndx, CARD16 * count, + int mode) +{ + int i, j; + int id = maskndx; + Mask tmask = 0x80000000; + + for (i = 0; i < 32; i++, tmask >>= 1) + if (tmask & mask) { + for (j = 0; j < ExtEventIndex; j++) + if (EventInfo[j].mask == tmask) { + if (mode == COUNT) + (*count)++; + else + *buf++ = (id << 8) | EventInfo[j].type; + } + } + return (buf); +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetDeviceDontPropagateList function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetDeviceDontPropagateList(ClientPtr client, int size, + xGetDeviceDontPropagateListReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->count, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/getprop.h b/xorg-server-1.4/Xi/getprop.h new file mode 100644 index 0000000..1a7b128 --- /dev/null +++ b/xorg-server-1.4/Xi/getprop.h @@ -0,0 +1,51 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef GETPROP_H +#define GETPROP_H 1 + +int SProcXGetDeviceDontPropagateList(ClientPtr /* client */ + ); + +int ProcXGetDeviceDontPropagateList(ClientPtr /* client */ + ); + +XEventClass *ClassFromMask(XEventClass * /* buf */ , + Mask /* mask */ , + int /* maskndx */ , + CARD16 * /* count */ , + int /* mode */ + ); + +void SRepXGetDeviceDontPropagateList(ClientPtr /* client */ , + int /* size */ , + xGetDeviceDontPropagateListReply * /* rep */ + ); + +#endif /* GETPROP_H */ diff --git a/xorg-server-1.4/Xi/getselev.c b/xorg-server-1.4/Xi/getselev.c new file mode 100644 index 0000000..9c5f219 --- /dev/null +++ b/xorg-server-1.4/Xi/getselev.c @@ -0,0 +1,187 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to get the current selected events for a given window. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include +#include +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window struct */ +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" +#include "swaprep.h" + +#include "getprop.h" +#include "getselev.h" + +/*********************************************************************** + * + * This procedure gets the current selected extension events. + * + */ + +int +SProcXGetSelectedExtensionEvents(ClientPtr client) +{ + char n; + + REQUEST(xGetSelectedExtensionEventsReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xGetSelectedExtensionEventsReq); + swapl(&stuff->window, n); + return (ProcXGetSelectedExtensionEvents(client)); +} + +/*********************************************************************** + * + * This procedure gets the current device select mask, + * if the client and server have a different byte ordering. + * + */ + +int +ProcXGetSelectedExtensionEvents(ClientPtr client) +{ + int i, rc, total_length = 0; + xGetSelectedExtensionEventsReply rep; + WindowPtr pWin; + XEventClass *buf = NULL; + XEventClass *tclient; + XEventClass *aclient; + OtherInputMasks *pOthers; + InputClientsPtr others; + + REQUEST(xGetSelectedExtensionEventsReq); + REQUEST_SIZE_MATCH(xGetSelectedExtensionEventsReq); + + rep.repType = X_Reply; + rep.RepType = X_GetSelectedExtensionEvents; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.this_client_count = 0; + rep.all_clients_count = 0; + + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) { + SendErrorToClient(client, IReqCode, X_GetSelectedExtensionEvents, 0, + rc); + return Success; + } + + if ((pOthers = wOtherInputMasks(pWin)) != 0) { + for (others = pOthers->inputClients; others; others = others->next) + for (i = 0; i < EMASKSIZE; i++) + tclient = ClassFromMask(NULL, others->mask[i], i, + &rep.all_clients_count, COUNT); + + for (others = pOthers->inputClients; others; others = others->next) + if (SameClient(others, client)) { + for (i = 0; i < EMASKSIZE; i++) + tclient = ClassFromMask(NULL, others->mask[i], i, + &rep.this_client_count, COUNT); + break; + } + + total_length = (rep.all_clients_count + rep.this_client_count) * + sizeof(XEventClass); + rep.length = (total_length + 3) >> 2; + buf = (XEventClass *) xalloc(total_length); + + tclient = buf; + aclient = buf + rep.this_client_count; + if (others) + for (i = 0; i < EMASKSIZE; i++) + tclient = + ClassFromMask(tclient, others->mask[i], i, NULL, CREATE); + + for (others = pOthers->inputClients; others; others = others->next) + for (i = 0; i < EMASKSIZE; i++) + aclient = + ClassFromMask(aclient, others->mask[i], i, NULL, CREATE); + } + + WriteReplyToClient(client, sizeof(xGetSelectedExtensionEventsReply), &rep); + + if (total_length) { + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, total_length, buf); + xfree(buf); + } + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetSelectedExtensionEvents function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetSelectedExtensionEvents(ClientPtr client, int size, + xGetSelectedExtensionEventsReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->this_client_count, n); + swaps(&rep->all_clients_count, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/getselev.h b/xorg-server-1.4/Xi/getselev.h new file mode 100644 index 0000000..5e7a659 --- /dev/null +++ b/xorg-server-1.4/Xi/getselev.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef GETSELEV_H +#define GETSELEV_H 1 + +int SProcXGetSelectedExtensionEvents(ClientPtr /* client */ + ); + +int ProcXGetSelectedExtensionEvents(ClientPtr /* client */ + ); + +void SRepXGetSelectedExtensionEvents(ClientPtr /* client */ , + int /* size */ , + xGetSelectedExtensionEventsReply * /* rep */ + ); + +#endif /* GETSELEV_H */ diff --git a/xorg-server-1.4/Xi/getvers.c b/xorg-server-1.4/Xi/getvers.c new file mode 100644 index 0000000..b3f4c1c --- /dev/null +++ b/xorg-server-1.4/Xi/getvers.c @@ -0,0 +1,146 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to return the version of the extension. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "getvers.h" + +XExtensionVersion AllExtensionVersions[128]; + +/*********************************************************************** + * + * Handle a request from a client with a different byte order than us. + * + */ + +int +SProcXGetExtensionVersion(ClientPtr client) +{ + char n; + + REQUEST(xGetExtensionVersionReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq); + swaps(&stuff->nbytes, n); + return (ProcXGetExtensionVersion(client)); +} + +/*********************************************************************** + * + * This procedure lists the input devices available to the server. + * + */ + +int +ProcXGetExtensionVersion(ClientPtr client) +{ + xGetExtensionVersionReply rep; + + REQUEST(xGetExtensionVersionReq); + REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq); + + if (stuff->length != (sizeof(xGetExtensionVersionReq) + + stuff->nbytes + 3) >> 2) { + SendErrorToClient(client, IReqCode, X_GetExtensionVersion, 0, + BadLength); + return Success; + } + + rep.repType = X_Reply; + rep.RepType = X_GetExtensionVersion; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.major_version = 0; + rep.minor_version = 0; + + rep.present = TRUE; + if (rep.present) { + rep.major_version = AllExtensionVersions[IReqCode - 128].major_version; + rep.minor_version = AllExtensionVersions[IReqCode - 128].minor_version; + } + WriteReplyToClient(client, sizeof(xGetExtensionVersionReply), &rep); + + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetExtensionVersion function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetExtensionVersion(ClientPtr client, int size, + xGetExtensionVersionReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->major_version, n); + swaps(&rep->minor_version, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/getvers.h b/xorg-server-1.4/Xi/getvers.h new file mode 100644 index 0000000..c67e77a --- /dev/null +++ b/xorg-server-1.4/Xi/getvers.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef GETVERS_H +#define GETVERS_H 1 + +int SProcXGetExtensionVersion(ClientPtr /* client */ + ); + +int ProcXGetExtensionVersion(ClientPtr /* client */ + ); + +void SRepXGetExtensionVersion(ClientPtr /* client */ , + int /* size */ , + xGetExtensionVersionReply * /* rep */ + ); + +#endif /* GETVERS_H */ diff --git a/xorg-server-1.4/Xi/grabdev.c b/xorg-server-1.4/Xi/grabdev.c new file mode 100644 index 0000000..e2809ef --- /dev/null +++ b/xorg-server-1.4/Xi/grabdev.c @@ -0,0 +1,210 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to grab an extension device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#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" +#include "dixevents.h" /* GrabDevice */ + +#include "grabdev.h" + +extern XExtEventInfo EventInfo[]; +extern int ExtEventIndex; + +/*********************************************************************** + * + * Swap the request if the requestor has a different byte order than us. + * + */ + +int +SProcXGrabDevice(ClientPtr client) +{ + char n; + long *p; + int i; + + REQUEST(xGrabDeviceReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xGrabDeviceReq); + swapl(&stuff->grabWindow, n); + swapl(&stuff->time, n); + swaps(&stuff->event_count, n); + p = (long *)&stuff[1]; + for (i = 0; i < stuff->event_count; i++) { + swapl(p, n); + p++; + } + + return (ProcXGrabDevice(client)); +} + +/*********************************************************************** + * + * Grab an extension device. + * + */ + +int +ProcXGrabDevice(ClientPtr client) +{ + int error; + xGrabDeviceReply rep; + DeviceIntPtr dev; + struct tmask tmp[EMASKSIZE]; + + REQUEST(xGrabDeviceReq); + REQUEST_AT_LEAST_SIZE(xGrabDeviceReq); + + if (stuff->length != (sizeof(xGrabDeviceReq) >> 2) + stuff->event_count) { + SendErrorToClient(client, IReqCode, X_GrabDevice, 0, BadLength); + return Success; + } + + rep.repType = X_Reply; + rep.RepType = X_GrabDevice; + rep.sequenceNumber = client->sequence; + rep.length = 0; + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_GrabDevice, 0, BadDevice); + return Success; + } + + if (CreateMaskFromList(client, (XEventClass *) & stuff[1], + stuff->event_count, tmp, dev, + X_GrabDevice) != Success) + return Success; + + error = GrabDevice(client, dev, stuff->this_device_mode, + stuff->other_devices_mode, stuff->grabWindow, + stuff->ownerEvents, stuff->time, + tmp[stuff->deviceid].mask, &rep.status); + + if (error != Success) { + SendErrorToClient(client, IReqCode, X_GrabDevice, 0, error); + return Success; + } + WriteReplyToClient(client, sizeof(xGrabDeviceReply), &rep); + return Success; +} + +/*********************************************************************** + * + * This procedure creates an event mask from a list of XEventClasses. + * + */ + +int +CreateMaskFromList(ClientPtr client, XEventClass * list, int count, + struct tmask *mask, DeviceIntPtr dev, int req) +{ + int i, j; + int device; + DeviceIntPtr tdev; + + for (i = 0; i < EMASKSIZE; i++) { + mask[i].mask = 0; + mask[i].dev = NULL; + } + + for (i = 0; i < count; i++, list++) { + device = *list >> 8; + if (device > 255) { + SendErrorToClient(client, IReqCode, req, 0, BadClass); + return BadClass; + } + tdev = LookupDeviceIntRec(device); + if (tdev == NULL || (dev != NULL && tdev != dev)) { + SendErrorToClient(client, IReqCode, req, 0, BadClass); + return BadClass; + } + + for (j = 0; j < ExtEventIndex; j++) + if (EventInfo[j].type == (*list & 0xff)) { + mask[device].mask |= EventInfo[j].mask; + mask[device].dev = (Pointer) tdev; + break; + } + } + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGrabDevice function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGrabDevice(ClientPtr client, int size, xGrabDeviceReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/grabdev.h b/xorg-server-1.4/Xi/grabdev.h new file mode 100644 index 0000000..881982f --- /dev/null +++ b/xorg-server-1.4/Xi/grabdev.h @@ -0,0 +1,52 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef GRABDEV_H +#define GRABDEV_H 1 + +int SProcXGrabDevice(ClientPtr /* client */ + ); + +int ProcXGrabDevice(ClientPtr /* client */ + ); + +int CreateMaskFromList(ClientPtr /* client */ , + XEventClass * /* list */ , + int /* count */ , + struct tmask /* mask */ [], + DeviceIntPtr /* dev */ , + int /* req */ + ); + +void SRepXGrabDevice(ClientPtr /* client */ , + int /* size */ , + xGrabDeviceReply * /* rep */ + ); + +#endif /* GRABDEV_H */ diff --git a/xorg-server-1.4/Xi/grabdevb.c b/xorg-server-1.4/Xi/grabdevb.c new file mode 100644 index 0000000..df62d0c --- /dev/null +++ b/xorg-server-1.4/Xi/grabdevb.c @@ -0,0 +1,159 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to grab a button on an extension device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include +#include +#include "exevents.h" +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "grabdev.h" +#include "grabdevb.h" + +/*********************************************************************** + * + * Handle requests from clients with a different byte order. + * + */ + +int +SProcXGrabDeviceButton(ClientPtr client) +{ + char n; + long *p; + int i; + + REQUEST(xGrabDeviceButtonReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq); + swapl(&stuff->grabWindow, n); + swaps(&stuff->modifiers, n); + swaps(&stuff->event_count, n); + p = (long *)&stuff[1]; + for (i = 0; i < stuff->event_count; i++) { + swapl(p, n); + p++; + } + + return (ProcXGrabDeviceButton(client)); +} + +/*********************************************************************** + * + * Grab a button on an extension device. + * + */ + +int +ProcXGrabDeviceButton(ClientPtr client) +{ + int ret; + DeviceIntPtr dev; + DeviceIntPtr mdev; + XEventClass *class; + struct tmask tmp[EMASKSIZE]; + + REQUEST(xGrabDeviceButtonReq); + REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq); + + if (stuff->length != + (sizeof(xGrabDeviceButtonReq) >> 2) + stuff->event_count) { + SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, BadLength); + return Success; + } + + dev = LookupDeviceIntRec(stuff->grabbed_device); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, BadDevice); + return Success; + } + if (stuff->modifier_device != UseXKeyboard) { + mdev = LookupDeviceIntRec(stuff->modifier_device); + if (mdev == NULL) { + SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, + BadDevice); + return Success; + } + if (mdev->key == NULL) { + SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, + BadMatch); + return Success; + } + } else + mdev = (DeviceIntPtr) LookupKeyboardDevice(); + + class = (XEventClass *) (&stuff[1]); /* first word of values */ + + if ((ret = CreateMaskFromList(client, class, + stuff->event_count, tmp, dev, + X_GrabDeviceButton)) != Success) + return Success; + ret = GrabButton(client, dev, stuff->this_device_mode, + stuff->other_devices_mode, stuff->modifiers, mdev, + stuff->button, stuff->grabWindow, stuff->ownerEvents, + (Cursor) 0, (Window) 0, tmp[stuff->grabbed_device].mask); + + if (ret != Success) + SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, ret); + return (Success); +} diff --git a/xorg-server-1.4/Xi/grabdevb.h b/xorg-server-1.4/Xi/grabdevb.h new file mode 100644 index 0000000..84a27b3 --- /dev/null +++ b/xorg-server-1.4/Xi/grabdevb.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef GRABDEVB_H +#define GRABDEVB_H 1 + +int SProcXGrabDeviceButton(ClientPtr /* client */ + ); + +int ProcXGrabDeviceButton(ClientPtr /* client */ + ); + +#endif /* GRABDEVB_H */ diff --git a/xorg-server-1.4/Xi/grabdevk.c b/xorg-server-1.4/Xi/grabdevk.c new file mode 100644 index 0000000..b74592f --- /dev/null +++ b/xorg-server-1.4/Xi/grabdevk.c @@ -0,0 +1,160 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to grab a key on an extension device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include +#include +#include "exevents.h" +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "grabdev.h" +#include "grabdevk.h" + +/*********************************************************************** + * + * Handle requests from clients with a different byte order. + * + */ + +int +SProcXGrabDeviceKey(ClientPtr client) +{ + char n; + long *p; + int i; + + REQUEST(xGrabDeviceKeyReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq); + swapl(&stuff->grabWindow, n); + swaps(&stuff->modifiers, n); + swaps(&stuff->event_count, n); + p = (long *)&stuff[1]; + for (i = 0; i < stuff->event_count; i++) { + swapl(p, n); + p++; + } + return (ProcXGrabDeviceKey(client)); +} + +/*********************************************************************** + * + * Grab a key on an extension device. + * + */ + +int +ProcXGrabDeviceKey(ClientPtr client) +{ + int ret; + DeviceIntPtr dev; + DeviceIntPtr mdev; + XEventClass *class; + struct tmask tmp[EMASKSIZE]; + + REQUEST(xGrabDeviceKeyReq); + REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq); + + if (stuff->length != (sizeof(xGrabDeviceKeyReq) >> 2) + stuff->event_count) { + SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, BadLength); + return Success; + } + + dev = LookupDeviceIntRec(stuff->grabbed_device); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, BadDevice); + return Success; + } + + if (stuff->modifier_device != UseXKeyboard) { + mdev = LookupDeviceIntRec(stuff->modifier_device); + if (mdev == NULL) { + SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, BadDevice); + return Success; + } + if (mdev->key == NULL) { + SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, BadMatch); + return Success; + } + } else + mdev = (DeviceIntPtr) LookupKeyboardDevice(); + + class = (XEventClass *) (&stuff[1]); /* first word of values */ + + if ((ret = CreateMaskFromList(client, class, + stuff->event_count, tmp, dev, + X_GrabDeviceKey)) != Success) + return Success; + + ret = GrabKey(client, dev, stuff->this_device_mode, + stuff->other_devices_mode, stuff->modifiers, mdev, + stuff->key, stuff->grabWindow, stuff->ownerEvents, + tmp[stuff->grabbed_device].mask); + + if (ret != Success) { + SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, ret); + return Success; + } + + return Success; +} diff --git a/xorg-server-1.4/Xi/grabdevk.h b/xorg-server-1.4/Xi/grabdevk.h new file mode 100644 index 0000000..e349136 --- /dev/null +++ b/xorg-server-1.4/Xi/grabdevk.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef GRABDEVK_H +#define GRABDEVK_H 1 + +int SProcXGrabDeviceKey(ClientPtr /* client */ + ); + +int ProcXGrabDeviceKey(ClientPtr /* client */ + ); + +#endif /* GRABDEVK_H */ diff --git a/xorg-server-1.4/Xi/gtmotion.c b/xorg-server-1.4/Xi/gtmotion.c new file mode 100644 index 0000000..cfc7f89 --- /dev/null +++ b/xorg-server-1.4/Xi/gtmotion.c @@ -0,0 +1,197 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Request to get the motion history from an extension device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" + +#include "gtmotion.h" + +/*********************************************************************** + * + * Swap the request if server and client have different byte ordering. + * + */ + +int +SProcXGetDeviceMotionEvents(ClientPtr client) +{ + char n; + + REQUEST(xGetDeviceMotionEventsReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq); + swapl(&stuff->start, n); + swapl(&stuff->stop, n); + return (ProcXGetDeviceMotionEvents(client)); +} + +/**************************************************************************** + * + * Get the motion history for an extension pointer devices. + * + */ + +int +ProcXGetDeviceMotionEvents(ClientPtr client) +{ + INT32 *coords = NULL, *bufptr; + xGetDeviceMotionEventsReply rep; + unsigned long i; + int num_events, axes, size = 0, tsize; + unsigned long nEvents; + DeviceIntPtr dev; + TimeStamp start, stop; + int length = 0; + ValuatorClassPtr v; + + REQUEST(xGetDeviceMotionEventsReq); + + REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq); + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_GetDeviceMotionEvents, 0, + BadDevice); + return Success; + } + v = dev->valuator; + if (v == NULL || v->numAxes == 0) { + SendErrorToClient(client, IReqCode, X_GetDeviceMotionEvents, 0, + BadMatch); + return Success; + } + if (dev->valuator->motionHintWindow) + MaybeStopDeviceHint(dev, client); + axes = v->numAxes; + rep.repType = X_Reply; + rep.RepType = X_GetDeviceMotionEvents; + rep.sequenceNumber = client->sequence; + rep.nEvents = 0; + rep.axes = axes; + rep.mode = v->mode & DeviceMode; + rep.length = 0; + start = ClientTimeToServerTime(stuff->start); + stop = ClientTimeToServerTime(stuff->stop); + if (CompareTimeStamps(start, stop) == LATER || + CompareTimeStamps(start, currentTime) == LATER) { + WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep); + return Success; + } + if (CompareTimeStamps(stop, currentTime) == LATER) + stop = currentTime; + num_events = v->numMotionEvents; + if (num_events) { + size = sizeof(Time) + (axes * sizeof(INT32)); + tsize = num_events * size; + coords = (INT32 *) ALLOCATE_LOCAL(tsize); + if (!coords) { + SendErrorToClient(client, IReqCode, X_GetDeviceMotionEvents, 0, + BadAlloc); + return Success; + } + rep.nEvents = (v->GetMotionProc) (dev, (xTimecoord *) coords, /* XXX */ + start.milliseconds, stop.milliseconds, + (ScreenPtr) NULL); + } + if (rep.nEvents > 0) { + length = (rep.nEvents * size + 3) >> 2; + rep.length = length; + } + nEvents = rep.nEvents; + WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep); + if (nEvents) { + if (client->swapped) { + char n; + + bufptr = coords; + for (i = 0; i < nEvents * (axes + 1); i++) { + swapl(bufptr, n); + bufptr++; + } + } + WriteToClient(client, length * 4, (char *)coords); + } + if (coords) + DEALLOCATE_LOCAL(coords); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetDeviceMotionEvents function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetDeviceMotionEvents(ClientPtr client, int size, + xGetDeviceMotionEventsReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swapl(&rep->nEvents, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/gtmotion.h b/xorg-server-1.4/Xi/gtmotion.h new file mode 100644 index 0000000..cdd8825 --- /dev/null +++ b/xorg-server-1.4/Xi/gtmotion.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef GTMOTION_H +#define GTMOTION_H 1 + +int SProcXGetDeviceMotionEvents(ClientPtr /* client */ + ); + +int ProcXGetDeviceMotionEvents(ClientPtr /* client */ + ); + +void SRepXGetDeviceMotionEvents(ClientPtr /* client */ , + int /* size */ , + xGetDeviceMotionEventsReply * /* rep */ + ); + +#endif /* GTMOTION_H */ diff --git a/xorg-server-1.4/Xi/listdev.c b/xorg-server-1.4/Xi/listdev.c new file mode 100644 index 0000000..160ad02 --- /dev/null +++ b/xorg-server-1.4/Xi/listdev.c @@ -0,0 +1,375 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to list the available input devices. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "XIstubs.h" +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" /* FIXME */ + +#include "listdev.h" + +#define VPC 20 /* Max # valuators per chunk */ + +/*********************************************************************** + * + * This procedure lists the input devices available to the server. + * + */ + +int +SProcXListInputDevices(ClientPtr client) +{ + char n; + + REQUEST(xListInputDevicesReq); + swaps(&stuff->length, n); + return (ProcXListInputDevices(client)); +} + +/*********************************************************************** + * + * This procedure calculates the size of the information to be returned + * for an input device. + * + */ + +static void +SizeDeviceInfo(DeviceIntPtr d, int *namesize, int *size) +{ + int chunks; + + *namesize += 1; + if (d->name) + *namesize += strlen(d->name); + if (d->key != NULL) + *size += sizeof(xKeyInfo); + if (d->button != NULL) + *size += sizeof(xButtonInfo); + if (d->valuator != NULL) { + chunks = ((int)d->valuator->numAxes + 19) / VPC; + *size += (chunks * sizeof(xValuatorInfo) + + d->valuator->numAxes * sizeof(xAxisInfo)); + } +} + +/*********************************************************************** + * + * This procedure copies data to the DeviceInfo struct, swapping if necessary. + * + * We need the extra byte in the allocated buffer, because the trailing null + * hammers one extra byte, which is overwritten by the next name except for + * the last name copied. + * + */ + +static void +CopyDeviceName(char **namebuf, char *name) +{ + char *nameptr = (char *)*namebuf; + + if (name) { + *nameptr++ = strlen(name); + strcpy(nameptr, name); + *namebuf += (strlen(name) + 1); + } else { + *nameptr++ = 0; + *namebuf += 1; + } +} + +/*********************************************************************** + * + * This procedure copies ButtonClass information, swapping if necessary. + * + */ + +static void +CopySwapButtonClass(ClientPtr client, ButtonClassPtr b, char **buf) +{ + char n; + xButtonInfoPtr b2; + + b2 = (xButtonInfoPtr) * buf; + b2->class = ButtonClass; + b2->length = sizeof(xButtonInfo); + b2->num_buttons = b->numButtons; + if (client->swapped) { + swaps(&b2->num_buttons, n); /* macro - braces are required */ + } + *buf += sizeof(xButtonInfo); +} + +/*********************************************************************** + * + * This procedure copies data to the DeviceInfo struct, swapping if necessary. + * + */ + +static void +CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes, + char **buf) +{ + char n; + xDeviceInfoPtr dev; + + dev = (xDeviceInfoPtr) * buf; + + dev->id = d->id; + dev->type = d->type; + dev->num_classes = num_classes; + if (d == inputInfo.keyboard) + dev->use = IsXKeyboard; + else if (d == inputInfo.pointer) + dev->use = IsXPointer; + else if (d->key && d->kbdfeed) + dev->use = IsXExtensionKeyboard; + else if (d->valuator && d->button) + dev->use = IsXExtensionPointer; + else + dev->use = IsXExtensionDevice; + if (client->swapped) { + swapl(&dev->type, n); /* macro - braces are required */ + } + *buf += sizeof(xDeviceInfo); +} + +/*********************************************************************** + * + * This procedure copies KeyClass information, swapping if necessary. + * + */ + +static void +CopySwapKeyClass(ClientPtr client, KeyClassPtr k, char **buf) +{ + char n; + xKeyInfoPtr k2; + + k2 = (xKeyInfoPtr) * buf; + k2->class = KeyClass; + k2->length = sizeof(xKeyInfo); + k2->min_keycode = k->curKeySyms.minKeyCode; + k2->max_keycode = k->curKeySyms.maxKeyCode; + k2->num_keys = k2->max_keycode - k2->min_keycode + 1; + if (client->swapped) { + swaps(&k2->num_keys, n); + } + *buf += sizeof(xKeyInfo); +} + +/*********************************************************************** + * + * This procedure copies ValuatorClass information, swapping if necessary. + * + * Devices may have up to 255 valuators. The length of a ValuatorClass is + * defined to be sizeof(ValuatorClassInfo) + num_axes * sizeof (xAxisInfo). + * The maximum length is therefore (8 + 255 * 12) = 3068. However, the + * length field is one byte. If a device has more than 20 valuators, we + * must therefore return multiple valuator classes to the client. + * + */ + +static int +CopySwapValuatorClass(ClientPtr client, ValuatorClassPtr v, char **buf) +{ + int i, j, axes, t_axes; + char n; + xValuatorInfoPtr v2; + AxisInfo *a; + xAxisInfoPtr a2; + + for (i = 0, axes = v->numAxes; i < ((v->numAxes + 19) / VPC); + i++, axes -= VPC) { + t_axes = axes < VPC ? axes : VPC; + if (t_axes < 0) + t_axes = v->numAxes % VPC; + v2 = (xValuatorInfoPtr) * buf; + v2->class = ValuatorClass; + v2->length = sizeof(xValuatorInfo) + t_axes * sizeof(xAxisInfo); + v2->num_axes = t_axes; + v2->mode = v->mode & DeviceMode; + v2->motion_buffer_size = v->numMotionEvents; + if (client->swapped) { + swapl(&v2->motion_buffer_size, n); + } + *buf += sizeof(xValuatorInfo); + a = v->axes + (VPC * i); + a2 = (xAxisInfoPtr) * buf; + for (j = 0; j < t_axes; j++) { + a2->min_value = a->min_value; + a2->max_value = a->max_value; + a2->resolution = a->resolution; + if (client->swapped) { + swapl(&a2->min_value, n); + swapl(&a2->max_value, n); + swapl(&a2->resolution, n); + } + a2++; + a++; + *buf += sizeof(xAxisInfo); + } + } + return (i); +} + +/*********************************************************************** + * + * This procedure lists information to be returned for an input device. + * + */ + +static void +ListDeviceInfo(ClientPtr client, DeviceIntPtr d, xDeviceInfoPtr dev, + char **devbuf, char **classbuf, char **namebuf) +{ + CopyDeviceName(namebuf, d->name); + CopySwapDevice(client, d, 0, devbuf); + if (d->key != NULL) { + CopySwapKeyClass(client, d->key, classbuf); + dev->num_classes++; + } + if (d->button != NULL) { + CopySwapButtonClass(client, d->button, classbuf); + dev->num_classes++; + } + if (d->valuator != NULL) { + dev->num_classes += + CopySwapValuatorClass(client, d->valuator, classbuf); + } +} + +/*********************************************************************** + * + * This procedure lists the input devices available to the server. + * + */ + +int +ProcXListInputDevices(ClientPtr client) +{ + xListInputDevicesReply rep; + int numdevs = 0; + int namesize = 1; /* need 1 extra byte for strcpy */ + int size = 0; + int total_length; + char *devbuf; + char *classbuf; + char *namebuf; + char *savbuf; + xDeviceInfo *dev; + DeviceIntPtr d; + + REQUEST_SIZE_MATCH(xListInputDevicesReq); + + rep.repType = X_Reply; + rep.RepType = X_ListInputDevices; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + AddOtherInputDevices(); + + for (d = inputInfo.devices; d; d = d->next) { + SizeDeviceInfo(d, &namesize, &size); + numdevs++; + } + for (d = inputInfo.off_devices; d; d = d->next) { + SizeDeviceInfo(d, &namesize, &size); + numdevs++; + } + + total_length = numdevs * sizeof(xDeviceInfo) + size + namesize; + devbuf = (char *)xalloc(total_length); + classbuf = devbuf + (numdevs * sizeof(xDeviceInfo)); + namebuf = classbuf + size; + savbuf = devbuf; + + dev = (xDeviceInfoPtr) devbuf; + for (d = inputInfo.devices; d; d = d->next, dev++) + ListDeviceInfo(client, d, dev, &devbuf, &classbuf, &namebuf); + for (d = inputInfo.off_devices; d; d = d->next, dev++) + ListDeviceInfo(client, d, dev, &devbuf, &classbuf, &namebuf); + + rep.ndevices = numdevs; + rep.length = (total_length + 3) >> 2; + WriteReplyToClient(client, sizeof(xListInputDevicesReply), &rep); + WriteToClient(client, total_length, savbuf); + xfree(savbuf); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XListInputDevices function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXListInputDevices(ClientPtr client, int size, xListInputDevicesReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/listdev.h b/xorg-server-1.4/Xi/listdev.h new file mode 100644 index 0000000..db376de --- /dev/null +++ b/xorg-server-1.4/Xi/listdev.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef LISTDEV_H +#define LISTDEV_H 1 + +int SProcXListInputDevices(ClientPtr /* client */ + ); + +int ProcXListInputDevices(ClientPtr /* client */ + ); + +void SRepXListInputDevices(ClientPtr /* client */ , + int /* size */ , + xListInputDevicesReply * /* rep */ + ); + +#endif /* LISTDEV_H */ diff --git a/xorg-server-1.4/Xi/opendev.c b/xorg-server-1.4/Xi/opendev.c new file mode 100644 index 0000000..0b0671d --- /dev/null +++ b/xorg-server-1.4/Xi/opendev.c @@ -0,0 +1,183 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Request to open an extension input device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "XIstubs.h" +#include "windowstr.h" /* window structure */ +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "opendev.h" + +extern CARD8 event_base[]; + +/*********************************************************************** + * + * This procedure swaps the request if the server and client have different + * byte orderings. + * + */ + +int +SProcXOpenDevice(ClientPtr client) +{ + char n; + + REQUEST(xOpenDeviceReq); + swaps(&stuff->length, n); + return (ProcXOpenDevice(client)); +} + +/*********************************************************************** + * + * This procedure causes the server to open an input device. + * + */ + +int +ProcXOpenDevice(ClientPtr client) +{ + xInputClassInfo evbase[numInputClasses]; + int j = 0; + int status = Success; + xOpenDeviceReply rep; + DeviceIntPtr dev; + + REQUEST(xOpenDeviceReq); + REQUEST_SIZE_MATCH(xOpenDeviceReq); + + if (stuff->deviceid == inputInfo.pointer->id || + stuff->deviceid == inputInfo.keyboard->id) { + SendErrorToClient(client, IReqCode, X_OpenDevice, 0, BadDevice); + return Success; + } + + if ((dev = LookupDeviceIntRec(stuff->deviceid)) == NULL) { /* not open */ + for (dev = inputInfo.off_devices; dev; dev = dev->next) + if (dev->id == stuff->deviceid) + break; + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_OpenDevice, 0, BadDevice); + return Success; + } + } + + OpenInputDevice(dev, client, &status); + if (status != Success) { + SendErrorToClient(client, IReqCode, X_OpenDevice, 0, status); + return Success; + } + + rep.repType = X_Reply; + rep.RepType = X_OpenDevice; + rep.sequenceNumber = client->sequence; + if (dev->key != NULL) { + evbase[j].class = KeyClass; + evbase[j++].event_type_base = event_base[KeyClass]; + } + if (dev->button != NULL) { + evbase[j].class = ButtonClass; + evbase[j++].event_type_base = event_base[ButtonClass]; + } + if (dev->valuator != NULL) { + evbase[j].class = ValuatorClass; + evbase[j++].event_type_base = event_base[ValuatorClass]; + } + if (dev->kbdfeed != NULL || dev->ptrfeed != NULL || dev->leds != NULL || + dev->intfeed != NULL || dev->bell != NULL || dev->stringfeed != NULL) { + evbase[j].class = FeedbackClass; + evbase[j++].event_type_base = event_base[FeedbackClass]; + } + if (dev->focus != NULL) { + evbase[j].class = FocusClass; + evbase[j++].event_type_base = event_base[FocusClass]; + } + if (dev->proximity != NULL) { + evbase[j].class = ProximityClass; + evbase[j++].event_type_base = event_base[ProximityClass]; + } + evbase[j].class = OtherClass; + evbase[j++].event_type_base = event_base[OtherClass]; + rep.length = (j * sizeof(xInputClassInfo) + 3) >> 2; + rep.num_classes = j; + WriteReplyToClient(client, sizeof(xOpenDeviceReply), &rep); + WriteToClient(client, j * sizeof(xInputClassInfo), (char *)evbase); + return (Success); +} + +/*********************************************************************** + * + * This procedure writes the reply for the XOpenDevice function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXOpenDevice(ClientPtr client, int size, xOpenDeviceReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/opendev.h b/xorg-server-1.4/Xi/opendev.h new file mode 100644 index 0000000..9665fe9 --- /dev/null +++ b/xorg-server-1.4/Xi/opendev.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef OPENDEV_H +#define OPENDEV_H 1 + +int SProcXOpenDevice(ClientPtr /* client */ + ); + +int ProcXOpenDevice(ClientPtr /* client */ + ); + +void SRepXOpenDevice(ClientPtr /* client */ , + int /* size */ , + xOpenDeviceReply * /* rep */ + ); + +#endif /* OPENDEV_H */ diff --git a/xorg-server-1.4/Xi/queryst.c b/xorg-server-1.4/Xi/queryst.c new file mode 100644 index 0000000..972cd2c --- /dev/null +++ b/xorg-server-1.4/Xi/queryst.c @@ -0,0 +1,195 @@ +/* + +Copyright 1998, 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. + +*/ + +/*********************************************************************** + * + * Request to query the state of an extension input device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#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 "exevents.h" +#include "exglobals.h" + +#include "queryst.h" + +/*********************************************************************** + * + * This procedure allows a client to query the state of a device. + * + */ + +int +SProcXQueryDeviceState(ClientPtr client) +{ + char n; + + REQUEST(xQueryDeviceStateReq); + swaps(&stuff->length, n); + return (ProcXQueryDeviceState(client)); +} + +/*********************************************************************** + * + * This procedure allows frozen events to be routed. + * + */ + +int +ProcXQueryDeviceState(ClientPtr client) +{ + char n; + int i; + int num_classes = 0; + int total_length = 0; + char *buf, *savbuf; + KeyClassPtr k; + xKeyState *tk; + ButtonClassPtr b; + xButtonState *tb; + ValuatorClassPtr v; + xValuatorState *tv; + xQueryDeviceStateReply rep; + DeviceIntPtr dev; + int *values; + + REQUEST(xQueryDeviceStateReq); + REQUEST_SIZE_MATCH(xQueryDeviceStateReq); + + rep.repType = X_Reply; + rep.RepType = X_QueryDeviceState; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_QueryDeviceState, 0, BadDevice); + return Success; + } + + v = dev->valuator; + if (v != NULL && v->motionHintWindow != NULL) + MaybeStopDeviceHint(dev, client); + + k = dev->key; + if (k != NULL) { + total_length += sizeof(xKeyState); + num_classes++; + } + + b = dev->button; + if (b != NULL) { + total_length += sizeof(xButtonState); + num_classes++; + } + + if (v != NULL) { + total_length += (sizeof(xValuatorState) + (v->numAxes * sizeof(int))); + num_classes++; + } + buf = (char *)xalloc(total_length); + if (!buf) { + SendErrorToClient(client, IReqCode, X_QueryDeviceState, 0, BadAlloc); + return Success; + } + savbuf = buf; + + if (k != NULL) { + tk = (xKeyState *) buf; + tk->class = KeyClass; + tk->length = sizeof(xKeyState); + tk->num_keys = k->curKeySyms.maxKeyCode - k->curKeySyms.minKeyCode + 1; + for (i = 0; i < 32; i++) + tk->keys[i] = k->down[i]; + buf += sizeof(xKeyState); + } + + if (b != NULL) { + tb = (xButtonState *) buf; + tb->class = ButtonClass; + tb->length = sizeof(xButtonState); + tb->num_buttons = b->numButtons; + for (i = 0; i < 32; i++) + tb->buttons[i] = b->down[i]; + buf += sizeof(xButtonState); + } + + if (v != NULL) { + tv = (xValuatorState *) buf; + tv->class = ValuatorClass; + tv->length = sizeof(xValuatorState); + tv->num_valuators = v->numAxes; + tv->mode = v->mode; + buf += sizeof(xValuatorState); + for (i = 0, values = v->axisVal; i < v->numAxes; i++) { + *((int *)buf) = *values++; + if (client->swapped) { + swapl((int *)buf, n); /* macro - braces needed */ + } + buf += sizeof(int); + } + } + + rep.num_classes = num_classes; + rep.length = (total_length + 3) >> 2; + WriteReplyToClient(client, sizeof(xQueryDeviceStateReply), &rep); + if (total_length > 0) + WriteToClient(client, total_length, savbuf); + xfree(savbuf); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XQueryDeviceState function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXQueryDeviceState(ClientPtr client, int size, xQueryDeviceStateReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/queryst.h b/xorg-server-1.4/Xi/queryst.h new file mode 100644 index 0000000..9232ff6 --- /dev/null +++ b/xorg-server-1.4/Xi/queryst.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef QUERYST_H +#define QUERYST_H 1 + +int SProcXQueryDeviceState(ClientPtr /* client */ + ); + +int ProcXQueryDeviceState(ClientPtr /* client */ + ); + +void SRepXQueryDeviceState(ClientPtr /* client */ , + int /* size */ , + xQueryDeviceStateReply * /* rep */ + ); + +#endif /* QUERYST_H */ diff --git a/xorg-server-1.4/Xi/selectev.c b/xorg-server-1.4/Xi/selectev.c new file mode 100644 index 0000000..d52db1b --- /dev/null +++ b/xorg-server-1.4/Xi/selectev.c @@ -0,0 +1,204 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Request to select input from an extension device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#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 "exevents.h" +#include "exglobals.h" + +#include "grabdev.h" +#include "selectev.h" + +extern Mask ExtExclusiveMasks[]; +extern Mask ExtValidMasks[]; + +static int +HandleDevicePresenceMask(ClientPtr client, WindowPtr win, + XEventClass *cls, CARD16 *count) +{ + int i, j; + Mask mask; + + /* We use the device ID 256 to select events that aren't bound to + * any device. For now we only handle the device presence event, + * but this could be extended to other events that aren't bound to + * a device. + * + * In order not to break in CreateMaskFromList() we remove the + * entries with device ID 256 from the XEventClass array. + */ + + mask = 0; + for (i = 0, j = 0; i < *count; i++) { + if (cls[i] >> 8 != 256) { + cls[j] = cls[i]; + j++; + continue; + } + + switch (cls[i] & 0xff) { + case _devicePresence: + mask |= DevicePresenceNotifyMask; + break; + } + } + + *count = j; + + if (mask == 0) + return Success; + + /* We always only use mksidx = 0 for events not bound to + * devices */ + + if (AddExtensionClient (win, client, mask, 0) != Success) + return BadAlloc; + + RecalculateDeviceDeliverableEvents(win); + + return Success; +} + +/*********************************************************************** + * + * Handle requests from clients with a different byte order. + * + */ + +int +SProcXSelectExtensionEvent(ClientPtr client) +{ + char n; + long *p; + int i; + + REQUEST(xSelectExtensionEventReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq); + swapl(&stuff->window, n); + swaps(&stuff->count, n); + p = (long *)&stuff[1]; + for (i = 0; i < stuff->count; i++) { + swapl(p, n); + p++; + } + return (ProcXSelectExtensionEvent(client)); +} + +/*********************************************************************** + * + * This procedure selects input from an extension device. + * + */ + +int +ProcXSelectExtensionEvent(ClientPtr client) +{ + int ret; + int i; + WindowPtr pWin; + struct tmask tmp[EMASKSIZE]; + + REQUEST(xSelectExtensionEventReq); + REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq); + + if (stuff->length != (sizeof(xSelectExtensionEventReq) >> 2) + stuff->count) { + SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, + BadLength); + return Success; + } + + ret = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (ret != Success) { + SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, ret); + return Success; + } + + if (HandleDevicePresenceMask(client, pWin, (XEventClass *) & stuff[1], + &stuff->count) != Success) { + SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, + BadAlloc); + return Success; + } + + if ((ret = CreateMaskFromList(client, (XEventClass *) & stuff[1], + stuff->count, tmp, NULL, + X_SelectExtensionEvent)) != Success) + return Success; + + for (i = 0; i < EMASKSIZE; i++) + if (tmp[i].dev != NULL) { + if ((ret = + SelectForWindow((DeviceIntPtr) tmp[i].dev, pWin, client, + tmp[i].mask, ExtExclusiveMasks[i], + ExtValidMasks[i])) != Success) { + SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, + ret); + return Success; + } + } + + return Success; +} diff --git a/xorg-server-1.4/Xi/selectev.h b/xorg-server-1.4/Xi/selectev.h new file mode 100644 index 0000000..60fb447 --- /dev/null +++ b/xorg-server-1.4/Xi/selectev.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef SELECTEV_H +#define SELECTEV_H 1 + +int SProcXSelectExtensionEvent(ClientPtr /* client */ + ); + +int ProcXSelectExtensionEvent(ClientPtr /* client */ + ); + +#endif /* SELECTEV_H */ diff --git a/xorg-server-1.4/Xi/sendexev.c b/xorg-server-1.4/Xi/sendexev.c new file mode 100644 index 0000000..eac9abe --- /dev/null +++ b/xorg-server-1.4/Xi/sendexev.c @@ -0,0 +1,168 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Request to send an extension event. + * + */ + +#define EXTENSION_EVENT_BASE 64 +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* Window */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" + +#include "grabdev.h" +#include "sendexev.h" + +extern int lastEvent; /* Defined in extension.c */ + +/*********************************************************************** + * + * Handle requests from clients with a different byte order than us. + * + */ + +int +SProcXSendExtensionEvent(ClientPtr client) +{ + char n; + long *p; + int i; + xEvent eventT; + xEvent *eventP; + EventSwapPtr proc; + + REQUEST(xSendExtensionEventReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq); + swapl(&stuff->destination, n); + swaps(&stuff->count, n); + eventP = (xEvent *) & stuff[1]; + for (i = 0; i < stuff->num_events; i++, eventP++) { + proc = EventSwapVector[eventP->u.u.type & 0177]; + if (proc == NotImplemented) /* no swapping proc; invalid event type? */ + return (BadValue); + (*proc) (eventP, &eventT); + *eventP = eventT; + } + + p = (long *)(((xEvent *) & stuff[1]) + stuff->num_events); + for (i = 0; i < stuff->count; i++) { + swapl(p, n); + p++; + } + return (ProcXSendExtensionEvent(client)); +} + +/*********************************************************************** + * + * Send an event to some client, as if it had come from an extension input + * device. + * + */ + +int +ProcXSendExtensionEvent(ClientPtr client) +{ + int ret; + DeviceIntPtr dev; + xEvent *first; + XEventClass *list; + struct tmask tmp[EMASKSIZE]; + + REQUEST(xSendExtensionEventReq); + REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq); + + if (stuff->length != (sizeof(xSendExtensionEventReq) >> 2) + stuff->count + + (stuff->num_events * (sizeof(xEvent) >> 2))) { + SendErrorToClient(client, IReqCode, X_SendExtensionEvent, 0, BadLength); + return Success; + } + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_SendExtensionEvent, 0, BadDevice); + return Success; + } + + /* The client's event type must be one defined by an extension. */ + + first = ((xEvent *) & stuff[1]); + if (!((EXTENSION_EVENT_BASE <= first->u.u.type) && + (first->u.u.type < lastEvent))) { + client->errorValue = first->u.u.type; + SendErrorToClient(client, IReqCode, X_SendExtensionEvent, 0, BadValue); + return Success; + } + + list = (XEventClass *) (first + stuff->num_events); + if ((ret = CreateMaskFromList(client, list, stuff->count, tmp, dev, + X_SendExtensionEvent)) != Success) + return Success; + + ret = (SendEvent(client, dev, stuff->destination, + stuff->propagate, (xEvent *) & stuff[1], + tmp[stuff->deviceid].mask, stuff->num_events)); + + if (ret != Success) + SendErrorToClient(client, IReqCode, X_SendExtensionEvent, 0, ret); + + return Success; +} diff --git a/xorg-server-1.4/Xi/sendexev.h b/xorg-server-1.4/Xi/sendexev.h new file mode 100644 index 0000000..e156f1b --- /dev/null +++ b/xorg-server-1.4/Xi/sendexev.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef SENDEXEV_H +#define SENDEXEV_H 1 + +int SProcXSendExtensionEvent(ClientPtr /* client */ + ); + +int ProcXSendExtensionEvent(ClientPtr /* client */ + ); + +#endif /* SENDEXEV_H */ diff --git a/xorg-server-1.4/Xi/setbmap.c b/xorg-server-1.4/Xi/setbmap.c new file mode 100644 index 0000000..bdfa513 --- /dev/null +++ b/xorg-server-1.4/Xi/setbmap.c @@ -0,0 +1,157 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Request to change the button mapping of an extension device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#define IsOn(ptr, bit) \ + (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))) + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "exevents.h" +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "setbmap.h" + +/*********************************************************************** + * + * This procedure changes the button mapping. + * + */ + +int +SProcXSetDeviceButtonMapping(ClientPtr client) +{ + char n; + + REQUEST(xSetDeviceButtonMappingReq); + swaps(&stuff->length, n); + return (ProcXSetDeviceButtonMapping(client)); +} + +/*********************************************************************** + * + * This procedure lists the input devices available to the server. + * + */ + +int +ProcXSetDeviceButtonMapping(ClientPtr client) +{ + int ret; + xSetDeviceButtonMappingReply rep; + DeviceIntPtr dev; + + REQUEST(xSetDeviceButtonMappingReq); + REQUEST_AT_LEAST_SIZE(xSetDeviceButtonMappingReq); + + if (stuff->length != (sizeof(xSetDeviceButtonMappingReq) + + stuff->map_length + 3) >> 2) { + SendErrorToClient(client, IReqCode, X_SetDeviceButtonMapping, 0, + BadLength); + return Success; + } + + rep.repType = X_Reply; + rep.RepType = X_SetDeviceButtonMapping; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.status = MappingSuccess; + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_SetDeviceButtonMapping, 0, + BadDevice); + return Success; + } + + ret = SetButtonMapping(client, dev, stuff->map_length, (BYTE *) & stuff[1]); + + if (ret == BadValue || ret == BadMatch) { + SendErrorToClient(client, IReqCode, X_SetDeviceButtonMapping, 0, ret); + return Success; + } else { + rep.status = ret; + WriteReplyToClient(client, sizeof(xSetDeviceButtonMappingReply), &rep); + } + + if (ret != MappingBusy) + SendDeviceMappingNotify(MappingPointer, 0, 0, dev); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XSetDeviceButtonMapping function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXSetDeviceButtonMapping(ClientPtr client, int size, + xSetDeviceButtonMappingReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/setbmap.h b/xorg-server-1.4/Xi/setbmap.h new file mode 100644 index 0000000..20ad8e0 --- /dev/null +++ b/xorg-server-1.4/Xi/setbmap.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef SETBMAP_H +#define SETBMAP_H 1 + +int SProcXSetDeviceButtonMapping(ClientPtr /* client */ + ); + +int ProcXSetDeviceButtonMapping(ClientPtr /* client */ + ); + +void SRepXSetDeviceButtonMapping(ClientPtr /* client */ , + int /* size */ , + xSetDeviceButtonMappingReply * /* rep */ + ); + +#endif /* SETBMAP_H */ diff --git a/xorg-server-1.4/Xi/setdval.c b/xorg-server-1.4/Xi/setdval.c new file mode 100644 index 0000000..e947a74 --- /dev/null +++ b/xorg-server-1.4/Xi/setdval.c @@ -0,0 +1,160 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Request to change the mode of an extension input device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "XIstubs.h" +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "setdval.h" + +/*********************************************************************** + * + * Handle a request from a client with a different byte order. + * + */ + +int +SProcXSetDeviceValuators(ClientPtr client) +{ + char n; + + REQUEST(xSetDeviceValuatorsReq); + swaps(&stuff->length, n); + return (ProcXSetDeviceValuators(client)); +} + +/*********************************************************************** + * + * This procedure sets the value of valuators on an extension input device. + * + */ + +int +ProcXSetDeviceValuators(ClientPtr client) +{ + DeviceIntPtr dev; + xSetDeviceValuatorsReply rep; + + REQUEST(xSetDeviceValuatorsReq); + REQUEST_AT_LEAST_SIZE(xSetDeviceValuatorsReq); + + rep.repType = X_Reply; + rep.RepType = X_SetDeviceValuators; + rep.length = 0; + rep.status = Success; + rep.sequenceNumber = client->sequence; + + if (stuff->length != (sizeof(xSetDeviceValuatorsReq) >> 2) + + stuff->num_valuators) { + SendErrorToClient(client, IReqCode, X_SetDeviceValuators, 0, BadLength); + return Success; + } + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_SetDeviceValuators, 0, BadDevice); + return Success; + } + if (dev->valuator == NULL) { + SendErrorToClient(client, IReqCode, X_SetDeviceValuators, 0, BadMatch); + return Success; + } + + if (stuff->first_valuator + stuff->num_valuators > dev->valuator->numAxes) { + SendErrorToClient(client, IReqCode, X_SetDeviceValuators, 0, BadValue); + return Success; + } + + if ((dev->grab) && !SameClient(dev->grab, client)) + rep.status = AlreadyGrabbed; + else + rep.status = SetDeviceValuators(client, dev, (int *)&stuff[1], + stuff->first_valuator, + stuff->num_valuators); + + if (rep.status != Success && rep.status != AlreadyGrabbed) + SendErrorToClient(client, IReqCode, X_SetDeviceValuators, 0, + rep.status); + else + WriteReplyToClient(client, sizeof(xSetDeviceValuatorsReply), &rep); + + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XSetDeviceValuators function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXSetDeviceValuators(ClientPtr client, int size, + xSetDeviceValuatorsReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/setdval.h b/xorg-server-1.4/Xi/setdval.h new file mode 100644 index 0000000..40b4317 --- /dev/null +++ b/xorg-server-1.4/Xi/setdval.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef SETDVAL_H +#define SETDVAL_H 1 + +int SProcXSetDeviceValuators(ClientPtr /* client */ + ); + +int ProcXSetDeviceValuators(ClientPtr /* client */ + ); + +void SRepXSetDeviceValuators(ClientPtr /* client */ , + int /* size */ , + xSetDeviceValuatorsReply * /* rep */ + ); + +#endif /* SETDVAL_H */ diff --git a/xorg-server-1.4/Xi/setfocus.c b/xorg-server-1.4/Xi/setfocus.c new file mode 100644 index 0000000..aaf88ce --- /dev/null +++ b/xorg-server-1.4/Xi/setfocus.c @@ -0,0 +1,120 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Request to set the focus for an extension device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "windowstr.h" /* focus struct */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include + +#include "dixevents.h" + +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "setfocus.h" + +/*********************************************************************** + * + * This procedure sets the focus for a device. + * + */ + +int +SProcXSetDeviceFocus(ClientPtr client) +{ + char n; + + REQUEST(xSetDeviceFocusReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xSetDeviceFocusReq); + swapl(&stuff->focus, n); + swapl(&stuff->time, n); + return (ProcXSetDeviceFocus(client)); +} + +/*********************************************************************** + * + * This procedure sets the focus for a device. + * + */ + +int +ProcXSetDeviceFocus(ClientPtr client) +{ + int ret; + DeviceIntPtr dev; + + REQUEST(xSetDeviceFocusReq); + REQUEST_SIZE_MATCH(xSetDeviceFocusReq); + + dev = LookupDeviceIntRec(stuff->device); + if (dev == NULL || !dev->focus) { + SendErrorToClient(client, IReqCode, X_SetDeviceFocus, 0, BadDevice); + return Success; + } + + ret = SetInputFocus(client, dev, stuff->focus, stuff->revertTo, + stuff->time, TRUE); + if (ret != Success) + SendErrorToClient(client, IReqCode, X_SetDeviceFocus, 0, ret); + + return Success; +} diff --git a/xorg-server-1.4/Xi/setfocus.h b/xorg-server-1.4/Xi/setfocus.h new file mode 100644 index 0000000..3a49f84 --- /dev/null +++ b/xorg-server-1.4/Xi/setfocus.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef SETFOCUS_H +#define SETFOCUS_H 1 + +int SProcXSetDeviceFocus(ClientPtr /* client */ + ); + +int ProcXSetDeviceFocus(ClientPtr /* client */ + ); + +#endif /* SETFOCUS_H */ diff --git a/xorg-server-1.4/Xi/setmmap.c b/xorg-server-1.4/Xi/setmmap.c new file mode 100644 index 0000000..0078499 --- /dev/null +++ b/xorg-server-1.4/Xi/setmmap.c @@ -0,0 +1,153 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/******************************************************************** + * + * Set modifier mapping for an extension device. + * + */ + +#define NEED_EVENTS /* for inputstr.h */ +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "exevents.h" +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "setmmap.h" + +/*********************************************************************** + * + * This procedure sets the modifier mapping for an extension device, + * for clients on machines with a different byte ordering than the server. + * + */ + +int +SProcXSetDeviceModifierMapping(ClientPtr client) +{ + char n; + + REQUEST(xSetDeviceModifierMappingReq); + swaps(&stuff->length, n); + return (ProcXSetDeviceModifierMapping(client)); +} + +/*********************************************************************** + * + * Set the device Modifier mapping. + * + */ + +int +ProcXSetDeviceModifierMapping(ClientPtr client) +{ + int ret; + xSetDeviceModifierMappingReply rep; + DeviceIntPtr dev; + KeyClassPtr kp; + + REQUEST(xSetDeviceModifierMappingReq); + REQUEST_AT_LEAST_SIZE(xSetDeviceModifierMappingReq); + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_SetDeviceModifierMapping, 0, + BadDevice); + return Success; + } + + rep.repType = X_Reply; + rep.RepType = X_SetDeviceModifierMapping; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + ret = SetModifierMapping(client, dev, stuff->length, + (sizeof(xSetDeviceModifierMappingReq) >> 2), + stuff->numKeyPerModifier, (BYTE *) & stuff[1], + &kp); + + if (ret == MappingSuccess || ret == MappingBusy || ret == MappingFailed) { + rep.success = ret; + if (ret == MappingSuccess) + SendDeviceMappingNotify(MappingModifier, 0, 0, dev); + WriteReplyToClient(client, sizeof(xSetDeviceModifierMappingReply), + &rep); + } else { + if (ret == -1) + ret = BadValue; + SendErrorToClient(client, IReqCode, X_SetDeviceModifierMapping, 0, ret); + } + + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XSetDeviceModifierMapping function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXSetDeviceModifierMapping(ClientPtr client, int size, + xSetDeviceModifierMappingReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/setmmap.h b/xorg-server-1.4/Xi/setmmap.h new file mode 100644 index 0000000..9b345da --- /dev/null +++ b/xorg-server-1.4/Xi/setmmap.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef SETMMAP_H +#define SETMMAP_H 1 + +int SProcXSetDeviceModifierMapping(ClientPtr /* client */ + ); + +int ProcXSetDeviceModifierMapping(ClientPtr /* client */ + ); + +void SRepXSetDeviceModifierMapping(ClientPtr /* client */ , + int /* size */ , + xSetDeviceModifierMappingReply * /* rep */ + ); + +#endif /* SETMMAP_H */ diff --git a/xorg-server-1.4/Xi/setmode.c b/xorg-server-1.4/Xi/setmode.c new file mode 100644 index 0000000..688f2a2 --- /dev/null +++ b/xorg-server-1.4/Xi/setmode.c @@ -0,0 +1,147 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Request to change the mode of an extension input device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include +#include "XIstubs.h" +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "setmode.h" + +/*********************************************************************** + * + * Handle a request from a client with a different byte order. + * + */ + +int +SProcXSetDeviceMode(ClientPtr client) +{ + char n; + + REQUEST(xSetDeviceModeReq); + swaps(&stuff->length, n); + return (ProcXSetDeviceMode(client)); +} + +/*********************************************************************** + * + * This procedure sets the mode of a device. + * + */ + +int +ProcXSetDeviceMode(ClientPtr client) +{ + DeviceIntPtr dev; + xSetDeviceModeReply rep; + + REQUEST(xSetDeviceModeReq); + REQUEST_SIZE_MATCH(xSetDeviceModeReq); + + rep.repType = X_Reply; + rep.RepType = X_SetDeviceMode; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_SetDeviceMode, 0, BadDevice); + return Success; + } + if (dev->valuator == NULL) { + SendErrorToClient(client, IReqCode, X_SetDeviceMode, 0, BadMatch); + return Success; + } + if ((dev->grab) && !SameClient(dev->grab, client)) + rep.status = AlreadyGrabbed; + else + rep.status = SetDeviceMode(client, dev, stuff->mode); + + if (rep.status == Success) + dev->valuator->mode = stuff->mode; + else if (rep.status != AlreadyGrabbed) { + SendErrorToClient(client, IReqCode, X_SetDeviceMode, 0, rep.status); + return Success; + } + + WriteReplyToClient(client, sizeof(xSetDeviceModeReply), &rep); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XSetDeviceMode function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXSetDeviceMode(ClientPtr client, int size, xSetDeviceModeReply * rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/xorg-server-1.4/Xi/setmode.h b/xorg-server-1.4/Xi/setmode.h new file mode 100644 index 0000000..021bfa0 --- /dev/null +++ b/xorg-server-1.4/Xi/setmode.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef SETMODE_H +#define SETMODE_H 1 + +int SProcXSetDeviceMode(ClientPtr /* client */ + ); + +int ProcXSetDeviceMode(ClientPtr /* client */ + ); + +void SRepXSetDeviceMode(ClientPtr /* client */ , + int /* size */ , + xSetDeviceModeReply * /* rep */ + ); + +#endif /* SETMODE_H */ diff --git a/xorg-server-1.4/Xi/stubs.c b/xorg-server-1.4/Xi/stubs.c new file mode 100644 index 0000000..40cd02f --- /dev/null +++ b/xorg-server-1.4/Xi/stubs.c @@ -0,0 +1,244 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/* + * stubs.c -- stub routines for the X server side of the XINPUT + * extension. This file is mainly to be used only as documentation. + * There is not much code here, and you can't get a working XINPUT + * server just using this. + * The Xvfb server uses this file so it will compile with the same + * object files as the real X server for a platform that has XINPUT. + * Xnest could do the same thing. + */ + +#define NEED_EVENTS +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "inputstr.h" +#include +#include +#include "XIstubs.h" + +/*********************************************************************** + * + * Caller: ProcXCloseDevice + * + * Take care of implementation-dependent details of closing a device. + * Some implementations may actually close the device, others may just + * remove this clients interest in that device. + * + * The default implementation is to do nothing (assume all input devices + * are initialized during X server initialization and kept open). + * + */ + +void +CloseInputDevice(DeviceIntPtr d, ClientPtr client) +{ +} + +/*********************************************************************** + * + * Caller: ProcXListInputDevices + * + * This is the implementation-dependent routine to initialize an input + * device to the point that information about it can be listed. + * Some implementations open all input devices when the server is first + * initialized, and never close them. Other implementations open only + * the X pointer and keyboard devices during server initialization, + * and only open other input devices when some client makes an + * XOpenDevice request. If some other process has the device open, the + * server may not be able to get information about the device to list it. + * + * This procedure should be used by implementations that do not initialize + * all input devices at server startup. It should do device-dependent + * initialization for any devices not previously initialized, and call + * AddInputDevice for each of those devices so that a DeviceIntRec will be + * created for them. + * + * The default implementation is to do nothing (assume all input devices + * are initialized during X server initialization and kept open). + * The commented-out sample code shows what you might do if you don't want + * the default. + * + */ + +void +AddOtherInputDevices(void) +{ + /********************************************************************** + for each uninitialized device, do something like: + + DeviceIntPtr dev; + DeviceProc deviceProc; + pointer private; + + dev = (DeviceIntPtr) AddInputDevice(deviceProc, TRUE); + dev->public.devicePrivate = private; + RegisterOtherDevice(dev); + dev->inited = ((*dev->deviceProc)(dev, DEVICE_INIT) == Success); + ************************************************************************/ + +} + +/*********************************************************************** + * + * Caller: ProcXOpenDevice + * + * This is the implementation-dependent routine to open an input device. + * Some implementations open all input devices when the server is first + * initialized, and never close them. Other implementations open only + * the X pointer and keyboard devices during server initialization, + * and only open other input devices when some client makes an + * XOpenDevice request. This entry point is for the latter type of + * implementation. + * + * If the physical device is not already open, do it here. In this case, + * you need to keep track of the fact that one or more clients has the + * device open, and physically close it when the last client that has + * it open does an XCloseDevice. + * + * The default implementation is to do nothing (assume all input devices + * are opened during X server initialization and kept open). + * + */ + +void +OpenInputDevice(DeviceIntPtr dev, ClientPtr client, int *status) +{ +} + +/**************************************************************************** + * + * Caller: ProcXSetDeviceMode + * + * Change the mode of an extension device. + * This function is used to change the mode of a device from reporting + * relative motion to reporting absolute positional information, and + * vice versa. + * The default implementation below is that no such devices are supported. + * + */ + +int +SetDeviceMode(ClientPtr client, DeviceIntPtr dev, int mode) +{ + return BadMatch; +} + +/**************************************************************************** + * + * Caller: ProcXSetDeviceValuators + * + * Set the value of valuators on an extension input device. + * This function is used to set the initial value of valuators on + * those input devices that are capable of reporting either relative + * motion or an absolute position, and allow an initial position to be set. + * The default implementation below is that no such devices are supported. + * + */ + +int +SetDeviceValuators(ClientPtr client, DeviceIntPtr dev, + int *valuators, int first_valuator, int num_valuators) +{ + return BadMatch; +} + +/**************************************************************************** + * + * Caller: ProcXChangeDeviceControl + * + * Change the specified device controls on an extension input device. + * + */ + +int +ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev, + xDeviceCtl * control) +{ + switch (control->control) { + case DEVICE_RESOLUTION: + return (BadMatch); + case DEVICE_ABS_CALIB: + case DEVICE_ABS_AREA: + return (BadMatch); + case DEVICE_CORE: + return (BadMatch); + default: + return (BadMatch); + } +} + + +/**************************************************************************** + * + * Caller: configAddDevice (and others) + * + * Add a new device with the specified options. + * + */ +int +NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev) +{ + return BadValue; +} + +/**************************************************************************** + * + * Caller: configRemoveDevice (and others) + * + * Remove the specified device previously added. + * + */ +void +DeleteInputDeviceRequest(DeviceIntPtr dev) +{ +} diff --git a/xorg-server-1.4/Xi/ungrdev.c b/xorg-server-1.4/Xi/ungrdev.c new file mode 100644 index 0000000..0abbd2e --- /dev/null +++ b/xorg-server-1.4/Xi/ungrdev.c @@ -0,0 +1,117 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Request to release a grab of an extension device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exglobals.h" + +#include "ungrdev.h" + +/*********************************************************************** + * + * Handle requests from a client with a different byte order. + * + */ + +int +SProcXUngrabDevice(ClientPtr client) +{ + char n; + + REQUEST(xUngrabDeviceReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xUngrabDeviceReq); + swapl(&stuff->time, n); + return (ProcXUngrabDevice(client)); +} + +/*********************************************************************** + * + * Release a grab of an extension device. + * + */ + +int +ProcXUngrabDevice(ClientPtr client) +{ + DeviceIntPtr dev; + GrabPtr grab; + TimeStamp time; + + REQUEST(xUngrabDeviceReq); + REQUEST_SIZE_MATCH(xUngrabDeviceReq); + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_UngrabDevice, 0, BadDevice); + return Success; + } + grab = dev->grab; + + time = ClientTimeToServerTime(stuff->time); + if ((CompareTimeStamps(time, currentTime) != LATER) && + (CompareTimeStamps(time, dev->grabTime) != EARLIER) && + (grab) && SameClient(grab, client)) + (*dev->DeactivateGrab) (dev); + return Success; +} diff --git a/xorg-server-1.4/Xi/ungrdev.h b/xorg-server-1.4/Xi/ungrdev.h new file mode 100644 index 0000000..8e3c210 --- /dev/null +++ b/xorg-server-1.4/Xi/ungrdev.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef UNGRDEV_H +#define UNGRDEV_H 1 + +int SProcXUngrabDevice(ClientPtr /* client */ + ); + +int ProcXUngrabDevice(ClientPtr /* client */ + ); + +#endif /* UNGRDEV_H */ diff --git a/xorg-server-1.4/Xi/ungrdevb.c b/xorg-server-1.4/Xi/ungrdevb.c new file mode 100644 index 0000000..b9f236b --- /dev/null +++ b/xorg-server-1.4/Xi/ungrdevb.c @@ -0,0 +1,162 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Request to release a grab of a button on an extension device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#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" +#include "dixgrabs.h" + +#include "ungrdevb.h" + +#define AllModifiersMask ( \ + ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ + Mod3Mask | Mod4Mask | Mod5Mask ) + +/*********************************************************************** + * + * Handle requests from a client with a different byte order. + * + */ + +int +SProcXUngrabDeviceButton(ClientPtr client) +{ + char n; + + REQUEST(xUngrabDeviceButtonReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq); + swapl(&stuff->grabWindow, n); + swaps(&stuff->modifiers, n); + return (ProcXUngrabDeviceButton(client)); +} + +/*********************************************************************** + * + * Release a grab of a button on an extension device. + * + */ + +int +ProcXUngrabDeviceButton(ClientPtr client) +{ + DeviceIntPtr dev; + DeviceIntPtr mdev; + WindowPtr pWin; + GrabRec temporaryGrab; + int rc; + + REQUEST(xUngrabDeviceButtonReq); + REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq); + + dev = LookupDeviceIntRec(stuff->grabbed_device); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadDevice); + return Success; + } + if (dev->button == NULL) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadMatch); + return Success; + } + + if (stuff->modifier_device != UseXKeyboard) { + mdev = LookupDeviceIntRec(stuff->modifier_device); + if (mdev == NULL) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, + BadDevice); + return Success; + } + if (mdev->key == NULL) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, + BadMatch); + return Success; + } + } else + mdev = (DeviceIntPtr) LookupKeyboardDevice(); + + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess); + if (rc != Success) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, rc); + return Success; + } + + if ((stuff->modifiers != AnyModifier) && + (stuff->modifiers & ~AllModifiersMask)) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadValue); + return Success; + } + + temporaryGrab.resource = client->clientAsMask; + temporaryGrab.device = dev; + temporaryGrab.window = pWin; + temporaryGrab.type = DeviceButtonPress; + temporaryGrab.modifierDevice = mdev; + temporaryGrab.modifiersDetail.exact = stuff->modifiers; + temporaryGrab.modifiersDetail.pMask = NULL; + temporaryGrab.detail.exact = stuff->button; + temporaryGrab.detail.pMask = NULL; + + DeletePassiveGrabFromList(&temporaryGrab); + return Success; +} diff --git a/xorg-server-1.4/Xi/ungrdevb.h b/xorg-server-1.4/Xi/ungrdevb.h new file mode 100644 index 0000000..400d61d --- /dev/null +++ b/xorg-server-1.4/Xi/ungrdevb.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef UNGRDEVB_H +#define UNGRDEVB_H 1 + +int SProcXUngrabDeviceButton(ClientPtr /* client */ + ); + +int ProcXUngrabDeviceButton(ClientPtr /* client */ + ); + +#endif /* UNGRDEVB_H */ diff --git a/xorg-server-1.4/Xi/ungrdevk.c b/xorg-server-1.4/Xi/ungrdevk.c new file mode 100644 index 0000000..d316990 --- /dev/null +++ b/xorg-server-1.4/Xi/ungrdevk.c @@ -0,0 +1,166 @@ +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +/*********************************************************************** + * + * Request to release a grab of a key on an extension device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#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" +#include "dixgrabs.h" + +#include "ungrdevk.h" + +#define AllModifiersMask ( \ + ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ + Mod3Mask | Mod4Mask | Mod5Mask ) + +/*********************************************************************** + * + * Handle requests from a client with a different byte order. + * + */ + +int +SProcXUngrabDeviceKey(ClientPtr client) +{ + char n; + + REQUEST(xUngrabDeviceKeyReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq); + swapl(&stuff->grabWindow, n); + swaps(&stuff->modifiers, n); + return (ProcXUngrabDeviceKey(client)); +} + +/*********************************************************************** + * + * Release a grab of a key on an extension device. + * + */ + +int +ProcXUngrabDeviceKey(ClientPtr client) +{ + DeviceIntPtr dev; + DeviceIntPtr mdev; + WindowPtr pWin; + GrabRec temporaryGrab; + int rc; + + REQUEST(xUngrabDeviceKeyReq); + REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq); + + dev = LookupDeviceIntRec(stuff->grabbed_device); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadDevice); + return Success; + } + if (dev->key == NULL) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadMatch); + return Success; + } + + if (stuff->modifier_device != UseXKeyboard) { + mdev = LookupDeviceIntRec(stuff->modifier_device); + if (mdev == NULL) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, + BadDevice); + return Success; + } + if (mdev->key == NULL) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadMatch); + return Success; + } + } else + mdev = (DeviceIntPtr) LookupKeyboardDevice(); + + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess); + if (rc != Success) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, rc); + return Success; + } + if (((stuff->key > dev->key->curKeySyms.maxKeyCode) || + (stuff->key < dev->key->curKeySyms.minKeyCode)) + && (stuff->key != AnyKey)) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadValue); + return Success; + } + if ((stuff->modifiers != AnyModifier) && + (stuff->modifiers & ~AllModifiersMask)) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadValue); + return Success; + } + + temporaryGrab.resource = client->clientAsMask; + temporaryGrab.device = dev; + temporaryGrab.window = pWin; + temporaryGrab.type = DeviceKeyPress; + temporaryGrab.modifierDevice = mdev; + temporaryGrab.modifiersDetail.exact = stuff->modifiers; + temporaryGrab.modifiersDetail.pMask = NULL; + temporaryGrab.detail.exact = stuff->key; + temporaryGrab.detail.pMask = NULL; + + DeletePassiveGrabFromList(&temporaryGrab); + return Success; +} diff --git a/xorg-server-1.4/Xi/ungrdevk.h b/xorg-server-1.4/Xi/ungrdevk.h new file mode 100644 index 0000000..9dec17a --- /dev/null +++ b/xorg-server-1.4/Xi/ungrdevk.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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_DIX_CONFIG_H +#include +#endif + +#ifndef UNGRDEVK_H +#define UNGRDEVK_H 1 + +int SProcXUngrabDeviceKey(ClientPtr /* client */ + ); + +int ProcXUngrabDeviceKey(ClientPtr /* client */ + ); + +#endif /* UNGRDEVK_H */ diff --git a/xorg-server-1.4/acinclude.m4 b/xorg-server-1.4/acinclude.m4 new file mode 100644 index 0000000..f3d8734 --- /dev/null +++ b/xorg-server-1.4/acinclude.m4 @@ -0,0 +1,47 @@ +##### http://autoconf-archive.cryp.to/ac_define_dir.html +# +# SYNOPSIS +# +# AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) +# +# DESCRIPTION +# +# This macro sets VARNAME to the expansion of the DIR variable, +# taking care of fixing up ${prefix} and such. +# +# VARNAME is then offered as both an output variable and a C +# preprocessor symbol. +# +# Example: +# +# AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.]) +# +# LAST MODIFICATION +# +# 2006-10-13 +# +# COPYLEFT +# +# Copyright (c) 2006 Stepan Kasal +# Copyright (c) 2006 Andreas Schwab +# Copyright (c) 2006 Guido U. Draheim +# Copyright (c) 2006 Alexandre Oliva +# +# Copying and distribution of this file, with or without +# modification, are permitted in any medium without royalty provided +# the copyright notice and this notice are preserved. + +AC_DEFUN([AC_DEFINE_DIR], [ + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix +dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn +dnl refers to ${prefix}. Thus we have to use `eval' twice. + eval ac_define_dir="\"[$]$2\"" + eval ac_define_dir="\"$ac_define_dir\"" + AC_SUBST($1, "$ac_define_dir") + AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3]) + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE +]) diff --git a/xorg-server-1.4/aclocal.m4 b/xorg-server-1.4/aclocal.m4 new file mode 100644 index 0000000..1763958 --- /dev/null +++ b/xorg-server-1.4/aclocal.m4 @@ -0,0 +1,8062 @@ +# generated automatically by aclocal 1.10 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_if(m4_PACKAGE_VERSION, [2.61],, +[m4_fatal([this file was generated for autoconf 2.61. +You have another version of autoconf. If you want to use that, +you should regenerate the build system entirely.], [63])]) + +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# +# Copyright © 2004 Scott James Remnant . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# 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. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi + +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# +# Similar to PKG_CHECK_MODULES, make sure that the first instance of +# this or PKG_CHECK_MODULES is called, or make sure to call +# PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_ifval([$2], [$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$PKG_CONFIG"; then + if test -n "$$1"; then + pkg_cv_[]$1="$$1" + else + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + fi +else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + ifelse([$4], , [AC_MSG_ERROR(dnl +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) +elif test $pkg_failed = untried; then + ifelse([$4], , [AC_MSG_FAILURE(dnl +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .])], + [$4]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + ifelse([$3], , :, [$3]) +fi[]dnl +])# PKG_CHECK_MODULES + +dnl +dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. +dnl +dnl Permission is hereby granted, free of charge, to any person obtaining a +dnl copy of this software and associated documentation files (the +dnl "Software"), to deal in the Software without restriction, including +dnl without limitation the rights to use, copy, modify, merge, publish, +dnl distribute, and/or sell copies of the Software, and to permit persons +dnl to whom the Software is furnished to do so, provided that the above +dnl copyright notice(s) and this permission notice appear in all copies of +dnl the Software and that both the above copyright notice(s) and this +dnl permission notice appear in supporting documentation. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL +dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING +dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +dnl +dnl Except as contained in this notice, the name of a copyright holder +dnl shall not be used in advertising or otherwise to promote the sale, use +dnl or other dealings in this Software without prior written authorization +dnl of the copyright holder. + +# XORG_MACROS_VERSION(required-version) +# ------------------------------------- +# Minimum version: 1.1.0 +# +# If you're using a macro added in Version 1.1 or newer, include this in +# your configure.ac with the minimum required version, such as: +# XORG_MACROS_VERSION(1.1) +# +# To force at least a version with this macro defined, also add: +# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) +# +# +# See the "minimum version" comment for each macro you use to see what +# version you require. +AC_DEFUN([XORG_MACROS_VERSION],[ + [XORG_MACROS_needed_version=$1 + XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` + XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] + AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) + [XORG_MACROS_version=1.1.5 + XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` + XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] + if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then + AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) + fi + if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then + AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) + fi + AC_MSG_RESULT([yes, $XORG_MACROS_version]) +]) # XORG_MACROS_VERSION + +# XORG_PROG_RAWCPP() +# ------------------ +# Minimum version: 1.0.0 +# +# Find cpp program and necessary flags for use in pre-processing text files +# such as man pages and config files +AC_DEFUN([XORG_PROG_RAWCPP],[ +AC_REQUIRE([AC_PROG_CPP]) +AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], + [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) + +# Check for flag to avoid builtin definitions - assumes unix is predefined, +# which is not the best choice for supporting other OS'es, but covers most +# of the ones we need for now. +AC_MSG_CHECKING([if $RAWCPP requires -undef]) +AC_LANG_CONFTEST([Does cpp redefine unix ?]) +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + AC_MSG_RESULT([no]) +else + if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS=-undef + AC_MSG_RESULT([yes]) + else + AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) + fi +fi +rm -f conftest.$ac_ext + +AC_MSG_CHECKING([if $RAWCPP requires -traditional]) +AC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + AC_MSG_RESULT([no]) +else + if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" + AC_MSG_RESULT([yes]) + else + AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) + fi +fi +rm -f conftest.$ac_ext +AC_SUBST(RAWCPPFLAGS) +]) # XORG_PROG_RAWCPP + +# XORG_MANPAGE_SECTIONS() +# ----------------------- +# Minimum version: 1.0.0 +# +# Determine which sections man pages go in for the different man page types +# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. +# Not sure if there's any better way than just hardcoding by OS name. +# Override default settings by setting environment variables + +AC_DEFUN([XORG_MANPAGE_SECTIONS],[ +AC_REQUIRE([AC_CANONICAL_HOST]) + +if test x$APP_MAN_SUFFIX = x ; then + APP_MAN_SUFFIX=1 +fi +if test x$APP_MAN_DIR = x ; then + APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' +fi + +if test x$LIB_MAN_SUFFIX = x ; then + LIB_MAN_SUFFIX=3 +fi +if test x$LIB_MAN_DIR = x ; then + LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' +fi + +if test x$FILE_MAN_SUFFIX = x ; then + case $host_os in + solaris*) FILE_MAN_SUFFIX=4 ;; + *) FILE_MAN_SUFFIX=5 ;; + esac +fi +if test x$FILE_MAN_DIR = x ; then + FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' +fi + +if test x$MISC_MAN_SUFFIX = x ; then + case $host_os in + solaris*) MISC_MAN_SUFFIX=5 ;; + *) MISC_MAN_SUFFIX=7 ;; + esac +fi +if test x$MISC_MAN_DIR = x ; then + MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' +fi + +if test x$DRIVER_MAN_SUFFIX = x ; then + case $host_os in + solaris*) DRIVER_MAN_SUFFIX=7 ;; + *) DRIVER_MAN_SUFFIX=4 ;; + esac +fi +if test x$DRIVER_MAN_DIR = x ; then + DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' +fi + +if test x$ADMIN_MAN_SUFFIX = x ; then + case $host_os in + solaris*) ADMIN_MAN_SUFFIX=1m ;; + *) ADMIN_MAN_SUFFIX=8 ;; + esac +fi +if test x$ADMIN_MAN_DIR = x ; then + ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' +fi + + +AC_SUBST([APP_MAN_SUFFIX]) +AC_SUBST([LIB_MAN_SUFFIX]) +AC_SUBST([FILE_MAN_SUFFIX]) +AC_SUBST([MISC_MAN_SUFFIX]) +AC_SUBST([DRIVER_MAN_SUFFIX]) +AC_SUBST([ADMIN_MAN_SUFFIX]) +AC_SUBST([APP_MAN_DIR]) +AC_SUBST([LIB_MAN_DIR]) +AC_SUBST([FILE_MAN_DIR]) +AC_SUBST([MISC_MAN_DIR]) +AC_SUBST([DRIVER_MAN_DIR]) +AC_SUBST([ADMIN_MAN_DIR]) +]) # XORG_MANPAGE_SECTIONS + +# XORG_CHECK_LINUXDOC +# ------------------- +# Minimum version: 1.0.0 +# +# Defines the variable MAKE_TEXT if the necessary tools and +# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. +# Whether or not the necessary tools and files are found can be checked +# with the AM_CONDITIONAL "BUILD_LINUXDOC" +AC_DEFUN([XORG_CHECK_LINUXDOC],[ +XORG_SGML_PATH=$prefix/share/sgml +HAVE_DEFS_ENT= + +AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) + +AC_PATH_PROG(LINUXDOC, linuxdoc) +AC_PATH_PROG(PS2PDF, ps2pdf) + +AC_MSG_CHECKING([Whether to build documentation]) + +if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then + BUILDDOC=yes +else + BUILDDOC=no +fi + +AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) + +AC_MSG_RESULT([$BUILDDOC]) + +AC_MSG_CHECKING([Whether to build pdf documentation]) + +if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then + BUILDPDFDOC=yes +else + BUILDPDFDOC=no +fi + +AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) + +AC_MSG_RESULT([$BUILDPDFDOC]) + +MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" +MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" +MAKE_PDF="$PS2PDF" +MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" + +AC_SUBST(MAKE_TEXT) +AC_SUBST(MAKE_PS) +AC_SUBST(MAKE_PDF) +AC_SUBST(MAKE_HTML) +]) # XORG_CHECK_LINUXDOC + +# XORG_CHECK_DOCBOOK +# ------------------- +# Minimum version: 1.0.0 +# +# Checks for the ability to build output formats from SGML DocBook source. +# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" +# indicates whether the necessary tools and files are found and, if set, +# $(MAKE_XXX) blah.sgml will produce blah.xxx. +AC_DEFUN([XORG_CHECK_DOCBOOK],[ +XORG_SGML_PATH=$prefix/share/sgml +HAVE_DEFS_ENT= +BUILDTXTDOC=no +BUILDPDFDOC=no +BUILDPSDOC=no +BUILDHTMLDOC=no + +AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) + +AC_PATH_PROG(DOCBOOKPS, docbook2ps) +AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) +AC_PATH_PROG(DOCBOOKHTML, docbook2html) +AC_PATH_PROG(DOCBOOKTXT, docbook2txt) + +AC_MSG_CHECKING([Whether to build text documentation]) +if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && + test x$BUILD_TXTDOC != xno; then + BUILDTXTDOC=yes +fi +AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) +AC_MSG_RESULT([$BUILDTXTDOC]) + +AC_MSG_CHECKING([Whether to build PDF documentation]) +if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && + test x$BUILD_PDFDOC != xno; then + BUILDPDFDOC=yes +fi +AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) +AC_MSG_RESULT([$BUILDPDFDOC]) + +AC_MSG_CHECKING([Whether to build PostScript documentation]) +if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && + test x$BUILD_PSDOC != xno; then + BUILDPSDOC=yes +fi +AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) +AC_MSG_RESULT([$BUILDPSDOC]) + +AC_MSG_CHECKING([Whether to build HTML documentation]) +if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && + test x$BUILD_HTMLDOC != xno; then + BUILDHTMLDOC=yes +fi +AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) +AC_MSG_RESULT([$BUILDHTMLDOC]) + +MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" +MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" +MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" +MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" + +AC_SUBST(MAKE_TEXT) +AC_SUBST(MAKE_PS) +AC_SUBST(MAKE_PDF) +AC_SUBST(MAKE_HTML) +]) # XORG_CHECK_DOCBOOK + +# XORG_CHECK_MALLOC_ZERO +# ---------------------- +# Minimum version: 1.0.0 +# +# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if +# malloc(0) returns NULL. Packages should add one of these cflags to +# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. +AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ +AC_ARG_ENABLE(malloc0returnsnull, + AC_HELP_STRING([--enable-malloc0returnsnull], + [malloc(0) returns NULL (default: auto)]), + [MALLOC_ZERO_RETURNS_NULL=$enableval], + [MALLOC_ZERO_RETURNS_NULL=auto]) + +AC_MSG_CHECKING([whether malloc(0) returns NULL]) +if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then + AC_RUN_IFELSE([ +char *malloc(); +char *realloc(); +char *calloc(); +main() { + char *m0, *r0, *c0, *p; + m0 = malloc(0); + p = malloc(10); + r0 = realloc(p,0); + c0 = calloc(0); + exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); +}], + [MALLOC_ZERO_RETURNS_NULL=yes], + [MALLOC_ZERO_RETURNS_NULL=no]) +fi +AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) + +if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then + MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" + XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS + XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" +else + MALLOC_ZERO_CFLAGS="" + XMALLOC_ZERO_CFLAGS="" + XTMALLOC_ZERO_CFLAGS="" +fi + +AC_SUBST([MALLOC_ZERO_CFLAGS]) +AC_SUBST([XMALLOC_ZERO_CFLAGS]) +AC_SUBST([XTMALLOC_ZERO_CFLAGS]) +]) # XORG_CHECK_MALLOC_ZERO + +# XORG_WITH_LINT() +# ---------------- +# Minimum version: 1.1.0 +# +# Sets up flags for source checkers such as lint and sparse if --with-lint +# is specified. (Use --with-lint=sparse for sparse.) +# Sets $LINT to name of source checker passed with --with-lint (default: lint) +# Sets $LINT_FLAGS to flags to pass to source checker +# Sets LINT automake conditional if enabled (default: disabled) +# +AC_DEFUN([XORG_WITH_LINT],[ + +# Allow checking code with lint, sparse, etc. +AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], + [Use a lint-style source code checker (default: disabled)])], + [use_lint=$withval], [use_lint=no]) +if test "x$use_lint" = "xyes" ; then + LINT="lint" +else + LINT="$use_lint" +fi +if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then + case $LINT in + lint|*/lint) + case $host_os in + solaris*) + LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" + ;; + esac + ;; + esac +fi + +AC_SUBST(LINT) +AC_SUBST(LINT_FLAGS) +AM_CONDITIONAL(LINT, [test x$LINT != xno]) + +]) # XORG_WITH_LINT + +# XORG_LINT_LIBRARY(LIBNAME) +# -------------------------- +# Minimum version: 1.1.0 +# +# Sets up flags for building lint libraries for checking programs that call +# functions in the library. +# Disabled by default, enable with --enable-lint-library +# Sets: +# @LINTLIB@ - name of lint library file to make +# MAKE_LINT_LIB - automake conditional +# + +AC_DEFUN([XORG_LINT_LIBRARY],[ +AC_REQUIRE([XORG_WITH_LINT]) +# Build lint "library" for more indepth checks of programs calling this library +AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], + [Create lint library (default: disabled)])], + [make_lint_lib=$enableval], [make_lint_lib=no]) +if test "x$make_lint_lib" != "xno" ; then + if test "x$LINT" = "xno" ; then + AC_MSG_ERROR([Cannot make lint library without --with-lint]) + fi + if test "x$make_lint_lib" = "xyes" ; then + LINTLIB=llib-l$1.ln + else + LINTLIB=$make_lint_lib + fi +fi +AC_SUBST(LINTLIB) +AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) + +]) # XORG_LINT_LIBRARY + +dnl Copyright 2005 Red Hat, Inc +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. +dnl +dnl The above copyright notice and this permission notice shall be included +dnl in all copies or substantial portions of the Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +dnl OTHER DEALINGS IN THE SOFTWARE. +dnl +dnl Except as contained in this notice, the name of the copyright holders shall +dnl not be used in advertising or otherwise to promote the sale, use or +dnl other dealings in this Software without prior written authorization +dnl from the copyright holders. +dnl + +# XORG_RELEASE_VERSION +# -------------------- +# Adds --with/without-release-string and changes the PACKAGE and +# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If +# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also +# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. + +AC_DEFUN([XORG_RELEASE_VERSION],[ + AC_ARG_WITH(release-version, + AC_HELP_STRING([--with-release-version=STRING], + [Use release version string in package name]), + [RELEASE_VERSION="$withval"], + [RELEASE_VERSION=""]) + if test "x$RELEASE_VERSION" != "x"; then + PACKAGE="$PACKAGE-$RELEASE_VERSION" + PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" + AC_MSG_NOTICE([Building with package name set to $PACKAGE]) + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], + [`echo $PACKAGE_VERSION | cut -d . -f 1`], + [Major version of this package]) + PVM=`echo $PACKAGE_VERSION | cut -d . -f 2` + if test "x$PVM" = "x"; then + PVM="0" + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], + [$PVM], + [Minor version of this package]) + PVP=`echo $PACKAGE_VERSION | cut -d . -f 3` + if test "x$PVP" = "x"; then + PVP="0" + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], + [$PVP], + [Patch version of this package]) +]) + +dnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $ +dnl +dnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. +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. +dnl +dnl The above copyright notice and this permission notice shall be included +dnl in all copies or substantial portions of the Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +dnl OTHER DEALINGS IN THE SOFTWARE. +dnl +dnl Except as contained in this notice, the name of the copyright holders shall +dnl not be used in advertising or otherwise to promote the sale, use or +dnl other dealings in this Software without prior written authorization +dnl from the copyright holders. +dnl + +# XTRANS_TCP_FLAGS() +# ------------------ +# Find needed libraries for TCP sockets, and check for IPv6 support +AC_DEFUN([XTRANS_TCP_FLAGS],[ + # SVR4 hides these in libraries other than libc + AC_SEARCH_LIBS(socket, [socket]) + AC_SEARCH_LIBS(gethostbyname, [nsl]) + + # Needs to come after above checks for libsocket & libnsl for SVR4 systems + AC_ARG_ENABLE(ipv6, + AC_HELP_STRING([--enable-IPv6],[Enable IPv6 support]), + [IPV6CONN=$enableval], + [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) + AC_MSG_CHECKING([if IPv6 support should be built]) + if test "$IPV6CONN" = "yes"; then + AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) + fi + AC_MSG_RESULT($IPV6CONN) + + # 4.3BSD-Reno added a new member to struct sockaddr_in + AC_CHECK_MEMBER([struct sockaddr_in.sin_len], + AC_DEFINE([BSD44SOCKETS],1, + [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ +#include +#include +#include + ]) +]) # XTRANS_TCP_FLAGS + +# XTRANS_CONNECTION_FLAGS() +# ------------------------- +# Standard checks for which Xtrans transports to use by the Xorg packages +# that use Xtrans functions +AC_DEFUN([XTRANS_CONNECTION_FLAGS],[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_TYPE_SIGNAL]) + AC_ARG_ENABLE(unix-transport, + AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), + [UNIXCONN=$enableval], [UNIXCONN=yes]) + AC_ARG_ENABLE(tcp-transport, + AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), + [TCPCONN=$enableval], [TCPCONN=yes]) + AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) + if test "$UNIXCONN" = "yes"; then + AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) + fi + AC_MSG_RESULT($UNIXCONN) + AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) + AC_MSG_RESULT($TCPCONN) + if test "$TCPCONN" = "yes"; then + AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) + XTRANS_TCP_FLAGS + fi + [case $host_os in + solaris*|sco*|sysv4*) localdef="yes" ;; + *) localdef="no" ;; + esac] + AC_ARG_ENABLE(local-transport, + AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), + [LOCALCONN=$enableval], [LOCALCONN=$localdef]) + AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) + AC_MSG_RESULT($LOCALCONN) + if test "$LOCALCONN" = "yes"; then + AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) + fi + +]) # XTRANS_CONNECTION_FLAGS + + +# XTRANS_SECURE_RPC_FLAGS() +# ------------------------- +# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS +# so that any necessary networking libraries are already found +AC_DEFUN([XTRANS_SECURE_RPC_FLAGS], +[AC_REQUIRE([XTRANS_TCP_FLAGS]) + AC_ARG_ENABLE(secure-rpc, + AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), + [SECURE_RPC=$enableval], [SECURE_RPC="try"]) + + if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then + FOUND_SECURE_RPC="no" + AC_CHECK_FUNCS([authdes_seccreate authdes_create], + [FOUND_SECURE_RPC="yes"]) + if test "x$FOUND_SECURE_RPC" = "xno" ; then + if test "x$SECURE_RPC" = "xyes" ; then + AC_MSG_ERROR([Secure RPC requested, but required functions not found]) + fi + SECURE_RPC="no" + else + dnl FreeBSD keeps getsecretkey in librpcsvc + AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) + SECURE_RPC="yes" + fi + fi + AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) + if test "x$SECURE_RPC" = "xyes" ; then + AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) + fi + AC_MSG_RESULT($SECURE_RPC) +]) # XTRANS_SECURE_RPC_FLAGS + + +# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) + +# Figure out how to run the assembler. -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_PROG_AS +# ---------- +AC_DEFUN([AM_PROG_AS], +[# By default we simply use the C compiler to build assembly code. +AC_REQUIRE([AC_PROG_CC]) +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS +AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) +AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) +_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl +]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 3 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + +# serial 48 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# 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'] + +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_AC_SYS_COMPILER + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_DEFUN([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_LINKER_BOILERPLATE + + +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-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! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $rm conftest* +]) + +if test x"[$]$2" = xyes; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# ------------------ +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# --------------------------------------------------------------------- +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +}] +EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ---------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +])# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_MSG_CHECKING([dynamic linker characteristics]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 DLLs +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]AC_ENABLE_SHARED_DEFAULT) +])# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +# set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +])# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]AC_ENABLE_STATIC_DEFAULT) +])# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +])# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) +])# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +])# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +])# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognise shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="ifelse([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +])# AC_PATH_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognise a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AC_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown +])# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +])# AC_PROG_NM + + +# AC_CHECK_LIBM +# ------------- +# check for math library +AC_DEFUN([AC_CHECK_LIBM], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +])# AC_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX + +# _LT_AC_PROG_CXXCPP +# ------------------ +AC_DEFUN([_LT_AC_PROG_CXXCPP], +[ +AC_REQUIRE([AC_PROG_CXX]) +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +fi +])# _LT_AC_PROG_CXXCPP + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# ------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF + +# Report which library types will actually be built +AC_MSG_CHECKING([if libtool supports shared libraries]) +AC_MSG_RESULT([$can_build_shared]) + +AC_MSG_CHECKING([whether to build shared libraries]) +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +AC_MSG_RESULT([$enable_shared]) + +AC_MSG_CHECKING([whether to build static libraries]) +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +AC_MSG_RESULT([$enable_static]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +_LT_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + ;; + *) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +])# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) +# ------------------------------------ +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# 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. +# +# 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. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" + +# Set to yes if exported symbols are required. +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi +])# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +]) + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi[[45]]*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + + +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) + +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_MSG_RESULT([$SED]) +]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +AC_DEFUN([AM_MAINTAINER_MODE], +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([acinclude.m4]) diff --git a/xorg-server-1.4/afb/Makefile.am b/xorg-server-1.4/afb/Makefile.am new file mode 100644 index 0000000..d83b674 --- /dev/null +++ b/xorg-server-1.4/afb/Makefile.am @@ -0,0 +1,51 @@ +noinst_LTLIBRARIES = libafb.la + +AM_CFLAGS = $(DIX_CFLAGS) + +libafb_gen_sources = afbbltC.c afbbltX.c afbbltCI.c afbbltO.c afbbltG.c afbtileC.c afbtileG.c afbseg.c + +DISTCLEANFILES = $(libafb_gen_sources) + +libafb_la_SOURCES = afbgc.c afbwindow.c afbfont.c afbfillrct.c afbpntwin.c afbpixmap.c \ + afbimage.c afbline.c afbbres.c afbhrzvert.c afbbresd.c afbpushpxl.c afbply1rct.c \ + afbzerarc.c afbfillarc.c afbfillsp.c afbsetsp.c afbscrinit.c afbplygblt.c \ + afbclip.c afbgetsp.c afbpolypnt.c afbbitblt.c afbcmap.c afbimggblt.c afbpntarea.c \ + afbmisc.c afbbstore.c afbtegblt.c $(libafb_gen_sources) + +INCLUDES = -I$(top_srcdir)/mfb -I$(top_srcdir)/hw/xfree86/os-support + +EXTRA_DIST = afbline.c afbblt.c afbtile.c README Xdaniver.doc + +afbseg.c: + echo "#define POLYSEGMENT" > $@ + echo "#include \"$(srcdir)/afbline.c\"" >> $@ + +afbbltC.c: + echo "#define MROP Mcopy" > $@ + echo "#include \"$(srcdir)/afbblt.c\"" >> $@ + +afbbltX.c: + echo "#define MROP Mxor" > $@ + echo "#include \"$(srcdir)/afbblt.c\"" >> $@ + +afbbltCI.c: + echo "#define MROP McopyInverted" > $@ + echo "#include \"$(srcdir)/afbblt.c\"" >> $@ + +afbbltO.c: + echo "#define MROP Mor" > $@ + echo "#include \"$(srcdir)/afbblt.c\"" >> $@ + +afbbltG.c: + echo "#define MROP 0" > $@ + echo "#include \"$(srcdir)/afbblt.c\"" >> $@ + +afbtileC.c: + echo "#define MROP Mcopy" > $@ + echo "#include \"$(srcdir)/afbtile.c\"" >> $@ + +afbtileG.c: + echo "#define MROP 0" > $@ + echo "#include \"$(srcdir)/afbtile.c\"" >> $@ + +sdk_HEADERS = afb.h diff --git a/xorg-server-1.4/afb/Makefile.in b/xorg-server-1.4/afb/Makefile.in new file mode 100644 index 0000000..777296f --- /dev/null +++ b/xorg-server-1.4/afb/Makefile.in @@ -0,0 +1,739 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = afb +DIST_COMMON = README $(sdk_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libafb_la_LIBADD = +am__objects_1 = afbbltC.lo afbbltX.lo afbbltCI.lo afbbltO.lo \ + afbbltG.lo afbtileC.lo afbtileG.lo afbseg.lo +am_libafb_la_OBJECTS = afbgc.lo afbwindow.lo afbfont.lo afbfillrct.lo \ + afbpntwin.lo afbpixmap.lo afbimage.lo afbline.lo afbbres.lo \ + afbhrzvert.lo afbbresd.lo afbpushpxl.lo afbply1rct.lo \ + afbzerarc.lo afbfillarc.lo afbfillsp.lo afbsetsp.lo \ + afbscrinit.lo afbplygblt.lo afbclip.lo afbgetsp.lo \ + afbpolypnt.lo afbbitblt.lo afbcmap.lo afbimggblt.lo \ + afbpntarea.lo afbmisc.lo afbbstore.lo afbtegblt.lo \ + $(am__objects_1) +libafb_la_OBJECTS = $(am_libafb_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libafb_la_SOURCES) +DIST_SOURCES = $(libafb_la_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(sdkdir)" +sdkHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(sdk_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libafb.la +AM_CFLAGS = $(DIX_CFLAGS) +libafb_gen_sources = afbbltC.c afbbltX.c afbbltCI.c afbbltO.c afbbltG.c afbtileC.c afbtileG.c afbseg.c +DISTCLEANFILES = $(libafb_gen_sources) +libafb_la_SOURCES = afbgc.c afbwindow.c afbfont.c afbfillrct.c afbpntwin.c afbpixmap.c \ + afbimage.c afbline.c afbbres.c afbhrzvert.c afbbresd.c afbpushpxl.c afbply1rct.c \ + afbzerarc.c afbfillarc.c afbfillsp.c afbsetsp.c afbscrinit.c afbplygblt.c \ + afbclip.c afbgetsp.c afbpolypnt.c afbbitblt.c afbcmap.c afbimggblt.c afbpntarea.c \ + afbmisc.c afbbstore.c afbtegblt.c $(libafb_gen_sources) + +INCLUDES = -I$(top_srcdir)/mfb -I$(top_srcdir)/hw/xfree86/os-support +EXTRA_DIST = afbline.c afbblt.c afbtile.c README Xdaniver.doc +sdk_HEADERS = afb.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign afb/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign afb/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libafb.la: $(libafb_la_OBJECTS) $(libafb_la_DEPENDENCIES) + $(LINK) $(libafb_la_OBJECTS) $(libafb_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbbitblt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbbltC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbbltCI.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbbltG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbbltO.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbbltX.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbbres.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbbresd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbbstore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbclip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbcmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbfillarc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbfillrct.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbfillsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbfont.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbgc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbgetsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbhrzvert.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbimage.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbimggblt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbmisc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbpixmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbply1rct.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbplygblt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbpntarea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbpntwin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbpolypnt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbpushpxl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbscrinit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbseg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbsetsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbtegblt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbtileC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbtileG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbwindow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afbzerarc.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-sdkHEADERS: $(sdk_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(sdkdir)" || $(MKDIR_P) "$(DESTDIR)$(sdkdir)" + @list='$(sdk_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(sdkHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(sdkdir)/$$f'"; \ + $(sdkHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(sdkdir)/$$f"; \ + done + +uninstall-sdkHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(sdk_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(sdkdir)/$$f'"; \ + rm -f "$(DESTDIR)$(sdkdir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(sdkdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-sdkHEADERS + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-sdkHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sdkHEADERS install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-sdkHEADERS + + +afbseg.c: + echo "#define POLYSEGMENT" > $@ + echo "#include \"$(srcdir)/afbline.c\"" >> $@ + +afbbltC.c: + echo "#define MROP Mcopy" > $@ + echo "#include \"$(srcdir)/afbblt.c\"" >> $@ + +afbbltX.c: + echo "#define MROP Mxor" > $@ + echo "#include \"$(srcdir)/afbblt.c\"" >> $@ + +afbbltCI.c: + echo "#define MROP McopyInverted" > $@ + echo "#include \"$(srcdir)/afbblt.c\"" >> $@ + +afbbltO.c: + echo "#define MROP Mor" > $@ + echo "#include \"$(srcdir)/afbblt.c\"" >> $@ + +afbbltG.c: + echo "#define MROP 0" > $@ + echo "#include \"$(srcdir)/afbblt.c\"" >> $@ + +afbtileC.c: + echo "#define MROP Mcopy" > $@ + echo "#include \"$(srcdir)/afbtile.c\"" >> $@ + +afbtileG.c: + echo "#define MROP 0" > $@ + echo "#include \"$(srcdir)/afbtile.c\"" >> $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/afb/README b/xorg-server-1.4/afb/README new file mode 100644 index 0000000..5c95860 --- /dev/null +++ b/xorg-server-1.4/afb/README @@ -0,0 +1,10 @@ + +All stuff in this directory is based on Xdaniver (read Xdaniver.doc). + +Actually this is the same code as in the ilbm directory, except that here the +conversion from normal bitplanes to interleaved bitplanes didn't happen. + +-- +Geert Uytterhoeven Geert.Uytterhoeven@cs.kuleuven.ac.be +Wavelets, Linux/m68k on Amiga http://www.cs.kuleuven.ac.be/~geert/ +Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium diff --git a/xorg-server-1.4/afb/Xdaniver.doc b/xorg-server-1.4/afb/Xdaniver.doc new file mode 100644 index 0000000..1c8ad5a --- /dev/null +++ b/xorg-server-1.4/afb/Xdaniver.doc @@ -0,0 +1,218 @@ + +What is it? +----------- + +Xdaniver is a fast, colour X11R6 server for the Amiga's custom chip set +under NetBSD 1.0 and NetBSD-current, supporting all the Amiga's display +depths from 1 to 4 (upto 16 colours) on ECS machines and 1 to 8 (upto 256 +colours) on AGA machines (though, not all resolutions are available, see +General Information below). + +Xdaniver is designed to be a drop-in replacement for the Xmono server provided +with the X11R6 binary distribution supplied by Bernd Ernesti available from +ftp.uni-regensburg.de or one of its mirrors. + +Unlike previous colour X servers for the Amiga that emulate a chunky pixel +screen in fast RAM, use the standard frame buffer drivers provided with the +X11R6 source code to draw and then use a chunky to planar conversion routine +to write the results to the screen (all very slow), Xdaniver uses a heavily +modified mono frame buffer driver to draw directly using the Amiga's planar +format. The net result is much faster drawing and support for all the Amiga's +custom display depths but, as usual, the fewer planes used, the faster the +drawing operations of the X server. Even so, on my A1200 with a 33Mhz 68030, +I'm getting reasonable performance when using 8 bit planes in Dbl NTSC mode. + +Installation +------------ + +You will need to have first obtained and installed the X11R6 binary +distribution available from ftp.uni-regensburg.de in +/pub/NetBSD-Amiga/contrib/X11 or one of its mirrors. Xdaniver has been +compiled to expect font and configuration files sitting under +/usr/local/X11R6, if your setup is different you will need to provide a +symbolic link from /usr/local/X11R6 to where your tree resides or supply +several command line flags to the server. + +To get Xdaniver running as the default X server, copy the uncompressed binary +into /usr/local/X11R6/bin, remove the current X file from that directory +(which is a symbolic link to Xmono) and replace it with a link to Xdaniver: + + gzip -d < X11R6.Xdaniver.1.01.tar.gz | tar xvf - + mv Xdaniver /usr/local/X11R6/bin + cd /usr/local/X11R6/bin + rm X + ln -s Xdaniver X + +Note that on some setups, the devices /dev/kbd, /dev/mouse and /dev/view?? +have been created to be accessable only by superuser; Xdaniver needs to open +these devices. To workaround this problem, log on as superuser and then +either make Xdaniver setuid root: + + chown root Xdaniver + chmod 4755 Xdaniver + +or give everyone access the devices: + + chmod 666 /dev/kbd /dev/mouse /dev/view?? + +the latter option is a possible cause of a security hole if your machine is +ever used multi-user. + +General Information +------------------- + +The default resolution of the server is 700x430 and the default depth 4. AGA +users might what to increase the display depth by editing the startx script +and providing a -depth argument to Xdaniver on the xinit line of the +script. As always, the lower the depth, the faster the drawing and window +manipulation of the server. + +The resolution can be altered similarly by suppling -width and +-height arguments to the server. + +The NetBSD kernel selects actual screen modes by picking a mode who's +natural, non-overscanned size best-fits the requested resolution. +Unfortunately, for AGA users, the 1.0 kernel only has support for the +Dbl-NTSC AGA display mode and only this mode has support for depths greater +than 4. The NetBSD-current (work-in-progress) kernel also has support for +Dbl-PAL but still no support for the Super72 or other super-hires modes +(perhaps some kind, kernel-hacker could add support for them ?). + +If you have a 2 button mouse (like me) you might want to try and use the 3 +button mouse emulation. On other systems, it is usual for the left and right +buttons to be provided and emulate the middle button by pressing both +buttons together, however, the middle button is tends to be used more than +the right button so I have provided two options: + +-emulateright (or -3), the two physical mouse buttons act as left and middle +and pressing them both together emulates the right button. + +-emulatemiddle (or -2), the two physical mouse buttons act as left and right +and pressing them both together emulated the middle button. + +When using screen depths of less than 6 (4 is the maximum for ECS machines) +the lack of possible colours on screen at once causes problems for many X +applications. Specifying -cc 2 as a command line argument to Xdaniver +causes the server to switch the default visual type from PsuedoColor to +StaticColor; to put it simply, the server prefills the colormap with a +selection of 16 colours (depth 4) and when an application asks for a +particular colour, its gets allocated one that is closest to one from the +selection of 16. This removes the 'WARNING: Cannot allocate colormap entry +for "XXX"' errors but at the expense of applications not being able to get +the precise colour they wanted. Also, some badly written X applications fail +altogether when presented with a StaticColor visual. + +Bugs/Limitations +---------------- + +The limited choice of display resolutions for AGA/ECS machines is a real +pain - requires a kernel change to fix. Worse still, the kernel specifies +the maximum overscan resolution on the Dbl-NTSC to be 724x482 but selecting +anything more than 702x430 on my machine causes the screen either sheer +diagonally (as if the bytes per row calculation in Xdaniver or the kernel is +wrong) or completely loose sync (suggesting a custom chip register sync +calculation bug). As other, non-aga modes aren't affected when selection +overscan both problems seem to point to a kernel driver bug. Also, depths +greater than 4 for AGA users are only supported by the kernel in the Dbl-NTSC +mode (and Dbl-PAL with the current-NetBSD kernel). + +I know of one bug so-far (there will be more), The PutImage request of an XY +format image expects the bitplane order to be the reverse of that specified +in the X protocol but since virtually all applications use the Z (chunky) +format, you are unlikely to come across this problem. + +The PutImage request of Z format images is a little slow - when I have time +I'll try and add one of the fast assembly chunky-to-planar routines developed +for doom style games/demos. Unfortunately, the current crop all require a +picture size that is a multiple of 32 pixels and so cannot be used out-of-the- +box. + +Some extra performance could easily be squeezed out of the terminal font +drawing code (used by xterm) - when I have time I'll add the code. + +The Amiga's blitter and sprites are totally unused and will remain so +until/if someone else adds support to the kernel. The blitter would help +speed up screen scrolling and window manipulation and sprite support could +be used for the X pointer shape (if small enough) which would speed up all +drawing operations (no need to remove the software based pointer shape +first, draw, then replace the pointer shape). + +I removed the X image extension (XIE) from the X server as it increased the +size of the binary by some 400k. I haven't come across any applications that +need it yet (I haven't been looking!) so if you need the extension for some +reason send me e-mail and I'll build a server with the extension included. + +The 3 button mouse emulation is very simple - to emulate the 3rd button you +have to press both button precisely at the same moment - I've got quite good +at it now. When I have some spare time I'll add a timer so you will have a +few milli-seconds between one button being pressed and the next and it still +being registered as the emulated button. + +AGA users don't forget to provide the -A flag to loadbsd to enable the one +AGA mode in the 1.0 kernel but only if you have a VGA, multisync or dual-scan +monitor, of course ! + +Xdaniver has been tested on: + +A1200, 33Mhz 68030, 8Mb RAM and NetBSD 1.0 by myself. +A4000/40, 12Mb RAM and NetBSD 1.0 by Andreas Holzhammer. +A3000, 12Mb RAM and NetBSD 1.0 by Charlie Root, Stuart Park and others. +A3000, 25Mhz 68040, 18Mb RAM and NetBSD-current by Michael K. Sanders. +A2000, 8Mb RAM and NetBSD (version unknown) by Hubert Feyrer. + +Release and Bug Fix History +--------------------------- + +1.0 - First release + +1.01 Bugs fixed: + - Narrow (<32 pixels) Z format GetImage requests corrupted the stack + and could cause the server to core dump. (Xpaint caused this problem) + - Drawing dots (PolyPoint request) into a clipped window caused a + c pointer to go out of range, causing a core dump (xv showed this + problem). + + New features: + - Simple 3 button mouse emulation using a 2 button mouse; specify + -emulate_middle (or -2) or -emulate_right (or -3) on the server's + command line and press both mouse buttons together emulate the 'missing' + button. + - Basic beep sound support added by sending bell characters to the + console. + - Source code released. + +Disclaimer and Copyright Notices +-------------------------------- + +Multi-depth planar frame buffer code: +Copyright (c) 1995 by Daniver Limited. + +Large portions: +Copyright (c) 1994 by Eduardo Horvath. +Copyright (c) 1987-1995 by the Regents of the University of California. +Copyright (c) 1987 by Sun Microsystems, Inc. Mountain View, CA. +Copyright (c) 1987-1995 by X Consortium. +Copyright (c) 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts. +Copyright (c) 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. The Daniver Limited, +the above companies and individuals makes no representations about the +suitability of this software for any purpose. It is provided "as is" without +express or implied warranty. + +Credits +------- + +Thanks to Bernd Ernesti for making the operating system server source code +available for others to use and Eduardo Horvath and Andy Heffernan, who (I +think) did the original Xmono server port. + +Also, many thanks to the first brave users who tested Xdaniver for me on other +Amiga setups and found a few bugs in the process. + +Gary Henderson. + +Daytime: garyh@wet.sbi.com +Home: gary@daniver.demon.co.uk diff --git a/xorg-server-1.4/afb/afb.h b/xorg-server-1.4/afb/afb.h new file mode 100644 index 0000000..5aa2b0c --- /dev/null +++ b/xorg-server-1.4/afb/afb.h @@ -0,0 +1,1001 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ +/* Monochrome Frame Buffer definitions + written by drewry, september 1986 +*/ + +#include "pixmap.h" +#include "region.h" +#include "gc.h" +#include "colormap.h" +#include "regionstr.h" +#include "mibstore.h" +#include "mfb.h" + +extern int afbInverseAlu[]; +extern int afbScreenPrivateIndex; +/* warning: PixelType definition duplicated in maskbits.h */ +#ifndef PixelType +#define PixelType CARD32 +#endif /* PixelType */ + +#define AFB_MAX_DEPTH 8 + +/* afbbitblt.c */ + +extern void afbDoBitblt( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/ +); + +extern RegionPtr afbCopyArea( + DrawablePtr /*pSrcDrawable*/, + DrawablePtr /*pDstDrawable*/, + GCPtr/*pGC*/, + int /*srcx*/, + int /*srcy*/, + int /*width*/, + int /*height*/, + int /*dstx*/, + int /*dsty*/ +); + +/* afbbltC.c */ + +extern void afbDoBitbltCopy( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/ +); +/* afbbltCI.c */ + +extern void afbDoBitbltCopyInverted( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/ +); +/* afbbltG.c */ + +extern void afbDoBitbltGeneral( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/ +); +/* afbbltO.c */ + +extern void afbDoBitbltOr( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/ +); +/* afbbltX.c */ + +extern void afbDoBitbltXor( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/ +); +/* afbbres.c */ + +extern void afbBresS( + PixelType * /*addrl*/, + int /*nlwidth*/, + int /*sizeDst*/, + int /*depthDst*/, + int /*signdx*/, + int /*signdy*/, + int /*axis*/, + int /*x1*/, + int /*y1*/, + int /*e*/, + int /*e1*/, + int /*e2*/, + int /*len*/, + unsigned char * /*rrops*/ +); +/* afbbresd.c */ + +extern void afbBresD( + int * /*pdashIndex*/, + unsigned char * /*pDash*/, + int /*numInDashList*/, + int * /*pdashOffset*/, + int /*isDoubleDash*/, + PixelType * /*addrl*/, + int /*nlwidth*/, + int /*sizeDst*/, + int /*depthDst*/, + int /*signdx*/, + int /*signdy*/, + int /*axis*/, + int /*x1*/, + int /*y1*/, + int /*e*/, + int /*e1*/, + int /*e2*/, + int /*len*/, + unsigned char * /*rrops*/, + unsigned char * /*bgrrops*/ +); +/* afbbstore.c */ + +extern void afbSaveAreas( + PixmapPtr /*pPixmap*/, + RegionPtr /*prgnSave*/, + int /*xorg*/, + int /*yorg*/, + WindowPtr /*pWin*/ +); + +extern void afbRestoreAreas( + PixmapPtr /*pPixmap*/, + RegionPtr /*prgnRestore*/, + int /*xorg*/, + int /*yorg*/, + WindowPtr /*pWin*/ +); +/* afbclip.c */ + +extern RegionPtr afbPixmapToRegion( + PixmapPtr /*pPix*/ +); + +/* afbcmap.c */ + +extern int afbListInstalledColormaps( + ScreenPtr /*pScreen*/, + Colormap * /*pmaps*/ +); + +extern void afbInstallColormap( + ColormapPtr /*pmap*/ +); + +extern void afbUninstallColormap( + ColormapPtr /*pmap*/ +); + +extern void afbResolveColor( + unsigned short * /*pred*/, + unsigned short * /*pgreen*/, + unsigned short * /*pblue*/, + VisualPtr /*pVisual*/ +); + +extern Bool afbInitializeColormap( + ColormapPtr /*pmap*/ +); + +extern Bool afbInitVisuals( + VisualPtr * /*visualp*/, + DepthPtr * /*depthp*/, + int * /*nvisualp*/, + int * /*ndepthp*/, + int * /*rootDepthp*/, + VisualID * /*defaultVisp*/, + unsigned long /*sizes*/, + int /*bitsPerRGB*/ +); + +/* afbfillarc.c */ + +extern void afbPolyFillArcSolid( + DrawablePtr /*pDraw*/, + GCPtr /*pGC*/, + int /*narcs*/, + xArc * /*parcs*/ +); +/* afbfillrct.c */ + +extern void afbPolyFillRect( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nrectFill*/, + xRectangle * /*prectInit*/ +); + +/* afbply1rct.c */ +extern void afbFillPolygonSolid( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*mode*/, + int /*shape*/, + int /*count*/, + DDXPointPtr /*ptsIn*/ +); + +/* afbfillsp.c */ + +extern void afbSolidFS( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nInit*/, + DDXPointPtr /*pptInit*/, + int * /*pwidthInit*/, + int /*fSorted*/ +); + +extern void afbStippleFS( + DrawablePtr /*pDrawable*/, + GCPtr/*pGC*/, + int /*nInit*/, + DDXPointPtr /*pptInit*/, + int * /*pwidthInit*/, + int /*fSorted*/ +); + +extern void afbTileFS( + DrawablePtr /*pDrawable*/, + GCPtr/*pGC*/, + int /*nInit*/, + DDXPointPtr /*pptInit*/, + int * /*pwidthInit*/, + int /*fSorted*/ +); + +extern void afbUnnaturalTileFS( + DrawablePtr /*pDrawable*/, + GCPtr/*pGC*/, + int /*nInit*/, + DDXPointPtr /*pptInit*/, + int * /*pwidthInit*/, + int /*fSorted*/ +); + +extern void afbUnnaturalStippleFS( + DrawablePtr /*pDrawable*/, + GCPtr/*pGC*/, + int /*nInit*/, + DDXPointPtr /*pptInit*/, + int * /*pwidthInit*/, + int /*fSorted*/ +); + +extern void afbOpaqueStippleFS( + DrawablePtr /*pDrawable*/, + GCPtr/*pGC*/, + int /*nInit*/, + DDXPointPtr /*pptInit*/, + int * /*pwidthInit*/, + int /*fSorted*/ +); + +extern void afbUnnaturalOpaqueStippleFS( + DrawablePtr /*pDrawable*/, + GCPtr/*pGC*/, + int /*nInit*/, + DDXPointPtr /*pptInit*/, + int * /*pwidthInit*/, + int /*fSorted*/ +); + +/* afbfont.c */ + +extern Bool afbRealizeFont( + ScreenPtr /*pscr*/, + FontPtr /*pFont*/ +); + +extern Bool afbUnrealizeFont( + ScreenPtr /*pscr*/, + FontPtr /*pFont*/ +); +/* afbgc.c */ + +extern Bool afbCreateGC( + GCPtr /*pGC*/ +); + +extern void afbReduceRop( + int /*alu*/, + Pixel /*src*/, + unsigned long /*planemask*/, + int /*depth*/, + unsigned char * /*rrops*/ +); + +/* afbgetsp.c */ + +extern void afbGetSpans( + DrawablePtr /*pDrawable*/, + int /*wMax*/, + DDXPointPtr /*ppt*/, + int * /*pwidth*/, + int /*nspans*/, + char * /*pdstStart*/ +); +/* afbhrzvert.c */ + +extern void afbHorzS( + PixelType * /*addrl*/, + int /*nlwidth*/, + int /*sizeDst*/, + int /*depthDst*/, + int /*x1*/, + int /*y1*/, + int /*len*/, + unsigned char * /*rrops*/ +); + +extern void afbVertS( + PixelType * /*addrl*/, + int /*nlwidth*/, + int /*sizeDst*/, + int /*depthDst*/, + int /*x1*/, + int /*y1*/, + int /*len*/, + unsigned char * /*rrops*/ +); +/* afbigbblak.c */ + +extern void afbImageGlyphBlt ( + DrawablePtr /*pDrawable*/, + GCPtr/*pGC*/, + int /*x*/, + int /*y*/, + unsigned int /*nglyph*/, + CharInfoPtr * /*ppci*/, + pointer /*pglyphBase*/ +); +/* afbigbwht.c */ + +/* afbimage.c */ + +extern void afbPutImage( + DrawablePtr /*dst*/, + GCPtr /*pGC*/, + int /*depth*/, + int /*x*/, + int /*y*/, + int /*w*/, + int /*h*/, + int /*leftPad*/, + int /*format*/, + char * /*pImage*/ +); + +extern void afbGetImage( + DrawablePtr /*pDrawable*/, + int /*sx*/, + int /*sy*/, + int /*w*/, + int /*h*/, + unsigned int /*format*/, + unsigned long /*planeMask*/, + char * /*pdstLine*/ +); +/* afbline.c */ + +extern void afbLineSS( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*mode*/, + int /*npt*/, + DDXPointPtr /*pptInit*/ +); + +extern void afbLineSD( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*mode*/, + int /*npt*/, + DDXPointPtr /*pptInit*/ +); + +/* afbmisc.c */ + +extern void afbQueryBestSize( + int /*class*/, + unsigned short * /*pwidth*/, + unsigned short * /*pheight*/, + ScreenPtr /*pScreen*/ +); +/* afbpntarea.c */ + +extern void afbSolidFillArea( + DrawablePtr /*pDraw*/, + int /*nbox*/, + BoxPtr /*pbox*/, + unsigned char * /*rrops*/ +); + +extern void afbStippleAreaPPW( + DrawablePtr /*pDraw*/, + int /*nbox*/, + BoxPtr /*pbox*/, + PixmapPtr /*pstipple*/, + unsigned char * /*rrops*/ +); +extern void afbStippleArea( + DrawablePtr /*pDraw*/, + int /*nbox*/, + BoxPtr /*pbox*/, + PixmapPtr /*pstipple*/, + int /*xOff*/, + int /*yOff*/, + unsigned char * /*rrops*/ +); +/* afbplygblt.c */ + +extern void afbPolyGlyphBlt( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*x*/, + int /*y*/, + unsigned int /*nglyph*/, + CharInfoPtr * /*ppci*/, + pointer /*pglyphBase*/ +); + +/* afbpixmap.c */ + +extern PixmapPtr afbCreatePixmap( + ScreenPtr /*pScreen*/, + int /*width*/, + int /*height*/, + int /*depth*/ +); + +extern Bool afbDestroyPixmap( + PixmapPtr /*pPixmap*/ +); + +extern void afbXRotatePixmap( + PixmapPtr /*pPix*/, + int /*rw*/ +); + +extern void afbYRotatePixmap( + PixmapPtr /*pPix*/, + int /*rh*/ +); + +extern void afbCopyRotatePixmap( + PixmapPtr /*psrcPix*/, + PixmapPtr * /*ppdstPix*/, + int /*xrot*/, + int /*yrot*/ +); +extern void afbPaintWindow( + WindowPtr /*pWin*/, + RegionPtr /*pRegion*/, + int /*what*/ +); +/* afbpolypnt.c */ + +extern void afbPolyPoint( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*mode*/, + int /*npt*/, + xPoint * /*pptInit*/ +); +/* afbpushpxl.c */ + +extern void afbPushPixels( + GCPtr /*pGC*/, + PixmapPtr /*pBitMap*/, + DrawablePtr /*pDrawable*/, + int /*dx*/, + int /*dy*/, + int /*xOrg*/, + int /*yOrg*/ +); + +/* afbscrinit.c */ + +extern Bool afbScreenInit( + ScreenPtr /*pScreen*/, + pointer /*pbits*/, + int /*xsize*/, + int /*ysize*/, + int /*dpix*/, + int /*dpiy*/, + int /*width*/ +); + +/* afbseg.c */ + +extern void afbSegmentSS( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nseg*/, + xSegment * /*pSeg*/ +); + +extern void afbSegmentSD( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nseg*/, + xSegment * /*pSeg*/ +); +/* afbsetsp.c */ + +extern void afbSetSpans( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + char * /*psrc*/, + DDXPointPtr /*ppt*/, + int * /*pwidth*/, + int /*nspans*/, + int /*fSorted*/ +); +/* afbtegblt.c */ + +extern void afbTEGlyphBlt( + DrawablePtr /*pDrawable*/, + GCPtr/*pGC*/, + int /*x*/, + int /*y*/, + unsigned int /*nglyph*/, + CharInfoPtr * /*ppci*/, + pointer /*pglyphBase*/ +); +/* afbtileC.c */ + +extern void afbTileAreaPPWCopy( + DrawablePtr /*pDraw*/, + int /*nbox*/, + BoxPtr /*pbox*/, + int /*alu*/, + PixmapPtr /*ptile*/, + unsigned long /*planemask*/ +); +/* afbtileG.c */ + +extern void afbTileAreaPPWGeneral( + DrawablePtr /*pDraw*/, + int /*nbox*/, + BoxPtr /*pbox*/, + int /*alu*/, + PixmapPtr /*ptile*/, + unsigned long /*planemask*/ +); + +extern void afbTileAreaCopy( + DrawablePtr /*pDraw*/, + int /*nbox*/, + BoxPtr /*pbox*/, + int /*alu*/, + PixmapPtr /*ptile*/, + int /*xOff*/, + int /*yOff*/, + unsigned long /*planemask*/ +); +/* afbtileG.c */ + +extern void afbTileAreaGeneral( + DrawablePtr /*pDraw*/, + int /*nbox*/, + BoxPtr /*pbox*/, + int /*alu*/, + PixmapPtr /*ptile*/, + int /*xOff*/, + int /*yOff*/, + unsigned long /*planemask*/ +); + +extern void afbOpaqueStippleAreaPPWCopy( + DrawablePtr /*pDraw*/, + int /*nbox*/, + BoxPtr /*pbox*/, + int /*alu*/, + PixmapPtr /*ptile*/, + unsigned char */*rropsOS*/, + unsigned long /*planemask*/ +); +/* afbtileG.c */ + +extern void afbOpaqueStippleAreaPPWGeneral( + DrawablePtr /*pDraw*/, + int /*nbox*/, + BoxPtr /*pbox*/, + int /*alu*/, + PixmapPtr /*ptile*/, + unsigned char */*rropsOS*/, + unsigned long /*planemask*/ +); + +extern void afbOpaqueStippleAreaCopy( + DrawablePtr /*pDraw*/, + int /*nbox*/, + BoxPtr /*pbox*/, + int /*alu*/, + PixmapPtr /*ptile*/, + int /*xOff*/, + int /*yOff*/, + unsigned char */*rropsOS*/, + unsigned long /*planemask*/ +); +/* afbtileG.c */ + +extern void afbOpaqueStippleAreaGeneral( + DrawablePtr /*pDraw*/, + int /*nbox*/, + BoxPtr /*pbox*/, + int /*alu*/, + PixmapPtr /*ptile*/, + int /*xOff*/, + int /*yOff*/, + unsigned char */*rropsOS*/, + unsigned long /*planemask*/ +); + +/* afbwindow.c */ + +extern Bool afbCreateWindow( + WindowPtr /*pWin*/ +); + +extern Bool afbDestroyWindow( + WindowPtr /*pWin*/ +); + +extern Bool afbMapWindow( + WindowPtr /*pWindow*/ +); + +extern Bool afbPositionWindow( + WindowPtr /*pWin*/, + int /*x*/, + int /*y*/ +); + +extern Bool afbUnmapWindow( + WindowPtr /*pWindow*/ +); + +extern void afbCopyWindow( + WindowPtr /*pWin*/, + DDXPointRec /*ptOldOrg*/, + RegionPtr /*prgnSrc*/ +); + +extern Bool afbChangeWindowAttributes( + WindowPtr /*pWin*/, + unsigned long /*mask*/ +); +/* afbzerarc.c */ + +extern void afbZeroPolyArcSS( + DrawablePtr /*pDraw*/, + GCPtr /*pGC*/, + int /*narcs*/, + xArc * /*parcs*/ +); + +/* + private field of pixmap + pixmap.devPrivate = (PixelType *)pointer_to_bits + pixmap.devKind = width_of_pixmap_in_bytes + + private field of screen + a pixmap, for which we allocate storage. devPrivate is a pointer to +the bits in the hardware framebuffer. note that devKind can be poked to +make the code work for framebuffers that are wider than their +displayable screen (e.g. the early vsII, which displayed 960 pixels +across, but was 1024 in the hardware.) + + private field of GC +*/ + +typedef struct { + unsigned char rrops[AFB_MAX_DEPTH]; /* reduction of rasterop to 1 of 3 */ + unsigned char rropOS[AFB_MAX_DEPTH]; /* rop for opaque stipple */ +} afbPrivGC; +typedef afbPrivGC *afbPrivGCPtr; + +extern int afbGCPrivateIndex; /* index into GC private array */ +extern int afbWindowPrivateIndex; /* index into Window private array */ +#ifdef PIXMAP_PER_WINDOW +extern int frameWindowPrivateIndex; /* index into Window private array */ +#endif + +#define afbGetGCPrivate(pGC) \ + ((afbPrivGC *)((pGC)->devPrivates[afbGCPrivateIndex].ptr)) + +/* private field of window */ +typedef struct { + unsigned char fastBorder; /* non-zero if border tile is 32 bits wide */ + unsigned char fastBackground; + unsigned short unused; /* pad for alignment with Sun compiler */ + DDXPointRec oldRotate; + PixmapPtr pRotatedBackground; + PixmapPtr pRotatedBorder; +} afbPrivWin; + +/* Common macros for extracting drawing information */ + +#define afbGetTypedWidth(pDrawable,wtype)( \ + (((pDrawable)->type == DRAWABLE_WINDOW) ? \ + (int)(((PixmapPtr)((pDrawable)->pScreen->devPrivates[afbScreenPrivateIndex].ptr))->devKind) : \ + (int)(((PixmapPtr)pDrawable)->devKind)) / sizeof (wtype)) + +#define afbGetByteWidth(pDrawable) afbGetTypedWidth(pDrawable, unsigned char) + +#define afbGetPixelWidth(pDrawable) afbGetTypedWidth(pDrawable, PixelType) + +#define afbGetTypedWidthAndPointer(pDrawable, width, pointer, wtype, ptype) {\ + PixmapPtr _pPix; \ + if ((pDrawable)->type == DRAWABLE_WINDOW) \ + _pPix = (PixmapPtr)(pDrawable)->pScreen->devPrivates[afbScreenPrivateIndex].ptr; \ + else \ + _pPix = (PixmapPtr)(pDrawable); \ + (pointer) = (ptype *) _pPix->devPrivate.ptr; \ + (width) = ((int) _pPix->devKind) / sizeof (wtype); \ +} + +#define afbGetPixelWidthSizeDepthAndPointer(pDrawable, width, size, dep, pointer) {\ + PixmapPtr _pPix; \ + if ((pDrawable)->type == DRAWABLE_WINDOW) \ + _pPix = (PixmapPtr)(pDrawable)->pScreen->devPrivates[afbScreenPrivateIndex].ptr; \ + else \ + _pPix = (PixmapPtr)(pDrawable); \ + (pointer) = (PixelType *)_pPix->devPrivate.ptr; \ + (width) = ((int)_pPix->devKind) / sizeof (PixelType); \ + (size) = (width) * _pPix->drawable.height; \ + (dep) = _pPix->drawable.depth; (void)(dep); \ +} + +#define afbGetByteWidthAndPointer(pDrawable, width, pointer) \ + afbGetTypedWidthAndPointer(pDrawable, width, pointer, unsigned char, unsigned char) + +#define afbGetPixelWidthAndPointer(pDrawable, width, pointer) \ + afbGetTypedWidthAndPointer(pDrawable, width, pointer, PixelType, PixelType) + +#define afbGetWindowTypedWidthAndPointer(pWin, width, pointer, wtype, ptype) {\ + PixmapPtr _pPix = (PixmapPtr)(pWin)->drawable.pScreen->devPrivates[afbScreenPrivateIndex].ptr; \ + (pointer) = (ptype *) _pPix->devPrivate.ptr; \ + (width) = ((int) _pPix->devKind) / sizeof (wtype); \ +} + +#define afbGetWindowPixelWidthAndPointer(pWin, width, pointer) \ + afbGetWindowTypedWidthAndPointer(pWin, width, pointer, PixelType, PixelType) + +#define afbGetWindowByteWidthAndPointer(pWin, width, pointer) \ + afbGetWindowTypedWidthAndPointer(pWin, width, pointer, char, char) + +/* afb uses the following macros to calculate addresses in drawables. + * To support banked framebuffers, the macros come in four flavors. + * All four collapse into the same definition on unbanked devices. + * + * afbScanlineFoo - calculate address and do bank switching + * afbScanlineFooNoBankSwitch - calculate address, don't bank switch + * afbScanlineFooSrc - calculate address, switch source bank + * afbScanlineFooDst - calculate address, switch destination bank + */ + +/* The NoBankSwitch versions are the same for banked and unbanked cases */ + +#define afbScanlineIncNoBankSwitch(_ptr, _off) _ptr += (_off) +#define afbScanlineOffsetNoBankSwitch(_ptr, _off) ((_ptr) + (_off)) +#define afbScanlineDeltaNoBankSwitch(_ptr, _y, _w) \ + afbScanlineOffsetNoBankSwitch(_ptr, (_y) * (_w)) +#define afbScanlineNoBankSwitch(_ptr, _x, _y, _w) \ + afbScanlineOffsetNoBankSwitch(_ptr, (_y) * (_w) + ((_x) >> MFB_PWSH)) + +#ifdef MFB_LINE_BANK + +#include "afblinebank.h" /* get macro definitions from this file */ + +#else /* !MFB_LINE_BANK - unbanked case */ + +#define afbScanlineInc(_ptr, _off) afbScanlineIncNoBankSwitch(_ptr, _off) +#define afbScanlineIncSrc(_ptr, _off) afbScanlineInc(_ptr, _off) +#define afbScanlineIncDst(_ptr, _off) afbScanlineInc(_ptr, _off) + +#define afbScanlineOffset(_ptr, _off) afbScanlineOffsetNoBankSwitch(_ptr, _off) +#define afbScanlineOffsetSrc(_ptr, _off) afbScanlineOffset(_ptr, _off) +#define afbScanlineOffsetDst(_ptr, _off) afbScanlineOffset(_ptr, _off) + +#define afbScanlineSrc(_ptr, _x, _y, _w) afbScanline(_ptr, _x, _y, _w) +#define afbScanlineDst(_ptr, _x, _y, _w) afbScanline(_ptr, _x, _y, _w) + +#define afbScanlineDeltaSrc(_ptr, _y, _w) afbScanlineDelta(_ptr, _y, _w) +#define afbScanlineDeltaDst(_ptr, _y, _w) afbScanlineDelta(_ptr, _y, _w) + +#endif /* MFB_LINE_BANK */ + +#define afbScanlineDelta(_ptr, _y, _w) \ + afbScanlineOffset(_ptr, (_y) * (_w)) + +#define afbScanline(_ptr, _x, _y, _w) \ + afbScanlineOffset(_ptr, (_y) * (_w) + ((_x) >> MFB_PWSH)) + +/* precomputed information about each glyph for GlyphBlt code. + this saves recalculating the per glyph information for each box. +*/ + +typedef struct _afbpos{ + int xpos; /* xposition of glyph's origin */ + int xchar; /* x position mod 32 */ + int leftEdge; + int rightEdge; + int topEdge; + int bottomEdge; + PixelType *pdstBase; /* longword with character origin */ + int widthGlyph; /* width in bytes of this glyph */ +} afbTEXTPOS; + +/* reduced raster ops for afb */ +#define RROP_BLACK GXclear +#define RROP_WHITE GXset +#define RROP_NOP GXnoop +#define RROP_INVERT GXinvert +#define RROP_COPY GXcopy + +/* macros for afbbitblt.c, afbfillsp.c + these let the code do one switch on the rop per call, rather + than a switch on the rop per item (span or rectangle.) +*/ + +#define fnCLEAR(src, dst) (0) +#define fnAND(src, dst) (src & dst) +#define fnANDREVERSE(src, dst) (src & ~dst) +#define fnCOPY(src, dst) (src) +#define fnANDINVERTED(src, dst) (~src & dst) +#define fnNOOP(src, dst) (dst) +#define fnXOR(src, dst) (src ^ dst) +#define fnOR(src, dst) (src | dst) +#define fnNOR(src, dst) (~(src | dst)) +#define fnEQUIV(src, dst) (~src ^ dst) +#define fnINVERT(src, dst) (~dst) +#define fnORREVERSE(src, dst) (src | ~dst) +#define fnCOPYINVERTED(src, dst) (~src) +#define fnORINVERTED(src, dst) (~src | dst) +#define fnNAND(src, dst) (~(src & dst)) +#undef fnSET +#define fnSET(src, dst) (~0) + +/* Using a "switch" statement is much faster in most cases + * since the compiler can do a look-up table or multi-way branch + * instruction, depending on the architecture. The result on + * A Sun 3/50 is at least 2.5 times faster, assuming a uniform + * distribution of RasterOp operation types. + * + * However, doing some profiling on a running system reveals + * GXcopy is the operation over 99.5% of the time and + * GXxor is the next most frequent (about .4%), so we make special + * checks for those first. + * + * Note that this requires a change to the "calling sequence" + * since we can't engineer a "switch" statement to have an lvalue. + */ +#undef DoRop +#define DoRop(result, alu, src, dst) \ +{ \ + if (alu == GXcopy) \ + result = fnCOPY (src, dst); \ + else if (alu == GXxor) \ + result = fnXOR (src, dst); \ + else \ + switch (alu) { \ + case GXclear: \ + result = fnCLEAR (src, dst); \ + break; \ + case GXand: \ + result = fnAND (src, dst); \ + break; \ + case GXandReverse: \ + result = fnANDREVERSE (src, dst); \ + break; \ + case GXandInverted: \ + result = fnANDINVERTED (src, dst); \ + break; \ + default: \ + case GXnoop: \ + result = fnNOOP (src, dst); \ + break; \ + case GXor: \ + result = fnOR (src, dst); \ + break; \ + case GXnor: \ + result = fnNOR (src, dst); \ + break; \ + case GXequiv: \ + result = fnEQUIV (src, dst); \ + break; \ + case GXinvert: \ + result = fnINVERT (src, dst); \ + break; \ + case GXorReverse: \ + result = fnORREVERSE (src, dst); \ + break; \ + case GXcopyInverted: \ + result = fnCOPYINVERTED (src, dst); \ + break; \ + case GXorInverted: \ + result = fnORINVERTED (src, dst); \ + break; \ + case GXnand: \ + result = fnNAND (src, dst); \ + break; \ + case GXset: \ + result = fnSET (src, dst); \ + break; \ + } \ +} + + +/* C expression fragments for various operations. These get passed in + * as -D's on the compile command line. See afb/Imakefile. This + * fixes XBUG 6319. + * + * This seems like a good place to point out that afb's use of the + * words black and white is an unfortunate misnomer. In afb code, black + * means zero, and white means one. + */ +#define MFB_OPEQ_WHITE |= +#define MFB_OPEQ_BLACK &=~ +#define MFB_OPEQ_INVERT ^= +#define MFB_EQWHOLEWORD_WHITE =~0 +#define MFB_EQWHOLEWORD_BLACK =0 +#define MFB_EQWHOLEWORD_INVERT ^=~0 +#define MFB_OP_WHITE /* nothing */ +#define MFB_OP_BLACK ~ diff --git a/xorg-server-1.4/afb/afbbitblt.c b/xorg-server-1.4/afb/afbbitblt.c new file mode 100644 index 0000000..2e416e3 --- /dev/null +++ b/xorg-server-1.4/afb/afbbitblt.c @@ -0,0 +1,343 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include + +#include "regionstr.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" + +#include "mi.h" + +#include "afb.h" +#include "maskbits.h" + +/* CopyArea and CopyPlane for a monchrome frame buffer + + + clip the source rectangle to the source's available bits. (this +avoids copying unnecessary pieces that will just get exposed anyway.) +this becomes the new shape of the destination. + clip the destination region to the composite clip in the +GC. this requires translating the destination region to (dstx, dsty). + build a list of source points, one for each rectangle in the +destination. this is a simple translation. + go do the multiple rectangle copies + do graphics exposures +*/ +/** Optimized for drawing pixmaps into windows, especially when drawing into + ** unobscured windows. Calls to the general-purpose region code were + ** replaced with rectangle-to-rectangle clipping comparisions. This is + ** possible, since the pixmap is a single rectangle. In an unobscured + ** window, the destination clip is also a single rectangle, and region + ** code can be avoided entirely. This is a big savings, since the region + ** code uses XAlloc() and makes many function calls. + ** + ** In addition, if source is a pixmap, there is no need to call the + ** expensive miHandleExposures() routine. Instead, we simply return NULL. + ** + ** Previously, drawing a pixmap into an unobscured window executed at least + ** 8 XAlloc()'s, 30 function calls, and hundreds of lines of code. + ** + ** Now, the same operation requires no XAlloc()'s, no region function calls, + ** and much less overhead. Nice for drawing lots of small pixmaps. + */ + +void +afbDoBitblt(DrawablePtr pSrc, DrawablePtr pDst, int alu, RegionPtr prgnDst, DDXPointPtr pptSrc, long unsigned int planemask) +{ + switch (alu) { + case GXcopy: + afbDoBitbltCopy(pSrc, pDst, alu, prgnDst, pptSrc, planemask); + break; + case GXxor: + afbDoBitbltXor(pSrc, pDst, alu, prgnDst, pptSrc, planemask); + break; + case GXcopyInverted: + afbDoBitbltCopyInverted(pSrc, pDst, alu, prgnDst, pptSrc, planemask); + break; + case GXor: + afbDoBitbltOr(pSrc, pDst, alu, prgnDst, pptSrc, planemask); + break; + default: + afbDoBitbltGeneral(pSrc, pDst, alu, prgnDst, pptSrc, planemask); + break; + } +} + +typedef void (*afb_blit_func) + (DrawablePtr, DrawablePtr, int, RegionPtr, DDXPointPtr, unsigned long); + +static RegionPtr +afbBitBlt(register DrawablePtr pSrcDrawable, register DrawablePtr pDstDrawable, register GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, afb_blit_func doBitBlt, long unsigned int planemask) +{ + RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */ + Bool freeSrcClip = FALSE; + + RegionPtr prgnExposed; + RegionRec rgnDst; + DDXPointPtr pptSrc; + register DDXPointPtr ppt; + register BoxPtr pbox; + int i; + register int dx; + register int dy; + xRectangle origSource; + DDXPointRec origDest; + int numRects; + BoxRec fastBox; + int fastClip = 0; /* for fast clipping with pixmap source */ + int fastExpose = 0; /* for fast exposures with pixmap source */ + + origSource.x = srcx; + origSource.y = srcy; + origSource.width = width; + origSource.height = height; + origDest.x = dstx; + origDest.y = dsty; + + if ((pSrcDrawable != pDstDrawable) && pSrcDrawable->pScreen->SourceValidate) + (*pSrcDrawable->pScreen->SourceValidate)(pSrcDrawable, srcx, srcy, width, + height); + + srcx += pSrcDrawable->x; + srcy += pSrcDrawable->y; + + /* clip the source */ + + if (pSrcDrawable->type == DRAWABLE_PIXMAP) + if ((pSrcDrawable == pDstDrawable) && (pGC->clientClipType == CT_NONE)) + prgnSrcClip = pGC->pCompositeClip; + else + fastClip = 1; + else if (pGC->subWindowMode == IncludeInferiors) + if (!((WindowPtr)pSrcDrawable)->parent) + /* + * special case bitblt from root window in + * IncludeInferiors mode; just like from a pixmap + */ + fastClip = 1; + else if ((pSrcDrawable == pDstDrawable) && (pGC->clientClipType == CT_NONE)) + prgnSrcClip = pGC->pCompositeClip; + else { + prgnSrcClip = NotClippedByChildren((WindowPtr)pSrcDrawable); + freeSrcClip = TRUE; + } + else + prgnSrcClip = &((WindowPtr)pSrcDrawable)->clipList; + + fastBox.x1 = srcx; + fastBox.y1 = srcy; + fastBox.x2 = srcx + width; + fastBox.y2 = srcy + height; + + /* Don't create a source region if we are doing a fast clip */ + if (fastClip) { + fastExpose = 1; + /* + * clip the source; if regions extend beyond the source size, + * make sure exposure events get sent + */ + if (fastBox.x1 < pSrcDrawable->x) { + fastBox.x1 = pSrcDrawable->x; + fastExpose = 0; + } + if (fastBox.y1 < pSrcDrawable->y) { + fastBox.y1 = pSrcDrawable->y; + fastExpose = 0; + } + if (fastBox.x2 > pSrcDrawable->x + (int)pSrcDrawable->width) { + fastBox.x2 = pSrcDrawable->x + (int)pSrcDrawable->width; + fastExpose = 0; + } + if (fastBox.y2 > pSrcDrawable->y + (int)pSrcDrawable->height) { + fastBox.y2 = pSrcDrawable->y + (int)pSrcDrawable->height; + fastExpose = 0; + } + } else { + REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); + REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip); + } + + dstx += pDstDrawable->x; + dsty += pDstDrawable->y; + + if (pDstDrawable->type == DRAWABLE_WINDOW) + if (!((WindowPtr)pDstDrawable)->realized) { + if (!fastClip) + REGION_UNINIT(pGC->pScreen, &rgnDst); + if (freeSrcClip) + REGION_DESTROY(pGC->pScreen, prgnSrcClip); + return NULL; + } + + dx = srcx - dstx; + dy = srcy - dsty; + + /* Translate and clip the dst to the destination composite clip */ + if (fastClip) { + RegionPtr cclip; + + /* Translate the region directly */ + fastBox.x1 -= dx; + fastBox.x2 -= dx; + fastBox.y1 -= dy; + fastBox.y2 -= dy; + + /* If the destination composite clip is one rectangle we can + do the clip directly. Otherwise we have to create a full + blown region and call intersect */ + cclip = pGC->pCompositeClip; + if (REGION_NUM_RECTS(cclip) == 1) { + BoxPtr pBox = REGION_RECTS(cclip); + + if (fastBox.x1 < pBox->x1) + fastBox.x1 = pBox->x1; + if (fastBox.x2 > pBox->x2) + fastBox.x2 = pBox->x2; + if (fastBox.y1 < pBox->y1) + fastBox.y1 = pBox->y1; + if (fastBox.y2 > pBox->y2) + fastBox.y2 = pBox->y2; + + /* Check to see if the region is empty */ + if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2) { + REGION_NULL(pGC->pScreen, &rgnDst); + } else { + REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); + } + } else { + /* We must turn off fastClip now, since we must create + a full blown region. It is intersected with the + composite clip below. */ + fastClip = 0; + REGION_INIT(pGC->pScreen, &rgnDst, &fastBox,1); + } + } else + REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy); + + if (!fastClip) { + REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, + pGC->pCompositeClip); + } + + /* Do bit blitting */ + numRects = REGION_NUM_RECTS(&rgnDst); + if (numRects && width && height) { + if(!(pptSrc = (DDXPointPtr)ALLOCATE_LOCAL(numRects * + sizeof(DDXPointRec)))) { + REGION_UNINIT(pGC->pScreen, &rgnDst); + if (freeSrcClip) + REGION_DESTROY(pGC->pScreen, prgnSrcClip); + return NULL; + } + pbox = REGION_RECTS(&rgnDst); + ppt = pptSrc; + for (i = numRects; --i >= 0; pbox++, ppt++) { + ppt->x = pbox->x1 + dx; + ppt->y = pbox->y1 + dy; + } + + (*doBitBlt)(pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc, + planemask); + + DEALLOCATE_LOCAL(pptSrc); + } + + prgnExposed = NULL; + if (pGC->fExpose) { + /* Pixmap sources generate a NoExposed (we return NULL to do this) */ + if (!fastExpose) + prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, + origSource.x, origSource.y, + (int)origSource.width, + (int)origSource.height, origDest.x, + origDest.y, (unsigned long)0); + } + REGION_UNINIT(pGC->pScreen, &rgnDst); + if (freeSrcClip) + REGION_DESTROY(pGC->pScreen, prgnSrcClip); + return prgnExposed; +} + +RegionPtr +afbCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty) +{ + afb_blit_func doBitBlt; + + switch (pGC->alu) { + case GXcopy: + doBitBlt = afbDoBitbltCopy; + break; + case GXxor: + doBitBlt = afbDoBitbltXor; + break; + case GXcopyInverted: + doBitBlt = afbDoBitbltCopyInverted; + break; + case GXor: + doBitBlt = afbDoBitbltOr; + break; + default: + doBitBlt = afbDoBitbltGeneral; + break; + } + + return(afbBitBlt(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, + width, height, dstx, dsty, doBitBlt, pGC->planemask)); +} diff --git a/xorg-server-1.4/afb/afbblt.c b/xorg-server-1.4/afb/afbblt.c new file mode 100644 index 0000000..9eb4e47 --- /dev/null +++ b/xorg-server-1.4/afb/afbblt.c @@ -0,0 +1,563 @@ +/* + * afb copy area + */ + +/* + +Copyright (c) 1989 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Author: Keith Packard + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include +#include +#include "afb.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "maskbits.h" +#include "fastblt.h" +#include "mergerop.h" + +void +MROP_NAME(afbDoBitblt)(pSrc, pDst, alu, prgnDst, pptSrc, planemask) + DrawablePtr pSrc, pDst; + int alu; + RegionPtr prgnDst; + DDXPointPtr pptSrc; + unsigned long planemask; +{ + PixelType *psrcBase, *pdstBase; /* start of src and dst bitmaps */ + int widthSrc, widthDst; /* add to get to same position in next line */ + int sizeSrc, sizeDst; + + BoxPtr pbox; + int nbox; + + BoxPtr pboxTmp, pboxNext, pboxBase, pboxNew1, pboxNew2; + /* temporaries for shuffling rectangles */ + DDXPointPtr pptTmp, pptNew1, pptNew2; + /* shuffling boxes entails shuffling the + source points too */ + int w, h; + int xdir; /* 1 = left right, -1 = right left/ */ + int ydir; /* 1 = top down, -1 = bottom up */ + + PixelType *psrcLine, *pdstLine; + /* pointers to line with current src and dst */ + register PixelType *psrc; /* pointer to current src longword */ + register PixelType *pdst; /* pointer to current dst longword */ + + MROP_DECLARE_REG() + + /* following used for looping through a line */ + PixelType startmask, endmask; /* masks for writing ends of dst */ + int nlMiddle; /* whole longwords in dst */ + int xoffSrc, xoffDst; + register int leftShift, rightShift; + register PixelType bits; + register PixelType bits1; + register int nl; /* temp copy of nlMiddle */ + + int careful; + int depthSrc; + int depthDst; + + MROP_INITIALIZE(alu,0); + + afbGetPixelWidthSizeDepthAndPointer(pSrc, widthSrc, sizeSrc, depthSrc, + psrcBase); + afbGetPixelWidthSizeDepthAndPointer(pDst, widthDst, sizeDst, depthDst, + pdstBase); + + /* Special case where depth of dest pixmap is 1 but source pixmap isn't + * Used for GetImage to copy a plane from a source pixmap to a particular + * dest pixmap plane. + * Note: planemask should have only one bit set or several planes from + * the source will be copied to the same dest plane. + */ + if (depthDst == 1 && depthDst != depthSrc) + sizeDst = 0; + + /* XXX we have to err on the side of safety when both are windows, + * because we don't know if IncludeInferiors is being used. + */ + careful = ((pSrc == pDst) || + ((pSrc->type == DRAWABLE_WINDOW) && + (pDst->type == DRAWABLE_WINDOW))); + + pbox = REGION_RECTS(prgnDst); + nbox = REGION_NUM_RECTS(prgnDst); + + pboxNew1 = NULL; + pptNew1 = NULL; + pboxNew2 = NULL; + pptNew2 = NULL; + if (careful && (pptSrc->y < pbox->y1)) { + /* walk source botttom to top */ + ydir = -1; + widthSrc = -widthSrc; + widthDst = -widthDst; + + if (nbox > 1) { + /* keep ordering in each band, reverse order of bands */ + pboxNew1 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec)*nbox); + if(!pboxNew1) + return; + pptNew1 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec)*nbox); + if(!pptNew1) { + DEALLOCATE_LOCAL(pboxNew1); + return; + } + pboxBase = pboxNext = pbox+nbox-1; + while (pboxBase >= pbox) { + while ((pboxNext >= pbox) && + (pboxBase->y1 == pboxNext->y1)) + pboxNext--; + pboxTmp = pboxNext+1; + pptTmp = pptSrc + (pboxTmp - pbox); + while (pboxTmp <= pboxBase) { + *pboxNew1++ = *pboxTmp++; + *pptNew1++ = *pptTmp++; + } + pboxBase = pboxNext; + } + pboxNew1 -= nbox; + pbox = pboxNew1; + pptNew1 -= nbox; + pptSrc = pptNew1; + } + } else { + /* walk source top to bottom */ + ydir = 1; + } + + if (careful && (pptSrc->x < pbox->x1)) { + /* walk source right to left */ + xdir = -1; + + if (nbox > 1) { + /* reverse order of rects in each band */ + pboxNew2 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox); + pptNew2 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox); + if(!pboxNew2 || !pptNew2) { + if (pptNew2) + DEALLOCATE_LOCAL(pptNew2); + if (pboxNew2) + DEALLOCATE_LOCAL(pboxNew2); + if (pboxNew1) { + DEALLOCATE_LOCAL(pptNew1); + DEALLOCATE_LOCAL(pboxNew1); + } + return; + } + pboxBase = pboxNext = pbox; + while (pboxBase < pbox+nbox) { + while ((pboxNext < pbox+nbox) && (pboxNext->y1 == pboxBase->y1)) + pboxNext++; + pboxTmp = pboxNext; + pptTmp = pptSrc + (pboxTmp - pbox); + while (pboxTmp != pboxBase) { + *pboxNew2++ = *--pboxTmp; + *pptNew2++ = *--pptTmp; + } + pboxBase = pboxNext; + } + pboxNew2 -= nbox; + pbox = pboxNew2; + pptNew2 -= nbox; + pptSrc = pptNew2; + } + } else { + /* walk source left to right */ + xdir = 1; + } + + while(nbox--) { + int d; + for (d = 0; d < depthSrc; d++) { + PixelType *psrcB; + PixelType *pdstB; + + if (!(planemask & (1 << d))) + continue; + + psrcB = psrcBase + sizeSrc * d; /* @@@ NEXT PLANE @@@ */ + pdstB = pdstBase + sizeDst * d; /* @@@ NEXT PLANE @@@ */ + + w = pbox->x2 - pbox->x1; + h = pbox->y2 - pbox->y1; + + if (ydir == -1) { /* start at last scanline of rectangle */ + psrcLine = afbScanlineDeltaSrc(psrcB, -(pptSrc->y+h-1), widthSrc); + pdstLine = afbScanlineDeltaDst(pdstB, -(pbox->y2-1), widthDst); + } else { /* start at first scanline */ + psrcLine = afbScanlineDeltaSrc(psrcB, pptSrc->y, widthSrc); + pdstLine = afbScanlineDeltaDst(pdstB, pbox->y1, widthDst); + } + if ((pbox->x1 & PIM) + w <= PPW) { + maskpartialbits (pbox->x1, w, startmask); + endmask = 0; + nlMiddle = 0; + } else { + maskbits(pbox->x1, w, startmask, endmask, nlMiddle); + } + if (xdir == 1) { + xoffSrc = pptSrc->x & PIM; + xoffDst = pbox->x1 & PIM; + pdstLine += (pbox->x1 >> PWSH); + psrcLine += (pptSrc->x >> PWSH); +#ifdef DO_UNALIGNED_BITBLT + nl = xoffSrc - xoffDst; + psrcLine = (PixelType *)(((unsigned char *) psrcLine) + nl); +#else + if (xoffSrc == xoffDst) +#endif + { + while (h--) { + psrc = psrcLine; + pdst = pdstLine; + if (startmask) { + *pdst = MROP_MASK(*psrc, *pdst, startmask); + psrc++; + pdst++; + } + nl = nlMiddle; + +#ifdef LARGE_INSTRUCTION_CACHE +#ifdef FAST_CONSTANT_OFFSET_MODE + + psrc += nl & (UNROLL-1); + pdst += nl & (UNROLL-1); + +#define BodyOdd(n) pdst[-n] = MROP_SOLID (psrc[-n], pdst[-n]); +#define BodyEven(n) pdst[-n] = MROP_SOLID (psrc[-n], pdst[-n]); + +#define LoopReset \ +pdst += UNROLL; \ +psrc += UNROLL; + +#else + +#define BodyOdd(n) *pdst = MROP_SOLID (*psrc, *pdst); pdst++; psrc++; +#define BodyEven(n) BodyOdd(n) + +#define LoopReset ; + +#endif + PackedLoop + +#undef BodyOdd +#undef BodyEven +#undef LoopReset + +#else +#ifdef NOTDEF + /* you'd think this would be faster -- + * a single instruction instead of 6 + * but measurements show it to be ~15% slower + */ + while ((nl -= 6) >= 0) { + asm ("moveml %1+,#0x0c0f;moveml#0x0c0f,%0" + : "=m" (*(char *)pdst) + : "m" (*(char *)psrc) + : "d0", "d1", "d2", "d3", + "a2", "a3"); + pdst += 6; + } + nl += 6; + while (nl--) + *pdst++ = *psrc++; +#endif + DuffL(nl, label1, + *pdst = MROP_SOLID (*psrc, *pdst); + pdst++; psrc++;) +#endif + + if (endmask) + *pdst = MROP_MASK(*psrc, *pdst, endmask); + afbScanlineIncDst(pdstLine, widthDst); + afbScanlineIncSrc(psrcLine, widthSrc); + } + } +#ifndef DO_UNALIGNED_BITBLT + else { + if (xoffSrc > xoffDst) { + leftShift = (xoffSrc - xoffDst); + rightShift = PPW - leftShift; + } else { + rightShift = (xoffDst - xoffSrc); + leftShift = PPW - rightShift; + } + while (h--) { + psrc = psrcLine; + pdst = pdstLine; + bits = 0; + if (xoffSrc > xoffDst) + bits = *psrc++; + if (startmask) { + bits1 = BitLeft(bits,leftShift); + bits = *psrc++; + bits1 |= BitRight(bits,rightShift); + *pdst = MROP_MASK(bits1, *pdst, startmask); + pdst++; + } + nl = nlMiddle; + +#ifdef LARGE_INSTRUCTION_CACHE + bits1 = bits; + +#ifdef FAST_CONSTANT_OFFSET_MODE + + psrc += nl & (UNROLL-1); + pdst += nl & (UNROLL-1); + +#define BodyOdd(n) \ +bits = psrc[-n]; \ +pdst[-n] = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), pdst[-n]); + +#define BodyEven(n) \ +bits1 = psrc[-n]; \ +pdst[-n] = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), pdst[-n]); + +#define LoopReset \ +pdst += UNROLL; \ +psrc += UNROLL; + +#else + +#define BodyOdd(n) \ +bits = *psrc++; \ +*pdst = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), *pdst); \ +pdst++; + +#define BodyEven(n) \ +bits1 = *psrc++; \ +*pdst = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), *pdst); \ +pdst++; + +#define LoopReset ; + +#endif /* !FAST_CONSTANT_OFFSET_MODE */ + + PackedLoop + +#undef BodyOdd +#undef BodyEven +#undef LoopReset + +#else + DuffL(nl,label2, + bits1 = BitLeft(bits, leftShift); + bits = *psrc++; + *pdst = MROP_SOLID (bits1 | BitRight(bits, rightShift), *pdst); + pdst++; + ) +#endif + + if (endmask) { + bits1 = BitLeft(bits, leftShift); + if (BitLeft(endmask, rightShift)) { + bits = *psrc; + bits1 |= BitRight(bits, rightShift); + } + *pdst = MROP_MASK (bits1, *pdst, endmask); + } + afbScanlineIncDst(pdstLine, widthDst); + afbScanlineIncSrc(psrcLine, widthSrc); + } + } +#endif /* DO_UNALIGNED_BITBLT */ + } else { /* xdir == -1 */ + xoffSrc = (pptSrc->x + w - 1) & PIM; + xoffDst = (pbox->x2 - 1) & PIM; + pdstLine += ((pbox->x2-1) >> PWSH) + 1; + psrcLine += ((pptSrc->x+w - 1) >> PWSH) + 1; +#ifdef DO_UNALIGNED_BITBLT + nl = xoffSrc - xoffDst; + psrcLine = (PixelType *) + (((unsigned char *) psrcLine) + nl); +#else + if (xoffSrc == xoffDst) +#endif + { + while (h--) { + psrc = psrcLine; + pdst = pdstLine; + if (endmask) { + pdst--; + psrc--; + *pdst = MROP_MASK (*psrc, *pdst, endmask); + } + nl = nlMiddle; + +#ifdef LARGE_INSTRUCTION_CACHE +#ifdef FAST_CONSTANT_OFFSET_MODE + psrc -= nl & (UNROLL - 1); + pdst -= nl & (UNROLL - 1); + +#define BodyOdd(n) pdst[n-1] = MROP_SOLID (psrc[n-1], pdst[n-1]); + +#define BodyEven(n) BodyOdd(n) + +#define LoopReset \ +pdst -= UNROLL;\ +psrc -= UNROLL; + +#else + +#define BodyOdd(n) --pdst; --psrc; *pdst = MROP_SOLID(*psrc, *pdst); +#define BodyEven(n) BodyOdd(n) +#define LoopReset ; + +#endif + PackedLoop + +#undef BodyOdd +#undef BodyEven +#undef LoopReset + +#else + DuffL(nl,label3, + --pdst; --psrc; *pdst = MROP_SOLID (*psrc, *pdst);) +#endif + + if (startmask) { + --pdst; + --psrc; + *pdst = MROP_MASK(*psrc, *pdst, startmask); + } + afbScanlineIncDst(pdstLine, widthDst); + afbScanlineIncSrc(psrcLine, widthSrc); + } + } +#ifndef DO_UNALIGNED_BITBLT + else { + if (xoffDst > xoffSrc) { + rightShift = (xoffDst - xoffSrc); + leftShift = PPW - rightShift; + } else { + leftShift = (xoffSrc - xoffDst); + rightShift = PPW - leftShift; + } + while (h--) { + psrc = psrcLine; + pdst = pdstLine; + bits = 0; + if (xoffDst > xoffSrc) + bits = *--psrc; + if (endmask) { + bits1 = BitRight(bits, rightShift); + bits = *--psrc; + bits1 |= BitLeft(bits, leftShift); + pdst--; + *pdst = MROP_MASK(bits1, *pdst, endmask); + } + nl = nlMiddle; + +#ifdef LARGE_INSTRUCTION_CACHE + bits1 = bits; +#ifdef FAST_CONSTANT_OFFSET_MODE + psrc -= nl & (UNROLL - 1); + pdst -= nl & (UNROLL - 1); + +#define BodyOdd(n) \ +bits = psrc[n-1]; \ +pdst[n-1] = MROP_SOLID(BitRight(bits1, rightShift) | BitLeft(bits, leftShift),pdst[n-1]); + +#define BodyEven(n) \ +bits1 = psrc[n-1]; \ +pdst[n-1] = MROP_SOLID(BitRight(bits, rightShift) | BitLeft(bits1, leftShift),pdst[n-1]); + +#define LoopReset \ +pdst -= UNROLL; \ +psrc -= UNROLL; + +#else + +#define BodyOdd(n) \ +bits = *--psrc; --pdst; \ +*pdst = MROP_SOLID(BitRight(bits1, rightShift) | BitLeft(bits, leftShift),*pdst); + +#define BodyEven(n) \ +bits1 = *--psrc; --pdst; \ +*pdst = MROP_SOLID(BitRight(bits, rightShift) | BitLeft(bits1, leftShift),*pdst); + +#define LoopReset ; + +#endif + + PackedLoop + +#undef BodyOdd +#undef BodyEven +#undef LoopReset + +#else + DuffL(nl, label4, + bits1 = BitRight(bits, rightShift); + bits = *--psrc; + --pdst; + *pdst = MROP_SOLID(bits1 | BitLeft(bits, leftShift),*pdst); + ) +#endif + + if (startmask) { + bits1 = BitRight(bits, rightShift); + if (BitRight (startmask, leftShift)) { + bits = *--psrc; + bits1 |= BitLeft(bits, leftShift); + } + --pdst; + *pdst = MROP_MASK(bits1, *pdst, startmask); + } + afbScanlineIncDst(pdstLine, widthDst); + afbScanlineIncSrc(psrcLine, widthSrc); + } + } +#endif + } + } + pbox++; + pptSrc++; + } + if (pboxNew2) { + DEALLOCATE_LOCAL(pptNew2); + DEALLOCATE_LOCAL(pboxNew2); + } + if (pboxNew1) { + DEALLOCATE_LOCAL(pptNew1); + DEALLOCATE_LOCAL(pboxNew1); + } +} diff --git a/xorg-server-1.4/afb/afbbltC.c b/xorg-server-1.4/afb/afbbltC.c new file mode 100644 index 0000000..e85a8a4 --- /dev/null +++ b/xorg-server-1.4/afb/afbbltC.c @@ -0,0 +1,2 @@ +#define MROP Mcopy +#include "./afbblt.c" diff --git a/xorg-server-1.4/afb/afbbltCI.c b/xorg-server-1.4/afb/afbbltCI.c new file mode 100644 index 0000000..cfb282a --- /dev/null +++ b/xorg-server-1.4/afb/afbbltCI.c @@ -0,0 +1,2 @@ +#define MROP McopyInverted +#include "./afbblt.c" diff --git a/xorg-server-1.4/afb/afbbltG.c b/xorg-server-1.4/afb/afbbltG.c new file mode 100644 index 0000000..110e103 --- /dev/null +++ b/xorg-server-1.4/afb/afbbltG.c @@ -0,0 +1,2 @@ +#define MROP 0 +#include "./afbblt.c" diff --git a/xorg-server-1.4/afb/afbbltO.c b/xorg-server-1.4/afb/afbbltO.c new file mode 100644 index 0000000..4caf990 --- /dev/null +++ b/xorg-server-1.4/afb/afbbltO.c @@ -0,0 +1,2 @@ +#define MROP Mor +#include "./afbblt.c" diff --git a/xorg-server-1.4/afb/afbbltX.c b/xorg-server-1.4/afb/afbbltX.c new file mode 100644 index 0000000..34c3d9e --- /dev/null +++ b/xorg-server-1.4/afb/afbbltX.c @@ -0,0 +1,2 @@ +#define MROP Mxor +#include "./afbblt.c" diff --git a/xorg-server-1.4/afb/afbbres.c b/xorg-server-1.4/afb/afbbres.c new file mode 100644 index 0000000..dae4746 --- /dev/null +++ b/xorg-server-1.4/afb/afbbres.c @@ -0,0 +1,323 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "misc.h" +#include "afb.h" +#include "maskbits.h" +#include "miline.h" + +/* Solid bresenham line */ +/* NOTES + e2 is used less often than e1, so it's not in a register +*/ + +void +afbBresS(addrlbase, nlwidth, sizeDst, depthDst, signdx, signdy, axis, x1, y1, + e, e1, e2, len, rrops) +PixelType *addrlbase; /* pointer to base of bitmap */ +int nlwidth; /* width in longwords of bitmap */ +int sizeDst; +int depthDst; +int signdx, signdy; /* signs of directions */ +int axis; /* major axis (Y_AXIS or X_AXIS) */ +int x1, y1; /* initial point */ +register int e; /* error accumulator */ +register int e1; /* bresenham increments */ +int e2; +int len; /* length of line */ +unsigned char *rrops; +{ + register int yinc; /* increment to next scanline, in bytes */ + register PixelType *addrl; /* bitmask long pointer */ + register PixelType bit; /* current bit being set/cleared/etc. */ + PixelType leftbit = mfbGetmask(0); /* leftmost bit to process in new word */ + PixelType rightbit = mfbGetmask(PPW-1); /* rightmost bit to process in new word */ + + register int e3 = e2-e1; + PixelType tmp; + int saveE; + int saveLen; + int d; + + /* point to longword containing first point */ + yinc = signdy * nlwidth; + e = e-e1; /* to make looping easier */ + + if (!len) + return; + + saveLen = len; + saveE = e; + + for (d = 0; d < depthDst; d++) { + addrl = afbScanline(addrlbase, x1, y1, nlwidth); + addrlbase += sizeDst; /* @@@ NEXT PLANE @@@ */ + len = saveLen; + e = saveE; + bit = mfbGetmask(x1 & PIM); + + switch (rrops[d]) { + case RROP_BLACK: + if (axis == X_AXIS) { + if (signdx > 0) { + tmp = *addrl; + for (;;) { + tmp &= ~bit; + if (!--len) + break; + bit = SCRRIGHT(bit,1); + e += e1; + if (e >= 0) { + *addrl = tmp; + afbScanlineInc(addrl, yinc); + e += e3; + if (!bit) { + bit = leftbit; + addrl ++; + } + tmp = *addrl; + } else if (!bit) { + *addrl = tmp; + bit = leftbit; + addrl ++; + tmp = *addrl; + } + } + *addrl = tmp; + } else { + tmp = *addrl; + for (;;) { + tmp &= ~bit; + if (!--len) + break; + e += e1; + bit = SCRLEFT(bit,1); + if (e >= 0) { + *addrl = tmp; + afbScanlineInc(addrl, yinc); + e += e3; + if (!bit) { + bit = rightbit; + addrl --; + } + tmp = *addrl; + } else if (!bit) { + *addrl = tmp; + bit = rightbit; + addrl --; + tmp = *addrl; + } + } + *addrl = tmp; + } + } /* if X_AXIS */ else { + if (signdx > 0) { + while(len--) { + *addrl &= ~bit; + e += e1; + if (e >= 0) { + bit = SCRRIGHT(bit,1); + if (!bit) { bit = leftbit;addrl ++; } + e += e3; + } + afbScanlineInc(addrl, yinc); + } + } else { + while(len--) { + *addrl &= ~bit; + e += e1; + if (e >= 0) { + bit = SCRLEFT(bit,1); + if (!bit) { bit = rightbit;addrl --; } + e += e3; + } + afbScanlineInc(addrl, yinc); + } + } + } /* else Y_AXIS */ + break; + + case RROP_WHITE: + if (axis == X_AXIS) { + if (signdx > 0) { + tmp = *addrl; + for (;;) { + tmp |= bit; + if (!--len) + break; + e += e1; + bit = SCRRIGHT(bit,1); + if (e >= 0) { + *addrl = tmp; + afbScanlineInc(addrl, yinc); + e += e3; + if (!bit) { + bit = leftbit; + addrl ++; + } + tmp = *addrl; + } else if (!bit) { + *addrl = tmp; + bit = leftbit; + addrl ++; + tmp = *addrl; + } + } + *addrl = tmp; + } else { + tmp = *addrl; + for (;;) { + tmp |= bit; + if (!--len) + break; + e += e1; + bit = SCRLEFT(bit,1); + if (e >= 0) { + *addrl = tmp; + afbScanlineInc(addrl, yinc); + e += e3; + if (!bit) { + bit = rightbit; + addrl --; + } + tmp = *addrl; + } else if (!bit) { + *addrl = tmp; + bit = rightbit; + addrl --; + tmp = *addrl; + } + } + *addrl = tmp; + } + } /* if X_AXIS */ else { + if (signdx > 0) { + while(len--) { + *addrl |= bit; + e += e1; + if (e >= 0) { + bit = SCRRIGHT(bit,1); + if (!bit) { bit = leftbit;addrl ++; } + e += e3; + } + afbScanlineInc(addrl, yinc); + } + } else { + while(len--) { + *addrl |= bit; + e += e1; + if (e >= 0) { + bit = SCRLEFT(bit,1); + if (!bit) { bit = rightbit;addrl --; } + e += e3; + } + afbScanlineInc(addrl, yinc); + } + } + } /* else Y_AXIS */ + break; + + case RROP_INVERT: + if (axis == X_AXIS) { + if (signdx > 0) { + while(len--) { + *addrl ^= bit; + e += e1; + if (e >= 0) { + afbScanlineInc(addrl, yinc); + e += e3; + } + bit = SCRRIGHT(bit,1); + if (!bit) { bit = leftbit;addrl ++; } + } + } else { + while(len--) { + *addrl ^= bit; + e += e1; + if (e >= 0) { + afbScanlineInc(addrl, yinc); + e += e3; + } + bit = SCRLEFT(bit,1); + if (!bit) { bit = rightbit;addrl --; } + } + } + } /* if X_AXIS */ else { + if (signdx > 0) { + while(len--) { + *addrl ^= bit; + e += e1; + if (e >= 0) { + bit = SCRRIGHT(bit,1); + if (!bit) { bit = leftbit;addrl ++; } + e += e3; + } + afbScanlineInc(addrl, yinc); + } + } else { + while(len--) { + *addrl ^= bit; + e += e1; + if (e >= 0) { + bit = SCRLEFT(bit,1); + if (!bit) { bit = rightbit; addrl --; } + e += e3; + } + afbScanlineInc(addrl, yinc); + } + } + } /* else Y_AXIS */ + } /* switch */ + } /* for (d = ... ) */ +} diff --git a/xorg-server-1.4/afb/afbbresd.c b/xorg-server-1.4/afb/afbbresd.c new file mode 100644 index 0000000..4f07ede --- /dev/null +++ b/xorg-server-1.4/afb/afbbresd.c @@ -0,0 +1,214 @@ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "misc.h" +#include "afb.h" +#include "maskbits.h" +#include "miline.h" + +/* Dashed bresenham line */ + +#define StepDash\ + if (!--dashRemaining) { \ + if (++ dashIndex == numInDashList) \ + dashIndex = 0; \ + dashRemaining = pDash[dashIndex]; \ + rop = fgrop; \ + if (dashIndex & 1) \ + rop = bgrop; \ + } + +void +afbBresD(pdashIndex, pDash, numInDashList, pdashOffset, isDoubleDash, + addrlbase, nlwidth, sizeDst, depthDst, + signdx, signdy, axis, x1, y1, e, e1, e2, len, rrops, bgrrops) +int *pdashIndex; /* current dash */ +unsigned char *pDash; /* dash list */ +int numInDashList; /* total length of dash list */ +int *pdashOffset; /* offset into current dash */ +int isDoubleDash; +PixelType *addrlbase; /* pointer to base of bitmap */ +int nlwidth; /* width in longwords of bitmap */ +int sizeDst; +int depthDst; +int signdx, signdy; /* signs of directions */ +int axis; /* major axis (Y_AXIS or X_AXIS) */ +int x1, y1; /* initial point */ +register int e; /* error accumulator */ +register int e1; /* bresenham increments */ +int e2; +int len; /* length of line */ +unsigned char *rrops; +unsigned char *bgrrops; +{ + register int yinc; /* increment to next scanline, in bytes */ + register PixelType *addrl; + register int e3 = e2-e1; + register unsigned long bit; + PixelType leftbit = mfbGetmask(0); /* leftmost bit to process in new word */ + PixelType rightbit = mfbGetmask(PPW-1); /* rightmost bit to process in new word */ + int dashIndex; + int dashOffset; + int dashRemaining; + int rop; + int fgrop; + int bgrop; + int saveE; + int saveLen; + int d; + + dashOffset = *pdashOffset; + dashIndex = *pdashIndex; + dashRemaining = pDash[dashIndex] - dashOffset; + /* point to longword containing first point */ + + yinc = signdy * nlwidth; + e = e-e1; /* to make looping easier */ + + saveE = e; + saveLen = len; + + for (d = 0; d < depthDst; d++) { + addrl = afbScanline(addrlbase, x1, y1, nlwidth); + addrlbase += sizeDst; /* @@@ NEXT PLANE @@@ */ + + fgrop = rrops[d]; + bgrop = bgrrops[d]; + + e = saveE; + len = saveLen; + bit = mfbGetmask(x1 & PIM); + + rop = fgrop; + if (!isDoubleDash) + bgrop = -1; + if (dashIndex & 1) + rop = bgrop; + + if (axis == X_AXIS) { + if (signdx > 0) { + while(len--) { + if (rop == RROP_BLACK) + *addrl &= ~bit; + else if (rop == RROP_WHITE) + *addrl |= bit; + else if (rop == RROP_INVERT) + *addrl ^= bit; + e += e1; + if (e >= 0) { + afbScanlineInc(addrl, yinc); + e += e3; + } + bit = SCRRIGHT(bit,1); + if (!bit) { bit = leftbit;addrl ++; } + StepDash + } + } else { + while(len--) { + if (rop == RROP_BLACK) + *addrl &= ~bit; + else if (rop == RROP_WHITE) + *addrl |= bit; + else if (rop == RROP_INVERT) + *addrl ^= bit; + e += e1; + if (e >= 0) { + afbScanlineInc(addrl, yinc); + e += e3; + } + bit = SCRLEFT(bit,1); + if (!bit) { bit = rightbit;addrl --; } + StepDash + } + } + } /* if X_AXIS */ else { + if (signdx > 0) { + while(len--) { + if (rop == RROP_BLACK) + *addrl &= ~bit; + else if (rop == RROP_WHITE) + *addrl |= bit; + else if (rop == RROP_INVERT) + *addrl ^= bit; + e += e1; + if (e >= 0) { + bit = SCRRIGHT(bit,1); + if (!bit) { bit = leftbit;addrl ++; } + e += e3; + } + afbScanlineInc(addrl, yinc); + StepDash + } + } else { + while(len--) { + if (rop == RROP_BLACK) + *addrl &= ~bit; + else if (rop == RROP_WHITE) + *addrl |= bit; + else if (rop == RROP_INVERT) + *addrl ^= bit; + e += e1; + if (e >= 0) { + bit = SCRLEFT(bit,1); + if (!bit) { bit = rightbit;addrl --; } + e += e3; + } + afbScanlineInc(addrl, yinc); + StepDash + } + } + } /* else Y_AXIS */ + } /* for (d = ...) */ + *pdashIndex = dashIndex; + *pdashOffset = pDash[dashIndex] - dashRemaining; +} diff --git a/xorg-server-1.4/afb/afbbstore.c b/xorg-server-1.4/afb/afbbstore.c new file mode 100644 index 0000000..32d64ec --- /dev/null +++ b/xorg-server-1.4/afb/afbbstore.c @@ -0,0 +1,154 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/* + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the X Consortium. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "afb.h" +#include +#include "mibstore.h" +#include "regionstr.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "windowstr.h" + +/*- + *----------------------------------------------------------------------- + * afbSaveAreas -- + * Function called by miSaveAreas to actually fetch the areas to be + * saved into the backing pixmap. This is very simple to do, since + * afbDoBitblt is designed for this very thing. The region to save is + * already destination-relative and we're given the offset to the + * window origin, so we have only to create an array of points of the + * u.l. corners of the boxes in the region translated to the screen + * coordinate system and fetch the screen pixmap out of its devPrivate + * field.... + * + * Results: + * None. + * + * Side Effects: + * Data are copied from the screen into the pixmap. + * + *----------------------------------------------------------------------- + */ +void +afbSaveAreas(pPixmap, prgnSave, xorg, yorg, pWin) + PixmapPtr pPixmap; /* Backing pixmap */ + RegionPtr prgnSave; /* Region to save (pixmap-relative) */ + int xorg; /* X origin of region */ + int yorg; /* Y origin of region */ + WindowPtr pWin; +{ + register DDXPointPtr pPt; + DDXPointPtr pPtsInit; + register BoxPtr pBox; + register int numRects; + + numRects = REGION_NUM_RECTS(prgnSave); + pPtsInit = (DDXPointPtr)ALLOCATE_LOCAL(numRects * sizeof(DDXPointRec)); + if (!pPtsInit) + return; + + pBox = REGION_RECTS(prgnSave); + pPt = pPtsInit; + while (numRects--) { + pPt->x = pBox->x1 + xorg; + pPt->y = pBox->y1 + yorg; + pPt++; + pBox++; + } + + afbDoBitblt((DrawablePtr)pPixmap->drawable.pScreen->devPrivates[afbScreenPrivateIndex].ptr, + (DrawablePtr)pPixmap, + GXcopy, + prgnSave, + pPtsInit, wBackingBitPlanes (pWin)); + + DEALLOCATE_LOCAL(pPtsInit); +} + +/*- + *----------------------------------------------------------------------- + * afbRestoreAreas -- + * Function called by miRestoreAreas to actually fetch the areas to be + * restored from the backing pixmap. This is very simple to do, since + * afbDoBitblt is designed for this very thing. The region to restore is + * already destination-relative and we're given the offset to the + * window origin, so we have only to create an array of points of the + * u.l. corners of the boxes in the region translated to the pixmap + * coordinate system and fetch the screen pixmap out of its devPrivate + * field.... + * + * Results: + * None. + * + * Side Effects: + * Data are copied from the pixmap into the screen. + * + *----------------------------------------------------------------------- + */ +void +afbRestoreAreas(pPixmap, prgnRestore, xorg, yorg, pWin) + PixmapPtr pPixmap; /* Backing pixmap */ + RegionPtr prgnRestore; /* Region to restore (screen-relative)*/ + int xorg; /* X origin of window */ + int yorg; /* Y origin of window */ + WindowPtr pWin; +{ + register DDXPointPtr pPt; + DDXPointPtr pPtsInit; + register BoxPtr pBox; + register int numRects; + + numRects = REGION_NUM_RECTS(prgnRestore); + pPtsInit = (DDXPointPtr)ALLOCATE_LOCAL(numRects*sizeof(DDXPointRec)); + if (!pPtsInit) + return; + + pBox = REGION_RECTS(prgnRestore); + pPt = pPtsInit; + while (numRects--) { + pPt->x = pBox->x1 - xorg; + pPt->y = pBox->y1 - yorg; + pPt++; + pBox++; + } + + afbDoBitblt((DrawablePtr)pPixmap, + (DrawablePtr)pPixmap->drawable.pScreen->devPrivates[afbScreenPrivateIndex].ptr, + GXcopy, + prgnRestore, + pPtsInit, wBackingBitPlanes (pWin)); + + DEALLOCATE_LOCAL(pPtsInit); +} diff --git a/xorg-server-1.4/afb/afbclip.c b/xorg-server-1.4/afb/afbclip.c new file mode 100644 index 0000000..15be405 --- /dev/null +++ b/xorg-server-1.4/afb/afbclip.c @@ -0,0 +1,248 @@ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include "regionstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "gc.h" +#include "maskbits.h" +#include "mi.h" +#include "afb.h" + +#define ADDRECT(reg,r,fr,rx1,ry1,rx2,ry2) \ +if (((rx1) < (rx2)) && ((ry1) < (ry2)) && \ + (!((reg)->data->numRects && \ + ((r-1)->y1 == (ry1)) && \ + ((r-1)->y2 == (ry2)) && \ + ((r-1)->x1 <= (rx1)) && \ + ((r-1)->x2 >= (rx2))))) \ +{ \ + if ((reg)->data->numRects == (reg)->data->size) \ + { \ + miRectAlloc(reg, 1); \ + fr = REGION_BOXPTR(reg); \ + r = fr + (reg)->data->numRects; \ + } \ + r->x1 = (rx1); \ + r->y1 = (ry1); \ + r->x2 = (rx2); \ + r->y2 = (ry2); \ + (reg)->data->numRects++; \ + if(r->x1 < (reg)->extents.x1) \ + (reg)->extents.x1 = r->x1; \ + if(r->x2 > (reg)->extents.x2) \ + (reg)->extents.x2 = r->x2; \ + r++; \ +} + +/* Convert bitmap clip mask into clipping region. + * First, goes through each line and makes boxes by noting the transitions + * from 0 to 1 and 1 to 0. + * Then it coalesces the current line with the previous if they have boxes + * at the same X coordinates. + */ +RegionPtr +afbPixmapToRegion(pPix) + PixmapPtr pPix; +{ + register RegionPtr pReg; + register PixelType *pw, w; + register int ib; + int width, h, base, rx1 = 0, crects; + PixelType *pwLineEnd; + int irectPrevStart, irectLineStart; + register BoxPtr prectO, prectN; + BoxPtr FirstRect, rects, prectLineStart; + Bool fInBox, fSame; + register PixelType mask0 = mfbGetmask(0); + PixelType *pwLine; + int nWidth; + + pReg = REGION_CREATE(pPix->drawable.pScreen, NULL, 1); + if(!pReg) + return NullRegion; + FirstRect = REGION_BOXPTR(pReg); + rects = FirstRect; + + pwLine = (PixelType *) pPix->devPrivate.ptr; + nWidth = pPix->devKind / PGSZB; + + width = pPix->drawable.width; + pReg->extents.x1 = width - 1; + pReg->extents.x2 = 0; + irectPrevStart = -1; + for(h = 0; h < pPix->drawable.height; h++) { + pw = pwLine; + pwLine += nWidth; + irectLineStart = rects - FirstRect; + /* If the Screen left most bit of the word is set, we're starting in + * a box */ + if(*pw & mask0) { + fInBox = TRUE; + rx1 = 0; + } + else + fInBox = FALSE; + /* Process all words which are fully in the pixmap */ + pwLineEnd = pw + (width >> PWSH); + for (base = 0; pw < pwLineEnd; base += PPW) { + w = *pw++; + if (fInBox) { + if (!~w) + continue; + } else { + if (!w) + continue; + } + for(ib = 0; ib < PPW; ib++) { + /* If the Screen left most bit of the word is set, we're + * starting a box */ + if(w & mask0) { + if(!fInBox) { + rx1 = base + ib; + /* start new box */ + fInBox = TRUE; + } + } else { + if(fInBox) { + /* end box */ + ADDRECT(pReg, rects, FirstRect, + rx1, h, base + ib, h + 1); + fInBox = FALSE; + } + } + /* Shift the word VISUALLY left one. */ + w = SCRLEFT(w, 1); + } + } + if(width & PIM) { + /* Process final partial word on line */ + w = *pw++; + for(ib = 0; ib < (width & PIM); ib++) { + /* If the Screen left most bit of the word is set, we're + * starting a box */ + if(w & mask0) { + if(!fInBox) { + rx1 = base + ib; + /* start new box */ + fInBox = TRUE; + } + } else { + if(fInBox) { + /* end box */ + ADDRECT(pReg, rects, FirstRect, + rx1, h, base + ib, h + 1); + fInBox = FALSE; + } + } + /* Shift the word VISUALLY left one. */ + w = SCRLEFT(w, 1); + } + } + /* If scanline ended with last bit set, end the box */ + if(fInBox) { + ADDRECT(pReg, rects, FirstRect, + rx1, h, base + (width & PIM), h + 1); + } + /* if all rectangles on this line have the same x-coords as + * those on the previous line, then add 1 to all the previous y2s and + * throw away all the rectangles from this line + */ + fSame = FALSE; + if(irectPrevStart != -1) { + crects = irectLineStart - irectPrevStart; + if(crects == ((rects - FirstRect) - irectLineStart)) { + prectO = FirstRect + irectPrevStart; + prectN = prectLineStart = FirstRect + irectLineStart; + fSame = TRUE; + while(prectO < prectLineStart) { + if((prectO->x1 != prectN->x1) || (prectO->x2 != prectN->x2)) { + fSame = FALSE; + break; + } + prectO++; + prectN++; + } + if (fSame) { + prectO = FirstRect + irectPrevStart; + while(prectO < prectLineStart) { + prectO->y2 += 1; + prectO++; + } + rects -= crects; + pReg->data->numRects -= crects; + } + } + } + if(!fSame) + irectPrevStart = irectLineStart; + } + if (!pReg->data->numRects) + pReg->extents.x1 = pReg->extents.x2 = 0; + else + { + pReg->extents.y1 = REGION_BOXPTR(pReg)->y1; + pReg->extents.y2 = REGION_END(pReg)->y2; + if (pReg->data->numRects == 1) { + xfree(pReg->data); + pReg->data = (RegDataPtr)NULL; + } + } +#ifdef DEBUG + if (!miValidRegion(pReg)) + FatalError("Assertion failed file %s, line %d: expr\n", __FILE__, __LINE__); +#endif + return(pReg); +} diff --git a/xorg-server-1.4/afb/afbcmap.c b/xorg-server-1.4/afb/afbcmap.c new file mode 100644 index 0000000..9608a36 --- /dev/null +++ b/xorg-server-1.4/afb/afbcmap.c @@ -0,0 +1,84 @@ +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + 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 no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or X Consortium +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and X Consortium make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN 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 SUN 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. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "scrnintstr.h" +#include "colormapst.h" +#include "resource.h" +#include "micmap.h" +#include "afb.h" + +int +afbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps) +{ + return miListInstalledColormaps(pScreen, pmaps); +} + + +void +afbInstallColormap(ColormapPtr pmap) +{ + miInstallColormap(pmap); +} + +void +afbUninstallColormap(ColormapPtr pmap) +{ + miUninstallColormap(pmap); +} + +void +afbResolveColor(short unsigned int *pred, short unsigned int *pgreen, short unsigned int *pblue, register VisualPtr pVisual) +{ + miResolveColor(pred, pgreen, pblue, pVisual); +} + +Bool +afbInitializeColormap(register ColormapPtr pmap) +{ + return miInitializeColormap(pmap); +} + +/* + * Given a list of formats for a screen, create a list + * of visuals and depths for the screen which correspond to + * the set which can be used with this version of afb. + */ + +Bool +afbInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp, int *ndepthp, int *rootDepthp, VisualID *defaultVisp, long unsigned int sizes, int bitsPerRGB) +{ + return miInitVisuals(visualp, depthp, nvisualp, ndepthp, rootDepthp, + defaultVisp, sizes, bitsPerRGB, -1); +} diff --git a/xorg-server-1.4/afb/afbfillarc.c b/xorg-server-1.4/afb/afbfillarc.c new file mode 100644 index 0000000..fa685ba --- /dev/null +++ b/xorg-server-1.4/afb/afbfillarc.c @@ -0,0 +1,346 @@ +/************************************************************ + +Copyright (c) 1989 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +********************************************************/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "regionstr.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "afb.h" +#include "maskbits.h" +#include "mifillarc.h" +#include "mi.h" + +static void +afbFillEllipseSolid(DrawablePtr pDraw, xArc *arc, register unsigned char *rrops) +{ + int x, y, e; + int yk, xk, ym, xm, dx, dy, xorg, yorg; + register int slw; + miFillArcRec info; + PixelType *addrlt, *addrlb; + register PixelType *pdst; + PixelType *addrl; + register int n; + register int d; + int nlwidth; + register int xpos; + PixelType startmask, endmask; + int nlmiddle; + int depthDst; + int sizeDst; + + afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, + addrlt); + miFillArcSetup(arc, &info); + MIFILLARCSETUP(); + xorg += pDraw->x; + yorg += pDraw->y; + addrlb = addrlt; + addrlt += nlwidth * (yorg - y); + addrlb += nlwidth * (yorg + y + dy); + while (y) { + addrlt += nlwidth; + addrlb -= nlwidth; + MIFILLARCSTEP(slw); + if (!slw) + continue; + xpos = xorg - x; + pdst = addrl = afbScanlineOffset(addrlt, (xpos >> PWSH)); + if (((xpos & PIM) + slw) < PPW) { + maskpartialbits(xpos, slw, startmask); + for (d = 0; d < depthDst; d++, pdst += sizeDst) { /* @@@ NEXT PLANE @@@ */ + switch (rrops[d]) { + case RROP_BLACK: + *pdst &= ~startmask; + break; + case RROP_WHITE: + *pdst |= startmask; + break; + case RROP_INVERT: + *pdst ^= startmask; + break; + case RROP_NOP: + break; + } + } + if (miFillArcLower(slw)) { + pdst = afbScanlineOffset(addrlb, (xpos >> PWSH)); + + for (d = 0; d < depthDst; d++, pdst += sizeDst) { /* @@@ NEXT PLANE @@@ */ + switch (rrops[d]) { + case RROP_BLACK: + *pdst &= ~startmask; + break; + case RROP_WHITE: + *pdst |= startmask; + break; + case RROP_INVERT: + *pdst ^= startmask; + break; + case RROP_NOP: + break; + } + } + } + continue; + } + maskbits(xpos, slw, startmask, endmask, nlmiddle); + for (d = 0; d < depthDst; d++, addrl += sizeDst) { /* @@@ NEXT PLANE @@@ */ + n = nlmiddle; + pdst = addrl; + + switch (rrops[d]) { + case RROP_BLACK: + if (startmask) + *pdst++ &= ~startmask; + while (n--) + *pdst++ = 0; + if (endmask) + *pdst &= ~endmask; + break; + + case RROP_WHITE: + if (startmask) + *pdst++ |= startmask; + while (n--) + *pdst++ = ~0; + if (endmask) + *pdst |= endmask; + break; + + case RROP_INVERT: + if (startmask) + *pdst++ ^= startmask; + while (n--) + *pdst++ ^= ~0; + if (endmask) + *pdst ^= endmask; + break; + + case RROP_NOP: + break; + } + } + if (!miFillArcLower(slw)) + continue; + addrl = afbScanlineOffset(addrlb, (xpos >> PWSH)); + for (d = 0; d < depthDst; d++, addrl += sizeDst) { /* @@@ NEXT PLANE @@@ */ + n = nlmiddle; + pdst = addrl; + + switch (rrops[d]) { + case RROP_BLACK: + if (startmask) + *pdst++ &= ~startmask; + while (n--) + *pdst++ = 0; + if (endmask) + *pdst &= ~endmask; + break; + + case RROP_WHITE: + if (startmask) + *pdst++ |= startmask; + while (n--) + *pdst++ = ~0; + if (endmask) + *pdst |= endmask; + break; + + case RROP_INVERT: + if (startmask) + *pdst++ ^= startmask; + while (n--) + *pdst++ ^= ~0; + if (endmask) + *pdst ^= endmask; + break; + + case RROP_NOP: + break; + } + } + } +} + +#define FILLSPAN(xl,xr,addr) \ + if (xr >= xl) { \ + width = xr - xl + 1; \ + addrl = afbScanlineOffset(addr, (xl >> PWSH)); \ + if (((xl & PIM) + width) < PPW) { \ + maskpartialbits(xl, width, startmask); \ + for (pdst = addrl, d = 0; d < depthDst; d++, pdst += sizeDst) { /* @@@ NEXT PLANE @@@ */ \ + switch (rrops[d]) { \ + case RROP_BLACK: \ + *pdst &= ~startmask; \ + break; \ + case RROP_WHITE: \ + *pdst |= startmask; \ + break; \ + case RROP_INVERT: \ + *pdst ^= startmask; \ + break; \ + case RROP_NOP: \ + break; \ + } \ + } \ + } else { \ + maskbits(xl, width, startmask, endmask, nlmiddle); \ + for (d = 0; d < depthDst; d++, addrl += sizeDst) { /* @@@ NEXT PLANE @@@ */ \ + n = nlmiddle; \ + pdst = addrl; \ + switch (rrops[d]) { \ + case RROP_BLACK: \ + if (startmask) \ + *pdst++ &= ~startmask; \ + while (n--) \ + *pdst++ = 0; \ + if (endmask) \ + *pdst &= ~endmask; \ + break; \ + case RROP_WHITE: \ + if (startmask) \ + *pdst++ |= startmask; \ + while (n--) \ + *pdst++ = ~0; \ + if (endmask) \ + *pdst |= endmask; \ + break; \ + case RROP_INVERT: \ + if (startmask) \ + *pdst++ ^= startmask; \ + while (n--) \ + *pdst++ ^= ~0; \ + if (endmask) \ + *pdst ^= endmask; \ + break; \ + case RROP_NOP: \ + break; \ + } \ + } \ + } \ + } + +#define FILLSLICESPANS(flip,addr) \ + if (!flip) { \ + FILLSPAN(xl, xr, addr); \ + } else { \ + xc = xorg - x; \ + FILLSPAN(xc, xr, addr); \ + xc += slw - 1; \ + FILLSPAN(xl, xc, addr); \ + } + +static void +afbFillArcSliceSolidCopy(DrawablePtr pDraw, GCPtr pGC, xArc *arc, register unsigned char *rrops) +{ + PixelType *addrl; + register PixelType *pdst; + register int n; + register int d; + int yk, xk, ym, xm, dx, dy, xorg, yorg, slw; + register int x, y, e; + miFillArcRec info; + miArcSliceRec slice; + int xl, xr, xc; + PixelType *addrlt, *addrlb; + int nlwidth; + int width; + PixelType startmask, endmask; + int nlmiddle; + int sizeDst; + int depthDst; + + afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, + addrlt); + miFillArcSetup(arc, &info); + miFillArcSliceSetup(arc, &slice, pGC); + MIFILLARCSETUP(); + xorg += pDraw->x; + yorg += pDraw->y; + addrlb = addrlt; + addrlt = afbScanlineDeltaNoBankSwitch(addrlt, yorg - y, nlwidth); + addrlb = afbScanlineDeltaNoBankSwitch(addrlb, yorg + y + dy, nlwidth); + slice.edge1.x += pDraw->x; + slice.edge2.x += pDraw->x; + while (y > 0) { + afbScanlineIncNoBankSwitch(addrlt, nlwidth); + afbScanlineIncNoBankSwitch(addrlb, -nlwidth); + MIFILLARCSTEP(slw); + MIARCSLICESTEP(slice.edge1); + MIARCSLICESTEP(slice.edge2); + if (miFillSliceUpper(slice)) { + MIARCSLICEUPPER(xl, xr, slice, slw); + FILLSLICESPANS(slice.flip_top, addrlt); + } + if (miFillSliceLower(slice)) { + MIARCSLICELOWER(xl, xr, slice, slw); + FILLSLICESPANS(slice.flip_bot, addrlb); + } + } +} + +void +afbPolyFillArcSolid(register DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) +{ + afbPrivGC *priv; + register xArc *arc; + register int i; + BoxRec box; + RegionPtr cclip; + unsigned char *rrops; + + priv = (afbPrivGC *) pGC->devPrivates[afbGCPrivateIndex].ptr; + rrops = priv->rrops; + cclip = pGC->pCompositeClip; + for (arc = parcs, i = narcs; --i >= 0; arc++) { + if (miFillArcEmpty(arc)) + continue; + if (miCanFillArc(arc)) { + box.x1 = arc->x + pDraw->x; + box.y1 = arc->y + pDraw->y; + box.x2 = box.x1 + (int)arc->width + 1; + box.y2 = box.y1 + (int)arc->height + 1; + if (RECT_IN_REGION(pDraw->pScreen, cclip, &box) == rgnIN) { + if ((arc->angle2 >= FULLCIRCLE) || + (arc->angle2 <= -FULLCIRCLE)) + afbFillEllipseSolid(pDraw, arc, rrops); + else + afbFillArcSliceSolidCopy(pDraw, pGC, arc, rrops); + continue; + } + } + miPolyFillArc(pDraw, pGC, 1, arc); + } +} diff --git a/xorg-server-1.4/afb/afbfillrct.c b/xorg-server-1.4/afb/afbfillrct.c new file mode 100644 index 0000000..06fb373 --- /dev/null +++ b/xorg-server-1.4/afb/afbfillrct.c @@ -0,0 +1,291 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "pixmapstr.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "regionstr.h" +#include "scrnintstr.h" + +#include "afb.h" +#include "maskbits.h" + +#define MODEQ(a, b) ((a) %= (b)) + +/* + filled rectangles. + translate the rectangles, clip them, and call the +helper function in the GC. +*/ + +#define NUM_STACK_RECTS 1024 + +void +afbPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, xRectangle *prectInit) + + + /* number of rectangles to fill */ + /* Pointer to first rectangle to fill */ +{ + xRectangle *prect; + RegionPtr prgnClip; + register BoxPtr pbox; + register BoxPtr pboxClipped; + BoxPtr pboxClippedBase; + BoxPtr pextent; + BoxRec stackRects[NUM_STACK_RECTS]; + int numRects; + int n; + int xorg, yorg; + afbPrivGC *priv; + unsigned char *rrops; + unsigned char *rropsOS; + + priv = (afbPrivGC *)pGC->devPrivates[afbGCPrivateIndex].ptr; + prgnClip = pGC->pCompositeClip; + rrops = priv->rrops; + rropsOS = priv->rropOS; + + prect = prectInit; + xorg = pDrawable->x; + yorg = pDrawable->y; + if (xorg || yorg) { + prect = prectInit; + n = nrectFill; + Duff(n, prect->x += xorg; prect->y += yorg; prect++); + } + + prect = prectInit; + + numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; + if (numRects > NUM_STACK_RECTS) { + pboxClippedBase = (BoxPtr)ALLOCATE_LOCAL(numRects * sizeof(BoxRec)); + if (!pboxClippedBase) + return; + } + else + pboxClippedBase = stackRects; + + pboxClipped = pboxClippedBase; + + if (REGION_NUM_RECTS(prgnClip) == 1) { + int x1, y1, x2, y2, bx2, by2; + + pextent = REGION_RECTS(prgnClip); + x1 = pextent->x1; + y1 = pextent->y1; + x2 = pextent->x2; + y2 = pextent->y2; + while (nrectFill--) { + if ((pboxClipped->x1 = prect->x) < x1) + pboxClipped->x1 = x1; + + if ((pboxClipped->y1 = prect->y) < y1) + pboxClipped->y1 = y1; + + bx2 = (int) prect->x + (int) prect->width; + if (bx2 > x2) + bx2 = x2; + pboxClipped->x2 = bx2; + + by2 = (int) prect->y + (int) prect->height; + if (by2 > y2) + by2 = y2; + pboxClipped->y2 = by2; + + prect++; + if ((pboxClipped->x1 < pboxClipped->x2) && + (pboxClipped->y1 < pboxClipped->y2)) { + pboxClipped++; + } + } + } else { + int x1, y1, x2, y2, bx2, by2; + + pextent = REGION_EXTENTS(pGC->pScreen, prgnClip); + x1 = pextent->x1; + y1 = pextent->y1; + x2 = pextent->x2; + y2 = pextent->y2; + while (nrectFill--) { + BoxRec box; + + if ((box.x1 = prect->x) < x1) + box.x1 = x1; + + if ((box.y1 = prect->y) < y1) + box.y1 = y1; + + bx2 = (int) prect->x + (int) prect->width; + if (bx2 > x2) + bx2 = x2; + box.x2 = bx2; + + by2 = (int) prect->y + (int) prect->height; + if (by2 > y2) + by2 = y2; + box.y2 = by2; + + prect++; + + if ((box.x1 >= box.x2) || (box.y1 >= box.y2)) + continue; + + n = REGION_NUM_RECTS (prgnClip); + pbox = REGION_RECTS(prgnClip); + + /* clip the rectangle to each box in the clip region + this is logically equivalent to calling Intersect() + */ + while(n--) { + pboxClipped->x1 = max(box.x1, pbox->x1); + pboxClipped->y1 = max(box.y1, pbox->y1); + pboxClipped->x2 = min(box.x2, pbox->x2); + pboxClipped->y2 = min(box.y2, pbox->y2); + pbox++; + + /* see if clipping left anything */ + if(pboxClipped->x1 < pboxClipped->x2 && + pboxClipped->y1 < pboxClipped->y2) { + pboxClipped++; + } + } + } + } + if (pboxClipped != pboxClippedBase) { + switch (pGC->fillStyle) { + case FillSolid: + afbSolidFillArea(pDrawable, pboxClipped-pboxClippedBase, + pboxClippedBase, rrops); + break; + case FillTiled: + switch (pGC->alu) { + case GXcopy: + if (pGC->pRotatedPixmap) + afbTileAreaPPWCopy(pDrawable, pboxClipped-pboxClippedBase, + pboxClippedBase, GXcopy, + pGC->pRotatedPixmap, pGC->planemask); + else + afbTileAreaCopy (pDrawable, pboxClipped-pboxClippedBase, + pboxClippedBase, GXcopy, + pGC->tile.pixmap, + pGC->patOrg.x, pGC->patOrg.y, + pGC->planemask); + break; + + default: + if (pGC->pRotatedPixmap) + afbTileAreaPPWGeneral(pDrawable, pboxClipped-pboxClippedBase, + pboxClippedBase, pGC->alu, + pGC->pRotatedPixmap, + pGC->planemask); + else + afbTileAreaGeneral(pDrawable, pboxClipped-pboxClippedBase, + pboxClippedBase, pGC->alu, + pGC->tile.pixmap, + pGC->patOrg.x, pGC->patOrg.y, + pGC->planemask); + break; + } /* switch (alu) */ + break; + + case FillStippled: + if (pGC->pRotatedPixmap) + afbStippleAreaPPW(pDrawable, pboxClipped-pboxClippedBase, + pboxClippedBase, pGC->pRotatedPixmap, rrops); + else + afbStippleArea(pDrawable, pboxClipped-pboxClippedBase, + pboxClippedBase, pGC->stipple, + pGC->patOrg.x, pGC->patOrg.y, rrops); + break; + + case FillOpaqueStippled: + switch (pGC->alu) { + case GXcopy: + if (pGC->pRotatedPixmap) + afbOpaqueStippleAreaPPWCopy(pDrawable, pboxClipped-pboxClippedBase, + pboxClippedBase, GXcopy, + pGC->pRotatedPixmap, + rropsOS, pGC->planemask); + else + afbOpaqueStippleAreaCopy(pDrawable, pboxClipped-pboxClippedBase, + pboxClippedBase, GXcopy, + pGC->stipple, + pGC->patOrg.x, pGC->patOrg.y, rropsOS, + pGC->planemask); + break; + + default: + if (pGC->pRotatedPixmap) + afbOpaqueStippleAreaPPWGeneral(pDrawable, pboxClipped-pboxClippedBase, + pboxClippedBase, pGC->alu, + pGC->pRotatedPixmap, + rropsOS, + pGC->planemask); + else + afbOpaqueStippleAreaGeneral(pDrawable, pboxClipped-pboxClippedBase, + pboxClippedBase, pGC->alu, + pGC->stipple, + pGC->patOrg.x, pGC->patOrg.y, + rropsOS, + pGC->planemask); + break; + } /* switch (alu) */ + break; + } + } + if (pboxClippedBase != stackRects) + DEALLOCATE_LOCAL(pboxClippedBase); +} diff --git a/xorg-server-1.4/afb/afbfillsp.c b/xorg-server-1.4/afb/afbfillsp.c new file mode 100644 index 0000000..539c345 --- /dev/null +++ b/xorg-server-1.4/afb/afbfillsp.c @@ -0,0 +1,1129 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "gcstruct.h" +#include "window.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "windowstr.h" +#include "afb.h" + +#include "maskbits.h" + +#include "mergerop.h" + +#include "servermd.h" +#include "mi.h" +#include "mispans.h" + +/* scanline filling for monochrome frame buffer + written by drewry, oct 1986 + + these routines all clip. they assume that anything that has called +them has already translated the points (i.e. pGC->miTranslate is +non-zero, which is howit gets set in afbCreateGC().) + + the number of new scnalines created by clipping == +MaxRectsPerBand * nSpans. + +*/ + + +void +afbSolidFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) + DrawablePtr pDrawable; + GCPtr pGC; + int nInit; /* number of spans to fill */ + DDXPointPtr pptInit; /* pointer to list of start points */ + int *pwidthInit; /* pointer to list of n widths */ + int fSorted; +{ + /* next three parameters are post-clip */ + int n; /* number of spans to fill */ + register DDXPointPtr ppt; /* pointer to list of start points */ + register int *pwidth; /* pointer to list of n widths */ + PixelType *addrlBase; /* pointer to start of bitmap */ + PixelType *pBase; + int nlwidth; /* width in longwords of bitmap */ + register PixelType *addrl;/* pointer to current longword in bitmap */ + register int nlmiddle; + register PixelType startmask; + register PixelType endmask; + int *pwidthFree; /* copies of the pointers to free */ + DDXPointPtr pptFree; + int depthDst; + int sizeDst; + int d; + unsigned char *rrops; + + n = nInit * miFindMaxBand(pGC->pCompositeClip); + pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); + pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + if(!pptFree || !pwidthFree) { + if (pptFree) DEALLOCATE_LOCAL(pptFree); + if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + return; + } + pwidth = pwidthFree; + ppt = pptFree; + n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, + ppt, pwidth, fSorted); + + afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, + pBase); + rrops = ((afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr))->rrops; + while (n--) { + addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); + + for (d = 0; d < depthDst; d++, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ + if (*pwidth) { + addrl = addrlBase; + + switch (rrops[d]) { + case RROP_BLACK: + if ( ((ppt->x & PIM) + *pwidth) < PPW) { + /* all bits inside same longword */ + maskpartialbits(ppt->x, *pwidth, startmask); + *addrl &= ~startmask; + } else { + maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); + if (startmask) + *addrl++ &= ~startmask; + Duff (nlmiddle, *addrl++ = 0x0); + if (endmask) + *addrl &= ~endmask; + } + break; + + case RROP_WHITE: + if ( ((ppt->x & PIM) + *pwidth) < PPW) { + /* all bits inside same longword */ + maskpartialbits(ppt->x, *pwidth, startmask); + *addrl |= startmask; + } else { + maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); + if (startmask) + *addrl++ |= startmask; + Duff (nlmiddle, *addrl++ = ~0); + if (endmask) + *addrl |= endmask; + } + break; + case RROP_INVERT: + if ( ((ppt->x & PIM) + *pwidth) < PPW) { + /* all bits inside same longword */ + maskpartialbits(ppt->x, *pwidth, startmask); + *addrl ^= startmask; + } else { + maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); + if (startmask) + *addrl++ ^= startmask; + Duff (nlmiddle, *addrl++ ^= ~0); + if (endmask) + *addrl ^= endmask; + } + break; + case RROP_NOP: + break; + } + } + } + pwidth++; + ppt++; + } + DEALLOCATE_LOCAL(pptFree); + DEALLOCATE_LOCAL(pwidthFree); +} + +void +afbStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) + DrawablePtr pDrawable; + GC *pGC; + int nInit; /* number of spans to fill */ + DDXPointPtr pptInit; /* pointer to list of start points */ + int *pwidthInit; /* pointer to list of n widths */ + int fSorted; +{ + /* next three parameters are post-clip */ + int n; /* number of spans to fill */ + register DDXPointPtr ppt; /* pointer to list of start points */ + register int *pwidth; /* pointer to list of n widths */ + PixelType *addrlBase; /* pointer to start of bitmap */ + PixelType *pBase; + int nlwidth; /* width in longwords of bitmap */ + register PixelType *addrl;/* pointer to current longword in bitmap */ + register PixelType src; + register int nlmiddle; + register PixelType startmask; + register PixelType endmask; + PixmapPtr pStipple; + PixelType *psrc; + int tileHeight; + int *pwidthFree; /* copies of the pointers to free */ + DDXPointPtr pptFree; + int d; + int depthDst; + int sizeDst; + unsigned char *rrops; + + n = nInit * miFindMaxBand(pGC->pCompositeClip); + pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); + pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + if(!pptFree || !pwidthFree) { + if (pptFree) DEALLOCATE_LOCAL(pptFree); + if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + return; + } + pwidth = pwidthFree; + ppt = pptFree; + n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, + ppt, pwidth, fSorted); + + afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, + pBase); + + pStipple = pGC->pRotatedPixmap; + tileHeight = pStipple->drawable.height; + psrc = (PixelType *)(pStipple->devPrivate.ptr); + + rrops = ((afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr))->rrops; + + while (n--) { + src = psrc[ppt->y % tileHeight]; + addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); + for (d = 0; d < depthDst; d++, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ + addrl = addrlBase; + + switch (rrops[d]) { + case RROP_BLACK: + /* all bits inside same longword */ + if ( ((ppt->x & PIM) + *pwidth) < PPW) { + maskpartialbits(ppt->x, *pwidth, startmask); + *addrl &= ~(src & startmask); + } else { + maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); + if (startmask) + *addrl++ &= ~(src & startmask); + Duff (nlmiddle, *addrl++ &= ~src); + if (endmask) + *addrl &= ~(src & endmask); + } + break; + case RROP_WHITE: + /* all bits inside same longword */ + if ( ((ppt->x & PIM) + *pwidth) < PPW) { + maskpartialbits(ppt->x, *pwidth, startmask); + *addrl |= (src & startmask); + } else { + maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); + if (startmask) + *addrl++ |= (src & startmask); + Duff (nlmiddle, *addrl++ |= src); + if (endmask) + *addrl |= (src & endmask); + } + break; + case RROP_INVERT: + /* all bits inside same longword */ + if ( ((ppt->x & PIM) + *pwidth) < PPW) { + maskpartialbits(ppt->x, *pwidth, startmask); + *addrl ^= (src & startmask); + } else { + maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); + if (startmask) + *addrl++ ^= (src & startmask); + Duff (nlmiddle, *addrl++ ^= src); + if (endmask) + *addrl ^= (src & endmask); + } + break; + + case RROP_NOP: + break; + } + } + pwidth++; + ppt++; + } + DEALLOCATE_LOCAL(pptFree); + DEALLOCATE_LOCAL(pwidthFree); +} + +void +afbTileFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) + DrawablePtr pDrawable; + GC *pGC; + int nInit; /* number of spans to fill */ + DDXPointPtr pptInit; /* pointer to list of start points */ + int *pwidthInit; /* pointer to list of n widths */ + int fSorted; +{ + /* next three parameters are post-clip */ + int n; /* number of spans to fill */ + register DDXPointPtr ppt; /* pointer to list of start points */ + register int *pwidth; /* pointer to list of n widths */ + PixelType *addrlBase; /* pointer to start of bitmap */ + PixelType *pBase; + int nlwidth; /* width in longwords of bitmap */ + register PixelType *addrl; /* pointer to current longword in bitmap */ + register PixelType src; + register int nlmiddle; + register PixelType startmask; + register PixelType endmask; + PixmapPtr pTile; + PixelType *psrc; + int tileHeight; + int rop; + int *pwidthFree; /* copies of the pointers to free */ + DDXPointPtr pptFree; + int sizeDst; + int depthDst; + int d; + + n = nInit * miFindMaxBand(pGC->pCompositeClip); + pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); + pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + if(!pptFree || !pwidthFree) { + if (pptFree) DEALLOCATE_LOCAL(pptFree); + if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + return; + } + pwidth = pwidthFree; + ppt = pptFree; + n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, + ppt, pwidth, fSorted); + + afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, + pBase); + + pTile = pGC->pRotatedPixmap; + tileHeight = pTile->drawable.height; + psrc = (PixelType *)(pTile->devPrivate.ptr); + rop = pGC->alu; + + switch(rop) { + case GXcopy: +#define DoMaskCopyRop(src,dst,mask) (((dst) & ~(mask)) | ((src) & (mask))) + while (n--) { + if (*pwidth) { + addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); + + for (d = 0; d < depthDst; d++, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ + if (!(pGC->planemask & (1 << d))) + continue; + + addrl = addrlBase; + src = psrc[ppt->y % tileHeight + tileHeight * d]; + if ( ((ppt->x & PIM) + *pwidth) < PPW) { + maskpartialbits(ppt->x, *pwidth, startmask); + *addrl = DoMaskCopyRop (src, *addrl, startmask); + } else { + maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); + if (startmask) { + *addrl = DoMaskCopyRop (src, *addrl, startmask); + addrl++; + } + while (nlmiddle--) { + *addrl = src; + addrl++; + } + if (endmask) + *addrl = DoMaskCopyRop (src, *addrl, endmask); + } + } + } + pwidth++; + ppt++; + } + break; + + default: + { + register DeclareMergeRop (); + + InitializeMergeRop(rop,~0); + while (n--) { + if (*pwidth) { + addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); + for (d = 0; d < depthDst; d++, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ + if (!(pGC->planemask & (1 << d))) + continue; + + addrl = addrlBase; + + src = psrc[ppt->y % tileHeight + tileHeight * d]; + if ( ((ppt->x & PIM) + *pwidth) < PPW) { + maskpartialbits(ppt->x, *pwidth, startmask); + *addrl = DoMaskMergeRop (src, *addrl, startmask); + } else { + maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); + if (startmask) { + *addrl = DoMaskMergeRop (src, *addrl, startmask); + addrl++; + } + while (nlmiddle--) { + *addrl = DoMergeRop (src, *addrl); + addrl++; + } + if (endmask) + *addrl = DoMaskMergeRop (src, *addrl, endmask); + } + } + } + pwidth++; + ppt++; + } + break; + } + } + DEALLOCATE_LOCAL(pptFree); + DEALLOCATE_LOCAL(pwidthFree); +} + +void +afbOpaqueStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) + DrawablePtr pDrawable; + GC *pGC; + int nInit; /* number of spans to fill */ + DDXPointPtr pptInit; /* pointer to list of start points */ + int *pwidthInit; /* pointer to list of n widths */ + int fSorted; +{ + /* next three parameters are post-clip */ + int n; /* number of spans to fill */ + register DDXPointPtr ppt; /* pointer to list of start points */ + register int *pwidth; /* pointer to list of n widths */ + PixelType *addrlBase; /* pointer to start of bitmap */ + PixelType *pBase; + int nlwidth; /* width in longwords of bitmap */ + register PixelType *addrl; /* pointer to current longword in bitmap */ + register PixelType src = 0; + register int nlmiddle; + register PixelType startmask; + register PixelType endmask; + PixmapPtr pTile; + PixelType *psrc; + int tileHeight; + int rop; + unsigned char *rropsOS; + int *pwidthFree; /* copies of the pointers to free */ + DDXPointPtr pptFree; + int sizeDst; + int depthDst; + int d; + + n = nInit * miFindMaxBand(pGC->pCompositeClip); + pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); + pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + if(!pptFree || !pwidthFree) { + if (pptFree) DEALLOCATE_LOCAL(pptFree); + if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + return; + } + pwidth = pwidthFree; + ppt = pptFree; + n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, + ppt, pwidth, fSorted); + + afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, + pBase); + + pTile = pGC->pRotatedPixmap; + tileHeight = pTile->drawable.height; + psrc = (PixelType *)(pTile->devPrivate.ptr); + rop = pGC->alu; + rropsOS = ((afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr))->rropOS; + + switch(rop) { + case GXcopy: + while (n--) { + addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); + if (*pwidth) { + for (d = 0; d < depthDst; d++, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ + switch (rropsOS[d]) { + case RROP_BLACK: + src = 0; + break; + case RROP_WHITE: + src = ~0; + break; + case RROP_INVERT: + src = ~psrc[ppt->y % tileHeight]; + break; + case RROP_COPY: + src = psrc[ppt->y % tileHeight]; + break; + case RROP_NOP: + continue; + } + + addrl = addrlBase; + + if ( ((ppt->x & PIM) + *pwidth) < PPW) { + maskpartialbits(ppt->x, *pwidth, startmask); + *addrl = DoMaskCopyRop (src, *addrl, startmask); + } else { + maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); + if (startmask) { + *addrl = DoMaskCopyRop (src, *addrl, startmask); + addrl++; + } + while (nlmiddle--) { + *addrl = src; + addrl++; + } + if (endmask) + *addrl = DoMaskCopyRop (src, *addrl, endmask); + } + } /* for (d = ...) */ + } + + pwidth++; + ppt++; + } + break; + + default: + { + register DeclareMergeRop (); + + InitializeMergeRop(rop,~0); + while (n--) { + addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); + if (*pwidth) { + for (d = 0; d < depthDst; d++, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ + switch (rropsOS[d]) { + case RROP_BLACK: + src = 0; + break; + case RROP_WHITE: + src = ~0; + break; + case RROP_INVERT: + src = ~psrc[ppt->y % tileHeight]; + break; + case RROP_COPY: + src = psrc[ppt->y % tileHeight]; + break; + case RROP_NOP: + continue; + } + + addrl = addrlBase; + + if ( ((ppt->x & PIM) + *pwidth) < PPW) { + maskpartialbits(ppt->x, *pwidth, startmask); + *addrl = DoMaskMergeRop (src, *addrl, startmask); + } else { + maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); + if (startmask) { + *addrl = DoMaskMergeRop (src, *addrl, startmask); + addrl++; + } + while (nlmiddle--) { + *addrl = DoMergeRop (src, *addrl); + addrl++; + } + if (endmask) + *addrl = DoMaskMergeRop (src, *addrl, endmask); + } + } /* for (d = ...) */ + } + pwidth++; + ppt++; + } /* while (n) */ + break; + } + } /* switch (rop) */ + DEALLOCATE_LOCAL(pptFree); + DEALLOCATE_LOCAL(pwidthFree); +} + +/* Fill spans with tiles that aren't PPW bits wide */ +void +afbUnnaturalTileFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) + DrawablePtr pDrawable; + GC *pGC; + int nInit; /* number of spans to fill */ + DDXPointPtr pptInit; /* pointer to list of start points */ + int *pwidthInit; /* pointer to list of n widths */ + int fSorted; +{ + int iline; /* first line of tile to use */ + /* next three parameters are post-clip */ + int n; /* number of spans to fill */ + register DDXPointPtr ppt; /* pointer to list of start points */ + register int *pwidth; /* pointer to list of n widths */ + PixelType *addrlBase; /* pointer to start of bitmap */ + PixelType *pBase; + int nlwidth; /* width in longwords of bitmap */ + register PixelType *pdst;/* pointer to current word in bitmap */ + register PixelType *psrc;/* pointer to current word in tile */ + register int nlMiddle; + register int rop, nstart; + PixelType startmask; + PixmapPtr pTile; /* pointer to tile we want to fill with */ + int w, width, x, xSrc, ySrc, srcStartOver, nend; + int tlwidth, rem, tileWidth, tileHeight, endinc; + PixelType endmask, *psrcT; + int *pwidthFree; /* copies of the pointers to free */ + DDXPointPtr pptFree; + int sizeDst; + int sizeTile; + int depthDst; + register int d; + + n = nInit * miFindMaxBand(pGC->pCompositeClip); + pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); + pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + if(!pptFree || !pwidthFree) { + if (pptFree) DEALLOCATE_LOCAL(pptFree); + if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + return; + } + pwidth = pwidthFree; + ppt = pptFree; + n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, + ppt, pwidth, fSorted); + + pTile = pGC->tile.pixmap; + tlwidth = pTile->devKind / PGSZB; + rop = pGC->alu; + + xSrc = pDrawable->x; + ySrc = pDrawable->y; + + afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, + pBase); + + tileWidth = pTile->drawable.width; + tileHeight = pTile->drawable.height; + sizeTile = tlwidth * tileHeight; + + /* this replaces rotating the tile. Instead we just adjust the offset + * at which we start grabbing bits from the tile. + * Ensure that ppt->x - xSrc >= 0 and ppt->y - ySrc >= 0, + * so that iline and rem always stay within the tile bounds. + */ + xSrc += (pGC->patOrg.x % tileWidth) - tileWidth; + ySrc += (pGC->patOrg.y % tileHeight) - tileHeight; + + while (n--) { + iline = (ppt->y - ySrc) % tileHeight; + psrcT = (PixelType *) pTile->devPrivate.ptr + (iline * tlwidth); + addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); + + for (d = 0; d < depthDst; d++, psrcT += sizeTile, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ + if (!(pGC->planemask & (1 << d))) + continue; + + if (*pwidth) { + x = ppt->x; + pdst = addrlBase; + width = *pwidth; + while(width > 0) { + psrc = psrcT; + w = min(tileWidth, width); + if((rem = (x - xSrc) % tileWidth) != 0) { + /* if we're in the middle of the tile, get + as many bits as will finish the span, or + as many as will get to the left edge of the tile, + or a longword worth, starting at the appropriate + offset in the tile. + */ + w = min(min(tileWidth - rem, width), BITMAP_SCANLINE_PAD); + endinc = rem / BITMAP_SCANLINE_PAD; + getandputrop((psrc+endinc), (rem&PIM), (x & PIM), w, pdst, rop); + if((x & PIM) + w >= PPW) + pdst++; + } else if(((x & PIM) + w) < PPW) { + /* doing < PPW bits is easy, and worth special-casing */ + putbitsrop(*psrc, x & PIM, w, pdst, rop); + } else { + /* start at the left edge of the tile, + and put down as much as we can + */ + maskbits(x, w, startmask, endmask, nlMiddle); + + if (startmask) + nstart = PPW - (x & PIM); + else + nstart = 0; + if (endmask) + nend = (x + w) & PIM; + else + nend = 0; + + srcStartOver = nstart > PLST; + + if(startmask) { + putbitsrop(*psrc, (x & PIM), nstart, pdst, rop); + pdst++; + if(srcStartOver) + psrc++; + } + + while(nlMiddle--) { + getandputrop0(psrc, nstart, PPW, pdst, rop); + pdst++; + psrc++; + } + if(endmask) { + getandputrop0(psrc, nstart, nend, pdst, rop); + } + } + x += w; + width -= w; + } + } + } + ppt++; + pwidth++; + } + DEALLOCATE_LOCAL(pptFree); + DEALLOCATE_LOCAL(pwidthFree); +} + +/* Fill spans with stipples that aren't PPW bits wide */ +void +afbUnnaturalStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) + DrawablePtr pDrawable; + GC *pGC; + int nInit; /* number of spans to fill */ + DDXPointPtr pptInit; /* pointer to list of start points */ + int *pwidthInit; /* pointer to list of n widths */ + int fSorted; +{ + /* next three parameters are post-clip */ + int n; /* number of spans to fill */ + register DDXPointPtr ppt; /* pointer to list of start points */ + register int *pwidth; /* pointer to list of n widths */ + int iline; /* first line of tile to use */ + PixelType *addrlBase; /* pointer to start of bitmap */ + PixelType *pBase; + int nlwidth; /* width in longwords of bitmap */ + register PixelType *pdst; /* pointer to current word in bitmap */ + register PixelType *psrc; /* pointer to current word in tile */ + register int nlMiddle; + register int rop, nstart; + PixelType startmask; + PixmapPtr pTile; /* pointer to tile we want to fill with */ + int w, width, x, xSrc, ySrc, srcStartOver, nend; + PixelType endmask, *psrcT; + int tlwidth, rem, tileWidth, endinc; + int tileHeight; + int *pwidthFree; /* copies of the pointers to free */ + DDXPointPtr pptFree; + unsigned char *rrops; + register int d; + int sizeDst; + int depthDst; + + n = nInit * miFindMaxBand(pGC->pCompositeClip); + pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); + pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + if(!pptFree || !pwidthFree) { + if (pptFree) DEALLOCATE_LOCAL(pptFree); + if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + return; + } + pwidth = pwidthFree; + ppt = pptFree; + n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, + ppt, pwidth, fSorted); + + pTile = pGC->stipple; + tlwidth = pTile->devKind / PGSZB; + xSrc = pDrawable->x; + ySrc = pDrawable->y; + afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, + pBase); + + tileWidth = pTile->drawable.width; + tileHeight = pTile->drawable.height; + rrops = ((afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr))->rrops; + + /* this replaces rotating the stipple. Instead, we just adjust the offset + * at which we start grabbing bits from the stipple. + * Ensure that ppt->x - xSrc >= 0 and ppt->y - ySrc >= 0, + * so that iline and rem always stay within the tile bounds. + */ + xSrc += (pGC->patOrg.x % tileWidth) - tileWidth; + ySrc += (pGC->patOrg.y % tileHeight) - tileHeight; + while (n--) { + iline = (ppt->y - ySrc) % tileHeight; + psrcT = (PixelType *) pTile->devPrivate.ptr + (iline * tlwidth); + addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); + + for (d = 0; d < depthDst; d++, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ + rop = rrops[d]; + if (rop == RROP_NOP) + continue; + + pdst = addrlBase; + x = ppt->x; + + if (*pwidth) { + width = *pwidth; + while(width > 0) { + psrc = psrcT; + w = min(tileWidth, width); + if((rem = (x - xSrc) % tileWidth) != 0) { + /* if we're in the middle of the tile, get + as many bits as will finish the span, or + as many as will get to the left edge of the tile, + or a longword worth, starting at the appropriate + offset in the tile. + */ + w = min(min(tileWidth - rem, width), BITMAP_SCANLINE_PAD); + endinc = rem / BITMAP_SCANLINE_PAD; + getandputrrop((psrc + endinc), (rem & PIM), (x & PIM), + w, pdst, rop) + if((x & PIM) + w >= PPW) + pdst++; + } else if(((x & PIM) + w) < PPW) { + /* doing < PPW bits is easy, and worth special-casing */ + putbitsrrop(*psrc, x & PIM, w, pdst, rop); + } else { + /* start at the left edge of the tile, + and put down as much as we can + */ + maskbits(x, w, startmask, endmask, nlMiddle); + + if (startmask) + nstart = PPW - (x & PIM); + else + nstart = 0; + if (endmask) + nend = (x + w) & PIM; + else + nend = 0; + + srcStartOver = nstart > PLST; + + if(startmask) { + putbitsrrop(*psrc, (x & PIM), nstart, pdst, rop); + pdst++; + if(srcStartOver) + psrc++; + } + + while(nlMiddle--) { + getandputrrop0(psrc, nstart, PPW, pdst, rop); + pdst++; + psrc++; + } + if(endmask) { + getandputrrop0(psrc, nstart, nend, pdst, rop); + } + } + x += w; + width -= w; + } + } + } + ppt++; + pwidth++; + } + DEALLOCATE_LOCAL(pptFree); + DEALLOCATE_LOCAL(pwidthFree); +} + +/* Fill spans with OpaqueStipples that aren't PPW bits wide */ +void +afbUnnaturalOpaqueStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) + DrawablePtr pDrawable; + GC *pGC; + int nInit; /* number of spans to fill */ + DDXPointPtr pptInit; /* pointer to list of start points */ + int *pwidthInit; /* pointer to list of n widths */ + int fSorted; +{ + int iline; /* first line of tile to use */ + /* next three parameters are post-clip */ + int n; /* number of spans to fill */ + register DDXPointPtr ppt; /* pointer to list of start points */ + register int *pwidth; /* pointer to list of n widths */ + PixelType *addrlBase; /* pointer to start of bitmap */ + PixelType *pBase; + int nlwidth; /* width in longwords of bitmap */ + register PixelType *pdst;/* pointer to current word in bitmap */ + register PixelType *psrc;/* pointer to current word in tile */ + register int nlMiddle; + register int d; + register PixelType tmpsrc = 0; + register PixelType tmpdst; + register int alu, nstart; + register unsigned char *rropsOS; + PixelType startmask; + PixmapPtr pTile; /* pointer to tile we want to fill with */ + int w, width, x, xSrc, ySrc, srcStartOver, nend; + int tlwidth, rem, tileWidth, tileHeight, endinc; + PixelType endmask, *psrcT; + int *pwidthFree; /* copies of the pointers to free */ + DDXPointPtr pptFree; + int sizeDst; + int depthDst; + + n = nInit * miFindMaxBand(pGC->pCompositeClip); + pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); + pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + if(!pptFree || !pwidthFree) { + if (pptFree) DEALLOCATE_LOCAL(pptFree); + if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + return; + } + pwidth = pwidthFree; + ppt = pptFree; + n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, + ppt, pwidth, fSorted); + + pTile = pGC->stipple; + tlwidth = pTile->devKind / PGSZB; + alu = pGC->alu; + + xSrc = pDrawable->x; + ySrc = pDrawable->y; + + afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, + pBase); + + tileWidth = pTile->drawable.width; + tileHeight = pTile->drawable.height; + rropsOS = afbGetGCPrivate(pGC)->rropOS; + + /* this replaces rotating the tile. Instead we just adjust the offset + * at which we start grabbing bits from the tile. + * Ensure that ppt->x - xSrc >= 0 and ppt->y - ySrc >= 0, + * so that iline and rem always stay within the tile bounds. + */ + xSrc += (pGC->patOrg.x % tileWidth) - tileWidth; + ySrc += (pGC->patOrg.y % tileHeight) - tileHeight; + + while (n--) { + iline = (ppt->y - ySrc) % tileHeight; + psrcT = (PixelType *) pTile->devPrivate.ptr + (iline * tlwidth); + addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); + + for (d = 0; d < depthDst; d++, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ + if (!(pGC->planemask & (1 << d))) + continue; + + if (*pwidth) { + x = ppt->x; + pdst = addrlBase; + width = *pwidth; + while(width > 0) { + psrc = psrcT; + w = min(tileWidth, width); + if((rem = (x - xSrc) % tileWidth) != 0) { + /* if we're in the middle of the tile, get + as many bits as will finish the span, or + as many as will get to the left edge of the tile, + or a longword worth, starting at the appropriate + offset in the tile. + */ + w = min(min(tileWidth - rem, width), BITMAP_SCANLINE_PAD); + endinc = rem / BITMAP_SCANLINE_PAD; + switch (rropsOS[d]) { + case RROP_BLACK: + tmpsrc = 0; + break; + case RROP_WHITE: + tmpsrc = ~0; + break; + + case RROP_COPY: + getbits ((psrc+endinc), (rem&PIM), w, tmpsrc); + break; + + case RROP_INVERT: + getbits ((psrc+endinc), (rem&PIM), w, tmpsrc); + tmpsrc = ~tmpsrc; + break; + } + + if (alu != GXcopy) { + getbits (pdst, (x & PIM), w, tmpdst); + DoRop (tmpsrc, alu, tmpsrc, tmpdst); + } + + putbits (tmpsrc, (x & PIM), w, pdst); + if((x & PIM) + w >= PPW) + pdst++; + } else if(((x & PIM) + w) < PPW) { + /* doing < PPW bits is easy, and worth special-casing */ + switch (rropsOS[d]) { + case RROP_BLACK: + tmpsrc = 0; + break; + case RROP_WHITE: + tmpsrc = ~0; + break; + case RROP_COPY: + tmpsrc = *psrc; + break; + case RROP_INVERT: + tmpsrc = ~*psrc; + break; + } + if (alu != GXcopy) { + getbits (pdst, (x & PIM), w, tmpdst); + DoRop (tmpsrc, alu, tmpsrc, tmpdst); + } + putbits (tmpsrc, (x & PIM), w, pdst); + } else { + /* start at the left edge of the tile, + and put down as much as we can + */ + maskbits(x, w, startmask, endmask, nlMiddle); + + if (startmask) + nstart = PPW - (x & PIM); + else + nstart = 0; + if (endmask) + nend = (x + w) & PIM; + else + nend = 0; + + srcStartOver = nstart > PLST; + + if(startmask) { + switch (rropsOS[d]) { + case RROP_BLACK: + tmpsrc = 0; + break; + case RROP_WHITE: + tmpsrc = ~0; + break; + case RROP_COPY: + tmpsrc = *psrc; + break; + case RROP_INVERT: + tmpsrc = ~*psrc; + break; + } + if (alu != GXcopy) { + getbits (pdst, (x & PIM), nstart, tmpdst); + DoRop (tmpsrc, alu, tmpsrc, tmpdst); + } + putbits (tmpsrc, (x & PIM), nstart, pdst); + pdst++; + if(srcStartOver) + psrc++; + } + + while(nlMiddle--) { + switch (rropsOS[d]) { + case RROP_BLACK: + tmpsrc = 0; + break; + case RROP_WHITE: + tmpsrc = ~0; + break; + case RROP_COPY: + getbits (psrc, nstart, PPW, tmpsrc); + break; + case RROP_INVERT: + getbits (psrc, nstart, PPW, tmpsrc); + tmpsrc = ~tmpsrc; + break; + } + if (alu != GXcopy) { + tmpdst = *pdst; + DoRop (tmpsrc, alu, tmpsrc, tmpdst); + } + *pdst++ = tmpsrc; + /*putbits (tmpsrc, 0, PPW, pdst); + pdst++;*/ + psrc++; + } + if(endmask) { + switch (rropsOS[d]) { + case RROP_BLACK: + tmpsrc = 0; + break; + case RROP_WHITE: + tmpsrc = ~0; + break; + + case RROP_COPY: + getbits (psrc, nstart, nend, tmpsrc); + break; + + case RROP_INVERT: + getbits (psrc, nstart, nend, tmpsrc); + tmpsrc = ~tmpsrc; + break; + } + if (alu != GXcopy) { + tmpdst = *pdst; + DoRop (tmpsrc, alu, tmpsrc, tmpdst); + } + putbits (tmpsrc, 0, nend, pdst); + } + } + x += w; + width -= w; + } + } + } + ppt++; + pwidth++; + } + DEALLOCATE_LOCAL(pptFree); + DEALLOCATE_LOCAL(pwidthFree); +} diff --git a/xorg-server-1.4/afb/afbfont.c b/xorg-server-1.4/afb/afbfont.c new file mode 100644 index 0000000..11a4494 --- /dev/null +++ b/xorg-server-1.4/afb/afbfont.c @@ -0,0 +1,77 @@ +/* + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include "afb.h" +#include +#include "dixfontstr.h" +#include "scrnintstr.h" + +/*ARGSUSED*/ +Bool +afbRealizeFont( pscr, pFont) + ScreenPtr pscr; + FontPtr pFont; +{ + return (TRUE); +} + +/*ARGSUSED*/ +Bool +afbUnrealizeFont( pscr, pFont) + ScreenPtr pscr; + FontPtr pFont; +{ + return (TRUE); +} diff --git a/xorg-server-1.4/afb/afbgc.c b/xorg-server-1.4/afb/afbgc.c new file mode 100644 index 0000000..59c09e0 --- /dev/null +++ b/xorg-server-1.4/afb/afbgc.c @@ -0,0 +1,684 @@ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include +#include +#include "afb.h" +#include "dixfontstr.h" +#include +#include "gcstruct.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "region.h" + +#include "mistruct.h" +#include "migc.h" + +#include "maskbits.h" + +static void afbDestroyGC(GCPtr); +static void afbValidateGC(GCPtr, unsigned long, DrawablePtr); + +static GCFuncs afbFuncs = { + afbValidateGC, + miChangeGC, + miCopyGC, + afbDestroyGC, + miChangeClip, + miDestroyClip, + miCopyClip +}; + +static GCOps afbGCOps = { + afbSolidFS, + afbSetSpans, + afbPutImage, + afbCopyArea, + miCopyPlane, + afbPolyPoint, + afbLineSS, + afbSegmentSS, + miPolyRectangle, + afbZeroPolyArcSS, + afbFillPolygonSolid, + afbPolyFillRect, + afbPolyFillArcSolid, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + afbTEGlyphBlt, + afbPolyGlyphBlt, + afbPushPixels +}; + +static void +afbReduceOpaqueStipple(PixelType fg, PixelType bg, unsigned long planemask, + int depth, unsigned char *rop) +{ + register int d; + register Pixel mask = 1; + + bg ^= fg; + + for (d = 0; d < depth; d++, mask <<= 1) { + if (!(planemask & mask)) + rop[d] = RROP_NOP; + else if (!(bg & mask)) { + /* Both fg and bg have a 0 or 1 in this plane */ + if (fg & mask) + rop[d] = RROP_WHITE; + else + rop[d] = RROP_BLACK; + } else { + /* Both fg and bg have different bits on this plane */ + if (fg & mask) + rop[d] = RROP_COPY; + else + rop[d] = RROP_INVERT; + } + } +} + +Bool +afbCreateGC(pGC) + register GCPtr pGC; +{ + afbPrivGC *pPriv; + + pGC->clientClip = NULL; + pGC->clientClipType = CT_NONE; + + /* some of the output primitives aren't really necessary, since + they will be filled in ValidateGC because of dix/CreateGC() + setting all the change bits. Others are necessary because although + they depend on being a monochrome frame buffer, they don't change + */ + + pGC->ops = &afbGCOps; + pGC->funcs = &afbFuncs; + + /* afb wants to translate before scan convesion */ + pGC->miTranslate = 1; + + pPriv = (afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr); + afbReduceRop(pGC->alu, pGC->fgPixel, pGC->planemask, pGC->depth, + pPriv->rrops); + afbReduceOpaqueStipple(pGC->fgPixel, pGC->bgPixel, pGC->planemask, + pGC->depth, pPriv->rropOS); + + pGC->fExpose = TRUE; + pGC->pRotatedPixmap = NullPixmap; + pGC->freeCompClip = FALSE; + return TRUE; +} + +static void +afbComputeCompositeClip(GCPtr pGC, DrawablePtr pDrawable) +{ + if (pDrawable->type == DRAWABLE_WINDOW) { + WindowPtr pWin = (WindowPtr) pDrawable; + RegionPtr pregWin; + Bool freeTmpClip, freeCompClip; + + if (pGC->subWindowMode == IncludeInferiors) { + pregWin = NotClippedByChildren(pWin); + freeTmpClip = TRUE; + } else { + pregWin = &pWin->clipList; + freeTmpClip = FALSE; + } + freeCompClip = pGC->freeCompClip; + + /* + * if there is no client clip, we can get by with just keeping the + * pointer we got, and remembering whether or not should destroy (or + * maybe re-use) it later. this way, we avoid unnecessary copying of + * regions. (this wins especially if many clients clip by children + * and have no client clip.) + */ + if (pGC->clientClipType == CT_NONE) { + if (freeCompClip) + REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); + pGC->pCompositeClip = pregWin; + pGC->freeCompClip = freeTmpClip; + } else { + /* + * we need one 'real' region to put into the composite clip. if + * pregWin the current composite clip are real, we can get rid of + * one. if pregWin is real and the current composite clip isn't, + * use pregWin for the composite clip. if the current composite + * clip is real and pregWin isn't, use the current composite + * clip. if neither is real, create a new region. + */ + + REGION_TRANSLATE(pGC->pScreen, pGC->clientClip, + pDrawable->x + pGC->clipOrg.x, + pDrawable->y + pGC->clipOrg.y); + + if (freeCompClip) { + REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, pregWin, + pGC->clientClip); + if (freeTmpClip) + REGION_DESTROY(pGC->pScreen, pregWin); + } else if (freeTmpClip) { + REGION_INTERSECT(pGC->pScreen, pregWin, pregWin, pGC->clientClip); + pGC->pCompositeClip = pregWin; + } else { + pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, NullBox, 0); + REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, + pregWin, pGC->clientClip); + } + pGC->freeCompClip = TRUE; + REGION_TRANSLATE(pGC->pScreen, pGC->clientClip, + -(pDrawable->x + pGC->clipOrg.x), + -(pDrawable->y + pGC->clipOrg.y)); + } + } /* end of composite clip for a window */ + else { + BoxRec pixbounds; + + /* XXX should we translate by drawable.x/y here ? */ + pixbounds.x1 = 0; + pixbounds.y1 = 0; + pixbounds.x2 = pDrawable->width; + pixbounds.y2 = pDrawable->height; + + if (pGC->freeCompClip) { + REGION_RESET(pGC->pScreen, pGC->pCompositeClip, &pixbounds); + } else { + pGC->freeCompClip = TRUE; + pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, &pixbounds, 1); + } + + if (pGC->clientClipType == CT_REGION) { + REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip, -pGC->clipOrg.x, + -pGC->clipOrg.y); + REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, + pGC->pCompositeClip, pGC->clientClip); + REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip, pGC->clipOrg.x, + pGC->clipOrg.y); + } + } /* end of composite clip for pixmap */ +} /* end afbComputeCompositeClip */ + +/* Clipping conventions + if the drawable is a window + CT_REGION ==> pCompositeClip really is the composite + CT_other ==> pCompositeClip is the window clip region + if the drawable is a pixmap + CT_REGION ==> pCompositeClip is the translated client region + clipped to the pixmap boundary + CT_other ==> pCompositeClip is the pixmap bounding box +*/ + +/*ARGSUSED*/ +static void +afbValidateGC(pGC, changes, pDrawable) + register GCPtr pGC; + unsigned long changes; + DrawablePtr pDrawable; +{ + register afbPrivGCPtr devPriv; + int mask; /* stateChanges */ + int index; /* used for stepping through bitfields */ + int xrot, yrot; /* rotations for tile and stipple pattern */ + /* flags for changing the proc vector + and updating things in devPriv + */ + int new_rotate, new_rrop, new_line, new_text, new_fill; + DDXPointRec oldOrg; /* origin of thing GC was last used with */ + + oldOrg = pGC->lastWinOrg; + + pGC->lastWinOrg.x = pDrawable->x; + pGC->lastWinOrg.y = pDrawable->y; + + /* we need to re-rotate the tile if the previous window/pixmap + origin (oldOrg) differs from the new window/pixmap origin + (pGC->lastWinOrg) + */ + new_rotate = (oldOrg.x != pGC->lastWinOrg.x) || + (oldOrg.y != pGC->lastWinOrg.y); + + + devPriv = ((afbPrivGCPtr)(pGC->devPrivates[afbGCPrivateIndex].ptr)); + + + /* + if the client clip is different or moved OR + the subwindowMode has changed OR + the window's clip has changed since the last validation + we need to recompute the composite clip + */ + if ((changes & (GCClipXOrigin|GCClipYOrigin|GCClipMask|GCSubwindowMode)) || + (pDrawable->serialNumber != (pGC->serialNumber & DRAWABLE_SERIAL_BITS))) + afbComputeCompositeClip(pGC, pDrawable); + + new_rrop = FALSE; + new_line = FALSE; + new_text = FALSE; + new_fill = FALSE; + + mask = changes; + while (mask) { + index = lowbit(mask); + mask &= ~index; + + /* this switch acculmulates a list of which procedures + might have to change due to changes in the GC. in + some cases (e.g. changing one 16 bit tile for another) + we might not really need a change, but the code is + being paranoid. + this sort of batching wins if, for example, the alu + and the font have been changed, or any other pair + of items that both change the same thing. + */ + switch (index) { + case GCPlaneMask: + case GCFunction: + case GCForeground: + new_rrop = TRUE; + break; + case GCBackground: + new_rrop = TRUE; /* for opaque stipples */ + break; + case GCLineStyle: + case GCLineWidth: + case GCJoinStyle: + new_line = TRUE; + break; + case GCCapStyle: + break; + case GCFillStyle: + new_fill = TRUE; + break; + case GCFillRule: + break; + case GCTile: + if(pGC->tileIsPixel) + break; + new_rotate = TRUE; + new_fill = TRUE; + break; + + case GCStipple: + if(pGC->stipple == (PixmapPtr)NULL) + break; + new_rotate = TRUE; + new_fill = TRUE; + break; + + case GCTileStipXOrigin: + new_rotate = TRUE; + break; + + case GCTileStipYOrigin: + new_rotate = TRUE; + break; + + case GCFont: + new_text = TRUE; + break; + case GCSubwindowMode: + break; + case GCGraphicsExposures: + break; + case GCClipXOrigin: + break; + case GCClipYOrigin: + break; + case GCClipMask: + break; + case GCDashOffset: + break; + case GCDashList: + break; + case GCArcMode: + break; + default: + break; + } + } + + /* deal with the changes we've collected . + new_rrop must be done first because subsequent things + depend on it. + */ + + if(new_rotate || new_fill) { + Bool new_pix = FALSE; + + /* figure out how much to rotate */ + xrot = pGC->patOrg.x; + yrot = pGC->patOrg.y; + xrot += pDrawable->x; + yrot += pDrawable->y; + + switch (pGC->fillStyle) { + case FillTiled: + /* copy current tile and stipple */ + if (!pGC->tileIsPixel && + (pGC->tile.pixmap->drawable.width <= PPW) && + !(pGC->tile.pixmap->drawable.width & + (pGC->tile.pixmap->drawable.width - 1))) { + afbCopyRotatePixmap(pGC->tile.pixmap, &pGC->pRotatedPixmap, + xrot, yrot); + new_pix = TRUE; + } + break; + case FillStippled: + case FillOpaqueStippled: + if (pGC->stipple && (pGC->stipple->drawable.width <= PPW) && + !(pGC->stipple->drawable.width & + (pGC->stipple->drawable.width - 1))) { + afbCopyRotatePixmap(pGC->stipple, &pGC->pRotatedPixmap, + xrot, yrot); + new_pix = TRUE; + } + } + /* destroy any previously rotated tile or stipple */ + if (!new_pix && pGC->pRotatedPixmap) { + (*pDrawable->pScreen->DestroyPixmap)(pGC->pRotatedPixmap); + pGC->pRotatedPixmap = (PixmapPtr)NULL; + } + } + + /* + * duck out here when the GC is unchanged + */ + + if (!changes) + return; + + if (new_rrop || new_fill) { + afbReduceRop(pGC->alu, pGC->fgPixel, pGC->planemask, pDrawable->depth, + devPriv->rrops); + afbReduceOpaqueStipple(pGC->fgPixel, pGC->bgPixel, pGC->planemask, + pGC->depth, devPriv->rropOS); + new_fill = TRUE; + } + + if (new_line || new_fill || new_text) { + if (!pGC->ops->devPrivate.val) { + pGC->ops = miCreateGCOps(pGC->ops); + pGC->ops->devPrivate.val = 1; + } + } + + if (new_line || new_fill) { + if (pGC->lineWidth == 0) { + if (pGC->lineStyle == LineSolid && pGC->fillStyle == FillSolid) + pGC->ops->PolyArc = afbZeroPolyArcSS; + else + pGC->ops->PolyArc = miZeroPolyArc; + } else + pGC->ops->PolyArc = miPolyArc; + if (pGC->lineStyle == LineSolid) { + if(pGC->lineWidth == 0) { + if (pGC->fillStyle == FillSolid) { + pGC->ops->PolySegment = afbSegmentSS; + pGC->ops->Polylines = afbLineSS; + } + else + { + pGC->ops->PolySegment = miPolySegment; + pGC->ops->Polylines = miZeroLine; + } + } else { + pGC->ops->PolySegment = miPolySegment; + pGC->ops->Polylines = miWideLine; + } + } else { + if(pGC->lineWidth == 0 && pGC->fillStyle == FillSolid) { + pGC->ops->PolySegment = afbSegmentSD; + pGC->ops->Polylines = afbLineSD; + } else { + pGC->ops->PolySegment = miPolySegment; + pGC->ops->Polylines = miWideDash; + } + } + } + + if (new_text || new_fill) { + if ((pGC->font) && + (FONTMAXBOUNDS(pGC->font,rightSideBearing) - + FONTMINBOUNDS(pGC->font,leftSideBearing) > 32 || + FONTMINBOUNDS(pGC->font,characterWidth) < 0)) { + pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; + pGC->ops->ImageGlyphBlt = miImageGlyphBlt; + } else { + /* special case ImageGlyphBlt for terminal emulator fonts */ + if ((pGC->font) && + TERMINALFONT(pGC->font)) { + pGC->ops->ImageGlyphBlt = afbTEGlyphBlt; + } else { + pGC->ops->ImageGlyphBlt = afbImageGlyphBlt; + } + + /* now do PolyGlyphBlt */ + if (pGC->fillStyle == FillSolid) { + pGC->ops->PolyGlyphBlt = afbPolyGlyphBlt; + } else { + pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; + } + } + } + + if (new_fill) { + /* install a suitable fillspans and pushpixels */ + pGC->ops->PushPixels = afbPushPixels; + pGC->ops->FillPolygon = miFillPolygon; + pGC->ops->PolyFillArc = miPolyFillArc; + + switch (pGC->fillStyle) { + case FillSolid: + pGC->ops->FillSpans = afbSolidFS; + pGC->ops->FillPolygon = afbFillPolygonSolid; + pGC->ops->PolyFillArc = afbPolyFillArcSolid; + break; + case FillTiled: + if (pGC->pRotatedPixmap) + pGC->ops->FillSpans = afbTileFS; + else + pGC->ops->FillSpans = afbUnnaturalTileFS; + break; + case FillOpaqueStippled: + if (pGC->pRotatedPixmap) + pGC->ops->FillSpans = afbOpaqueStippleFS; + else + pGC->ops->FillSpans = afbUnnaturalOpaqueStippleFS; + break; + + case FillStippled: + if (pGC->pRotatedPixmap) + pGC->ops->FillSpans = afbStippleFS; + else + pGC->ops->FillSpans = afbUnnaturalStippleFS; + break; + } + } /* end of new_fill */ +} + +static void +afbDestroyGC(pGC) + GCPtr pGC; +{ + if (pGC->pRotatedPixmap) + (*pGC->pScreen->DestroyPixmap)(pGC->pRotatedPixmap); + if (pGC->freeCompClip) + REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); + miDestroyGCOps(pGC->ops); +} + +void +afbReduceRop(alu, src, planemask, depth, rop) + register int alu; + register Pixel src; + register unsigned long planemask; + int depth; + register unsigned char *rop; +{ + register int d; + register Pixel mask = 1; + + for (d = 0; d < depth; d++, mask <<= 1) { + if (!(planemask & mask)) + rop[d] = RROP_NOP; + else if ((src & mask) == 0) /* src is black */ + switch (alu) { + case GXclear: + rop[d] = RROP_BLACK; + break; + case GXand: + rop[d] = RROP_BLACK; + break; + case GXandReverse: + rop[d] = RROP_BLACK; + break; + case GXcopy: + rop[d] = RROP_BLACK; + break; + case GXandInverted: + rop[d] = RROP_NOP; + break; + case GXnoop: + rop[d] = RROP_NOP; + break; + case GXxor: + rop[d] = RROP_NOP; + break; + case GXor: + rop[d] = RROP_NOP; + break; + case GXnor: + rop[d] = RROP_INVERT; + break; + case GXequiv: + rop[d] = RROP_INVERT; + break; + case GXinvert: + rop[d] = RROP_INVERT; + break; + case GXorReverse: + rop[d] = RROP_INVERT; + break; + case GXcopyInverted: + rop[d] = RROP_WHITE; + break; + case GXorInverted: + rop[d] = RROP_WHITE; + break; + case GXnand: + rop[d] = RROP_WHITE; + break; + case GXset: + rop[d] = RROP_WHITE; + break; + } + else /* src is white */ + switch (alu) { + case GXclear: + rop[d] = RROP_BLACK; + break; + case GXand: + rop[d] = RROP_NOP; + break; + case GXandReverse: + rop[d] = RROP_INVERT; + break; + case GXcopy: + rop[d] = RROP_WHITE; + break; + case GXandInverted: + rop[d] = RROP_BLACK; + break; + case GXnoop: + rop[d] = RROP_NOP; + break; + case GXxor: + rop[d] = RROP_INVERT; + break; + case GXor: + rop[d] = RROP_WHITE; + break; + case GXnor: + rop[d] = RROP_BLACK; + break; + case GXequiv: + rop[d] = RROP_NOP; + break; + case GXinvert: + rop[d] = RROP_INVERT; + break; + case GXorReverse: + rop[d] = RROP_WHITE; + break; + case GXcopyInverted: + rop[d] = RROP_BLACK; + break; + case GXorInverted: + rop[d] = RROP_NOP; + break; + case GXnand: + rop[d] = RROP_INVERT; + break; + case GXset: + rop[d] = RROP_WHITE; + break; + } + } +} diff --git a/xorg-server-1.4/afb/afbgetsp.c b/xorg-server-1.4/afb/afbgetsp.c new file mode 100644 index 0000000..8d1db14 --- /dev/null +++ b/xorg-server-1.4/afb/afbgetsp.c @@ -0,0 +1,165 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include + +#include "misc.h" +#include "region.h" +#include "gc.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" + +#include "afb.h" +#include "maskbits.h" + +#include "servermd.h" + +/* GetSpans -- for each span, gets bits from drawable starting at ppt[i] + * and continuing for pwidth[i] bits + * Each scanline returned will be server scanline padded, i.e., it will come + * out to an integral number of words. + */ +/*ARGSUSED*/ +void +afbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pchardstStart) + DrawablePtr pDrawable; /* drawable from which to get bits */ + int wMax; /* largest value of all *pwidths */ + register DDXPointPtr ppt; /* points to start copying from */ + int *pwidth; /* list of number of bits to copy */ + int nspans; /* number of scanlines to copy */ + char *pchardstStart; /* where to put the bits */ +{ + PixelType *pdstStart = (PixelType *)pchardstStart; + register PixelType *pdst; /* where to put the bits */ + register PixelType *psrc; /* where to get the bits */ + register PixelType tmpSrc; /* scratch buffer for bits */ + PixelType *psrcBase; /* start of src bitmap */ + int widthSrc; /* width of pixmap in bytes */ + int sizeSrc; + int depthSrc; + register DDXPointPtr pptLast; /* one past last point to get */ + int xEnd; /* last pixel to copy from */ + register int nstart; + register int d; + int nend = 0; + int srcStartOver; + PixelType startmask, endmask; + unsigned int srcBit; + int nlMiddle, nl; + int w; + + pptLast = ppt + nspans; + + afbGetPixelWidthSizeDepthAndPointer(pDrawable, widthSrc, sizeSrc, depthSrc, + psrcBase); + pdst = pdstStart; + + while(ppt < pptLast) { + /* XXX should this really be << PWSH, or * 8, or * PGSZB? */ + xEnd = min(ppt->x + *pwidth, widthSrc << PWSH); + pwidth++; + for (d = 0; d < depthSrc; d++) { + psrc = afbScanline(psrcBase, ppt->x, ppt->y, widthSrc); + psrcBase += sizeSrc; /* @@@ NEXT PLANE @@@ */ + w = xEnd - ppt->x; + srcBit = ppt->x & PIM; + + if (srcBit + w <= PPW) + { + getandputbits0(psrc, srcBit, w, pdst); + pdst++; + } + else + { + + maskbits(ppt->x, w, startmask, endmask, nlMiddle); + if (startmask) + nstart = PPW - srcBit; + else + nstart = 0; + if (endmask) + nend = xEnd & PIM; + srcStartOver = srcBit + nstart > PLST; + if (startmask) + { + getandputbits0(psrc, srcBit, nstart, pdst); + if(srcStartOver) + psrc++; + } + nl = nlMiddle; +#ifdef FASTPUTBITS + Duff(nl, putbits(*psrc, nstart, PPW, pdst); psrc++; pdst++;); +#else + while (nl--) + { + tmpSrc = *psrc; + putbits(tmpSrc, nstart, PPW, pdst); + psrc++; + pdst++; + } +#endif + if (endmask) + { + putbits(*psrc, nstart, nend, pdst); + if(nstart + nend > PPW) + pdst++; + } + if (startmask || endmask) + pdst++; + } + } + ppt++; + } +} diff --git a/xorg-server-1.4/afb/afbhrzvert.c b/xorg-server-1.4/afb/afbhrzvert.c new file mode 100644 index 0000000..8f332e6 --- /dev/null +++ b/xorg-server-1.4/afb/afbhrzvert.c @@ -0,0 +1,209 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "gc.h" +#include "window.h" +#include "pixmap.h" +#include "region.h" + +#include "afb.h" +#include "maskbits.h" + +/* horizontal solid line + abs(len) > 1 +*/ +void +afbHorzS(pbase, nlwidth, sizeDst, depthDst, x1, y1, len, rrops) +PixelType *pbase; /* pointer to base of bitmap */ +register int nlwidth; /* width in longwords of bitmap */ +int sizeDst; +int depthDst; +int x1; /* initial point */ +int y1; +int len; /* length of line */ +register unsigned char *rrops; +{ + register PixelType *addrl; + register PixelType startmask; + register PixelType endmask; + register int nlmiddle; + register int d; + int saveNLmiddle; + + /* force the line to go left to right + but don't draw the last point + */ + if (len < 0) { + x1 += len; + x1 += 1; + len = -len; + } + + /* all bits inside same longword */ + if ( ((x1 & PIM) + len) < PPW) { + maskpartialbits(x1, len, startmask); + + for (d = 0; d < depthDst; d++) { + addrl = afbScanline(pbase, x1, y1, nlwidth); + pbase += sizeDst; /* @@@ NEXT PLANE @@@ */ + + switch (rrops[d]) { + case RROP_BLACK: + *addrl &= ~startmask; + break; + case RROP_WHITE: + *addrl |= startmask; + break; + case RROP_INVERT: + *addrl ^= startmask; + break; + case RROP_NOP: + break; + } /* switch */ + } /* for (d = ...) */ + } else { + maskbits(x1, len, startmask, endmask, nlmiddle); + saveNLmiddle = nlmiddle; + + for (d = 0; d < depthDst; d++) { + addrl = afbScanline(pbase, x1, y1, nlwidth); + pbase += sizeDst; /* @@@ NEXT PLANE @@@ */ + nlmiddle = saveNLmiddle; + + switch (rrops[d]) { + case RROP_BLACK: + if (startmask) + *addrl++ &= ~startmask; + Duff (nlmiddle, *addrl++ = 0x0); + if (endmask) + *addrl &= ~endmask; + break; + + case RROP_WHITE: + if (startmask) + *addrl++ |= startmask; + Duff (nlmiddle, *addrl++ = ~0); + if (endmask) + *addrl |= endmask; + break; + + case RROP_INVERT: + if (startmask) + *addrl++ ^= startmask; + Duff (nlmiddle, *addrl++ ^= ~0); + if (endmask) + *addrl ^= endmask; + break; + + case RROP_NOP: + break; + } /* switch */ + } /* for (d = ... ) */ + } +} + +/* vertical solid line + this uses do loops because pcc (Ultrix 1.2, bsd 4.2) generates + better code. sigh. we know that len will never be 0 or 1, so + it's OK to use it. +*/ +void +afbVertS(pbase, nlwidth, sizeDst, depthDst, x1, y1, len, rrops) +PixelType *pbase; /* pointer to base of bitmap */ +register int nlwidth; /* width in longwords of bitmap */ +int sizeDst; +int depthDst; +int x1, y1; /* initial point */ +register int len; /* length of line */ +unsigned char *rrops; +{ + register PixelType *addrl; + register PixelType bitmask; + int saveLen; + int d; + + if (len < 0) { + nlwidth = -nlwidth; + len = -len; + } + + saveLen = len; + + for (d = 0; d < depthDst; d++) { + addrl = afbScanline(pbase, x1, y1, nlwidth); + pbase += sizeDst; /* @@@ NEXT PLANE @@@ */ + len = saveLen; + + switch (rrops[d]) { + case RROP_BLACK: + bitmask = mfbGetrmask(x1 & PIM); + Duff(len, *addrl &= bitmask; afbScanlineInc(addrl, nlwidth) ); + break; + + case RROP_WHITE: + bitmask = mfbGetmask(x1 & PIM); + Duff(len, *addrl |= bitmask; afbScanlineInc(addrl, nlwidth) ); + break; + + case RROP_INVERT: + bitmask = mfbGetmask(x1 & PIM); + Duff(len, *addrl ^= bitmask; afbScanlineInc(addrl, nlwidth) ); + break; + + case RROP_NOP: + break; + } /* switch */ + } /* for (d = ...) */ +} diff --git a/xorg-server-1.4/afb/afbimage.c b/xorg-server-1.4/afb/afbimage.c new file mode 100644 index 0000000..81f4973 --- /dev/null +++ b/xorg-server-1.4/afb/afbimage.c @@ -0,0 +1,271 @@ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include "windowstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "afb.h" +#include "maskbits.h" +#include "servermd.h" +#include "mfb.h" + +void +afbPutImage(pDraw, pGC, depth, x, y, width, height, leftPad, format, pImage) + DrawablePtr pDraw; + GCPtr pGC; + int depth, x, y, width, height; + int leftPad; + int format; + char *pImage; +{ + PixmapPtr pPixmap; + + if ((width == 0) || (height == 0)) + return; + + if (format != ZPixmap || depth == 1 || pDraw->depth == 1) { + pPixmap = GetScratchPixmapHeader(pDraw->pScreen, width+leftPad, height, + depth, depth, + BitmapBytePad(width+leftPad), + (pointer)pImage); + if (!pPixmap) + return; + + pGC->fExpose = FALSE; + if (format == XYBitmap) + (void)(*pGC->ops->CopyPlane)((DrawablePtr)pPixmap, pDraw, pGC, leftPad, + 0, width, height, x, y, 1); + else { + (void)(*pGC->ops->CopyArea)((DrawablePtr)pPixmap, pDraw, pGC, leftPad, + 0, width, height, x, y); + } + + pGC->fExpose = TRUE; + FreeScratchPixmapHeader(pPixmap); + } else { + /* Chunky to planar conversion required */ + + PixmapPtr pPixmap; + ScreenPtr pScreen = pDraw->pScreen; + int widthSrc; + int start_srcshift; + register int b; + register int dstshift; + register int shift_step; + register PixelType dst; + register PixelType srcbits; + register PixelType *pdst; + register PixelType *psrc; + int start_bit; + register int nl; + register int h; + register int d; + int sizeDst; + PixelType *pdstBase; + int widthDst; + int depthDst; + + /* Create a tmp pixmap */ + pPixmap = (pScreen->CreatePixmap)(pScreen, width, height, depth); + if (!pPixmap) + return; + + afbGetPixelWidthSizeDepthAndPointer((DrawablePtr)pPixmap, widthDst, + sizeDst, depthDst, pdstBase); + + widthSrc = PixmapWidthInPadUnits(width, depth); + /* XXX: if depth == 8, use fast chunky to planar assembly function.*/ + if (depth > 4) { + start_srcshift = 24; + shift_step = 8; + } else { + start_srcshift = 28; + shift_step = 4; + } + + for (d = 0; d < depth; d++, pdstBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ + start_bit = start_srcshift + d; + psrc = (PixelType *)pImage; + pdst = pdstBase; + h = height; + + while (h--) { + dstshift = PPW - 1; + dst = 0; + nl = widthSrc; + while (nl--) { + srcbits = *psrc++; + for (b = start_bit; b >= 0; b -= shift_step) { + dst |= ((srcbits >> b) & 1) << dstshift; + if (--dstshift < 0) { + dstshift = PPW - 1; + *pdst++ = dst; + dst = 0; + } + } + } + if (dstshift != PPW - 1) + *pdst++ = dst; + } + } /* for (d = ...) */ + + pGC->fExpose = FALSE; + (void)(*pGC->ops->CopyArea)((DrawablePtr)pPixmap, pDraw, pGC, leftPad, 0, + width, height, x, y); + pGC->fExpose = TRUE; + (*pScreen->DestroyPixmap)(pPixmap); + } +} + +void +afbGetImage(pDrawable, sx, sy, width, height, format, planemask, pdstLine) + DrawablePtr pDrawable; + int sx, sy, width, height; + unsigned int format; + unsigned long planemask; + char *pdstLine; +{ + BoxRec box; + DDXPointRec ptSrc; + RegionRec rgnDst; + ScreenPtr pScreen; + PixmapPtr pPixmap; + + if ((width == 0) || (height == 0)) + return; + + pScreen = pDrawable->pScreen; + sx += pDrawable->x; + sy += pDrawable->y; + + if (format == XYPixmap || pDrawable->depth == 1) { + pPixmap = GetScratchPixmapHeader(pScreen, width, height, 1, 1, + BitmapBytePad(width), (pointer)pdstLine); + if (!pPixmap) + return; + + ptSrc.x = sx; + ptSrc.y = sy; + box.x1 = 0; + box.y1 = 0; + box.x2 = width; + box.y2 = height; + REGION_INIT(pScreen, &rgnDst, &box, 1); + + pPixmap->drawable.depth = 1; + pPixmap->drawable.bitsPerPixel = 1; + /* dix layer only ever calls GetImage with 1 bit set in planemask + * when format is XYPixmap. + */ + afbDoBitblt(pDrawable, (DrawablePtr)pPixmap, GXcopy, &rgnDst, &ptSrc, + planemask); + + FreeScratchPixmapHeader(pPixmap); + REGION_UNINIT(pScreen, &rgnDst); + } else { + /* Planar to chunky conversion required */ + + PixelType *psrcBits; + PixelType *psrcLine; + PixelType startmask, endmask; + int depthSrc; + int widthSrc; + int sizeSrc; + int sizeDst; + int widthDst; + register PixelType *psrc; + register PixelType *pdst; + register PixelType dst; + register PixelType srcbits; + register int d; + register int b; + register int dstshift; + register int shift_step; + register int start_endbit; + int start_startbit; + register int end_endbit = 0; + register int start_dstshift; + register int nl; + register int h; + int nlmiddle; + + widthDst = PixmapWidthInPadUnits(width, pDrawable->depth); + sizeDst = widthDst * height; + + /* Clear the dest image */ + bzero(pdstLine, sizeDst << 2); + + afbGetPixelWidthSizeDepthAndPointer(pDrawable, widthSrc, sizeSrc, + depthSrc, psrcBits); + + psrcBits = afbScanline(psrcBits, sx, sy, widthSrc); + + start_startbit = PPW - 1 - (sx & PIM); + if ((sx & PIM) + width < PPW) { + maskpartialbits(sx, width, startmask); + nlmiddle = 0; + endmask = 0; + start_endbit = PPW - ((sx + width) & PIM); + } else { + maskbits(sx, width, startmask, endmask, nlmiddle); + start_endbit = 0; + end_endbit = PPW - ((sx + width) & PIM); + } + /* ZPixmap images have either 4 or 8 bits per pixel dependent on + * depth. + */ + if (depthSrc > 4) { + start_dstshift = 24; + shift_step = 8; + } else { + start_dstshift = 28; + shift_step = 4; + } +#define SHIFT_BITS(start_bit,end_bit) \ +for (b = (start_bit); b >= (end_bit); b--) { \ + dst |= ((srcbits >> b) & 1) << dstshift; \ + if ((dstshift -= shift_step) < 0) { \ + dstshift = start_dstshift + d; \ + *pdst++ = dst; \ + dst = *pdst; \ + } \ +} \ + + for (d = 0; d < depthSrc; d++, psrcBits += sizeSrc) { /* @@@ NEXT PLANE @@@ */ + psrcLine = psrcBits; + pdst = (PixelType *)pdstLine; + h = height; + + while (h--) { + psrc = psrcLine; + psrcLine += widthSrc; + dst = *pdst; + dstshift = start_dstshift + d; + + if (startmask) { + srcbits = *psrc++ & startmask; + SHIFT_BITS(start_startbit, start_endbit); + } + + nl = nlmiddle; + while (nl--) { + srcbits = *psrc++; + SHIFT_BITS(PPW - 1, 0); + } + if (endmask) { + srcbits = *psrc & endmask; + SHIFT_BITS(PPW - 1, end_endbit); + } + + if (dstshift != start_dstshift + d) + *pdst++ = dst; + } /* while (h--) */ + } /* for (d = ...) */ + } +} diff --git a/xorg-server-1.4/afb/afbimggblt.c b/xorg-server-1.4/afb/afbimggblt.c new file mode 100644 index 0000000..de02aa4 --- /dev/null +++ b/xorg-server-1.4/afb/afbimggblt.c @@ -0,0 +1,472 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include "afb.h" +#include +#include "dixfontstr.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "maskbits.h" + +/* + we should eventually special-case fixed-width fonts for ImageText. + + this works for fonts with glyphs <= 32 bits wide. + + the clipping calculations are done for worst-case fonts. +we make no assumptions about the heights, widths, or bearings +of the glyphs. if we knew that the glyphs are all the same height, +we could clip the tops and bottoms per clipping box, rather +than per character per clipping box. if we knew that the glyphs' +left and right bearings were wlle-behaved, we could clip a single +character at the start, output until the last unclipped +character, and then clip the last one. this is all straightforward +to determine based on max-bounds and min-bounds from the font. + there is some inefficiency introduced in the per-character +clipping to make what's going on clearer. + + (it is possible, for example, for a font to be defined in which the +next-to-last character in a font would be clipped out, but the last +one wouldn't. the code below deals with this.) + + Image text looks at the bits in the glyph and the fg and bg in the +GC. it paints a rectangle, as defined in the protocol dcoument, +and the paints the characters. + + the register allocations for startmask and endmask may not +be the right thing. are there two other deserving candidates? +xoff, pdst, pglyph, and tmpSrc seem like the right things, though. +*/ + +void +afbImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) + DrawablePtr pDrawable; + GC *pGC; + int x, y; + unsigned int nglyph; + CharInfoPtr *ppci; /* array of character info */ + pointer pglyphBase; /* start of array of glyphs */ +{ + ExtentInfoRec info; /* used by QueryGlyphExtents() */ + BoxRec bbox; /* string's bounding box */ + xRectangle backrect;/* backing rectangle to paint. + in the general case, NOT necessarily + the same as the string's bounding box + */ + + CharInfoPtr pci; + int xorg, yorg; /* origin of drawable in bitmap */ + int widthDst; /* width of dst in longwords */ + + /* these keep track of the character origin */ + PixelType *pdstBase; + /* points to longword with character origin */ + int xchar; /* xorigin of char (mod 32) */ + + /* these are used for placing the glyph */ + register int xoff; /* x offset of left edge of glyph (mod 32) */ + register PixelType *pdst; + /* pointer to current longword in dst */ + + register int d; + int depthDst; + int sizeDst; + int hSave; + int w; /* width of glyph in bits */ + int h; /* height of glyph */ + int widthGlyph; /* width of glyph, in bytes */ + unsigned char rrops[AFB_MAX_DEPTH]; + register unsigned char *pglyph; + /* pointer to current row of glyph */ + unsigned char *pglyphSave; + + /* used for putting down glyph */ + register PixelType tmpSrc; + /* for getting bits from glyph */ + register PixelType startmask; + register PixelType endmask; + + register int nFirst;/* bits of glyph in current longword */ + PixelType *pdstSave; + int oldFill; + afbPrivGC *pPriv = (afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr); + + xorg = pDrawable->x; + yorg = pDrawable->y; + afbGetPixelWidthSizeDepthAndPointer(pDrawable, widthDst, sizeDst, depthDst, + pdstBase); + + QueryGlyphExtents(pGC->font, ppci, (unsigned long)nglyph, &info); + + backrect.x = x; + backrect.y = y - FONTASCENT(pGC->font); + backrect.width = info.overallWidth; + backrect.height = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); + + x += xorg; + y += yorg; + + bbox.x1 = x + info.overallLeft; + bbox.x2 = x + info.overallRight; + bbox.y1 = y - info.overallAscent; + bbox.y2 = y + info.overallDescent; + + oldFill = pGC->fillStyle; + pGC->fillStyle = FillSolid; + afbReduceRop (pGC->alu, pGC->bgPixel, pGC->planemask, pGC->depth, + pPriv->rrops); + afbPolyFillRect(pDrawable, pGC, 1, &backrect); + pGC->fillStyle = oldFill; + afbReduceRop (pGC->alu, pGC->fgPixel, pGC->planemask, pGC->depth, + pPriv->rrops); + afbReduceRop (GXcopy, pGC->fgPixel, pGC->planemask, pGC->depth, rrops); + + /* the faint-hearted can open their eyes now */ + + switch (RECT_IN_REGION(pGC->pScreen, pGC->pCompositeClip, &bbox)) { + case rgnOUT: + break; + case rgnIN: + pdstBase = afbScanlineNoBankSwitch(pdstBase, x, y, widthDst); + xchar = x & PIM; + + while(nglyph--) { + pci = *ppci; + pglyphSave = FONTGLYPHBITS(pglyphBase, pci); + w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; + hSave = pci->metrics.ascent + pci->metrics.descent; + widthGlyph = GLYPHWIDTHBYTESPADDED(pci); + /* start at top scanline of glyph */ + pdstSave = afbScanlineDelta(pdstBase, -pci->metrics.ascent, + widthDst); + + /* find correct word in scanline and x offset within it + for left edge of glyph + */ + xoff = xchar + pci->metrics.leftSideBearing; + if (xoff > PLST) { + pdstSave++; + xoff &= PIM; + } else if (xoff < 0) { + xoff += PPW; + pdstSave--; + } + + for (d = 0; d < depthDst; d++) { + h = hSave; + pdst = pdstSave; + pdstSave += sizeDst; /* @@@ NEXT PLANE @@@ */ + pglyph = pglyphSave; + + if ((xoff + w) <= PPW) { + /* glyph all in one longword */ + maskpartialbits(xoff, w, startmask); + + switch (rrops[d]) { + case RROP_BLACK: + while (h--) { + getleftbits(pglyph, w, tmpSrc); + *pdst &= ~(SCRRIGHT(tmpSrc, xoff) & startmask); + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + case RROP_WHITE: + while (h--) { + getleftbits(pglyph, w, tmpSrc); + *pdst |= SCRRIGHT(tmpSrc, xoff) & startmask; + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + case RROP_NOP: + break; + } + } else { + /* glyph crosses longword boundary */ + maskPPWbits(xoff, w, startmask, endmask); + nFirst = PPW - xoff; + + switch (rrops[d]) { + case RROP_BLACK: + while (h--) { + getleftbits(pglyph, w, tmpSrc); + *pdst &= ~(SCRRIGHT(tmpSrc, xoff) & startmask); + *(pdst+1) &= ~(SCRLEFT(tmpSrc, nFirst) & endmask); + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + case RROP_WHITE: + while (h--) { + getleftbits(pglyph, w, tmpSrc); + *pdst |= SCRRIGHT(tmpSrc, xoff) & startmask; + *(pdst+1) |= SCRLEFT(tmpSrc, nFirst) & endmask; + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + case RROP_NOP: + break; + } + } /* glyph crosses longwords boundary */ + } /* depth loop */ + /* update character origin */ + x += pci->metrics.characterWidth; + xchar += pci->metrics.characterWidth; + if (xchar > PLST) { + xchar -= PPW; + pdstBase++; + } else if (xchar < 0) { + xchar += PPW; + pdstBase--; + } + ppci++; + } /* while nglyph-- */ + break; + case rgnPART: + { + afbTEXTPOS *ppos; + int nbox; + BoxPtr pbox; + RegionPtr cclip; + int xpos; /* x position of char origin */ + int i; + BoxRec clip; + int leftEdge, rightEdge; + int topEdge, bottomEdge; + int glyphRow; /* first row of glyph not wholly + clipped out */ + int glyphCol; /* leftmost visible column of glyph */ +#if GETLEFTBITS_ALIGNMENT > 1 + int getWidth; /* bits to get from glyph */ +#endif + + if(!(ppos = (afbTEXTPOS *)ALLOCATE_LOCAL(nglyph * sizeof(afbTEXTPOS)))) + return; + + pdstBase = afbScanlineNoBankSwitch(pdstBase, x, y, widthDst); + xpos = x; + xchar = xpos & PIM; + + for (i = 0; i < nglyph; i++) { + pci = ppci[i]; + + ppos[i].xpos = xpos; + ppos[i].xchar = xchar; + ppos[i].leftEdge = xpos + pci->metrics.leftSideBearing; + ppos[i].rightEdge = xpos + pci->metrics.rightSideBearing; + ppos[i].topEdge = y - pci->metrics.ascent; + ppos[i].bottomEdge = y + pci->metrics.descent; + ppos[i].pdstBase = pdstBase; + ppos[i].widthGlyph = GLYPHWIDTHBYTESPADDED(pci); + + xpos += pci->metrics.characterWidth; + xchar += pci->metrics.characterWidth; + if (xchar > PLST) { + xchar &= PIM; + pdstBase++; + } else if (xchar < 0) { + xchar += PPW; + pdstBase--; + } + } + + cclip = pGC->pCompositeClip; + pbox = REGION_RECTS(cclip); + nbox = REGION_NUM_RECTS(cclip); + + /* HACK ALERT + since we continue out of the loop below so often, it + is easier to increment pbox at the top than at the end. + don't try this at home. + */ + pbox--; + while(nbox--) { + pbox++; + clip.x1 = max(bbox.x1, pbox->x1); + clip.y1 = max(bbox.y1, pbox->y1); + clip.x2 = min(bbox.x2, pbox->x2); + clip.y2 = min(bbox.y2, pbox->y2); + if ((clip.x2<=clip.x1) || (clip.y2<=clip.y1)) + continue; + + for(i=0; i clip.x2) + rightEdge = clip.x2; + else + rightEdge = ppos[i].rightEdge; + + w = rightEdge - leftEdge; + if (w <= 0) + continue; + + /* clip the top and bottom edges */ + if (ppos[i].topEdge < clip.y1) + topEdge = clip.y1; + else + topEdge = ppos[i].topEdge; + + if (ppos[i].bottomEdge > clip.y2) + bottomEdge = clip.y2; + else + bottomEdge = ppos[i].bottomEdge; + + hSave = bottomEdge - topEdge; + if (hSave <= 0) + continue; + + glyphRow = (topEdge - y) + pci->metrics.ascent; + widthGlyph = ppos[i].widthGlyph; + pglyphSave = FONTGLYPHBITS(pglyphBase, pci); + pglyphSave += (glyphRow * widthGlyph); + + glyphCol = (leftEdge - ppos[i].xpos) - + (pci->metrics.leftSideBearing); +#if GETLEFTBITS_ALIGNMENT > 1 + getWidth = w + glyphCol; +#endif + + pdstSave = afbScanlineDelta(ppos[i].pdstBase, -(y-topEdge), + widthDst); + xoff = xchar + (leftEdge - ppos[i].xpos); + if (xoff > PLST) { + xoff &= PIM; + pdstSave++; + } else if (xoff < 0) { + xoff += PPW; + pdstSave--; + } + + for (d = 0; d < depthDst; d++) { + h = hSave; + pdst = pdstSave; + pdstSave += sizeDst; /* @@@ NEXT PLANE @@@ */ + pglyph = pglyphSave; + + if ((xoff + w) <= PPW) { + maskpartialbits(xoff, w, startmask); + + switch (rrops[d]) { + case RROP_BLACK: + while (h--) { + getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); + *pdst &= ~(SCRRIGHT(tmpSrc, xoff) & startmask); + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + case RROP_WHITE: + while (h--) { + getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); + *pdst |= SCRRIGHT(tmpSrc, xoff) & startmask; + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + case RROP_NOP: + break; + } + } else { + maskPPWbits(xoff, w, startmask, endmask); + nFirst = PPW - xoff; + + switch (rrops[d]) { + case RROP_BLACK: + while (h--) { + getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); + *pdst &= ~(SCRRIGHT(tmpSrc, xoff) & startmask); + *(pdst+1) &= ~(SCRLEFT(tmpSrc, nFirst) & endmask); + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + case RROP_WHITE: + while (h--) { + getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); + *pdst |= SCRRIGHT(tmpSrc, xoff) & startmask; + *(pdst+1) |= SCRLEFT(tmpSrc, nFirst) & endmask; + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + case RROP_NOP: + break; + } + } + } /* depth */ + } /* for each glyph */ + } /* while nbox-- */ + DEALLOCATE_LOCAL(ppos); + break; + } + + default: + break; + } +} diff --git a/xorg-server-1.4/afb/afbline.c b/xorg-server-1.4/afb/afbline.c new file mode 100644 index 0000000..9e2e4b9 --- /dev/null +++ b/xorg-server-1.4/afb/afbline.c @@ -0,0 +1,705 @@ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include + +#include "gcstruct.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "scrnintstr.h" +#include "mistruct.h" + +#include "afb.h" +#include "maskbits.h" +#include "miline.h" + +/* single-pixel lines on a color frame buffer + + NON-SLOPED LINES + horizontal lines are always drawn left to right; we have to +move the endpoints right by one after they're swapped. + horizontal lines will be confined to a single band of a +region. the code finds that band (giving up if the lower +bound of the band is above the line we're drawing); then it +finds the first box in that band that contains part of the +line. we clip the line to subsequent boxes in that band. + vertical lines are always drawn top to bottom (y-increasing.) +this requires adding one to the y-coordinate of each endpoint +after swapping. + + SLOPED LINES + when clipping a sloped line, we bring the second point inside +the clipping box, rather than one beyond it, and then add 1 to +the length of the line before drawing it. this lets us use +the same box for finding the outcodes for both endpoints. since +the equation for clipping the second endpoint to an edge gives us +1 beyond the edge, we then have to move the point towards the +first point by one step on the major axis. + eventually, there will be a diagram here to explain what's going +on. the method uses Cohen-Sutherland outcodes to determine +outsideness, and a method similar to Pike's layers for doing the +actual clipping. + +*/ + +void +#ifdef POLYSEGMENT +afbSegmentSS(pDrawable, pGC, nseg, pSeg) + DrawablePtr pDrawable; + GCPtr pGC; + int nseg; + register xSegment *pSeg; +#else +afbLineSS(pDrawable, pGC, mode, npt, pptInit) + DrawablePtr pDrawable; + GCPtr pGC; + int mode; /* Origin or Previous */ + int npt; /* number of points */ + DDXPointPtr pptInit; +#endif +{ + int nboxInit; + register int nbox; + BoxPtr pboxInit; + register BoxPtr pbox; +#ifndef POLYSEGMENT + register DDXPointPtr ppt; /* pointer to list of translated points */ +#endif + + unsigned int oc1; /* outcode of point 1 */ + unsigned int oc2; /* outcode of point 2 */ + + PixelType *addrlBase; /* pointer to start of drawable */ + int nlwidth; /* width in longwords of destination pixmap */ + int xorg, yorg; /* origin of window */ + + int adx; /* abs values of dx and dy */ + int ady; + int signdx; /* sign of dx and dy */ + int signdy; + int e, e1, e2; /* bresenham error and increments */ + int len; /* length of segment */ + int axis; /* major axis */ + int octant; + unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); + int depthDst; +#ifndef POLYSEGMENT + PixelType *addrl; /* address of destination pixmap */ + int d; +#endif + int sizeDst; + unsigned char *rrops; + + /* a bunch of temporaries */ + register int y1, y2; + register int x1, x2; + RegionPtr cclip; + + cclip = pGC->pCompositeClip; + rrops = ((afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr))->rrops; + pboxInit = REGION_RECTS(cclip); + nboxInit = REGION_NUM_RECTS(cclip); + + afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, + addrlBase); + + xorg = pDrawable->x; + yorg = pDrawable->y; +#ifdef POLYSEGMENT + while (nseg--) +#else + ppt = pptInit; + x2 = ppt->x + xorg; + y2 = ppt->y + yorg; + while(--npt) +#endif + { + nbox = nboxInit; + pbox = pboxInit; + +#ifdef POLYSEGMENT + x1 = pSeg->x1 + xorg; + y1 = pSeg->y1 + yorg; + x2 = pSeg->x2 + xorg; + y2 = pSeg->y2 + yorg; + pSeg++; +#else + x1 = x2; + y1 = y2; + ++ppt; + if (mode == CoordModePrevious) { + xorg = x1; + yorg = y1; + } + x2 = ppt->x + xorg; + y2 = ppt->y + yorg; +#endif + + if (x1 == x2) /* vertical line */ + { + /* make the line go top to bottom of screen, keeping + endpoint semantics + */ + if (y1 > y2) { + register int tmp; + + tmp = y2; + y2 = y1 + 1; + y1 = tmp + 1; +#ifdef POLYSEGMENT + if (pGC->capStyle != CapNotLast) + y1--; +#endif + } +#ifdef POLYSEGMENT + else if (pGC->capStyle != CapNotLast) + y2++; +#endif + /* get to first band that might contain part of line */ + while ((nbox) && (pbox->y2 <= y1)) { + pbox++; + nbox--; + } + + if (nbox) { + /* stop when lower edge of box is beyond end of line */ + while((nbox) && (y2 >= pbox->y1)) { + if ((x1 >= pbox->x1) && (x1 < pbox->x2)) { + int y1t, y2t; + /* this box has part of the line in it */ + y1t = max(y1, pbox->y1); + y2t = min(y2, pbox->y2); + if (y1t != y2t) + afbVertS(addrlBase, nlwidth, sizeDst, depthDst, x1, y1t, + y2t-y1t, rrops); /* @@@ NEXT PLANE PASSED @@@ */ + } + nbox--; + pbox++; + } + } +#ifndef POLYSEGMENT + y2 = ppt->y + yorg; +#endif + } else if (y1 == y2) /* horizontal line */ { + /* force line from left to right, keeping + endpoint semantics + */ + if (x1 > x2) { + register int tmp; + + tmp = x2; + x2 = x1 + 1; + x1 = tmp + 1; +#ifdef POLYSEGMENT + if (pGC->capStyle != CapNotLast) + x1--; +#endif + } +#ifdef POLYSEGMENT + else if (pGC->capStyle != CapNotLast) + x2++; +#endif + + /* find the correct band */ + while( (nbox) && (pbox->y2 <= y1)) { + pbox++; + nbox--; + } + + /* try to draw the line, if we haven't gone beyond it */ + if ((nbox) && (pbox->y1 <= y1)) { + int tmp; + + /* when we leave this band, we're done */ + tmp = pbox->y1; + while((nbox) && (pbox->y1 == tmp)) { + int x1t, x2t; + + if (pbox->x2 <= x1) { + /* skip boxes until one might contain start point */ + nbox--; + pbox++; + continue; + } + + /* stop if left of box is beyond right of line */ + if (pbox->x1 >= x2) { + nbox = 0; + break; + } + + x1t = max(x1, pbox->x1); + x2t = min(x2, pbox->x2); + if (x1t != x2t) + afbHorzS(addrlBase, nlwidth, sizeDst, depthDst, x1t, y1, + x2t-x1t, rrops); /* @@@ NEXT PLANE PASSED @@@ */ + nbox--; + pbox++; + } + } +#ifndef POLYSEGMENT + x2 = ppt->x + xorg; +#endif + } + else /* sloped line */ + { + CalcLineDeltas(x1, y1, x2, y2, adx, ady, + signdx, signdy, 1, 1, octant); + + if (adx > ady) { + axis = X_AXIS; + e1 = ady << 1; + e2 = e1 - (adx << 1); + e = e1 - adx; + } else { + axis = Y_AXIS; + e1 = adx << 1; + e2 = e1 - (ady << 1); + e = e1 - ady; + SetYMajorOctant(octant); + } + + FIXUP_ERROR(e, octant, bias); + + /* we have bresenham parameters and two points. + all we have to do now is clip and draw. + */ + + while(nbox--) { + oc1 = 0; + oc2 = 0; + OUTCODES(oc1, x1, y1, pbox); + OUTCODES(oc2, x2, y2, pbox); + if ((oc1 | oc2) == 0) { + if (axis == X_AXIS) + len = adx; + else + len = ady; +#ifdef POLYSEGMENT + if (pGC->capStyle != CapNotLast) + len++; +#endif + afbBresS(addrlBase, nlwidth, sizeDst, depthDst, signdx, signdy, + axis, x1, y1, e, e1, e2, len, rrops); /* @@@ NEXT PLANE PASSED @@@ */ + break; + } else if (oc1 & oc2) { + pbox++; + } else { + int new_x1 = x1, new_y1 = y1, new_x2 = x2, new_y2 = y2; + int clip1 = 0, clip2 = 0; + int clipdx, clipdy; + int err; + + if (miZeroClipLine(pbox->x1, pbox->y1, pbox->x2-1, + pbox->y2-1, + &new_x1, &new_y1, &new_x2, &new_y2, + adx, ady, &clip1, &clip2, + octant, bias, oc1, oc2) == -1) { + pbox++; + continue; + } + + if (axis == X_AXIS) + len = abs(new_x2 - new_x1); + else + len = abs(new_y2 - new_y1); +#ifdef POLYSEGMENT + if (clip2 != 0 || pGC->capStyle != CapNotLast) + len++; +#else + len += (clip2 != 0); +#endif + if (len) { + /* unwind bresenham error term to first point */ + if (clip1) { + clipdx = abs(new_x1 - x1); + clipdy = abs(new_y1 - y1); + if (axis == X_AXIS) + err = e+((clipdy*e2) + ((clipdx-clipdy)*e1)); + else + err = e+((clipdx*e2) + ((clipdy-clipdx)*e1)); + } + else + err = e; + afbBresS(addrlBase, nlwidth, sizeDst, depthDst, signdx, + signdy, axis, new_x1, new_y1, err, e1, e2, len, + rrops); /* @@@ NEXT PLANE PASSED @@@ */ + } + pbox++; + } + } /* while (nbox--) */ + } /* sloped line */ + } /* while (nline--) */ + +#ifndef POLYSEGMENT + + /* paint the last point if the end style isn't CapNotLast. + (Assume that a projecting, butt, or round cap that is one + pixel wide is the same as the single pixel of the endpoint.) + */ + + if ((pGC->capStyle != CapNotLast) && + ((ppt->x + xorg != pptInit->x + pDrawable->x) || + (ppt->y + yorg != pptInit->y + pDrawable->y) || + (ppt == pptInit + 1))) { + nbox = nboxInit; + pbox = pboxInit; + while (nbox--) { + if ((x2 >= pbox->x1) && (y2 >= pbox->y1) && (x2 < pbox->x2) && + (y2 < pbox->y2)) { + for (d = 0; d < depthDst; d++) { + addrl = afbScanline(addrlBase, x2, y2, nlwidth); + addrlBase += sizeDst; /* @@@ NEXT PLANE @@@ */ + + switch(rrops[d]) { + case RROP_BLACK: + *addrl &= mfbGetrmask(x2 & PIM); + break; + case RROP_WHITE: + *addrl |= mfbGetmask(x2 & PIM); + break; + case RROP_INVERT: + *addrl ^= mfbGetmask(x2 & PIM); + break; + case RROP_NOP: + break; + } /* switch */ + } /* for (d = ...) */ + break; + } else + pbox++; + } + } +#endif +} + +/* + * Draw dashed 1-pixel lines. + */ + +void +#ifdef POLYSEGMENT +afbSegmentSD(pDrawable, pGC, nseg, pSeg) + DrawablePtr pDrawable; + register GCPtr pGC; + int nseg; + register xSegment *pSeg; +#else +afbLineSD(pDrawable, pGC, mode, npt, pptInit) + DrawablePtr pDrawable; + register GCPtr pGC; + int mode; /* Origin or Previous */ + int npt; /* number of points */ + DDXPointPtr pptInit; +#endif +{ + int nboxInit; + register int nbox; + BoxPtr pboxInit; + register BoxPtr pbox; +#ifndef POLYSEGMENT + register DDXPointPtr ppt; /* pointer to list of translated points */ +#endif + + register unsigned int oc1; /* outcode of point 1 */ + register unsigned int oc2; /* outcode of point 2 */ + + PixelType *addrlBase; /* address of destination pixmap */ + int nlwidth; /* width in longwords of destination pixmap */ + int sizeDst; + int depthDst; + int xorg, yorg; /* origin of window */ + + int adx; /* abs values of dx and dy */ + int ady; + int signdx; /* sign of dx and dy */ + int signdy; + int e, e1, e2; /* bresenham error and increments */ + int len; /* length of segment */ + int axis; /* major axis */ + int octant; + unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); + int x1, x2, y1, y2; + RegionPtr cclip; + unsigned char *rrops; + unsigned char bgrrops[AFB_MAX_DEPTH]; + unsigned char *pDash; + int dashOffset; + int numInDashList; + int dashIndex; + int isDoubleDash; + int dashIndexTmp, dashOffsetTmp; + int unclippedlen; +#ifndef POLYSEGMENT + PixelType *addrl; + int d; +#endif + + cclip = pGC->pCompositeClip; + rrops = ((afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr))->rrops; + pboxInit = REGION_RECTS(cclip); + nboxInit = REGION_NUM_RECTS(cclip); + + afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, + addrlBase); + + /* compute initial dash values */ + + pDash = (unsigned char *) pGC->dash; + numInDashList = pGC->numInDashList; + isDoubleDash = (pGC->lineStyle == LineDoubleDash); + dashIndex = 0; + dashOffset = 0; + miStepDash ((int)pGC->dashOffset, &dashIndex, pDash, + numInDashList, &dashOffset); + + if (isDoubleDash) + afbReduceRop (pGC->alu, pGC->bgPixel, pGC->planemask, pGC->depth, + bgrrops); + + xorg = pDrawable->x; + yorg = pDrawable->y; +#ifdef POLYSEGMENT + while (nseg--) +#else + ppt = pptInit; + x2 = ppt->x + xorg; + y2 = ppt->y + yorg; + while(--npt) +#endif + { + nbox = nboxInit; + pbox = pboxInit; + +#ifdef POLYSEGMENT + x1 = pSeg->x1 + xorg; + y1 = pSeg->y1 + yorg; + x2 = pSeg->x2 + xorg; + y2 = pSeg->y2 + yorg; + pSeg++; +#else + x1 = x2; + y1 = y2; + ++ppt; + if (mode == CoordModePrevious) { + xorg = x1; + yorg = y1; + } + x2 = ppt->x + xorg; + y2 = ppt->y + yorg; +#endif + + CalcLineDeltas(x1, y1, x2, y2, adx, ady, signdx, signdy, + 1, 1, octant); + + if (adx > ady) { + axis = X_AXIS; + e1 = ady << 1; + e2 = e1 - (adx << 1); + e = e1 - adx; + unclippedlen = adx; + } else { + axis = Y_AXIS; + e1 = adx << 1; + e2 = e1 - (ady << 1); + e = e1 - ady; + unclippedlen = ady; + SetYMajorOctant(octant); + } + + FIXUP_ERROR(e, octant, bias); + + /* we have bresenham parameters and two points. + all we have to do now is clip and draw. + */ + + while(nbox--) { + oc1 = 0; + oc2 = 0; + OUTCODES(oc1, x1, y1, pbox); + OUTCODES(oc2, x2, y2, pbox); + if ((oc1 | oc2) == 0) { +#ifdef POLYSEGMENT + if (pGC->capStyle != CapNotLast) + unclippedlen++; + dashIndexTmp = dashIndex; + dashOffsetTmp = dashOffset; + afbBresD(&dashIndexTmp, pDash, numInDashList, &dashOffsetTmp, + isDoubleDash, addrlBase, nlwidth, sizeDst, depthDst, + signdx, signdy, axis, x1, y1, e, e1, e2, unclippedlen, + rrops, bgrrops); /* @@@ NEXT PLANE PASSED @@@ */ + break; +#else + afbBresD(&dashIndex, pDash, numInDashList, &dashOffset, + isDoubleDash, addrlBase, nlwidth, sizeDst, depthDst, + signdx, signdy, axis, x1, y1, e, e1, e2, unclippedlen, + rrops, bgrrops); /* @@@ NEXT PLANE PASSED @@@ */ + goto dontStep; +#endif + } else if (oc1 & oc2) { + pbox++; + } else /* have to clip */ { + int new_x1 = x1, new_y1 = y1, new_x2 = x2, new_y2 = y2; + int clip1 = 0, clip2 = 0; + int clipdx, clipdy; + int err; + + if (miZeroClipLine(pbox->x1, pbox->y1, pbox->x2-1, pbox->y2-1, + &new_x1, &new_y1, &new_x2, &new_y2, + adx, ady, &clip1, &clip2, + octant, bias, oc1, oc2) == -1) { + pbox++; + continue; + } + dashIndexTmp = dashIndex; + dashOffsetTmp = dashOffset; + if (clip1) { + int dlen; + + if (axis == X_AXIS) + dlen = abs(new_x1 - x1); + else + dlen = abs(new_y1 - y1); + miStepDash (dlen, &dashIndexTmp, pDash, + numInDashList, &dashOffsetTmp); + } + if (axis == X_AXIS) + len = abs(new_x2 - new_x1); + else + len = abs(new_y2 - new_y1); +#ifdef POLYSEGMENT + if (clip2 != 0 || pGC->capStyle != CapNotLast) + len++; +#else + len += (clip2 != 0); +#endif + if (len) { + /* unwind bresenham error term to first point */ + if (clip1) { + clipdx = abs(new_x1 - x1); + clipdy = abs(new_y1 - y1); + if (axis == X_AXIS) + err = e+((clipdy*e2) + ((clipdx-clipdy)*e1)); + else + err = e+((clipdx*e2) + ((clipdy-clipdx)*e1)); + } + else + err = e; + afbBresD(&dashIndexTmp, pDash, numInDashList, &dashOffsetTmp, + isDoubleDash, addrlBase, nlwidth, sizeDst, depthDst, + signdx, signdy, axis, new_x1, new_y1, err, e1, e2, + len, rrops, bgrrops); /* @@@ NEXT PLANE PASSED @@@ */ + } + pbox++; + } + } /* while (nbox--) */ +#ifndef POLYSEGMENT + /* + * walk the dash list around to the next line + */ + miStepDash (unclippedlen, &dashIndex, pDash, + numInDashList, &dashOffset); +dontStep: ; +#endif + } /* while (nline--) */ + +#ifndef POLYSEGMENT + /* paint the last point if the end style isn't CapNotLast. + (Assume that a projecting, butt, or round cap that is one + pixel wide is the same as the single pixel of the endpoint.) + */ + + if ((pGC->capStyle != CapNotLast) && + ((dashIndex & 1) == 0 || isDoubleDash) && + ((ppt->x + xorg != pptInit->x + pDrawable->x) || + (ppt->y + yorg != pptInit->y + pDrawable->y) || + (ppt == pptInit + 1))) { + nbox = nboxInit; + pbox = pboxInit; + while (nbox--) { + if ((x2 >= pbox->x1) && (y2 >= pbox->y1) && (x2 < pbox->x2) && + (y2 < pbox->y2)) { + int rop; + + for (d = 0; d < depthDst; d++) { + addrl = afbScanline(addrlBase, x2, y2, nlwidth); + addrlBase += sizeDst; /* @@@ NEXT PLANE @@@ */ + + rop = rrops[d]; + if (dashIndex & 1) + rop = bgrrops[d]; + + switch (rop) { + case RROP_BLACK: + *addrl &= mfbGetrmask(x2 & PIM); + break; + case RROP_WHITE: + *addrl |= mfbGetmask(x2 & PIM); + break; + + case RROP_INVERT: + *addrl ^= mfbGetmask(x2 & PIM); + break; + + case RROP_NOP: + break; + } + } /* for (d = ...) */ + break; + } else + pbox++; + } + } +#endif +} diff --git a/xorg-server-1.4/afb/afbmisc.c b/xorg-server-1.4/afb/afbmisc.c new file mode 100644 index 0000000..8e9c9e8 --- /dev/null +++ b/xorg-server-1.4/afb/afbmisc.c @@ -0,0 +1,94 @@ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "misc.h" +#include "cursor.h" +#include "scrnintstr.h" + +#include "afb.h" + +/*ARGSUSED*/ +void +afbQueryBestSize(class, pwidth, pheight, pScreen) +int class; +unsigned short *pwidth; +unsigned short *pheight; +ScreenPtr pScreen; +{ + unsigned width, test; + + switch(class) { + case CursorShape: + if (*pwidth > pScreen->width) + *pwidth = pScreen->width; + if (*pheight > pScreen->height) + *pheight = pScreen->height; + break; + case TileShape: + case StippleShape: + width = *pwidth; + if (!width) break; + /* Return the closes power of two not less than what they gave me */ + test = 0x80000000; + /* Find the highest 1 bit in the width given */ + while(!(test & width)) + test >>= 1; + /* If their number is greater than that, bump up to the next + * power of two */ + if((test - 1) & width) + test <<= 1; + *pwidth = test; + /* We don't care what height they use */ + break; + } +} diff --git a/xorg-server-1.4/afb/afbpixmap.c b/xorg-server-1.4/afb/afbpixmap.c new file mode 100644 index 0000000..77ba535 --- /dev/null +++ b/xorg-server-1.4/afb/afbpixmap.c @@ -0,0 +1,294 @@ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +/* pixmap management + written by drewry, september 1986 + + on a monchrome device, a pixmap is a bitmap. +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "maskbits.h" + +#include "afb.h" +#include "mi.h" + +#include "servermd.h" +#include "mfb.h" + +PixmapPtr +afbCreatePixmap(pScreen, width, height, depth) + ScreenPtr pScreen; + int width; + int height; + int depth; +{ + PixmapPtr pPixmap; + size_t datasize; + size_t paddedWidth; + + paddedWidth = BitmapBytePad(width); + + if (paddedWidth > 32767 || height > 32767 || depth > 4) + return NullPixmap; + + datasize = height * paddedWidth * depth; + pPixmap = AllocatePixmap(pScreen, datasize); + if (!pPixmap) + return(NullPixmap); + pPixmap->drawable.type = DRAWABLE_PIXMAP; + pPixmap->drawable.class = 0; + pPixmap->drawable.pScreen = pScreen; + pPixmap->drawable.depth = depth; + pPixmap->drawable.bitsPerPixel = depth; + pPixmap->drawable.id = 0; + pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + pPixmap->drawable.x = 0; + pPixmap->drawable.y = 0; + pPixmap->drawable.width = width; + pPixmap->drawable.height = height; + pPixmap->devKind = paddedWidth; + pPixmap->refcnt = 1; + pPixmap->devPrivate.ptr = datasize ? + (pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL; + return(pPixmap); +} + +Bool +afbDestroyPixmap(pPixmap) + PixmapPtr pPixmap; +{ + if(--pPixmap->refcnt) + return(TRUE); + xfree(pPixmap); + return(TRUE); +} + + +static PixmapPtr +afbCopyPixmap(PixmapPtr pSrc) +{ + register PixmapPtr pDst; + int size; + ScreenPtr pScreen; + + size = pSrc->drawable.height * pSrc->devKind * pSrc->drawable.depth; + pScreen = pSrc->drawable.pScreen; + pDst = (*pScreen->CreatePixmap)(pScreen, pSrc->drawable.width, + pSrc->drawable.height, pSrc->drawable.depth); + if (!pDst) + return(NullPixmap); + memmove((char *)pDst->devPrivate.ptr, (char *)pSrc->devPrivate.ptr, size); + return(pDst); +} + + +/* replicates a pattern to be a full 32 bits wide. + relies on the fact that each scnaline is longword padded. + doesn't do anything if pixmap is not a factor of 32 wide. + changes width field of pixmap if successful, so that the fast + XRotatePixmap code gets used if we rotate the pixmap later. + + calculate number of times to repeat + for each scanline of pattern + zero out area to be filled with replicate + left shift and or in original as many times as needed +*/ +static void +afbPadPixmap(PixmapPtr pPixmap) +{ + register int width = pPixmap->drawable.width; + register int h; + register PixelType mask; + register PixelType *p; + register PixelType bits; /* real pattern bits */ + register int i; + int d; + int rep; /* repeat count for pattern */ + + if (width >= PPW) + return; + + rep = PPW/width; + if (rep*width != PPW) + return; + + mask = mfbGetendtab(width); + + p = (PixelType *)(pPixmap->devPrivate.ptr); + + for (d = 0; d < pPixmap->drawable.depth; d++) { + for (h = 0; h < pPixmap->drawable.height; h++) { + *p &= mask; + bits = *p; + for(i = 1; i < rep; i++) { + bits = SCRRIGHT(bits, width); + *p |= bits; + } + p++; /* @@@ NEXT PLANE @@@ */ + } + } + pPixmap->drawable.width = PPW; +} + +/* Rotates pixmap pPix by w pixels to the right on the screen. Assumes that + * words are PPW bits wide, and that the least significant bit appears on the + * left. + */ +void +afbXRotatePixmap(pPix, rw) + PixmapPtr pPix; + register int rw; +{ + register PixelType *pw, *pwFinal; + register PixelType t; + + if (pPix == NullPixmap) + return; + + pw = (PixelType *)pPix->devPrivate.ptr; + rw %= (int)pPix->drawable.width; + if (rw < 0) + rw += (int)pPix->drawable.width; + if(pPix->drawable.width == PPW) { + pwFinal = pw + pPix->drawable.height * pPix->drawable.depth; + while(pw < pwFinal) { + t = *pw; + *pw++ = SCRRIGHT(t, rw) | + (SCRLEFT(t, (PPW-rw)) & mfbGetendtab(rw)); + } + } else { + /* We no longer do this. Validate doesn't try to rotate odd-size + * tiles or stipples. afbUnnaturalFS works directly off + * the unrotate tile/stipple in the GC + */ + ErrorF("X internal error: trying to rotate odd-sized pixmap.\n"); + } + +} + +/* Rotates pixmap pPix by h lines. Assumes that h is always less than + pPix->height + works on any width. + */ +void +afbYRotatePixmap(pPix, rh) + register PixmapPtr pPix; + int rh; +{ + int nbyDown; /* bytes to move down to row 0; also offset of + row rh */ + int nbyUp; /* bytes to move up to line rh; also + offset of first line moved down to 0 */ + char *pbase; + char *ptmp; + int height; + int d; + + if (pPix == NullPixmap) + return; + height = (int) pPix->drawable.height; + rh %= height; + if (rh < 0) + rh += height; + + nbyDown = rh * pPix->devKind; + nbyUp = (pPix->devKind * height) - nbyDown; + + if(!(ptmp = (char *)ALLOCATE_LOCAL(nbyUp))) + return; + + for (d = 0; d < pPix->drawable.depth; d++) { + pbase = (char *)pPix->devPrivate.ptr + pPix->devKind * height * d; /* @@@ NEXT PLANE @@@ */ + + memmove(ptmp, pbase, nbyUp); /* save the low rows */ + memmove(pbase, pbase+nbyUp, nbyDown); /* slide the top rows down */ + memmove(pbase+nbyDown, ptmp, nbyUp); /* move lower rows up to row rh */ + } + DEALLOCATE_LOCAL(ptmp); +} + +void +afbCopyRotatePixmap(psrcPix, ppdstPix, xrot, yrot) + register PixmapPtr psrcPix, *ppdstPix; + int xrot, yrot; +{ + register PixmapPtr pdstPix; + + if ((pdstPix = *ppdstPix) && + (pdstPix->devKind == psrcPix->devKind) && + (pdstPix->drawable.height == psrcPix->drawable.height) && + (pdstPix->drawable.depth == psrcPix->drawable.depth)) { + memmove((char *)pdstPix->devPrivate.ptr, + (char *)psrcPix->devPrivate.ptr, + psrcPix->drawable.height * psrcPix->devKind * + psrcPix->drawable.depth); + pdstPix->drawable.width = psrcPix->drawable.width; + pdstPix->drawable.serialNumber = NEXT_SERIAL_NUMBER; + } else { + if (pdstPix) + /* FIX XBUG 6168 */ + (*pdstPix->drawable.pScreen->DestroyPixmap)(pdstPix); + *ppdstPix = pdstPix = afbCopyPixmap(psrcPix); + if (!pdstPix) + return; + } + afbPadPixmap(pdstPix); + if (xrot) + afbXRotatePixmap(pdstPix, xrot); + if (yrot) + afbYRotatePixmap(pdstPix, yrot); +} diff --git a/xorg-server-1.4/afb/afbply1rct.c b/xorg-server-1.4/afb/afbply1rct.c new file mode 100644 index 0000000..86ec174 --- /dev/null +++ b/xorg-server-1.4/afb/afbply1rct.c @@ -0,0 +1,300 @@ +/* + * +Copyright (c) 1990 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + * + * Author: Keith Packard, MIT X Consortium + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include + +#include "gcstruct.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "scrnintstr.h" +#include "mistruct.h" + +#include "afb.h" +#include "maskbits.h" + +#if defined(mips) || defined(sparc) +#define GetHighWord(x) (((int)(x)) >> 16) +#else +#define GetHighWord(x) (((int)(x)) / 65536) +#endif + +#if IMAGE_BYTE_ORDER == MSBFirst +#define intToCoord(i,x,y) (((x) = GetHighWord(i)), ((y) = (int)((short) (i)))) +#define coordToInt(x,y) (((x) << 16) | (y)) +#define intToX(i) (GetHighWord(i)) +#define intToY(i) ((int)((short) i)) +#else +#define intToCoord(i,x,y) (((x) = (int)((short) (i))), ((y) = GetHighWord(i))) +#define coordToInt(x,y) (((y) << 16) | (x)) +#define intToX(i) ((int)((short) (i))) +#define intToY(i) (GetHighWord(i)) +#endif + +void +afbFillPolygonSolid (pDrawable, pGC, shape, mode, count, ptsIn) + DrawablePtr pDrawable; + GCPtr pGC; + int shape; + int mode; + int count; + DDXPointPtr ptsIn; +{ + afbPrivGCPtr devPriv; + int nlwidth; + PixelType *addrl, *addr; + int maxy; + int origin; + register int vertex1, vertex2; + int c; + BoxPtr extents; + int clip; + int y; + int *vertex1p = NULL, *vertex2p; + int *endp; + int x1 = 0, x2 = 0; + int dx1 = 0, dx2 = 0; + int dy1 = 0, dy2 = 0; + int e1 = 0, e2 = 0; + int step1 = 0, step2 = 0; + int sign1 = 0, sign2 = 0; + int h; + int l, r; + PixelType mask, bits = ~((PixelType)0); + int nmiddle; + register unsigned char *rrops; + register int n; + register int d; + int sizeDst; + int depthDst; + register PixelType *pdst; + + devPriv = (afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr); + + if (mode == CoordModePrevious || shape != Convex || + REGION_NUM_RECTS(pGC->pCompositeClip) != 1) { + miFillPolygon (pDrawable, pGC, shape, mode, count, ptsIn); + return; + } + origin = *((int *) &pDrawable->x); + origin -= (origin & 0x8000) << 1; + extents = &pGC->pCompositeClip->extents; + vertex1 = *((int *) &extents->x1) - origin; + vertex2 = *((int *) &extents->x2) - origin - 0x00010001; + clip = 0; + y = 32767; + maxy = 0; + vertex2p = (int *) ptsIn; + endp = vertex2p + count; + while (count--) { + c = *vertex2p; + clip |= (c - vertex1) | (vertex2 - c); + c = intToY(c); + if (c < y) { + y = c; + vertex1p = vertex2p; + } + vertex2p++; + if (c > maxy) + maxy = c; + } + if (y == maxy) + return; + + if (clip & 0x80008000) { + miFillPolygon (pDrawable, pGC, shape, mode, vertex2p - (int *) ptsIn, ptsIn); + return; + } + + afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, + addrl); + rrops = devPriv->rrops; + addrl = afbScanlineDelta(addrl, y + pDrawable->y, nlwidth); + origin = intToX(origin); + vertex2p = vertex1p; + vertex2 = vertex1 = *vertex2p++; + if (vertex2p == endp) + vertex2p = (int *) ptsIn; +#define Setup(c,x,vertex,dx,dy,e,sign,step) {\ + x = intToX(vertex); \ + if ((dy = intToY(c) - y)) { \ + dx = intToX(c) - x; \ + step = 0; \ + if (dx >= 0) { \ + e = 0; \ + sign = 1; \ + if (dx >= dy) {\ + step = dx / dy; \ + dx = dx % dy; \ + } \ + } else { \ + e = 1 - dy; \ + sign = -1; \ + dx = -dx; \ + if (dx >= dy) { \ + step = - (dx / dy); \ + dx = dx % dy; \ + } \ + } \ + } \ + x += origin; \ + vertex = c; \ +} + +#define Step(x,dx,dy,e,sign,step) {\ + x += step; \ + if ((e += dx) > 0) { \ + x += sign; \ + e -= dy; \ + } \ +} + for (;;) { + if (y == intToY(vertex1)) { + do { + if (vertex1p == (int *) ptsIn) + vertex1p = endp; + c = *--vertex1p; + Setup (c,x1,vertex1,dx1,dy1,e1,sign1,step1) + } while (y >= intToY(vertex1)); + h = dy1; + } else { + Step(x1,dx1,dy1,e1,sign1,step1) + h = intToY(vertex1) - y; + } + if (y == intToY(vertex2)) { + do { + c = *vertex2p++; + if (vertex2p == endp) + vertex2p = (int *) ptsIn; + Setup (c,x2,vertex2,dx2,dy2,e2,sign2,step2) + } while (y >= intToY(vertex2)); + if (dy2 < h) + h = dy2; + } else { + Step(x2,dx2,dy2,e2,sign2,step2) + if ((c = (intToY(vertex2) - y)) < h) + h = c; + } + /* fill spans for this segment */ + y += h; + for (;;) { + l = x1; + r = x2; + nmiddle = x2 - x1; + if (nmiddle < 0) { + nmiddle = -nmiddle; + l = x2; + r = x1; + } + c = l & PIM; + l -= c; + l = l >> PWSH; + addr = addrl + l; + if (c + nmiddle < PPW) { + mask = SCRRIGHT (bits,c) ^ SCRRIGHT (bits,c+nmiddle); + for (pdst = addr, d = 0; d < depthDst; d++, pdst += sizeDst) { /* @@@ NEXT PLANE @@@ */ + switch (rrops[d]) { + case RROP_BLACK: + *pdst &= ~mask; + break; + case RROP_WHITE: + *pdst |= mask; + break; + case RROP_INVERT: + *pdst ^= mask; + break; + case RROP_NOP: + break; + } + } + } else { + if (c) { + mask = SCRRIGHT(bits, c); + for (pdst = addr, d = 0; d < depthDst; d++, pdst += sizeDst) { /* @@@ NEXT PLANE @@@ */ + switch (rrops[d]) { + case RROP_BLACK: + *pdst &= ~mask; + break; + case RROP_WHITE: + *pdst |= mask; + break; + case RROP_INVERT: + *pdst ^= mask; + break; + case RROP_NOP: + break; + } + } + nmiddle += c - PPW; + addr++; + } + nmiddle >>= PWSH; + mask = ~SCRRIGHT(bits, r & PIM); + + for (d = 0; d < depthDst; d++, addr += sizeDst) { /* @@@ NEXT PLANE @@@ */ + n = nmiddle; + pdst = addr; + + switch (rrops[d]) { + case RROP_BLACK: + Duff (n, *pdst++ = 0;) + if (mask) + *pdst &= ~mask; + break; + case RROP_WHITE: + Duff (n, *pdst++ = ~0;); + if (mask) + *pdst |= mask; + break; + case RROP_INVERT: + Duff (n, *pdst++ ^= ~0;); + if (mask) + *pdst ^= mask; + break; + case RROP_NOP: + break; + } + } + } + if (!--h) + break; + afbScanlineInc(addrl, nlwidth); + Step(x1,dx1,dy1,e1,sign1,step1) + Step(x2,dx2,dy2,e2,sign2,step2) + } + if (y == maxy) + break; + afbScanlineInc(addrl, nlwidth); + } +} diff --git a/xorg-server-1.4/afb/afbplygblt.c b/xorg-server-1.4/afb/afbplygblt.c new file mode 100644 index 0000000..289d50e --- /dev/null +++ b/xorg-server-1.4/afb/afbplygblt.c @@ -0,0 +1,463 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include "afb.h" +#include +#include "dixfontstr.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "maskbits.h" + +/* + this works for fonts with glyphs <= 32 bits wide. + + the clipping calculations are done for worst-case fonts. +we make no assumptions about the heights, widths, or bearings +of the glyphs. if we knew that the glyphs are all the same height, +we could clip the tops and bottoms per clipping box, rather +than per character per clipping box. if we knew that the glyphs' +left and right bearings were wlle-behaved, we could clip a single +character at the start, output until the last unclipped +character, and then clip the last one. this is all straightforward +to determine based on max-bounds and min-bounds from the font. + there is some inefficiency introduced in the per-character +clipping to make what's going on clearer. + + (it is possible, for example, for a font to be defined in which the +next-to-last character in a font would be clipped out, but the last +one wouldn't. the code below deals with this.) + +*/ + +void +afbPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) + DrawablePtr pDrawable; + GC *pGC; + int x, y; + unsigned int nglyph; + CharInfoPtr *ppci; /* array of character info */ + pointer pglyphBase; /* start of array of glyphs */ +{ + ExtentInfoRec info; /* used by QueryGlyphExtents() */ + BoxRec bbox; /* string's bounding box */ + + CharInfoPtr pci; + int xorg, yorg; /* origin of drawable in bitmap */ + int widthDst; /* width of dst in longwords */ + + /* these keep track of the character origin */ + PixelType *pdstBase; + /* points to longword with character origin */ + int xchar; /* xorigin of char (mod 32) */ + + /* these are used for placing the glyph */ + register int xoff; /* x offset of left edge of glyph (mod 32) */ + register PixelType *pdst; /* pointer to current longword in dst */ + + register int d; + int depthDst; + int sizeDst; + int hSave; + int w; /* width of glyph in bits */ + int h; /* height of glyph */ + int widthGlyph; /* width of glyph, in bytes */ + unsigned char *rrops; + register unsigned char *pglyph; + /* pointer to current row of glyph */ + unsigned char *pglyphSave; + + /* used for putting down glyph */ + register PixelType tmpSrc; + /* for getting bits from glyph */ + register PixelType startmask; + register PixelType endmask; + + register int nFirst; /* bits of glyph in current longword */ + PixelType *pdstSave; + + xorg = pDrawable->x; + yorg = pDrawable->y; + afbGetPixelWidthSizeDepthAndPointer(pDrawable, widthDst, sizeDst, depthDst, + pdstBase); + + QueryGlyphExtents(pGC->font, ppci, (unsigned long)nglyph, &info); + + x += xorg; + y += yorg; + + bbox.x1 = x + info.overallLeft; + bbox.x2 = x + info.overallRight; + bbox.y1 = y - info.overallAscent; + bbox.y2 = y + info.overallDescent; + + rrops = ((afbPrivGCPtr) pGC->devPrivates[afbGCPrivateIndex].ptr)->rrops; + + switch (RECT_IN_REGION(pGC->pScreen, pGC->pCompositeClip, &bbox)) { + case rgnOUT: + break; + case rgnIN: + pdstBase = afbScanlineNoBankSwitch(pdstBase, x, y, widthDst); + xchar = x & PIM; + + while(nglyph--) { + pci = *ppci; + pglyphSave = FONTGLYPHBITS(pglyphBase, pci); + w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; + hSave = pci->metrics.ascent + pci->metrics.descent; + widthGlyph = GLYPHWIDTHBYTESPADDED(pci); + /* start at top scanline of glyph */ + pdstSave = afbScanlineDelta(pdstBase, -pci->metrics.ascent, + widthDst); + + /* find correct word in scanline and x offset within it + for left edge of glyph + */ + xoff = xchar + pci->metrics.leftSideBearing; + if (xoff > PLST) { + pdstSave++; + xoff &= PIM; + } else if (xoff < 0) { + xoff += PPW; + pdstSave--; + } + + for (d = 0; d < depthDst; d++) { + h = hSave; + pdst = pdstSave; + pdstSave += sizeDst; /* @@@ NEXT PLANE @@@ */ + pglyph = pglyphSave; + + if ((xoff + w) <= PPW) { + /* glyph all in one longword */ + maskpartialbits(xoff, w, startmask); + switch (rrops[d]) { + case RROP_WHITE: + while (h--) { + getleftbits(pglyph, w, tmpSrc); + *pdst |= (SCRRIGHT(tmpSrc, xoff) & startmask); + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + case RROP_BLACK: + while (h--) { + getleftbits(pglyph, w, tmpSrc); + *pdst &= ~(SCRRIGHT(tmpSrc, xoff) & startmask); + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + case RROP_INVERT: + while (h--) { + getleftbits(pglyph, w, tmpSrc); + *pdst ^= (SCRRIGHT(tmpSrc, xoff) & startmask); + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + } + } else { + /* glyph crosses longword boundary */ + maskPPWbits(xoff, w, startmask, endmask); + nFirst = PPW - xoff; + switch (rrops[d]) { + case RROP_WHITE: + while (h--) { + getleftbits(pglyph, w, tmpSrc); + *pdst |= (SCRRIGHT(tmpSrc, xoff) & startmask); + *(pdst+1) |= (SCRLEFT(tmpSrc, nFirst) & endmask); + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + case RROP_BLACK: + while (h--) { + getleftbits(pglyph, w, tmpSrc); + *pdst &= ~(SCRRIGHT(tmpSrc, xoff) & startmask); + *(pdst+1) &= ~(SCRLEFT(tmpSrc, nFirst) & endmask); + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + case RROP_INVERT: + while (h--) { + getleftbits(pglyph, w, tmpSrc); + *pdst ^= (SCRRIGHT(tmpSrc, xoff) & startmask); + *(pdst+1) ^= (SCRLEFT(tmpSrc, nFirst) & endmask); + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + } + } /* glyph crosses longwords boundary */ + } /* depth loop */ + /* update character origin */ + x += pci->metrics.characterWidth; + xchar += pci->metrics.characterWidth; + if (xchar > PLST) { + xchar -= PPW; + pdstBase++; + } else if (xchar < 0) { + xchar += PPW; + pdstBase--; + } + ppci++; + } /* while nglyph-- */ + break; + case rgnPART: + { + afbTEXTPOS *ppos; + int nbox; + BoxPtr pbox; + RegionPtr cclip; + int xpos; /* x position of char origin */ + int i; + BoxRec clip; + int leftEdge, rightEdge; + int topEdge, bottomEdge; + int glyphRow; /* first row of glyph not wholly + clipped out */ + int glyphCol; /* leftmost visible column of glyph */ +#if GETLEFTBITS_ALIGNMENT > 1 + int getWidth; /* bits to get from glyph */ +#endif + + if(!(ppos = (afbTEXTPOS *)ALLOCATE_LOCAL(nglyph * sizeof(afbTEXTPOS)))) + return; + + pdstBase = afbScanlineNoBankSwitch(pdstBase, x, y, widthDst); + xpos = x; + xchar = xpos & PIM; + + for (i = 0; i < nglyph; i++) { + pci = ppci[i]; + + ppos[i].xpos = xpos; + ppos[i].xchar = xchar; + ppos[i].leftEdge = xpos + pci->metrics.leftSideBearing; + ppos[i].rightEdge = xpos + pci->metrics.rightSideBearing; + ppos[i].topEdge = y - pci->metrics.ascent; + ppos[i].bottomEdge = y + pci->metrics.descent; + ppos[i].pdstBase = pdstBase; + ppos[i].widthGlyph = GLYPHWIDTHBYTESPADDED(pci); + + xpos += pci->metrics.characterWidth; + xchar += pci->metrics.characterWidth; + if (xchar > PLST) { + xchar &= PIM; + pdstBase++; + } else if (xchar < 0) { + xchar += PPW; + pdstBase--; + } + } + + cclip = pGC->pCompositeClip; + pbox = REGION_RECTS(cclip); + nbox = REGION_NUM_RECTS(cclip); + + /* HACK ALERT + since we continue out of the loop below so often, it + is easier to increment pbox at the top than at the end. + don't try this at home. + */ + pbox--; + while(nbox--) { + pbox++; + clip.x1 = max(bbox.x1, pbox->x1); + clip.y1 = max(bbox.y1, pbox->y1); + clip.x2 = min(bbox.x2, pbox->x2); + clip.y2 = min(bbox.y2, pbox->y2); + if ((clip.x2<=clip.x1) || (clip.y2<=clip.y1)) + continue; + + for(i=0; i clip.x2) + rightEdge = clip.x2; + else + rightEdge = ppos[i].rightEdge; + + w = rightEdge - leftEdge; + if (w <= 0) + continue; + + /* clip the top and bottom edges */ + if (ppos[i].topEdge < clip.y1) + topEdge = clip.y1; + else + topEdge = ppos[i].topEdge; + + if (ppos[i].bottomEdge > clip.y2) + bottomEdge = clip.y2; + else + bottomEdge = ppos[i].bottomEdge; + + hSave = bottomEdge - topEdge; + if (hSave <= 0) + continue; + + glyphRow = (topEdge - y) + pci->metrics.ascent; + widthGlyph = ppos[i].widthGlyph; + pglyphSave = FONTGLYPHBITS(pglyphBase, pci); + pglyphSave += (glyphRow * widthGlyph); + + glyphCol = (leftEdge - ppos[i].xpos) - + (pci->metrics.leftSideBearing); +#if GETLEFTBITS_ALIGNMENT > 1 + getWidth = w + glyphCol; +#endif + + pdstSave = afbScanlineDelta(ppos[i].pdstBase, -(y-topEdge), + widthDst); + xoff = xchar + (leftEdge - ppos[i].xpos); + if (xoff > PLST) { + xoff &= PIM; + pdstSave++; + } else if (xoff < 0) { + xoff += PPW; + pdstSave--; + } + + for (d = 0; d < depthDst; d++) { + h = hSave; + pdst = pdstSave; + pdstSave += sizeDst; /* @@@ NEXT PLANE @@@ */ + pglyph = pglyphSave; + + if ((xoff + w) <= PPW) { + maskpartialbits(xoff, w, startmask); + switch (rrops[d]) { + case RROP_WHITE: + while (h--) { + getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); + *pdst |= (SCRRIGHT(tmpSrc, xoff) & startmask); + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + case RROP_BLACK: + while (h--) { + getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); + *pdst &= ~(SCRRIGHT(tmpSrc, xoff) & startmask); + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + case RROP_INVERT: + while (h--) { + getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); + *pdst ^= (SCRRIGHT(tmpSrc, xoff) & startmask); + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + } + } else { + maskPPWbits(xoff, w, startmask, endmask); + nFirst = PPW - xoff; + switch (rrops[d]) { + case RROP_WHITE: + while (h--) { + getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); + *pdst |= (SCRRIGHT(tmpSrc, xoff) & startmask); + *(pdst+1) |= (SCRLEFT(tmpSrc, nFirst) & endmask); + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + case RROP_BLACK: + while (h--) { + getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); + *pdst &= ~(SCRRIGHT(tmpSrc, xoff) & startmask); + *(pdst+1) &= ~(SCRLEFT(tmpSrc, nFirst) & endmask); + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + case RROP_INVERT: + while (h--) { + getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); + *pdst ^= (SCRRIGHT(tmpSrc, xoff) & startmask); + *(pdst+1) ^= (SCRLEFT(tmpSrc, nFirst) & endmask); + pglyph += widthGlyph; + afbScanlineInc(pdst, widthDst); + } + break; + } + } + } /* depth */ + } /* for each glyph */ + } /* while nbox-- */ + DEALLOCATE_LOCAL(ppos); + break; + } + + default: + break; + } +} diff --git a/xorg-server-1.4/afb/afbpntarea.c b/xorg-server-1.4/afb/afbpntarea.c new file mode 100644 index 0000000..cc43f52 --- /dev/null +++ b/xorg-server-1.4/afb/afbpntarea.c @@ -0,0 +1,655 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "windowstr.h" +#include "regionstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" + +#include "afb.h" +#include "maskbits.h" + +/* + the solid fillers are called for rectangles and window backgrounds. + the boxes are already translated. + maybe this should always take a pixmap instead of a drawable? + + NOTE: + iy = ++iy < tileHeight ? iy : 0 +is equivalent to iy%= tileheight, and saves a division. +*/ + +/*ARGSUSED*/ +void +afbSolidFillArea (pDraw, nbox, pbox, rrops) + DrawablePtr pDraw; + int nbox; + BoxPtr pbox; + register unsigned char *rrops; +{ + int nlwidth; /* width in longwords of the drawable */ + int w; /* width of current box */ + register int h; /* height of current box */ + register PixelType *p; /* pointer to bits we're writing */ + register int nlw; /* loop version of nlwMiddle */ + register PixelType startmask; + register PixelType endmask; + /* masks for reggedy bits at either end of line */ + register int nlwExtra; + /* to get from right of box to left of next span */ + int nlwMiddle; /* number of longwords between sides of boxes */ + PixelType *pbits; /* pointer to start of drawable */ + PixelType *saveP; + int saveH; + int depthDst; + int sizeDst; + register int d; + + afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, + pbits); + + while (nbox--) { + w = pbox->x2 - pbox->x1; + saveH = pbox->y2 - pbox->y1; + + saveP = afbScanline(pbits, pbox->x1, pbox->y1, nlwidth); + + if ( ((pbox->x1 & PIM) + w) < PPW) { + for (d = 0; d < depthDst; d++) { + h = saveH; + p = saveP; + saveP += sizeDst; /* @@@ NEXT PLANE @@@ */ + maskpartialbits(pbox->x1, w, startmask); + nlwExtra = nlwidth; + + switch (rrops[d]) { + case RROP_BLACK: + Duff(h, *p &= ~startmask; afbScanlineInc(p, nlwExtra)); + break; + case RROP_WHITE: + Duff(h, *p |= startmask; afbScanlineInc(p, nlwExtra)); + break; + case RROP_INVERT: + Duff(h, *p ^= startmask; afbScanlineInc(p, nlwExtra)); + break; + case RROP_NOP: + break; + } /* switch */ + } /* for (d = ..) */ + } else { + maskbits(pbox->x1, w, startmask, endmask, nlwMiddle); + + for (d = 0; d < depthDst; d++) { + h = saveH; + p = saveP; + saveP += sizeDst; /* @@@ NEXT PLANE @@@ */ + nlwExtra = nlwidth - nlwMiddle; + + if (startmask && endmask) { + nlwExtra -= 1; + switch (rrops[d]) { + case RROP_BLACK: + while (h--) { + nlw = nlwMiddle; + *p &= ~startmask; + p++; + Duff(nlw, *p++ = 0); + *p &= ~endmask; + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_WHITE: + while (h--) { + nlw = nlwMiddle; + *p |= startmask; + p++; + Duff(nlw, *p++ = ~0); + *p |= endmask; + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_INVERT: + while (h--) { + nlw = nlwMiddle; + *p ^= startmask; + p++; + Duff(nlw, *p++ ^= ~0); + *p ^= endmask; + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_NOP: + break; + } + } else if (startmask && !endmask) { + nlwExtra -= 1; + switch (rrops[d]) { + case RROP_BLACK: + while (h--) { + nlw = nlwMiddle; + *p &= ~startmask; + p++; + Duff(nlw, *p++ = 0); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_WHITE: + while (h--) { + nlw = nlwMiddle; + *p |= startmask; + p++; + Duff(nlw, *p++ = ~0); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_INVERT: + while (h--) { + nlw = nlwMiddle; + *p ^= startmask; + p++; + Duff(nlw, *p++ ^= ~0); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_NOP: + break; + } + } else if (!startmask && endmask) { + switch (rrops[d]) { + case RROP_BLACK: + while (h--) { + nlw = nlwMiddle; + Duff(nlw, *p++ = 0); + *p &= ~endmask; + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_WHITE: + while (h--) { + nlw = nlwMiddle; + Duff(nlw, *p++ = ~0); + *p |= endmask; + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_INVERT: + while (h--) { + nlw = nlwMiddle; + Duff(nlw, *p++ ^= ~0); + *p ^= endmask; + afbScanlineInc(p, nlwExtra); + } + case RROP_NOP: + break; + } + } else { /* no ragged bits at either end */ + switch (rrops[d]) { + case RROP_BLACK: + while (h--) { + nlw = nlwMiddle; + Duff(nlw, *p++ = 0); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_WHITE: + while (h--) { + nlw = nlwMiddle; + Duff(nlw, *p++ = ~0); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_INVERT: + while (h--) { + nlw = nlwMiddle; + Duff(nlw, *p++ ^= ~0); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_NOP: + break; + } /* switch */ + } + } /* for (d = 0 ... ) */ + } + pbox++; + } +} + +/* stipple a list of boxes - + +you can use the reduced rasterop for stipples. if rrop is +black, AND the destination with (not stipple pattern). if rrop is +white OR the destination with the stipple pattern. if rrop is invert, +XOR the destination with the stipple pattern. +*/ + +/*ARGSUSED*/ +void +afbStippleAreaPPW (pDraw, nbox, pbox, pstipple, rrops) + DrawablePtr pDraw; + int nbox; + BoxPtr pbox; + PixmapPtr pstipple; + unsigned char *rrops; +{ + register PixelType *psrc; + /* pointer to bits in tile, if needed */ + int tileHeight; /* height of the tile */ + register PixelType srcpix; + + int nlwidth; /* width in longwords of the drawable */ + int w; /* width of current box */ + register int nlw; /* loop version of nlwMiddle */ + register PixelType *p; /* pointer to bits we're writing */ + register int h; /* height of current box */ + PixelType startmask; + PixelType endmask; /* masks for reggedy bits at either end of line */ + int nlwMiddle; /* number of longwords between sides of boxes */ + int nlwExtra; /* to get from right of box to left of next span */ + int sizeDst; + int depthDst; + int d; + int saveIy; + register int iy; /* index of current scanline in tile */ + PixelType *pbits; /* pointer to start of drawable */ + PixelType *pBase; + + afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, + pBase); + + tileHeight = pstipple->drawable.height; + psrc = (PixelType *)(pstipple->devPrivate.ptr); + + while (nbox--) { + w = pbox->x2 - pbox->x1; + saveIy = pbox->y1 % tileHeight; + pbits = pBase; + + if ( ((pbox->x1 & PIM) + w) < PPW) { + maskpartialbits(pbox->x1, w, startmask); + nlwExtra = nlwidth; + for (d = 0; d < depthDst; d++) { + p = afbScanline(pbits, pbox->x1, pbox->y1, nlwidth); + pbits += sizeDst; /* @@@ NEXT PLANE @@@ */ + iy = saveIy; + h = pbox->y2 - pbox->y1; + + switch (rrops[d]) { + case RROP_BLACK: + while (h--) { + srcpix = psrc[iy]; + iy = ++iy < tileHeight ? iy : 0; + *p &= ~(srcpix & startmask); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_WHITE: + while (h--) { + srcpix = psrc[iy]; + iy = ++iy < tileHeight ? iy : 0; + *p |= (srcpix & startmask); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_INVERT: + while (h--) { + srcpix = psrc[iy]; + iy = ++iy < tileHeight ? iy : 0; + *p ^= (srcpix & startmask); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_NOP: + break; + } /* switch */ + } /* for (d = ...) */ + + } else { + maskbits(pbox->x1, w, startmask, endmask, nlwMiddle); + + for (d = 0; d < depthDst; d++) { + nlwExtra = nlwidth - nlwMiddle; + p = afbScanline(pbits, pbox->x1, pbox->y1, nlwidth); + pbits += sizeDst; /* @@@ NEXT PLANE @@@ */ + iy = saveIy; + h = pbox->y2 - pbox->y1; + + if (startmask && endmask) { + nlwExtra -= 1; + switch (rrops[d]) { + case RROP_BLACK: + while (h--) { + srcpix = psrc[iy]; + iy = ++iy < tileHeight ? iy : 0; + nlw = nlwMiddle; + *p &= ~(srcpix & startmask); + p++; + Duff (nlw, *p++ &= ~srcpix); + *p &= ~(srcpix & endmask); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_WHITE: + while (h--) { + srcpix = psrc[iy]; + iy = ++iy < tileHeight ? iy : 0; + nlw = nlwMiddle; + *p |= (srcpix & startmask); + p++; + Duff (nlw, *p++ |= srcpix); + *p |= (srcpix & endmask); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_INVERT: + while (h--) { + srcpix = psrc[iy]; + iy = ++iy < tileHeight ? iy : 0; + nlw = nlwMiddle; + *p ^= (srcpix & startmask); + p++; + Duff (nlw, *p++ ^= srcpix); + *p ^= (srcpix & endmask); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_NOP: + break; + } /* switch */ + } else if (startmask && !endmask) { + nlwExtra -= 1; + switch (rrops[d]) { + case RROP_BLACK: + while (h--) { + srcpix = psrc[iy]; + iy = ++iy < tileHeight ? iy : 0; + nlw = nlwMiddle; + *p &= ~(srcpix & startmask); + p++; + Duff(nlw, *p++ &= ~srcpix); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_WHITE: + while (h--) { + srcpix = psrc[iy]; + iy = ++iy < tileHeight ? iy : 0; + nlw = nlwMiddle; + *p |= (srcpix & startmask); + p++; + Duff(nlw, *p++ |= srcpix); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_INVERT: + while (h--) { + srcpix = psrc[iy]; + iy = ++iy < tileHeight ? iy : 0; + nlw = nlwMiddle; + *p ^= (srcpix & startmask); + p++; + Duff(nlw, *p++ ^= srcpix); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_NOP: + break; + } /* switch */ + } else if (!startmask && endmask) { + switch (rrops[d]) { + case RROP_BLACK: + while (h--) { + srcpix = psrc[iy]; + iy = ++iy < tileHeight ? iy : 0; + nlw = nlwMiddle; + Duff(nlw, *p++ &= ~srcpix); + *p &= ~(srcpix & endmask); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_WHITE: + while (h--) { + srcpix = psrc[iy]; + iy = ++iy < tileHeight ? iy : 0; + nlw = nlwMiddle; + Duff(nlw, *p++ |= srcpix); + *p |= (srcpix & endmask); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_INVERT: + while (h--) { + srcpix = psrc[iy]; + iy = ++iy < tileHeight ? iy : 0; + nlw = nlwMiddle; + Duff(nlw, *p++ ^= srcpix); + *p ^= (srcpix & endmask); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_NOP: + break; + } /* switch */ + } else { /* no ragged bits at either end */ + switch (rrops[d]) { + case RROP_BLACK: + while (h--) { + srcpix = psrc[iy]; + iy = ++iy < tileHeight ? iy : 0; + nlw = nlwMiddle; + Duff(nlw, *p++ &= ~srcpix); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_WHITE: + while (h--) { + srcpix = psrc[iy]; + iy = ++iy < tileHeight ? iy : 0; + nlw = nlwMiddle; + Duff(nlw, *p++ |= srcpix); + afbScanlineInc(p, nlwExtra); + } + break; + case RROP_INVERT: + while (h--) { + srcpix = psrc[iy]; + iy = ++iy < tileHeight ? iy : 0; + nlw = nlwMiddle; + Duff(nlw, *p++ ^= srcpix); + afbScanlineInc(p, nlwExtra); + } + break; + } /* switch */ + } + } /* for (d = ...) */ + } + pbox++; + } +} + +void +afbStippleArea (pDraw, nbox, pbox, pTile, xOff, yOff, rrops) + DrawablePtr pDraw; + int nbox; + BoxPtr pbox; + PixmapPtr pTile; + int xOff; + int yOff; + unsigned char *rrops; +{ + register PixelType *psrc; /* pointer to bits in tile, if needed */ + int nlwidth; /* width in longwords of the drawable */ + register int h; /* height of current box */ + register PixelType *pdst; /* pointer to bits we're writing */ + int sizeDst; + int depthDst; + int tileLine; + int iline; + int w, width, x, xSrc, ySrc, srcStartOver, nend; + int tlwidth, rem, tileWidth, tileHeight, endinc; + int saveW; + register int rop; + PixelType *psrcT; + int d; + int nstart; + PixelType startmask; + PixelType endmask; /* masks for reggedy bits at either end of line */ + int nlMiddle; /* number of longwords between sides of boxes */ + int iy; + PixelType *pBase; /* pointer to start of drawable */ + PixelType *saveP; + PixelType *pStartDst; + PixelType *pStartTile; + int saveH; + + afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, + pBase); + + tileHeight = pTile->drawable.height; + tileWidth = pTile->drawable.width; + tlwidth = pTile->devKind / sizeof (PixelType); + + xSrc = pDraw->x + ((xOff % tileWidth) - tileWidth); + ySrc = pDraw->y + ((yOff % tileHeight) - tileHeight); + + while (nbox--) { + saveW = pbox->x2 - pbox->x1; + iline = (pbox->y1 - ySrc) % tileHeight; + psrcT = (PixelType *) pTile->devPrivate.ptr; + tileLine = iline * tlwidth; + saveH = pbox->y2 - pbox->y1; + saveP = afbScanline(pBase, pbox->x1, pbox->y1, nlwidth); + + for (d = 0; d < depthDst; d++, saveP += sizeDst) { /* @@@ NEXT PLANE @@@ */ + h = saveH; + pStartDst = saveP; + pStartTile = psrcT + tileLine; + iy = iline; + + while (h--) { + x = pbox->x1; + width = saveW; + pdst = pStartDst; + rop = rrops[d]; + + while(width > 0) { + psrc = pStartTile; + w = min(tileWidth, width); + if((rem = (x - xSrc) % tileWidth) != 0) { + /* if we're in the middle of the tile, get + as many bits as will finish the span, or + as many as will get to the left edge of the tile, + or a longword worth, starting at the appropriate + offset in the tile. + */ + w = min(min(tileWidth - rem, width), BITMAP_SCANLINE_PAD); + endinc = rem / BITMAP_SCANLINE_PAD; + getandputrrop((psrc + endinc), (rem & PIM), (x & PIM), + w, pdst, rop) + if((x & PIM) + w >= PPW) + pdst++; + } else if(((x & PIM) + w) < PPW) { + /* doing < PPW bits is easy, and worth special-casing */ + putbitsrrop(*psrc, x & PIM, w, pdst, rop); + } else { + /* start at the left edge of the tile, + and put down as much as we can + */ + maskbits(x, w, startmask, endmask, nlMiddle); + + if (startmask) + nstart = PPW - (x & PIM); + else + nstart = 0; + if (endmask) + nend = (x + w) & PIM; + else + nend = 0; + + srcStartOver = nstart > PLST; + + if(startmask) { + putbitsrrop(*psrc, (x & PIM), nstart, pdst, rop); + pdst++; + if(srcStartOver) + psrc++; + } + + while(nlMiddle--) { + getandputrrop0(psrc, nstart, PPW, pdst, rop); + pdst++; + psrc++; + } + + if(endmask) { + getandputrrop0(psrc, nstart, nend, pdst, rop); + } + } + x += w; + width -= w; + } /* while (width > 0) */ + + pStartDst += nlwidth; + if (++iy >= tileHeight) { + iy = 0; + pStartTile = psrcT; + } else + pStartTile += tlwidth; + + } /* while (h) */ + } /* for (d = ... ) */ + pbox++; + } /* for each box */ +} diff --git a/xorg-server-1.4/afb/afbpntwin.c b/xorg-server-1.4/afb/afbpntwin.c new file mode 100644 index 0000000..6082f7c --- /dev/null +++ b/xorg-server-1.4/afb/afbpntwin.c @@ -0,0 +1,126 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "windowstr.h" +#include "regionstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" + +#include "afb.h" +#include "maskbits.h" +#include "mi.h" + +void +afbPaintWindow(pWin, pRegion, what) + WindowPtr pWin; + RegionPtr pRegion; + int what; +{ + register afbPrivWin *pPrivWin; + unsigned char rrops[AFB_MAX_DEPTH]; + + pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr); + + switch (what) { + case PW_BACKGROUND: + switch (pWin->backgroundState) { + case None: + return; + case ParentRelative: + do { + pWin = pWin->parent; + } while (pWin->backgroundState == ParentRelative); + (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, + what); + return; + case BackgroundPixmap: + if (pPrivWin->fastBackground) { + afbTileAreaPPWCopy((DrawablePtr)pWin, + REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), GXcopy, + pPrivWin->pRotatedBackground, ~0); + return; + } else { + afbTileAreaCopy((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), GXcopy, + pWin->background.pixmap, 0, 0, ~0); + return; + } + break; + case BackgroundPixel: + afbReduceRop(GXcopy, pWin->background.pixel, ~0, + pWin->drawable.depth, rrops); + afbSolidFillArea((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), rrops); + return; + } + break; + case PW_BORDER: + if (pWin->borderIsPixel) { + afbReduceRop(GXcopy, pWin->border.pixel, ~0, pWin->drawable.depth, + rrops); + afbSolidFillArea((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), rrops); + return; + } else if (pPrivWin->fastBorder) { + afbTileAreaPPWCopy((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), GXcopy, + pPrivWin->pRotatedBorder, ~0); + return; + } + break; + } + miPaintWindow(pWin, pRegion, what); +} diff --git a/xorg-server-1.4/afb/afbpolypnt.c b/xorg-server-1.4/afb/afbpolypnt.c new file mode 100644 index 0000000..a9d96ed --- /dev/null +++ b/xorg-server-1.4/afb/afbpolypnt.c @@ -0,0 +1,146 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "pixmapstr.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "regionstr.h" +#include "scrnintstr.h" + +#include "afb.h" +#include "maskbits.h" + +void +afbPolyPoint(pDrawable, pGC, mode, npt, pptInit) + register DrawablePtr pDrawable; + GCPtr pGC; + int mode; /* Origin or Previous */ + int npt; + xPoint *pptInit; +{ + + register BoxPtr pbox; + register int nbox; + register int d; + + register PixelType *addrl; + PixelType *pBase; + PixelType *pBaseSave; + int nlwidth; + int sizeDst; + int depthDst; + + int nptTmp; + register xPoint *ppt; + + register int x; + register int y; + register unsigned char *rrops; + afbPrivGC *pGCPriv; + + pGCPriv = (afbPrivGC *) pGC->devPrivates[afbGCPrivateIndex].ptr; + + afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, + pBaseSave); + + rrops = pGCPriv->rrops; + if ((mode == CoordModePrevious) && (npt > 1)) + for (ppt = pptInit + 1, nptTmp = npt - 1; --nptTmp >= 0; ppt++) { + ppt->x += (ppt-1)->x; + ppt->y += (ppt-1)->y; + } + + nbox = REGION_NUM_RECTS(pGC->pCompositeClip); + pbox = REGION_RECTS(pGC->pCompositeClip); + for (; --nbox >= 0; pbox++) + for (d = 0, pBase = pBaseSave; d < depthDst; d++, pBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ + addrl = pBase; + + switch (rrops[d]) { + case RROP_BLACK: + for (ppt = pptInit, nptTmp = npt; --nptTmp >= 0; ppt++) { + x = ppt->x + pDrawable->x; + y = ppt->y + pDrawable->y; + if ((x >= pbox->x1) && (x < pbox->x2) && + (y >= pbox->y1) && (y < pbox->y2)) + *afbScanline(addrl, x, y, nlwidth) &= mfbGetrmask(x & PIM); + } + break; + + case RROP_WHITE: + for (ppt = pptInit, nptTmp = npt; --nptTmp >= 0; ppt++) { + x = ppt->x + pDrawable->x; + y = ppt->y + pDrawable->y; + if ((x >= pbox->x1) && (x < pbox->x2) && + (y >= pbox->y1) && (y < pbox->y2)) + *afbScanline(addrl, x, y, nlwidth) |= mfbGetmask(x & PIM); + } + break; + + case RROP_INVERT: + for (ppt = pptInit, nptTmp = npt; --nptTmp >= 0; ppt++) { + x = ppt->x + pDrawable->x; + y = ppt->y + pDrawable->y; + if ((x >= pbox->x1) && (x < pbox->x2) && + (y >= pbox->y1) && (y < pbox->y2)) + *afbScanline(addrl, x, y, nlwidth) ^= mfbGetmask(x & PIM); + } + break; + + case RROP_NOP: + break; + } /* switch */ + } /* for (d = ...) */ +} diff --git a/xorg-server-1.4/afb/afbpushpxl.c b/xorg-server-1.4/afb/afbpushpxl.c new file mode 100644 index 0000000..3dd5487 --- /dev/null +++ b/xorg-server-1.4/afb/afbpushpxl.c @@ -0,0 +1,169 @@ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include "gcstruct.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "maskbits.h" +#include "afb.h" + +#define NPT 128 + +/* afbPushPixels -- squeegees the forground color of pGC through pBitMap + * into pDrawable. pBitMap is a stencil (dx by dy of it is used, it may + * be bigger) which is placed on the drawable at xOrg, yOrg. Where a 1 bit + * is set in the bitmap, the fill style is put onto the drawable using + * the GC's logical function. The drawable is not changed where the bitmap + * has a zero bit or outside the area covered by the stencil. + */ +void +afbPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable, int dx, int dy, int xOrg, int yOrg) +{ + int h, dxDivPPW, ibEnd; + PixelType *pwLineStart; + register PixelType *pw, *pwEnd; + register PixelType mask; + register int ib; + register PixelType w; + register int ipt; /* index into above arrays */ + Bool fInBox; + DDXPointRec pt[NPT]; + int width[NPT]; + + /* Now scan convert the pixmap and use the result to call fillspans in + * in the drawable with the original GC */ + ipt = 0; + dxDivPPW = dx/PPW; + for (h = 0; h < dy; h++) { + + pw = (PixelType *) + (((char *)(pBitMap->devPrivate.ptr))+(h * pBitMap->devKind)); + pwLineStart = pw; + /* Process all words which are fully in the pixmap */ + + fInBox = FALSE; + pwEnd = pwLineStart + dxDivPPW; + while(pw < pwEnd) { + w = *pw; + mask = mfbGetendtab(1); + for(ib = 0; ib < PPW; ib++) { + if(w & mask) { + if(!fInBox) { + pt[ipt].x = ((pw - pwLineStart) << PWSH) + ib + xOrg; + pt[ipt].y = h + yOrg; + /* start new box */ + fInBox = TRUE; + } + } else { + if(fInBox) { + width[ipt] = ((pw - pwLineStart) << PWSH) + + ib + xOrg - pt[ipt].x; + if (++ipt >= NPT) { + (*pGC->ops->FillSpans)(pDrawable, pGC, NPT, pt, + width, TRUE); + ipt = 0; + } + /* end box */ + fInBox = FALSE; + } + } + mask = SCRRIGHT(mask, 1); + } + pw++; + } + ibEnd = dx & PIM; + if(ibEnd) { + /* Process final partial word on line */ + w = *pw; + mask = mfbGetendtab(1); + for(ib = 0; ib < ibEnd; ib++) { + if(w & mask) { + if(!fInBox) { + /* start new box */ + pt[ipt].x = ((pw - pwLineStart) << PWSH) + ib + xOrg; + pt[ipt].y = h + yOrg; + fInBox = TRUE; + } + } else { + if(fInBox) { + /* end box */ + width[ipt] = ((pw - pwLineStart) << PWSH) + + ib + xOrg - pt[ipt].x; + if (++ipt >= NPT) { + (*pGC->ops->FillSpans)(pDrawable, pGC, NPT, pt, + width, TRUE); + ipt = 0; + } + fInBox = FALSE; + } + } + mask = SCRRIGHT(mask, 1); + } + } + /* If scanline ended with last bit set, end the box */ + if(fInBox) { + width[ipt] = dx + xOrg - pt[ipt].x; + if (++ipt >= NPT) { + (*pGC->ops->FillSpans)(pDrawable, pGC, NPT, pt, width, TRUE); + ipt = 0; + } + } + } + /* Flush any remaining spans */ + if (ipt) { + (*pGC->ops->FillSpans)(pDrawable, pGC, ipt, pt, width, TRUE); + } +} diff --git a/xorg-server-1.4/afb/afbscrinit.c b/xorg-server-1.4/afb/afbscrinit.c new file mode 100644 index 0000000..7cb7423 --- /dev/null +++ b/xorg-server-1.4/afb/afbscrinit.c @@ -0,0 +1,240 @@ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include /* for xColorItem */ +#include +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "windowstr.h" +#include "resource.h" +#include "colormap.h" +#include "afb.h" +#include "mistruct.h" +#include "dix.h" +#include "mi.h" +#include "mibstore.h" +#include "migc.h" +#include "servermd.h" + +#ifdef PIXMAP_PER_WINDOW +int frameWindowPrivateIndex; +#endif +int afbWindowPrivateIndex; +int afbGCPrivateIndex; +int afbScreenPrivateIndex; + +static unsigned long afbGeneration = 0; + +static BSFuncRec afbBSFuncRec = { + afbSaveAreas, + afbRestoreAreas, + (BackingStoreSetClipmaskRgnProcPtr) 0, + (BackingStoreGetImagePixmapProcPtr) 0, + (BackingStoreGetSpansPixmapProcPtr) 0, +}; + +static Bool +afbCloseScreen(int index, ScreenPtr pScreen) +{ + int d; + DepthPtr depths = pScreen->allowedDepths; + + for (d = 0; d < pScreen->numDepths; d++) + xfree(depths[d].vids); + xfree(depths); + xfree(pScreen->visuals); + xfree(pScreen->devPrivates[afbScreenPrivateIndex].ptr); + return(TRUE); +} + +static Bool +afbCreateScreenResources(ScreenPtr pScreen) +{ + Bool retval; + + pointer oldDevPrivate = pScreen->devPrivate; + + pScreen->devPrivate = pScreen->devPrivates[afbScreenPrivateIndex].ptr; + retval = miCreateScreenResources(pScreen); + + /* Modify screen's pixmap devKind value stored off devPrivate to + * be the width of a single plane in longs rather than the width + * of a chunky screen in longs as incorrectly setup by the mi routine. + */ + ((PixmapPtr)pScreen->devPrivate)->devKind = BitmapBytePad(pScreen->width); + pScreen->devPrivates[afbScreenPrivateIndex].ptr = pScreen->devPrivate; + pScreen->devPrivate = oldDevPrivate; + return(retval); +} + +static PixmapPtr +afbGetWindowPixmap(WindowPtr pWin) +{ +#ifdef PIXMAP_PER_WINDOW + return (PixmapPtr)(pWin->devPrivates[frameWindowPrivateIndex].ptr); +#else + ScreenPtr pScreen = pWin->drawable.pScreen; + + return (* pScreen->GetScreenPixmap)(pScreen); +#endif +} + +static void +afbSetWindowPixmap(WindowPtr pWin, PixmapPtr pPix) +{ +#ifdef PIXMAP_PER_WINDOW + pWin->devPrivates[frameWindowPrivateIndex].ptr = (pointer)pPix; +#else + (* pWin->drawable.pScreen->SetScreenPixmap)(pPix); +#endif +} + +static Bool +afbAllocatePrivates(ScreenPtr pScreen, int *pWinIndex, int *pGCIndex) +{ + if (afbGeneration != serverGeneration) { +#ifdef PIXMAP_PER_WINDOW + frameWindowPrivateIndex = AllocateWindowPrivateIndex(); +#endif + afbWindowPrivateIndex = AllocateWindowPrivateIndex(); + afbGCPrivateIndex = AllocateGCPrivateIndex(); + afbGeneration = serverGeneration; + } + if (pWinIndex) + *pWinIndex = afbWindowPrivateIndex; + if (pGCIndex) + *pGCIndex = afbGCPrivateIndex; + + afbScreenPrivateIndex = AllocateScreenPrivateIndex(); + pScreen->GetWindowPixmap = afbGetWindowPixmap; + pScreen->SetWindowPixmap = afbSetWindowPixmap; + return(AllocateWindowPrivate(pScreen, afbWindowPrivateIndex, sizeof(afbPrivWin)) && + AllocateGCPrivate(pScreen, afbGCPrivateIndex, sizeof(afbPrivGC))); +} + +/* dts * (inch/dot) * (25.4 mm / inch) = mm */ +Bool +afbScreenInit(register ScreenPtr pScreen, pointer pbits, int xsize, int ysize, int dpix, int dpiy, int width) + + /* pointer to screen bitmap */ + /* in pixels */ + /* dots per inch */ + /* pixel width of frame buffer */ +{ + VisualPtr visuals; + DepthPtr depths; + int nvisuals; + int ndepths; + int rootdepth; + VisualID defaultVisual; + pointer oldDevPrivate; + + rootdepth = 0; + if (!afbInitVisuals(&visuals, &depths, &nvisuals, &ndepths, &rootdepth, + &defaultVisual, 256, 8)) { + ErrorF("afbInitVisuals: FALSE\n"); + return FALSE; + } + if (!afbAllocatePrivates(pScreen,(int *)NULL, (int *)NULL)) { + ErrorF("afbAllocatePrivates: FALSE\n"); + return FALSE; + } + + pScreen->defColormap = (Colormap)FakeClientID(0); + /* whitePixel, blackPixel */ + pScreen->blackPixel = 0; + pScreen->whitePixel = 0; + pScreen->QueryBestSize = afbQueryBestSize; + /* SaveScreen */ + pScreen->GetImage = afbGetImage; + pScreen->GetSpans = afbGetSpans; + pScreen->CreateWindow = afbCreateWindow; + pScreen->DestroyWindow = afbDestroyWindow; + pScreen->PositionWindow = afbPositionWindow; + pScreen->ChangeWindowAttributes = afbChangeWindowAttributes; + pScreen->RealizeWindow = afbMapWindow; + pScreen->UnrealizeWindow = afbUnmapWindow; + pScreen->PaintWindowBackground = afbPaintWindow; + pScreen->PaintWindowBorder = afbPaintWindow; + pScreen->CopyWindow = afbCopyWindow; + pScreen->CreatePixmap = afbCreatePixmap; + pScreen->DestroyPixmap = afbDestroyPixmap; + pScreen->RealizeFont = afbRealizeFont; + pScreen->UnrealizeFont = afbUnrealizeFont; + pScreen->CreateGC = afbCreateGC; + pScreen->CreateColormap = afbInitializeColormap; + pScreen->DestroyColormap = (DestroyColormapProcPtr)NoopDDA; + pScreen->InstallColormap = afbInstallColormap; + pScreen->UninstallColormap = afbUninstallColormap; + pScreen->ListInstalledColormaps = afbListInstalledColormaps; + pScreen->StoreColors = (StoreColorsProcPtr)NoopDDA; + pScreen->ResolveColor = afbResolveColor; + pScreen->BitmapToRegion = afbPixmapToRegion; + oldDevPrivate = pScreen->devPrivate; + if (!miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, rootdepth, + ndepths, depths, defaultVisual, nvisuals, visuals)) { + ErrorF("miScreenInit: FALSE\n"); + return FALSE; + } + + pScreen->CloseScreen = afbCloseScreen; + pScreen->CreateScreenResources = afbCreateScreenResources; + pScreen->BackingStoreFuncs = afbBSFuncRec; + + pScreen->devPrivates[afbScreenPrivateIndex].ptr = pScreen->devPrivate; + pScreen->devPrivate = oldDevPrivate; + + return TRUE; +} diff --git a/xorg-server-1.4/afb/afbseg.c b/xorg-server-1.4/afb/afbseg.c new file mode 100644 index 0000000..089bd6b --- /dev/null +++ b/xorg-server-1.4/afb/afbseg.c @@ -0,0 +1,2 @@ +#define POLYSEGMENT +#include "./afbline.c" diff --git a/xorg-server-1.4/afb/afbsetsp.c b/xorg-server-1.4/afb/afbsetsp.c new file mode 100644 index 0000000..cb36dba --- /dev/null +++ b/xorg-server-1.4/afb/afbsetsp.c @@ -0,0 +1,257 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include + +#include "misc.h" +#include "regionstr.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" + +#include "afb.h" +#include "maskbits.h" + +#include "servermd.h" + + +/* afbSetScanline -- copies the bits from psrc to the drawable starting at + * (xStart, y) and continuing to (xEnd, y). xOrigin tells us where psrc + * starts on the scanline. (I.e., if this scanline passes through multiple + * boxes, we may not want to start grabbing bits at psrc but at some offset + * further on.) + */ +static void +afbSetScanline(int y, int xOrigin, int xStart, int xEnd, PixelType *psrc, + int alu, PixelType *pdstBase, int widthDst, int sizeDst, + int depthDst, int sizeSrc) +{ + int w; /* width of scanline in bits */ + register PixelType *pdst; /* where to put the bits */ + register PixelType tmpSrc; /* scratch buffer to collect bits in */ + int dstBit; /* offset in bits from beginning of + * word */ + register int nstart; /* number of bits from first partial */ + register int nend; /* " " last partial word */ + int offSrc; + PixelType startmask, endmask; + PixelType *savePsrc = psrc + ((xStart - xOrigin) >> PWSH); + int nlMiddle, nl; + int d; + + for (d = 0; d < depthDst; d++) { + pdst = afbScanline(pdstBase, xStart, y, widthDst) + sizeDst * d; /* @@@ NEXT PLANE @@@ */ + psrc = savePsrc + sizeSrc * d; /* @@@ NEXT PLANE @@@ */ + offSrc = (xStart - xOrigin) & PIM; + w = xEnd - xStart; + dstBit = xStart & PIM; + + if (dstBit + w <= PPW) { + getandputrop(psrc, offSrc, dstBit, w, pdst, alu) + } else { + maskbits(xStart, w, startmask, endmask, nlMiddle); + if (startmask) + nstart = PPW - dstBit; + else + nstart = 0; + if (endmask) + nend = xEnd & PIM; + else + nend = 0; + if (startmask) { + getandputrop(psrc, offSrc, dstBit, nstart, pdst, alu) + pdst++; + offSrc += nstart; + if (offSrc > PLST) { + psrc++; + offSrc -= PPW; + } + } + nl = nlMiddle; + while (nl--) { + getbits(psrc, offSrc, PPW, tmpSrc); + DoRop(*pdst, alu, tmpSrc, *pdst); + pdst++; + psrc++; + } + if (endmask) { + getandputrop0(psrc, offSrc, nend, pdst, alu); + } + } + } +} + + + +/* SetSpans -- for each span copy pwidth[i] bits from psrc to pDrawable at + * ppt[i] using the raster op from the GC. If fSorted is TRUE, the scanlines + * are in increasing Y order. + * Source bit lines are server scanline padded so that they always begin + * on a word boundary. + */ +void +afbSetSpans(pDrawable, pGC, pcharsrc, ppt, pwidth, nspans, fSorted) + DrawablePtr pDrawable; + GCPtr pGC; + char *pcharsrc; + register DDXPointPtr ppt; + int *pwidth; + int nspans; + int fSorted; +{ + PixelType *psrc = (PixelType *)pcharsrc; + PixelType *pdstBase; /* start of dst bitmap */ + int widthDst; /* width of bitmap in words */ + int sizeDst; + int depthDst; + int sizeSrc = 0; + register BoxPtr pbox, pboxLast, pboxTest; + register DDXPointPtr pptLast; + int alu; + RegionPtr prgnDst; + int xStart, xEnd; + int yMax; + + alu = pGC->alu; + prgnDst = pGC->pCompositeClip; + + pptLast = ppt + nspans; + + yMax = pDrawable->y + (int) pDrawable->height; + afbGetPixelWidthSizeDepthAndPointer(pDrawable, widthDst, sizeDst, depthDst, + pdstBase); + + pbox = REGION_RECTS(prgnDst); + pboxLast = pbox + REGION_NUM_RECTS(prgnDst); + + if(fSorted) { + /* scan lines sorted in ascending order. Because they are sorted, we + * don't have to check each scanline against each clip box. We can be + * sure that this scanline only has to be clipped to boxes at or after the + * beginning of this y-band + */ + pboxTest = pbox; + while(ppt < pptLast) { + pbox = pboxTest; + if(ppt->y >= yMax) + break; + while(pbox < pboxLast) { + if(pbox->y1 > ppt->y) { + /* scanline is before clip box */ + break; + } else if(pbox->y2 <= ppt->y) { + /* clip box is before scanline */ + pboxTest = ++pbox; + continue; + } else if(pbox->x1 > ppt->x + *pwidth) { + /* clip box is to right of scanline */ + break; + } else if(pbox->x2 <= ppt->x) { + /* scanline is to right of clip box */ + pbox++; + continue; + } + + /* at least some of the scanline is in the current clip box */ + xStart = max(pbox->x1, ppt->x); + xEnd = min(ppt->x + *pwidth, pbox->x2); + sizeSrc = PixmapWidthInPadUnits(*pwidth, 1); + afbSetScanline(ppt->y, ppt->x, xStart, xEnd, psrc, alu, pdstBase, + widthDst, sizeDst, depthDst, sizeSrc); + if(ppt->x + *pwidth <= pbox->x2) { + /* End of the line, as it were */ + break; + } else + pbox++; + } + /* We've tried this line against every box; it must be outside them + * all. move on to the next point */ + ppt++; + psrc += sizeSrc * depthDst; + pwidth++; + } + } else { + /* scan lines not sorted. We must clip each line against all the boxes */ + while(ppt < pptLast) { + if(ppt->y >= 0 && ppt->y < yMax) { + for(pbox = REGION_RECTS(prgnDst); pbox< pboxLast; pbox++) { + if(pbox->y1 > ppt->y) { + /* rest of clip region is above this scanline, + * skip it */ + break; + } + if(pbox->y2 <= ppt->y) { + /* clip box is below scanline */ + pbox++; + break; + } + if(pbox->x1 <= ppt->x + *pwidth && + pbox->x2 > ppt->x) { + xStart = max(pbox->x1, ppt->x); + xEnd = min(pbox->x2, ppt->x + *pwidth); + sizeSrc = PixmapWidthInPadUnits(*pwidth, 1); + afbSetScanline(ppt->y, ppt->x, xStart, xEnd, psrc, alu, + pdstBase, widthDst, sizeDst, depthDst, + sizeSrc); + } + + } + } + psrc += sizeSrc * depthDst; + ppt++; + pwidth++; + } + } +} diff --git a/xorg-server-1.4/afb/afbtegblt.c b/xorg-server-1.4/afb/afbtegblt.c new file mode 100644 index 0000000..ba889cb --- /dev/null +++ b/xorg-server-1.4/afb/afbtegblt.c @@ -0,0 +1,586 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include "afb.h" +#include +#include "dixfontstr.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "maskbits.h" + +/* + this works for fonts with glyphs <= PPW bits wide. + + This should be called only with a terminal-emulator font; +this means that the FIXED_METRICS flag is set, and that +glyphbounds == charbounds. + + in theory, this goes faster; even if it doesn't, it reduces the +flicker caused by writing a string over itself with image text (since +the background gets repainted per character instead of per string.) +this seems to be important for some converted X10 applications. + + Image text looks at the bits in the glyph and the fg and bg in the +GC. it paints a rectangle, as defined in the protocol dcoument, +and the paints the characters. + +*/ + +#if defined(NO_3_60_CG4) && defined(FASTPUTBITS) && defined(FASTGETBITS) +#define FASTCHARS +#endif + +/* + * this macro "knows" that only characters <= 8 bits wide will + * fit this case (which is why it is independent of GLYPHPADBYTES) + */ + +#if (BITMAP_BIT_ORDER == MSBFirst) && (GLYPHPADBYTES != 4) +#if GLYPHPADBYTES == 1 +#define ShiftAmnt 24 +#else +#define ShiftAmnt 16 +#endif + +/* + * Note: for BITMAP_BIT_ORDER != IMAGE_BYTE_ORDER, SCRRIGHT() evaluates its + * first argument more than once. Thus the imbedded char++ have to be moved. + * (DHD) + */ +#if BITMAP_BIT_ORDER == IMAGE_BYTE_ORDER +#if PPW == 32 +#define GetBits4 c = (*char1++ << ShiftAmnt) | \ + SCRRIGHT (*char2++ << ShiftAmnt, xoff2) | \ + SCRRIGHT (*char3++ << ShiftAmnt, xoff3) | \ + SCRRIGHT (*char4++ << ShiftAmnt, xoff4); +#else /* PPW */ +#define GetBits4 c = ((unsigned long)(*char1++ << ShiftAmnt) << 32 ) | \ + (SCRRIGHT (*char2++ << ShiftAmnt, xoff2) << 32 ) | \ + (SCRRIGHT (*char3++ << ShiftAmnt, xoff3) << 32 ) | \ + (SCRRIGHT (*char4++ << ShiftAmnt, xoff4) << 32 ) | \ + (*char5++ << ShiftAmnt) | \ + SCRRIGHT (*char6++ << ShiftAmnt, xoff6) | \ + SCRRIGHT (*char7++ << ShiftAmnt, xoff7) | \ + SCRRIGHT (*char8++ << ShiftAmnt, xoff8); +#endif /* PPW */ +#else /* BITMAP_BIT_ORDER != IMAGE_BYTE_ORDER */ +#if PPW == 32 +#define GetBits4 c = (*char1++ << ShiftAmnt) | \ + SCRRIGHT (*char2 << ShiftAmnt, xoff2) | \ + SCRRIGHT (*char3 << ShiftAmnt, xoff3) | \ + SCRRIGHT (*char4 << ShiftAmnt, xoff4); \ + char2++; char3++; char4++; +#else /* PPW == 64 */ +#define GetBits4 c = ((unsigned long)(*char1++ << ShiftAmnt) << 32 ) | \ + (SCRRIGHT (*char2 << ShiftAmnt, xoff2) << 32 ) | \ + (SCRRIGHT (*char3 << ShiftAmnt, xoff3) << 32 ) | \ + (SCRRIGHT (*char4 << ShiftAmnt, xoff4) << 32 ) | \ + (*char5++ << ShiftAmnt) | \ + SCRRIGHT (*char6 << ShiftAmnt, xoff6) | \ + SCRRIGHT (*char7 << ShiftAmnt, xoff7) | \ + SCRRIGHT (*char8 << ShiftAmnt, xoff8); \ + char2++; char3++; char4++; char6++; char7++; char8++; +#endif /* PPW */ +#endif /* BITMAP_BIT_ORDER == IMAGE_BYTE_ORDER */ + +#else /* (BITMAP_BIT_ORDER != MSBFirst) || (GLYPHPADBYTES == 4) */ + +#if BITMAP_BIT_ORDER == IMAGE_BYTE_ORDER +#if PPW == 32 +#define GetBits4 c = *char1++ | \ + SCRRIGHT (*char2++, xoff2) | \ + SCRRIGHT (*char3++, xoff3) | \ + SCRRIGHT (*char4++, xoff4); +#else /* PPW == 64 */ +#define GetBits4 c = (unsigned long)(((*char1++) << 64 ) | \ + (SCRRIGHT (*char2++, xoff2) << 64 ) | \ + (SCRRIGHT (*char3++, xoff3) << 64 ) | \ + (SCRRIGHT (*char4++, xoff4) << 64 ) | \ + SCRRIGHT (*char5++, xoff5) | \ + SCRRIGHT (*char6++, xoff6) | \ + SCRRIGHT (*char7++, xoff7) | \ + SCRRIGHT (*char8++, xoff8)); +#endif /* PPW */ +#else /* BITMAP_BIT_ORDER != IMAGE_BYTE_ORDER */ +#if PPW == 32 +#define GetBits4 c = *char1++ | \ + SCRRIGHT (*char2, xoff2) | \ + SCRRIGHT (*char3, xoff3) | \ + SCRRIGHT (*char4, xoff4); \ + char2++; char3++; char4++; +#else /* PPW == 64 */ +#define GetBits4 c = (unsigned long)(((*char1++) << 64 ) | \ + (SCRRIGHT (*char2, xoff2) << 64 ) | \ + (SCRRIGHT (*char3, xoff3) << 64 ) | \ + (SCRRIGHT (*char4, xoff4) << 64 ) | \ + SCRRIGHT (*char5, xoff5) | \ + SCRRIGHT (*char6, xoff6) | \ + SCRRIGHT (*char7, xoff7) | \ + SCRRIGHT (*char8, xoff8)); \ + char2++; char3++; char4++; \ + char5++; char6++; char7++; char8++; +#endif /* PPW */ +#endif /* BITMAP_BIT_ORDER == IMAGE_BYTE_ORDER */ + +#endif /* BITMAP_BIT_ORDER && GLYPHPADBYTES */ + + +#if GLYPHPADBYTES == 1 +typedef unsigned char *glyphPointer; +#define USE_LEFTBITS +#endif + +#if GLYPHPADBYTES == 2 +typedef unsigned short *glyphPointer; +#define USE_LEFTBITS +#endif + +#if GLYPHPADBYTES == 4 +typedef unsigned int *glyphPointer; +#endif + +#ifdef USE_LEFTBITS +#define GetBits1 getleftbits (char1, widthGlyph, c); \ + c &= glyphMask; \ + char1 = (glyphPointer) (((char *) char1) + glyphBytes); +#else +#define GetBits1 c = *char1++; +#endif + +void +afbTEGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) + DrawablePtr pDrawable; + GC *pGC; + int x, y; + unsigned int nglyph; + CharInfoPtr *ppci; /* array of character info */ + pointer pglyphBase; /* start of array of glyphs */ +{ + FontPtr pfont = pGC->font; + int widthDst; + PixelType *pdstBase; /* pointer to longword with top row + of current glyph */ + + int h; /* height of glyph and char */ + register int xpos; /* current x */ + int ypos; /* current y */ + int widthGlyph; + + int hTmp; /* counter for height */ + register PixelType startmask, endmask; + int nfirst; /* used if glyphs spans a longword boundary */ + BoxRec bbox; /* for clipping */ + int widthGlyphs; + int sizeDst; + int depthDst; + PixelType *saveDst; + register PixelType *dst; + register PixelType c; + register int d; + register int xoff1, xoff2, xoff3, xoff4; + register glyphPointer char1, char2, char3, char4; + glyphPointer schar1, schar2, schar3, schar4; +#if PPW == 64 + register int xoff5, xoff6, xoff7, xoff8; + register glyphPointer char5, char6, char7, char8; + glyphPointer schar5, schar6, schar7, schar8; +#endif /* PPW */ + + unsigned char *rrops; +#ifdef USE_LEFTBITS + register PixelType glyphMask; + register PixelType tmpSrc; + register int glyphBytes; +#endif + + afbGetPixelWidthSizeDepthAndPointer(pDrawable, widthDst, sizeDst, depthDst, + pdstBase); + + xpos = x + pDrawable->x; + ypos = y + pDrawable->y; + + widthGlyph = FONTMAXBOUNDS(pfont,characterWidth); + h = FONTASCENT(pfont) + FONTDESCENT(pfont); + + xpos += FONTMAXBOUNDS(pfont,leftSideBearing); + ypos -= FONTASCENT(pfont); + + rrops = ((afbPrivGCPtr) pGC->devPrivates[afbGCPrivateIndex].ptr)->rropOS; + + bbox.x1 = xpos; + bbox.x2 = xpos + (widthGlyph * nglyph); + bbox.y1 = ypos; + bbox.y2 = ypos + h; + + switch (RECT_IN_REGION(pGC->pScreen, pGC->pCompositeClip, &bbox)) { + case rgnPART: + /* this is the WRONG thing to do, but it works. + calling the non-terminal text is easy, but slow, given + what we know about the font. + + the right thing to do is something like: + for each clip rectangle + compute at which row the glyph starts to be in it, + and at which row the glyph ceases to be in it + compute which is the first glyph inside the left + edge, and the last one inside the right edge + draw a fractional first glyph, using only + the rows we know are in + draw all the whole glyphs, using the appropriate rows + draw any pieces of the last glyph, using the right rows + + this way, the code would take advantage of knowing that + all glyphs are the same height and don't overlap. + + one day... + */ + afbImageGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); + case rgnOUT: + return; + } + pdstBase = afbScanlineDeltaNoBankSwitch(pdstBase, ypos, widthDst); + widthGlyphs = widthGlyph * PGSZB; + +#ifdef USE_LEFTBITS + glyphMask = mfbGetendtab(widthGlyph); + glyphBytes = GLYPHWIDTHBYTESPADDED(*ppci); +#endif + + if (nglyph >= PGSZB && widthGlyphs <= PPW) { + while (nglyph >= PGSZB) { + nglyph -= PGSZB; + xoff1 = xpos & PIM; + xoff2 = widthGlyph; + xoff3 = xoff2 + widthGlyph; + xoff4 = xoff3 + widthGlyph; +#if PPW == 64 + xoff5 = xoff4 + widthGlyph; + xoff6 = xoff5 + widthGlyph; + xoff7 = xoff6 + widthGlyph; + xoff8 = xoff7 + widthGlyph; +#endif /* PPW */ + schar1 = (glyphPointer)FONTGLYPHBITS(pglyphBase,(*ppci++)); + schar2 = (glyphPointer)FONTGLYPHBITS(pglyphBase,(*ppci++)); + schar3 = (glyphPointer)FONTGLYPHBITS(pglyphBase,(*ppci++)); + schar4 = (glyphPointer)FONTGLYPHBITS(pglyphBase,(*ppci++)); +#if PPW == 64 + schar5 = (glyphPointer)FONTGLYPHBITS(pglyphBase,(*ppci++)); + schar6 = (glyphPointer)FONTGLYPHBITS(pglyphBase,(*ppci++)); + schar7 = (glyphPointer)FONTGLYPHBITS(pglyphBase,(*ppci++)); + schar8 = (glyphPointer)FONTGLYPHBITS(pglyphBase,(*ppci++)); +#endif /* PPW */ + + hTmp = h; + saveDst = afbScanlineOffset(pdstBase, (xpos >> PWSH)); /* switch now */ + +#ifndef FASTCHARS + if (xoff1 + widthGlyphs <= PPW) { + maskpartialbits (xoff1, widthGlyphs, startmask); +#endif + for (d = 0; d < depthDst; d++) { + hTmp = h; + dst = saveDst; + saveDst += sizeDst; /* @@@ NEXT PLANE @@@ */ + + switch (rrops[d]) { + case RROP_BLACK: + while (hTmp--) { +#ifdef FASTCHARS + FASTPUTBITS(0, xoff1, widthGlyphs, dst); +#else + *(dst) &= ~startmask; +#endif + afbScanlineInc(dst, widthDst); + } + break; + case RROP_WHITE: + while (hTmp--) { +#ifdef FASTCHARS + FASTPUTBITS(~0, xoff1, widthGlyphs, dst); +#else + *(dst) |= startmask; +#endif + afbScanlineInc(dst, widthDst); + } + break; + case RROP_INVERT: + char1 = schar1; + char2 = schar2; + char3 = schar3; + char4 = schar4; + /* XXX */ + while (hTmp--) { + GetBits4 +#ifdef FASTCHARS +# if BITMAP_BIT_ORDER == MSBFirst + c >>= PPW - widthGlyphs; +# endif + FASTPUTBITS(~c, xoff1, widthGlyphs, dst); +#else + *(dst) = ((*dst) & ~startmask) | (~SCRRIGHT(c, xoff1) & startmask); +#endif + afbScanlineInc(dst, widthDst); + } + break; + case RROP_COPY: + char1 = schar1; + char2 = schar2; + char3 = schar3; + char4 = schar4; + + while (hTmp--) { + GetBits4 +#ifdef FASTCHARS +# if BITMAP_BIT_ORDER == MSBFirst + c >>= PPW - widthGlyphs; +#endif + FASTPUTBITS(c, xoff1, widthGlyphs, dst); +#else + *(dst) = ((*dst) & ~startmask) | (SCRRIGHT(c, xoff1) & startmask); +#endif + afbScanlineInc(dst, widthDst); + } + break; + case RROP_NOP: + break; + } /* switch (rrops[d]) */ + } /* for (d = ... ) */ +#ifndef FASTCHARS + } else { + maskPPWbits (xoff1, widthGlyphs, startmask, endmask); + nfirst = PPW - xoff1; + for (d = 0; d < depthDst; d++) { + hTmp = h; + dst = saveDst; + saveDst += sizeDst; /* @@@ NEXT PLANE @@@ */ + + switch (rrops[d]) { + case RROP_BLACK: + while (hTmp--) { + dst[0] &= ~startmask; + dst[1] &= ~endmask; + afbScanlineInc(dst, widthDst); + } + break; + case RROP_WHITE: + while (hTmp--) { + dst[0] |= startmask; + dst[1] |= endmask; + afbScanlineInc(dst, widthDst); + } + break; + case RROP_INVERT: + char1 = schar1; + char2 = schar2; + char3 = schar3; + char4 = schar4; + + while (hTmp--) { + GetBits4 + dst[0] = (dst[0] & ~startmask) | (~SCRRIGHT(c,xoff1) & startmask); + dst[1] = (dst[1] & ~endmask) | (~SCRLEFT(c,nfirst) & endmask); + afbScanlineInc(dst, widthDst); + } + break; + case RROP_COPY: + char1 = schar1; + char2 = schar2; + char3 = schar3; + char4 = schar4; + + while (hTmp--) { + GetBits4 + dst[0] = (dst[0] & ~startmask) | (SCRRIGHT(c,xoff1) & startmask); + dst[1] = (dst[1] & ~endmask) | (SCRLEFT(c,nfirst) & endmask); + afbScanlineInc(dst, widthDst); + } + break; + + case RROP_NOP: + break; + } /* switch */ + } /* for (d = ... ) */ + } +#endif + xpos += widthGlyphs; + } + } + + while(nglyph--) { + xoff1 = xpos & PIM; + schar1 = (glyphPointer) FONTGLYPHBITS(pglyphBase,(*ppci++)); + hTmp = h; + saveDst = afbScanlineOffset(pdstBase, (xpos >> PWSH)); + + if (xoff1 + widthGlyph <= PPW) { + maskpartialbits (xoff1, widthGlyph, startmask); + + for (d = 0; d < depthDst; d++) { + hTmp = h; + dst = saveDst; + saveDst += sizeDst; /* @@@ NEXT PLANE @@@ */ + char1 = schar1; + + switch (rrops[d]) { + case RROP_BLACK: + while (hTmp--) { + (*dst) &= ~startmask; + afbScanlineInc(dst, widthDst); + } + break; + case RROP_WHITE: + while (hTmp--) { + (*dst) |= startmask; + afbScanlineInc(dst, widthDst); + } + break; + case RROP_INVERT: + while (hTmp--) { +#ifdef FASTCHARS +#ifdef USE_LEFTBITS + FASTGETBITS (char1,0,widthGlyph,c); + char1 = (glyphPointer) (((char *) char1) + glyphBytes); +#else + c = *char1++; +#if BITMAP_BIT_ORDER == MSBFirst + c >>= PPW - widthGlyph; +#endif +#endif + FASTPUTBITS (~c,xoff1,widthGlyph,dst); +#else + GetBits1 + (*dst) = ((*dst) & ~startmask) | (~SCRRIGHT(c, xoff1) & startmask); +#endif + afbScanlineInc(dst, widthDst); + } + break; + case RROP_COPY: + while (hTmp--) { +#ifdef FASTCHARS +#ifdef USE_LEFTBITS + FASTGETBITS (char1,0,widthGlyph,c); + char1 = (glyphPointer) (((char *) char1) + glyphBytes); +#else + c = *char1++; +#if BITMAP_BIT_ORDER == MSBFirst + c >>= PPW - widthGlyph; +#endif +#endif + FASTPUTBITS (c,xoff1,widthGlyph,dst); +#else + GetBits1 + (*dst) = ((*dst) & ~startmask) | (SCRRIGHT(c, xoff1) & startmask); +#endif + afbScanlineInc(dst, widthDst); + } + break; + case RROP_NOP: + break; + } /* switch */ + } /* for (d = ...) */ + } else { + maskPPWbits (xoff1, widthGlyph, startmask, endmask); + nfirst = PPW - xoff1; + + for (d = 0; d < depthDst; d++) { + hTmp = h; + dst = saveDst; + saveDst += sizeDst; /* @@@ NEXT PLANE @@@ */ + char1 = schar1; + + switch (rrops[d]) { + case RROP_BLACK: + while (hTmp--) { + dst[0] &= ~startmask; + dst[1] &= ~endmask; + afbScanlineInc(dst, widthDst); + } + break; + case RROP_WHITE: + while (hTmp--) { + dst[0] |= startmask; + dst[1] |= endmask; + afbScanlineInc(dst, widthDst); + } + break; + case RROP_INVERT: + while (hTmp--) { + GetBits1 + dst[0] = (dst[0] & ~startmask) | (~SCRRIGHT(c,xoff1) & startmask); + dst[1] = (dst[1] & ~endmask) | (~SCRLEFT(c,nfirst) & endmask); + afbScanlineInc(dst, widthDst); + } + break; + case RROP_COPY: + while (hTmp--) { + GetBits1 + dst[0] = (dst[0] & ~startmask) | (SCRRIGHT(c,xoff1) & startmask); + dst[1] = (dst[1] & ~endmask) | (SCRLEFT(c,nfirst) & endmask); + afbScanlineInc(dst, widthDst); + } + break; + case RROP_NOP: + break; + } /* switch */ + } /* for (d = ...) */ + } + + xpos += widthGlyph; + } +} diff --git a/xorg-server-1.4/afb/afbtile.c b/xorg-server-1.4/afb/afbtile.c new file mode 100644 index 0000000..8fcb9cd --- /dev/null +++ b/xorg-server-1.4/afb/afbtile.c @@ -0,0 +1,857 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "windowstr.h" +#include "regionstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" + +#include "afb.h" + +#include "maskbits.h" + +#include "mergerop.h" +/* + + the boxes are already translated. + + NOTE: + iy = ++iy < tileHeight ? iy : 0 +is equivalent to iy%= tileheight, and saves a division. +*/ + +/* + tile area with a PPW bit wide pixmap +*/ +void +MROP_NAME(afbTileAreaPPW)(pDraw, nbox, pbox, alu, ptile, planemask) + DrawablePtr pDraw; + int nbox; + BoxPtr pbox; + int alu; + PixmapPtr ptile; + unsigned long planemask; +{ + register PixelType *psrc; + /* pointer to bits in tile, if needed */ + int tileHeight; /* height of the tile */ + register PixelType srcpix; + int nlwidth; /* width in longwords of the drawable */ + int w; /* width of current box */ + MROP_DECLARE_REG () + register int h; /* height of current box */ + register int nlw; /* loop version of nlwMiddle */ + register PixelType *p; /* pointer to bits we're writing */ + int sizeDst; + int depthDst; + register int d; + PixelType startmask; + PixelType endmask; /* masks for reggedy bits at either end of line */ + int nlwMiddle; /* number of longwords between sides of boxes */ + int nlwExtra; /* to get from right of box to left of next span */ + register int iy; /* index of current scanline in tile */ + PixelType *pbits; /* pointer to start of drawable */ + PixelType *saveP; + PixelType *pSaveSrc; + int saveH; + int saveIY; + + afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, + pbits); + + MROP_INITIALIZE(alu,~0) + + tileHeight = ptile->drawable.height; + pSaveSrc = (PixelType *)(ptile->devPrivate.ptr); + + while (nbox--) { + w = pbox->x2 - pbox->x1; + saveH = pbox->y2 - pbox->y1; + saveIY = pbox->y1 % tileHeight; + saveP = afbScanline(pbits, pbox->x1, pbox->y1, nlwidth); + psrc = pSaveSrc; + + if (((pbox->x1 & PIM) + w) < PPW) { + maskpartialbits(pbox->x1, w, startmask); + nlwExtra = nlwidth; + for (d = 0; d < depthDst; d++, saveP += sizeDst, psrc += tileHeight) { /* @@@ NEXT PLANE @@@ */ + if (!(planemask & (1 << d))) + continue; + + p = saveP; + h = saveH; + iy = saveIY; + + while (h--) { + srcpix = psrc[iy]; + iy++; + if (iy == tileHeight) + iy = 0; + *p = MROP_MASK(srcpix,*p,startmask); + afbScanlineInc(p, nlwExtra); + } + } + } else { + maskbits(pbox->x1, w, startmask, endmask, nlwMiddle); + + for (d = 0; d < depthDst; d++, saveP += sizeDst, psrc += tileHeight) { /* @@@ NEXT PLANE @@@ */ + if (!(planemask & (1 << d))) + continue; + + p = saveP; + h = saveH; + iy = saveIY; + nlwExtra = nlwidth - nlwMiddle; + + if (startmask && endmask) { + nlwExtra -= 1; + while (h--) { + srcpix = psrc[iy]; + iy++; + if (iy == tileHeight) + iy = 0; + nlw = nlwMiddle; + *p = MROP_MASK (srcpix,*p,startmask); + p++; + while (nlw--) { + *p = MROP_SOLID(srcpix,*p); + p++; + } + + *p = MROP_MASK(srcpix,*p,endmask); + afbScanlineInc(p, nlwExtra); + } + } else if (startmask && !endmask) { + nlwExtra -= 1; + while (h--) { + srcpix = psrc[iy]; + iy++; + if (iy == tileHeight) + iy = 0; + nlw = nlwMiddle; + *p = MROP_MASK(srcpix,*p,startmask); + p++; + while (nlw--) { + *p = MROP_SOLID(srcpix,*p); + p++; + } + afbScanlineInc(p, nlwExtra); + } + } else if (!startmask && endmask) { + while (h--) { + srcpix = psrc[iy]; + iy++; + if (iy == tileHeight) + iy = 0; + nlw = nlwMiddle; + while (nlw--) { + *p = MROP_SOLID(srcpix,*p); + p++; + } + + *p = MROP_MASK(srcpix,*p,endmask); + afbScanlineInc(p, nlwExtra); + } + } else { /* no ragged bits at either end */ + while (h--) { + srcpix = psrc[iy]; + iy++; + if (iy == tileHeight) + iy = 0; + nlw = nlwMiddle; + while (nlw--) { + *p = MROP_SOLID (srcpix,*p); + p++; + } + afbScanlineInc(p, nlwExtra); + } + } + } /* for (d = ...) */ + } + pbox++; + } +} + +void +MROP_NAME(afbTileArea)(pDraw, nbox, pbox, alu, pTile, xOff, yOff, planemask) + DrawablePtr pDraw; + int nbox; + BoxPtr pbox; + int alu; + PixmapPtr pTile; + int xOff; + int yOff; + unsigned long planemask; +{ + register PixelType *psrc; + /* pointer to bits in tile, if needed */ + int nlwidth; /* width in longwords of the drawable */ + MROP_DECLARE_REG () + register int h; /* height of current box */ + register PixelType *pdst; /* pointer to bits we're writing */ + register PixelType tmpsrc; +#if (MROP) != Mcopy + register PixelType tmpdst; +#endif + int sizeDst; + int depthDst; + int sizeTile; + int tileLine; + int iline; + int w, width, x, xSrc, ySrc, srcStartOver, nend; + int tlwidth, rem, tileWidth, tileHeight, endinc; + int saveW; + PixelType *psrcT; + int d; + int nstart; + PixelType startmask; + PixelType endmask; /* masks for reggedy bits at either end of line */ + int nlMiddle; /* number of longwords between sides of boxes */ + int iy; + PixelType *pBase; /* pointer to start of drawable */ + PixelType *saveP; + PixelType *pStartDst; + PixelType *pStartTile; + int saveH; + + afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, + pBase); + + MROP_INITIALIZE(alu,~0) + + tileHeight = pTile->drawable.height; + tileWidth = pTile->drawable.width; + tlwidth = pTile->devKind / sizeof (PixelType); + sizeTile = tlwidth * tileHeight; + + xSrc = pDraw->x + ((xOff % tileWidth) - tileWidth); + ySrc = pDraw->y + ((yOff % tileHeight) - tileHeight); + + while (nbox--) { + saveW = pbox->x2 - pbox->x1; + iline = (pbox->y1 - ySrc) % tileHeight; + psrcT = (PixelType *) pTile->devPrivate.ptr; + tileLine = iline * tlwidth; + saveH = pbox->y2 - pbox->y1; + saveP = afbScanline(pBase, pbox->x1, pbox->y1, nlwidth); + + for (d = 0; d < depthDst; d++, psrcT += sizeTile, saveP += sizeDst) { /* @@@ NEXT PLANE @@@ */ + if (!(planemask & (1 << d))) + continue; + + h = saveH; + pStartDst = saveP; + pStartTile = psrcT + tileLine; + iy = iline; + + while (h--) { + x = pbox->x1; + width = saveW; + pdst = pStartDst; + while(width > 0) { + psrc = pStartTile; + w = min(tileWidth, width); + if((rem = (x - xSrc) % tileWidth) != 0) { + /* if we're in the middle of the tile, get + as many bits as will finish the span, or + as many as will get to the left edge of the tile, + or a longword worth, starting at the appropriate + offset in the tile. + */ + w = min(min(tileWidth - rem, width), BITMAP_SCANLINE_PAD); + endinc = rem / BITMAP_SCANLINE_PAD; + + getbits ((psrc+endinc), (rem&PIM), w, tmpsrc); +#if (MROP) != Mcopy + getbits (pdst, (x & PIM), w, tmpdst); + tmpsrc = DoMergeRop (tmpsrc, tmpdst); +#endif + putbits (tmpsrc, (x & PIM), w, pdst); + + if((x & PIM) + w >= PPW) + pdst++; + } else if(((x & PIM) + w) < PPW) { + /* doing < PPW bits is easy, and worth special-casing */ + tmpsrc = *psrc; +#if (MROP) != Mcopy + getbits (pdst, (x & PIM), w, tmpdst); + tmpsrc = DoMergeRop (tmpsrc, tmpdst); +#endif + putbits (tmpsrc, (x & PIM), w, pdst); + } else { + /* start at the left edge of the tile, + and put down as much as we can + */ + maskbits(x, w, startmask, endmask, nlMiddle); + + if (startmask) + nstart = PPW - (x & PIM); + else + nstart = 0; + if (endmask) + nend = (x + w) & PIM; + else + nend = 0; + + srcStartOver = nstart > PLST; + + if(startmask) { + tmpsrc = *psrc; +#if (MROP) != Mcopy + getbits (pdst, (x & PIM), nstart, tmpdst); + tmpsrc = DoMergeRop (tmpsrc, tmpdst); +#endif + putbits (tmpsrc, (x & PIM), nstart, pdst); + pdst++; + if(srcStartOver) + psrc++; + } + + while(nlMiddle--) { + getbits (psrc, nstart, PPW, tmpsrc); +#if (MROP) != Mcopy + tmpdst = *pdst; + tmpsrc = DoMergeRop (tmpsrc, tmpdst); +#endif + *pdst++ = tmpsrc; + /*putbits (tmpsrc, 0, PPW, pdst); + pdst++;*/ + psrc++; + } + + if(endmask) { + getbits (psrc, nstart, nend, tmpsrc); +#if (MROP) != Mcopy + tmpdst = *pdst; + tmpsrc = DoMergeRop (tmpsrc, tmpdst); +#endif + putbits (tmpsrc, 0, nend, pdst); + } + } + x += w; + width -= w; + } /* while (width > 0) */ + + pStartDst += nlwidth; + if (++iy >= tileHeight) { + iy = 0; + pStartTile = psrcT; + } else + pStartTile += tlwidth; + + } /* while (h) */ + } /* for (d = ... ) */ + pbox++; + } /* for each box */ +} + +void +MROP_NAME(afbOpaqueStippleAreaPPW)(pDraw, nbox, pbox, alu, ptile, + rropsOS, planemask) + DrawablePtr pDraw; + int nbox; + BoxPtr pbox; + int alu; + PixmapPtr ptile; + register unsigned char *rropsOS; + unsigned long planemask; +{ + register PixelType *psrc; + /* pointer to bits in tile, if needed */ + int tileHeight; /* height of the tile */ + register PixelType srcpix = 0; + int nlwidth; /* width in longwords of the drawable */ + int w; /* width of current box */ + MROP_DECLARE_REG () + register int h; /* height of current box */ + register int nlw; /* loop version of nlwMiddle */ + register PixelType *p; /* pointer to bits we're writing */ + int sizeDst; + int depthDst; + register int d; + PixelType startmask; + PixelType endmask; /* masks for reggedy bits at either end of line */ + int nlwMiddle; /* number of longwords between sides of boxes */ + int nlwExtra; /* to get from right of box to left of next span */ + register int iy; /* index of current scanline in tile */ + PixelType *pbits; /* pointer to start of drawable */ + PixelType *saveP; + int saveH; + int saveIY; + + afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, + pbits); + + MROP_INITIALIZE(alu,~0) + + tileHeight = ptile->drawable.height; + psrc = (PixelType *)(ptile->devPrivate.ptr); + + while (nbox--) { + w = pbox->x2 - pbox->x1; + saveH = pbox->y2 - pbox->y1; + saveIY = pbox->y1 % tileHeight; + saveP = afbScanline(pbits, pbox->x1, pbox->y1, nlwidth); + + if ( ((pbox->x1 & PIM) + w) < PPW) { + maskpartialbits(pbox->x1, w, startmask); + nlwExtra = nlwidth; + for (d = 0; d < depthDst; d++, saveP += sizeDst) { /* @@@ NEXT PLANE @@@ */ + if (!(planemask & (1 << d))) + continue; + + p = saveP; + h = saveH; + iy = saveIY; + + while (h--) { + switch (rropsOS[d]) { + case RROP_BLACK: + srcpix = 0; + break; + case RROP_WHITE: + srcpix = ~0; + break; + case RROP_COPY: + srcpix = psrc[iy]; + break; + case RROP_INVERT: + srcpix = ~psrc[iy]; + break; + } + iy++; + if (iy == tileHeight) + iy = 0; + *p = MROP_MASK(srcpix,*p,startmask); + afbScanlineInc(p, nlwExtra); + } + } + } else { + maskbits(pbox->x1, w, startmask, endmask, nlwMiddle); + + for (d = 0; d < depthDst; d++, saveP += sizeDst) { /* @@@ NEXT PLANE @@@ */ + if (!(planemask & (1 << d))) + continue; + + p = saveP; + h = saveH; + iy = saveIY; + nlwExtra = nlwidth - nlwMiddle; + + if (startmask && endmask) { + nlwExtra -= 1; + while (h--) { + switch (rropsOS[d]) { + case RROP_BLACK: + srcpix = 0; + break; + case RROP_WHITE: + srcpix = ~0; + break; + case RROP_COPY: + srcpix = psrc[iy]; + break; + case RROP_INVERT: + srcpix = ~psrc[iy]; + break; + } + iy++; + if (iy == tileHeight) + iy = 0; + nlw = nlwMiddle; + *p = MROP_MASK (srcpix,*p,startmask); + p++; + while (nlw--) { + *p = MROP_SOLID(srcpix,*p); + p++; + } + + *p = MROP_MASK(srcpix,*p,endmask); + afbScanlineInc(p, nlwExtra); + } + } else if (startmask && !endmask) { + nlwExtra -= 1; + while (h--) { + switch (rropsOS[d]) { + case RROP_BLACK: + srcpix = 0; + break; + case RROP_WHITE: + srcpix = ~0; + break; + case RROP_COPY: + srcpix = psrc[iy]; + break; + case RROP_INVERT: + srcpix = ~psrc[iy]; + break; + } + iy++; + if (iy == tileHeight) + iy = 0; + nlw = nlwMiddle; + *p = MROP_MASK(srcpix,*p,startmask); + p++; + while (nlw--) { + *p = MROP_SOLID(srcpix,*p); + p++; + } + afbScanlineInc(p, nlwExtra); + } + } else if (!startmask && endmask) { + while (h--) { + switch (rropsOS[d]) { + case RROP_BLACK: + srcpix = 0; + break; + case RROP_WHITE: + srcpix = ~0; + break; + case RROP_COPY: + srcpix = psrc[iy]; + break; + case RROP_INVERT: + srcpix = ~psrc[iy]; + break; + } + iy++; + if (iy == tileHeight) + iy = 0; + nlw = nlwMiddle; + while (nlw--) { + *p = MROP_SOLID(srcpix,*p); + p++; + } + + *p = MROP_MASK(srcpix,*p,endmask); + afbScanlineInc(p, nlwExtra); + } + } else { /* no ragged bits at either end */ + while (h--) { + switch (rropsOS[d]) { + case RROP_BLACK: + srcpix = 0; + break; + case RROP_WHITE: + srcpix = ~0; + break; + case RROP_COPY: + srcpix = psrc[iy]; + break; + case RROP_INVERT: + srcpix = ~psrc[iy]; + break; + } + iy++; + if (iy == tileHeight) + iy = 0; + nlw = nlwMiddle; + while (nlw--) { + *p = MROP_SOLID (srcpix,*p); + p++; + } + afbScanlineInc(p, nlwExtra); + } + } + } /* for (d = ...) */ + } + pbox++; + } +} + +void +MROP_NAME(afbOpaqueStippleArea)(pDraw, nbox, pbox, alu, pTile, xOff, yOff, + rropsOS, planemask) + DrawablePtr pDraw; + int nbox; + BoxPtr pbox; + int alu; + PixmapPtr pTile; + int xOff; + int yOff; + register unsigned char *rropsOS; + unsigned long planemask; +{ + register PixelType *psrc; + /* pointer to bits in tile, if needed */ + int nlwidth; /* width in longwords of the drawable */ + MROP_DECLARE_REG () + register int h; /* height of current box */ + register PixelType *pdst; /* pointer to bits we're writing */ + register PixelType tmpsrc = 0; +#if (MROP) != Mcopy + register PixelType tmpdst; +#endif + int sizeDst; + int depthDst; + int tileLine; + int iline; + int w, width, x, xSrc, ySrc, srcStartOver, nend; + int tlwidth, rem, tileWidth, tileHeight, endinc; + int saveW; + PixelType *psrcT; + int d; + int nstart; + PixelType startmask; + PixelType endmask; /* masks for reggedy bits at either end of line */ + int nlMiddle; /* number of longwords between sides of boxes */ + int iy; + PixelType *pBase; /* pointer to start of drawable */ + PixelType *saveP; + PixelType *pStartDst; + PixelType *pStartTile; + int saveH; + + afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, + pBase); + + MROP_INITIALIZE(alu,~0) + + tileHeight = pTile->drawable.height; + tileWidth = pTile->drawable.width; + tlwidth = pTile->devKind / sizeof (PixelType); + + xSrc = pDraw->x + ((xOff % tileWidth) - tileWidth); + ySrc = pDraw->y + ((yOff % tileHeight) - tileHeight); + + while (nbox--) { + saveW = pbox->x2 - pbox->x1; + iline = (pbox->y1 - ySrc) % tileHeight; + psrcT = (PixelType *) pTile->devPrivate.ptr; + tileLine = iline * tlwidth; + saveH = pbox->y2 - pbox->y1; + saveP = afbScanline(pBase, pbox->x1, pbox->y1, nlwidth); + + for (d = 0; d < depthDst; d++, saveP += sizeDst) { /* @@@ NEXT PLANE @@@ */ + if (!(planemask & (1 << d))) + continue; + + h = saveH; + pStartDst = saveP; + pStartTile = psrcT + tileLine; + iy = iline; + + while (h--) { + x = pbox->x1; + width = saveW; + pdst = pStartDst; + while(width > 0) { + psrc = pStartTile; + w = min(tileWidth, width); + if((rem = (x - xSrc) % tileWidth) != 0) { + /* if we're in the middle of the tile, get + as many bits as will finish the span, or + as many as will get to the left edge of the tile, + or a longword worth, starting at the appropriate + offset in the tile. + */ + w = min(min(tileWidth - rem, width), BITMAP_SCANLINE_PAD); + endinc = rem / BITMAP_SCANLINE_PAD; + + switch (rropsOS[d]) { + case RROP_BLACK: + tmpsrc = 0; + break; + case RROP_WHITE: + tmpsrc = ~0; + break; + + case RROP_COPY: + getbits ((psrc+endinc), (rem&PIM), w, tmpsrc); + break; + + case RROP_INVERT: + getbits ((psrc+endinc), (rem&PIM), w, tmpsrc); + tmpsrc = ~tmpsrc; + break; + } +#if (MROP) != Mcopy + getbits (pdst, (x & PIM), w, tmpdst); + tmpsrc = DoMergeRop (tmpsrc, tmpdst); +#endif + putbits (tmpsrc, (x & PIM), w, pdst); + + if((x & PIM) + w >= PPW) + pdst++; + } else if(((x & PIM) + w) < PPW) { + /* doing < PPW bits is easy, and worth special-casing */ + switch (rropsOS[d]) { + case RROP_BLACK: + tmpsrc = 0; + break; + case RROP_WHITE: + tmpsrc = ~0; + break; + case RROP_COPY: + tmpsrc = *psrc; + break; + case RROP_INVERT: + tmpsrc = ~*psrc; + break; + } +#if (MROP) != Mcopy + getbits (pdst, (x & PIM), w, tmpdst); + tmpsrc = DoMergeRop (tmpsrc, tmpdst); +#endif + putbits (tmpsrc, (x & PIM), w, pdst); + } else { + /* start at the left edge of the tile, + and put down as much as we can + */ + maskbits(x, w, startmask, endmask, nlMiddle); + + if (startmask) + nstart = PPW - (x & PIM); + else + nstart = 0; + if (endmask) + nend = (x + w) & PIM; + else + nend = 0; + + srcStartOver = nstart > PLST; + + if(startmask) { + switch (rropsOS[d]) { + case RROP_BLACK: + tmpsrc = 0; + break; + case RROP_WHITE: + tmpsrc = ~0; + break; + case RROP_COPY: + tmpsrc = *psrc; + break; + case RROP_INVERT: + tmpsrc = ~*psrc; + break; + } +#if (MROP) != Mcopy + getbits (pdst, (x & PIM), nstart, tmpdst); + tmpsrc = DoMergeRop (tmpsrc, tmpdst); +#endif + putbits (tmpsrc, (x & PIM), nstart, pdst); + pdst++; + if(srcStartOver) + psrc++; + } + + while(nlMiddle--) { + switch (rropsOS[d]) { + case RROP_BLACK: + tmpsrc = 0; + break; + case RROP_WHITE: + tmpsrc = ~0; + break; + case RROP_COPY: + getbits (psrc, nstart, PPW, tmpsrc); + break; + case RROP_INVERT: + getbits (psrc, nstart, PPW, tmpsrc); + tmpsrc = ~tmpsrc; + break; + } +#if (MROP) != Mcopy + tmpdst = *pdst; + tmpsrc = DoMergeRop (tmpsrc, tmpdst); +#endif + *pdst++ = tmpsrc; + /*putbits (tmpsrc, 0, PPW, pdst); + pdst++; */ + psrc++; + } + + if(endmask) { + switch (rropsOS[d]) { + case RROP_BLACK: + tmpsrc = 0; + break; + case RROP_WHITE: + tmpsrc = ~0; + break; + + case RROP_COPY: + getbits (psrc, nstart, nend, tmpsrc); + break; + + case RROP_INVERT: + getbits (psrc, nstart, nend, tmpsrc); + tmpsrc = ~tmpsrc; + break; + } +#if (MROP) != Mcopy + tmpdst = *pdst; + tmpsrc = DoMergeRop (tmpsrc, tmpdst); +#endif + putbits (tmpsrc, 0, nend, pdst); + } + } + x += w; + width -= w; + } /* while (width > 0) */ + + pStartDst += nlwidth; + if (++iy >= tileHeight) { + iy = 0; + pStartTile = psrcT; + } else + pStartTile += tlwidth; + + } /* while (h) */ + } /* for (d = ... ) */ + pbox++; + } /* for each box */ +} diff --git a/xorg-server-1.4/afb/afbtileC.c b/xorg-server-1.4/afb/afbtileC.c new file mode 100644 index 0000000..7bdf2d4 --- /dev/null +++ b/xorg-server-1.4/afb/afbtileC.c @@ -0,0 +1,2 @@ +#define MROP Mcopy +#include "./afbtile.c" diff --git a/xorg-server-1.4/afb/afbtileG.c b/xorg-server-1.4/afb/afbtileG.c new file mode 100644 index 0000000..66ff7f8 --- /dev/null +++ b/xorg-server-1.4/afb/afbtileG.c @@ -0,0 +1,2 @@ +#define MROP 0 +#include "./afbtile.c" diff --git a/xorg-server-1.4/afb/afbwindow.c b/xorg-server-1.4/afb/afbwindow.c new file mode 100644 index 0000000..a4a1602 --- /dev/null +++ b/xorg-server-1.4/afb/afbwindow.c @@ -0,0 +1,318 @@ +/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ +/*********************************************************** + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include "scrnintstr.h" +#include "windowstr.h" +#include "afb.h" +#include "mistruct.h" +#include "regionstr.h" +#include "maskbits.h" + +Bool +afbCreateWindow(pWin) + register WindowPtr pWin; +{ + register afbPrivWin *pPrivWin; + + pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr); + pPrivWin->pRotatedBorder = NullPixmap; + pPrivWin->pRotatedBackground = NullPixmap; + pPrivWin->fastBackground = FALSE; + pPrivWin->fastBorder = FALSE; +#ifdef PIXMAP_PER_WINDOW + pWin->devPrivates[frameWindowPrivateIndex].ptr = + pWin->pDrawable.pScreen->devPrivates[afbScreenPrivateIndex].ptr; +#endif + + return (TRUE); +} + +/* This always returns true, because Xfree can't fail. It might be possible + * on some devices for Destroy to fail */ +Bool +afbDestroyWindow(pWin) + WindowPtr pWin; +{ + register afbPrivWin *pPrivWin; + + pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr); + + if (pPrivWin->pRotatedBorder) + (*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBorder); + if (pPrivWin->pRotatedBackground) + (*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBackground); + + return (TRUE); +} + +/*ARGSUSED*/ +Bool +afbMapWindow(pWindow) + WindowPtr pWindow; +{ + return (TRUE); +} + +/* (x, y) is the upper left corner of the window on the screen + do we really need to pass this? (is it a;ready in pWin->absCorner?) + we only do the rotation for pixmaps that are 32 bits wide (padded +or otherwise.) + afbChangeWindowAttributes() has already put a copy of the pixmap +in pPrivWin->pRotated* +*/ + +/*ARGSUSED*/ +Bool +afbPositionWindow(pWin, x, y) + WindowPtr pWin; + int x, y; +{ + register afbPrivWin *pPrivWin; + int reset = 0; + + pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr); + if (pWin->backgroundState == BackgroundPixmap && pPrivWin->fastBackground) { + afbXRotatePixmap(pPrivWin->pRotatedBackground, + pWin->drawable.x - pPrivWin->oldRotate.x); + afbYRotatePixmap(pPrivWin->pRotatedBackground, + pWin->drawable.y - pPrivWin->oldRotate.y); + reset = 1; + } + + if (!pWin->borderIsPixel && pPrivWin->fastBorder) { + while (pWin->backgroundState == ParentRelative) + pWin = pWin->parent; + afbXRotatePixmap(pPrivWin->pRotatedBorder, + pWin->drawable.x - pPrivWin->oldRotate.x); + afbYRotatePixmap(pPrivWin->pRotatedBorder, + pWin->drawable.y - pPrivWin->oldRotate.y); + reset = 1; + } + if (reset) { + pPrivWin->oldRotate.x = pWin->drawable.x; + pPrivWin->oldRotate.y = pWin->drawable.y; + } + + /* This is the "wrong" fix to the right problem, but it doesn't really + * cost very much. When the window is moved, we need to invalidate any + * RotatedPixmap that exists in any GC currently validated against this + * window. + */ + pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; + + /* Again, we have no failure modes indicated by any of the routines + * we've called, so we have to assume it worked */ + return (TRUE); +} + +/*ARGSUSED*/ +Bool +afbUnmapWindow(pWindow) + WindowPtr pWindow; +{ + return (TRUE); +} + +/* UNCLEAN! + this code calls the bitblt helper code directly. + + afbCopyWindow copies only the parts of the destination that are +visible in the source. +*/ + + +void +afbCopyWindow(pWin, ptOldOrg, prgnSrc) + WindowPtr pWin; + DDXPointRec ptOldOrg; + RegionPtr prgnSrc; +{ + DDXPointPtr pptSrc; + register DDXPointPtr ppt; + RegionPtr prgnDst; + register BoxPtr pbox; + register int dx, dy; + register int i, nbox; + WindowPtr pwinRoot; + + pwinRoot = WindowTable[pWin->drawable.pScreen->myNum]; + + prgnDst = REGION_CREATE(pWin->drawable.pScreen, NULL, 1); + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); + REGION_INTERSECT(pWin->drawable.pScreen, prgnDst, &pWin->borderClip, + prgnSrc); + + pbox = REGION_RECTS(prgnDst); + nbox = REGION_NUM_RECTS(prgnDst); + if(!(pptSrc = (DDXPointPtr )ALLOCATE_LOCAL(nbox * sizeof(DDXPointRec)))) + return; + ppt = pptSrc; + + for (i=nbox; --i >= 0; ppt++, pbox++) { + ppt->x = pbox->x1 + dx; + ppt->y = pbox->y1 + dy; + } + + afbDoBitblt((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, GXcopy, prgnDst, + pptSrc, ~0); + DEALLOCATE_LOCAL(pptSrc); + REGION_DESTROY(pWin->drawable.pScreen, prgnDst); +} + + + +/* swap in correct PaintWindow* routine. If we can use a fast output +routine (i.e. the pixmap is paddable to 32 bits), also pre-rotate a copy +of it in devPrivate. +*/ +Bool +afbChangeWindowAttributes(pWin, mask) + register WindowPtr pWin; + register unsigned long mask; +{ + register unsigned long index; + register afbPrivWin *pPrivWin; + WindowPtr pBgWin; + + pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr); + /* + * When background state changes from ParentRelative and + * we had previously rotated the fast border pixmap to match + * the parent relative origin, rerotate to match window + */ + if (mask & (CWBackPixmap | CWBackPixel) && + pWin->backgroundState != ParentRelative && pPrivWin->fastBorder && + (pPrivWin->oldRotate.x != pWin->drawable.x || + pPrivWin->oldRotate.y != pWin->drawable.y)) { + afbXRotatePixmap(pPrivWin->pRotatedBorder, + pWin->drawable.x - pPrivWin->oldRotate.x); + afbYRotatePixmap(pPrivWin->pRotatedBorder, + pWin->drawable.y - pPrivWin->oldRotate.y); + pPrivWin->oldRotate.x = pWin->drawable.x; + pPrivWin->oldRotate.y = pWin->drawable.y; + } + while(mask) { + index = lowbit (mask); + mask &= ~index; + switch(index) { + case CWBackPixmap: + if (pWin->backgroundState == None) + pPrivWin->fastBackground = FALSE; + else if (pWin->backgroundState == ParentRelative) { + pPrivWin->fastBackground = FALSE; + /* Rotate border to match parent origin */ + if (pPrivWin->pRotatedBorder) { + for (pBgWin = pWin->parent; + pBgWin->backgroundState == ParentRelative; + pBgWin = pBgWin->parent); + afbXRotatePixmap(pPrivWin->pRotatedBorder, + pBgWin->drawable.x - pPrivWin->oldRotate.x); + afbYRotatePixmap(pPrivWin->pRotatedBorder, + pBgWin->drawable.y - pPrivWin->oldRotate.y); + pPrivWin->oldRotate.x = pBgWin->drawable.x; + pPrivWin->oldRotate.y = pBgWin->drawable.y; + } + } else if ((pWin->background.pixmap->drawable.width <= PPW) && + !(pWin->background.pixmap->drawable.width & + (pWin->background.pixmap->drawable.width - 1))) { + afbCopyRotatePixmap(pWin->background.pixmap, + &pPrivWin->pRotatedBackground, + pWin->drawable.x, pWin->drawable.y); + if (pPrivWin->pRotatedBackground) { + pPrivWin->fastBackground = TRUE; + pPrivWin->oldRotate.x = pWin->drawable.x; + pPrivWin->oldRotate.y = pWin->drawable.y; + } else + pPrivWin->fastBackground = FALSE; + } else + pPrivWin->fastBackground = FALSE; + break; + + case CWBackPixel: + pPrivWin->fastBackground = FALSE; + break; + + case CWBorderPixmap: + if ((pWin->border.pixmap->drawable.width <= PPW) && + !(pWin->border.pixmap->drawable.width & + (pWin->border.pixmap->drawable.width - 1))) { + for (pBgWin = pWin; + pBgWin->backgroundState == ParentRelative; + pBgWin = pBgWin->parent); + afbCopyRotatePixmap(pWin->border.pixmap, + &pPrivWin->pRotatedBorder, + pBgWin->drawable.x, pBgWin->drawable.y); + if (pPrivWin->pRotatedBorder) { + pPrivWin->fastBorder = TRUE; + pPrivWin->oldRotate.x = pBgWin->drawable.x; + pPrivWin->oldRotate.y = pBgWin->drawable.y; + } else + pPrivWin->fastBorder = FALSE; + } else + pPrivWin->fastBorder = FALSE; + break; + case CWBorderPixel: + pPrivWin->fastBorder = FALSE; + break; + } + } + /* Again, we have no failure modes indicated by any of the routines + * we've called, so we have to assume it worked */ + return (TRUE); +} diff --git a/xorg-server-1.4/afb/afbzerarc.c b/xorg-server-1.4/afb/afbzerarc.c new file mode 100644 index 0000000..2cc3068 --- /dev/null +++ b/xorg-server-1.4/afb/afbzerarc.c @@ -0,0 +1,201 @@ +/************************************************************ + +Copyright (c) 1989 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +********************************************************/ + + +/* Derived from: + * "Algorithm for drawing ellipses or hyperbolae with a digital plotter" + * by M. L. V. Pitteway + * The Computer Journal, November 1967, Volume 10, Number 3, pp. 282-289 + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "regionstr.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "afb.h" +#include "maskbits.h" +#include "mizerarc.h" +#include "mi.h" + +/* + * Note: LEFTMOST must be the bit leftmost in the actual screen + * representation. This depends also on the IMAGE_BYTE_ORDER. + * LONG2CHARS() takes care of the re-ordering as required. (DHD) + */ +#if (BITMAP_BIT_ORDER == MSBFirst) +#define LEFTMOST ((PixelType) LONG2CHARS((1 << PLST))) +#else +#define LEFTMOST ((PixelType) LONG2CHARS(1)) +#endif + +#define Pixelate(base,yoff,xoff) \ +{ \ + paddr = afbScanlineOffset(base, (yoff) + ((xoff)>>PWSH)); \ + pmask = SCRRIGHT(LEFTMOST, (xoff) & PIM); \ + for (de = 0; de < depthDst; de++, paddr += sizeDst) /* @@@ NEXT PLANE @@@ */ \ + switch (rrops[de]) { \ + case RROP_BLACK: \ + *paddr &= ~pmask; \ + break; \ + case RROP_WHITE: \ + *paddr |= pmask; \ + break; \ + case RROP_INVERT: \ + *paddr ^= pmask; \ + break; \ + case RROP_NOP: \ + break; \ + } \ +} + +#define DoPix(bit,base,yoff,xoff) if (mask & bit) Pixelate(base,yoff,xoff); + +static void +afbZeroArcSS(DrawablePtr pDraw, GCPtr pGC, xArc *arc) +{ + miZeroArcRec info; + Bool do360; + register int de; + register int x, y, a, b, d, mask; + register int k1, k3, dx, dy; + PixelType *addrl; + PixelType *yorgl, *yorgol; + int nlwidth, yoffset, dyoffset; + int sizeDst, depthDst; + PixelType pmask; + register PixelType *paddr; + register unsigned char *rrops; + + rrops = ((afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr))->rrops; + + afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, + addrl); + do360 = miZeroArcSetup(arc, &info, TRUE); + yorgl = addrl + ((info.yorg + pDraw->y) * nlwidth); + yorgol = addrl + ((info.yorgo + pDraw->y) * nlwidth); + info.xorg += pDraw->x; + info.xorgo += pDraw->x; + MIARCSETUP(); + yoffset = y ? nlwidth : 0; + dyoffset = 0; + mask = info.initialMask; + if (!(arc->width & 1)) { + DoPix(2, yorgl, 0, info.xorgo); + DoPix(8, yorgol, 0, info.xorgo); + } + if (!info.end.x || !info.end.y) { + mask = info.end.mask; + info.end = info.altend; + } + if (do360 && (arc->width == arc->height) && !(arc->width & 1)) { + int xoffset = nlwidth; + PixelType *yorghl = afbScanlineDeltaNoBankSwitch(yorgl, info.h, nlwidth); + int xorghp = info.xorg + info.h; + int xorghn = info.xorg - info.h; + + while (1) { + Pixelate(yorgl, yoffset, info.xorg + x); + Pixelate(yorgl, yoffset, info.xorg - x); + Pixelate(yorgol, -yoffset, info.xorg - x); + Pixelate(yorgol, -yoffset, info.xorg + x); + if (a < 0) + break; + Pixelate(yorghl, -xoffset, xorghp - y); + Pixelate(yorghl, -xoffset, xorghn + y); + Pixelate(yorghl, xoffset, xorghn + y); + Pixelate(yorghl, xoffset, xorghp - y); + xoffset += nlwidth; + MIARCCIRCLESTEP(yoffset += nlwidth;); + } + x = info.w; + yoffset = info.h * nlwidth; + } else if (do360) { + while (y < info.h || x < info.w) { + MIARCOCTANTSHIFT(dyoffset = nlwidth;); + Pixelate(yorgl, yoffset, info.xorg + x); + Pixelate(yorgl, yoffset, info.xorgo - x); + Pixelate(yorgol, -yoffset, info.xorgo - x); + Pixelate(yorgol, -yoffset, info.xorg + x); + MIARCSTEP(yoffset += dyoffset;, yoffset += nlwidth;); + } + } else { + while (y < info.h || x < info.w) { + MIARCOCTANTSHIFT(dyoffset = nlwidth;); + if ((x == info.start.x) || (y == info.start.y)) { + mask = info.start.mask; + info.start = info.altstart; + } + DoPix(1, yorgl, yoffset, info.xorg + x); + DoPix(2, yorgl, yoffset, info.xorgo - x); + DoPix(4, yorgol, -yoffset, info.xorgo - x); + DoPix(8, yorgol, -yoffset, info.xorg + x); + if ((x == info.end.x) || (y == info.end.y)) { + mask = info.end.mask; + info.end = info.altend; + } + MIARCSTEP(yoffset += dyoffset;, yoffset += nlwidth;); + } + } + if ((x == info.start.x) || (y == info.start.y)) + mask = info.start.mask; + DoPix(1, yorgl, yoffset, info.xorg + x); + DoPix(4, yorgol, -yoffset, info.xorgo - x); + if (arc->height & 1) { + DoPix(2, yorgl, yoffset, info.xorgo - x); + DoPix(8, yorgol, -yoffset, info.xorg + x); + } +} + +void +afbZeroPolyArcSS(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) +{ + register xArc *arc; + register int i; + BoxRec box; + RegionPtr cclip; + + cclip = pGC->pCompositeClip; + for (arc = parcs, i = narcs; --i >= 0; arc++) { + if (miCanZeroArc(arc)) { + box.x1 = arc->x + pDraw->x; + box.y1 = arc->y + pDraw->y; + box.x2 = box.x1 + (int)arc->width + 1; + box.y2 = box.y1 + (int)arc->height + 1; + if (RECT_IN_REGION(pDraw->pScreen, cclip, &box) == rgnIN) + afbZeroArcSS(pDraw, pGC, arc); + else + miZeroPolyArc(pDraw, pGC, 1, arc); + } else + miPolyArc(pDraw, pGC, 1, arc); + } +} diff --git a/xorg-server-1.4/autogen.sh b/xorg-server-1.4/autogen.sh new file mode 100755 index 0000000..904cd67 --- /dev/null +++ b/xorg-server-1.4/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" diff --git a/xorg-server-1.4/cfb/Makefile.am b/xorg-server-1.4/cfb/Makefile.am new file mode 100644 index 0000000..d24f027 --- /dev/null +++ b/xorg-server-1.4/cfb/Makefile.am @@ -0,0 +1,22 @@ +noinst_LTLIBRARIES = libcfb.la + +include Makefile.am.inc + +DISTCLEANFILES += cfbglrop8.c + +libcfb_la_SOURCES = cfb8bit.c cfbteblt8.c cfbglrop8.c cfbpush8.c cfbrctstp8.c \ + $(libcfb_gen_sources) $(libcfb_common_sources) + +libcfb_la_LIBADD = ../mfb/libmfb.la + +AM_CFLAGS = -DPSZ=8 $(DIX_CFLAGS) $(PLATFORMDEFS) + +INCLUDES = $(CFB_INCLUDES) -I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/common + +EXTRA_DIST = cfbline.c cfbfillarc.c cfbzerarc.c cfbblt.c cfbsolid.c \ + cfbtileodd.c cfbtile32.c cfb8line.c cfbply1rct.c cfbglblt8.c \ + cfb16.h cfb24.h cfb32.h cfb8bit.h cfbrrop.h \ + cfbtab.h \ + stip68kgnu.h stipmips.s stipsparc.s stipsprc32.s + +sdk_HEADERS = cfb.h cfb32.h cfb16.h cfbmap.h cfbunmap.h cfbmskbits.h diff --git a/xorg-server-1.4/cfb/Makefile.am.inc b/xorg-server-1.4/cfb/Makefile.am.inc new file mode 100644 index 0000000..65e011a --- /dev/null +++ b/xorg-server-1.4/cfb/Makefile.am.inc @@ -0,0 +1,153 @@ +libcfb_gen_sources = cfbseg.c cfbfillarcC.c cfbfillarcG.c cfbzerarcC.c cfbzerarcX.c cfbzerarcG.c \ + cfbbltC.c cfbbltX.c cfbbltO.c cfbbltG.c cfbsolidC.c cfbsolidX.c cfbsolidG.c cfbtileoddC.c \ + cfbtileoddG.c cfbtile32C.c cfbtile32G.c cfb8lineCO.c cfb8lineCP.c cfb8lineX.c cfb8lineG.c \ + cfb8segCS.c cfb8segC.c cfb8segX.c cfb8setG.c cfbply1rctC.c cfbply1rctG.c + +DISTCLEANFILES = $(libcfb_gen_sources) + +CFB_INCLUDES = -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb + +libcfb_common_sources = $(top_srcdir)/cfb/cfbgc.c $(top_srcdir)/cfb/cfbrrop.c \ + $(top_srcdir)/cfb/cfbwindow.c $(top_srcdir)/cfb/cfbpntwin.c \ + $(top_srcdir)/cfb/cfbmskbits.c $(top_srcdir)/cfb/cfbpixmap.c \ + $(top_srcdir)/cfb/cfbbitblt.c $(top_srcdir)/cfb/cfbfillsp.c \ + $(top_srcdir)/cfb/cfbsetsp.c $(top_srcdir)/cfb/cfbscrinit.c \ + $(top_srcdir)/cfb/cfballpriv.c $(top_srcdir)/cfb/cfbgetsp.c \ + $(top_srcdir)/cfb/cfbfillrct.c $(top_srcdir)/cfb/cfbigblt8.c \ + $(top_srcdir)/cfb/cfbglblt8.c $(top_srcdir)/cfb/cfbtegblt.c \ + $(top_srcdir)/cfb/cfbbstore.c $(top_srcdir)/cfb/cfbpolypnt.c \ + $(top_srcdir)/cfb/cfbbres.c $(top_srcdir)/cfb/cfbline.c \ + $(top_srcdir)/cfb/cfbhrzvert.c $(top_srcdir)/cfb/cfbbresd.c \ + $(top_srcdir)/cfb/cfbimage.c $(top_srcdir)/cfb/cfbcppl.c \ + $(top_srcdir)/cfb/cfbcmap.c + +cfbseg.c: + echo "#define POLYSEGMENT" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbline.c\"" >> $@ + +cfbfillarcC.c: + echo "#define RROP GXcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbfillarc.c\"" >> $@ + +cfbfillarcG.c: + echo "#define RROP GXset" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbfillarc.c\"" >> $@ + +cfbzerarcC.c: + echo "#define RROP GXcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbzerarc.c\"" >> $@ + +cfbzerarcX.c: + echo "#define RROP GXxor" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbzerarc.c\"" >> $@ + +cfbzerarcG.c: + echo "#define RROP GXset" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbzerarc.c\"" >> $@ + +cfbbltC.c: + echo "#define MROP Mcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbblt.c\"" >> $@ + +cfbbltX.c: + echo "#define MROP Mxor" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbblt.c\"" >> $@ + +cfbbltO.c: + echo "#define MROP Mor" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbblt.c\"" >> $@ + +cfbbltG.c: + echo "#define MROP 0" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbblt.c\"" >> $@ + +cfbsolidC.c: + echo "#define RROP GXcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbsolid.c\"" >> $@ + +cfbsolidX.c: + echo "#define RROP GXxor" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbsolid.c\"" >> $@ + +cfbsolidG.c: + echo "#define RROP GXset" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbsolid.c\"" >> $@ + +cfbtileoddC.c: + echo "#define MROP Mcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbtileodd.c\"" >> $@ + +cfbtileoddG.c: + echo "#define MROP 0" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbtileodd.c\"" >> $@ + +cfbtile32C.c: + echo "#define MROP Mcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbtile32.c\"" >> $@ + +cfbtile32G.c: + echo "#define MROP 0" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbtile32.c\"" >> $@ + +cfb8lineCO.c: + echo "#define RROP GXcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8lineCP.c: + echo "#define RROP GXcopy" > $@ + echo "#define PREVIOUS" >> $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8lineX.c: + echo "#define RROP GXxor" > $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8lineG.c: + echo "#define RROP GXset" > $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8segCS.c: + echo "#define RROP GXcopy" > $@ + echo "#define POLYSEGMENT" >> $@ + echo "#define WIDTH_SHIFT" >> $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8segC.c: + echo "#define RROP GXcopy" > $@ + echo "#define POLYSEGMENT" >> $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8segX.c: + echo "#define RROP GXxor" > $@ + echo "#define POLYSEGMENT" >> $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8setG.c: + echo "#define RROP GXset" > $@ + echo "#define POLYSEGMENT" >> $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfbply1rctC.c: + echo "#define RROP GXcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbply1rct.c\"" >> $@ + +cfbply1rctG.c: + echo "#define RROP GXset" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbply1rct.c\"" >> $@ + +cfbglrop8.c: + echo "#define GLYPHROP" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbglblt8.c\"" >> $@ + + +if XPRINT + +PLATFORMDEFS = -DXFREE86 + +cfb8bit.o: compiler.h + +compiler.h: + echo "#include \"$(top_srcdir)/hw/xfree86/common/compiler.h\"" >> $@ + +endif + diff --git a/xorg-server-1.4/cfb/Makefile.in b/xorg-server-1.4/cfb/Makefile.in new file mode 100644 index 0000000..1d0f90b --- /dev/null +++ b/xorg-server-1.4/cfb/Makefile.in @@ -0,0 +1,1053 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.am.inc $(srcdir)/Makefile.in +subdir = cfb +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libcfb_la_DEPENDENCIES = ../mfb/libmfb.la +am__objects_1 = cfbseg.lo cfbfillarcC.lo cfbfillarcG.lo cfbzerarcC.lo \ + cfbzerarcX.lo cfbzerarcG.lo cfbbltC.lo cfbbltX.lo cfbbltO.lo \ + cfbbltG.lo cfbsolidC.lo cfbsolidX.lo cfbsolidG.lo \ + cfbtileoddC.lo cfbtileoddG.lo cfbtile32C.lo cfbtile32G.lo \ + cfb8lineCO.lo cfb8lineCP.lo cfb8lineX.lo cfb8lineG.lo \ + cfb8segCS.lo cfb8segC.lo cfb8segX.lo cfb8setG.lo \ + cfbply1rctC.lo cfbply1rctG.lo +am__objects_2 = cfbgc.lo cfbrrop.lo cfbwindow.lo cfbpntwin.lo \ + cfbmskbits.lo cfbpixmap.lo cfbbitblt.lo cfbfillsp.lo \ + cfbsetsp.lo cfbscrinit.lo cfballpriv.lo cfbgetsp.lo \ + cfbfillrct.lo cfbigblt8.lo cfbglblt8.lo cfbtegblt.lo \ + cfbbstore.lo cfbpolypnt.lo cfbbres.lo cfbline.lo cfbhrzvert.lo \ + cfbbresd.lo cfbimage.lo cfbcppl.lo cfbcmap.lo +am_libcfb_la_OBJECTS = cfb8bit.lo cfbteblt8.lo cfbglrop8.lo \ + cfbpush8.lo cfbrctstp8.lo $(am__objects_1) $(am__objects_2) +libcfb_la_OBJECTS = $(am_libcfb_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libcfb_la_SOURCES) +DIST_SOURCES = $(libcfb_la_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(sdkdir)" +sdkHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(sdk_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libcfb.la +libcfb_gen_sources = cfbseg.c cfbfillarcC.c cfbfillarcG.c cfbzerarcC.c cfbzerarcX.c cfbzerarcG.c \ + cfbbltC.c cfbbltX.c cfbbltO.c cfbbltG.c cfbsolidC.c cfbsolidX.c cfbsolidG.c cfbtileoddC.c \ + cfbtileoddG.c cfbtile32C.c cfbtile32G.c cfb8lineCO.c cfb8lineCP.c cfb8lineX.c cfb8lineG.c \ + cfb8segCS.c cfb8segC.c cfb8segX.c cfb8setG.c cfbply1rctC.c cfbply1rctG.c + +DISTCLEANFILES = $(libcfb_gen_sources) cfbglrop8.c +CFB_INCLUDES = -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb +libcfb_common_sources = $(top_srcdir)/cfb/cfbgc.c $(top_srcdir)/cfb/cfbrrop.c \ + $(top_srcdir)/cfb/cfbwindow.c $(top_srcdir)/cfb/cfbpntwin.c \ + $(top_srcdir)/cfb/cfbmskbits.c $(top_srcdir)/cfb/cfbpixmap.c \ + $(top_srcdir)/cfb/cfbbitblt.c $(top_srcdir)/cfb/cfbfillsp.c \ + $(top_srcdir)/cfb/cfbsetsp.c $(top_srcdir)/cfb/cfbscrinit.c \ + $(top_srcdir)/cfb/cfballpriv.c $(top_srcdir)/cfb/cfbgetsp.c \ + $(top_srcdir)/cfb/cfbfillrct.c $(top_srcdir)/cfb/cfbigblt8.c \ + $(top_srcdir)/cfb/cfbglblt8.c $(top_srcdir)/cfb/cfbtegblt.c \ + $(top_srcdir)/cfb/cfbbstore.c $(top_srcdir)/cfb/cfbpolypnt.c \ + $(top_srcdir)/cfb/cfbbres.c $(top_srcdir)/cfb/cfbline.c \ + $(top_srcdir)/cfb/cfbhrzvert.c $(top_srcdir)/cfb/cfbbresd.c \ + $(top_srcdir)/cfb/cfbimage.c $(top_srcdir)/cfb/cfbcppl.c \ + $(top_srcdir)/cfb/cfbcmap.c + +@XPRINT_TRUE@PLATFORMDEFS = -DXFREE86 +libcfb_la_SOURCES = cfb8bit.c cfbteblt8.c cfbglrop8.c cfbpush8.c cfbrctstp8.c \ + $(libcfb_gen_sources) $(libcfb_common_sources) + +libcfb_la_LIBADD = ../mfb/libmfb.la +AM_CFLAGS = -DPSZ=8 $(DIX_CFLAGS) $(PLATFORMDEFS) +INCLUDES = $(CFB_INCLUDES) -I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/common +EXTRA_DIST = cfbline.c cfbfillarc.c cfbzerarc.c cfbblt.c cfbsolid.c \ + cfbtileodd.c cfbtile32.c cfb8line.c cfbply1rct.c cfbglblt8.c \ + cfb16.h cfb24.h cfb32.h cfb8bit.h cfbrrop.h \ + cfbtab.h \ + stip68kgnu.h stipmips.s stipsparc.s stipsprc32.s + +sdk_HEADERS = cfb.h cfb32.h cfb16.h cfbmap.h cfbunmap.h cfbmskbits.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.am.inc $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign cfb/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign cfb/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libcfb.la: $(libcfb_la_OBJECTS) $(libcfb_la_DEPENDENCIES) + $(LINK) $(libcfb_la_OBJECTS) $(libcfb_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8bit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8lineCO.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8lineCP.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8lineG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8lineX.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8segC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8segCS.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8segX.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8setG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfballpriv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbitblt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbltC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbltG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbltO.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbltX.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbres.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbresd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbstore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbcmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbcppl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbfillarcC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbfillarcG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbfillrct.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbfillsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbgc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbgetsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbglblt8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbglrop8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbhrzvert.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbigblt8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbimage.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbmskbits.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbpixmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbply1rctC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbply1rctG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbpntwin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbpolypnt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbpush8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbrctstp8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbrrop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbscrinit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbseg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbsetsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbsolidC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbsolidG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbsolidX.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbteblt8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbtegblt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbtile32C.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbtile32G.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbtileoddC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbtileoddG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbwindow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbzerarcC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbzerarcG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbzerarcX.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +cfbgc.lo: $(top_srcdir)/cfb/cfbgc.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbgc.lo -MD -MP -MF $(DEPDIR)/cfbgc.Tpo -c -o cfbgc.lo `test -f '$(top_srcdir)/cfb/cfbgc.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbgc.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbgc.Tpo $(DEPDIR)/cfbgc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbgc.c' object='cfbgc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbgc.lo `test -f '$(top_srcdir)/cfb/cfbgc.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbgc.c + +cfbrrop.lo: $(top_srcdir)/cfb/cfbrrop.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbrrop.lo -MD -MP -MF $(DEPDIR)/cfbrrop.Tpo -c -o cfbrrop.lo `test -f '$(top_srcdir)/cfb/cfbrrop.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbrrop.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbrrop.Tpo $(DEPDIR)/cfbrrop.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbrrop.c' object='cfbrrop.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbrrop.lo `test -f '$(top_srcdir)/cfb/cfbrrop.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbrrop.c + +cfbwindow.lo: $(top_srcdir)/cfb/cfbwindow.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbwindow.lo -MD -MP -MF $(DEPDIR)/cfbwindow.Tpo -c -o cfbwindow.lo `test -f '$(top_srcdir)/cfb/cfbwindow.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbwindow.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbwindow.Tpo $(DEPDIR)/cfbwindow.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbwindow.c' object='cfbwindow.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbwindow.lo `test -f '$(top_srcdir)/cfb/cfbwindow.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbwindow.c + +cfbpntwin.lo: $(top_srcdir)/cfb/cfbpntwin.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbpntwin.lo -MD -MP -MF $(DEPDIR)/cfbpntwin.Tpo -c -o cfbpntwin.lo `test -f '$(top_srcdir)/cfb/cfbpntwin.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbpntwin.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbpntwin.Tpo $(DEPDIR)/cfbpntwin.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbpntwin.c' object='cfbpntwin.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbpntwin.lo `test -f '$(top_srcdir)/cfb/cfbpntwin.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbpntwin.c + +cfbmskbits.lo: $(top_srcdir)/cfb/cfbmskbits.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbmskbits.lo -MD -MP -MF $(DEPDIR)/cfbmskbits.Tpo -c -o cfbmskbits.lo `test -f '$(top_srcdir)/cfb/cfbmskbits.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbmskbits.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbmskbits.Tpo $(DEPDIR)/cfbmskbits.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbmskbits.c' object='cfbmskbits.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbmskbits.lo `test -f '$(top_srcdir)/cfb/cfbmskbits.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbmskbits.c + +cfbpixmap.lo: $(top_srcdir)/cfb/cfbpixmap.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbpixmap.lo -MD -MP -MF $(DEPDIR)/cfbpixmap.Tpo -c -o cfbpixmap.lo `test -f '$(top_srcdir)/cfb/cfbpixmap.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbpixmap.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbpixmap.Tpo $(DEPDIR)/cfbpixmap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbpixmap.c' object='cfbpixmap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbpixmap.lo `test -f '$(top_srcdir)/cfb/cfbpixmap.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbpixmap.c + +cfbbitblt.lo: $(top_srcdir)/cfb/cfbbitblt.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbbitblt.lo -MD -MP -MF $(DEPDIR)/cfbbitblt.Tpo -c -o cfbbitblt.lo `test -f '$(top_srcdir)/cfb/cfbbitblt.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbitblt.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbbitblt.Tpo $(DEPDIR)/cfbbitblt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbbitblt.c' object='cfbbitblt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbbitblt.lo `test -f '$(top_srcdir)/cfb/cfbbitblt.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbitblt.c + +cfbfillsp.lo: $(top_srcdir)/cfb/cfbfillsp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbfillsp.lo -MD -MP -MF $(DEPDIR)/cfbfillsp.Tpo -c -o cfbfillsp.lo `test -f '$(top_srcdir)/cfb/cfbfillsp.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbfillsp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbfillsp.Tpo $(DEPDIR)/cfbfillsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbfillsp.c' object='cfbfillsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbfillsp.lo `test -f '$(top_srcdir)/cfb/cfbfillsp.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbfillsp.c + +cfbsetsp.lo: $(top_srcdir)/cfb/cfbsetsp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbsetsp.lo -MD -MP -MF $(DEPDIR)/cfbsetsp.Tpo -c -o cfbsetsp.lo `test -f '$(top_srcdir)/cfb/cfbsetsp.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbsetsp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbsetsp.Tpo $(DEPDIR)/cfbsetsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbsetsp.c' object='cfbsetsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbsetsp.lo `test -f '$(top_srcdir)/cfb/cfbsetsp.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbsetsp.c + +cfbscrinit.lo: $(top_srcdir)/cfb/cfbscrinit.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbscrinit.lo -MD -MP -MF $(DEPDIR)/cfbscrinit.Tpo -c -o cfbscrinit.lo `test -f '$(top_srcdir)/cfb/cfbscrinit.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbscrinit.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbscrinit.Tpo $(DEPDIR)/cfbscrinit.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbscrinit.c' object='cfbscrinit.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbscrinit.lo `test -f '$(top_srcdir)/cfb/cfbscrinit.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbscrinit.c + +cfballpriv.lo: $(top_srcdir)/cfb/cfballpriv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfballpriv.lo -MD -MP -MF $(DEPDIR)/cfballpriv.Tpo -c -o cfballpriv.lo `test -f '$(top_srcdir)/cfb/cfballpriv.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfballpriv.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfballpriv.Tpo $(DEPDIR)/cfballpriv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfballpriv.c' object='cfballpriv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfballpriv.lo `test -f '$(top_srcdir)/cfb/cfballpriv.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfballpriv.c + +cfbgetsp.lo: $(top_srcdir)/cfb/cfbgetsp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbgetsp.lo -MD -MP -MF $(DEPDIR)/cfbgetsp.Tpo -c -o cfbgetsp.lo `test -f '$(top_srcdir)/cfb/cfbgetsp.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbgetsp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbgetsp.Tpo $(DEPDIR)/cfbgetsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbgetsp.c' object='cfbgetsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbgetsp.lo `test -f '$(top_srcdir)/cfb/cfbgetsp.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbgetsp.c + +cfbfillrct.lo: $(top_srcdir)/cfb/cfbfillrct.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbfillrct.lo -MD -MP -MF $(DEPDIR)/cfbfillrct.Tpo -c -o cfbfillrct.lo `test -f '$(top_srcdir)/cfb/cfbfillrct.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbfillrct.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbfillrct.Tpo $(DEPDIR)/cfbfillrct.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbfillrct.c' object='cfbfillrct.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbfillrct.lo `test -f '$(top_srcdir)/cfb/cfbfillrct.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbfillrct.c + +cfbigblt8.lo: $(top_srcdir)/cfb/cfbigblt8.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbigblt8.lo -MD -MP -MF $(DEPDIR)/cfbigblt8.Tpo -c -o cfbigblt8.lo `test -f '$(top_srcdir)/cfb/cfbigblt8.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbigblt8.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbigblt8.Tpo $(DEPDIR)/cfbigblt8.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbigblt8.c' object='cfbigblt8.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbigblt8.lo `test -f '$(top_srcdir)/cfb/cfbigblt8.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbigblt8.c + +cfbglblt8.lo: $(top_srcdir)/cfb/cfbglblt8.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbglblt8.lo -MD -MP -MF $(DEPDIR)/cfbglblt8.Tpo -c -o cfbglblt8.lo `test -f '$(top_srcdir)/cfb/cfbglblt8.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbglblt8.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbglblt8.Tpo $(DEPDIR)/cfbglblt8.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbglblt8.c' object='cfbglblt8.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbglblt8.lo `test -f '$(top_srcdir)/cfb/cfbglblt8.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbglblt8.c + +cfbtegblt.lo: $(top_srcdir)/cfb/cfbtegblt.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbtegblt.lo -MD -MP -MF $(DEPDIR)/cfbtegblt.Tpo -c -o cfbtegblt.lo `test -f '$(top_srcdir)/cfb/cfbtegblt.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbtegblt.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbtegblt.Tpo $(DEPDIR)/cfbtegblt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbtegblt.c' object='cfbtegblt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbtegblt.lo `test -f '$(top_srcdir)/cfb/cfbtegblt.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbtegblt.c + +cfbbstore.lo: $(top_srcdir)/cfb/cfbbstore.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbbstore.lo -MD -MP -MF $(DEPDIR)/cfbbstore.Tpo -c -o cfbbstore.lo `test -f '$(top_srcdir)/cfb/cfbbstore.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbstore.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbbstore.Tpo $(DEPDIR)/cfbbstore.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbbstore.c' object='cfbbstore.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbbstore.lo `test -f '$(top_srcdir)/cfb/cfbbstore.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbstore.c + +cfbpolypnt.lo: $(top_srcdir)/cfb/cfbpolypnt.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbpolypnt.lo -MD -MP -MF $(DEPDIR)/cfbpolypnt.Tpo -c -o cfbpolypnt.lo `test -f '$(top_srcdir)/cfb/cfbpolypnt.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbpolypnt.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbpolypnt.Tpo $(DEPDIR)/cfbpolypnt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbpolypnt.c' object='cfbpolypnt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbpolypnt.lo `test -f '$(top_srcdir)/cfb/cfbpolypnt.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbpolypnt.c + +cfbbres.lo: $(top_srcdir)/cfb/cfbbres.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbbres.lo -MD -MP -MF $(DEPDIR)/cfbbres.Tpo -c -o cfbbres.lo `test -f '$(top_srcdir)/cfb/cfbbres.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbres.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbbres.Tpo $(DEPDIR)/cfbbres.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbbres.c' object='cfbbres.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbbres.lo `test -f '$(top_srcdir)/cfb/cfbbres.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbres.c + +cfbline.lo: $(top_srcdir)/cfb/cfbline.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbline.lo -MD -MP -MF $(DEPDIR)/cfbline.Tpo -c -o cfbline.lo `test -f '$(top_srcdir)/cfb/cfbline.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbline.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbline.Tpo $(DEPDIR)/cfbline.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbline.c' object='cfbline.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbline.lo `test -f '$(top_srcdir)/cfb/cfbline.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbline.c + +cfbhrzvert.lo: $(top_srcdir)/cfb/cfbhrzvert.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbhrzvert.lo -MD -MP -MF $(DEPDIR)/cfbhrzvert.Tpo -c -o cfbhrzvert.lo `test -f '$(top_srcdir)/cfb/cfbhrzvert.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbhrzvert.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbhrzvert.Tpo $(DEPDIR)/cfbhrzvert.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbhrzvert.c' object='cfbhrzvert.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbhrzvert.lo `test -f '$(top_srcdir)/cfb/cfbhrzvert.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbhrzvert.c + +cfbbresd.lo: $(top_srcdir)/cfb/cfbbresd.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbbresd.lo -MD -MP -MF $(DEPDIR)/cfbbresd.Tpo -c -o cfbbresd.lo `test -f '$(top_srcdir)/cfb/cfbbresd.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbresd.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbbresd.Tpo $(DEPDIR)/cfbbresd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbbresd.c' object='cfbbresd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbbresd.lo `test -f '$(top_srcdir)/cfb/cfbbresd.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbresd.c + +cfbimage.lo: $(top_srcdir)/cfb/cfbimage.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbimage.lo -MD -MP -MF $(DEPDIR)/cfbimage.Tpo -c -o cfbimage.lo `test -f '$(top_srcdir)/cfb/cfbimage.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbimage.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbimage.Tpo $(DEPDIR)/cfbimage.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbimage.c' object='cfbimage.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbimage.lo `test -f '$(top_srcdir)/cfb/cfbimage.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbimage.c + +cfbcppl.lo: $(top_srcdir)/cfb/cfbcppl.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbcppl.lo -MD -MP -MF $(DEPDIR)/cfbcppl.Tpo -c -o cfbcppl.lo `test -f '$(top_srcdir)/cfb/cfbcppl.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbcppl.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbcppl.Tpo $(DEPDIR)/cfbcppl.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbcppl.c' object='cfbcppl.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbcppl.lo `test -f '$(top_srcdir)/cfb/cfbcppl.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbcppl.c + +cfbcmap.lo: $(top_srcdir)/cfb/cfbcmap.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbcmap.lo -MD -MP -MF $(DEPDIR)/cfbcmap.Tpo -c -o cfbcmap.lo `test -f '$(top_srcdir)/cfb/cfbcmap.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbcmap.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbcmap.Tpo $(DEPDIR)/cfbcmap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbcmap.c' object='cfbcmap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbcmap.lo `test -f '$(top_srcdir)/cfb/cfbcmap.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbcmap.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-sdkHEADERS: $(sdk_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(sdkdir)" || $(MKDIR_P) "$(DESTDIR)$(sdkdir)" + @list='$(sdk_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(sdkHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(sdkdir)/$$f'"; \ + $(sdkHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(sdkdir)/$$f"; \ + done + +uninstall-sdkHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(sdk_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(sdkdir)/$$f'"; \ + rm -f "$(DESTDIR)$(sdkdir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(sdkdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-sdkHEADERS + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-sdkHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sdkHEADERS install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-sdkHEADERS + + +cfbseg.c: + echo "#define POLYSEGMENT" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbline.c\"" >> $@ + +cfbfillarcC.c: + echo "#define RROP GXcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbfillarc.c\"" >> $@ + +cfbfillarcG.c: + echo "#define RROP GXset" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbfillarc.c\"" >> $@ + +cfbzerarcC.c: + echo "#define RROP GXcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbzerarc.c\"" >> $@ + +cfbzerarcX.c: + echo "#define RROP GXxor" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbzerarc.c\"" >> $@ + +cfbzerarcG.c: + echo "#define RROP GXset" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbzerarc.c\"" >> $@ + +cfbbltC.c: + echo "#define MROP Mcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbblt.c\"" >> $@ + +cfbbltX.c: + echo "#define MROP Mxor" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbblt.c\"" >> $@ + +cfbbltO.c: + echo "#define MROP Mor" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbblt.c\"" >> $@ + +cfbbltG.c: + echo "#define MROP 0" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbblt.c\"" >> $@ + +cfbsolidC.c: + echo "#define RROP GXcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbsolid.c\"" >> $@ + +cfbsolidX.c: + echo "#define RROP GXxor" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbsolid.c\"" >> $@ + +cfbsolidG.c: + echo "#define RROP GXset" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbsolid.c\"" >> $@ + +cfbtileoddC.c: + echo "#define MROP Mcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbtileodd.c\"" >> $@ + +cfbtileoddG.c: + echo "#define MROP 0" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbtileodd.c\"" >> $@ + +cfbtile32C.c: + echo "#define MROP Mcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbtile32.c\"" >> $@ + +cfbtile32G.c: + echo "#define MROP 0" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbtile32.c\"" >> $@ + +cfb8lineCO.c: + echo "#define RROP GXcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8lineCP.c: + echo "#define RROP GXcopy" > $@ + echo "#define PREVIOUS" >> $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8lineX.c: + echo "#define RROP GXxor" > $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8lineG.c: + echo "#define RROP GXset" > $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8segCS.c: + echo "#define RROP GXcopy" > $@ + echo "#define POLYSEGMENT" >> $@ + echo "#define WIDTH_SHIFT" >> $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8segC.c: + echo "#define RROP GXcopy" > $@ + echo "#define POLYSEGMENT" >> $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8segX.c: + echo "#define RROP GXxor" > $@ + echo "#define POLYSEGMENT" >> $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8setG.c: + echo "#define RROP GXset" > $@ + echo "#define POLYSEGMENT" >> $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfbply1rctC.c: + echo "#define RROP GXcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbply1rct.c\"" >> $@ + +cfbply1rctG.c: + echo "#define RROP GXset" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbply1rct.c\"" >> $@ + +cfbglrop8.c: + echo "#define GLYPHROP" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbglblt8.c\"" >> $@ + +@XPRINT_TRUE@cfb8bit.o: compiler.h + +@XPRINT_TRUE@compiler.h: +@XPRINT_TRUE@ echo "#include \"$(top_srcdir)/hw/xfree86/common/compiler.h\"" >> $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/cfb/cfb.h b/xorg-server-1.4/cfb/cfb.h new file mode 100644 index 0000000..8c682ae --- /dev/null +++ b/xorg-server-1.4/cfb/cfb.h @@ -0,0 +1,1319 @@ +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + 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 no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or The Open Group +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and The Open Group make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN 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 SUN 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. + +********************************************************/ + +#if !defined(__CFB_H__) || defined(CFB_PROTOTYPES_ONLY) + +#include +#include "globals.h" +#include "pixmap.h" +#include "region.h" +#include "gc.h" +#include "colormap.h" +#include "miscstruct.h" +#include "servermd.h" +#include "windowstr.h" +#include "mfb.h" +#undef PixelType + +#include "cfbmap.h" + +#ifndef CfbBits +#define CfbBits CARD32 +#endif + +#ifndef CFB_PROTOTYPES_ONLY +#define __CFB_H__ +/* + private filed of pixmap + pixmap.devPrivate = (unsigned int *)pointer_to_bits + pixmap.devKind = width_of_pixmap_in_bytes +*/ + +extern int cfbGCPrivateIndex; +extern int cfbWindowPrivateIndex; + +/* private field of GC */ +typedef struct { + unsigned char rop; /* special case rop values */ + /* next two values unused in cfb, included for compatibility with mfb */ + unsigned char ropOpStip; /* rop for opaque stipple */ + /* this value is ropFillArea in mfb, usurped for cfb */ + unsigned char oneRect; /* drawable has one clip rect */ + CfbBits xor, and; /* reduced rop values */ + } cfbPrivGC; + +typedef cfbPrivGC *cfbPrivGCPtr; + +#define cfbGetGCPrivate(pGC) ((cfbPrivGCPtr)\ + (pGC)->devPrivates[cfbGCPrivateIndex].ptr) + +#define cfbGetCompositeClip(pGC) ((pGC)->pCompositeClip) + +/* way to carry RROP info around */ +typedef struct { + unsigned char rop; + CfbBits xor, and; +} cfbRRopRec, *cfbRRopPtr; + +/* private field of window */ +typedef struct { + unsigned char fastBorder; /* non-zero if border is 32 bits wide */ + unsigned char fastBackground; + unsigned short unused; /* pad for alignment with Sun compiler */ + DDXPointRec oldRotate; + PixmapPtr pRotatedBackground; + PixmapPtr pRotatedBorder; + } cfbPrivWin; + +#define cfbGetWindowPrivate(_pWin) ((cfbPrivWin *)\ + (_pWin)->devPrivates[cfbWindowPrivateIndex].ptr) + + +/* cfb8bit.c */ + +extern int cfbSetStipple( + int /*alu*/, + CfbBits /*fg*/, + CfbBits /*planemask*/ +); + +extern int cfbSetOpaqueStipple( + int /*alu*/, + CfbBits /*fg*/, + CfbBits /*bg*/, + CfbBits /*planemask*/ +); + +extern int cfbComputeClipMasks32( + BoxPtr /*pBox*/, + int /*numRects*/, + int /*x*/, + int /*y*/, + int /*w*/, + int /*h*/, + CARD32 * /*clips*/ +); +#endif /* !CFB_PROTOTYPES_ONLY */ +/* cfb8cppl.c */ + +extern void cfbCopyImagePlane( + DrawablePtr /*pSrcDrawable*/, + DrawablePtr /*pDstDrawable*/, + int /*rop*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/ +); + +#ifndef CFB_PROTOTYPES_ONLY +extern void cfbCopyPlane8to1( + DrawablePtr /*pSrcDrawable*/, + DrawablePtr /*pDstDrawable*/, + int /*rop*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/, + unsigned long /*bitPlane*/ +); + +extern void cfbCopyPlane16to1( + DrawablePtr /*pSrcDrawable*/, + DrawablePtr /*pDstDrawable*/, + int /*rop*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/, + unsigned long /*bitPlane*/ +); + +extern void cfbCopyPlane24to1( + DrawablePtr /*pSrcDrawable*/, + DrawablePtr /*pDstDrawable*/, + int /*rop*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/, + unsigned long /*bitPlane*/ +); + +extern void cfbCopyPlane32to1( + DrawablePtr /*pSrcDrawable*/, + DrawablePtr /*pDstDrawable*/, + int /*rop*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/, + unsigned long /*bitPlane*/ +); +#endif + +/* cfb8lineCO.c */ + +extern int cfb8LineSS1RectCopy( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*mode*/, + int /*npt*/, + DDXPointPtr /*pptInit*/, + DDXPointPtr /*pptInitOrig*/, + int * /*x1p*/, + int * /*y1p*/, + int * /*x2p*/, + int * /*y2p*/ +); + +extern void cfb8LineSS1Rect( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*mode*/, + int /*npt*/, + DDXPointPtr /*pptInit*/ +); + +extern void cfb8ClippedLineCopy( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*x1*/, + int /*y1*/, + int /*x2*/, + int /*y2*/, + BoxPtr /*boxp*/, + Bool /*shorten*/ +); +/* cfb8lineCP.c */ + +extern int cfb8LineSS1RectPreviousCopy( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*mode*/, + int /*npt*/, + DDXPointPtr /*pptInit*/, + DDXPointPtr /*pptInitOrig*/, + int * /*x1p*/, + int * /*y1p*/, + int * /*x2p*/, + int * /*y2p*/ +); +/* cfb8lineG.c */ + +extern int cfb8LineSS1RectGeneral( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*mode*/, + int /*npt*/, + DDXPointPtr /*pptInit*/, + DDXPointPtr /*pptInitOrig*/, + int * /*x1p*/, + int * /*y1p*/, + int * /*x2p*/, + int * /*y2p*/ +); + +extern void cfb8ClippedLineGeneral( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*x1*/, + int /*y1*/, + int /*x2*/, + int /*y2*/, + BoxPtr /*boxp*/, + Bool /*shorten*/ +); +/* cfb8lineX.c */ + +extern int cfb8LineSS1RectXor( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*mode*/, + int /*npt*/, + DDXPointPtr /*pptInit*/, + DDXPointPtr /*pptInitOrig*/, + int * /*x1p*/, + int * /*y1p*/, + int * /*x2p*/, + int * /*y2p*/ +); + +extern void cfb8ClippedLineXor( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*x1*/, + int /*y1*/, + int /*x2*/, + int /*y2*/, + BoxPtr /*boxp*/, + Bool /*shorten*/ +); +/* cfb8segC.c */ + +extern int cfb8SegmentSS1RectCopy( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nseg*/, + xSegment * /*pSegInit*/ +); +/* cfb8segCS.c */ + +extern int cfb8SegmentSS1RectShiftCopy( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nseg*/, + xSegment * /*pSegInit*/ +); + +extern void cfb8SegmentSS1Rect( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nseg*/, + xSegment * /*pSegInit*/ +); +/* cfb8segG.c */ + +extern int cfb8SegmentSS1RectGeneral( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nseg*/, + xSegment * /*pSegInit*/ +); +/* cfbsegX.c */ + +extern int cfb8SegmentSS1RectXor( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nseg*/, + xSegment * /*pSegInit*/ +); +/* cfballpriv.c */ + +extern Bool cfbAllocatePrivates( + ScreenPtr /*pScreen*/, + int * /*window_index*/, + int * /*gc_index*/ +); +/* cfbbitblt.c */ + +extern RegionPtr cfbBitBlt( + DrawablePtr /*pSrcDrawable*/, + DrawablePtr /*pDstDrawable*/, + GCPtr/*pGC*/, + int /*srcx*/, + int /*srcy*/, + int /*width*/, + int /*height*/, + int /*dstx*/, + int /*dsty*/, + void (* /*doBitBlt*/)( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/ + ), + unsigned long /*bitPlane*/ +); + +#define cfbCopyPlaneExpand cfbBitBlt + +extern RegionPtr cfbCopyPlaneReduce( + DrawablePtr /*pSrcDrawable*/, + DrawablePtr /*pDstDrawable*/, + GCPtr /*pGC*/, + int /*srcx*/, + int /*srcy*/, + int /*width*/, + int /*height*/, + int /*dstx*/, + int /*dsty*/, + void (* /*doCopyPlane*/)( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/, + unsigned long /*bitPlane*/ /* We must know which plane to reduce! */ + ), + unsigned long /*bitPlane*/ +); + +extern void cfbDoBitblt( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/ +); + +extern RegionPtr cfbCopyArea( + DrawablePtr /*pSrcDrawable*/, + DrawablePtr /*pDstDrawable*/, + GCPtr/*pGC*/, + int /*srcx*/, + int /*srcy*/, + int /*width*/, + int /*height*/, + int /*dstx*/, + int /*dsty*/ +); + +#ifndef CFB_PROTOTYPES_ONLY +extern void cfbCopyPlane1to8( + DrawablePtr /*pSrcDrawable*/, + DrawablePtr /*pDstDrawable*/, + int /*rop*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/ +); +#endif + +extern RegionPtr cfbCopyPlane( + DrawablePtr /*pSrcDrawable*/, + DrawablePtr /*pDstDrawable*/, + GCPtr /*pGC*/, + int /*srcx*/, + int /*srcy*/, + int /*width*/, + int /*height*/, + int /*dstx*/, + int /*dsty*/, + unsigned long /*bitPlane*/ +); +/* cfbbltC.c */ + +extern void cfbDoBitbltCopy( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/ +); +/* cfbbltG.c */ + +extern void cfbDoBitbltGeneral( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/ +); +/* cfbbltO.c */ + +extern void cfbDoBitbltOr( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/ +); +/* cfbbltX.c */ + +extern void cfbDoBitbltXor( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/ +); +/* cfbbres.c */ + +extern void cfbBresS( + int /*rop*/, + CfbBits /*and*/, + CfbBits /*xor*/, + CfbBits * /*addrl*/, + int /*nlwidth*/, + int /*signdx*/, + int /*signdy*/, + int /*axis*/, + int /*x1*/, + int /*y1*/, + int /*e*/, + int /*e1*/, + int /*e2*/, + int /*len*/ +); +/* cfbbresd.c */ + +extern void cfbBresD( + cfbRRopPtr /*rrops*/, + int * /*pdashIndex*/, + unsigned char * /*pDash*/, + int /*numInDashList*/, + int * /*pdashOffset*/, + int /*isDoubleDash*/, + CfbBits * /*addrl*/, + int /*nlwidth*/, + int /*signdx*/, + int /*signdy*/, + int /*axis*/, + int /*x1*/, + int /*y1*/, + int /*e*/, + int /*e1*/, + int /*e2*/, + int /*len*/ +); +/* cfbbstore.c */ + +extern void cfbSaveAreas( + PixmapPtr /*pPixmap*/, + RegionPtr /*prgnSave*/, + int /*xorg*/, + int /*yorg*/, + WindowPtr /*pWin*/ +); + +extern void cfbRestoreAreas( + PixmapPtr /*pPixmap*/, + RegionPtr /*prgnRestore*/, + int /*xorg*/, + int /*yorg*/, + WindowPtr /*pWin*/ +); +/* cfbcmap.c */ + +#ifndef CFB_PROTOTYPES_ONLY +extern int cfbListInstalledColormaps( + ScreenPtr /*pScreen*/, + Colormap * /*pmaps*/ +); + +extern void cfbInstallColormap( + ColormapPtr /*pmap*/ +); + +extern void cfbUninstallColormap( + ColormapPtr /*pmap*/ +); + +extern void cfbResolveColor( + unsigned short * /*pred*/, + unsigned short * /*pgreen*/, + unsigned short * /*pblue*/, + VisualPtr /*pVisual*/ +); + +extern Bool cfbInitializeColormap( + ColormapPtr /*pmap*/ +); + +extern int cfbExpandDirectColors( + ColormapPtr /*pmap*/, + int /*ndef*/, + xColorItem * /*indefs*/, + xColorItem * /*outdefs*/ +); + +extern Bool cfbCreateDefColormap( + ScreenPtr /*pScreen*/ +); + +extern Bool cfbSetVisualTypes( + int /*depth*/, + int /*visuals*/, + int /*bitsPerRGB*/ +); + +extern void cfbClearVisualTypes(void); + +extern Bool cfbInitVisuals( + VisualPtr * /*visualp*/, + DepthPtr * /*depthp*/, + int * /*nvisualp*/, + int * /*ndepthp*/, + int * /*rootDepthp*/, + VisualID * /*defaultVisp*/, + unsigned long /*sizes*/, + int /*bitsPerRGB*/ +); +#endif +/* cfbfillarcC.c */ + +extern void cfbPolyFillArcSolidCopy( + DrawablePtr /*pDraw*/, + GCPtr /*pGC*/, + int /*narcs*/, + xArc * /*parcs*/ +); +/* cfbfillarcG.c */ + +extern void cfbPolyFillArcSolidGeneral( + DrawablePtr /*pDraw*/, + GCPtr /*pGC*/, + int /*narcs*/, + xArc * /*parcs*/ +); +/* cfbfillrct.c */ + +extern void cfbFillBoxTileOdd( + DrawablePtr /*pDrawable*/, + int /*n*/, + BoxPtr /*rects*/, + PixmapPtr /*tile*/, + int /*xrot*/, + int /*yrot*/ +); + +extern void cfbFillRectTileOdd( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nBox*/, + BoxPtr /*pBox*/ +); + +extern void cfbPolyFillRect( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nrectFill*/, + xRectangle * /*prectInit*/ +); +/* cfbfillsp.c */ + +extern void cfbUnnaturalTileFS( + DrawablePtr /*pDrawable*/, + GCPtr/*pGC*/, + int /*nInit*/, + DDXPointPtr /*pptInit*/, + int * /*pwidthInit*/, + int /*fSorted*/ +); + +extern void cfbUnnaturalStippleFS( + DrawablePtr /*pDrawable*/, + GCPtr/*pGC*/, + int /*nInit*/, + DDXPointPtr /*pptInit*/, + int * /*pwidthInit*/, + int /*fSorted*/ +); + +#ifndef CFB_PROTOTYPES_ONLY +extern void cfb8Stipple32FS( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nInit*/, + DDXPointPtr /*pptInit*/, + int * /*pwidthInit*/, + int /*fSorted*/ +); + +extern void cfb8OpaqueStipple32FS( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nInit*/, + DDXPointPtr /*pptInit*/, + int * /*pwidthInit*/, + int /*fSorted*/ +); +#endif +/* cfbgc.c */ + +extern GCOpsPtr cfbMatchCommon( + GCPtr /*pGC*/, + cfbPrivGCPtr /*devPriv*/ +); + +extern Bool cfbCreateGC( + GCPtr /*pGC*/ +); + +extern void cfbValidateGC( + GCPtr /*pGC*/, + unsigned long /*changes*/, + DrawablePtr /*pDrawable*/ +); + +/* cfbgetsp.c */ + +extern void cfbGetSpans( + DrawablePtr /*pDrawable*/, + int /*wMax*/, + DDXPointPtr /*ppt*/, + int * /*pwidth*/, + int /*nspans*/, + char * /*pdstStart*/ +); +/* cfbglblt8.c */ + +extern void cfbPolyGlyphBlt8( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*x*/, + int /*y*/, + unsigned int /*nglyph*/, + CharInfoPtr * /*ppci*/, + pointer /*pglyphBase*/ +); +/* cfbglrop8.c */ + +extern void cfbPolyGlyphRop8( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*x*/, + int /*y*/, + unsigned int /*nglyph*/, + CharInfoPtr * /*ppci*/, + pointer /*pglyphBase*/ +); +/* cfbhrzvert.c */ + +extern void cfbHorzS( + int /*rop*/, + CfbBits /*and*/, + CfbBits /*xor*/, + CfbBits * /*addrl*/, + int /*nlwidth*/, + int /*x1*/, + int /*y1*/, + int /*len*/ +); + +extern void cfbVertS( + int /*rop*/, + CfbBits /*and*/, + CfbBits /*xor*/, + CfbBits * /*addrl*/, + int /*nlwidth*/, + int /*x1*/, + int /*y1*/, + int /*len*/ +); +/* cfbigblt8.c */ + +extern void cfbImageGlyphBlt8( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*x*/, + int /*y*/, + unsigned int /*nglyph*/, + CharInfoPtr * /*ppci*/, + pointer /*pglyphBase*/ +); +/* cfbimage.c */ + +extern void cfbPutImage( + DrawablePtr /*pDraw*/, + GCPtr /*pGC*/, + int /*depth*/, + int /*x*/, + int /*y*/, + int /*w*/, + int /*h*/, + int /*leftPad*/, + int /*format*/, + char * /*pImage*/ +); + +extern void cfbGetImage( + DrawablePtr /*pDrawable*/, + int /*sx*/, + int /*sy*/, + int /*w*/, + int /*h*/, + unsigned int /*format*/, + unsigned long /*planeMask*/, + char * /*pdstLine*/ +); +/* cfbline.c */ + +extern void cfbLineSS( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*mode*/, + int /*npt*/, + DDXPointPtr /*pptInit*/ +); + +extern void cfbLineSD( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*mode*/, + int /*npt*/, + DDXPointPtr /*pptInit*/ +); +/* cfbmskbits.c */ +/* cfbpixmap.c */ + +extern PixmapPtr cfbCreatePixmap( + ScreenPtr /*pScreen*/, + int /*width*/, + int /*height*/, + int /*depth*/ +); + +extern Bool cfbDestroyPixmap( + PixmapPtr /*pPixmap*/ +); + +extern PixmapPtr cfbCopyPixmap( + PixmapPtr /*pSrc*/ +); + +extern void cfbPadPixmap( + PixmapPtr /*pPixmap*/ +); + +extern void cfbXRotatePixmap( + PixmapPtr /*pPix*/, + int /*rw*/ +); + +extern void cfbYRotatePixmap( + PixmapPtr /*pPix*/, + int /*rh*/ +); + +extern void cfbCopyRotatePixmap( + PixmapPtr /*psrcPix*/, + PixmapPtr * /*ppdstPix*/, + int /*xrot*/, + int /*yrot*/ +); +/* cfbply1rctC.c */ + +extern void cfbFillPoly1RectCopy( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*shape*/, + int /*mode*/, + int /*count*/, + DDXPointPtr /*ptsIn*/ +); +/* cfbply1rctG.c */ + +extern void cfbFillPoly1RectGeneral( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*shape*/, + int /*mode*/, + int /*count*/, + DDXPointPtr /*ptsIn*/ +); +/* cfbpntwin.c */ + +extern void cfbPaintWindow( + WindowPtr /*pWin*/, + RegionPtr /*pRegion*/, + int /*what*/ +); + +extern void cfbFillBoxSolid( + DrawablePtr /*pDrawable*/, + int /*nBox*/, + BoxPtr /*pBox*/, + unsigned long /*pixel*/ +); + +extern void cfbFillBoxTile32( + DrawablePtr /*pDrawable*/, + int /*nBox*/, + BoxPtr /*pBox*/, + PixmapPtr /*tile*/ +); +/* cfbpolypnt.c */ + +extern void cfbPolyPoint( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*mode*/, + int /*npt*/, + xPoint * /*pptInit*/ +); +/* cfbpush8.c */ + +#ifndef CFB_PROTOTYPES_ONLY +extern void cfbPushPixels8( + GCPtr /*pGC*/, + PixmapPtr /*pBitmap*/, + DrawablePtr /*pDrawable*/, + int /*dx*/, + int /*dy*/, + int /*xOrg*/, + int /*yOrg*/ +); +/* cfbrctstp8.c */ + +extern void cfb8FillRectOpaqueStippled32( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nBox*/, + BoxPtr /*pBox*/ +); + +extern void cfb8FillRectTransparentStippled32( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nBox*/, + BoxPtr /*pBox*/ +); + +extern void cfb8FillRectStippledUnnatural( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nBox*/, + BoxPtr /*pBox*/ +); +#endif +/* cfbrrop.c */ + +extern int cfbReduceRasterOp( + int /*rop*/, + CfbBits /*fg*/, + CfbBits /*pm*/, + CfbBits * /*andp*/, + CfbBits * /*xorp*/ +); +/* cfbscrinit.c */ + +extern Bool cfbCloseScreen( + int /*index*/, + ScreenPtr /*pScreen*/ +); + +extern Bool cfbSetupScreen( + ScreenPtr /*pScreen*/, + pointer /*pbits*/, + int /*xsize*/, + int /*ysize*/, + int /*dpix*/, + int /*dpiy*/, + int /*width*/ +); + +extern Bool cfbFinishScreenInit( + ScreenPtr /*pScreen*/, + pointer /*pbits*/, + int /*xsize*/, + int /*ysize*/, + int /*dpix*/, + int /*dpiy*/, + int /*width*/ +); + +extern Bool cfbScreenInit( + ScreenPtr /*pScreen*/, + pointer /*pbits*/, + int /*xsize*/, + int /*ysize*/, + int /*dpix*/, + int /*dpiy*/, + int /*width*/ +); + +extern PixmapPtr cfbGetScreenPixmap( + ScreenPtr /*pScreen*/ +); + +extern void cfbSetScreenPixmap( + PixmapPtr /*pPix*/ +); + +/* cfbseg.c */ + +extern void cfbSegmentSS( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nseg*/, + xSegment * /*pSeg*/ +); + +extern void cfbSegmentSD( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nseg*/, + xSegment * /*pSeg*/ +); +/* cfbsetsp.c */ + +extern void cfbSetScanline( + int /*y*/, + int /*xOrigin*/, + int /*xStart*/, + int /*xEnd*/, + unsigned int * /*psrc*/, + int /*alu*/, + int * /*pdstBase*/, + int /*widthDst*/, + unsigned long /*planemask*/ +); + +extern void cfbSetSpans( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + char * /*psrc*/, + DDXPointPtr /*ppt*/, + int * /*pwidth*/, + int /*nspans*/, + int /*fSorted*/ +); +/* cfbsolidC.c */ + +extern void cfbFillRectSolidCopy( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nBox*/, + BoxPtr /*pBox*/ +); + +extern void cfbSolidSpansCopy( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nInit*/, + DDXPointPtr /*pptInit*/, + int * /*pwidthInit*/, + int /*fSorted*/ +); +/* cfbsolidG.c */ + +extern void cfbFillRectSolidGeneral( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nBox*/, + BoxPtr /*pBox*/ +); + +extern void cfbSolidSpansGeneral( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nInit*/, + DDXPointPtr /*pptInit*/, + int * /*pwidthInit*/, + int /*fSorted*/ +); +/* cfbsolidX.c */ + +extern void cfbFillRectSolidXor( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nBox*/, + BoxPtr /*pBox*/ +); + +extern void cfbSolidSpansXor( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nInit*/, + DDXPointPtr /*pptInit*/, + int * /*pwidthInit*/, + int /*fSorted*/ +); +/* cfbteblt8.c */ + +#ifndef CFB_PROTOTYPES_ONLY +extern void cfbTEGlyphBlt8( + DrawablePtr /*pDrawable*/, + GCPtr/*pGC*/, + int /*xInit*/, + int /*yInit*/, + unsigned int /*nglyph*/, + CharInfoPtr * /*ppci*/, + pointer /*pglyphBase*/ +); +#endif +/* cfbtegblt.c */ + +extern void cfbTEGlyphBlt( + DrawablePtr /*pDrawable*/, + GCPtr/*pGC*/, + int /*x*/, + int /*y*/, + unsigned int /*nglyph*/, + CharInfoPtr * /*ppci*/, + pointer /*pglyphBase*/ +); +/* cfbtile32C.c */ + +extern void cfbFillRectTile32Copy( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nBox*/, + BoxPtr /*pBox*/ +); + +extern void cfbTile32FSCopy( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nInit*/, + DDXPointPtr /*pptInit*/, + int * /*pwidthInit*/, + int /*fSorted*/ +); +/* cfbtile32G.c */ + +extern void cfbFillRectTile32General( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nBox*/, + BoxPtr /*pBox*/ +); + +extern void cfbTile32FSGeneral( + DrawablePtr /*pDrawable*/, + GCPtr /*pGC*/, + int /*nInit*/, + DDXPointPtr /*pptInit*/, + int * /*pwidthInit*/, + int /*fSorted*/ +); +/* cfbtileoddC.c */ + +extern void cfbFillBoxTileOddCopy( + DrawablePtr /*pDrawable*/, + int /*nBox*/, + BoxPtr /*pBox*/, + PixmapPtr /*tile*/, + int /*xrot*/, + int /*yrot*/, + int /*alu*/, + unsigned long /*planemask*/ +); + +extern void cfbFillSpanTileOddCopy( + DrawablePtr /*pDrawable*/, + int /*n*/, + DDXPointPtr /*ppt*/, + int * /*pwidth*/, + PixmapPtr /*tile*/, + int /*xrot*/, + int /*yrot*/, + int /*alu*/, + unsigned long /*planemask*/ +); + +extern void cfbFillBoxTile32sCopy( + DrawablePtr /*pDrawable*/, + int /*nBox*/, + BoxPtr /*pBox*/, + PixmapPtr /*tile*/, + int /*xrot*/, + int /*yrot*/, + int /*alu*/, + unsigned long /*planemask*/ +); + +extern void cfbFillSpanTile32sCopy( + DrawablePtr /*pDrawable*/, + int /*n*/, + DDXPointPtr /*ppt*/, + int * /*pwidth*/, + PixmapPtr /*tile*/, + int /*xrot*/, + int /*yrot*/, + int /*alu*/, + unsigned long /*planemask*/ +); +/* cfbtileoddG.c */ + +extern void cfbFillBoxTileOddGeneral( + DrawablePtr /*pDrawable*/, + int /*nBox*/, + BoxPtr /*pBox*/, + PixmapPtr /*tile*/, + int /*xrot*/, + int /*yrot*/, + int /*alu*/, + unsigned long /*planemask*/ +); + +extern void cfbFillSpanTileOddGeneral( + DrawablePtr /*pDrawable*/, + int /*n*/, + DDXPointPtr /*ppt*/, + int * /*pwidth*/, + PixmapPtr /*tile*/, + int /*xrot*/, + int /*yrot*/, + int /*alu*/, + unsigned long /*planemask*/ +); + +extern void cfbFillBoxTile32sGeneral( + DrawablePtr /*pDrawable*/, + int /*nBox*/, + BoxPtr /*pBox*/, + PixmapPtr /*tile*/, + int /*xrot*/, + int /*yrot*/, + int /*alu*/, + unsigned long /*planemask*/ +); + +extern void cfbFillSpanTile32sGeneral( + DrawablePtr /*pDrawable*/, + int /*n*/, + DDXPointPtr /*ppt*/, + int * /*pwidth*/, + PixmapPtr /*tile*/, + int /*xrot*/, + int /*yrot*/, + int /*alu*/, + unsigned long /*planemask*/ +); +/* cfbwindow.c */ + +extern Bool cfbCreateWindow( + WindowPtr /*pWin*/ +); + +extern Bool cfbDestroyWindow( + WindowPtr /*pWin*/ +); + +extern Bool cfbMapWindow( + WindowPtr /*pWindow*/ +); + +extern Bool cfbPositionWindow( + WindowPtr /*pWin*/, + int /*x*/, + int /*y*/ +); + +extern Bool cfbUnmapWindow( + WindowPtr /*pWindow*/ +); + +extern void cfbCopyWindow( + WindowPtr /*pWin*/, + DDXPointRec /*ptOldOrg*/, + RegionPtr /*prgnSrc*/ +); + +extern Bool cfbChangeWindowAttributes( + WindowPtr /*pWin*/, + unsigned long /*mask*/ +); +/* cfbzerarcC.c */ + +extern void cfbZeroPolyArcSS8Copy( + DrawablePtr /*pDraw*/, + GCPtr /*pGC*/, + int /*narcs*/, + xArc * /*parcs*/ +); +/* cfbzerarcG.c */ + +extern void cfbZeroPolyArcSS8General( + DrawablePtr /*pDraw*/, + GCPtr /*pGC*/, + int /*narcs*/, + xArc * /*parcs*/ +); +/* cfbzerarcX.c */ + +extern void cfbZeroPolyArcSS8Xor( + DrawablePtr /*pDraw*/, + GCPtr /*pGC*/, + int /*narcs*/, + xArc * /*parcs*/ +); + +#if (!defined(SINGLEDEPTH) && PSZ != 8) || defined(FORCE_SEPARATE_PRIVATE) + +#define CFB_NEED_SCREEN_PRIVATE + +extern int cfbScreenPrivateIndex; +#endif + +#ifndef CFB_PROTOTYPES_ONLY + +/* Common macros for extracting drawing information */ + +#define cfbGetWindowPixmap(d) \ + ((* ((DrawablePtr)(d))->pScreen->GetWindowPixmap)((WindowPtr)(d))) + +#define cfbGetTypedWidth(pDrawable,wtype) (\ + (((pDrawable)->type != DRAWABLE_PIXMAP) ? \ + (int) (cfbGetWindowPixmap(pDrawable)->devKind) : \ + (int)(((PixmapPtr)pDrawable)->devKind)) / sizeof (wtype)) + +#define cfbGetByteWidth(pDrawable) cfbGetTypedWidth(pDrawable, unsigned char) + +#define cfbGetPixelWidth(pDrawable) cfbGetTypedWidth(pDrawable, PixelType) + +#define cfbGetLongWidth(pDrawable) cfbGetTypedWidth(pDrawable, CfbBits) + +#define cfbGetTypedWidthAndPointer(pDrawable, width, pointer, wtype, ptype) {\ + PixmapPtr _pPix; \ + if ((pDrawable)->type != DRAWABLE_PIXMAP) \ + _pPix = cfbGetWindowPixmap(pDrawable); \ + else \ + _pPix = (PixmapPtr) (pDrawable); \ + (pointer) = (ptype *) _pPix->devPrivate.ptr; \ + (width) = ((int) _pPix->devKind) / sizeof (wtype); \ +} + +#define cfbGetByteWidthAndPointer(pDrawable, width, pointer) \ + cfbGetTypedWidthAndPointer(pDrawable, width, pointer, unsigned char, unsigned char) + +#define cfbGetLongWidthAndPointer(pDrawable, width, pointer) \ + cfbGetTypedWidthAndPointer(pDrawable, width, pointer, CfbBits, CfbBits) + +#define cfbGetPixelWidthAndPointer(pDrawable, width, pointer) \ + cfbGetTypedWidthAndPointer(pDrawable, width, pointer, PixelType, PixelType) + +#define cfbGetWindowTypedWidthAndPointer(pWin, width, pointer, wtype, ptype) {\ + PixmapPtr _pPix = cfbGetWindowPixmap((DrawablePtr) (pWin)); \ + (pointer) = (ptype *) _pPix->devPrivate.ptr; \ + (width) = ((int) _pPix->devKind) / sizeof (wtype); \ +} + +#define cfbGetWindowLongWidthAndPointer(pWin, width, pointer) \ + cfbGetWindowTypedWidthAndPointer(pWin, width, pointer, CfbBits, CfbBits) + +#define cfbGetWindowByteWidthAndPointer(pWin, width, pointer) \ + cfbGetWindowTypedWidthAndPointer(pWin, width, pointer, unsigned char, unsigned char) + +#define cfbGetWindowPixelWidthAndPointer(pDrawable, width, pointer) \ + cfbGetWindowTypedWidthAndPointer(pDrawable, width, pointer, PixelType, PixelType) + +/* + * XFree86 empties the root BorderClip when the VT is inactive, + * here's a macro which uses that to disable GetImage and GetSpans + */ +#define cfbWindowEnabled(pWin) \ + REGION_NOTEMPTY((pWin)->drawable.pScreen, \ + &WindowTable[(pWin)->drawable.pScreen->myNum]->borderClip) + +#define cfbDrawableEnabled(pDrawable) \ + ((pDrawable)->type == DRAWABLE_PIXMAP ? \ + TRUE : cfbWindowEnabled((WindowPtr) pDrawable)) + +#include "micoord.h" + +#endif /* !CFB_PROTOTYPES_ONLY */ + +#endif diff --git a/xorg-server-1.4/cfb/cfb16.h b/xorg-server-1.4/cfb/cfb16.h new file mode 100644 index 0000000..6b5c302 --- /dev/null +++ b/xorg-server-1.4/cfb/cfb16.h @@ -0,0 +1,93 @@ +/* + * Copyright (C) 1994-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. + */ + +#ifndef _CFB16_H_ +#define _CFB16_H_ + +/* + * C's preprocessing language substitutes >text<, not values... + */ + +#ifdef OLDPSZ +# undef OLDPSZ +#endif + +#ifdef PSZ + +# if (PSZ == 8) +# define OLDPSZ 8 +# endif + +# if (PSZ == 16) +# define OLDPSZ 16 +# endif + +# if (PSZ == 24) +# define OLDPSZ 24 +# endif + +# if (PSZ == 32) +# define OLDPSZ 32 +# endif + +# ifndef OLDPSZ + /* Maybe an #error here ? */ +# endif + +# undef PSZ + +#endif + +#define PSZ 16 +#define CFB_PROTOTYPES_ONLY +#include "cfb.h" +#undef CFB_PROTOTYPES_ONLY +#include "cfbunmap.h" + +#undef PSZ +#ifdef OLDPSZ + +# if (OLDPSZ == 8) +# define PSZ 8 +# endif + +# if (OLDPSZ == 16) +# define PSZ 16 +# endif + +# if (OLDPSZ == 24) +# define PSZ 24 +# endif + +# if (OLDPSZ == 32) +# define PSZ 32 +# endif + +# undef OLDPSZ + +#endif + +#endif /* _CFB16_H_ */ diff --git a/xorg-server-1.4/cfb/cfb24.h b/xorg-server-1.4/cfb/cfb24.h new file mode 100644 index 0000000..ea5fc84 --- /dev/null +++ b/xorg-server-1.4/cfb/cfb24.h @@ -0,0 +1,97 @@ +/* + * Copyright (C) 1994-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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _CFB24_H_ +#define _CFB24_H_ + +/* + * C's preprocessing language substitutes >text<, not values... + */ + +#ifdef OLDPSZ +# undef OLDPSZ +#endif + +#ifdef PSZ + +# if (PSZ == 8) +# define OLDPSZ 8 +# endif + +# if (PSZ == 16) +# define OLDPSZ 16 +# endif + +# if (PSZ == 24) +# define OLDPSZ 24 +# endif + +# if (PSZ == 32) +# define OLDPSZ 32 +# endif + +# ifndef OLDPSZ + /* Maybe an #error here ? */ +# endif + +# undef PSZ + +#endif + +#define PSZ 24 +#define CFB_PROTOTYPES_ONLY +#include "cfb.h" +#undef CFB_PROTOTYPES_ONLY +#include "cfbunmap.h" + +#undef PSZ +#ifdef OLDPSZ + +# if (OLDPSZ == 8) +# define PSZ 8 +# endif + +# if (OLDPSZ == 16) +# define PSZ 16 +# endif + +# if (OLDPSZ == 24) +# define PSZ 24 +# endif + +# if (OLDPSZ == 32) +# define PSZ 32 +# endif + +# undef OLDPSZ + +#endif + +#endif /* _CFB24_H_ */ diff --git a/xorg-server-1.4/cfb/cfb32.h b/xorg-server-1.4/cfb/cfb32.h new file mode 100644 index 0000000..18a5dc1 --- /dev/null +++ b/xorg-server-1.4/cfb/cfb32.h @@ -0,0 +1,93 @@ +/* + * Copyright (C) 1994-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. + */ + +#ifndef _CFB32_H_ +#define _CFB32_H_ + +/* + * C's preprocessing language substitutes >text<, not values... + */ + +#ifdef OLDPSZ +# undef OLDPSZ +#endif + +#ifdef PSZ + +# if (PSZ == 8) +# define OLDPSZ 8 +# endif + +# if (PSZ == 16) +# define OLDPSZ 16 +# endif + +# if (PSZ == 24) +# define OLDPSZ 24 +# endif + +# if (PSZ == 32) +# define OLDPSZ 32 +# endif + +# ifndef OLDPSZ + /* Maybe an #error here ? */ +# endif + +# undef PSZ + +#endif + +#define PSZ 32 +#define CFB_PROTOTYPES_ONLY +#include "cfb.h" +#undef CFB_PROTOTYPES_ONLY +#include "cfbunmap.h" + +#undef PSZ +#ifdef OLDPSZ + +# if (OLDPSZ == 8) +# define PSZ 8 +# endif + +# if (OLDPSZ == 16) +# define PSZ 16 +# endif + +# if (OLDPSZ == 24) +# define PSZ 24 +# endif + +# if (OLDPSZ == 32) +# define PSZ 32 +# endif + +# undef OLDPSZ + +#endif + +#endif /* _CFB32_H_ */ diff --git a/xorg-server-1.4/cfb/cfb8bit.c b/xorg-server-1.4/cfb/cfb8bit.c new file mode 100644 index 0000000..54a08c5 --- /dev/null +++ b/xorg-server-1.4/cfb/cfb8bit.c @@ -0,0 +1,469 @@ +/* + +Copyright 1989, 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. + +*/ + +/* + * cfb8bit.c + * + * 8 bit color frame buffer utility routines + */ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#if PSZ == 8 + +#include +#include +#include +#include "gcstruct.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "cfb.h" +#include "cfbmskbits.h" +#include "cfb8bit.h" + +PixelGroup cfb8StippleMasks[NUM_MASKS] = { +#if NUM_MASKS == 16 + 0x00000000, 0x000000ff, 0x0000ff00, 0x0000ffff, + 0x00ff0000, 0x00ff00ff, 0x00ffff00, 0x00ffffff, + 0xff000000, 0xff0000ff, 0xff00ff00, 0xff00ffff, + 0xffff0000, 0xffff00ff, 0xffffff00, 0xffffffff +#else /* NUM_MASKS == 256 */ + 0x0000000000000000, 0x00000000000000ff, + 0x000000000000ff00, 0x000000000000ffff, + 0x0000000000ff0000, 0x0000000000ff00ff, + 0x0000000000ffff00, 0x0000000000ffffff, + 0x00000000ff000000, 0x00000000ff0000ff, + 0x00000000ff00ff00, 0x00000000ff00ffff, + 0x00000000ffff0000, 0x00000000ffff00ff, + 0x00000000ffffff00, 0x00000000ffffffff, + 0x000000ff00000000, 0x000000ff000000ff, + 0x000000ff0000ff00, 0x000000ff0000ffff, + 0x000000ff00ff0000, 0x000000ff00ff00ff, + 0x000000ff00ffff00, 0x000000ff00ffffff, + 0x000000ffff000000, 0x000000ffff0000ff, + 0x000000ffff00ff00, 0x000000ffff00ffff, + 0x000000ffffff0000, 0x000000ffffff00ff, + 0x000000ffffffff00, 0x000000ffffffffff, + 0x0000ff0000000000, 0x0000ff00000000ff, + 0x0000ff000000ff00, 0x0000ff000000ffff, + 0x0000ff0000ff0000, 0x0000ff0000ff00ff, + 0x0000ff0000ffff00, 0x0000ff0000ffffff, + 0x0000ff00ff000000, 0x0000ff00ff0000ff, + 0x0000ff00ff00ff00, 0x0000ff00ff00ffff, + 0x0000ff00ffff0000, 0x0000ff00ffff00ff, + 0x0000ff00ffffff00, 0x0000ff00ffffffff, + 0x0000ffff00000000, 0x0000ffff000000ff, + 0x0000ffff0000ff00, 0x0000ffff0000ffff, + 0x0000ffff00ff0000, 0x0000ffff00ff00ff, + 0x0000ffff00ffff00, 0x0000ffff00ffffff, + 0x0000ffffff000000, 0x0000ffffff0000ff, + 0x0000ffffff00ff00, 0x0000ffffff00ffff, + 0x0000ffffffff0000, 0x0000ffffffff00ff, + 0x0000ffffffffff00, 0x0000ffffffffffff, + 0x00ff000000000000, 0x00ff0000000000ff, + 0x00ff00000000ff00, 0x00ff00000000ffff, + 0x00ff000000ff0000, 0x00ff000000ff00ff, + 0x00ff000000ffff00, 0x00ff000000ffffff, + 0x00ff0000ff000000, 0x00ff0000ff0000ff, + 0x00ff0000ff00ff00, 0x00ff0000ff00ffff, + 0x00ff0000ffff0000, 0x00ff0000ffff00ff, + 0x00ff0000ffffff00, 0x00ff0000ffffffff, + 0x00ff00ff00000000, 0x00ff00ff000000ff, + 0x00ff00ff0000ff00, 0x00ff00ff0000ffff, + 0x00ff00ff00ff0000, 0x00ff00ff00ff00ff, + 0x00ff00ff00ffff00, 0x00ff00ff00ffffff, + 0x00ff00ffff000000, 0x00ff00ffff0000ff, + 0x00ff00ffff00ff00, 0x00ff00ffff00ffff, + 0x00ff00ffffff0000, 0x00ff00ffffff00ff, + 0x00ff00ffffffff00, 0x00ff00ffffffffff, + 0x00ffff0000000000, 0x00ffff00000000ff, + 0x00ffff000000ff00, 0x00ffff000000ffff, + 0x00ffff0000ff0000, 0x00ffff0000ff00ff, + 0x00ffff0000ffff00, 0x00ffff0000ffffff, + 0x00ffff00ff000000, 0x00ffff00ff0000ff, + 0x00ffff00ff00ff00, 0x00ffff00ff00ffff, + 0x00ffff00ffff0000, 0x00ffff00ffff00ff, + 0x00ffff00ffffff00, 0x00ffff00ffffffff, + 0x00ffffff00000000, 0x00ffffff000000ff, + 0x00ffffff0000ff00, 0x00ffffff0000ffff, + 0x00ffffff00ff0000, 0x00ffffff00ff00ff, + 0x00ffffff00ffff00, 0x00ffffff00ffffff, + 0x00ffffffff000000, 0x00ffffffff0000ff, + 0x00ffffffff00ff00, 0x00ffffffff00ffff, + 0x00ffffffffff0000, 0x00ffffffffff00ff, + 0x00ffffffffffff00, 0x00ffffffffffffff, + 0xff00000000000000, 0xff000000000000ff, + 0xff0000000000ff00, 0xff0000000000ffff, + 0xff00000000ff0000, 0xff00000000ff00ff, + 0xff00000000ffff00, 0xff00000000ffffff, + 0xff000000ff000000, 0xff000000ff0000ff, + 0xff000000ff00ff00, 0xff000000ff00ffff, + 0xff000000ffff0000, 0xff000000ffff00ff, + 0xff000000ffffff00, 0xff000000ffffffff, + 0xff0000ff00000000, 0xff0000ff000000ff, + 0xff0000ff0000ff00, 0xff0000ff0000ffff, + 0xff0000ff00ff0000, 0xff0000ff00ff00ff, + 0xff0000ff00ffff00, 0xff0000ff00ffffff, + 0xff0000ffff000000, 0xff0000ffff0000ff, + 0xff0000ffff00ff00, 0xff0000ffff00ffff, + 0xff0000ffffff0000, 0xff0000ffffff00ff, + 0xff0000ffffffff00, 0xff0000ffffffffff, + 0xff00ff0000000000, 0xff00ff00000000ff, + 0xff00ff000000ff00, 0xff00ff000000ffff, + 0xff00ff0000ff0000, 0xff00ff0000ff00ff, + 0xff00ff0000ffff00, 0xff00ff0000ffffff, + 0xff00ff00ff000000, 0xff00ff00ff0000ff, + 0xff00ff00ff00ff00, 0xff00ff00ff00ffff, + 0xff00ff00ffff0000, 0xff00ff00ffff00ff, + 0xff00ff00ffffff00, 0xff00ff00ffffffff, + 0xff00ffff00000000, 0xff00ffff000000ff, + 0xff00ffff0000ff00, 0xff00ffff0000ffff, + 0xff00ffff00ff0000, 0xff00ffff00ff00ff, + 0xff00ffff00ffff00, 0xff00ffff00ffffff, + 0xff00ffffff000000, 0xff00ffffff0000ff, + 0xff00ffffff00ff00, 0xff00ffffff00ffff, + 0xff00ffffffff0000, 0xff00ffffffff00ff, + 0xff00ffffffffff00, 0xff00ffffffffffff, + 0xffff000000000000, 0xffff0000000000ff, + 0xffff00000000ff00, 0xffff00000000ffff, + 0xffff000000ff0000, 0xffff000000ff00ff, + 0xffff000000ffff00, 0xffff000000ffffff, + 0xffff0000ff000000, 0xffff0000ff0000ff, + 0xffff0000ff00ff00, 0xffff0000ff00ffff, + 0xffff0000ffff0000, 0xffff0000ffff00ff, + 0xffff0000ffffff00, 0xffff0000ffffffff, + 0xffff00ff00000000, 0xffff00ff000000ff, + 0xffff00ff0000ff00, 0xffff00ff0000ffff, + 0xffff00ff00ff0000, 0xffff00ff00ff00ff, + 0xffff00ff00ffff00, 0xffff00ff00ffffff, + 0xffff00ffff000000, 0xffff00ffff0000ff, + 0xffff00ffff00ff00, 0xffff00ffff00ffff, + 0xffff00ffffff0000, 0xffff00ffffff00ff, + 0xffff00ffffffff00, 0xffff00ffffffffff, + 0xffffff0000000000, 0xffffff00000000ff, + 0xffffff000000ff00, 0xffffff000000ffff, + 0xffffff0000ff0000, 0xffffff0000ff00ff, + 0xffffff0000ffff00, 0xffffff0000ffffff, + 0xffffff00ff000000, 0xffffff00ff0000ff, + 0xffffff00ff00ff00, 0xffffff00ff00ffff, + 0xffffff00ffff0000, 0xffffff00ffff00ff, + 0xffffff00ffffff00, 0xffffff00ffffffff, + 0xffffffff00000000, 0xffffffff000000ff, + 0xffffffff0000ff00, 0xffffffff0000ffff, + 0xffffffff00ff0000, 0xffffffff00ff00ff, + 0xffffffff00ffff00, 0xffffffff00ffffff, + 0xffffffffff000000, 0xffffffffff0000ff, + 0xffffffffff00ff00, 0xffffffffff00ffff, + 0xffffffffffff0000, 0xffffffffffff00ff, + 0xffffffffffffff00, 0xffffffffffffffff +#endif +}; + +int cfb8StippleMode, cfb8StippleAlu, cfb8StippleRRop; +PixelGroup cfb8StippleFg, cfb8StippleBg, cfb8StipplePm; +PixelGroup cfb8StippleAnd[NUM_MASKS], cfb8StippleXor[NUM_MASKS]; + +int +cfb8SetStipple (alu, fg, planemask) +int alu; +CfbBits fg, planemask; +{ + CfbBits and, xor, rrop; + int s; + CfbBits c; + + cfb8StippleMode = FillStippled; + cfb8StippleAlu = alu; + cfb8StippleFg = fg & PMSK; + cfb8StipplePm = planemask & PMSK; + rrop = cfbReduceRasterOp (alu, fg, planemask, &and, &xor); + cfb8StippleRRop = rrop; + /* + * create the appropriate pixel-fill bits for current + * foreground + */ + for (s = 0; s < NUM_MASKS; s++) + { + c = cfb8StippleMasks[s]; + cfb8StippleAnd[s] = and | ~c; + cfb8StippleXor[s] = xor & c; + } + return TRUE; +} + + +int +cfb8SetOpaqueStipple (alu, fg, bg, planemask) +int alu; +CfbBits fg, bg, planemask; +{ + CfbBits andfg, xorfg, andbg, xorbg, rropfg, rropbg; + int s; + CfbBits c; + + cfb8StippleMode = FillOpaqueStippled; + cfb8StippleAlu = alu; + cfb8StippleFg = fg & PMSK; + cfb8StippleBg = bg & PMSK; + cfb8StipplePm = planemask & PMSK; + rropfg = cfbReduceRasterOp (alu, cfb8StippleFg, cfb8StipplePm, &andfg, &xorfg); + rropbg = cfbReduceRasterOp (alu, cfb8StippleBg, cfb8StipplePm, &andbg, &xorbg); + if (rropfg == rropbg) + cfb8StippleRRop = rropfg; + else + cfb8StippleRRop = GXset; + /* + * create the appropriate pixel-fill bits for current + * foreground + */ + for (s = 0; s < NUM_MASKS; s++) + { + c = cfb8StippleMasks[s]; + cfb8StippleAnd[s] = (andfg | ~c) & (andbg | c); + cfb8StippleXor[s] = (xorfg & c) | (xorbg & ~c); + } + return TRUE; +} + +/* + * a grungy little routine. This computes clip masks + * for partial character blts. Returns rgnOUT if the + * entire character is clipped; returns rgnIN if the entire + * character is unclipped; returns rgnPART if a portion of + * the character is visible. Computes clip masks for each + * longword of the character -- and those with the + * contents of the glyph to compute the visible bits. + */ + +#if PGSZ == 32 +#if (BITMAP_BIT_ORDER == MSBFirst) +PixelGroup cfb8BitLenMasks[PGSZ] = { + 0xffffffff, 0x7fffffff, 0x3fffffff, 0x1fffffff, + 0x0fffffff, 0x07ffffff, 0x03ffffff, 0x01ffffff, + 0x00ffffff, 0x007fffff, 0x003fffff, 0x001fffff, + 0x000fffff, 0x0007ffff, 0x0003ffff, 0x0001ffff, + 0x0000ffff, 0x00007fff, 0x00003fff, 0x00001fff, + 0x00000fff, 0x000007ff, 0x000003ff, 0x000001ff, + 0x000000ff, 0x0000007f, 0x0000003f, 0x0000001f, + 0x0000000f, 0x00000007, 0x00000003, 0x00000001, +}; +#else +PixelGroup cfb8BitLenMasks[PGSZ] = { + 0xffffffff, 0xfffffffe, 0xfffffffc, 0xfffffff8, + 0xfffffff0, 0xffffffe0, 0xffffffc0, 0xffffff80, + 0xffffff00, 0xfffffe00, 0xfffffc00, 0xfffff800, + 0xfffff000, 0xffffe000, 0xffffc000, 0xffff8000, + 0xffff0000, 0xfffe0000, 0xfffc0000, 0xfff80000, + 0xfff00000, 0xffe00000, 0xffc00000, 0xff800000, + 0xff000000, 0xfe000000, 0xfc000000, 0xf8000000, + 0xf0000000, 0xe0000000, 0xc0000000, 0x80000000, +}; +#endif /* BITMAP_BIT_ORDER */ +#else /* PGSZ == 64 */ +#if (BITMAP_BIT_ORDER == MSBFirst) +PixelGroup cfb8BitLenMasks[PGSZ] = { + 0xffffffffffffffff, 0x7fffffffffffffff, + 0x3fffffffffffffff, 0x1fffffffffffffff, + 0x0fffffffffffffff, 0x07ffffffffffffff, + 0x03ffffffffffffff, 0x01ffffffffffffff, + 0x00ffffffffffffff, 0x007fffffffffffff, + 0x003fffffffffffff, 0x001fffffffffffff, + 0x000fffffffffffff, 0x0007ffffffffffff, + 0x0003ffffffffffff, 0x0001ffffffffffff, + 0x0000ffffffffffff, 0x00007fffffffffff, + 0x00003fffffffffff, 0x00001fffffffffff, + 0x00000fffffffffff, 0x000007ffffffffff, + 0x000003ffffffffff, 0x000001ffffffffff, + 0x000000ffffffffff, 0x0000007fffffffff, + 0x0000003fffffffff, 0x0000001fffffffff, + 0x0000000fffffffff, 0x00000007ffffffff, + 0x00000003ffffffff, 0x00000001ffffffff, + 0x00000000ffffffff, 0x000000007fffffff, + 0x000000003fffffff, 0x000000001fffffff, + 0x000000000fffffff, 0x0000000007ffffff, + 0x0000000003ffffff, 0x0000000001ffffff, + 0x0000000000ffffff, 0x00000000007fffff, + 0x00000000003fffff, 0x00000000001fffff, + 0x00000000000fffff, 0x000000000007ffff, + 0x000000000003ffff, 0x000000000001ffff, + 0x000000000000ffff, 0x0000000000007fff, + 0x0000000000003fff, 0x0000000000001fff, + 0x0000000000000fff, 0x00000000000007ff, + 0x00000000000003ff, 0x00000000000001ff, + 0x00000000000000ff, 0x000000000000007f, + 0x000000000000003f, 0x000000000000001f, + 0x000000000000000f, 0x0000000000000007, + 0x0000000000000003, 0x0000000000000001 +}; +#else +PixelGroup cfb8BitLenMasks[PGSZ] = { + 0xffffffffffffffff, 0xfffffffffffffffe, + 0xfffffffffffffffc, 0xfffffffffffffff8, + 0xfffffffffffffff0, 0xffffffffffffffe0, + 0xffffffffffffffc0, 0xffffffffffffff80, + 0xffffffffffffff00, 0xfffffffffffffe00, + 0xfffffffffffffc00, 0xfffffffffffff800, + 0xfffffffffffff000, 0xffffffffffffe000, + 0xffffffffffffc000, 0xffffffffffff8000, + 0xffffffffffff0000, 0xfffffffffffe0000, + 0xfffffffffffc0000, 0xfffffffffff80000, + 0xfffffffffff00000, 0xffffffffffe00000, + 0xffffffffffc00000, 0xffffffffff800000, + 0xffffffffff000000, 0xfffffffffe000000, + 0xfffffffffc000000, 0xfffffffff8000000, + 0xfffffffff0000000, 0xffffffffe0000000, + 0xffffffffc0000000, 0xffffffff80000000, + 0xffffffff00000000, 0xfffffffe00000000, + 0xfffffffc00000000, 0xfffffff800000000, + 0xfffffff000000000, 0xffffffe000000000, + 0xffffffc000000000, 0xffffff8000000000, + 0xffffff0000000000, 0xfffffe0000000000, + 0xfffffc0000000000, 0xfffff80000000000, + 0xfffff00000000000, 0xffffe00000000000, + 0xffffc00000000000, 0xffff800000000000, + 0xffff000000000000, 0xfffe000000000000, + 0xfffc000000000000, 0xfff8000000000000, + 0xfff0000000000000, 0xffe0000000000000, + 0xffc0000000000000, 0xff80000000000000, + 0xff00000000000000, 0xfe00000000000000, + 0xfc00000000000000, 0xf800000000000000, + 0xf000000000000000, 0xe000000000000000, + 0xc000000000000000, 0x8000000000000000 +}; +#endif /* BITMAP_BIT_ORDER */ +#endif /* PGSZ */ + + + +int +cfb8ComputeClipMasks32 (pBox, numRects, x, y, w, h, clips) + BoxPtr pBox; + int numRects; + int x, y, w, h; + CARD32 *clips; +{ + int yBand, yBandBot; + int ch; + CfbBits clip; + int partIN = FALSE, partOUT = FALSE; + int result; + + if (numRects == 0) + return rgnOUT; + while (numRects && pBox->y2 <= y) + { + --numRects; + ++pBox; + } + if (!numRects || pBox->y1 >= y + h) + return rgnOUT; + yBand = pBox->y1; + while (numRects && pBox->y1 == yBand && pBox->x2 <= x) + { + --numRects; + ++pBox; + } + if (!numRects || pBox->y1 >= y + h) + return rgnOUT; + if (numRects && + x >= pBox->x1 && + x + w <= pBox->x2 && + y >= pBox->y1 && + y + h <= pBox->y2) + { + return rgnIN; + } + ch = 0; + while (numRects && pBox->y1 < y + h) + { + yBand = pBox->y1; + yBandBot = pBox->y2; + while (ch < h && y + ch < yBand) + { + partOUT = TRUE; + clips[ch++] = 0; + } + if (ch >= h) + break; + while (numRects && pBox->y1 == yBand && pBox->x2 <= x) + { + --numRects; + ++pBox; + } + if (!numRects) + break; + clip = 0; + while (numRects && pBox->y1 == yBand && pBox->x1 < x + w) + { + if (x < pBox->x1) + if (pBox->x2 < x + w) + clip |= cfb8BitLenMasks[pBox->x1 - x] & ~cfb8BitLenMasks[pBox->x2 - x]; + else + clip |= cfb8BitLenMasks[pBox->x1 - x]; + else + if (pBox->x2 < x + w) + clip |= ~cfb8BitLenMasks[pBox->x2 - x]; + else + clip = ~0; + --numRects; + ++pBox; + } + if (clip != 0) + partIN = TRUE; + if (clip != ~0) + partOUT = TRUE; + while (ch < h && y + ch < yBandBot) + clips[ch++] = clip; + while (numRects && pBox->y1 == yBand) + { + --numRects; + ++pBox; + } + } + while (ch < h) + { + partOUT = TRUE; + clips[ch++] = 0; + } + result = rgnOUT; + if (partIN) + { + if (partOUT) + result = rgnPART; + else + result = rgnIN; + } + return result; +} + +#endif /* PSZ == 8 */ diff --git a/xorg-server-1.4/cfb/cfb8bit.h b/xorg-server-1.4/cfb/cfb8bit.h new file mode 100644 index 0000000..5a17adf --- /dev/null +++ b/xorg-server-1.4/cfb/cfb8bit.h @@ -0,0 +1,1570 @@ +/* + * cfb8bit.h + * + * Defines which are only useful to 8 bit color frame buffers + * + * That doesn't seem to be true any more. Some of the macros in here + * are used for depths other than 8. Perhaps the file should be + * renamed. dpw + */ + +/* + +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. +*/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "servermd.h" + +#if (BITMAP_BIT_ORDER == MSBFirst) +#define GetBitGroup(x) (((PixelGroup) (x)) >> (PGSZ - PGSZB)) +#define NextBitGroup(x) ((x) <<= PGSZB) +#define NextSomeBits(x,n) ((x) <<= (n)) +#else +#define GetBitGroup(x) ((x) & PGSZBMSK) +#define NextBitGroup(x) ((x) >>= PGSZB) +#define NextSomeBits(x,n) ((x) >>= (n)) +#endif + +#define RotBitsLeft(x,k) ((x) = BitLeft (x,k) | \ + BitRight (x, PGSZ-(k))) + +#if defined(__GNUC__) && defined(mc68020) +#undef RotBitsLeft +#define RotBitsLeft(x,k) asm("rol%.l %2,%0" \ + : "=d" (x) \ + : "0" (x), "dI" (k)) +#endif + +#if PSZ == 8 + +#define GetPixelGroup(x) (cfb8StippleXor[GetBitGroup(x)]) +#define RRopPixels(dst,x) (DoRRop(dst,cfb8StippleAnd[x], cfb8StippleXor[x])) +#define RRopPixelGroup(dst,x) (RRopPixels(dst,GetBitGroup(x))) +#define MaskRRopPixels(dst,x,mask) (DoMaskRRop(dst,cfb8StippleAnd[x], cfb8StippleXor[x], mask)) + +#define NUM_MASKS (1<= MFB_PPW) \ + { \ + inputBits = *srcTemp++; \ + bitsLeft -= MFB_PPW; \ + partBitsLeft = MFB_PPW; \ + } \ + else \ + { \ + inputBits = 0; \ + if (bitsLeft) \ + inputBits = *srcTemp & ~cfb8BitLenMasks[bitsLeft]; \ + srcTemp = srcStart; \ + partBitsLeft = bitsLeft; \ + bitsLeft = bitsWhole; \ + } + +#define NextUnnaturalStippleBits \ + if (partBitsLeft >= PPW) { \ + bits = GetBitGroup (inputBits); \ + NextBitGroup (inputBits); \ + partBitsLeft -= PPW; \ + } else { \ + bits = GetBitGroup (inputBits); \ + nextPartBits = PPW - partBitsLeft; \ + NextUnnaturalStippleWord \ + if (partBitsLeft < nextPartBits) { \ + if (partBitsLeft) {\ + bits |= BitRight (GetBitGroup (inputBits), \ + PPW - nextPartBits) & PPWMSK;\ + nextPartBits -= partBitsLeft; \ + } \ + NextUnnaturalStippleWord \ + } \ + bits |= BitRight (GetBitGroup (inputBits), \ + PPW - nextPartBits) & PPWMSK; \ + NextSomeBits (inputBits, nextPartBits); \ + partBitsLeft -= nextPartBits; \ + } + +#define NextUnnaturalStippleBitsFast \ + if (partBitsLeft >= PPW) { \ + bits = GetBitGroup(inputBits); \ + NextBitGroup(inputBits); \ + partBitsLeft -= PPW; \ + } else { \ + bits = GetBitGroup (inputBits); \ + nextPartBits = PPW - partBitsLeft; \ + inputBits = *srcTemp++; \ + bits |= BitRight (GetBitGroup (inputBits), \ + partBitsLeft) & PPWMSK; \ + NextSomeBits (inputBits, nextPartBits); \ + partBitsLeft = MFB_PPW - nextPartBits; \ + } + +/* + * WriteBitGroup takes the destination address, a pixel + * value (which must be 8 bits duplicated 4 time with PFILL) + * and the PPW bits to write, which must be in the low order + * bits of the register (probably from GetBitGroup) and writes + * the appropriate locations in memory with the pixel value. This + * is a copy-mode only operation. + */ + +#define RRopBitGroup(dst,bits) \ + { \ + *(dst) = RRopPixels(*(dst),bits); \ + } + +#define MaskRRopBitGroup(dst,bits,mask) \ + { \ + *(dst) = MaskRRopPixels(*(dst),bits,mask); \ + } +#endif /* PSZ == 8 */ + +#if !defined(AVOID_MEMORY_READ) && PSZ == 8 + +#define WriteBitGroup(dst,pixel,bits) \ + { \ + register PixelGroup _maskTmp = cfb8PixelMasks[(bits)]; \ + *(dst) = (*(dst) & ~_maskTmp) | ((pixel) & _maskTmp); \ + } + +#define SwitchBitGroup(dst,pixel,bits) \ + { \ + register PixelGroup _maskTmp = cfb8PixelMasks[(bits)]; \ + register PixelGroup _pixTmp = ((pixel) & _maskTmp); \ + _maskTmp = ~_maskTmp; \ + SwitchBitsLoop (*(dst) = (*(dst) & _maskTmp) | _pixTmp;) \ + } + +#else /* AVOID_MEMORY_READ */ + +#if PGSZ == 32 +#if (BITMAP_BIT_ORDER == MSBFirst) +#define SinglePixel0 3 +#define SinglePixel1 2 +#define SinglePixel2 1 +#define SinglePixel3 0 +#define SinglePixel4 7 +#define SinglePixel5 6 +#define SinglePixel6 5 +#define SinglePixel7 4 +#define SinglePixel8 0xB +#define SinglePixel9 0xA +#define DoublePixel0 1 +#define DoublePixel1 0 +#define DoublePixel2 3 +#define DoublePixel3 2 +#define DoublePixel4 5 +#define DoublePixel5 4 +#else +#define SinglePixel0 0 +#define SinglePixel1 1 +#define SinglePixel2 2 +#define SinglePixel3 3 +#define SinglePixel4 4 +#define SinglePixel5 5 +#define SinglePixel6 6 +#define SinglePixel7 7 +#define SinglePixel8 8 +#define SinglePixel9 9 +#define DoublePixel0 0 +#define DoublePixel1 1 +#define DoublePixel2 2 +#define DoublePixel3 3 +#define DoublePixel4 4 +#define DoublePixel5 5 +#endif +#define QuadPixel0 0 +#define QuadPixel1 1 +#define QuadPixel2 2 +#else /* PGSZ == 64 */ +#if (BITMAP_BIT_ORDER == MSBFirst) +#define SinglePixel0 7 +#define SinglePixel1 6 +#define SinglePixel2 5 +#define SinglePixel3 4 +#define SinglePixel4 3 +#define SinglePixel5 2 +#define SinglePixel6 1 +#define SinglePixel7 0 +#define DoublePixel0 3 +#define DoublePixel1 2 +#define DoublePixel2 1 +#define DoublePixel3 0 +#define QuadPixel0 1 +#define QuadPixel1 0 +#else +#define SinglePixel0 0 +#define SinglePixel1 1 +#define SinglePixel2 2 +#define SinglePixel3 3 +#define SinglePixel4 4 +#define SinglePixel5 5 +#define SinglePixel6 6 +#define SinglePixel7 7 +#define DoublePixel0 0 +#define DoublePixel1 1 +#define DoublePixel2 2 +#define DoublePixel3 3 +#define QuadPixel0 0 +#define QuadPixel1 1 +#endif +#define OctaPixel0 0 +#endif /* PGSZ == 64 */ + +#if PSZ == 8 + +#if PGSZ == 32 +#define WriteBitGroup(dst,pixel,bits) \ + switch (bits) { \ + case 0: \ + break; \ + case 1: \ + ((CARD8 *) (dst))[SinglePixel0] = (pixel); \ + break; \ + case 2: \ + ((CARD8 *) (dst))[SinglePixel1] = (pixel); \ + break; \ + case 3: \ + ((CARD16 *) (dst))[DoublePixel0] = (pixel); \ + break; \ + case 4: \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 5: \ + ((CARD8 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 6: \ + ((CARD8 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 7: \ + ((CARD16 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 8: \ + ((CARD8 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 9: \ + ((CARD8 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 10: \ + ((CARD8 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 11: \ + ((CARD16 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 12: \ + ((CARD16 *) (dst))[DoublePixel1] = (pixel); \ + break; \ + case 13: \ + ((CARD8 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel1] = (pixel); \ + break; \ + case 14: \ + ((CARD8 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel1] = (pixel); \ + break; \ + case 15: \ + ((CARD32 *) (dst))[0] = (pixel); \ + break; \ + } +#else /* PGSZ == 64 */ +#define WriteBitGroup(dst,pixel,bits) \ + if ( bits == 0xff ) \ + ((PixelGroup *) (dst))[OctaPixel0] = (pixel); \ + else { \ + switch (bits & 0x0f) { \ + case 0: \ + break; \ + case 1: \ + ((CARD8 *) (dst))[SinglePixel0] = (pixel); \ + break; \ + case 2: \ + ((CARD8 *) (dst))[SinglePixel1] = (pixel); \ + break; \ + case 3: \ + ((CARD16 *) (dst))[DoublePixel0] = (pixel); \ + break; \ + case 4: \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 5: \ + ((CARD8 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 6: \ + ((CARD8 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 7: \ + ((CARD16 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 8: \ + ((CARD8 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 9: \ + ((CARD8 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 10: \ + ((CARD8 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 11: \ + ((CARD16 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 12: \ + ((CARD16 *) (dst))[DoublePixel1] = (pixel); \ + break; \ + case 13: \ + ((CARD8 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel1] = (pixel); \ + break; \ + case 14: \ + ((CARD8 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel1] = (pixel); \ + break; \ + case 15: \ + ((CARD32 *) (dst))[QuadPixel0] = (pixel); \ + break; \ + } \ + switch ((bits & 0xf0) >> 4) { \ + case 0: \ + break; \ + case 1: \ + ((CARD8 *) (dst))[SinglePixel4] = (pixel); \ + break; \ + case 2: \ + ((CARD8 *) (dst))[SinglePixel5] = (pixel); \ + break; \ + case 3: \ + ((CARD16 *) (dst))[DoublePixel2] = (pixel); \ + break; \ + case 4: \ + ((CARD8 *) (dst))[SinglePixel6] = (pixel); \ + break; \ + case 5: \ + ((CARD8 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel6] = (pixel); \ + break; \ + case 6: \ + ((CARD8 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel6] = (pixel); \ + break; \ + case 7: \ + ((CARD16 *) (dst))[DoublePixel2] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel6] = (pixel); \ + break; \ + case 8: \ + ((CARD8 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 9: \ + ((CARD8 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 10: \ + ((CARD8 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 11: \ + ((CARD16 *) (dst))[DoublePixel2] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 12: \ + ((CARD16 *) (dst))[DoublePixel3] = (pixel); \ + break; \ + case 13: \ + ((CARD8 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel3] = (pixel); \ + break; \ + case 14: \ + ((CARD8 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel3] = (pixel); \ + break; \ + case 15: \ + ((CARD32 *) (dst))[QuadPixel1] = (pixel); \ + break; \ + } \ + } +#endif /* PGSZ == 64 */ + +#if PGSZ == 32 +#define SwitchBitGroup(dst,pixel,bits) { \ + switch (bits) { \ + case 0: \ + break; \ + case 1: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel0] = (pixel);) \ + break; \ + case 2: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel1] = (pixel);) \ + break; \ + case 3: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel0] = (pixel);) \ + break; \ + case 4: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 5: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 6: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 7: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 8: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 9: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 10: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 11: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 12: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel1] = (pixel);) \ + break; \ + case 13: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel1] = (pixel);) \ + break; \ + case 14: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel1] = (pixel);) \ + break; \ + case 15: \ + SwitchBitsLoop (((CARD32 *) (dst))[0] = (pixel);) \ + break; \ + } \ +} +#else /* PGSZ == 64 */ +#define SwitchBitGroup(dst,pixel,bits) { \ + if ( bits == 0xff ) \ + SwitchBitsLoop (((PixelGroup *) (dst))[OctaPixel0] = (pixel);) \ + else { \ + switch (bits & 0x0f) { \ + case 0: \ + break; \ + case 1: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel0] = (pixel);) \ + break; \ + case 2: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel1] = (pixel);) \ + break; \ + case 3: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel0] = (pixel);)\ + break; \ + case 4: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 5: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 6: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 7: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 8: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 9: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 10: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 11: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 12: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel1] = (pixel);)\ + break; \ + case 13: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel1] = (pixel);)\ + break; \ + case 14: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel1] = (pixel);)\ + break; \ + case 15: \ + SwitchBitsLoop (((CARD32 *) (dst))[QuadPixel0] = (pixel);) \ + break; \ + } \ + switch ((bits & 0xf0) >> 4) { \ + case 0: \ + break; \ + case 1: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel4] = (pixel);) \ + break; \ + case 2: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel5] = (pixel);) \ + break; \ + case 3: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel2] = (pixel);)\ + break; \ + case 4: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel6] = (pixel);) \ + break; \ + case 5: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel6] = (pixel);) \ + break; \ + case 6: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel6] = (pixel);) \ + break; \ + case 7: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel2] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel6] = (pixel);) \ + break; \ + case 8: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel7] = (pixel);) \ + break; \ + case 9: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel7] = (pixel);) \ + break; \ + case 10: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel7] = (pixel);) \ + break; \ + case 11: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel2] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel7] = (pixel);) \ + break; \ + case 12: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel3] = (pixel);)\ + break; \ + case 13: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel3] = (pixel);)\ + break; \ + case 14: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel3] = (pixel);)\ + break; \ + case 15: \ + SwitchBitsLoop (((CARD32 *) (dst))[QuadPixel1] = (pixel);) \ + break; \ + } \ + } \ +} +#endif /* PGSZ == 64 */ +#endif /* PSZ == 8 */ + +#if PSZ == 16 + +#if PGSZ == 32 +#define WriteBitGroup(dst,pixel,bits) \ + switch (bits) { \ + case 0: \ + break; \ + case 1: \ + ((CARD16 *) (dst))[SinglePixel0] = (pixel); \ + break; \ + case 2: \ + ((CARD16 *) (dst))[SinglePixel1] = (pixel); \ + break; \ + case 3: \ + ((CARD32 *) (dst))[DoublePixel0] = (pixel); \ + break; \ + case 4: \ + ((CARD16 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 5: \ + ((CARD16 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 6: \ + ((CARD16 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 7: \ + ((CARD32 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 8: \ + ((CARD16 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 9: \ + ((CARD16 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 10: \ + ((CARD16 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 11: \ + ((CARD32 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 12: \ + ((CARD32 *) (dst))[DoublePixel1] = (pixel); \ + break; \ + case 13: \ + ((CARD16 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[DoublePixel1] = (pixel); \ + break; \ + case 14: \ + ((CARD16 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[DoublePixel1] = (pixel); \ + break; \ + case 15: \ + ((CARD32 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD32 *) (dst))[DoublePixel1] = (pixel); \ + break; \ + } +#else /* PGSZ == 64 */ +#define WriteBitGroup(dst,pixel,bits) \ + if ( bits == 0xff ) { \ + ((PixelGroup *) (dst))[QuadPixel0] = (pixel); \ + ((PixelGroup *) (dst))[QuadPixel1] = (pixel); \ + } \ + else { \ + switch (bits & 0x0f) { \ + case 0: \ + break; \ + case 1: \ + ((CARD16 *) (dst))[SinglePixel0] = (pixel); \ + break; \ + case 2: \ + ((CARD16 *) (dst))[SinglePixel1] = (pixel); \ + break; \ + case 3: \ + ((CARD32 *) (dst))[DoublePixel0] = (pixel); \ + break; \ + case 4: \ + ((CARD16 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 5: \ + ((CARD16 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 6: \ + ((CARD16 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 7: \ + ((CARD32 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 8: \ + ((CARD16 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 9: \ + ((CARD16 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 10: \ + ((CARD16 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 11: \ + ((CARD32 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 12: \ + ((CARD32 *) (dst))[DoublePixel1] = (pixel); \ + break; \ + case 13: \ + ((CARD16 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[DoublePixel1] = (pixel); \ + break; \ + case 14: \ + ((CARD16 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[DoublePixel1] = (pixel); \ + break; \ + case 15: \ + ((CARD32 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD32 *) (dst))[DoublePixel1] = (pixel); \ + break; \ + } \ + switch ((bits & 0xf0) >> 4) { \ + case 0: \ + break; \ + case 1: \ + ((CARD16 *) (dst))[SinglePixel4] = (pixel); \ + break; \ + case 2: \ + ((CARD16 *) (dst))[SinglePixel5] = (pixel); \ + break; \ + case 3: \ + ((CARD32 *) (dst))[DoublePixel2] = (pixel); \ + break; \ + case 4: \ + ((CARD16 *) (dst))[SinglePixel6] = (pixel); \ + break; \ + case 5: \ + ((CARD16 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel6] = (pixel); \ + break; \ + case 6: \ + ((CARD16 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel6] = (pixel); \ + break; \ + case 7: \ + ((CARD32 *) (dst))[DoublePixel2] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel6] = (pixel); \ + break; \ + case 8: \ + ((CARD16 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 9: \ + ((CARD16 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 10: \ + ((CARD16 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 11: \ + ((CARD32 *) (dst))[DoublePixel2] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 12: \ + ((CARD32 *) (dst))[DoublePixel3] = (pixel); \ + break; \ + case 13: \ + ((CARD16 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD32 *) (dst))[DoublePixel3] = (pixel); \ + break; \ + case 14: \ + ((CARD16 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD32 *) (dst))[DoublePixel3] = (pixel); \ + break; \ + case 15: \ + ((CARD32 *) (dst))[DoublePixel2] = (pixel); \ + ((CARD32 *) (dst))[DoublePixel3] = (pixel); \ + break; \ + } \ + } +#endif /* PGSZ */ + +#if PGSZ == 32 +#define SwitchBitGroup(dst,pixel,bits) { \ + switch (bits) { \ + case 0: \ + break; \ + case 1: \ + SwitchBitsLoop (((CARD16 *) (dst))[SinglePixel0] = (pixel);) \ + break; \ + case 2: \ + SwitchBitsLoop (((CARD16 *) (dst))[SinglePixel1] = (pixel);) \ + break; \ + case 3: \ + SwitchBitsLoop (((CARD32 *) (dst))[DoublePixel0] = (pixel);) \ + break; \ + case 4: \ + SwitchBitsLoop (((CARD16 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 5: \ + SwitchBitsLoop (((CARD16 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 6: \ + SwitchBitsLoop (((CARD16 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 7: \ + SwitchBitsLoop (((CARD32 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 8: \ + SwitchBitsLoop (((CARD16 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 9: \ + SwitchBitsLoop (((CARD16 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 10: \ + SwitchBitsLoop (((CARD16 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 11: \ + SwitchBitsLoop (((CARD32 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD16 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 12: \ + SwitchBitsLoop (((CARD32 *) (dst))[DoublePixel1] = (pixel);) \ + break; \ + case 13: \ + SwitchBitsLoop (((CARD16 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[DoublePixel1] = (pixel);) \ + break; \ + case 14: \ + SwitchBitsLoop (((CARD16 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[DoublePixel1] = (pixel);) \ + break; \ + case 15: \ + SwitchBitsLoop (((CARD32 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD32 *) (dst))[DoublePixel1] = (pixel);) \ + break; \ + } \ +} +#else /* PGSZ == 64 */ +#define SwitchBitGroup(dst,pixel,bits) { \ + cfb cannot hack 64-bit SwitchBitGroup psz=PSZ +#endif /* PGSZ */ + +#endif /* PSZ == 16 */ + +#if PSZ == 24 +/* 32 000011112222*/ +/* 24 000111222333*/ +/* 16 001122334455*/ +/* 8 0123456789AB*/ +#if PGSZ == 32 +#define WriteBitGroup(dst,pixel,bits) \ + { \ + register CARD32 reg_pixel = (pixel); \ + switch (bits) { \ + case 0: \ + break; \ + case 1: \ + ((CARD16 *) (dst))[DoublePixel0] = reg_pixel; \ + ((CARD8 *) (dst))[SinglePixel2] = ((reg_pixel>>16)&0xFF); \ + break; \ + case 2: \ + ((CARD8 *) (dst))[SinglePixel3] = reg_pixel&0xFF; \ + ((CARD16 *) (dst))[DoublePixel2] = (reg_pixel>>8)&0xFFFF; \ + break; \ + case 3: \ + ((CARD8 *) (dst))[SinglePixel3] = reg_pixel & 0xFF; \ + ((CARD16 *) (dst))[DoublePixel0] = reg_pixel; \ + ((CARD16 *) (dst))[DoublePixel2] = (reg_pixel>>8)&0xFFFF; \ + ((CARD8 *) (dst))[SinglePixel2] = (reg_pixel>>16&0xFF); \ + break; \ + case 4: \ + ((CARD16 *) (dst))[DoublePixel3] = reg_pixel; \ + ((CARD8 *) (dst))[SinglePixel8] = (reg_pixel>>16)&0xFF; \ + break; \ + case 5: \ + ((CARD16 *) (dst))[DoublePixel0] = \ + ((CARD16 *) (dst))[DoublePixel3] = reg_pixel; \ + reg_pixel >>= 16; \ + ((CARD8 *) (dst))[SinglePixel2] = \ + ((CARD8 *) (dst))[SinglePixel8] = reg_pixel&0xFF; \ + break; \ + case 6: \ + ((CARD8 *) (dst))[SinglePixel3] = reg_pixel; \ + ((CARD16 *) (dst))[DoublePixel3] = reg_pixel; \ + reg_pixel >>= 8; \ + ((CARD16 *) (dst))[DoublePixel2] = reg_pixel; \ + reg_pixel >>= 8; \ + ((CARD8 *) (dst))[SinglePixel8] = reg_pixel&0xFF; \ + break; \ + case 7: \ + ((CARD16 *) (dst))[DoublePixel0] = \ + ((CARD16 *) (dst))[DoublePixel3] = reg_pixel; \ + ((CARD8 *) (dst))[SinglePixel3] = reg_pixel&0xFF; \ + reg_pixel >>= 8; \ + ((CARD16 *) (dst))[DoublePixel2] = reg_pixel; \ + reg_pixel >>= 8; \ + ((CARD8 *) (dst))[SinglePixel2] = \ + ((CARD8 *) (dst))[SinglePixel8] = reg_pixel&0xFF; \ + break; \ + case 8: \ + ((CARD8 *) (dst))[SinglePixel9] = reg_pixel&0xFF; \ + ((CARD16 *) (dst))[DoublePixel5] = (reg_pixel>>8); \ + break; \ + case 9: \ + ((CARD16 *) (dst))[DoublePixel0] = reg_pixel; \ + ((CARD8 *) (dst))[SinglePixel9] = reg_pixel&0xFF; \ + reg_pixel >>= 8; \ + ((CARD16 *) (dst))[DoublePixel5] = reg_pixel; \ + reg_pixel >>= 8; \ + ((CARD8 *) (dst))[SinglePixel2] = reg_pixel&0xFF; \ + break; \ + case 10: \ + ((CARD8 *) (dst))[SinglePixel3] = \ + ((CARD8 *) (dst))[SinglePixel9] = reg_pixel&0xFF; \ + reg_pixel >>= 8; \ + ((CARD16 *) (dst))[DoublePixel2] = \ + ((CARD16 *) (dst))[DoublePixel5] = reg_pixel; \ + break; \ + case 11: \ + ((CARD8 *) (dst))[SinglePixel3] = \ + ((CARD8 *) (dst))[SinglePixel9] = reg_pixel; \ + ((CARD16 *) (dst))[DoublePixel0] = reg_pixel; \ + reg_pixel >>= 8; \ + ((CARD16 *) (dst))[DoublePixel2] = \ + ((CARD16 *) (dst))[DoublePixel5] = reg_pixel; \ + reg_pixel >>= 8; \ + ((CARD8 *) (dst))[SinglePixel2] = reg_pixel; \ + break; \ + case 12: \ + ((CARD16 *) (dst))[DoublePixel3] = reg_pixel; \ + ((CARD8 *) (dst))[SinglePixel9] = reg_pixel; \ + reg_pixel >>= 8; \ + ((CARD16 *) (dst))[DoublePixel5] = reg_pixel; \ + reg_pixel >>= 8; \ + ((CARD8 *) (dst))[SinglePixel8] = reg_pixel; \ + break; \ + case 13: \ + ((CARD16 *) (dst))[DoublePixel0] = \ + ((CARD16 *) (dst))[DoublePixel3] = reg_pixel; \ + ((CARD8 *) (dst))[SinglePixel9] = reg_pixel; \ + reg_pixel >>= 8; \ + ((CARD16 *) (dst))[DoublePixel5] = reg_pixel; \ + reg_pixel >>= 8; \ + ((CARD8 *) (dst))[SinglePixel2] = \ + ((CARD8 *) (dst))[SinglePixel8] = reg_pixel; \ + break; \ + case 14: \ + ((CARD8 *) (dst))[SinglePixel3] = \ + ((CARD8 *) (dst))[SinglePixel9] = reg_pixel; \ + ((CARD16 *) (dst))[DoublePixel3] = reg_pixel; \ + reg_pixel >>= 8; \ + ((CARD16 *) (dst))[DoublePixel2] = \ + ((CARD16 *) (dst))[DoublePixel5] = reg_pixel; \ + reg_pixel >>= 8; \ + ((CARD8 *) (dst))[SinglePixel8] = reg_pixel; \ + break; \ + case 15: \ + ((CARD16 *) (dst))[DoublePixel0] = \ + ((CARD16 *) (dst))[DoublePixel3] = reg_pixel; \ + ((CARD8 *) (dst))[SinglePixel3] = \ + ((CARD8 *) (dst))[SinglePixel9] = reg_pixel; \ + reg_pixel >>= 8; \ + ((CARD16 *) (dst))[DoublePixel2] = \ + ((CARD16 *) (dst))[DoublePixel5] = reg_pixel; \ + reg_pixel >>= 8; \ + ((CARD8 *) (dst))[SinglePixel8] = \ + ((CARD8 *) (dst))[SinglePixel2] = reg_pixel; \ + break; \ + } \ + } +#else /* PGSZ == 64 */ +#define WriteBitGroup(dst,pixel,bits) \ + if ( bits == 0xff ) { \ + ((PixelGroup *) (dst))[DoublePixel0] = (pixel); \ + ((PixelGroup *) (dst))[DoublePixel1] = (pixel); \ + ((PixelGroup *) (dst))[DoublePixel2] = (pixel); \ + ((PixelGroup *) (dst))[DoublePixel3] = (pixel); \ + } \ + else { \ + switch (bits & 0x0f) { \ + case 0: \ + break; \ + case 1: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + break; \ + case 2: \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + break; \ + case 3: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + break; \ + case 4: \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 5: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 6: \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 7: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 8: \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 9: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 10: \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 11: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 12: \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 13: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 14: \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 15: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + } \ + switch ((bits & 0xf0) >> 4) { \ + case 0: \ + break; \ + case 1: \ + ((CARD32 *) (dst))[SinglePixel4] = (pixel); \ + break; \ + case 2: \ + ((CARD32 *) (dst))[SinglePixel5] = (pixel); \ + break; \ + case 3: \ + ((CARD32 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel5] = (pixel); \ + break; \ + case 4: \ + ((CARD32 *) (dst))[SinglePixel6] = (pixel); \ + break; \ + case 5: \ + ((CARD32 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel6] = (pixel); \ + break; \ + case 6: \ + ((CARD32 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel6] = (pixel); \ + break; \ + case 7: \ + ((CARD32 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel6] = (pixel); \ + break; \ + case 8: \ + ((CARD32 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 9: \ + ((CARD32 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 10: \ + ((CARD32 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 11: \ + ((CARD32 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 12: \ + ((CARD32 *) (dst))[SinglePixel6] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 13: \ + ((CARD32 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel6] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 14: \ + ((CARD32 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel6] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 15: \ + ((CARD32 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel6] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + } \ + } +#endif /* PGSZ */ + +#if PGSZ == 32 +#define SwitchBitGroup(dst,pixel,bits) { \ + switch (bits) { \ + case 0: \ + break; \ + case 1: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 2: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel3] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel2] = (pixel);) \ + break; \ + case 3: \ + SwitchBitsLoop (((CARD32 *) (dst))[QuadPixel0] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel2] = (pixel);) \ + break; \ + case 4: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel3] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel8] = (pixel);) \ + break; \ + case 5: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel3] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel8] = (pixel);) \ + break; \ + case 6: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel3] = (pixel); \ + ((CARD32 *) (dst))[QuadPixel2] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel8] = (pixel);) \ + break; \ + case 7: \ + SwitchBitsLoop (((CARD32 *) (dst))[QuadPixel0] = (pixel); \ + ((CARD32 *) (dst))[QuadPixel1] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel8] = (pixel);) \ + break; \ + case 8: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel9] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel5] = (pixel);) \ + break; \ + case 9: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel9] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel5] = (pixel);) \ + break; \ + case 10: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel3] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel2] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel9] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel5] = (pixel);) \ + break; \ + case 11: \ + SwitchBitsLoop (((CARD32 *) (dst))[QuadPixel0] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel3] = (pixel);) \ + ((CARD8 *) (dst))[SinglePixel9] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel5] = (pixel);) \ + break; \ + case 12: \ + SwitchBitsLoop (((CARD16 *) (dst))[DoublePixel3] = (pixel); \ + ((CARD32 *) (dst))[QuadPixel2] = (pixel);) \ + break; \ + case 13: \ + SwitchBitsLoop (((CARD16 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD8 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD16 *) (dst))[DoublePixel3] = (pixel); \ + ((CARD32 *) (dst))[QuadPixel2] = (pixel);) \ + break; \ + case 14: \ + SwitchBitsLoop (((CARD8 *) (dst))[SinglePixel3] = (pixel); \ + ((CARD32 *) (dst))[QuadPixel1] = (pixel); \ + ((CARD32 *) (dst))[QuadPixel2] = (pixel);) \ + break; \ + case 15: \ + SwitchBitsLoop (((CARD32 *) (dst))[QuadPixel0] = (pixel); \ + ((CARD32 *) (dst))[QuadPixel1] = (pixel); \ + ((CARD32 *) (dst))[QuadPixel2] = (pixel);) \ + break; \ + } \ +} +#else /* PGSZ == 64 */ +#define SwitchBitGroup(dst,pixel,bits) { \ + cfb cannot hack 64-bit SwitchBitGroup psz=PSZ +#endif /* PGSZ */ + +#endif /* PSZ == 24 */ + +#if PSZ == 32 + +#if PGSZ == 32 +#define WriteBitGroup(dst,pixel,bits) \ + switch (bits) { \ + case 0: \ + break; \ + case 1: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + break; \ + case 2: \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + break; \ + case 3: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + break; \ + case 4: \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 5: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 6: \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 7: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 8: \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 9: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 10: \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 11: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 12: \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 13: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 14: \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 15: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + } +#else /* PGSZ == 64 */ +#define WriteBitGroup(dst,pixel,bits) \ + if ( bits == 0xff ) { \ + ((PixelGroup *) (dst))[DoublePixel0] = (pixel); \ + ((PixelGroup *) (dst))[DoublePixel1] = (pixel); \ + ((PixelGroup *) (dst))[DoublePixel2] = (pixel); \ + ((PixelGroup *) (dst))[DoublePixel3] = (pixel); \ + } \ + else { \ + switch (bits & 0x0f) { \ + case 0: \ + break; \ + case 1: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + break; \ + case 2: \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + break; \ + case 3: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + break; \ + case 4: \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 5: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 6: \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 7: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + break; \ + case 8: \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 9: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 10: \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 11: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 12: \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 13: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 14: \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + case 15: \ + ((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel); \ + break; \ + } \ + switch ((bits & 0xf0) >> 4) { \ + case 0: \ + break; \ + case 1: \ + ((CARD32 *) (dst))[SinglePixel4] = (pixel); \ + break; \ + case 2: \ + ((CARD32 *) (dst))[SinglePixel5] = (pixel); \ + break; \ + case 3: \ + ((CARD32 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel5] = (pixel); \ + break; \ + case 4: \ + ((CARD32 *) (dst))[SinglePixel6] = (pixel); \ + break; \ + case 5: \ + ((CARD32 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel6] = (pixel); \ + break; \ + case 6: \ + ((CARD32 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel6] = (pixel); \ + break; \ + case 7: \ + ((CARD32 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel6] = (pixel); \ + break; \ + case 8: \ + ((CARD32 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 9: \ + ((CARD32 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 10: \ + ((CARD32 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 11: \ + ((CARD32 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 12: \ + ((CARD32 *) (dst))[SinglePixel6] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 13: \ + ((CARD32 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel6] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 14: \ + ((CARD32 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel6] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + case 15: \ + ((CARD32 *) (dst))[SinglePixel4] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel5] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel6] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel7] = (pixel); \ + break; \ + } \ + } +#endif /* PGSZ */ + +#if PGSZ == 32 +#define SwitchBitGroup(dst,pixel,bits) { \ + switch (bits) { \ + case 0: \ + break; \ + case 1: \ + SwitchBitsLoop (((CARD32 *) (dst))[SinglePixel0] = (pixel);) \ + break; \ + case 2: \ + SwitchBitsLoop (((CARD32 *) (dst))[SinglePixel1] = (pixel);) \ + break; \ + case 3: \ + SwitchBitsLoop (((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel);) \ + break; \ + case 4: \ + SwitchBitsLoop (((CARD32 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 5: \ + SwitchBitsLoop (((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 6: \ + SwitchBitsLoop (((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 7: \ + SwitchBitsLoop (((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel);) \ + break; \ + case 8: \ + SwitchBitsLoop (((CARD32 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 9: \ + SwitchBitsLoop (((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 10: \ + SwitchBitsLoop (((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 11: \ + SwitchBitsLoop (((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 12: \ + SwitchBitsLoop (((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 13: \ + SwitchBitsLoop (((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 14: \ + SwitchBitsLoop (((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + case 15: \ + SwitchBitsLoop (((CARD32 *) (dst))[SinglePixel0] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel1] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel2] = (pixel); \ + ((CARD32 *) (dst))[SinglePixel3] = (pixel);) \ + break; \ + } \ +} +#else /* PGSZ == 64 */ +#define SwitchBitGroup(dst,pixel,bits) { \ + cfb cannot hack 64-bit SwitchBitGroup psz=PSZ +#endif /* PGSZ */ + +#endif /* PSZ == 32 */ +#endif /* AVOID_MEMORY_READ */ + +extern PixelGroup cfb8BitLenMasks[PGSZ]; + +extern int cfb8SetStipple ( + int /*alu*/, + CfbBits /*fg*/, + CfbBits /*planemask*/ +); + +extern int cfb8SetOpaqueStipple ( + int /*alu*/, + CfbBits /*fg*/, + CfbBits /*bg*/, + CfbBits /*planemask*/ +); + +extern int cfb8ComputeClipMasks32 ( + BoxPtr /*pBox*/, + int /*numRects*/, + int /*x*/, + int /*y*/, + int /*w*/, + int /*h*/, + CARD32 * /*clips*/ +); diff --git a/xorg-server-1.4/cfb/cfb8line.c b/xorg-server-1.4/cfb/cfb8line.c new file mode 100644 index 0000000..8c00d9f --- /dev/null +++ b/xorg-server-1.4/cfb/cfb8line.c @@ -0,0 +1,1503 @@ +/* + * +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 + * + * Jeff Anton'x fixes: cfb8line.c 97/02/07 + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include + +#include "gcstruct.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "scrnintstr.h" +#include "mistruct.h" + +#include "cfb.h" +#include "cfbmskbits.h" +#include "cfbrrop.h" +#include "miline.h" + +#ifdef PIXEL_ADDR + +#if defined(__GNUC__) && defined(mc68020) +#define STUPID volatile +#define REARRANGE +#else +#define STUPID +#endif + +#ifdef __GNUC__ +/* lame compiler doesn't even look at 'register' attributes */ +#define I_H do{ +#define I_T }while(0); +#define IMPORTANT_START I_H I_H I_H I_H I_H I_H I_H I_H I_H I_H +#define IMPORTANT_END I_T I_T I_T I_T I_T I_T I_T I_T I_T I_T +#else +#define IMPORTANT_START +#define IMPORTANT_END +#endif + +#define isClipped(c,ul,lr) ((((c) - (ul)) | ((lr) - (c))) & ClipMask) + +#ifdef POLYSEGMENT + +# if (defined(sun) || defined(__bsdi__)) && \ + (defined(sparc) || defined(__sparc__)) +# define WIDTH_FAST 1152 +# endif + +# ifdef ultrix +# define WIDTH_FAST 1024 +# endif + +# ifdef Mips +# define WIDTH_FAST 4096 +# endif +# ifdef WIDTH_FAST +# if WIDTH_FAST == 1024 +# define FAST_MUL(y) ((y) << 10) +# endif + +# if WIDTH_FAST == 1152 +# define FAST_MUL(y) (((y) << 10) + ((y) << 7)) +# endif + +# if WIDTH_FAST == 1280 +# define FAST_MUL(y) (((y) << 10) + ((y) << 8)) +# endif + +# if WIDTH_FAST == 2048 +# define FAST_MUL(y) ((y) << 11) +# endif + +# if WIDTH_FAST == 4096 +# define FAST_MUL(y) ((y) << 12) +# endif +# endif + +# if defined(WIDTH_SHIFT) +# ifdef FAST_MUL +# define FUNC_NAME(e) RROP_NAME(RROP_NAME_CAT(e,Shift)) +# if RROP == GXcopy +# define INCLUDE_OTHERS +# define SERIOUS_UNROLLING +# endif +# define INCLUDE_DRAW +# define NWIDTH(nwidth) WIDTH_FAST +# define WIDTH_MUL(y,w) FAST_MUL(y) +# endif +# else +# define FUNC_NAME(e) RROP_NAME(e) +# define WIDTH_MUL(y,w) ((y) * (w)) +# define NWIDTH(nwidth) (nwidth) +# define INCLUDE_DRAW +# if !defined (FAST_MUL) && RROP == GXcopy +# define INCLUDE_OTHERS +# define SERIOUS_UNROLLING +# endif +# endif +#else + +# define INCLUDE_DRAW +# define WIDTH_MUL(y,w) ((y) * (w)) +# define NWIDTH(nwidth) nwidth +# ifdef PREVIOUS +# define FUNC_NAME(e) RROP_NAME(RROP_NAME_CAT(e,Previous)) +# else +# define FUNC_NAME(e) RROP_NAME(e) +# if RROP == GXcopy +# define INCLUDE_OTHERS +# ifdef PLENTIFUL_REGISTERS +# define SAVE_X2Y2 +# endif +# define ORIGIN +# define SERIOUS_UNROLLING +# else +# define EITHER_MODE +# endif +# endif +#endif + +#if PSZ == 24 +#define PXL2ADR(x) ((x)*3 >> 2) + +#if RROP == GXcopy +#define body_rop \ + addrp = (PixelType *)((unsigned long)addrb & ~0x03); \ + switch((unsigned long)addrb & 3){ \ + case 0: \ + *addrp = (*addrp & 0xFF000000)|(piQxelXor[0] & 0xFFFFFF); \ + break; \ + case 1: \ + *addrp = (*addrp & 0xFF)|(piQxelXor[2] & 0xFFFFFF00); \ + break; \ + case 3: \ + *addrp = (*addrp & 0xFFFFFF)|(piQxelXor[0] & 0xFF000000); \ + *(addrp+1)=(*(addrp+1) & 0xFFFF0000)|(piQxelXor[1] & 0xFFFF); \ + break; \ + case 2: \ + *addrp = (*addrp & 0xFFFF)|(piQxelXor[1] & 0xFFFF0000); \ + *(addrp+1)=(*(addrp+1) & 0xFFFFFF00)|(piQxelXor[2] & 0xFF); \ + break; \ + } +#endif +#if RROP == GXxor +#define body_rop \ + addrp = (PixelType *)((unsigned long)addrb & ~0x03); \ + switch((unsigned long)addrb & 3){ \ + case 0: \ + *addrp ^= piQxelXor[0] & 0xFFFFFF; \ + break; \ + case 1: \ + *addrp ^= piQxelXor[2] & 0xFFFFFF00; \ + break; \ + case 3: \ + *addrp ^= piQxelXor[0] & 0xFF000000; \ + *(addrp+1) ^= piQxelXor[1] & 0xFFFF; \ + break; \ + case 2: \ + *addrp ^= piQxelXor[1] & 0xFFFF0000; \ + *(addrp+1) ^= piQxelXor[2] & 0xFF; \ + break; \ + } +#endif +#if RROP == GXand +#define body_rop \ + addrp = (PixelType *)((unsigned long)addrb & ~0x03); \ + switch((unsigned long)addrb & 3){ \ + case 0: \ + *addrp &= piQxelAnd[0] | 0xFF000000; \ + break; \ + case 1: \ + *addrp &= piQxelAnd[2] | 0xFF; \ + break; \ + case 3: \ + *addrp &= 0xFFFFFF | piQxelAnd[0]; \ + *(addrp+1) &= 0xFFFF0000 | piQxelAnd[1]; \ + break; \ + case 2: \ + *addrp &= 0xFFFF | piQxelAnd[1]; \ + *(addrp+1) &= 0xFFFFFF00 | piQxelAnd[2]; \ + break; \ + } +#endif +#if RROP == GXor +#define body_rop \ + addrp = (PixelType *)((unsigned long)addrb & ~0x03); \ + switch((unsigned long)addrb & 3){ \ + case 0: \ + *addrp |= piQxelOr[0] & 0xFFFFFF; \ + break; \ + case 1: \ + *addrp |= piQxelOr[2] & 0xFFFFFF00; \ + break; \ + case 3: \ + *addrp |= piQxelOr[0] & 0xFF000000; \ + *(addrp+1) |= piQxelOr[1] & 0xFFFF; \ + break; \ + case 2: \ + *addrp |= piQxelOr[1] & 0xFFFF0000; \ + *(addrp+1) |= piQxelOr[2] & 0xFF; \ + break; \ + } +#endif +#if RROP == GXset +#define body_rop \ + addrp = (PixelType *)((unsigned long)addrb & ~0x03); \ + switch((unsigned long)addrb & 3){ \ + case 0: \ + *addrp = (*addrp & (piQxelAnd[0]|0xFF000000)) \ + ^ (piQxelXor[0] & 0xFFFFFF); \ + break; \ + case 1: \ + *addrp = (*addrp & (piQxelAnd[2]|0xFF)) \ + ^ (piQxelXor[2] & 0xFFFFFF00); \ + break; \ + case 3: \ + *addrp = (*addrp & (piQxelAnd[0]|0xFFFFFF)) \ + ^ (piQxelXor[0] & 0xFF000000); \ + *(addrp+1) = (*(addrp+1) & (piQxelAnd[1]|0xFFFF0000)) \ + ^ (piQxelXor[1] & 0xFFFF); \ + break; \ + case 2: \ + *addrp = (*addrp & (piQxelAnd[1]|0xFFFF)) \ + ^ (piQxelXor[1] & 0xFFFF0000); \ + *(addrp+1) = (*(addrp+1) & (piQxelAnd[2]|0xFFFFFF00)) \ + ^ (piQxelXor[2] & 0xFF); \ + break; \ + } +#endif +#endif /* PSZ == 24 */ + +#define BUGFIX_clip + +#ifdef INCLUDE_DRAW + +int +#ifdef POLYSEGMENT +FUNC_NAME(cfb8SegmentSS1Rect) (pDrawable, pGC, nseg, pSegInit) + DrawablePtr pDrawable; + GCPtr pGC; + int nseg; + xSegment *pSegInit; +#else +FUNC_NAME(cfb8LineSS1Rect) (pDrawable, pGC, mode, npt, pptInit, pptInitOrig, + x1p,y1p,x2p,y2p) + DrawablePtr pDrawable; + GCPtr pGC; + int mode; /* Origin or Previous */ + int npt; /* number of points */ + DDXPointPtr pptInit, pptInitOrig; + int *x1p, *y1p, *x2p, *y2p; +#endif /* POLYSEGMENT */ +{ + register long e; + register int y1_or_e1; + register PixelType *addrp; + register int stepmajor; + register int stepminor; +#ifndef REARRANGE + register long e3; +#endif +#ifdef mc68000 + register short x1_or_len; +#else + register int x1_or_len; +#endif + RROP_DECLARE + +#ifdef SAVE_X2Y2 +# define c2 y2 +#else + register int c2; +#endif +#if !defined(ORIGIN) && !defined(POLYSEGMENT) + register int _x1 = 0, _y1 = 0, _x2 = 0, _y2 = 0; + int extents_x1, extents_y1, extents_x2, extents_y2; +#endif /* !ORIGIN */ +#ifndef PREVIOUS + register int upperleft, lowerright; + CARD32 ClipMask = 0x80008000; +#endif /* !PREVIOUS */ +#ifdef POLYSEGMENT + register int capStyle; +#endif /* POLYSEGMENT */ +#ifdef SAVE_X2Y2 + register int x2, y2; +# define X1 x1_or_len +# define Y1 y1_or_e1 +# define X2 x2 +# define Y2 y2 +#else +# ifdef POLYSEGMENT +# define X1 x1_or_len +# define Y1 y1_or_e1 +# else +# define X1 intToX(y1_or_e1) +# define Y1 intToY(y1_or_e1) +# endif /* POLYSEGMENT */ +# define X2 intToX(c2) +# define Y2 intToY(c2) +#endif /* SAVE_X2Y2 */ + PixelType *addr; + int nwidth; + cfbPrivGCPtr devPriv; + BoxPtr extents; + int *ppt; +#if PSZ == 24 + int xBase; /* x of addr */ + int xOffset; /* x of addrp */ + PixelType *addrLineEnd; + char *addrb; + int stepmajor3, stepminor3, majordx, minordx; +#endif +#ifndef POLYSEGMENT +#ifndef ORIGIN +#ifdef BUGFIX_clip + int ex_x1, ex_y1, ex_x2, ex_y2; +#endif +#endif +#endif + int octant; + unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); + + devPriv = cfbGetGCPrivate(pGC); + cfbGetPixelWidthAndPointer (pDrawable, nwidth, addr); +#ifndef REARRANGE + RROP_FETCH_GCPRIV(devPriv); +#endif + extents = &pGC->pCompositeClip->extents; +#ifndef PREVIOUS + c2 = *((int *) &pDrawable->x); + c2 -= (c2 & 0x8000) << 1; + upperleft = *((int *) &extents->x1) - c2; + lowerright = *((int *) &extents->x2) - c2 - 0x00010001; +#endif /* !PREVIOUS */ +#ifndef POLYSEGMENT +#ifndef ORIGIN +#ifdef BUGFIX_clip + ex_x1 = extents->x1 - pDrawable->x; + ex_y1 = extents->y1 - pDrawable->y; + ex_x2 = extents->x2 - pDrawable->x; + ex_y2 = extents->y2 - pDrawable->y; +#endif +#endif +#endif +#if PSZ == 24 + xBase = pDrawable->x; + addr += WIDTH_MUL(pDrawable->y,nwidth); +#else + addr = addr + WIDTH_MUL(pDrawable->y,nwidth) + pDrawable->x; +#endif +#ifdef POLYSEGMENT + capStyle = pGC->capStyle - CapNotLast; + ppt = (int *) pSegInit; + while (nseg--) +#else /* POLYSEGMENT */ +#ifdef EITHER_MODE + mode -= CoordModePrevious; + if (!mode) +#endif /* EITHER_MODE */ +#ifndef ORIGIN + { /* CoordModePrevious */ + ppt = (int *)pptInit + 1; + _x1 = *x1p; + _y1 = *y1p; + extents_x1 = extents->x1 - pDrawable->x; + extents_x2 = extents->x2 - pDrawable->x; + extents_y1 = extents->y1 - pDrawable->y; + extents_y2 = extents->y2 - pDrawable->y; + if (_x1 < extents_x1 || _x1 >= extents_x2 || + _y1 < extents_y1 || _y1 >= extents_y2) + { + c2 = *ppt++; + intToCoord(c2, _x2, _y2); + *x2p = _x1 + _x2; + *y2p = _y1 + _y2; + return 1; + } +#if PSZ == 24 + addrLineEnd = addr + WIDTH_MUL(_y1, nwidth); + xOffset = xBase + _x1; + addrb = (char *)addrLineEnd + xOffset * 3; + addrp = (PixelType *)((unsigned long)addrb & ~0x03); +#else + addrp = addr + WIDTH_MUL(_y1, nwidth) + _x1; +#endif + _x2 = _x1; + _y2 = _y1; + } +#endif /* !ORIGIN */ +#ifdef EITHER_MODE + else +#endif /* EITHER_MODE */ +#ifndef PREVIOUS + { + ppt = (int *) pptInit; + c2 = *ppt++; + if (isClipped (c2, upperleft, lowerright)) + { + return 1; + } +#ifdef SAVE_X2Y2 + intToCoord(c2,x2,y2); +#endif +#if PSZ == 24 + addrLineEnd = addr + WIDTH_MUL(Y2, nwidth); + xOffset = xBase + X2; + addrb = (char *)addrLineEnd + xOffset * 3; + addrp = (PixelType *)((unsigned long)addrb & ~0x03); +#else + addrp = addr + WIDTH_MUL(Y2, nwidth) + X2; +#endif + } +#endif /* !PREVIOUS */ + while (--npt) +#endif /* POLYSEGMENT */ + { +#ifdef POLYSEGMENT + y1_or_e1 = ppt[0]; + c2 = ppt[1]; + ppt += 2; + if (isClipped(y1_or_e1,upperleft,lowerright)|isClipped(c2,upperleft,lowerright)) + break; + intToCoord(y1_or_e1,x1_or_len,y1_or_e1); + /* compute now to avoid needing x1, y1 later */ +#if PSZ == 24 + addrLineEnd = addr + WIDTH_MUL(y1_or_e1, nwidth); + xOffset = xBase + x1_or_len; + addrb = (char *)addrLineEnd + xOffset * 3; + addrp = (PixelType *)((unsigned long)addrb & ~0x03); +#else + addrp = addr + WIDTH_MUL(y1_or_e1, nwidth) + x1_or_len; +#endif +#else /* !POLYSEGMENT */ +#ifdef EITHER_MODE + if (!mode) +#endif /* EITHER_MODE */ +#ifndef ORIGIN + { + /* CoordModePrevious */ + _x1 = _x2; + _y1 = _y2; + c2 = *ppt++; + intToCoord(c2, _x2, _y2); + _x2 = _x1 + _x2; + _y2 = _y1 + _y2; + +#ifdef BUGFIX_clip + if (_x2 < ex_x1 || _x2 >= ex_x2 || + _y2 < ex_y1 || _y2 >= ex_y2) +#else + if (_x2 < extents_x1 || _x2 >= extents_x2 || + _y2 < extents_y1 || _y2 >= extents_y2) +#endif + { + break; + } + CalcLineDeltas(_x1, _y1, _x2, _y2, x1_or_len, y1_or_e1, + stepmajor, stepminor, 1, NWIDTH(nwidth), octant); + } +#endif /* !ORIGIN */ +#ifdef EITHER_MODE + else +#endif /* EITHER_MODE */ +#ifndef PREVIOUS + { +#ifndef SAVE_X2Y2 + y1_or_e1 = c2; +#else + y1_or_e1 = y2; + x1_or_len = x2; +#endif /* SAVE_X2Y2 */ + c2 = *ppt++; + + if (isClipped (c2, upperleft, lowerright)) + break; +#ifdef SAVE_X2Y2 + intToCoord(c2,x2,y2); +#endif + CalcLineDeltas(X1, Y1, X2, Y2, x1_or_len, y1_or_e1, + stepmajor, stepminor, 1, NWIDTH(nwidth), octant); + } +#endif /* !PREVIOUS */ +#endif /* POLYSEGMENT */ + +#ifdef POLYSEGMENT + CalcLineDeltas(X1, Y1, X2, Y2, x1_or_len, y1_or_e1, + stepmajor, stepminor, 1, NWIDTH(nwidth), octant); + /* + * although the horizontal code works for polyline, it + * slows down 10 pixel lines by 15%. Thus, this + * code is optimized for horizontal segments and + * random orientation lines, which seems like a reasonable + * assumption + */ + if (y1_or_e1 != 0) + { +#endif /* POLYSEGMENT */ + if (x1_or_len < y1_or_e1) + { +#ifdef REARRANGE + register int e3; +#endif + + e3 = x1_or_len; + x1_or_len = y1_or_e1; + y1_or_e1 = e3; + + e3 = stepminor; + stepminor = stepmajor; + stepmajor = e3; + SetYMajorOctant(octant); + } + + e = -x1_or_len; +#ifdef POLYSEGMENT + if (!capStyle) + x1_or_len--; +#endif + + { +#ifdef REARRANGE + register int e3; + RROP_DECLARE + RROP_FETCH_GCPRIV(devPriv); +#endif + + y1_or_e1 = y1_or_e1 << 1; + e3 = e << 1; + + FIXUP_ERROR(e, octant, bias); + +#if PSZ == 24 + if (stepmajor == 1 || stepmajor == -1){ + stepmajor3 = stepmajor * 3; + stepminor3 = stepminor * sizeof (CfbBits); + majordx = stepmajor; minordx = 0; + } else { + stepmajor3 = stepmajor * sizeof (CfbBits); + stepminor3 = stepminor * 3; + majordx = 0; minordx = stepminor; + } +#endif + +#if PSZ == 24 +#define body {\ + body_rop \ + addrb += stepmajor3; \ + xOffset += majordx; \ + e += y1_or_e1; \ + if (e >= 0){ \ + addrb += stepminor3; \ + xOffset += minordx; \ + e += e3; \ + } \ + } +#else /* PSZ == 24 */ + +#define body {\ + RROP_SOLID(addrp); \ + addrp += stepmajor; \ + e += y1_or_e1; \ + if (e >= 0) \ + { \ + addrp += stepminor; \ + e += e3; \ + } \ + } +#endif /* PSZ == 24 */ + +#ifdef LARGE_INSTRUCTION_CACHE + +# ifdef SERIOUS_UNROLLING +# define UNROLL 16 +# else +# define UNROLL 4 +# endif +#define CASE(n) case -n: body + + while ((x1_or_len -= UNROLL) >= 0) + { + body body body body +# if UNROLL >= 8 + body body body body +# endif +# if UNROLL >= 12 + body body body body +# endif +# if UNROLL >= 16 + body body body body +# endif + } + switch (x1_or_len) + { + CASE(1) CASE(2) CASE(3) +# if UNROLL >= 8 + CASE(4) CASE(5) CASE(6) CASE(7) +# endif +# if UNROLL >= 12 + CASE(8) CASE(9) CASE(10) CASE(11) +# endif +# if UNROLL >= 16 + CASE(12) CASE(13) CASE(14) CASE(15) +# endif + } +#else /* !LARGE_INSTRUCTION_CACHE */ + + IMPORTANT_START + IMPORTANT_START + + if (x1_or_len & 1) + body + x1_or_len >>= 1; + while (x1_or_len--) { + body body + } + + IMPORTANT_END + IMPORTANT_END +#endif /* LARGE_INSTRUCTION_CACHE */ + +#ifdef POLYSEGMENT +#if PSZ == 24 + body_rop +#else + RROP_SOLID(addrp); +#endif +#endif +#if PSZ == 24 + addrp = (PixelType *)((unsigned long)addrb & ~0x03); +#endif + } +#undef body +#ifdef POLYSEGMENT + } + else /* Polysegment horizontal line optimization */ + { +# ifdef REARRANGE + register int e3; + RROP_DECLARE + RROP_FETCH_GCPRIV(devPriv); +# endif /* REARRANGE */ + if (stepmajor < 0) + { +#if PSZ == 24 + xOffset -= x1_or_len; + addrp = addrLineEnd + PXL2ADR(xOffset); +#else + addrp -= x1_or_len; +#endif + if (capStyle) + x1_or_len++; + else +#if PSZ == 24 + xOffset++; + addrp = addrLineEnd + PXL2ADR(xOffset); +#else + addrp++; +#endif + } + else + { +#if PSZ == 24 + addrp = addrLineEnd + PXL2ADR(xOffset); +#endif + if (capStyle) + x1_or_len++; + } +# if PSZ == 24 + y1_or_e1 = xOffset & 3; +# else +# if PGSZ == 64 /* PIM value from is not it! (for 16/32 PSZ)*/ + y1_or_e1 = ((long) addrp) & 0x7; + addrp = (PixelType *) (((unsigned char *) addrp) - y1_or_e1); +# else + y1_or_e1 = ((long) addrp) & PIM; + addrp = (PixelType *) (((unsigned char *) addrp) - y1_or_e1); +# endif +#if PGSZ == 32 +# if PWSH != 2 + y1_or_e1 >>= (2 - PWSH); +# endif +#else /* PGSZ == 64 */ +# if PWSH != 3 + y1_or_e1 >>= (3 - PWSH); +# endif +#endif /* PGSZ */ +# endif /* PSZ == 24 */ +#if PSZ == 24 + { +#if RROP == GXcopy + register int nlmiddle; + int leftIndex = xOffset & 3; + int rightIndex = (xOffset + x1_or_len) & 3; +#else + register int pidx; +#endif + +#if RROP == GXcopy + nlmiddle = x1_or_len; + if(leftIndex){ + nlmiddle -= (4 - leftIndex); + } + if(rightIndex){ + nlmiddle -= rightIndex; + } + + nlmiddle >>= 2; + switch(leftIndex+x1_or_len){ + case 4: + switch(leftIndex){ + case 0: + *addrp++ = piQxelXor[0]; + *addrp++ = piQxelXor[1]; + *addrp = piQxelXor[2]; + break; + case 1: + *addrp = ((*addrp) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + addrp++; + *addrp = piQxelXor[1]; + addrp++; + *addrp = piQxelXor[2]; + break; + case 2: + *addrp = ((*addrp) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + addrp++; + *addrp = piQxelXor[2]; + break; + case 3: + *addrp = ((*addrp) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); + break; + } + break; + case 3: + switch(leftIndex){ + case 0: + *addrp++ = piQxelXor[0]; + *addrp++ = piQxelXor[1]; + *addrp = ((*addrp) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + break; + case 1: + *addrp = ((*addrp) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + addrp++; + *addrp = piQxelXor[1]; + addrp++; + *addrp = ((*addrp) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + break; + case 2: + *addrp = ((*addrp) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + addrp++; + *addrp = ((*addrp) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + break; + } + break; + case 2: + switch(leftIndex){ +/* + case 2: + *addrp = ((*addrp) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + addrp++; + *addrp = ((*addrp) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + break; +*/ + case 1: + *addrp = ((*addrp) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + addrp++; + *addrp = ((*addrp) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + break; + case 0: + *addrp++ = piQxelXor[0]; + *addrp = ((*addrp) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + break; + } + break; + case 1: /*only if leftIndex = 0 and w = 1*/ + if(x1_or_len){ + *addrp = ((*addrp) & 0xFF000000) | (piQxelXor[0] & 0xFFFFFF); + } +/* + else{ + *addrp = ((*addrp) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + addrp++; + *addrp = ((*addrp) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + } +*/ + break; + case 0: /*never*/ + break; + default: + { +/* + maskbits(y1_or_e1, x1_or_len, e, e3, x1_or_len) +*/ + switch(leftIndex){ + case 0: + break; + case 1: + *addrp = ((*addrp) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + addrp++; + *addrp = piQxelXor[1]; + addrp++; + *addrp = piQxelXor[2]; + addrp++; + break; + case 2: + *addrp = ((*addrp) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + addrp++; + *addrp = piQxelXor[2]; + addrp++; + break; + case 3: + *addrp = ((*addrp) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); + addrp++; + break; + } + while(nlmiddle--){ + *addrp++ = piQxelXor[0]; + *addrp++ = piQxelXor[1]; + *addrp++ = piQxelXor[2]; + } + switch(rightIndex++){ + case 0: + break; + case 1: + *addrp = ((*addrp) & 0xFF000000) | (piQxelXor[0] & 0xFFFFFF); + break; + case 2: + *addrp++ = piQxelXor[0]; + *addrp = ((*addrp) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + break; + case 3: + *addrp++ = piQxelXor[0]; + *addrp++ = piQxelXor[1]; + *addrp = ((*addrp) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + break; + } +/* + if (e3){ + e3 &= 0xFFFFFF; + switch(rightIndex&3){ + case 0: + *addrp = ((*addrp) & (0xFF000000 | ~e3)) + | (piQxelXor[0] & 0xFFFFFF & e3); + break; + case 1: + *addrp = ((*addrp) & (0xFFFFFF | ~(e3<<24))) + + (piQxelXor[0] & 0xFF000000 & (e3<<24)); + addrp++; + *addrp = ((*addrp) & (0xFFFF0000|~(e3 >> 8))) + | (piQxelXor[1] & 0xFFFF & (e3 >> 8)); + break; + case 2: + *addrp = ((*addrp) & (0xFFFF|~(e3 << 16))) + | (piQxelXor[1] & 0xFFFF0000 & (e3 << 16)); + addrp++; + *addrp = ((*addrp) & (0xFFFFFF00|~(e3>>16))) + | (piQxelXor[2] & 0xFF & (e3 >> 16)); + break; + case 3: + *addrp = ((*addrp) & (0xFF|~(e3<<8))) + | (piQxelXor[2] & 0xFFFFFF00 & (e3<<8)); + addrp++; + break; + } + } +*/ + } + } +#else /* GXcopy */ + addrp = (PixelType *)((char *)addrLineEnd + ((xOffset * 3) & ~0x03)); + if (x1_or_len <= 1){ + if (x1_or_len) + RROP_SOLID24(addrp, xOffset); + } else { + maskbits(xOffset, x1_or_len, e, e3, x1_or_len); + pidx = xOffset & 3; + if (e){ + RROP_SOLID_MASK(addrp, e, pidx-1); + addrp++; + if (pidx == 3) + pidx = 0; + } + while (--x1_or_len >= 0){ + RROP_SOLID(addrp, pidx); + addrp++; + if (++pidx == 3) + pidx = 0; + } + if (e3) + RROP_SOLID_MASK(addrp, e3, pidx); + } +#endif /* GXcopy */ + } +#else /* PSZ == 24 */ + if (y1_or_e1 + x1_or_len <= PPW) + { + if (x1_or_len) + { + maskpartialbits(y1_or_e1, x1_or_len, e) + RROP_SOLID_MASK((CfbBits *) addrp, e); + } + } + else + { + maskbits(y1_or_e1, x1_or_len, e, e3, x1_or_len) + if (e) + { + RROP_SOLID_MASK((CfbBits *) addrp, e); + addrp += PPW; + } + RROP_SPAN(addrp, x1_or_len) + if (e3) + RROP_SOLID_MASK((CfbBits *) addrp, e3); + } +#endif /* PSZ == 24 */ + } +#endif /* POLYSEGMENT */ + } +#ifdef POLYSEGMENT + if (nseg >= 0) + return (xSegment *) ppt - pSegInit; +#else + if (npt) + { +#ifdef EITHER_MODE + if (!mode) +#endif /* EITHER_MODE */ +#ifndef ORIGIN + { + *x1p = _x1; + *y1p = _y1; + *x2p = _x2; + *y2p = _y2; + } +#endif /* !ORIGIN */ + return ((DDXPointPtr) ppt - pptInit) - 1; + } + +# ifndef ORIGIN +# define C2 c2 +# else +# define C2 ppt[-1] +# endif +#ifdef EITHER_MODE + if (pGC->capStyle != CapNotLast && + ((mode ? (C2 != *((int *) pptInitOrig)) + : ((_x2 != pptInitOrig->x) || + (_y2 != pptInitOrig->y))) + || (ppt == ((int *)pptInitOrig) + 2))) +#endif /* EITHER_MODE */ +#ifdef PREVIOUS + if (pGC->capStyle != CapNotLast && + ((_x2 != pptInitOrig->x) || + (_y2 != pptInitOrig->y) || + (ppt == ((int *)pptInitOrig) + 2))) +#endif /* PREVIOUS */ +#ifdef ORIGIN + if (pGC->capStyle != CapNotLast && + ((C2 != *((int *) pptInitOrig)) || + (ppt == ((int *)pptInitOrig) + 2))) +#endif /* !PREVIOUS */ + { +# ifdef REARRANGE + RROP_DECLARE + + RROP_FETCH_GCPRIV(devPriv); +# endif +#if PSZ == 24 +#if RROP == GXcopy + switch(xOffset & 3){ + case 0: + *addrp = ((*addrp)&0xFF000000)|(piQxelXor[0] & 0xFFFFFF); + break; + case 3: + *addrp = ((*addrp)&0xFF)|(piQxelXor[2] & 0xFFFFFF00); + break; + case 1: + *addrp = ((*addrp)&0xFFFFFF)|(piQxelXor[0] & 0xFF000000); + *(addrp+1) = ((*(addrp+1))&0xFFFF0000)|(piQxelXor[1] & 0xFFFF); + break; + case 2: + *addrp = ((*addrp)&0xFFFF)|(piQxelXor[1] & 0xFFFF0000); + *(addrp+1) = ((*(addrp+1))&0xFFFFFF00)|(piQxelXor[2] & 0xFF); + break; + } +#endif +#if RROP == GXxor + switch(xOffset & 3){ + case 0: + *addrp ^= (piQxelXor[0] & 0xFFFFFF); + break; + case 3: + *addrp ^= (piQxelXor[2] & 0xFFFFFF00); + break; + case 1: + *addrp ^= (piQxelXor[0] & 0xFF000000); + *(addrp+1) ^= (piQxelXor[1] & 0xFFFF); + break; + case 2: + *addrp ^= (piQxelXor[1] & 0xFFFF0000); + *(addrp+1) ^= (piQxelXor[2] & 0xFF); + break; + } +#endif +#if RROP == GXand + switch(xOffset & 3){ + case 0: + *addrp &= (piQxelAnd[0] | 0xFF000000); + break; + case 3: + *addrp &= (piQxelAnd[2] | 0xFF); + break; + case 1: + *addrp &= (0xFFFFFF|piQxelAnd[0]); + *(addrp+1) &= (0xFFFF0000|piQxelAnd[1]); + break; + case 2: + *addrp &= (0xFFFF|piQxelAnd[1]); + *(addrp+1) &= (0xFFFFFF00|piQxelAnd[2]); + break; + } +#endif +#if RROP == GXor + switch(xOffset & 3){ + case 0: + *addrp |= (piQxelOr[0] & 0xFFFFFF); + break; + case 3: + *addrp |= (piQxelOr[2] & 0xFFFFFF00); + break; + case 1: + *addrp |= (piQxelOr[0] & 0xFF000000); + *(addrp+1) |= (piQxelOr[1] & 0xFFFF); + break; + case 2: + *addrp |= (piQxelOr[1] & 0xFFFF0000); + *(addrp+1) |= (piQxelOr[2] & 0xFF); + break; + } +#endif +#if RROP == GXset + switch(xOffset & 3){ + case 0: + *addrp = (((*addrp)&(piQxelAnd[0] |0xFF000000))^(piQxelXor[0] & 0xFFFFFF)); + break; + case 3: + *addrp = (((*addrp)&(piQxelAnd[2]|0xFF))^(piQxelXor[2] & 0xFFFFFF00)); + break; + case 1: + *addrp = (((*addrp)&(piQxelAnd[0]|0xFFFFFF))^(piQxelXor[0] & 0xFF000000)); + *(addrp+1) = (((*(addrp+1))&(piQxelAnd[1]|0xFFFF0000))^(piQxelXor[1] & 0xFFFF)); + break; + case 2: + *addrp = (((*addrp)&(piQxelAnd[1]|0xFFFF))^(piQxelXor[1] & 0xFFFF0000)); + *(addrp+1) = (((*(addrp+1))&(piQxelAnd[2]|0xFFFFFF00))^(piQxelXor[2] & 0xFF)); + break; + } +#endif +#else + RROP_SOLID (addrp); +# endif + } +#endif /* !POLYSEGMENT */ + RROP_UNDECLARE; + return -1; +} + +#endif /* INCLUDE_DRAW */ + + +#ifdef INCLUDE_OTHERS + +#ifdef POLYSEGMENT + +void +cfb8SegmentSS1Rect (pDrawable, pGC, nseg, pSegInit) + DrawablePtr pDrawable; + GCPtr pGC; + int nseg; + xSegment *pSegInit; +{ + int (*func)(DrawablePtr, GCPtr, int, xSegment *); + void (*clip)(DrawablePtr, GCPtr, int, int, int, int, BoxPtr, Bool); + int drawn; + cfbPrivGCPtr devPriv; + +#if defined(__arm32__) && PSZ != 8 + /* XXX -JJK */ + /* There is a painting bug when PSZ != 8; I need to track it down! */ + cfbSegmentSS(pDrawable, pGC, nseg, pSegInit); + return; +#endif + + devPriv = cfbGetGCPrivate(pGC); +#ifdef NO_ONE_RECT + if (REGION_NUM_RECTS(pGC->pCompositeClip) != 1) + { + cfbSegmentSS(pDrawable, pGC, nseg, pSegInit); + return; + } +#endif + switch (devPriv->rop) + { + case GXcopy: + func = cfb8SegmentSS1RectCopy; + clip = cfb8ClippedLineCopy; +#ifdef FAST_MUL + if (cfbGetPixelWidth (pDrawable) == WIDTH_FAST) + func = cfb8SegmentSS1RectShiftCopy; +#endif + break; + case GXxor: + func = cfb8SegmentSS1RectXor; + clip = cfb8ClippedLineXor; + break; + default: + func = cfb8SegmentSS1RectGeneral; + clip = cfb8ClippedLineGeneral; + break; + } + while (nseg) + { + drawn = (*func) (pDrawable, pGC, nseg, pSegInit); + if (drawn == -1) + break; + (*clip) (pDrawable, pGC, + pSegInit[drawn-1].x1, pSegInit[drawn-1].y1, + pSegInit[drawn-1].x2, pSegInit[drawn-1].y2, + &pGC->pCompositeClip->extents, + pGC->capStyle == CapNotLast); + pSegInit += drawn; + nseg -= drawn; + } +} + +#else /* POLYSEGMENT */ + +void +cfb8LineSS1Rect (pDrawable, pGC, mode, npt, pptInit) + DrawablePtr pDrawable; + GCPtr pGC; + int mode; + int npt; + DDXPointPtr pptInit; +{ + int (*func)(DrawablePtr, GCPtr, int, int, + DDXPointPtr, DDXPointPtr, + int *, int *, int *, int *); + void (*clip)(DrawablePtr, GCPtr, int, int, int, int, BoxPtr, Bool); + int drawn; + cfbPrivGCPtr devPriv; + int x1, y1, x2, y2; + DDXPointPtr pptInitOrig = pptInit; + +#if defined(__arm32__) && PSZ != 8 + /* XXX -JJK */ + /* There is a painting bug when PSZ != 8; I need to track it down! */ + cfbLineSS(pDrawable, pGC, mode, npt, pptInit); + return; +#endif + + devPriv = cfbGetGCPrivate(pGC); +#ifdef NO_ONE_RECT + if (REGION_NUM_RECTS(pGC->pCompositeClip) != 1) + { + cfbLineSS(pDrawable, pGC, mode, npt, pptInit); + return; + } +#endif + switch (devPriv->rop) + { + case GXcopy: + func = cfb8LineSS1RectCopy; + clip = cfb8ClippedLineCopy; + if (mode == CoordModePrevious) + func = cfb8LineSS1RectPreviousCopy; + break; + case GXxor: + func = cfb8LineSS1RectXor; + clip = cfb8ClippedLineXor; + break; + default: + func = cfb8LineSS1RectGeneral; + clip = cfb8ClippedLineGeneral; + break; + } + if (mode == CoordModePrevious) + { + x1 = pptInit->x; + y1 = pptInit->y; + while (npt > 1) + { + drawn = (*func) (pDrawable, pGC, mode, npt, pptInit, pptInitOrig, + &x1, &y1, &x2, &y2); + if (drawn == -1) + break; + (*clip) (pDrawable, pGC, x1, y1, x2, y2, + &pGC->pCompositeClip->extents, + drawn != npt - 1 || pGC->capStyle == CapNotLast); + pptInit += drawn; + npt -= drawn; + x1 = x2; + y1 = y2; + } + } + else + { + while (npt > 1) + { + drawn = (*func) (pDrawable, pGC, mode, npt, pptInit, pptInitOrig, + &x1, &y1, &x2, &y2); + if (drawn == -1) + break; + (*clip) (pDrawable, pGC, + pptInit[drawn-1].x, pptInit[drawn-1].y, + pptInit[drawn].x, pptInit[drawn].y, + &pGC->pCompositeClip->extents, + drawn != npt - 1 || pGC->capStyle == CapNotLast); + pptInit += drawn; + npt -= drawn; + } + } +} + +#endif /* else POLYSEGMENT */ +#endif /* INCLUDE_OTHERS */ + +#if !defined(POLYSEGMENT) && !defined (PREVIOUS) + +void +RROP_NAME (cfb8ClippedLine) (pDrawable, pGC, x1, y1, x2, y2, boxp, shorten) + DrawablePtr pDrawable; + GCPtr pGC; + int x1, y1, x2, y2; + BoxPtr boxp; + Bool shorten; +{ + int oc1, oc2; + int e, e1, e3, len; + int adx, ady; + + PixelType *addr; + int nwidth; + int stepx, stepy; + int xorg, yorg; + int new_x1, new_y1, new_x2, new_y2; + Bool pt1_clipped, pt2_clipped; + int changex, changey, result; +#if PSZ == 24 + PixelType *addrLineEnd; + char *addrb; + int stepx3, stepy3; +#endif + int octant; + unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); + + cfbGetPixelWidthAndPointer(pDrawable, nwidth, addr); + + xorg = pDrawable->x; + yorg = pDrawable->y; + x1 += xorg; + y1 += yorg; + x2 += xorg; + y2 += yorg; + oc1 = 0; + oc2 = 0; + OUTCODES (oc1, x1, y1, boxp); + OUTCODES (oc2, x2, y2, boxp); + + if (oc1 & oc2) + return; + + CalcLineDeltas(x1, y1, x2, y2, adx, ady, stepx, stepy, 1, nwidth, octant); + + if (adx <= ady) + { + int t; + + t = adx; + adx = ady; + ady = t; + + t = stepx; + stepx = stepy; + stepy = t; + + SetYMajorOctant(octant); + } + e = - adx; + e1 = ady << 1; + e3 = - (adx << 1); + + FIXUP_ERROR(e, octant, bias); + + new_x1 = x1; + new_y1 = y1; + new_x2 = x2; + new_y2 = y2; + pt1_clipped = 0; + pt2_clipped = 0; + + if (IsXMajorOctant(octant)) + { + result = miZeroClipLine(boxp->x1, boxp->y1, boxp->x2 - 1, boxp->y2 - 1, + &new_x1, &new_y1, &new_x2, &new_y2, + adx, ady, + &pt1_clipped, &pt2_clipped, + octant, bias, oc1, oc2); + if (result == -1) + return; + + len = abs(new_x2 - new_x1) - 1; /* this routine needs the "-1" */ + + /* if we've clipped the endpoint, always draw the full length + * of the segment, because then the capstyle doesn't matter + * if x2,y2 isn't clipped, use the capstyle + * (shorten == TRUE <--> CapNotLast) + */ + if (pt2_clipped || !shorten) + len++; + + if (pt1_clipped) + { + /* must calculate new error terms */ + changex = abs(new_x1 - x1); + changey = abs(new_y1 - y1); + e = e + changey * e3 + changex * e1; + } + } + else /* Y_AXIS */ + { + result = miZeroClipLine(boxp->x1, boxp->y1, boxp->x2 - 1, boxp->y2 - 1, + &new_x1, &new_y1, &new_x2, &new_y2, + ady, adx, + &pt1_clipped, &pt2_clipped, + octant, bias, oc1, oc2); + if (result == -1) + return; + + len = abs(new_y2 - new_y1) - 1; /* this routine needs the "-1" */ + + /* if we've clipped the endpoint, always draw the full length + * of the segment, because then the capstyle doesn't matter + * if x2,y2 isn't clipped, use the capstyle + * (shorten == TRUE <--> CapNotLast) + */ + if (pt2_clipped || !shorten) + len++; + + if (pt1_clipped) + { + /* must calculate new error terms */ + changex = abs(new_x1 - x1); + changey = abs(new_y1 - y1); + e = e + changex * e3 + changey * e1; + } + } + x1 = new_x1; + y1 = new_y1; + { + register PixelType *addrp; + RROP_DECLARE + + RROP_FETCH_GC(pGC); + +#if PSZ == 24 + addrLineEnd = addr + (y1 * nwidth); + addrb = (char *)addrLineEnd + x1 * 3; + if (stepx == 1 || stepx == -1){ + stepx3 = stepx * 3; + stepy3 = stepy * sizeof (CfbBits); + } else { + stepx3 = stepx * sizeof (CfbBits); + stepy3 = stepy * 3; + } +#else + addrp = addr + (y1 * nwidth) + x1; +#endif + +#ifndef REARRANGE + if (!ady) + { +#if PSZ == 24 +#define body {\ + body_rop \ + addrb += stepx3; \ + } +#else +#define body { RROP_SOLID(addrp); addrp += stepx; } +#endif + while (len >= PGSZB) + { + body body body body +#if PGSZ == 64 + body body body body +#endif + len -= PGSZB; + } + switch (len) + { +#if PGSZ == 64 + case 7: body case 6: body case 5: body case 4: body +#endif + case 3: body case 2: body case 1: body + } +#undef body + } + else +#endif /* !REARRANGE */ + { +#if PSZ == 24 +#define body {\ + body_rop \ + addrb += stepx3; \ + e += e1; \ + if (e >= 0) \ + { \ + addrb += stepy3; \ + e += e3; \ + } \ + } +#else +#define body {\ + RROP_SOLID(addrp); \ + addrp += stepx; \ + e += e1; \ + if (e >= 0) \ + { \ + addrp += stepy; \ + e += e3; \ + } \ + } +#endif + +#ifdef LARGE_INSTRUCTION_CACHE + while ((len -= PGSZB) >= 0) + { + body body body body +#if PGSZ == 64 + body body body body +#endif + } + switch (len) + { + case -1: body case -2: body case -3: body +#if PGSZ == 64 + case -4: body case -5: body case -6: body case -7: body +#endif + } +#else /* !LARGE_INSTRUCTION_CACHE */ + IMPORTANT_START; + + while ((len -= 2) >= 0) + { + body body; + } + if (len & 1) + body; + + IMPORTANT_END; +#endif /* LARGE_INSTRUCTION_CACHE */ + } +#if PSZ == 24 + body_rop +#else + RROP_SOLID(addrp); +#endif +#undef body + RROP_UNDECLARE + } +} + +#endif /* !POLYSEGMENT && !PREVIOUS */ +#endif /* PIXEL_ADDR */ diff --git a/xorg-server-1.4/cfb/cfb8lineCO.c b/xorg-server-1.4/cfb/cfb8lineCO.c new file mode 100644 index 0000000..4c7b4ba --- /dev/null +++ b/xorg-server-1.4/cfb/cfb8lineCO.c @@ -0,0 +1,2 @@ +#define RROP GXcopy +#include "../cfb/cfb8line.c" diff --git a/xorg-server-1.4/cfb/cfb8lineCP.c b/xorg-server-1.4/cfb/cfb8lineCP.c new file mode 100644 index 0000000..40f1ee8 --- /dev/null +++ b/xorg-server-1.4/cfb/cfb8lineCP.c @@ -0,0 +1,3 @@ +#define RROP GXcopy +#define PREVIOUS +#include "../cfb/cfb8line.c" diff --git a/xorg-server-1.4/cfb/cfb8lineG.c b/xorg-server-1.4/cfb/cfb8lineG.c new file mode 100644 index 0000000..4750247 --- /dev/null +++ b/xorg-server-1.4/cfb/cfb8lineG.c @@ -0,0 +1,2 @@ +#define RROP GXset +#include "../cfb/cfb8line.c" diff --git a/xorg-server-1.4/cfb/cfb8lineX.c b/xorg-server-1.4/cfb/cfb8lineX.c new file mode 100644 index 0000000..50188f0 --- /dev/null +++ b/xorg-server-1.4/cfb/cfb8lineX.c @@ -0,0 +1,2 @@ +#define RROP GXxor +#include "../cfb/cfb8line.c" diff --git a/xorg-server-1.4/cfb/cfb8segC.c b/xorg-server-1.4/cfb/cfb8segC.c new file mode 100644 index 0000000..0a2f191 --- /dev/null +++ b/xorg-server-1.4/cfb/cfb8segC.c @@ -0,0 +1,3 @@ +#define RROP GXcopy +#define POLYSEGMENT +#include "../cfb/cfb8line.c" diff --git a/xorg-server-1.4/cfb/cfb8segCS.c b/xorg-server-1.4/cfb/cfb8segCS.c new file mode 100644 index 0000000..89fbd96 --- /dev/null +++ b/xorg-server-1.4/cfb/cfb8segCS.c @@ -0,0 +1,4 @@ +#define RROP GXcopy +#define POLYSEGMENT +#define WIDTH_SHIFT +#include "../cfb/cfb8line.c" diff --git a/xorg-server-1.4/cfb/cfb8segX.c b/xorg-server-1.4/cfb/cfb8segX.c new file mode 100644 index 0000000..586e06e --- /dev/null +++ b/xorg-server-1.4/cfb/cfb8segX.c @@ -0,0 +1,3 @@ +#define RROP GXxor +#define POLYSEGMENT +#include "../cfb/cfb8line.c" diff --git a/xorg-server-1.4/cfb/cfb8setG.c b/xorg-server-1.4/cfb/cfb8setG.c new file mode 100644 index 0000000..702a040 --- /dev/null +++ b/xorg-server-1.4/cfb/cfb8setG.c @@ -0,0 +1,3 @@ +#define RROP GXset +#define POLYSEGMENT +#include "../cfb/cfb8line.c" diff --git a/xorg-server-1.4/cfb/cfballpriv.c b/xorg-server-1.4/cfb/cfballpriv.c new file mode 100644 index 0000000..e0ccdf4 --- /dev/null +++ b/xorg-server-1.4/cfb/cfballpriv.c @@ -0,0 +1,92 @@ +/* + * +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. + * + * Author: Keith Packard, MIT X Consortium + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "servermd.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "resource.h" +#include "colormap.h" +#include "colormapst.h" +#include "cfb.h" +#include "mi.h" +#include "mistruct.h" +#include "dix.h" +#include "cfbmskbits.h" +#include "mibstore.h" + +#if 1 || PSZ==8 +int cfbWindowPrivateIndex = -1; +int cfbGCPrivateIndex = -1; +#endif +#ifdef CFB_NEED_SCREEN_PRIVATE +int cfbScreenPrivateIndex = -1; +static unsigned long cfbGeneration = 0; +#endif + + +Bool +cfbAllocatePrivates(pScreen, window_index, gc_index) + ScreenPtr pScreen; + int *window_index, *gc_index; +{ + if (!window_index || !gc_index || + (*window_index == -1 && *gc_index == -1)) + { + if (!mfbAllocatePrivates(pScreen, + &cfbWindowPrivateIndex, &cfbGCPrivateIndex)) + return FALSE; + if (window_index) + *window_index = cfbWindowPrivateIndex; + if (gc_index) + *gc_index = cfbGCPrivateIndex; + } + else + { + cfbWindowPrivateIndex = *window_index; + cfbGCPrivateIndex = *gc_index; + } + if (!AllocateWindowPrivate(pScreen, cfbWindowPrivateIndex, + sizeof(cfbPrivWin)) || + !AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC))) + return FALSE; +#ifdef CFB_NEED_SCREEN_PRIVATE + if (cfbGeneration != serverGeneration) + { + cfbScreenPrivateIndex = AllocateScreenPrivateIndex (); + cfbGeneration = serverGeneration; + } + if (cfbScreenPrivateIndex == -1) + return FALSE; +#endif + return TRUE; +} diff --git a/xorg-server-1.4/cfb/cfbbitblt.c b/xorg-server-1.4/cfb/cfbbitblt.c new file mode 100644 index 0000000..faf49b9 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbbitblt.c @@ -0,0 +1,1454 @@ +/* + * cfb copy area + */ + + +/* + +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 + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include +#include +#include "gcstruct.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "mi.h" +#include "cfb.h" +#include "cfbmskbits.h" +#include "cfb8bit.h" +#include "fastblt.h" +#define MFB_CONSTS_ONLY +#include "maskbits.h" + +#if PSZ == 8 +#define cfbCopyPlane1toN cfbCopyPlane1to8 +#define cfbCopyPlaneNto1 cfbCopyPlane8to1 +#else +static unsigned int FgPixel, BgPixel; +# if PSZ == 16 +#define cfbCopyPlane1toN cfbCopyPlane1to16 +#define cfbCopyPlaneNto1 cfbCopyPlane16to1 +# endif +# if PSZ == 24 +#define cfbCopyPlane1toN cfbCopyPlane1to24 +#define cfbCopyPlaneNto1 cfbCopyPlane24to1 +# endif +# if PSZ == 32 +#define cfbCopyPlane1toN cfbCopyPlane1to32 +#define cfbCopyPlaneNto1 cfbCopyPlane32to1 +# endif +#endif + +/* cfbBitBltcfb == cfbCopyPlaneExpand */ +RegionPtr +cfbBitBlt ( + register DrawablePtr pSrcDrawable, + register DrawablePtr pDstDrawable, + GC *pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty, + void (*doBitBlt)( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/), + unsigned long bitPlane) +{ + RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */ + Bool freeSrcClip = FALSE; + + RegionPtr prgnExposed; + RegionRec rgnDst; + DDXPointPtr pptSrc; + register DDXPointPtr ppt; + register BoxPtr pbox; + int i; + register int dx; + register int dy; + xRectangle origSource; + DDXPointRec origDest; + int numRects; + BoxRec fastBox; + int fastClip = 0; /* for fast clipping with pixmap source */ + int fastExpose = 0; /* for fast exposures with pixmap source */ + + origSource.x = srcx; + origSource.y = srcy; + origSource.width = width; + origSource.height = height; + origDest.x = dstx; + origDest.y = dsty; + + if ((pSrcDrawable != pDstDrawable) && + pSrcDrawable->pScreen->SourceValidate) + { + (*pSrcDrawable->pScreen->SourceValidate) (pSrcDrawable, srcx, srcy, width, height); + } + + srcx += pSrcDrawable->x; + srcy += pSrcDrawable->y; + + /* clip the source */ + + if (pSrcDrawable->type == DRAWABLE_PIXMAP) + { + if ((pSrcDrawable == pDstDrawable) && + (pGC->clientClipType == CT_NONE)) + { + prgnSrcClip = cfbGetCompositeClip(pGC); + } + else + { + fastClip = 1; + } + } + else + { + if (pGC->subWindowMode == IncludeInferiors) + { + /* + * XFree86 DDX empties the border clip when the + * VT is inactive + */ + if (!((WindowPtr) pSrcDrawable)->parent && + REGION_NOTEMPTY (pSrcDrawable->pScreen, + &((WindowPtr) pSrcDrawable)->borderClip)) + { + /* + * special case bitblt from root window in + * IncludeInferiors mode; just like from a pixmap + */ + fastClip = 1; + } + else if ((pSrcDrawable == pDstDrawable) && + (pGC->clientClipType == CT_NONE)) + { + prgnSrcClip = cfbGetCompositeClip(pGC); + } + else + { + prgnSrcClip = NotClippedByChildren((WindowPtr)pSrcDrawable); + freeSrcClip = TRUE; + } + } + else + { + prgnSrcClip = &((WindowPtr)pSrcDrawable)->clipList; + } + } + + fastBox.x1 = srcx; + fastBox.y1 = srcy; + fastBox.x2 = srcx + width; + fastBox.y2 = srcy + height; + + /* Don't create a source region if we are doing a fast clip */ + if (fastClip) + { + fastExpose = 1; + /* + * clip the source; if regions extend beyond the source size, + * make sure exposure events get sent + */ + if (fastBox.x1 < pSrcDrawable->x) + { + fastBox.x1 = pSrcDrawable->x; + fastExpose = 0; + } + if (fastBox.y1 < pSrcDrawable->y) + { + fastBox.y1 = pSrcDrawable->y; + fastExpose = 0; + } + if (fastBox.x2 > pSrcDrawable->x + (int) pSrcDrawable->width) + { + fastBox.x2 = pSrcDrawable->x + (int) pSrcDrawable->width; + fastExpose = 0; + } + if (fastBox.y2 > pSrcDrawable->y + (int) pSrcDrawable->height) + { + fastBox.y2 = pSrcDrawable->y + (int) pSrcDrawable->height; + fastExpose = 0; + } + } + else + { + REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); + REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip); + } + + dstx += pDstDrawable->x; + dsty += pDstDrawable->y; + + if (pDstDrawable->type == DRAWABLE_WINDOW) + { + if (!((WindowPtr)pDstDrawable)->realized) + { + if (!fastClip) + REGION_UNINIT(pGC->pScreen, &rgnDst); + if (freeSrcClip) + REGION_DESTROY(pGC->pScreen, prgnSrcClip); + return NULL; + } + } + + dx = srcx - dstx; + dy = srcy - dsty; + + /* Translate and clip the dst to the destination composite clip */ + if (fastClip) + { + RegionPtr cclip; + + /* Translate the region directly */ + fastBox.x1 -= dx; + fastBox.x2 -= dx; + fastBox.y1 -= dy; + fastBox.y2 -= dy; + + /* If the destination composite clip is one rectangle we can + do the clip directly. Otherwise we have to create a full + blown region and call intersect */ + + /* XXX because CopyPlane uses this routine for 8-to-1 bit + * copies, this next line *must* also correctly fetch the + * composite clip from an mfb gc + */ + + cclip = cfbGetCompositeClip(pGC); + if (REGION_NUM_RECTS(cclip) == 1) + { + BoxPtr pBox = REGION_RECTS(cclip); + + if (fastBox.x1 < pBox->x1) fastBox.x1 = pBox->x1; + if (fastBox.x2 > pBox->x2) fastBox.x2 = pBox->x2; + if (fastBox.y1 < pBox->y1) fastBox.y1 = pBox->y1; + if (fastBox.y2 > pBox->y2) fastBox.y2 = pBox->y2; + + /* Check to see if the region is empty */ + if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2) + { + REGION_NULL(pGC->pScreen, &rgnDst); + } + else + { + REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); + } + } + else + { + /* We must turn off fastClip now, since we must create + a full blown region. It is intersected with the + composite clip below. */ + fastClip = 0; + REGION_INIT(pGC->pScreen, &rgnDst, &fastBox,1); + } + } + else + { + REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy); + } + + if (!fastClip) + { + REGION_INTERSECT(pGC->pScreen, &rgnDst, + &rgnDst, + cfbGetCompositeClip(pGC)); + } + + /* Do bit blitting */ + numRects = REGION_NUM_RECTS(&rgnDst); + if (numRects && width && height) + { + if(!(pptSrc = (DDXPointPtr)ALLOCATE_LOCAL(numRects * + sizeof(DDXPointRec)))) + { + REGION_UNINIT(pGC->pScreen, &rgnDst); + if (freeSrcClip) + REGION_DESTROY(pGC->pScreen, prgnSrcClip); + return NULL; + } + pbox = REGION_RECTS(&rgnDst); + ppt = pptSrc; + for (i = numRects; --i >= 0; pbox++, ppt++) + { + ppt->x = pbox->x1 + dx; + ppt->y = pbox->y1 + dy; + } + + (*doBitBlt) (pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc, pGC->planemask); + DEALLOCATE_LOCAL(pptSrc); + } + + prgnExposed = NULL; + if (pGC->fExpose) + { + /* Pixmap sources generate a NoExposed (we return NULL to do this) */ + if (!fastExpose) + prgnExposed = + miHandleExposures(pSrcDrawable, pDstDrawable, pGC, + origSource.x, origSource.y, + (int)origSource.width, + (int)origSource.height, + origDest.x, origDest.y, bitPlane); + } + REGION_UNINIT(pGC->pScreen, &rgnDst); + if (freeSrcClip) + REGION_DESTROY(pGC->pScreen, prgnSrcClip); + return prgnExposed; +} + + +RegionPtr +cfbCopyPlaneReduce ( + register DrawablePtr pSrcDrawable, + register DrawablePtr pDstDrawable, + GC *pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty, + void (*doCopyPlane)( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/, + unsigned long /*bitPlane*/), + unsigned long bitPlane) +{ + RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */ + Bool freeSrcClip = FALSE; + + RegionPtr prgnExposed; + RegionRec rgnDst; + DDXPointPtr pptSrc; + register DDXPointPtr ppt; + register BoxPtr pbox; + int i; + register int dx; + register int dy; + xRectangle origSource; + DDXPointRec origDest; + int numRects; + BoxRec fastBox; + int fastClip = 0; /* for fast clipping with pixmap source */ + int fastExpose = 0; /* for fast exposures with pixmap source */ + + origSource.x = srcx; + origSource.y = srcy; + origSource.width = width; + origSource.height = height; + origDest.x = dstx; + origDest.y = dsty; + + if ((pSrcDrawable != pDstDrawable) && + pSrcDrawable->pScreen->SourceValidate) + { + (*pSrcDrawable->pScreen->SourceValidate) (pSrcDrawable, srcx, srcy, width, height); + } + + srcx += pSrcDrawable->x; + srcy += pSrcDrawable->y; + + /* clip the source */ + + if (pSrcDrawable->type == DRAWABLE_PIXMAP) + { + if ((pSrcDrawable == pDstDrawable) && + (pGC->clientClipType == CT_NONE)) + { + prgnSrcClip = cfbGetCompositeClip(pGC); + } + else + { + fastClip = 1; + } + } + else + { + if (pGC->subWindowMode == IncludeInferiors) + { + /* + * XFree86 DDX empties the border clip when the + * VT is inactive + */ + if (!((WindowPtr) pSrcDrawable)->parent && + REGION_NOTEMPTY (pSrcDrawable->pScreen, + &((WindowPtr) pSrcDrawable)->borderClip)) + { + /* + * special case bitblt from root window in + * IncludeInferiors mode; just like from a pixmap + */ + fastClip = 1; + } + else if ((pSrcDrawable == pDstDrawable) && + (pGC->clientClipType == CT_NONE)) + { + prgnSrcClip = cfbGetCompositeClip(pGC); + } + else + { + prgnSrcClip = NotClippedByChildren((WindowPtr)pSrcDrawable); + freeSrcClip = TRUE; + } + } + else + { + prgnSrcClip = &((WindowPtr)pSrcDrawable)->clipList; + } + } + + fastBox.x1 = srcx; + fastBox.y1 = srcy; + fastBox.x2 = srcx + width; + fastBox.y2 = srcy + height; + + /* Don't create a source region if we are doing a fast clip */ + if (fastClip) + { + fastExpose = 1; + /* + * clip the source; if regions extend beyond the source size, + * make sure exposure events get sent + */ + if (fastBox.x1 < pSrcDrawable->x) + { + fastBox.x1 = pSrcDrawable->x; + fastExpose = 0; + } + if (fastBox.y1 < pSrcDrawable->y) + { + fastBox.y1 = pSrcDrawable->y; + fastExpose = 0; + } + if (fastBox.x2 > pSrcDrawable->x + (int) pSrcDrawable->width) + { + fastBox.x2 = pSrcDrawable->x + (int) pSrcDrawable->width; + fastExpose = 0; + } + if (fastBox.y2 > pSrcDrawable->y + (int) pSrcDrawable->height) + { + fastBox.y2 = pSrcDrawable->y + (int) pSrcDrawable->height; + fastExpose = 0; + } + } + else + { + REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); + REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip); + } + + dstx += pDstDrawable->x; + dsty += pDstDrawable->y; + + if (pDstDrawable->type == DRAWABLE_WINDOW) + { + if (!((WindowPtr)pDstDrawable)->realized) + { + if (!fastClip) + REGION_UNINIT(pGC->pScreen, &rgnDst); + if (freeSrcClip) + REGION_DESTROY(pGC->pScreen, prgnSrcClip); + return NULL; + } + } + + dx = srcx - dstx; + dy = srcy - dsty; + + /* Translate and clip the dst to the destination composite clip */ + if (fastClip) + { + RegionPtr cclip; + + /* Translate the region directly */ + fastBox.x1 -= dx; + fastBox.x2 -= dx; + fastBox.y1 -= dy; + fastBox.y2 -= dy; + + /* If the destination composite clip is one rectangle we can + do the clip directly. Otherwise we have to create a full + blown region and call intersect */ + + /* XXX because CopyPlane uses this routine for 8-to-1 bit + * copies, this next line *must* also correctly fetch the + * composite clip from an mfb gc + */ + + cclip = cfbGetCompositeClip(pGC); + if (REGION_NUM_RECTS(cclip) == 1) + { + BoxPtr pBox = REGION_RECTS(cclip); + + if (fastBox.x1 < pBox->x1) fastBox.x1 = pBox->x1; + if (fastBox.x2 > pBox->x2) fastBox.x2 = pBox->x2; + if (fastBox.y1 < pBox->y1) fastBox.y1 = pBox->y1; + if (fastBox.y2 > pBox->y2) fastBox.y2 = pBox->y2; + + /* Check to see if the region is empty */ + if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2) + { + REGION_NULL(pGC->pScreen, &rgnDst); + } + else + { + REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); + } + } + else + { + /* We must turn off fastClip now, since we must create + a full blown region. It is intersected with the + composite clip below. */ + fastClip = 0; + REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); + } + } + else + { + REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy); + } + + if (!fastClip) + { + REGION_INTERSECT(pGC->pScreen, &rgnDst, + &rgnDst, + cfbGetCompositeClip(pGC)); + } + + /* Do bit blitting */ + numRects = REGION_NUM_RECTS(&rgnDst); + if (numRects && width && height) + { + if(!(pptSrc = (DDXPointPtr)ALLOCATE_LOCAL(numRects * + sizeof(DDXPointRec)))) + { + REGION_UNINIT(pGC->pScreen, &rgnDst); + if (freeSrcClip) + REGION_DESTROY(pGC->pScreen, prgnSrcClip); + return NULL; + } + pbox = REGION_RECTS(&rgnDst); + ppt = pptSrc; + for (i = numRects; --i >= 0; pbox++, ppt++) + { + ppt->x = pbox->x1 + dx; + ppt->y = pbox->y1 + dy; + } + + (*doCopyPlane) (pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc, pGC->planemask, bitPlane); + DEALLOCATE_LOCAL(pptSrc); + } + + prgnExposed = NULL; + if (pGC->fExpose) + { + /* Pixmap sources generate a NoExposed (we return NULL to do this) */ + if (!fastExpose) + prgnExposed = + miHandleExposures(pSrcDrawable, pDstDrawable, pGC, + origSource.x, origSource.y, + (int)origSource.width, + (int)origSource.height, + origDest.x, origDest.y, bitPlane); + } + REGION_UNINIT(pGC->pScreen, &rgnDst); + if (freeSrcClip) + REGION_DESTROY(pGC->pScreen, prgnSrcClip); + return prgnExposed; +} + + +void +cfbDoBitblt (pSrc, pDst, alu, prgnDst, pptSrc, planemask) + DrawablePtr pSrc, pDst; + int alu; + RegionPtr prgnDst; + DDXPointPtr pptSrc; + unsigned long planemask; +{ + void (*doBitBlt)( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/) + = cfbDoBitbltGeneral; + + if ((planemask & PMSK) == PMSK) { + switch (alu) { + case GXcopy: + doBitBlt = cfbDoBitbltCopy; + break; + case GXxor: + doBitBlt = cfbDoBitbltXor; + break; + case GXor: + doBitBlt = cfbDoBitbltOr; + break; + } + } + (*doBitBlt) (pSrc, pDst, alu, prgnDst, pptSrc, planemask); +} + +RegionPtr +cfbCopyArea(pSrcDrawable, pDstDrawable, + pGC, srcx, srcy, width, height, dstx, dsty) + register DrawablePtr pSrcDrawable; + register DrawablePtr pDstDrawable; + GC *pGC; + int srcx, srcy; + int width, height; + int dstx, dsty; +{ + void (*doBitBlt) ( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/); + + doBitBlt = cfbDoBitbltCopy; + if (pGC->alu != GXcopy || (pGC->planemask & PMSK) != PMSK) + { + doBitBlt = cfbDoBitbltGeneral; + if ((pGC->planemask & PMSK) == PMSK) + { + switch (pGC->alu) { + case GXxor: + doBitBlt = cfbDoBitbltXor; + break; + case GXor: + doBitBlt = cfbDoBitbltOr; + break; + } + } + } + return cfbBitBlt (pSrcDrawable, pDstDrawable, + pGC, srcx, srcy, width, height, dstx, dsty, doBitBlt, 0L); +} + +#if PSZ == 8 +void +cfbCopyPlane1to8 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc, planemask) + DrawablePtr pSrcDrawable; /* must be a bitmap */ + DrawablePtr pDstDrawable; /* must be depth 8 drawable */ + int rop; /* not used; caller must call cfb8CheckOpaqueStipple + * beforehand to get cfb8StippleRRop set correctly */ + RegionPtr prgnDst; /* region in destination to draw to; + * screen relative coords. if dest is a window; + * drawable relative if dest is a pixmap */ + DDXPointPtr pptSrc; /* drawable relative src coords to copy from; + * must be one point for each box in prgnDst */ + unsigned long planemask; /* to apply to destination writes */ +{ + int srcx, srcy; /* upper left corner of box being copied in source */ + int dstx, dsty; /* upper left corner of box being copied in dest */ + int width, height; /* in pixels, unpadded, of box being copied */ + int xoffSrc; /* bit # in leftmost word of row from which copying starts */ + int xoffDst; /* byte # in leftmost word of row from which copying starts */ + CfbBits *psrcBase, *pdstBase; /* start of drawable's pixel data */ + int widthSrc; /* # of groups of 32 pixels (1 bit/pixel) in src bitmap*/ + int widthDst; /* # of groups of 4 pixels (8 bits/pixel) in dst */ + CfbBits *psrcLine, *pdstLine; /* steps a row at a time thru src/dst; + * may point into middle of row */ + register CfbBits *psrc, *pdst; /* steps within the row */ + register CfbBits bits, tmp; /* bits from source */ + register int leftShift; + register int rightShift; + CfbBits startmask; /* left edge pixel mask */ + CfbBits endmask; /* right edge pixel mask */ + register int nlMiddle; /* number of words in middle of the row to draw */ + register int nl; + int firstoff = 0; + int secondoff = 0; + CfbBits src; + int nbox; /* number of boxes in region to copy */ + BoxPtr pbox; /* steps thru boxes in region */ + int pixelsRemainingOnRightEdge; /* # pixels to be drawn on a row after + * the main "middle" loop */ + + cfbGetLongWidthAndPointer (pSrcDrawable, widthSrc, psrcBase) + cfbGetLongWidthAndPointer (pDstDrawable, widthDst, pdstBase) + + nbox = REGION_NUM_RECTS(prgnDst); + pbox = REGION_RECTS(prgnDst); + while (nbox--) + { + dstx = pbox->x1; + dsty = pbox->y1; + srcx = pptSrc->x; + srcy = pptSrc->y; + width = pbox->x2 - pbox->x1; + height = pbox->y2 - pbox->y1; + pbox++; + pptSrc++; + + psrcLine = psrcBase + srcy * widthSrc + (srcx >> MFB_PWSH); + pdstLine = pdstBase + dsty * widthDst + (dstx >> PWSH); + xoffSrc = srcx & MFB_PIM; /* finds starting bit in src */ + xoffDst = dstx & PIM; /* finds starting byte in dst */ + + /* compute startmask, endmask, nlMiddle */ + + if (xoffDst + width < PPW) /* XXX should this be '<= PPW' ? */ + { /* the copy only affects one word per row in destination */ + maskpartialbits(dstx, width, startmask); + endmask = 0; /* nothing on right edge */ + nlMiddle = 0; /* nothing in middle */ + } + else + { /* the copy will affect multiple words per row in destination */ + maskbits(dstx, width, startmask, endmask, nlMiddle); + } + + /* + * compute constants for the first four bits to be + * copied. This avoids troubles with partial first + * writes, and difficult shift computation + */ + if (startmask) + { + firstoff = xoffSrc - xoffDst; + if (firstoff > (MFB_PPW-PPW)) + secondoff = MFB_PPW - firstoff; + if (xoffDst) + { + srcx += (PPW-xoffDst); + xoffSrc = srcx & MFB_PIM; + } + } + leftShift = xoffSrc; + rightShift = MFB_PPW - leftShift; + + pixelsRemainingOnRightEdge = (nlMiddle & 7) * PPW + + ((dstx + width) & PIM); + + /* setup is done; now let's move some bits */ + + /* caller must call cfb8CheckOpaqueStipple before this function + * to set cfb8StippleRRop! + */ + + if (cfb8StippleRRop == GXcopy) + { + while (height--) + { /* one iteration of this loop copies one row */ + psrc = psrcLine; + pdst = pdstLine; + psrcLine += widthSrc; + pdstLine += widthDst; + bits = *psrc++; + if (startmask) + { + if (firstoff < 0) + tmp = BitRight (bits, -firstoff); + else + { + tmp = BitLeft (bits, firstoff); + /* + * need a more cautious test for partialmask + * case... + */ + if (firstoff >= (MFB_PPW-PPW)) + { + bits = *psrc++; + if (firstoff != (MFB_PPW-PPW)) + tmp |= BitRight (bits, secondoff); + } + } + *pdst = (*pdst & ~startmask) | (GetPixelGroup(tmp) & startmask); + pdst++; + } + nl = nlMiddle; + while (nl >= 8) + { + nl -= 8; + tmp = BitLeft(bits, leftShift); + bits = *psrc++; + if (rightShift != MFB_PPW) + tmp |= BitRight(bits, rightShift); + +#ifdef FAST_CONSTANT_OFFSET_MODE +# define StorePixels(pdst,o,pixels) (pdst)[o] = (pixels) +# define EndStep(pdst,o) (pdst) += (o) +# define StoreRopPixels(pdst,o,and,xor) (pdst)[o] = DoRRop((pdst)[o],and,xor); +#else +# define StorePixels(pdst,o,pixels) *(pdst)++ = (pixels) +# define EndStep(pdst,o) +# define StoreRopPixels(pdst,o,and,xor) *(pdst) = DoRRop(*(pdst),and,xor); (pdst)++; +#endif + +#define Step(c) NextBitGroup(c); +#define StoreBitsPlain(o,c) StorePixels(pdst,o,GetPixelGroup(c)) +#define StoreRopBitsPlain(o,c) StoreRopPixels(pdst,o,\ + cfb8StippleAnd[GetBitGroup(c)], \ + cfb8StippleXor[GetBitGroup(c)]) +#define StoreBits0(c) StoreBitsPlain(0,c) +#define StoreRopBits0(c) StoreRopBitsPlain(0,c) + +#if (BITMAP_BIT_ORDER == MSBFirst) +# define StoreBits(o,c) StoreBitsPlain(o,c) +# define StoreRopBits(o,c) StoreRopBitsPlain(o,c) +# define FirstStep(c) Step(c) +#else /* BITMAP_BIT_ORDER == LSBFirst */ +#if PGSZ == 64 +# define StoreBits(o,c) StorePixels(pdst,o, (cfb8Pixels[c & 0xff])) +# define StoreRopBits(o,c) StoreRopPixels(pdst,o, \ + (cfb8StippleAnd[c & 0xff]), \ + (cfb8StippleXor[c & 0xff])) +# define FirstStep(c) c = BitLeft (c, 8); +#else +/* 0x3c is 0xf << 2 (4 bits, long word) */ +# define StoreBits(o,c) StorePixels(pdst,o,*((CfbBits *)\ + (((char *) cfb8Pixels) + (c & 0x3c)))) +# define StoreRopBits(o,c) StoreRopPixels(pdst,o, \ + *((CfbBits *) (((char *) cfb8StippleAnd) + (c & 0x3c))), \ + *((CfbBits *) (((char *) cfb8StippleXor) + (c & 0x3c)))) +# define FirstStep(c) c = BitLeft (c, 2); +#endif /* PGSZ */ +#endif /* BITMAP_BIT_ORDER */ + + StoreBits0(tmp); FirstStep(tmp); + StoreBits(1,tmp); Step(tmp); + StoreBits(2,tmp); Step(tmp); + StoreBits(3,tmp); Step(tmp); + StoreBits(4,tmp); Step(tmp); + StoreBits(5,tmp); Step(tmp); + StoreBits(6,tmp); Step(tmp); + StoreBits(7,tmp); EndStep (pdst,8); + } + + /* do rest of middle and partial word on right edge */ + + if (pixelsRemainingOnRightEdge) + { + tmp = BitLeft(bits, leftShift); + + if (pixelsRemainingOnRightEdge > rightShift) + { + bits = *psrc++; + tmp |= BitRight (bits, rightShift); + } + EndStep (pdst, nl); + switch (nl) + { + case 7: + StoreBitsPlain(-7,tmp); Step(tmp); + case 6: + StoreBitsPlain(-6,tmp); Step(tmp); + case 5: + StoreBitsPlain(-5,tmp); Step(tmp); + case 4: + StoreBitsPlain(-4,tmp); Step(tmp); + case 3: + StoreBitsPlain(-3,tmp); Step(tmp); + case 2: + StoreBitsPlain(-2,tmp); Step(tmp); + case 1: + StoreBitsPlain(-1,tmp); Step(tmp); + } + if (endmask) + *pdst = (*pdst & ~endmask) | (GetPixelGroup(tmp) & endmask); + } + } + } + else /* cfb8StippleRRop != GXcopy */ + { + while (height--) + { /* one iteration of this loop copies one row */ + psrc = psrcLine; + pdst = pdstLine; + psrcLine += widthSrc; + pdstLine += widthDst; + bits = *psrc++; + + /* do partial word on left edge */ + + if (startmask) + { + if (firstoff < 0) + tmp = BitRight (bits, -firstoff); + else + { + tmp = BitLeft (bits, firstoff); + if (firstoff >= (MFB_PPW-PPW)) + { + bits = *psrc++; + if (firstoff != (MFB_PPW-PPW)) + tmp |= BitRight (bits, secondoff); + } + } + src = GetBitGroup(tmp); + *pdst = MaskRRopPixels (*pdst, src, startmask); + pdst++; + } + + /* do middle of row */ + + nl = nlMiddle; + while (nl >= 8) + { + nl -= 8; + tmp = BitLeft(bits, leftShift); + bits = *psrc++; + if (rightShift != MFB_PPW) + tmp |= BitRight(bits, rightShift); + StoreRopBits0(tmp); FirstStep(tmp); + StoreRopBits(1,tmp); Step(tmp); + StoreRopBits(2,tmp); Step(tmp); + StoreRopBits(3,tmp); Step(tmp); + StoreRopBits(4,tmp); Step(tmp); + StoreRopBits(5,tmp); Step(tmp); + StoreRopBits(6,tmp); Step(tmp); + StoreRopBits(7,tmp); EndStep(pdst,8); + } + + /* do rest of middle and partial word on right edge */ + + if (pixelsRemainingOnRightEdge) + { + tmp = BitLeft(bits, leftShift); + + if (pixelsRemainingOnRightEdge > rightShift) + { + bits = *psrc++; /* XXX purify abr here */ + tmp |= BitRight (bits, rightShift); + } + while (nl--) + { + src = GetBitGroup (tmp); + *pdst = RRopPixels (*pdst, src); + pdst++; + NextBitGroup(tmp); + } + if (endmask) + { + src = GetBitGroup (tmp); + *pdst = MaskRRopPixels (*pdst, src, endmask); + } + } + } /* end copy one row */ + } /* end alu is non-copy-mode case */ + } /* end iteration over region boxes */ +} + +#else /* PSZ == 8 */ + +#define mfbmaskbits(x, w, startmask, endmask, nlw) \ + startmask = mfbGetstarttab((x)&0x1f); \ + endmask = mfbGetendtab(((x)+(w)) & 0x1f); \ + if (startmask) \ + nlw = (((w) - (32 - ((x)&0x1f))) >> 5); \ + else \ + nlw = (w) >> 5; + +#define mfbmaskpartialbits(x, w, mask) \ + mask = mfbGetpartmasks((x)&0x1f,(w)&0x1f); + +#define LeftMost 0 +#define StepBit(bit, inc) ((bit) += (inc)) + + +#define GetBits(psrc, nBits, curBit, bitPos, bits) {\ + bits = 0; \ + while (nBits--) \ + { \ + bits |= ((*psrc++ >> bitPos) & 1) << curBit; \ + StepBit (curBit, 1); \ + } \ +} + +/******************************************************************/ + +static void +#if PSZ == 16 +cfbCopyPlane1to16 +#endif +#if PSZ == 24 +cfbCopyPlane1to24 +#endif +#if PSZ == 32 +cfbCopyPlane1to32 +#endif +( + DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + int rop, + RegionPtr prgnDst, + DDXPointPtr pptSrc, + unsigned long planemask) +{ + int srcx, srcy, dstx, dsty; + int width, height; + int xoffSrc; + CfbBits *psrcBase, *pdstBase; + int widthSrc, widthDst; + unsigned int *psrcLine; + register unsigned int *psrc; +#if PSZ == 16 + unsigned short *pdstLine; + register unsigned short *pdst; +#endif +#if PSZ == 32 + unsigned int *pdstLine; + register unsigned int *pdst; +#endif +#if PSZ == 24 + unsigned char *pdstLine; + register unsigned char *pdst; +#endif + register unsigned int bits, tmp; + register unsigned int fgpixel, bgpixel; + register unsigned int src; +#if PSZ == 24 + register unsigned int dst; +#endif + register int leftShift, rightShift; + register int i, nl; + int nbox; + BoxPtr pbox; + int result; + +#if PSZ == 16 + unsigned int doublet[4]; /* Pixel values for 16bpp expansion. */ +#endif +#if PSZ == 32 + unsigned int doublet[8]; /* Pixel values for 32bpp expansion */ +#endif + + fgpixel = FgPixel & planemask; + bgpixel = BgPixel & planemask; + +#if PSZ == 16 + if (rop == GXcopy && (planemask & PMSK) == PMSK) { + doublet[0] = bgpixel | (bgpixel << 16); + doublet[1] = fgpixel | (bgpixel << 16); + doublet[2] = bgpixel | (fgpixel << 16); + doublet[3] = fgpixel | (fgpixel << 16); + } +#endif +#if PSZ == 32 + if (rop == GXcopy && (planemask & PMSK) == PMSK) { + doublet[0] = bgpixel; doublet[1] = bgpixel; + doublet[2] = fgpixel; doublet[3] = bgpixel; + doublet[4] = bgpixel; doublet[5] = fgpixel; + doublet[6] = fgpixel; doublet[7] = fgpixel; + } +#endif + + /* must explicitly ask for "int" widths, as code below expects it */ + /* on some machines (Alpha), "long" and "int" are not the same size */ + cfbGetTypedWidthAndPointer (pSrcDrawable, widthSrc, psrcBase, int, CfbBits) + cfbGetTypedWidthAndPointer (pDstDrawable, widthDst, pdstBase, int, CfbBits) + +#if PSZ == 16 + widthDst <<= 1; +#endif +#if PSZ == 24 + widthDst <<= 2; +#endif + + nbox = REGION_NUM_RECTS(prgnDst); + pbox = REGION_RECTS(prgnDst); + + while (nbox--) + { + dstx = pbox->x1; + dsty = pbox->y1; + srcx = pptSrc->x; + srcy = pptSrc->y; + width = pbox->x2 - pbox->x1; + height = pbox->y2 - pbox->y1; + pbox++; + pptSrc++; + psrcLine = (unsigned int *)psrcBase + srcy * widthSrc + (srcx >> 5); +#if PSZ == 16 + pdstLine = (unsigned short *)pdstBase + dsty * widthDst + dstx; +#endif +#if PSZ == 24 + pdstLine = (unsigned char *)pdstBase + dsty * widthDst + dstx * 3; +#endif +#if PSZ == 32 + pdstLine = (unsigned int *)pdstBase + dsty * widthDst + dstx; +#endif + xoffSrc = srcx & 0x1f; + + /* + * compute constants for the first four bits to be + * copied. This avoids troubles with partial first + * writes, and difficult shift computation + */ + leftShift = xoffSrc; + rightShift = 32 - leftShift; + + if (rop == GXcopy && (planemask & PMSK) == PMSK) + { + while (height--) + { + psrc = psrcLine; + pdst = pdstLine; + psrcLine += widthSrc; + pdstLine += widthDst; + bits = *psrc++; + nl = width; + while (nl >= 32) + { + tmp = BitLeft(bits, leftShift); + bits = *psrc++; + if (rightShift != 32) + tmp |= BitRight(bits, rightShift); + i = 0; +#if PSZ == 16 + /* + * I've thrown in some optimization to at least write + * some aligned 32-bit words instead of 16-bit shorts. + */ + if ((unsigned long)psrc & 2) { + /* Write unaligned 16-bit word at left edge. */ + if (tmp & 0x01) + *pdst = fgpixel; + else + *pdst = bgpixel; + pdst++; + i++; + } + while (i <= 24) + { + unsigned tmpbits = tmp >> i; + *(unsigned int *)pdst = doublet[tmpbits & 0x03]; + *(unsigned int *)(pdst + 2) = + doublet[(tmpbits >> 2) & 0x03]; + *(unsigned int *)(pdst + 4) = + doublet[(tmpbits >> 4) & 0x03]; + *(unsigned int *)(pdst + 6) = + doublet[(tmpbits >> 6) & 0x03]; + pdst += 8; /* Advance four 32-bit words. */ + i += 8; + } + while (i <= 30) + { + *(unsigned int *)pdst = + doublet[(tmp >> i) & 0x03]; + pdst += 2; /* Advance one 32-bit word. */ + i += 2; + } + if (i == 31) { + if ((tmp >> 31) & 0x01) + *pdst = fgpixel; + else + *pdst = bgpixel; + pdst++; + } +#endif +#if PSZ == 24 + while (i < 32) { + if ((tmp >> i) & 0x01) { + *pdst = fgpixel; + *(pdst + 1) = fgpixel >> 8; + *(pdst + 2) = fgpixel >> 16; + } + else { + *pdst = bgpixel; + *(pdst + 1) = bgpixel >> 8; + *(pdst + 2) = bgpixel >> 16; + } + pdst += 3; + i++; + } +#endif +#if PSZ == 32 + while (i <= 28) { + int pair; + pair = (tmp >> i) & 0x03; + *pdst = doublet[pair * 2]; + *(pdst + 1) = doublet[pair * 2 + 1]; + pair = (tmp >> (i + 2)) & 0x03; + *(pdst + 2) = doublet[pair * 2]; + *(pdst + 3) = doublet[pair * 2 + 1]; + pdst += 4; + i += 4; + } + while (i < 32) { + *pdst = ((tmp >> i) & 0x01) ? fgpixel : bgpixel; + pdst++; + i++; + } +#endif + nl -= 32; + } + + if (nl) + { + tmp = BitLeft(bits, leftShift); + /* + * better condition needed -- mustn't run + * off the end of the source... + */ + if (rightShift != 32) + { + bits = *psrc++; + tmp |= BitRight (bits, rightShift); + } + i = 32; + while (nl--) + { + --i; +#if PSZ == 24 + if ((tmp >> (31 - i)) & 0x01) { + *pdst = fgpixel; + *(pdst + 1) = fgpixel >> 8; + *(pdst + 2) = fgpixel >> 16; + } + else { + *pdst = bgpixel; + *(pdst + 1) = bgpixel >> 8; + *(pdst + 2) = bgpixel >> 16; + } + pdst += 3; +#else + *pdst = ((tmp >> (31 - i)) & 0x01) ? fgpixel : bgpixel; + pdst++; +#endif + } + } + } + } + else + { + while (height--) + { + psrc = psrcLine; + pdst = pdstLine; + psrcLine += widthSrc; + pdstLine += widthDst; + bits = *psrc++; + nl = width; + while (nl >= 32) + { + tmp = BitLeft(bits, leftShift); + bits = *psrc++; + if (rightShift != 32) + tmp |= BitRight(bits, rightShift); + i = 32; + while (i--) + { + src = ((tmp >> (31 - i)) & 0x01) ? fgpixel : bgpixel; +#if PSZ == 24 + dst = *pdst; + dst |= (*(pdst + 1)) << 8; + dst |= (*(pdst + 2)) << 16; + DoRop (result, rop, src, dst); + *pdst = (dst & ~planemask) | + (result & planemask); + *(pdst+1) = ((dst & ~planemask) >> 8) | + ((result & planemask) >> 8); + *(pdst+2) = ((dst & ~planemask) >> 16) | + ((result & planemask) >> 16); + pdst += 3; +#else + DoRop (result, rop, src, *pdst); + + *pdst = (*pdst & ~planemask) | + (result & planemask); + pdst++; +#endif + } + nl -= 32; + } + + if (nl) + { + tmp = BitLeft(bits, leftShift); + /* + * better condition needed -- mustn't run + * off the end of the source... + */ + if (rightShift != 32) + { + bits = *psrc++; + tmp |= BitRight (bits, rightShift); + } + i = 32; + while (nl--) + { + --i; + src = ((tmp >> (31 - i)) & 0x01) ? fgpixel : bgpixel; +#if PSZ == 24 + dst = *pdst; + dst |= (*(pdst + 1)) << 8; + dst |= (*(pdst + 2)) << 16; + DoRop (result, rop, src, dst); + *pdst = (dst & ~planemask) | + (result & planemask); + *(pdst+1) = ((dst & ~planemask) >> 8) | + ((result & planemask) >> 8); + *(pdst+2) = ((dst & ~planemask) >> 16) | + ((result & planemask) >> 16); + pdst += 3; +#else + DoRop (result, rop, src, *pdst); + + *pdst = (*pdst & ~planemask) | + (result & planemask); + pdst++; +#endif + } + } + } + } + } +} + +#endif /* PSZ == 8 */ + +/* shared among all different cfb depths through linker magic */ + +RegionPtr cfbCopyPlane(pSrcDrawable, pDstDrawable, + pGC, srcx, srcy, width, height, dstx, dsty, bitPlane) + DrawablePtr pSrcDrawable; + DrawablePtr pDstDrawable; + GCPtr pGC; + int srcx, srcy; + int width, height; + int dstx, dsty; + unsigned long bitPlane; +{ + RegionPtr ret; + +#if IMAGE_BYTE_ORDER == LSBFirst + + void (*doCopyPlaneExpand)( + DrawablePtr /*pSrc*/, + DrawablePtr /*pDst*/, + int /*alu*/, + RegionPtr /*prgnDst*/, + DDXPointPtr /*pptSrc*/, + unsigned long /*planemask*/); + + if (pSrcDrawable->bitsPerPixel == 1 && pDstDrawable->bitsPerPixel == PSZ) + { + if (bitPlane == 1) + { + doCopyPlaneExpand = cfbCopyPlane1toN; +#if PSZ == 8 + cfb8CheckOpaqueStipple (pGC->alu, + pGC->fgPixel, pGC->bgPixel, + pGC->planemask); +#else + FgPixel = pGC->fgPixel; + BgPixel = pGC->bgPixel; +#endif + ret = cfbCopyPlaneExpand (pSrcDrawable, pDstDrawable, + pGC, srcx, srcy, width, height, dstx, dsty, doCopyPlaneExpand, bitPlane); + } + else + ret = miHandleExposures (pSrcDrawable, pDstDrawable, + pGC, srcx, srcy, width, height, dstx, dsty, bitPlane); + } + else if (pSrcDrawable->bitsPerPixel == PSZ && pDstDrawable->bitsPerPixel == 1) + { + int oldalu; + + oldalu = pGC->alu; + if ((pGC->fgPixel & 1) == 0 && (pGC->bgPixel&1) == 1) + pGC->alu = mfbGetInverseAlu(pGC->alu); + else if ((pGC->fgPixel & 1) == (pGC->bgPixel & 1)) + pGC->alu = mfbReduceRop(pGC->alu, pGC->fgPixel); + ret = cfbCopyPlaneReduce(pSrcDrawable, pDstDrawable, + pGC, srcx, srcy, width, height, dstx, dsty, + cfbCopyPlaneNto1, bitPlane); + pGC->alu = oldalu; + } + else if (pSrcDrawable->bitsPerPixel == PSZ && pDstDrawable->bitsPerPixel == PSZ) + { + PixmapPtr pBitmap; + ScreenPtr pScreen = pSrcDrawable->pScreen; + GCPtr pGC1; + + pBitmap = (*pScreen->CreatePixmap) (pScreen, width, height, 1); + if (!pBitmap) + return NULL; + pGC1 = GetScratchGC (1, pScreen); + if (!pGC1) + { + (*pScreen->DestroyPixmap) (pBitmap); + return NULL; + } + /* + * don't need to set pGC->fgPixel,bgPixel as copyPlaneNto1 + * ignores pixel values, expecting the rop to "do the + * right thing", which GXcopy will. + */ + ValidateGC ((DrawablePtr) pBitmap, pGC1); + /* no exposures here, scratch GC's don't get graphics expose */ + cfbCopyPlaneReduce(pSrcDrawable, (DrawablePtr) pBitmap, + pGC1, srcx, srcy, width, height, 0, 0, + cfbCopyPlaneNto1, bitPlane); +#if PSZ == 8 + cfb8CheckOpaqueStipple (pGC->alu, + pGC->fgPixel, pGC->bgPixel, + pGC->planemask); +#else + FgPixel = pGC->fgPixel; + BgPixel = pGC->bgPixel; +#endif + /* no exposures here, copy bits from inside a pixmap */ + cfbCopyPlaneExpand((DrawablePtr) pBitmap, pDstDrawable, pGC, + 0, 0, width, height, dstx, dsty, cfbCopyPlane1toN, 1); + FreeScratchGC (pGC1); + (*pScreen->DestroyPixmap) (pBitmap); + /* compute resultant exposures */ + ret = miHandleExposures (pSrcDrawable, pDstDrawable, pGC, + srcx, srcy, width, height, + dstx, dsty, bitPlane); + } + else +#endif + ret = miCopyPlane (pSrcDrawable, pDstDrawable, + pGC, srcx, srcy, width, height, dstx, dsty, bitPlane); + return ret; +} + + diff --git a/xorg-server-1.4/cfb/cfbblt.c b/xorg-server-1.4/cfb/cfbblt.c new file mode 100644 index 0000000..1e577f5 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbblt.c @@ -0,0 +1,933 @@ +/* + * cfb copy area + */ + +/* + +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 + +*/ + +/* 24-bit bug fixes: Peter Wainwright, 1998/11/28 */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include +#include +#include "gcstruct.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "cfb.h" +#include "cfbmskbits.h" +#include "cfb8bit.h" +#include "fastblt.h" +#include "mergerop.h" + +#ifdef notdef /* XXX fails right now, walks off end of pixmaps */ +#if defined (FAST_UNALIGNED_READS) && PSZ == 8 +#define DO_UNALIGNED_BITBLT +#endif +#endif + +#if defined(FAST_MEMCPY) && (MROP == Mcopy) && PSZ == 8 +#define DO_MEMCPY +#endif + +/* ................................................. */ +/* SPECIAL CODE FOR 24 BITS by Peter Wainwright */ + +#if PSZ == 24 && (MROP) == 0 + +/* The default macros are defined in mergerop.h, and none of them are + really appropriate for what we want to do. + + There are two ways of fixing this: either define SLOW_24BIT_COPY + to copy pixel by pixel, or (by default) use the following macros + modified from mergerop.h + + MROP_SOLID and MROP_MASK are defined for each of the operations, + i.e. each value of MROP. + + There are special cases for Mcopy, McopyInverted, Mxor, and Mor. + There is a completely generic version for MROP=0, and a simplified + generic version which works for (Mcopy|Mxor|MandReverse|Mor). + + However, the generic version does not work for the 24-bit case + because the pixels cannot be packed exactly into a machine word (32 + bits). + + Alternative macros MROP_SOLID24 and MROP_MASK24 are provided for + the 24-bit case. However, these each copy a single *pixel*, not a + single machine word. They take an rvalue source pixel, an lvalue + destination, and the pixel index. The latter is used to find the + position of the pixel data within the two words *dst and *(dst+1). + + Further macros MROP_SOLID24P and MROP_MASK24P are used to copy from + an lvalue source to an lvalue destination. MROP_PIXEL24 is used to + assemble the source pixel from the adjacent words *src and + *(src+1), and this is then split between the destination words + using the non-P macros above. + + But we want to copy entire words for the sake of efficiency. + Unfortunately if a plane mask is specified this must be shifted + from one word to the next. Fortunately the pattern repeats after 3 + words, so we unroll the planemask here and redefine MROP_SOLID + and MROP_MASK. */ + + +#endif /* MROP == 0 && PSZ == 24 */ + +/* ................................................. */ + +#if PSZ == 24 +#define BYPP 3 +#if PGSZ == 32 +#define P3W 4 /* pixels in 3 machine words */ +#define PAM 3 /* pixel align mask; PAM = P3W -1 */ +#define P2WSH 2 +#else +#define P3W 8 /* pixels in 3 machine words */ +#define PAM 7 /* pixel align mask; PAM = P3W -1 */ +#define P2WSH 3 +#endif +#endif + +void +MROP_NAME(cfbDoBitblt)( + DrawablePtr pSrc, + DrawablePtr pDst, + int alu, + RegionPtr prgnDst, + DDXPointPtr pptSrc, + unsigned long planemask) +{ + CfbBits *psrcBase, *pdstBase; + /* start of src and dst bitmaps */ + int widthSrc, widthDst; /* add to get to same position in next line */ + + BoxPtr pbox; + int nbox; + + BoxPtr pboxTmp, pboxNext, pboxBase, pboxNew1, pboxNew2; + /* temporaries for shuffling rectangles */ + DDXPointPtr pptTmp, pptNew1, pptNew2; + /* shuffling boxes entails shuffling the + source points too */ + int w, h; + int xdir; /* 1 = left right, -1 = right left/ */ + int ydir; /* 1 = top down, -1 = bottom up */ + + CfbBits *psrcLine, *pdstLine; + /* pointers to line with current src and dst */ + register CfbBits *psrc;/* pointer to current src longword */ + register CfbBits *pdst;/* pointer to current dst longword */ + + MROP_DECLARE_REG() + + /* following used for looping through a line */ + CfbBits startmask, endmask; /* masks for writing ends of dst */ + int nlMiddle; /* whole longwords in dst */ + int xoffSrc, xoffDst; + register int nl; /* temp copy of nlMiddle */ + int careful; + +#if (PSZ != 24) || (MROP != 0) + register int leftShift, rightShift; + register CfbBits bits; + register CfbBits bits1; +#endif + +#if PSZ == 24 +#ifdef DO_MEMCPY + int w2; +#endif + +#if MROP == 0 + int widthSrcBytes = cfbGetByteWidth(pSrc); + int widthDstBytes = cfbGetByteWidth(pDst); +#endif +#endif + + MROP_INITIALIZE(alu,planemask) + + cfbGetLongWidthAndPointer (pSrc, widthSrc, psrcBase) + + cfbGetLongWidthAndPointer (pDst, widthDst, pdstBase) + + /* XXX we have to err on the side of safety when both are windows, + * because we don't know if IncludeInferiors is being used. + */ + careful = ((pSrc == pDst) || + ((pSrc->type == DRAWABLE_WINDOW) && + (pDst->type == DRAWABLE_WINDOW))); + + pbox = REGION_RECTS(prgnDst); + nbox = REGION_NUM_RECTS(prgnDst); + + pboxNew1 = NULL; + pptNew1 = NULL; + pboxNew2 = NULL; + pptNew2 = NULL; + if (careful && (pptSrc->y < pbox->y1)) + { + /* walk source botttom to top */ + ydir = -1; + widthSrc = -widthSrc; + widthDst = -widthDst; + + if (nbox > 1) + { + /* keep ordering in each band, reverse order of bands */ + pboxNew1 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox); + if(!pboxNew1) + return; + pptNew1 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox); + if(!pptNew1) + { + DEALLOCATE_LOCAL(pboxNew1); + return; + } + pboxBase = pboxNext = pbox+nbox-1; + while (pboxBase >= pbox) + { + while ((pboxNext >= pbox) && + (pboxBase->y1 == pboxNext->y1)) + pboxNext--; + pboxTmp = pboxNext+1; + pptTmp = pptSrc + (pboxTmp - pbox); + while (pboxTmp <= pboxBase) + { + *pboxNew1++ = *pboxTmp++; + *pptNew1++ = *pptTmp++; + } + pboxBase = pboxNext; + } + pboxNew1 -= nbox; + pbox = pboxNew1; + pptNew1 -= nbox; + pptSrc = pptNew1; + } + } + else + { + /* walk source top to bottom */ + ydir = 1; + } + + if (careful && (pptSrc->x < pbox->x1)) + { + /* walk source right to left */ + xdir = -1; + + if (nbox > 1) + { + /* reverse order of rects in each band */ + pboxNew2 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox); + pptNew2 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox); + if(!pboxNew2 || !pptNew2) + { + if (pptNew2) DEALLOCATE_LOCAL(pptNew2); + if (pboxNew2) DEALLOCATE_LOCAL(pboxNew2); + if (pboxNew1) + { + DEALLOCATE_LOCAL(pptNew1); + DEALLOCATE_LOCAL(pboxNew1); + } + return; + } + pboxBase = pboxNext = pbox; + while (pboxBase < pbox+nbox) + { + while ((pboxNext < pbox+nbox) && + (pboxNext->y1 == pboxBase->y1)) + pboxNext++; + pboxTmp = pboxNext; + pptTmp = pptSrc + (pboxTmp - pbox); + while (pboxTmp != pboxBase) + { + *pboxNew2++ = *--pboxTmp; + *pptNew2++ = *--pptTmp; + } + pboxBase = pboxNext; + } + pboxNew2 -= nbox; + pbox = pboxNew2; + pptNew2 -= nbox; + pptSrc = pptNew2; + } + } + else + { + /* walk source left to right */ + xdir = 1; + } + + while(nbox--) + { + w = pbox->x2 - pbox->x1; + h = pbox->y2 - pbox->y1; + +#if PSZ == 24 +#ifdef DO_MEMCPY + w2 = w * BYPP; +#endif +#endif + if (ydir == -1) /* start at last scanline of rectangle */ + { + psrcLine = psrcBase + ((pptSrc->y+h-1) * -widthSrc); + pdstLine = pdstBase + ((pbox->y2-1) * -widthDst); + } + else /* start at first scanline */ + { + psrcLine = psrcBase + (pptSrc->y * widthSrc); + pdstLine = pdstBase + (pbox->y1 * widthDst); + } +#if PSZ == 24 + if (w == 1 && ((pbox->x1 & PAM) == 0 || (pbox->x1 & PAM) == PAM)) +#else + if ((pbox->x1 & PIM) + w <= PPW) +#endif + { + maskpartialbits (pbox->x1, w, endmask); + startmask = 0; + nlMiddle = 0; + } + else + { + maskbits(pbox->x1, w, startmask, endmask, nlMiddle); + } + +#if PSZ == 24 +#if 0 + nlMiddle = w - (pbox->x2 &PAM);; + if(pbox->x1 & PAM){ + nlMiddle -= (PAM+1 - (pbox->x1 &PAM)); + } + nlMiddle >>= P2WSH; + if(nlMiddle < 0) + nlMiddle = 0; +#endif +#endif + +#ifdef DO_MEMCPY + /* If the src and dst scanline don't overlap, do forward case. */ + + if ((xdir == 1) || (pptSrc->y != pbox->y1) + || (pptSrc->x + w <= pbox->x1)) + { +#if PSZ == 24 + char *psrc = (char *) psrcLine + (pptSrc->x * BYPP); + char *pdst = (char *) pdstLine + (pbox->x1 * BYPP); +#else + char *psrc = (char *) psrcLine + pptSrc->x; + char *pdst = (char *) pdstLine + pbox->x1; +#endif + while (h--) + { +#if PSZ == 24 + memcpy(pdst, psrc, w2); +#else + memcpy(pdst, psrc, w); +#endif + pdst += widthDst << PWSH; + psrc += widthSrc << PWSH; + } + } +#else /* ! DO_MEMCPY */ + if (xdir == 1) + { +#if PSZ == 24 && MROP == 0 + /* Note: x is a pixel number; the byte offset is 3*x; + therefore the offset within a word is (3*x) & 3 == + (4*x-x) & 3 == (-x) & 3. The offsets therefore + DECREASE by 1 for each pixel. + */ + xoffSrc = ( - pptSrc->x) & PAM; + xoffDst = ( - pbox->x1) & PAM; +#if 1 + if((int)xoffSrc != (int)xoffDst /* Alignments must be same. */ + || ((widthDstBytes & PAM) != (widthSrcBytes & PAM) && h > 1)) +#else + if(1) +#endif + /* Width also must be same, if hight > 1 */ + { + /* ...otherwise, pixel by pixel operation */ + while (h--) + { + register int i, si, sii, di; + + for (i = 0, si = pptSrc->x, di = pbox->x1; + i < w; + i++, si++, di++) { + psrc = psrcLine + ((si * BYPP) >> P2WSH); + pdst = pdstLine + ((di * BYPP) >> P2WSH); + sii = (si & 3); + MROP_SOLID24P(psrc, pdst, sii, di); + } + pdstLine += widthDst; + psrcLine += widthSrc; + } + } + else +#endif + { + +#if PSZ == 24 + +#if MROP != 0 + xoffSrc = ( - pptSrc->x) & PAM; + xoffDst = ( - pbox->x1) & PAM; +#endif + pdstLine += (pbox->x1 * BYPP) >> P2WSH; + psrcLine += (pptSrc->x * BYPP) >> P2WSH; +#else + xoffSrc = pptSrc->x & PIM; + xoffDst = pbox->x1 & PIM; + pdstLine += (pbox->x1 >> PWSH); + psrcLine += (pptSrc->x >> PWSH); +#endif +#ifdef DO_UNALIGNED_BITBLT + nl = xoffSrc - xoffDst; + psrcLine = (CfbBits *) + (((unsigned char *) psrcLine) + nl); +#else +#if PSZ == 24 && MROP == 0 + /* alredy satisfied */ +#else + if (xoffSrc == xoffDst) +#endif +#endif + { + while (h--) + { +#if PSZ == 24 && MROP == 0 + register int index; + register int im3; +#endif /* PSZ == 24 && MROP == 0 */ + psrc = psrcLine; + pdst = pdstLine; + pdstLine += widthDst; + psrcLine += widthSrc; +#if PSZ == 24 && MROP == 0 + index = (int)(pdst - pdstBase); + im3 = index % 3; +#endif /* PSZ == 24 && MROP == 0 */ + if (startmask) + { +#if PSZ == 24 && MROP == 0 + *pdst = DoMaskMergeRop24u(*psrc, *pdst, startmask, im3); + index++; + im3 = index % 3; +#else /* PSZ != 24 || MROP != 0 */ + *pdst = MROP_MASK(*psrc, *pdst, startmask); +#endif /* PSZ == 24 && MROP == 0 */ + psrc++; + pdst++; + } + + nl = nlMiddle; +#ifdef LARGE_INSTRUCTION_CACHE +#ifdef FAST_CONSTANT_OFFSET_MODE + + psrc += nl & (UNROLL-1); + pdst += nl & (UNROLL-1); + +#if PSZ == 24 && MROP == 0 +#define BodyOdd(n) pdst[-n] = DoMergeRop24u(psrc[-n], pdst[-n], ((int)(pdst - n - pdstBase))%3); +#define BodyEven(n) pdst[-n] = DoMergeRop24u(psrc[-n], pdst[-n], ((int)(pdst - n - pdstBase))%3); +#else /* PSZ != 24 || MROP != 0 */ +#define BodyOdd(n) pdst[-n] = MROP_SOLID (psrc[-n], pdst[-n]); +#define BodyEven(n) pdst[-n] = MROP_SOLID (psrc[-n], pdst[-n]); +#endif /* PSZ == 24 && MROP == 0 */ + +#define LoopReset \ +pdst += UNROLL; \ +psrc += UNROLL; + +#else + +#if PSZ == 24 && MROP == 0 +#define BodyOdd(n) *pdst = DoMergeRop24u(*psrc, *pdst, im3); pdst++; psrc++; index++; im3 = index % 3; +#define BodyEven(n) BodyOdd(n) +#else /* PSZ != 24 || MROP != 0 */ +#define BodyOdd(n) *pdst = MROP_SOLID (*psrc, *pdst); pdst++; psrc++; +#define BodyEven(n) BodyOdd(n) +#endif /* PSZ == 24 && MROP == 0 */ + +#define LoopReset ; + +#endif + PackedLoop + +#undef BodyOdd +#undef BodyEven +#undef LoopReset + +#else +#ifdef NOTDEF + /* you'd think this would be faster -- + * a single instruction instead of 6 + * but measurements show it to be ~15% slower + */ + while ((nl -= 6) >= 0) + { + asm ("moveml %1+,#0x0c0f;moveml#0x0c0f,%0" + : "=m" (*(char *)pdst) + : "m" (*(char *)psrc) + : "d0", "d1", "d2", "d3", + "a2", "a3"); + pdst += 6; + } + nl += 6; + while (nl--) + *pdst++ = *psrc++; +#endif +#if 0 /*PSZ == 24 && MROP == 0*/ + DuffL(nl, label1, + *pdst = DoMergeRop24u(*psrc, *pdst, im3); + pdst++; psrc++; index++;im3 = index % 3;) +#else /* !(PSZ == 24 && MROP == 0) */ + DuffL(nl, label1, + *pdst = MROP_SOLID (*psrc, *pdst); + pdst++; psrc++;) +#endif /* PSZ == 24 && MROP == 0 */ +#endif + + if (endmask) +#if PSZ == 24 && MROP == 0 + *pdst = DoMaskMergeRop24u(*psrc, *pdst, endmask, (int)(pdst - pdstBase) % 3); +#else /* !(PSZ == 24 && MROP == 0) */ + *pdst = MROP_MASK(*psrc, *pdst, endmask); +#endif /* PSZ == 24 && MROP == 0 */ + } + } +#ifndef DO_UNALIGNED_BITBLT +#if PSZ == 24 && MROP == 0 + /* can not happen */ +#else /* !(PSZ == 24 && MROP == 0) */ + else /* xoffSrc != xoffDst */ + { + if (xoffSrc > xoffDst) + { +#if PSZ == 24 + leftShift = (xoffSrc - xoffDst) << 3; +#else +#if PGSZ == 32 + leftShift = (xoffSrc - xoffDst) << (5 - PWSH); +#else /* PGSZ == 64 */ + leftShift = (xoffSrc - xoffDst) << (6 - PWSH); +#endif /* PGSZ */ +#endif + rightShift = PGSZ - leftShift; + } + else + { +#if PSZ == 24 + rightShift = (xoffDst - xoffSrc) << 3; +#else +#if PGSZ == 32 + rightShift = (xoffDst - xoffSrc) << (5 - PWSH); +#else /* PGSZ == 64 */ + rightShift = (xoffDst - xoffSrc) << (6 - PWSH); +#endif /* PGSZ */ +#endif + leftShift = PGSZ - rightShift; + } + while (h--) + { + psrc = psrcLine; + pdst = pdstLine; + pdstLine += widthDst; + psrcLine += widthSrc; + bits = 0; + if (xoffSrc > xoffDst) + bits = *psrc++; + if (startmask) + { + bits1 = BitLeft(bits,leftShift); + bits = *psrc++; + bits1 |= BitRight(bits,rightShift); + *pdst = MROP_MASK(bits1, *pdst, startmask); + pdst++; + } + nl = nlMiddle; +#ifdef LARGE_INSTRUCTION_CACHE + bits1 = bits; + +#ifdef FAST_CONSTANT_OFFSET_MODE + + psrc += nl & (UNROLL-1); + pdst += nl & (UNROLL-1); + +#define BodyOdd(n) \ +bits = psrc[-n]; \ +pdst[-n] = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), pdst[-n]); + +#define BodyEven(n) \ +bits1 = psrc[-n]; \ +pdst[-n] = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), pdst[-n]); + +#define LoopReset \ +pdst += UNROLL; \ +psrc += UNROLL; + +#else + +#define BodyOdd(n) \ +bits = *psrc++; \ +*pdst = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), *pdst); \ +pdst++; + +#define BodyEven(n) \ +bits1 = *psrc++; \ +*pdst = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), *pdst); \ +pdst++; + +#define LoopReset ; + +#endif /* !FAST_CONSTANT_OFFSET_MODE */ + + PackedLoop + +#undef BodyOdd +#undef BodyEven +#undef LoopReset + +#else + DuffL (nl,label2, + bits1 = BitLeft(bits, leftShift); + bits = *psrc++; + *pdst = MROP_SOLID (bits1 | BitRight(bits, rightShift), *pdst); + pdst++; + ) +#endif + + if (endmask) + { + bits1 = BitLeft(bits, leftShift); + if (BitLeft(endmask, rightShift)) + { + bits = *psrc; + bits1 |= BitRight(bits, rightShift); + } + *pdst = MROP_MASK (bits1, *pdst, endmask); + } + } + } +#endif /* (PSZ == 24 && MROP == 0) */ +#endif /* DO_UNALIGNED_BITBLT */ + + } + } +#endif /* ! DO_MEMCPY */ + else /* xdir == -1 */ + { +#if PSZ == 24 && MROP == 0 + xoffSrc = (-(pptSrc->x + w)) & PAM; + xoffDst = (-pbox->x2) & PAM; +#if 1 + if(xoffSrc != xoffDst /* Alignments must be same. */ + || ((widthDstBytes & PAM) != (widthSrcBytes & PAM) && h > 1)) +#else + if(1) +#endif + /* Width also must be same, if hight > 1 */ + { + /* ...otherwise, pixel by pixel operation */ + while (h--) + { + register int i, si, sii, di; + + for (i = 0, si = pptSrc->x + w - 1, di = pbox->x2 - 1; + i < w; + i++, si--, di--) { + psrc = psrcLine + ((si * BYPP) >> P2WSH); + pdst = pdstLine + ((di * BYPP) >> P2WSH); + sii = (si & PAM); + MROP_SOLID24P(psrc, pdst, sii, di); + } + psrcLine += widthSrc; + pdstLine += widthDst; + } + }else +#endif /* MROP == 0 && PSZ == 24 */ + { + +#if PSZ == 24 +#if MROP == 0 + /* already calculated */ +#else + xoffSrc = (pptSrc->x + w) & PAM; + xoffDst = pbox->x2 & PAM; +#endif + pdstLine += ((pbox->x2 * BYPP - 1) >> P2WSH) + 1; + psrcLine += (((pptSrc->x+w) * BYPP - 1) >> P2WSH) + 1; +#else + xoffSrc = (pptSrc->x + w - 1) & PIM; + xoffDst = (pbox->x2 - 1) & PIM; + pdstLine += ((pbox->x2-1) >> PWSH) + 1; + psrcLine += ((pptSrc->x+w - 1) >> PWSH) + 1; +#endif +#ifdef DO_UNALIGNED_BITBLT +#if PSZ == 24 + nl = xoffDst - xoffSrc; +#else + nl = xoffSrc - xoffDst; +#endif + psrcLine = (CfbBits *) + (((unsigned char *) psrcLine) + nl); +#else +#if PSZ == 24 && MROP == 0 + /* already satisfied */ +#else + if (xoffSrc == xoffDst) +#endif +#endif + { + while (h--) + { +#if PSZ == 24 && MROP == 0 + register int index; + register int im3; +#endif /* PSZ == 24 && MROP == 0 */ + psrc = psrcLine; + pdst = pdstLine; + pdstLine += widthDst; + psrcLine += widthSrc; +#if PSZ == 24 && MROP == 0 + index = (int)(pdst - pdstBase); +#endif /* PSZ == 24 && MROP == 0 */ + + if (endmask) + { + pdst--; + psrc--; +#if PSZ == 24 && MROP == 0 + index--; + im3 = index % 3; + *pdst = DoMaskMergeRop24u(*psrc, *pdst, endmask, im3); +#else /* !(PSZ == 24 && MROP == 0) */ + *pdst = MROP_MASK (*psrc, *pdst, endmask); +#endif /* PSZ == 24 && MROP == 0 */ + } + nl = nlMiddle; +#ifdef LARGE_INSTRUCTION_CACHE +#ifdef FAST_CONSTANT_OFFSET_MODE + psrc -= nl & (UNROLL - 1); + pdst -= nl & (UNROLL - 1); + +#if PSZ == 24 && MROP == 0 +#define BodyOdd(n) pdst[n-1] = DoMergeRop24u(psrc[n-1], pdst[n-1], ((int)(pdst - (n - 1) -pdstBase)) % 3); +#else /* !(PSZ == 24 && MROP == 0) */ +#define BodyOdd(n) pdst[n-1] = MROP_SOLID (psrc[n-1], pdst[n-1]); +#endif /* PSZ == 24 && MROP == 0 */ + +#define BodyEven(n) BodyOdd(n) + +#define LoopReset \ +pdst -= UNROLL;\ +psrc -= UNROLL; + +#else + +#if PSZ == 24 && MROP == 0 +#define BodyOdd(n) --pdst; --psrc; --index; im3 = index % 3;*pdst = DoMergeRop24u(*psrc, *pdst, im3); +#else /* !(PSZ == 24 && MROP == 0) */ +#define BodyOdd(n) --pdst; --psrc; *pdst = MROP_SOLID(*psrc, *pdst); +#endif /* PSZ == 24 && MROP == 0 */ +#define BodyEven(n) BodyOdd(n) +#define LoopReset ; + +#endif + PackedLoop + +#undef BodyOdd +#undef BodyEven +#undef LoopReset + +#else +#if PSZ == 24 && MROP == 0 + DuffL(nl,label3, + --pdst; --psrc; --index; im3= index%3;*pdst = DoMergeRop24u(*psrc, *pdst, im3);) +#else /* !(PSZ == 24 && MROP == 0) */ + DuffL(nl,label3, + --pdst; --psrc; *pdst = MROP_SOLID (*psrc, *pdst);) +#endif /* PSZ == 24 && MROP == 0 */ +#endif + + if (startmask) + { + --pdst; + --psrc; +#if PSZ == 24 && MROP == 0 + *pdst = DoMaskMergeRop24u(*psrc, *pdst, startmask, (int)(pdst - pdstBase) % 3); +#else /* !(PSZ == 24 && MROP == 0) */ + *pdst = MROP_MASK(*psrc, *pdst, startmask); +#endif /* PSZ == 24 && MROP == 0 */ + } + } + } +#ifndef DO_UNALIGNED_BITBLT +#if PSZ == 24 && MROP == 0 + /* can not happen */ +#else /* !( PSZ == 24 && MROP == 0) */ + else + { + if (xoffDst > xoffSrc) + { +#if PSZ == 24 + leftShift = (xoffDst - xoffSrc) << 3; + rightShift = PGSZ - leftShift; +#else +#if PGSZ == 32 + rightShift = (xoffDst - xoffSrc) << (5 - PWSH); +#else /* PGSZ == 64 */ + rightShift = (xoffDst - xoffSrc) << (6 - PWSH); +#endif /* PGSZ */ + leftShift = PGSZ - rightShift; +#endif + } + else + { +#if PSZ == 24 + rightShift = (xoffSrc - xoffDst) << 3; + leftShift = PGSZ - rightShift; +#else +#if PGSZ == 32 + leftShift = (xoffSrc - xoffDst) << (5 - PWSH); +#else /* PGSZ == 64 */ + leftShift = (xoffSrc - xoffDst) << (6 - PWSH); +#endif /* PGSZ */ + rightShift = PGSZ - leftShift; +#endif + } + while (h--) + { + psrc = psrcLine; + pdst = pdstLine; + pdstLine += widthDst; + psrcLine += widthSrc; + bits = 0; +#if PSZ == 24 + if (xoffSrc > xoffDst) +#else + if (xoffDst > xoffSrc) +#endif + bits = *--psrc; + if (endmask) + { + bits1 = BitRight(bits, rightShift); + bits = *--psrc; + bits1 |= BitLeft(bits, leftShift); + pdst--; + *pdst = MROP_MASK(bits1, *pdst, endmask); + } + nl = nlMiddle; +#ifdef LARGE_INSTRUCTION_CACHE + bits1 = bits; +#ifdef FAST_CONSTANT_OFFSET_MODE + psrc -= nl & (UNROLL - 1); + pdst -= nl & (UNROLL - 1); + +#define BodyOdd(n) \ +bits = psrc[n-1]; \ +pdst[n-1] = MROP_SOLID(BitRight(bits1, rightShift) | BitLeft(bits, leftShift),pdst[n-1]); + +#define BodyEven(n) \ +bits1 = psrc[n-1]; \ +pdst[n-1] = MROP_SOLID(BitRight(bits, rightShift) | BitLeft(bits1, leftShift),pdst[n-1]); + +#define LoopReset \ +pdst -= UNROLL; \ +psrc -= UNROLL; + +#else + +#define BodyOdd(n) \ +bits = *--psrc; --pdst; \ +*pdst = MROP_SOLID(BitRight(bits1, rightShift) | BitLeft(bits, leftShift),*pdst); + +#define BodyEven(n) \ +bits1 = *--psrc; --pdst; \ +*pdst = MROP_SOLID(BitRight(bits, rightShift) | BitLeft(bits1, leftShift),*pdst); + +#define LoopReset ; + +#endif + + PackedLoop + +#undef BodyOdd +#undef BodyEven +#undef LoopReset + +#else + DuffL (nl, label4, + bits1 = BitRight(bits, rightShift); + bits = *--psrc; + --pdst; + *pdst = MROP_SOLID(bits1 | BitLeft(bits, leftShift),*pdst); + ) +#endif + + if (startmask) + { + bits1 = BitRight(bits, rightShift); + if (BitRight (startmask, leftShift)) + { + bits = *--psrc; + bits1 |= BitLeft(bits, leftShift); + } + --pdst; + *pdst = MROP_MASK(bits1, *pdst, startmask); + } + } + } +#endif /* PSZ == 24 && MROP == 0 */ +#endif + } + } + pbox++; + pptSrc++; + } + if (pboxNew2) + { + DEALLOCATE_LOCAL(pptNew2); + DEALLOCATE_LOCAL(pboxNew2); + } + if (pboxNew1) + { + DEALLOCATE_LOCAL(pptNew1); + DEALLOCATE_LOCAL(pboxNew1); + } +} diff --git a/xorg-server-1.4/cfb/cfbbltC.c b/xorg-server-1.4/cfb/cfbbltC.c new file mode 100644 index 0000000..4e4a455 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbbltC.c @@ -0,0 +1,2 @@ +#define MROP Mcopy +#include "../cfb/cfbblt.c" diff --git a/xorg-server-1.4/cfb/cfbbltG.c b/xorg-server-1.4/cfb/cfbbltG.c new file mode 100644 index 0000000..3197835 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbbltG.c @@ -0,0 +1,2 @@ +#define MROP 0 +#include "../cfb/cfbblt.c" diff --git a/xorg-server-1.4/cfb/cfbbltO.c b/xorg-server-1.4/cfb/cfbbltO.c new file mode 100644 index 0000000..5ec60f6 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbbltO.c @@ -0,0 +1,2 @@ +#define MROP Mor +#include "../cfb/cfbblt.c" diff --git a/xorg-server-1.4/cfb/cfbbltX.c b/xorg-server-1.4/cfb/cfbbltX.c new file mode 100644 index 0000000..e7eee46 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbbltX.c @@ -0,0 +1,2 @@ +#define MROP Mxor +#include "../cfb/cfbblt.c" diff --git a/xorg-server-1.4/cfb/cfbbres.c b/xorg-server-1.4/cfb/cfbbres.c new file mode 100644 index 0000000..fa1ee13 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbbres.c @@ -0,0 +1,340 @@ +/*********************************************************** + +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 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. + +******************************************************************/ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "misc.h" +#include "cfb.h" +#include "cfbmskbits.h" +#include "servermd.h" +#include "miline.h" + +/* Solid bresenham line */ +/* NOTES + e2 is used less often than e1, so it's not in a register +*/ + +void +cfbBresS(rop, and, xor, addrl, nlwidth, signdx, signdy, axis, x1, y1, e, e1, + e2, len) + int rop; + CfbBits and, xor; + CfbBits *addrl; /* pointer to base of bitmap */ + int nlwidth; /* width in longwords of bitmap */ + register int signdx; + int signdy; /* signs of directions */ + int axis; /* major axis (Y_AXIS or X_AXIS) */ + int x1, y1; /* initial point */ + register int e; /* error accumulator */ + register int e1; /* bresenham increments */ + int e2; + int len; /* length of line */ +{ + register int e3 = e2-e1; +#if PSZ == 24 + CfbBits piQxelXor[3],piQxelAnd[3]; + char *addrb; + int nlwidth3, signdx3; +#endif +#ifdef PIXEL_ADDR + register PixelType *addrp; /* Pixel pointer */ + + if (len == 0) + return; + /* point to first point */ + nlwidth <<= PWSH; +#if PSZ == 24 + addrp = (PixelType *)(addrl) + (y1 * nlwidth); + addrb = (char *)addrp + x1 * 3; + + piQxelXor[0] = (xor << 24) | xor; + piQxelXor[1] = (xor << 16)| (xor >> 8); + piQxelXor[2] = (xor << 8) | (xor >> 16); + piQxelAnd[0] = (and << 24) | and; + piQxelAnd[1] = (and << 16)| (and >> 8); + piQxelAnd[2] = (and << 8) | (and >> 16); +#else + addrp = (PixelType *)(addrl) + (y1 * nlwidth) + x1; +#endif + if (signdy < 0) + nlwidth = -nlwidth; + e = e-e1; /* to make looping easier */ +#if PSZ == 24 + nlwidth3 = nlwidth * sizeof (CfbBits); + signdx3 = signdx * 3; +#endif + + if (axis == Y_AXIS) + { + int t; + + t = nlwidth; + nlwidth = signdx; + signdx = t; +#if PSZ == 24 + t = nlwidth3; + nlwidth3 = signdx3; + signdx3 = t; +#endif + } + if (rop == GXcopy) + { + --len; +#if PSZ == 24 +#define body_copy \ + addrp = (PixelType *)((unsigned long)addrb & ~0x03); \ + switch((unsigned long)addrb & 3){ \ + case 0: \ + *addrp = ((*addrp)&0xFF000000)|(piQxelXor[0] & 0xFFFFFF); \ + break; \ + case 1: \ + *addrp = ((*addrp)&0xFF)|(piQxelXor[2] & 0xFFFFFF00); \ + break; \ + case 3: \ + *addrp = ((*addrp)&0xFFFFFF)|(piQxelXor[0] & 0xFF000000); \ + *(addrp+1) = ((*(addrp+1))&0xFFFF0000)|(piQxelXor[1] & 0xFFFF); \ + break; \ + case 2: \ + *addrp = ((*addrp)&0xFFFF)|(piQxelXor[1] & 0xFFFF0000); \ + *(addrp+1) = ((*(addrp+1))&0xFFFFFF00)|(piQxelXor[2] & 0xFF); \ + break; \ + } +#define body {\ + body_copy \ + addrb += signdx3; \ + e += e1; \ + if (e >= 0) \ + { \ + addrb += nlwidth3; \ + e += e3; \ + } \ + } +#else /* PSZ == 24 */ +#define body {\ + *addrp = xor; \ + addrp += signdx; \ + e += e1; \ + if (e >= 0) \ + { \ + addrp += nlwidth; \ + e += e3; \ + } \ + } +#endif /* PSZ == 24 */ + while (len >= 4) + { + body body body body + len -= 4; + } + switch (len) + { + case 3: body case 2: body case 1: body + } +#undef body +#if PSZ == 24 + body_copy +# undef body_copy +#else + *addrp = xor; +#endif + } + else /* not GXcopy */ + { + while(len--) + { +#if PSZ == 24 + addrp = (PixelType *)((unsigned long)addrb & ~0x03); + switch((unsigned long)addrb & 3){ + case 0: + *addrp = (*addrp & (piQxelAnd[0]|0xFF000000)) + ^ (piQxelXor[0] & 0xFFFFFF); + break; + case 1: + *addrp = (*addrp & (piQxelAnd[2]|0xFF)) + ^ (piQxelXor[2] & 0xFFFFFF00); + break; + case 3: + *addrp = (*addrp & (piQxelAnd[0]|0xFFFFFF)) + ^ (piQxelXor[0] & 0xFF000000); + *(addrp+1) = (*(addrp+1) & (piQxelAnd[1]|0xFFFF0000)) + ^ (piQxelXor[1] & 0xFFFF); + break; + case 2: + *addrp = (*addrp & (piQxelAnd[1]|0xFFFF)) + ^ (piQxelXor[1] & 0xFFFF0000); + *(addrp+1) = (*(addrp+1) & (piQxelAnd[2]|0xFFFFFF00)) + ^ (piQxelXor[2] & 0xFF); + break; + } + e += e1; + if (e >= 0) + { + addrb += nlwidth3; + e += e3; + } + addrb += signdx3; +#else /* PSZ == 24 */ + *addrp = DoRRop (*addrp, and, xor); + e += e1; + if (e >= 0) + { + addrp += nlwidth; + e += e3; + } + addrp += signdx; +#endif /* PSZ == 24 */ + } + } +#else /* !PIXEL_ADDR */ + register CfbBits tmp, bit; + CfbBits leftbit, rightbit; + + /* point to longword containing first point */ +#if PSZ == 24 + addrl = (addrl + (y1 * nlwidth) + ((x1 * 3) >>2); +#else + addrl = (addrl + (y1 * nlwidth) + (x1 >> PWSH)); +#endif + if (signdy < 0) + nlwidth = -nlwidth; + e = e-e1; /* to make looping easier */ + + leftbit = cfbmask[0]; +#if PSZ == 24 + rightbit = cfbmask[(PPW-1)<<1]; + bit = cfbmask[(x1 & 3)<<1]; +#else + rightbit = cfbmask[PPW-1]; + bit = cfbmask[x1 & PIM]; +#endif + + if (axis == X_AXIS) + { + if (signdx > 0) + { + while (len--) + { + *addrl = DoMaskRRop (*addrl, and, xor, bit); + bit = SCRRIGHT(bit,1); + e += e1; + if (e >= 0) + { + addrl += nlwidth; + e += e3; + } + if (!bit) + { + bit = leftbit; + addrl++; + } + } + } + else + { + while (len--) + { + *addrl = DoMaskRRop (*addrl, and, xor, bit); + e += e1; + bit = SCRLEFT(bit,1); + if (e >= 0) + { + addrl += nlwidth; + e += e3; + } + if (!bit) + { + bit = rightbit; + addrl--; + } + } + } + } /* if X_AXIS */ + else + { + if (signdx > 0) + { + while(len--) + { + *addrl = DoMaskRRop (*addrl, and, xor, bit); + e += e1; + if (e >= 0) + { + bit = SCRRIGHT(bit,1); + if (!bit) + { + bit = leftbit; + addrl++; + } + e += e3; + } + addrl += nlwidth; + } + } + else + { + while(len--) + { + *addrl = DoMaskRRop (*addrl, and, xor, bit); + e += e1; + if (e >= 0) + { + bit = SCRLEFT(bit,1); + if (!bit) + { + bit = rightbit; + addrl--; + } + e += e3; + } + addrl += nlwidth; + } + } + } /* else Y_AXIS */ +#endif +} diff --git a/xorg-server-1.4/cfb/cfbbresd.c b/xorg-server-1.4/cfb/cfbbresd.c new file mode 100644 index 0000000..ee48a74 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbbresd.c @@ -0,0 +1,404 @@ +/*********************************************************** + +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 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. + +******************************************************************/ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "misc.h" +#include "cfb.h" +#include "cfbmskbits.h" +#include "miline.h" + +/* Dashed bresenham line */ + +void +cfbBresD(rrops, + pdashIndex, pDash, numInDashList, pdashOffset, isDoubleDash, + addrl, nlwidth, + signdx, signdy, axis, x1, y1, e, e1, e2, len) + cfbRRopPtr rrops; + int *pdashIndex; /* current dash */ + unsigned char *pDash; /* dash list */ + int numInDashList; /* total length of dash list */ + int *pdashOffset; /* offset into current dash */ + int isDoubleDash; + CfbBits *addrl; /* pointer to base of bitmap */ + int nlwidth; /* width in longwords of bitmap */ + int signdx, signdy; /* signs of directions */ + int axis; /* major axis (Y_AXIS or X_AXIS) */ + int x1, y1; /* initial point */ + register int e; /* error accumulator */ + register int e1; /* bresenham increments */ + int e2; + int len; /* length of line */ +{ +#ifdef PIXEL_ADDR + register PixelType *addrp; +#endif + register int e3 = e2-e1; + int dashIndex; + int dashOffset; + int dashRemaining; + CfbBits xorFg, andFg, xorBg, andBg; + Bool isCopy; + int thisDash; +#if PSZ == 24 + CfbBits xorPiQxlFg[3], andPiQxlFg[3], xorPiQxlBg[3], andPiQxlBg[3]; + char *addrb; + int signdx3, signdy3; +#endif + + dashOffset = *pdashOffset; + dashIndex = *pdashIndex; + isCopy = (rrops[0].rop == GXcopy && rrops[1].rop == GXcopy); +#if PSZ == 24 + xorFg = rrops[0].xor & 0xffffff; + andFg = rrops[0].and & 0xffffff; + xorBg = rrops[1].xor & 0xffffff; + andBg = rrops[1].and & 0xffffff; + xorPiQxlFg[0] = xorFg | (xorFg << 24); + xorPiQxlFg[1] = (xorFg >> 8) | (xorFg << 16); + xorPiQxlFg[2] = (xorFg >> 16) | (xorFg << 8); + andPiQxlFg[0] = andFg | (andFg << 24); + andPiQxlFg[1] = (andFg >> 8) | (andFg << 16); + andPiQxlFg[2] = (andFg >> 16) | (andFg << 8); + xorPiQxlBg[0] = xorBg | (xorBg << 24); + xorPiQxlBg[1] = (xorBg >> 8) | (xorBg << 16); + xorPiQxlBg[2] = (xorBg >> 16) | (xorBg << 8); + andPiQxlBg[0] = andBg | (andBg << 24); + andPiQxlBg[1] = (andBg >> 8) | (andBg << 16); + andPiQxlBg[2] = (andFg >> 16) | (andBg << 8); +#else + xorFg = rrops[0].xor; + andFg = rrops[0].and; + xorBg = rrops[1].xor; + andBg = rrops[1].and; +#endif + dashRemaining = pDash[dashIndex] - dashOffset; + if ((thisDash = dashRemaining) >= len) + { + thisDash = len; + dashRemaining -= len; + } + e = e-e1; /* to make looping easier */ + +#define BresStep(minor,major) {if ((e += e1) >= 0) { e += e3; minor; } major;} + +#define NextDash {\ + dashIndex++; \ + if (dashIndex == numInDashList) \ + dashIndex = 0; \ + dashRemaining = pDash[dashIndex]; \ + if ((thisDash = dashRemaining) >= len) \ + { \ + dashRemaining -= len; \ + thisDash = len; \ + } \ +} + +#ifdef PIXEL_ADDR + +#if PSZ == 24 +#define Loop(store) while (thisDash--) {\ + store; \ + BresStep(addrb+=signdy3,addrb+=signdx3) \ + } + /* point to first point */ + nlwidth <<= PWSH; + addrp = (PixelType *)(addrl) + (y1 * nlwidth); + addrb = (char *)addrp + x1 * 3; + +#else +#define Loop(store) while (thisDash--) {\ + store; \ + BresStep(addrp+=signdy,addrp+=signdx) \ + } + /* point to first point */ + nlwidth <<= PWSH; + addrp = (PixelType *)(addrl) + (y1 * nlwidth) + x1; +#endif + signdy *= nlwidth; +#if PSZ == 24 + signdx3 = signdx * 3; + signdy3 = signdy * sizeof (CfbBits); +#endif + if (axis == Y_AXIS) + { + int t; + + t = signdx; + signdx = signdy; + signdy = t; +#if PSZ == 24 + t = signdx3; + signdx3 = signdy3; + signdy3 = t; +#endif + } + + if (isCopy) + { +#if PSZ == 24 +#define body_copy(pix) { \ + addrp = (PixelType *)((unsigned long)addrb & ~0x03); \ + switch((unsigned long)addrb & 3){ \ + case 0: \ + *addrp = (*addrp & 0xFF000000)|((pix)[0] & 0xFFFFFF); \ + break; \ + case 1: \ + *addrp = (*addrp & 0xFF)|((pix)[2] & 0xFFFFFF00); \ + break; \ + case 3: \ + *addrp = (*addrp & 0xFFFFFF)|((pix)[0] & 0xFF000000); \ + *(addrp+1) = (*(addrp+1) & 0xFFFF0000)|((pix)[1] & 0xFFFF); \ + break; \ + case 2: \ + *addrp = (*addrp & 0xFFFF)|((pix)[1] & 0xFFFF0000); \ + *(addrp+1) = (*(addrp+1) & 0xFFFFFF00)|((pix)[2] & 0xFF); \ + break; \ + } \ +} +#endif /* PSZ == 24 */ + + for (;;) + { + len -= thisDash; + if (dashIndex & 1) { + if (isDoubleDash) { +#if PSZ == 24 + Loop(body_copy(xorPiQxlBg)) +#else + Loop(*addrp = xorBg) +#endif + } else { + Loop(;) + } + } else { +#if PSZ == 24 + Loop(body_copy(xorPiQxlFg)) +#else + Loop(*addrp = xorFg) +#endif + } + if (!len) + break; + NextDash + } +#undef body_copy + } + else + { +#define body_set(and, xor) { \ + addrp = (PixelType *)((unsigned long)addrb & ~0x03); \ + switch((unsigned long)addrb & 3){ \ + case 0: \ + *addrp = (*addrp & ((and)[0]|0xFF000000)) ^ ((xor)[0] & 0xFFFFFF); \ + break; \ + case 1: \ + *addrp = (*addrp & ((and)[2]|0xFF)) ^ ((xor)[2] & 0xFFFFFF00); \ + break; \ + case 3: \ + *addrp = (*addrp & ((and)[0]|0xFFFFFF)) ^ ((xor)[0] & 0xFF000000); \ + *(addrp+1)=(*(addrp+1)&((and)[1]|0xFFFF0000)) ^ ((xor)[1]&0xFFFF); \ + break; \ + case 2: \ + *addrp = (*addrp & ((and)[1]|0xFFFF)) ^ ((xor)[1] & 0xFFFF0000); \ + *(addrp+1)=(*(addrp+1)&((and)[2]|0xFFFFFF00)) ^ ((xor)[2] & 0xFF); \ + break; \ + } \ +} + + for (;;) + { + len -= thisDash; + if (dashIndex & 1) { + if (isDoubleDash) { +#if PSZ == 24 + Loop(body_set(andPiQxlBg, xorPiQxlBg)) +#else + Loop(*addrp = DoRRop(*addrp,andBg, xorBg)) +#endif + } else { + Loop(;) + } + } else { +#if PSZ == 24 + Loop(body_set(andPiQxlFg, xorPiQxlFg)) +#else + Loop(*addrp = DoRRop(*addrp,andFg, xorFg)) +#endif + } + if (!len) + break; + NextDash + } +#undef body_set + } +#else /* !PIXEL_ADDR */ + { + register CfbBits tmp; + CfbBits startbit, bit; + + /* point to longword containing first point */ +#if PSZ == 24 + addrl = (addrl + (y1 * nlwidth) + ((x1*3) >> 2); +#else + addrl = (addrl + (y1 * nlwidth) + (x1 >> PWSH)); +#endif + signdy = signdy * nlwidth; + + if (signdx > 0) + startbit = cfbmask[0]; + else +#if PSZ == 24 + startbit = cfbmask[(PPW-1)<<1]; + bit = cfbmask[(x1 & 3)<<1]; +#else + startbit = cfbmask[PPW-1]; + bit = cfbmask[x1 & PIM]; +#endif + +#if PSZ == 24 +#define X_Loop(store) while(thisDash--) {\ + store; \ + BresStep(addrl += signdy, \ + if (signdx > 0) \ + bit = SCRRIGHT(bit,1); \ + else \ + bit = SCRLEFT(bit,1); \ + if (!bit) \ + { \ + bit = startbit; \ + addrl += signdx; \ + }) \ + } +#define Y_Loop(store) while(thisDash--) {\ + store; \ + BresStep(if (signdx > 0) \ + bit = SCRRIGHT(bit,1); \ + else \ + bit = SCRLEFT(bit,1); \ + if (!bit) \ + { \ + bit = startbit; \ + addrl += signdx; \ + }, \ + addrl += signdy) \ + } +#else +#define X_Loop(store) while(thisDash--) {\ + store; \ + BresStep(addrl += signdy, \ + if (signdx > 0) \ + bit = SCRRIGHT(bit,1); \ + else \ + bit = SCRLEFT(bit,1); \ + if (!bit) \ + { \ + bit = startbit; \ + addrl += signdx; \ + }) \ + } +#define Y_Loop(store) while(thisDash--) {\ + store; \ + BresStep(if (signdx > 0) \ + bit = SCRRIGHT(bit,1); \ + else \ + bit = SCRLEFT(bit,1); \ + if (!bit) \ + { \ + bit = startbit; \ + addrl += signdx; \ + }, \ + addrl += signdy) \ + } +#endif + + if (axis == X_AXIS) + { + for (;;) + { + len -= thisDash; + if (dashIndex & 1) { + if (isDoubleDash) { + X_Loop(*addrl = DoMaskRRop(*addrl, andBg, xorBg, bit)); + } else { + X_Loop(;) + } + } else { + X_Loop(*addrl = DoMaskRRop(*addrl, andFg, xorFg, bit)); + } + if (!len) + break; + NextDash + } + } /* if X_AXIS */ + else + { + for (;;) + { + len -= thisDash; + if (dashIndex & 1) { + if (isDoubleDash) { + Y_Loop(*addrl = DoMaskRRop(*addrl, andBg, xorBg, bit)); + } else { + Y_Loop(;) + } + } else { + Y_Loop(*addrl = DoMaskRRop(*addrl, andFg, xorFg, bit)); + } + if (!len) + break; + NextDash + } + } /* else Y_AXIS */ + } +#endif + *pdashIndex = dashIndex; + *pdashOffset = pDash[dashIndex] - dashRemaining; +} diff --git a/xorg-server-1.4/cfb/cfbbstore.c b/xorg-server-1.4/cfb/cfbbstore.c new file mode 100644 index 0000000..f09360c --- /dev/null +++ b/xorg-server-1.4/cfb/cfbbstore.c @@ -0,0 +1,143 @@ +/*- + * cfbbstore.c -- + * Functions required by the backing-store implementation in MI. + * + * Copyright (c) 1987 by the Regents of the University of 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. The University of California + * makes no representations about the suitability of this + * software for any purpose. It is provided "as is" without + * express or implied warranty. + * + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "cfb.h" +#include +#include "mibstore.h" +#include "regionstr.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "windowstr.h" + +/*- + *----------------------------------------------------------------------- + * cfbSaveAreas -- + * Function called by miSaveAreas to actually fetch the areas to be + * saved into the backing pixmap. This is very simple to do, since + * cfbDoBitblt is designed for this very thing. The region to save is + * already destination-relative and we're given the offset to the + * window origin, so we have only to create an array of points of the + * u.l. corners of the boxes in the region translated to the screen + * coordinate system and fetch the screen pixmap out of its devPrivate + * field.... + * + * Results: + * None. + * + * Side Effects: + * Data are copied from the screen into the pixmap. + * + *----------------------------------------------------------------------- + */ +void +cfbSaveAreas(pPixmap, prgnSave, xorg, yorg, pWin) + PixmapPtr pPixmap; /* Backing pixmap */ + RegionPtr prgnSave; /* Region to save (pixmap-relative) */ + int xorg; /* X origin of region */ + int yorg; /* Y origin of region */ + WindowPtr pWin; +{ + register DDXPointPtr pPt; + DDXPointPtr pPtsInit; + register BoxPtr pBox; + register int i; + ScreenPtr pScreen = pPixmap->drawable.pScreen; + PixmapPtr pScrPix; + + i = REGION_NUM_RECTS(prgnSave); + pPtsInit = (DDXPointPtr)ALLOCATE_LOCAL(i * sizeof(DDXPointRec)); + if (!pPtsInit) + return; + + pBox = REGION_RECTS(prgnSave); + pPt = pPtsInit; + while (--i >= 0) { + pPt->x = pBox->x1 + xorg; + pPt->y = pBox->y1 + yorg; + pPt++; + pBox++; + } + + pScrPix = (*pScreen->GetWindowPixmap)(pWin); + + + cfbDoBitbltCopy((DrawablePtr) pScrPix, (DrawablePtr)pPixmap, + GXcopy, prgnSave, pPtsInit, ~0L); + + DEALLOCATE_LOCAL (pPtsInit); +} + +/*- + *----------------------------------------------------------------------- + * cfbRestoreAreas -- + * Function called by miRestoreAreas to actually fetch the areas to be + * restored from the backing pixmap. This is very simple to do, since + * cfbDoBitblt is designed for this very thing. The region to restore is + * already destination-relative and we're given the offset to the + * window origin, so we have only to create an array of points of the + * u.l. corners of the boxes in the region translated to the pixmap + * coordinate system and fetch the screen pixmap out of its devPrivate + * field.... + * + * Results: + * None. + * + * Side Effects: + * Data are copied from the pixmap into the screen. + * + *----------------------------------------------------------------------- + */ +void +cfbRestoreAreas(pPixmap, prgnRestore, xorg, yorg, pWin) + PixmapPtr pPixmap; /* Backing pixmap */ + RegionPtr prgnRestore; /* Region to restore (screen-relative)*/ + int xorg; /* X origin of window */ + int yorg; /* Y origin of window */ + WindowPtr pWin; +{ + register DDXPointPtr pPt; + DDXPointPtr pPtsInit; + register BoxPtr pBox; + register int i; + ScreenPtr pScreen = pPixmap->drawable.pScreen; + PixmapPtr pScrPix; + + i = REGION_NUM_RECTS(prgnRestore); + pPtsInit = (DDXPointPtr)ALLOCATE_LOCAL(i*sizeof(DDXPointRec)); + if (!pPtsInit) + return; + + pBox = REGION_RECTS(prgnRestore); + pPt = pPtsInit; + while (--i >= 0) { + pPt->x = pBox->x1 - xorg; + pPt->y = pBox->y1 - yorg; + pPt++; + pBox++; + } + + pScrPix = (*pScreen->GetWindowPixmap)(pWin); + + cfbDoBitbltCopy((DrawablePtr)pPixmap, (DrawablePtr) pScrPix, + GXcopy, prgnRestore, pPtsInit, ~0L); + + DEALLOCATE_LOCAL (pPtsInit); +} diff --git a/xorg-server-1.4/cfb/cfbcmap.c b/xorg-server-1.4/cfb/cfbcmap.c new file mode 100644 index 0000000..b96f671 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbcmap.c @@ -0,0 +1,119 @@ +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + 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 no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or The Open Group +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and The Open Group make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN 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 SUN 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. + +********************************************************/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "scrnintstr.h" +#include "colormapst.h" +#include "resource.h" +#include "micmap.h" +#include "cfb.h" + +int +cfbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps) +{ + return miListInstalledColormaps(pScreen, pmaps); +} + +void +cfbInstallColormap(ColormapPtr pmap) +{ + miInstallColormap(pmap); +} + +void +cfbUninstallColormap(ColormapPtr pmap) +{ + miUninstallColormap(pmap); +} + +void +cfbResolveColor(unsigned short *pred, + unsigned short *pgreen, + unsigned short *pblue, + VisualPtr pVisual) +{ + miResolveColor(pred, pgreen, pblue, pVisual); +} + +Bool +cfbInitializeColormap(ColormapPtr pmap) +{ + return miInitializeColormap(pmap); +} + +int +cfbExpandDirectColors (ColormapPtr pmap, int ndef, + xColorItem *indefs, xColorItem *outdefs) +{ + return miExpandDirectColors(pmap, ndef, indefs, outdefs); +} + +Bool +cfbCreateDefColormap(ScreenPtr pScreen) +{ + return miCreateDefColormap(pScreen); +} + +void +cfbClearVisualTypes(void) +{ + miClearVisualTypes(); +} + +Bool +cfbSetVisualTypes (int depth, int visuals, int bitsPerRGB) +{ + return miSetVisualTypes(depth, visuals, bitsPerRGB, -1); +} + +/* + * Given a list of formats for a screen, create a list + * of visuals and depths for the screen which coorespond to + * the set which can be used with this version of cfb. + */ + +Bool +cfbInitVisuals (VisualPtr *visualp, + DepthPtr *depthp, + int *nvisualp, + int *ndepthp, + int *rootDepthp, + VisualID *defaultVisp, + unsigned long sizes, + int bitsPerRGB) +{ + return miInitVisuals(visualp, depthp, nvisualp, ndepthp, rootDepthp, + defaultVisp, sizes, bitsPerRGB, -1); +} diff --git a/xorg-server-1.4/cfb/cfbcppl.c b/xorg-server-1.4/cfb/cfbcppl.c new file mode 100644 index 0000000..c13baf1 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbcppl.c @@ -0,0 +1,488 @@ +/* +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 + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include "gcstruct.h" +#include "window.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "windowstr.h" +#include "cfb.h" +#if PSZ == 8 +#undef PSZ /* for maskbits.h */ +#include "maskbits.h" +#define PSZ 8 +#include "mergerop.h" +#else /* PSZ==8 */ +#include "cfbtab.h" /* provides starttab, endttab, partmasks */ +#endif /* PSZ==8 */ + + +void +cfbCopyImagePlane( + DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + int rop, + RegionPtr prgnDst, + DDXPointPtr pptSrc, + unsigned long planemask) +{ + /* note: there must be some sort of trick behind, + passing a planemask value with all bits set + whilst using the current planemask for the bitPlane value. */ +#if PSZ == 8 + cfbCopyPlane8to1 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc, + (unsigned long) ~0L, planemask); +#endif +#if PSZ == 16 + cfbCopyPlane16to1 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc, + (unsigned long) ~0L, planemask); +#endif +#if PSZ == 24 + cfbCopyPlane24to1 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc, + (unsigned long) ~0L, planemask); +#endif +#if PSZ == 32 + cfbCopyPlane32to1 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc, + (unsigned long) ~0L, planemask); +#endif +} + +#if PSZ == 8 + +#if BITMAP_BIT_ORDER == MSBFirst +#define LeftMost (MFB_PPW-1) +#define StepBit(bit, inc) ((bit) -= (inc)) +#else +#define LeftMost 0 +#define StepBit(bit, inc) ((bit) += (inc)) +#endif + +#define GetBits(psrc, nBits, curBit, bitPos, bits) {\ + bits = 0; \ + while (nBits--) \ + { \ + bits |= (PixelType)(((*psrc++ >> bitPos) & 1)) << curBit; \ + StepBit (curBit, 1); \ + } \ +} + +void +cfbCopyPlane8to1( + DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + int rop, + RegionPtr prgnDst, + DDXPointPtr pptSrc, + unsigned long planemask, + unsigned long bitPlane) +{ + int srcx, srcy, dstx, dsty, width, height; + unsigned char *psrcBase; + PixelType *pdstBase; + int widthSrc, widthDst; + unsigned char *psrcLine; + PixelType *pdstLine; + register unsigned char *psrc; + register int i; + register int curBit; + register int bitPos; + register CfbBits bits; + register PixelType *pdst; + PixelType startmask, endmask; + int niStart = 0, niEnd = 0; + int bitStart = 0, bitEnd = 0; + int nl, nlMiddle; + int nbox; + BoxPtr pbox; + MROP_DECLARE() + + if (!(planemask & 1)) + return; + + if (rop != GXcopy) + MROP_INITIALIZE (rop, planemask); + + cfbGetByteWidthAndPointer (pSrcDrawable, widthSrc, psrcBase) + + mfbGetPixelWidthAndPointer (pDstDrawable, widthDst, pdstBase) + + bitPos = ffs (bitPlane) - 1; + + nbox = REGION_NUM_RECTS(prgnDst); + pbox = REGION_RECTS(prgnDst); + while (nbox--) + { + dstx = pbox->x1; + dsty = pbox->y1; + srcx = pptSrc->x; + srcy = pptSrc->y; + width = pbox->x2 - pbox->x1; + height = pbox->y2 - pbox->y1; + pbox++; + pptSrc++; + psrcLine = psrcBase + srcy * widthSrc + srcx; + pdstLine = mfbScanline(pdstBase, dstx, dsty, widthDst); + dstx &= MFB_PIM; + if (dstx + width <= MFB_PPW) + { + maskpartialbits(dstx, width, startmask); + nlMiddle = 0; + endmask = 0; + } + else + { + maskbits (dstx, width, startmask, endmask, nlMiddle); + } + if (startmask) + { + niStart = min(MFB_PPW - dstx, width); + bitStart = LeftMost; + StepBit (bitStart, dstx); + } + if (endmask) + { + niEnd = (dstx + width) & MFB_PIM; + bitEnd = LeftMost; + } + if (rop == GXcopy) + { + while (height--) + { + psrc = psrcLine; + pdst = pdstLine; + psrcLine += widthSrc; + mfbScanlineInc(pdstLine, widthDst); + if (startmask) + { + i = niStart; + curBit = bitStart; + GetBits (psrc, i, curBit, bitPos, bits); + *pdst = (*pdst & ~startmask) | bits; + pdst++; + } + nl = nlMiddle; + while (nl--) + { + i = MFB_PPW; + curBit = LeftMost; + GetBits (psrc, i, curBit, bitPos, bits); + *pdst++ = bits; + } + if (endmask) + { + i = niEnd; + curBit = bitEnd; + GetBits (psrc, i, curBit, bitPos, bits); + *pdst = (*pdst & ~endmask) | bits; + } + } + } + else + { + while (height--) + { + psrc = psrcLine; + pdst = pdstLine; + psrcLine += widthSrc; + mfbScanlineInc(pdstLine, widthDst); + if (startmask) + { + i = niStart; + curBit = bitStart; + GetBits (psrc, i, curBit, bitPos, bits); + *pdst = MROP_MASK(bits, *pdst, startmask); + pdst++; + } + nl = nlMiddle; + while (nl--) + { + i = MFB_PPW; + curBit = LeftMost; + GetBits (psrc, i, curBit, bitPos, bits); + *pdst = MROP_SOLID(bits, *pdst); + pdst++; + } + if (endmask) + { + i = niEnd; + curBit = bitEnd; + GetBits (psrc, i, curBit, bitPos, bits); + *pdst = MROP_MASK (bits, *pdst, endmask); + } + } + } + } +} + +#else /* PSZ == 8 */ + +#define mfbmaskbits(x, w, startmask, endmask, nlw) \ + startmask = mfbGetstarttab((x)&0x1f); \ + endmask = mfbGetendtab(((x)+(w)) & 0x1f); \ + if (startmask) \ + nlw = (((w) - (32 - ((x)&0x1f))) >> 5); \ + else \ + nlw = (w) >> 5; + +#define mfbmaskpartialbits(x, w, mask) \ + mask = mfbGetpartmasks((x)&0x1f,(w)&0x1f); + +#define LeftMost 0 +#define StepBit(bit, inc) ((bit) += (inc)) + + +#if PSZ == 24 +#define GetBits(psrc, nBits, curBit, bitPos, bits) {\ + bits = 0; \ + while (nBits--) \ + { \ + if (bitPos < 8) \ + { \ + bits |= ((*psrc++ >> bitPos) & 1) << curBit; \ + psrc += 2; \ + } \ + else if (bitPos < 16) \ + { \ + psrc++; \ + bits |= ((*psrc++ >> (bitPos - 8)) & 1) << curBit; \ + psrc++; \ + } \ + else \ + { \ + psrc += 2; \ + bits |= ((*psrc++ >> (bitPos - 16)) & 1) << curBit; \ + } \ + StepBit (curBit, 1); \ + } \ +} +#else +#define GetBits(psrc, nBits, curBit, bitPos, bits) {\ + bits = 0; \ + while (nBits--) \ + { \ + bits |= ((*psrc++ >> bitPos) & 1) << curBit; \ + StepBit (curBit, 1); \ + } \ +} +#endif + +void +#if PSZ == 16 +cfbCopyPlane16to1 +#endif +#if PSZ == 24 +cfbCopyPlane24to1 +#endif +#if PSZ == 32 +cfbCopyPlane32to1 +#endif +( + DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + int rop, + RegionPtr prgnDst, + DDXPointPtr pptSrc, + unsigned long planemask, + unsigned long bitPlane) +{ + int srcx, srcy, dstx, dsty, width, height; + CfbBits *psrcBase; + CfbBits *pdstBase; + int widthSrc, widthDst; +#if PSZ == 16 + unsigned short *psrcLine; + register unsigned short *psrc; +#endif +#if PSZ == 24 + unsigned char *psrcLine; + register unsigned char *psrc; +#endif +#if PSZ == 32 + unsigned int *psrcLine; + register unsigned int *psrc; +#endif + unsigned int *pdstLine; + register unsigned int *pdst; + register int i; + register int curBit; + register int bitPos; + register unsigned int bits; + unsigned int startmask = 0, endmask = 0; + int niStart = 0, niEnd = 0; + int bitStart = 0, bitEnd = 0; + int nl, nlMiddle; + int nbox; + BoxPtr pbox; + int result; + + + if (!(planemask & 1)) + return; + + /* must explicitly ask for "int" widths, as code below expects it */ + /* on some machines (Alpha), "long" and "int" are not the same size */ + cfbGetTypedWidthAndPointer (pSrcDrawable, widthSrc, psrcBase, int, CfbBits) + cfbGetTypedWidthAndPointer (pDstDrawable, widthDst, pdstBase, int, CfbBits) + +#if PSZ == 16 + widthSrc <<= 1; +#endif +#if PSZ == 24 + widthSrc <<= 2; +#endif + + bitPos = ffs (bitPlane) - 1; + + nbox = REGION_NUM_RECTS(prgnDst); + pbox = REGION_RECTS(prgnDst); + while (nbox--) + { + dstx = pbox->x1; + dsty = pbox->y1; + srcx = pptSrc->x; + srcy = pptSrc->y; + width = pbox->x2 - pbox->x1; + height = pbox->y2 - pbox->y1; + pbox++; + pptSrc++; +#if PSZ == 16 + psrcLine = (unsigned short *)psrcBase + srcy * widthSrc + srcx; +#endif +#if PSZ == 24 + psrcLine = (unsigned char *)psrcBase + srcy * widthSrc + srcx * 3; +#endif +#if PSZ == 32 + psrcLine = (unsigned int *)psrcBase + srcy * widthSrc + srcx; +#endif + pdstLine = (unsigned int *)pdstBase + dsty * widthDst + (dstx >> 5); + if (dstx + width <= 32) + { + mfbmaskpartialbits(dstx, width, startmask); + nlMiddle = 0; + endmask = 0; + } + else + { + mfbmaskbits (dstx, width, startmask, endmask, nlMiddle); + } + if (startmask) + { + niStart = 32 - (dstx & 0x1f); + bitStart = LeftMost; + StepBit (bitStart, (dstx & 0x1f)); + } + if (endmask) + { + niEnd = (dstx + width) & 0x1f; + bitEnd = LeftMost; + } + if (rop == GXcopy) + { + while (height--) + { + psrc = psrcLine; + pdst = pdstLine; + psrcLine += widthSrc; + pdstLine += widthDst; + if (startmask) + { + i = niStart; + curBit = bitStart; + GetBits (psrc, i, curBit, bitPos, bits); + + *pdst = (*pdst & ~startmask) | bits; + pdst++; + } + nl = nlMiddle; + while (nl--) + { + i = 32; + curBit = LeftMost; + GetBits (psrc, i, curBit, bitPos, bits); + *pdst++ = bits; + } + if (endmask) + { + i = niEnd; + curBit = bitEnd; + GetBits (psrc, i, curBit, bitPos, bits); + + *pdst = (*pdst & ~endmask) | bits; + } + } + } + else + { + while (height--) + { + psrc = psrcLine; + pdst = pdstLine; + psrcLine += widthSrc; + pdstLine += widthDst; + if (startmask) + { + i = niStart; + curBit = bitStart; + GetBits (psrc, i, curBit, bitPos, bits); + DoRop (result, rop, bits, *pdst); + + *pdst = (*pdst & ~startmask) | + (result & startmask); + pdst++; + } + nl = nlMiddle; + while (nl--) + { + i = 32; + curBit = LeftMost; + GetBits (psrc, i, curBit, bitPos, bits); + DoRop (result, rop, bits, *pdst); + *pdst = result; + ++pdst; + } + if (endmask) + { + i = niEnd; + curBit = bitEnd; + GetBits (psrc, i, curBit, bitPos, bits); + DoRop (result, rop, bits, *pdst); + + *pdst = (*pdst & ~endmask) | + (result & endmask); + } + } + } + } +} + +#endif /* PSZ == 8 */ diff --git a/xorg-server-1.4/cfb/cfbfillarc.c b/xorg-server-1.4/cfb/cfbfillarc.c new file mode 100644 index 0000000..0eb5ff4 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbfillarc.c @@ -0,0 +1,374 @@ +/************************************************************ + +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. + +********************************************************/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include +#include "regionstr.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "cfb.h" +#include "cfbmskbits.h" +#include "mifillarc.h" +#include "cfbrrop.h" +#include "mi.h" + +/* gcc 1.35 is stupid */ +#if defined(__GNUC__) && __GNUC__ < 2 && defined(mc68020) +#define STUPID volatile +#else +#define STUPID +#endif + +static void +RROP_NAME(cfbFillEllipseSolid)( + DrawablePtr pDraw, + GCPtr pGC, + xArc *arc) +{ + STUPID int x, y, e; + STUPID int yk, xk, ym, xm, dx, dy, xorg, yorg; + miFillArcRec info; +#if PSZ == 24 + unsigned char *addrlt, *addrlb; +#else + CfbBits *addrlt, *addrlb; +#endif + register CfbBits *addrl; + register int n; + int nlwidth; + RROP_DECLARE + register int xpos; + register int slw; + CfbBits startmask, endmask; + int nlmiddle; +#if PSZ == 24 + register int pidx; + int xpos3; +#endif + +#if PSZ == 24 + cfbGetByteWidthAndPointer (pDraw, nlwidth, addrlt) +#else + cfbGetLongWidthAndPointer (pDraw, nlwidth, addrlt) +#endif + + RROP_FETCH_GC(pGC); + miFillArcSetup(arc, &info); + MIFILLARCSETUP(); + xorg += pDraw->x; + yorg += pDraw->y; + addrlb = addrlt; + addrlt += nlwidth * (yorg - y); + addrlb += nlwidth * (yorg + y + dy); + while (y) + { + addrlt += nlwidth; + addrlb -= nlwidth; + MIFILLARCSTEP(slw); + if (!slw) + continue; + xpos = xorg - x; +#if PSZ == 24 + xpos3 = (xpos * 3) & ~0x03; + addrl = (CfbBits *)((char *)addrlt + xpos3); + if (slw == 1){ + RROP_SOLID24(addrl, xpos); + if (miFillArcLower(slw)){ + addrl = (CfbBits *)((char *)addrlb + xpos3); + RROP_SOLID24(addrl, xpos); + } + continue; + } + maskbits(xpos, slw, startmask, endmask, nlmiddle); + xpos &= 3; + pidx = xpos; + if (startmask){ + RROP_SOLID_MASK(addrl, startmask, pidx-1); + addrl++; + if (pidx == 3) + pidx = 0; + } + n = nlmiddle; + while (--n >= 0){ + RROP_SOLID(addrl, pidx); + addrl++; + if (++pidx == 3) + pidx = 0; + } + if (endmask) + RROP_SOLID_MASK(addrl, endmask, pidx); + if (!miFillArcLower(slw)) + continue; + addrl = (CfbBits *)((char *)addrlb + xpos3); + pidx = xpos; + if (startmask){ + RROP_SOLID_MASK(addrl, startmask, pidx-1); + addrl++; + if (pidx == 3) + pidx = 0; + } + n = nlmiddle; + while (--n >= 0){ + RROP_SOLID(addrl, pidx); + addrl++; + if (++pidx == 3) + pidx = 0; + } + if (endmask) + RROP_SOLID_MASK(addrl, endmask, pidx); +#else /* PSZ == 24 */ + addrl = addrlt + (xpos >> PWSH); + if (((xpos & PIM) + slw) <= PPW) + { + maskpartialbits(xpos, slw, startmask); + RROP_SOLID_MASK(addrl,startmask); + if (miFillArcLower(slw)) + { + addrl = addrlb + (xpos >> PWSH); + RROP_SOLID_MASK(addrl, startmask); + } + continue; + } + maskbits(xpos, slw, startmask, endmask, nlmiddle); + if (startmask) + { + RROP_SOLID_MASK(addrl, startmask); + addrl++; + } + n = nlmiddle; + RROP_SPAN(addrl,n) + + if (endmask) + RROP_SOLID_MASK(addrl, endmask); + if (!miFillArcLower(slw)) + continue; + addrl = addrlb + (xpos >> PWSH); + if (startmask) + { + RROP_SOLID_MASK(addrl, startmask); + addrl++; + } + n = nlmiddle; + RROP_SPAN(addrl, n); + if (endmask) + RROP_SOLID_MASK(addrl, endmask); +#endif /* PSZ == 24 */ + } + RROP_UNDECLARE +} + +#if PSZ == 24 +#define FILLSPAN(xl,xr,addr) \ + if (xr >= xl){ \ + n = xr - xl + 1; \ + addrl = (CfbBits *)((char *)addr + ((xl * 3) & ~0x03)); \ + if (n <= 1){ \ + if (n) \ + RROP_SOLID24(addrl, xl); \ + } else { \ + maskbits(xl, n, startmask, endmask, n); \ + pidx = xl & 3; \ + if (startmask){ \ + RROP_SOLID_MASK(addrl, startmask, pidx-1); \ + addrl++; \ + if (pidx == 3) \ + pidx = 0; \ + } \ + while (--n >= 0){ \ + RROP_SOLID(addrl, pidx); \ + addrl++; \ + if (++pidx == 3) \ + pidx = 0; \ + } \ + if (endmask) \ + RROP_SOLID_MASK(addrl, endmask, pidx); \ + } \ + } +#else /* PSZ == 24 */ +#define FILLSPAN(xl,xr,addr) \ + if (xr >= xl) \ + { \ + n = xr - xl + 1; \ + addrl = addr + (xl >> PWSH); \ + if (((xl & PIM) + n) <= PPW) \ + { \ + maskpartialbits(xl, n, startmask); \ + RROP_SOLID_MASK(addrl, startmask); \ + } \ + else \ + { \ + maskbits(xl, n, startmask, endmask, n); \ + if (startmask) \ + { \ + RROP_SOLID_MASK(addrl, startmask); \ + addrl++; \ + } \ + while (n--) \ + { \ + RROP_SOLID(addrl); \ + ++addrl; \ + } \ + if (endmask) \ + RROP_SOLID_MASK(addrl, endmask); \ + } \ + } +#endif /* PSZ == 24 */ + +#define FILLSLICESPANS(flip,addr) \ + if (!flip) \ + { \ + FILLSPAN(xl, xr, addr); \ + } \ + else \ + { \ + xc = xorg - x; \ + FILLSPAN(xc, xr, addr); \ + xc += slw - 1; \ + FILLSPAN(xl, xc, addr); \ + } + +static void +RROP_NAME(cfbFillArcSliceSolid)( + DrawablePtr pDraw, + GCPtr pGC, + xArc *arc) +{ + int yk, xk, ym, xm, dx, dy, xorg, yorg, slw; + register int x, y, e; + miFillArcRec info; + miArcSliceRec slice; + int xl, xr, xc; +#if PSZ == 24 + unsigned char *addrlt, *addrlb; +#else + CfbBits *addrlt, *addrlb; +#endif + register CfbBits *addrl; + register int n; + int nlwidth; + RROP_DECLARE + CfbBits startmask, endmask; +#if PSZ == 24 + register int pidx; +#endif /* PSZ == 24 */ + +#if PSZ == 24 + cfbGetByteWidthAndPointer (pDraw, nlwidth, addrlt) +#else + cfbGetLongWidthAndPointer (pDraw, nlwidth, addrlt) +#endif + + RROP_FETCH_GC(pGC); + miFillArcSetup(arc, &info); + miFillArcSliceSetup(arc, &slice, pGC); + MIFILLARCSETUP(); + xorg += pDraw->x; + yorg += pDraw->y; + addrlb = addrlt; + addrlt += nlwidth * (yorg - y); + addrlb += nlwidth * (yorg + y + dy); + slice.edge1.x += pDraw->x; + slice.edge2.x += pDraw->x; + while (y > 0) + { + addrlt += nlwidth; + addrlb -= nlwidth; + MIFILLARCSTEP(slw); + MIARCSLICESTEP(slice.edge1); + MIARCSLICESTEP(slice.edge2); + if (miFillSliceUpper(slice)) + { + MIARCSLICEUPPER(xl, xr, slice, slw); + FILLSLICESPANS(slice.flip_top, addrlt); + } + if (miFillSliceLower(slice)) + { + MIARCSLICELOWER(xl, xr, slice, slw); + FILLSLICESPANS(slice.flip_bot, addrlb); + } + } + RROP_UNDECLARE +} + +void +RROP_NAME(cfbPolyFillArcSolid) (pDraw, pGC, narcs, parcs) + DrawablePtr pDraw; + GCPtr pGC; + int narcs; + xArc *parcs; +{ + register xArc *arc; + register int i; + int x2, y2; + BoxRec box; + RegionPtr cclip; + + cclip = cfbGetCompositeClip(pGC); + for (arc = parcs, i = narcs; --i >= 0; arc++) + { + if (miFillArcEmpty(arc)) + continue; + if (miCanFillArc(arc)) + { + box.x1 = arc->x + pDraw->x; + box.y1 = arc->y + pDraw->y; + /* + * Because box.x2 and box.y2 get truncated to 16 bits, and the + * RECT_IN_REGION test treats the resulting number as a signed + * integer, the RECT_IN_REGION test alone can go the wrong way. + * This can result in a server crash because the rendering + * routines in this file deal directly with cpu addresses + * of pixels to be stored, and do not clip or otherwise check + * that all such addresses are within their respective pixmaps. + * So we only allow the RECT_IN_REGION test to be used for + * values that can be expressed correctly in a signed short. + */ + x2 = box.x1 + (int)arc->width + 1; + box.x2 = x2; + y2 = box.y1 + (int)arc->height + 1; + box.y2 = y2; + if ( (x2 <= SHRT_MAX) && (y2 <= SHRT_MAX) && + (RECT_IN_REGION(pDraw->pScreen, cclip, &box) == rgnIN) ) + { + if ((arc->angle2 >= FULLCIRCLE) || + (arc->angle2 <= -FULLCIRCLE)) + RROP_NAME(cfbFillEllipseSolid)(pDraw, pGC, arc); + else + RROP_NAME(cfbFillArcSliceSolid)(pDraw, pGC, arc); + continue; + } + } + miPolyFillArc(pDraw, pGC, 1, arc); + } +} diff --git a/xorg-server-1.4/cfb/cfbfillarcC.c b/xorg-server-1.4/cfb/cfbfillarcC.c new file mode 100644 index 0000000..83f37db --- /dev/null +++ b/xorg-server-1.4/cfb/cfbfillarcC.c @@ -0,0 +1,2 @@ +#define RROP GXcopy +#include "../cfb/cfbfillarc.c" diff --git a/xorg-server-1.4/cfb/cfbfillarcG.c b/xorg-server-1.4/cfb/cfbfillarcG.c new file mode 100644 index 0000000..971e840 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbfillarcG.c @@ -0,0 +1,2 @@ +#define RROP GXset +#include "../cfb/cfbfillarc.c" diff --git a/xorg-server-1.4/cfb/cfbfillrct.c b/xorg-server-1.4/cfb/cfbfillrct.c new file mode 100644 index 0000000..4c78c24 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbfillrct.c @@ -0,0 +1,305 @@ +/* + * Fill rectangles. + */ + +/* + +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. +*/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "servermd.h" +#include "gcstruct.h" +#include "window.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "windowstr.h" +#include "mi.h" +#include "cfb.h" +#include "cfbmskbits.h" +#include "mergerop.h" + + +void +cfbFillBoxTileOdd (pDrawable, n, rects, tile, xrot, yrot) + DrawablePtr pDrawable; + int n; + BoxPtr rects; + PixmapPtr tile; + int xrot, yrot; +{ +#if PSZ == 24 + if (tile->drawable.width & 3) +#else + if (tile->drawable.width & PIM) +#endif + cfbFillBoxTileOddCopy (pDrawable, n, rects, tile, xrot, yrot, GXcopy, ~0L); + else + cfbFillBoxTile32sCopy (pDrawable, n, rects, tile, xrot, yrot, GXcopy, ~0L); +} + +void +cfbFillRectTileOdd (pDrawable, pGC, nBox, pBox) + DrawablePtr pDrawable; + GCPtr pGC; + int nBox; + BoxPtr pBox; +{ + int xrot, yrot; + void (*fill)(DrawablePtr, int, BoxPtr, PixmapPtr, int, int, int, unsigned long); + + xrot = pDrawable->x + pGC->patOrg.x; + yrot = pDrawable->y + pGC->patOrg.y; +#if PSZ == 24 + if (pGC->tile.pixmap->drawable.width & 3) +#else + if (pGC->tile.pixmap->drawable.width & PIM) +#endif + { + fill = cfbFillBoxTileOddGeneral; + if ((pGC->planemask & PMSK) == PMSK) + { + if (pGC->alu == GXcopy) + fill = cfbFillBoxTileOddCopy; + } + } + else + { + fill = cfbFillBoxTile32sGeneral; + if ((pGC->planemask & PMSK) == PMSK) + { + if (pGC->alu == GXcopy) + fill = cfbFillBoxTile32sCopy; + } + } + (*fill) (pDrawable, nBox, pBox, pGC->tile.pixmap, xrot, yrot, pGC->alu, pGC->planemask); +} + +#define NUM_STACK_RECTS 1024 + +void +cfbPolyFillRect(pDrawable, pGC, nrectFill, prectInit) + DrawablePtr pDrawable; + register GCPtr pGC; + int nrectFill; /* number of rectangles to fill */ + xRectangle *prectInit; /* Pointer to first rectangle to fill */ +{ + xRectangle *prect; + RegionPtr prgnClip; + register BoxPtr pbox; + register BoxPtr pboxClipped; + BoxPtr pboxClippedBase; + BoxPtr pextent; + BoxRec stackRects[NUM_STACK_RECTS]; + cfbPrivGC *priv; + int numRects; + void (*BoxFill)(DrawablePtr, GCPtr, int, BoxPtr); + int n; + int xorg, yorg; + +#if PSZ != 8 + if ((pGC->fillStyle == FillStippled) || + (pGC->fillStyle == FillOpaqueStippled)) { + miPolyFillRect(pDrawable, pGC, nrectFill, prectInit); + return; + } +#endif + + priv = cfbGetGCPrivate(pGC); + prgnClip = pGC->pCompositeClip; + + BoxFill = 0; + switch (pGC->fillStyle) + { + case FillSolid: + switch (priv->rop) { + case GXcopy: + BoxFill = cfbFillRectSolidCopy; + break; + case GXxor: + BoxFill = cfbFillRectSolidXor; + break; + default: + BoxFill = cfbFillRectSolidGeneral; + break; + } + break; + case FillTiled: + if (!pGC->pRotatedPixmap) + BoxFill = cfbFillRectTileOdd; + else + { + if (pGC->alu == GXcopy && (pGC->planemask & PMSK) == PMSK) + BoxFill = cfbFillRectTile32Copy; + else + BoxFill = cfbFillRectTile32General; + } + break; +#if PSZ == 8 + case FillStippled: + if (!pGC->pRotatedPixmap) + BoxFill = cfb8FillRectStippledUnnatural; + else + BoxFill = cfb8FillRectTransparentStippled32; + break; + case FillOpaqueStippled: + if (!pGC->pRotatedPixmap) + BoxFill = cfb8FillRectStippledUnnatural; + else + BoxFill = cfb8FillRectOpaqueStippled32; + break; +#endif + } + prect = prectInit; + xorg = pDrawable->x; + yorg = pDrawable->y; + if (xorg || yorg) + { + prect = prectInit; + n = nrectFill; + while(n--) + { + prect->x += xorg; + prect->y += yorg; + prect++; + } + } + + prect = prectInit; + + numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; + if (numRects > NUM_STACK_RECTS) + { + pboxClippedBase = (BoxPtr)ALLOCATE_LOCAL(numRects * sizeof(BoxRec)); + if (!pboxClippedBase) + return; + } + else + pboxClippedBase = stackRects; + + pboxClipped = pboxClippedBase; + + if (REGION_NUM_RECTS(prgnClip) == 1) + { + int x1, y1, x2, y2, bx2, by2; + + pextent = REGION_RECTS(prgnClip); + x1 = pextent->x1; + y1 = pextent->y1; + x2 = pextent->x2; + y2 = pextent->y2; + while (nrectFill--) + { + if ((pboxClipped->x1 = prect->x) < x1) + pboxClipped->x1 = x1; + + if ((pboxClipped->y1 = prect->y) < y1) + pboxClipped->y1 = y1; + + bx2 = (int) prect->x + (int) prect->width; + if (bx2 > x2) + bx2 = x2; + pboxClipped->x2 = bx2; + + by2 = (int) prect->y + (int) prect->height; + if (by2 > y2) + by2 = y2; + pboxClipped->y2 = by2; + + prect++; + if ((pboxClipped->x1 < pboxClipped->x2) && + (pboxClipped->y1 < pboxClipped->y2)) + { + pboxClipped++; + } + } + } + else + { + int x1, y1, x2, y2, bx2, by2; + + pextent = REGION_EXTENTS(pGC->pScreen, prgnClip); + x1 = pextent->x1; + y1 = pextent->y1; + x2 = pextent->x2; + y2 = pextent->y2; + while (nrectFill--) + { + BoxRec box; + + if ((box.x1 = prect->x) < x1) + box.x1 = x1; + + if ((box.y1 = prect->y) < y1) + box.y1 = y1; + + bx2 = (int) prect->x + (int) prect->width; + if (bx2 > x2) + bx2 = x2; + box.x2 = bx2; + + by2 = (int) prect->y + (int) prect->height; + if (by2 > y2) + by2 = y2; + box.y2 = by2; + + prect++; + + if ((box.x1 >= box.x2) || (box.y1 >= box.y2)) + continue; + + n = REGION_NUM_RECTS (prgnClip); + pbox = REGION_RECTS(prgnClip); + + /* clip the rectangle to each box in the clip region + this is logically equivalent to calling Intersect() + */ + while(n--) + { + pboxClipped->x1 = max(box.x1, pbox->x1); + pboxClipped->y1 = max(box.y1, pbox->y1); + pboxClipped->x2 = min(box.x2, pbox->x2); + pboxClipped->y2 = min(box.y2, pbox->y2); + pbox++; + + /* see if clipping left anything */ + if(pboxClipped->x1 < pboxClipped->x2 && + pboxClipped->y1 < pboxClipped->y2) + { + pboxClipped++; + } + } + } + } + if (pboxClipped != pboxClippedBase) + (*BoxFill) (pDrawable, pGC, + pboxClipped-pboxClippedBase, pboxClippedBase); + if (pboxClippedBase != stackRects) + DEALLOCATE_LOCAL(pboxClippedBase); +} diff --git a/xorg-server-1.4/cfb/cfbfillsp.c b/xorg-server-1.4/cfb/cfbfillsp.c new file mode 100644 index 0000000..ddd4f14 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbfillsp.c @@ -0,0 +1,1004 @@ +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + 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 no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or The Open Group +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and The Open Group make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN 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 SUN 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. + +********************************************************/ + +/*********************************************************** + +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 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. + +******************************************************************/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "servermd.h" +#include "gcstruct.h" +#include "window.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "windowstr.h" + +#include "cfb.h" +#include "cfbmskbits.h" + +#include "mergerop.h" + +#if PSZ == 8 +#include "cfb8bit.h" +#endif + +#define MFB_CONSTS_ONLY +#include "maskbits.h" + +#include "mi.h" +#include "mispans.h" + +/* scanline filling for color frame buffer + written by drewry, oct 1986 modified by smarks + changes for compatibility with Little-endian systems Jul 1987; MIT:yba. + + these routines all clip. they assume that anything that has called +them has already translated the points (i.e. pGC->miTranslate is +non-zero, which is howit gets set in cfbCreateGC().) + + the number of new scnalines created by clipping == +MaxRectsPerBand * nSpans. + + FillSolid is overloaded to be used for OpaqueStipple as well, +if fgPixel == bgPixel. +Note that for solids, PrivGC.rop == PrivGC.ropOpStip + + + FillTiled is overloaded to be used for OpaqueStipple, if +fgPixel != bgPixel. based on the fill style, it uses +{RotatedTile, gc.alu} or {RotatedStipple, PrivGC.ropOpStip} +*/ + +#ifdef notdef +#include +static +dumpspans(n, ppt, pwidth) + int n; + DDXPointPtr ppt; + int *pwidth; +{ + fprintf(stderr,"%d spans\n", n); + while (n--) { + fprintf(stderr, "[%d,%d] %d\n", ppt->x, ppt->y, *pwidth); + ppt++; + pwidth++; + } + fprintf(stderr, "\n"); +} +#endif + +/* Fill spans with tiles that aren't 32 bits wide */ +void +cfbUnnaturalTileFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) +DrawablePtr pDrawable; +GC *pGC; +int nInit; /* number of spans to fill */ +DDXPointPtr pptInit; /* pointer to list of start points */ +int *pwidthInit; /* pointer to list of n widths */ +int fSorted; +{ + int n; /* number of spans to fill */ + register DDXPointPtr ppt; /* pointer to list of start points */ + register int *pwidth; /* pointer to list of n widths */ + void (*fill)(DrawablePtr, int, DDXPointPtr, int *, PixmapPtr, int, int, int, unsigned long); + int xrot, yrot; + + if (!(pGC->planemask)) + return; + +#if PSZ == 24 + if (pGC->tile.pixmap->drawable.width & 3) +#else + if (pGC->tile.pixmap->drawable.width & PIM) +#endif + { + fill = cfbFillSpanTileOddGeneral; + if ((pGC->planemask & PMSK) == PMSK) + { + if (pGC->alu == GXcopy) + fill = cfbFillSpanTileOddCopy; + } + } + else + { + fill = cfbFillSpanTile32sGeneral; + if ((pGC->planemask & PMSK) == PMSK) + { + if (pGC->alu == GXcopy) + fill = cfbFillSpanTile32sCopy; + } + } + n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) ); + if ( n == 0 ) + return; + pwidth = (int *)ALLOCATE_LOCAL(n * sizeof(int)); + ppt = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + if(!ppt || !pwidth) + { + if (ppt) DEALLOCATE_LOCAL(ppt); + if (pwidth) DEALLOCATE_LOCAL(pwidth); + return; + } + n = miClipSpans( cfbGetCompositeClip(pGC), + pptInit, pwidthInit, nInit, + ppt, pwidth, fSorted); + + xrot = pDrawable->x + pGC->patOrg.x; + yrot = pDrawable->y + pGC->patOrg.y; + + (*fill) (pDrawable, n, ppt, pwidth, pGC->tile.pixmap, xrot, yrot, pGC->alu, pGC->planemask); + + DEALLOCATE_LOCAL(ppt); + DEALLOCATE_LOCAL(pwidth); +} + +#if PSZ == 8 + +void +cfbUnnaturalStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) +DrawablePtr pDrawable; +GC *pGC; +int nInit; /* number of spans to fill */ +DDXPointPtr pptInit; /* pointer to list of start points */ +int *pwidthInit; /* pointer to list of n widths */ +int fSorted; +{ + /* next three parameters are post-clip */ + int n; /* number of spans to fill */ + DDXPointPtr ppt; /* pointer to list of start points */ + int *pwidth; /* pointer to list of n widths */ + int *pwidthFree;/* copies of the pointers to free */ + DDXPointPtr pptFree; + CfbBits *pdstBase; /* pointer to start of bitmap */ + int nlwDst; /* width in longwords of bitmap */ + register CfbBits *pdst; /* pointer to current word in bitmap */ + PixmapPtr pStipple; /* pointer to stipple we want to fill with */ + int nlw; + int x, y, w, xrem, xSrc, ySrc; + int stwidth, stippleWidth; + int stippleHeight; + register CfbBits bits, inputBits; + register int partBitsLeft; + int nextPartBits; + int bitsLeft, bitsWhole; + CfbBits *srcTemp, *srcStart; + CfbBits *psrcBase; + CfbBits startmask, endmask; + + if (pGC->fillStyle == FillStippled) + cfb8CheckStipple (pGC->alu, pGC->fgPixel, pGC->planemask); + else + cfb8CheckOpaqueStipple (pGC->alu, pGC->fgPixel, pGC->bgPixel, pGC->planemask); + + if (cfb8StippleRRop == GXnoop) + return; + + n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) ); + if ( n == 0 ) + return; + pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); + pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + if(!pptFree || !pwidthFree) + { + if (pptFree) DEALLOCATE_LOCAL(pptFree); + if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + return; + } + + pwidth = pwidthFree; + ppt = pptFree; + n = miClipSpans( cfbGetCompositeClip(pGC), + pptInit, pwidthInit, nInit, + ppt, pwidth, fSorted); + + /* + * OK, so what's going on here? We have two Drawables: + * + * The Stipple: + * Depth = 1 + * Width = stippleWidth + * Words per scanline = stwidth + * Pointer to pixels = pStipple->devPrivate.ptr + */ + + pStipple = pGC->stipple; + + stwidth = pStipple->devKind >> PWSH; + stippleWidth = pStipple->drawable.width; + stippleHeight = pStipple->drawable.height; + psrcBase = (CfbBits *) pStipple->devPrivate.ptr; + + /* + * The Target: + * Depth = PSZ + * Width = determined from *pwidth + * Words per scanline = nlwDst + * Pointer to pixels = addrlBase + */ + + cfbGetLongWidthAndPointer (pDrawable, nlwDst, pdstBase) + + /* this replaces rotating the stipple. Instead we just adjust the offset + * at which we start grabbing bits from the stipple. + * Ensure that ppt->x - xSrc >= 0 and ppt->y - ySrc >= 0, + * so that iline and xrem always stay within the stipple bounds. + */ + + modulus (pGC->patOrg.x, stippleWidth, xSrc); + xSrc += pDrawable->x - stippleWidth; + modulus (pGC->patOrg.y, stippleHeight, ySrc); + ySrc += pDrawable->y - stippleHeight; + + bitsWhole = stippleWidth; + + while (n--) + { + x = ppt->x; + y = ppt->y; + ppt++; + w = *pwidth++; + pdst = pdstBase + y * nlwDst + (x >> PWSH); + y = (y - ySrc) % stippleHeight; + srcStart = psrcBase + y * stwidth; + xrem = ((x & ~(PGSZB-1)) - xSrc) % stippleWidth; + srcTemp = srcStart + (xrem >> MFB_PWSH); + bitsLeft = stippleWidth - (xrem & ~MFB_PIM); + xrem &= MFB_PIM; + NextUnnaturalStippleWord + if (partBitsLeft < xrem) + FatalError ("cfbUnnaturalStippleFS bad partBitsLeft %d xrem %d", + partBitsLeft, xrem); + NextSomeBits (inputBits, xrem); + partBitsLeft -= xrem; + if (((x & PIM) + w) <= PPW) + { + maskpartialbits (x, w, startmask) + NextUnnaturalStippleBits + *pdst = MaskRRopPixels(*pdst,bits,startmask); + } + else + { + maskbits (x, w, startmask, endmask, nlw); + nextPartBits = (x & (PGSZB-1)) + w; + if (nextPartBits < partBitsLeft) + { + if (startmask) + { + MaskRRopBitGroup(pdst,GetBitGroup(inputBits),startmask) + pdst++; + NextBitGroup (inputBits); + } + while (nlw--) + { + RRopBitGroup (pdst, GetBitGroup (inputBits)); + pdst++; + NextBitGroup (inputBits); + } + if (endmask) + { + MaskRRopBitGroup(pdst,GetBitGroup(inputBits),endmask) + } + } + else if (bitsLeft != bitsWhole && nextPartBits < partBitsLeft + bitsLeft) + { + NextUnnaturalStippleBitsFast + if (startmask) + { + *pdst = MaskRRopPixels(*pdst,bits,startmask); + pdst++; + NextUnnaturalStippleBitsFast + } + while (nlw--) + { + *pdst = RRopPixels(*pdst,bits); + pdst++; + NextUnnaturalStippleBitsFast + } + if (endmask) + *pdst = MaskRRopPixels (*pdst,bits,endmask); + } + else + { + NextUnnaturalStippleBits + if (startmask) + { + *pdst = MaskRRopPixels(*pdst,bits,startmask); + pdst++; + NextUnnaturalStippleBits + } + while (nlw--) + { + *pdst = RRopPixels(*pdst,bits); + pdst++; + NextUnnaturalStippleBits + } + if (endmask) + *pdst = MaskRRopPixels(*pdst,bits,endmask); + } + } + } + DEALLOCATE_LOCAL(pptFree); + DEALLOCATE_LOCAL(pwidthFree); +} + +#else /* PSZ != 8 */ + +/* Fill spans with stipples that aren't 32 bits wide */ +void +cfbUnnaturalStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) +DrawablePtr pDrawable; +GC *pGC; +int nInit; /* number of spans to fill */ +DDXPointPtr pptInit; /* pointer to list of start points */ +int *pwidthInit; /* pointer to list of n widths */ +int fSorted; +{ + /* next three parameters are post-clip */ + int n; /* number of spans to fill */ + register DDXPointPtr ppt; /* pointer to list of start points */ + register int *pwidth; /* pointer to list of n widths */ + int iline; /* first line of tile to use */ + CfbBits *addrlBase; /* pointer to start of bitmap */ + int nlwidth; /* width in longwords of bitmap */ + register CfbBits *pdst; /* pointer to current word in bitmap */ + PixmapPtr pStipple; /* pointer to stipple we want to fill with */ + register int w; + int width, x, xrem, xSrc, ySrc; + CfbBits tmpSrc, tmpDst1, tmpDst2; + int stwidth, stippleWidth; + CfbBits *psrcS; + int rop, stiprop = 0; + int stippleHeight; + int *pwidthFree; /* copies of the pointers to free */ + DDXPointPtr pptFree; + CfbBits fgfill, bgfill; + + if (!(pGC->planemask)) + return; + + n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) ); + if ( n == 0 ) + return; + pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); + pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + if(!pptFree || !pwidthFree) + { + if (pptFree) DEALLOCATE_LOCAL(pptFree); + if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + return; + } + pwidth = pwidthFree; + ppt = pptFree; + n = miClipSpans( cfbGetCompositeClip(pGC), + pptInit, pwidthInit, nInit, + ppt, pwidth, fSorted); + rop = pGC->alu; + if (pGC->fillStyle == FillStippled) { + switch (rop) { + case GXand: + case GXcopy: + case GXnoop: + case GXor: + stiprop = rop; + break; + default: + stiprop = rop; + rop = GXcopy; + } + } + fgfill = PFILL(pGC->fgPixel); + bgfill = PFILL(pGC->bgPixel); + + /* + * OK, so what's going on here? We have two Drawables: + * + * The Stipple: + * Depth = 1 + * Width = stippleWidth + * Words per scanline = stwidth + * Pointer to pixels = pStipple->devPrivate.ptr + */ + pStipple = pGC->stipple; + + stwidth = pStipple->devKind / PGSZB; + stippleWidth = pStipple->drawable.width; + stippleHeight = pStipple->drawable.height; + + /* + * The Target: + * Depth = PSZ + * Width = determined from *pwidth + * Words per scanline = nlwidth + * Pointer to pixels = addrlBase + */ + + cfbGetLongWidthAndPointer (pDrawable, nlwidth, addrlBase) + + /* this replaces rotating the stipple. Instead we just adjust the offset + * at which we start grabbing bits from the stipple. + * Ensure that ppt->x - xSrc >= 0 and ppt->y - ySrc >= 0, + * so that iline and xrem always stay within the stipple bounds. + */ + modulus (pGC->patOrg.x, stippleWidth, xSrc); + xSrc += pDrawable->x - stippleWidth; + modulus (pGC->patOrg.y, stippleHeight, ySrc); + ySrc += pDrawable->y - stippleHeight; + + while (n--) + { + iline = (ppt->y - ySrc) % stippleHeight; + x = ppt->x; + pdst = addrlBase + (ppt->y * nlwidth); + psrcS = (CfbBits *) pStipple->devPrivate.ptr + (iline * stwidth); + + if (*pwidth) + { + width = *pwidth; + while(width > 0) + { + int xtemp; +#if PSZ != 32 || PPW != 1 + int tmpx; +#endif + register CfbBits *ptemp; + register CfbBits *pdsttmp; + /* + * Do a stripe through the stipple & destination w pixels + * wide. w is not more than: + * - the width of the destination + * - the width of the stipple + * - the distance between x and the next word + * boundary in the destination + * - the distance between x and the next word + * boundary in the stipple + */ + + /* width of dest/stipple */ + xrem = (x - xSrc) % stippleWidth; +#if PSZ == 24 + w = 1; +#else + w = min((stippleWidth - xrem), width); + /* dist to word bound in dest */ + w = min(w, PPW - (x & PIM)); + /* dist to word bound in stip */ + w = min(w, MFB_PPW - (x & MFB_PIM)); +#endif + + xtemp = (xrem & MFB_PIM); + ptemp = (CfbBits *)(psrcS + (xrem >> MFB_PWSH)); +#if PSZ == 24 + tmpx = x & 3; + pdsttmp = pdst + ((x * 3)>>2); +#else +#if PSZ != 32 || PPW != 1 + tmpx = x & PIM; +#endif + pdsttmp = pdst + (x>>PWSH); +#endif + switch ( pGC->fillStyle ) { + case FillOpaqueStippled: +#if PSZ == 24 + getstipplepixels24(ptemp, xtemp, 0, &bgfill, &tmpDst1, xrem); + getstipplepixels24(ptemp, xtemp, 1, &fgfill, &tmpDst2, xrem); +#else + getstipplepixels(ptemp, xtemp, w, 0, &bgfill, &tmpDst1); + getstipplepixels(ptemp, xtemp, w, 1, &fgfill, &tmpDst2); +#endif + break; + case FillStippled: + /* Fill tmpSrc with the source pixels */ +#if PSZ == 24 + getbits24(pdsttmp, tmpSrc, x); + getstipplepixels24(ptemp, xtemp, 0, &tmpSrc, &tmpDst1, xrem); +#else + getbits(pdsttmp, tmpx, w, tmpSrc); + getstipplepixels(ptemp, xtemp, w, 0, &tmpSrc, &tmpDst1); +#endif + if (rop != stiprop) { +#if PSZ == 24 + putbitsrop24(fgfill, 0, &tmpSrc, pGC->planemask, stiprop); +#else + putbitsrop(fgfill, 0, w, &tmpSrc, pGC->planemask, stiprop); +#endif + } else { + tmpSrc = fgfill; + } +#if PSZ == 24 + getstipplepixels24(ptemp, xtemp, 1, &tmpSrc, &tmpDst2, xrem); +#else + getstipplepixels(ptemp, xtemp, w, 1, &tmpSrc, &tmpDst2); +#endif + break; + } + tmpDst2 |= tmpDst1; +#if PSZ == 24 + putbitsrop24(tmpDst2, tmpx, pdsttmp, pGC->planemask, rop); +#else + putbitsrop(tmpDst2, tmpx, w, pdsttmp, pGC->planemask, rop); +#endif + x += w; + width -= w; + } + } + ppt++; + pwidth++; + } + DEALLOCATE_LOCAL(pptFree); + DEALLOCATE_LOCAL(pwidthFree); +} + +#endif /* PSZ == 8 */ + +#if PSZ == 8 + +void +cfb8Stipple32FS (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) + DrawablePtr pDrawable; + GCPtr pGC; + int nInit; /* number of spans to fill */ + DDXPointPtr pptInit; /* pointer to list of start points */ + int *pwidthInit; /* pointer to list of n widths */ + int fSorted; +{ + /* next three parameters are post-clip */ + int n; /* number of spans to fill */ + DDXPointPtr ppt; /* pointer to list of start points */ + int *pwidth; /* pointer to list of n widths */ + CfbBits *src; /* pointer to bits in stipple, if needed */ + int stippleHeight; /* height of the stipple */ + PixmapPtr stipple; + + int nlwDst; /* width in longwords of the dest pixmap */ + int x,y,w; /* current span */ + CfbBits startmask; + CfbBits endmask; + register CfbBits *dst; /* pointer to bits we're writing */ + register int nlw; + CfbBits *dstTmp; + int nlwTmp; + + CfbBits *pbits; /* pointer to start of pixmap */ + register CfbBits xor; + register CfbBits mask; + register CfbBits bits; /* bits from stipple */ + int wEnd; + + int *pwidthFree; /* copies of the pointers to free */ + DDXPointPtr pptFree; + cfbPrivGCPtr devPriv; + + devPriv = cfbGetGCPrivate(pGC); + cfb8CheckStipple (pGC->alu, pGC->fgPixel, pGC->planemask); + n = nInit * miFindMaxBand(pGC->pCompositeClip); + if ( n == 0 ) + return; + pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); + pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + if(!pptFree || !pwidthFree) + { + if (pptFree) DEALLOCATE_LOCAL(pptFree); + if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + return; + } + pwidth = pwidthFree; + ppt = pptFree; + n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, + ppt, pwidth, fSorted); + + stipple = pGC->pRotatedPixmap; + src = (CfbBits *)stipple->devPrivate.ptr; + stippleHeight = stipple->drawable.height; + + cfbGetLongWidthAndPointer (pDrawable, nlwDst, pbits) + + while (n--) + { + w = *pwidth++; + x = ppt->x; + y = ppt->y; + ppt++; + dst = pbits + (y * nlwDst) + (x >> PWSH); + if (((x & PIM) + w) <= PPW) + { + maskpartialbits(x, w, startmask); + endmask = 0; + nlw = 0; + } + else + { + maskbits (x, w, startmask, endmask, nlw); + } + bits = src[y % stippleHeight]; + RotBitsLeft (bits, (x & ((PGSZ-1) & ~PIM))); +#if PPW == 4 + if (cfb8StippleRRop == GXcopy) + { + xor = devPriv->xor; + if (w < (PGSZ*2)) + { + if (startmask) + { + mask = cfb8PixelMasks[GetBitGroup(bits)]; + *dst = (*dst & ~(mask & startmask)) | + (xor & (mask & startmask)); + dst++; + RotBitsLeft (bits, PGSZB); + } + while (nlw--) + { + WriteBitGroup (dst,xor,GetBitGroup(bits)) + dst++; + RotBitsLeft (bits, PGSZB); + } + if (endmask) + { + mask = cfb8PixelMasks[GetBitGroup(bits)]; + *dst = (*dst & ~(mask & endmask)) | + (xor & (mask & endmask)); + } + } + else + { /* XXX constants probably not OK here */ + wEnd = 7 - (nlw & 7); + nlw = (nlw >> 3) + 1; + dstTmp = dst; + nlwTmp = nlw; + if (startmask) + { + mask = cfb8PixelMasks[GetBitGroup(bits)]; + *dstTmp = (*dstTmp & ~(mask & startmask)) | + (xor & (mask & startmask)); + dstTmp++; + RotBitsLeft (bits, PGSZB); + } + w = 7 - wEnd; + while (w--) + { + dst = dstTmp; + dstTmp++; + nlw = nlwTmp; +#if defined(__GNUC__) && defined(mc68020) + mask = cfb8PixelMasks[GetBitGroup(bits)]; + xor = xor & mask; + mask = ~mask; + while (nlw--) + { + *dst = (*dst & mask) | xor; + dst += 8; + } + xor = devPriv->xor; +#else +#define SwitchBitsLoop(body) \ + while (nlw--) \ + { \ + body \ + dst += 8; \ + } + SwitchBitGroup(dst, xor, GetBitGroup(bits)); +#undef SwitchBitsLoop +#endif + NextBitGroup (bits); + } + nlwTmp--; + w = wEnd + 1; + if (endmask) + { + mask = cfb8PixelMasks[GetBitGroup(bits)]; + dst = dstTmp + (nlwTmp << 3); + *dst = (*dst & ~(mask & endmask)) | + (xor & (mask & endmask)); + } + while (w--) + { + nlw = nlwTmp; + dst = dstTmp; + dstTmp++; +#if defined(__GNUC__) && defined(mc68020) + mask = cfb8PixelMasks[GetBitGroup(bits)]; + xor = xor & mask; + mask = ~mask; + while (nlw--) + { + *dst = (*dst & mask) | xor; + dst += 8; + } + xor = devPriv->xor; +#else +#define SwitchBitsLoop(body) \ + while (nlw--) \ + { \ + body \ + dst += 8; \ + } + SwitchBitGroup(dst, xor, GetBitGroup(bits)); +#undef SwitchBitsLoop +#endif + NextBitGroup (bits); + } + } + } + else +#endif /* PPW == 4 */ + { + if (startmask) + { + xor = GetBitGroup(bits); + *dst = MaskRRopPixels(*dst, xor, startmask); + dst++; + RotBitsLeft (bits, PGSZB); + } + while (nlw--) + { + RRopBitGroup(dst, GetBitGroup(bits)); + dst++; + RotBitsLeft (bits, PGSZB); + } + if (endmask) + { + xor = GetBitGroup(bits); + *dst = MaskRRopPixels(*dst, xor, endmask); + } + } + } + DEALLOCATE_LOCAL(pptFree); + DEALLOCATE_LOCAL(pwidthFree); +} + +void +cfb8OpaqueStipple32FS (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) + DrawablePtr pDrawable; + GCPtr pGC; + int nInit; /* number of spans to fill */ + DDXPointPtr pptInit; /* pointer to list of start points */ + int *pwidthInit; /* pointer to list of n widths */ + int fSorted; +{ + /* next three parameters are post-clip */ + int n; /* number of spans to fill */ + DDXPointPtr ppt; /* pointer to list of start points */ + int *pwidth; /* pointer to list of n widths */ + CfbBits *src; /* pointer to bits in stipple, if needed */ + int stippleHeight; /* height of the stipple */ + PixmapPtr stipple; + + int nlwDst; /* width in longwords of the dest pixmap */ + int x,y,w; /* current span */ + CfbBits startmask; + CfbBits endmask; + register CfbBits *dst; /* pointer to bits we're writing */ + register int nlw; + CfbBits *dstTmp; + int nlwTmp; + + CfbBits *pbits; /* pointer to start of pixmap */ + register CfbBits xor; + register CfbBits bits; /* bits from stipple */ + int wEnd; + + int *pwidthFree; /* copies of the pointers to free */ + DDXPointPtr pptFree; + cfbPrivGCPtr devPriv; + + devPriv = cfbGetGCPrivate(pGC); + + cfb8CheckOpaqueStipple(pGC->alu, pGC->fgPixel, pGC->bgPixel, pGC->planemask); + + n = nInit * miFindMaxBand(pGC->pCompositeClip); + if ( n == 0 ) + return; + pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); + pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + if(!pptFree || !pwidthFree) + { + if (pptFree) DEALLOCATE_LOCAL(pptFree); + if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + return; + } + pwidth = pwidthFree; + ppt = pptFree; + n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, + ppt, pwidth, fSorted); + + stipple = pGC->pRotatedPixmap; + src = (CfbBits *)stipple->devPrivate.ptr; + stippleHeight = stipple->drawable.height; + + cfbGetLongWidthAndPointer (pDrawable, nlwDst, pbits) + + while (n--) + { + w = *pwidth++; + x = ppt->x; + y = ppt->y; + ppt++; + dst = pbits + (y * nlwDst) + (x >> PWSH); + if (((x & PIM) + w) <= PPW) + { + maskpartialbits(x, w, startmask); + endmask = 0; + nlw = 0; + } + else + { + maskbits (x, w, startmask, endmask, nlw); + } + bits = src[y % stippleHeight]; + RotBitsLeft (bits, (x & ((PGSZ-1) & ~PIM))); +#if PPW == 4 + if (cfb8StippleRRop == GXcopy) + { + xor = devPriv->xor; + if (w < PGSZ*2) + { + if (startmask) + { + *dst = (*dst & ~startmask) | + (GetPixelGroup (bits) & startmask); + dst++; + RotBitsLeft (bits, PGSZB); + } + while (nlw--) + { + *dst++ = GetPixelGroup(bits); + RotBitsLeft (bits, PGSZB); + } + if (endmask) + { + *dst = (*dst & ~endmask) | + (GetPixelGroup (bits) & endmask); + } + } + else + { /* XXX consts probably not OK here */ + wEnd = 7 - (nlw & 7); + nlw = (nlw >> 3) + 1; + dstTmp = dst; + nlwTmp = nlw; + if (startmask) + { + *dstTmp = (*dstTmp & ~startmask) | + (GetPixelGroup (bits) & startmask); + dstTmp++; + RotBitsLeft (bits, PGSZB); + } + w = 7 - wEnd; + while (w--) + { + nlw = nlwTmp; + dst = dstTmp; + dstTmp++; + xor = GetPixelGroup (bits); + while (nlw--) + { + *dst = xor; + dst += 8; + } + NextBitGroup (bits); + } + nlwTmp--; + w = wEnd + 1; + if (endmask) + { + dst = dstTmp + (nlwTmp << 3); + *dst = (*dst & ~endmask) | + (GetPixelGroup (bits) & endmask); + } + while (w--) + { + nlw = nlwTmp; + dst = dstTmp; + dstTmp++; + xor = GetPixelGroup (bits); + while (nlw--) + { + *dst = xor; + dst += 8; + } + NextBitGroup (bits); + } + } + } + else +#endif /* PPW == 4 */ + { + if (startmask) + { + xor = GetBitGroup(bits); + *dst = MaskRRopPixels(*dst, xor, startmask); + dst++; + RotBitsLeft (bits, PGSZB); + } + while (nlw--) + { + RRopBitGroup(dst, GetBitGroup(bits)); + dst++; + RotBitsLeft (bits, PGSZB); + } + if (endmask) + { + xor = GetBitGroup(bits); + *dst = MaskRRopPixels(*dst, xor, endmask); + } + } + } + DEALLOCATE_LOCAL(pptFree); + DEALLOCATE_LOCAL(pwidthFree); +} + +#endif /* PSZ == 8 */ diff --git a/xorg-server-1.4/cfb/cfbgc.c b/xorg-server-1.4/cfb/cfbgc.c new file mode 100644 index 0000000..a74c28c --- /dev/null +++ b/xorg-server-1.4/cfb/cfbgc.c @@ -0,0 +1,799 @@ +/*********************************************************** + +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 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. + +******************************************************************/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include +#include +#include "cfb.h" +#include +#include "dixfontstr.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "region.h" + +#include "mistruct.h" +#include "mibstore.h" +#include "migc.h" + +#include "cfbmskbits.h" +#include "cfb8bit.h" + +#if PSZ == 8 +# define useTEGlyphBlt cfbTEGlyphBlt8 +#else +# ifdef WriteBitGroup +# define useTEGlyphBlt cfbImageGlyphBlt8 +# else +# define useTEGlyphBlt cfbTEGlyphBlt +# endif +#endif + +#ifdef WriteBitGroup +# define useImageGlyphBlt cfbImageGlyphBlt8 +# define usePolyGlyphBlt cfbPolyGlyphBlt8 +#else +# define useImageGlyphBlt miImageGlyphBlt +# define usePolyGlyphBlt miPolyGlyphBlt +#endif + +static void cfbUnPushPixels (GCPtr, PixmapPtr, DrawablePtr, int, int, int, int); + +#ifdef FOUR_BIT_CODE +# define usePushPixels cfbPushPixels8 +#else +# define usePushPixels cfbUnPushPixels +#endif + +#ifdef PIXEL_ADDR +# define ZeroPolyArc cfbZeroPolyArcSS8Copy +#else +# define ZeroPolyArc miZeroPolyArc +#endif + +GCFuncs cfbGCFuncs = { + cfbValidateGC, + miChangeGC, + miCopyGC, + miDestroyGC, + miChangeClip, + miDestroyClip, + miCopyClip, +}; + +GCOps cfbTEOps1Rect = { + cfbSolidSpansCopy, + cfbSetSpans, + cfbPutImage, + cfbCopyArea, + cfbCopyPlane, + cfbPolyPoint, +#ifdef PIXEL_ADDR + cfb8LineSS1Rect, + cfb8SegmentSS1Rect, +#else + cfbLineSS, + cfbSegmentSS, +#endif + miPolyRectangle, + ZeroPolyArc, + cfbFillPoly1RectCopy, + cfbPolyFillRect, + cfbPolyFillArcSolidCopy, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + useTEGlyphBlt, + usePolyGlyphBlt, + usePushPixels +}; + +GCOps cfbNonTEOps1Rect = { + cfbSolidSpansCopy, + cfbSetSpans, + cfbPutImage, + cfbCopyArea, + cfbCopyPlane, + cfbPolyPoint, +#ifdef PIXEL_ADDR + cfb8LineSS1Rect, + cfb8SegmentSS1Rect, +#else + cfbLineSS, + cfbSegmentSS, +#endif + miPolyRectangle, + ZeroPolyArc, + cfbFillPoly1RectCopy, + cfbPolyFillRect, + cfbPolyFillArcSolidCopy, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + useImageGlyphBlt, + usePolyGlyphBlt, + usePushPixels +}; + +GCOps cfbTEOps = { + cfbSolidSpansCopy, + cfbSetSpans, + cfbPutImage, + cfbCopyArea, + cfbCopyPlane, + cfbPolyPoint, + cfbLineSS, + cfbSegmentSS, + miPolyRectangle, + ZeroPolyArc, + miFillPolygon, + cfbPolyFillRect, + cfbPolyFillArcSolidCopy, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + useTEGlyphBlt, + usePolyGlyphBlt, + usePushPixels +}; + +GCOps cfbNonTEOps = { + cfbSolidSpansCopy, + cfbSetSpans, + cfbPutImage, + cfbCopyArea, + cfbCopyPlane, + cfbPolyPoint, + cfbLineSS, + cfbSegmentSS, + miPolyRectangle, +#ifdef PIXEL_ADDR + cfbZeroPolyArcSS8Copy, +#else + miZeroPolyArc, +#endif + miFillPolygon, + cfbPolyFillRect, + cfbPolyFillArcSolidCopy, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + useImageGlyphBlt, + usePolyGlyphBlt, + usePushPixels +}; + +GCOps * +cfbMatchCommon (pGC, devPriv) + GCPtr pGC; + cfbPrivGCPtr devPriv; +{ + if (pGC->lineWidth != 0) + return 0; + if (pGC->lineStyle != LineSolid) + return 0; + if (pGC->fillStyle != FillSolid) + return 0; + if (devPriv->rop != GXcopy) + return 0; + if (pGC->font && + FONTMAXBOUNDS(pGC->font,rightSideBearing) - + FONTMINBOUNDS(pGC->font,leftSideBearing) <= 32 && + FONTMINBOUNDS(pGC->font,characterWidth) >= 0) + { + if (TERMINALFONT(pGC->font) +#ifdef FOUR_BIT_CODE + && FONTMAXBOUNDS(pGC->font,characterWidth) >= PGSZB +#endif + ) +#ifdef NO_ONE_RECT + return &cfbTEOps1Rect; +#else + if (devPriv->oneRect) + return &cfbTEOps1Rect; + else + return &cfbTEOps; +#endif + else +#ifdef NO_ONE_RECT + return &cfbNonTEOps1Rect; +#else + if (devPriv->oneRect) + return &cfbNonTEOps1Rect; + else + return &cfbNonTEOps; +#endif + } + return 0; +} + +Bool +cfbCreateGC(pGC) + register GCPtr pGC; +{ + cfbPrivGC *pPriv; + + if (PixmapWidthPaddingInfo[pGC->depth].padPixelsLog2 == LOG2_BITMAP_PAD) + return (mfbCreateGC(pGC)); + pGC->clientClip = NULL; + pGC->clientClipType = CT_NONE; + + if (cfbNonTEOps.PushPixels == cfbUnPushPixels) + { + cfbTEOps1Rect.PushPixels = mfbPushPixelsWeak(); + cfbNonTEOps1Rect.PushPixels = mfbPushPixelsWeak(); + cfbTEOps.PushPixels = mfbPushPixelsWeak(); + cfbNonTEOps.PushPixels = mfbPushPixelsWeak(); + } + + /* + * some of the output primitives aren't really necessary, since they + * will be filled in ValidateGC because of dix/CreateGC() setting all + * the change bits. Others are necessary because although they depend + * on being a color frame buffer, they don't change + */ + + pGC->ops = &cfbNonTEOps; + pGC->funcs = &cfbGCFuncs; + + /* cfb wants to translate before scan conversion */ + pGC->miTranslate = 1; + + pPriv = cfbGetGCPrivate(pGC); + pPriv->rop = pGC->alu; + pPriv->oneRect = FALSE; + pGC->fExpose = TRUE; + pGC->freeCompClip = FALSE; + pGC->pRotatedPixmap = (PixmapPtr) NULL; + return TRUE; +} + +/* Clipping conventions + if the drawable is a window + CT_REGION ==> pCompositeClip really is the composite + CT_other ==> pCompositeClip is the window clip region + if the drawable is a pixmap + CT_REGION ==> pCompositeClip is the translated client region + clipped to the pixmap boundary + CT_other ==> pCompositeClip is the pixmap bounding box +*/ + +void +cfbValidateGC(pGC, changes, pDrawable) + register GCPtr pGC; + unsigned long changes; + DrawablePtr pDrawable; +{ + int mask; /* stateChanges */ + int index; /* used for stepping through bitfields */ + int new_rrop; + int new_line, new_text, new_fillspans, new_fillarea; + int new_rotate; + int xrot, yrot; + /* flags for changing the proc vector */ + cfbPrivGCPtr devPriv; + int oneRect; + + new_rotate = pGC->lastWinOrg.x != pDrawable->x || + pGC->lastWinOrg.y != pDrawable->y; + + pGC->lastWinOrg.x = pDrawable->x; + pGC->lastWinOrg.y = pDrawable->y; + devPriv = cfbGetGCPrivate(pGC); + + new_rrop = FALSE; + new_line = FALSE; + new_text = FALSE; + new_fillspans = FALSE; + new_fillarea = FALSE; + + /* + * if the client clip is different or moved OR the subwindowMode has + * changed OR the window's clip has changed since the last validation + * we need to recompute the composite clip + */ + + if ((changes & (GCClipXOrigin|GCClipYOrigin|GCClipMask|GCSubwindowMode)) || + (pDrawable->serialNumber != (pGC->serialNumber & DRAWABLE_SERIAL_BITS)) + ) + { + miComputeCompositeClip (pGC, pDrawable); +#ifdef NO_ONE_RECT + devPriv->oneRect = FALSE; +#else + oneRect = REGION_NUM_RECTS(pGC->pCompositeClip) == 1; + if (oneRect != devPriv->oneRect) + new_line = TRUE; + devPriv->oneRect = oneRect; +#endif + } + + mask = changes; + while (mask) { + index = lowbit (mask); + mask &= ~index; + + /* + * this switch acculmulates a list of which procedures might have + * to change due to changes in the GC. in some cases (e.g. + * changing one 16 bit tile for another) we might not really need + * a change, but the code is being paranoid. this sort of batching + * wins if, for example, the alu and the font have been changed, + * or any other pair of items that both change the same thing. + */ + switch (index) { + case GCFunction: + case GCForeground: + new_rrop = TRUE; + break; + case GCPlaneMask: + new_rrop = TRUE; + new_text = TRUE; + break; + case GCBackground: + break; + case GCLineStyle: + case GCLineWidth: + new_line = TRUE; + break; + case GCJoinStyle: + case GCCapStyle: + break; + case GCFillStyle: + new_text = TRUE; + new_fillspans = TRUE; + new_line = TRUE; + new_fillarea = TRUE; + break; + case GCFillRule: + break; + case GCTile: + new_fillspans = TRUE; + new_fillarea = TRUE; + break; + + case GCStipple: + if (pGC->stipple) + { + int width = pGC->stipple->drawable.width; + PixmapPtr nstipple; + + if ((width <= PGSZ) && !(width & (width - 1)) && + (nstipple = cfbCopyPixmap(pGC->stipple))) + { + cfbPadPixmap(nstipple); + (*pGC->pScreen->DestroyPixmap)(pGC->stipple); + pGC->stipple = nstipple; + } + } + new_fillspans = TRUE; + new_fillarea = TRUE; + break; + + case GCTileStipXOrigin: + new_rotate = TRUE; + break; + + case GCTileStipYOrigin: + new_rotate = TRUE; + break; + + case GCFont: + new_text = TRUE; + break; + case GCSubwindowMode: + break; + case GCGraphicsExposures: + break; + case GCClipXOrigin: + break; + case GCClipYOrigin: + break; + case GCClipMask: + break; + case GCDashOffset: + break; + case GCDashList: + break; + case GCArcMode: + break; + default: + break; + } + } + + /* + * If the drawable has changed, ensure suitable + * entries are in the proc vector. + */ + if (pDrawable->serialNumber != (pGC->serialNumber & (DRAWABLE_SERIAL_BITS))) { + new_fillspans = TRUE; /* deal with FillSpans later */ + } + + if (new_rotate || new_fillspans) + { + Bool new_pix = FALSE; + + xrot = pGC->patOrg.x + pDrawable->x; + yrot = pGC->patOrg.y + pDrawable->y; + + switch (pGC->fillStyle) + { + case FillTiled: + if (!pGC->tileIsPixel) + { + int width = pGC->tile.pixmap->drawable.width * PSZ; + + if ((width <= PGSZ) && !(width & (width - 1))) + { + cfbCopyRotatePixmap(pGC->tile.pixmap, &pGC->pRotatedPixmap, + xrot, yrot); + new_pix = TRUE; + } + } + break; +#ifdef FOUR_BIT_CODE + case FillStippled: + case FillOpaqueStippled: + { + int width = pGC->stipple->drawable.width; + + if ((width <= PGSZ) && !(width & (width - 1))) + { + mfbCopyRotatePixmap(pGC->stipple, &pGC->pRotatedPixmap, + xrot, yrot); + new_pix = TRUE; + } + } + break; +#endif + } + if (!new_pix && pGC->pRotatedPixmap) + { + (*pGC->pScreen->DestroyPixmap)(pGC->pRotatedPixmap); + pGC->pRotatedPixmap = (PixmapPtr) NULL; + } + } + + if (new_rrop) + { + int old_rrop; + + old_rrop = devPriv->rop; + devPriv->rop = cfbReduceRasterOp (pGC->alu, pGC->fgPixel, + pGC->planemask, + &devPriv->and, &devPriv->xor); + if (old_rrop == devPriv->rop) + new_rrop = FALSE; + else + { +#ifdef PIXEL_ADDR + new_line = TRUE; +#endif +#ifdef WriteBitGroup + new_text = TRUE; +#endif + new_fillspans = TRUE; + new_fillarea = TRUE; + } + } + + if (new_rrop || new_fillspans || new_text || new_fillarea || new_line) + { + GCOps *newops; + + if ((newops = cfbMatchCommon (pGC, devPriv))) + { + if (pGC->ops->devPrivate.val) + miDestroyGCOps (pGC->ops); + pGC->ops = newops; + new_rrop = new_line = new_fillspans = new_text = new_fillarea = 0; + } + else + { + if (!pGC->ops->devPrivate.val) + { + pGC->ops = miCreateGCOps (pGC->ops); + pGC->ops->devPrivate.val = 1; + } + } + } + + /* deal with the changes we've collected */ + if (new_line) + { + pGC->ops->FillPolygon = miFillPolygon; +#ifdef NO_ONE_RECT + if (pGC->fillStyle == FillSolid) + { + switch (devPriv->rop) { + case GXcopy: + pGC->ops->FillPolygon = cfbFillPoly1RectCopy; + break; + default: + pGC->ops->FillPolygon = cfbFillPoly1RectGeneral; + break; + } + } +#else + if (devPriv->oneRect && pGC->fillStyle == FillSolid) + { + switch (devPriv->rop) { + case GXcopy: + pGC->ops->FillPolygon = cfbFillPoly1RectCopy; + break; + default: + pGC->ops->FillPolygon = cfbFillPoly1RectGeneral; + break; + } + } +#endif + if (pGC->lineWidth == 0) + { +#ifdef PIXEL_ADDR + if ((pGC->lineStyle == LineSolid) && (pGC->fillStyle == FillSolid)) + { + switch (devPriv->rop) + { + case GXxor: + pGC->ops->PolyArc = cfbZeroPolyArcSS8Xor; + break; + case GXcopy: + pGC->ops->PolyArc = cfbZeroPolyArcSS8Copy; + break; + default: + pGC->ops->PolyArc = cfbZeroPolyArcSS8General; + break; + } + } + else +#endif + pGC->ops->PolyArc = miZeroPolyArc; + } + else + pGC->ops->PolyArc = miPolyArc; + pGC->ops->PolySegment = miPolySegment; + switch (pGC->lineStyle) + { + case LineSolid: + if(pGC->lineWidth == 0) + { + if (pGC->fillStyle == FillSolid) + { +#if defined(PIXEL_ADDR) && !defined(NO_ONE_RECT) + if (devPriv->oneRect && + ((pDrawable->x >= pGC->pScreen->width - 32768) && + (pDrawable->y >= pGC->pScreen->height - 32768))) + { + pGC->ops->Polylines = cfb8LineSS1Rect; + pGC->ops->PolySegment = cfb8SegmentSS1Rect; + } else +#endif +#ifdef NO_ONE_RECT + { + pGC->ops->Polylines = cfb8LineSS1Rect; + pGC->ops->PolySegment = cfb8SegmentSS1Rect; + } +#else + { + pGC->ops->Polylines = cfbLineSS; + pGC->ops->PolySegment = cfbSegmentSS; + } +#endif + } + else + pGC->ops->Polylines = miZeroLine; + } + else + pGC->ops->Polylines = miWideLine; + break; + case LineOnOffDash: + case LineDoubleDash: + if (pGC->lineWidth == 0 && pGC->fillStyle == FillSolid) + { + pGC->ops->Polylines = cfbLineSD; + pGC->ops->PolySegment = cfbSegmentSD; + } else + pGC->ops->Polylines = miWideDash; + break; + } + } + + if (new_text && (pGC->font)) + { + if (FONTMAXBOUNDS(pGC->font,rightSideBearing) - + FONTMINBOUNDS(pGC->font,leftSideBearing) > 32 || + FONTMINBOUNDS(pGC->font,characterWidth) < 0) + { + pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; + pGC->ops->ImageGlyphBlt = miImageGlyphBlt; + } + else + { +#ifdef WriteBitGroup + if (pGC->fillStyle == FillSolid) + { + if (devPriv->rop == GXcopy) + pGC->ops->PolyGlyphBlt = cfbPolyGlyphBlt8; + else +#ifdef FOUR_BIT_CODE + pGC->ops->PolyGlyphBlt = cfbPolyGlyphRop8; +#else + pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; +#endif + } + else +#endif + pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; + /* special case ImageGlyphBlt for terminal emulator fonts */ +#if !defined(WriteBitGroup) || PSZ == 8 + if (TERMINALFONT(pGC->font) && + (pGC->planemask & PMSK) == PMSK +#ifdef FOUR_BIT_CODE + && FONTMAXBOUNDS(pGC->font,characterWidth) >= PGSZB +#endif + ) + { + pGC->ops->ImageGlyphBlt = useTEGlyphBlt; + } + else +#endif + { +#ifdef WriteBitGroup + if (devPriv->rop == GXcopy && + pGC->fillStyle == FillSolid && + (pGC->planemask & PMSK) == PMSK) + pGC->ops->ImageGlyphBlt = cfbImageGlyphBlt8; + else +#endif + pGC->ops->ImageGlyphBlt = miImageGlyphBlt; + } + } + } + + + if (new_fillspans) { + switch (pGC->fillStyle) { + case FillSolid: + switch (devPriv->rop) { + case GXcopy: + pGC->ops->FillSpans = cfbSolidSpansCopy; + break; + case GXxor: + pGC->ops->FillSpans = cfbSolidSpansXor; + break; + default: + pGC->ops->FillSpans = cfbSolidSpansGeneral; + break; + } + break; + case FillTiled: + if (pGC->pRotatedPixmap) + { + if (pGC->alu == GXcopy && (pGC->planemask & PMSK) == PMSK) + pGC->ops->FillSpans = cfbTile32FSCopy; + else + pGC->ops->FillSpans = cfbTile32FSGeneral; + } + else + pGC->ops->FillSpans = cfbUnnaturalTileFS; + break; + case FillStippled: +#ifdef FOUR_BIT_CODE + if (pGC->pRotatedPixmap) + pGC->ops->FillSpans = cfb8Stipple32FS; + else +#endif + pGC->ops->FillSpans = cfbUnnaturalStippleFS; + break; + case FillOpaqueStippled: +#ifdef FOUR_BIT_CODE + if (pGC->pRotatedPixmap) + pGC->ops->FillSpans = cfb8OpaqueStipple32FS; + else +#endif + pGC->ops->FillSpans = cfbUnnaturalStippleFS; + break; + default: + FatalError("cfbValidateGC: illegal fillStyle\n"); + } + } /* end of new_fillspans */ + + if (new_fillarea) { +#ifndef FOUR_BIT_CODE + pGC->ops->PolyFillRect = miPolyFillRect; + if (pGC->fillStyle == FillSolid || pGC->fillStyle == FillTiled) + { + pGC->ops->PolyFillRect = cfbPolyFillRect; + } +#endif +#ifdef FOUR_BIT_CODE + pGC->ops->PushPixels = mfbPushPixelsWeak(); + if (pGC->fillStyle == FillSolid && devPriv->rop == GXcopy) + pGC->ops->PushPixels = cfbPushPixels8; +#endif + pGC->ops->PolyFillArc = miPolyFillArc; + if (pGC->fillStyle == FillSolid) + { + switch (devPriv->rop) + { + case GXcopy: + pGC->ops->PolyFillArc = cfbPolyFillArcSolidCopy; + break; + default: + pGC->ops->PolyFillArc = cfbPolyFillArcSolidGeneral; + break; + } + } + } +} + +/* + * this is never called, it just exists to have its address + * taken in mfbCreateGC. + */ +static void +cfbUnPushPixels (pGC, pBitmap, pDrawable, dx, dy, xOrg, yOrg) + GCPtr pGC; + PixmapPtr pBitmap; + DrawablePtr pDrawable; + int dx, dy, xOrg, yOrg; +{ + return; +} diff --git a/xorg-server-1.4/cfb/cfbgetsp.c b/xorg-server-1.4/cfb/cfbgetsp.c new file mode 100644 index 0000000..672196a --- /dev/null +++ b/xorg-server-1.4/cfb/cfbgetsp.c @@ -0,0 +1,213 @@ +/*********************************************************** + +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 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. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "servermd.h" + +#include "misc.h" +#include "region.h" +#include "gc.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" + +#include "cfb.h" +#include "cfbmskbits.h" + +/* GetSpans -- for each span, gets bits from drawable starting at ppt[i] + * and continuing for pwidth[i] bits + * Each scanline returned will be server scanline padded, i.e., it will come + * out to an integral number of words. + */ +void +cfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pchardstStart) + DrawablePtr pDrawable; /* drawable from which to get bits */ + int wMax; /* largest value of all *pwidths */ + register DDXPointPtr ppt; /* points to start copying from */ + int *pwidth; /* list of number of bits to copy */ + int nspans; /* number of scanlines to copy */ + char *pchardstStart; /* where to put the bits */ +{ + PixelGroup *pdstStart = (PixelGroup *)pchardstStart; + register PixelGroup *pdst; /* where to put the bits */ + register PixelGroup *psrc; /* where to get the bits */ + register PixelGroup tmpSrc; /* scratch buffer for bits */ + PixelGroup *psrcBase; /* start of src bitmap */ + int widthSrc; /* width of pixmap in bytes */ + register DDXPointPtr pptLast; /* one past last point to get */ + int xEnd; /* last pixel to copy from */ + int nl, srcBit; + int w; + PixelGroup *pdstNext; +#if PSZ == 24 + register char *psrcb, *pdstb; + register int xIndex = 0; +#else + register int nstart; +#if PSZ != 32 || PPW != 1 + int nend; +#endif + PixelGroup startmask, endmask; + int nlMiddle; +#endif + + switch (pDrawable->bitsPerPixel) { + case 1: + mfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pchardstStart); + return; + case PSZ: + break; + default: + FatalError("cfbGetSpans: invalid depth\n"); + } + + /* + * XFree86 DDX empties the root borderClip when the VT is + * switched away; this checks for that case + */ + if (!cfbDrawableEnabled(pDrawable)) + return; + + cfbGetLongWidthAndPointer (pDrawable, widthSrc, psrcBase) + +#ifdef PIXEL_ADDR +# if PSZ != 24 + if ((nspans == 1) && (*pwidth == 1)) + { + tmpSrc = *((PixelType *)(psrcBase + (ppt->y * widthSrc)) + + ppt->x); +#if BITMAP_BIT_ORDER == MSBFirst + tmpSrc <<= (sizeof (CfbBits) - sizeof (PixelType)) * 8; +#endif + *pdstStart = tmpSrc; + return; + } +# endif /* PSZ != 24 */ +#endif + pdst = pdstStart; + pptLast = ppt + nspans; + while(ppt < pptLast) + { +#if PSZ == 24 + xEnd = min(ppt->x + *pwidth, widthSrc * sizeof(CfbBits) / 3); + w = xEnd - ppt->x; + psrc = psrcBase + ppt->y * widthSrc; + srcBit = ppt->x; + psrcb = (char *)psrc + (ppt->x * 3); + xIndex = 0; + pdstb = (char *)pdst; + pdstNext = pdst + ((w * 3 + 3) >> 2); +#else + xEnd = min(ppt->x + *pwidth, widthSrc << PWSH); + w = xEnd - ppt->x; + psrc = psrcBase + ppt->y * widthSrc + (ppt->x >> PWSH); + srcBit = ppt->x & PIM; + pdstNext = pdst + ((w + PPW - 1) >> PWSH); +#endif + +#if PSZ == 24 + if (w < 0) + FatalError("cfb24GetSpans: Internal error (w < 0)\n"); + nl = w; + while (nl--){ + psrc = (PixelGroup *)((unsigned long)psrcb & ~0x03); + getbits24(psrc, tmpSrc, srcBit); + pdst = (PixelGroup *)((unsigned long)pdstb & ~0x03); + putbits24(tmpSrc, PPW, pdst, ~((CfbBits)0), xIndex); + srcBit++; + psrcb += 3; + xIndex++; + pdstb += 3; + } + pdst = pdstNext; +#else /* PSZ == 24 */ + if (srcBit + w <= PPW) + { + getbits(psrc, srcBit, w, tmpSrc); + putbits(tmpSrc, 0, w, pdst, ~((CfbBits)0)); + pdst++; + } + else + { + maskbits(ppt->x, w, startmask, endmask, nlMiddle); + nstart = 0; + if (startmask) + { + nstart = PPW - srcBit; + getbits(psrc, srcBit, nstart, tmpSrc); + putbits(tmpSrc, 0, nstart, pdst, ~((CfbBits)0)); + if(srcBit + nstart >= PPW) + psrc++; + } + nl = nlMiddle; + while (nl--) + { + tmpSrc = *psrc; + putbits(tmpSrc, nstart, PPW, pdst, ~((CfbBits)0)); + psrc++; + pdst++; + } + if (endmask) + { +#if PSZ != 32 || PPW != 1 + nend = xEnd & PIM; +#endif + getbits(psrc, 0, nend, tmpSrc); + putbits(tmpSrc, nstart, nend, pdst, ~((CfbBits)0)); + } + pdst = pdstNext; + } +#endif /* PSZ == 24 */ + ppt++; + pwidth++; + } +} diff --git a/xorg-server-1.4/cfb/cfbglblt8.c b/xorg-server-1.4/cfb/cfbglblt8.c new file mode 100644 index 0000000..c4cba0e --- /dev/null +++ b/xorg-server-1.4/cfb/cfbglblt8.c @@ -0,0 +1,477 @@ +/* + +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. +*/ + +/* + * Poly glyph blt. Accepts an arbitrary font <= 32 bits wide, in Copy mode + * only. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include "cfb.h" +#include +#include "dixfontstr.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "cfbmskbits.h" +#include "cfb8bit.h" + +#define BOX_OVERLAP(box1, box2, xoffset, yoffset) \ + ((box1)->x1 <= ((int) (box2)->x2 + (xoffset)) && \ + ((int) (box2)->x1 + (xoffset)) <= (box1)->x2 && \ + (box1)->y1 <= ((int) (box2)->y2 + (yoffset)) && \ + ((int) (box2)->y1 + (yoffset)) <= (box1)->y2) + +#define BOX_CONTAINS(box1, box2, xoffset, yoffset) \ + ((box1)->x1 <= ((int) (box2)->x1 + (xoffset)) && \ + ((int) (box2)->x2 + (xoffset)) <= (box1)->x2 && \ + (box1)->y1 <= ((int) (box2)->y1 + (yoffset)) && \ + ((int) (box2)->y2 + (yoffset)) <= (box1)->y2) + +#if defined(FOUR_BIT_CODE) || defined(WriteBitGroup) && !defined(GLYPHROP) + +#if GLYPHPADBYTES != 4 +#define USE_LEFTBITS +#endif + +#ifdef USE_LEFTBITS +typedef unsigned char *glyphPointer; + +#define GlyphBits(bits,width,dst) getleftbits(bits,width,dst); \ + (dst) &= widthMask; \ + (bits) += widthGlyph; +#define GlyphBitsS(bits,width,dst,off) GlyphBits(bits,width,dst); \ + dst = BitRight (dst, off); +#else +typedef CARD32 *glyphPointer; + +#define GlyphBits(bits,width,dst) dst = *bits++; +#define GlyphBitsS(bits,width,dst,off) dst = BitRight(*bits++, off); +#endif + +#ifdef GLYPHROP +#define cfbPolyGlyphBlt8 cfbPolyGlyphRop8 +#define cfbPolyGlyphBlt8Clipped cfbPolyGlyphRop8Clipped + +#undef WriteBitGroup +#define WriteBitGroup(dst,pixel,bits) RRopBitGroup(dst,bits) + +#endif + +static void cfbPolyGlyphBlt8Clipped( + DrawablePtr pDrawable, + GCPtr pGC, + int x, + int y, + unsigned int nglyph, + CharInfoPtr *ppci, /* array of character info */ + unsigned char *pglyphBase); /* start of array of glyphs */ + +#if defined(HAS_STIPPLE_CODE) && !defined(GLYPHROP) && !defined(USE_LEFTBITS) +#define USE_STIPPLE_CODE +#endif + +#if defined(__GNUC__) && !defined(GLYPHROP) && (defined(mc68020) || defined(mc68000) || defined(__mc68000__)) && PSZ == 8 && !defined(USE_LEFTBITS) +#ifdef USE_STIPPLE_CODE +#undef USE_STIPPLE_CODE +#endif +#include "stip68kgnu.h" +#endif + +#if PSZ == 24 +#define DST_INC 3 +#else +#define DST_INC (PGSZB >> PWSH) +#endif + +/* cfbStippleStack/cfbStippleStackTE are coded in assembly language. + * They are only provided on some architecures. + */ +#ifdef USE_STIPPLE_CODE +extern void cfbStippleStack (), cfbStippleStackTE (); +#endif + +void +cfbPolyGlyphBlt8 (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) + DrawablePtr pDrawable; + GCPtr pGC; + int x, y; + unsigned int nglyph; + CharInfoPtr *ppci; /* array of character info */ + pointer pglyphBase; /* start of array of glyphs */ +{ +#ifndef GLYPHROP + register CfbBits pixel; +#endif +#if !defined(STIPPLE) && !defined(USE_STIPPLE_CODE) + register CfbBits c; + register CfbBits *dst; +#endif + register glyphPointer glyphBits; + register int xoff; + + FontPtr pfont = pGC->font; + CharInfoPtr pci; + CfbBits *dstLine; + CfbBits *pdstBase; + int hTmp; + int bwidthDst; + int widthDst; + int h; + BoxRec bbox; /* for clipping */ + int w; + RegionPtr clip; + BoxPtr extents; +#ifdef USE_LEFTBITS + int widthGlyph; + CfbBits widthMask; +#endif +#ifndef STIPPLE +#ifdef USE_STIPPLE_CODE + void (*stipple)(); + + stipple = cfbStippleStack; + if (FONTCONSTMETRICS(pfont)) + stipple = cfbStippleStackTE; +#endif +#endif + + x += pDrawable->x; + y += pDrawable->y; + + /* compute an approximate (but covering) bounding box */ + bbox.x1 = 0; + if ((ppci[0]->metrics.leftSideBearing < 0)) + bbox.x1 = ppci[0]->metrics.leftSideBearing; + h = nglyph - 1; + w = ppci[h]->metrics.rightSideBearing; + while (--h >= 0) + w += ppci[h]->metrics.characterWidth; + bbox.x2 = w; + bbox.y1 = -FONTMAXBOUNDS(pfont,ascent); + bbox.y2 = FONTMAXBOUNDS(pfont,descent); + + clip = cfbGetCompositeClip(pGC); + extents = &clip->extents; + + if (!clip->data) + { + if (!BOX_CONTAINS(extents, &bbox, x, y)) + { + if (BOX_OVERLAP (extents, &bbox, x, y)) + cfbPolyGlyphBlt8Clipped(pDrawable, pGC, x, y, + nglyph, ppci, pglyphBase); + return; + } + } + else + { + /* check to make sure some of the text appears on the screen */ + if (!BOX_OVERLAP (extents, &bbox, x, y)) + return; + + bbox.x1 += x; + bbox.x2 += x; + bbox.y1 += y; + bbox.y2 += y; + + switch (RECT_IN_REGION(pGC->pScreen, clip, &bbox)) + { + case rgnPART: + cfbPolyGlyphBlt8Clipped(pDrawable, pGC, x, y, + nglyph, ppci, pglyphBase); + case rgnOUT: + return; + } + } + +#ifdef GLYPHROP + cfb8CheckStipple (pGC->alu, pGC->fgPixel, pGC->planemask); +#else + pixel = cfbGetGCPrivate(pGC)->xor; +#endif + + cfbGetTypedWidthAndPointer (pDrawable, bwidthDst, pdstBase, char, CfbBits) + + widthDst = bwidthDst / PGSZB; + while (nglyph--) + { + pci = *ppci++; + glyphBits = (glyphPointer) FONTGLYPHBITS(pglyphBase,pci); + xoff = x + pci->metrics.leftSideBearing; +#if PSZ == 24 + dstLine = pdstBase + (y - pci->metrics.ascent) * widthDst +((xoff>> 2)*3); +#else + dstLine = pdstBase + + (y - pci->metrics.ascent) * widthDst + (xoff >> PWSH); +#endif + x += pci->metrics.characterWidth; + if ((hTmp = pci->metrics.descent + pci->metrics.ascent)) + { +#if PSZ == 24 + xoff &= 0x03; +#else + xoff &= PIM; +#endif /* PSZ == 24 */ +#ifdef STIPPLE + STIPPLE(dstLine,glyphBits,pixel,bwidthDst,hTmp,xoff); +#else +#ifdef USE_STIPPLE_CODE + (*stipple)(dstLine,glyphBits,pixel,bwidthDst,hTmp,xoff); +#else +#ifdef USE_LEFTBITS + w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; + widthGlyph = PADGLYPHWIDTHBYTES(w); + widthMask = mfbGetendtab(w); +#endif + do { + dst = dstLine; + dstLine = (CfbBits *) (((char *) dstLine) + bwidthDst); + GlyphBits(glyphBits, w, c) + WriteBitGroup(dst, pixel, GetBitGroup(BitRight(c,xoff))); + dst += DST_INC; + c = BitLeft(c,PGSZB - xoff); + while (c) + { + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst += DST_INC; + } + } while (--hTmp); +#endif /* USE_STIPPLE_CODE else */ +#endif /* STIPPLE else */ + } + } +} + +static void +cfbPolyGlyphBlt8Clipped( + DrawablePtr pDrawable, + GCPtr pGC, + int x, + int y, + unsigned int nglyph, + CharInfoPtr *ppci, /* array of character info */ + unsigned char *pglyphBase) /* start of array of glyphs */ +{ +#ifndef GLYPHROP + register CfbBits pixel; +#endif +#if !defined(STIPPLE) && !defined(USE_STIPPLE_CODE) + register CfbBits c; +#endif + register glyphPointer glyphBits; + register int xoff; +#if defined(USE_LEFTBITS) || (!defined(STIPPLE) && !defined(USE_STIPPLE_CODE)) + register CfbBits *dst; +#endif + + CharInfoPtr pci; + FontPtr pfont = pGC->font; + CfbBits *dstLine; + CfbBits *pdstBase; +#ifdef USE_LEFTBITS + CARD32 *cTmp; +#endif + CARD32 *clips; + int maxAscent, maxDescent; + int minLeftBearing; + int hTmp; + int widthDst; + int bwidthDst; + int xG, yG; + BoxPtr pBox; + int numRects; + int w; + RegionPtr pRegion; + int yBand; +#ifdef GLYPHROP + CfbBits bits; +#endif +#ifdef USE_LEFTBITS + int widthGlyph; + CfbBits widthMask; +#endif + +#ifdef GLYPHROP + cfb8CheckStipple (pGC->alu, pGC->fgPixel, pGC->planemask); +#else + pixel = cfbGetGCPrivate(pGC)->xor; +#endif + + cfbGetTypedWidthAndPointer (pDrawable, bwidthDst, pdstBase, char, CfbBits) + + widthDst = bwidthDst / PGSZB; + maxAscent = FONTMAXBOUNDS(pfont,ascent); + maxDescent = FONTMAXBOUNDS(pfont,descent); + minLeftBearing = FONTMINBOUNDS(pfont,leftSideBearing); + + pRegion = cfbGetCompositeClip(pGC); + + pBox = REGION_RECTS(pRegion); + numRects = REGION_NUM_RECTS (pRegion); + while (numRects && pBox->y2 <= y - maxAscent) + { + ++pBox; + --numRects; + } + if (!numRects || pBox->y1 >= y + maxDescent) + return; + yBand = pBox->y1; + while (numRects && pBox->y1 == yBand && pBox->x2 <= x + minLeftBearing) + { + ++pBox; + --numRects; + } + if (!numRects) + return; + clips = (CARD32 *)ALLOCATE_LOCAL ((maxAscent + maxDescent) * + sizeof (CARD32)); + while (nglyph--) + { + pci = *ppci++; + glyphBits = (glyphPointer) FONTGLYPHBITS(pglyphBase,pci); + w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; + xG = x + pci->metrics.leftSideBearing; + yG = y - pci->metrics.ascent; + x += pci->metrics.characterWidth; + if ((hTmp = pci->metrics.descent + pci->metrics.ascent)) + { +#if PSZ == 24 + dstLine = pdstBase + yG * widthDst + ((xG>> 2)*3); + /* never use (xG*3)>>2 */ +#else + dstLine = pdstBase + yG * widthDst + (xG >> PWSH); +#endif +#if PSZ == 24 + xoff = xG & 3; +#else + xoff = xG & PIM; +#endif +#ifdef USE_LEFTBITS + w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; + widthGlyph = PADGLYPHWIDTHBYTES(w); + widthMask = mfbGetendtab(w); +#endif + switch (cfb8ComputeClipMasks32 (pBox, numRects, xG, yG, w, hTmp, clips)) + { + case rgnPART: +#ifdef USE_LEFTBITS + cTmp = clips; + do { + dst = dstLine; + dstLine = (CfbBits *) (((char *) dstLine) + bwidthDst); + GlyphBits(glyphBits, w, c) + c &= *cTmp++; + if (c) + { + WriteBitGroup(dst, pixel, GetBitGroup(BitRight(c,xoff))); + c = BitLeft(c,PGSZB - xoff); + dst += DST_INC; + while (c) + { + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst += DST_INC; + } + } + } while (--hTmp); + break; +#else /* !USE_LEFTBITS */ + { + int h; + + h = hTmp; + do + { + --h; + clips[h] = clips[h] & glyphBits[h]; + } while (h); + } + glyphBits = clips; + /* fall through */ +#endif /* USE_LEFTBITS */ + case rgnIN: +#ifdef STIPPLE + STIPPLE(dstLine,glyphBits,pixel,bwidthDst,hTmp,xoff); +#else +#ifdef USE_STIPPLE_CODE + cfbStippleStackTE(dstLine,glyphBits,pixel,bwidthDst,hTmp,xoff); +#else + do { + dst = dstLine; + dstLine = (CfbBits *) (((char *) dstLine) + bwidthDst); + GlyphBits(glyphBits, w, c) + if (c) + { + /* This code originally could read memory locations + * that were not mapped. Hence we have to check the + * trailing bits to see whether they are zero and if + * then skip them correctly. This is no problem for + * the GXcopy case, since there only the pixels that + * are non-zero are written ... + */ +#ifndef GLYPHROP + WriteBitGroup(dst, pixel, GetBitGroup(BitRight(c,xoff))); + c = BitLeft(c,PGSZB - xoff); + dst += DST_INC; +#else /* GLYPHROP */ + if ((bits = GetBitGroup(BitRight(c,xoff)))) + WriteBitGroup(dst, pixel, bits); + c = BitLeft(c,PGSZB - xoff); + dst += DST_INC; + + while (c && ((bits = GetBitGroup(c)) == 0)) + { + NextBitGroup(c); + dst += DST_INC; + } +#endif /* GLYPHROP */ + while (c) + { + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst += DST_INC; + } + } + } while (--hTmp); +#endif /* USE_STIPPLE_CODE else */ +#endif /* STIPPLE else */ + break; + } + } + } + DEALLOCATE_LOCAL (clips); +} + +#endif /* FOUR_BIT_CODE */ diff --git a/xorg-server-1.4/cfb/cfbglrop8.c b/xorg-server-1.4/cfb/cfbglrop8.c new file mode 100644 index 0000000..b8dbd1f --- /dev/null +++ b/xorg-server-1.4/cfb/cfbglrop8.c @@ -0,0 +1,2 @@ +#define GLYPHROP +#include "../cfb/cfbglblt8.c" diff --git a/xorg-server-1.4/cfb/cfbhrzvert.c b/xorg-server-1.4/cfb/cfbhrzvert.c new file mode 100644 index 0000000..a6a7930 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbhrzvert.c @@ -0,0 +1,554 @@ +/*********************************************************** + +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 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. + +******************************************************************/ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "gc.h" +#include "window.h" +#include "pixmap.h" +#include "region.h" + +#include "cfb.h" +#include "cfbmskbits.h" + +/* horizontal solid line + abs(len) > 1 +*/ +void +cfbHorzS(rop, and, xor, addrl, nlwidth, x1, y1, len) +register int rop; +register CfbBits and; +register CfbBits xor; +register CfbBits *addrl; /* pointer to base of bitmap */ +int nlwidth; /* width in longwords of bitmap */ +int x1; /* initial point */ +int y1; +int len; /* length of line */ +{ + register int nlmiddle; + +#if PSZ == 24 + + int leftIndex, rightIndex; + CfbBits piQxelAnd[3], piQxelXor[3]; + piQxelAnd[0] = (and & 0xFFFFFF) | ((and<<24) & 0xFF000000); + piQxelAnd[1] = ((and>>8) & 0xFFFF)| ((and<<16) & 0xFFFF0000); + piQxelAnd[2] = ((and<<8) & 0xFFFFFF00) | ((and>>16) & 0xFF); + + piQxelXor[0] = (xor & 0xFFFFFF) | ((xor<<24) & 0xFF000000); + piQxelXor[1] = ((xor>>8) & 0xFFFF)| ((xor<<16) & 0xFFFF0000); + piQxelXor[2] = ((xor<<8) & 0xFFFFFF00) | ((xor>>16) & 0xFF); + + leftIndex = x1 & 3; + rightIndex = ((x1 + len) < 5)?0:(x1 + len)&3; + nlmiddle = len; + if(leftIndex){ + nlmiddle -= (4 - leftIndex); + } + if(rightIndex){ + nlmiddle -= rightIndex; + } + if (nlmiddle < 0) + nlmiddle = 0; + + nlmiddle >>= 2; + + addrl += (y1 * nlwidth) + (x1 >> 2)*3 + (leftIndex?leftIndex-1:0); + + switch(leftIndex+len){ + case 4: + switch(leftIndex){ + case 0: + *addrl = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); + break; + case 1: + *addrl = DoMaskRRop (*addrl, piQxelAnd[0], piQxelXor[0], 0xFF000000); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); + break; + case 2: + *addrl = DoMaskRRop (*addrl, piQxelAnd[1], piQxelXor[1], 0xFFFF0000); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); + break; + case 3: + *addrl = DoMaskRRop (*addrl, piQxelAnd[2], piQxelXor[2], 0xFFFFFF00); + break; + } + break; + case 3: + switch(leftIndex){ + case 0: + *addrl = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + addrl++; + *addrl = DoMaskRRop (*addrl, piQxelAnd[2], piQxelXor[2], 0xFF); + break; + case 1: + *addrl = DoMaskRRop (*addrl, piQxelAnd[0], piQxelXor[0], 0xFF000000); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + addrl++; + *addrl = DoMaskRRop (*addrl, piQxelAnd[2], piQxelXor[2], 0xFF); + break; + case 2: + *addrl = DoMaskRRop (*addrl, piQxelAnd[1], piQxelXor[1], 0xFFFF0000); + addrl++; + *addrl = DoMaskRRop (*addrl, piQxelAnd[2], piQxelXor[2], 0xFF); + break; + } + break; + case 2: + if(leftIndex){ + *addrl = DoMaskRRop (*addrl, piQxelAnd[0], piQxelXor[0], 0xFF000000); + addrl++; + } + else{ + *addrl = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); + addrl++; + } + *addrl = DoMaskRRop (*addrl, piQxelAnd[1], piQxelXor[1], 0xFFFF); + break; + case 1: /*only if leftIndex = 0 and w = 1*/ + *addrl = DoMaskRRop (*addrl, piQxelAnd[0], piQxelXor[0], 0xFFFFFF); + break; + case 0: /*never*/ + break; + default: + { + if (rop == GXcopy){ + switch(leftIndex){ + case 0: + break; + case 1: + *addrl = ((*addrl) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + addrl++; + *addrl++ = piQxelXor[1]; + *addrl++ = piQxelXor[2]; + break; + case 2: + *addrl = ((*addrl) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + addrl++; + *addrl++ = piQxelXor[2]; + break; + case 3: + *addrl = ((*addrl) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); + addrl++; + break; + } + while(nlmiddle--){ + *addrl++ = piQxelXor[0]; + *addrl++ = piQxelXor[1]; + *addrl++ = piQxelXor[2]; + } + switch(rightIndex){ + case 0: + break; + case 1: + *addrl = ((*addrl) & 0xFF000000) | (piQxelXor[0] & 0xFFFFFF); + break; + case 2: + *addrl++ = piQxelXor[0]; + *addrl = ((*addrl) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + break; + case 3: + *addrl++ = piQxelXor[0]; + *addrl++ = piQxelXor[1]; + *addrl = ((*addrl) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + break; + } + } + else{ + if(rop == GXxor){ + switch(leftIndex){ + case 0: + break; + case 1: + *addrl++ ^= (piQxelXor[0]&0xFF000000); + *addrl++ ^= piQxelXor[1]; + *addrl++ ^= piQxelXor[2]; + break; + case 2: + *addrl++ ^= (piQxelXor[1]& 0xFFFF0000); + *addrl++ ^= piQxelXor[2]; + break; + case 3: + *addrl++ ^= (piQxelXor[2]& 0xFFFFFF00); + break; + } + while(nlmiddle--){ + *addrl++ ^= piQxelXor[0]; + *addrl++ ^= piQxelXor[1]; + *addrl++ ^= piQxelXor[2]; + } + switch(rightIndex){ + case 0: + break; + case 1: + *addrl ^= (piQxelXor[0]& 0xFFFFFF); + break; + case 2: + *addrl++ ^= piQxelXor[0]; + *addrl ^= (piQxelXor[1]&0xFFFF); + break; + case 3: + *addrl++ ^= piQxelXor[0]; + *addrl++ ^= piQxelXor[1]; + *addrl ^= (piQxelXor[2]&0xFF); + break; + } + } + else{ + switch(leftIndex){ + case 0: + break; + case 1: + *addrl = DoMaskRRop (*addrl, piQxelAnd[0], piQxelXor[0], 0xFF000000); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); + addrl++; + break; + case 2: + *addrl = DoMaskRRop (*addrl, piQxelAnd[1], piQxelXor[1], 0xFFFF0000); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); + addrl++; + break; + case 3: + *addrl = DoMaskRRop (*addrl, piQxelAnd[2], piQxelXor[2], 0xFFFFFF00); + addrl++; + break; + } + while(nlmiddle--){ + *addrl = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); + addrl++; + } + switch(rightIndex){ + case 0: + break; + case 1: + *addrl = DoMaskRRop (*addrl, piQxelAnd[0], piQxelXor[0], 0xFFFFFF); + addrl++; + break; + case 2: + *addrl = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); + addrl++; + *addrl = DoMaskRRop (*addrl, piQxelAnd[1], piQxelXor[1], 0xFFFF); + break; + case 3: + *addrl = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + addrl++; + *addrl = DoMaskRRop (*addrl, piQxelAnd[2], piQxelXor[2], 0xFF); + break; + } + + } + } + } + } +#else + register CfbBits startmask; + register CfbBits endmask; + + addrl = addrl + (y1 * nlwidth) + (x1 >> PWSH); + + /* all bits inside same longword */ + if ( ((x1 & PIM) + len) < PPW) + { + maskpartialbits(x1, len, startmask); + *addrl = DoMaskRRop (*addrl, and, xor, startmask); + } + else + { + maskbits(x1, len, startmask, endmask, nlmiddle); + if (rop == GXcopy) + { + if (startmask) + { + *addrl = (*addrl & ~startmask) | (xor & startmask); + addrl++; + } + while (nlmiddle--) + *addrl++ = xor; + if (endmask) + *addrl = (*addrl & ~endmask) | (xor & endmask); + } + else + { + if (startmask) + { + *addrl = DoMaskRRop (*addrl, and, xor, startmask); + addrl++; + } + if (rop == GXxor) + { + while (nlmiddle--) + *addrl++ ^= xor; + } + else + { + while (nlmiddle--) + { + *addrl = DoRRop (*addrl, and, xor); + addrl++; + } + } + if (endmask) + *addrl = DoMaskRRop (*addrl, and, xor, endmask); + } + } +#endif +} + +/* vertical solid line */ + +void +cfbVertS(rop, and, xor, addrl, nlwidth, x1, y1, len) +int rop; +register CfbBits and, xor; +register CfbBits *addrl; /* pointer to base of bitmap */ +register int nlwidth; /* width in longwords of bitmap */ +int x1, y1; /* initial point */ +register int len; /* length of line */ +{ +#if PSZ == 24 + int xIdx; + CfbBits and2 = 0, xor2 = 0, mask = 0, mask2; +#endif +#ifdef PIXEL_ADDR + register PixelType *bits = (PixelType *) addrl; + +#if PSZ == 24 + nlwidth <<= PWSH; + xIdx = x1 & 3; + bits = (PixelType *)(addrl + (y1 * nlwidth) + ((x1*3) >> 2)); +#else + nlwidth <<= PWSH; + bits = bits + (y1 * nlwidth) + x1; +#endif +#if PSZ == 24 + mask2 = 0; + switch(xIdx){ + case 0: + mask = 0xFF000000; + xor &= 0xFFFFFF; + and |= 0xFF000000; + break; + case 3: + mask = 0xFF; + xor &= 0xFFFFFF; + xor <<= 8; + and <<= 8; + and |= 0xFF; + break; + case 1: + mask = 0xFFFFFF; + mask2 = 0xFFFF0000; + xor2 = (xor>>8) & 0xFFFF; + xor &= 0xFF; + xor <<= 24; + and2 = (and >> 8 ) | 0xFFFF0000; + and <<= 24; + and |= 0xFFFFFF; + break; + case 2: + mask = 0x0000FFFF; + mask2 = 0xFFFFFF00; + xor2 = (xor >> 16) & 0xFF; + xor <<= 16; + xor &= 0xFFFF0000; + and2 = (and >> 16) | 0xFFFFFF00; + and <<= 16; + and |= 0xFFFF; + break; + } +#endif + + /* + * special case copy and xor to avoid a test per pixel + */ + if (rop == GXcopy) + { +#if PSZ == 24 + switch(xIdx){ + case 0: + case 3: + while (len--){ + *bits = (*bits & mask)| xor; + bits += nlwidth; + } + break; + case 1: + case 2: + while (len--){ + *bits = (*bits & mask)| xor; + bits++; + *bits = (*bits & mask2)| xor2; + bits--; + bits += nlwidth; + } + break; + } +#else + while (len--) + { + *bits = xor; + bits += nlwidth; + } +#endif + } + else if (rop == GXxor) + { +#if PSZ == 24 + switch(xIdx){ + case 0: + case 3: + while (len--){ + *bits ^= xor; + bits += nlwidth; + } + break; + case 1: + case 2: + while (len--){ + *bits ^= xor; + bits++; + *bits ^= xor2; + bits--; + bits += nlwidth; + } + break; + } +#else + while (len--) + { + *bits ^= xor; + bits += nlwidth; + } +#endif + } + else + { +#if PSZ == 24 + switch(xIdx){ + case 0: + while (len--){ + *bits = DoMaskRRop(*bits, and, xor, 0x00FFFFFF); + bits += nlwidth; + } + break; + case 3: + while (len--){ + *bits = DoMaskRRop(*bits, and, xor, 0xFFFFFF00); + bits += nlwidth; + } + break; + case 1: + while (len--){ + *bits = DoMaskRRop(*bits, and, xor, 0xFF000000); + bits++; + *bits = DoMaskRRop(*bits, and2, xor2, 0x0000FFFF); + bits--; + bits += nlwidth; + } + break; + case 2: + while (len--){ + *bits = DoMaskRRop(*bits, and, xor, 0xFFFF0000); + bits++; + *bits = DoMaskRRop(*bits, and2, xor2, 0x000000FF); + bits--; + bits += nlwidth; + } + break; + } +#else + while (len--) + { + *bits = DoRRop(*bits, and, xor); + bits += nlwidth; + } +#endif + } +#else /* !PIXEL_ADDR */ +#if PSZ == 24 + addrl = addrl + (y1 * nlwidth) + ((x1*3) >>2); + + and |= ~cfbmask[(x1 & 3)<<1]; + xor &= cfbmask[(x1 & 3)<<1]; +#else + addrl = addrl + (y1 * nlwidth) + (x1 >> PWSH); + + and |= ~cfbmask[x1 & PIM]; + xor &= cfbmask[x1 & PIM]; +#endif + + while (len--) + { + *addrl = DoRRop (*addrl, and, xor); + addrl += nlwidth; + } +#endif +} diff --git a/xorg-server-1.4/cfb/cfbigblt8.c b/xorg-server-1.4/cfb/cfbigblt8.c new file mode 100644 index 0000000..1f1ce6f --- /dev/null +++ b/xorg-server-1.4/cfb/cfbigblt8.c @@ -0,0 +1,106 @@ +/* + * +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 + */ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include "mi.h" +#include "cfb.h" +#include +#include "dixfontstr.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "cfbmskbits.h" +#include "cfb8bit.h" + +void +cfbImageGlyphBlt8 (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) + DrawablePtr pDrawable; + GCPtr pGC; + int x, y; + unsigned int nglyph; + CharInfoPtr *ppci; + pointer pglyphBase; +{ + ExtentInfoRec info; /* used by QueryGlyphExtents() */ + xRectangle backrect; + int fgPixel; + cfbPrivGC *priv; + + /* + * We can't avoid GC validations if calling mi functions. + */ + if ((pGC->ops->PolyFillRect == miPolyFillRect) || + (pGC->ops->PolyGlyphBlt == miPolyGlyphBlt)) + { + miImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); + return; + } + + QueryGlyphExtents(pGC->font, ppci, (unsigned long)nglyph, &info); + + if (info.overallWidth >= 0) + { + backrect.x = x; + backrect.width = info.overallWidth; + } + else + { + backrect.x = x + info.overallWidth; + backrect.width = -info.overallWidth; + } + backrect.y = y - FONTASCENT(pGC->font); + backrect.height = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); + + priv = cfbGetGCPrivate(pGC); + + /* this code cheats by knowing that ValidateGC isn't + * necessary for PolyFillRect + */ + + fgPixel = pGC->fgPixel; + + pGC->fgPixel = pGC->bgPixel; + priv->xor = PFILL(pGC->bgPixel); + + (*pGC->ops->PolyFillRect) (pDrawable, pGC, 1, &backrect); + + pGC->fgPixel = fgPixel; + + priv->xor = PFILL(pGC->fgPixel); + + (*pGC->ops->PolyGlyphBlt) (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); + +} diff --git a/xorg-server-1.4/cfb/cfbimage.c b/xorg-server-1.4/cfb/cfbimage.c new file mode 100644 index 0000000..396e1fc --- /dev/null +++ b/xorg-server-1.4/cfb/cfbimage.c @@ -0,0 +1,206 @@ +/*********************************************************** + +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 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. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include "windowstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "cfb.h" +#include "cfbmskbits.h" +#include "servermd.h" +#include "mi.h" + +void +cfbPutImage(pDraw, pGC, depth, x, y, w, h, leftPad, format, pImage) + DrawablePtr pDraw; + GCPtr pGC; + int depth, x, y, w, h; + int leftPad; + int format; + char *pImage; +{ + PixmapPtr pPixmap; + + if ((w == 0) || (h == 0)) + return; + + if (format != XYPixmap) + { + pPixmap = GetScratchPixmapHeader(pDraw->pScreen, w+leftPad, h, depth, + BitsPerPixel(depth), PixmapBytePad(w+leftPad, depth), + (pointer)pImage); + if (!pPixmap) + return; + + pGC->fExpose = FALSE; + if (format == ZPixmap) + (void)(*pGC->ops->CopyArea)((DrawablePtr)pPixmap, pDraw, pGC, + leftPad, 0, w, h, x, y); + else + (void)(*pGC->ops->CopyPlane)((DrawablePtr)pPixmap, pDraw, pGC, + leftPad, 0, w, h, x, y, 1); + pGC->fExpose = TRUE; + FreeScratchPixmapHeader(pPixmap); + } + else + { + CfbBits oldFg, oldBg; + XID gcv[3]; + CfbBits oldPlanemask; + unsigned long i; + long bytesPer; + + depth = pGC->depth; + oldPlanemask = pGC->planemask; + oldFg = pGC->fgPixel; + oldBg = pGC->bgPixel; + gcv[0] = ~0L; + gcv[1] = 0; + DoChangeGC(pGC, GCForeground | GCBackground, gcv, 0); + bytesPer = (long)h * BitmapBytePad(w + leftPad); + + for (i = 1 << (depth-1); i != 0; i >>= 1, pImage += bytesPer) + { + if (i & oldPlanemask) + { + gcv[0] = i; + DoChangeGC(pGC, GCPlaneMask, gcv, 0); + ValidateGC(pDraw, pGC); + (*pGC->ops->PutImage)(pDraw, pGC, 1, x, y, w, h, leftPad, + XYBitmap, pImage); + } + } + gcv[0] = oldPlanemask; + gcv[1] = oldFg; + gcv[2] = oldBg; + DoChangeGC(pGC, GCPlaneMask | GCForeground | GCBackground, gcv, 0); + ValidateGC(pDraw, pGC); + } +} + +void +cfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine) + DrawablePtr pDrawable; + int sx, sy, w, h; + unsigned int format; + unsigned long planeMask; + char *pdstLine; +{ + BoxRec box; + DDXPointRec ptSrc; + RegionRec rgnDst; + ScreenPtr pScreen; + PixmapPtr pPixmap; + + if ((w == 0) || (h == 0)) + return; + if (pDrawable->bitsPerPixel == 1) + { + mfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); + return; + } + pScreen = pDrawable->pScreen; + /* + * XFree86 DDX empties the root borderClip when the VT is + * switched away; this checks for that case + */ + if (!cfbDrawableEnabled (pDrawable)) + return; + if (format == ZPixmap) + { + pPixmap = GetScratchPixmapHeader(pScreen, w, h, + pDrawable->depth, pDrawable->bitsPerPixel, + PixmapBytePad(w,pDrawable->depth), (pointer)pdstLine); + if (!pPixmap) + return; + if ((planeMask & PMSK) != PMSK) + bzero((char *)pdstLine, pPixmap->devKind * h); + ptSrc.x = sx + pDrawable->x; + ptSrc.y = sy + pDrawable->y; + box.x1 = 0; + box.y1 = 0; + box.x2 = w; + box.y2 = h; + REGION_INIT(pScreen, &rgnDst, &box, 1); + cfbDoBitblt(pDrawable, (DrawablePtr)pPixmap, GXcopy, &rgnDst, + &ptSrc, planeMask); + REGION_UNINIT(pScreen, &rgnDst); + FreeScratchPixmapHeader(pPixmap); + } + else + { + +#if IMAGE_BYTE_ORDER == LSBFirst + + pPixmap = GetScratchPixmapHeader(pScreen, w, h, /*depth*/ 1, + /*bpp*/ 1, BitmapBytePad(w), (pointer)pdstLine); + if (!pPixmap) + return; + + ptSrc.x = sx + pDrawable->x; + ptSrc.y = sy + pDrawable->y; + box.x1 = 0; + box.y1 = 0; + box.x2 = w; + box.y2 = h; + REGION_INIT(pScreen, &rgnDst, &box, 1); + cfbCopyImagePlane (pDrawable, (DrawablePtr)pPixmap, GXcopy, &rgnDst, + &ptSrc, planeMask); + REGION_UNINIT(pScreen, &rgnDst); + FreeScratchPixmapHeader(pPixmap); +#else + miGetImage (pDrawable, sx, sy, w, h, format, planeMask, pdstLine); +#endif + } +} diff --git a/xorg-server-1.4/cfb/cfbline.c b/xorg-server-1.4/cfb/cfbline.c new file mode 100644 index 0000000..84c089a --- /dev/null +++ b/xorg-server-1.4/cfb/cfbline.c @@ -0,0 +1,756 @@ +/*********************************************************** + +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 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. + +******************************************************************/ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include + +#include "gcstruct.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "scrnintstr.h" +#include "mistruct.h" + +#include "cfb.h" +#include "cfbmskbits.h" +#include "miline.h" + +/* single-pixel lines on a color frame buffer + + NON-SLOPED LINES + horizontal lines are always drawn left to right; we have to +move the endpoints right by one after they're swapped. + horizontal lines will be confined to a single band of a +region. the code finds that band (giving up if the lower +bound of the band is above the line we're drawing); then it +finds the first box in that band that contains part of the +line. we clip the line to subsequent boxes in that band. + vertical lines are always drawn top to bottom (y-increasing.) +this requires adding one to the y-coordinate of each endpoint +after swapping. + + SLOPED LINES + when clipping a sloped line, we bring the second point inside +the clipping box, rather than one beyond it, and then add 1 to +the length of the line before drawing it. this lets us use +the same box for finding the outcodes for both endpoints. since +the equation for clipping the second endpoint to an edge gives us +1 beyond the edge, we then have to move the point towards the +first point by one step on the major axis. + eventually, there will be a diagram here to explain what's going +on. the method uses Cohen-Sutherland outcodes to determine +outsideness, and a method similar to Pike's layers for doing the +actual clipping. + +*/ + +void +#ifdef POLYSEGMENT +cfbSegmentSS (pDrawable, pGC, nseg, pSeg) + DrawablePtr pDrawable; + GCPtr pGC; + int nseg; + register xSegment *pSeg; +#else +cfbLineSS (pDrawable, pGC, mode, npt, pptInit) + DrawablePtr pDrawable; + GCPtr pGC; + int mode; /* Origin or Previous */ + int npt; /* number of points */ + DDXPointPtr pptInit; +#endif +{ + int nboxInit; + register int nbox; + BoxPtr pboxInit; + register BoxPtr pbox; +#ifndef POLYSEGMENT + register DDXPointPtr ppt; /* pointer to list of translated points */ +#endif + + unsigned int oc1; /* outcode of point 1 */ + unsigned int oc2; /* outcode of point 2 */ + + CfbBits *addrl; /* address of destination pixmap */ + int nlwidth; /* width in longwords of destination pixmap */ + int xorg, yorg; /* origin of window */ + + int adx; /* abs values of dx and dy */ + int ady; + int signdx; /* sign of dx and dy */ + int signdy; + int e, e1, e2; /* bresenham error and increments */ + int len; /* length of segment */ + int axis; /* major axis */ + int octant; + unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); + + /* a bunch of temporaries */ + int tmp; + register int y1, y2; + register int x1, x2; + RegionPtr cclip; + cfbPrivGCPtr devPriv; + CfbBits xor, and; + int alu; + + devPriv = cfbGetGCPrivate(pGC); + cclip = pGC->pCompositeClip; + pboxInit = REGION_RECTS(cclip); + nboxInit = REGION_NUM_RECTS(cclip); + + cfbGetLongWidthAndPointer (pDrawable, nlwidth, addrl) + + alu = devPriv->rop; + xor = devPriv->xor; + and = devPriv->and; + xorg = pDrawable->x; + yorg = pDrawable->y; +#ifdef POLYSEGMENT + while (nseg--) +#else + ppt = pptInit; + x2 = ppt->x + xorg; + y2 = ppt->y + yorg; + while(--npt) +#endif + { + nbox = nboxInit; + pbox = pboxInit; + +#ifdef POLYSEGMENT + x1 = pSeg->x1 + xorg; + y1 = pSeg->y1 + yorg; + x2 = pSeg->x2 + xorg; + y2 = pSeg->y2 + yorg; + pSeg++; +#else + x1 = x2; + y1 = y2; + ++ppt; + if (mode == CoordModePrevious) + { + xorg = x1; + yorg = y1; + } + x2 = ppt->x + xorg; + y2 = ppt->y + yorg; +#endif + + if (x1 == x2) /* vertical line */ + { + /* make the line go top to bottom of screen, keeping + endpoint semantics + */ + if (y1 > y2) + { + register int tmp; + + tmp = y2; + y2 = y1 + 1; + y1 = tmp + 1; +#ifdef POLYSEGMENT + if (pGC->capStyle != CapNotLast) + y1--; +#endif + } +#ifdef POLYSEGMENT + else if (pGC->capStyle != CapNotLast) + y2++; +#endif + /* get to first band that might contain part of line */ + while ((nbox) && (pbox->y2 <= y1)) + { + pbox++; + nbox--; + } + + if (nbox) + { + /* stop when lower edge of box is beyond end of line */ + while((nbox) && (y2 >= pbox->y1)) + { + if ((x1 >= pbox->x1) && (x1 < pbox->x2)) + { + int y1t, y2t; + /* this box has part of the line in it */ + y1t = max(y1, pbox->y1); + y2t = min(y2, pbox->y2); + if (y1t != y2t) + { + cfbVertS (alu, and, xor, + addrl, nlwidth, + x1, y1t, y2t-y1t); + } + } + nbox--; + pbox++; + } + } +#ifndef POLYSEGMENT + y2 = ppt->y + yorg; +#endif + } + else if (y1 == y2) /* horizontal line */ + { + /* force line from left to right, keeping + endpoint semantics + */ + if (x1 > x2) + { + register int tmp; + + tmp = x2; + x2 = x1 + 1; + x1 = tmp + 1; +#ifdef POLYSEGMENT + if (pGC->capStyle != CapNotLast) + x1--; +#endif + } +#ifdef POLYSEGMENT + else if (pGC->capStyle != CapNotLast) + x2++; +#endif + + /* find the correct band */ + while( (nbox) && (pbox->y2 <= y1)) + { + pbox++; + nbox--; + } + + /* try to draw the line, if we haven't gone beyond it */ + if ((nbox) && (pbox->y1 <= y1)) + { + /* when we leave this band, we're done */ + tmp = pbox->y1; + while((nbox) && (pbox->y1 == tmp)) + { + int x1t, x2t; + + if (pbox->x2 <= x1) + { + /* skip boxes until one might contain start point */ + nbox--; + pbox++; + continue; + } + + /* stop if left of box is beyond right of line */ + if (pbox->x1 >= x2) + { + nbox = 0; + break; + } + + x1t = max(x1, pbox->x1); + x2t = min(x2, pbox->x2); + if (x1t != x2t) + { + cfbHorzS (alu, and, xor, + addrl, nlwidth, + x1t, y1, x2t-x1t); + } + nbox--; + pbox++; + } + } +#ifndef POLYSEGMENT + x2 = ppt->x + xorg; +#endif + } + else /* sloped line */ + { + CalcLineDeltas(x1, y1, x2, y2, adx, ady, signdx, signdy, + 1, 1, octant); + + if (adx > ady) + { + axis = X_AXIS; + e1 = ady << 1; + e2 = e1 - (adx << 1); + e = e1 - adx; + } + else + { + axis = Y_AXIS; + e1 = adx << 1; + e2 = e1 - (ady << 1); + e = e1 - ady; + SetYMajorOctant(octant); + } + + FIXUP_ERROR(e, octant, bias); + + /* we have bresenham parameters and two points. + all we have to do now is clip and draw. + */ + + while(nbox--) + { + oc1 = 0; + oc2 = 0; + OUTCODES(oc1, x1, y1, pbox); + OUTCODES(oc2, x2, y2, pbox); + if ((oc1 | oc2) == 0) + { + if (axis == X_AXIS) + len = adx; + else + len = ady; +#ifdef POLYSEGMENT + if (pGC->capStyle != CapNotLast) + len++; +#endif + cfbBresS (alu, and, xor, + addrl, nlwidth, + signdx, signdy, axis, x1, y1, + e, e1, e2, len); + break; + } + else if (oc1 & oc2) + { + pbox++; + } + else + { + int new_x1 = x1, new_y1 = y1, new_x2 = x2, new_y2 = y2; + int clip1 = 0, clip2 = 0; + int clipdx, clipdy; + int err; + + if (miZeroClipLine(pbox->x1, pbox->y1, pbox->x2-1, + pbox->y2-1, + &new_x1, &new_y1, &new_x2, &new_y2, + adx, ady, &clip1, &clip2, + octant, bias, oc1, oc2) == -1) + { + pbox++; + continue; + } + + if (axis == X_AXIS) + len = abs(new_x2 - new_x1); + else + len = abs(new_y2 - new_y1); +#ifdef POLYSEGMENT + if (clip2 != 0 || pGC->capStyle != CapNotLast) + len++; +#else + len += (clip2 != 0); +#endif + if (len) + { + /* unwind bresenham error term to first point */ + if (clip1) + { + clipdx = abs(new_x1 - x1); + clipdy = abs(new_y1 - y1); + if (axis == X_AXIS) + err = e+((clipdy*e2) + ((clipdx-clipdy)*e1)); + else + err = e+((clipdx*e2) + ((clipdy-clipdx)*e1)); + } + else + err = e; + cfbBresS(alu, and, xor, + addrl, nlwidth, + signdx, signdy, axis, new_x1, new_y1, + err, e1, e2, len); + } + pbox++; + } + } /* while (nbox--) */ + } /* sloped line */ + } /* while (nline--) */ + +#ifndef POLYSEGMENT + /* paint the last point if the end style isn't CapNotLast. + (Assume that a projecting, butt, or round cap that is one + pixel wide is the same as the single pixel of the endpoint.) + */ + + if ((pGC->capStyle != CapNotLast) && + ((ppt->x + xorg != pptInit->x + pDrawable->x) || + (ppt->y + yorg != pptInit->y + pDrawable->y) || + (ppt == pptInit + 1))) + { + nbox = nboxInit; + pbox = pboxInit; + while (nbox--) + { + if ((x2 >= pbox->x1) && + (y2 >= pbox->y1) && + (x2 < pbox->x2) && + (y2 < pbox->y2)) + { + CfbBits mask; + CfbBits scrbits; + +#if PSZ == 24 + mask = cfbmask[(x2 & 3)<<1]; + addrl += (y2 * nlwidth) + ((x2*3) >> 2); +#else + mask = cfbmask[x2 & PIM]; + addrl += (y2 * nlwidth) + (x2 >> PWSH); +#endif + scrbits = *addrl; + *addrl = (scrbits & ~mask) | + (DoRRop (scrbits, and, xor) & mask); + break; + } + else + pbox++; + } + } +#endif +} + +/* + * Draw dashed 1-pixel lines. + */ + +void +#ifdef POLYSEGMENT +cfbSegmentSD (pDrawable, pGC, nseg, pSeg) + DrawablePtr pDrawable; + register GCPtr pGC; + int nseg; + register xSegment *pSeg; +#else +cfbLineSD( pDrawable, pGC, mode, npt, pptInit) + DrawablePtr pDrawable; + register GCPtr pGC; + int mode; /* Origin or Previous */ + int npt; /* number of points */ + DDXPointPtr pptInit; +#endif +{ + int nboxInit; + register int nbox; + BoxPtr pboxInit; + register BoxPtr pbox; +#ifndef POLYSEGMENT + register DDXPointPtr ppt; /* pointer to list of translated points */ +#endif + + register unsigned int oc1; /* outcode of point 1 */ + register unsigned int oc2; /* outcode of point 2 */ + + CfbBits *addrl; /* address of destination pixmap */ + int nlwidth; /* width in longwords of destination pixmap */ + int xorg, yorg; /* origin of window */ + + int adx; /* abs values of dx and dy */ + int ady; + int signdx; /* sign of dx and dy */ + int signdy; + int e, e1, e2; /* bresenham error and increments */ + int len; /* length of segment */ + int axis; /* major axis */ + int octant; + unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); + int x1, x2, y1, y2; + RegionPtr cclip; + cfbRRopRec rrops[2]; + unsigned char *pDash; + int dashOffset; + int numInDashList; + int dashIndex; + int isDoubleDash; + int dashIndexTmp, dashOffsetTmp; + int unclippedlen; + cfbPrivGCPtr devPriv; + + devPriv = cfbGetGCPrivate(pGC); + cclip = pGC->pCompositeClip; + rrops[0].rop = devPriv->rop; + rrops[0].and = devPriv->and; + rrops[0].xor = devPriv->xor; + if (pGC->alu == GXcopy) + { + rrops[1].rop = GXcopy; + rrops[1].and = 0; + rrops[1].xor = PFILL (pGC->bgPixel); + } + else + { + rrops[1].rop = cfbReduceRasterOp (pGC->alu, + pGC->bgPixel, pGC->planemask, + &rrops[1].and, &rrops[1].xor); + } + pboxInit = REGION_RECTS(cclip); + nboxInit = REGION_NUM_RECTS(cclip); + + cfbGetLongWidthAndPointer (pDrawable, nlwidth, addrl) + + /* compute initial dash values */ + + pDash = (unsigned char *) pGC->dash; + numInDashList = pGC->numInDashList; + isDoubleDash = (pGC->lineStyle == LineDoubleDash); + dashIndex = 0; + dashOffset = 0; + miStepDash ((int)pGC->dashOffset, &dashIndex, pDash, + numInDashList, &dashOffset); + + xorg = pDrawable->x; + yorg = pDrawable->y; +#ifdef POLYSEGMENT + while (nseg--) +#else + ppt = pptInit; + x2 = ppt->x + xorg; + y2 = ppt->y + yorg; + while(--npt) +#endif + { + nbox = nboxInit; + pbox = pboxInit; + +#ifdef POLYSEGMENT + x1 = pSeg->x1 + xorg; + y1 = pSeg->y1 + yorg; + x2 = pSeg->x2 + xorg; + y2 = pSeg->y2 + yorg; + pSeg++; +#else + x1 = x2; + y1 = y2; + ++ppt; + if (mode == CoordModePrevious) + { + xorg = x1; + yorg = y1; + } + x2 = ppt->x + xorg; + y2 = ppt->y + yorg; +#endif + + CalcLineDeltas(x1, y1, x2, y2, adx, ady, signdx, signdy, 1, 1, octant); + + if (adx > ady) + { + axis = X_AXIS; + e1 = ady << 1; + e2 = e1 - (adx << 1); + e = e1 - adx; + unclippedlen = adx; + } + else + { + axis = Y_AXIS; + e1 = adx << 1; + e2 = e1 - (ady << 1); + e = e1 - ady; + unclippedlen = ady; + SetYMajorOctant(octant); + } + + FIXUP_ERROR(e, octant, bias); + + /* we have bresenham parameters and two points. + all we have to do now is clip and draw. + */ + + while(nbox--) + { + oc1 = 0; + oc2 = 0; + OUTCODES(oc1, x1, y1, pbox); + OUTCODES(oc2, x2, y2, pbox); + if ((oc1 | oc2) == 0) + { +#ifdef POLYSEGMENT + if (pGC->capStyle != CapNotLast) + unclippedlen++; + dashIndexTmp = dashIndex; + dashOffsetTmp = dashOffset; + cfbBresD (rrops, + &dashIndexTmp, pDash, numInDashList, + &dashOffsetTmp, isDoubleDash, + addrl, nlwidth, + signdx, signdy, axis, x1, y1, + e, e1, e2, unclippedlen); + break; +#else + cfbBresD (rrops, + &dashIndex, pDash, numInDashList, + &dashOffset, isDoubleDash, + addrl, nlwidth, + signdx, signdy, axis, x1, y1, + e, e1, e2, unclippedlen); + goto dontStep; +#endif + } + else if (oc1 & oc2) + { + pbox++; + } + else /* have to clip */ + { + int new_x1 = x1, new_y1 = y1, new_x2 = x2, new_y2 = y2; + int clip1 = 0, clip2 = 0; + int clipdx, clipdy; + int err; + + if (miZeroClipLine(pbox->x1, pbox->y1, pbox->x2-1, + pbox->y2-1, + &new_x1, &new_y1, &new_x2, &new_y2, + adx, ady, &clip1, &clip2, + octant, bias, oc1, oc2) == -1) + { + pbox++; + continue; + } + + dashIndexTmp = dashIndex; + dashOffsetTmp = dashOffset; + + if (clip1) + { + int dlen; + + if (axis == X_AXIS) + dlen = abs(new_x1 - x1); + else + dlen = abs(new_y1 - y1); + miStepDash (dlen, &dashIndexTmp, pDash, + numInDashList, &dashOffsetTmp); + } + + if (axis == X_AXIS) + len = abs(new_x2 - new_x1); + else + len = abs(new_y2 - new_y1); +#ifdef POLYSEGMENT + if (clip2 != 0 || pGC->capStyle != CapNotLast) + len++; +#else + len += (clip2 != 0); +#endif + if (len) + { + /* unwind bresenham error term to first point */ + if (clip1) + { + clipdx = abs(new_x1 - x1); + clipdy = abs(new_y1 - y1); + if (axis == X_AXIS) + err = e+((clipdy*e2) + ((clipdx-clipdy)*e1)); + else + err = e+((clipdx*e2) + ((clipdy-clipdx)*e1)); + } + else + err = e; + cfbBresD (rrops, + &dashIndexTmp, pDash, numInDashList, + &dashOffsetTmp, isDoubleDash, + addrl, nlwidth, + signdx, signdy, axis, new_x1, new_y1, + err, e1, e2, len); + } + pbox++; + } + } /* while (nbox--) */ +#ifndef POLYSEGMENT + /* + * walk the dash list around to the next line + */ + miStepDash (unclippedlen, &dashIndex, pDash, + numInDashList, &dashOffset); +dontStep: ; +#endif + } /* while (nline--) */ + +#ifndef POLYSEGMENT + /* paint the last point if the end style isn't CapNotLast. + (Assume that a projecting, butt, or round cap that is one + pixel wide is the same as the single pixel of the endpoint.) + */ + + if ((pGC->capStyle != CapNotLast) && + ((dashIndex & 1) == 0 || isDoubleDash) && + ((ppt->x + xorg != pptInit->x + pDrawable->x) || + (ppt->y + yorg != pptInit->y + pDrawable->y) || + (ppt == pptInit + 1))) + { + nbox = nboxInit; + pbox = pboxInit; + while (nbox--) + { + if ((x2 >= pbox->x1) && + (y2 >= pbox->y1) && + (x2 < pbox->x2) && + (y2 < pbox->y2)) + { + CfbBits mask; + int pix; + + pix = 0; + if (dashIndex & 1) + pix = 1; +#if PSZ == 24 + mask = cfbmask[(x2 & 3)<<1]; + addrl += (y2 * nlwidth) + ((x2 *3)>> 2); +#else + mask = cfbmask[x2 & PIM]; + addrl += (y2 * nlwidth) + (x2 >> PWSH); +#endif + *addrl = DoMaskRRop (*addrl, rrops[pix].and, rrops[pix].xor, mask); + break; + } + else + pbox++; + } + } +#endif +} diff --git a/xorg-server-1.4/cfb/cfbmap.h b/xorg-server-1.4/cfb/cfbmap.h new file mode 100644 index 0000000..1d6a3f8 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbmap.h @@ -0,0 +1,342 @@ +/* + * +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. + * + * Author: Keith Packard, MIT X Consortium + */ + + +/* + * Map names around so that multiple depths can be supported simultaneously + */ + +#if 0 +#undef QuartetBitsTable +#undef QuartetPixelMaskTable +#undef cfb8ClippedLineCopy +#undef cfb8ClippedLineGeneral +#undef cfb8ClippedLineXor +#undef cfb8LineSS1Rect +#undef cfb8LineSS1RectCopy +#undef cfb8LineSS1RectGeneral +#undef cfb8LineSS1RectPreviousCopy +#undef cfb8LineSS1RectXor +#undef cfb8SegmentSS1Rect +#undef cfb8SegmentSS1RectCopy +#undef cfb8SegmentSS1RectGeneral +#undef cfb8SegmentSS1RectShiftCopy +#undef cfb8SegmentSS1RectXor +#undef cfbAllocatePrivates +#undef cfbBSFuncRec +#undef cfbBitBlt +#undef cfbBresD +#undef cfbBresS +#undef cfbChangeWindowAttributes +#undef cfbCloseScreen +#undef cfbCopyArea +#undef cfbCopyImagePlane +#undef cfbCopyPixmap +#undef cfbCopyPlane +#undef cfbCopyPlaneReduce +#undef cfbCopyRotatePixmap +#undef cfbCopyWindow +#undef cfbCreateGC +#undef cfbCreatePixmap +#undef cfbCreateScreenResources +#undef cfbCreateWindow +#undef cfbDestroyPixmap +#undef cfbDestroyWindow +#undef cfbDoBitblt +#undef cfbDoBitbltCopy +#undef cfbDoBitbltGeneral +#undef cfbDoBitbltOr +#undef cfbDoBitbltXor +#undef cfbFillBoxSolid +#undef cfbFillBoxTile32 +#undef cfbFillBoxTile32sCopy +#undef cfbFillBoxTile32sGeneral +#undef cfbFillBoxTileOdd +#undef cfbFillBoxTileOddCopy +#undef cfbFillBoxTileOddGeneral +#undef cfbFillPoly1RectCopy +#undef cfbFillPoly1RectGeneral +#undef cfbFillRectSolidCopy +#undef cfbFillRectSolidGeneral +#undef cfbFillRectSolidXor +#undef cfbFillRectTile32Copy +#undef cfbFillRectTile32General +#undef cfbFillRectTileOdd +#undef cfbFillSpanTile32sCopy +#undef cfbFillSpanTile32sGeneral +#undef cfbFillSpanTileOddCopy +#undef cfbFillSpanTileOddGeneral +#undef cfbFinishScreenInit +#undef cfbGCFuncs +#undef cfbGCPrivateIndex +#undef cfbGetImage +#undef cfbGetScreenPixmap +#undef cfbGetSpans +#undef cfbHorzS +#undef cfbImageGlyphBlt8 +#undef cfbInitializeColormap +#undef cfbInstallColormap +#undef cfbLineSD +#undef cfbLineSS +#undef cfbListInstalledColormaps +#undef cfbMapWindow +#undef cfbMatchCommon +#undef cfbNonTEOps +#undef cfbNonTEOps1Rect +#undef cfbPadPixmap +#undef cfbPaintWindow +#undef cfbPolyFillArcSolidCopy +#undef cfbPolyFillArcSolidGeneral +#undef cfbPolyFillRect +#undef cfbPolyGlyphBlt8 +#undef cfbPolyGlyphRop8 +#undef cfbPolyPoint +#undef cfbPositionWindow +#undef cfbPutImage +#undef cfbReduceRasterOp +#undef cfbResolveColor +#undef cfbRestoreAreas +#undef cfbSaveAreas +#undef cfbScreenInit +#undef cfbScreenPrivateIndex +#undef cfbSegmentSD +#undef cfbSegmentSS +#undef cfbSetScanline +#undef cfbSetScreenPixmap +#undef cfbSetSpans +#undef cfbSetupScreen +#undef cfbSolidSpansCopy +#undef cfbSolidSpansGeneral +#undef cfbSolidSpansXor +#undef cfbStippleStack +#undef cfbStippleStackTE +#undef cfbTEGlyphBlt +#undef cfbTEOps +#undef cfbTEOps1Rect +#undef cfbTile32FSCopy +#undef cfbTile32FSGeneral +#undef cfbUninstallColormap +#undef cfbUnmapWindow +#undef cfbUnnaturalStippleFS +#undef cfbUnnaturalTileFS +#undef cfbValidateGC +#undef cfbVertS +#undef cfbWindowPrivateIndex +#undef cfbXRotatePixmap +#undef cfbYRotatePixmap +#undef cfbZeroPolyArcSS8Copy +#undef cfbZeroPolyArcSS8General +#undef cfbZeroPolyArcSS8Xor +#undef cfbendpartial +#undef cfbendtab +#undef cfbmask +#undef cfbrmask +#undef cfbstartpartial +#undef cfbstarttab +#endif + +/* a losing vendor cpp dumps core if we define CFBNAME in terms of CATNAME */ + +#if PSZ != 8 + +#if PSZ == 32 +#if !defined(UNIXCPP) || defined(ANSICPP) +#define CFBNAME(subname) cfb32##subname +#else +#define CFBNAME(subname) cfb32/**/subname +#endif +#endif + +#if PSZ == 24 +#if !defined(UNIXCPP) || defined(ANSICPP) +#define CFBNAME(subname) cfb24##subname +#else +#define CFBNAME(subname) cfb24/**/subname +#endif +#endif + +#if PSZ == 16 +#if !defined(UNIXCPP) || defined(ANSICPP) +#define CFBNAME(subname) cfb16##subname +#else +#define CFBNAME(subname) cfb16/**/subname +#endif +#endif + +#if PSZ == 4 +#if !defined(UNIXCPP) || defined(ANSICPP) +#define CFBNAME(subname) cfb4##subname +#else +#define CFBNAME(subname) cfb4/**/subname +#endif +#endif + +#ifndef CFBNAME +cfb can not hack PSZ yet +#endif + +#undef CATNAME + +#if !defined(UNIXCPP) || defined(ANSICPP) +#define CATNAME(prefix,subname) prefix##subname +#else +#define CATNAME(prefix,subname) prefix/**/subname +#endif + +#define QuartetBitsTable CFBNAME(QuartetBitsTable) +#define QuartetPixelMaskTable CFBNAME(QuartetPixelMaskTable) +#define cfb8ClippedLineCopy CFBNAME(ClippedLineCopy) +#define cfb8ClippedLineGeneral CFBNAME(ClippedLineGeneral ) +#define cfb8ClippedLineXor CFBNAME(ClippedLineXor) +#define cfb8LineSS1Rect CFBNAME(LineSS1Rect) +#define cfb8LineSS1RectCopy CFBNAME(LineSS1RectCopy) +#define cfb8LineSS1RectGeneral CFBNAME(LineSS1RectGeneral ) +#define cfb8LineSS1RectPreviousCopy CFBNAME(LineSS1RectPreviousCopy) +#define cfb8LineSS1RectXor CFBNAME(LineSS1RectXor) +#define cfb8SegmentSS1Rect CFBNAME(SegmentSS1Rect) +#define cfb8SegmentSS1RectCopy CFBNAME(SegmentSS1RectCopy) +#define cfb8SegmentSS1RectGeneral CFBNAME(SegmentSS1RectGeneral ) +#define cfb8SegmentSS1RectShiftCopy CFBNAME(SegmentSS1RectShiftCopy) +#define cfb8SegmentSS1RectXor CFBNAME(SegmentSS1RectXor) +#define cfbAllocatePrivates CFBNAME(AllocatePrivates) +#define cfbBSFuncRec CFBNAME(BSFuncRec) +#define cfbBitBlt CFBNAME(BitBlt) +#define cfbBresD CFBNAME(BresD) +#define cfbBresS CFBNAME(BresS) +#define cfbChangeWindowAttributes CFBNAME(ChangeWindowAttributes) +#define cfbClearVisualTypes CFBNAME(cfbClearVisualTypes) +#define cfbCloseScreen CFBNAME(CloseScreen) +#define cfbCreateDefColormap CFBNAME (cfbCreateDefColormap) +#define cfbCopyArea CFBNAME(CopyArea) +#define cfbCopyImagePlane CFBNAME(CopyImagePlane) +#define cfbCopyPixmap CFBNAME(CopyPixmap) +#define cfbCopyPlane CFBNAME(CopyPlane) +#define cfbCopyPlaneReduce CFBNAME(CopyPlaneReduce) +#define cfbCopyRotatePixmap CFBNAME(CopyRotatePixmap) +#define cfbCopyWindow CFBNAME(CopyWindow) +#define cfbCreateGC CFBNAME(CreateGC) +#define cfbCreatePixmap CFBNAME(CreatePixmap) +#define cfbCreateScreenResources CFBNAME(CreateScreenResources) +#define cfbCreateWindow CFBNAME(CreateWindow) +#define cfbDestroyPixmap CFBNAME(DestroyPixmap) +#define cfbDestroyWindow CFBNAME(DestroyWindow) +#define cfbDoBitblt CFBNAME(DoBitblt) +#define cfbDoBitbltCopy CFBNAME(DoBitbltCopy) +#define cfbDoBitbltGeneral CFBNAME(DoBitbltGeneral) +#define cfbDoBitbltOr CFBNAME(DoBitbltOr) +#define cfbDoBitbltXor CFBNAME(DoBitbltXor) +#define cfbExpandDirectColors CFBNAME(cfbExpandDirectColors) +#define cfbFillBoxSolid CFBNAME(FillBoxSolid) +#define cfbFillBoxTile32 CFBNAME(FillBoxTile32) +#define cfbFillBoxTile32sCopy CFBNAME(FillBoxTile32sCopy) +#define cfbFillBoxTile32sGeneral CFBNAME(FillBoxTile32sGeneral) +#define cfbFillBoxTileOdd CFBNAME(FillBoxTileOdd) +#define cfbFillBoxTileOddCopy CFBNAME(FillBoxTileOddCopy) +#define cfbFillBoxTileOddGeneral CFBNAME(FillBoxTileOddGeneral) +#define cfbFillPoly1RectCopy CFBNAME(FillPoly1RectCopy) +#define cfbFillPoly1RectGeneral CFBNAME(FillPoly1RectGeneral) +#define cfbFillRectSolidCopy CFBNAME(FillRectSolidCopy) +#define cfbFillRectSolidGeneral CFBNAME(FillRectSolidGeneral) +#define cfbFillRectSolidXor CFBNAME(FillRectSolidXor) +#define cfbFillRectTile32Copy CFBNAME(FillRectTile32Copy) +#define cfbFillRectTile32General CFBNAME(FillRectTile32General) +#define cfbFillRectTileOdd CFBNAME(FillRectTileOdd) +#define cfbFillSpanTile32sCopy CFBNAME(FillSpanTile32sCopy) +#define cfbFillSpanTile32sGeneral CFBNAME(FillSpanTile32sGeneral) +#define cfbFillSpanTileOddCopy CFBNAME(FillSpanTileOddCopy) +#define cfbFillSpanTileOddGeneral CFBNAME(FillSpanTileOddGeneral) +#define cfbFinishScreenInit CFBNAME(FinishScreenInit) +#define cfbGCFuncs CFBNAME(GCFuncs) +#define cfbGCPrivateIndex CFBNAME(GCPrivateIndex) +#define cfbGetImage CFBNAME(GetImage) +#define cfbGetScreenPixmap CFBNAME(GetScreenPixmap) +#define cfbGetSpans CFBNAME(GetSpans) +#define cfbHorzS CFBNAME(HorzS) +#define cfbImageGlyphBlt8 CFBNAME(ImageGlyphBlt8) +#define cfbInitializeColormap CFBNAME(InitializeColormap) +#define cfbInitVisuals CFBNAME(cfbInitVisuals) +#define cfbInstallColormap CFBNAME(InstallColormap) +#define cfbLineSD CFBNAME(LineSD) +#define cfbLineSS CFBNAME(LineSS) +#define cfbListInstalledColormaps CFBNAME(ListInstalledColormaps) +#define cfbMapWindow CFBNAME(MapWindow) +#define cfbMatchCommon CFBNAME(MatchCommon) +#define cfbNonTEOps CFBNAME(NonTEOps) +#define cfbNonTEOps1Rect CFBNAME(NonTEOps1Rect) +#define cfbPadPixmap CFBNAME(PadPixmap) +#define cfbPaintWindow CFBNAME(PaintWindow) +#define cfbPolyFillArcSolidCopy CFBNAME(PolyFillArcSolidCopy) +#define cfbPolyFillArcSolidGeneral CFBNAME(PolyFillArcSolidGeneral) +#define cfbPolyFillRect CFBNAME(PolyFillRect) +#define cfbPolyGlyphBlt8 CFBNAME(PolyGlyphBlt8) +#define cfbPolyGlyphRop8 CFBNAME(PolyGlyphRop8) +#define cfbPolyPoint CFBNAME(PolyPoint) +#define cfbPositionWindow CFBNAME(PositionWindow) +#define cfbPutImage CFBNAME(PutImage) +#define cfbReduceRasterOp CFBNAME(ReduceRasterOp) +#define cfbResolveColor CFBNAME(ResolveColor) +#define cfbRestoreAreas CFBNAME(RestoreAreas) +#define cfbSaveAreas CFBNAME(SaveAreas) +#define cfbScreenInit CFBNAME(ScreenInit) +#define cfbScreenPrivateIndex CFBNAME(ScreenPrivateIndex) +#define cfbSegmentSD CFBNAME(SegmentSD) +#define cfbSegmentSS CFBNAME(SegmentSS) +#define cfbSetScanline CFBNAME(SetScanline) +#define cfbSetScreenPixmap CFBNAME(SetScreenPixmap) +#define cfbSetSpans CFBNAME(SetSpans) +#define cfbSetVisualTypes CFBNAME(cfbSetVisualTypes) +#define cfbSetupScreen CFBNAME(SetupScreen) +#define cfbSolidSpansCopy CFBNAME(SolidSpansCopy) +#define cfbSolidSpansGeneral CFBNAME(SolidSpansGeneral) +#define cfbSolidSpansXor CFBNAME(SolidSpansXor) +#define cfbStippleStack CFBNAME(StippleStack) +#define cfbStippleStackTE CFBNAME(StippleStackTE) +#define cfbTEGlyphBlt CFBNAME(TEGlyphBlt) +#define cfbTEOps CFBNAME(TEOps) +#define cfbTEOps1Rect CFBNAME(TEOps1Rect) +#define cfbTile32FSCopy CFBNAME(Tile32FSCopy) +#define cfbTile32FSGeneral CFBNAME(Tile32FSGeneral) +#define cfbUninstallColormap CFBNAME(UninstallColormap) +#define cfbUnmapWindow CFBNAME(UnmapWindow) +#define cfbUnnaturalStippleFS CFBNAME(UnnaturalStippleFS) +#define cfbUnnaturalTileFS CFBNAME(UnnaturalTileFS) +#define cfbValidateGC CFBNAME(ValidateGC) +#define cfbVertS CFBNAME(VertS) +#define cfbWindowPrivateIndex CFBNAME(WindowPrivateIndex) +#define cfbXRotatePixmap CFBNAME(XRotatePixmap) +#define cfbYRotatePixmap CFBNAME(YRotatePixmap) +#define cfbZeroPolyArcSS8Copy CFBNAME(ZeroPolyArcSSCopy) +#define cfbZeroPolyArcSS8General CFBNAME(ZeroPolyArcSSGeneral) +#define cfbZeroPolyArcSS8Xor CFBNAME(ZeroPolyArcSSXor) +#define cfbendpartial CFBNAME(endpartial) +#define cfbendtab CFBNAME(endtab) +#define cfbmask CFBNAME(mask) +#define cfbrmask CFBNAME(rmask) +#define cfbstartpartial CFBNAME(startpartial) +#define cfbstarttab CFBNAME(starttab) + +#endif /* PSZ != 8 */ diff --git a/xorg-server-1.4/cfb/cfbmskbits.c b/xorg-server-1.4/cfb/cfbmskbits.c new file mode 100644 index 0000000..915ea35 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbmskbits.c @@ -0,0 +1,1400 @@ +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + 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 no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or The Open Group +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and The Open Group make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN 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 SUN 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. + +********************************************************/ + + +/* + * ========================================================================== + * Converted to Color Frame Buffer by smarks@sun, April-May 1987. The "bit + * numbering" in the doc below really means "byte numbering" now. + * ========================================================================== + */ + +/* + these tables are used by several macros in the cfb code. + + the vax numbers everything left to right, so bit indices on the +screen match bit indices in longwords. the pc-rt and Sun number +bits on the screen the way they would be written on paper, +(i.e. msb to the left), and so a bit index n on the screen is +bit index 32-n in a longword + + see also cfbmskbits.h +*/ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include "cfb.h" +#include "cfbmskbits.h" + +#define _cfbBits(a) (PixelGroup)(a) + +#if (BITMAP_BIT_ORDER == MSBFirst) +#define cfbBits(v) _cfbBits(v) +#else /* BITMAP_BIT_ORDER == LSBFirst */ +#define cfbFlip2(a) ((((a) & 0x1) << 1) | (((a) & 0x2) >> 1)) +#define cfbFlip4(a) ((cfbFlip2(a) << 2) | cfbFlip2(a >> 2)) +#define cfbFlip8(a) ((cfbFlip4(a) << 4) | cfbFlip4(a >> 4)) +#define cfbFlip16(a) ((cfbFlip8(a) << 8) | cfbFlip8(a >> 8)) +#define cfbFlip32(a) ((cfbFlip16(a) << 16) | cfbFlip16(a >> 16)) +#if PGSZ == 32 +#define cfbBits(a) cfbFlip32(_cfbBits(a)) +#else /* PGSZ == 64 */ +#define cfbFlip64(a) ((cfbFlip32(a) << 32) | cfbFlip32(a >> 32)) +#define cfbBits(a) cfbFlip64(_cfbBits(a)) +#endif /* PGSZ */ +#endif /* BITMAP_BIT_ORDER */ + +/* NOTE: +the first element in starttab could be 0xffffffff. making it 0 +lets us deal with a full first word in the middle loop, rather +than having to do the multiple reads and masks that we'd +have to do if we thought it was partial. +*/ +#if PSZ == 4 +#if PGSZ == 32 +PixelGroup cfbstarttab[] = + { + cfbBits(0x00000000), + cfbBits(0x0FFFFFFF), + cfbBits(0x00FFFFFF), + cfbBits(0x000FFFFF), + cfbBits(0x0000FFFF), + cfbBits(0x00000FFF), + cfbBits(0x000000FF), + cfbBits(0x0000000F) + }; +PixelGroup cfbendtab[] = + { + cfbBits(0x00000000), + cfbBits(0xF0000000), + cfbBits(0xFF000000), + cfbBits(0xFFF00000), + cfbBits(0xFFFF0000), + cfbBits(0xFFFFF000), + cfbBits(0xFFFFFF00), + cfbBits(0xFFFFFFF0) + }; +#else /* PGSZ == 64 */ +PixelGroup cfbstarttab[] = + { + cfbBits(0x0000000000000000), + cfbBits(0x0FFFFFFFFFFFFFFF), + cfbBits(0x00FFFFFFFFFFFFFF), + cfbBits(0x000FFFFFFFFFFFFF), + cfbBits(0x0000FFFFFFFFFFFF), + cfbBits(0x00000FFFFFFFFFFF), + cfbBits(0x000000FFFFFFFFFF), + cfbBits(0x0000000FFFFFFFFF), + cfbBits(0x00000000FFFFFFFF), + cfbBits(0x000000000FFFFFFF), + cfbBits(0x0000000000FFFFFF), + cfbBits(0x00000000000FFFFF), + cfbBits(0x000000000000FFFF), + cfbBits(0x0000000000000FFF), + cfbBits(0x00000000000000FF), + cfbBits(0x000000000000000F), + }; +PixelGroup cfbendtab[] = + { + cfbBits(0x0000000000000000), + cfbBits(0xF000000000000000), + cfbBits(0xFF00000000000000), + cfbBits(0xFFF0000000000000), + cfbBits(0xFFFF000000000000), + cfbBits(0xFFFFF00000000000), + cfbBits(0xFFFFFF0000000000), + cfbBits(0xFFFFFFF000000000), + cfbBits(0xFFFFFFFF00000000), + cfbBits(0xFFFFFFFFF0000000), + cfbBits(0xFFFFFFFFFF000000), + cfbBits(0xFFFFFFFFFFF00000), + cfbBits(0xFFFFFFFFFFFF0000), + cfbBits(0xFFFFFFFFFFFFF000), + cfbBits(0xFFFFFFFFFFFFFF00), + cfbBits(0xFFFFFFFFFFFFFFF0), + }; +#endif /* PGSZ */ +#endif /* PSZ == 4 */ + +#if PSZ == 8 +#if PGSZ == 32 +PixelGroup cfbstarttab[] = + { + cfbBits(0x00000000), + cfbBits(0x00FFFFFF), + cfbBits(0x0000FFFF), + cfbBits(0x000000FF) + }; +PixelGroup cfbendtab[] = + { + cfbBits(0x00000000), + cfbBits(0xFF000000), + cfbBits(0xFFFF0000), + cfbBits(0xFFFFFF00) + }; +#else /* PGSZ == 64 */ +PixelGroup cfbstarttab[] = + { + cfbBits(0x0000000000000000), + cfbBits(0x00FFFFFFFFFFFFFF), + cfbBits(0x0000FFFFFFFFFFFF), + cfbBits(0x000000FFFFFFFFFF), + cfbBits(0x00000000FFFFFFFF), + cfbBits(0x0000000000FFFFFF), + cfbBits(0x000000000000FFFF), + cfbBits(0x00000000000000FF) + }; +PixelGroup cfbendtab[] = + { + cfbBits(0x0000000000000000), + cfbBits(0xFF00000000000000), + cfbBits(0xFFFF000000000000), + cfbBits(0xFFFFFF0000000000), + cfbBits(0xFFFFFFFF00000000), + cfbBits(0xFFFFFFFFFF000000), + cfbBits(0xFFFFFFFFFFFF0000), + cfbBits(0xFFFFFFFFFFFFFF00) + }; +#endif /* PGSZ */ +#endif /* PSZ == 8 */ + +#if PSZ == 16 +#if PGSZ == 32 +PixelGroup cfbstarttab[] = + { + cfbBits(0x00000000), + cfbBits(0x0000FFFF), + }; +PixelGroup cfbendtab[] = + { + cfbBits(0x00000000), + cfbBits(0xFFFF0000), + }; +#else /* PGSZ == 64 */ +PixelGroup cfbstarttab[] = + { + cfbBits(0x0000000000000000), + cfbBits(0x0000FFFFFFFFFFFF), + cfbBits(0x00000000FFFFFFFF), + cfbBits(0x000000000000FFFF), + }; +PixelGroup cfbendtab[] = + { + cfbBits(0x0000000000000000), + cfbBits(0xFFFF000000000000), + cfbBits(0xFFFFFFFF00000000), + cfbBits(0xFFFFFFFFFFFF0000), + }; +#endif /* PGSZ */ +#endif + +#if PSZ == 24 +#if PGSZ == 32 +PixelGroup cfbstarttab[] = + { + cfbBits(0x00000000), + cfbBits(0x000000FF), + cfbBits(0x0000FFFF), + cfbBits(0x00FFFFFF), + }; +PixelGroup cfbendtab[] = + { + cfbBits(0x00000000), + cfbBits(0xFFFFFF00), + cfbBits(0xFFFF0000), + cfbBits(0xFF000000), + }; +#else /* PGSZ == 64 */ +PixelGroup cfbstarttab[] = + { + cfbBits(0x0000000000000000), + cfbBits(0x000000FFFFFFFFFF), + cfbBits(0x000000000000FFFF), + }; +PixelGroup cfbendtab[] = + { + cfbBits(0x0000000000000000), + cfbBits(0xFFFFFFFFFF000000), + cfbBits(0xFFFF000000000000), + }; +#endif /* PGSZ */ +#endif /* PSZ == 24 */ + +#if PSZ == 32 +#if PGSZ == 32 +PixelGroup cfbstarttab[] = + { + cfbBits(0x00000000), + }; +PixelGroup cfbendtab[] = + { + cfbBits(0x00000000), + }; +#else /* PGSZ == 64 */ +PixelGroup cfbstarttab[] = + { + cfbBits(0x0000000000000000), + cfbBits(0x00000000FFFFFFFF), + }; +PixelGroup cfbendtab[] = + { + cfbBits(0x0000000000000000), + cfbBits(0xFFFFFFFF00000000), + }; +#endif /* PGSZ */ +#endif /* PSZ == 32 */ + +/* a hack, for now, since the entries for 0 need to be all + 1 bits, not all zeros. + this means the code DOES NOT WORK for segments of length + 0 (which is only a problem in the horizontal line code.) +*/ +#if PSZ == 4 +#if PGSZ == 32 +PixelGroup cfbstartpartial[] = + { + cfbBits(0xFFFFFFFF), + cfbBits(0x0FFFFFFF), + cfbBits(0x00FFFFFF), + cfbBits(0x000FFFFF), + cfbBits(0x0000FFFF), + cfbBits(0x00000FFF), + cfbBits(0x000000FF), + cfbBits(0x0000000F) + }; + +PixelGroup cfbendpartial[] = + { + cfbBits(0xFFFFFFFF), + cfbBits(0xF0000000), + cfbBits(0xFF000000), + cfbBits(0xFFF00000), + cfbBits(0xFFFF0000), + cfbBits(0xFFFFF000), + cfbBits(0xFFFFFF00), + cfbBits(0xFFFFFFF0) + }; +#else /* PGSZ == 64 */ +PixelGroup cfbstartpartial[] = + { + cfbBits(0xFFFFFFFFFFFFFFFF), + cfbBits(0x0FFFFFFFFFFFFFFF), + cfbBits(0x00FFFFFFFFFFFFFF), + cfbBits(0x000FFFFFFFFFFFFF), + cfbBits(0x0000FFFFFFFFFFFF), + cfbBits(0x00000FFFFFFFFFFF), + cfbBits(0x000000FFFFFFFFFF), + cfbBits(0x0000000FFFFFFFFF), + cfbBits(0x00000000FFFFFFFF), + cfbBits(0x000000000FFFFFFF), + cfbBits(0x0000000000FFFFFF), + cfbBits(0x00000000000FFFFF), + cfbBits(0x000000000000FFFF), + cfbBits(0x0000000000000FFF), + cfbBits(0x00000000000000FF), + cfbBits(0x000000000000000F), + }; + +PixelGroup cfbendpartial[] = + { + cfbBits(0xFFFFFFFFFFFFFFFF), + cfbBits(0xF000000000000000), + cfbBits(0xFF00000000000000), + cfbBits(0xFFF0000000000000), + cfbBits(0xFFFF000000000000), + cfbBits(0xFFFFF00000000000), + cfbBits(0xFFFFFF0000000000), + cfbBits(0xFFFFFFF000000000), + cfbBits(0xFFFFFFFF00000000), + cfbBits(0xFFFFFFFFF0000000), + cfbBits(0xFFFFFFFFFF000000), + cfbBits(0xFFFFFFFFFFF00000), + cfbBits(0xFFFFFFFFFFFF0000), + cfbBits(0xFFFFFFFFFFFFF000), + cfbBits(0xFFFFFFFFFFFFFF00), + cfbBits(0xFFFFFFFFFFFFFFF0), + }; +#endif /* PGSZ */ +#endif /* PSZ == 4 */ + +#if PSZ == 8 +#if PGSZ == 32 +PixelGroup cfbstartpartial[] = + { + cfbBits(0xFFFFFFFF), + cfbBits(0x00FFFFFF), + cfbBits(0x0000FFFF), + cfbBits(0x000000FF) + }; + +PixelGroup cfbendpartial[] = + { + cfbBits(0xFFFFFFFF), + cfbBits(0xFF000000), + cfbBits(0xFFFF0000), + cfbBits(0xFFFFFF00) + }; +#else /* PGSZ == 64 */ +PixelGroup cfbstartpartial[] = + { + cfbBits(0xFFFFFFFFFFFFFFFF), + cfbBits(0x00FFFFFFFFFFFFFF), + cfbBits(0x0000FFFFFFFFFFFF), + cfbBits(0x000000FFFFFFFFFF), + cfbBits(0x00000000FFFFFFFF), + cfbBits(0x0000000000FFFFFF), + cfbBits(0x000000000000FFFF), + cfbBits(0x00000000000000FF), + }; + +PixelGroup cfbendpartial[] = + { + cfbBits(0xFFFFFFFFFFFFFFFF), + cfbBits(0xFF00000000000000), + cfbBits(0xFFFF000000000000), + cfbBits(0xFFFFFF0000000000), + cfbBits(0xFFFFFFFF00000000), + cfbBits(0xFFFFFFFFFF000000), + cfbBits(0xFFFFFFFFFFFF0000), + cfbBits(0xFFFFFFFFFFFFFF00), + }; +#endif /* PGSZ */ +#endif /* PSZ == 8 */ + +#if PSZ == 16 +#if PGSZ == 32 +PixelGroup cfbstartpartial[] = + { + cfbBits(0xFFFFFFFF), + cfbBits(0x0000FFFF), + }; + +PixelGroup cfbendpartial[] = + { + cfbBits(0xFFFFFFFF), + cfbBits(0xFFFF0000), + }; +#else /* PGSZ == 64 */ +PixelGroup cfbstartpartial[] = + { + cfbBits(0xFFFFFFFFFFFFFFFF), + cfbBits(0x0000FFFFFFFFFFFF), + cfbBits(0x00000000FFFFFFFF), + cfbBits(0x000000000000FFFF), + }; + +PixelGroup cfbendpartial[] = + { + cfbBits(0xFFFFFFFFFFFFFFFF), + cfbBits(0xFFFF000000000000), + cfbBits(0xFFFFFFFF00000000), + cfbBits(0xFFFFFFFFFFFF0000), + }; +#endif /* PGSZ */ +#endif /* PSZ == 16 */ + +#if PSZ == 24 +#if PGSZ == 32 +PixelGroup cfbstartpartial[] = + { + cfbBits(0xFFFFFFFF), + cfbBits(0x000000FF), + cfbBits(0x0000FFFF), + cfbBits(0x00FFFFFF), + }; + +PixelGroup cfbendpartial[] = + { + cfbBits(0xFFFFFFFF), + cfbBits(0xFFFFFF00), + cfbBits(0xFFFF0000), + cfbBits(0xFF000000), + }; +#else /* PGSZ == 64 */ +PixelGroup cfbstartpartial[] = + { + cfbBits(0xFFFFFFFFFFFFFFFF), + cfbBits(0x0000FFFFFFFFFFFF), + cfbBits(0x000000FFFFFFFFFF), + cfbBits(0x00000000FFFFFFFF), + cfbBits(0x0000000000FFFFFF), + cfbBits(0x000000000000FFFF), + cfbBits(0x00000000000000FF), + }; + +PixelGroup cfbendpartial[] = + { + cfbBits(0xFFFFFFFFFFFFFFFF), + cfbBits(0xFFFFFFFFFFFF0000), + cfbBits(0xFFFFFFFFFF000000), + cfbBits(0xFFFFFFFF00000000), + cfbBits(0xFFFFFF0000000000), + cfbBits(0xFFFF000000000000), + cfbBits(0xFF00000000000000), + }; +#endif /* PGSZ */ +#endif /* PSZ == 24 */ + +#if PSZ == 32 +#if PGSZ == 32 +PixelGroup cfbstartpartial[] = + { + cfbBits(0xFFFFFFFF), + }; + +PixelGroup cfbendpartial[] = + { + cfbBits(0xFFFFFFFF), + }; +#else /* PGSZ == 64 */ +PixelGroup cfbstartpartial[] = + { + cfbBits(0xFFFFFFFFFFFFFFFF), + cfbBits(0x00000000FFFFFFFF), + }; + +PixelGroup cfbendpartial[] = + { + cfbBits(0xFFFFFFFFFFFFFFFF), + cfbBits(0xFFFFFFFF00000000), + }; +#endif /* PGSZ */ +#endif /* PSZ == 32 */ + +/* used for masking bits in bresenham lines + mask[n] is used to mask out all but bit n in a longword (n is a +screen position). + rmask[n] is used to mask out the single bit at position n (n +is a screen posiotion.) +*/ + +#if PSZ == 4 +#if PGSZ == 32 +PixelGroup cfbmask[] = + { + cfbBits(0xF0000000), + cfbBits(0x0F000000), + cfbBits(0x00F00000), + cfbBits(0x000F0000), + cfbBits(0x0000F000), + cfbBits(0x00000F00), + cfbBits(0x000000F0), + cfbBits(0x0000000F) + }; +PixelGroup cfbrmask[] = + { + cfbBits(0x0FFFFFFF), + cfbBits(0xF0FFFFFF), + cfbBits(0xFF0FFFFF), + cfbBits(0xFFF0FFFF), + cfbBits(0xFFFF0FFF), + cfbBits(0xFFFFF0FF), + cfbBits(0xFFFFFF0F), + cfbBits(0xFFFFFFF0) + }; +#else /* PGSZ == 64 */ +PixelGroup cfbmask[] = + { + cfbBits(0xF000000000000000), + cfbBits(0x0F00000000000000), + cfbBits(0x00F0000000000000), + cfbBits(0x000F000000000000), + cfbBits(0x0000F00000000000), + cfbBits(0x00000F0000000000), + cfbBits(0x000000F000000000), + cfbBits(0x0000000F00000000), + cfbBits(0x00000000F0000000), + cfbBits(0x000000000F000000), + cfbBits(0x0000000000F00000), + cfbBits(0x00000000000F0000), + cfbBits(0x000000000000F000), + cfbBits(0x0000000000000F00), + cfbBits(0x00000000000000F0), + cfbBits(0x000000000000000F), + }; +PixelGroup cfbrmask[] = + { + cfbBits(0x0FFFFFFFFFFFFFFF), + cfbBits(0xF0FFFFFFFFFFFFFF), + cfbBits(0xFF0FFFFFFFFFFFFF), + cfbBits(0xFFF0FFFFFFFFFFFF), + cfbBits(0xFFFF0FFFFFFFFFFF), + cfbBits(0xFFFFF0FFFFFFFFFF), + cfbBits(0xFFFFFF0FFFFFFFFF), + cfbBits(0xFFFFFFF0FFFFFFFF), + cfbBits(0xFFFFFFFF0FFFFFFF), + cfbBits(0xFFFFFFFFF0FFFFFF), + cfbBits(0xFFFFFFFFFF0FFFFF), + cfbBits(0xFFFFFFFFFFF0FFFF), + cfbBits(0xFFFFFFFFFFFF0FFF), + cfbBits(0xFFFFFFFFFFFFF0FF), + cfbBits(0xFFFFFFFFFFFFFF0F), + cfbBits(0xFFFFFFFFFFFFFFF0), + }; +#endif /* PGSZ */ +#endif /* PSZ == 4 */ + +#if PSZ == 8 +#if PGSZ == 32 +PixelGroup cfbmask[] = + { + cfbBits(0xFF000000), + cfbBits(0x00FF0000), + cfbBits(0x0000FF00), + cfbBits(0x000000FF) + }; +PixelGroup cfbrmask[] = + { + cfbBits(0x00FFFFFF), + cfbBits(0xFF00FFFF), + cfbBits(0xFFFF00FF), + cfbBits(0xFFFFFF00) + }; +#else /* PGSZ == 64 */ +PixelGroup cfbmask[] = + { + cfbBits(0xFF00000000000000), + cfbBits(0x00FF000000000000), + cfbBits(0x0000FF0000000000), + cfbBits(0x000000FF00000000), + cfbBits(0x00000000FF000000), + cfbBits(0x0000000000FF0000), + cfbBits(0x000000000000FF00), + cfbBits(0x00000000000000FF), + }; +PixelGroup cfbrmask[] = + { + cfbBits(0x00FFFFFFFFFFFFFF), + cfbBits(0xFF00FFFFFFFFFFFF), + cfbBits(0xFFFF00FFFFFFFFFF), + cfbBits(0xFFFFFF00FFFFFFFF), + cfbBits(0xFFFFFFFF00FFFFFF), + cfbBits(0xFFFFFFFFFF00FFFF), + cfbBits(0xFFFFFFFFFFFF00FF), + cfbBits(0xFFFFFFFFFFFFFF00), + }; +#endif /* PGSZ */ +#endif /* PSZ == 8 */ + +#if PSZ == 16 +#if PGSZ == 32 +PixelGroup cfbmask[] = + { + cfbBits(0xFFFF0000), + cfbBits(0x0000FFFF), + }; +PixelGroup cfbrmask[] = + { + cfbBits(0x0000FFFF), + cfbBits(0xFFFF0000), + }; +#else /* PGSZ == 64 */ +PixelGroup cfbmask[] = + { + cfbBits(0xFFFF000000000000), + cfbBits(0x0000FFFF00000000), + cfbBits(0x00000000FFFF0000), + cfbBits(0x000000000000FFFF), + }; +PixelGroup cfbrmask[] = + { + cfbBits(0x0000FFFFFFFFFFFF), + cfbBits(0xFFFF0000FFFFFFFF), + cfbBits(0xFFFFFFFF0000FFFF), + cfbBits(0xFFFFFFFFFFFF0000), + }; +#endif /* PGSZ */ +#endif /* PSZ == 16 */ + +#if PSZ == 24 +#if PGSZ == 32 +PixelGroup cfbmask[] = + { + cfbBits(0xFFFFFF00), + cfbBits(0x00000000), + cfbBits(0x000000FF), + cfbBits(0xFFFF0000), + cfbBits(0x0000FFFF), + cfbBits(0xFF000000), + cfbBits(0x00FFFFFF), + cfbBits(0x00000000), + }; +PixelGroup cfbrmask[] = + { + cfbBits(0x000000FF), + cfbBits(0xFFFFFFFF), + cfbBits(0xFFFFFF00), + cfbBits(0x0000FFFF), + cfbBits(0xFFFF0000), + cfbBits(0x00FFFFFF), + cfbBits(0xFF000000), + cfbBits(0xFFFFFFFF), + }; +#else /* PGSZ == 64 */ +PixelGroup cfbmask[] = + { + cfbBits(0xFFFFFF0000000000), + cfbBits(0x000000FFFFFF0000), + cfbBits(0x000000000000FFFF), + }; +PixelGroup cfbmask2[] = + { + cfbBits(0x0000000000000000), + cfbBits(0x0000000000000000), + cfbBits(0xFF00000000000000), + }; +PixelGroup cfbrmask[] = + { + cfbBits(0x000000FFFFFFFFFF), + cfbBits(0xFFFFFF000000FFFF), + cfbBits(0xFFFFFFFFFFFF0000), + }; +PixelGroup cfbrmask2[] = + { + cfbBits(0x0000000000000000), + cfbBits(0x0000000000000000), + cfbBits(0x00FFFFFFFFFFFFFF), + }; +#endif /* PGSZ */ +#endif /* PSZ == 24 */ + +#if PSZ == 32 +#if PGSZ == 32 +PixelGroup cfbmask[] = + { + cfbBits(0xFFFFFFFF), + }; +PixelGroup cfbrmask[] = + { + cfbBits(0xFFFFFFFF), + }; +#else /* PGSZ == 64 */ +PixelGroup cfbmask[] = + { + cfbBits(0xFFFFFFFF00000000), + cfbBits(0x00000000FFFFFFFF), + }; +PixelGroup cfbrmask[] = + { + cfbBits(0x00000000FFFFFFFF), + cfbBits(0xFFFFFFFF00000000), + }; +#endif /* PGSZ */ +#endif /* PSZ == 32 */ + +/* + * QuartetBitsTable contains PPW+1 masks whose binary values are masks in the + * low order quartet that contain the number of bits specified in the + * index. This table is used by getstipplepixels. + */ +#if PSZ == 4 +PixelGroup QuartetBitsTable[] = { +#if PGSZ == 32 +#if (BITMAP_BIT_ORDER == MSBFirst) + 0x00000000, /* 0 - 00000000 */ + 0x00000080, /* 1 - 10000000 */ + 0x000000C0, /* 2 - 11000000 */ + 0x000000E0, /* 3 - 11100000 */ + 0x000000F0, /* 4 - 11110000 */ + 0x000000F8, /* 5 - 11111000 */ + 0x000000FC, /* 6 - 11111100 */ + 0x000000FE, /* 7 - 11111110 */ + 0x000000FF /* 8 - 11111111 */ +#else /* (BITMAP_BIT_ORDER == LSBFirst */ + 0x00000000, /* 0 - 00000000 */ + 0x00000001, /* 1 - 00000001 */ + 0x00000003, /* 2 - 00000011 */ + 0x00000007, /* 3 - 00000111 */ + 0x0000000F, /* 4 - 00001111 */ + 0x0000001F, /* 5 - 00011111 */ + 0x0000003F, /* 6 - 00111111 */ + 0x0000007F, /* 7 - 01111111 */ + 0x000000FF /* 8 - 11111111 */ +#endif /* (BITMAP_BIT_ORDER == MSBFirst) */ +#else /* PGSZ == 64 */ +#if (BITMAP_BIT_ORDER == MSBFirst) + 0x00000000, /* 0 - 0000000000000000 */ + 0x00008000, /* 1 - 1000000000000000 */ + 0x0000C000, /* 2 - 1100000000000000 */ + 0x0000E000, /* 3 - 1110000000000000 */ + 0x0000F000, /* 4 - 1111000000000000 */ + 0x0000F800, /* 5 - 1111100000000000 */ + 0x0000FC00, /* 6 - 1111110000000000 */ + 0x0000FE00, /* 7 - 1111111000000000 */ + 0x0000FF00, /* 8 - 1111111100000000 */ + 0x0000FF80, /* 9 - 1111111110000000 */ + 0x0000FFC0, /* 10- 1111111111000000 */ + 0x0000FFE0, /* 11- 1111111111100000 */ + 0x0000FFF0, /* 12- 1111111111110000 */ + 0x0000FFF8, /* 13- 1111111111111000 */ + 0x0000FFFC, /* 14- 1111111111111100 */ + 0x0000FFFE, /* 15- 1111111111111110 */ + 0x0000FFFF, /* 16- 1111111111111111 */ +#else /* (BITMAP_BIT_ORDER == LSBFirst */ + 0x00000000, /* 0 - 0000000000000000 */ + 0x00000001, /* 1 - 0000000000000001 */ + 0x00000003, /* 2 - 0000000000000011 */ + 0x00000007, /* 3 - 0000000000000111 */ + 0x0000000F, /* 4 - 0000000000001111 */ + 0x0000001F, /* 5 - 0000000000011111 */ + 0x0000003F, /* 6 - 0000000000111111 */ + 0x0000007F, /* 7 - 0000000001111111 */ + 0x000000FF, /* 8 - 0000000011111111 */ + 0x000001FF, /* 9 - 0000000111111111 */ + 0x000003FF, /* 10- 0000001111111111 */ + 0x000007FF, /* 11- 0000011111111111 */ + 0x00000FFF, /* 12- 0000111111111111 */ + 0x00001FFF, /* 13- 0001111111111111 */ + 0x00003FFF, /* 14- 0011111111111111 */ + 0x00007FFF, /* 15- 0111111111111111 */ + 0x0000FFFF, /* 16- 1111111111111111 */ +#endif /* (BITMAP_BIT_ORDER == MSBFirst) */ +#endif /* PGSZ */ +}; +#endif /* PSZ == 4 */ + +#if PSZ == 8 +PixelGroup QuartetBitsTable[] = { +#if PGSZ == 32 +#if (BITMAP_BIT_ORDER == MSBFirst) + 0x00000000, /* 0 - 0000 */ + 0x00000008, /* 1 - 1000 */ + 0x0000000C, /* 2 - 1100 */ + 0x0000000E, /* 3 - 1110 */ + 0x0000000F /* 4 - 1111 */ +#else /* (BITMAP_BIT_ORDER == LSBFirst */ + 0x00000000, /* 0 - 0000 */ + 0x00000001, /* 1 - 0001 */ + 0x00000003, /* 2 - 0011 */ + 0x00000007, /* 3 - 0111 */ + 0x0000000F /* 4 - 1111 */ +#endif /* (BITMAP_BIT_ORDER == MSBFirst) */ +#else /* PGSZ == 64 */ +#if (BITMAP_BIT_ORDER == MSBFirst) + 0x00000000, /* 0 - 00000000 */ + 0x00000080, /* 1 - 10000000 */ + 0x000000C0, /* 2 - 11000000 */ + 0x000000E0, /* 3 - 11100000 */ + 0x000000F0, /* 4 - 11110000 */ + 0x000000F8, /* 5 - 11111000 */ + 0x000000FC, /* 6 - 11111100 */ + 0x000000FE, /* 7 - 11111110 */ + 0x000000FF /* 8 - 11111111 */ +#else /* (BITMAP_BIT_ORDER == LSBFirst */ + 0x00000000, /* 0 - 00000000 */ + 0x00000001, /* 1 - 00000001 */ + 0x00000003, /* 2 - 00000011 */ + 0x00000007, /* 3 - 00000111 */ + 0x0000000F, /* 4 - 10000111 */ + 0x0000001F, /* 5 - 00011111 */ + 0x0000003F, /* 6 - 00111111 */ + 0x0000007F, /* 7 - 01111111 */ + 0x000000FF /* 8 - 11111111 */ +#endif /* (BITMAP_BIT_ORDER == MSBFirst) */ +#endif /* PGSZ */ +}; +#endif /* PSZ == 8 */ + +#if PSZ == 16 +PixelGroup QuartetBitsTable[] = { +#if PGSZ == 32 +#if (BITMAP_BIT_ORDER == MSBFirst) + 0x00000000, /* 0 - 00 */ + 0x00000002, /* 1 - 10 */ + 0x00000003, /* 2 - 11 */ +#else /* (BITMAP_BIT_ORDER == LSBFirst */ + 0x00000000, /* 0 - 00 */ + 0x00000001, /* 1 - 01 */ + 0x00000003, /* 2 - 11 */ +#endif /* (BITMAP_BIT_ORDER == MSBFirst) */ +#else /* PGSZ == 64 */ +#if (BITMAP_BIT_ORDER == MSBFirst) + 0x00000000, /* 0 - 0000 */ + 0x00000008, /* 1 - 1000 */ + 0x0000000C, /* 2 - 1100 */ + 0x0000000E, /* 3 - 1110 */ + 0x0000000F, /* 4 - 1111 */ +#else /* (BITMAP_BIT_ORDER == LSBFirst */ + 0x00000000, /* 0 - 0000 */ + 0x00000001, /* 1 - 0001 */ + 0x00000003, /* 2 - 0011 */ + 0x00000007, /* 3 - 0111 */ + 0x0000000F, /* 4 - 1111 */ +#endif /* (BITMAP_BIT_ORDER == MSBFirst) */ +#endif /* PGSZ */ +}; +#endif /* PSZ == 16 */ + +#if PSZ == 24 +PixelGroup QuartetBitsTable[] = { +#if PGSZ == 32 +#if (BITMAP_BIT_ORDER == MSBFirst) + 0x00000000, /* 0 - 0 */ + 0x00000001, /* 1 - 1 */ +#else /* (BITMAP_BIT_ORDER == LSBFirst */ + 0x00000000, /* 0 - 0 */ + 0x00000001, /* 1 - 1 */ +#endif /* (BITMAP_BIT_ORDER == MSBFirst) */ +#else /* PGSZ == 64 */ +#if (BITMAP_BIT_ORDER == MSBFirst) + 0x00000000, /* 0 - 00 */ + 0x00000002, /* 1 - 10 */ + 0x00000003, /* 2 - 11*/ +#else /* (BITMAP_BIT_ORDER == LSBFirst */ + 0x00000000, /* 0 - 00 */ + 0x00000001, /* 1 - 01 */ + 0x00000003, /* 2 - 11 */ +#endif /* (BITMAP_BIT_ORDER == MSBFirst) */ +#endif /* PGSZ */ +}; +#endif /* PSZ == 24 */ + +#if PSZ == 32 +PixelGroup QuartetBitsTable[] = { +#if PGSZ == 32 +#if (BITMAP_BIT_ORDER == MSBFirst) + 0x00000000, /* 0 - 0 */ + 0x00000001, /* 1 - 1 */ +#else /* (BITMAP_BIT_ORDER == LSBFirst */ + 0x00000000, /* 0 - 0 */ + 0x00000001, /* 1 - 1 */ +#endif /* (BITMAP_BIT_ORDER == MSBFirst) */ +#else /* PGSZ == 64 */ +#if (BITMAP_BIT_ORDER == MSBFirst) + 0x00000000, /* 0 - 00 */ + 0x00000002, /* 1 - 10 */ + 0x00000003, /* 2 - 11*/ +#else /* (BITMAP_BIT_ORDER == LSBFirst */ + 0x00000000, /* 0 - 00 */ + 0x00000001, /* 1 - 01 */ + 0x00000003, /* 2 - 11 */ +#endif /* (BITMAP_BIT_ORDER == MSBFirst) */ +#endif /* PGSZ */ +}; +#endif /* PSZ == 32 */ + +/* + * QuartetPixelMaskTable is used by getstipplepixels to get a pixel mask + * corresponding to a quartet of bits. Note: the bit/byte order dependency + * is handled by QuartetBitsTable above. + */ +#if PSZ == 4 +#if PGSZ == 32 +PixelGroup QuartetPixelMaskTable[] = { + 0x00000000, + 0x0000000F, + 0x000000F0, + 0x000000FF, + 0x00000F00, + 0x00000F0F, + 0x00000FF0, + 0x00000FFF, + 0x0000F000, + 0x0000F00F, + 0x0000F0F0, + 0x0000F0FF, + 0x0000FF00, + 0x0000FF0F, + 0x0000FFF0, + 0x0000FFFF, + 0x000F0000, + 0x000F000F, + 0x000F00F0, + 0x000F00FF, + 0x000F0F00, + 0x000F0F0F, + 0x000F0FF0, + 0x000F0FFF, + 0x000FF000, + 0x000FF00F, + 0x000FF0F0, + 0x000FF0FF, + 0x000FFF00, + 0x000FFF0F, + 0x000FFFF0, + 0x000FFFFF, + 0x00F00000, + 0x00F0000F, + 0x00F000F0, + 0x00F000FF, + 0x00F00F00, + 0x00F00F0F, + 0x00F00FF0, + 0x00F00FFF, + 0x00F0F000, + 0x00F0F00F, + 0x00F0F0F0, + 0x00F0F0FF, + 0x00F0FF00, + 0x00F0FF0F, + 0x00F0FFF0, + 0x00F0FFFF, + 0x00FF0000, + 0x00FF000F, + 0x00FF00F0, + 0x00FF00FF, + 0x00FF0F00, + 0x00FF0F0F, + 0x00FF0FF0, + 0x00FF0FFF, + 0x00FFF000, + 0x00FFF00F, + 0x00FFF0F0, + 0x00FFF0FF, + 0x00FFFF00, + 0x00FFFF0F, + 0x00FFFFF0, + 0x00FFFFFF, + 0x0F000000, + 0x0F00000F, + 0x0F0000F0, + 0x0F0000FF, + 0x0F000F00, + 0x0F000F0F, + 0x0F000FF0, + 0x0F000FFF, + 0x0F00F000, + 0x0F00F00F, + 0x0F00F0F0, + 0x0F00F0FF, + 0x0F00FF00, + 0x0F00FF0F, + 0x0F00FFF0, + 0x0F00FFFF, + 0x0F0F0000, + 0x0F0F000F, + 0x0F0F00F0, + 0x0F0F00FF, + 0x0F0F0F00, + 0x0F0F0F0F, + 0x0F0F0FF0, + 0x0F0F0FFF, + 0x0F0FF000, + 0x0F0FF00F, + 0x0F0FF0F0, + 0x0F0FF0FF, + 0x0F0FFF00, + 0x0F0FFF0F, + 0x0F0FFFF0, + 0x0F0FFFFF, + 0x0FF00000, + 0x0FF0000F, + 0x0FF000F0, + 0x0FF000FF, + 0x0FF00F00, + 0x0FF00F0F, + 0x0FF00FF0, + 0x0FF00FFF, + 0x0FF0F000, + 0x0FF0F00F, + 0x0FF0F0F0, + 0x0FF0F0FF, + 0x0FF0FF00, + 0x0FF0FF0F, + 0x0FF0FFF0, + 0x0FF0FFFF, + 0x0FFF0000, + 0x0FFF000F, + 0x0FFF00F0, + 0x0FFF00FF, + 0x0FFF0F00, + 0x0FFF0F0F, + 0x0FFF0FF0, + 0x0FFF0FFF, + 0x0FFFF000, + 0x0FFFF00F, + 0x0FFFF0F0, + 0x0FFFF0FF, + 0x0FFFFF00, + 0x0FFFFF0F, + 0x0FFFFFF0, + 0x0FFFFFFF, + 0xF0000000, + 0xF000000F, + 0xF00000F0, + 0xF00000FF, + 0xF0000F00, + 0xF0000F0F, + 0xF0000FF0, + 0xF0000FFF, + 0xF000F000, + 0xF000F00F, + 0xF000F0F0, + 0xF000F0FF, + 0xF000FF00, + 0xF000FF0F, + 0xF000FFF0, + 0xF000FFFF, + 0xF00F0000, + 0xF00F000F, + 0xF00F00F0, + 0xF00F00FF, + 0xF00F0F00, + 0xF00F0F0F, + 0xF00F0FF0, + 0xF00F0FFF, + 0xF00FF000, + 0xF00FF00F, + 0xF00FF0F0, + 0xF00FF0FF, + 0xF00FFF00, + 0xF00FFF0F, + 0xF00FFFF0, + 0xF00FFFFF, + 0xF0F00000, + 0xF0F0000F, + 0xF0F000F0, + 0xF0F000FF, + 0xF0F00F00, + 0xF0F00F0F, + 0xF0F00FF0, + 0xF0F00FFF, + 0xF0F0F000, + 0xF0F0F00F, + 0xF0F0F0F0, + 0xF0F0F0FF, + 0xF0F0FF00, + 0xF0F0FF0F, + 0xF0F0FFF0, + 0xF0F0FFFF, + 0xF0FF0000, + 0xF0FF000F, + 0xF0FF00F0, + 0xF0FF00FF, + 0xF0FF0F00, + 0xF0FF0F0F, + 0xF0FF0FF0, + 0xF0FF0FFF, + 0xF0FFF000, + 0xF0FFF00F, + 0xF0FFF0F0, + 0xF0FFF0FF, + 0xF0FFFF00, + 0xF0FFFF0F, + 0xF0FFFFF0, + 0xF0FFFFFF, + 0xFF000000, + 0xFF00000F, + 0xFF0000F0, + 0xFF0000FF, + 0xFF000F00, + 0xFF000F0F, + 0xFF000FF0, + 0xFF000FFF, + 0xFF00F000, + 0xFF00F00F, + 0xFF00F0F0, + 0xFF00F0FF, + 0xFF00FF00, + 0xFF00FF0F, + 0xFF00FFF0, + 0xFF00FFFF, + 0xFF0F0000, + 0xFF0F000F, + 0xFF0F00F0, + 0xFF0F00FF, + 0xFF0F0F00, + 0xFF0F0F0F, + 0xFF0F0FF0, + 0xFF0F0FFF, + 0xFF0FF000, + 0xFF0FF00F, + 0xFF0FF0F0, + 0xFF0FF0FF, + 0xFF0FFF00, + 0xFF0FFF0F, + 0xFF0FFFF0, + 0xFF0FFFFF, + 0xFFF00000, + 0xFFF0000F, + 0xFFF000F0, + 0xFFF000FF, + 0xFFF00F00, + 0xFFF00F0F, + 0xFFF00FF0, + 0xFFF00FFF, + 0xFFF0F000, + 0xFFF0F00F, + 0xFFF0F0F0, + 0xFFF0F0FF, + 0xFFF0FF00, + 0xFFF0FF0F, + 0xFFF0FFF0, + 0xFFF0FFFF, + 0xFFFF0000, + 0xFFFF000F, + 0xFFFF00F0, + 0xFFFF00FF, + 0xFFFF0F00, + 0xFFFF0F0F, + 0xFFFF0FF0, + 0xFFFF0FFF, + 0xFFFFF000, + 0xFFFFF00F, + 0xFFFFF0F0, + 0xFFFFF0FF, + 0xFFFFFF00, + 0xFFFFFF0F, + 0xFFFFFFF0, + 0xFFFFFFFF, +}; +#else /* PGSZ == 64 */ +No QuartetPixelMaskTable for psz=PSZ +this would be a 64K entry table, a bit much I think. +Try breaking things in two: +mask = table[index&0xff00]<<32 | table[index&0xff] +#endif /* PGSZ */ +#endif /* PSZ == 4 */ + +#if PSZ == 8 +PixelGroup QuartetPixelMaskTable[] = { +#if PGSZ == 32 + 0x00000000, + 0x000000FF, + 0x0000FF00, + 0x0000FFFF, + 0x00FF0000, + 0x00FF00FF, + 0x00FFFF00, + 0x00FFFFFF, + 0xFF000000, + 0xFF0000FF, + 0xFF00FF00, + 0xFF00FFFF, + 0xFFFF0000, + 0xFFFF00FF, + 0xFFFFFF00, + 0xFFFFFFFF +#else /* PGSZ == 64 */ + 0x0000000000000000, 0x00000000000000FF, + 0x000000000000FF00, 0x000000000000FFFF, + 0x0000000000FF0000, 0x0000000000FF00FF, + 0x0000000000FFFF00, 0x0000000000FFFFFF, + 0x00000000FF000000, 0x00000000FF0000FF, + 0x00000000FF00FF00, 0x00000000FF00FFFF, + 0x00000000FFFF0000, 0x00000000FFFF00FF, + 0x00000000FFFFFF00, 0x00000000FFFFFFFF, + 0x000000FF00000000, 0x000000FF000000FF, + 0x000000FF0000FF00, 0x000000FF0000FFFF, + 0x000000FF00FF0000, 0x000000FF00FF00FF, + 0x000000FF00FFFF00, 0x000000FF00FFFFFF, + 0x000000FFFF000000, 0x000000FFFF0000FF, + 0x000000FFFF00FF00, 0x000000FFFF00FFFF, + 0x000000FFFFFF0000, 0x000000FFFFFF00FF, + 0x000000FFFFFFFF00, 0x000000FFFFFFFFFF, + 0x0000FF0000000000, 0x0000FF00000000FF, + 0x0000FF000000FF00, 0x0000FF000000FFFF, + 0x0000FF0000FF0000, 0x0000FF0000FF00FF, + 0x0000FF0000FFFF00, 0x0000FF0000FFFFFF, + 0x0000FF00FF000000, 0x0000FF00FF0000FF, + 0x0000FF00FF00FF00, 0x0000FF00FF00FFFF, + 0x0000FF00FFFF0000, 0x0000FF00FFFF00FF, + 0x0000FF00FFFFFF00, 0x0000FF00FFFFFFFF, + 0x0000FFFF00000000, 0x0000FFFF000000FF, + 0x0000FFFF0000FF00, 0x0000FFFF0000FFFF, + 0x0000FFFF00FF0000, 0x0000FFFF00FF00FF, + 0x0000FFFF00FFFF00, 0x0000FFFF00FFFFFF, + 0x0000FFFFFF000000, 0x0000FFFFFF0000FF, + 0x0000FFFFFF00FF00, 0x0000FFFFFF00FFFF, + 0x0000FFFFFFFF0000, 0x0000FFFFFFFF00FF, + 0x0000FFFFFFFFFF00, 0x0000FFFFFFFFFFFF, + 0x00FF000000000000, 0x00FF0000000000FF, + 0x00FF00000000FF00, 0x00FF00000000FFFF, + 0x00FF000000FF0000, 0x00FF000000FF00FF, + 0x00FF000000FFFF00, 0x00FF000000FFFFFF, + 0x00FF0000FF000000, 0x00FF0000FF0000FF, + 0x00FF0000FF00FF00, 0x00FF0000FF00FFFF, + 0x00FF0000FFFF0000, 0x00FF0000FFFF00FF, + 0x00FF0000FFFFFF00, 0x00FF0000FFFFFFFF, + 0x00FF00FF00000000, 0x00FF00FF000000FF, + 0x00FF00FF0000FF00, 0x00FF00FF0000FFFF, + 0x00FF00FF00FF0000, 0x00FF00FF00FF00FF, + 0x00FF00FF00FFFF00, 0x00FF00FF00FFFFFF, + 0x00FF00FFFF000000, 0x00FF00FFFF0000FF, + 0x00FF00FFFF00FF00, 0x00FF00FFFF00FFFF, + 0x00FF00FFFFFF0000, 0x00FF00FFFFFF00FF, + 0x00FF00FFFFFFFF00, 0x00FF00FFFFFFFFFF, + 0x00FFFF0000000000, 0x00FFFF00000000FF, + 0x00FFFF000000FF00, 0x00FFFF000000FFFF, + 0x00FFFF0000FF0000, 0x00FFFF0000FF00FF, + 0x00FFFF0000FFFF00, 0x00FFFF0000FFFFFF, + 0x00FFFF00FF000000, 0x00FFFF00FF0000FF, + 0x00FFFF00FF00FF00, 0x00FFFF00FF00FFFF, + 0x00FFFF00FFFF0000, 0x00FFFF00FFFF00FF, + 0x00FFFF00FFFFFF00, 0x00FFFF00FFFFFFFF, + 0x00FFFFFF00000000, 0x00FFFFFF000000FF, + 0x00FFFFFF0000FF00, 0x00FFFFFF0000FFFF, + 0x00FFFFFF00FF0000, 0x00FFFFFF00FF00FF, + 0x00FFFFFF00FFFF00, 0x00FFFFFF00FFFFFF, + 0x00FFFFFFFF000000, 0x00FFFFFFFF0000FF, + 0x00FFFFFFFF00FF00, 0x00FFFFFFFF00FFFF, + 0x00FFFFFFFFFF0000, 0x00FFFFFFFFFF00FF, + 0x00FFFFFFFFFFFF00, 0x00FFFFFFFFFFFFFF, + 0xFF00000000000000, 0xFF000000000000FF, + 0xFF0000000000FF00, 0xFF0000000000FFFF, + 0xFF00000000FF0000, 0xFF00000000FF00FF, + 0xFF00000000FFFF00, 0xFF00000000FFFFFF, + 0xFF000000FF000000, 0xFF000000FF0000FF, + 0xFF000000FF00FF00, 0xFF000000FF00FFFF, + 0xFF000000FFFF0000, 0xFF000000FFFF00FF, + 0xFF000000FFFFFF00, 0xFF000000FFFFFFFF, + 0xFF0000FF00000000, 0xFF0000FF000000FF, + 0xFF0000FF0000FF00, 0xFF0000FF0000FFFF, + 0xFF0000FF00FF0000, 0xFF0000FF00FF00FF, + 0xFF0000FF00FFFF00, 0xFF0000FF00FFFFFF, + 0xFF0000FFFF000000, 0xFF0000FFFF0000FF, + 0xFF0000FFFF00FF00, 0xFF0000FFFF00FFFF, + 0xFF0000FFFFFF0000, 0xFF0000FFFFFF00FF, + 0xFF0000FFFFFFFF00, 0xFF0000FFFFFFFFFF, + 0xFF00FF0000000000, 0xFF00FF00000000FF, + 0xFF00FF000000FF00, 0xFF00FF000000FFFF, + 0xFF00FF0000FF0000, 0xFF00FF0000FF00FF, + 0xFF00FF0000FFFF00, 0xFF00FF0000FFFFFF, + 0xFF00FF00FF000000, 0xFF00FF00FF0000FF, + 0xFF00FF00FF00FF00, 0xFF00FF00FF00FFFF, + 0xFF00FF00FFFF0000, 0xFF00FF00FFFF00FF, + 0xFF00FF00FFFFFF00, 0xFF00FF00FFFFFFFF, + 0xFF00FFFF00000000, 0xFF00FFFF000000FF, + 0xFF00FFFF0000FF00, 0xFF00FFFF0000FFFF, + 0xFF00FFFF00FF0000, 0xFF00FFFF00FF00FF, + 0xFF00FFFF00FFFF00, 0xFF00FFFF00FFFFFF, + 0xFF00FFFFFF000000, 0xFF00FFFFFF0000FF, + 0xFF00FFFFFF00FF00, 0xFF00FFFFFF00FFFF, + 0xFF00FFFFFFFF0000, 0xFF00FFFFFFFF00FF, + 0xFF00FFFFFFFFFF00, 0xFF00FFFFFFFFFFFF, + 0xFFFF000000000000, 0xFFFF0000000000FF, + 0xFFFF00000000FF00, 0xFFFF00000000FFFF, + 0xFFFF000000FF0000, 0xFFFF000000FF00FF, + 0xFFFF000000FFFF00, 0xFFFF000000FFFFFF, + 0xFFFF0000FF000000, 0xFFFF0000FF0000FF, + 0xFFFF0000FF00FF00, 0xFFFF0000FF00FFFF, + 0xFFFF0000FFFF0000, 0xFFFF0000FFFF00FF, + 0xFFFF0000FFFFFF00, 0xFFFF0000FFFFFFFF, + 0xFFFF00FF00000000, 0xFFFF00FF000000FF, + 0xFFFF00FF0000FF00, 0xFFFF00FF0000FFFF, + 0xFFFF00FF00FF0000, 0xFFFF00FF00FF00FF, + 0xFFFF00FF00FFFF00, 0xFFFF00FF00FFFFFF, + 0xFFFF00FFFF000000, 0xFFFF00FFFF0000FF, + 0xFFFF00FFFF00FF00, 0xFFFF00FFFF00FFFF, + 0xFFFF00FFFFFF0000, 0xFFFF00FFFFFF00FF, + 0xFFFF00FFFFFFFF00, 0xFFFF00FFFFFFFFFF, + 0xFFFFFF0000000000, 0xFFFFFF00000000FF, + 0xFFFFFF000000FF00, 0xFFFFFF000000FFFF, + 0xFFFFFF0000FF0000, 0xFFFFFF0000FF00FF, + 0xFFFFFF0000FFFF00, 0xFFFFFF0000FFFFFF, + 0xFFFFFF00FF000000, 0xFFFFFF00FF0000FF, + 0xFFFFFF00FF00FF00, 0xFFFFFF00FF00FFFF, + 0xFFFFFF00FFFF0000, 0xFFFFFF00FFFF00FF, + 0xFFFFFF00FFFFFF00, 0xFFFFFF00FFFFFFFF, + 0xFFFFFFFF00000000, 0xFFFFFFFF000000FF, + 0xFFFFFFFF0000FF00, 0xFFFFFFFF0000FFFF, + 0xFFFFFFFF00FF0000, 0xFFFFFFFF00FF00FF, + 0xFFFFFFFF00FFFF00, 0xFFFFFFFF00FFFFFF, + 0xFFFFFFFFFF000000, 0xFFFFFFFFFF0000FF, + 0xFFFFFFFFFF00FF00, 0xFFFFFFFFFF00FFFF, + 0xFFFFFFFFFFFF0000, 0xFFFFFFFFFFFF00FF, + 0xFFFFFFFFFFFFFF00, 0xFFFFFFFFFFFFFFFF, +#endif /* PGSZ */ +}; +#endif /* PSZ == 8 */ + +#if PSZ == 16 +PixelGroup QuartetPixelMaskTable[] = { +#if PGSZ == 32 + 0x00000000, + 0x0000FFFF, + 0xFFFF0000, + 0xFFFFFFFF, +#else /* PGSZ == 64 */ + 0x0000000000000000, 0x000000000000FFFF, + 0x00000000FFFF0000, 0x00000000FFFFFFFF, + 0x0000FFFF00000000, 0x0000FFFF0000FFFF, + 0x0000FFFFFFFF0000, 0x0000FFFFFFFFFFFF, + 0xFFFF000000000000, 0xFFFF00000000FFFF, + 0xFFFF0000FFFF0000, 0xFFFF0000FFFFFFFF, + 0xFFFFFFFF00000000, 0xFFFFFFFF0000FFFF, + 0xFFFFFFFFFFFF0000, 0xFFFFFFFFFFFFFFFF, +#endif /* PGSZ */ +}; +#endif /* PSZ == 16 */ + +#if PSZ == 24 +PixelGroup QuartetPixelMaskTable[] = { +#if PGSZ == 32 +/* Four pixels consist three pixel groups....*/ + 0x00000000, 0x00FFFFFF, /*0x00000000, *//*0*/ +/* 0x00000000, 0x00000000, 0x00000000,*/ /*0*/ +/* 0x00FFFFFF, 0x00000000, 0x00000000,*/ /*1*/ +/* 0xFF000000, 0x0000FFFF, 0x00000000,*/ /*2*/ +/* 0xFFFFFFFF, 0x0000FFFF, 0x00000000,*/ /*3*/ +/* 0x00000000, 0xFFFF0000, 0x000000FF,*/ /*4*/ +/* 0x00FFFFFF, 0xFFFF0000, 0x000000FF,*/ /*5*/ +/* 0xFF000000, 0xFFFFFFFF, 0x000000FF,*/ /*6*/ +/* 0xFFFFFFFF, 0xFFFFFFFF, 0x000000FF,*/ /*7*/ +/* 0x00000000, 0x00000000, 0xFFFFFF00,*/ /*8*/ +/* 0x00FFFFFF, 0x00000000, 0xFFFFFF00,*/ /*9*/ +/* 0xFF000000, 0x0000FFFF, 0xFFFFFF00,*/ /*10*/ +/* 0xFFFFFFFF, 0x0000FFFF, 0xFFFFFF00,*/ /*11*/ +/* 0x00000000, 0xFFFF0000, 0xFFFFFFFF,*/ /*12*/ +/* 0x00FFFFFF, 0xFFFF0000, 0xFFFFFFFF,*/ /*13*/ +/* 0xFF000000, 0xFFFFFFFF, 0xFFFFFFFF,*/ /*14*/ +/* 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,*/ /*15*/ +#else /* PGSZ == 64 */ + 0x0000000000000000, 0x0000000000FFFFFF, + 0x0000FFFFFF000000, 0xFFFFFFFFFFFFFFFF +#endif /* PGSZ */ +}; +#endif /* PSZ == 24 */ + +#if PSZ == 32 +PixelGroup QuartetPixelMaskTable[] = { +#if PGSZ == 32 + 0x00000000, + 0xFFFFFFFF, +#else /* PGSZ == 64 */ + 0x0000000000000000, + 0x00000000FFFFFFFF, + 0xFFFFFFFF00000000, + 0xFFFFFFFFFFFFFFFF +#endif /* PGSZ */ +}; +#endif /* PSZ == 32 */ + +#if PSZ == 24 +int cfb24Shift[] = +#if (BITMAP_BIT_ORDER == MSBFirst) +{8,0,16,16,8,24,0,0}; +#else /* (BITMAP_BIT_ORDER == LSBFirst) */ +{0,0,24,8,16,16,8,0}; +#endif /* (BITMAP_BIT_ORDER == MSBFirst) */ +#endif diff --git a/xorg-server-1.4/cfb/cfbmskbits.h b/xorg-server-1.4/cfb/cfbmskbits.h new file mode 100644 index 0000000..6076269 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbmskbits.h @@ -0,0 +1,891 @@ +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + 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 no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or The Open Group +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and The Open Group make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN 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 SUN 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. + +********************************************************/ + +/* Optimizations for PSZ == 32 added by Kyle Marvin (marvin@vitec.com) */ + +#include +#include +#include "servermd.h" +#include "compiler.h" + +/* + * ========================================================================== + * Converted from mfb to support memory-mapped color framebuffer by smarks@sun, + * April-May 1987. + * + * The way I did the conversion was to consider each longword as an + * array of four bytes instead of an array of 32 one-bit pixels. So + * getbits() and putbits() retain much the same calling sequence, but + * they move bytes around instead of bits. Of course, this entails the + * removal of all of the one-bit-pixel dependencies from the other + * files, but the major bit-hacking stuff should be covered here. + * + * I've created some new macros that make it easier to understand what's + * going on in the pixel calculations, and that make it easier to change the + * pixel size. + * + * name explanation + * ---- ----------- + * PSZ pixel size (in bits) + * PGSZ pixel group size (in bits) + * PGSZB pixel group size (in bytes) + * PGSZBMSK mask with lowest PGSZB bits set to 1 + * PPW pixels per word (pixels per pixel group) + * PPWMSK mask with lowest PPW bits set to 1 + * PLST index of last pixel in a word (should be PPW-1) + * PIM pixel index mask (index within a pixel group) + * PWSH pixel-to-word shift (should be log2(PPW)) + * PMSK mask with lowest PSZ bits set to 1 + * + * + * Here are some sample values. In the notation cfbA,B: A is PSZ, and + * B is PGSZB. All the other values are derived from these + * two. This table does not show all combinations! + * + * name cfb8,4 cfb24,4 cfb32,4 cfb8,8 cfb24,8 cfb32,8 + * ---- ------ ------- ------ ------ ------ ------- + * PSZ 8 24 32 8 24 32 + * PGSZ 32 32 32 64 64 64 + * PGSZB 4 4 4 8 8 8 + * PGSZBMSK 0xF 0xF? 0xF 0xFF 0xFF 0xFF + * PPW 4 1 1 8 2 2 + * PPWMSK 0xF 0x1 0x1 0xFF 0x3? 0x3 + * PLST 3 0 0 7 1 1 + * PIM 0x3 0x0 0x0 0x7 0x1? 0x1 + * PWSH 2 0 0 3 1 1 + * PMSK 0xFF 0xFFFFFF 0xFFFFFFFF 0xFF 0xFFFFFF 0xFFFFFFFF + * + * + * I have also added a new macro, PFILL, that takes one pixel and + * replicates it throughout a word. This macro definition is dependent + * upon pixel and word size; it doesn't use macros like PPW and so + * forth. Examples: for monochrome, PFILL(1) => 0xffffffff, PFILL(0) => + * 0x00000000. For 8-bit color, PFILL(0x5d) => 0x5d5d5d5d. This macro + * is used primarily for replicating a plane mask into a word. + * + * Color framebuffers operations also support the notion of a plane + * mask. This mask determines which planes of the framebuffer can be + * altered; the others are left unchanged. I have added another + * parameter to the putbits and putbitsrop macros that is the plane + * mask. + * ========================================================================== + * + * Keith Packard (keithp@suse.com) + * 64bit code is no longer supported; it requires DIX support + * for repadding images which significantly impacts performance + */ + +/* + * PSZ needs to be defined before we get here. Usually it comes from a + * -DPSZ=foo on the compilation command line. + */ + +#ifndef PSZ +#define PSZ 8 +#endif + +/* + * PixelGroup is the data type used to operate on groups of pixels. + * We typedef it here to CARD32 with the assumption that you + * want to manipulate 32 bits worth of pixels at a time as you can. If CARD32 + * is not appropriate for your server, define it to something else + * before including this file. In this case you will also have to define + * PGSZB to the size in bytes of PixelGroup. + */ +#ifndef PixelGroup +#define PixelGroup CARD32 +#define PGSZB 4 +#endif /* PixelGroup */ + +#ifndef CfbBits +#define CfbBits CARD32 +#endif + +#define PGSZ (PGSZB << 3) +#define PPW (PGSZ/PSZ) +#define PLST (PPW-1) +#define PIM PLST +#define PMSK (((PixelGroup)1 << PSZ) - 1) +#define PPWMSK (((PixelGroup)1 << PPW) - 1) /* instead of BITMSK */ +#define PGSZBMSK (((PixelGroup)1 << PGSZB) - 1) + +/* set PWSH = log2(PPW) using brute force */ + +#if PPW == 1 +#define PWSH 0 +#else +#if PPW == 2 +#define PWSH 1 +#else +#if PPW == 4 +#define PWSH 2 +#else +#if PPW == 8 +#define PWSH 3 +#else +#if PPW == 16 +#define PWSH 4 +#endif /* PPW == 16 */ +#endif /* PPW == 8 */ +#endif /* PPW == 4 */ +#endif /* PPW == 2 */ +#endif /* PPW == 1 */ + +/* Defining PIXEL_ADDR means that individual pixels are addressable by this + * machine (as type PixelType). A possible CFB architecture which supported + * 8-bits-per-pixel on a non byte-addressable machine would not have this + * defined. + * + * Defining FOUR_BIT_CODE means that cfb knows how to stipple on this machine; + * eventually, stippling code for 16 and 32 bit devices should be written + * which would allow them to also use FOUR_BIT_CODE. There isn't that + * much to do in those cases, but it would make them quite a bit faster. + */ + +#if PSZ == 8 +#define PIXEL_ADDR +typedef CARD8 PixelType; +#define FOUR_BIT_CODE +#endif + +#if PSZ == 16 +#define PIXEL_ADDR +typedef CARD16 PixelType; +#endif + +#if PSZ == 24 +#undef PMSK +#define PMSK 0xFFFFFF +/*#undef PIM +#define PIM 3*/ +#define PIXEL_ADDR +typedef CARD32 PixelType; +#endif + +#if PSZ == 32 +#undef PMSK +#define PMSK 0xFFFFFFFF +#define PIXEL_ADDR +typedef CARD32 PixelType; +#endif + + +/* the following notes use the following conventions: +SCREEN LEFT SCREEN RIGHT +in this file and maskbits.c, left and right refer to screen coordinates, +NOT bit numbering in registers. + +cfbstarttab[n] + pixels[0,n-1] = 0's pixels[n,PPW-1] = 1's +cfbendtab[n] = + pixels[0,n-1] = 1's pixels[n,PPW-1] = 0's + +cfbstartpartial[], cfbendpartial[] + these are used as accelerators for doing putbits and masking out +bits that are all contained between longword boudaries. the extra +256 bytes of data seems a small price to pay -- code is smaller, +and narrow things (e.g. window borders) go faster. + +the names may seem misleading; they are derived not from which end +of the word the bits are turned on, but at which end of a scanline +the table tends to be used. + +look at the tables and macros to understand boundary conditions. +(careful readers will note that starttab[n] = ~endtab[n] for n != 0) + +----------------------------------------------------------------------- +these two macros depend on the screen's bit ordering. +in both of them x is a screen position. they are used to +combine bits collected from multiple longwords into a +single destination longword, and to unpack a single +source longword into multiple destinations. + +SCRLEFT(dst, x) + takes dst[x, PPW] and moves them to dst[0, PPW-x] + the contents of the rest of dst are 0 ONLY IF + dst is UNSIGNED. + is cast as an unsigned. + this is a right shift on the VAX, left shift on + Sun and pc-rt. + +SCRRIGHT(dst, x) + takes dst[0,x] and moves them to dst[PPW-x, PPW] + the contents of the rest of dst are 0 ONLY IF + dst is UNSIGNED. + this is a left shift on the VAX, right shift on + Sun and pc-rt. + + +the remaining macros are cpu-independent; all bit order dependencies +are built into the tables and the two macros above. + +maskbits(x, w, startmask, endmask, nlw) + for a span of width w starting at position x, returns +a mask for ragged pixels at start, mask for ragged pixels at end, +and the number of whole longwords between the ends. + +maskpartialbits(x, w, mask) + works like maskbits(), except all the pixels are in the + same longword (i.e. (x&0xPIM + w) <= PPW) + +mask32bits(x, w, startmask, endmask, nlw) + as maskbits, but does not calculate nlw. it is used by + cfbGlyphBlt to put down glyphs <= PPW bits wide. + +getbits(psrc, x, w, dst) + starting at position x in psrc (x < PPW), collect w + pixels and put them in the screen left portion of dst. + psrc is a longword pointer. this may span longword boundaries. + it special-cases fetching all w bits from one longword. + + +--------+--------+ +--------+ + | | m |n| | ==> | m |n| | + +--------+--------+ +--------+ + x x+w 0 w + psrc psrc+1 dst + m = PPW - x + n = w - m + + implementation: + get m pixels, move to screen-left of dst, zeroing rest of dst; + get n pixels from next word, move screen-right by m, zeroing + lower m pixels of word. + OR the two things together. + +putbits(src, x, w, pdst, planemask) + starting at position x in pdst, put down the screen-leftmost + w bits of src. pdst is a longword pointer. this may + span longword boundaries. + it special-cases putting all w bits into the same longword. + + +--------+ +--------+--------+ + | m |n| | ==> | | m |n| | + +--------+ +--------+--------+ + 0 w x x+w + dst pdst pdst+1 + m = PPW - x + n = w - m + + implementation: + get m pixels, shift screen-right by x, zero screen-leftmost x + pixels; zero rightmost m bits of *pdst and OR in stuff + from before the semicolon. + shift src screen-left by m, zero bits n-32; + zero leftmost n pixels of *(pdst+1) and OR in the + stuff from before the semicolon. + +putbitsrop(src, x, w, pdst, planemask, ROP) + like putbits but calls DoRop with the rasterop ROP (see cfb.h for + DoRop) + +getleftbits(psrc, w, dst) + get the leftmost w (w<=PPW) bits from *psrc and put them + in dst. this is used by the cfbGlyphBlt code for glyphs + <=PPW bits wide. +*/ + +#if (BITMAP_BIT_ORDER == MSBFirst) +#define BitRight(lw,n) ((lw) >> (n)) +#define BitLeft(lw,n) ((lw) << (n)) +#else /* (BITMAP_BIT_ORDER == LSBFirst) */ +#define BitRight(lw,n) ((lw) << (n)) +#define BitLeft(lw,n) ((lw) >> (n)) +#endif /* (BITMAP_BIT_ORDER == MSBFirst) */ + +#define SCRLEFT(lw, n) BitLeft (lw, (n) * PSZ) +#define SCRRIGHT(lw, n) BitRight(lw, (n) * PSZ) + +/* + * Note that the shift direction is independent of the byte ordering of the + * machine. The following is portable code. + */ +#if PPW == 16 +#define PFILL(p) ( ((p)&PMSK) | \ + ((p)&PMSK) << PSZ | \ + ((p)&PMSK) << 2*PSZ | \ + ((p)&PMSK) << 3*PSZ | \ + ((p)&PMSK) << 4*PSZ | \ + ((p)&PMSK) << 5*PSZ | \ + ((p)&PMSK) << 6*PSZ | \ + ((p)&PMSK) << 7*PSZ | \ + ((p)&PMSK) << 8*PSZ | \ + ((p)&PMSK) << 9*PSZ | \ + ((p)&PMSK) << 10*PSZ | \ + ((p)&PMSK) << 11*PSZ | \ + ((p)&PMSK) << 12*PSZ | \ + ((p)&PMSK) << 13*PSZ | \ + ((p)&PMSK) << 14*PSZ | \ + ((p)&PMSK) << 15*PSZ ) +#define PFILL2(p, pf) { \ + pf = (p) & PMSK; \ + pf |= (pf << PSZ); \ + pf |= (pf << 2*PSZ); \ + pf |= (pf << 4*PSZ); \ + pf |= (pf << 8*PSZ); \ +} +#endif /* PPW == 16 */ +#if PPW == 8 +#define PFILL(p) ( ((p)&PMSK) | \ + ((p)&PMSK) << PSZ | \ + ((p)&PMSK) << 2*PSZ | \ + ((p)&PMSK) << 3*PSZ | \ + ((p)&PMSK) << 4*PSZ | \ + ((p)&PMSK) << 5*PSZ | \ + ((p)&PMSK) << 6*PSZ | \ + ((p)&PMSK) << 7*PSZ ) +#define PFILL2(p, pf) { \ + pf = (p) & PMSK; \ + pf |= (pf << PSZ); \ + pf |= (pf << 2*PSZ); \ + pf |= (pf << 4*PSZ); \ +} +#endif +#if PPW == 4 +#define PFILL(p) ( ((p)&PMSK) | \ + ((p)&PMSK) << PSZ | \ + ((p)&PMSK) << 2*PSZ | \ + ((p)&PMSK) << 3*PSZ ) +#define PFILL2(p, pf) { \ + pf = (p) & PMSK; \ + pf |= (pf << PSZ); \ + pf |= (pf << 2*PSZ); \ +} +#endif +#if PPW == 2 +#define PFILL(p) ( ((p)&PMSK) | \ + ((p)&PMSK) << PSZ ) +#define PFILL2(p, pf) { \ + pf = (p) & PMSK; \ + pf |= (pf << PSZ); \ +} +#endif +#if PPW == 1 +#define PFILL(p) (p) +#define PFILL2(p,pf) (pf = (p)) +#endif + +/* + * Reduced raster op - using precomputed values, perform the above + * in three instructions + */ + +#define DoRRop(dst, and, xor) (((dst) & (and)) ^ (xor)) + +#define DoMaskRRop(dst, and, xor, mask) \ + (((dst) & ((and) | ~(mask))) ^ (xor & mask)) + +#if PSZ != 32 || PPW != 1 + +# if (PSZ == 24 && PPW == 1) +#define maskbits(x, w, startmask, endmask, nlw) {\ + startmask = cfbstarttab[(x)&3]; \ + endmask = cfbendtab[((x)+(w)) & 3]; \ + nlw = ((((x)+(w))*3)>>2) - (((x)*3 +3)>>2); \ +} + +#define mask32bits(x, w, startmask, endmask) \ + startmask = cfbstarttab[(x)&3]; \ + endmask = cfbendtab[((x)+(w)) & 3]; + +#define maskpartialbits(x, w, mask) \ + mask = cfbstartpartial[(x) & 3] & cfbendpartial[((x)+(w)) & 3]; + +#define maskbits24(x, w, startmask, endmask, nlw) \ + startmask = cfbstarttab24[(x) & 3]; \ + endmask = cfbendtab24[((x)+(w)) & 3]; \ + if (startmask){ \ + nlw = (((w) - (4 - ((x) & 3))) >> 2); \ + } else { \ + nlw = (w) >> 2; \ + } + +#define getbits24(psrc, dst, index) {\ + register int idx; \ + switch(idx = ((index)&3)<<1){ \ + case 0: \ + dst = (*(psrc) &cfbmask[idx]); \ + break; \ + case 6: \ + dst = BitLeft((*(psrc) &cfbmask[idx]), cfb24Shift[idx]); \ + break; \ + default: \ + dst = BitLeft((*(psrc) &cfbmask[idx]), cfb24Shift[idx]) | \ + BitRight(((*((psrc)+1)) &cfbmask[idx+1]), cfb24Shift[idx+1]); \ + }; \ +} + +#define putbits24(src, w, pdst, planemask, index) {\ + register PixelGroup dstpixel; \ + register unsigned int idx; \ + switch(idx = ((index)&3)<<1){ \ + case 0: \ + dstpixel = (*(pdst) &cfbmask[idx]); \ + break; \ + case 6: \ + dstpixel = BitLeft((*(pdst) &cfbmask[idx]), cfb24Shift[idx]); \ + break; \ + default: \ + dstpixel = BitLeft((*(pdst) &cfbmask[idx]), cfb24Shift[idx])| \ + BitRight(((*((pdst)+1)) &cfbmask[idx+1]), cfb24Shift[idx+1]); \ + }; \ + dstpixel &= ~(planemask); \ + dstpixel |= (src & planemask); \ + *(pdst) &= cfbrmask[idx]; \ + switch(idx){ \ + case 0: \ + *(pdst) |= (dstpixel & cfbmask[idx]); \ + break; \ + case 2: \ + case 4: \ + pdst++;idx++; \ + *(pdst) = ((*(pdst)) & cfbrmask[idx]) | \ + (BitLeft(dstpixel, cfb24Shift[idx]) & cfbmask[idx]); \ + pdst--;idx--; \ + case 6: \ + *(pdst) |= (BitRight(dstpixel, cfb24Shift[idx]) & cfbmask[idx]); \ + break; \ + }; \ +} + +#define putbitsrop24(src, x, pdst, planemask, rop) \ +{ \ + register PixelGroup t1, dstpixel; \ + register unsigned int idx; \ + switch(idx = (x)<<1){ \ + case 0: \ + dstpixel = (*(pdst) &cfbmask[idx]); \ + break; \ + case 6: \ + dstpixel = BitLeft((*(pdst) &cfbmask[idx]), cfb24Shift[idx]); \ + break; \ + default: \ + dstpixel = BitLeft((*(pdst) &cfbmask[idx]), cfb24Shift[idx])| \ + BitRight(((*((pdst)+1)) &cfbmask[idx+1]), cfb24Shift[idx+1]); \ + }; \ + DoRop(t1, rop, (src), dstpixel); \ + dstpixel &= ~planemask; \ + dstpixel |= (t1 & planemask); \ + *(pdst) &= cfbrmask[idx]; \ + switch(idx){ \ + case 0: \ + *(pdst) |= (dstpixel & cfbmask[idx]); \ + break; \ + case 2: \ + case 4: \ + *((pdst)+1) = ((*((pdst)+1)) & cfbrmask[idx+1]) | \ + (BitLeft(dstpixel, cfb24Shift[idx+1]) & (cfbmask[idx+1])); \ + case 6: \ + *(pdst) |= (BitRight(dstpixel, cfb24Shift[idx]) & cfbmask[idx]); \ + }; \ +} +# else /* PSZ == 24 && PPW == 1 */ +#define maskbits(x, w, startmask, endmask, nlw) \ + startmask = cfbstarttab[(x)&PIM]; \ + endmask = cfbendtab[((x)+(w)) & PIM]; \ + if (startmask) \ + nlw = (((w) - (PPW - ((x)&PIM))) >> PWSH); \ + else \ + nlw = (w) >> PWSH; + +#define maskpartialbits(x, w, mask) \ + mask = cfbstartpartial[(x) & PIM] & cfbendpartial[((x) + (w)) & PIM]; + +#define mask32bits(x, w, startmask, endmask) \ + startmask = cfbstarttab[(x)&PIM]; \ + endmask = cfbendtab[((x)+(w)) & PIM]; + +/* FIXME */ +#define maskbits24(x, w, startmask, endmask, nlw) \ + abort() +#define getbits24(psrc, dst, index) \ + abort() +#define putbits24(src, w, pdst, planemask, index) \ + abort() +#define putbitsrop24(src, x, pdst, planemask, rop) \ + abort() + +#endif /* PSZ == 24 && PPW == 1 */ + +#define getbits(psrc, x, w, dst) \ +if ( ((x) + (w)) <= PPW) \ +{ \ + dst = SCRLEFT(*(psrc), (x)); \ +} \ +else \ +{ \ + int m; \ + m = PPW-(x); \ + dst = (SCRLEFT(*(psrc), (x)) & cfbendtab[m]) | \ + (SCRRIGHT(*((psrc)+1), m) & cfbstarttab[m]); \ +} + + +#define putbits(src, x, w, pdst, planemask) \ +if ( ((x)+(w)) <= PPW) \ +{ \ + PixelGroup tmpmask; \ + maskpartialbits((x), (w), tmpmask); \ + tmpmask &= PFILL(planemask); \ + *(pdst) = (*(pdst) & ~tmpmask) | (SCRRIGHT(src, x) & tmpmask); \ +} \ +else \ +{ \ + unsigned int m; \ + unsigned int n; \ + PixelGroup pm = PFILL(planemask); \ + m = PPW-(x); \ + n = (w) - m; \ + *(pdst) = (*(pdst) & (cfbendtab[x] | ~pm)) | \ + (SCRRIGHT(src, x) & (cfbstarttab[x] & pm)); \ + *((pdst)+1) = (*((pdst)+1) & (cfbstarttab[n] | ~pm)) | \ + (SCRLEFT(src, m) & (cfbendtab[n] & pm)); \ +} +#if defined(__GNUC__) && defined(mc68020) +#undef getbits +#define FASTGETBITS(psrc, x, w, dst) \ + asm ("bfextu %3{%1:%2},%0" \ + : "=d" (dst) : "di" (x), "di" (w), "o" (*(char *)(psrc))) + +#define getbits(psrc,x,w,dst) \ +{ \ + FASTGETBITS(psrc, (x) * PSZ, (w) * PSZ, dst); \ + dst = SCRLEFT(dst,PPW-(w)); \ +} + +#define FASTPUTBITS(src, x, w, pdst) \ + asm ("bfins %3,%0{%1:%2}" \ + : "=o" (*(char *)(pdst)) \ + : "di" (x), "di" (w), "d" (src), "0" (*(char *) (pdst))) + +#undef putbits +#define putbits(src, x, w, pdst, planemask) \ +{ \ + if (planemask != PMSK) { \ + PixelGroup _m, _pm; \ + FASTGETBITS(pdst, (x) * PSZ , (w) * PSZ, _m); \ + PFILL2(planemask, _pm); \ + _m &= (~_pm); \ + _m |= (SCRRIGHT(src, PPW-(w)) & _pm); \ + FASTPUTBITS(_m, (x) * PSZ, (w) * PSZ, pdst); \ + } else { \ + FASTPUTBITS(SCRRIGHT(src, PPW-(w)), (x) * PSZ, (w) * PSZ, pdst); \ + } \ +} + + +#endif /* mc68020 */ + +#define putbitsrop(src, x, w, pdst, planemask, rop) \ +if ( ((x)+(w)) <= PPW) \ +{ \ + PixelGroup tmpmask; \ + PixelGroup t1, t2; \ + maskpartialbits((x), (w), tmpmask); \ + PFILL2(planemask, t1); \ + tmpmask &= t1; \ + t1 = SCRRIGHT((src), (x)); \ + DoRop(t2, rop, t1, *(pdst)); \ + *(pdst) = (*(pdst) & ~tmpmask) | (t2 & tmpmask); \ +} \ +else \ +{ \ + CfbBits m; \ + CfbBits n; \ + PixelGroup t1, t2; \ + PixelGroup pm; \ + PFILL2(planemask, pm); \ + m = PPW-(x); \ + n = (w) - m; \ + t1 = SCRRIGHT((src), (x)); \ + DoRop(t2, rop, t1, *(pdst)); \ + *(pdst) = (*(pdst) & (cfbendtab[x] | ~pm)) | (t2 & (cfbstarttab[x] & pm));\ + t1 = SCRLEFT((src), m); \ + DoRop(t2, rop, t1, *((pdst) + 1)); \ + *((pdst)+1) = (*((pdst)+1) & (cfbstarttab[n] | ~pm)) | \ + (t2 & (cfbendtab[n] & pm)); \ +} + +#else /* PSZ == 32 && PPW == 1*/ + +/* + * These macros can be optimized for 32-bit pixels since there is no + * need to worry about left/right edge masking. These macros were + * derived from the above using the following reductions: + * + * - x & PIW = 0 [since PIW = 0] + * - all masking tables are only indexed by 0 [ due to above ] + * - cfbstartab[0] and cfbendtab[0] = 0 [ no left/right edge masks] + * - cfbstartpartial[0] and cfbendpartial[0] = ~0 [no partial pixel mask] + * + * Macro reduction based upon constants cannot be performed automatically + * by the compiler since it does not know the contents of the masking + * arrays in cfbmskbits.c. + */ +#define maskbits(x, w, startmask, endmask, nlw) \ + startmask = endmask = 0; \ + nlw = (w); + +#define maskpartialbits(x, w, mask) \ + mask = 0xFFFFFFFF; + +#define mask32bits(x, w, startmask, endmask) \ + startmask = endmask = 0; + +/* + * For 32-bit operations, getbits(), putbits(), and putbitsrop() + * will only be invoked with x = 0 and w = PPW (1). The getbits() + * macro is only called within left/right edge logic, which doesn't + * happen for 32-bit pixels. + */ +#define getbits(psrc, x, w, dst) (dst) = *(psrc) + +#define putbits(src, x, w, pdst, planemask) \ + *(pdst) = (*(pdst) & ~planemask) | (src & planemask); + +#define putbitsrop(src, x, w, pdst, planemask, rop) \ +{ \ + PixelGroup t1; \ + DoRop(t1, rop, (src), *(pdst)); \ + *(pdst) = (*(pdst) & ~planemask) | (t1 & planemask); \ +} + +#endif /* PSZ != 32 */ + +/* + * Use these macros only when you're using the MergeRop stuff + * in ../mfb/mergerop.h + */ + +/* useful only when not spanning destination longwords */ +#if PSZ == 24 +#define putbitsmropshort24(src,x,w,pdst,index) {\ + PixelGroup _tmpmask; \ + PixelGroup _t1; \ + maskpartialbits ((x), (w), _tmpmask); \ + _t1 = SCRRIGHT((src), (x)); \ + DoMaskMergeRop24(_t1, pdst, _tmpmask, index); \ +} +#endif +#define putbitsmropshort(src,x,w,pdst) {\ + PixelGroup _tmpmask; \ + PixelGroup _t1; \ + maskpartialbits ((x), (w), _tmpmask); \ + _t1 = SCRRIGHT((src), (x)); \ + *pdst = DoMaskMergeRop(_t1, *pdst, _tmpmask); \ +} + +/* useful only when spanning destination longwords */ +#define putbitsmroplong(src,x,w,pdst) { \ + PixelGroup _startmask, _endmask; \ + int _m; \ + PixelGroup _t1; \ + _m = PPW - (x); \ + _startmask = cfbstarttab[x]; \ + _endmask = cfbendtab[(w) - _m]; \ + _t1 = SCRRIGHT((src), (x)); \ + pdst[0] = DoMaskMergeRop(_t1,pdst[0],_startmask); \ + _t1 = SCRLEFT ((src),_m); \ + pdst[1] = DoMaskMergeRop(_t1,pdst[1],_endmask); \ +} + +#define putbitsmrop(src,x,w,pdst) \ +if ((x) + (w) <= PPW) {\ + putbitsmropshort(src,x,w,pdst); \ +} else { \ + putbitsmroplong(src,x,w,pdst); \ +} + +#if GETLEFTBITS_ALIGNMENT == 1 +#define getleftbits(psrc, w, dst) dst = *((unsigned int *) psrc) +#define getleftbits24(psrc, w, dst, idx){ \ + regiseter int index; \ + switch(index = ((idx)&3)<<1){ \ + case 0: \ + dst = (*((unsigned int *) psrc))&cfbmask[index]; \ + break; \ + case 2: \ + case 4: \ + dst = BitLeft(((*((unsigned int *) psrc))&cfbmask[index]), cfb24Shift[index]); \ + dst |= BitRight(((*((unsigned int *) psrc)+1)&cfbmask[index]), cfb4Shift[index]); \ + break; \ + case 6: \ + dst = BitLeft((*((unsigned int *) psrc)),cfb24Shift[index]); \ + break; \ + }; \ +} +#endif /* GETLEFTBITS_ALIGNMENT == 1 */ + +#define getglyphbits(psrc, x, w, dst) \ +{ \ + dst = BitLeft((unsigned) *(psrc), (x)); \ + if ( ((x) + (w)) > 32) \ + dst |= (BitRight((unsigned) *((psrc)+1), 32-(x))); \ +} +#if GETLEFTBITS_ALIGNMENT == 2 +#define getleftbits(psrc, w, dst) \ + { \ + if ( ((int)(psrc)) & 0x01 ) \ + getglyphbits( ((unsigned int *)(((char *)(psrc))-1)), 8, (w), (dst) ); \ + else \ + dst = *((unsigned int *) psrc); \ + } +#endif /* GETLEFTBITS_ALIGNMENT == 2 */ + +#if GETLEFTBITS_ALIGNMENT == 4 +#define getleftbits(psrc, w, dst) \ + { \ + int off, off_b; \ + off_b = (off = ( ((int)(psrc)) & 0x03)) << 3; \ + getglyphbits( \ + (unsigned int *)( ((char *)(psrc)) - off), \ + (off_b), (w), (dst) \ + ); \ + } +#endif /* GETLEFTBITS_ALIGNMENT == 4 */ + +/* + * getstipplepixels( psrcstip, x, w, ones, psrcpix, destpix ) + * + * Converts bits to pixels in a reasonable way. Takes w (1 <= w <= PPW) + * bits from *psrcstip, starting at bit x; call this a quartet of bits. + * Then, takes the pixels from *psrcpix corresponding to the one-bits (if + * ones is TRUE) or the zero-bits (if ones is FALSE) of the quartet + * and puts these pixels into destpix. + * + * Example: + * + * getstipplepixels( &(0x08192A3B), 17, 4, 1, &(0x4C5D6E7F), dest ) + * + * 0x08192A3B = 0000 1000 0001 1001 0010 1010 0011 1011 + * + * This will take 4 bits starting at bit 17, so the quartet is 0x5 = 0101. + * It will take pixels from 0x4C5D6E7F corresponding to the one-bits in this + * quartet, so dest = 0x005D007F. + * + * XXX Works with both byte order. + * XXX This works for all values of x and w within a doubleword. + */ +#if (BITMAP_BIT_ORDER == MSBFirst) +#define getstipplepixels( psrcstip, x, w, ones, psrcpix, destpix ) \ +{ \ + PixelGroup q; \ + int m; \ + if ((m = ((x) - ((PPW*PSZ)-PPW))) > 0) { \ + q = (*(psrcstip)) << m; \ + if ( (x)+(w) > (PPW*PSZ) ) \ + q |= *((psrcstip)+1) >> ((PPW*PSZ)-m); \ + } \ + else \ + q = (*(psrcstip)) >> -m; \ + q = QuartetBitsTable[(w)] & ((ones) ? q : ~q); \ + *(destpix) = (*(psrcpix)) & QuartetPixelMaskTable[q]; \ +} +/* I just copied this to get the linker satisfied on PowerPC, + * so this may not be correct at all. + */ +#define getstipplepixels24(psrcstip,xt,ones,psrcpix,destpix,stipindex) \ +{ \ + PixelGroup q; \ + q = *(psrcstip) >> (xt); \ + q = ((ones) ? q : ~q) & 1; \ + *(destpix) = (*(psrcpix)) & QuartetPixelMaskTable[q]; \ +} +#else /* BITMAP_BIT_ORDER == LSB */ + +/* this must load 32 bits worth; for most machines, thats an int */ +#define CfbFetchUnaligned(x) ldl_u(x) + +#define getstipplepixels( psrcstip, xt, w, ones, psrcpix, destpix ) \ +{ \ + PixelGroup q; \ + q = CfbFetchUnaligned(psrcstip) >> (xt); \ + if ( ((xt)+(w)) > (PPW*PSZ) ) \ + q |= (CfbFetchUnaligned((psrcstip)+1)) << ((PPW*PSZ)-(xt)); \ + q = QuartetBitsTable[(w)] & ((ones) ? q : ~q); \ + *(destpix) = (*(psrcpix)) & QuartetPixelMaskTable[q]; \ +} +#if PSZ == 24 +# if 0 +#define getstipplepixels24(psrcstip,xt,w,ones,psrcpix,destpix,stipindex,srcindex,dstindex) \ +{ \ + PixelGroup q; \ + CfbBits src; \ + register unsigned int sidx; \ + register unsigned int didx; \ + sidx = ((srcindex) & 3)<<1; \ + didx = ((dstindex) & 3)<<1; \ + q = *(psrcstip) >> (xt); \ +/* if((srcindex)!=0)*/ \ +/* src = (((*(psrcpix)) << cfb24Shift[sidx]) & (cfbmask[sidx])) |*/ \ +/* (((*((psrcpix)+1)) << cfb24Shift[sidx+1]) & (cfbmask[sidx+1])); */\ +/* else */\ + src = (*(psrcpix))&0xFFFFFF; \ + if ( ((xt)+(w)) > PGSZ ) \ + q |= (*((psrcstip)+1)) << (PGSZ -(xt)); \ + q = QuartetBitsTable[(w)] & ((ones) ? q : ~q); \ + src &= QuartetPixelMaskTable[q]; \ + *(destpix) &= cfbrmask[didx]; \ + switch(didx) {\ + case 0: \ + *(destpix) |= (src &cfbmask[didx]); \ + break; \ + case 2: \ + case 4: \ + destpix++;didx++; \ + *(destpix) = ((*(destpix)) & (cfbrmask[didx]))| \ + (BitLeft(src, cfb24Shift[didx]) & (cfbmask[didx])); \ + destpix--; didx--;\ + case 6: \ + *(destpix) |= (BitRight(src, cfb24Shift[didx]) & cfbmask[didx]); \ + break; \ + }; \ +} +# else +#define getstipplepixels24(psrcstip,xt,ones,psrcpix,destpix,stipindex) \ +{ \ + PixelGroup q; \ + q = *(psrcstip) >> (xt); \ + q = ((ones) ? q : ~q) & 1; \ + *(destpix) = (*(psrcpix)) & QuartetPixelMaskTable[q]; \ +} +# endif +#endif /* PSZ == 24 */ +#endif + +extern PixelGroup cfbstarttab[]; +extern PixelGroup cfbendtab[]; +extern PixelGroup cfbstartpartial[]; +extern PixelGroup cfbendpartial[]; +extern PixelGroup cfbrmask[]; +extern PixelGroup cfbmask[]; +extern PixelGroup QuartetBitsTable[]; +extern PixelGroup QuartetPixelMaskTable[]; +#if PSZ == 24 +extern int cfb24Shift[]; +#endif diff --git a/xorg-server-1.4/cfb/cfbpixmap.c b/xorg-server-1.4/cfb/cfbpixmap.c new file mode 100644 index 0000000..6fdf3ea --- /dev/null +++ b/xorg-server-1.4/cfb/cfbpixmap.c @@ -0,0 +1,372 @@ +/*********************************************************** + +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 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. + +******************************************************************/ +/* pixmap management + written by drewry, september 1986 + + on a monchrome device, a pixmap is a bitmap. +*/ + +#include + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "servermd.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "mi.h" +#include "cfb.h" +#include "cfbmskbits.h" + +PixmapPtr +cfbCreatePixmap (pScreen, width, height, depth) + ScreenPtr pScreen; + int width; + int height; + int depth; +{ + PixmapPtr pPixmap; + size_t datasize; + size_t paddedWidth; + + paddedWidth = PixmapBytePad(width, depth); + + if (paddedWidth / 4 > 32767 || height > 32767) + return NullPixmap; + datasize = height * paddedWidth; + pPixmap = AllocatePixmap(pScreen, datasize); + if (!pPixmap) + return NullPixmap; + pPixmap->drawable.type = DRAWABLE_PIXMAP; + pPixmap->drawable.class = 0; + pPixmap->drawable.pScreen = pScreen; + pPixmap->drawable.depth = depth; + pPixmap->drawable.bitsPerPixel = BitsPerPixel(depth); + pPixmap->drawable.id = 0; + pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + pPixmap->drawable.x = 0; + pPixmap->drawable.y = 0; + pPixmap->drawable.width = width; + pPixmap->drawable.height = height; + pPixmap->devKind = paddedWidth; + pPixmap->refcnt = 1; + pPixmap->devPrivate.ptr = datasize ? + (pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL; + return pPixmap; +} + +Bool +cfbDestroyPixmap(pPixmap) + PixmapPtr pPixmap; +{ + if(--pPixmap->refcnt) + return TRUE; + xfree(pPixmap); + return TRUE; +} + +PixmapPtr +cfbCopyPixmap(pSrc) + register PixmapPtr pSrc; +{ + register PixmapPtr pDst; + int size; + ScreenPtr pScreen; + + size = pSrc->drawable.height * pSrc->devKind; + pScreen = pSrc->drawable.pScreen; + pDst = (*pScreen->CreatePixmap) (pScreen, pSrc->drawable.width, + pSrc->drawable.height, pSrc->drawable.depth); + if (!pDst) + return NullPixmap; + memmove((char *)pDst->devPrivate.ptr, (char *)pSrc->devPrivate.ptr, size); + return pDst; +} + + +/* replicates a pattern to be a full 32 bits wide. + relies on the fact that each scnaline is longword padded. + doesn't do anything if pixmap is not a factor of 32 wide. + changes width field of pixmap if successful, so that the fast + cfbXRotatePixmap code gets used if we rotate the pixmap later. + cfbYRotatePixmap code gets used if we rotate the pixmap later. + + calculate number of times to repeat + for each scanline of pattern + zero out area to be filled with replicate + left shift and or in original as many times as needed +*/ +void +cfbPadPixmap(pPixmap) + PixmapPtr pPixmap; +{ + register int width = (pPixmap->drawable.width) * (pPixmap->drawable.bitsPerPixel); + register int h; + register CfbBits mask; + register CfbBits *p; + register CfbBits bits; /* real pattern bits */ + register int i; + int rep; /* repeat count for pattern */ + + if (width >= PGSZ) + return; + + rep = PGSZ/width; + if (rep*width != PGSZ) + return; + + mask = mfbGetendtab(width); + + p = (CfbBits *)(pPixmap->devPrivate.ptr); + for (h=0; h < pPixmap->drawable.height; h++) + { + *p &= mask; + bits = *p; + for(i=1; i>= width; +#else + bits <<= width; +#endif + *p |= bits; + } + p++; + } + pPixmap->drawable.width = PGSZ/(pPixmap->drawable.bitsPerPixel); +} + + +#ifdef notdef +/* + * cfb debugging routine -- assumes pixmap is 1 byte deep + */ +static cfbdumppixmap(pPix) + PixmapPtr pPix; +{ + unsigned int *pw; + char *psrc, *pdst; + int i, j; + char line[66]; + + ErrorF( "pPixmap: 0x%x\n", pPix); + ErrorF( "%d wide %d high\n", pPix->drawable.width, pPix->drawable.height); + if (pPix->drawable.width > 64) + { + ErrorF( "too wide to see\n"); + return; + } + + pw = (unsigned int *) pPix->devPrivate.ptr; + psrc = (char *) pw; + +/* + for ( i=0; idrawable.height; ++i ) + ErrorF( "0x%x\n", pw[i] ); +*/ + + for ( i = 0; i < pPix->drawable.height; ++i ) { + pdst = line; + for(j = 0; j < pPix->drawable.width; j++) { + *pdst++ = *psrc++ ? 'X' : ' ' ; + } + *pdst++ = '\n'; + *pdst++ = '\0'; + ErrorF( "%s", line); + } +} +#endif /* notdef */ + +/* Rotates pixmap pPix by w pixels to the right on the screen. Assumes that + * words are PGSZ bits wide, and that the least significant bit appears on the + * left. + */ +void +cfbXRotatePixmap(pPix, rw) + PixmapPtr pPix; + register int rw; +{ + register CfbBits *pw, *pwFinal; + register CfbBits t; + int rot; + + if (pPix == NullPixmap) + return; + + switch (((DrawablePtr) pPix)->bitsPerPixel) { + case PSZ: + break; + case 1: + mfbXRotatePixmap(pPix, rw); + return; + default: + ErrorF("cfbXRotatePixmap: unsupported bitsPerPixel %d\n", ((DrawablePtr) pPix)->bitsPerPixel); + return; + } + pw = (CfbBits *)pPix->devPrivate.ptr; + modulus (rw, (int) pPix->drawable.width, rot); + if(pPix->drawable.width == PPW) + { + pwFinal = pw + pPix->drawable.height; + while(pw < pwFinal) + { + t = *pw; + *pw++ = SCRRIGHT(t, rot) | + (SCRLEFT(t, (PPW-rot)) & cfbendtab[rot]); + } + } + else + { + ErrorF("cfb internal error: trying to rotate odd-sized pixmap.\n"); +#ifdef notdef + register CfbBits *pwTmp; + int size, tsize; + + tsize = PixmapBytePad(pPix->drawable.width - rot, pPix->drawable.depth); + pwTmp = (CfbBits *) ALLOCATE_LOCAL(pPix->drawable.height * tsize); + if (!pwTmp) + return; + /* divide pw (the pixmap) in two vertically at (w - rot) and swap */ + tsize >>= 2; + size = pPix->devKind >> SIZE0F(PixelGroup); + cfbQuickBlt((CfbBits *)pw, (CfbBits *)pwTmp, + 0, 0, 0, 0, + (int)pPix->drawable.width - rot, (int)pPix->drawable.height, + size, tsize); + cfbQuickBlt((CfbBits *)pw, (CfbBits *)pw, + (int)pPix->drawable.width - rot, 0, 0, 0, + rot, (int)pPix->drawable.height, + size, size); + cfbQuickBlt((CfbBits *)pwTmp, (CfbBits *)pw, + 0, 0, rot, 0, + (int)pPix->drawable.width - rot, (int)pPix->drawable.height, + tsize, size); + DEALLOCATE_LOCAL(pwTmp); +#endif + } +} + +/* Rotates pixmap pPix by h lines. Assumes that h is always less than + pPix->drawable.height + works on any width. + */ +void +cfbYRotatePixmap(pPix, rh) + register PixmapPtr pPix; + int rh; +{ + int nbyDown; /* bytes to move down to row 0; also offset of + row rh */ + int nbyUp; /* bytes to move up to line rh; also + offset of first line moved down to 0 */ + char *pbase; + char *ptmp; + int rot; + + if (pPix == NullPixmap) + return; + switch (((DrawablePtr) pPix)->bitsPerPixel) { + case PSZ: + break; + case 1: + mfbYRotatePixmap(pPix, rh); + return; + default: + ErrorF("cfbYRotatePixmap: unsupported bitsPerPixel %d\n", ((DrawablePtr) pPix)->bitsPerPixel); + return; + } + + modulus (rh, (int) pPix->drawable.height, rot); + pbase = (char *)pPix->devPrivate.ptr; + + nbyDown = rot * pPix->devKind; + nbyUp = (pPix->devKind * pPix->drawable.height) - nbyDown; + if(!(ptmp = (char *)ALLOCATE_LOCAL(nbyUp))) + return; + + memmove(ptmp, pbase, nbyUp); /* save the low rows */ + memmove(pbase, pbase+nbyUp, nbyDown); /* slide the top rows down */ + memmove(pbase+nbyDown, ptmp, nbyUp); /* move lower rows up to row rot */ + DEALLOCATE_LOCAL(ptmp); +} + +void +cfbCopyRotatePixmap(psrcPix, ppdstPix, xrot, yrot) + register PixmapPtr psrcPix, *ppdstPix; + int xrot, yrot; +{ + register PixmapPtr pdstPix; + + if ((pdstPix = *ppdstPix) && + (pdstPix->devKind == psrcPix->devKind) && + (pdstPix->drawable.height == psrcPix->drawable.height)) + { + memmove((char *)pdstPix->devPrivate.ptr, + (char *)psrcPix->devPrivate.ptr, + psrcPix->drawable.height * psrcPix->devKind); + pdstPix->drawable.width = psrcPix->drawable.width; + pdstPix->drawable.depth = psrcPix->drawable.depth; + pdstPix->drawable.bitsPerPixel = psrcPix->drawable.bitsPerPixel; + pdstPix->drawable.serialNumber = NEXT_SERIAL_NUMBER; + } + else + { + if (pdstPix) + /* FIX XBUG 6168 */ + (*pdstPix->drawable.pScreen->DestroyPixmap)(pdstPix); + *ppdstPix = pdstPix = cfbCopyPixmap(psrcPix); + if (!pdstPix) + return; + } + cfbPadPixmap(pdstPix); + if (xrot) + cfbXRotatePixmap(pdstPix, xrot); + if (yrot) + cfbYRotatePixmap(pdstPix, yrot); +} diff --git a/xorg-server-1.4/cfb/cfbply1rct.c b/xorg-server-1.4/cfb/cfbply1rct.c new file mode 100644 index 0000000..ce0bcb2 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbply1rct.c @@ -0,0 +1,363 @@ +/* + * +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 + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include + +#include "gcstruct.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "scrnintstr.h" +#include "mistruct.h" + +#include "cfb.h" +#include "cfbmskbits.h" +#include "cfbrrop.h" + +void +RROP_NAME(cfbFillPoly1Rect) (pDrawable, pGC, shape, mode, count, ptsIn) + DrawablePtr pDrawable; + GCPtr pGC; + int shape; + int mode; + int count; + DDXPointPtr ptsIn; +{ + cfbPrivGCPtr devPriv; + int nwidth; + CfbBits *addrl, *addr; +#if PSZ == 24 + CfbBits startmask, endmask; + register int pidx; +#else +#if PPW > 1 + CfbBits mask, bits = ~((CfbBits)0); +#endif +#endif + int maxy; + int origin; + register int vertex1, vertex2; + int c = 0; + BoxPtr extents; + int clip; + int y; + int *vertex1p = NULL, *vertex2p; + int *endp; + int x1 = 0, x2 = 0; + int dx1 = 0, dx2 = 0; + int dy1 = 0, dy2 = 0; + int e1 = 0, e2 = 0; + int step1 = 0, step2 = 0; + int sign1 = 0, sign2 = 0; + int h; + int l; +#if PSZ != 24 && PPW > 1 + int r; +#endif + int nmiddle; + RROP_DECLARE + + if (mode == CoordModePrevious) + { + miFillPolygon (pDrawable, pGC, shape, mode, count, ptsIn); + return; + } + + devPriv = cfbGetGCPrivate(pGC); +#ifdef NO_ONE_RECT + if (REGION_NUM_RECTS(pGC->pCompositeClip) != 1) + { + miFillPolygon (pDrawable, pGC, shape, mode, count, ptsIn); + return; + } +#endif + origin = *((int *) &pDrawable->x); + vertex2 = origin - ((origin & 0x8000) << 1); + extents = &pGC->pCompositeClip->extents; + RROP_FETCH_GCPRIV(devPriv); + vertex1 = *((int *) &extents->x1) - vertex2; + vertex2 = *((int *) &extents->x2) - vertex2 - 0x00010001; + clip = 0; + y = 32767; + maxy = 0; + vertex2p = (int *) ptsIn; + endp = vertex2p + count; + if (shape == Convex) + { + while (count--) + { + c = *vertex2p; + clip |= (c - vertex1) | (vertex2 - c); + c = intToY(c); + if (c < y) + { + y = c; + vertex1p = vertex2p; + } + vertex2p++; + if (c > maxy) + maxy = c; + } + } + else + { + int yFlip = 0; + dx1 = 1; + x2 = -1; + x1 = -1; + while (count--) + { + c = *vertex2p; + clip |= (c - vertex1) | (vertex2 - c); + c = intToY(c); + if (c < y) + { + y = c; + vertex1p = vertex2p; + } + vertex2p++; + if (c > maxy) + maxy = c; + if (c == x1) + continue; + if (dx1 > 0) + { + if (x2 < 0) + x2 = c; + else + dx2 = dx1 = (c - x1) >> 31; + } + else + if ((c - x1) >> 31 != dx1) + { + dx1 = ~dx1; + yFlip++; + } + x1 = c; + } + x1 = (x2 - c) >> 31; + if (x1 != dx1) + yFlip++; + if (x1 != dx2) + yFlip++; + if (yFlip != 2) + clip = 0x8000; + } + if (y == maxy) + return; + + if (clip & 0x80008000) + { + miFillPolygon (pDrawable, pGC, shape, mode, vertex2p - (int *) ptsIn, ptsIn); + return; + } + +#define AddrYPlus(a,y) (CfbBits *) (((unsigned char *) (a)) + (y) * nwidth) + + cfbGetTypedWidthAndPointer(pDrawable, nwidth, addrl, unsigned char, CfbBits); + addrl = AddrYPlus(addrl,y + pDrawable->y); + origin = intToX(origin); + vertex2p = vertex1p; + vertex2 = vertex1 = *vertex2p++; + if (vertex2p == endp) + vertex2p = (int *) ptsIn; +#define Setup(c,x,vertex,dx,dy,e,sign,step) {\ + x = intToX(vertex); \ + if ((dy = intToY(c) - y)) { \ + dx = intToX(c) - x; \ + step = 0; \ + if (dx >= 0) \ + { \ + e = 0; \ + sign = 1; \ + if (dx >= dy) {\ + step = dx / dy; \ + dx = dx % dy; \ + } \ + } \ + else \ + { \ + e = 1 - dy; \ + sign = -1; \ + dx = -dx; \ + if (dx >= dy) { \ + step = - (dx / dy); \ + dx = dx % dy; \ + } \ + } \ + } \ + x += origin; \ + vertex = c; \ +} + +#define Step(x,dx,dy,e,sign,step) {\ + x += step; \ + if ((e += dx) > 0) \ + { \ + x += sign; \ + e -= dy; \ + } \ +} + for (;;) + { + if (y == intToY(vertex1)) + { + do + { + if (vertex1p == (int *) ptsIn) + vertex1p = endp; + c = *--vertex1p; + Setup (c,x1,vertex1,dx1,dy1,e1,sign1,step1) + } while (y >= intToY(vertex1)); + h = dy1; + } + else + { + Step(x1,dx1,dy1,e1,sign1,step1) + h = intToY(vertex1) - y; + } + if (y == intToY(vertex2)) + { + do + { + c = *vertex2p++; + if (vertex2p == endp) + vertex2p = (int *) ptsIn; + Setup (c,x2,vertex2,dx2,dy2,e2,sign2,step2) + } while (y >= intToY(vertex2)); + if (dy2 < h) + h = dy2; + } + else + { + Step(x2,dx2,dy2,e2,sign2,step2) + if ((c = (intToY(vertex2) - y)) < h) + h = c; + } + /* fill spans for this segment */ + y += h; + for (;;) + { + l = x1; +#if PSZ != 24 && PPW > 1 + r = x2; +#endif + nmiddle = x2 - x1; + if (nmiddle < 0) + { + nmiddle = -nmiddle; + l = x2; +#if PSZ != 24 && PPW > 1 + r = x1; +#endif + } +#if PPW > 1 + c = l & PIM; + l -= c; +#endif + +#if PGSZ == 32 +#define LWRD_SHIFT 2 +#else /* PGSZ == 64 */ +#define LWRD_SHIFT 3 +#endif /* PGSZ */ + +#if PSZ == 24 + addr = (CfbBits *)((char *)addrl + ((l * 3) & ~0x03)); + if (nmiddle <= 1){ + if (nmiddle) + RROP_SOLID24(addr, l); + } else { + maskbits(l, nmiddle, startmask, endmask, nmiddle); + pidx = l & 3; + if (startmask){ + RROP_SOLID_MASK(addr, startmask, pidx-1); + addr++; + if (pidx == 3) + pidx = 0; + } + while (--nmiddle >= 0){ + RROP_SOLID(addr, pidx); + addr++; + if (++pidx == 3) + pidx = 0; + } + if (endmask) + RROP_SOLID_MASK(addr, endmask, pidx); + } +#else /* PSZ == 24 */ +#if PWSH > LWRD_SHIFT + l = l >> (PWSH - LWRD_SHIFT); +#endif +#if PWSH < LWRD_SHIFT + l = l << (LWRD_SHIFT - PWSH); +#endif + addr = (CfbBits *) (((char *) addrl) + l); +#if PPW > 1 + if (c + nmiddle < PPW) + { + mask = SCRRIGHT (bits,c) ^ SCRRIGHT (bits,c+nmiddle); + RROP_SOLID_MASK(addr,mask); + } + else + { + if (c) + { + mask = SCRRIGHT(bits, c); + RROP_SOLID_MASK(addr,mask); + nmiddle += c - PPW; + addr++; + } +#endif + nmiddle >>= PWSH; + while (--nmiddle >= 0) { + RROP_SOLID(addr); addr++; + } +#if PPW > 1 + if ((mask = ~SCRRIGHT(bits, r & PIM))) + RROP_SOLID_MASK(addr,mask); + } +#endif +#endif /* PSZ == 24 */ + if (!--h) + break; + addrl = AddrYPlus (addrl, 1); + Step(x1,dx1,dy1,e1,sign1,step1) + Step(x2,dx2,dy2,e2,sign2,step2) + } + if (y == maxy) + break; + addrl = AddrYPlus (addrl, 1); + } + RROP_UNDECLARE +} diff --git a/xorg-server-1.4/cfb/cfbply1rctC.c b/xorg-server-1.4/cfb/cfbply1rctC.c new file mode 100644 index 0000000..6c2414d --- /dev/null +++ b/xorg-server-1.4/cfb/cfbply1rctC.c @@ -0,0 +1,2 @@ +#define RROP GXcopy +#include "../cfb/cfbply1rct.c" diff --git a/xorg-server-1.4/cfb/cfbply1rctG.c b/xorg-server-1.4/cfb/cfbply1rctG.c new file mode 100644 index 0000000..6d9be88 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbply1rctG.c @@ -0,0 +1,2 @@ +#define RROP GXset +#include "../cfb/cfbply1rct.c" diff --git a/xorg-server-1.4/cfb/cfbpntwin.c b/xorg-server-1.4/cfb/cfbpntwin.c new file mode 100644 index 0000000..32f011e --- /dev/null +++ b/xorg-server-1.4/cfb/cfbpntwin.c @@ -0,0 +1,768 @@ +/*********************************************************** + +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 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. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "windowstr.h" +#include "regionstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" + +#include "cfb.h" +#include "cfbmskbits.h" +#include "mi.h" + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif + +void +cfbPaintWindow(pWin, pRegion, what) + WindowPtr pWin; + RegionPtr pRegion; + int what; +{ + register cfbPrivWin *pPrivWin; + WindowPtr pBgWin; + + pPrivWin = cfbGetWindowPrivate(pWin); + + + switch (what) { + case PW_BACKGROUND: + switch (pWin->backgroundState) { + case None: + break; + case ParentRelative: + do { + pWin = pWin->parent; + } while (pWin->backgroundState == ParentRelative); + (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, + what); + break; + case BackgroundPixmap: + if (pPrivWin->fastBackground) + { + cfbFillBoxTile32 ((DrawablePtr)pWin, + (int)REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), + pPrivWin->pRotatedBackground); + } + else + { + int xorg = pWin->drawable.x; + int yorg = pWin->drawable.y; +#ifdef PANORAMIX + if(!noPanoramiXExtension) { + int index = pWin->drawable.pScreen->myNum; + if(WindowTable[index] == pWin) { + xorg -= panoramiXdataPtr[index].x; + yorg -= panoramiXdataPtr[index].y; + } + } +#endif + cfbFillBoxTileOdd ((DrawablePtr)pWin, + (int)REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), + pWin->background.pixmap, + xorg, yorg); + } + break; + case BackgroundPixel: + cfbFillBoxSolid ((DrawablePtr)pWin, + (int)REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), + pWin->background.pixel); + break; + } + break; + case PW_BORDER: + if (pWin->borderIsPixel) + { + cfbFillBoxSolid ((DrawablePtr)pWin, + (int)REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), + pWin->border.pixel); + } + else if (pPrivWin->fastBorder) + { + cfbFillBoxTile32 ((DrawablePtr)pWin, + (int)REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), + pPrivWin->pRotatedBorder); + } + else + { + int xorg, yorg; + + for (pBgWin = pWin; + pBgWin->backgroundState == ParentRelative; + pBgWin = pBgWin->parent); + + xorg = pBgWin->drawable.x; + yorg = pBgWin->drawable.y; + +#ifdef PANORAMIX + if(!noPanoramiXExtension) { + int index = pWin->drawable.pScreen->myNum; + if(WindowTable[index] == pBgWin) { + xorg -= panoramiXdataPtr[index].x; + yorg -= panoramiXdataPtr[index].y; + } + } +#endif + + cfbFillBoxTileOdd ((DrawablePtr)pWin, + (int)REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), + pWin->border.pixmap, + xorg, yorg); + } + break; + } +} + +/* + * Use the RROP macros in copy mode + */ + +#define RROP GXcopy +#include "cfbrrop.h" + +#ifdef RROP_UNROLL +# define Expand(left,right,leftAdjust) {\ + int part = nmiddle & RROP_UNROLL_MASK; \ + int widthStep; \ + widthStep = widthDst - nmiddle - leftAdjust; \ + nmiddle >>= RROP_UNROLL_SHIFT; \ + while (h--) { \ + left \ + pdst += part; \ + switch (part) { \ + RROP_UNROLL_CASE(pdst) \ + } \ + m = nmiddle; \ + while (m) { \ + pdst += RROP_UNROLL; \ + RROP_UNROLL_LOOP(pdst) \ + m--; \ + } \ + right \ + pdst += widthStep; \ + } \ +} + +#else +# define Expand(left, right, leftAdjust) { \ + int widthStep; \ + widthStep = widthDst - nmiddle - leftAdjust; \ + while (h--) { \ + left \ + m = nmiddle; \ + while (m--) {\ + RROP_SOLID(pdst); \ + pdst++; \ + } \ + right \ + pdst += widthStep; \ + } \ +} +#endif + +void +cfbFillBoxSolid (pDrawable, nBox, pBox, pixel) + DrawablePtr pDrawable; + int nBox; + BoxPtr pBox; + unsigned long pixel; +{ + CfbBits *pdstBase; + int widthDst; + register int h; + register CfbBits *pdst; + int nmiddle; + int w; +#if PSZ == 24 + int leftIndex, rightIndex; + CfbBits piQxelArray[3], *pdstULC; /*upper left corner*/ + + piQxelArray[0] = (pixel&0xFFFFFF) | ((pixel&0xFF)<<24); + piQxelArray[1] = ((pixel&0xFFFF00)>>8) | ((pixel&0xFFFF)<<16); + piQxelArray[2] = ((pixel&0xFFFFFF)<<8) | ((pixel&0xFF0000)>>16); +#else + register CfbBits rrop_xor; + register CfbBits leftMask, rightMask; + register int m; +#endif + + cfbGetLongWidthAndPointer(pDrawable, widthDst, pdstBase); + +#if PSZ != 24 + rrop_xor = PFILL(pixel); +#endif + for (; nBox; nBox--, pBox++) + { + pdst = pdstBase + pBox->y1 * widthDst; + h = pBox->y2 - pBox->y1; + w = pBox->x2 - pBox->x1; +#if PSZ == 8 + if (w == 1) + { + register char *pdstb = ((char *) pdst) + pBox->x1; + int incr = widthDst * PGSZB; + + while (h--) + { + *pdstb = rrop_xor; + pdstb += incr; + } + } + else + { +#endif +#if PSZ == 24 +/* _Box has x1, y1, x2, y2*/ + leftIndex = pBox->x1 & 3; + rightIndex = ((leftIndex+w)<5)?0:(pBox->x2 &3); + nmiddle = w - rightIndex; + if(leftIndex){ + nmiddle -= (4 - leftIndex); + } + nmiddle >>= 2; + if(nmiddle < 0) + nmiddle = 0; + + pdst = pdstBase + pBox->y1 * widthDst + ((pBox->x1*3) >> 2); + + switch(leftIndex+w){ + case 4: + switch(leftIndex){ + case 0: + while(h--){ + *pdst++ = piQxelArray[0]; + *pdst++ = piQxelArray[1]; + *pdst = piQxelArray[2]; + pdst -=2; + pdst += widthDst; + } + break; + case 1: + while(h--){ + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + pdst++; + *pdst++ = piQxelArray[1]; + *pdst = piQxelArray[2]; + pdst -=2; + pdst += widthDst; + } + break; + case 2: + while(h--){ + *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); + pdst++; + *pdst-- = piQxelArray[2]; + pdst += widthDst; + } + break; + case 3: + while(h--){ + *pdst = ((*pdst) & 0xFF) | (piQxelArray[2] & 0xFFFFFF00); + pdst += widthDst; + } + break; + } + break; + case 3: + switch(leftIndex){ + case 0: + while(h--){ + *pdst++ = piQxelArray[0]; + *pdst++ = piQxelArray[1]; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + pdst--; + pdst--; + pdst += widthDst; + } + break; + case 1: + while(h--){ + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + pdst++; + *pdst++ = piQxelArray[1]; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + pdst--; + pdst--; + pdst += widthDst; + } + break; + case 2: + while(h--){ + *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); + pdst++; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + pdst--; + pdst += widthDst; + } + break; + } + break; + case 2: + while(h--){ + if(leftIndex){ + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + pdst++; + } + else{ + *pdst++ = piQxelArray[0]; + } + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelArray[1] & 0xFFFF); + pdst--; + pdst += widthDst; + } + break; + case 1: /*only if leftIndex = 0 and w = 1*/ + while(h--){ + *pdst = ((*pdst) & 0xFF000000) | (piQxelArray[0] & 0xFFFFFF); + pdst += widthDst; + } + break; + case 0: /*never*/ + break; + default: + { + w = nmiddle; + pdstULC = pdst; +/* maskbits (pBox->x1, w, leftMask, rightMask, nmiddle);*/ + while(h--){ + nmiddle = w; + pdst = pdstULC; + switch(leftIndex){ + case 0: + break; + case 1: + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + pdst++; + *pdst++ = piQxelArray[1]; + *pdst++ = piQxelArray[2]; + break; + case 2: + *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); + pdst++; + *pdst++ = piQxelArray[2]; + break; + case 3: + *pdst = ((*pdst) & 0xFF) | (piQxelArray[2] & 0xFFFFFF00); + pdst++; + break; + } + while(nmiddle--){ + *pdst++ = piQxelArray[0]; + *pdst++ = piQxelArray[1]; + *pdst++ = piQxelArray[2]; + } + switch(rightIndex){ + case 0: + break; + case 1: + *pdst = ((*pdst) & 0xFF000000) | (piQxelArray[0] & 0xFFFFFF); + break; + case 2: + *pdst++ = piQxelArray[0]; + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelArray[1] & 0xFFFF); + break; + case 3: + *pdst++ = piQxelArray[0]; + *pdst++ = piQxelArray[1]; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + break; + } + pdstULC += widthDst; + } + + } + } +#else + pdst += (pBox->x1 >> PWSH); + if ((pBox->x1 & PIM) + w <= PPW) + { + maskpartialbits(pBox->x1, w, leftMask); + while (h--) { + *pdst = (*pdst & ~leftMask) | (rrop_xor & leftMask); + pdst += widthDst; + } + } + else + { + maskbits (pBox->x1, w, leftMask, rightMask, nmiddle); + if (leftMask) + { + if (rightMask) + { + Expand (RROP_SOLID_MASK (pdst, leftMask); pdst++; , + RROP_SOLID_MASK (pdst, rightMask); , + 1) + } + else + { + Expand (RROP_SOLID_MASK (pdst, leftMask); pdst++;, + ;, + 1) + } + } + else + { + if (rightMask) + { + Expand (;, + RROP_SOLID_MASK (pdst, rightMask);, + 0) + } + else + { + Expand (;, + ;, + 0) + } + } + } +#endif +#if PSZ == 8 + } +#endif + } +} + +void +cfbFillBoxTile32 (pDrawable, nBox, pBox, tile) + DrawablePtr pDrawable; + int nBox; /* number of boxes to fill */ + BoxPtr pBox; /* pointer to list of boxes to fill */ + PixmapPtr tile; /* rotated, expanded tile */ +{ + register CfbBits *pdst; + CfbBits *psrc; + int tileHeight; + + int widthDst; + int w; + int h; + int nmiddle; + int y; + int srcy; + + CfbBits *pdstBase; +#if PSZ == 24 + int leftIndex, rightIndex; + CfbBits piQxelArray[3], *pdstULC; +#else + register CfbBits rrop_xor; + register CfbBits leftMask; + register CfbBits rightMask; + register int m; +#endif + + tileHeight = tile->drawable.height; + psrc = (CfbBits *)tile->devPrivate.ptr; + + cfbGetLongWidthAndPointer (pDrawable, widthDst, pdstBase); + + while (nBox--) + { +#if PSZ == 24 + w = pBox->x2 - pBox->x1; + h = pBox->y2 - pBox->y1; + y = pBox->y1; + leftIndex = pBox->x1 & 3; +/* rightIndex = ((leftIndex+w)<5)?0:pBox->x2 &3;*/ + rightIndex = pBox->x2 &3; + nmiddle = w - rightIndex; + if(leftIndex){ + nmiddle -= (4 - leftIndex); + } + nmiddle >>= 2; + if(nmiddle < 0) + nmiddle = 0; + + pdst = pdstBase + ((pBox->x1 *3)>> 2) + pBox->y1 * widthDst; + srcy = y % tileHeight; + +#define StepTile piQxelArray[0] = (psrc[srcy] & 0xFFFFFF) | ((psrc[srcy] & 0xFF)<<24); \ + piQxelArray[1] = (psrc[srcy] & 0xFFFF00) | ((psrc[srcy] & 0xFFFF)<<16); \ + piQxelArray[2] = ((psrc[srcy] & 0xFF0000)>>16) | \ + ((psrc[srcy] & 0xFFFFFF)<<8); \ + /*rrop_xor = psrc[srcy];*/ \ + ++srcy; \ + if (srcy == tileHeight) \ + srcy = 0; + + switch(leftIndex+w){ + case 4: + switch(leftIndex){ + case 0: + while(h--){ + StepTile + *pdst++ = piQxelArray[0]; + *pdst++ = piQxelArray[1]; + *pdst = piQxelArray[2]; + pdst-=2; + pdst += widthDst; + } + break; + case 1: + while(h--){ + StepTile + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + pdst++; + *pdst++ = piQxelArray[1]; + *pdst = piQxelArray[2]; + pdst-=2; + pdst += widthDst; + } + break; + case 2: + while(h--){ + StepTile + *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); + pdst++; + *pdst-- = piQxelArray[2]; + pdst += widthDst; + } + break; + case 3: + while(h--){ + StepTile + *pdst = ((*pdst) & 0xFF) | (piQxelArray[2] & 0xFFFFFF00); + pdst += widthDst; + } + break; + } + break; + case 3: + switch(leftIndex){ + case 0: + while(h--){ + StepTile + *pdst++ = piQxelArray[0]; + *pdst++ = piQxelArray[1]; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + pdst--; + pdst--; + pdst += widthDst; + } + break; + case 1: + while(h--){ + StepTile + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + pdst++; + *pdst++ = piQxelArray[1]; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + pdst--; + pdst--; + pdst += widthDst; + } + break; + case 2: + while(h--){ + StepTile + *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); + pdst++; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + pdst--; + pdst += widthDst; + } + break; + } + break; + case 2: + while(h--){ + StepTile + if(leftIndex){ + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + pdst++; + } + else{ + *pdst++ = piQxelArray[0]; + } + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelArray[1] & 0xFFFF); + pdst--; + pdst += widthDst; + } + break; + case 1: /*only if leftIndex = 0 and w = 1*/ + while(h--){ + StepTile + *pdst = ((*pdst) & 0xFF000000) | (piQxelArray[0] & 0xFFFFFF); + pdst += widthDst; + } + break; + case 0: /*never*/ + break; + default: + { + w = nmiddle; + pdstULC = pdst; + + while(h--){ + StepTile + nmiddle = w; + pdst = pdstULC; + switch(leftIndex){ + case 0: + break; + case 1: + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + pdst++; + *pdst++ = piQxelArray[1]; + *pdst++ = piQxelArray[2]; + break; + case 2: + *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); + pdst++; + *pdst++ = piQxelArray[2]; + break; + case 3: + *pdst = ((*pdst) & 0xFF) | (piQxelArray[2] & 0xFFFFFF00); + pdst++; + break; + } + while(nmiddle--){ + *pdst++ = piQxelArray[0]; + *pdst++ = piQxelArray[1]; + *pdst++ = piQxelArray[2]; + } + switch(rightIndex){ + case 0: + break; + case 1: + *pdst = ((*pdst) & 0xFF000000) | (piQxelArray[0] & 0xFFFFFF); + break; + case 2: + *pdst++ = piQxelArray[0]; + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelArray[1] & 0xFFFF); + break; + case 3: + *pdst++ = piQxelArray[0]; + *pdst++ = piQxelArray[1]; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + break; + } + pdstULC += widthDst; + } + } + } +#else + w = pBox->x2 - pBox->x1; + h = pBox->y2 - pBox->y1; + y = pBox->y1; + pdst = pdstBase + (pBox->y1 * widthDst) + (pBox->x1 >> PWSH); + srcy = y % tileHeight; + +#define StepTile rrop_xor = psrc[srcy]; \ + ++srcy; \ + if (srcy == tileHeight) \ + srcy = 0; + + if ( ((pBox->x1 & PIM) + w) < PPW) + { + maskpartialbits(pBox->x1, w, leftMask); + rightMask = ~leftMask; + while (h--) + { + StepTile + *pdst = (*pdst & rightMask) | (rrop_xor & leftMask); + pdst += widthDst; + } + } + else + { + maskbits(pBox->x1, w, leftMask, rightMask, nmiddle); + + if (leftMask) + { + if (rightMask) + { + Expand (StepTile + RROP_SOLID_MASK(pdst, leftMask); pdst++;, + RROP_SOLID_MASK(pdst, rightMask);, + 1) + } + else + { + Expand (StepTile + RROP_SOLID_MASK(pdst, leftMask); pdst++;, + ;, + 1) + } + } + else + { + if (rightMask) + { + Expand (StepTile + , + RROP_SOLID_MASK(pdst, rightMask);, + 0) + } + else + { + Expand (StepTile + , + ;, + 0) + } + } + } +#endif + pBox++; + } +} diff --git a/xorg-server-1.4/cfb/cfbpolypnt.c b/xorg-server-1.4/cfb/cfbpolypnt.c new file mode 100644 index 0000000..06a768e --- /dev/null +++ b/xorg-server-1.4/cfb/cfbpolypnt.c @@ -0,0 +1,202 @@ +/************************************************************ + +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. + +********************************************************/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "gcstruct.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "scrnintstr.h" +#include "cfb.h" +#include "cfbmskbits.h" + +#define isClipped(c,ul,lr) ((((c) - (ul)) | ((lr) - (c))) & ClipMask) + +/* WARNING: pbox contains two shorts. This code assumes they are packed + * and can be referenced together as an INT32. + */ + +#define PointLoop(fill) { \ + for (nbox = REGION_NUM_RECTS(cclip), pbox = REGION_RECTS(cclip); \ + --nbox >= 0; \ + pbox++) \ + { \ + c1 = *((INT32 *) &pbox->x1) - off; \ + c2 = *((INT32 *) &pbox->x2) - off - 0x00010001; \ + for (ppt = (INT32 *) pptInit, i = npt; --i >= 0;) \ + { \ + pt = *ppt++; \ + if (!isClipped(pt,c1,c2)) { \ + fill \ + } \ + } \ + } \ +} + +#if PSZ == 24 +# include "cfbrrop24.h" +#endif + +void +cfbPolyPoint(pDrawable, pGC, mode, npt, pptInit) + DrawablePtr pDrawable; + GCPtr pGC; + int mode; + int npt; + xPoint *pptInit; +{ + register INT32 pt; + register INT32 c1, c2; + register CARD32 ClipMask = 0x80008000; + register CfbBits xor; +#ifdef PIXEL_ADDR + register PixelType *addrp; + register int npwidth; +#if PSZ != 24 + PixelType *addrpt; +#endif +#else + register CfbBits *addrl; + register int nlwidth; + register int xoffset; + CfbBits *addrlt; +#endif +#if PSZ == 24 + RROP_DECLARE + register int xtmp; + register PixelType *p; +#endif + register INT32 *ppt; + RegionPtr cclip; + int nbox; + register int i; + register BoxPtr pbox; + CfbBits and; + int rop = pGC->alu; + int off; + cfbPrivGCPtr devPriv; + xPoint *pptPrev; + + devPriv =cfbGetGCPrivate(pGC); + rop = devPriv->rop; + if (rop == GXnoop) + return; + cclip = pGC->pCompositeClip; + xor = devPriv->xor; + if ((mode == CoordModePrevious) && (npt > 1)) + { + for (pptPrev = pptInit + 1, i = npt - 1; --i >= 0; pptPrev++) + { + pptPrev->x += (pptPrev-1)->x; + pptPrev->y += (pptPrev-1)->y; + } + } + off = *((int *) &pDrawable->x); + off -= (off & 0x8000) << 1; +#ifdef PIXEL_ADDR + cfbGetPixelWidthAndPointer(pDrawable, npwidth, addrp); +#if PSZ == 24 + addrp = addrp + pDrawable->y * npwidth; +#else + addrp = addrp + pDrawable->y * npwidth + pDrawable->x; +#endif + if (rop == GXcopy) + { +#if PSZ == 24 + RROP_COPY_SETUP(xor) +#endif + if (!(npwidth & (npwidth - 1))) + { + npwidth = ffs(npwidth) - 1; +#if PSZ == 24 + PointLoop( + xtmp = pDrawable->x + intToX(pt); + p = addrp + (intToY(pt) << npwidth) + ((xtmp * 3) >>2); + RROP_SOLID24_COPY(p, xtmp)) +#else + PointLoop(*(addrp + (intToY(pt) << npwidth) + intToX(pt)) = xor;) +#endif + } +#ifdef sun + else if (npwidth == 1152) + { + register int y; + PointLoop(y = intToY(pt); *(addrp + (y << 10) + (y << 7) + intToX(pt)) = xor;) + } +#endif + else + { +#if PSZ == 24 + PointLoop( + xtmp = pDrawable->x + intToX(pt); + p = addrp + intToY(pt) * npwidth + ((xtmp * 3) >> 2); + RROP_SOLID24_COPY(p, xtmp)) +#else + PointLoop(*(addrp + intToY(pt) * npwidth + intToX(pt)) = xor;) +#endif + } + } + else + { + and = devPriv->and; +#if PSZ == 24 + RROP_SET_SETUP(xor, and) + PointLoop( + xtmp = pDrawable->x + intToX(pt); + p = addrp + intToY(pt) * npwidth + ((xtmp * 3) >> 2); + RROP_SOLID24_SET(p, xtmp)) +#else + PointLoop( addrpt = addrp + intToY(pt) * npwidth + intToX(pt); + *addrpt = DoRRop (*addrpt, and, xor);) +#endif + } +#else /* !PIXEL_ADDR */ + cfbGetLongWidthAndPointer(pDrawable, nlwidth, addrl); + addrl = addrl + pDrawable->y * nlwidth + (pDrawable->x >> PWSH); + xoffset = pDrawable->x & PIM; + and = devPriv->and; +#if PSZ == 24 + PointLoop( addrlt = addrl + intToY(pt) * nlwidth + + ((intToX(pt) + xoffset) >> PWSH); + *addrlt = DoRRop (*addrlt, + and | ~cfbmask[(intToX(pt) + xoffset) & PIM], + xor & cfbmask[(intToX(pt) + xoffset) & PIM]); + ) +#else + PointLoop( addrlt = addrl + intToY(pt) * nlwidth + + ((intToX(pt) + xoffset) >> PWSH); + *addrlt = DoRRop (*addrlt, + and | ~cfbmask[((intToX(pt) + xoffset) & 3)<<1], + xor & cfbmask[((intToX(pt) + xoffset) & 3)<<1]); + ) +#endif +#endif /* PIXEL_ADDR */ +} diff --git a/xorg-server-1.4/cfb/cfbpush8.c b/xorg-server-1.4/cfb/cfbpush8.c new file mode 100644 index 0000000..857ec94 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbpush8.c @@ -0,0 +1,184 @@ +/* + * Push Pixels for 8 bit displays. + */ + + +/* + +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. +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#if PSZ == 8 + +#include +#include +#include +#include "gcstruct.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "cfb.h" +#include "cfbmskbits.h" +#include "cfb8bit.h" +#define MFB_CONSTS_ONLY +#include "maskbits.h" + +void +cfbPushPixels8 (pGC, pBitmap, pDrawable, dx, dy, xOrg, yOrg) + GCPtr pGC; + PixmapPtr pBitmap; + DrawablePtr pDrawable; + int dx, dy, xOrg, yOrg; +{ + register CfbBits *src, *dst; + register CfbBits pixel; + register CfbBits c, bits; + CfbBits *pdstLine, *psrcLine; + CfbBits *pdstBase; + int srcWidth; + int dstWidth; + int xoff; + int nBitmapLongs, nPixmapLongs; + int nBitmapTmp, nPixmapTmp; + CfbBits rightMask; + BoxRec bbox; + cfbPrivGCPtr devPriv; + + bbox.x1 = xOrg; + bbox.y1 = yOrg; + bbox.x2 = bbox.x1 + dx; + bbox.y2 = bbox.y1 + dy; + devPriv = cfbGetGCPrivate(pGC); + + switch (RECT_IN_REGION(pGC->pScreen, pGC->pCompositeClip, &bbox)) + { + case rgnPART: + mfbPushPixels(pGC, pBitmap, pDrawable, dx, dy, xOrg, yOrg); + case rgnOUT: + return; + } + + cfbGetLongWidthAndPointer (pDrawable, dstWidth, pdstBase) + + psrcLine = (CfbBits *) pBitmap->devPrivate.ptr; + srcWidth = (int) pBitmap->devKind >> PWSH; + + pixel = devPriv->xor; + xoff = xOrg & PIM; + nBitmapLongs = (dx + xoff) >> MFB_PWSH; + nPixmapLongs = (dx + PGSZB + xoff) >> PWSH; + + rightMask = ~cfb8BitLenMasks[((dx + xoff) & MFB_PIM)]; + + pdstLine = pdstBase + (yOrg * dstWidth) + (xOrg >> PWSH); + + while (dy--) + { + c = 0; + nPixmapTmp = nPixmapLongs; + nBitmapTmp = nBitmapLongs; + src = psrcLine; + dst = pdstLine; + while (nBitmapTmp--) + { + bits = *src++; + c |= BitRight (bits, xoff); + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst++; + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst++; + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst++; + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst++; + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst++; + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst++; + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst++; + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst++; + nPixmapTmp -= 8; + c = 0; + if (xoff) + c = BitLeft (bits, PGSZ - xoff); + } + if (BitLeft (rightMask, xoff)) + c |= BitRight (*src, xoff); + c &= rightMask; + switch (nPixmapTmp) { + case 8: + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst++; + case 7: + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst++; + case 6: + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst++; + case 5: + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst++; + case 4: + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst++; + case 3: + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst++; + case 2: + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst++; + case 1: + WriteBitGroup(dst, pixel, GetBitGroup(c)); + NextBitGroup(c); + dst++; + case 0: + break; + } + pdstLine += dstWidth; + psrcLine += srcWidth; + } +} + +#endif diff --git a/xorg-server-1.4/cfb/cfbrctstp8.c b/xorg-server-1.4/cfb/cfbrctstp8.c new file mode 100644 index 0000000..485d409 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbrctstp8.c @@ -0,0 +1,593 @@ +/* + * Fill 32 bit stippled rectangles for 8 bit frame buffers + */ +/* + +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_DIX_CONFIG_H +#include +#endif + +#if PSZ == 8 + +#include +#include +#include "servermd.h" +#include "gcstruct.h" +#include "window.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "windowstr.h" + +#include "cfb.h" +#include "cfbmskbits.h" +#include "cfb8bit.h" + +#define MFB_CONSTS_ONLY +#include "maskbits.h" + +void +cfb8FillRectOpaqueStippled32 (pDrawable, pGC, nBox, pBox) + DrawablePtr pDrawable; + GCPtr pGC; + int nBox; /* number of boxes to fill */ + register BoxPtr pBox; /* pointer to list of boxes to fill */ +{ + CfbBits *src; + int stippleHeight; + + int nlwDst; /* width in longwords of the dest pixmap */ + int w; /* width of current box */ + register int h; /* height of current box */ + CfbBits startmask; + CfbBits endmask; /* masks for reggedy bits at either end of line */ + int nlwMiddle; /* number of longwords between sides of boxes */ + register int nlw; /* loop version of nlwMiddle */ + CfbBits *dstLine; + register CfbBits *dst; /* pointer to bits we're writing */ + CfbBits *dstTmp; + int y; /* current scan line */ + + CfbBits *pbits;/* pointer to start of pixmap */ + register CfbBits bits; /* bits from stipple */ + int rot; + register CfbBits xor; + PixmapPtr stipple; + int wEnd; + + stipple = pGC->pRotatedPixmap; + + cfb8CheckOpaqueStipple(pGC->alu, pGC->fgPixel, pGC->bgPixel, pGC->planemask); + + stippleHeight = stipple->drawable.height; + src = (CfbBits *)stipple->devPrivate.ptr; + + cfbGetLongWidthAndPointer (pDrawable, nlwDst, pbits) + + while (nBox--) + { + w = pBox->x2 - pBox->x1; + h = pBox->y2 - pBox->y1; + y = pBox->y1; + dstLine = pbits + (pBox->y1 * nlwDst) + ((pBox->x1 & ~PIM) >> PWSH); + if (((pBox->x1 & PIM) + w) <= PPW) + { + maskpartialbits(pBox->x1, w, startmask); + nlwMiddle = 0; + endmask = 0; + } + else + { + maskbits (pBox->x1, w, startmask, endmask, nlwMiddle); + } + rot = (pBox->x1 & ((PGSZ-1) & ~PIM)); + pBox++; + y = y % stippleHeight; +#if PPW == 4 + if (cfb8StippleRRop == GXcopy) + { + if (w < PGSZ*2) + { + while (h--) + { + bits = src[y]; + y++; + if (y == stippleHeight) + y = 0; + if (rot) + RotBitsLeft(bits,rot); + dst = dstLine; + dstLine += nlwDst; + if (startmask) + { + *dst = (*dst & ~startmask) | + (GetPixelGroup (bits) & startmask); + dst++; + RotBitsLeft (bits, PGSZB); + } + nlw = nlwMiddle; + while (nlw--) + { + *dst++ = GetPixelGroup(bits); + RotBitsLeft (bits, PGSZB); + } + if (endmask) + { + *dst = (*dst & ~endmask) | + (GetPixelGroup (bits) & endmask); + } + } + } + else + { + wEnd = 7 - (nlwMiddle & 7); + nlwMiddle = (nlwMiddle >> 3) + 1; + while (h--) + { + bits = src[y]; + y++; + if (y == stippleHeight) + y = 0; + if (rot != 0) + RotBitsLeft (bits, rot); + dstTmp = dstLine; + dstLine += nlwDst; + if (startmask) + { + *dstTmp = (*dstTmp & ~startmask) | + (GetPixelGroup (bits) & startmask); + dstTmp++; + RotBitsLeft (bits, PGSZB); + } + w = 7 - wEnd; + while (w--) + { + nlw = nlwMiddle; + dst = dstTmp; + dstTmp++; + xor = GetPixelGroup (bits); + while (nlw--) + { + *dst = xor; + dst += 8; + } + NextBitGroup (bits); + } + nlwMiddle--; + w = wEnd + 1; + if (endmask) + { + dst = dstTmp + (nlwMiddle << 3); + *dst = (*dst & ~endmask) | + (GetPixelGroup(bits) & endmask); + } + while (w--) + { + nlw = nlwMiddle; + dst = dstTmp; + dstTmp++; + xor = GetPixelGroup (bits); + while (nlw--) + { + *dst = xor; + dst += 8; + } + NextBitGroup (bits); + } + nlwMiddle++; + } + } + } + else +#endif /* PPW == 4 */ + { + while (h--) + { + bits = src[y]; + y++; + if (y == stippleHeight) + y = 0; + if (rot) + RotBitsLeft(bits,rot); + dst = dstLine; + dstLine += nlwDst; + if (startmask) + { + xor = GetBitGroup(bits); + *dst = MaskRRopPixels(*dst, xor, startmask); + dst++; + RotBitsLeft (bits, PGSZB); + } + nlw = nlwMiddle; + while (nlw--) + { + RRopBitGroup(dst, GetBitGroup(bits)); + dst++; + RotBitsLeft (bits, PGSZB); + } + if (endmask) + { + xor = GetBitGroup(bits); + *dst = MaskRRopPixels(*dst, xor, endmask); + } + } + } + } +} + +void +cfb8FillRectTransparentStippled32 (pDrawable, pGC, nBox, pBox) + DrawablePtr pDrawable; + GCPtr pGC; + int nBox; /* number of boxes to fill */ + BoxPtr pBox; /* pointer to list of boxes to fill */ +{ + int x, y, w, h; + int nlwMiddle, nlwDst; + CfbBits startmask, endmask; + register CfbBits *dst; + CfbBits *dstLine, *pbits, *dstTmp; + CfbBits *src; + register CfbBits xor; + register CfbBits bits, mask; + int rot; + int wEnd; + cfbPrivGCPtr devPriv; + PixmapPtr stipple; + int stippleHeight; + register int nlw; + + devPriv = cfbGetGCPrivate(pGC); + stipple = pGC->pRotatedPixmap; + src = (CfbBits *)stipple->devPrivate.ptr; + stippleHeight = stipple->drawable.height; + + cfb8CheckStipple (pGC->alu, pGC->fgPixel, pGC->planemask); + + cfbGetLongWidthAndPointer (pDrawable, nlwDst, pbits) + + while (nBox--) + { + x = pBox->x1; + w = pBox->x2 - x; + if (((x & PIM) + w) <= PPW) + { + maskpartialbits(x, w, startmask); + endmask = 0; + nlwMiddle = 0; + } + else + { + maskbits (x, w, startmask, endmask, nlwMiddle); + } + rot = (x & ((PGSZ-1) & ~PIM)); + y = pBox->y1; + dstLine = pbits + (y * nlwDst) + (x >> PWSH); + h = pBox->y2 - y; + pBox++; + y %= stippleHeight; +#if PPW == 4 + if (cfb8StippleRRop == GXcopy) + { + xor = devPriv->xor; + if (w < PGSZ*2) + { + while (h--) + { + bits = src[y]; + y++; + if (y == stippleHeight) + y = 0; + if (rot != 0) + RotBitsLeft (bits, rot); + dst = dstLine; + dstLine += nlwDst; + if (startmask) + { + mask = cfb8PixelMasks[GetBitGroup(bits)]; + *dst = (*dst & ~(mask & startmask)) | + (xor & (mask & startmask)); + dst++; + RotBitsLeft (bits, PGSZB); + } + nlw = nlwMiddle; + while (nlw--) + { + WriteBitGroup (dst,xor,GetBitGroup(bits)) + dst++; + RotBitsLeft (bits, PGSZB); + } + if (endmask) + { + mask = cfb8PixelMasks[GetBitGroup(bits)]; + *dst = (*dst & ~(mask & endmask)) | + (xor & (mask & endmask)); + } + } + } + else + { + wEnd = 7 - (nlwMiddle & 7); + nlwMiddle = (nlwMiddle >> 3) + 1; + while (h--) + { + bits = src[y]; + y++; + if (y == stippleHeight) + y = 0; + if (rot != 0) + RotBitsLeft (bits, rot); + dstTmp = dstLine; + dstLine += nlwDst; + if (startmask) + { + mask = cfb8PixelMasks[GetBitGroup(bits)]; + *dstTmp = (*dstTmp & ~(mask & startmask)) | + (xor & (mask & startmask)); + dstTmp++; + RotBitsLeft (bits, PGSZB); + } + w = 7 - wEnd; + while (w--) + { + nlw = nlwMiddle; + dst = dstTmp; + dstTmp++; +#if defined(__GNUC__) && defined(mc68020) + mask = cfb8PixelMasks[GetBitGroup(bits)]; + xor = xor & mask; + mask = ~mask; + while (nlw--) + { + *dst = (*dst & mask) | xor; + dst += 8; + } + xor = devPriv->xor; +#else +#define SwitchBitsLoop(body) \ + while (nlw--) \ + { \ + body \ + dst += 8; \ + } + SwitchBitGroup(dst, xor, GetBitGroup(bits)); +#undef SwitchBitsLoop +#endif + NextBitGroup (bits); + } + nlwMiddle--; + w = wEnd + 1; + if (endmask) + { + mask = cfb8PixelMasks[GetBitGroup(bits)]; + dst = dstTmp + (nlwMiddle << 3); + *dst = (*dst & ~(mask & endmask)) | + (xor & (mask & endmask)); + } + while (w--) + { + nlw = nlwMiddle; + dst = dstTmp; + dstTmp++; +#if defined(__GNUC__) && defined(mc68020) + mask = cfb8PixelMasks[GetBitGroup(bits)]; + xor = xor & mask; + mask = ~mask; + while (nlw--) + { + *dst = (*dst & mask) | xor; + dst += 8; + } + xor = devPriv->xor; +#else +#define SwitchBitsLoop(body) \ + while (nlw--) \ + { \ + body \ + dst += 8; \ + } + SwitchBitGroup(dst, xor, GetBitGroup(bits)); +#undef SwitchBitsLoop +#endif + NextBitGroup (bits); + } + nlwMiddle++; + } + } + } + else +#endif /* PPW == 4 */ + { + while (h--) + { + bits = src[y]; + y++; + if (y == stippleHeight) + y = 0; + if (rot != 0) + RotBitsLeft (bits, rot); + dst = dstLine; + dstLine += nlwDst; + if (startmask) + { + xor = GetBitGroup(bits); + *dst = MaskRRopPixels(*dst, xor, startmask); + dst++; + RotBitsLeft (bits, PGSZB); + } + nlw = nlwMiddle; + while (nlw--) + { + RRopBitGroup(dst, GetBitGroup(bits)); + dst++; + RotBitsLeft (bits, PGSZB); + } + if (endmask) + { + xor = GetBitGroup(bits); + *dst = MaskRRopPixels(*dst, xor, endmask); + } + } + } + } +} + + +void +cfb8FillRectStippledUnnatural (pDrawable, pGC, nBox, pBox) + DrawablePtr pDrawable; + GCPtr pGC; + int nBox; + register BoxPtr pBox; +{ + CfbBits *pdstBase; /* pointer to start of bitmap */ + CfbBits *pdstLine; /* current destination line */ + int nlwDst; /* width in longwords of bitmap */ + PixmapPtr pStipple; /* pointer to stipple we want to fill with */ + int nlwMiddle; + register int nlw; + int x, y, w, h, xrem, xSrc, ySrc; + int stwidth, stippleWidth; + int stippleHeight; + register CfbBits bits, inputBits; + register int partBitsLeft; + int nextPartBits; + int bitsLeft, bitsWhole; + register CfbBits *pdst; /* pointer to current word in bitmap */ + CfbBits *srcTemp, *srcStart; + CfbBits *psrcBase; + CfbBits startmask, endmask; + + if (pGC->fillStyle == FillStippled) + cfb8CheckStipple (pGC->alu, pGC->fgPixel, pGC->planemask); + else + cfb8CheckOpaqueStipple (pGC->alu, pGC->fgPixel, pGC->bgPixel, pGC->planemask); + + if (cfb8StippleRRop == GXnoop) + return; + + /* + * OK, so what's going on here? We have two Drawables: + * + * The Stipple: + * Depth = 1 + * Width = stippleWidth + * Words per scanline = stwidth + * Pointer to pixels = pStipple->devPrivate.ptr + */ + + pStipple = pGC->stipple; + + stwidth = pStipple->devKind >> PWSH; + stippleWidth = pStipple->drawable.width; + stippleHeight = pStipple->drawable.height; + psrcBase = (CfbBits *) pStipple->devPrivate.ptr; + + /* + * The Target: + * Depth = PSZ + * Width = determined from *pwidth + * Words per scanline = nlwDst + * Pointer to pixels = addrlBase + */ + + xSrc = pDrawable->x; + ySrc = pDrawable->y; + + cfbGetLongWidthAndPointer (pDrawable, nlwDst, pdstBase) + + /* this replaces rotating the stipple. Instead we just adjust the offset + * at which we start grabbing bits from the stipple. + * Ensure that ppt->x - xSrc >= 0 and ppt->y - ySrc >= 0, + * so that iline and xrem always stay within the stipple bounds. + */ + + xSrc += (pGC->patOrg.x % stippleWidth) - stippleWidth; + ySrc += (pGC->patOrg.y % stippleHeight) - stippleHeight; + + bitsWhole = stippleWidth; + + while (nBox--) + { + x = pBox->x1; + y = pBox->y1; + w = pBox->x2 - x; + h = pBox->y2 - y; + pBox++; + pdstLine = pdstBase + y * nlwDst + (x >> PWSH); + y = (y - ySrc) % stippleHeight; + srcStart = psrcBase + y * stwidth; + xrem = ((x & ~PIM) - xSrc) % stippleWidth; + if (((x & PIM) + w) < PPW) + { + maskpartialbits (x, w, startmask); + nlwMiddle = 0; + endmask = 0; + } + else + { + maskbits (x, w, startmask, endmask, nlwMiddle); + } + while (h--) + { + srcTemp = srcStart + (xrem >> MFB_PWSH); + bitsLeft = stippleWidth - (xrem & ~MFB_PIM); + NextUnnaturalStippleWord + NextSomeBits (inputBits, (xrem & MFB_PIM)); + partBitsLeft -= (xrem & MFB_PIM); + NextUnnaturalStippleBits + nlw = nlwMiddle; + pdst = pdstLine; + if (startmask) + { + *pdst = MaskRRopPixels(*pdst,bits,startmask); + pdst++; + NextUnnaturalStippleBits + } + while (nlw--) + { + *pdst = RRopPixels(*pdst,bits); + pdst++; + NextUnnaturalStippleBits + } + if (endmask) + *pdst = MaskRRopPixels(*pdst,bits,endmask); + pdstLine += nlwDst; + y++; + srcStart += stwidth; + if (y == stippleHeight) + { + y = 0; + srcStart = psrcBase; + } + } + } +} + +#endif /* PSZ == 8 */ diff --git a/xorg-server-1.4/cfb/cfbrrop.c b/xorg-server-1.4/cfb/cfbrrop.c new file mode 100644 index 0000000..ffd8138 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbrrop.c @@ -0,0 +1,227 @@ +/* + * +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 + */ + +/* cfb reduced rasterop computations */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include "cfb.h" +#include "cfbmskbits.h" + +/* A description: + * + * There are four possible operations on each bit in the destination word, + * + * 1 2 3 4 + * + * 0 0 0 1 1 + * 1 0 1 0 1 + * + * On examination of the reduced rop equation (dst = (dst & and) ^ xor), + * these four fall to reduced rops as follows: + * + * and 0 1 1 0 + * xor 0 0 1 1 + * + * or, (if 'and' is expensive) (dst = (dst | or) ^ xor) + * + * or 1 0 0 1 + * xor 1 0 1 0 + * + * The trouble with using this later equation is that trivial + * rasterop reduction is more difficult; some common rasterops + * use complicated expressions of xor/and instead of the simple + * ones while other common rasterops are not made any simpler: + * + * GXcopy: *dst = ~xor instead of *dst = xor + * GXand: *dst = *dst & ~or instead of *dst = *dst & and + * GXor: *dst = *dst | or instead of *dst = *dst | xor + * GXxor: *dst = *dst ^ xor instead of *dst = *dst ^ xor + * + * If you're really set on using this second mechanism, the changes + * are pretty simple. + * + * All that remains is to provide a mechanism for computing and/xor values + * based on the raster op and foreground value. + * + * The 16 rops fall as follows, with the associated reduced + * rop and/xor and or/xor values. The values in parenthesis following the + * reduced values gives an equation using the source value for + * the reduced value, and is one of {0, src, ~src, 1} as appropriate. + * + * clear and andReverse copy + * src 0 1 0 1 0 1 0 1 + * dst 0 0 0 0 0 0 0 0 1 0 0 1 + * 1 0 0 1 0 1 1 0 0 1 0 1 + * + * and 0 0 (0) 0 1 (src) 0 1 (src) 0 0 (0) + * xor 0 0 (0) 0 0 (0) 0 1 (src) 0 1 (src) + * + * or 1 1 (1) 1 0 (~src) 1 0 (~src) 1 1 (1) + * xor 1 1 (1) 1 0 (~src) 1 1 (1) 1 0 (~src) + * + * andInverted noop xor or + * src 0 1 0 1 0 1 0 1 + * dst 0 0 0 0 0 0 0 0 1 0 0 1 + * 1 1 0 1 1 1 1 1 0 1 1 1 + * + * and 1 0 (~src) 1 1 (1) 1 1 (1) 1 0 (~src) + * xor 0 0 (0) 0 0 (0) 0 1 (src) 0 1 (src) + * + * or 0 1 (src) 0 0 (0) 0 0 (0) 0 1 (src) + * xor 0 1 (src) 0 0 (0) 0 1 (src) 0 0 (0) + * + * nor equiv invert orReverse + * src 0 1 0 1 0 1 0 1 + * dst 0 1 0 0 1 0 0 1 1 0 1 1 + * 1 0 0 1 0 1 1 0 0 1 0 1 + * + * and 1 0 (~src) 1 1 (1) 1 1 (1) 1 0 (~src) + * xor 1 0 (~src) 1 0 (~src) 1 1 (1) 1 1 (1) + * + * or 0 1 (src) 0 0 (0) 0 0 (0) 0 1 (src) + * xor 1 1 (1) 1 0 (~src) 1 1 (1) 1 0 (~src) + * + * copyInverted orInverted nand set + * src 0 1 0 1 0 1 0 1 + * dst 0 1 0 0 1 0 0 1 1 0 1 1 + * 1 1 0 1 1 1 1 1 0 1 1 1 + * + * and 0 0 (0) 0 1 (src) 0 1 (src) 0 0 (0) + * xor 1 0 (~src) 1 0 (~src) 1 1 (1) 1 1 (1) + * + * or 1 1 (1) 1 0 (~src) 1 0 (~src) 1 1 (1) + * xor 0 1 (src) 0 0 (0) 0 1 (src) 0 0 (0) + */ + +int +cfbReduceRasterOp (rop, fg, pm, andp, xorp) + int rop; + CfbBits fg, pm; + CfbBits *andp, *xorp; +{ + CfbBits and, xor; + int rrop; + + fg = PFILL (fg); + pm = PFILL (pm); + switch (rop) + { + case GXclear: + and = 0; + xor = 0; + break; + case GXand: + and = fg; + xor = 0; + break; + case GXandReverse: + and = fg; + xor = fg; + break; + case GXcopy: + and = 0; + xor = fg; + break; + case GXandInverted: + and = ~fg; + xor = 0; + break; + case GXnoop: + and = ~0; + xor = 0; + break; + case GXxor: + and = ~0; + xor = fg; + break; + case GXor: + and = ~fg; + xor = fg; + break; + case GXnor: + and = ~fg; + xor = ~fg; + break; + case GXequiv: + and = ~0; + xor = ~fg; + break; + case GXinvert: + and = ~0; + xor = ~0; + break; + case GXorReverse: + and = ~fg; + xor = ~0; + break; + case GXcopyInverted: + and = 0; + xor = ~fg; + break; + case GXorInverted: + and = fg; + xor = ~fg; + break; + case GXnand: + and = fg; + xor = ~0; + break; + case GXset: + and = 0; + xor = ~0; + break; + default: + and = xor = 0; + break; + } + and |= ~pm; + xor &= pm; + *andp = and; + *xorp = xor; + /* check for some special cases to reduce computation */ + if (and == 0) + rrop = GXcopy; + /* nothing checks for GXnoop + else if (and == ~0 && xor == 0) + rrop = GXnoop; + */ + else if (and == ~0) + rrop = GXxor; + else if (xor == 0) + rrop = GXand; + else if ( (and ^ xor) == ~0) /* fix XBUG 6541 */ + rrop = GXor; + else + rrop = GXset; /* rop not reduced */ + return rrop; +} diff --git a/xorg-server-1.4/cfb/cfbrrop.h b/xorg-server-1.4/cfb/cfbrrop.h new file mode 100644 index 0000000..eeb373a --- /dev/null +++ b/xorg-server-1.4/cfb/cfbrrop.h @@ -0,0 +1,342 @@ +/* + * +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_DIX_CONFIG_H +#include +#endif + +#ifndef GXcopy +#include +#endif + +#define RROP_FETCH_GC(gc) \ + RROP_FETCH_GCPRIV(((cfbPrivGCPtr)(gc)->devPrivates[cfbGCPrivateIndex].ptr)) + +#ifndef RROP +#define RROP GXset +#endif + +#if RROP == GXcopy +#if PSZ == 24 +#define RROP_DECLARE register CfbBits rrop_xor; \ + CfbBits piQxelXor[3], spiQxelXor[8]; +#define RROP_FETCH_GCPRIV(devPriv) rrop_xor = (devPriv)->xor; \ + spiQxelXor[0] = rrop_xor & 0xFFFFFF; \ + spiQxelXor[2] = rrop_xor << 24; \ + spiQxelXor[3] = (rrop_xor & 0xFFFF00)>> 8; \ + spiQxelXor[4] = rrop_xor << 16; \ + spiQxelXor[5] = (rrop_xor & 0xFF0000)>> 16; \ + spiQxelXor[6] = rrop_xor << 8; \ + spiQxelXor[1] = spiQxelXor[7] = 0; \ + piQxelXor[0] = (rrop_xor & 0xFFFFFF)|(rrop_xor << 24); \ + piQxelXor[1] = (rrop_xor << 16)|((rrop_xor & 0xFFFF00)>> 8); \ + piQxelXor[2] = (rrop_xor << 8)|((rrop_xor & 0xFF0000)>> 16); +#define RROP_SOLID24(dst,index) {\ + register int idx = ((index) & 3)<< 1; \ + *(dst) = (*(dst) & cfbrmask[idx])|spiQxelXor[idx]; \ + if (idx == 2 || idx == 4){ \ + idx++; \ + *((dst)+1) = (*((dst)+1) & cfbrmask[idx])|spiQxelXor[idx]; \ + } \ + } +#define RROP_SOLID(dst, idx) \ + (*(dst) = piQxelXor[(idx)]) +#define RROP_SOLID_MASK(dst,mask,idx) \ + (*(dst) = (*(dst) & ~(mask))|(piQxelXor[(idx)] & (mask))) +#define RROP_UNDECLARE (void)piQxelXor; (void)spiQxelXor; +#else +#define RROP_FETCH_GCPRIV(devPriv) rrop_xor = (devPriv)->xor; +#define RROP_DECLARE register CfbBits rrop_xor; +#define RROP_SOLID(dst) (*(dst) = (rrop_xor)) +#define RROP_SOLID_MASK(dst,mask) (*(dst) = (*(dst) & ~(mask)) | ((rrop_xor) & (mask))) +#define RROP_UNDECLARE +#endif +#define RROP_NAME(prefix) RROP_NAME_CAT(prefix,Copy) +#endif /* GXcopy */ + +#if RROP == GXxor +#if PSZ == 24 +#define RROP_DECLARE register CfbBits rrop_xor; \ + CfbBits piQxelXor[3], spiQxelXor[8]; +#define RROP_FETCH_GCPRIV(devPriv) rrop_xor = (devPriv)->xor; \ + spiQxelXor[0] = rrop_xor & 0xFFFFFF; \ + spiQxelXor[2] = rrop_xor << 24; \ + spiQxelXor[3] = (rrop_xor & 0xFFFF00)>> 8; \ + spiQxelXor[4] = rrop_xor << 16; \ + spiQxelXor[5] = (rrop_xor & 0xFF0000)>> 16; \ + spiQxelXor[6] = rrop_xor << 8; \ + spiQxelXor[1] = spiQxelXor[7] = 0; \ + piQxelXor[0] = (rrop_xor & 0xFFFFFF)|(rrop_xor << 24); \ + piQxelXor[1] = (rrop_xor << 16)|((rrop_xor & 0xFFFF00)>> 8); \ + piQxelXor[2] = (rrop_xor << 8)|((rrop_xor & 0xFF0000)>> 16); +#define RROP_SOLID24(dst,index) {\ + register int idx = ((index) & 3)<< 1; \ + *(dst) ^= spiQxelXor[idx]; \ + if (idx == 2 || idx == 4) \ + *((dst)+1) ^= spiQxelXor[idx+1]; \ + } +#define RROP_SOLID(dst,idx) \ + (*(dst) ^= piQxelXor[(idx)]) +#define RROP_SOLID_MASK(dst,mask,idx) \ + (*(dst) ^= (piQxelXor[(idx)] & (mask))) +#define RROP_UNDECLARE (void)piQxelXor; (void)spiQxelXor; +#else +#define RROP_DECLARE register CfbBits rrop_xor; +#define RROP_FETCH_GCPRIV(devPriv) rrop_xor = (devPriv)->xor; +#define RROP_SOLID(dst) (*(dst) ^= (rrop_xor)) +#define RROP_SOLID_MASK(dst,mask) (*(dst) ^= ((rrop_xor) & (mask))) +#define RROP_UNDECLARE +#endif +#define RROP_NAME(prefix) RROP_NAME_CAT(prefix,Xor) +#endif /* GXxor */ + +#if RROP == GXand +#if PSZ == 24 +#define RROP_DECLARE register CfbBits rrop_and; \ + CfbBits piQxelAnd[3], spiQxelAnd[6]; +#define RROP_FETCH_GCPRIV(devPriv) rrop_and = (devPriv)->and; \ + spiQxelAnd[0] = (rrop_and & 0xFFFFFF) | 0xFF000000; \ + spiQxelAnd[2] = (rrop_and << 24) | 0xFFFFFF; \ + spiQxelAnd[3] = ((rrop_and & 0xFFFF00)>> 8) | 0xFFFF0000; \ + spiQxelAnd[4] = (rrop_and << 16) | 0xFFFF; \ + spiQxelAnd[5] = ((rrop_and & 0xFF0000)>> 16) | 0xFFFFFF00; \ + spiQxelAnd[1] = (rrop_and << 8) | 0xFF; \ + piQxelAnd[0] = (rrop_and & 0xFFFFFF)|(rrop_and << 24); \ + piQxelAnd[1] = (rrop_and << 16)|((rrop_and & 0xFFFF00)>> 8); \ + piQxelAnd[2] = (rrop_and << 8)|((rrop_and & 0xFF0000)>> 16); +#define RROP_SOLID24(dst,index) {\ + switch((index) & 3){ \ + case 0: \ + *(dst) &= spiQxelAnd[0]; \ + break; \ + case 3: \ + *(dst) &= spiQxelAnd[1]; \ + break; \ + case 1: \ + *(dst) &= spiQxelAnd[2]; \ + *((dst)+1) &= spiQxelAnd[3]; \ + break; \ + case 2: \ + *(dst) &= spiQxelAnd[4]; \ + *((dst)+1) &= spiQxelAnd[5]; \ + break; \ + } \ + } +#define RROP_SOLID(dst,idx) \ + (*(dst) &= piQxelAnd[(idx)]) +#define RROP_SOLID_MASK(dst,mask,idx) \ + (*(dst) &= (piQxelAnd[(idx)] | ~(mask))) +#define RROP_UNDECLARE (void)piQxelAnd; (void)spiQxelAnd; +#else +#define RROP_DECLARE register CfbBits rrop_and; +#define RROP_FETCH_GCPRIV(devPriv) rrop_and = (devPriv)->and; +#define RROP_SOLID(dst) (*(dst) &= (rrop_and)) +#define RROP_SOLID_MASK(dst,mask) (*(dst) &= ((rrop_and) | ~(mask))) +#define RROP_UNDECLARE +#endif +#define RROP_NAME(prefix) RROP_NAME_CAT(prefix,And) +#endif /* GXand */ + +#if RROP == GXor +#if PSZ == 24 +#define RROP_DECLARE register CfbBits rrop_or; \ + CfbBits piQxelOr[3], spiQxelOr[6]; +#define RROP_FETCH_GCPRIV(devPriv) rrop_or = (devPriv)->xor; \ + spiQxelOr[0] = rrop_or & 0xFFFFFF; \ + spiQxelOr[1] = rrop_or << 24; \ + spiQxelOr[2] = rrop_or << 16; \ + spiQxelOr[3] = rrop_or << 8; \ + spiQxelOr[4] = (rrop_or & 0xFFFF00)>> 8; \ + spiQxelOr[5] = (rrop_or & 0xFF0000)>> 16; \ + piQxelOr[0] = (rrop_or & 0xFFFFFF)|(rrop_or << 24); \ + piQxelOr[1] = (rrop_or << 16)|((rrop_or & 0xFFFF00)>> 8); \ + piQxelOr[2] = (rrop_or << 8)|((rrop_or & 0xFF0000)>> 16); +#define RROP_SOLID24(dst,index) {\ + switch((index) & 3){ \ + case 0: \ + *(dst) |= spiQxelOr[0]; \ + break; \ + case 3: \ + *(dst) |= spiQxelOr[3]; \ + break; \ + case 1: \ + *(dst) |= spiQxelOr[1]; \ + *((dst)+1) |= spiQxelOr[4]; \ + break; \ + case 2: \ + *(dst) |= spiQxelOr[2]; \ + *((dst)+1) |= spiQxelOr[5]; \ + break; \ + } \ + } +#define RROP_SOLID(dst,idx) \ + (*(dst) |= piQxelOr[(idx)]) +#define RROP_SOLID_MASK(dst,mask,idx) \ + (*(dst) |= (piQxelOr[(idx)] & (mask))) +#define RROP_UNDECLARE (void)piQxelOr; (void)spiQxelOr; +#else +#define RROP_DECLARE register CfbBits rrop_or; +#define RROP_FETCH_GCPRIV(devPriv) rrop_or = (devPriv)->xor; +#define RROP_SOLID(dst) (*(dst) |= (rrop_or)) +#define RROP_SOLID_MASK(dst,mask) (*(dst) |= ((rrop_or) & (mask))) +#define RROP_UNDECLARE +#endif +#define RROP_NAME(prefix) RROP_NAME_CAT(prefix,Or) +#endif /* GXor */ + +#if RROP == GXnoop +#define RROP_DECLARE +#define RROP_FETCH_GCPRIV(devPriv) +#define RROP_SOLID(dst) +#define RROP_SOLID_MASK(dst,mask) +#define RROP_NAME(prefix) RROP_NAME_CAT(prefix,Noop) +#define RROP_UNDECLARE +#endif /* GXnoop */ + +#if RROP == GXset +#if PSZ == 24 +#define RROP_DECLARE register CfbBits rrop_and, rrop_xor; \ + CfbBits piQxelAnd[3], piQxelXor[3], spiQxelAnd[6], spiQxelXor[6]; +#define RROP_FETCH_GCPRIV(devPriv) rrop_and = (devPriv)->and; \ + rrop_xor = (devPriv)->xor; \ + spiQxelXor[0] = rrop_xor & 0xFFFFFF; \ + spiQxelXor[1] = rrop_xor << 24; \ + spiQxelXor[2] = rrop_xor << 16; \ + spiQxelXor[3] = rrop_xor << 8; \ + spiQxelXor[4] = (rrop_xor & 0xFFFF00)>> 8; \ + spiQxelXor[5] = (rrop_xor & 0xFF0000)>> 16; \ + spiQxelAnd[0] = (rrop_and & 0xFFFFFF) | 0xFF000000; \ + spiQxelAnd[1] = (rrop_and << 24) | 0xFFFFFF; \ + spiQxelAnd[2] = (rrop_and << 16) | 0xFFFF; \ + spiQxelAnd[3] = (rrop_and << 8) | 0xFF; \ + spiQxelAnd[4] = ((rrop_and & 0xFFFF00)>> 8) | 0xFFFF0000; \ + spiQxelAnd[5] = ((rrop_and & 0xFF0000)>> 16) | 0xFFFFFF00; \ + piQxelAnd[0] = (rrop_and & 0xFFFFFF)|(rrop_and << 24); \ + piQxelAnd[1] = (rrop_and << 16)|((rrop_and & 0xFFFF00)>> 8); \ + piQxelAnd[2] = (rrop_and << 8)|((rrop_and & 0xFF0000)>> 16); \ + piQxelXor[0] = (rrop_xor & 0xFFFFFF)|(rrop_xor << 24); \ + piQxelXor[1] = (rrop_xor << 16)|((rrop_xor & 0xFFFF00)>> 8); \ + piQxelXor[2] = (rrop_xor << 8)|((rrop_xor & 0xFF0000)>> 16); +#define RROP_SOLID24(dst,index) {\ + switch((index) & 3){ \ + case 0: \ + *(dst) = ((*(dst) & (piQxelAnd[0] |0xFF000000))^(piQxelXor[0] & 0xFFFFFF)); \ + break; \ + case 3: \ + *(dst) = ((*(dst) & (piQxelAnd[2]|0xFF))^(piQxelXor[2] & 0xFFFFFF00)); \ + break; \ + case 1: \ + *(dst) = ((*(dst) & (piQxelAnd[0]|0xFFFFFF))^(piQxelXor[0] & 0xFF000000)); \ + *((dst)+1) = ((*((dst)+1) & (piQxelAnd[1]|0xFFFF0000))^(piQxelXor[1] & 0xFFFF)); \ + break; \ + case 2: \ + *(dst) = ((*(dst) & (piQxelAnd[1]|0xFFFF))^(piQxelXor[1] & 0xFFFF0000)); \ + *((dst)+1) = ((*((dst)+1) & (piQxelAnd[2]|0xFFFFFF00))^(piQxelXor[2] & 0xFF)); \ + break; \ + } \ + } +#define RROP_SOLID(dst,idx) \ + (*(dst) = DoRRop (*(dst), piQxelAnd[(idx)], piQxelXor[(idx)])) +#define RROP_SOLID_MASK(dst,mask,idx) \ + (*(dst) = DoMaskRRop (*(dst), piQxelAnd[(idx)], piQxelXor[(idx)], (mask))) +#define RROP_UNDECLARE (void)piQxelAnd; (void)piQxelXor; \ + (void)spiQxelAnd; (void)spiQxelXor; +#else +#define RROP_DECLARE register CfbBits rrop_and, rrop_xor; +#define RROP_FETCH_GCPRIV(devPriv) rrop_and = (devPriv)->and; \ + rrop_xor = (devPriv)->xor; +#define RROP_SOLID(dst) (*(dst) = DoRRop (*(dst), rrop_and, rrop_xor)) +#define RROP_SOLID_MASK(dst,mask) (*(dst) = DoMaskRRop (*(dst), rrop_and, rrop_xor, (mask))) +#define RROP_UNDECLARE +#endif +#define RROP_NAME(prefix) RROP_NAME_CAT(prefix,General) +#endif /* GXset */ + +#define RROP_UNROLL_CASE1(p,i) case (i): RROP_SOLID((p) - (i)); +#define RROP_UNROLL_CASE2(p,i) RROP_UNROLL_CASE1(p,(i)+1) RROP_UNROLL_CASE1(p,i) +#define RROP_UNROLL_CASE4(p,i) RROP_UNROLL_CASE2(p,(i)+2) RROP_UNROLL_CASE2(p,i) +#define RROP_UNROLL_CASE8(p,i) RROP_UNROLL_CASE4(p,(i)+4) RROP_UNROLL_CASE4(p,i) +#define RROP_UNROLL_CASE16(p,i) RROP_UNROLL_CASE8(p,(i)+8) RROP_UNROLL_CASE8(p,i) +#define RROP_UNROLL_CASE32(p,i) RROP_UNROLL_CASE16(p,(i)+16) RROP_UNROLL_CASE16(p,i) +#define RROP_UNROLL_CASE3(p) RROP_UNROLL_CASE2(p,2) RROP_UNROLL_CASE1(p,1) +#define RROP_UNROLL_CASE7(p) RROP_UNROLL_CASE4(p,4) RROP_UNROLL_CASE3(p) +#define RROP_UNROLL_CASE15(p) RROP_UNROLL_CASE8(p,8) RROP_UNROLL_CASE7(p) +#define RROP_UNROLL_CASE31(p) RROP_UNROLL_CASE16(p,16) RROP_UNROLL_CASE15(p) +#ifdef LONG64 +#define RROP_UNROLL_CASE63(p) RROP_UNROLL_CASE32(p,32) RROP_UNROLL_CASE31(p) +#endif /* LONG64 */ + +#define RROP_UNROLL_LOOP1(p,i) RROP_SOLID((p) + (i)); +#define RROP_UNROLL_LOOP2(p,i) RROP_UNROLL_LOOP1(p,(i)) RROP_UNROLL_LOOP1(p,(i)+1) +#define RROP_UNROLL_LOOP4(p,i) RROP_UNROLL_LOOP2(p,(i)) RROP_UNROLL_LOOP2(p,(i)+2) +#define RROP_UNROLL_LOOP8(p,i) RROP_UNROLL_LOOP4(p,(i)) RROP_UNROLL_LOOP4(p,(i)+4) +#define RROP_UNROLL_LOOP16(p,i) RROP_UNROLL_LOOP8(p,(i)) RROP_UNROLL_LOOP8(p,(i)+8) +#define RROP_UNROLL_LOOP32(p,i) RROP_UNROLL_LOOP16(p,(i)) RROP_UNROLL_LOOP16(p,(i)+16) +#ifdef LONG64 +#define RROP_UNROLL_LOOP64(p,i) RROP_UNROLL_LOOP32(p,(i)) RROP_UNROLL_LOOP32(p,(i)+32) +#endif /* LONG64 */ + +#if defined (FAST_CONSTANT_OFFSET_MODE) && defined (SHARED_IDCACHE) && (RROP == GXcopy) + +#ifdef LONG64 +#define RROP_UNROLL_SHIFT 6 +#define RROP_UNROLL_CASE(p) RROP_UNROLL_CASE63(p) +#define RROP_UNROLL_LOOP(p) RROP_UNROLL_LOOP64(p,-64) +#else /* not LONG64 */ +#define RROP_UNROLL_SHIFT 5 +#define RROP_UNROLL_CASE(p) RROP_UNROLL_CASE31(p) +#define RROP_UNROLL_LOOP(p) RROP_UNROLL_LOOP32(p,-32) +#endif /* LONG64 */ +#define RROP_UNROLL (1<>= RROP_UNROLL_SHIFT; \ + (pdst) += part * (sizeof (CfbBits) / sizeof (*pdst)); \ + switch (part) {\ + RROP_UNROLL_CASE((CfbBits *) (pdst)) \ + } \ + while (--(nmiddle) >= 0) { \ + (pdst) += RROP_UNROLL * (sizeof (CfbBits) / sizeof (*pdst)); \ + RROP_UNROLL_LOOP((CfbBits *) (pdst)) \ + } \ +} +#else +#define RROP_SPAN(pdst,nmiddle) \ + while (--(nmiddle) >= 0) { \ + RROP_SOLID((CfbBits *) (pdst)); \ + (pdst) += sizeof (CfbBits) / sizeof (*pdst); \ + } +#endif + +#if !defined(UNIXCPP) || defined(ANSICPP) +#define RROP_NAME_CAT(prefix,suffix) prefix##suffix +#else +#define RROP_NAME_CAT(prefix,suffix) prefix/**/suffix +#endif diff --git a/xorg-server-1.4/cfb/cfbscrinit.c b/xorg-server-1.4/cfb/cfbscrinit.c new file mode 100644 index 0000000..9f411ab --- /dev/null +++ b/xorg-server-1.4/cfb/cfbscrinit.c @@ -0,0 +1,230 @@ +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + 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 no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or The Open Group +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and The Open Group make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN 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 SUN 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. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "servermd.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "resource.h" +#include "colormap.h" +#include "colormapst.h" +#include "cfb.h" +#include "mi.h" +#include "mistruct.h" +#include "dix.h" +#include "cfbmskbits.h" +#include "mibstore.h" + +BSFuncRec cfbBSFuncRec = { + cfbSaveAreas, + cfbRestoreAreas, + (BackingStoreSetClipmaskRgnProcPtr) 0, + (BackingStoreGetImagePixmapProcPtr) 0, + (BackingStoreGetSpansPixmapProcPtr) 0, +}; + +Bool +cfbCloseScreen (index, pScreen) + int index; + ScreenPtr pScreen; +{ + int d; + DepthPtr depths = pScreen->allowedDepths; + + for (d = 0; d < pScreen->numDepths; d++) + xfree (depths[d].vids); + xfree (depths); + xfree (pScreen->visuals); +#ifdef CFB_NEED_SCREEN_PRIVATE + xfree (pScreen->devPrivates[cfbScreenPrivateIndex].ptr); +#else + xfree (pScreen->devPrivate); +#endif + return TRUE; +} + +static void DestroyColormapNoop( + ColormapPtr pColormap) +{ + /* NOOP */ +} + +static void StoreColorsNoop( + ColormapPtr pColormap, + int ndef, + xColorItem * pdef) +{ + /* NOOP */ +} + +Bool +cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width) + register ScreenPtr pScreen; + pointer pbits; /* pointer to screen bitmap */ + int xsize, ysize; /* in pixels */ + int dpix, dpiy; /* dots per inch */ + int width; /* pixel width of frame buffer */ +{ + if (!cfbAllocatePrivates(pScreen, (int *) 0, (int *) 0)) + return FALSE; + pScreen->defColormap = FakeClientID(0); + /* let CreateDefColormap do whatever it wants for pixels */ + pScreen->blackPixel = pScreen->whitePixel = (Pixel) 0; + pScreen->QueryBestSize = mfbQueryBestSizeWeak(); + /* SaveScreen */ + pScreen->GetImage = cfbGetImage; + pScreen->GetSpans = cfbGetSpans; + pScreen->CreateWindow = cfbCreateWindow; + pScreen->DestroyWindow = cfbDestroyWindow; + pScreen->PositionWindow = cfbPositionWindow; + pScreen->ChangeWindowAttributes = cfbChangeWindowAttributes; + pScreen->RealizeWindow = cfbMapWindow; + pScreen->UnrealizeWindow = cfbUnmapWindow; + pScreen->PaintWindowBackground = cfbPaintWindow; + pScreen->PaintWindowBorder = cfbPaintWindow; + pScreen->CopyWindow = cfbCopyWindow; + pScreen->CreatePixmap = cfbCreatePixmap; + pScreen->DestroyPixmap = cfbDestroyPixmap; + pScreen->RealizeFont = mfbRealizeFontWeak(); + pScreen->UnrealizeFont = mfbUnrealizeFontWeak(); + pScreen->CreateGC = cfbCreateGC; + pScreen->CreateColormap = cfbInitializeColormap; + pScreen->DestroyColormap = DestroyColormapNoop; + pScreen->InstallColormap = cfbInstallColormap; + pScreen->UninstallColormap = cfbUninstallColormap; + pScreen->ListInstalledColormaps = cfbListInstalledColormaps; + pScreen->StoreColors = StoreColorsNoop; + pScreen->ResolveColor = cfbResolveColor; + pScreen->BitmapToRegion = mfbPixmapToRegionWeak(); + + mfbRegisterCopyPlaneProc (pScreen, cfbCopyPlane); + return TRUE; +} + +#ifdef CFB_NEED_SCREEN_PRIVATE +Bool +cfbCreateScreenResources(pScreen) + ScreenPtr pScreen; +{ + Bool retval; + + pointer oldDevPrivate = pScreen->devPrivate; + pScreen->devPrivate = pScreen->devPrivates[cfbScreenPrivateIndex].ptr; + retval = miCreateScreenResources(pScreen); + pScreen->devPrivates[cfbScreenPrivateIndex].ptr = pScreen->devPrivate; + pScreen->devPrivate = oldDevPrivate; + return retval; +} +#endif + +Bool +cfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width) + register ScreenPtr pScreen; + pointer pbits; /* pointer to screen bitmap */ + int xsize, ysize; /* in pixels */ + int dpix, dpiy; /* dots per inch */ + int width; /* pixel width of frame buffer */ +{ +#ifdef CFB_NEED_SCREEN_PRIVATE + pointer oldDevPrivate; +#endif + VisualPtr visuals; + DepthPtr depths; + int nvisuals; + int ndepths; + int rootdepth; + VisualID defaultVisual; + + rootdepth = 0; + if (!cfbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth, + &defaultVisual,((unsigned long)1<<(PSZ-1)), 8)) + return FALSE; +#ifdef CFB_NEED_SCREEN_PRIVATE + oldDevPrivate = pScreen->devPrivate; +#endif + if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, + rootdepth, ndepths, depths, + defaultVisual, nvisuals, visuals)) + return FALSE; + /* overwrite miCloseScreen with our own */ + pScreen->CloseScreen = cfbCloseScreen; +#ifdef CFB_NEED_SCREEN_PRIVATE + pScreen->CreateScreenResources = cfbCreateScreenResources; + pScreen->devPrivates[cfbScreenPrivateIndex].ptr = pScreen->devPrivate; + pScreen->devPrivate = oldDevPrivate; +#endif + pScreen->BackingStoreFuncs = cfbBSFuncRec; + pScreen->GetScreenPixmap = cfbGetScreenPixmap; + pScreen->SetScreenPixmap = cfbSetScreenPixmap; + return TRUE; +} + +/* dts * (inch/dot) * (25.4 mm / inch) = mm */ +Bool +cfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width) + register ScreenPtr pScreen; + pointer pbits; /* pointer to screen bitmap */ + int xsize, ysize; /* in pixels */ + int dpix, dpiy; /* dots per inch */ + int width; /* pixel width of frame buffer */ +{ + if (!cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width)) + return FALSE; + return cfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width); +} + +PixmapPtr +cfbGetScreenPixmap(pScreen) + ScreenPtr pScreen; +{ +#ifdef CFB_NEED_SCREEN_PRIVATE + return (PixmapPtr)pScreen->devPrivates[cfbScreenPrivateIndex].ptr; +#else + return (PixmapPtr)pScreen->devPrivate; +#endif +} + +void +cfbSetScreenPixmap(pPix) + PixmapPtr pPix; +{ +#ifdef CFB_NEED_SCREEN_PRIVATE + if (pPix) + pPix->drawable.pScreen->devPrivates[cfbScreenPrivateIndex].ptr = + (pointer)pPix; +#else + if (pPix) + pPix->drawable.pScreen->devPrivate = (pointer)pPix; +#endif +} diff --git a/xorg-server-1.4/cfb/cfbseg.c b/xorg-server-1.4/cfb/cfbseg.c new file mode 100644 index 0000000..4371721 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbseg.c @@ -0,0 +1,2 @@ +#define POLYSEGMENT +#include "../cfb/cfbline.c" diff --git a/xorg-server-1.4/cfb/cfbsetsp.c b/xorg-server-1.4/cfb/cfbsetsp.c new file mode 100644 index 0000000..a000fd9 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbsetsp.c @@ -0,0 +1,316 @@ +/*********************************************************** + +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 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. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "servermd.h" + +#include "misc.h" +#include "regionstr.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" + +#include "cfb.h" +#include "cfbmskbits.h" +#include + +/* cfbSetScanline -- copies the bits from psrc to the drawable starting at + * (xStart, y) and continuing to (xEnd, y). xOrigin tells us where psrc + * starts on the scanline. (I.e., if this scanline passes through multiple + * boxes, we may not want to start grabbing bits at psrc but at some offset + * further on.) + */ +void +cfbSetScanline(y, xOrigin, xStart, xEnd, psrc, alu, pdstBase, widthDst, planemask) + int y; + int xOrigin; /* where this scanline starts */ + int xStart; /* first bit to use from scanline */ + int xEnd; /* last bit to use from scanline + 1 */ + register unsigned int *psrc; + register int alu; /* raster op */ + int *pdstBase; /* start of the drawable */ + int widthDst; /* width of drawable in words */ + unsigned long planemask; +{ + int w; /* width of scanline in bits */ + register int *pdst; /* where to put the bits */ + register int tmpSrc; /* scratch buffer to collect bits in */ + int offSrc; + int nl; +#if PSZ == 24 + register char *psrcb, *pdstb; + register int xIndex; +#else + int dstBit; /* offset in bits from beginning of + * word */ + register int nstart; /* number of bits from first partial */ +#if PSZ != 32 || PPW != 1 + register int nend; /* " " last partial word */ +#endif + int startmask, endmask, nlMiddle; +#endif + DeclareMergeRop() + + InitializeMergeRop(alu,planemask); +#if PSZ == 24 + pdst = pdstBase + (y * widthDst); + xIndex = xStart; + pdstb = (char *)pdst + (xStart * 3); + offSrc = xStart - xOrigin; + psrcb = (char *)psrc + (offSrc * 3); +#else + pdst = pdstBase + (y * widthDst) + (xStart >> PWSH); + psrc += (xStart - xOrigin) >> PWSH; + offSrc = (xStart - xOrigin) & PIM; +#endif + w = xEnd - xStart; + +#if PSZ == 24 + nl = w; + while (nl--){ + psrc = (unsigned int *)((unsigned long)psrcb & ~0x03); + getbits24(psrc, tmpSrc, offSrc); + pdst = (int *)((unsigned long)pdstb & ~0x03); + DoMergeRop24(tmpSrc, pdst, xIndex); + offSrc++; + psrcb += 3; + xIndex++; + pdstb += 3; + } +#else /* PSZ == 24 */ + dstBit = xStart & PIM; + if (dstBit + w <= PPW) + { + maskpartialbits(dstBit, w, startmask); + endmask = 0; + nlMiddle = 0; + } + else + { + maskbits(xStart, w, startmask, endmask, nlMiddle); + } + if (startmask) + nstart = PPW - dstBit; + else + nstart = 0; +#if PSZ != 32 || PPW != 1 + if (endmask) + nend = xEnd & PIM; + else + nend = 0; +#endif + if (startmask) + { + getbits(psrc, offSrc, nstart, tmpSrc); + putbitsmropshort(tmpSrc, dstBit, nstart, pdst); + pdst++; + offSrc += nstart; + if (offSrc > PLST) + { + psrc++; + offSrc -= PPW; + } + } + nl = nlMiddle; + while (nl--) + { + getbits(psrc, offSrc, PPW, tmpSrc); + *pdst = DoMergeRop(tmpSrc, *pdst); + pdst++; + psrc++; + } + if (endmask) + { + getbits(psrc, offSrc, nend, tmpSrc); + putbitsmropshort(tmpSrc, 0, nend, pdst); + } +#endif /* PSZ == 24 */ +} + + + +/* SetSpans -- for each span copy pwidth[i] bits from psrc to pDrawable at + * ppt[i] using the raster op from the GC. If fSorted is TRUE, the scanlines + * are in increasing Y order. + * Source bit lines are server scanline padded so that they always begin + * on a word boundary. + */ +void +cfbSetSpans(pDrawable, pGC, pcharsrc, ppt, pwidth, nspans, fSorted) + DrawablePtr pDrawable; + GCPtr pGC; + char *pcharsrc; + register DDXPointPtr ppt; + int *pwidth; + int nspans; + int fSorted; +{ + unsigned int *psrc = (unsigned int *)pcharsrc; + CfbBits *pdstBase; /* start of dst bitmap */ + int widthDst; /* width of bitmap in words */ + register BoxPtr pbox, pboxLast, pboxTest; + register DDXPointPtr pptLast; + int alu; + RegionPtr prgnDst; + int xStart, xEnd; + int yMax; + + alu = pGC->alu; + prgnDst = cfbGetCompositeClip(pGC); + pptLast = ppt + nspans; + + cfbGetLongWidthAndPointer (pDrawable, widthDst, pdstBase) + + yMax = (int) pDrawable->y + (int) pDrawable->height; + + pbox = REGION_RECTS(prgnDst); + pboxLast = pbox + REGION_NUM_RECTS(prgnDst); + + if(fSorted) + { + /* scan lines sorted in ascending order. Because they are sorted, we + * don't have to check each scanline against each clip box. We can be + * sure that this scanline only has to be clipped to boxes at or after the + * beginning of this y-band + */ + pboxTest = pbox; + while(ppt < pptLast) + { + pbox = pboxTest; + if(ppt->y >= yMax) + break; + while(pbox < pboxLast) + { + if(pbox->y1 > ppt->y) + { + /* scanline is before clip box */ + break; + } + else if(pbox->y2 <= ppt->y) + { + /* clip box is before scanline */ + pboxTest = ++pbox; + continue; + } + else if(pbox->x1 > ppt->x + *pwidth) + { + /* clip box is to right of scanline */ + break; + } + else if(pbox->x2 <= ppt->x) + { + /* scanline is to right of clip box */ + pbox++; + continue; + } + + /* at least some of the scanline is in the current clip box */ + xStart = max(pbox->x1, ppt->x); + xEnd = min(ppt->x + *pwidth, pbox->x2); + cfbSetScanline(ppt->y, ppt->x, xStart, xEnd, psrc, alu, + (int *)pdstBase, widthDst, pGC->planemask); + if(ppt->x + *pwidth <= pbox->x2) + { + /* End of the line, as it were */ + break; + } + else + pbox++; + } + /* We've tried this line against every box; it must be outside them + * all. move on to the next point */ + ppt++; + psrc += PixmapWidthInPadUnits(*pwidth, pDrawable->depth); + pwidth++; + } + } + else + { + /* scan lines not sorted. We must clip each line against all the boxes */ + while(ppt < pptLast) + { + if(ppt->y >= 0 && ppt->y < yMax) + { + + for(pbox = REGION_RECTS(prgnDst); pbox< pboxLast; pbox++) + { + if(pbox->y1 > ppt->y) + { + /* rest of clip region is above this scanline, + * skip it */ + break; + } + if(pbox->y2 <= ppt->y) + { + /* clip box is below scanline */ + pbox++; + break; + } + if(pbox->x1 <= ppt->x + *pwidth && + pbox->x2 > ppt->x) + { + xStart = max(pbox->x1, ppt->x); + xEnd = min(pbox->x2, ppt->x + *pwidth); + cfbSetScanline(ppt->y, ppt->x, xStart, xEnd, psrc, alu, + (int *)pdstBase, widthDst, pGC->planemask); + } + + } + } + psrc += PixmapWidthInPadUnits(*pwidth, pDrawable->depth); + ppt++; + pwidth++; + } + } +} + diff --git a/xorg-server-1.4/cfb/cfbsolid.c b/xorg-server-1.4/cfb/cfbsolid.c new file mode 100644 index 0000000..f0da05e --- /dev/null +++ b/xorg-server-1.4/cfb/cfbsolid.c @@ -0,0 +1,1365 @@ +/* + * +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 + */ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "servermd.h" +#include "gcstruct.h" +#include "window.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "windowstr.h" + +#include "cfb.h" +#include "cfbmskbits.h" +#include "cfbrrop.h" + +#include "mi.h" +#include "mispans.h" + +#if defined(FAST_CONSTANT_OFFSET_MODE) && (RROP != GXcopy) +# define Expand(left,right,leftAdjust) {\ + int part = nmiddle & 3; \ + int widthStep; \ + widthStep = widthDst - nmiddle - leftAdjust; \ + nmiddle >>= 2; \ + pdst = pdstRect; \ + while (h--) { \ + left \ + pdst += part; \ + switch (part) { \ + RROP_UNROLL_CASE3(pdst) \ + } \ + m = nmiddle; \ + while (m) { \ + pdst += 4; \ + RROP_UNROLL_LOOP4(pdst,-4) \ + m--; \ + } \ + right \ + pdst += widthStep; \ + } \ +} +#else +# ifdef RROP_UNROLL +# define Expand(left,right,leftAdjust) {\ + int part = nmiddle & RROP_UNROLL_MASK; \ + int widthStep; \ + widthStep = widthDst - nmiddle - leftAdjust; \ + nmiddle >>= RROP_UNROLL_SHIFT; \ + pdst = pdstRect; \ + while (h--) { \ + left \ + pdst += part; \ + switch (part) { \ + RROP_UNROLL_CASE(pdst) \ + } \ + m = nmiddle; \ + while (m) { \ + pdst += RROP_UNROLL; \ + RROP_UNROLL_LOOP(pdst) \ + m--; \ + } \ + right \ + pdst += widthStep; \ + } \ +} + +# else +# define Expand(left, right, leftAdjust) { \ + while (h--) { \ + pdst = pdstRect; \ + left \ + m = nmiddle; \ + while (m--) {\ + RROP_SOLID(pdst); \ + pdst++; \ + } \ + right \ + pdstRect += widthDst; \ + } \ +} +# endif +#endif + + +void +RROP_NAME(cfbFillRectSolid) (pDrawable, pGC, nBox, pBox) + DrawablePtr pDrawable; + GCPtr pGC; + int nBox; + BoxPtr pBox; +{ + register int m; + register CfbBits *pdst; + RROP_DECLARE + CfbBits *pdstBase, *pdstRect; + int nmiddle; + int h; + int w; + int widthDst; +#if PSZ == 24 + int leftIndex, rightIndex; +#else + register CfbBits leftMask, rightMask; +#endif + + cfbGetLongWidthAndPointer (pDrawable, widthDst, pdstBase) + + RROP_FETCH_GC(pGC) + + for (; nBox; nBox--, pBox++) + { + pdstRect = pdstBase + pBox->y1 * widthDst; + h = pBox->y2 - pBox->y1; + w = pBox->x2 - pBox->x1; +#if PSZ == 8 + if (w == 1) + { + register char *pdstb = ((char *) pdstRect) + pBox->x1; + int incr = widthDst * PGSZB; + + while (h--) + { + RROP_SOLID (pdstb); + pdstb += incr; + } + } + else + { +#endif +#if PSZ == 24 + leftIndex = pBox->x1 &3; +/* rightIndex = ((leftIndex+w)<5)?0:pBox->x2 &3;*/ + rightIndex = pBox->x2 &3; + + nmiddle = w - rightIndex; + if(leftIndex){ + nmiddle -= (4 - leftIndex); + } + nmiddle >>= 2; + if(nmiddle < 0) + nmiddle = 0; + + pdstRect += (pBox->x1 * 3) >> 2; + pdst = pdstRect; + switch(leftIndex+w){ + case 4: + switch(leftIndex){ + case 0: + while(h--){ +#if RROP == GXcopy + *pdst++ = piQxelXor[0]; + *pdst++ = piQxelXor[1]; + *pdst-- = piQxelXor[2]; +#endif +#if RROP == GXxor + *pdst++ ^= piQxelXor[0]; + *pdst++ ^= piQxelXor[1]; + *pdst-- ^= piQxelXor[2]; +#endif +#if RROP == GXand + *pdst++ &= piQxelAnd[0]; + *pdst++ &= piQxelAnd[1]; + *pdst-- &= piQxelAnd[2]; +#endif +#if RROP == GXor + *pdst++ |= piQxelOr[0]; + *pdst++ |= piQxelOr[1]; + *pdst-- |= piQxelOr[2]; +#endif +#if RROP == GXset + *pdst = DoRRop((*pdst), piQxelAnd[0], piQxelXor[0]); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[1], piQxelXor[1]); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[2], piQxelXor[2]); + pdst--; +#endif + pdst--; + pdst += widthDst; + } + break; + case 1: + while(h--){ +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + pdst++; + *pdst++ = piQxelXor[1]; + *pdst-- = piQxelXor[2]; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[0] & 0xFF000000); + *pdst++ ^= piQxelXor[1]; + *pdst-- ^= piQxelXor[2]; +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[0] | 0x00FFFFFF); + *pdst++ &= piQxelAnd[1]; + *pdst-- &= piQxelAnd[2]; +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[0] & 0xFF000000); + *pdst++ |= piQxelOr[1]; + *pdst-- |= piQxelOr[2]; +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[0], piQxelXor[0], 0xFF000000); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[1], piQxelXor[1]); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[2], piQxelXor[2]); + pdst--; +#endif + pdst--; + pdst += widthDst; + } + break; + case 2: + while(h--){ +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + pdst++; + *pdst-- = piQxelXor[2]; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[1] & 0xFFFF0000); + *pdst-- ^= piQxelXor[2]; +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[1] | 0xFFFF); + *pdst-- &= piQxelAnd[2]; +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[1] & 0xFFFF0000); + *pdst-- |= piQxelOr[2]; +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[1], piQxelXor[1], 0xFFFF0000); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[2], piQxelXor[2]); + pdst--; +#endif + pdst += widthDst; + } + break; + case 3: + while(h--){ +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); +#endif +#if RROP == GXxor + *pdst ^= (piQxelXor[2] & 0xFFFFFF00); +#endif +#if RROP == GXand + *pdst &= (piQxelAnd[2] | 0xFF); +#endif +#if RROP == GXor + *pdst |= (piQxelOr[2] & 0xFFFFFF00); +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[2], piQxelXor[2], 0xFFFFFF00); +#endif + pdst += widthDst; + } + break; + } + break; + case 3: + switch(leftIndex){ + case 0: + while(h--){ +#if RROP == GXcopy + *pdst++ = piQxelXor[0]; + *pdst++ = piQxelXor[1]; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst--; +#endif +#if RROP == GXxor + *pdst++ ^= piQxelXor[0]; + *pdst++ ^= piQxelXor[1]; + *pdst-- ^= (piQxelXor[2] & 0xFF); +#endif +#if RROP == GXand + *pdst++ &= piQxelAnd[0]; + *pdst++ &= piQxelAnd[1]; + *pdst-- &= (piQxeAnd[2] | 0xFFFFFF00); +#endif +#if RROP == GXor + *pdst++ |= piQxelOr[0]; + *pdst++ |= piQxelOr[1]; + *pdst-- |= (piQxelOr[2] & 0xFF); +#endif +#if RROP == GXset + *pdst = DoRRop((*pdst), piQxelAnd[0], piQxelXor[0]); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[1], piQxelXor[1]); + pdst++; + *pdst = DoMaskRRop((*pdst), piQxelAnd[2], piQxelXor[2], 0xFF); + pdst--; +#endif + pdst--; + pdst += widthDst; + } + break; + case 1: + while(h--){ +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + pdst++; + *pdst++ = piQxelXor[1]; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst--; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[0] & 0xFF000000); + *pdst++ ^= piQxelXor[1]; + *pdst-- ^= (piQxelXor[2] & 0xFF); +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[0] | 0x00FFFFFF); + *pdst++ &= piQxelAnd[1]; + *pdst-- &= (piQxelAnd[2] | 0xFFFFFF00); +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[0] & 0xFF000000); + *pdst++ |= piQxelOr[1]; + *pdst-- |= (piQxelOr[2] & 0xFF); +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[0], piQxelXor[0], 0xFF000000); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[1], piQxelXor[1]); + pdst++; + *pdst = DoMaskRRop((*pdst), piQxelAnd[2], piQxelXor[2], 0xFF); + pdst--; +#endif + pdst--; + pdst += widthDst; + } + break; + case 2: + while(h--){ +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + pdst++; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst--; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[1] & 0xFFFF0000); + *pdst-- ^= (piQxelXor[2] & 0xFF); +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[1] | 0xFFFF); + *pdst-- &= (piQxelAnd[2] | 0xFFFFFF00); +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[1] & 0xFFFF0000); + *pdst-- |= (piQxelOr[2] & 0xFF); +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[1], piQxelXor[1], 0xFFFF0000); + pdst++; + *pdst = DoMaskRRop((*pdst), piQxelAnd[2], piQxelXor[2], 0xFF); + pdst--; +#endif + pdst += widthDst; + } + break; + case 3: + while(h--){ +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); +#endif +#if RROP == GXxor + *pdst ^= (piQxelXor[2] & 0xFFFFFF00); +#endif +#if RROP == GXand + *pdst &= (piQxelAnd[2] | 0xFF); +#endif +#if RROP == GXor + *pdst |= (piQxelOr[2] & 0xFFFFFF00); +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[2], piQxelXor[2], 0xFFFFFF00); +#endif + pdst += widthDst; + } + break; + } + break; + case 2: /* leftIndex + w = 2*/ + switch(leftIndex){ + case 2: + while(h--){ +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + pdst++; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst--; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[1] & 0xFFFF0000); + *pdst-- ^= (piQxelXor[2] & 0xFF); +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[1] | 0xFFFF0000); + *pdst-- &= (piQxelAnd[2] | 0xFF); +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[1] & 0xFFFF0000); + *pdst-- |= (piQxelOr[2] & 0xFF); +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[1], piQxelXor[1], 0xFFFF0000); + pdst++; + *pdst = DoMaskRRop((*pdst), piQxelAnd[2], piQxelXor[2], 0xFF); + pdst--; +#endif + pdst += widthDst; + } + break; + case 1: + while(h--){ +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + pdst++; + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + pdst--; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[0] & 0xFF000000); + *pdst-- ^= (piQxelXor[1] & 0xFFFF); +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[0] | 0xFFFFFF); + *pdst-- &= (piQxelAnd[1] | 0xFFFF0000); +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[0] & 0xFF000000); + *pdst-- |= (piQxelOr[1] & 0xFFFF); +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[0], piQxelXor[0], 0xFF000000); + pdst++; + *pdst = DoMaskRRop((*pdst), piQxelAnd[1], piQxelXor[1], 0xFFFF); + pdst--; +#endif + pdst += widthDst; + } + break; + case 0: /*case 2 leftIndex == 0 */ + while(h--){ +#if RROP == GXcopy + *pdst++ = piQxelXor[0]; + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + pdst--; +#endif +#if RROP == GXxor + *pdst++ ^= piQxelXor[0]; + *pdst-- ^= (piQxelXor[1] & 0xFFFF); +#endif +#if RROP == GXand + *pdst++ &= piQxelAnd[0]; + *pdst-- &= (piQxelAnd[1] | 0xFFFF0000); +#endif +#if RROP == GXor + *pdst++ |= piQxelOr[0]; + *pdst-- |= (piQxelOr[1] & 0xFFFF); +#endif +#if RROP == GXset + *pdst = DoRRop((*pdst), piQxelAnd[0], piQxelXor[0]); + pdst++; + *pdst = DoMaskRRop((*pdst), piQxelAnd[1], piQxelXor[1], 0xFFFF); + pdst--; +#endif + pdst += widthDst; + } + break; + } + break; + case 1: /*only if leftIndex = 0 and w = 1*/ + while(h--){ +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFF000000) | (piQxelXor[0] & 0xFFFFFF); +#endif +#if RROP == GXxor + *pdst ^= (piQxelXor[0] & 0xFFFFFF); +#endif +#if RROP == GXand + *pdst &= (piQxelAnd[0] | 0xFF000000); +#endif +#if RROP == GXor + *pdst |= (piQxelOr[0] & 0xFFFFFF); +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[0], piQxelXor[0], 0xFFFFFF); +#endif + pdst += widthDst; + } + break; + case 0: /*never*/ + break; + default: + { + while(h--){ + pdst = pdstRect; + switch(leftIndex){ + case 0: + break; + case 1: +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + pdst++; + *pdst++ = piQxelXor[1]; + *pdst++ = piQxelXor[2]; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[0] & 0xFF000000); + *pdst++ ^= piQxelXor[1]; + *pdst++ ^= piQxelXor[2]; +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[0] | 0xFFFFFF); + *pdst++ &= piQxelAnd[1]; + *pdst++ &= piQxelAnd[2]; +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[0] & 0xFF000000); + *pdst++ |= piQxelOr[1]; + *pdst++ |= piQxelOr[2]; +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[0], piQxelXor[0], 0xFF000000); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[1], piQxelXor[1]); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[2], piQxelXor[2]); + pdst++; +#endif + break; + case 2: +#if RROP == GXcopy + *pdst = (((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000)); + pdst++; + *pdst++ = piQxelXor[2]; +#endif +#if RROP == GXxor + *pdst++ ^=(piQxelXor[1] & 0xFFFF0000); + *pdst++ ^= piQxelXor[2]; +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[1] | 0xFFFF); + *pdst++ &= piQxelAnd[2]; +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[1] & 0xFFFF0000); + *pdst++ |= piQxelOr[2]; +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[1], piQxelXor[1], 0xFFFF0000); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[2], piQxelXor[2]); + pdst++; +#endif + break; + case 3: +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); + pdst++; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[2] & 0xFFFFFF00); +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[2] | 0xFF); +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[2] & 0xFFFFFF00); +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[2], piQxelXor[2], 0xFFFFFF00); + pdst++; +#endif + break; + } + m = nmiddle; + while(m--){ +#if RROP == GXcopy + *pdst++ = piQxelXor[0]; + *pdst++ = piQxelXor[1]; + *pdst++ = piQxelXor[2]; +#endif +#if RROP == GXxor + *pdst++ ^= piQxelXor[0]; + *pdst++ ^= piQxelXor[1]; + *pdst++ ^= piQxelXor[2]; +#endif +#if RROP == GXand + *pdst++ &= piQxelAnd[0]; + *pdst++ &= piQxelAnd[1]; + *pdst++ &= piQxelAnd[2]; +#endif +#if RROP == GXor + *pdst++ |= piQxelOr[0]; + *pdst++ |= piQxelOr[1]; + *pdst++ |= piQxelOr[2]; +#endif +#if RROP == GXset + *pdst = DoRRop((*pdst), piQxelAnd[0], piQxelXor[0]); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[1], piQxelXor[1]); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[2], piQxelXor[2]); + pdst++; +#endif + } + switch(rightIndex){ + case 0: + break; + case 1: +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFF000000) | (piQxelXor[0] & 0xFFFFFF); + pdst++; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[0] & 0xFFFFFF); +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[0] | 0xFF); +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[0] & 0xFFFFFF); +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[0], piQxelXor[0], 0xFFFFFF); + pdst++; +#endif + break; + case 2: +#if RROP == GXcopy + *pdst++ = piQxelXor[0]; + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + pdst++; +#endif +#if RROP == GXxor + *pdst++ ^= piQxelXor[0]; + *pdst++ ^= (piQxelXor[1] & 0xFFFF); +#endif +#if RROP == GXand + *pdst++ &= piQxelAnd[0]; + *pdst++ &= (piQxelAnd[1] | 0xFFFF0000); +#endif +#if RROP == GXor + *pdst++ |= piQxelOr[0]; + *pdst++ |= (piQxelOr[1] & 0xFFFF); +#endif +#if RROP == GXset + *pdst = DoRRop((*pdst), piQxelAnd[0], piQxelXor[0]); + pdst++; + *pdst = DoMaskRRop((*pdst), piQxelAnd[1], piQxelXor[1], 0xFFFF); + pdst++; +#endif + break; + case 3: +#if RROP == GXcopy + *pdst++ = piQxelXor[0]; + *pdst++ = piQxelXor[1]; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst++; +#endif +#if RROP == GXxor + *pdst++ ^= piQxelXor[0]; + *pdst++ ^= piQxelXor[1]; + *pdst++ ^= (piQxelXor[2] & 0xFF); +#endif +#if RROP == GXand + *pdst++ &= piQxelAnd[0]; + *pdst++ &= piQxelAnd[1]; + *pdst++ &= (piQxelAnd[2] | 0xFFFFFF00); +#endif +#if RROP == GXor + *pdst++ |= piQxelOr[0]; + *pdst++ |= piQxelOr[1]; + *pdst++ |= (piQxelOr[2] & 0xFF); +#endif +#if RROP == GXset + *pdst = DoRRop((*pdst), piQxelAnd[0], piQxelXor[0]); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[1], piQxelXor[1]); + pdst++; + *pdst = DoMaskRRop((*pdst), piQxelAnd[2], piQxelXor[2], 0xFF); + pdst++; +#endif + break; + } + pdstRect += widthDst; + } + } + } +#else /* PSZ != 24 */ + pdstRect += (pBox->x1 >> PWSH); + if ((pBox->x1 & PIM) + w <= PPW) + { + maskpartialbits(pBox->x1, w, leftMask); + pdst = pdstRect; + while (h--) { + RROP_SOLID_MASK (pdst, leftMask); + pdst += widthDst; + } + } + else + { + maskbits (pBox->x1, w, leftMask, rightMask, nmiddle); + if (leftMask) + { + if (rightMask) /* left mask and right mask */ + { + Expand(RROP_SOLID_MASK (pdst, leftMask); pdst++;, + RROP_SOLID_MASK (pdst, rightMask);, 1) + } + else /* left mask and no right mask */ + { + Expand(RROP_SOLID_MASK (pdst, leftMask); pdst++;, + ;, 1) + } + } + else + { + if (rightMask) /* no left mask and right mask */ + { + Expand(;, + RROP_SOLID_MASK (pdst, rightMask);, 0) + } + else /* no left mask and no right mask */ + { + Expand(;, + ;, 0) + } + } + } +#endif +#if PSZ == 8 + } +#endif + } + RROP_UNDECLARE +} + +void +RROP_NAME(cfbSolidSpans) (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) + DrawablePtr pDrawable; + GCPtr pGC; + int nInit; /* number of spans to fill */ + DDXPointPtr pptInit; /* pointer to list of start points */ + int *pwidthInit; /* pointer to list of n widths */ + int fSorted; +{ + CfbBits *pdstBase; + int widthDst; + + RROP_DECLARE + + register CfbBits *pdst; + register int nlmiddle; + register int w; + int x; + + /* next three parameters are post-clip */ + int n; /* number of spans to fill */ + DDXPointPtr ppt; /* pointer to list of start points */ + int *pwidthFree;/* copies of the pointers to free */ + DDXPointPtr pptFree; + int *pwidth; + cfbPrivGCPtr devPriv; +#if PSZ == 24 + int leftIndex, rightIndex; +#else + register CfbBits startmask, endmask; +#endif + + devPriv = cfbGetGCPrivate(pGC); + RROP_FETCH_GCPRIV(devPriv) + n = nInit * miFindMaxBand(pGC->pCompositeClip); + pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); + pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + if(!pptFree || !pwidthFree) + { + if (pptFree) DEALLOCATE_LOCAL(pptFree); + if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + return; + } + pwidth = pwidthFree; + ppt = pptFree; + n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, + ppt, pwidth, fSorted); + + cfbGetLongWidthAndPointer (pDrawable, widthDst, pdstBase) + + while (n--) + { + x = ppt->x; + pdst = pdstBase + (ppt->y * widthDst); + ++ppt; + w = *pwidth++; + if (!w) + continue; +#if PSZ == 24 + leftIndex = x &3; +/* rightIndex = ((leftIndex+w)<5)?0:(x+w)&3;*/ + rightIndex = (x+w)&3; + + nlmiddle = w - rightIndex; + if(leftIndex){ + nlmiddle -= (4 - leftIndex); + } +/* nlmiddle += 3;*/ + nlmiddle >>= 2; + if(nlmiddle < 0) + nlmiddle = 0; + + pdst += (x >> 2)*3; + pdst += leftIndex? (leftIndex -1):0; + switch(leftIndex+w){ + case 4: + switch(leftIndex){ + case 0: +#if RROP == GXcopy + *pdst++ = piQxelXor[0]; + *pdst++ = piQxelXor[1]; + *pdst-- = piQxelXor[2]; +#endif +#if RROP == GXxor + *pdst++ ^= piQxelXor[0]; + *pdst++ ^= piQxelXor[1]; + *pdst-- ^= piQxelXor[2]; +#endif +#if RROP == GXand + *pdst++ &= piQxelAnd[0]; + *pdst++ &= piQxelAnd[1]; + *pdst-- &= piQxelAnd[2]; +#endif +#if RROP == GXor + *pdst++ |= piQxelOr[0]; + *pdst++ |= piQxelOr[1]; + *pdst-- |= piQxelOr[2]; +#endif +#if RROP == GXset + *pdst = DoRRop((*pdst), piQxelAnd[0], piQxelXor[0]); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[1], piQxelXor[1]); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[2], piQxelXor[2]); + pdst--; +#endif + pdst--; + break; + case 1: +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + pdst++; + *pdst++ = piQxelXor[1]; + *pdst-- = piQxelXor[2]; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[0] & 0xFF000000); + *pdst++ ^= piQxelXor[1]; + *pdst-- ^= piQxelXor[2]; +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[0] | 0x00FFFFFF); + *pdst++ &= piQxelAnd[1]; + *pdst-- &= piQxelAnd[2]; +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[0] & 0xFF000000); + *pdst++ |= piQxelOr[1]; + *pdst-- |= piQxelOr[2]; +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[0], piQxelXor[0], 0xFF000000); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[1], piQxelXor[1]); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[2], piQxelXor[2]); + pdst--; +#endif + pdst--; + break; + case 2: +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + pdst++; + *pdst-- = piQxelXor[2]; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[1] & 0xFFFF0000); + *pdst-- ^= piQxelXor[2]; +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[1] | 0xFFFF); + *pdst-- &= piQxelAnd[2]; +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[1] & 0xFFFF0000); + *pdst-- |= piQxelOr[2]; +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[1], piQxelXor[1], 0xFFFF0000); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[2], piQxelXor[2]); + pdst--; +#endif + break; + case 3: +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); +#endif +#if RROP == GXxor + *pdst ^= (piQxelXor[2] & 0xFFFFFF00); +#endif +#if RROP == GXand + *pdst &= (piQxelAnd[2] | 0xFF); +#endif +#if RROP == GXor + *pdst |= (piQxelOr[2] & 0xFFFFFF00); +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[2], piQxelXor[2], 0xFFFFFF00); +#endif + break; + } + break; + case 3: + switch(leftIndex){ + case 0: +#if RROP == GXcopy + *pdst++ = piQxelXor[0]; + *pdst++ = piQxelXor[1]; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst--; +#endif +#if RROP == GXxor + *pdst++ ^= piQxelXor[0]; + *pdst++ ^= piQxelXor[1]; + *pdst-- ^= (piQxelXor[2] & 0xFF); +#endif +#if RROP == GXand + *pdst++ &= piQxelAnd[0]; + *pdst++ &= piQxelAnd[1]; + *pdst-- &= (piQxelAnd[2] | 0xFFFFFF00); +#endif +#if RROP == GXor + *pdst++ |= piQxelOr[0]; + *pdst++ |= piQxelOr[1]; + + *pdst-- |= (piQxelOr[2] & 0xFF); +#endif +#if RROP == GXset + *pdst = DoRRop((*pdst), piQxelAnd[0], piQxelXor[0]); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[1], piQxelXor[1]); + pdst++; + *pdst = DoMaskRRop((*pdst), piQxelAnd[2], piQxelXor[2], 0xFF); + pdst--; +#endif + pdst--; + break; + case 1: +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + pdst++; + *pdst++ = piQxelXor[1]; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst--; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[0] & 0xFF000000); + *pdst++ ^= piQxelXor[1]; + *pdst-- ^= (piQxelXor[2] & 0xFF); +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[0] | 0x00FFFFFF); + *pdst++ &= piQxelAnd[1]; + *pdst-- &= (piQxelAnd[2] | 0xFFFFFF00); +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[0] & 0xFF000000); + *pdst++ |= piQxelOr[1]; + *pdst-- |= (piQxelOr[2] & 0xFF); +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[0], piQxelXor[0], 0xFF000000); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[1], piQxelXor[1]); + pdst++; + *pdst = DoMaskRRop((*pdst), piQxelAnd[2], piQxelXor[2], 0xFF); + pdst--; +#endif + pdst--; + break; + case 2: +/* pdst++;*/ +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + pdst++; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst--; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[1] & 0xFFFF0000); + *pdst-- ^= (piQxelXor[2] & 0xFF); +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[1] | 0xFFFF); + *pdst-- &= (piQxelAnd[2] | 0xFFFFFF00); +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[1] & 0xFFFF0000); + *pdst-- |= (piQxelOr[2] & 0xFF); +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[1], piQxelXor[1], 0xFFFF0000); + pdst++; + *pdst = DoMaskRRop((*pdst), piQxelAnd[2], piQxelXor[2], 0xFF); + pdst--; +#endif + break; + } + break; + case 2: /* leftIndex + w = 2*/ + if(leftIndex){ +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + pdst++; + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + pdst--; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[0] & 0xFF000000); + *pdst-- ^= (piQxelXor[1] & 0xFFFF); +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[0] | 0xFFFFFF); + *pdst-- &= (piQxelAnd[1] | 0xFFFF0000); +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[0] & 0xFF000000); + *pdst-- |= (piQxelOr[1] & 0xFFFF); +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[0], piQxelXor[0], 0xFF000000); + pdst++; + *pdst = DoMaskRRop((*pdst), piQxelAnd[1], piQxelXor[1], 0xFFFF); + pdst--; +#endif + } + else{ /*case 2 leftIndex === 0 */ +#if RROP == GXcopy + *pdst++ = piQxelXor[0]; + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + pdst--; +#endif +#if RROP == GXxor + *pdst++ ^= piQxelXor[0]; + *pdst-- ^= (piQxelXor[1] & 0xFFFF); +#endif +#if RROP == GXand + *pdst++ &= piQxelAnd[0]; + *pdst-- &= (piQxelAnd[1] | 0xFFFF0000); +#endif +#if RROP == GXor + *pdst++ |= piQxelOr[0]; + *pdst-- |= (piQxelOr[1] & 0xFFFF); +#endif +#if RROP == GXset + *pdst = DoRRop((*pdst), piQxelAnd[0], piQxelXor[0]); + pdst++; + *pdst = DoMaskRRop((*pdst), piQxelAnd[1], piQxelXor[1], 0xFFFF); + pdst--; +#endif + } + break; + case 1: /*only if leftIndex = 0 and w = 1*/ +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFF000000) | (piQxelXor[0] & 0xFFFFFF); +#endif +#if RROP == GXxor + *pdst ^= (piQxelXor[0] & 0xFFFFFF); +#endif +#if RROP == GXand + *pdst &= (piQxelAnd[0] | 0xFF000000); +#endif +#if RROP == GXor + *pdst |= (piQxelOr[0] & 0xFFFFFF); +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[0], piQxelXor[0], 0xFFFFFF); +#endif + break; + case 0: /*never*/ + break; + default: + { + switch(leftIndex){ + case 0: + break; + case 1: +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + pdst++; + *pdst++ = piQxelXor[1]; + *pdst++ = piQxelXor[2]; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[0] & 0xFF000000); + *pdst++ ^= piQxelXor[1]; + *pdst++ ^= piQxelXor[2]; +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[0] | 0xFFFFFF); + *pdst++ &= piQxelAnd[1]; + *pdst++ &= piQxelAnd[2]; +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[0] & 0xFF000000); + *pdst++ |= piQxelOr[1]; + *pdst++ |= piQxelOr[2]; +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[0], piQxelXor[0], 0xFF000000); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[1], piQxelXor[1]); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[2], piQxelXor[2]); + pdst++; +#endif + break; + case 2: +#if RROP == GXcopy + *pdst = (((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000)); + pdst++; + *pdst++ = piQxelXor[2]; +#endif +#if RROP == GXxor + *pdst++ ^=(piQxelXor[1] & 0xFFFF0000); + *pdst++ ^= piQxelXor[2]; +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[1] | 0xFFFF); + *pdst++ &= piQxelAnd[2]; +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[1] & 0xFFFF0000); + *pdst++ |= piQxelOr[2]; +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[1], piQxelXor[1], 0xFFFF0000); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[2], piQxelXor[2]); + pdst++; +#endif + break; + case 3: +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); + pdst++; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[2] & 0xFFFFFF00); +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[2] | 0xFF); +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[2] & 0xFFFFFF00); +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[2], piQxelXor[2], 0xFFFFFF00); + pdst++; +#endif + break; + } + while(nlmiddle--){ +#if RROP == GXcopy + *pdst++ = piQxelXor[0]; + *pdst++ = piQxelXor[1]; + *pdst++ = piQxelXor[2]; +#endif +#if RROP == GXxor + *pdst++ ^= piQxelXor[0]; + *pdst++ ^= piQxelXor[1]; + *pdst++ ^= piQxelXor[2]; +#endif +#if RROP == GXand + *pdst++ &= piQxelAnd[0]; + *pdst++ &= piQxelAnd[1]; + *pdst++ &= piQxelAnd[2]; +#endif +#if RROP == GXor + *pdst++ |= piQxelOr[0]; + *pdst++ |= piQxelOr[1]; + *pdst++ |= piQxelOr[2]; +#endif +#if RROP == GXset + *pdst = DoRRop((*pdst), piQxelAnd[0], piQxelXor[0]); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[1], piQxelXor[1]); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[2], piQxelXor[2]); + pdst++; +#endif + } + switch(rightIndex){ + case 0: + break; + case 1: +#if RROP == GXcopy + *pdst = ((*pdst) & 0xFF000000) | (piQxelXor[0] & 0xFFFFFF); + pdst++; +#endif +#if RROP == GXxor + *pdst++ ^= (piQxelXor[0] & 0xFFFFFF); +#endif +#if RROP == GXand + *pdst++ &= (piQxelAnd[0] | 0xFF); +#endif +#if RROP == GXor + *pdst++ |= (piQxelOr[0] & 0xFFFFFF); +#endif +#if RROP == GXset + *pdst = DoMaskRRop((*pdst), piQxelAnd[0], piQxelXor[0], 0xFFFFFF); +#endif + break; + case 2: +#if RROP == GXcopy + *pdst++ = piQxelXor[0]; + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + pdst++; +#endif +#if RROP == GXxor + *pdst++ ^= piQxelXor[0]; + *pdst++ ^= (piQxelXor[1] & 0xFFFF); +#endif +#if RROP == GXand + *pdst++ &= piQxelAnd[0]; + *pdst++ &= (piQxelAnd[1] | 0xFFFF0000); +#endif +#if RROP == GXor + *pdst++ |= piQxelOr[0]; + *pdst++ |= (piQxelOr[1] & 0xFFFF); +#endif +#if RROP == GXset + *pdst = DoRRop((*pdst), piQxelAnd[0], piQxelXor[0]); + pdst++; + *pdst = DoMaskRRop((*pdst), piQxelAnd[1], piQxelXor[1], 0xFFFF); + pdst++; +#endif + break; + case 3: +#if RROP == GXcopy + *pdst++ = piQxelXor[0]; + *pdst++ = piQxelXor[1]; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst++; +#endif +#if RROP == GXxor + *pdst++ ^= piQxelXor[0]; + *pdst++ ^= piQxelXor[1]; + *pdst++ ^= (piQxelXor[2] & 0xFF); +#endif +#if RROP == GXand + *pdst++ &= piQxelAnd[0]; + *pdst++ &= piQxelAnd[1]; + *pdst++ &= (piQxelAnd[2] | 0xFFFFFF00); +#endif +#if RROP == GXor + *pdst++ |= piQxelOr[0]; + *pdst++ |= piQxelOr[1]; + *pdst++ |= (piQxelOr[2] & 0xFF); +#endif +#if RROP == GXset + *pdst = DoRRop((*pdst), piQxelAnd[0], piQxelXor[0]); + pdst++; + *pdst = DoRRop((*pdst), piQxelAnd[1], piQxelXor[1]); + pdst++; + *pdst = DoMaskRRop((*pdst), piQxelAnd[2], piQxelXor[2], 0xFF); + pdst++; +#endif + break; + } + } +} +#else +#if PSZ == 8 + if (w <= PGSZB) + { + register char *addrb; + + addrb = ((char *) pdst) + x; + while (w--) + { + RROP_SOLID (addrb); + addrb++; + } + } +#else + if ((x & PIM) + w <= PPW) + { + pdst += x >> PWSH; + maskpartialbits (x, w, startmask); + RROP_SOLID_MASK (pdst, startmask); + } +#endif + else + { + pdst += x >> PWSH; + maskbits (x, w, startmask, endmask, nlmiddle); + if (startmask) + { + RROP_SOLID_MASK (pdst, startmask); + ++pdst; + } + + RROP_SPAN(pdst,nlmiddle) + if (endmask) + { + RROP_SOLID_MASK (pdst, endmask); + } + } +#endif + } + DEALLOCATE_LOCAL(pptFree); + DEALLOCATE_LOCAL(pwidthFree); + RROP_UNDECLARE +} diff --git a/xorg-server-1.4/cfb/cfbsolidC.c b/xorg-server-1.4/cfb/cfbsolidC.c new file mode 100644 index 0000000..afc758a --- /dev/null +++ b/xorg-server-1.4/cfb/cfbsolidC.c @@ -0,0 +1,2 @@ +#define RROP GXcopy +#include "../cfb/cfbsolid.c" diff --git a/xorg-server-1.4/cfb/cfbsolidG.c b/xorg-server-1.4/cfb/cfbsolidG.c new file mode 100644 index 0000000..491491c --- /dev/null +++ b/xorg-server-1.4/cfb/cfbsolidG.c @@ -0,0 +1,2 @@ +#define RROP GXset +#include "../cfb/cfbsolid.c" diff --git a/xorg-server-1.4/cfb/cfbsolidX.c b/xorg-server-1.4/cfb/cfbsolidX.c new file mode 100644 index 0000000..458c3a7 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbsolidX.c @@ -0,0 +1,2 @@ +#define RROP GXxor +#include "../cfb/cfbsolid.c" diff --git a/xorg-server-1.4/cfb/cfbtab.h b/xorg-server-1.4/cfb/cfbtab.h new file mode 100644 index 0000000..60d203f --- /dev/null +++ b/xorg-server-1.4/cfb/cfbtab.h @@ -0,0 +1,14 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _CFBTAB_H_ +#define _CFBTAB_H_ + +/* prototypes */ +#if 0 +extern int starttab[32], endtab[32]; +extern unsigned int partmasks[32][32]; +#endif + +#endif /* _CFBTAB_H_ */ diff --git a/xorg-server-1.4/cfb/cfbteblt8.c b/xorg-server-1.4/cfb/cfbteblt8.c new file mode 100644 index 0000000..9d4ce57 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbteblt8.c @@ -0,0 +1,589 @@ +/* + * TEGblt - ImageText expanded glyph fonts only. For + * 8 bit displays, in Copy mode with no clipping. + */ + +/* + +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. +*/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#if PSZ == 8 + +#include +#include +#include +#include "cfb.h" +#include +#include "dixfontstr.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "cfbmskbits.h" +#include "cfb8bit.h" + +/* + * this code supports up to 5 characters at a time. The performance + * differences between 4 and 5 is usually small (~7% on PMAX) and + * frequently negative (SPARC and Sun3), so this file is compiled + * only once for now. If you want to use the other options, you'll + * need to hack cfbgc.c as well. + */ + +#ifndef NGLYPHS +#define NGLYPHS 4 +#define DO_COMMON +#endif + +#ifdef DO_COMMON +#define CFBTEGBLT8 cfbTEGlyphBlt8 +#endif + +/* + * On little-endian machines (or where fonts are padded to 32-bit + * boundaries) we can use some magic to avoid the expense of getleftbits + */ + +#if ((BITMAP_BIT_ORDER == LSBFirst && NGLYPHS >= 4) || GLYPHPADBYTES == 4) + +#if GLYPHPADBYTES == 1 +typedef unsigned char *glyphPointer; +#define USE_LEFTBITS +#endif + +#if GLYPHPADBYTES == 2 +typedef unsigned short *glyphPointer; +#define USE_LEFTBITS +#endif + +#if GLYPHPADBYTES == 4 +typedef unsigned int *glyphPointer; +#endif + +#define GetBitsL c = BitLeft (*leftChar++, lshift) +#define NGetBits1S(r) c = BitRight(*char1++ r, xoff1) +#define NGetBits1L(r) GetBitsL | BitRight(*char1++ r, xoff1) +#define NGetBits1U(r) c = *char1++ r +#define NGetBits2S(r) NGetBits1S(| BitRight(*char2++ r, widthGlyph)) +#define NGetBits2L(r) NGetBits1L(| BitRight(*char2++ r, widthGlyph)) +#define NGetBits2U(r) NGetBits1U(| BitRight(*char2++ r, widthGlyph)) +#define NGetBits3S(r) NGetBits2S(| BitRight(*char3++ r, widthGlyph)) +#define NGetBits3L(r) NGetBits2L(| BitRight(*char3++ r, widthGlyph)) +#define NGetBits3U(r) NGetBits2U(| BitRight(*char3++ r, widthGlyph)) +#define NGetBits4S(r) NGetBits3S(| BitRight(*char4++ r, widthGlyph)) +#define NGetBits4L(r) NGetBits3L(| BitRight(*char4++ r, widthGlyph)) +#define NGetBits4U(r) NGetBits3U(| BitRight(*char4++ r, widthGlyph)) +#define NGetBits5S(r) NGetBits4S(| BitRight(*char5++ r, widthGlyph)) +#define NGetBits5L(r) NGetBits4L(| BitRight(*char5++ r, widthGlyph)) +#define NGetBits5U(r) NGetBits4U(| BitRight(*char5++ r, widthGlyph)) +#define GetBits1S c = BitRight(*char1++, xoff1) +#define GetBits1L GetBitsL | BitRight(*char1++, xoff1) +#define GetBits1U c = *char1++ +#define GetBits2S NGetBits1S(| BitRight(*char2++, widthGlyph)) +#define GetBits2L NGetBits1L(| BitRight(*char2++, widthGlyph)) +#define GetBits2U NGetBits1U(| BitRight(*char2++, widthGlyph)) +#define GetBits3S NGetBits2S(| BitRight(*char3++, widthGlyph)) +#define GetBits3L NGetBits2L(| BitRight(*char3++, widthGlyph)) +#define GetBits3U NGetBits2U(| BitRight(*char3++, widthGlyph)) +#define GetBits4S NGetBits3S(| BitRight(*char4++, widthGlyph)) +#define GetBits4L NGetBits3L(| BitRight(*char4++, widthGlyph)) +#define GetBits4U NGetBits3U(| BitRight(*char4++, widthGlyph)) +#define GetBits5S NGetBits4S(| BitRight(*char5++, widthGlyph)) +#define GetBits5L NGetBits4L(| BitRight(*char5++, widthGlyph)) +#define GetBits5U NGetBits4U(| BitRight(*char5++, widthGlyph)) + +#else + +typedef unsigned int *glyphPointer; + +#define USE_LEFTBITS +#define ALL_LEFTBITS + +#define GetBitsL WGetBitsL +#define GetBits1S WGetBits1S +#define GetBits1L WGetBits1L +#define GetBits1U WGetBits1U + +#define GetBits2S GetBits1S Get1Bits (char2, tmpSrc) \ + c |= BitRight(tmpSrc, xoff2); +#define GetBits2L GetBits1L Get1Bits (char2, tmpSrc) \ + c |= BitRight(tmpSrc, xoff2); +#define GetBits2U GetBits1U Get1Bits (char2, tmpSrc) \ + c |= BitRight(tmpSrc, xoff2); + +#define GetBits3S GetBits2S Get1Bits (char3, tmpSrc) \ + c |= BitRight(tmpSrc, xoff3); +#define GetBits3L GetBits2L Get1Bits (char3, tmpSrc) \ + c |= BitRight(tmpSrc, xoff3); +#define GetBits3U GetBits2U Get1Bits (char3, tmpSrc) \ + c |= BitRight(tmpSrc, xoff3); + +#define GetBits4S GetBits3S Get1Bits (char4, tmpSrc) \ + c |= BitRight(tmpSrc, xoff4); +#define GetBits4L GetBits3L Get1Bits (char4, tmpSrc) \ + c |= BitRight(tmpSrc, xoff4); +#define GetBits4U GetBits3U Get1Bits (char4, tmpSrc) \ + c |= BitRight(tmpSrc, xoff4); + +#define GetBits5S GetBits4S Get1Bits (char5, tmpSrc) \ + c |= BitRight(tmpSrc, xoff5); +#define GetBits5L GetBits4L Get1Bits (char5, tmpSrc) \ + c |= BitRight(tmpSrc, xoff5); +#define GetBits5U GetBits4U Get1Bits (char5, tmpSrc) \ + c |= BitRight(tmpSrc, xoff5); + +#endif + +#ifdef USE_LEFTBITS + +#define IncChar(c) (c = (glyphPointer) (((char *) c) + glyphBytes)) + +#define Get1Bits(ch,dst) glyphbits (ch, widthGlyph, glyphMask, dst); \ + IncChar (ch); + +#define glyphbits(bits,width,mask,dst) getleftbits(bits,width,dst); \ + dst &= mask; + +#define WGetBitsL Get1Bits(leftChar,c); \ + c = BitLeft (c, lshift); +#define WGetBits1S Get1Bits (char1, c) \ + c = BitRight (c, xoff1); +#define WGetBits1L WGetBitsL Get1Bits (char1, tmpSrc) \ + c |= BitRight (tmpSrc, xoff1); +#define WGetBits1U Get1Bits (char1, c) + +#else +#define WGetBitsL GetBitsL +#define WGetBits1S GetBits1S +#define WGetBits1L GetBits1L +#define WGetBits1U GetBits1U +#endif + +#if NGLYPHS == 2 +# define GetBitsNS GetBits2S +# define GetBitsNL GetBits2L +# define GetBitsNU GetBits2U +# define LastChar char2 +#ifndef CFBTEGBLT8 +# define CFBTEGBLT8 cfbTEGlyphBlt8x2 +#endif +#endif +#if NGLYPHS == 3 +# define GetBitsNS GetBits3S +# define GetBitsNL GetBits3L +# define GetBitsNU GetBits3U +# define LastChar char3 +#ifndef CFBTEGBLT8 +# define CFBTEGBLT8 cfbTEGlyphBlt8x3 +#endif +#endif +#if NGLYPHS == 4 +# define GetBitsNS GetBits4S +# define GetBitsNL GetBits4L +# define GetBitsNU GetBits4U +# define LastChar char4 +#ifndef CFBTEGBLT8 +# define CFBTEGBLT8 cfbTEGlyphBlt8x4 +#endif +#endif +#if NGLYPHS == 5 +# define GetBitsNS GetBits5S +# define GetBitsNL GetBits5L +# define GetBitsNU GetBits5U +# define LastChar char5 +#ifndef CFBTEGBLT8 +# define CFBTEGBLT8 cfbTEGlyphBlt8x5 +#endif +#endif + +/* another ugly giant macro */ +#define SwitchEm switch (ew) \ + { \ + case 0: \ + break; \ + case 1: \ + while (hTmp--) { \ + GetBits; \ + StoreBits0 \ + Loop \ + } \ + break; \ + case 2: \ + while (hTmp--) { \ + GetBits; \ + StoreBits0 FirstStep StoreBits(1) \ + Loop \ + } \ + break; \ + case 3: \ + while (hTmp--) { \ + GetBits; \ + StoreBits0 FirstStep StoreBits(1) Step StoreBits(2) \ + Loop \ + } \ + break; \ + case 4: \ + while (hTmp--) { \ + GetBits; \ + StoreBits0 FirstStep StoreBits(1) Step \ + StoreBits(2) Step StoreBits(3) \ + Loop \ + } \ + break; \ + case 5: \ + while (hTmp--) { \ + GetBits; \ + StoreBits0 FirstStep StoreBits(1) Step \ + StoreBits(2) Step StoreBits(3) Step \ + StoreBits(4) \ + Loop \ + } \ + break; \ + case 6: \ + while (hTmp--) { \ + GetBits; \ + StoreBits0 FirstStep StoreBits(1) Step \ + StoreBits(2) Step StoreBits(3) Step \ + StoreBits(4) Step StoreBits(5) \ + Loop \ + } \ + break; \ + case 7: \ + while (hTmp--) { \ + GetBits; \ + StoreBits0 FirstStep StoreBits(1) Step \ + StoreBits(2) Step StoreBits(3) Step \ + StoreBits(4) Step StoreBits(5) Step \ + StoreBits(6) \ + Loop \ + } \ + break; \ + case 8: \ + while (hTmp--) { \ + GetBits; \ + StoreBits0 FirstStep StoreBits(1) Step \ + StoreBits(2) Step StoreBits(3) Step \ + StoreBits(4) Step StoreBits(5) Step \ + StoreBits(6) Step StoreBits(7) \ + Loop \ + } \ + break; \ + } + +#ifdef FAST_CONSTANT_OFFSET_MODE +#define StorePixels(o,p) dst[o] = p +#define Loop dst += widthDst; +#else +#define StorePixels(o,p) do { *dst = (p); dst++; } while (0) +#define Loop dst += widthLeft; +#endif + +#define Step NextBitGroup(c); + +#if (BITMAP_BIT_ORDER == MSBFirst) +#define StoreBits(o) StorePixels(o,GetPixelGroup(c)); +#define FirstStep Step +#else +#if PGSZ == 64 +#define StoreBits(o) StorePixels(o,cfb8Pixels[(c) & PGSZBMSK]); +#define FirstStep Step +#else /* PGSZ == 32 */ +#define StoreBits(o) StorePixels(o,*((CfbBits *) (((char *) cfb8Pixels) + (c & 0x3c)))); +#define FirstStep c = BitLeft (c, 2); +#endif /* PGSZ */ +#endif /* BITMAP_BIT_ORDER */ + + +void +CFBTEGBLT8 (pDrawable, pGC, xInit, yInit, nglyph, ppci, pglyphBase) + DrawablePtr pDrawable; + GC *pGC; + int xInit, yInit; + unsigned int nglyph; + CharInfoPtr *ppci; /* array of character info */ + pointer pglyphBase; /* start of array of glyphs */ +{ + register CfbBits c; + register CfbBits *dst; + register CfbBits leftMask, rightMask; + register int hTmp; + register int xoff1; + register glyphPointer char1; + register glyphPointer char2; +#if NGLYPHS >= 3 + register glyphPointer char3; +#endif +#if NGLYPHS >= 4 + register glyphPointer char4; +#endif +#if NGLYPHS >= 5 + register glyphPointer char5; +#endif +#ifdef ALL_LEFTBITS + int xoff2, xoff3, xoff4, xoff5; +#endif + + FontPtr pfont = pGC->font; + CfbBits *dstLine; + glyphPointer oldRightChar; + CfbBits *pdstBase; + glyphPointer leftChar; + int widthDst; +#ifndef FAST_CONSTANT_OFFSET_MODE + int widthLeft; +#endif + int widthGlyph; + int h; + int ew; + int x, y; + BoxRec bbox; /* for clipping */ + int lshift; + int widthGlyphs; +#ifdef USE_LEFTBITS + register CfbBits glyphMask; + register CfbBits tmpSrc; + register int glyphBytes; +#endif + + widthGlyph = FONTMAXBOUNDS(pfont,characterWidth); + h = FONTASCENT(pfont) + FONTDESCENT(pfont); + if (!h) + return; + x = xInit + FONTMAXBOUNDS(pfont,leftSideBearing) + pDrawable->x; + y = yInit - FONTASCENT(pfont) + pDrawable->y; + bbox.x1 = x; + bbox.x2 = x + (widthGlyph * nglyph); + bbox.y1 = y; + bbox.y2 = y + h; + + switch (RECT_IN_REGION(pGC->pScreen, cfbGetCompositeClip(pGC), &bbox)) + { + case rgnPART: + cfbImageGlyphBlt8(pDrawable, pGC, xInit, yInit, nglyph, ppci, pglyphBase); + case rgnOUT: + return; + } + + if (!cfb8CheckPixels (pGC->fgPixel, pGC->bgPixel)) + cfb8SetPixels (pGC->fgPixel, pGC->bgPixel); + + leftChar = 0; + + cfbGetLongWidthAndPointer(pDrawable, widthDst, pdstBase) + +#if NGLYPHS == 2 + widthGlyphs = widthGlyph << 1; +#else +#if NGLYPHS == 4 + widthGlyphs = widthGlyph << 2; +#else + widthGlyphs = widthGlyph * NGLYPHS; +#endif +#endif + +#ifdef USE_LEFTBITS + glyphMask = mfbGetendtab(widthGlyph); + glyphBytes = GLYPHWIDTHBYTESPADDED(*ppci); +#endif + + pdstBase += y * widthDst; +#ifdef DO_COMMON + if (widthGlyphs <= 32) +#endif + while (nglyph >= NGLYPHS) + { + nglyph -= NGLYPHS; + hTmp = h; + dstLine = pdstBase + (x >> PWSH); + xoff1 = x & PIM; + char1 = (glyphPointer) FONTGLYPHBITS(pglyphBase, *ppci++); + char2 = (glyphPointer) FONTGLYPHBITS(pglyphBase, *ppci++); +#ifdef ALL_LEFTBITS + xoff2 = xoff1 + widthGlyph; +#endif +#if NGLYPHS >= 3 + char3 = (glyphPointer) FONTGLYPHBITS(pglyphBase, *ppci++); +#ifdef ALL_LEFTBITS + xoff3 = xoff2 + widthGlyph; +#endif +#endif +#if NGLYPHS >= 4 + char4 = (glyphPointer) FONTGLYPHBITS(pglyphBase, *ppci++); +#ifdef ALL_LEFTBITS + xoff4 = xoff3 + widthGlyph; +#endif +#endif +#if NGLYPHS >= 5 + char5 = (glyphPointer) FONTGLYPHBITS(pglyphBase, *ppci++); +#ifdef ALL_LEFTBITS + xoff5 = xoff4 + widthGlyph; +#endif +#endif + oldRightChar = LastChar; + dst = dstLine; + if (xoff1) + { + ew = ((widthGlyphs - (PGSZB - xoff1)) >> PWSH) + 1; +#ifndef FAST_CONSTANT_OFFSET_MODE + widthLeft = widthDst - ew; +#endif + if (!leftChar) + { + leftMask = cfbendtab[xoff1]; + rightMask = cfbstarttab[xoff1]; + +#define StoreBits0 StorePixels (0, (dst[0] & leftMask) | \ + (GetPixelGroup(c) & rightMask)); +#define GetBits GetBitsNS + + SwitchEm + +#undef GetBits +#undef StoreBits0 + + } + else + { + lshift = widthGlyph - xoff1; + +#define StoreBits0 StorePixels (0,GetPixelGroup(c)); +#define GetBits GetBitsNL + + SwitchEm + +#undef GetBits +#undef StoreBits0 + + } + } + else + { +#if NGLYPHS == 4 && PGSZ == 32 + ew = widthGlyph; /* widthGlyphs >> 2 */ +#else + ew = widthGlyphs >> PWSH; +#endif +#ifndef FAST_CONSTANT_OFFSET_MODE + widthLeft = widthDst - ew; +#endif + +#define StoreBits0 StorePixels (0,GetPixelGroup(c)); +#define GetBits GetBitsNU + + SwitchEm + +#undef GetBits +#undef StoreBits0 + + } + x += widthGlyphs; + leftChar = oldRightChar; + } + while (nglyph--) + { + xoff1 = x & PIM; + char1 = (glyphPointer) FONTGLYPHBITS(pglyphBase, *ppci++); + hTmp = h; + dstLine = pdstBase + (x >> PWSH); + oldRightChar = char1; + dst = dstLine; + if (xoff1) + { + ew = ((widthGlyph - (PGSZB - xoff1)) >> PWSH) + 1; +#ifndef FAST_CONSTANT_OFFSET_MODE + widthLeft = widthDst - ew; +#endif + if (!leftChar) + { + leftMask = cfbendtab[xoff1]; + rightMask = cfbstarttab[xoff1]; + +#define StoreBits0 StorePixels (0, (dst[0] & leftMask) | \ + (GetPixelGroup(c) & rightMask)); +#define GetBits WGetBits1S + + SwitchEm +#undef GetBits +#undef StoreBits0 + + } + else + { + lshift = widthGlyph - xoff1; + +#define StoreBits0 StorePixels (0,GetPixelGroup(c)); +#define GetBits WGetBits1L + + SwitchEm +#undef GetBits +#undef StoreBits0 + + } + } + else + { + ew = widthGlyph >> PWSH; + +#ifndef FAST_CONSTANT_OFFSET_MODE + widthLeft = widthDst - ew; +#endif + +#define StoreBits0 StorePixels (0,GetPixelGroup(c)); +#define GetBits WGetBits1U + + SwitchEm + +#undef GetBits +#undef StoreBits0 + + } + x += widthGlyph; + leftChar = oldRightChar; + } + /* + * draw the tail of the last character + */ + xoff1 = x & PIM; + if (xoff1) + { + rightMask = cfbstarttab[xoff1]; + leftMask = cfbendtab[xoff1]; + lshift = widthGlyph - xoff1; + dst = pdstBase + (x >> PWSH); + hTmp = h; + while (hTmp--) + { + GetBitsL; + *dst = (*dst & rightMask) | (GetPixelGroup(c) & leftMask); + dst += widthDst; + } + } +} +#endif /* PSZ == 8 */ diff --git a/xorg-server-1.4/cfb/cfbtegblt.c b/xorg-server-1.4/cfb/cfbtegblt.c new file mode 100644 index 0000000..f04ee3f --- /dev/null +++ b/xorg-server-1.4/cfb/cfbtegblt.c @@ -0,0 +1,218 @@ +/*********************************************************** + +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 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. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include "cfb.h" +#include +#include "dixfontstr.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "cfbmskbits.h" +#include "mi.h" +#define MFB_CONSTS_ONLY +#include "maskbits.h" + +/* + this works for fonts with glyphs <= 32 bits wide, on an + arbitrarily deep display. Use cfbTEGlyphBlt8 for 8 bit displays. + + This should be called only with a terminal-emulator font; +this means that the FIXED_METRICS flag is set, and that +glyphbounds == charbounds. + + in theory, this goes faster; even if it doesn't, it reduces the +flicker caused by writing a string over itself with image text (since +the background gets repainted per character instead of per string.) +this seems to be important for some converted X10 applications. + + Image text looks at the bits in the glyph and the fg and bg in the +GC. it paints a rectangle, as defined in the protocol dcoument, +and the paints the characters. + +*/ + +void +cfbTEGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) + DrawablePtr pDrawable; + GC *pGC; + int x, y; + unsigned int nglyph; + CharInfoPtr *ppci; /* array of character info */ + pointer pglyphBase; /* start of array of glyphs */ +{ + FontPtr pfont = pGC->font; + int widthDst; + CfbBits *pdstBase; /* pointer to longword with top row + of current glyph */ + + int w; /* width of glyph and char */ + int h; /* height of glyph and char */ + register int xpos=x; /* current x%32 */ + int ypos=y; /* current y%32 */ + register unsigned char *pglyph; + int widthGlyph; + + register CfbBits *pdst;/* pointer to current longword in dst */ + int hTmp; /* counter for height */ + BoxRec bbox; /* for clipping */ + + register int wtmp,xtemp,width; + CfbBits bgfill,fgfill,*ptemp,tmpDst1,tmpDst2,*pdtmp; +#if PSZ != 24 + int tmpx; +#endif + + xpos += pDrawable->x; + ypos += pDrawable->y; + + cfbGetLongWidthAndPointer (pDrawable, widthDst, pdstBase) + + wtmp = FONTMAXBOUNDS(pfont,characterWidth); + h = FONTASCENT(pfont) + FONTDESCENT(pfont); + widthGlyph = GLYPHWIDTHBYTESPADDED(*ppci); + + xpos += FONTMAXBOUNDS(pfont,leftSideBearing); + ypos -= FONTASCENT(pfont); + + bbox.x1 = xpos; + bbox.x2 = xpos + (wtmp * nglyph); + bbox.y1 = ypos; + bbox.y2 = ypos + h; + + fgfill = PFILL(pGC->fgPixel); + bgfill = PFILL(pGC->bgPixel); + + switch (RECT_IN_REGION(pGC->pScreen, cfbGetCompositeClip(pGC), &bbox)) + { + case rgnOUT: + break; + case rgnPART: + /* this is the WRONG thing to do, but it works. + calling the non-terminal text is easy, but slow, given + what we know about the font. + + the right thing to do is something like: + for each clip rectangle + compute at which row the glyph starts to be in it, + and at which row the glyph ceases to be in it + compute which is the first glyph inside the left + edge, and the last one inside the right edge + draw a fractional first glyph, using only + the rows we know are in + draw all the whole glyphs, using the appropriate rows + draw any pieces of the last glyph, using the right rows + + this way, the code would take advantage of knowing that + all glyphs are the same height and don't overlap. + + one day... + */ + cfbImageGlyphBlt8(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); + break; + case rgnIN: + + pdtmp = pdstBase + (widthDst * ypos); + while(nglyph--) + { + + pglyph = FONTGLYPHBITS(pglyphBase, *ppci++); + pdst = pdtmp; + hTmp = h; + + while (hTmp--) + { + x = xpos; + width = wtmp; + xtemp = 0; + + while (width > 0) + { +#if PSZ == 24 + w = 1; + ptemp = (CfbBits *)(pglyph + ((xtemp *3)>> 2)); + getstipplepixels24(ptemp,xtemp,0,&bgfill,&tmpDst1, xtemp); + getstipplepixels24(ptemp,xtemp,1,&fgfill,&tmpDst2, xtemp); +#else + tmpx = x & PIM; + w = min(width, PPW - tmpx); + w = min(w, (PGSZ - xtemp)); + ptemp = (CfbBits *)(pglyph + (xtemp >> MFB_PWSH)); + getstipplepixels(ptemp,xtemp,w,0,&bgfill,&tmpDst1); + getstipplepixels(ptemp,xtemp,w,1,&fgfill,&tmpDst2); +#endif + + { + CfbBits tmpDst = tmpDst1 | tmpDst2; +#if PSZ == 24 + CfbBits *pdsttmp = pdst + ((x*3) >> 2); + putbits24(tmpDst,w,pdsttmp,pGC->planemask,x); +#else + CfbBits *pdsttmp = pdst + (x >> PWSH); + putbits(tmpDst,tmpx,w,pdsttmp,pGC->planemask); +#endif + } + x += w; + xtemp += w; + width -= w; + } + pglyph += widthGlyph; + pdst += widthDst; + } + xpos += wtmp; + } + break; + } +} diff --git a/xorg-server-1.4/cfb/cfbtile32.c b/xorg-server-1.4/cfb/cfbtile32.c new file mode 100644 index 0000000..fb6a106 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbtile32.c @@ -0,0 +1,517 @@ +/* + * Fill 32 bit tiled rectangles. Used by both PolyFillRect and PaintWindow. + * no depth dependencies. + */ + +/* + +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. +*/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "servermd.h" +#include "gcstruct.h" +#include "window.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "windowstr.h" + +#include "cfb.h" +#include "cfbmskbits.h" +#include "cfb8bit.h" + +#include "mergerop.h" + +#include "mi.h" +#include "mispans.h" + +#ifdef sparc +#define SHARED_IDCACHE +#endif + +#if PSZ == 24 +#define STORE(p) (*(p) = MROP_PREBUILT_SOLID(srcpix,*(p))) +/*#define STORE24(p,index) {\ + register int idx = ((index) & 3)<< 1; \ + *(p) = (((MROP_PREBUILT_SOLID(srcpix,*(p))<>cfb24Shift[idx])&cfbmask[idx])| \ + (*(p)&cfbrmask[idx])); \ + (p)--; \ + }*/ +#define STORE24(p,index) MROP_PREBUILT_SOLID24(srcpix, (p), index) + +#define STORE_MASK(p,mask) (*(p) = MROP_PREBUILT_MASK(srcpix,*(p),(mask))) +#define QSTORE(p) ((*(p) = MROP_PREBUILT_SOLID(((srcpix<<24)|srcpix),*(p))), \ + (p)++,(*(p) = MROP_PREBUILT_SOLID(((srcpix<<16)|(srcpix>>8)),*(p))), \ + (p)++,(*(p) = MROP_PREBUILT_SOLID(((srcpix<<8)|(srcpix>>16)),*(p)))) + +#if (MROP == Mcopy) && defined(FAST_CONSTANT_OFFSET_MODE) && defined(SHARED_IDCACHE) +# define Expand(left,right) {\ + int part = nlwMiddle & ((PGSZB*2)-1); \ + nlwMiddle *= 3; \ + nlwMiddle >>= PWSH + 3; \ + while (h--) { \ + srcpix = psrc[srcy]; \ + MROP_PREBUILD(srcpix); \ + ++srcy; \ + if (srcy == tileHeight) \ + srcy = 0; \ + left \ + p += part; \ + switch (part) { \ + case 7: \ + STORE24(p - 7, xtmp - 7); \ + case 6: \ + STORE24(p - 6, xtmp - 6); \ + case 5: \ + STORE24(p - 5, xtmp - 5); \ + case 4: \ + STORE24(p - 4, xtmp - 4); \ + case 3: \ + STORE24(p - 3, xtmp - 3); \ + case 2: \ + STORE24(p - 2, xtmp - 2); \ + case 1: \ + STORE24(p - 1, xtmp - 1); \ + } \ + nlw = nlwMiddle; \ + while (nlw) { \ + STORE24 (p + 0, xtmp + 0); \ + STORE24 (p + 1, xtmp + 1); \ + STORE24 (p + 2, xtmp + 2); \ + STORE24 (p + 3, xtmp + 3); \ + STORE24 (p + 4, xtmp + 4); \ + STORE24 (p + 5, xtmp + 5); \ + STORE24 (p + 6, xtmp + 6); \ + STORE24 (p + 7, xtmp + 7); \ + p += 8; \ + xtmp += 8; \ + nlw--; \ + } \ + right \ + p += nlwExtra; \ + } \ +} +#else +#define Expand(left,right) {\ + while (h--) { \ + srcpix = psrc[srcy]; \ + MROP_PREBUILD(srcpix); \ + ++srcy; \ + if (srcy == tileHeight) \ + srcy = 0; \ + left \ + while (nlw--) \ + { \ + STORE24(p,xtmp); \ + if(xtmp&3) p++; \ + xtmp++; \ + } \ + right \ + p += nlwExtra; \ + } \ +} +#endif +#else /*PSZ != 24*/ +#define STORE(p) (*(p) = MROP_PREBUILT_SOLID(srcpix,*(p))) + +#if (MROP == Mcopy) && defined(FAST_CONSTANT_OFFSET_MODE) && defined(SHARED_IDCACHE) +# define Expand(left,right) {\ + int part = nlwMiddle & ((PGSZB*2)-1); \ + nlwMiddle >>= PWSH + 1; \ + while (h--) { \ + srcpix = psrc[srcy]; \ + MROP_PREBUILD(srcpix); \ + ++srcy; \ + if (srcy == tileHeight) \ + srcy = 0; \ + left \ + p += part; \ + switch (part) { \ + case 7: \ + STORE(p - 7); \ + case 6: \ + STORE(p - 6); \ + case 5: \ + STORE(p - 5); \ + case 4: \ + STORE(p - 4); \ + case 3: \ + STORE(p - 3); \ + case 2: \ + STORE(p - 2); \ + case 1: \ + STORE(p - 1); \ + } \ + nlw = nlwMiddle; \ + while (nlw) { \ + STORE (p + 0); \ + STORE (p + 1); \ + STORE (p + 2); \ + STORE (p + 3); \ + STORE (p + 4); \ + STORE (p + 5); \ + STORE (p + 6); \ + STORE (p + 7); \ + p += 8; \ + nlw--; \ + } \ + right \ + p += nlwExtra; \ + } \ +} +#else +#define Expand(left,right) {\ + while (h--) { \ + srcpix = psrc[srcy]; \ + MROP_PREBUILD(srcpix); \ + ++srcy; \ + if (srcy == tileHeight) \ + srcy = 0; \ + left \ + nlw = nlwMiddle; \ + while (nlw--) \ + { \ + STORE(p); \ + p++; \ + } \ + right \ + p += nlwExtra; \ + } \ +} +#endif +#endif /*PSZ == 24*/ + +void +MROP_NAME(cfbFillRectTile32) (pDrawable, pGC, nBox, pBox) + DrawablePtr pDrawable; + GCPtr pGC; + int nBox; /* number of boxes to fill */ + BoxPtr pBox; /* pointer to list of boxes to fill */ +{ + register CfbBits srcpix; + CfbBits *psrc; /* pointer to bits in tile, if needed */ + int tileHeight; /* height of the tile */ + + int nlwDst; /* width in longwords of the dest pixmap */ + int w; /* width of current box */ + register int h; /* height of current box */ + register CfbBits startmask; + register CfbBits endmask; /* masks for reggedy bits at either end of line */ + int nlwMiddle; /* number of longwords between sides of boxes */ + int nlwExtra; /* to get from right of box to left of next span */ + register int nlw = 0; /* loop version of nlwMiddle */ + register CfbBits *p; /* pointer to bits we're writing */ + int y; /* current scan line */ + int srcy; /* current tile position */ + + CfbBits *pbits;/* pointer to start of pixmap */ + PixmapPtr tile; /* rotated, expanded tile */ +#if MROP == 0 && PSZ == 24 + DeclareMergeRop() +#else + MROP_DECLARE_REG() +#endif + MROP_PREBUILT_DECLARE() +#if PSZ == 24 + CfbBits xtmp; +#endif + + tile = pGC->pRotatedPixmap; + tileHeight = tile->drawable.height; + psrc = (CfbBits *)tile->devPrivate.ptr; + +#if MROP == 0 && PSZ == 24 + InitializeMergeRop(pGC->alu, pGC->planemask); +#else + MROP_INITIALIZE(pGC->alu, pGC->planemask); +#endif + + cfbGetLongWidthAndPointer (pDrawable, nlwDst, pbits) + + while (nBox--) + { + w = pBox->x2 - pBox->x1; + h = pBox->y2 - pBox->y1; + y = pBox->y1; +#if PSZ == 24 + xtmp = pBox->x1; + p = pbits + (y * nlwDst) + ((pBox->x1*3) >> 2); +/* p = pbits + (y * nlwDst) + ((pBox->x1>> 2)*3);*/ +#else + p = pbits + (y * nlwDst) + (pBox->x1 >> PWSH); +#endif + srcy = y % tileHeight; + +#if PSZ == 24 + if (w == 1 && ((pBox->x1 & 3) == 0 || (pBox->x1 & 3) == 3)) +#else + if ( ((pBox->x1 & PIM) + w) <= PPW) +#endif + { + maskpartialbits(pBox->x1, w, startmask); + nlwExtra = nlwDst; + while (h--) + { + srcpix = psrc[srcy]; + MROP_PREBUILD(srcpix); + ++srcy; + if (srcy == tileHeight) + srcy = 0; + *p = MROP_PREBUILT_MASK (srcpix, *p, startmask); + p += nlwExtra; + } + } + else + { + maskbits(pBox->x1, w, startmask, endmask, nlwMiddle); + nlwExtra = nlwDst - nlwMiddle; + + if (startmask) + { + nlwExtra -= 1; + if (endmask) + { + Expand(*p = MROP_PREBUILT_MASK(srcpix, *p, startmask); p++;, + *p = MROP_PREBUILT_MASK(srcpix, *p, endmask);) + } + else + { + Expand(*p = MROP_PREBUILT_MASK(srcpix, *p, startmask); p++;, + ;) + } + } + else + { + if (endmask) + { + Expand(;, + *p = MROP_PREBUILT_MASK(srcpix, *p, endmask);) + } + else + { + Expand(;, + ;) + } + } + } + pBox++; + } +} + +void +MROP_NAME(cfbTile32FS)(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) + DrawablePtr pDrawable; + GCPtr pGC; + int nInit; /* number of spans to fill */ + DDXPointPtr pptInit; /* pointer to list of start points */ + int *pwidthInit; /* pointer to list of n widths */ + int fSorted; +{ + /* next three parameters are post-clip */ + int n; /* number of spans to fill */ + DDXPointPtr ppt; /* pointer to list of start points */ + int *pwidth;/* pointer to list of n widths */ + CfbBits *pbits; /* pointer to start of bitmap */ + int nlwDst; /* width in longwords of bitmap */ + register CfbBits *p; /* pointer to current longword in bitmap */ + register int w; /* current span width */ + register int nlw; + register int x; + register CfbBits startmask; + register CfbBits endmask; + register CfbBits srcpix; + int y; + int *pwidthFree;/* copies of the pointers to free */ + DDXPointPtr pptFree; + PixmapPtr tile; + CfbBits *psrc; /* pointer to bits in tile */ + int tileHeight;/* height of the tile */ +#if MROP == 0 && PSZ == 24 + DeclareMergeRop() +#else + MROP_DECLARE_REG() +#endif + MROP_PREBUILT_DECLARE() +#if PSZ == 24 + CfbBits xtmp; +#endif + + n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) ); + pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); + pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + if(!pptFree || !pwidthFree) + { + if (pptFree) DEALLOCATE_LOCAL(pptFree); + if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + return; + } + pwidth = pwidthFree; + ppt = pptFree; + n = miClipSpans( cfbGetCompositeClip(pGC), + pptInit, pwidthInit, nInit, + ppt, pwidth, fSorted); + + tile = pGC->pRotatedPixmap; + tileHeight = tile->drawable.height; + psrc = (CfbBits *)tile->devPrivate.ptr; + +#if MROP == 0 && PSZ == 24 + InitializeMergeRop(pGC->alu, pGC->planemask); +#else + MROP_INITIALIZE(pGC->alu, pGC->planemask); +#endif + + cfbGetLongWidthAndPointer (pDrawable, nlwDst, pbits) + +#if MROP == Mcopy + if (!(tileHeight & (tileHeight-1))) + { + tileHeight--; + while (n--) + { + x = ppt->x; + y = ppt->y; + ++ppt; + w = *pwidth++; +#if PSZ == 24 +/* p = pbits + (y * nlwDst) + ((x*3) >> 2);*/ + xtmp = x; + p = pbits + (y * nlwDst) + ((x >> 2)*3); +#else + p = pbits + (y * nlwDst) + (x >> PWSH); +#endif + srcpix = psrc[y & tileHeight]; + MROP_PREBUILD(srcpix); + +#if PSZ == 24 + if ((x & 3) + w < 5) +#else + if ((x & PIM) + w < PPW) +#endif + { + maskpartialbits(x, w, startmask); + *p = MROP_PREBUILT_MASK (srcpix, *p, startmask); + } + else + { + maskbits(x, w, startmask, endmask, nlw); + if (startmask) + { + *p = MROP_PREBUILT_MASK(srcpix, *p, startmask); +#if PSZ == 24 + if(xtmp&3) p++; + xtmp++; +#else + p++; +#endif + } + while (nlw--) + { +#if PSZ == 24 + STORE24(p,xtmp); + if(xtmp&3) p++; + ++xtmp; +#else + STORE(p); + ++p; +#endif + } + if (endmask) + { + *p = MROP_PREBUILT_MASK(srcpix, *p, endmask); + } + } + } + } + else +#endif + { + while (n--) + { + x = ppt->x; + y = ppt->y; + ++ppt; + w = *pwidth++; +#if PSZ == 24 +/* p = pbits + (y * nlwDst) + ((x *3)>> 2);*/ + p = pbits + (y * nlwDst) + ((x >> 2)*3); + xtmp = x; +#else + p = pbits + (y * nlwDst) + (x >> PWSH); +#endif + srcpix = psrc[y % tileHeight]; + MROP_PREBUILD(srcpix); + +#if PSZ == 24 + if ((x & 3) + w < 5) +#else + if ((x & PIM) + w < PPW) +#endif + { + maskpartialbits(x, w, startmask); + *p = MROP_PREBUILT_MASK (srcpix, *p, startmask); + } + else + { + maskbits(x, w, startmask, endmask, nlw); + if (startmask) + { + *p = MROP_PREBUILT_MASK(srcpix, *p, startmask); +#if PSZ == 24 + if(xtmp&3)p++; + xtmp++; +#else + p++; +#endif + } + while (nlw--) + { +#if PSZ == 24 + STORE24(p,xtmp); + if(xtmp&3)p++; + xtmp++; +#else + STORE(p); + ++p; +#endif + } + if (endmask) + { + *p = MROP_PREBUILT_MASK(srcpix, *p, endmask); + } + } + } + } + DEALLOCATE_LOCAL(pptFree); + DEALLOCATE_LOCAL(pwidthFree); +} diff --git a/xorg-server-1.4/cfb/cfbtile32C.c b/xorg-server-1.4/cfb/cfbtile32C.c new file mode 100644 index 0000000..ee9360f --- /dev/null +++ b/xorg-server-1.4/cfb/cfbtile32C.c @@ -0,0 +1,2 @@ +#define MROP Mcopy +#include "../cfb/cfbtile32.c" diff --git a/xorg-server-1.4/cfb/cfbtile32G.c b/xorg-server-1.4/cfb/cfbtile32G.c new file mode 100644 index 0000000..40c32b7 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbtile32G.c @@ -0,0 +1,2 @@ +#define MROP 0 +#include "../cfb/cfbtile32.c" diff --git a/xorg-server-1.4/cfb/cfbtileodd.c b/xorg-server-1.4/cfb/cfbtileodd.c new file mode 100644 index 0000000..86a3fa5 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbtileodd.c @@ -0,0 +1,1245 @@ +/* + * Fill odd tiled rectangles and spans. + * no depth dependencies. + */ + +/* + +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. +*/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "servermd.h" +#include "gcstruct.h" +#include "window.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "windowstr.h" + +#include "cfb.h" +#include "cfbmskbits.h" +#include "cfb8bit.h" + +#include "mergerop.h" + +#if PSZ == 24 +#define LEFTSHIFT_AMT (3) +#else /* PSZ != 24 */ +#define LEFTSHIFT_AMT (5 - PWSH) +#endif /* PSZ == 24*/ + +#define LastTileBits {\ + tmp = bits; \ + if (tileEndPart) \ + bits = (*pSrc & tileEndMask) | BitRight (*pSrcLine, tileEndLeftShift); \ + else \ + bits = *pSrc; \ +} + +#if PSZ == 24 +#define ResetTileBits {\ + pSrc = pSrcLine; \ + nlwSrc = widthSrc;\ + if (tileEndPart) { \ + if (4 - xoff + tileEndPart <= 4) {\ + bits = *pSrc++; \ + nlwSrc--; \ + } else \ + bits = BitLeft(tmp, tileEndLeftShift) | \ + BitRight(bits, tileEndRightShift); \ + xoff = (xoff + xoffStep) & 3; \ + leftShift = xoff << LEFTSHIFT_AMT; \ + rightShift = PGSZ - leftShift; \ + }\ +} +#else +#define ResetTileBits {\ + pSrc = pSrcLine; \ + nlwSrc = widthSrc;\ + if (tileEndPart) { \ + if (PPW - xoff + tileEndPart <= PPW) {\ + bits = *pSrc++; \ + nlwSrc--; \ + } else \ + bits = BitLeft(tmp, tileEndLeftShift) | \ + BitRight(bits, tileEndRightShift); \ + xoff = (xoff + xoffStep) & PIM; \ + leftShift = xoff << LEFTSHIFT_AMT; \ + rightShift = PGSZ - leftShift; \ + }\ +} +#endif + +#define NextTileBits {\ + if (nlwSrc == 1) {\ + LastTileBits\ + } else { \ + if (nlwSrc == 0) {\ + ResetTileBits\ + } \ + if (nlwSrc == 1) {\ + LastTileBits\ + } else {\ + tmp = bits; \ + bits = *pSrc++; \ + }\ + }\ + nlwSrc--; \ +} + +void +MROP_NAME(cfbFillBoxTileOdd) (pDrawable, nBox, pBox, tile, xrot, yrot, alu, planemask) + DrawablePtr pDrawable; + int nBox; /* number of boxes to fill */ + register BoxPtr pBox; /* pointer to list of boxes to fill */ + PixmapPtr tile; /* tile */ + int xrot, yrot; + int alu; + unsigned long planemask; +{ + int tileWidth; /* width of tile in pixels */ + int tileHeight; /* height of the tile */ + int widthSrc; + + int widthDst; /* width in longwords of the dest pixmap */ + int w; /* width of current box */ + int h; /* height of current box */ + CfbBits startmask; + CfbBits endmask;/* masks for reggedy bits at either end of line */ + int nlwMiddle; /* number of longwords between sides of boxes */ + int nlwSrc; /* number of whole longwords in source */ + + register int nlw; /* loop version of nlwMiddle */ + int srcy; /* current tile y position */ + int srcx; /* current tile x position */ + int xoffDst, xoffSrc; + int leftShift, rightShift; + +#if MROP == 0 && PSZ == 24 + DeclareMergeRop24() +#else + MROP_DECLARE_REG() +#endif + + CfbBits *pdstBase; /* pointer to start of dest */ + CfbBits *pDstLine; /* poitner to start of dest box */ + CfbBits *pSrcBase; /* pointer to start of source */ + CfbBits *pSrcLine; /* pointer to start of source line */ + register CfbBits *pDst; + register CfbBits *pSrc; + register CfbBits bits, tmp = 0; + int xoffStart, xoff; + int leftShiftStart, rightShiftStart, nlwSrcStart; + CfbBits tileEndMask; + int tileEndLeftShift, tileEndRightShift; + int xoffStep; + int tileEndPart; + int needFirst; + CfbBits narrow[2]; + CfbBits narrowMask = 0; + int narrowShift = 0; + Bool narrowTile; + +#if MROP == 0 && PSZ == 24 + InitializeMergeRop24 (alu, planemask) +#else + MROP_INITIALIZE (alu, planemask) +#endif + + tileHeight = tile->drawable.height; + tileWidth = tile->drawable.width; + widthSrc = tile->devKind / PGSZB; + narrowTile = FALSE; + if (widthSrc == 1) + { + narrowShift = tileWidth; + narrowMask = cfbendpartial [tileWidth]; + tileWidth *= 2; + widthSrc = 2; + narrowTile = TRUE; + } + pSrcBase = (CfbBits *)tile->devPrivate.ptr; + + cfbGetLongWidthAndPointer (pDrawable, widthDst, pdstBase) + +#if PSZ == 24 + tileEndPart = (4 - tileWidth) & 3; + tileEndMask = cfbendpartial[tileWidth & 3]; +#else + tileEndPart = tileWidth & PIM; + tileEndMask = cfbendpartial[tileEndPart]; +#endif /* PSZ == 24 */ + tileEndLeftShift = (tileEndPart) << LEFTSHIFT_AMT; + tileEndRightShift = PGSZ - tileEndLeftShift; +#if PSZ == 24 + xoffStep = 4 - tileEndPart; +#else + xoffStep = PPW - tileEndPart; +#endif /* PSZ == 24 */ + /* + * current assumptions: tile > 32 bits wide. + */ + while (nBox--) + { + w = pBox->x2 - pBox->x1; + h = pBox->y2 - pBox->y1; + modulus (pBox->x1 - xrot, tileWidth, srcx); + modulus (pBox->y1 - yrot, tileHeight, srcy); +#if PSZ == 24 + xoffDst = (4 - pBox->x1) & 3; + if (w == 1 && (xoffDst == 0 || xoffDst == 1)) +#else + xoffDst = pBox->x1 & PIM; + if (xoffDst + w < PPW) +#endif + { + maskpartialbits(pBox->x1, w, startmask); + endmask = 0; + nlwMiddle = 0; + } + else + { + maskbits (pBox->x1, w, startmask, endmask, nlwMiddle) + } +#if PSZ == 24 + pDstLine = pdstBase + (pBox->y1 * widthDst) + ((pBox->x1*3) >> 2); +#else + pDstLine = pdstBase + (pBox->y1 * widthDst) + (pBox->x1 >> PWSH); +#endif + pSrcLine = pSrcBase + (srcy * widthSrc); +#if PSZ == 24 + xoffSrc = (4 - srcx) & 3; +#else + xoffSrc = srcx & PIM; +#endif + if (xoffSrc >= xoffDst) + { + xoffStart = xoffSrc - xoffDst; + needFirst = 1; + } + else + { +#if PSZ == 24 + xoffStart = 4 - (xoffDst - xoffSrc); +#else + xoffStart = PPW - (xoffDst - xoffSrc); +#endif + needFirst = 0; + } + leftShiftStart = (xoffStart) << LEFTSHIFT_AMT; + rightShiftStart = PGSZ - leftShiftStart; +#if PSZ == 24 + nlwSrcStart = widthSrc - ((srcx*3) >> 2); +#else + nlwSrcStart = widthSrc - (srcx >> PWSH); +#endif + while (h--) + { + /* XXX only works when narrowShift >= PPW/2 */ + if (narrowTile) + { + tmp = pSrcBase[srcy] & narrowMask; /* source width == 1 */ + narrow[0] = tmp | SCRRIGHT (tmp, narrowShift); +#if PSZ == 24 + narrow[1] = BitLeft (tmp, 8) | + BitRight(tmp, 16); +#else + narrow[1] = SCRLEFT (tmp, PPW - narrowShift) | + SCRRIGHT(tmp, 2 * narrowShift - PPW); +#endif + pSrcLine = narrow; + } + xoff = xoffStart; + leftShift = leftShiftStart; + rightShift = rightShiftStart; + nlwSrc = nlwSrcStart; +#if PSZ == 24 + pSrc = pSrcLine + ((srcx * 3) >> 2); +#else + pSrc = pSrcLine + (srcx >> PWSH); +#endif + pDst = pDstLine; + bits = 0; + if (needFirst) + { + NextTileBits + } + if (startmask) + { + NextTileBits + tmp = BitLeft(tmp, leftShift); + if (rightShift != PGSZ) + tmp |= BitRight(bits,rightShift); + *pDst = MROP_MASK (tmp, *pDst, startmask); + ++pDst; + } + nlw = nlwMiddle; + while (nlw) + { +#if MROP == Mcopy + if (nlwSrc > 1) + { + int nlwPart = nlw; + + if (nlwPart >= nlwSrc) + nlwPart = nlwSrc - 1; + nlw -= nlwPart; + nlwSrc -= nlwPart; + if (rightShift != PGSZ) + { + while (nlwPart--) + { + tmp = bits; + bits = *pSrc++; + *pDst = MROP_SOLID(BitLeft(tmp, leftShift) | + BitRight (bits, rightShift), + *pDst); + ++pDst; + } + } + else + { + if (nlwPart) + { + *pDst = MROP_SOLID (bits, *pDst); + ++pDst; + nlwPart--; + while (nlwPart--) + { + *pDst = MROP_SOLID(*pSrc, *pDst); + ++pDst; ++pSrc; + } + bits = *pSrc++; + } + } + } + else +#endif + { + NextTileBits + if (rightShift != PGSZ) + { + *pDst = MROP_SOLID(BitLeft(tmp, leftShift) | + BitRight(bits, rightShift), + *pDst); + } + else + { + *pDst = MROP_SOLID (tmp, *pDst); + } + ++pDst; + nlw--; + } + } + if (endmask) + { + NextTileBits + if (rightShift == PGSZ) + bits = 0; + *pDst = MROP_MASK (BitLeft(tmp, leftShift) | + BitRight(bits,rightShift), + *pDst, endmask); + } + pDstLine += widthDst; + pSrcLine += widthSrc; + if (++srcy == tileHeight) + { + srcy = 0; + pSrcLine = pSrcBase; + } + } + pBox++; + } +} + +void +MROP_NAME(cfbFillSpanTileOdd) (pDrawable, n, ppt, pwidth, tile, xrot, yrot, alu, planemask) + DrawablePtr pDrawable; + int n; + DDXPointPtr ppt; + int *pwidth; + PixmapPtr tile; + int xrot, yrot; + int alu; + unsigned long planemask; +{ + int tileWidth; /* width of tile in pixels */ + int tileHeight; /* height of the tile */ + int widthSrc; + + int widthDst; /* width in longwords of the dest pixmap */ + int w; /* width of current span */ + CfbBits startmask; + CfbBits endmask; /* masks for reggedy bits at either end of line */ + int nlwSrc; /* number of whole longwords in source */ + + register int nlw; /* loop version of nlwMiddle */ + int srcy; /* current tile y position */ + int srcx; /* current tile x position */ + int xoffDst, xoffSrc; + int leftShift, rightShift; + +#if MROP == 0 && PSZ == 24 + DeclareMergeRop24() +#else + MROP_DECLARE_REG() +#endif + + CfbBits *pdstBase; /* pointer to start of dest */ + CfbBits *pDstLine; /* poitner to start of dest box */ + CfbBits *pSrcBase; /* pointer to start of source */ + CfbBits *pSrcLine; /* pointer to start of source line */ + register CfbBits *pDst; + register CfbBits *pSrc; + register CfbBits bits, tmp = 0; + int xoffStart, xoff; + int leftShiftStart, rightShiftStart, nlwSrcStart; + CfbBits tileEndMask; + int tileEndLeftShift, tileEndRightShift; + int xoffStep; + int tileEndPart; + int needFirst; + CfbBits narrow[2]; + CfbBits narrowMask = 0; + int narrowShift = 0; + Bool narrowTile; + +#if MROP == 0 && PSZ == 24 + InitializeMergeRop24 (alu, planemask) +#else + MROP_INITIALIZE (alu, planemask) +#endif + + tileHeight = tile->drawable.height; + tileWidth = tile->drawable.width; + widthSrc = tile->devKind / PGSZB; + narrowTile = FALSE; + if (widthSrc == 1) + { + narrowShift = tileWidth; + narrowMask = cfbendpartial [tileWidth]; + tileWidth *= 2; + widthSrc = 2; + narrowTile = TRUE; + } + pSrcBase = (CfbBits *)tile->devPrivate.ptr; + + cfbGetLongWidthAndPointer (pDrawable, widthDst, pdstBase) + +#if PSZ == 24 + tileEndPart = (4 - tileWidth) & 3; + tileEndMask = cfbendpartial[tileWidth & 3]; +#else + tileEndPart = tileWidth & PIM; + tileEndMask = cfbendpartial[tileEndPart]; +#endif + tileEndLeftShift = (tileEndPart) << LEFTSHIFT_AMT; + tileEndRightShift = PGSZ - tileEndLeftShift; +#if PSZ == 24 + xoffStep = 4 - tileEndPart; +#else + xoffStep = PPW - tileEndPart; +#endif + while (n--) + { + w = *pwidth++; + modulus (ppt->x - xrot, tileWidth, srcx); + modulus (ppt->y - yrot, tileHeight, srcy); +#if PSZ == 24 + xoffDst = (4 - ppt->x) & 3; + if (w == 1 && (xoffDst == 0 || xoffDst == 1)) +#else + xoffDst = ppt->x & PIM; + if (xoffDst + w < PPW) +#endif + { + maskpartialbits(ppt->x, w, startmask); + endmask = 0; + nlw = 0; + } + else + { + maskbits (ppt->x, w, startmask, endmask, nlw) + } +#if PSZ == 24 + pDstLine = pdstBase + (ppt->y * widthDst) + ((ppt->x *3)>> 2); +#else + pDstLine = pdstBase + (ppt->y * widthDst) + (ppt->x >> PWSH); +#endif + pSrcLine = pSrcBase + (srcy * widthSrc); +#if PSZ == 24 + xoffSrc = (4 - srcx) & 3; +#else + xoffSrc = srcx & PIM; +#endif + if (xoffSrc >= xoffDst) + { + xoffStart = xoffSrc - xoffDst; + needFirst = 1; + } + else + { +#if PSZ == 24 + xoffStart = 4 - (xoffDst - xoffSrc); +#else + xoffStart = PPW - (xoffDst - xoffSrc); +#endif + needFirst = 0; + } + leftShiftStart = (xoffStart) << LEFTSHIFT_AMT; + rightShiftStart = PGSZ - leftShiftStart; +#if PSZ == 24 + nlwSrcStart = widthSrc - ((srcx*3) >> 2); +#else + nlwSrcStart = widthSrc - (srcx >> PWSH); +#endif + /* XXX only works when narrowShift >= PPW/2 */ + if (narrowTile) + { + tmp = pSrcBase[srcy] & narrowMask; /* source width == 1 */ + narrow[0] = tmp | SCRRIGHT (tmp, narrowShift); +#if PSZ == 24 + narrow[1] = BitLeft (tmp, 8) | + BitRight(tmp, 16); +#else + narrow[1] = SCRLEFT (tmp, PPW - narrowShift) | + SCRRIGHT(tmp, 2 * narrowShift - PPW); +#endif + pSrcLine = narrow; + } + xoff = xoffStart; + leftShift = leftShiftStart; + rightShift = rightShiftStart; + nlwSrc = nlwSrcStart; +#if PSZ == 24 + pSrc = pSrcLine + ((srcx * 3) >> 2); +#else + pSrc = pSrcLine + (srcx >> PWSH); +#endif + pDst = pDstLine; + bits = 0; + if (needFirst) + { + NextTileBits + } + if (startmask) + { + NextTileBits + tmp = BitLeft(tmp, leftShift); + if (rightShift != PGSZ) + tmp |= BitRight(bits,rightShift); + *pDst = MROP_MASK (tmp, *pDst, startmask); + ++pDst; + } + while (nlw) + { +#if MROP == Mcopy + if (nlwSrc > 1) + { + int nlwPart = nlw; + + if (nlwPart >= nlwSrc) + nlwPart = nlwSrc - 1; + nlw -= nlwPart; + nlwSrc -= nlwPart; + if (rightShift != PGSZ) + { + while (nlwPart--) + { + tmp = bits; + bits = *pSrc++; + *pDst = MROP_SOLID(BitLeft(tmp, leftShift) | + BitRight (bits, rightShift), + *pDst); + ++pDst; + } + } + else + { + if (nlwPart) + { + *pDst = MROP_SOLID (bits, *pDst); + ++pDst; + nlwPart--; + while (nlwPart--) + { + *pDst = MROP_SOLID(*pSrc, *pDst); + ++pDst; ++pSrc; + } + bits = *pSrc++; + } + } + } + else +#endif + { + NextTileBits + if (rightShift != PGSZ) + { + *pDst = MROP_SOLID(BitLeft(tmp, leftShift) | + BitRight(bits, rightShift), + *pDst); + ++pDst; + } + else + { + *pDst = MROP_SOLID (tmp, *pDst); + ++pDst; + } + nlw--; + } + } + if (endmask) + { + NextTileBits + if (rightShift == PGSZ) + bits = 0; + *pDst = MROP_MASK (BitLeft(tmp, leftShift) | + BitRight(bits,rightShift), + *pDst, endmask); + } + ppt++; + } +} + +# include "fastblt.h" + +#define IncSrcPtr psrc++; if (!--srcRemaining) { srcRemaining = widthSrc; psrc = psrcStart; } + +void +MROP_NAME(cfbFillBoxTile32s) (pDrawable, nBox, pBox, tile, xrot, yrot, alu, planemask) + DrawablePtr pDrawable; + int nBox; /* number of boxes to fill */ + register BoxPtr pBox; /* pointer to list of boxes to fill */ + PixmapPtr tile; /* tile */ + int xrot, yrot; + int alu; + unsigned long planemask; +{ + int tileWidth; /* width of tile */ + int tileHeight; /* height of the tile */ + int widthSrc; /* width in longwords of the source tile */ + + int widthDst; /* width in longwords of the dest pixmap */ + int w; /* width of current box */ + int h; /* height of current box */ + CfbBits startmask; + CfbBits endmask;/* masks for reggedy bits at either end of line */ + int nlMiddle; /* number of longwords between sides of boxes */ + + register int nl; /* loop version of nlMiddle */ + int srcy; /* current tile y position */ + int srcx; /* current tile x position */ + int srcRemaining; /* number of longwords remaining in source */ + int xoffDst, xoffSrc; + int srcStart; /* number of longwords source offset at left of box */ + int leftShift, rightShift; + +#if MROP == 0 && PSZ == 24 + DeclareMergeRop24() +#else + MROP_DECLARE_REG() +#endif + + CfbBits *pdstBase; /* pointer to start of dest */ + CfbBits *pdstLine; /* poitner to start of dest box */ + CfbBits *psrcBase; /* pointer to start of source */ + CfbBits *psrcLine; /* pointer to fetch point of source */ + CfbBits *psrcStart; /* pointer to start of source line */ + register CfbBits *pdst; + register CfbBits *psrc; + register CfbBits bits, bits1; + register int nlTemp; + +#if MROP == 0 && PSZ == 24 + InitializeMergeRop24 (alu, planemask) +#else + MROP_INITIALIZE (alu, planemask) +#endif + + psrcBase = (CfbBits *)tile->devPrivate.ptr; + tileHeight = tile->drawable.height; + tileWidth = tile->drawable.width; +#if PSZ == 24 + widthSrc = tile->devKind / PGSZB; +#else + widthSrc = tileWidth >> PWSH; +#endif + + cfbGetLongWidthAndPointer (pDrawable, widthDst, pdstBase) + + while (nBox--) + { + w = pBox->x2 - pBox->x1; + h = pBox->y2 - pBox->y1; + + /* set up source */ + modulus (pBox->x1 - xrot, tileWidth, srcx); + modulus (pBox->y1 - yrot, tileHeight, srcy); +#if PSZ == 24 + xoffSrc = (4 - srcx) & 3; + srcStart = (srcx * 3) >> 2; +#else + xoffSrc = srcx & PIM; + srcStart = (srcx >> PWSH); +#endif + psrcStart = psrcBase + (srcy * widthSrc); + psrcLine = psrcStart + srcStart; + + /* set up dest */ +#if PSZ == 24 + xoffDst = (4 - pBox->x1) & 3; + pdstLine = pdstBase + (pBox->y1 * widthDst) + ((pBox->x1*3) >> 2); +#else + xoffDst = pBox->x1 & PIM; + pdstLine = pdstBase + (pBox->y1 * widthDst) + (pBox->x1 >> PWSH); +#endif + /* set up masks */ +#if PSZ == 24 + if (w == 1 && (xoffDst == 0 || xoffDst == 1)) +#else + if (xoffDst + w < PPW) +#endif + { + maskpartialbits(pBox->x1, w, startmask); + endmask = 0; + nlMiddle = 0; + } + else + { + maskbits (pBox->x1, w, startmask, endmask, nlMiddle) + } + if (xoffSrc == xoffDst) + { + while (h--) + { + psrc = psrcLine; + pdst = pdstLine; + srcRemaining = widthSrc - srcStart; + if (startmask) + { + *pdst = MROP_MASK (*psrc, *pdst, startmask); + pdst++; + IncSrcPtr + } + nlTemp = nlMiddle; + while (nlTemp) + { + nl = nlTemp; + if (nl > srcRemaining) + nl = srcRemaining; + + nlTemp -= nl; + srcRemaining -= nl; + +#if MROP == Mcopy +#ifdef LARGE_INSTRUCTION_CACHE +#ifdef FAST_CONSTANT_OFFSET_MODE + + psrc += nl & (UNROLL-1); + pdst += nl & (UNROLL-1); + +#define BodyOdd(n) pdst[-n] = MROP_SOLID (psrc[-n], pdst[-n]); +#define BodyEven(n) pdst[-n] = MROP_SOLID (psrc[-n], pdst[-n]); + +#define LoopReset \ +pdst += UNROLL; \ +psrc += UNROLL; + +#else + +#define BodyOdd(n) *pdst = MROP_SOLID (*psrc, *pdst); pdst++; psrc++; +#define BodyEven(n) BodyOdd(n) + +#define LoopReset ; + +#endif + PackedLoop + +#undef BodyOdd +#undef BodyEven +#undef LoopReset + +#else + DuffL(nl, label1, + *pdst = MROP_SOLID (*psrc, *pdst); + pdst++; psrc++;) +#endif +#else + while (nl--) { + *pdst = MROP_SOLID (*psrc, *pdst); + pdst++; psrc++; + } +#endif + if (!srcRemaining) + { + srcRemaining = widthSrc; + psrc = psrcStart; + } + } + if (endmask) + { + *pdst = MROP_MASK (*psrc, *pdst, endmask); + } + pdstLine += widthDst; + psrcLine += widthSrc; + psrcStart += widthSrc; + if (++srcy == tileHeight) + { + psrcStart = psrcBase; + psrcLine = psrcStart + srcStart; + srcy = 0; + } + } + } + else + { + if (xoffSrc > xoffDst) + { + leftShift = (xoffSrc - xoffDst) << LEFTSHIFT_AMT; + rightShift = PGSZ - leftShift; + } + else + { + rightShift = (xoffDst - xoffSrc) << LEFTSHIFT_AMT; + leftShift = PGSZ - rightShift; + } + while (h--) + { + psrc = psrcLine; + pdst = pdstLine; + bits = 0; + srcRemaining = widthSrc - srcStart; + if (xoffSrc > xoffDst) + { + bits = *psrc; + IncSrcPtr + } + if (startmask) + { + bits1 = BitLeft(bits,leftShift); + bits = *psrc; + IncSrcPtr + bits1 |= BitRight(bits,rightShift); + *pdst = MROP_MASK(bits1, *pdst, startmask); + pdst++; + } + nlTemp = nlMiddle; + while (nlTemp) + { + nl = nlTemp; + if (nl > srcRemaining) + nl = srcRemaining; + + nlTemp -= nl; + srcRemaining -= nl; + +#if MROP == Mcopy +#ifdef LARGE_INSTRUCTION_CACHE + bits1 = bits; + +#ifdef FAST_CONSTANT_OFFSET_MODE + + psrc += nl & (UNROLL-1); + pdst += nl & (UNROLL-1); + +#define BodyOdd(n) \ + bits = psrc[-n]; \ + pdst[-n] = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), pdst[-n]); + +#define BodyEven(n) \ + bits1 = psrc[-n]; \ + pdst[-n] = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), pdst[-n]); + +#define LoopReset \ + pdst += UNROLL; \ + psrc += UNROLL; + +#else + +#define BodyOdd(n) \ + bits = *psrc++; \ + *pdst = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), *pdst); \ + pdst++; + +#define BodyEven(n) \ + bits1 = *psrc++; \ + *pdst = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), *pdst); \ + pdst++; + +#define LoopReset ; + +#endif /* !FAST_CONSTANT_OFFSET_MODE */ + + PackedLoop + +#undef BodyOdd +#undef BodyEven +#undef LoopReset + +#else + DuffL (nl,label2, + bits1 = BitLeft(bits, leftShift); + bits = *psrc++; + *pdst = MROP_SOLID (bits1 | BitRight(bits, rightShift), *pdst); + pdst++; + ) +#endif +#else + while (nl--) { + bits1 = BitLeft(bits, leftShift); + bits = *psrc++; + *pdst = MROP_SOLID (bits1 | BitRight(bits, rightShift), *pdst); + pdst++; + } +#endif + if (!srcRemaining) + { + srcRemaining = widthSrc; + psrc = psrcStart; + } + } + + if (endmask) + { + bits1 = BitLeft(bits, leftShift); + if (BitLeft(endmask, rightShift)) + { + bits = *psrc; + bits1 |= BitRight(bits, rightShift); + } + *pdst = MROP_MASK (bits1, *pdst, endmask); + } + pdstLine += widthDst; + psrcLine += widthSrc; + psrcStart += widthSrc; + if (++srcy == tileHeight) + { + psrcStart = psrcBase; + psrcLine = psrcStart + srcStart; + srcy = 0; + } + } + } + pBox++; + } +} + +void +MROP_NAME(cfbFillSpanTile32s) (pDrawable, n, ppt, pwidth, tile, xrot, yrot, alu, planemask) + DrawablePtr pDrawable; + int n; + DDXPointPtr ppt; + int *pwidth; + PixmapPtr tile; + int xrot, yrot; + int alu; + unsigned long planemask; +{ + int tileWidth; /* width of tile */ + int tileHeight; /* height of the tile */ + int widthSrc; /* width in longwords of the source tile */ + + int widthDst; /* width in longwords of the dest pixmap */ + int w; /* width of current box */ + CfbBits startmask; + CfbBits endmask;/* masks for reggedy bits at either end of line */ + int nlMiddle; /* number of longwords between sides of boxes */ + + register int nl; /* loop version of nlMiddle */ + int srcy; /* current tile y position */ + int srcx; /* current tile x position */ + int srcRemaining; /* number of longwords remaining in source */ + int xoffDst, xoffSrc; + int srcStart; /* number of longwords source offset at left of box */ + int leftShift, rightShift; + +#if MROP == 0 && PSZ == 24 + DeclareMergeRop24() +#else + MROP_DECLARE_REG() +#endif + + CfbBits *pdstBase; /* pointer to start of dest */ + CfbBits *pdstLine; /* poitner to start of dest box */ + CfbBits *psrcBase; /* pointer to start of source */ + CfbBits *psrcLine; /* pointer to fetch point of source */ + CfbBits *psrcStart; /* pointer to start of source line */ + register CfbBits *pdst; + register CfbBits *psrc; + register CfbBits bits, bits1; + register int nlTemp; + +#if MROP == 0 && PSZ == 24 + InitializeMergeRop24 (alu, planemask) +#else + MROP_INITIALIZE (alu, planemask) +#endif + + psrcBase = (CfbBits *)tile->devPrivate.ptr; + tileHeight = tile->drawable.height; + tileWidth = tile->drawable.width; +#if PSZ == 24 + widthSrc = tile->devKind / PGSZB; +#else + widthSrc = tileWidth >> PWSH; +#endif + + cfbGetLongWidthAndPointer (pDrawable, widthDst, pdstBase) + + while (n--) + { + w = *pwidth++; + + /* set up source */ + modulus (ppt->x - xrot, tileWidth, srcx); + modulus (ppt->y - yrot, tileHeight, srcy); +#if PSZ == 24 + xoffSrc = (4 - srcx) & 3; + srcStart = (srcx * 3) >> 2; +#else + xoffSrc = srcx & PIM; + srcStart = (srcx >> PWSH); +#endif + psrcStart = psrcBase + (srcy * widthSrc); + psrcLine = psrcStart + srcStart; + + /* set up dest */ +#if PSZ == 24 + xoffDst = (4 - ppt->x) & 3; + pdstLine = pdstBase + (ppt->y * widthDst) + ((ppt->x *3) >> 2); + /* set up masks */ + if (w == 1 && (xoffDst == 0 || xoffDst == 1)) +#else + xoffDst = ppt->x & PIM; + pdstLine = pdstBase + (ppt->y * widthDst) + (ppt->x >> PWSH); + /* set up masks */ + if (xoffDst + w < PPW) +#endif + { + maskpartialbits(ppt->x, w, startmask); + endmask = 0; + nlMiddle = 0; + } + else + { + maskbits (ppt->x, w, startmask, endmask, nlMiddle) + } + + if (xoffSrc == xoffDst) + { + psrc = psrcLine; + pdst = pdstLine; + srcRemaining = widthSrc - srcStart; + if (startmask) + { + *pdst = MROP_MASK (*psrc, *pdst, startmask); + pdst++; + IncSrcPtr + } + nlTemp = nlMiddle; + while (nlTemp) + { + nl = nlTemp; + if (nl > srcRemaining) + nl = srcRemaining; + + nlTemp -= nl; + srcRemaining -= nl; + +#if MROP == Mcopy +#ifdef LARGE_INSTRUCTION_CACHE +#ifdef FAST_CONSTANT_OFFSET_MODE + + psrc += nl & (UNROLL-1); + pdst += nl & (UNROLL-1); + +#define BodyOdd(n) pdst[-n] = MROP_SOLID (psrc[-n], pdst[-n]); +#define BodyEven(n) pdst[-n] = MROP_SOLID (psrc[-n], pdst[-n]); + +#define LoopReset \ +pdst += UNROLL; \ +psrc += UNROLL; + +#else + +#define BodyOdd(n) *pdst = MROP_SOLID (*psrc, *pdst); pdst++; psrc++; +#define BodyEven(n) BodyOdd(n) + +#define LoopReset ; + +#endif + PackedLoop + +#undef BodyOdd +#undef BodyEven +#undef LoopReset + +#else + DuffL(nl, label1, + *pdst = MROP_SOLID (*psrc, *pdst); + pdst++; psrc++;) +#endif +#else + while (nl--) { + *pdst = MROP_SOLID (*psrc, *pdst); + pdst++; psrc++; + } +#endif + if (!srcRemaining) + { + srcRemaining = widthSrc; + psrc = psrcStart; + } + } + if (endmask) + { + *pdst = MROP_MASK (*psrc, *pdst, endmask); + } + } + else + { + if (xoffSrc > xoffDst) + { + leftShift = (xoffSrc - xoffDst) << LEFTSHIFT_AMT; + rightShift = PGSZ - leftShift; + } + else + { + rightShift = (xoffDst - xoffSrc) << LEFTSHIFT_AMT; + leftShift = PGSZ - rightShift; + } + psrc = psrcLine; + pdst = pdstLine; + bits = 0; + srcRemaining = widthSrc - srcStart; + if (xoffSrc > xoffDst) + { + bits = *psrc; + IncSrcPtr + } + if (startmask) + { + bits1 = BitLeft(bits,leftShift); + bits = *psrc; + IncSrcPtr + bits1 |= BitRight(bits,rightShift); + *pdst = MROP_MASK(bits1, *pdst, startmask); + pdst++; + } + nlTemp = nlMiddle; + while (nlTemp) + { + nl = nlTemp; + if (nl > srcRemaining) + nl = srcRemaining; + + nlTemp -= nl; + srcRemaining -= nl; + +#if MROP == Mcopy +#ifdef LARGE_INSTRUCTION_CACHE + bits1 = bits; + +#ifdef FAST_CONSTANT_OFFSET_MODE + + psrc += nl & (UNROLL-1); + pdst += nl & (UNROLL-1); + +#define BodyOdd(n) \ +bits = psrc[-n]; \ +pdst[-n] = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), pdst[-n]); + +#define BodyEven(n) \ +bits1 = psrc[-n]; \ +pdst[-n] = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), pdst[-n]); + +#define LoopReset \ +pdst += UNROLL; \ +psrc += UNROLL; + +#else + +#define BodyOdd(n) \ +bits = *psrc++; \ +*pdst = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), *pdst); \ +pdst++; + +#define BodyEven(n) \ +bits1 = *psrc++; \ +*pdst = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), *pdst); \ +pdst++; + +#define LoopReset ; + +#endif /* !FAST_CONSTANT_OFFSET_MODE */ + + PackedLoop + +#undef BodyOdd +#undef BodyEven +#undef LoopReset + +#else + DuffL (nl,label2, + bits1 = BitLeft(bits, leftShift); + bits = *psrc++; + *pdst = MROP_SOLID (bits1 | BitRight(bits, rightShift), *pdst); + pdst++; + ) +#endif +#else + while (nl--) { + bits1 = BitLeft(bits,leftShift); + bits = *psrc++; + *pdst = MROP_SOLID(bits1|BitRight(bits,rightShift), *pdst); + pdst++; + } +#endif + if (!srcRemaining) + { + srcRemaining = widthSrc; + psrc = psrcStart; + } + } + + if (endmask) + { + bits1 = BitLeft(bits, leftShift); + if (BitLeft(endmask, rightShift)) + { + bits = *psrc; + bits1 |= BitRight(bits, rightShift); + } + *pdst = MROP_MASK (bits1, *pdst, endmask); + } + } + ppt++; + } +} diff --git a/xorg-server-1.4/cfb/cfbtileoddC.c b/xorg-server-1.4/cfb/cfbtileoddC.c new file mode 100644 index 0000000..b1780fa --- /dev/null +++ b/xorg-server-1.4/cfb/cfbtileoddC.c @@ -0,0 +1,2 @@ +#define MROP Mcopy +#include "../cfb/cfbtileodd.c" diff --git a/xorg-server-1.4/cfb/cfbtileoddG.c b/xorg-server-1.4/cfb/cfbtileoddG.c new file mode 100644 index 0000000..93f14a4 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbtileoddG.c @@ -0,0 +1,2 @@ +#define MROP 0 +#include "../cfb/cfbtileodd.c" diff --git a/xorg-server-1.4/cfb/cfbunmap.h b/xorg-server-1.4/cfb/cfbunmap.h new file mode 100644 index 0000000..61c7fc9 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbunmap.h @@ -0,0 +1,164 @@ +/* + * Copyright (C) 1994-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. + */ + +/* + * Unmap names + */ + +#undef CFBNAME +#undef CATNAME + +#undef QuartetBitsTable +#undef QuartetPixelMaskTable +#undef cfb8ClippedLineCopy +#undef cfb8ClippedLineGeneral +#undef cfb8ClippedLineXor +#undef cfb8LineSS1Rect +#undef cfb8LineSS1RectCopy +#undef cfb8LineSS1RectGeneral +#undef cfb8LineSS1RectPreviousCopy +#undef cfb8LineSS1RectXor +#undef cfb8SegmentSS1Rect +#undef cfb8SegmentSS1RectCopy +#undef cfb8SegmentSS1RectGeneral +#undef cfb8SegmentSS1RectShiftCopy +#undef cfb8SegmentSS1RectXor +#undef cfbAllocatePrivates +#undef cfbBSFuncRec +#undef cfbBitBlt +#undef cfbBresD +#undef cfbBresS +#undef cfbChangeWindowAttributes +#undef cfbClearVisualTypes +#undef cfbCloseScreen +#undef cfbCreateDefColormap +#undef cfbCopyArea +#undef cfbCopyImagePlane +#undef cfbCopyPixmap +#undef cfbCopyPlane +#undef cfbCopyPlaneReduce +#undef cfbCopyRotatePixmap +#undef cfbCopyWindow +#undef cfbCreateGC +#undef cfbCreatePixmap +#undef cfbCreateScreenResources +#undef cfbCreateWindow +#undef cfbDestroyPixmap +#undef cfbDestroyWindow +#undef cfbDoBitblt +#undef cfbDoBitbltCopy +#undef cfbDoBitbltGeneral +#undef cfbDoBitbltOr +#undef cfbDoBitbltXor +#undef cfbExpandDirectColors +#undef cfbFillBoxSolid +#undef cfbFillBoxTile32 +#undef cfbFillBoxTile32sCopy +#undef cfbFillBoxTile32sGeneral +#undef cfbFillBoxTileOdd +#undef cfbFillBoxTileOddCopy +#undef cfbFillBoxTileOddGeneral +#undef cfbFillPoly1RectCopy +#undef cfbFillPoly1RectGeneral +#undef cfbFillRectSolidCopy +#undef cfbFillRectSolidGeneral +#undef cfbFillRectSolidXor +#undef cfbFillRectTile32Copy +#undef cfbFillRectTile32General +#undef cfbFillRectTileOdd +#undef cfbFillSpanTile32sCopy +#undef cfbFillSpanTile32sGeneral +#undef cfbFillSpanTileOddCopy +#undef cfbFillSpanTileOddGeneral +#undef cfbFinishScreenInit +#undef cfbGCFuncs +#undef cfbGCPrivateIndex +#undef cfbGetImage +#undef cfbGetScreenPixmap +#undef cfbGetSpans +#undef cfbHorzS +#undef cfbImageGlyphBlt8 +#undef cfbInitializeColormap +#undef cfbInitVisuals +#undef cfbInstallColormap +#undef cfbLineSD +#undef cfbLineSS +#undef cfbListInstalledColormaps +#undef cfbMapWindow +#undef cfbMatchCommon +#undef cfbNonTEOps +#undef cfbNonTEOps1Rect +#undef cfbPadPixmap +#undef cfbPaintWindow +#undef cfbPolyFillArcSolidCopy +#undef cfbPolyFillArcSolidGeneral +#undef cfbPolyFillRect +#undef cfbPolyGlyphBlt8 +#undef cfbPolyGlyphRop8 +#undef cfbPolyPoint +#undef cfbPositionWindow +#undef cfbPutImage +#undef cfbReduceRasterOp +#undef cfbResolveColor +#undef cfbRestoreAreas +#undef cfbSaveAreas +#undef cfbScreenInit +#undef cfbScreenPrivateIndex +#undef cfbSegmentSD +#undef cfbSegmentSS +#undef cfbSetScanline +#undef cfbSetScreenPixmap +#undef cfbSetSpans +#undef cfbSetVisualTypes +#undef cfbSetupScreen +#undef cfbSolidSpansCopy +#undef cfbSolidSpansGeneral +#undef cfbSolidSpansXor +#undef cfbStippleStack +#undef cfbStippleStackTE +#undef cfbTEGlyphBlt +#undef cfbTEOps +#undef cfbTEOps1Rect +#undef cfbTile32FSCopy +#undef cfbTile32FSGeneral +#undef cfbUninstallColormap +#undef cfbUnmapWindow +#undef cfbUnnaturalStippleFS +#undef cfbUnnaturalTileFS +#undef cfbValidateGC +#undef cfbVertS +#undef cfbWindowPrivateIndex +#undef cfbXRotatePixmap +#undef cfbYRotatePixmap +#undef cfbZeroPolyArcSS8Copy +#undef cfbZeroPolyArcSS8General +#undef cfbZeroPolyArcSS8Xor +#undef cfbendpartial +#undef cfbendtab +#undef cfbmask +#undef cfbrmask +#undef cfbstartpartial +#undef cfbstarttab diff --git a/xorg-server-1.4/cfb/cfbwindow.c b/xorg-server-1.4/cfb/cfbwindow.c new file mode 100644 index 0000000..e04b73d --- /dev/null +++ b/xorg-server-1.4/cfb/cfbwindow.c @@ -0,0 +1,337 @@ +/*********************************************************** + +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 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. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include "scrnintstr.h" +#include "windowstr.h" +#include "cfb.h" +#include "mistruct.h" +#include "regionstr.h" +#include "cfbmskbits.h" + +Bool +cfbCreateWindow(pWin) + WindowPtr pWin; +{ + cfbPrivWin *pPrivWin; + + pPrivWin = cfbGetWindowPrivate(pWin); + pPrivWin->pRotatedBorder = NullPixmap; + pPrivWin->pRotatedBackground = NullPixmap; + pPrivWin->fastBackground = FALSE; + pPrivWin->fastBorder = FALSE; + pPrivWin->oldRotate.x = 0; + pPrivWin->oldRotate.y = 0; + +#ifdef PIXMAP_PER_WINDOW + /* Setup pointer to Screen pixmap */ + pWin->devPrivates[frameWindowPrivateIndex].ptr = + (pointer) cfbGetScreenPixmap(pWin->drawable.pScreen); +#endif + + return TRUE; +} + +Bool +cfbDestroyWindow(pWin) + WindowPtr pWin; +{ + cfbPrivWin *pPrivWin; + + pPrivWin = cfbGetWindowPrivate(pWin); + + if (pPrivWin->pRotatedBorder) + (*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBorder); + if (pPrivWin->pRotatedBackground) + (*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBackground); + return(TRUE); +} + +/*ARGSUSED*/ +Bool +cfbMapWindow(pWindow) + WindowPtr pWindow; +{ + return(TRUE); +} + +/* (x, y) is the upper left corner of the window on the screen + do we really need to pass this? (is it a;ready in pWin->absCorner?) + we only do the rotation for pixmaps that are 32 bits wide (padded +or otherwise.) + cfbChangeWindowAttributes() has already put a copy of the pixmap +in pPrivWin->pRotated* +*/ +/*ARGSUSED*/ +Bool +cfbPositionWindow(pWin, x, y) + WindowPtr pWin; + int x, y; +{ + cfbPrivWin *pPrivWin; + int setxy = 0; + + pPrivWin = cfbGetWindowPrivate(pWin); + if (pWin->backgroundState == BackgroundPixmap && pPrivWin->fastBackground) + { + cfbXRotatePixmap(pPrivWin->pRotatedBackground, + pWin->drawable.x - pPrivWin->oldRotate.x); + cfbYRotatePixmap(pPrivWin->pRotatedBackground, + pWin->drawable.y - pPrivWin->oldRotate.y); + setxy = 1; + } + + if (!pWin->borderIsPixel && pPrivWin->fastBorder) + { + while (pWin->backgroundState == ParentRelative) + pWin = pWin->parent; + cfbXRotatePixmap(pPrivWin->pRotatedBorder, + pWin->drawable.x - pPrivWin->oldRotate.x); + cfbYRotatePixmap(pPrivWin->pRotatedBorder, + pWin->drawable.y - pPrivWin->oldRotate.y); + setxy = 1; + } + if (setxy) + { + pPrivWin->oldRotate.x = pWin->drawable.x; + pPrivWin->oldRotate.y = pWin->drawable.y; + } + return (TRUE); +} + +/*ARGSUSED*/ +Bool +cfbUnmapWindow(pWindow) + WindowPtr pWindow; +{ + return (TRUE); +} + +/* UNCLEAN! + this code calls the bitblt helper code directly. + + cfbCopyWindow copies only the parts of the destination that are +visible in the source. +*/ + + +void +cfbCopyWindow(pWin, ptOldOrg, prgnSrc) + WindowPtr pWin; + DDXPointRec ptOldOrg; + RegionPtr prgnSrc; +{ + DDXPointPtr pptSrc; + register DDXPointPtr ppt; + RegionRec rgnDst; + register BoxPtr pbox; + register int dx, dy; + register int i, nbox; + WindowPtr pwinRoot; + + pwinRoot = WindowTable[pWin->drawable.pScreen->myNum]; + + REGION_NULL(pWin->drawable.pScreen, &rgnDst); + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); + REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + + pbox = REGION_RECTS(&rgnDst); + nbox = REGION_NUM_RECTS(&rgnDst); + if(!nbox || !(pptSrc = (DDXPointPtr )ALLOCATE_LOCAL(nbox * sizeof(DDXPointRec)))) + { + REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); + return; + } + ppt = pptSrc; + + for (i = nbox; --i >= 0; ppt++, pbox++) + { + ppt->x = pbox->x1 + dx; + ppt->y = pbox->y1 + dy; + } + + cfbDoBitbltCopy((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, + GXcopy, &rgnDst, pptSrc, ~0L); + DEALLOCATE_LOCAL(pptSrc); + REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); +} + + + +/* swap in correct PaintWindow* routine. If we can use a fast output +routine (i.e. the pixmap is paddable to 32 bits), also pre-rotate a copy +of it in devPrivates[cfbWindowPrivateIndex].ptr. +*/ +Bool +cfbChangeWindowAttributes(pWin, mask) + WindowPtr pWin; + unsigned long mask; +{ + register unsigned long index; + register cfbPrivWin *pPrivWin; + int width; + WindowPtr pBgWin; + + pPrivWin = cfbGetWindowPrivate(pWin); + + /* + * When background state changes from ParentRelative and + * we had previously rotated the fast border pixmap to match + * the parent relative origin, rerotate to match window + */ + if (mask & (CWBackPixmap | CWBackPixel) && + pWin->backgroundState != ParentRelative && + pPrivWin->fastBorder && + (pPrivWin->oldRotate.x != pWin->drawable.x || + pPrivWin->oldRotate.y != pWin->drawable.y)) + { + cfbXRotatePixmap(pPrivWin->pRotatedBorder, + pWin->drawable.x - pPrivWin->oldRotate.x); + cfbYRotatePixmap(pPrivWin->pRotatedBorder, + pWin->drawable.y - pPrivWin->oldRotate.y); + pPrivWin->oldRotate.x = pWin->drawable.x; + pPrivWin->oldRotate.y = pWin->drawable.y; + } + while(mask) + { + index = lowbit (mask); + mask &= ~index; + switch(index) + { + case CWBackPixmap: + if (pWin->backgroundState == None) + { + pPrivWin->fastBackground = FALSE; + } + else if (pWin->backgroundState == ParentRelative) + { + pPrivWin->fastBackground = FALSE; + /* Rotate border to match parent origin */ + if (pPrivWin->pRotatedBorder) { + for (pBgWin = pWin->parent; + pBgWin->backgroundState == ParentRelative; + pBgWin = pBgWin->parent); + cfbXRotatePixmap(pPrivWin->pRotatedBorder, + pBgWin->drawable.x - pPrivWin->oldRotate.x); + cfbYRotatePixmap(pPrivWin->pRotatedBorder, + pBgWin->drawable.y - pPrivWin->oldRotate.y); + pPrivWin->oldRotate.x = pBgWin->drawable.x; + pPrivWin->oldRotate.y = pBgWin->drawable.y; + } + } + else if (((width = (pWin->background.pixmap->drawable.width * PSZ)) + <= PGSZ) && !(width & (width - 1))) + { + cfbCopyRotatePixmap(pWin->background.pixmap, + &pPrivWin->pRotatedBackground, + pWin->drawable.x, + pWin->drawable.y); + if (pPrivWin->pRotatedBackground) + { + pPrivWin->fastBackground = TRUE; + pPrivWin->oldRotate.x = pWin->drawable.x; + pPrivWin->oldRotate.y = pWin->drawable.y; + } + else + { + pPrivWin->fastBackground = FALSE; + } + } + else + { + pPrivWin->fastBackground = FALSE; + } + break; + + case CWBackPixel: + pPrivWin->fastBackground = FALSE; + break; + + case CWBorderPixmap: + if (((width = (pWin->border.pixmap->drawable.width * PSZ)) <= PGSZ) && + !(width & (width - 1))) + { + for (pBgWin = pWin; + pBgWin->backgroundState == ParentRelative; + pBgWin = pBgWin->parent); + cfbCopyRotatePixmap(pWin->border.pixmap, + &pPrivWin->pRotatedBorder, + pBgWin->drawable.x, + pBgWin->drawable.y); + if (pPrivWin->pRotatedBorder) + { + pPrivWin->fastBorder = TRUE; + pPrivWin->oldRotate.x = pBgWin->drawable.x; + pPrivWin->oldRotate.y = pBgWin->drawable.y; + } + else + { + pPrivWin->fastBorder = FALSE; + } + } + else + { + pPrivWin->fastBorder = FALSE; + } + break; + case CWBorderPixel: + pPrivWin->fastBorder = FALSE; + break; + } + } + return (TRUE); +} + diff --git a/xorg-server-1.4/cfb/cfbzerarc.c b/xorg-server-1.4/cfb/cfbzerarc.c new file mode 100644 index 0000000..5b8879e --- /dev/null +++ b/xorg-server-1.4/cfb/cfbzerarc.c @@ -0,0 +1,322 @@ +/************************************************************ + +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. + +********************************************************/ + + +/* Derived from: + * "Algorithm for drawing ellipses or hyperbolae with a digital plotter" + * by M. L. V. Pitteway + * The Computer Journal, November 1967, Volume 10, Number 3, pp. 282-289 + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include +#include "regionstr.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "cfb.h" +#include "cfbmskbits.h" +#include "mizerarc.h" +#include "cfbrrop.h" +#include "mi.h" + +#ifdef PIXEL_ADDR + +static void +RROP_NAME(cfbZeroArcSS8)( + DrawablePtr pDraw, + GCPtr pGC, + xArc *arc) +{ + miZeroArcRec info; + Bool do360; + register int x; + PixelType *addrp; + register PixelType *yorgp, *yorgop; +#if PSZ == 24 + int xorg, xorg3, xorgo, xorgo3; + register int xtmp; +#endif + RROP_DECLARE + register int yoffset; + int npwidth, dyoffset; + register int y, a, b, d, mask; + register int k1, k3, dx, dy; + + cfbGetPixelWidthAndPointer(pDraw,npwidth, addrp) + + RROP_FETCH_GC (pGC); + do360 = miZeroArcSetup(arc, &info, TRUE); + yorgp = addrp + ((info.yorg + pDraw->y) * npwidth); + yorgop = addrp + ((info.yorgo + pDraw->y) * npwidth); + info.xorg += pDraw->x; + info.xorgo += pDraw->x; +#if PSZ == 24 + xorg = info.xorg; + xorg3 = xorg * 3; + info.xorg = (info.xorg * 3) >> 2; + xorgo = info.xorgo; + xorgo3 = xorgo * 3; + info.xorgo = (info.xorgo * 3) >> 2; +#endif + MIARCSETUP(); + yoffset = y ? npwidth : 0; + dyoffset = 0; + mask = info.initialMask; + if (!(arc->width & 1)) + { +#if PSZ == 24 + if (mask & 2) + RROP_SOLID24((yorgp + info.xorgo), xorgo); + if (mask & 8) + RROP_SOLID24((yorgop + info.xorgo), xorgo); +#else + if (mask & 2) + RROP_SOLID((yorgp + info.xorgo)); + if (mask & 8) + RROP_SOLID((yorgop + info.xorgo)); +#endif /* PSZ == 24 */ + } + if (!info.end.x || !info.end.y) + { + mask = info.end.mask; + info.end = info.altend; + } + if (do360 && (arc->width == arc->height) && !(arc->width & 1)) + { + register int xoffset = npwidth; +#if PSZ == 24 + PixelType *yorghb = yorgp + (info.h * npwidth); + register int tmp1, tmp2, tmp1_3, tmp2_3; + + tmp1 = xorg + info.h; + tmp1_3 = tmp1 * 3; + tmp2 = xorg - info.h; + tmp2_3 = tmp2 * 3; + while (1) + { + xtmp = (xorg3 + x * 3) >> 2; + RROP_SOLID24(yorgp + yoffset + xtmp, xorg + x); + RROP_SOLID24(yorgop - yoffset + xtmp, xorg + x); + xtmp = (xorg3 - x * 3) >> 2; + RROP_SOLID24(yorgp + yoffset + xtmp, xorg - x); + RROP_SOLID24(yorgop - yoffset + xtmp, xorg - x); + if (a < 0) + break; + xtmp = (tmp1_3 - y * 3) >> 2; + RROP_SOLID24(yorghb - xoffset + xtmp, tmp1 - y); + RROP_SOLID24(yorghb + xoffset + xtmp, tmp1 - y); + xtmp = (tmp2_3 + y * 3) >> 2; + RROP_SOLID24(yorghb - xoffset + xtmp, tmp2 + y); + RROP_SOLID24(yorghb + xoffset + xtmp, tmp2 + y); + xoffset += npwidth; + MIARCCIRCLESTEP(yoffset += npwidth;); + } +#else + PixelType *yorghb = yorgp + (info.h * npwidth) + info.xorg; + PixelType *yorgohb = yorghb - info.h; + + yorgp += info.xorg; + yorgop += info.xorg; + yorghb += info.h; + while (1) + { + RROP_SOLID(yorgp + yoffset + x); + RROP_SOLID(yorgp + yoffset - x); + RROP_SOLID(yorgop - yoffset - x); + RROP_SOLID(yorgop - yoffset + x); + if (a < 0) + break; + RROP_SOLID(yorghb - xoffset - y); + RROP_SOLID(yorgohb - xoffset + y); + RROP_SOLID(yorgohb + xoffset + y); + RROP_SOLID(yorghb + xoffset - y); + xoffset += npwidth; + MIARCCIRCLESTEP(yoffset += npwidth;); + } + yorgp -= info.xorg; + yorgop -= info.xorg; +#endif /* PSZ == 24 */ + x = info.w; + yoffset = info.h * npwidth; + } + else if (do360) + { + while (y < info.h || x < info.w) + { + MIARCOCTANTSHIFT(dyoffset = npwidth;); +#if PSZ == 24 + xtmp = (xorg3 + x * 3) >> 2; + RROP_SOLID24(yorgp + yoffset + xtmp, xorg + x); + RROP_SOLID24(yorgop - yoffset + xtmp, xorg + x); + xtmp = (xorgo3 - x * 3) >> 2; + RROP_SOLID24(yorgp + yoffset + xtmp, xorgo - x); + RROP_SOLID24(yorgop - yoffset + xtmp, xorgo - x); +#else + RROP_SOLID(yorgp + yoffset + info.xorg + x); + RROP_SOLID(yorgp + yoffset + info.xorgo - x); + RROP_SOLID(yorgop - yoffset + info.xorgo - x); + RROP_SOLID(yorgop - yoffset + info.xorg + x); +#endif + MIARCSTEP(yoffset += dyoffset;, yoffset += npwidth;); + } + } + else + { + while (y < info.h || x < info.w) + { + MIARCOCTANTSHIFT(dyoffset = npwidth;); + if ((x == info.start.x) || (y == info.start.y)) + { + mask = info.start.mask; + info.start = info.altstart; + } +#if PSZ == 24 + if (mask & 1){ + xtmp = (xorg3 + x * 3) >> 2; + RROP_SOLID24(yorgp + yoffset + xtmp, xorg + x); + } + if (mask & 2){ + xtmp = (xorgo3 - x * 3) >> 2; + RROP_SOLID24(yorgp + yoffset + xtmp, xorgo - x); + } + if (mask & 4){ + xtmp = (xorgo3 - x * 3) >> 2; + RROP_SOLID24(yorgop - yoffset + xtmp, xorgo - x); + } + if (mask & 8){ + xtmp = (xorg3 + x * 3) >> 2; + RROP_SOLID24(yorgop - yoffset + xtmp, xorg + x); + } +#else + if (mask & 1) + RROP_SOLID(yorgp + yoffset + info.xorg + x); + if (mask & 2) + RROP_SOLID(yorgp + yoffset + info.xorgo - x); + if (mask & 4) + RROP_SOLID(yorgop - yoffset + info.xorgo - x); + if (mask & 8) + RROP_SOLID(yorgop - yoffset + info.xorg + x); +#endif /* PSZ == 24 */ + if ((x == info.end.x) || (y == info.end.y)) + { + mask = info.end.mask; + info.end = info.altend; + } + MIARCSTEP(yoffset += dyoffset;, yoffset += npwidth;); + } + } + if ((x == info.start.x) || (y == info.start.y)) + mask = info.start.mask; +#if PSZ == 24 + if (mask & 1){ + xtmp = (xorg3 + x * 3) >> 2; + RROP_SOLID24(yorgp + yoffset + xtmp, xorg + x); + } + if (mask & 4){ + xtmp = (xorgo3 - x * 3) >> 2; + RROP_SOLID24(yorgop - yoffset + xtmp, xorgo - x); + } +#else + if (mask & 1) + RROP_SOLID(yorgp + yoffset + info.xorg + x); + if (mask & 4) + RROP_SOLID(yorgop - yoffset + info.xorgo - x); +#endif /* PSZ == 24 */ + if (arc->height & 1) + { +#if PSZ == 24 + if (mask & 2){ + xtmp = (xorgo3 - x * 3) >> 2; + RROP_SOLID24(yorgp + yoffset + xtmp, xorgo - x); + } + if (mask & 8){ + xtmp = (xorg3 + x * 3) >> 2; + RROP_SOLID24(yorgop - yoffset + xtmp, xorg + x); + } +#else + if (mask & 2) + RROP_SOLID(yorgp + yoffset + info.xorgo - x); + if (mask & 8) + RROP_SOLID(yorgop - yoffset + info.xorg + x); +#endif /* PSZ == 24 */ + } + RROP_UNDECLARE +} + +void +RROP_NAME (cfbZeroPolyArcSS8) (pDraw, pGC, narcs, parcs) + register DrawablePtr pDraw; + GCPtr pGC; + int narcs; + xArc *parcs; +{ + register xArc *arc; + register int i; + BoxRec box; + int x2, y2; + RegionPtr cclip; + + cclip = cfbGetCompositeClip(pGC); + for (arc = parcs, i = narcs; --i >= 0; arc++) + { + if (miCanZeroArc(arc)) + { + box.x1 = arc->x + pDraw->x; + box.y1 = arc->y + pDraw->y; + /* + * Because box.x2 and box.y2 get truncated to 16 bits, and the + * RECT_IN_REGION test treats the resulting number as a signed + * integer, the RECT_IN_REGION test alone can go the wrong way. + * This can result in a server crash because the rendering + * routines in this file deal directly with cpu addresses + * of pixels to be stored, and do not clip or otherwise check + * that all such addresses are within their respective pixmaps. + * So we only allow the RECT_IN_REGION test to be used for + * values that can be expressed correctly in a signed short. + */ + x2 = box.x1 + (int)arc->width + 1; + box.x2 = x2; + y2 = box.y1 + (int)arc->height + 1; + box.y2 = y2; + if ( (x2 <= SHRT_MAX) && (y2 <= SHRT_MAX) && + (RECT_IN_REGION(pDraw->pScreen, cclip, &box) == rgnIN) ) + RROP_NAME (cfbZeroArcSS8) (pDraw, pGC, arc); + else + miZeroPolyArc(pDraw, pGC, 1, arc); + } + else + miPolyArc(pDraw, pGC, 1, arc); + } +} + +#endif diff --git a/xorg-server-1.4/cfb/cfbzerarcC.c b/xorg-server-1.4/cfb/cfbzerarcC.c new file mode 100644 index 0000000..95a2aee --- /dev/null +++ b/xorg-server-1.4/cfb/cfbzerarcC.c @@ -0,0 +1,2 @@ +#define RROP GXcopy +#include "../cfb/cfbzerarc.c" diff --git a/xorg-server-1.4/cfb/cfbzerarcG.c b/xorg-server-1.4/cfb/cfbzerarcG.c new file mode 100644 index 0000000..fe0a056 --- /dev/null +++ b/xorg-server-1.4/cfb/cfbzerarcG.c @@ -0,0 +1,2 @@ +#define RROP GXset +#include "../cfb/cfbzerarc.c" diff --git a/xorg-server-1.4/cfb/cfbzerarcX.c b/xorg-server-1.4/cfb/cfbzerarcX.c new file mode 100644 index 0000000..27c61aa --- /dev/null +++ b/xorg-server-1.4/cfb/cfbzerarcX.c @@ -0,0 +1,2 @@ +#define RROP GXxor +#include "../cfb/cfbzerarc.c" diff --git a/xorg-server-1.4/cfb/stip68kgnu.h b/xorg-server-1.4/cfb/stip68kgnu.h new file mode 100644 index 0000000..2da27b4 --- /dev/null +++ b/xorg-server-1.4/cfb/stip68kgnu.h @@ -0,0 +1,121 @@ +/* + * +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 + */ + +/* + * Stipple stack macro for 68k GCC + */ + +#define STIPPLE(addr,stipple,value,width,count,shift) \ + __asm volatile ( \ + "lea 5f,%/a1\n\ + moveq #28,%/d2\n\ + addl %2,%/d2\n\ + moveq #28,%/d3\n\ + subql #4,%2\n\ + negl %2\n\ +1:\n\ + movel %0,%/a0\n\ + addl %6,%0\n\ + movel %3@+,%/d1\n\ + jeq 3f\n\ + movel %/d1,%/d0\n\ + lsrl %/d2,%/d0\n\ + lsll #5,%/d0\n\ + lsll %2,%/d1\n\ + jmp %/a1@(%/d0:l)\n\ +2:\n\ + addl #4,%/a0\n\ + movel %/d1,%/d0\n\ + lsrl %/d3,%/d0\n\ + lsll #5,%/d0\n\ + lsll #4,%/d1\n\ + jmp %/a1@(%/d0:l)\n\ +5:\n\ + jne 2b ; dbra %1,1b ; jra 4f\n\ + . = 5b + 0x20\n\ + moveb %5,%/a0@(3)\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f\n\ + . = 5b + 0x40\n\ + moveb %5,%/a0@(2)\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f\n\ + . = 5b + 0x60\n\ + movew %5,%/a0@(2)\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f\n\ + . = 5b + 0x80\n\ + moveb %5,%/a0@(1)\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0xa0\n\ + moveb %5,%/a0@(3) ; moveb %5,%/a0@(1)\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0xc0\n\ + movew %5,%/a0@(1)\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0xe0\n\ + movew %5,%/a0@(2) ; moveb %5,%/a0@(1)\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0x100\n\ + moveb %5,%/a0@\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0x120\n\ + moveb %5,%/a0@(3) ; moveb %5,%/a0@\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0x140\n\ + moveb %5,%/a0@(2) ; moveb %5,%/a0@\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0x160\n\ + movew %5,%/a0@(2) ; moveb %5,%/a0@\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0x180\n\ + movew %5,%/a0@\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0x1a0\n\ + moveb %5,%/a0@(3) ; movew %5,%/a0@\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0x1c0\n\ + moveb %5,%/a0@(2) ; movew %5,%/a0@\n\ + andl %/d1,%/d1 ; jne 2b ; dbra %1,1b ; jra 4f ;\n\ + . = 5b + 0x1e0\n\ + movel %5,%/a0@\n\ + andl %/d1,%/d1 ; jne 2b ; \n\ +3: dbra %1,1b ; \n\ +4:\n"\ + : "=a" (addr), /* %0 */ \ + "=d" (count), /* %1 */ \ + "=d" (shift), /* %2 */ \ + "=a" (stipple) /* %3 */ \ + : "0" (addr), /* %4 */ \ + "d" (value), /* %5 */ \ + "a" (width), /* %6 */ \ + "1" (count-1), /* %7 */ \ + "2" (shift), /* %8 */ \ + "3" (stipple) /* %9 */ \ + : /* ctemp */ "d0", \ + /* c */ "d1", \ + /* lshift */ "d2", \ + /* rshift */ "d3", \ + /* atemp */ "a0", \ + /* case */ "a1") diff --git a/xorg-server-1.4/cfb/stipmips.s b/xorg-server-1.4/cfb/stipmips.s new file mode 100644 index 0000000..c42d9b5 --- /dev/null +++ b/xorg-server-1.4/cfb/stipmips.s @@ -0,0 +1,281 @@ +/* + * $Xorg: stipmips.s,v 1.4 2001/02/09 02:04:39 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 + */ + +/* + * MIPS assembly code for optimized text rendering. + * + * Other stippling could be done in assembly, but the payoff is + * not nearly as large. Mostly because large areas are heavily + * optimized already. + */ + +#ifdef MIPSEL +# define BitsR sll +# define BitsL srl +# define BO(o) o +# define HO(o) o +# define WO(o) o +# define FourBits(dest,bits) and dest, bits, 0xf +#else +# define BitsR srl +# define BitsL sll +# define BO(o) 3-o +# define HO(o) 2-o +# define WO(o) o +# define FourBits(dest,bits) srl dest, bits, 28 +#endif + +/* reordering instructions would be fatal here */ + .set noreorder + + +/* + * cfbStippleStack(addr, stipple, value, stride, Count, Shift) + * 4 5 6 7 16(sp) 20(sp) + * + * Apply successive 32-bit stipples starting at addr, addr+stride, ... + * + * Used for text rendering, but only when no data could be lost + * when the stipple is shifted left by Shift bits + */ +/* arguments */ +#define addr $4 +#define stipple $5 +#define value $6 +#define stride $7 +#define Count 16($sp) +#define Shift 20($sp) + +/* local variables */ +#define count $14 +#define shift $13 +#define atemp $12 +#define bits $11 +#define lshift $9 +#define sbase $8 +#define stemp $2 + +#define CASE_SIZE 5 /* case blocks are 2^5 bytes each */ +#define CASE_MASK 0x1e0 /* first case mask */ + +#define ForEachLine $200 +#define NextLine $201 +#define NextLine1 $202 +#define CaseBegin $203 +#define ForEachBits $204 +#define ForEachBits1 $205 +#define NextBits $206 + +#ifdef TETEXT +#define cfbStippleStack cfbStippleStackTE +#endif + + .globl cfbStippleStack + .ent cfbStippleStack 2 +cfbStippleStack: + .frame $sp, 0, $31 + lw count, Count /* fetch stack params */ + la sbase,CaseBegin /* load up switch table */ + lw shift, Shift + li lshift, 4 /* compute offset within */ + subu lshift, lshift, shift /* stipple of remaining bits */ +#ifdef MIPSEL + addu shift, shift, CASE_SIZE /* first shift for LSB */ +#else + addu shift, shift, 28-CASE_SIZE /* first shift for MSB */ +#endif + /* do ... while (--count > 0); */ +ForEachLine: + lw bits, 0(stipple) /* get stipple bits */ + move atemp, addr /* set up for this line */ +#ifdef TETEXT + /* Terminal emulator fonts are expanded and have many 0 rows */ + beqz bits, NextLine /* skip out early on 0 */ +#endif + addu addr, addr, stride /* step for the loop */ + BitsR stemp, bits, shift /* get first bits */ + and stemp, stemp, CASE_MASK /* compute first branch */ + addu stemp, stemp, sbase /* ... */ + j stemp /* ... */ + BitsL bits, bits, lshift /* set remaining bits */ + +ForEachBits: + addu atemp, atemp, 4 +ForEachBits1: + FourBits(stemp, bits) /* compute jump for */ + sll stemp, stemp, CASE_SIZE /* next four bits */ + addu stemp, stemp, sbase /* ... */ + j stemp /* ... */ + BitsL bits, bits, 4 /* step for remaining bits */ +CaseBegin: + bnez bits, ForEachBits1 /* 0 */ + addu atemp, atemp, 4 +NextLine: + addu count, count, -1 + bnez count, ForEachLine + addu stipple, stipple, 4 + j $31 + nop + nop + + bnez bits, ForEachBits /* 1 */ + sb value, BO(0)(atemp) + addu count, count, -1 + bnez count, ForEachLine + addu stipple, stipple, 4 + j $31 + nop + nop + + bnez bits, ForEachBits /* 2 */ + sb value, BO(1)(atemp) + addu count, count, -1 + bnez count, ForEachLine + addu stipple, stipple, 4 + j $31 + nop + nop + + bnez bits, ForEachBits /* 3 */ + sh value, HO(0)(atemp) + addu count, count, -1 + bnez count, ForEachLine + addu stipple, stipple, 4 + j $31 + nop + nop + + bnez bits, ForEachBits /* 4 */ + sb value, BO(2)(atemp) + addu count, count, -1 + bnez count, ForEachLine + addu stipple, stipple, 4 + j $31 + nop + nop + + sb value, BO(0)(atemp) /* 5 */ + bnez bits, ForEachBits + sb value, BO(2)(atemp) + addu count, count, -1 + bnez count, ForEachLine + addu stipple, stipple, 4 + j $31 + nop + + sb value, BO(1)(atemp) /* 6 */ + bnez bits, ForEachBits + sb value, BO(2)(atemp) + addu count, count, -1 + bnez count, ForEachLine + addu stipple, stipple, 4 + j $31 + nop + + bnez bits, ForEachBits /* 7 */ + swl value, BO(2)(atemp) /* untested on MSB */ + addu count, count, -1 + bnez count, ForEachLine + addu stipple, stipple, 4 + j $31 + nop + nop + + bnez bits, ForEachBits /* 8 */ + sb value, BO(3)(atemp) + addu count, count, -1 + bnez count, ForEachLine + addu stipple, stipple, 4 + j $31 + nop + nop + + sb value, BO(0)(atemp) /* 9 */ + bnez bits, ForEachBits + sb value, BO(3)(atemp) + addu count, count, -1 + bnez count, ForEachLine + addu stipple, stipple, 4 + j $31 + nop + + sb value, BO(1)(atemp) /* a */ + bnez bits, ForEachBits + sb value, BO(3)(atemp) + addu count, count, -1 + bnez count, ForEachLine + addu stipple, stipple, 4 + j $31 + nop + + sh value, HO(0)(atemp) /* b */ + bnez bits, ForEachBits + sb value, BO(3)(atemp) + addu count, count, -1 + bnez count, ForEachLine + addu stipple, stipple, 4 + j $31 + nop + + bnez bits, ForEachBits /* c */ + sh value, HO(2)(atemp) + addu count, count, -1 + bnez count, ForEachLine + addu stipple, stipple, 4 + j $31 + nop + nop + + sb value, BO(0)(atemp) /* d */ + bnez bits, ForEachBits + sh value, HO(2)(atemp) + addu count, count, -1 + bnez count, ForEachLine + addu stipple, stipple, 4 + j $31 + nop + + bnez bits, ForEachBits /* e */ + swr value, BO(1)(atemp) /* untested on MSB */ + addu count, count, -1 + bnez count, ForEachLine + addu stipple, stipple, 4 + j $31 + nop + nop + + bnez bits, ForEachBits /* f */ + sw value, WO(0)(atemp) + addu count, count, -1 + bnez count, ForEachLine + addu stipple, stipple, 4 + j $31 + nop + nop + + .end cfbStippleStack diff --git a/xorg-server-1.4/cfb/stipsparc.s b/xorg-server-1.4/cfb/stipsparc.s new file mode 100644 index 0000000..dcd440b --- /dev/null +++ b/xorg-server-1.4/cfb/stipsparc.s @@ -0,0 +1,290 @@ +/* + * $Xorg: stipsparc.s,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ + * $XdotOrg: $ + * +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 + */ +/* $XFree86: xc/programs/Xserver/cfb/stipsparc.s,v 1.4 2001/01/17 22:36:38 dawes Exp $ */ + +/* + * SPARC assembly code for optimized text rendering. + * + * Other stippling could be done in assembly, but the payoff is + * not nearly as large. Mostly because large areas are heavily + * optimized already. + */ + +/* not that I expect to ever see an LSB SPARC, but ... */ +#ifdef LITTLE_ENDIAN +# define BitsR sll +# define BitsL srl +# define BO(o) o +# define HO(o) o +# define WO(o) o +# define FourBits(dest,bits) and bits, 0xf, dest +#else +# define BitsR srl +# define BitsL sll +# define BO(o) 3-o +# define HO(o) 2-o +# define WO(o) o +# define FourBits(dest,bits) srl bits, 28, dest +#endif + +/* + * cfbStippleStack(addr, stipple, value, stride, Count, Shift) + * 4 5 6 7 16(sp) 20(sp) + * + * Apply successive 32-bit stipples starting at addr, addr+stride, ... + * + * Used for text rendering, but only when no data could be lost + * when the stipple is shifted left by Shift bits + */ +/* arguments */ +#define addr %i0 +#define stipple %i1 +#define value %i2 +#define stride %i3 +#define count %i4 +#define shift %i5 + +/* local variables */ +#define atemp %l0 +#define bits %l1 +#define lshift %l2 +#define sbase %l3 +#define stemp %l4 + +#define CASE_SIZE 5 /* case blocks are 2^5 bytes each */ +#define CASE_MASK 0x1e0 /* first case mask */ + +#define ForEachLine LY1 +#define NextLine LY2 +#define CaseBegin LY3 +#define ForEachBits LY4 +#define NextBits LY5 + +#if defined(SVR4) || defined(__ELF__) +#ifdef TETEXT +#define _cfbStippleStack cfbStippleStackTE +#else +#define _cfbStippleStack cfbStippleStack +#endif +#else +#ifdef TETEXT +#define _cfbStippleStack _cfbStippleStackTE +#endif +#endif + .seg "text" + .proc 16 + .globl _cfbStippleStack +_cfbStippleStack: + save %sp,-64,%sp +#ifdef SHAREDCODE +1: + call 2f + nop +2: + mov %o7,sbase /* sbase = 1b(1:) */ + add sbase, CaseBegin-1b, sbase +#else /* !SHAREDCODE */ + sethi %hi(CaseBegin),sbase /* load up switch table */ + or sbase,%lo(CaseBegin),sbase +#endif /* SHAREDCODE */ + mov 4,lshift /* compute offset within */ + sub lshift, shift, lshift /* stipple of remaining bits */ +#ifdef LITTLE_ENDIAN + inc CASE_SIZE, shift /* first shift for LSB */ +#else + inc 28-CASE_SIZE, shift /* first shift for MSB */ +#endif + /* do ... while (--count > 0); */ +ForEachLine: + ld [stipple],bits /* get stipple bits */ + mov addr,atemp /* set up for this line */ +#ifdef TETEXT + /* Terminal emulator fonts are expanded and have many 0 rows */ + tst bits + bz NextLine /* skip out early on 0 */ +#endif + add addr, stride, addr /* step for the loop */ + BitsR bits, shift, stemp /* get first bits */ + and stemp, CASE_MASK, stemp /* compute first jump */ + BitsL bits, lshift, bits /* set remaining bits */ + jmp sbase+stemp /* ... */ + tst bits + +ForEachBits: + inc 4, atemp +ForEachBits1: + FourBits(stemp, bits) /* compute jump for */ + sll stemp, CASE_SIZE, stemp /* these four bits */ + BitsL bits, 4, bits /* step for remaining bits */ + jmp sbase+stemp /* jump */ + tst bits +CaseBegin: + bnz,a ForEachBits1 /* 0 */ + inc 4, atemp +NextLine: + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + nop + + bnz ForEachBits /* 1 */ + stb value, [atemp+BO(0)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + nop + + bnz ForEachBits /* 2 */ + stb value, [atemp+BO(1)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + nop + + bnz ForEachBits /* 3 */ + sth value, [atemp+HO(0)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + nop + + bnz ForEachBits /* 4 */ + stb value, [atemp+BO(2)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + nop + + stb value, [atemp+BO(0)] /* 5 */ + bnz ForEachBits + stb value, [atemp+BO(2)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + + stb value, [atemp+BO(1)] /* 6 */ + bnz ForEachBits + stb value, [atemp+BO(2)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + + sth value, [atemp+HO(0)] /* 7 */ + bnz ForEachBits + stb value, [atemp+BO(2)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + + bnz ForEachBits /* 8 */ + stb value, [atemp+BO(3)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + nop + + stb value, [atemp+BO(0)] /* 9 */ + bnz ForEachBits + stb value, [atemp+BO(3)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + + stb value, [atemp+BO(1)] /* a */ + bnz ForEachBits + stb value, [atemp+BO(3)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + + sth value, [atemp+HO(0)] /* b */ + bnz ForEachBits + stb value, [atemp+BO(3)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + + bnz ForEachBits /* c */ + sth value, [atemp+HO(2)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + nop + + stb value, [atemp+BO(0)] /* d */ + bnz ForEachBits + sth value, [atemp+HO(2)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + + stb value, [atemp+BO(1)] /* e */ + bnz ForEachBits + sth value, [atemp+HO(2)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + + bnz ForEachBits /* f */ + st value, [atemp+WO(0)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore diff --git a/xorg-server-1.4/cfb/stipsprc32.s b/xorg-server-1.4/cfb/stipsprc32.s new file mode 100644 index 0000000..89b031f --- /dev/null +++ b/xorg-server-1.4/cfb/stipsprc32.s @@ -0,0 +1,291 @@ +/* + * $Xorg: stipsprc32.s,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ + * $XdotOrg: $ + * +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 + */ +/* $XFree86: xc/programs/Xserver/cfb/stipsprc32.s,v 1.4 2001/01/17 22:36:38 dawes Exp $ */ + +/* + * SPARC assembly code for optimized text rendering. + * + * Other stippling could be done in assembly, but the payoff is + * not nearly as large. Mostly because large areas are heavily + * optimized already. + */ + +/* not that I expect to ever see an LSB SPARC, but ... */ +#ifdef LITTLE_ENDIAN +# define BitsR sll +# define BitsL srl +# define WO(o) 3-o +# define FourBits(dest,bits) and bits, 0xf, dest +#else +# define BitsR srl +# define BitsL sll +# define WO(o) o +# define FourBits(dest,bits) srl bits, 28, dest +#endif + +/* + * cfb32StippleStack(addr, stipple, value, stride, Count, Shift) + * 4 5 6 7 16(sp) 20(sp) + * + * Apply successive 32-bit stipples starting at addr, addr+stride, ... + * + * Used for text rendering, but only when no data could be lost + * when the stipple is shifted left by Shift bits + */ +/* arguments */ +#define addr %i0 +#define stipple %i1 +#define value %i2 +#define stride %i3 +#define count %i4 +#define shift %i5 + +/* local variables */ +#define atemp %l0 +#define bits %l1 +#define lshift %l2 +#define sbase %l3 +#define stemp %l4 + +#define CASE_SIZE 5 /* case blocks are 2^5 bytes each */ +#define CASE_MASK 0x1e0 /* first case mask */ + +#define ForEachLine LY1 +#define NextLine LY2 +#define CaseBegin LY3 +#define ForEachBits LY4 +#define NextBits LY5 + +#if defined(SVR4) || defined(__ELF__) +#ifdef TETEXT +#define _cfb32StippleStack cfb32StippleStackTE +#else +#define _cfb32StippleStack cfb32StippleStack +#endif +#else +#ifdef TETEXT +#define _cfb32StippleStack _cfb32StippleStackTE +#endif +#endif + + .seg "text" + .proc 16 + .globl _cfb32StippleStack +_cfb32StippleStack: + save %sp,-64,%sp +#ifdef SHAREDCODE +1: + call 2f + nop +2: + mov %o7,sbase /* sbase = 1b(1:) */ + add sbase, CaseBegin-1b, sbase +#else /* !SHAREDCODE */ + sethi %hi(CaseBegin),sbase /* load up switch table */ + or sbase,%lo(CaseBegin),sbase +#endif /* !SHAREDCODE */ + mov 4,lshift /* compute offset within */ + sub lshift, shift, lshift /* stipple of remaining bits */ +#ifdef LITTLE_ENDIAN + inc CASE_SIZE, shift /* first shift for LSB */ +#else + inc 28-CASE_SIZE, shift /* first shift for MSB */ +#endif + /* do ... while (--count > 0); */ +ForEachLine: + ld [stipple],bits /* get stipple bits */ + mov addr,atemp /* set up for this line */ +#ifdef TETEXT + /* Terminal emulator fonts are expanded and have many 0 rows */ + tst bits + bz NextLine /* skip out early on 0 */ +#endif + add addr, stride, addr /* step for the loop */ + BitsR bits, shift, stemp /* get first bits */ + and stemp, CASE_MASK, stemp /* compute first jump */ + BitsL bits, lshift, bits /* set remaining bits */ + jmp sbase+stemp /* ... */ + tst bits + +ForEachBits: + inc 16, atemp +ForEachBits1: + FourBits(stemp, bits) /* compute jump for */ + sll stemp, CASE_SIZE, stemp /* these four bits */ + BitsL bits, 4, bits /* step for remaining bits */ + jmp sbase+stemp /* jump */ + tst bits +CaseBegin: + bnz,a ForEachBits1 /* 0 */ + inc 16, atemp +NextLine: + deccc 1, count +NextLine1: + bnz,a ForEachLine + inc 4, stipple + ret + restore + nop + + bnz ForEachBits /* 1 */ + st value, [atemp+WO(12)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + nop + + bnz ForEachBits /* 2 */ + st value, [atemp+WO(8)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + nop + + st value, [atemp+WO(8)] /* 3 */ + bnz ForEachBits + st value, [atemp+WO(12)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + + bnz ForEachBits /* 4 */ + st value, [atemp+WO(4)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + nop + + st value, [atemp+WO(4)] /* 5 */ + bnz ForEachBits + st value, [atemp+WO(12)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + + st value, [atemp+WO(4)] /* 6 */ + bnz ForEachBits + st value, [atemp+WO(8)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + + st value, [atemp+WO(4)] /* 7 */ + st value, [atemp+WO(8)] + bnz ForEachBits + st value, [atemp+WO(12)] + b NextLine1 + deccc 1, count + nop + nop + + bnz ForEachBits /* 8 */ + st value, [atemp+WO(0)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + nop + + st value, [atemp+WO(0)] /* 9 */ + bnz ForEachBits + st value, [atemp+WO(12)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + + st value, [atemp+WO(0)] /* a */ + bnz ForEachBits + st value, [atemp+WO(8)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + + st value, [atemp+WO(0)] /* b */ + st value, [atemp+WO(8)] + bnz ForEachBits + st value, [atemp+WO(12)] + b NextLine1 + deccc 1, count + nop + nop + + st value, [atemp+WO(0)] /* c */ + bnz ForEachBits + st value, [atemp+WO(4)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore + + st value, [atemp+WO(0)] /* d */ + st value, [atemp+WO(4)] + bnz ForEachBits + st value, [atemp+WO(12)] + b NextLine1 + deccc 1, count + nop + nop + + st value, [atemp+WO(0)] /* e */ + st value, [atemp+WO(4)] + bnz ForEachBits + st value, [atemp+WO(8)] + b NextLine1 + deccc 1, count + nop + nop + + st value, [atemp+WO(0)] /* f */ + st value, [atemp+WO(4)] + st value, [atemp+WO(8)] + bnz ForEachBits + st value, [atemp+WO(12)] + deccc 1, count + bnz,a ForEachLine + inc 4, stipple + ret + restore diff --git a/xorg-server-1.4/cfb32/Makefile.am b/xorg-server-1.4/cfb32/Makefile.am new file mode 100644 index 0000000..681a095 --- /dev/null +++ b/xorg-server-1.4/cfb32/Makefile.am @@ -0,0 +1,9 @@ +noinst_LTLIBRARIES = libcfb32.la + +include $(top_srcdir)/cfb/Makefile.am.inc + +libcfb32_la_SOURCES = $(libcfb_common_sources) $(libcfb_gen_sources) + +INCLUDES = $(CFB_INCLUDES) $(DIX_CFLAGS) -I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/common + +AM_CFLAGS = -DPSZ=32 $(PLATFORMDEFS) diff --git a/xorg-server-1.4/cfb32/Makefile.in b/xorg-server-1.4/cfb32/Makefile.in new file mode 100644 index 0000000..c16108f --- /dev/null +++ b/xorg-server-1.4/cfb32/Makefile.in @@ -0,0 +1,1006 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/cfb/Makefile.am.inc +subdir = cfb32 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libcfb32_la_LIBADD = +am__objects_1 = cfbgc.lo cfbrrop.lo cfbwindow.lo cfbpntwin.lo \ + cfbmskbits.lo cfbpixmap.lo cfbbitblt.lo cfbfillsp.lo \ + cfbsetsp.lo cfbscrinit.lo cfballpriv.lo cfbgetsp.lo \ + cfbfillrct.lo cfbigblt8.lo cfbglblt8.lo cfbtegblt.lo \ + cfbbstore.lo cfbpolypnt.lo cfbbres.lo cfbline.lo cfbhrzvert.lo \ + cfbbresd.lo cfbimage.lo cfbcppl.lo cfbcmap.lo +am__objects_2 = cfbseg.lo cfbfillarcC.lo cfbfillarcG.lo cfbzerarcC.lo \ + cfbzerarcX.lo cfbzerarcG.lo cfbbltC.lo cfbbltX.lo cfbbltO.lo \ + cfbbltG.lo cfbsolidC.lo cfbsolidX.lo cfbsolidG.lo \ + cfbtileoddC.lo cfbtileoddG.lo cfbtile32C.lo cfbtile32G.lo \ + cfb8lineCO.lo cfb8lineCP.lo cfb8lineX.lo cfb8lineG.lo \ + cfb8segCS.lo cfb8segC.lo cfb8segX.lo cfb8setG.lo \ + cfbply1rctC.lo cfbply1rctG.lo +am_libcfb32_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libcfb32_la_OBJECTS = $(am_libcfb32_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libcfb32_la_SOURCES) +DIST_SOURCES = $(libcfb32_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libcfb32.la +libcfb_gen_sources = cfbseg.c cfbfillarcC.c cfbfillarcG.c cfbzerarcC.c cfbzerarcX.c cfbzerarcG.c \ + cfbbltC.c cfbbltX.c cfbbltO.c cfbbltG.c cfbsolidC.c cfbsolidX.c cfbsolidG.c cfbtileoddC.c \ + cfbtileoddG.c cfbtile32C.c cfbtile32G.c cfb8lineCO.c cfb8lineCP.c cfb8lineX.c cfb8lineG.c \ + cfb8segCS.c cfb8segC.c cfb8segX.c cfb8setG.c cfbply1rctC.c cfbply1rctG.c + +DISTCLEANFILES = $(libcfb_gen_sources) +CFB_INCLUDES = -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb +libcfb_common_sources = $(top_srcdir)/cfb/cfbgc.c $(top_srcdir)/cfb/cfbrrop.c \ + $(top_srcdir)/cfb/cfbwindow.c $(top_srcdir)/cfb/cfbpntwin.c \ + $(top_srcdir)/cfb/cfbmskbits.c $(top_srcdir)/cfb/cfbpixmap.c \ + $(top_srcdir)/cfb/cfbbitblt.c $(top_srcdir)/cfb/cfbfillsp.c \ + $(top_srcdir)/cfb/cfbsetsp.c $(top_srcdir)/cfb/cfbscrinit.c \ + $(top_srcdir)/cfb/cfballpriv.c $(top_srcdir)/cfb/cfbgetsp.c \ + $(top_srcdir)/cfb/cfbfillrct.c $(top_srcdir)/cfb/cfbigblt8.c \ + $(top_srcdir)/cfb/cfbglblt8.c $(top_srcdir)/cfb/cfbtegblt.c \ + $(top_srcdir)/cfb/cfbbstore.c $(top_srcdir)/cfb/cfbpolypnt.c \ + $(top_srcdir)/cfb/cfbbres.c $(top_srcdir)/cfb/cfbline.c \ + $(top_srcdir)/cfb/cfbhrzvert.c $(top_srcdir)/cfb/cfbbresd.c \ + $(top_srcdir)/cfb/cfbimage.c $(top_srcdir)/cfb/cfbcppl.c \ + $(top_srcdir)/cfb/cfbcmap.c + +@XPRINT_TRUE@PLATFORMDEFS = -DXFREE86 +libcfb32_la_SOURCES = $(libcfb_common_sources) $(libcfb_gen_sources) +INCLUDES = $(CFB_INCLUDES) $(DIX_CFLAGS) -I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/common +AM_CFLAGS = -DPSZ=32 $(PLATFORMDEFS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cfb/Makefile.am.inc $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign cfb32/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign cfb32/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libcfb32.la: $(libcfb32_la_OBJECTS) $(libcfb32_la_DEPENDENCIES) + $(LINK) $(libcfb32_la_OBJECTS) $(libcfb32_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8lineCO.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8lineCP.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8lineG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8lineX.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8segC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8segCS.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8segX.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8setG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfballpriv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbitblt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbltC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbltG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbltO.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbltX.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbres.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbresd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbstore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbcmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbcppl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbfillarcC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbfillarcG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbfillrct.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbfillsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbgc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbgetsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbglblt8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbhrzvert.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbigblt8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbimage.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbmskbits.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbpixmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbply1rctC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbply1rctG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbpntwin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbpolypnt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbrrop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbscrinit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbseg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbsetsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbsolidC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbsolidG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbsolidX.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbtegblt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbtile32C.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbtile32G.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbtileoddC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbtileoddG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbwindow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbzerarcC.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbzerarcG.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbzerarcX.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +cfbgc.lo: $(top_srcdir)/cfb/cfbgc.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbgc.lo -MD -MP -MF $(DEPDIR)/cfbgc.Tpo -c -o cfbgc.lo `test -f '$(top_srcdir)/cfb/cfbgc.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbgc.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbgc.Tpo $(DEPDIR)/cfbgc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbgc.c' object='cfbgc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbgc.lo `test -f '$(top_srcdir)/cfb/cfbgc.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbgc.c + +cfbrrop.lo: $(top_srcdir)/cfb/cfbrrop.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbrrop.lo -MD -MP -MF $(DEPDIR)/cfbrrop.Tpo -c -o cfbrrop.lo `test -f '$(top_srcdir)/cfb/cfbrrop.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbrrop.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbrrop.Tpo $(DEPDIR)/cfbrrop.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbrrop.c' object='cfbrrop.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbrrop.lo `test -f '$(top_srcdir)/cfb/cfbrrop.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbrrop.c + +cfbwindow.lo: $(top_srcdir)/cfb/cfbwindow.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbwindow.lo -MD -MP -MF $(DEPDIR)/cfbwindow.Tpo -c -o cfbwindow.lo `test -f '$(top_srcdir)/cfb/cfbwindow.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbwindow.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbwindow.Tpo $(DEPDIR)/cfbwindow.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbwindow.c' object='cfbwindow.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbwindow.lo `test -f '$(top_srcdir)/cfb/cfbwindow.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbwindow.c + +cfbpntwin.lo: $(top_srcdir)/cfb/cfbpntwin.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbpntwin.lo -MD -MP -MF $(DEPDIR)/cfbpntwin.Tpo -c -o cfbpntwin.lo `test -f '$(top_srcdir)/cfb/cfbpntwin.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbpntwin.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbpntwin.Tpo $(DEPDIR)/cfbpntwin.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbpntwin.c' object='cfbpntwin.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbpntwin.lo `test -f '$(top_srcdir)/cfb/cfbpntwin.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbpntwin.c + +cfbmskbits.lo: $(top_srcdir)/cfb/cfbmskbits.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbmskbits.lo -MD -MP -MF $(DEPDIR)/cfbmskbits.Tpo -c -o cfbmskbits.lo `test -f '$(top_srcdir)/cfb/cfbmskbits.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbmskbits.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbmskbits.Tpo $(DEPDIR)/cfbmskbits.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbmskbits.c' object='cfbmskbits.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbmskbits.lo `test -f '$(top_srcdir)/cfb/cfbmskbits.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbmskbits.c + +cfbpixmap.lo: $(top_srcdir)/cfb/cfbpixmap.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbpixmap.lo -MD -MP -MF $(DEPDIR)/cfbpixmap.Tpo -c -o cfbpixmap.lo `test -f '$(top_srcdir)/cfb/cfbpixmap.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbpixmap.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbpixmap.Tpo $(DEPDIR)/cfbpixmap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbpixmap.c' object='cfbpixmap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbpixmap.lo `test -f '$(top_srcdir)/cfb/cfbpixmap.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbpixmap.c + +cfbbitblt.lo: $(top_srcdir)/cfb/cfbbitblt.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbbitblt.lo -MD -MP -MF $(DEPDIR)/cfbbitblt.Tpo -c -o cfbbitblt.lo `test -f '$(top_srcdir)/cfb/cfbbitblt.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbitblt.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbbitblt.Tpo $(DEPDIR)/cfbbitblt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbbitblt.c' object='cfbbitblt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbbitblt.lo `test -f '$(top_srcdir)/cfb/cfbbitblt.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbitblt.c + +cfbfillsp.lo: $(top_srcdir)/cfb/cfbfillsp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbfillsp.lo -MD -MP -MF $(DEPDIR)/cfbfillsp.Tpo -c -o cfbfillsp.lo `test -f '$(top_srcdir)/cfb/cfbfillsp.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbfillsp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbfillsp.Tpo $(DEPDIR)/cfbfillsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbfillsp.c' object='cfbfillsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbfillsp.lo `test -f '$(top_srcdir)/cfb/cfbfillsp.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbfillsp.c + +cfbsetsp.lo: $(top_srcdir)/cfb/cfbsetsp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbsetsp.lo -MD -MP -MF $(DEPDIR)/cfbsetsp.Tpo -c -o cfbsetsp.lo `test -f '$(top_srcdir)/cfb/cfbsetsp.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbsetsp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbsetsp.Tpo $(DEPDIR)/cfbsetsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbsetsp.c' object='cfbsetsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbsetsp.lo `test -f '$(top_srcdir)/cfb/cfbsetsp.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbsetsp.c + +cfbscrinit.lo: $(top_srcdir)/cfb/cfbscrinit.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbscrinit.lo -MD -MP -MF $(DEPDIR)/cfbscrinit.Tpo -c -o cfbscrinit.lo `test -f '$(top_srcdir)/cfb/cfbscrinit.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbscrinit.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbscrinit.Tpo $(DEPDIR)/cfbscrinit.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbscrinit.c' object='cfbscrinit.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbscrinit.lo `test -f '$(top_srcdir)/cfb/cfbscrinit.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbscrinit.c + +cfballpriv.lo: $(top_srcdir)/cfb/cfballpriv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfballpriv.lo -MD -MP -MF $(DEPDIR)/cfballpriv.Tpo -c -o cfballpriv.lo `test -f '$(top_srcdir)/cfb/cfballpriv.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfballpriv.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfballpriv.Tpo $(DEPDIR)/cfballpriv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfballpriv.c' object='cfballpriv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfballpriv.lo `test -f '$(top_srcdir)/cfb/cfballpriv.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfballpriv.c + +cfbgetsp.lo: $(top_srcdir)/cfb/cfbgetsp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbgetsp.lo -MD -MP -MF $(DEPDIR)/cfbgetsp.Tpo -c -o cfbgetsp.lo `test -f '$(top_srcdir)/cfb/cfbgetsp.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbgetsp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbgetsp.Tpo $(DEPDIR)/cfbgetsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbgetsp.c' object='cfbgetsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbgetsp.lo `test -f '$(top_srcdir)/cfb/cfbgetsp.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbgetsp.c + +cfbfillrct.lo: $(top_srcdir)/cfb/cfbfillrct.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbfillrct.lo -MD -MP -MF $(DEPDIR)/cfbfillrct.Tpo -c -o cfbfillrct.lo `test -f '$(top_srcdir)/cfb/cfbfillrct.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbfillrct.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbfillrct.Tpo $(DEPDIR)/cfbfillrct.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbfillrct.c' object='cfbfillrct.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbfillrct.lo `test -f '$(top_srcdir)/cfb/cfbfillrct.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbfillrct.c + +cfbigblt8.lo: $(top_srcdir)/cfb/cfbigblt8.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbigblt8.lo -MD -MP -MF $(DEPDIR)/cfbigblt8.Tpo -c -o cfbigblt8.lo `test -f '$(top_srcdir)/cfb/cfbigblt8.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbigblt8.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbigblt8.Tpo $(DEPDIR)/cfbigblt8.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbigblt8.c' object='cfbigblt8.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbigblt8.lo `test -f '$(top_srcdir)/cfb/cfbigblt8.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbigblt8.c + +cfbglblt8.lo: $(top_srcdir)/cfb/cfbglblt8.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbglblt8.lo -MD -MP -MF $(DEPDIR)/cfbglblt8.Tpo -c -o cfbglblt8.lo `test -f '$(top_srcdir)/cfb/cfbglblt8.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbglblt8.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbglblt8.Tpo $(DEPDIR)/cfbglblt8.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbglblt8.c' object='cfbglblt8.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbglblt8.lo `test -f '$(top_srcdir)/cfb/cfbglblt8.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbglblt8.c + +cfbtegblt.lo: $(top_srcdir)/cfb/cfbtegblt.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbtegblt.lo -MD -MP -MF $(DEPDIR)/cfbtegblt.Tpo -c -o cfbtegblt.lo `test -f '$(top_srcdir)/cfb/cfbtegblt.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbtegblt.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbtegblt.Tpo $(DEPDIR)/cfbtegblt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbtegblt.c' object='cfbtegblt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbtegblt.lo `test -f '$(top_srcdir)/cfb/cfbtegblt.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbtegblt.c + +cfbbstore.lo: $(top_srcdir)/cfb/cfbbstore.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbbstore.lo -MD -MP -MF $(DEPDIR)/cfbbstore.Tpo -c -o cfbbstore.lo `test -f '$(top_srcdir)/cfb/cfbbstore.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbstore.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbbstore.Tpo $(DEPDIR)/cfbbstore.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbbstore.c' object='cfbbstore.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbbstore.lo `test -f '$(top_srcdir)/cfb/cfbbstore.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbstore.c + +cfbpolypnt.lo: $(top_srcdir)/cfb/cfbpolypnt.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbpolypnt.lo -MD -MP -MF $(DEPDIR)/cfbpolypnt.Tpo -c -o cfbpolypnt.lo `test -f '$(top_srcdir)/cfb/cfbpolypnt.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbpolypnt.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbpolypnt.Tpo $(DEPDIR)/cfbpolypnt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbpolypnt.c' object='cfbpolypnt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbpolypnt.lo `test -f '$(top_srcdir)/cfb/cfbpolypnt.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbpolypnt.c + +cfbbres.lo: $(top_srcdir)/cfb/cfbbres.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbbres.lo -MD -MP -MF $(DEPDIR)/cfbbres.Tpo -c -o cfbbres.lo `test -f '$(top_srcdir)/cfb/cfbbres.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbres.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbbres.Tpo $(DEPDIR)/cfbbres.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbbres.c' object='cfbbres.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbbres.lo `test -f '$(top_srcdir)/cfb/cfbbres.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbres.c + +cfbline.lo: $(top_srcdir)/cfb/cfbline.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbline.lo -MD -MP -MF $(DEPDIR)/cfbline.Tpo -c -o cfbline.lo `test -f '$(top_srcdir)/cfb/cfbline.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbline.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbline.Tpo $(DEPDIR)/cfbline.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbline.c' object='cfbline.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbline.lo `test -f '$(top_srcdir)/cfb/cfbline.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbline.c + +cfbhrzvert.lo: $(top_srcdir)/cfb/cfbhrzvert.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbhrzvert.lo -MD -MP -MF $(DEPDIR)/cfbhrzvert.Tpo -c -o cfbhrzvert.lo `test -f '$(top_srcdir)/cfb/cfbhrzvert.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbhrzvert.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbhrzvert.Tpo $(DEPDIR)/cfbhrzvert.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbhrzvert.c' object='cfbhrzvert.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbhrzvert.lo `test -f '$(top_srcdir)/cfb/cfbhrzvert.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbhrzvert.c + +cfbbresd.lo: $(top_srcdir)/cfb/cfbbresd.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbbresd.lo -MD -MP -MF $(DEPDIR)/cfbbresd.Tpo -c -o cfbbresd.lo `test -f '$(top_srcdir)/cfb/cfbbresd.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbresd.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbbresd.Tpo $(DEPDIR)/cfbbresd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbbresd.c' object='cfbbresd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbbresd.lo `test -f '$(top_srcdir)/cfb/cfbbresd.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbresd.c + +cfbimage.lo: $(top_srcdir)/cfb/cfbimage.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbimage.lo -MD -MP -MF $(DEPDIR)/cfbimage.Tpo -c -o cfbimage.lo `test -f '$(top_srcdir)/cfb/cfbimage.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbimage.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbimage.Tpo $(DEPDIR)/cfbimage.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbimage.c' object='cfbimage.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbimage.lo `test -f '$(top_srcdir)/cfb/cfbimage.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbimage.c + +cfbcppl.lo: $(top_srcdir)/cfb/cfbcppl.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbcppl.lo -MD -MP -MF $(DEPDIR)/cfbcppl.Tpo -c -o cfbcppl.lo `test -f '$(top_srcdir)/cfb/cfbcppl.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbcppl.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbcppl.Tpo $(DEPDIR)/cfbcppl.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbcppl.c' object='cfbcppl.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbcppl.lo `test -f '$(top_srcdir)/cfb/cfbcppl.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbcppl.c + +cfbcmap.lo: $(top_srcdir)/cfb/cfbcmap.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbcmap.lo -MD -MP -MF $(DEPDIR)/cfbcmap.Tpo -c -o cfbcmap.lo `test -f '$(top_srcdir)/cfb/cfbcmap.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbcmap.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cfbcmap.Tpo $(DEPDIR)/cfbcmap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbcmap.c' object='cfbcmap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbcmap.lo `test -f '$(top_srcdir)/cfb/cfbcmap.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbcmap.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +cfbseg.c: + echo "#define POLYSEGMENT" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbline.c\"" >> $@ + +cfbfillarcC.c: + echo "#define RROP GXcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbfillarc.c\"" >> $@ + +cfbfillarcG.c: + echo "#define RROP GXset" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbfillarc.c\"" >> $@ + +cfbzerarcC.c: + echo "#define RROP GXcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbzerarc.c\"" >> $@ + +cfbzerarcX.c: + echo "#define RROP GXxor" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbzerarc.c\"" >> $@ + +cfbzerarcG.c: + echo "#define RROP GXset" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbzerarc.c\"" >> $@ + +cfbbltC.c: + echo "#define MROP Mcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbblt.c\"" >> $@ + +cfbbltX.c: + echo "#define MROP Mxor" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbblt.c\"" >> $@ + +cfbbltO.c: + echo "#define MROP Mor" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbblt.c\"" >> $@ + +cfbbltG.c: + echo "#define MROP 0" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbblt.c\"" >> $@ + +cfbsolidC.c: + echo "#define RROP GXcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbsolid.c\"" >> $@ + +cfbsolidX.c: + echo "#define RROP GXxor" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbsolid.c\"" >> $@ + +cfbsolidG.c: + echo "#define RROP GXset" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbsolid.c\"" >> $@ + +cfbtileoddC.c: + echo "#define MROP Mcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbtileodd.c\"" >> $@ + +cfbtileoddG.c: + echo "#define MROP 0" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbtileodd.c\"" >> $@ + +cfbtile32C.c: + echo "#define MROP Mcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbtile32.c\"" >> $@ + +cfbtile32G.c: + echo "#define MROP 0" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbtile32.c\"" >> $@ + +cfb8lineCO.c: + echo "#define RROP GXcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8lineCP.c: + echo "#define RROP GXcopy" > $@ + echo "#define PREVIOUS" >> $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8lineX.c: + echo "#define RROP GXxor" > $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8lineG.c: + echo "#define RROP GXset" > $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8segCS.c: + echo "#define RROP GXcopy" > $@ + echo "#define POLYSEGMENT" >> $@ + echo "#define WIDTH_SHIFT" >> $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8segC.c: + echo "#define RROP GXcopy" > $@ + echo "#define POLYSEGMENT" >> $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8segX.c: + echo "#define RROP GXxor" > $@ + echo "#define POLYSEGMENT" >> $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfb8setG.c: + echo "#define RROP GXset" > $@ + echo "#define POLYSEGMENT" >> $@ + echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@ + +cfbply1rctC.c: + echo "#define RROP GXcopy" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbply1rct.c\"" >> $@ + +cfbply1rctG.c: + echo "#define RROP GXset" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbply1rct.c\"" >> $@ + +cfbglrop8.c: + echo "#define GLYPHROP" > $@ + echo "#include \"$(top_srcdir)/cfb/cfbglblt8.c\"" >> $@ + +@XPRINT_TRUE@cfb8bit.o: compiler.h + +@XPRINT_TRUE@compiler.h: +@XPRINT_TRUE@ echo "#include \"$(top_srcdir)/hw/xfree86/common/compiler.h\"" >> $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/cfb32/cfb8lineCO.c b/xorg-server-1.4/cfb32/cfb8lineCO.c new file mode 100644 index 0000000..4c7b4ba --- /dev/null +++ b/xorg-server-1.4/cfb32/cfb8lineCO.c @@ -0,0 +1,2 @@ +#define RROP GXcopy +#include "../cfb/cfb8line.c" diff --git a/xorg-server-1.4/cfb32/cfb8lineCP.c b/xorg-server-1.4/cfb32/cfb8lineCP.c new file mode 100644 index 0000000..40f1ee8 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfb8lineCP.c @@ -0,0 +1,3 @@ +#define RROP GXcopy +#define PREVIOUS +#include "../cfb/cfb8line.c" diff --git a/xorg-server-1.4/cfb32/cfb8lineG.c b/xorg-server-1.4/cfb32/cfb8lineG.c new file mode 100644 index 0000000..4750247 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfb8lineG.c @@ -0,0 +1,2 @@ +#define RROP GXset +#include "../cfb/cfb8line.c" diff --git a/xorg-server-1.4/cfb32/cfb8lineX.c b/xorg-server-1.4/cfb32/cfb8lineX.c new file mode 100644 index 0000000..50188f0 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfb8lineX.c @@ -0,0 +1,2 @@ +#define RROP GXxor +#include "../cfb/cfb8line.c" diff --git a/xorg-server-1.4/cfb32/cfb8segC.c b/xorg-server-1.4/cfb32/cfb8segC.c new file mode 100644 index 0000000..0a2f191 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfb8segC.c @@ -0,0 +1,3 @@ +#define RROP GXcopy +#define POLYSEGMENT +#include "../cfb/cfb8line.c" diff --git a/xorg-server-1.4/cfb32/cfb8segCS.c b/xorg-server-1.4/cfb32/cfb8segCS.c new file mode 100644 index 0000000..89fbd96 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfb8segCS.c @@ -0,0 +1,4 @@ +#define RROP GXcopy +#define POLYSEGMENT +#define WIDTH_SHIFT +#include "../cfb/cfb8line.c" diff --git a/xorg-server-1.4/cfb32/cfb8segX.c b/xorg-server-1.4/cfb32/cfb8segX.c new file mode 100644 index 0000000..586e06e --- /dev/null +++ b/xorg-server-1.4/cfb32/cfb8segX.c @@ -0,0 +1,3 @@ +#define RROP GXxor +#define POLYSEGMENT +#include "../cfb/cfb8line.c" diff --git a/xorg-server-1.4/cfb32/cfb8setG.c b/xorg-server-1.4/cfb32/cfb8setG.c new file mode 100644 index 0000000..702a040 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfb8setG.c @@ -0,0 +1,3 @@ +#define RROP GXset +#define POLYSEGMENT +#include "../cfb/cfb8line.c" diff --git a/xorg-server-1.4/cfb32/cfbbltC.c b/xorg-server-1.4/cfb32/cfbbltC.c new file mode 100644 index 0000000..4e4a455 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbbltC.c @@ -0,0 +1,2 @@ +#define MROP Mcopy +#include "../cfb/cfbblt.c" diff --git a/xorg-server-1.4/cfb32/cfbbltG.c b/xorg-server-1.4/cfb32/cfbbltG.c new file mode 100644 index 0000000..3197835 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbbltG.c @@ -0,0 +1,2 @@ +#define MROP 0 +#include "../cfb/cfbblt.c" diff --git a/xorg-server-1.4/cfb32/cfbbltO.c b/xorg-server-1.4/cfb32/cfbbltO.c new file mode 100644 index 0000000..5ec60f6 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbbltO.c @@ -0,0 +1,2 @@ +#define MROP Mor +#include "../cfb/cfbblt.c" diff --git a/xorg-server-1.4/cfb32/cfbbltX.c b/xorg-server-1.4/cfb32/cfbbltX.c new file mode 100644 index 0000000..e7eee46 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbbltX.c @@ -0,0 +1,2 @@ +#define MROP Mxor +#include "../cfb/cfbblt.c" diff --git a/xorg-server-1.4/cfb32/cfbfillarcC.c b/xorg-server-1.4/cfb32/cfbfillarcC.c new file mode 100644 index 0000000..83f37db --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbfillarcC.c @@ -0,0 +1,2 @@ +#define RROP GXcopy +#include "../cfb/cfbfillarc.c" diff --git a/xorg-server-1.4/cfb32/cfbfillarcG.c b/xorg-server-1.4/cfb32/cfbfillarcG.c new file mode 100644 index 0000000..971e840 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbfillarcG.c @@ -0,0 +1,2 @@ +#define RROP GXset +#include "../cfb/cfbfillarc.c" diff --git a/xorg-server-1.4/cfb32/cfbply1rctC.c b/xorg-server-1.4/cfb32/cfbply1rctC.c new file mode 100644 index 0000000..6c2414d --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbply1rctC.c @@ -0,0 +1,2 @@ +#define RROP GXcopy +#include "../cfb/cfbply1rct.c" diff --git a/xorg-server-1.4/cfb32/cfbply1rctG.c b/xorg-server-1.4/cfb32/cfbply1rctG.c new file mode 100644 index 0000000..6d9be88 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbply1rctG.c @@ -0,0 +1,2 @@ +#define RROP GXset +#include "../cfb/cfbply1rct.c" diff --git a/xorg-server-1.4/cfb32/cfbseg.c b/xorg-server-1.4/cfb32/cfbseg.c new file mode 100644 index 0000000..4371721 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbseg.c @@ -0,0 +1,2 @@ +#define POLYSEGMENT +#include "../cfb/cfbline.c" diff --git a/xorg-server-1.4/cfb32/cfbsolidC.c b/xorg-server-1.4/cfb32/cfbsolidC.c new file mode 100644 index 0000000..afc758a --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbsolidC.c @@ -0,0 +1,2 @@ +#define RROP GXcopy +#include "../cfb/cfbsolid.c" diff --git a/xorg-server-1.4/cfb32/cfbsolidG.c b/xorg-server-1.4/cfb32/cfbsolidG.c new file mode 100644 index 0000000..491491c --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbsolidG.c @@ -0,0 +1,2 @@ +#define RROP GXset +#include "../cfb/cfbsolid.c" diff --git a/xorg-server-1.4/cfb32/cfbsolidX.c b/xorg-server-1.4/cfb32/cfbsolidX.c new file mode 100644 index 0000000..458c3a7 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbsolidX.c @@ -0,0 +1,2 @@ +#define RROP GXxor +#include "../cfb/cfbsolid.c" diff --git a/xorg-server-1.4/cfb32/cfbtile32C.c b/xorg-server-1.4/cfb32/cfbtile32C.c new file mode 100644 index 0000000..ee9360f --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbtile32C.c @@ -0,0 +1,2 @@ +#define MROP Mcopy +#include "../cfb/cfbtile32.c" diff --git a/xorg-server-1.4/cfb32/cfbtile32G.c b/xorg-server-1.4/cfb32/cfbtile32G.c new file mode 100644 index 0000000..40c32b7 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbtile32G.c @@ -0,0 +1,2 @@ +#define MROP 0 +#include "../cfb/cfbtile32.c" diff --git a/xorg-server-1.4/cfb32/cfbtileoddC.c b/xorg-server-1.4/cfb32/cfbtileoddC.c new file mode 100644 index 0000000..b1780fa --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbtileoddC.c @@ -0,0 +1,2 @@ +#define MROP Mcopy +#include "../cfb/cfbtileodd.c" diff --git a/xorg-server-1.4/cfb32/cfbtileoddG.c b/xorg-server-1.4/cfb32/cfbtileoddG.c new file mode 100644 index 0000000..93f14a4 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbtileoddG.c @@ -0,0 +1,2 @@ +#define MROP 0 +#include "../cfb/cfbtileodd.c" diff --git a/xorg-server-1.4/cfb32/cfbzerarcC.c b/xorg-server-1.4/cfb32/cfbzerarcC.c new file mode 100644 index 0000000..95a2aee --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbzerarcC.c @@ -0,0 +1,2 @@ +#define RROP GXcopy +#include "../cfb/cfbzerarc.c" diff --git a/xorg-server-1.4/cfb32/cfbzerarcG.c b/xorg-server-1.4/cfb32/cfbzerarcG.c new file mode 100644 index 0000000..fe0a056 --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbzerarcG.c @@ -0,0 +1,2 @@ +#define RROP GXset +#include "../cfb/cfbzerarc.c" diff --git a/xorg-server-1.4/cfb32/cfbzerarcX.c b/xorg-server-1.4/cfb32/cfbzerarcX.c new file mode 100644 index 0000000..27c61aa --- /dev/null +++ b/xorg-server-1.4/cfb32/cfbzerarcX.c @@ -0,0 +1,2 @@ +#define RROP GXxor +#include "../cfb/cfbzerarc.c" diff --git a/xorg-server-1.4/composite/Makefile.am b/xorg-server-1.4/composite/Makefile.am new file mode 100644 index 0000000..21504e6 --- /dev/null +++ b/xorg-server-1.4/composite/Makefile.am @@ -0,0 +1,10 @@ +noinst_LTLIBRARIES = libcomposite.la + +AM_CFLAGS = $(DIX_CFLAGS) + +libcomposite_la_SOURCES = \ + compalloc.c \ + compext.c \ + compint.h \ + compinit.c \ + compwindow.c diff --git a/xorg-server-1.4/composite/Makefile.in b/xorg-server-1.4/composite/Makefile.in new file mode 100644 index 0000000..855bc75 --- /dev/null +++ b/xorg-server-1.4/composite/Makefile.in @@ -0,0 +1,629 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = composite +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libcomposite_la_LIBADD = +am_libcomposite_la_OBJECTS = compalloc.lo compext.lo compinit.lo \ + compwindow.lo +libcomposite_la_OBJECTS = $(am_libcomposite_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libcomposite_la_SOURCES) +DIST_SOURCES = $(libcomposite_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libcomposite.la +AM_CFLAGS = $(DIX_CFLAGS) +libcomposite_la_SOURCES = \ + compalloc.c \ + compext.c \ + compint.h \ + compinit.c \ + compwindow.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign composite/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign composite/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libcomposite.la: $(libcomposite_la_OBJECTS) $(libcomposite_la_DEPENDENCIES) + $(LINK) $(libcomposite_la_OBJECTS) $(libcomposite_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compalloc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compinit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compwindow.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/composite/compalloc.c b/xorg-server-1.4/composite/compalloc.c new file mode 100644 index 0000000..006e808 --- /dev/null +++ b/xorg-server-1.4/composite/compalloc.c @@ -0,0 +1,630 @@ +/* + * Copyright © 2006 Sun Microsystems + * + * 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 Sun Microsystems not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Sun Microsystems makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL SUN MICROSYSTEMS 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 © 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_DIX_CONFIG_H +#include +#endif + +#include "compint.h" + +static void +compReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) +{ + WindowPtr pWin = (WindowPtr) closure; + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen (pScreen); + CompWindowPtr cw = GetCompWindow (pWin); + + cs->damaged = TRUE; + cw->damaged = TRUE; +} + +static void +compDestroyDamage (DamagePtr pDamage, void *closure) +{ + WindowPtr pWin = (WindowPtr) closure; + CompWindowPtr cw = GetCompWindow (pWin); + + cw->damage = 0; +} + +/* + * Redirect one window for one client + */ +int +compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update) +{ + CompWindowPtr cw = GetCompWindow (pWin); + CompClientWindowPtr ccw; + Bool wasMapped = pWin->mapped; + CompScreenPtr cs = GetCompScreen(pWin->drawable.pScreen); + + if (pWin == cs->pOverlayWin) { + return Success; + } + + /* + * Only one Manual update is allowed + */ + if (cw && update == CompositeRedirectManual) + for (ccw = cw->clients; ccw; ccw = ccw->next) + if (ccw->update == CompositeRedirectManual) + return BadAccess; + + /* + * Allocate per-client per-window structure + * The client *could* allocate multiple, but while supported, + * it is not expected to be common + */ + ccw = xalloc (sizeof (CompClientWindowRec)); + if (!ccw) + return BadAlloc; + ccw->id = FakeClientID (pClient->index); + ccw->update = update; + /* + * Now make sure there's a per-window structure to hang this from + */ + if (!cw) + { + cw = xalloc (sizeof (CompWindowRec)); + if (!cw) + { + xfree (ccw); + return BadAlloc; + } + cw->damage = DamageCreate (compReportDamage, + compDestroyDamage, + DamageReportNonEmpty, + FALSE, + pWin->drawable.pScreen, + pWin); + if (!cw->damage) + { + xfree (ccw); + xfree (cw); + return BadAlloc; + } + if (wasMapped) + { + DisableMapUnmapEvents (pWin); + UnmapWindow (pWin, FALSE); + EnableMapUnmapEvents (pWin); + } + + REGION_NULL (pScreen, &cw->borderClip); + cw->update = CompositeRedirectAutomatic; + cw->clients = 0; + cw->oldx = COMP_ORIGIN_INVALID; + cw->oldy = COMP_ORIGIN_INVALID; + cw->damageRegistered = FALSE; + cw->damaged = FALSE; + pWin->devPrivates[CompWindowPrivateIndex].ptr = cw; + } + ccw->next = cw->clients; + cw->clients = ccw; + if (!AddResource (ccw->id, CompositeClientWindowType, pWin)) + return BadAlloc; + if (ccw->update == CompositeRedirectManual) + { + if (cw->damageRegistered) + { + DamageUnregister (&pWin->drawable, cw->damage); + cw->damageRegistered = FALSE; + } + cw->update = CompositeRedirectManual; + } + + if (!compCheckRedirect (pWin)) + { + FreeResource (ccw->id, RT_NONE); + return BadAlloc; + } + if (wasMapped && !pWin->mapped) + { + Bool overrideRedirect = pWin->overrideRedirect; + pWin->overrideRedirect = TRUE; + DisableMapUnmapEvents (pWin); + MapWindow (pWin, pClient); + EnableMapUnmapEvents (pWin); + pWin->overrideRedirect = overrideRedirect; + } + + return Success; +} + +/* + * Free one of the per-client per-window resources, clearing + * redirect and the per-window pointer as appropriate + */ +void +compFreeClientWindow (WindowPtr pWin, XID id) +{ + CompWindowPtr cw = GetCompWindow (pWin); + CompClientWindowPtr ccw, *prev; + Bool wasMapped = pWin->mapped; + + if (!cw) + return; + for (prev = &cw->clients; (ccw = *prev); prev = &ccw->next) + { + if (ccw->id == id) + { + *prev = ccw->next; + if (ccw->update == CompositeRedirectManual) + cw->update = CompositeRedirectAutomatic; + xfree (ccw); + break; + } + } + if (!cw->clients) + { + if (wasMapped) + { + DisableMapUnmapEvents (pWin); + UnmapWindow (pWin, FALSE); + EnableMapUnmapEvents (pWin); + } + + if (pWin->redirectDraw != RedirectDrawNone) + compFreePixmap (pWin); + + if (cw->damage) + DamageDestroy (cw->damage); + + REGION_UNINIT (pScreen, &cw->borderClip); + + pWin->devPrivates[CompWindowPrivateIndex].ptr = 0; + xfree (cw); + } + else if (cw->update == CompositeRedirectAutomatic && + !cw->damageRegistered && pWin->redirectDraw != RedirectDrawNone) + { + DamageRegister (&pWin->drawable, cw->damage); + cw->damageRegistered = TRUE; + pWin->redirectDraw = RedirectDrawAutomatic; + DamageDamageRegion (&pWin->drawable, &pWin->borderSize); + } + if (wasMapped && !pWin->mapped) + { + Bool overrideRedirect = pWin->overrideRedirect; + pWin->overrideRedirect = TRUE; + DisableMapUnmapEvents (pWin); + MapWindow (pWin, clients[CLIENT_ID(id)]); + EnableMapUnmapEvents (pWin); + pWin->overrideRedirect = overrideRedirect; + } +} + +/* + * This is easy, just free the appropriate resource. + */ + +int +compUnredirectWindow (ClientPtr pClient, WindowPtr pWin, int update) +{ + CompWindowPtr cw = GetCompWindow (pWin); + CompClientWindowPtr ccw; + + if (!cw) + return BadValue; + + for (ccw = cw->clients; ccw; ccw = ccw->next) + if (ccw->update == update && CLIENT_ID(ccw->id) == pClient->index) + { + FreeResource (ccw->id, RT_NONE); + return Success; + } + return BadValue; +} + +/* + * Redirect all subwindows for one client + */ + +int +compRedirectSubwindows (ClientPtr pClient, WindowPtr pWin, int update) +{ + CompSubwindowsPtr csw = GetCompSubwindows (pWin); + CompClientWindowPtr ccw; + WindowPtr pChild; + + /* + * Only one Manual update is allowed + */ + if (csw && update == CompositeRedirectManual) + for (ccw = csw->clients; ccw; ccw = ccw->next) + if (ccw->update == CompositeRedirectManual) + return BadAccess; + /* + * Allocate per-client per-window structure + * The client *could* allocate multiple, but while supported, + * it is not expected to be common + */ + ccw = xalloc (sizeof (CompClientWindowRec)); + if (!ccw) + return BadAlloc; + ccw->id = FakeClientID (pClient->index); + ccw->update = update; + /* + * Now make sure there's a per-window structure to hang this from + */ + if (!csw) + { + csw = xalloc (sizeof (CompSubwindowsRec)); + if (!csw) + { + xfree (ccw); + return BadAlloc; + } + csw->update = CompositeRedirectAutomatic; + csw->clients = 0; + pWin->devPrivates[CompSubwindowsPrivateIndex].ptr = csw; + } + /* + * Redirect all existing windows + */ + for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib) + { + int ret = compRedirectWindow (pClient, pChild, update); + if (ret != Success) + { + for (pChild = pChild->nextSib; pChild; pChild = pChild->nextSib) + (void) compUnredirectWindow (pClient, pChild, update); + if (!csw->clients) + { + xfree (csw); + pWin->devPrivates[CompSubwindowsPrivateIndex].ptr = 0; + } + xfree (ccw); + return ret; + } + } + /* + * Hook into subwindows list + */ + ccw->next = csw->clients; + csw->clients = ccw; + if (!AddResource (ccw->id, CompositeClientSubwindowsType, pWin)) + return BadAlloc; + if (ccw->update == CompositeRedirectManual) + { + csw->update = CompositeRedirectManual; + /* + * tell damage extension that damage events for this client are + * critical output + */ + DamageExtSetCritical (pClient, TRUE); + } + return Success; +} + +/* + * Free one of the per-client per-subwindows resources, + * which frees one redirect per subwindow + */ +void +compFreeClientSubwindows (WindowPtr pWin, XID id) +{ + CompSubwindowsPtr csw = GetCompSubwindows (pWin); + CompClientWindowPtr ccw, *prev; + WindowPtr pChild; + + if (!csw) + return; + for (prev = &csw->clients; (ccw = *prev); prev = &ccw->next) + { + if (ccw->id == id) + { + ClientPtr pClient = clients[CLIENT_ID(id)]; + + *prev = ccw->next; + if (ccw->update == CompositeRedirectManual) + { + /* + * tell damage extension that damage events for this client are + * critical output + */ + DamageExtSetCritical (pClient, FALSE); + csw->update = CompositeRedirectAutomatic; + if (pWin->mapped) + (*pWin->drawable.pScreen->ClearToBackground)(pWin, 0, 0, 0, 0, TRUE); + } + + /* + * Unredirect all existing subwindows + */ + for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib) + (void) compUnredirectWindow (pClient, pChild, ccw->update); + + xfree (ccw); + break; + } + } + + /* + * Check if all of the per-client records are gone + */ + if (!csw->clients) + { + pWin->devPrivates[CompSubwindowsPrivateIndex].ptr = 0; + xfree (csw); + } +} + +/* + * This is easy, just free the appropriate resource. + */ + +int +compUnredirectSubwindows (ClientPtr pClient, WindowPtr pWin, int update) +{ + CompSubwindowsPtr csw = GetCompSubwindows (pWin); + CompClientWindowPtr ccw; + + if (!csw) + return BadValue; + for (ccw = csw->clients; ccw; ccw = ccw->next) + if (ccw->update == update && CLIENT_ID(ccw->id) == pClient->index) + { + FreeResource (ccw->id, RT_NONE); + return Success; + } + return BadValue; +} + +/* + * Add redirection information for one subwindow (during reparent) + */ + +int +compRedirectOneSubwindow (WindowPtr pParent, WindowPtr pWin) +{ + CompSubwindowsPtr csw = GetCompSubwindows (pParent); + CompClientWindowPtr ccw; + + if (!csw) + return Success; + for (ccw = csw->clients; ccw; ccw = ccw->next) + { + int ret = compRedirectWindow (clients[CLIENT_ID(ccw->id)], + pWin, ccw->update); + if (ret != Success) + return ret; + } + return Success; +} + +/* + * Remove redirection information for one subwindow (during reparent) + */ + +int +compUnredirectOneSubwindow (WindowPtr pParent, WindowPtr pWin) +{ + CompSubwindowsPtr csw = GetCompSubwindows (pParent); + CompClientWindowPtr ccw; + + if (!csw) + return Success; + for (ccw = csw->clients; ccw; ccw = ccw->next) + { + int ret = compUnredirectWindow (clients[CLIENT_ID(ccw->id)], + pWin, ccw->update); + if (ret != Success) + return ret; + } + return Success; +} + +static PixmapPtr +compNewPixmap (WindowPtr pWin, int x, int y, int w, int h) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + WindowPtr pParent = pWin->parent; + PixmapPtr pPixmap; + + pPixmap = (*pScreen->CreatePixmap) (pScreen, w, h, pWin->drawable.depth); + + if (!pPixmap) + return 0; + + pPixmap->screen_x = x; + pPixmap->screen_y = y; + + if (pParent->drawable.depth == pWin->drawable.depth) + { + GCPtr pGC = GetScratchGC (pWin->drawable.depth, pScreen); + + /* + * Copy bits from the parent into the new pixmap so that it will + * have "reasonable" contents in case for background None areas. + */ + if (pGC) + { + XID val = IncludeInferiors; + + ValidateGC(&pPixmap->drawable, pGC); + dixChangeGC (serverClient, pGC, GCSubwindowMode, &val, NULL); + (*pGC->ops->CopyArea) (&pParent->drawable, + &pPixmap->drawable, + pGC, + x - pParent->drawable.x, + y - pParent->drawable.y, + w, h, 0, 0); + FreeScratchGC (pGC); + } + } + else + { + PictFormatPtr pSrcFormat = compWindowFormat (pParent); + PictFormatPtr pDstFormat = compWindowFormat (pWin); + XID inferiors = IncludeInferiors; + int error; + + PicturePtr pSrcPicture = CreatePicture (None, + &pParent->drawable, + pSrcFormat, + CPSubwindowMode, + &inferiors, + serverClient, &error); + + PicturePtr pDstPicture = CreatePicture (None, + &pPixmap->drawable, + pDstFormat, + 0, 0, + serverClient, &error); + + if (pSrcPicture && pDstPicture) + { + CompositePicture (PictOpSrc, + pSrcPicture, + NULL, + pDstPicture, + x - pParent->drawable.x, + y - pParent->drawable.y, + 0, 0, 0, 0, w, h); + } + if (pSrcPicture) + FreePicture (pSrcPicture, 0); + if (pDstPicture) + FreePicture (pDstPicture, 0); + } + return pPixmap; +} + +Bool +compAllocPixmap (WindowPtr pWin) +{ + int bw = (int) pWin->borderWidth; + int x = pWin->drawable.x - bw; + int y = pWin->drawable.y - bw; + int w = pWin->drawable.width + (bw << 1); + int h = pWin->drawable.height + (bw << 1); + PixmapPtr pPixmap = compNewPixmap (pWin, x, y, w, h); + CompWindowPtr cw = GetCompWindow (pWin); + + if (!pPixmap) + return FALSE; + if (cw->update == CompositeRedirectAutomatic) + pWin->redirectDraw = RedirectDrawAutomatic; + else + pWin->redirectDraw = RedirectDrawManual; + + compSetPixmap (pWin, pPixmap); + cw->oldx = COMP_ORIGIN_INVALID; + cw->oldy = COMP_ORIGIN_INVALID; + cw->damageRegistered = FALSE; + if (cw->update == CompositeRedirectAutomatic) + { + DamageRegister (&pWin->drawable, cw->damage); + cw->damageRegistered = TRUE; + } + return TRUE; +} + +void +compFreePixmap (WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + PixmapPtr pRedirectPixmap, pParentPixmap; + CompWindowPtr cw = GetCompWindow (pWin); + + if (cw->damageRegistered) + { + DamageUnregister (&pWin->drawable, cw->damage); + cw->damageRegistered = FALSE; + DamageEmpty (cw->damage); + } + /* + * Move the parent-constrained border clip region back into + * the window so that ValidateTree will handle the unmap + * case correctly. Unmap adds the window borderClip to the + * parent exposed area; regions beyond the parent cause crashes + */ + REGION_COPY (pScreen, &pWin->borderClip, &cw->borderClip); + pRedirectPixmap = (*pScreen->GetWindowPixmap) (pWin); + pParentPixmap = (*pScreen->GetWindowPixmap) (pWin->parent); + pWin->redirectDraw = RedirectDrawNone; + compSetPixmap (pWin, pParentPixmap); + (*pScreen->DestroyPixmap) (pRedirectPixmap); +} + +/* + * Make sure the pixmap is the right size and offset. Allocate a new + * pixmap to change size, adjust origin to change offset, leaving the + * old pixmap in cw->pOldPixmap so bits can be recovered + */ +Bool +compReallocPixmap (WindowPtr pWin, int draw_x, int draw_y, + unsigned int w, unsigned int h, int bw) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + PixmapPtr pOld = (*pScreen->GetWindowPixmap) (pWin); + PixmapPtr pNew; + CompWindowPtr cw = GetCompWindow (pWin); + int pix_x, pix_y; + int pix_w, pix_h; + + assert (cw && pWin->redirectDraw != RedirectDrawNone); + cw->oldx = pOld->screen_x; + cw->oldy = pOld->screen_y; + pix_x = draw_x - bw; + pix_y = draw_y - bw; + pix_w = w + (bw << 1); + pix_h = h + (bw << 1); + if (pix_w != pOld->drawable.width || pix_h != pOld->drawable.height) + { + pNew = compNewPixmap (pWin, pix_x, pix_y, pix_w, pix_h); + if (!pNew) + return FALSE; + cw->pOldPixmap = pOld; + compSetPixmap (pWin, pNew); + } + else + { + pNew = pOld; + cw->pOldPixmap = 0; + } + pNew->screen_x = pix_x; + pNew->screen_y = pix_y; + return TRUE; +} diff --git a/xorg-server-1.4/composite/compext.c b/xorg-server-1.4/composite/compext.c new file mode 100644 index 0000000..944f8d8 --- /dev/null +++ b/xorg-server-1.4/composite/compext.c @@ -0,0 +1,734 @@ +/* + * Copyright © 2006 Sun Microsystems + * + * 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 Sun Microsystems not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Sun Microsystems makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL SUN MICROSYSTEMS 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 © 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_DIX_CONFIG_H +#include +#endif + +#include "compint.h" + +#define SERVER_COMPOSITE_MAJOR 0 +#define SERVER_COMPOSITE_MINOR 4 + +static CARD8 CompositeReqCode; +static int CompositeClientPrivateIndex; +RESTYPE CompositeClientWindowType; +RESTYPE CompositeClientSubwindowsType; +static RESTYPE CompositeClientOverlayType; + +static void deleteCompOverlayClient (CompOverlayClientPtr pOcToDel, + ScreenPtr pScreen); + +typedef struct _CompositeClient { + int major_version; + int minor_version; +} CompositeClientRec, *CompositeClientPtr; + +#define GetCompositeClient(pClient) ((CompositeClientPtr) (pClient)->devPrivates[CompositeClientPrivateIndex].ptr) + +static void +CompositeClientCallback (CallbackListPtr *list, + pointer closure, + pointer data) +{ + NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; + ClientPtr pClient = clientinfo->client; + CompositeClientPtr pCompositeClient = GetCompositeClient (pClient); + + pCompositeClient->major_version = 0; + pCompositeClient->minor_version = 0; +} + +static void +CompositeResetProc (ExtensionEntry *extEntry) +{ +} + +static int +FreeCompositeClientWindow (pointer value, XID ccwid) +{ + WindowPtr pWin = value; + + compFreeClientWindow (pWin, ccwid); + return Success; +} + +static int +FreeCompositeClientSubwindows (pointer value, XID ccwid) +{ + WindowPtr pWin = value; + + compFreeClientSubwindows (pWin, ccwid); + return Success; +} + +static int +FreeCompositeClientOverlay (pointer value, XID ccwid) +{ + CompOverlayClientPtr pOc = (CompOverlayClientPtr) value; + ScreenPtr pScreen = pOc->pScreen; + CompScreenPtr cs; + + deleteCompOverlayClient(pOc, pScreen); + + /* Unmap overlay window when there are no more clients using it */ + cs = GetCompScreen(pScreen); + if (cs->pOverlayClients == NULL) { + if (cs->pOverlayWin != NULL) { + UnmapWindow(cs->pOverlayWin, FALSE); + } + } + + return Success; +} + +static int +ProcCompositeQueryVersion (ClientPtr client) +{ + CompositeClientPtr pCompositeClient = GetCompositeClient (client); + xCompositeQueryVersionReply rep; + register int n; + REQUEST(xCompositeQueryVersionReq); + + REQUEST_SIZE_MATCH(xCompositeQueryVersionReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + if (stuff->majorVersion < SERVER_COMPOSITE_MAJOR) { + rep.majorVersion = stuff->majorVersion; + rep.minorVersion = stuff->minorVersion; + } else { + rep.majorVersion = SERVER_COMPOSITE_MAJOR; + rep.minorVersion = SERVER_COMPOSITE_MINOR; + } + pCompositeClient->major_version = rep.majorVersion; + pCompositeClient->minor_version = rep.minorVersion; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swapl(&rep.majorVersion, n); + swapl(&rep.minorVersion, n); + } + WriteToClient(client, sizeof(xCompositeQueryVersionReply), (char *)&rep); + return(client->noClientException); +} + +static int +ProcCompositeRedirectWindow (ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xCompositeRedirectWindowReq); + + REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq); + pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); + if (!pWin) + { + client->errorValue = stuff->window; + return BadWindow; + } + return compRedirectWindow (client, pWin, stuff->update); +} + +static int +ProcCompositeRedirectSubwindows (ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xCompositeRedirectSubwindowsReq); + + REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq); + pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); + if (!pWin) + { + client->errorValue = stuff->window; + return BadWindow; + } + return compRedirectSubwindows (client, pWin, stuff->update); +} + +static int +ProcCompositeUnredirectWindow (ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xCompositeUnredirectWindowReq); + + REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq); + pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); + if (!pWin) + { + client->errorValue = stuff->window; + return BadWindow; + } + return compUnredirectWindow (client, pWin, stuff->update); +} + +static int +ProcCompositeUnredirectSubwindows (ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xCompositeUnredirectSubwindowsReq); + + REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq); + pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); + if (!pWin) + { + client->errorValue = stuff->window; + return BadWindow; + } + return compUnredirectSubwindows (client, pWin, stuff->update); +} + +static int +ProcCompositeCreateRegionFromBorderClip (ClientPtr client) +{ + WindowPtr pWin; + CompWindowPtr cw; + RegionPtr pBorderClip, pRegion; + REQUEST(xCompositeCreateRegionFromBorderClipReq); + + REQUEST_SIZE_MATCH(xCompositeCreateRegionFromBorderClipReq); + pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); + if (!pWin) + { + client->errorValue = stuff->window; + return BadWindow; + } + + LEGAL_NEW_RESOURCE (stuff->region, client); + + cw = GetCompWindow (pWin); + if (cw) + pBorderClip = &cw->borderClip; + else + pBorderClip = &pWin->borderClip; + pRegion = XFixesRegionCopy (pBorderClip); + if (!pRegion) + return BadAlloc; + REGION_TRANSLATE (pScreen, pRegion, -pWin->drawable.x, -pWin->drawable.y); + + if (!AddResource (stuff->region, RegionResType, (pointer) pRegion)) + return BadAlloc; + + return(client->noClientException); +} + +static int +ProcCompositeNameWindowPixmap (ClientPtr client) +{ + WindowPtr pWin; + CompWindowPtr cw; + PixmapPtr pPixmap; + REQUEST(xCompositeNameWindowPixmapReq); + + REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq); + pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); + if (!pWin) + { + client->errorValue = stuff->window; + return BadWindow; + } + + if (!pWin->viewable) + return BadMatch; + + LEGAL_NEW_RESOURCE (stuff->pixmap, client); + + cw = GetCompWindow (pWin); + if (!cw) + return BadMatch; + + pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin); + if (!pPixmap) + return BadMatch; + + ++pPixmap->refcnt; + + if (!AddResource (stuff->pixmap, RT_PIXMAP, (pointer) pPixmap)) + return BadAlloc; + + return(client->noClientException); +} + + +/* + * Routines for manipulating the per-screen overlay clients list. + * This list indicates which clients have called GetOverlayWindow + * for this screen. + */ + +/* Return the screen's overlay client list element for the given client */ +static CompOverlayClientPtr +findCompOverlayClient (ClientPtr pClient, ScreenPtr pScreen) +{ + CompScreenPtr cs = GetCompScreen(pScreen); + CompOverlayClientPtr pOc; + + for (pOc = cs->pOverlayClients; pOc != NULL; pOc = pOc->pNext) { + if (pOc->pClient == pClient) { + return pOc; + } + } + + return NULL; +} + +static int +createCompOverlayClient (ClientPtr pClient, ScreenPtr pScreen) +{ + CompScreenPtr cs = GetCompScreen(pScreen); + CompOverlayClientPtr pOc; + + pOc = (CompOverlayClientPtr) xalloc(sizeof(CompOverlayClientRec)); + if (pOc == NULL) { + return BadAlloc; + } + pOc->pClient = pClient; + pOc->pScreen = pScreen; + pOc->resource = FakeClientID(pClient->index); + pOc->pNext = cs->pOverlayClients; + cs->pOverlayClients = pOc; + + /* + * Create a resource for this element so it can be deleted + * when the client goes away. + */ + if (!AddResource (pOc->resource, CompositeClientOverlayType, + (pointer) pOc)) { + xfree(pOc); + return BadAlloc; + } + + return Success; +} + +/* + * Delete the given overlay client list element from its screen list. + */ +static void +deleteCompOverlayClient (CompOverlayClientPtr pOcToDel, ScreenPtr pScreen) +{ + CompScreenPtr cs = GetCompScreen(pScreen); + CompOverlayClientPtr pOc, pNext; + CompOverlayClientPtr pOcLast = NULL; + + pOc = cs->pOverlayClients; + while (pOc != NULL) { + pNext = pOc->pNext; + if (pOc == pOcToDel) { + xfree(pOc); + if (pOcLast == NULL) { + cs->pOverlayClients = pNext; + } else { + pOcLast->pNext = pNext; + } + break; + } + pOcLast = pOc; + pOc = pNext; + } +} + +/* + * Delete all the hide-counts list elements for this screen. + */ +void +deleteCompOverlayClientsForScreen (ScreenPtr pScreen) +{ + CompScreenPtr cs = GetCompScreen(pScreen); + CompOverlayClientPtr pOc, pTmp; + + pOc = cs->pOverlayClients; + while (pOc != NULL) { + pTmp = pOc->pNext; + FreeResource(pOc->resource, 0); + pOc = pTmp; + } + cs->pOverlayClients = NULL; +} + +/* +** If necessary, create the overlay window. And map it +** Note: I found it excessively difficult to destroy this window +** during compCloseScreen; DeleteWindow can't be called because +** the input devices are already shut down. So we are going to +** just allocate an overlay window once per screen per X server +** invocation. +*/ + +static WindowPtr +createOverlayWindow (ScreenPtr pScreen) +{ + int wid = FakeClientID(0); + WindowPtr pWin; + XID overrideRedirect = TRUE; + int result; + + pWin = CreateWindow ( + wid, WindowTable[pScreen->myNum], + 0, 0, pScreen->width, pScreen->height, 0, + InputOutput, CWOverrideRedirect, &overrideRedirect, + WindowTable[pScreen->myNum]->drawable.depth, + serverClient, pScreen->rootVisual, &result); + if (pWin == NULL) { + return NULL; + } + + if (!AddResource(wid, RT_WINDOW, (pointer)pWin)) { + DeleteWindow(pWin, None); + return NULL; + } + + return pWin; +} + +static int +ProcCompositeGetOverlayWindow (ClientPtr client) +{ + REQUEST(xCompositeGetOverlayWindowReq); + xCompositeGetOverlayWindowReply rep; + WindowPtr pWin; + ScreenPtr pScreen; + CompScreenPtr cs; + CompOverlayClientPtr pOc; + + REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq); + pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); + if (!pWin) + { + client->errorValue = stuff->window; + return BadWindow; + } + pScreen = pWin->drawable.pScreen; + + cs = GetCompScreen(pScreen); + if (cs->pOverlayWin == NULL) { + cs->pOverlayWin = createOverlayWindow(pScreen); + if (cs->pOverlayWin == NULL) { + return BadAlloc; + } + } + MapWindow(cs->pOverlayWin, serverClient); + + /* Record that client is using this overlay window */ + pOc = findCompOverlayClient(client, pScreen); + if (pOc == NULL) { + int ret = createCompOverlayClient(client, pScreen); + if (ret != Success) { + return ret; + } + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + rep.overlayWin = cs->pOverlayWin->drawable.id; + + if (client->swapped) + { + int n; + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swapl(&rep.overlayWin, n); + } + (void) WriteToClient(client, sz_xCompositeGetOverlayWindowReply, (char *)&rep); + + return client->noClientException; +} + +static int +ProcCompositeReleaseOverlayWindow (ClientPtr client) +{ + REQUEST(xCompositeReleaseOverlayWindowReq); + WindowPtr pWin; + ScreenPtr pScreen; + CompOverlayClientPtr pOc; + CompScreenPtr cs; + + REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq); + pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); + if (!pWin) + { + client->errorValue = stuff->window; + return BadWindow; + } + pScreen = pWin->drawable.pScreen; + + /* + * Has client queried a reference to the overlay window + * on this screen? If not, generate an error. + */ + pOc = findCompOverlayClient(client, pWin->drawable.pScreen); + if (pOc == NULL) { + return BadMatch; + } + + /* The delete function will free the client structure */ + FreeResource (pOc->resource, 0); + + cs = GetCompScreen(pScreen); + if (cs->pOverlayClients == NULL) { + UnmapWindow(cs->pOverlayWin, FALSE); + } + + return client->noClientException; +} + +static int (*ProcCompositeVector[CompositeNumberRequests])(ClientPtr) = { + ProcCompositeQueryVersion, + ProcCompositeRedirectWindow, + ProcCompositeRedirectSubwindows, + ProcCompositeUnredirectWindow, + ProcCompositeUnredirectSubwindows, + ProcCompositeCreateRegionFromBorderClip, + ProcCompositeNameWindowPixmap, + ProcCompositeGetOverlayWindow, + ProcCompositeReleaseOverlayWindow, +}; + +static int +ProcCompositeDispatch (ClientPtr client) +{ + REQUEST(xReq); + + if (stuff->data < CompositeNumberRequests) + return (*ProcCompositeVector[stuff->data]) (client); + else + return BadRequest; +} + +static int +SProcCompositeQueryVersion (ClientPtr client) +{ + int n; + REQUEST(xCompositeQueryVersionReq); + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xCompositeQueryVersionReq); + swapl(&stuff->majorVersion, n); + swapl(&stuff->minorVersion, n); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int +SProcCompositeRedirectWindow (ClientPtr client) +{ + int n; + REQUEST(xCompositeRedirectWindowReq); + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq); + swapl (&stuff->window, n); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int +SProcCompositeRedirectSubwindows (ClientPtr client) +{ + int n; + REQUEST(xCompositeRedirectSubwindowsReq); + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq); + swapl (&stuff->window, n); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int +SProcCompositeUnredirectWindow (ClientPtr client) +{ + int n; + REQUEST(xCompositeUnredirectWindowReq); + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq); + swapl (&stuff->window, n); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int +SProcCompositeUnredirectSubwindows (ClientPtr client) +{ + int n; + REQUEST(xCompositeUnredirectSubwindowsReq); + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq); + swapl (&stuff->window, n); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int +SProcCompositeCreateRegionFromBorderClip (ClientPtr client) +{ + int n; + REQUEST(xCompositeCreateRegionFromBorderClipReq); + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xCompositeCreateRegionFromBorderClipReq); + swapl (&stuff->region, n); + swapl (&stuff->window, n); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int +SProcCompositeNameWindowPixmap (ClientPtr client) +{ + int n; + REQUEST(xCompositeNameWindowPixmapReq); + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq); + swapl (&stuff->window, n); + swapl (&stuff->pixmap, n); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int +SProcCompositeGetOverlayWindow (ClientPtr client) +{ + int n; + REQUEST(xCompositeGetOverlayWindowReq); + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq); + swapl(&stuff->window, n); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int +SProcCompositeReleaseOverlayWindow (ClientPtr client) +{ + int n; + REQUEST(xCompositeReleaseOverlayWindowReq); + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq); + swapl(&stuff->window, n); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int (*SProcCompositeVector[CompositeNumberRequests])(ClientPtr) = { + SProcCompositeQueryVersion, + SProcCompositeRedirectWindow, + SProcCompositeRedirectSubwindows, + SProcCompositeUnredirectWindow, + SProcCompositeUnredirectSubwindows, + SProcCompositeCreateRegionFromBorderClip, + SProcCompositeNameWindowPixmap, + SProcCompositeGetOverlayWindow, + SProcCompositeReleaseOverlayWindow, +}; + +static int +SProcCompositeDispatch (ClientPtr client) +{ + REQUEST(xReq); + + if (stuff->data < CompositeNumberRequests) + return (*SProcCompositeVector[stuff->data]) (client); + else + return BadRequest; +} + +void +CompositeExtensionInit (void) +{ + ExtensionEntry *extEntry; + int s; + + for (s = 0; s < screenInfo.numScreens; s++) { + ScreenPtr pScreen = screenInfo.screens[s]; + VisualPtr vis; + + /* Composite on 8bpp pseudocolor root windows appears to fail, so + * just disable it on anything pseudocolor for safety. + */ + for (vis = pScreen->visuals; vis->vid != pScreen->rootVisual; vis++) + ; + if ((vis->class | DynamicClass) == PseudoColor) + return; + + /* Ensure that Render is initialized, which is required for automatic + * compositing. + */ + if (GetPictureScreenIfSet(pScreen) == NULL) + return; + } +#ifdef PANORAMIX + /* Xinerama's rewriting of window drawing before Composite gets to it + * breaks Composite. + */ + if (!noPanoramiXExtension) + return; +#endif + + CompositeClientWindowType = CreateNewResourceType (FreeCompositeClientWindow); + if (!CompositeClientWindowType) + return; + + CompositeClientSubwindowsType = CreateNewResourceType (FreeCompositeClientSubwindows); + if (!CompositeClientSubwindowsType) + return; + + CompositeClientOverlayType = CreateNewResourceType (FreeCompositeClientOverlay); + if (!CompositeClientOverlayType) + return; + + CompositeClientPrivateIndex = AllocateClientPrivateIndex (); + if (!AllocateClientPrivate (CompositeClientPrivateIndex, + sizeof (CompositeClientRec))) + return; + if (!AddCallback (&ClientStateCallback, CompositeClientCallback, 0)) + return; + + extEntry = AddExtension (COMPOSITE_NAME, 0, 0, + ProcCompositeDispatch, SProcCompositeDispatch, + CompositeResetProc, StandardMinorOpcode); + if (!extEntry) + return; + CompositeReqCode = (CARD8) extEntry->base; + + for (s = 0; s < screenInfo.numScreens; s++) + if (!compScreenInit (screenInfo.screens[s])) + return; + miRegisterRedirectBorderClipProc (compSetRedirectBorderClip, + compGetRedirectBorderClip); +} diff --git a/xorg-server-1.4/composite/compinit.c b/xorg-server-1.4/composite/compinit.c new file mode 100644 index 0000000..630f104 --- /dev/null +++ b/xorg-server-1.4/composite/compinit.c @@ -0,0 +1,438 @@ +/* + * Copyright © 2006 Sun Microsystems + * + * 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 Sun Microsystems not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Sun Microsystems makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL SUN MICROSYSTEMS 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 © 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_DIX_CONFIG_H +#include +#endif + +#include "compint.h" + +int CompScreenPrivateIndex; +int CompWindowPrivateIndex; +int CompSubwindowsPrivateIndex; +static int CompGeneration; + + +static Bool +compCloseScreen (int index, ScreenPtr pScreen) +{ + CompScreenPtr cs = GetCompScreen (pScreen); + Bool ret; + + xfree (cs->alternateVisuals); + + pScreen->CloseScreen = cs->CloseScreen; + pScreen->BlockHandler = cs->BlockHandler; + pScreen->InstallColormap = cs->InstallColormap; + pScreen->ReparentWindow = cs->ReparentWindow; + pScreen->MoveWindow = cs->MoveWindow; + pScreen->ResizeWindow = cs->ResizeWindow; + pScreen->ChangeBorderWidth = cs->ChangeBorderWidth; + + pScreen->ClipNotify = cs->ClipNotify; + pScreen->PaintWindowBackground = cs->PaintWindowBackground; + pScreen->UnrealizeWindow = cs->UnrealizeWindow; + pScreen->RealizeWindow = cs->RealizeWindow; + pScreen->DestroyWindow = cs->DestroyWindow; + pScreen->CreateWindow = cs->CreateWindow; + pScreen->CopyWindow = cs->CopyWindow; + pScreen->PositionWindow = cs->PositionWindow; + + deleteCompOverlayClientsForScreen(pScreen); + + /* + ** Note: no need to call DeleteWindow; the server has + ** already destroyed it. + */ + cs->pOverlayWin = NULL; + + xfree (cs); + pScreen->devPrivates[CompScreenPrivateIndex].ptr = 0; + ret = (*pScreen->CloseScreen) (index, pScreen); + + return ret; +} + +static void +compInstallColormap (ColormapPtr pColormap) +{ + VisualPtr pVisual = pColormap->pVisual; + ScreenPtr pScreen = pColormap->pScreen; + CompScreenPtr cs = GetCompScreen (pScreen); + int a; + + for (a = 0; a < cs->numAlternateVisuals; a++) + if (pVisual->vid == cs->alternateVisuals[a]) + return; + pScreen->InstallColormap = cs->InstallColormap; + (*pScreen->InstallColormap) (pColormap); + cs->InstallColormap = pScreen->InstallColormap; + pScreen->InstallColormap = compInstallColormap; +} + +static void +compScreenUpdate (ScreenPtr pScreen) +{ + CompScreenPtr cs = GetCompScreen (pScreen); + + compCheckTree (pScreen); + if (cs->damaged) + { + compWindowUpdate (WindowTable[pScreen->myNum]); + cs->damaged = FALSE; + } +} + +static void +compBlockHandler (int i, + pointer blockData, + pointer pTimeout, + pointer pReadmask) +{ + ScreenPtr pScreen = screenInfo.screens[i]; + CompScreenPtr cs = GetCompScreen (pScreen); + + pScreen->BlockHandler = cs->BlockHandler; + compScreenUpdate (pScreen); + (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask); + cs->BlockHandler = pScreen->BlockHandler; + pScreen->BlockHandler = compBlockHandler; +} + +/* + * Add alternate visuals -- always expose an ARGB32 and RGB24 visual + */ + +static DepthPtr +compFindVisuallessDepth (ScreenPtr pScreen, int d) +{ + int i; + + for (i = 0; i < pScreen->numDepths; i++) + { + DepthPtr depth = &pScreen->allowedDepths[i]; + if (depth->depth == d) + { + /* + * Make sure it doesn't have visuals already + */ + if (depth->numVids) + return 0; + /* + * looks fine + */ + return depth; + } + } + /* + * If there isn't one, then it's gonna be hard to have + * an associated visual + */ + return 0; +} + +/* + * Add a list of visual IDs to the list of visuals to implicitly redirect. + */ +static Bool +compRegisterAlternateVisuals (CompScreenPtr cs, VisualID *vids, int nVisuals) +{ + VisualID *p; + + p = xrealloc(cs->alternateVisuals, + sizeof(VisualID) * (cs->numAlternateVisuals + nVisuals)); + if(p == NULL) + return FALSE; + + memcpy(&p[cs->numAlternateVisuals], vids, sizeof(VisualID) * nVisuals); + + cs->alternateVisuals = p; + cs->numAlternateVisuals += nVisuals; + + return TRUE; +} + +_X_EXPORT +Bool CompositeRegisterAlternateVisuals (ScreenPtr pScreen, VisualID *vids, + int nVisuals) +{ + CompScreenPtr cs = GetCompScreen (pScreen); + return compRegisterAlternateVisuals(cs, vids, nVisuals); +} + +typedef struct _alternateVisual { + int depth; + CARD32 format; +} CompAlternateVisual; + +static CompAlternateVisual altVisuals[] = { +#if COMP_INCLUDE_RGB24_VISUAL + { 24, PICT_r8g8b8 }, +#endif + { 32, PICT_a8r8g8b8 }, +}; + +static const int NUM_COMP_ALTERNATE_VISUALS = sizeof(altVisuals) / + sizeof(CompAlternateVisual); + +static Bool +compAddAlternateVisual(ScreenPtr pScreen, CompScreenPtr cs, + CompAlternateVisual *alt) +{ + VisualPtr visual, visuals; + int i; + int numVisuals; + XID *installedCmaps; + ColormapPtr installedCmap; + int numInstalledCmaps; + DepthPtr depth; + PictFormatPtr pPictFormat; + VisualID *vid; + unsigned long alphaMask; + + /* + * The ARGB32 visual is always available. Other alternate depth visuals + * are only provided if their depth is less than the root window depth. + * There's no deep reason for this. + */ + if (alt->depth >= pScreen->rootDepth && alt->depth != 32) + return FALSE; + + depth = compFindVisuallessDepth (pScreen, alt->depth); + if (!depth) + /* alt->depth doesn't exist or already has alternate visuals. */ + return TRUE; + + pPictFormat = PictureMatchFormat (pScreen, alt->depth, alt->format); + if (!pPictFormat) + return FALSE; + + vid = xalloc(sizeof(VisualID)); + if (!vid) + return FALSE; + + /* Find the installed colormaps */ + installedCmaps = xalloc (pScreen->maxInstalledCmaps * sizeof (XID)); + if (!installedCmaps) { + xfree(vid); + return FALSE; + } + numInstalledCmaps = pScreen->ListInstalledColormaps(pScreen, + installedCmaps); + + /* realloc the visual array to fit the new one in place */ + numVisuals = pScreen->numVisuals; + visuals = xrealloc(pScreen->visuals, (numVisuals + 1) * sizeof(VisualRec)); + if (!visuals) { + xfree(vid); + xfree(installedCmaps); + return FALSE; + } + + /* + * Fix up any existing installed colormaps -- we'll assume that + * the only ones created so far have been installed. If this + * isn't true, we'll have to walk the resource database looking + * for all colormaps. + */ + for (i = 0; i < numInstalledCmaps; i++) { + int j; + + installedCmap = LookupIDByType (installedCmaps[i], RT_COLORMAP); + if (!installedCmap) + continue; + j = installedCmap->pVisual - pScreen->visuals; + installedCmap->pVisual = &visuals[j]; + } + + xfree(installedCmaps); + + pScreen->visuals = visuals; + visual = visuals + pScreen->numVisuals; /* the new one */ + pScreen->numVisuals++; + + /* Initialize the visual */ + visual->vid = FakeClientID (0); + visual->bitsPerRGBValue = 8; + if (PICT_FORMAT_TYPE(alt->format) == PICT_TYPE_COLOR) { + visual->class = PseudoColor; + visual->nplanes = PICT_FORMAT_BPP(alt->format); + visual->ColormapEntries = 1 << visual->nplanes; + } else { + DirectFormatRec *direct = &pPictFormat->direct; + visual->class = TrueColor; + visual->redMask = ((unsigned long)direct->redMask) << direct->red; + visual->greenMask = ((unsigned long)direct->greenMask) << direct->green; + visual->blueMask = ((unsigned long)direct->blueMask) << direct->blue; + alphaMask = ((unsigned long)direct->alphaMask) << direct->alpha; + visual->offsetRed = direct->red; + visual->offsetGreen = direct->green; + visual->offsetBlue = direct->blue; + /* + * Include A bits in this (unlike GLX which includes only RGB) + * This lets DIX compute suitable masks for colormap allocations + */ + visual->nplanes = Ones (visual->redMask | + visual->greenMask | + visual->blueMask | + alphaMask); + /* find widest component */ + visual->ColormapEntries = (1 << max (Ones (visual->redMask), + max (Ones (visual->greenMask), + Ones (visual->blueMask)))); + } + + /* remember the visual ID to detect auto-update windows */ + compRegisterAlternateVisuals(cs, &visual->vid, 1); + + /* Fix up the depth */ + *vid = visual->vid; + depth->numVids = 1; + depth->vids = vid; + return TRUE; +} + +static Bool +compAddAlternateVisuals (ScreenPtr pScreen, CompScreenPtr cs) +{ + int alt, ret = 0; + + for (alt = 0; alt < NUM_COMP_ALTERNATE_VISUALS; alt++) + ret |= compAddAlternateVisual(pScreen, cs, altVisuals + alt); + + return !!ret; +} + +Bool +compScreenInit (ScreenPtr pScreen) +{ + CompScreenPtr cs; + + if (CompGeneration != serverGeneration) + { + CompScreenPrivateIndex = AllocateScreenPrivateIndex (); + if (CompScreenPrivateIndex == -1) + return FALSE; + CompWindowPrivateIndex = AllocateWindowPrivateIndex (); + if (CompWindowPrivateIndex == -1) + return FALSE; + CompSubwindowsPrivateIndex = AllocateWindowPrivateIndex (); + if (CompSubwindowsPrivateIndex == -1) + return FALSE; + CompGeneration = serverGeneration; + } + if (!AllocateWindowPrivate (pScreen, CompWindowPrivateIndex, 0)) + return FALSE; + + if (!AllocateWindowPrivate (pScreen, CompSubwindowsPrivateIndex, 0)) + return FALSE; + + if (GetCompScreen (pScreen)) + return TRUE; + cs = (CompScreenPtr) xalloc (sizeof (CompScreenRec)); + if (!cs) + return FALSE; + + cs->damaged = FALSE; + cs->pOverlayWin = NULL; + cs->pOverlayClients = NULL; + + cs->numAlternateVisuals = 0; + cs->alternateVisuals = NULL; + + if (!compAddAlternateVisuals (pScreen, cs)) + { + xfree (cs); + return FALSE; + } + + cs->PositionWindow = pScreen->PositionWindow; + pScreen->PositionWindow = compPositionWindow; + + cs->CopyWindow = pScreen->CopyWindow; + pScreen->CopyWindow = compCopyWindow; + + cs->CreateWindow = pScreen->CreateWindow; + pScreen->CreateWindow = compCreateWindow; + + cs->DestroyWindow = pScreen->DestroyWindow; + pScreen->DestroyWindow = compDestroyWindow; + + cs->RealizeWindow = pScreen->RealizeWindow; + pScreen->RealizeWindow = compRealizeWindow; + + cs->UnrealizeWindow = pScreen->UnrealizeWindow; + pScreen->UnrealizeWindow = compUnrealizeWindow; + + cs->PaintWindowBackground = pScreen->PaintWindowBackground; + pScreen->PaintWindowBackground = compPaintWindowBackground; + + cs->ClipNotify = pScreen->ClipNotify; + pScreen->ClipNotify = compClipNotify; + + cs->MoveWindow = pScreen->MoveWindow; + pScreen->MoveWindow = compMoveWindow; + + cs->ResizeWindow = pScreen->ResizeWindow; + pScreen->ResizeWindow = compResizeWindow; + + cs->ChangeBorderWidth = pScreen->ChangeBorderWidth; + pScreen->ChangeBorderWidth = compChangeBorderWidth; + + cs->ReparentWindow = pScreen->ReparentWindow; + pScreen->ReparentWindow = compReparentWindow; + + cs->InstallColormap = pScreen->InstallColormap; + pScreen->InstallColormap = compInstallColormap; + + cs->BlockHandler = pScreen->BlockHandler; + pScreen->BlockHandler = compBlockHandler; + + cs->CloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = compCloseScreen; + + pScreen->devPrivates[CompScreenPrivateIndex].ptr = (pointer) cs; + + RegisterRealChildHeadProc(CompositeRealChildHead); + + return TRUE; +} diff --git a/xorg-server-1.4/composite/compint.h b/xorg-server-1.4/composite/compint.h new file mode 100644 index 0000000..a5ed24e --- /dev/null +++ b/xorg-server-1.4/composite/compint.h @@ -0,0 +1,299 @@ +/* + * Copyright © 2006 Sun Microsystems + * + * 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 Sun Microsystems not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Sun Microsystems makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL SUN MICROSYSTEMS 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 © 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_DIX_CONFIG_H +#include +#endif + +#ifndef _COMPINT_H_ +#define _COMPINT_H_ + +#include "misc.h" +#include "scrnintstr.h" +#include "os.h" +#include "regionstr.h" +#include "validate.h" +#include "windowstr.h" +#include "input.h" +#include "resource.h" +#include "colormapst.h" +#include "cursorstr.h" +#include "dixstruct.h" +#include "gcstruct.h" +#include "servermd.h" +#include "dixevents.h" +#include "globals.h" +#include "picturestr.h" +#include "extnsionst.h" +#include "mi.h" +#include "damage.h" +#include "damageextint.h" +#include "xfixes.h" +#include +#include + +/* + * enable this for debugging + + #define COMPOSITE_DEBUG + */ + +typedef struct _CompClientWindow { + struct _CompClientWindow *next; + XID id; + int update; +} CompClientWindowRec, *CompClientWindowPtr; + +typedef struct _CompWindow { + RegionRec borderClip; + DamagePtr damage; /* for automatic update mode */ + Bool damageRegistered; + Bool damaged; + int update; + CompClientWindowPtr clients; + int oldx; + int oldy; + PixmapPtr pOldPixmap; + int borderClipX, borderClipY; +} CompWindowRec, *CompWindowPtr; + +#define COMP_ORIGIN_INVALID 0x80000000 + +typedef struct _CompSubwindows { + int update; + CompClientWindowPtr clients; +} CompSubwindowsRec, *CompSubwindowsPtr; + +#ifndef COMP_INCLUDE_RGB24_VISUAL +#define COMP_INCLUDE_RGB24_VISUAL 0 +#endif + +typedef struct _CompOverlayClientRec *CompOverlayClientPtr; + +typedef struct _CompOverlayClientRec { + CompOverlayClientPtr pNext; + ClientPtr pClient; + ScreenPtr pScreen; + XID resource; +} CompOverlayClientRec; + +typedef struct _CompScreen { + PositionWindowProcPtr PositionWindow; + CopyWindowProcPtr CopyWindow; + CreateWindowProcPtr CreateWindow; + DestroyWindowProcPtr DestroyWindow; + RealizeWindowProcPtr RealizeWindow; + UnrealizeWindowProcPtr UnrealizeWindow; + PaintWindowProcPtr PaintWindowBackground; + ClipNotifyProcPtr ClipNotify; + /* + * Called from ConfigureWindow, these + * three track changes to the offscreen storage + * geometry + */ + MoveWindowProcPtr MoveWindow; + ResizeWindowProcPtr ResizeWindow; + ChangeBorderWidthProcPtr ChangeBorderWidth; + /* + * Reparenting has an effect on Subwindows redirect + */ + ReparentWindowProcPtr ReparentWindow; + + /* + * Colormaps for new visuals better not get installed + */ + InstallColormapProcPtr InstallColormap; + + ScreenBlockHandlerProcPtr BlockHandler; + CloseScreenProcPtr CloseScreen; + Bool damaged; + int numAlternateVisuals; + VisualID *alternateVisuals; + + WindowPtr pOverlayWin; + CompOverlayClientPtr pOverlayClients; + +} CompScreenRec, *CompScreenPtr; + +extern int CompScreenPrivateIndex; +extern int CompWindowPrivateIndex; +extern int CompSubwindowsPrivateIndex; + +#define GetCompScreen(s) ((CompScreenPtr) ((s)->devPrivates[CompScreenPrivateIndex].ptr)) +#define GetCompWindow(w) ((CompWindowPtr) ((w)->devPrivates[CompWindowPrivateIndex].ptr)) +#define GetCompSubwindows(w) ((CompSubwindowsPtr) ((w)->devPrivates[CompSubwindowsPrivateIndex].ptr)) + +extern RESTYPE CompositeClientWindowType; +extern RESTYPE CompositeClientSubwindowsType; + +/* + * compalloc.c + */ + +Bool +compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update); + +void +compFreeClientWindow (WindowPtr pWin, XID id); + +int +compUnredirectWindow (ClientPtr pClient, WindowPtr pWin, int update); + +int +compRedirectSubwindows (ClientPtr pClient, WindowPtr pWin, int update); + +void +compFreeClientSubwindows (WindowPtr pWin, XID id); + +int +compUnredirectSubwindows (ClientPtr pClient, WindowPtr pWin, int update); + +int +compRedirectOneSubwindow (WindowPtr pParent, WindowPtr pWin); + +int +compUnredirectOneSubwindow (WindowPtr pParent, WindowPtr pWin); + +Bool +compAllocPixmap (WindowPtr pWin); + +void +compFreePixmap (WindowPtr pWin); + +Bool +compReallocPixmap (WindowPtr pWin, int x, int y, + unsigned int w, unsigned int h, int bw); + +/* + * compext.c + */ + +void +CompositeExtensionInit (void); + +/* + * compinit.c + */ + +Bool +CompositeRegisterAlternateVisuals (ScreenPtr pScreen, + VisualID *vids, int nVisuals); + +Bool +compScreenInit (ScreenPtr pScreen); + +/* + * compwindow.c + */ + +#ifdef COMPOSITE_DEBUG +void +compCheckTree (ScreenPtr pScreen); +#else +#define compCheckTree(s) +#endif + +PictFormatPtr +compWindowFormat (WindowPtr pWin); + +void +compSetPixmap (WindowPtr pWin, PixmapPtr pPixmap); + +Bool +compCheckRedirect (WindowPtr pWin); + +Bool +compPositionWindow (WindowPtr pWin, int x, int y); + +Bool +compRealizeWindow (WindowPtr pWin); + +Bool +compUnrealizeWindow (WindowPtr pWin); + +void +compPaintWindowBackground (WindowPtr pWin, RegionPtr pRegion, int what); + +void +compClipNotify (WindowPtr pWin, int dx, int dy); + +void +compMoveWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind); + +void +compResizeWindow (WindowPtr pWin, int x, int y, + unsigned int w, unsigned int h, WindowPtr pSib); + +void +compChangeBorderWidth (WindowPtr pWin, unsigned int border_width); + +void +compReparentWindow (WindowPtr pWin, WindowPtr pPriorParent); + +Bool +compCreateWindow (WindowPtr pWin); + +Bool +compDestroyWindow (WindowPtr pWin); + +void +compSetRedirectBorderClip (WindowPtr pWin, RegionPtr pRegion); + +RegionPtr +compGetRedirectBorderClip (WindowPtr pWin); + +void +compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); + +void +compWindowUpdate (WindowPtr pWin); + +void +deleteCompOverlayClientsForScreen (ScreenPtr pScreen); + +WindowPtr +CompositeRealChildHead (WindowPtr pWin); + +int +DeleteWindowNoInputDevices(pointer value, XID wid); + +#endif /* _COMPINT_H_ */ diff --git a/xorg-server-1.4/composite/compwindow.c b/xorg-server-1.4/composite/compwindow.c new file mode 100644 index 0000000..bfd2946 --- /dev/null +++ b/xorg-server-1.4/composite/compwindow.c @@ -0,0 +1,813 @@ +/* + * Copyright © 2006 Sun Microsystems + * + * 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 Sun Microsystems not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Sun Microsystems makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL SUN MICROSYSTEMS 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 © 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_DIX_CONFIG_H +#include +#endif + +#include "compint.h" + +#ifdef COMPOSITE_DEBUG +static int +compCheckWindow (WindowPtr pWin, pointer data) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + PixmapPtr pWinPixmap = (*pScreen->GetWindowPixmap) (pWin); + PixmapPtr pParentPixmap = pWin->parent ? (*pScreen->GetWindowPixmap) (pWin->parent) : 0; + PixmapPtr pScreenPixmap = (*pScreen->GetScreenPixmap) (pScreen); + + if (!pWin->parent) + { + assert (pWin->redirectDraw == RedirectDrawNone); + assert (pWinPixmap == pScreenPixmap); + } + else if (pWin->redirectDraw != RedirectDrawNone) + { + assert (pWinPixmap != pParentPixmap); + assert (pWinPixmap != pScreenPixmap); + } + else + { + assert (pWinPixmap == pParentPixmap); + } + assert (0 < pWinPixmap->refcnt && pWinPixmap->refcnt < 3); + assert (0 < pScreenPixmap->refcnt && pScreenPixmap->refcnt < 3); + if (pParentPixmap) + assert (0 <= pParentPixmap->refcnt && pParentPixmap->refcnt < 3); + return WT_WALKCHILDREN; +} + +void +compCheckTree (ScreenPtr pScreen) +{ + WalkTree (pScreen, compCheckWindow, 0); +} +#endif + +typedef struct _compPixmapVisit { + WindowPtr pWindow; + PixmapPtr pPixmap; +} CompPixmapVisitRec, *CompPixmapVisitPtr; + +static Bool +compRepaintBorder (ClientPtr pClient, pointer closure) +{ + WindowPtr pWindow; + int rc = dixLookupWindow(&pWindow, (XID)closure, pClient,DixUnknownAccess); + + if (rc == Success) { + RegionRec exposed; + + REGION_NULL(pScreen, &exposed); + REGION_SUBTRACT(pScreen, &exposed, &pWindow->borderClip, &pWindow->winSize); + (*pWindow->drawable.pScreen->PaintWindowBorder)(pWindow, &exposed, PW_BORDER); + REGION_UNINIT(pScreen, &exposed); + } + return TRUE; +} + +static int +compSetPixmapVisitWindow (WindowPtr pWindow, pointer data) +{ + CompPixmapVisitPtr pVisit = (CompPixmapVisitPtr) data; + ScreenPtr pScreen = pWindow->drawable.pScreen; + + if (pWindow != pVisit->pWindow && pWindow->redirectDraw != RedirectDrawNone) + return WT_DONTWALKCHILDREN; + (*pScreen->SetWindowPixmap) (pWindow, pVisit->pPixmap); + /* + * Recompute winSize and borderSize. This is duplicate effort + * when resizing pixmaps, but necessary when changing redirection. + * Might be nice to fix this. + */ + SetWinSize (pWindow); + SetBorderSize (pWindow); + if (HasBorder (pWindow)) + QueueWorkProc (compRepaintBorder, serverClient, + (pointer) pWindow->drawable.id); + return WT_WALKCHILDREN; +} + +void +compSetPixmap (WindowPtr pWindow, PixmapPtr pPixmap) +{ + CompPixmapVisitRec visitRec; + + visitRec.pWindow = pWindow; + visitRec.pPixmap = pPixmap; + TraverseTree (pWindow, compSetPixmapVisitWindow, (pointer) &visitRec); + compCheckTree (pWindow->drawable.pScreen); +} + +Bool +compCheckRedirect (WindowPtr pWin) +{ + CompWindowPtr cw = GetCompWindow (pWin); + CompScreenPtr cs = GetCompScreen(pWin->drawable.pScreen); + Bool should; + + should = pWin->realized && (pWin->drawable.class != InputOnly) && + (cw != NULL); + + /* Never redirect the overlay window */ + if (cs->pOverlayWin != NULL) { + if (pWin == cs->pOverlayWin) { + should = FALSE; + } + } + + if (should != (pWin->redirectDraw != RedirectDrawNone)) + { + if (should) + return compAllocPixmap (pWin); + else + compFreePixmap (pWin); + } + return TRUE; +} + +Bool +compPositionWindow (WindowPtr pWin, int x, int y) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen (pScreen); + Bool ret = TRUE; + + pScreen->PositionWindow = cs->PositionWindow; + /* + * "Shouldn't need this as all possible places should be wrapped + * + compCheckRedirect (pWin); + */ +#ifdef COMPOSITE_DEBUG + if ((pWin->redirectDraw != RedirectDrawNone) != + (pWin->viewable && (GetCompWindow(pWin) != NULL))) + abort (); +#endif + if (pWin->redirectDraw != RedirectDrawNone) + { + PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); + int bw = wBorderWidth (pWin); + int nx = pWin->drawable.x - bw; + int ny = pWin->drawable.y - bw; + + if (pPixmap->screen_x != nx || pPixmap->screen_y != ny) + { + pPixmap->screen_x = nx; + pPixmap->screen_y = ny; + pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + } + } + + if (!(*pScreen->PositionWindow) (pWin, x, y)) + ret = FALSE; + cs->PositionWindow = pScreen->PositionWindow; + pScreen->PositionWindow = compPositionWindow; + compCheckTree (pWin->drawable.pScreen); + return ret; +} + +Bool +compRealizeWindow (WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen (pScreen); + Bool ret = TRUE; + + pScreen->RealizeWindow = cs->RealizeWindow; + compCheckRedirect (pWin); + if (!(*pScreen->RealizeWindow) (pWin)) + ret = FALSE; + cs->RealizeWindow = pScreen->RealizeWindow; + pScreen->RealizeWindow = compRealizeWindow; + compCheckTree (pWin->drawable.pScreen); + return ret; +} + +Bool +compUnrealizeWindow (WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen (pScreen); + Bool ret = TRUE; + + pScreen->UnrealizeWindow = cs->UnrealizeWindow; + compCheckRedirect (pWin); + if (!(*pScreen->UnrealizeWindow) (pWin)) + ret = FALSE; + cs->UnrealizeWindow = pScreen->UnrealizeWindow; + pScreen->UnrealizeWindow = compUnrealizeWindow; + compCheckTree (pWin->drawable.pScreen); + return ret; +} + +void +compPaintWindowBackground (WindowPtr pWin, RegionPtr pRegion, int what) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompSubwindowsPtr csw = GetCompSubwindows (pWin); + CompScreenPtr cs = GetCompScreen (pScreen); + + if (csw && csw->update == CompositeRedirectManual) + return; + pScreen->PaintWindowBackground = cs->PaintWindowBackground; + (*pScreen->PaintWindowBackground) (pWin, pRegion, what); + cs->PaintWindowBackground = pScreen->PaintWindowBackground; + pScreen->PaintWindowBackground = compPaintWindowBackground; +} + +/* + * Called after the borderClip for the window has settled down + * We use this to make sure our extra borderClip has the right origin + */ + +void +compClipNotify (WindowPtr pWin, int dx, int dy) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen (pScreen); + CompWindowPtr cw = GetCompWindow (pWin); + + if (cw) + { + if (cw->borderClipX != pWin->drawable.x || + cw->borderClipY != pWin->drawable.y) + { + REGION_TRANSLATE (pScreen, &cw->borderClip, + pWin->drawable.x - cw->borderClipX, + pWin->drawable.y - cw->borderClipY); + cw->borderClipX = pWin->drawable.x; + cw->borderClipY = pWin->drawable.y; + } + } + if (cs->ClipNotify) + { + pScreen->ClipNotify = cs->ClipNotify; + (*pScreen->ClipNotify) (pWin, dx, dy); + cs->ClipNotify = pScreen->ClipNotify; + pScreen->ClipNotify = compClipNotify; + } +} + +/* + * Returns TRUE if the window needs server-provided automatic redirect, + * which is true if the child and parent aren't both regular or ARGB visuals + */ + +static Bool +compIsAlternateVisual (ScreenPtr pScreen, + XID visual) +{ + CompScreenPtr cs = GetCompScreen (pScreen); + int i; + + for (i = 0; i < cs->numAlternateVisuals; i++) + if (cs->alternateVisuals[i] == visual) + return TRUE; + return FALSE; +} + +static Bool +compImplicitRedirect (WindowPtr pWin, WindowPtr pParent) +{ + if (pParent) + { + ScreenPtr pScreen = pWin->drawable.pScreen; + XID winVisual = wVisual (pWin); + XID parentVisual = wVisual (pParent); + + if (winVisual != parentVisual && + (compIsAlternateVisual (pScreen, winVisual) || + compIsAlternateVisual (pScreen, parentVisual))) + return TRUE; + } + return FALSE; +} + +void +compMoveWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen (pScreen); + + compCheckTree (pScreen); + if (pWin->redirectDraw != RedirectDrawNone) + { + WindowPtr pParent; + int draw_x, draw_y; + unsigned int w, h, bw; + + /* if this is a root window, can't be moved */ + if (!(pParent = pWin->parent)) + return; + + bw = wBorderWidth (pWin); + draw_x = pParent->drawable.x + x + (int)bw; + draw_y = pParent->drawable.y + y + (int)bw; + w = pWin->drawable.width; + h = pWin->drawable.height; + compReallocPixmap (pWin, draw_x, draw_y, w, h, bw); + } + compCheckTree (pScreen); + + pScreen->MoveWindow = cs->MoveWindow; + (*pScreen->MoveWindow) (pWin, x, y, pSib, kind); + cs->MoveWindow = pScreen->MoveWindow; + pScreen->MoveWindow = compMoveWindow; + + if (pWin->redirectDraw != RedirectDrawNone) + { + CompWindowPtr cw = GetCompWindow (pWin); + if (cw->pOldPixmap) + { + (*pScreen->DestroyPixmap) (cw->pOldPixmap); + cw->pOldPixmap = NullPixmap; + } + } + + compCheckTree (pScreen); +} + +void +compResizeWindow (WindowPtr pWin, int x, int y, + unsigned int w, unsigned int h, WindowPtr pSib) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen (pScreen); + + compCheckTree (pScreen); + if (pWin->redirectDraw != RedirectDrawNone) + { + WindowPtr pParent; + int draw_x, draw_y; + unsigned int bw; + + /* if this is a root window, can't be moved */ + if (!(pParent = pWin->parent)) + return; + + bw = wBorderWidth (pWin); + draw_x = pParent->drawable.x + x + (int)bw; + draw_y = pParent->drawable.y + y + (int)bw; + compReallocPixmap (pWin, draw_x, draw_y, w, h, bw); + } + compCheckTree (pScreen); + + pScreen->ResizeWindow = cs->ResizeWindow; + (*pScreen->ResizeWindow) (pWin, x, y, w, h, pSib); + cs->ResizeWindow = pScreen->ResizeWindow; + pScreen->ResizeWindow = compResizeWindow; + if (pWin->redirectDraw != RedirectDrawNone) + { + CompWindowPtr cw = GetCompWindow (pWin); + if (cw->pOldPixmap) + { + (*pScreen->DestroyPixmap) (cw->pOldPixmap); + cw->pOldPixmap = NullPixmap; + } + } + compCheckTree (pWin->drawable.pScreen); +} + +void +compChangeBorderWidth (WindowPtr pWin, unsigned int bw) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen (pScreen); + + compCheckTree (pScreen); + if (pWin->redirectDraw != RedirectDrawNone) + { + WindowPtr pParent; + int draw_x, draw_y; + unsigned int w, h; + + /* if this is a root window, can't be moved */ + if (!(pParent = pWin->parent)) + return; + + draw_x = pWin->drawable.x; + draw_y = pWin->drawable.y; + w = pWin->drawable.width; + h = pWin->drawable.height; + compReallocPixmap (pWin, draw_x, draw_y, w, h, bw); + } + compCheckTree (pScreen); + + pScreen->ChangeBorderWidth = cs->ChangeBorderWidth; + (*pScreen->ChangeBorderWidth) (pWin, bw); + cs->ChangeBorderWidth = pScreen->ChangeBorderWidth; + pScreen->ChangeBorderWidth = compChangeBorderWidth; + if (pWin->redirectDraw != RedirectDrawNone) + { + CompWindowPtr cw = GetCompWindow (pWin); + if (cw->pOldPixmap) + { + (*pScreen->DestroyPixmap) (cw->pOldPixmap); + cw->pOldPixmap = NullPixmap; + } + } + compCheckTree (pWin->drawable.pScreen); +} + +void +compReparentWindow (WindowPtr pWin, WindowPtr pPriorParent) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen (pScreen); + + pScreen->ReparentWindow = cs->ReparentWindow; + /* + * Remove any implicit redirect due to synthesized visual + */ + if (compImplicitRedirect (pWin, pPriorParent)) + compUnredirectWindow (serverClient, pWin, CompositeRedirectAutomatic); + /* + * Handle subwindows redirection + */ + compUnredirectOneSubwindow (pPriorParent, pWin); + compRedirectOneSubwindow (pWin->parent, pWin); + /* + * Add any implict redirect due to synthesized visual + */ + if (compImplicitRedirect (pWin, pWin->parent)) + compRedirectWindow (serverClient, pWin, CompositeRedirectAutomatic); + + /* + * Allocate any necessary redirect pixmap + * (this actually should never be true; pWin is always unmapped) + */ + compCheckRedirect (pWin); + + /* + * Reset pixmap pointers as appropriate + */ + if (pWin->parent && pWin->redirectDraw == RedirectDrawNone) + compSetPixmap (pWin, (*pScreen->GetWindowPixmap) (pWin->parent)); + /* + * Call down to next function + */ + if (pScreen->ReparentWindow) + (*pScreen->ReparentWindow) (pWin, pPriorParent); + cs->ReparentWindow = pScreen->ReparentWindow; + pScreen->ReparentWindow = compReparentWindow; + compCheckTree (pWin->drawable.pScreen); +} + +void +compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen (pScreen); + int dx = 0, dy = 0; + + if (pWin->redirectDraw != RedirectDrawNone) + { + PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); + CompWindowPtr cw = GetCompWindow (pWin); + + assert (cw->oldx != COMP_ORIGIN_INVALID); + assert (cw->oldy != COMP_ORIGIN_INVALID); + if (cw->pOldPixmap) + { + /* + * Ok, the old bits are available in pOldPixmap and + * need to be copied to pNewPixmap. + */ + RegionRec rgnDst; + PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); + GCPtr pGC; + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); + + REGION_NULL (pWin->drawable.pScreen, &rgnDst); + + REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, + &pWin->borderClip, prgnSrc); + + REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst, + -pPixmap->screen_x, -pPixmap->screen_y); + + dx = dx + pPixmap->screen_x - cw->oldx; + dy = dy + pPixmap->screen_y - cw->oldy; + pGC = GetScratchGC (pPixmap->drawable.depth, pScreen); + if (pGC) + { + BoxPtr pBox = REGION_RECTS (&rgnDst); + int nBox = REGION_NUM_RECTS (&rgnDst); + + ValidateGC(&pPixmap->drawable, pGC); + while (nBox--) + { + (void) (*pGC->ops->CopyArea) (&cw->pOldPixmap->drawable, + &pPixmap->drawable, + pGC, + pBox->x1 + dx, pBox->y1 + dy, + pBox->x2 - pBox->x1, + pBox->y2 - pBox->y1, + pBox->x1, pBox->y1); + pBox++; + } + FreeScratchGC (pGC); + } + return; + } + dx = pPixmap->screen_x - cw->oldx; + dy = pPixmap->screen_y - cw->oldy; + ptOldOrg.x += dx; + ptOldOrg.y += dy; + } + + pScreen->CopyWindow = cs->CopyWindow; + if (ptOldOrg.x != pWin->drawable.x || ptOldOrg.y != pWin->drawable.y) + { + if (dx || dy) + REGION_TRANSLATE (pScreen, prgnSrc, dx, dy); + (*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc); + if (dx || dy) + REGION_TRANSLATE (pScreen, prgnSrc, -dx, -dy); + } + else + { + ptOldOrg.x -= dx; + ptOldOrg.y -= dy; + REGION_TRANSLATE (prgnSrc, prgnSrc, + pWin->drawable.x - ptOldOrg.x, + pWin->drawable.y - ptOldOrg.y); + DamageDamageRegion (&pWin->drawable, prgnSrc); + } + cs->CopyWindow = pScreen->CopyWindow; + pScreen->CopyWindow = compCopyWindow; + compCheckTree (pWin->drawable.pScreen); +} + +Bool +compCreateWindow (WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen (pScreen); + Bool ret; + + pScreen->CreateWindow = cs->CreateWindow; + ret = (*pScreen->CreateWindow) (pWin); + if (pWin->parent && ret) + { + CompSubwindowsPtr csw = GetCompSubwindows (pWin->parent); + CompClientWindowPtr ccw; + + (*pScreen->SetWindowPixmap) (pWin, (*pScreen->GetWindowPixmap) (pWin->parent)); + if (csw) + for (ccw = csw->clients; ccw; ccw = ccw->next) + compRedirectWindow (clients[CLIENT_ID(ccw->id)], + pWin, ccw->update); + if (compImplicitRedirect (pWin, pWin->parent)) + compRedirectWindow (serverClient, pWin, CompositeRedirectAutomatic); + } + cs->CreateWindow = pScreen->CreateWindow; + pScreen->CreateWindow = compCreateWindow; + compCheckTree (pWin->drawable.pScreen); + return ret; +} + +Bool +compDestroyWindow (WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen (pScreen); + CompWindowPtr cw; + CompSubwindowsPtr csw; + Bool ret; + + pScreen->DestroyWindow = cs->DestroyWindow; + while ((cw = GetCompWindow (pWin))) + FreeResource (cw->clients->id, RT_NONE); + while ((csw = GetCompSubwindows (pWin))) + FreeResource (csw->clients->id, RT_NONE); + + if (pWin->redirectDraw != RedirectDrawNone) + compFreePixmap (pWin); + ret = (*pScreen->DestroyWindow) (pWin); + cs->DestroyWindow = pScreen->DestroyWindow; + pScreen->DestroyWindow = compDestroyWindow; +/* compCheckTree (pWin->drawable.pScreen); can't check -- tree isn't good*/ + return ret; +} + +void +compSetRedirectBorderClip (WindowPtr pWin, RegionPtr pRegion) +{ + CompWindowPtr cw = GetCompWindow (pWin); + RegionRec damage; + + REGION_NULL (pScreen, &damage); + /* + * Align old border clip with new border clip + */ + REGION_TRANSLATE (pScreen, &cw->borderClip, + pWin->drawable.x - cw->borderClipX, + pWin->drawable.y - cw->borderClipY); + /* + * Compute newly visible portion of window for repaint + */ + REGION_SUBTRACT (pScreen, &damage, pRegion, &cw->borderClip); + /* + * Report that as damaged so it will be redrawn + */ + DamageDamageRegion (&pWin->drawable, &damage); + REGION_UNINIT (pScreen, &damage); + /* + * Save the new border clip region + */ + REGION_COPY (pScreen, &cw->borderClip, pRegion); + cw->borderClipX = pWin->drawable.x; + cw->borderClipY = pWin->drawable.y; +} + +RegionPtr +compGetRedirectBorderClip (WindowPtr pWin) +{ + CompWindowPtr cw = GetCompWindow (pWin); + + return &cw->borderClip; +} + +static VisualPtr +compGetWindowVisual (WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + VisualID vid = wVisual (pWin); + int i; + + for (i = 0; i < pScreen->numVisuals; i++) + if (pScreen->visuals[i].vid == vid) + return &pScreen->visuals[i]; + return 0; +} + +PictFormatPtr +compWindowFormat (WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + return PictureMatchVisual (pScreen, pWin->drawable.depth, + compGetWindowVisual (pWin)); +} + +static void +compWindowUpdateAutomatic (WindowPtr pWin) +{ + CompWindowPtr cw = GetCompWindow (pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + WindowPtr pParent = pWin->parent; + PixmapPtr pSrcPixmap = (*pScreen->GetWindowPixmap) (pWin); + PictFormatPtr pSrcFormat = compWindowFormat (pWin); + PictFormatPtr pDstFormat = compWindowFormat (pWin->parent); + int error; + RegionPtr pRegion = DamageRegion (cw->damage); + PicturePtr pSrcPicture = CreatePicture (0, &pSrcPixmap->drawable, + pSrcFormat, + 0, 0, + serverClient, + &error); + XID subwindowMode = IncludeInferiors; + PicturePtr pDstPicture = CreatePicture (0, &pParent->drawable, + pDstFormat, + CPSubwindowMode, + &subwindowMode, + serverClient, + &error); + + /* + * First move the region from window to screen coordinates + */ + REGION_TRANSLATE (pScreen, pRegion, + pWin->drawable.x, pWin->drawable.y); + + /* + * Clip against the "real" border clip + */ + REGION_INTERSECT (pScreen, pRegion, pRegion, &cw->borderClip); + + /* + * Now translate from screen to dest coordinates + */ + REGION_TRANSLATE (pScreen, pRegion, + -pParent->drawable.x, -pParent->drawable.y); + + /* + * Clip the picture + */ + SetPictureClipRegion (pDstPicture, 0, 0, pRegion); + + /* + * And paint + */ + CompositePicture (PictOpSrc, + pSrcPicture, + 0, + pDstPicture, + 0, 0, /* src_x, src_y */ + 0, 0, /* msk_x, msk_y */ + pSrcPixmap->screen_x - pParent->drawable.x, + pSrcPixmap->screen_y - pParent->drawable.y, + pSrcPixmap->drawable.width, + pSrcPixmap->drawable.height); + FreePicture (pSrcPicture, 0); + FreePicture (pDstPicture, 0); + /* + * Empty the damage region. This has the nice effect of + * rendering the translations above harmless + */ + DamageEmpty (cw->damage); +} + +void +compWindowUpdate (WindowPtr pWin) +{ + WindowPtr pChild; + + for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib) + compWindowUpdate (pChild); + if (pWin->redirectDraw != RedirectDrawNone) + { + CompWindowPtr cw = GetCompWindow(pWin); + + if (cw->damaged) + { + compWindowUpdateAutomatic (pWin); + cw->damaged = FALSE; + } + } +} + +WindowPtr +CompositeRealChildHead (WindowPtr pWin) +{ + WindowPtr pChild, pChildBefore; + CompScreenPtr cs; + + if (!pWin->parent && + (screenIsSaved == SCREEN_SAVER_ON) && + (HasSaverWindow (pWin->drawable.pScreen->myNum))) { + + /* First child is the screen saver; see if next child is the overlay */ + pChildBefore = pWin->firstChild; + pChild = pChildBefore->nextSib; + + } else { + pChildBefore = NullWindow; + pChild = pWin->firstChild; + } + + if (!pChild) { + return NullWindow; + } + + cs = GetCompScreen(pWin->drawable.pScreen); + if (pChild == cs->pOverlayWin) { + return pChild; + } else { + return pChildBefore; + } +} diff --git a/xorg-server-1.4/config.guess b/xorg-server-1.4/config.guess new file mode 100755 index 0000000..0e30d56 --- /dev/null +++ b/xorg-server-1.4/config.guess @@ -0,0 +1,1407 @@ +#! /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. + +timestamp='2003-07-02' + +# 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 +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# 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. +# +# 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. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +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. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap '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. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# 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 -q "$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 + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + 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 ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + 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 ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + 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 + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # 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 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # 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 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 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms + exit 0 ;; + 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 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + 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 + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + 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 ;; + 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 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + 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 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + 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 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + # 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 + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????: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 ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo rs6000-ibm-aix3.2.5 + 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]) + 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 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + 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 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (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 + # 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 + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + 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 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + *:UNICOS/mp:*:*) + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + 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 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*|*:GNU/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/FreeBSD 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 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; + 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 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + cris:Linux:*:*) + echo cris-axis-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:*:*) + 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:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #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 + ;; + 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 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + 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 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + 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 + ;; + 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 ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + 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 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + 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 + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i*86:*:5:[78]*) + 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 ;; + 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|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|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/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 ;; + 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 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + 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 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + 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 | SHG2:*: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 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + 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 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/xorg-server-1.4/config.sub b/xorg-server-1.4/config.sub new file mode 100755 index 0000000..9d7f733 --- /dev/null +++ b/xorg-server-1.4/config.sub @@ -0,0 +1,1504 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2003-07-04' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# 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 +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# 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. +# +# 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. + +# 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. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +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." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# 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* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -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) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # 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/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | 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 \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | msp430 \ + | ns16k | ns32k \ + | openrisc | 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 \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ + | m32r-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | msp430-* \ + | none-* | np1-* | nv1-* | 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-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + 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 + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + 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-* | 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/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # 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* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -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*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/xorg-server-1.4/config/Makefile.am b/xorg-server-1.4/config/Makefile.am new file mode 100644 index 0000000..056f30e --- /dev/null +++ b/xorg-server-1.4/config/Makefile.am @@ -0,0 +1,22 @@ +AM_CFLAGS = @DIX_CFLAGS@ + +noinst_LIBRARIES = libconfig.a +libconfig_a_SOURCES = config.c config-backends.h + +if HAVE_DBUS +AM_CFLAGS += @DBUS_CFLAGS@ +libconfig_a_SOURCES += dbus-core.c +endif + +if CONFIG_DBUS_API +dbusconfigdir = $(sysconfdir)/dbus-1/system.d +dbusconfig_DATA = xorg-server.conf + +libconfig_a_SOURCES += dbus.c +endif + +if CONFIG_HAL +libconfig_a_SOURCES += hal.c +endif + +EXTRA_DIST = xorg-server.conf x11-input.fdi diff --git a/xorg-server-1.4/config/Makefile.in b/xorg-server-1.4/config/Makefile.in new file mode 100644 index 0000000..549a332 --- /dev/null +++ b/xorg-server-1.4/config/Makefile.in @@ -0,0 +1,665 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@HAVE_DBUS_TRUE@am__append_1 = @DBUS_CFLAGS@ +@HAVE_DBUS_TRUE@am__append_2 = dbus-core.c +@CONFIG_DBUS_API_TRUE@am__append_3 = dbus.c +@CONFIG_HAL_TRUE@am__append_4 = hal.c +subdir = config +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libconfig_a_AR = $(AR) $(ARFLAGS) +libconfig_a_LIBADD = +am__libconfig_a_SOURCES_DIST = config.c config-backends.h dbus-core.c \ + dbus.c hal.c +@HAVE_DBUS_TRUE@am__objects_1 = dbus-core.$(OBJEXT) +@CONFIG_DBUS_API_TRUE@am__objects_2 = dbus.$(OBJEXT) +@CONFIG_HAL_TRUE@am__objects_3 = hal.$(OBJEXT) +am_libconfig_a_OBJECTS = config.$(OBJEXT) $(am__objects_1) \ + $(am__objects_2) $(am__objects_3) +libconfig_a_OBJECTS = $(am_libconfig_a_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libconfig_a_SOURCES) +DIST_SOURCES = $(am__libconfig_a_SOURCES_DIST) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(dbusconfigdir)" +dbusconfigDATA_INSTALL = $(INSTALL_DATA) +DATA = $(dbusconfig_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +AM_CFLAGS = @DIX_CFLAGS@ $(am__append_1) +noinst_LIBRARIES = libconfig.a +libconfig_a_SOURCES = config.c config-backends.h $(am__append_2) \ + $(am__append_3) $(am__append_4) +@CONFIG_DBUS_API_TRUE@dbusconfigdir = $(sysconfdir)/dbus-1/system.d +@CONFIG_DBUS_API_TRUE@dbusconfig_DATA = xorg-server.conf +EXTRA_DIST = xorg-server.conf x11-input.fdi +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign config/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign config/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libconfig.a: $(libconfig_a_OBJECTS) $(libconfig_a_DEPENDENCIES) + -rm -f libconfig.a + $(libconfig_a_AR) libconfig.a $(libconfig_a_OBJECTS) $(libconfig_a_LIBADD) + $(RANLIB) libconfig.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-core.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hal.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-dbusconfigDATA: $(dbusconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(dbusconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(dbusconfigdir)" + @list='$(dbusconfig_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(dbusconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(dbusconfigdir)/$$f'"; \ + $(dbusconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(dbusconfigdir)/$$f"; \ + done + +uninstall-dbusconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(dbusconfig_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(dbusconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(dbusconfigdir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(dbusconfigdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-dbusconfigDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-dbusconfigDATA + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dbusconfigDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-dbusconfigDATA + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/config/config-backends.h b/xorg-server-1.4/config/config-backends.h new file mode 100644 index 0000000..ce0e5e4 --- /dev/null +++ b/xorg-server-1.4/config/config-backends.h @@ -0,0 +1,59 @@ +/* + * Copyright © 2006-2007 Daniel Stone + * + * 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 (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 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. + * + * Author: Daniel Stone + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifdef HAVE_DBUS +#include + +typedef void (*config_dbus_core_connect_hook)(DBusConnection *connection, + void *data); +typedef void (*config_dbus_core_disconnect_hook)(void *data); + +struct config_dbus_core_hook { + config_dbus_core_connect_hook connect; + config_dbus_core_disconnect_hook disconnect; + void *data; + + struct config_dbus_core_hook *next; +}; + +int config_dbus_core_init(void); +void config_dbus_core_fini(void); +int config_dbus_core_add_hook(struct config_dbus_core_hook *hook); +void config_dbus_core_remove_hook(struct config_dbus_core_hook *hook); +#endif + +#ifdef CONFIG_DBUS_API +int config_dbus_init(void); +void config_dbus_fini(void); +#endif + +#ifdef CONFIG_HAL +int config_hal_init(void); +void config_hal_fini(void); +#endif diff --git a/xorg-server-1.4/config/config.c b/xorg-server-1.4/config/config.c new file mode 100644 index 0000000..882b699 --- /dev/null +++ b/xorg-server-1.4/config/config.c @@ -0,0 +1,66 @@ +/* + * Copyright © 2006-2007 Daniel Stone + * + * 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 (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 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. + * + * Author: Daniel Stone + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "os.h" +#include "hotplug.h" +#include "config-backends.h" + +void +config_init() +{ +#if defined(CONFIG_DBUS_API) || defined(CONFIG_HAL) + if (config_dbus_core_init()) { +# ifdef CONFIG_DBUS_API + if (!config_dbus_init()) + ErrorF("[config] failed to initialise D-Bus API\n"); +# endif +# ifdef CONFIG_HAL + if (!config_hal_init()) + ErrorF("[config] failed to initialise HAL\n"); +# endif + } + else { + ErrorF("[config] failed to initialise D-Bus core\n"); + } +#endif +} + +void +config_fini() +{ +#if defined(CONFIG_DBUS_API) || defined(CONFIG_HAL) +# ifdef CONFIG_HAL + config_hal_fini(); +# endif +# ifdef CONFIG_DBUS_API + config_dbus_fini(); +# endif + config_dbus_core_fini(); +#endif +} diff --git a/xorg-server-1.4/config/dbus-core.c b/xorg-server-1.4/config/dbus-core.c new file mode 100644 index 0000000..2888159 --- /dev/null +++ b/xorg-server-1.4/config/dbus-core.c @@ -0,0 +1,243 @@ +/* + * Copyright © 2006-2007 Daniel Stone + * + * 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 (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 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. + * + * Author: Daniel Stone + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#define DBUS_API_SUBJECT_TO_CHANGE +#include +#include + +#include "config-backends.h" +#include "dix.h" +#include "os.h" + +/* How often to attempt reconnecting when we get booted off the bus. */ +#define RECONNECT_DELAY (10 * 1000) /* in ms */ + +struct dbus_core_info { + int fd; + DBusConnection *connection; + OsTimerPtr timer; + struct config_dbus_core_hook *hooks; +}; +static struct dbus_core_info bus_info; + +static CARD32 reconnect_timer(OsTimerPtr timer, CARD32 time, pointer arg); + +static void +wakeup_handler(pointer data, int err, pointer read_mask) +{ + struct dbus_core_info *info = data; + + if (info->connection && FD_ISSET(info->fd, (fd_set *) read_mask)) { + do { + dbus_connection_read_write_dispatch(info->connection, 0); + } while (dbus_connection_get_dispatch_status(info->connection) == + DBUS_DISPATCH_DATA_REMAINS); + } +} + +static void +block_handler(pointer data, struct timeval **tv, pointer read_mask) +{ +} + +/** + * Disconnect (if we haven't already been forcefully disconnected), clean up + * after ourselves, and call all registered disconnect hooks. + */ +static void +teardown(void) +{ + struct config_dbus_core_hook *hook; + + if (bus_info.timer) { + TimerCancel(bus_info.timer); + bus_info.timer = NULL; + } + + /* We should really have pre-disconnect hooks and run them here, for + * completeness. But then it gets awkward, given that you can't + * guarantee that they'll be called ... */ + if (bus_info.connection) + dbus_connection_unref(bus_info.connection); + + RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, &bus_info); + RemoveGeneralSocket(bus_info.fd); + bus_info.fd = -1; + bus_info.connection = NULL; + + for (hook = bus_info.hooks; hook; hook = hook->next) { + if (hook->disconnect) + hook->disconnect(hook->data); + } +} + +/** + * This is a filter, which only handles the disconnected signal, which + * doesn't go to the normal message handling function. This takes + * precedence over the message handling function, so have have to be + * careful to ignore anything we don't want to deal with here. + */ +static DBusHandlerResult +message_filter(DBusConnection *connection, DBusMessage *message, void *data) +{ + /* If we get disconnected, then take everything down, and attempt to + * reconnect immediately (assuming it's just a restart). The + * connection isn't valid at this point, so throw it out immediately. */ + if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, + "Disconnected")) { + DebugF("[config/dbus-core] disconnected from bus\n"); + bus_info.connection = NULL; + teardown(); + + bus_info.timer = TimerSet(NULL, 0, 1, reconnect_timer, NULL); + + return DBUS_HANDLER_RESULT_HANDLED; + } + + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; +} + +/** + * Attempt to connect to the system bus, and set a filter to deal with + * disconnection (see message_filter above). + * + * @return 1 on success, 0 on failure. + */ +static int +connect_to_bus(void) +{ + DBusError error; + struct config_dbus_core_hook *hook; + + dbus_error_init(&error); + bus_info.connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error); + if (!bus_info.connection || dbus_error_is_set(&error)) { + DebugF("[config/dbus-core] error connecting to system bus: %s (%s)\n", + error.name, error.message); + goto err_begin; + } + + /* Thankyou. Really, thankyou. */ + dbus_connection_set_exit_on_disconnect(bus_info.connection, FALSE); + + if (!dbus_connection_get_unix_fd(bus_info.connection, &bus_info.fd)) { + ErrorF("[config/dbus-core] couldn't get fd for system bus\n"); + goto err_unref; + } + + if (!dbus_connection_add_filter(bus_info.connection, message_filter, + &bus_info, NULL)) { + ErrorF("[config/dbus-core] couldn't add filter: %s (%s)\n", error.name, + error.message); + goto err_fd; + } + + dbus_error_free(&error); + AddGeneralSocket(bus_info.fd); + + RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, &bus_info); + + for (hook = bus_info.hooks; hook; hook = hook->next) { + if (hook->connect) + hook->connect(bus_info.connection, hook->data); + } + + return 1; + +err_fd: + bus_info.fd = -1; +err_unref: + dbus_connection_unref(bus_info.connection); + bus_info.connection = NULL; +err_begin: + dbus_error_free(&error); + + return 0; +} + +static CARD32 +reconnect_timer(OsTimerPtr timer, CARD32 time, pointer arg) +{ + if (connect_to_bus()) { + bus_info.timer = NULL; + return 0; + } + else { + return RECONNECT_DELAY; + } +} + +int +config_dbus_core_add_hook(struct config_dbus_core_hook *hook) +{ + struct config_dbus_core_hook **prev; + + for (prev = &bus_info.hooks; *prev; prev = &(*prev)->next) + ; + + hook->next = NULL; + *prev = hook; + + /* If we're already connected, call the connect hook. */ + if (bus_info.connection) + hook->connect(bus_info.connection, hook->data); + + return 1; +} + +void +config_dbus_core_remove_hook(struct config_dbus_core_hook *hook) +{ + struct config_dbus_core_hook **prev; + + for (prev = &bus_info.hooks; *prev; prev = &(*prev)->next) { + if (*prev == hook) { + *prev = hook->next; + break; + } + } +} + +int +config_dbus_core_init(void) +{ + memset(&bus_info, 0, sizeof(bus_info)); + bus_info.fd = -1; + bus_info.hooks = NULL; + bus_info.connection = NULL; + bus_info.timer = TimerSet(NULL, 0, 1, reconnect_timer, NULL); + + return 1; +} + +void +config_dbus_core_fini(void) +{ + teardown(); +} diff --git a/xorg-server-1.4/config/dbus.c b/xorg-server-1.4/config/dbus.c new file mode 100644 index 0000000..c6f4af0 --- /dev/null +++ b/xorg-server-1.4/config/dbus.c @@ -0,0 +1,441 @@ +/* + * Copyright © 2006-2007 Daniel Stone + * + * 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 (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 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. + * + * Author: Daniel Stone + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#define DBUS_API_SUBJECT_TO_CHANGE +#include +#include + +#include + +#include "config-backends.h" +#include "opaque.h" /* for 'display': there should be a better way. */ +#include "input.h" +#include "inputstr.h" + +#define API_VERSION 2 + +#define MATCH_RULE "type='method_call',interface='org.x.config.input'" + +#define MALFORMED_MSG "[config/dbus] malformed message, dropping" +#define MALFORMED_MESSAGE() { DebugF(MALFORMED_MSG "\n"); \ + ret = BadValue; \ + goto unwind; } +#define MALFORMED_MESSAGE_ERROR() { DebugF(MALFORMED_MSG ": %s, %s", \ + error->name, error->message); \ + ret = BadValue; \ + goto unwind; } + +struct connection_info { + char busobject[32]; + char busname[64]; + DBusConnection *connection; +}; + +static void +reset_info(struct connection_info *info) +{ + info->connection = NULL; + info->busname[0] = '\0'; + info->busobject[0] = '\0'; +} + +static int +add_device(DBusMessage *message, DBusMessage *reply, DBusError *error) +{ + DBusMessageIter iter, reply_iter, subiter; + InputOption *tmpo = NULL, *options = NULL; + char *tmp = NULL; + int ret, err; + DeviceIntPtr dev = NULL; + + if (!dbus_message_iter_init(message, &iter)) { + ErrorF("[config/dbus] couldn't initialise iterator\n"); + return BadAlloc; + } + dbus_message_iter_init_append(reply, &reply_iter); + + options = xcalloc(sizeof(*options), 1); + if (!options) { + ErrorF("[config/dbus] couldn't allocate option\n"); + return BadAlloc; + } + + options->key = xstrdup("_source"); + options->value = xstrdup("client/dbus"); + if (!options->key || !options->value) { + ErrorF("[config/dbus] couldn't allocate first key/value pair\n"); + ret = BadAlloc; + goto unwind; + } + + /* signature should be [ss][ss]... */ + while (dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_ARRAY) { + tmpo = xcalloc(sizeof(*tmpo), 1); + if (!tmpo) { + ErrorF("[config/dbus] couldn't allocate option\n"); + ret = BadAlloc; + goto unwind; + } + tmpo->next = options; + options = tmpo; + + dbus_message_iter_recurse(&iter, &subiter); + + if (dbus_message_iter_get_arg_type(&subiter) != DBUS_TYPE_STRING) + MALFORMED_MESSAGE(); + + dbus_message_iter_get_basic(&subiter, &tmp); + if (!tmp) + MALFORMED_MESSAGE(); + /* The _ prefix refers to internal settings, and may not be given by + * the client. */ + if (tmp[0] == '_') { + ErrorF("[config/dbus] attempted subterfuge: option name %s given\n", + tmp); + MALFORMED_MESSAGE(); + } + options->key = xstrdup(tmp); + if (!options->key) { + ErrorF("[config/dbus] couldn't duplicate key!\n"); + ret = BadAlloc; + goto unwind; + } + + if (!dbus_message_iter_has_next(&subiter)) + MALFORMED_MESSAGE(); + dbus_message_iter_next(&subiter); + if (dbus_message_iter_get_arg_type(&subiter) != DBUS_TYPE_STRING) + MALFORMED_MESSAGE(); + + dbus_message_iter_get_basic(&subiter, &tmp); + if (!tmp) + MALFORMED_MESSAGE(); + options->value = xstrdup(tmp); + if (!options->value) { + ErrorF("[config] couldn't duplicate option!\n"); + ret = BadAlloc; + goto unwind; + } + + dbus_message_iter_next(&iter); + } + + ret = NewInputDeviceRequest(options, &dev); + if (ret != Success) { + DebugF("[config/dbus] NewInputDeviceRequest failed\n"); + goto unwind; + } + + if (!dev) { + DebugF("[config/dbus] NewInputDeviceRequest provided no device\n"); + ret = BadImplementation; + goto unwind; + } + + /* XXX: If we fail halfway through, we don't seem to have any way to + * empty the iterator, so you'll end up with some device IDs, + * plus an error. This seems to be a shortcoming in the D-Bus + * API. */ + for (; dev; dev = dev->next) { + if (!dbus_message_iter_append_basic(&reply_iter, DBUS_TYPE_INT32, + &dev->id)) { + ErrorF("[config/dbus] couldn't append to iterator\n"); + ret = BadAlloc; + goto unwind; + } + } + +unwind: + if (ret != Success) { + if (dev) + RemoveDevice(dev); + + err = -ret; + dbus_message_iter_append_basic(&reply_iter, DBUS_TYPE_INT32, &err); + } + + while (options) { + tmpo = options; + options = options->next; + if (tmpo->key) + xfree(tmpo->key); + if (tmpo->value) + xfree(tmpo->value); + xfree(tmpo); + } + + return ret; +} + +static int +remove_device(DBusMessage *message, DBusMessage *reply, DBusError *error) +{ + int deviceid, ret, err; + DeviceIntPtr dev; + DBusMessageIter iter, reply_iter; + + if (!dbus_message_iter_init(message, &iter)) { + ErrorF("[config] failed to init iterator\n"); + return BadAlloc; + } + dbus_message_iter_init_append(reply, &reply_iter); + + if (!dbus_message_get_args(message, error, DBUS_TYPE_UINT32, + &deviceid, DBUS_TYPE_INVALID)) { + MALFORMED_MESSAGE_ERROR(); + } + + dev = LookupDeviceIntRec(deviceid); + if (!dev) { + DebugF("[config] bogus device id %d given\n", deviceid); + ret = BadMatch; + goto unwind; + } + + DebugF("[config] removing device %s (id %d)\n", dev->name, deviceid); + + /* Call PIE here so we don't try to dereference a device that's + * already been removed. */ + OsBlockSignals(); + ProcessInputEvents(); + DeleteInputDeviceRequest(dev); + OsReleaseSignals(); + + ret = Success; + +unwind: + err = (ret == Success) ? ret : -ret; + dbus_message_iter_append_basic(&reply_iter, DBUS_TYPE_INT32, &err); + + return ret; +} + +static int +list_devices(DBusMessage *message, DBusMessage *reply, DBusError *error) +{ + DeviceIntPtr dev; + DBusMessageIter iter, subiter; + + dbus_message_iter_init_append(reply, &iter); + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (!dbus_message_iter_open_container(&iter, DBUS_TYPE_STRUCT, NULL, + &subiter)) { + ErrorF("[config/dbus] couldn't init container\n"); + return BadAlloc; + } + if (!dbus_message_iter_append_basic(&subiter, DBUS_TYPE_UINT32, + &dev->id)) { + ErrorF("[config/dbus] couldn't append to iterator\n"); + return BadAlloc; + } + if (!dbus_message_iter_append_basic(&subiter, DBUS_TYPE_STRING, + &dev->name)) { + ErrorF("[config/dbus] couldn't append to iterator\n"); + return BadAlloc; + } + if (!dbus_message_iter_close_container(&iter, &subiter)) { + ErrorF("[config/dbus] couldn't close container\n"); + return BadAlloc; + } + } + + return Success; +} + +static int +get_version(DBusMessage *message, DBusMessage *reply, DBusError *error) +{ + DBusMessageIter iter; + unsigned int version = API_VERSION; + + dbus_message_iter_init_append(reply, &iter); + if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_UINT32, &version)) { + ErrorF("[config/dbus] couldn't append version\n"); + return BadAlloc; + } + + return Success; +} + +static DBusHandlerResult +message_handler(DBusConnection *connection, DBusMessage *message, void *data) +{ + DBusError error; + DBusMessage *reply; + struct connection_info *info = data; + + /* ret is the overall D-Bus handler result, whereas err is the internal + * X error from our individual functions. */ + int ret = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + int err; + + DebugF("[config/dbus] received a message for %s\n", + dbus_message_get_interface(message)); + + dbus_error_init(&error); + + reply = dbus_message_new_method_return(message); + if (!reply) { + ErrorF("[config/dbus] failed to create reply\n"); + ret = DBUS_HANDLER_RESULT_NEED_MEMORY; + goto err_start; + } + + if (strcmp(dbus_message_get_member(message), "add") == 0) + err = add_device(message, reply, &error); + else if (strcmp(dbus_message_get_member(message), "remove") == 0) + err = remove_device(message, reply, &error); + else if (strcmp(dbus_message_get_member(message), "listDevices") == 0) + err = list_devices(message, reply, &error); + else if (strcmp(dbus_message_get_member(message), "version") == 0) + err = get_version(message, reply, &error); + else + goto err_reply; + + /* Failure to allocate is a special case. */ + if (err == BadAlloc) { + ret = DBUS_HANDLER_RESULT_NEED_MEMORY; + goto err_reply; + } + + /* While failure here is always an OOM, we don't return that, + * since that would result in devices being double-added/removed. */ + if (dbus_connection_send(info->connection, reply, NULL)) + dbus_connection_flush(info->connection); + else + ErrorF("[config/dbus] failed to send reply\n"); + + ret = DBUS_HANDLER_RESULT_HANDLED; + +err_reply: + dbus_message_unref(reply); +err_start: + dbus_error_free(&error); + + return ret; +} + +static void +connect_hook(DBusConnection *connection, void *data) +{ + DBusError error; + DBusObjectPathVTable vtable = { .message_function = message_handler, }; + struct connection_info *info = data; + + info->connection = connection; + + dbus_error_init(&error); + + if (!dbus_bus_request_name(info->connection, info->busname, + 0, &error)) { + ErrorF("[config/dbus] couldn't take over org.x.config: %s (%s)\n", + error.name, error.message); + goto err_start; + } + + /* blocks until we get a reply. */ + dbus_bus_add_match(info->connection, MATCH_RULE, &error); + if (dbus_error_is_set(&error)) { + ErrorF("[config/dbus] couldn't add match: %s (%s)\n", error.name, + error.message); + goto err_name; + } + + if (!dbus_connection_register_object_path(info->connection, + info->busobject, &vtable, + info)) { + ErrorF("[config/dbus] couldn't register object path\n"); + goto err_match; + } + + DebugF("[dbus] registered %s, %s\n", info->busname, info->busobject); + + dbus_error_free(&error); + + return; + +err_match: + dbus_bus_remove_match(info->connection, MATCH_RULE, &error); +err_name: + dbus_bus_release_name(info->connection, info->busname, &error); +err_start: + dbus_error_free(&error); + + reset_info(info); +} + +static void +disconnect_hook(void *data) +{ + struct connection_info *info = data; + + reset_info(info); +} + +#if 0 +void +pre_disconnect_hook(void) +{ + DBusError error; + + dbus_error_init(&error); + dbus_connection_unregister_object_path(connection_data->connection, + connection_data->busobject); + dbus_bus_remove_match(connection_data->connection, MATCH_RULE, + &error); + dbus_bus_release_name(connection_data->connection, + connection_data->busname, &error); + dbus_error_free(&error); +} +#endif + +static struct connection_info connection_data; +static struct config_dbus_core_hook core_hook = { + .connect = connect_hook, + .disconnect = disconnect_hook, + .data = &connection_data, +}; + +int +config_dbus_init(void) +{ + snprintf(connection_data.busname, sizeof(connection_data.busname), + "org.x.config.display%d", atoi(display)); + snprintf(connection_data.busobject, sizeof(connection_data.busobject), + "/org/x/config/%d", atoi(display)); + + return config_dbus_core_add_hook(&core_hook); +} + +void +config_dbus_fini(void) +{ + config_dbus_core_remove_hook(&core_hook); +} diff --git a/xorg-server-1.4/config/hal.c b/xorg-server-1.4/config/hal.c new file mode 100644 index 0000000..d7835e6 --- /dev/null +++ b/xorg-server-1.4/config/hal.c @@ -0,0 +1,370 @@ +/* + * Copyright © 2007 Daniel Stone + * + * 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 (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 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. + * + * Author: Daniel Stone + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include + +#include "input.h" +#include "inputstr.h" +#include "hotplug.h" +#include "config-backends.h" +#include "os.h" + +#define TYPE_NONE 0 +#define TYPE_KEYS 1 +#define TYPE_POINTER 2 + +struct config_hal_info { + DBusConnection *system_bus; + LibHalContext *hal_ctx; +}; + +static void +remove_device(DeviceIntPtr dev) +{ + DebugF("[config/hal] removing device %s\n", dev->name); + + /* Call PIE here so we don't try to dereference a device that's + * already been removed. */ + OsBlockSignals(); + ProcessInputEvents(); + DeleteInputDeviceRequest(dev); + OsReleaseSignals(); +} + +static void +device_removed(LibHalContext *ctx, const char *udi) +{ + DeviceIntPtr dev; + char *value; + + value = xalloc(strlen(udi) + 5); /* "hal:" + NULL */ + if (!value) + return; + sprintf(value, "hal:%s", udi); + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (dev->config_info && strcmp(dev->config_info, value) == 0) + remove_device(dev); + } + for (dev = inputInfo.off_devices; dev; dev = dev->next) { + if (dev->config_info && strcmp(dev->config_info, value) == 0) + remove_device(dev); + } + + xfree(value); +} + +static void +add_option(InputOption **options, const char *key, const char *value) +{ + if (!value || *value == '\0') + return; + + for (; *options; options = &(*options)->next) + ; + *options = xcalloc(sizeof(**options), 1); + (*options)->key = xstrdup(key); + (*options)->value = xstrdup(value); + (*options)->next = NULL; +} + +static char * +get_prop_string(LibHalContext *hal_ctx, const char *udi, const char *name) +{ + char *prop, *ret; + + prop = libhal_device_get_property_string(hal_ctx, udi, name, NULL); + DebugF(" [config/hal] getting %s on %s returned %s\n", name, udi, prop); + if (prop) { + ret = xstrdup(prop); + libhal_free_string(prop); + } + else { + return NULL; + } + + return ret; +} + +static char * +get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop) +{ + char **props, *ret, *str; + int i, len = 0; + + props = libhal_device_get_property_strlist(hal_ctx, udi, prop, NULL); + if (props) { + for (i = 0; props[i]; i++) + len += strlen(props[i]); + + ret = xcalloc(sizeof(char), len + i); /* i - 1 commas, 1 NULL */ + if (!ret) { + libhal_free_string_array(props); + return NULL; + } + + str = ret; + for (i = 0; props[i]; i++) { + str = strcpy(str, props[i]); + *str++ = ','; + } + *str = '\0'; + + libhal_free_string_array(props); + } + else { + return NULL; + } + + return ret; +} + +static void +device_added(LibHalContext *hal_ctx, const char *udi) +{ + char **props; + char *path = NULL, *driver = NULL, *name = NULL, *xkb_rules = NULL; + char *xkb_model = NULL, *xkb_layout = NULL, *xkb_variant = NULL; + char *xkb_options = NULL, *config_info = NULL; + InputOption *options = NULL; + DeviceIntPtr dev; + DBusError error; + int type = TYPE_NONE; + int i; + + dbus_error_init(&error); + + props = libhal_device_get_property_strlist(hal_ctx, udi, + "info.capabilities", &error); + if (!props) { + DebugF("[config/hal] couldn't get capabilities for %s: %s (%s)\n", + udi, error.name, error.message); + goto out_error; + } + for (i = 0; props[i]; i++) { + /* input.keys is the new, of which input.keyboard is a subset, but + * input.keyboard is the old 'we have keys', so we have to keep it + * around. */ + if (strcmp(props[i], "input.keys") == 0 || + strcmp(props[i], "input.keyboard") == 0) + type |= TYPE_KEYS; + if (strcmp(props[i], "input.mouse") == 0) + type |= TYPE_POINTER; + } + libhal_free_string_array(props); + + if (type == TYPE_NONE) + goto out_error; + + driver = get_prop_string(hal_ctx, udi, "input.x11_driver"); + path = get_prop_string(hal_ctx, udi, "input.device"); + if (!driver || !path) { + DebugF("[config/hal] no driver or path specified for %s\n", udi); + goto unwind; + } + name = get_prop_string(hal_ctx, udi, "info.product"); + if (!name) + name = xstrdup("(unnamed)"); + + if (type & TYPE_KEYS) { + xkb_rules = get_prop_string(hal_ctx, udi, "input.xkb.rules"); + xkb_model = get_prop_string(hal_ctx, udi, "input.xkb.model"); + xkb_layout = get_prop_string(hal_ctx, udi, "input.xkb.layout"); + xkb_variant = get_prop_string(hal_ctx, udi, "input.xkb.variant"); + xkb_options = get_prop_string_array(hal_ctx, udi, "input.xkb.options"); + } + + options = xcalloc(sizeof(*options), 1); + options->key = xstrdup("_source"); + options->value = xstrdup("server/hal"); + if (!options->key || !options->value) { + ErrorF("[config] couldn't allocate first key/value pair\n"); + goto unwind; + } + + add_option(&options, "path", path); + add_option(&options, "driver", driver); + add_option(&options, "name", name); + config_info = xalloc(strlen(udi) + 5); /* "hal:" and NULL */ + if (!config_info) + goto unwind; + sprintf(config_info, "hal:%s", udi); + + if (xkb_model) + add_option(&options, "xkb_model", xkb_model); + if (xkb_layout) + add_option(&options, "xkb_layout", xkb_layout); + if (xkb_variant) + add_option(&options, "xkb_variant", xkb_variant); + if (xkb_options) + add_option(&options, "xkb_options", xkb_options); + + if (NewInputDeviceRequest(options, &dev) != Success) { + DebugF("[config/hal] NewInputDeviceRequest failed\n"); + goto unwind; + } + + for (; dev; dev = dev->next) + dev->config_info = xstrdup(config_info); + +unwind: + if (path) + xfree(path); + if (driver) + xfree(driver); + if (name) + xfree(name); + if (xkb_rules) + xfree(xkb_rules); + if (xkb_model) + xfree(xkb_model); + if (xkb_layout) + xfree(xkb_layout); + if (xkb_options) + xfree(xkb_options); + if (config_info) + xfree(config_info); + +out_error: + dbus_error_free(&error); + + return; +} + +static void +disconnect_hook(void *data) +{ + DBusError error; + struct config_hal_info *info = data; + + if (info->hal_ctx) { + dbus_error_init(&error); + if (!libhal_ctx_shutdown(info->hal_ctx, &error)) + DebugF("[config/hal] couldn't shut down context: %s (%s)\n", + error.name, error.message); + libhal_ctx_free(info->hal_ctx); + dbus_error_free(&error); + } + + info->hal_ctx = NULL; + info->system_bus = NULL; +} + +static void +connect_hook(DBusConnection *connection, void *data) +{ + DBusError error; + struct config_hal_info *info = data; + char **devices; + int num_devices, i; + + info->system_bus = connection; + + dbus_error_init(&error); + + if (!info->hal_ctx) + info->hal_ctx = libhal_ctx_new(); + if (!info->hal_ctx) { + ErrorF("[config/hal] couldn't create HAL context\n"); + goto out_err; + } + + if (!libhal_ctx_set_dbus_connection(info->hal_ctx, info->system_bus)) { + ErrorF("[config/hal] couldn't associate HAL context with bus\n"); + goto out_ctx; + } + if (!libhal_ctx_init(info->hal_ctx, &error)) { + ErrorF("[config/hal] couldn't initialise context: %s (%s)\n", + error.name, error.message); + goto out_ctx; + } + if (!libhal_device_property_watch_all(info->hal_ctx, &error)) { + ErrorF("[config/hal] couldn't watch all properties: %s (%s)\n", + error.name, error.message); + goto out_ctx2; + } + libhal_ctx_set_device_added(info->hal_ctx, device_added); + libhal_ctx_set_device_removed(info->hal_ctx, device_removed); + + devices = libhal_find_device_by_capability(info->hal_ctx, "input", + &num_devices, &error); + /* FIXME: Get default devices if error is set. */ + for (i = 0; i < num_devices; i++) + device_added(info->hal_ctx, devices[i]); + libhal_free_string_array(devices); + + dbus_error_free(&error); + + return; + +out_ctx2: + if (!libhal_ctx_shutdown(info->hal_ctx, &error)) + DebugF("[config/hal] couldn't shut down context: %s (%s)\n", + error.name, error.message); +out_ctx: + libhal_ctx_free(info->hal_ctx); +out_err: + dbus_error_free(&error); + + info->hal_ctx = NULL; + info->system_bus = NULL; + + return; +} + +static struct config_hal_info hal_info; +static struct config_dbus_core_hook hook = { + .connect = connect_hook, + .disconnect = disconnect_hook, + .data = &hal_info, +}; + +int +config_hal_init(void) +{ + memset(&hal_info, 0, sizeof(hal_info)); + hal_info.system_bus = NULL; + hal_info.hal_ctx = NULL; + + if (!config_dbus_core_add_hook(&hook)) { + ErrorF("[config/hal] failed to add D-Bus hook\n"); + return 0; + } + + return 1; +} + +void +config_hal_fini(void) +{ + config_dbus_core_remove_hook(&hook); +} diff --git a/xorg-server-1.4/config/x11-input.fdi b/xorg-server-1.4/config/x11-input.fdi new file mode 100644 index 0000000..c390706 --- /dev/null +++ b/xorg-server-1.4/config/x11-input.fdi @@ -0,0 +1,31 @@ + + + + + + mouse + + evdev + + + + + base + + + keyboard + pc105 + + evdev + evdev + + + us + + + + + diff --git a/xorg-server-1.4/config/xorg-server.conf b/xorg-server-1.4/config/xorg-server.conf new file mode 100644 index 0000000..47a9a78 --- /dev/null +++ b/xorg-server-1.4/config/xorg-server.conf @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xorg-server-1.4/configure b/xorg-server-1.4/configure new file mode 100755 index 0000000..03d19c7 --- /dev/null +++ b/xorg-server-1.4/configure @@ -0,0 +1,39515 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61 for xorg-server 1.4. +# +# Report bugs to . +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +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 + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +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 + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +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 + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${ECHO-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! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='xorg-server' +PACKAGE_TARNAME='xorg-server' +PACKAGE_VERSION='1.4' +PACKAGE_STRING='xorg-server 1.4' +PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' + +ac_unique_file="Makefile.am" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +am__isrc +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +MAINTAINER_MODE_TRUE +MAINTAINER_MODE_FALSE +MAINT +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +CCAS +CCASFLAGS +CCASDEPMODE +am__fastdepCCAS_TRUE +am__fastdepCCAS_FALSE +LN_S +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +GREP +EGREP +ECHO +AR +RANLIB +DLLTOOL +AS +OBJDUMP +CPP +CXX +CXXFLAGS +ac_ct_CXX +CXXDEPMODE +am__fastdepCXX_TRUE +am__fastdepCXX_FALSE +CXXCPP +F77 +FFLAGS +ac_ct_F77 +LIBTOOL +PKG_CONFIG +LEX +LEX_OUTPUT_ROOT +LEXLIB +YACC +YFLAGS +RAWCPP +RAWCPPFLAGS +DTRACE +XSERVER_DTRACE_TRUE +XSERVER_DTRACE_FALSE +XERRORDB_PATH +ALLOCA +NEED_STRLCAT_TRUE +NEED_STRLCAT_FALSE +NEED_VSNPRINTF_TRUE +NEED_VSNPRINTF_FALSE +AGP_TRUE +AGP_FALSE +LNXAPM_TRUE +LNXAPM_FALSE +FBDEVHW_TRUE +FBDEVHW_FALSE +FREEBSD_KLDLOAD_TRUE +FREEBSD_KLDLOAD_FALSE +ALPHA_VIDEO_TRUE +ALPHA_VIDEO_FALSE +ARM_VIDEO_TRUE +ARM_VIDEO_FALSE +I386_VIDEO_TRUE +I386_VIDEO_FALSE +PPC_VIDEO_TRUE +PPC_VIDEO_FALSE +SPARC64_VIDEO_TRUE +SPARC64_VIDEO_FALSE +KDRIVE_HW_TRUE +KDRIVE_HW_FALSE +INSTALL_SETUID_TRUE +INSTALL_SETUID_FALSE +INT10_VM86_TRUE +INT10_VM86_FALSE +INT10_X86EMU_TRUE +INT10_X86EMU_FALSE +INT10_STUB_TRUE +INT10_STUB_FALSE +BUILDDOCS_TRUE +BUILDDOCS_FALSE +LINUXDOC +PS2PDF +BUILD_LINUXDOC_TRUE +BUILD_LINUXDOC_FALSE +BUILD_PDFDOC_TRUE +BUILD_PDFDOC_FALSE +MAKE_TEXT +MAKE_PS +MAKE_PDF +MAKE_HTML +INSTALL_LIBXF86CONFIG_TRUE +INSTALL_LIBXF86CONFIG_FALSE +PIXMAN_CFLAGS +PIXMAN_LIBS +DBUS_CFLAGS +DBUS_LIBS +HAVE_DBUS_TRUE +HAVE_DBUS_FALSE +CONFIG_DBUS_API_TRUE +CONFIG_DBUS_API_FALSE +HAL_CFLAGS +HAL_LIBS +CONFIG_HAL_TRUE +CONFIG_HAL_FALSE +XV_TRUE +XV_FALSE +XVMC_TRUE +XVMC_FALSE +COMPOSITE_TRUE +COMPOSITE_FALSE +MITSHM_TRUE +MITSHM_FALSE +XTRAP_TRUE +XTRAP_FALSE +RECORD_TRUE +RECORD_FALSE +SCREENSAVER_TRUE +SCREENSAVER_FALSE +RES_TRUE +RES_FALSE +XLIB_CFLAGS +XLIB_LIBS +GL_CFLAGS +GL_LIBS +GLX_TRUE +GLX_FALSE +MESA_SOURCE +AIGLX_TRUE +AIGLX_FALSE +GLX_DEFINES +DRI_TRUE +DRI_FALSE +DRIPROTO_CFLAGS +DRIPROTO_LIBS +LIBDRM_CFLAGS +LIBDRM_LIBS +XINERAMA_TRUE +XINERAMA_FALSE +XACE_TRUE +XACE_FALSE +XCSECURITY_TRUE +XCSECURITY_FALSE +XEVIE_TRUE +XEVIE_FALSE +APPGROUP_TRUE +APPGROUP_FALSE +CUP_TRUE +CUP_FALSE +EVI_TRUE +EVI_FALSE +MULTIBUFFER_TRUE +MULTIBUFFER_FALSE +FONTCACHE_TRUE +FONTCACHE_FALSE +DBE_TRUE +DBE_FALSE +XF86BIGFONT_TRUE +XF86BIGFONT_FALSE +DPMSExtension_TRUE +DPMSExtension_FALSE +XPRINTPROTO_CFLAGS +XPRINTPROTO_LIBS +XPRINT_TRUE +XPRINT_FALSE +XCALIBRATE_TRUE +XCALIBRATE_FALSE +XF86UTILS_TRUE +XF86UTILS_FALSE +XDMCP_CFLAGS +XDMCP_LIBS +XDMCP_TRUE +XDMCP_FALSE +XDMAUTH_TRUE +XDMAUTH_FALSE +USE_RGB_BUILTIN_TRUE +USE_RGB_BUILTIN_FALSE +COMPILEDDEFAULTFONTPATH +RGB_DB +SERVERCONFIGdir +BASE_FONT_PATH +DRI_DRIVER_PATH +VENDOR_NAME +VENDOR_NAME_SHORT +VENDOR_RELEASE +VENDOR_MAN_VERSION +DEBUG_TRUE +DEBUG_FALSE +XSERVERCFLAGS_CFLAGS +XSERVERCFLAGS_LIBS +XSERVERLIBS_CFLAGS +XSERVERLIBS_LIBS +SYS_LIBS +LD_EXPORT_SYMBOLS_FLAG +XSERVER_LIBS +DMXMODULES_CFLAGS +DMXMODULES_LIBS +DMX_TRUE +DMX_FALSE +XDMX_LIBS +XDMXCONFIG_DEP_CFLAGS +XDMXCONFIG_DEP_LIBS +DMXEXAMPLES_DEP_CFLAGS +DMXEXAMPLES_DEP_LIBS +DMXXMUEXAMPLES_DEP_CFLAGS +DMXXMUEXAMPLES_DEP_LIBS +DMXXIEXAMPLES_DEP_CFLAGS +DMXXIEXAMPLES_DEP_LIBS +XTSTEXAMPLES_DEP_CFLAGS +XTSTEXAMPLES_DEP_LIBS +XRESEXAMPLES_DEP_CFLAGS +XRESEXAMPLES_DEP_LIBS +X11EXAMPLES_DEP_CFLAGS +X11EXAMPLES_DEP_LIBS +DMX_BUILD_LNX_TRUE +DMX_BUILD_LNX_FALSE +DMX_BUILD_USB_TRUE +DMX_BUILD_USB_FALSE +XVFB_TRUE +XVFB_FALSE +XVFB_LIBS +XNESTMODULES_CFLAGS +XNESTMODULES_LIBS +XNEST_TRUE +XNEST_FALSE +XNEST_LIBS +XGLMODULES_CFLAGS +XGLMODULES_LIBS +XGL_TRUE +XGL_FALSE +XGL_LIBS +xglmoduledir +XGL_MODULE_PATH +XEGLMODULES_CFLAGS +XEGLMODULES_LIBS +XEGL_TRUE +XEGL_FALSE +XEGL_LIBS +XGLXMODULES_CFLAGS +XGLXMODULES_LIBS +XGLX_TRUE +XGLX_FALSE +XGLX_LIBS +XORG_CORE_LIBS +DARWIN_LIBS +APPLE_APPLICATIONS_DIR +PLIST_VERSION_STRING +PLIST_VENDOR_WEB +SOLARIS_INOUT_ARCH +SOLARIS_ASM_CFLAGS +DGA_CFLAGS +DGA_LIBS +XF86MISC_CFLAGS +XF86MISC_LIBS +XF86VIDMODE_CFLAGS +XF86VIDMODE_LIBS +XORG_MODULES_CFLAGS +XORG_MODULES_LIBS +XORG_LIBS +XORG_INCS +XORG_OS +XORG_OS_SUBDIR +PERL +XORG_CFLAGS +__XCONFIGFILE__ +XF86CONFIGFILE +DEFAULT_MODULE_PATH +DEFAULT_LIBRARY_PATH +DEFAULT_LOGPREFIX +moduledir +driverdir +sdkdir +extdir +logdir +XORG_TRUE +XORG_FALSE +XORG_BUS_LINUXPCI_TRUE +XORG_BUS_LINUXPCI_FALSE +XORG_BUS_FREEBSDPCI_TRUE +XORG_BUS_FREEBSDPCI_FALSE +XORG_BUS_NETBSDPCI_TRUE +XORG_BUS_NETBSDPCI_FALSE +XORG_BUS_IX86PCI_TRUE +XORG_BUS_IX86PCI_FALSE +XORG_BUS_PPCPCI_TRUE +XORG_BUS_PPCPCI_FALSE +XORG_BUS_SPARCPCI_TRUE +XORG_BUS_SPARCPCI_FALSE +XORG_BUS_SPARC_TRUE +XORG_BUS_SPARC_FALSE +XORG_LOADER_SPARC_TRUE +XORG_LOADER_SPARC_FALSE +LINUX_IA64_TRUE +LINUX_IA64_FALSE +LINUX_ALPHA_TRUE +LINUX_ALPHA_FALSE +LNXACPI_TRUE +LNXACPI_FALSE +SOLARIS_USL_CONSOLE_TRUE +SOLARIS_USL_CONSOLE_FALSE +SOLARIS_ASM_INLINE_TRUE +SOLARIS_ASM_INLINE_FALSE +BUILD_DARWIN_TRUE +BUILD_DARWIN_FALSE +XQUARTZ_TRUE +XQUARTZ_FALSE +DGA_TRUE +DGA_FALSE +MFB_TRUE +MFB_FALSE +CFB_TRUE +CFB_FALSE +AFB_TRUE +AFB_FALSE +XPRINT_CFLAGS +XPRINT_LIBS +xpconfigdir +MKFONTSCALE +MKFONTDIR +FREETYPE_CFLAGS +FREETYPE_LIBS +ft_config +FREETYPE_REQUIRES +XP_USE_FREETYPE_TRUE +XP_USE_FREETYPE_FALSE +XWIN_LIBS +XWINMODULES_CFLAGS +XWINMODULES_LIBS +XWIN_SERVER_NAME +XWIN_SYSTEM_LIBS +XWIN_TRUE +XWIN_FALSE +XWIN_MULTIWINDOW_TRUE +XWIN_MULTIWINDOW_FALSE +XWIN_MULTIWINDOWEXTWM_TRUE +XWIN_MULTIWINDOWEXTWM_FALSE +XWIN_CLIPBOARD_TRUE +XWIN_CLIPBOARD_FALSE +XWIN_GLX_WINDOWS_TRUE +XWIN_GLX_WINDOWS_FALSE +XWIN_NATIVEGDI_TRUE +XWIN_NATIVEGDI_FALSE +XWIN_PRIMARYFB_TRUE +XWIN_PRIMARYFB_FALSE +XWIN_RANDR_TRUE +XWIN_RANDR_FALSE +XWIN_XV_TRUE +XWIN_XV_FALSE +HAVE_X_PLUGIN_TRUE +HAVE_X_PLUGIN_FALSE +HAVE_AGL_FRAMEWORK_TRUE +HAVE_AGL_FRAMEWORK_FALSE +OBJC +OBJCCLD +OBJCLINK +OBJCFLAGS +OBJCDEPMODE +am__fastdepOBJC_TRUE +am__fastdepOBJC_FALSE +KDRIVE_TRUE +KDRIVE_FALSE +XEPHYR_CFLAGS +XEPHYR_LIBS +TSLIB_CFLAGS +TSLIB_LIBS +XEPHYR_INCS +XSDL_LIBS +XSDL_INCS +KDRIVE_INCS +KDRIVE_PURE_INCS +KDRIVE_CFLAGS +KDRIVE_PURE_LIBS +KDRIVE_LOCAL_LIBS +KDRIVE_LIBS +KDRIVELINUX_TRUE +KDRIVELINUX_FALSE +TSLIB_TRUE +TSLIB_FALSE +H3600_TS_TRUE +H3600_TS_FALSE +KDRIVEVESA_TRUE +KDRIVEVESA_FALSE +KDRIVEFBDEV_TRUE +KDRIVEFBDEV_FALSE +XSDLSERVER_TRUE +XSDLSERVER_FALSE +XEPHYR_TRUE +XEPHYR_FALSE +BUILD_KDRIVEFBDEVLIB_TRUE +BUILD_KDRIVEFBDEVLIB_FALSE +XFAKESERVER_TRUE +XFAKESERVER_FALSE +XKB_BASE_DIRECTORY +XKB_BIN_DIRECTORY +XKM_OUTPUT_DIR +XKB_COMPILED_DIR +PROJECTROOT +XORGCONFIG_DEP_CFLAGS +XORGCONFIG_DEP_LIBS +XORGCFG_DEP_CFLAGS +XORGCFG_DEP_LIBS +APPDEFAULTDIR +BUILD_XORGCFG_TRUE +BUILD_XORGCFG_FALSE +USE_CURSES_TRUE +USE_CURSES_FALSE +BUILD_KBD_MODE_TRUE +BUILD_KBD_MODE_FALSE +BSD_KBD_MODE_TRUE +BSD_KBD_MODE_FALSE +SUN_KBD_MODE_TRUE +SUN_KBD_MODE_FALSE +BUILD_DATE +BUILD_TIME +DIX_CFLAGS +libdir exec_prefix prefix +APP_MAN_SUFFIX +LIB_MAN_SUFFIX +FILE_MAN_SUFFIX +MISC_MAN_SUFFIX +DRIVER_MAN_SUFFIX +ADMIN_MAN_SUFFIX +APP_MAN_DIR +LIB_MAN_DIR +FILE_MAN_DIR +MISC_MAN_DIR +DRIVER_MAN_DIR +ADMIN_MAN_DIR +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CCAS +CCASFLAGS +CPP +CXX +CXXFLAGS +CCC +CXXCPP +F77 +FFLAGS +PKG_CONFIG +YACC +YFLAGS +PIXMAN_CFLAGS +PIXMAN_LIBS +DBUS_CFLAGS +DBUS_LIBS +HAL_CFLAGS +HAL_LIBS +XLIB_CFLAGS +XLIB_LIBS +GL_CFLAGS +GL_LIBS +DRIPROTO_CFLAGS +DRIPROTO_LIBS +LIBDRM_CFLAGS +LIBDRM_LIBS +XPRINTPROTO_CFLAGS +XPRINTPROTO_LIBS +XDMCP_CFLAGS +XDMCP_LIBS +XSERVERCFLAGS_CFLAGS +XSERVERCFLAGS_LIBS +XSERVERLIBS_CFLAGS +XSERVERLIBS_LIBS +DMXMODULES_CFLAGS +DMXMODULES_LIBS +XDMXCONFIG_DEP_CFLAGS +XDMXCONFIG_DEP_LIBS +DMXEXAMPLES_DEP_CFLAGS +DMXEXAMPLES_DEP_LIBS +DMXXMUEXAMPLES_DEP_CFLAGS +DMXXMUEXAMPLES_DEP_LIBS +DMXXIEXAMPLES_DEP_CFLAGS +DMXXIEXAMPLES_DEP_LIBS +XTSTEXAMPLES_DEP_CFLAGS +XTSTEXAMPLES_DEP_LIBS +XRESEXAMPLES_DEP_CFLAGS +XRESEXAMPLES_DEP_LIBS +X11EXAMPLES_DEP_CFLAGS +X11EXAMPLES_DEP_LIBS +XNESTMODULES_CFLAGS +XNESTMODULES_LIBS +XGLMODULES_CFLAGS +XGLMODULES_LIBS +XGLXMODULES_CFLAGS +XGLXMODULES_LIBS +DGA_CFLAGS +DGA_LIBS +XF86MISC_CFLAGS +XF86MISC_LIBS +XF86VIDMODE_CFLAGS +XF86VIDMODE_LIBS +XORG_MODULES_CFLAGS +XORG_MODULES_LIBS +XPRINT_CFLAGS +XPRINT_LIBS +FREETYPE_CFLAGS +FREETYPE_LIBS +XWINMODULES_CFLAGS +XWINMODULES_LIBS +XEPHYR_CFLAGS +XEPHYR_LIBS +TSLIB_CFLAGS +TSLIB_LIBS +XORGCONFIG_DEP_CFLAGS +XORGCONFIG_DEP_LIBS +XORGCFG_DEP_CFLAGS +XORGCFG_DEP_LIBS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures xorg-server 1.4 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/xorg-server] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of xorg-server 1.4:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-static[=PKGS] build static libraries [default=no] + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --disable-largefile omit support for large files + --enable-werror Treat warnings as errors (default: disabled) + --enable-debug Enable debugging (default: disabled) + --enable-builddocs Build docs (default: disabled) + --enable-install-libxf86config + Install libxf86config (default: disabled) + --enable-builtin-fonts Use only built-in fonts (default: use external) + --enable-null-root-cursor + Use an empty root cursor (default: use core cursor) + --enable-aiglx Build accelerated indirect GLX (default: enabled) + --enable-glx-tls Build GLX with TLS support (default: disabled) + --disable-composite Build Composite extension (default: enabled) + --disable-shm Build SHM extension (default: enabled) + --disable-xres Build XRes extension (default: enabled) + --disable-xtrap Build XTrap extension (default: enabled) + --disable-record Build Record extension (default: enabled) + --disable-xv Build Xv extension (default: enabled) + --enable-quartz Build with darwin quartz support (default: auto) + --disable-xvmc Build XvMC extension (default: enabled) + --disable-dga Build DGA extension (default: auto) + --disable-screensaver Build ScreenSaver extension (default: enabled) + --disable-xdmcp Build XDMCP extension (default: auto) + --disable-xdm-auth-1 Build XDM-Auth-1 extension (default: auto) + --disable-glx Build GLX extension (default: enabled) + --enable-dri Build DRI extension (default: auto) + --disable-xinerama Build Xinerama extension (default: enabled) + --disable-xf86vidmode Build XF86VidMode extension (default: auto) + --disable-xf86misc Build XF86Misc extension (default: auto) + --disable-xace Build X-ACE extension (default: enabled) + --disable-xcsecurity Build Security extension (default: enabled) + --disable-appgroup Build XC-APPGROUP extension (default: enabled) + --enable-xcalibrate Build XCalibrate extension (default: disabled) + --enable-tslib Build kdrive tslib touchscreen support (default: + disabled) + --disable-xevie Build XEvIE extension (default: enabled) + --disable-cup Build TOG-CUP extension (default: enabled) + --disable-evi Build Extended-Visual-Information extension + (default: enabled) + --enable-multibuffer Build Multibuffer extension (default: disabled) + --enable-fontcache Build FontCache extension (default: disabled) + --disable-dbe Build DBE extension (default: enabled) + --disable-xf86bigfont Build XF86 Big Font extension (default: enabled) + --disable-dpms Build DPMS extension (default: enabled) + --enable-config-dbus Build D-BUS API support (default: no) + --disable-config-hal Build HAL support (default: auto) + --enable-xfree86-utils Build xfree86 DDX utilities (default: enabled) + --enable-xorg Build Xorg server (default: auto) + --enable-dmx Build DMX server (default: no) + --enable-xvfb Build Xvfb server (default: yes) + --enable-xnest Build Xnest server (default: auto) + --enable-xwin Build XWin server (default: auto) + --enable-xprint Build Xprint extension and server (default: no) + --enable-xgl Build Xgl server (default: no) + --enable-xglx Build Xglx xgl module (default: no) + --enable-xegl Build Xegl xgl module (default: no) + --enable-mfb Build legacy mono framebuffer support (default: + enabled) + --enable-cfb Build legacy color framebuffer support (default: + enabled) + --enable-afb Build legacy advanced framebuffer support (default: + enabled) + --enable-kdrive Build kdrive servers (default: no) + --enable-xephyr Build the kdrive Xephyr server (default: auto) + --enable-xsdl Build the kdrive Xsdl server (default: auto) + --enable-xfake Build the kdrive 'fake' server (default: auto) + --enable-xfbdev Build the kdrive framebuffer device server (default: + auto) + --enable-kdrive-vesa Build the kdrive VESA-based servers (default: auto) + --enable-freetype Build Xprint FreeType backend (default: yes) + --enable-install-setuid Install Xorg server as owned by root with setuid bit + (default: auto) + --enable-secure-rpc Enable Secure RPC + --enable-xorgcfg Build xorgcfg GUI configuration utility (default: + no) + --enable-kbd_mode Build kbd_mode utility (default: auto) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-tags[=TAGS] include additional configurations [automatic] + --with-dtrace=PATH Enable dtrace probes (default: enabled if dtrace + found) + --with-xerrordb=PATH Path to XErrorDB file (default: + ${datadir}/X11/XErrorDB) + --with-release-version=STRING + Use release version string in package name + --with-int10=BACKEND int10 backend: vm86, x86emu or stub + --with-vendor-name=VENDOR + Vendor string reported by the server + --with-vendor-name-short=VENDOR + Short version of vendor string reported by the + server + --with-vendor-web=URL Vendor web address reported by the server + --with-module-dir=DIR Directory where modules are installed (default: + $libdir/xorg/modules) + --with-log-dir=DIR Directory where log files are kept (default: + $localstatedir/log) + --with-builder-addr=ADDRESS + Builder address (default: + xorg@lists.freedesktop.org) + --with-os-name=OSNAME Name of OS (default: output of "uname -srm") + --with-os-vendor=OSVENDOR + Name of OS vendor + --with-builderstring=BUILDERSTRING + Additional builder string + --with-fontdir=FONTDIR Path to top level dir where fonts are installed + (default: ${libdir}/X11/fonts) + --with-default-font-path=PATH + Comma separated list of font dirs + --with-xkb-path=PATH Path to XKB base dir (default: ${datadir}/X11/xkb) + --with-xkb-output=PATH Path to XKB output dir (default: + ${datadir}/X11/xkb/compiled) + --with-rgb-path=PATH Path to RGB database (default: ${datadir}/X11/rgb) + --with-serverconfig-path=PATH + Path to server config (default: ${libdir}/xserver) + --with-apple-applications-dir=PATH + Path to the Applications directory (default: + ${bindir}/Applications) + --with-mesa-source=MESA_SOURCE + Path to Mesa source tree + --with-dri-driver-path=PATH + Path to DRI drivers (default: ${libdir}/dri) + --with-freetype-config=PROG + Use FreeType configuration program PROG (default: + auto) + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + PKG_CONFIG path to pkg-config utility + YACC The `Yet Another C Compiler' implementation to use. Defaults to + the first program found out of: `bison -y', `byacc', `yacc'. + YFLAGS The list of arguments that will be passed by default to $YACC. + This script will default YFLAGS to the empty string to avoid a + default value of `-d' given by some make applications. + PIXMAN_CFLAGS + C compiler flags for PIXMAN, overriding pkg-config + PIXMAN_LIBS linker flags for PIXMAN, overriding pkg-config + DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config + DBUS_LIBS linker flags for DBUS, overriding pkg-config + HAL_CFLAGS C compiler flags for HAL, overriding pkg-config + HAL_LIBS linker flags for HAL, overriding pkg-config + XLIB_CFLAGS C compiler flags for XLIB, overriding pkg-config + XLIB_LIBS linker flags for XLIB, overriding pkg-config + GL_CFLAGS C compiler flags for GL, overriding pkg-config + GL_LIBS linker flags for GL, overriding pkg-config + DRIPROTO_CFLAGS + C compiler flags for DRIPROTO, overriding pkg-config + DRIPROTO_LIBS + linker flags for DRIPROTO, overriding pkg-config + LIBDRM_CFLAGS + C compiler flags for LIBDRM, overriding pkg-config + LIBDRM_LIBS linker flags for LIBDRM, overriding pkg-config + XPRINTPROTO_CFLAGS + C compiler flags for XPRINTPROTO, overriding pkg-config + XPRINTPROTO_LIBS + linker flags for XPRINTPROTO, overriding pkg-config + XDMCP_CFLAGS + C compiler flags for XDMCP, overriding pkg-config + XDMCP_LIBS linker flags for XDMCP, overriding pkg-config + XSERVERCFLAGS_CFLAGS + C compiler flags for XSERVERCFLAGS, overriding pkg-config + XSERVERCFLAGS_LIBS + linker flags for XSERVERCFLAGS, overriding pkg-config + XSERVERLIBS_CFLAGS + C compiler flags for XSERVERLIBS, overriding pkg-config + XSERVERLIBS_LIBS + linker flags for XSERVERLIBS, overriding pkg-config + DMXMODULES_CFLAGS + C compiler flags for DMXMODULES, overriding pkg-config + DMXMODULES_LIBS + linker flags for DMXMODULES, overriding pkg-config + XDMXCONFIG_DEP_CFLAGS + C compiler flags for XDMXCONFIG_DEP, overriding pkg-config + XDMXCONFIG_DEP_LIBS + linker flags for XDMXCONFIG_DEP, overriding pkg-config + DMXEXAMPLES_DEP_CFLAGS + C compiler flags for DMXEXAMPLES_DEP, overriding pkg-config + DMXEXAMPLES_DEP_LIBS + linker flags for DMXEXAMPLES_DEP, overriding pkg-config + DMXXMUEXAMPLES_DEP_CFLAGS + C compiler flags for DMXXMUEXAMPLES_DEP, overriding pkg-config + DMXXMUEXAMPLES_DEP_LIBS + linker flags for DMXXMUEXAMPLES_DEP, overriding pkg-config + DMXXIEXAMPLES_DEP_CFLAGS + C compiler flags for DMXXIEXAMPLES_DEP, overriding pkg-config + DMXXIEXAMPLES_DEP_LIBS + linker flags for DMXXIEXAMPLES_DEP, overriding pkg-config + XTSTEXAMPLES_DEP_CFLAGS + C compiler flags for XTSTEXAMPLES_DEP, overriding pkg-config + XTSTEXAMPLES_DEP_LIBS + linker flags for XTSTEXAMPLES_DEP, overriding pkg-config + XRESEXAMPLES_DEP_CFLAGS + C compiler flags for XRESEXAMPLES_DEP, overriding pkg-config + XRESEXAMPLES_DEP_LIBS + linker flags for XRESEXAMPLES_DEP, overriding pkg-config + X11EXAMPLES_DEP_CFLAGS + C compiler flags for X11EXAMPLES_DEP, overriding pkg-config + X11EXAMPLES_DEP_LIBS + linker flags for X11EXAMPLES_DEP, overriding pkg-config + XNESTMODULES_CFLAGS + C compiler flags for XNESTMODULES, overriding pkg-config + XNESTMODULES_LIBS + linker flags for XNESTMODULES, overriding pkg-config + XGLMODULES_CFLAGS + C compiler flags for XGLMODULES, overriding pkg-config + XGLMODULES_LIBS + linker flags for XGLMODULES, overriding pkg-config + XGLXMODULES_CFLAGS + C compiler flags for XGLXMODULES, overriding pkg-config + XGLXMODULES_LIBS + linker flags for XGLXMODULES, overriding pkg-config + DGA_CFLAGS C compiler flags for DGA, overriding pkg-config + DGA_LIBS linker flags for DGA, overriding pkg-config + XF86MISC_CFLAGS + C compiler flags for XF86MISC, overriding pkg-config + XF86MISC_LIBS + linker flags for XF86MISC, overriding pkg-config + XF86VIDMODE_CFLAGS + C compiler flags for XF86VIDMODE, overriding pkg-config + XF86VIDMODE_LIBS + linker flags for XF86VIDMODE, overriding pkg-config + XORG_MODULES_CFLAGS + C compiler flags for XORG_MODULES, overriding pkg-config + XORG_MODULES_LIBS + linker flags for XORG_MODULES, overriding pkg-config + XPRINT_CFLAGS + C compiler flags for XPRINT, overriding pkg-config + XPRINT_LIBS linker flags for XPRINT, overriding pkg-config + FREETYPE_CFLAGS + C compiler flags for FREETYPE, overriding pkg-config + FREETYPE_LIBS + linker flags for FREETYPE, overriding pkg-config + XWINMODULES_CFLAGS + C compiler flags for XWINMODULES, overriding pkg-config + XWINMODULES_LIBS + linker flags for XWINMODULES, overriding pkg-config + XEPHYR_CFLAGS + C compiler flags for XEPHYR, overriding pkg-config + XEPHYR_LIBS linker flags for XEPHYR, overriding pkg-config + TSLIB_CFLAGS + C compiler flags for TSLIB, overriding pkg-config + TSLIB_LIBS linker flags for TSLIB, overriding pkg-config + XORGCONFIG_DEP_CFLAGS + C compiler flags for XORGCONFIG_DEP, overriding pkg-config + XORGCONFIG_DEP_LIBS + linker flags for XORGCONFIG_DEP, overriding pkg-config + XORGCFG_DEP_CFLAGS + C compiler flags for XORGCFG_DEP, overriding pkg-config + XORGCFG_DEP_LIBS + linker flags for XORGCFG_DEP, overriding pkg-config + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +xorg-server configure 1.4 +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by xorg-server $as_me 1.4, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +am__api_version='1.10' + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm -f conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='xorg-server' + VERSION='1.4' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + +{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + +ac_config_headers="$ac_config_headers include/do-not-use-config.h" + +ac_config_headers="$ac_config_headers include/xorg-server.h" + +ac_config_headers="$ac_config_headers include/dix-config.h" + +ac_config_headers="$ac_config_headers include/xgl-config.h" + +ac_config_headers="$ac_config_headers include/xorg-config.h" + +ac_config_headers="$ac_config_headers include/xkb-config.h" + +ac_config_headers="$ac_config_headers include/xwin-config.h" + +ac_config_headers="$ac_config_headers include/kdrive-config.h" + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + +depcc="$CCAS" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CCAS_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CCAS_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CCAS_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CCAS_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CCAS_dependencies_compiler_type" >&6; } +CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then + am__fastdepCCAS_TRUE= + am__fastdepCCAS_FALSE='#' +else + am__fastdepCCAS_TRUE='#' + am__fastdepCCAS_FALSE= +fi + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + + + +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=no +fi + + + +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + +# Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } +if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done + +fi + +SED=$lt_cv_path_SED +{ echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6; } + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + +{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6; } +NM="$lt_cv_path_NM" + +{ echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 +echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix4* | aix5*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump'. + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | kfreebsd*-gnu | dragonfly*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 5261 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + lt_cv_cc_needs_belf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-cygwin* | *-*-mingw* | *-*-pw32*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { echo "$as_me:$LINENO: result: $DLLTOOL" >&5 +echo "${ECHO_T}$DLLTOOL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 +echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AS="${ac_tool_prefix}as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { echo "$as_me:$LINENO: result: $AS" >&5 +echo "${ECHO_T}$AS" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AS="as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 +echo "${ECHO_T}$ac_ct_AS" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +echo "${ECHO_T}$OBJDUMP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; + +esac + +need_locks="$enable_libtool_lock" + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +fi + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + { echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_F77" && break +done + + if test "x$ac_ct_F77" = x; then + F77="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + F77=$ac_ct_F77 + fi +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_f77_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_prog_f77_g=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +G77=`test $ac_compiler_gnu = yes && echo yes` +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# find the maximum length of command line arguments +{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } +else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } +fi + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6; } +else + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } +fi + +{ echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# 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' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +enable_dlopen=no +enable_win32_dll=yes + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8282: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:8286: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8550: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:8554: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } + +if test x"$lt_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8654: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:8658: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix3*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + openbsd*) + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6; } + +if test "$hardcode_action" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + ;; + *) + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + { echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + { echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# Report which library types will actually be built +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# 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. +# +# 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. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + +# Check whether --with-tags was given. +if test "${with_tags+set}" = set; then + withval=$with_tags; tagnames="$withval" +fi + + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +compiler_CXX=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +else + lt_prog_compiler_no_builtin_flag_CXX= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_CXX=yes + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_CXX='+b $libdir' + ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + interix3*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +esac +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + + +cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + for p in `eval $output_verbose_link_cmd`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$rm -f confest.$objext + +# PORTME: override above test on systems where it is broken +case $host_os in +interix3*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +solaris*) + case $cc_basename in + CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + postdeps_CXX='-lCstd -lCrun' + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13398: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:13402: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13502: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:13506: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_CXX" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code=" subroutine t\n return\n end\n" + +# Code to be used in simple link tests +lt_simple_link_test_code=" program t\n end\n" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +GCC_F77="$G77" +LD_F77="$LD" + +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:15072: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:15076: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } + +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } + +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:15176: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:15180: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_F77=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_F77=no + fi + ;; + + interix3*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_F77=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_F77=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_F77=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_F77=yes + else + # We have old collect2 + hardcode_direct_F77=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_F77=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + freebsd1*) + ld_shlibs_F77=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; + + openbsd*) + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; + + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs_F77=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + *) + ld_shlibs_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6; } +test "$ld_shlibs_F77" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6; } + +if test "$hardcode_action_F77" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_F77 + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_F77 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_F77" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no + +old_archive_cmds_GCJ=$old_archive_cmds + + +lt_prog_compiler_no_builtin_flag_GCJ= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:17374: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:17378: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:17642: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:17646: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_GCJ=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:17746: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:17750: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_GCJ=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_GCJ=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_GCJ=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + interix3*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_GCJ=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_GCJ=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_GCJ=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_GCJ=yes + else + # We have old collect2 + hardcode_direct_GCJ=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_GCJ=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ='$convenience' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + freebsd1*) + ld_shlibs_GCJ=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + *) + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; + + openbsd*) + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs_GCJ=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + *) + ld_shlibs_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } +test "$ld_shlibs_GCJ" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6; } + +if test "$hardcode_action_GCJ" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + + case $var in + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_GCJ + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_GCJ + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_GCJ + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_GCJ + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_GCJ + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_GCJ + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_GCJ +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_GCJ + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_GCJ + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_GCJ + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_GCJ + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_GCJ + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_GCJ + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_GCJ + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_GCJ + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_GCJ" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_GCJ + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_GCJ + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_GCJ + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + RC) + + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + +lt_cv_prog_compiler_c_o_RC=yes + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_RC + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_RC + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_RC + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_RC + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_RC" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_RC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + + + + + + + + + + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + PKG_CONFIG="" + fi + +fi +for ac_prog in flex lex +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_LEX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LEX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + { echo "$as_me:$LINENO: result: $LEX" >&5 +echo "${ECHO_T}$LEX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" + +if test "x$LEX" != "x:"; then + cat >conftest.l <<_ACEOF +%% +a { ECHO; } +b { REJECT; } +c { yymore (); } +d { yyless (1); } +e { yyless (input () != 0); } +f { unput (yytext[0]); } +. { BEGIN INITIAL; } +%% +#ifdef YYTEXT_POINTER +extern char *yytext; +#endif +int +main (void) +{ + return ! yylex () + ! yywrap (); +} +_ACEOF +{ (ac_try="$LEX conftest.l" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$LEX conftest.l") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ echo "$as_me:$LINENO: checking lex output file root" >&5 +echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; } +if test "${ac_cv_prog_lex_root+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 +echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} + { (exit 1); exit 1; }; } +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; } +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +if test -z "${LEXLIB+set}"; then + { echo "$as_me:$LINENO: checking lex library" >&5 +echo $ECHO_N "checking lex library... $ECHO_C" >&6; } +if test "${ac_cv_lib_lex+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_save_LIBS=$LIBS + ac_cv_lib_lex='none needed' + for ac_lib in '' -lfl -ll; do + LIBS="$ac_lib $ac_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_lex=$ac_lib +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + test "$ac_cv_lib_lex" != 'none needed' && break + done + LIBS=$ac_save_LIBS + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 +echo "${ECHO_T}$ac_cv_lib_lex" >&6; } + test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex +fi + + +{ echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 +echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; } +if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +ac_save_LIBS=$LIBS +LIBS="$LEXLIB $ac_save_LIBS" +cat >conftest.$ac_ext <<_ACEOF +#define YYTEXT_POINTER 1 +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_prog_lex_yytext_pointer=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; } +if test $ac_cv_prog_lex_yytext_pointer = yes; then + +cat >>confdefs.h <<\_ACEOF +#define YYTEXT_POINTER 1 +_ACEOF + +fi +rm -f conftest.l $LEX_OUTPUT_ROOT.c + +fi +for ac_prog in 'bison -y' byacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_YACC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_YACC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + { echo "$as_me:$LINENO: result: $YACC" >&5 +echo "${ECHO_T}$YACC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_largefile_CC=' -n32'; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=no; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=64; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -f conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 +echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=no; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=1; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +echo "${ECHO_T}$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -f conftest* + fi +fi + + + +for ac_prog in cpp +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_RAWCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $RAWCPP in + [\\/]* | ?:[\\/]*) + ac_cv_path_RAWCPP="$RAWCPP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_RAWCPP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +RAWCPP=$ac_cv_path_RAWCPP +if test -n "$RAWCPP"; then + { echo "$as_me:$LINENO: result: $RAWCPP" >&5 +echo "${ECHO_T}$RAWCPP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$RAWCPP" && break +done +test -n "$RAWCPP" || RAWCPP="${CPP}" + + +# Check for flag to avoid builtin definitions - assumes unix is predefined, +# which is not the best choice for supporting other OS'es, but covers most +# of the ones we need for now. +{ echo "$as_me:$LINENO: checking if $RAWCPP requires -undef" >&5 +echo $ECHO_N "checking if $RAWCPP requires -undef... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +Does cpp redefine unix ? +_ACEOF +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +else + if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS=-undef + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { { echo "$as_me:$LINENO: error: ${RAWCPP} defines unix with or without -undef. I don't know what to do." >&5 +echo "$as_me: error: ${RAWCPP} defines unix with or without -undef. I don't know what to do." >&2;} + { (exit 1); exit 1; }; } + fi +fi +rm -f conftest.$ac_ext + +{ echo "$as_me:$LINENO: checking if $RAWCPP requires -traditional" >&5 +echo $ECHO_N "checking if $RAWCPP requires -traditional... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +Does cpp preserve "whitespace"? +_ACEOF +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +else + if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { { echo "$as_me:$LINENO: error: ${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do." >&5 +echo "$as_me: error: ${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do." >&2;} + { (exit 1); exit 1; }; } + fi +fi +rm -f conftest.$ac_ext + + + + +# Check whether --with-dtrace was given. +if test "${with_dtrace+set}" = set; then + withval=$with_dtrace; WDTRACE=$withval +else + WDTRACE=auto +fi + +if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then + # Extract the first word of "dtrace", so it can be a program name with args. +set dummy dtrace; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_DTRACE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $DTRACE in + [\\/]* | ?:[\\/]*) + ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/sbin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not_found" + ;; +esac +fi +DTRACE=$ac_cv_path_DTRACE +if test -n "$DTRACE"; then + { echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + if test "x$DTRACE" = "xnot_found" ; then + if test "x$WDTRACE" = "xyes" ; then + { { echo "$as_me:$LINENO: error: dtrace requested but not found +See \`config.log' for more details." >&5 +echo "$as_me: error: dtrace requested but not found +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + WDTRACE="no" + fi +fi +if test "x$WDTRACE" != "xno" ; then + +cat >>confdefs.h <<\_ACEOF +#define XSERVER_DTRACE 1 +_ACEOF + +fi + if test "x$WDTRACE" != "xno"; then + XSERVER_DTRACE_TRUE= + XSERVER_DTRACE_FALSE='#' +else + XSERVER_DTRACE_TRUE='#' + XSERVER_DTRACE_FALSE= +fi + + +# DTrace support uses XErrorDB to get request names + +# Check whether --with-xerrordb was given. +if test "${with_xerrordb+set}" = set; then + withval=$with_xerrordb; XERRORDB_PATH="$withval" +else + XERRORDB_PATH="${datadir}/X11/XErrorDB" +fi + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$XERRORDB_PATH\"" + eval ac_define_dir="\"$ac_define_dir\"" + XERRORDB_PATH="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define XERRORDB_PATH "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + + + + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include <$ac_hdr> + +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_opendir=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_opendir=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + + + + + +for ac_header in fcntl.h stdlib.h string.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) + bogus endian macros +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +case $ac_cv_c_bigendian in + yes) + ENDIAN="X_BIG_ENDIAN" ;; + no) + ENDIAN="X_LITTLE_ENDIAN" ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac + + +{ echo "$as_me:$LINENO: checking for unsigned long" >&5 +echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6; } +if test "${ac_cv_type_unsigned_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef unsigned long ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_unsigned_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_unsigned_long=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5 +echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6; } + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of unsigned long" >&5 +echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_unsigned_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_unsigned_long=$ac_lo;; +'') if test "$ac_cv_type_unsigned_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (unsigned long) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_unsigned_long=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned long ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_unsigned_long=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_unsigned_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (unsigned long) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_unsigned_long=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long +_ACEOF + + +if test "$ac_cv_sizeof_unsigned_long" = 8; then + +cat >>confdefs.h <<\_ACEOF +#define _XSERVER64 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } +if test "${ac_cv_type_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef pid_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_pid_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_pid_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } +if test $ac_cv_type_pid_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + + +# Checks for headers/macros for byte swapping +# Known variants: +# bswap_16, bswap_32, bswap_64 (glibc) +# __swap16, __swap32, __swap64 (OpenBSD) +# bswap16, bswap32, bswap64 (other BSD's) +# and a fallback to local macros if none of the above are found + +# if is found, assume it's the correct version + +for ac_header in byteswap.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +# if is found, have to check which version +if test "${ac_cv_header_sys_endian_h+set}" = set; then + { echo "$as_me:$LINENO: checking for sys/endian.h" >&5 +echo $ECHO_N "checking for sys/endian.h... $ECHO_C" >&6; } +if test "${ac_cv_header_sys_endian_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_endian_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_endian_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking sys/endian.h usability" >&5 +echo $ECHO_N "checking sys/endian.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking sys/endian.h presence" >&5 +echo $ECHO_N "checking sys/endian.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: sys/endian.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/endian.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/endian.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/endian.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/endian.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/endian.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/endian.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/endian.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/endian.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/endian.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/endian.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/endian.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/endian.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/endian.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/endian.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/endian.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for sys/endian.h" >&5 +echo $ECHO_N "checking for sys/endian.h... $ECHO_C" >&6; } +if test "${ac_cv_header_sys_endian_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sys_endian_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_endian_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_endian_h" >&6; } + +fi +if test $ac_cv_header_sys_endian_h = yes; then + HAVE_SYS_ENDIAN_H="yes" +else + HAVE_SYS_ENDIAN_H="no" +fi + + + +if test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then + { echo "$as_me:$LINENO: checking for __swap16 variant of byteswapping macros" >&5 +echo $ECHO_N "checking for __swap16 variant of byteswapping macros... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include + +int +main () +{ + +int a = 1, b; +b = __swap16(a); + + ; + return 0; +} + +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + SYS_ENDIAN__SWAP='yes' +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + SYS_ENDIAN__SWAP='no' +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { echo "$as_me:$LINENO: result: $SYS_ENDIAN__SWAP" >&5 +echo "${ECHO_T}$SYS_ENDIAN__SWAP" >&6; } + + { echo "$as_me:$LINENO: checking for bswap16 variant of byteswapping macros" >&5 +echo $ECHO_N "checking for bswap16 variant of byteswapping macros... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include + +int +main () +{ + +int a = 1, b; +b = bswap16(a); + + ; + return 0; +} + +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + SYS_ENDIAN_BSWAP='yes' +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + SYS_ENDIAN_BSWAP='no' +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { echo "$as_me:$LINENO: result: $SYS_ENDIAN_BSWAP" >&5 +echo "${ECHO_T}$SYS_ENDIAN_BSWAP" >&6; } + + if test "$SYS_ENDIAN_BSWAP" = "yes" ; then + USE_SYS_ENDIAN_H=yes + BSWAP=bswap + else + if test "$SYS_ENDIAN__SWAP" = "yes" ; then + USE_SYS_ENDIAN_H=yes + BSWAP=__swap + else + USE_SYS_ENDIAN_H=no + fi + fi + + if test "$USE_SYS_ENDIAN_H" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define USE_SYS_ENDIAN_H 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define bswap_16 ${BSWAP}16 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define bswap_32 ${BSWAP}32 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define bswap_64 ${BSWAP}64 +_ACEOF + + fi +fi + + +for ac_func in vprintf +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +{ echo "$as_me:$LINENO: checking for _doprnt" >&5 +echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; } +if test "${ac_cv_func__doprnt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define _doprnt to an innocuous variant, in case declares _doprnt. + For example, HP-UX 11i declares gettimeofday. */ +#define _doprnt innocuous__doprnt + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char _doprnt (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef _doprnt + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char _doprnt (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub__doprnt || defined __stub____doprnt +choke me +#endif + +int +main () +{ +return _doprnt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func__doprnt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func__doprnt=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 +echo "${ECHO_T}$ac_cv_func__doprnt" >&6; } +if test $ac_cv_func__doprnt = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DOPRNT 1 +_ACEOF + +fi + +fi +done + + + + + + + + + + + + + + + + + +for ac_func in geteuid getuid link memmove memset mkstemp strchr strrchr \ + strtol getopt getopt_long vsnprintf walkcontext backtrace \ + getisax +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ echo "$as_me:$LINENO: checking for working alloca.h" >&5 +echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; } +if test "${ac_cv_working_alloca_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_working_alloca_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_working_alloca_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 +echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA_H 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for alloca" >&5 +echo $ECHO_N "checking for alloca... $ECHO_C" >&6; } +if test "${ac_cv_func_alloca_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +int +main () +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_alloca_works=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_alloca_works=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 +echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; } + +if test $ac_cv_func_alloca_works = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA 1 +_ACEOF + +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. + +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext + +cat >>confdefs.h <<\_ACEOF +#define C_ALLOCA 1 +_ACEOF + + +{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 +echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; } +if test "${ac_cv_os_cray+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 +echo "${ECHO_T}$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done +fi + +{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 +echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; } +if test "${ac_cv_c_stack_direction+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_stack_direction=0 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +find_stack_direction () +{ + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; +} + +int +main () +{ + return find_stack_direction () < 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_stack_direction=1 +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_stack_direction=-1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 +echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; } + +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + + +fi + +{ echo "$as_me:$LINENO: checking for getdtablesize" >&5 +echo $ECHO_N "checking for getdtablesize... $ECHO_C" >&6; } +if test "${ac_cv_func_getdtablesize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getdtablesize to an innocuous variant, in case declares getdtablesize. + For example, HP-UX 11i declares gettimeofday. */ +#define getdtablesize innocuous_getdtablesize + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getdtablesize (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getdtablesize + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getdtablesize (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_getdtablesize || defined __stub___getdtablesize +choke me +#endif + +int +main () +{ +return getdtablesize (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_getdtablesize=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getdtablesize=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_getdtablesize" >&5 +echo "${ECHO_T}$ac_cv_func_getdtablesize" >&6; } +if test $ac_cv_func_getdtablesize = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAS_GETDTABLESIZE 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for getifaddrs" >&5 +echo $ECHO_N "checking for getifaddrs... $ECHO_C" >&6; } +if test "${ac_cv_func_getifaddrs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getifaddrs to an innocuous variant, in case declares getifaddrs. + For example, HP-UX 11i declares gettimeofday. */ +#define getifaddrs innocuous_getifaddrs + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getifaddrs (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getifaddrs + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getifaddrs (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_getifaddrs || defined __stub___getifaddrs +choke me +#endif + +int +main () +{ +return getifaddrs (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_getifaddrs=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getifaddrs=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_getifaddrs" >&5 +echo "${ECHO_T}$ac_cv_func_getifaddrs" >&6; } +if test $ac_cv_func_getifaddrs = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAS_GETIFADDRS 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for getpeereid" >&5 +echo $ECHO_N "checking for getpeereid... $ECHO_C" >&6; } +if test "${ac_cv_func_getpeereid+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getpeereid to an innocuous variant, in case declares getpeereid. + For example, HP-UX 11i declares gettimeofday. */ +#define getpeereid innocuous_getpeereid + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getpeereid (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getpeereid + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getpeereid (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_getpeereid || defined __stub___getpeereid +choke me +#endif + +int +main () +{ +return getpeereid (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_getpeereid=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getpeereid=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpeereid" >&5 +echo "${ECHO_T}$ac_cv_func_getpeereid" >&6; } +if test $ac_cv_func_getpeereid = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAS_GETPEEREID 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for getpeerucred" >&5 +echo $ECHO_N "checking for getpeerucred... $ECHO_C" >&6; } +if test "${ac_cv_func_getpeerucred+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getpeerucred to an innocuous variant, in case declares getpeerucred. + For example, HP-UX 11i declares gettimeofday. */ +#define getpeerucred innocuous_getpeerucred + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getpeerucred (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getpeerucred + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getpeerucred (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_getpeerucred || defined __stub___getpeerucred +choke me +#endif + +int +main () +{ +return getpeerucred (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_getpeerucred=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getpeerucred=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpeerucred" >&5 +echo "${ECHO_T}$ac_cv_func_getpeerucred" >&6; } +if test $ac_cv_func_getpeerucred = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAS_GETPEERUCRED 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for strlcat" >&5 +echo $ECHO_N "checking for strlcat... $ECHO_C" >&6; } +if test "${ac_cv_func_strlcat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define strlcat to an innocuous variant, in case declares strlcat. + For example, HP-UX 11i declares gettimeofday. */ +#define strlcat innocuous_strlcat + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strlcat (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef strlcat + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char strlcat (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_strlcat || defined __stub___strlcat +choke me +#endif + +int +main () +{ +return strlcat (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_strlcat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_strlcat=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_strlcat" >&5 +echo "${ECHO_T}$ac_cv_func_strlcat" >&6; } +if test $ac_cv_func_strlcat = yes; then + HAVE_STRLCAT=yes +else + HAVE_STRLCAT=no +fi + + if test x$HAVE_STRLCAT = xno; then + NEED_STRLCAT_TRUE= + NEED_STRLCAT_FALSE='#' +else + NEED_STRLCAT_TRUE='#' + NEED_STRLCAT_FALSE= +fi + + + if test x$HAVE_VSNPRINTF = xno; then + NEED_VSNPRINTF_TRUE= + NEED_VSNPRINTF_FALSE='#' +else + NEED_VSNPRINTF_TRUE='#' + NEED_VSNPRINTF_FALSE= +fi + + +{ echo "$as_me:$LINENO: checking for mmap" >&5 +echo $ECHO_N "checking for mmap... $ECHO_C" >&6; } +if test "${ac_cv_func_mmap+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define mmap to an innocuous variant, in case declares mmap. + For example, HP-UX 11i declares gettimeofday. */ +#define mmap innocuous_mmap + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char mmap (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef mmap + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char mmap (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_mmap || defined __stub___mmap +choke me +#endif + +int +main () +{ +return mmap (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_mmap=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_mmap=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 +echo "${ECHO_T}$ac_cv_func_mmap" >&6; } +if test $ac_cv_func_mmap = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAS_MMAP 1 +_ACEOF + +fi + + + +{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 +echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; } +if test "${ac_cv_lib_m_sqrt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sqrt (); +int +main () +{ +return sqrt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_m_sqrt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_m_sqrt=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5 +echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; } +if test $ac_cv_lib_m_sqrt = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + +{ echo "$as_me:$LINENO: checking for cbrt in -lm" >&5 +echo $ECHO_N "checking for cbrt in -lm... $ECHO_C" >&6; } +if test "${ac_cv_lib_m_cbrt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char cbrt (); +int +main () +{ +return cbrt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_m_cbrt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_m_cbrt=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_cbrt" >&5 +echo "${ECHO_T}$ac_cv_lib_m_cbrt" >&6; } +if test $ac_cv_lib_m_cbrt = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CBRT 1 +_ACEOF + +fi + + + + + +for ac_header in ndbm.h dbm.h rpcsvc/dbm.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + +for ac_header in linux/agpgart.h sys/agpio.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + AGP=yes +fi + +done + + if test "x$AGP" = xyes; then + AGP_TRUE= + AGP_FALSE='#' +else + AGP_TRUE='#' + AGP_FALSE= +fi + + + +for ac_header in linux/apm_bios.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + LNXAPM=yes +fi + +done + + if test "x$LNXAPM" = xyes; then + LNXAPM_TRUE= + LNXAPM_FALSE='#' +else + LNXAPM_TRUE='#' + LNXAPM_FALSE= +fi + + + +for ac_header in linux/fb.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + FBDEV=yes +fi + +done + + if test "x$FBDEV" = xyes; then + FBDEVHW_TRUE= + FBDEVHW_FALSE='#' +else + FBDEVHW_TRUE='#' + FBDEVHW_FALSE= +fi + + + +for ac_header in asm/mtrr.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + ac_cv_asm_mtrr_h=yes +fi + +done + +if test "x$ac_cv_asm_mtrr_h" = xyes; then + HAVE_MTRR=yes +fi + + +for ac_header in sys/memrange.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + ac_cv_memrange_h=yes +fi + +done + +if test "x$ac_cv_memrange_h" = xyes; then + HAVE_MTRR=yes +fi + +if test "x$HAVE_MTRR" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAS_MTRR_SUPPORT 1 +_ACEOF + +fi + + +for ac_header in machine/mtrr.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + ac_cv_machine_mtrr_h=yes +fi + +done + +if test "x$ac_cv_machine_mtrr_h" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAS_MTRR_BUILTIN 1 +_ACEOF + +fi + + +for ac_header in sys/linker.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + ac_cv_sys_linker_h=yes +else + ac_cv_sys_linker_h=no +fi + +done + + if test "x$ac_cv_sys_linker_h" = xyes; then + FREEBSD_KLDLOAD_TRUE= + FREEBSD_KLDLOAD_FALSE='#' +else + FREEBSD_KLDLOAD_TRUE='#' + FREEBSD_KLDLOAD_FALSE= +fi + + +{ echo "$as_me:$LINENO: checking for SYSV IPC" >&5 +echo $ECHO_N "checking for SYSV IPC... $ECHO_C" >&6; } +if test "${ac_cv_sysv_ipc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include + +int +main () +{ + +{ + int id; + id = shmget(IPC_PRIVATE, 512, SHM_W | SHM_R); + if (id < 0) return -1; + return shmctl(id, IPC_RMID, 0); +} + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_sysv_ipc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_sysv_ipc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sysv_ipc" >&5 +echo "${ECHO_T}$ac_cv_sysv_ipc" >&6; } +if test "x$ac_cv_sysv_ipc" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYSV_IPC 1 +_ACEOF + +fi + +if test -c /dev/xf86 ; then + +cat >>confdefs.h <<\_ACEOF +#define HAS_APERTURE_DRV 1 +_ACEOF + +fi + +if test "${ac_cv_header_execinfo_h+set}" = set; then + { echo "$as_me:$LINENO: checking for execinfo.h" >&5 +echo $ECHO_N "checking for execinfo.h... $ECHO_C" >&6; } +if test "${ac_cv_header_execinfo_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_execinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_execinfo_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking execinfo.h usability" >&5 +echo $ECHO_N "checking execinfo.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking execinfo.h presence" >&5 +echo $ECHO_N "checking execinfo.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: execinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: execinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: execinfo.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: execinfo.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: execinfo.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: execinfo.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: execinfo.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: execinfo.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: execinfo.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: execinfo.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: execinfo.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: execinfo.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: execinfo.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: execinfo.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: execinfo.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: execinfo.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for execinfo.h" >&5 +echo $ECHO_N "checking for execinfo.h... $ECHO_C" >&6; } +if test "${ac_cv_header_execinfo_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_execinfo_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_execinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_execinfo_h" >&6; } + +fi +if test $ac_cv_header_execinfo_h = yes; then + + { echo "$as_me:$LINENO: checking for backtrace in -lc" >&5 +echo $ECHO_N "checking for backtrace in -lc... $ECHO_C" >&6; } +if test "${ac_cv_lib_c_backtrace+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char backtrace (); +int +main () +{ +return backtrace (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_c_backtrace=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_c_backtrace=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_backtrace" >&5 +echo "${ECHO_T}$ac_cv_lib_c_backtrace" >&6; } +if test $ac_cv_lib_c_backtrace = yes; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BACKTRACE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_EXECINFO_H 1 +_ACEOF + + +fi + + +fi + + + +DEFAULT_INT10="x86emu" +use_x86_asm="no" + + +case $host_cpu in + alpha*) + ALPHA_VIDEO=yes + case $host_os in + *netbsd*) +cat >>confdefs.h <<\_ACEOF +#define USE_ALPHA_PIO 1 +_ACEOF + ;; + esac + ;; + arm*) + ARM_VIDEO=yes + ;; + i*86) + use_x86_asm="yes" + I386_VIDEO=yes + case $host_os in + darwin*) use_x86_asm="no" ;; + *linux*) DEFAULT_INT10=vm86 ;; + *freebsd*) cat >>confdefs.h <<\_ACEOF +#define USE_DEV_IO 1 +_ACEOF + ;; + *netbsd*) cat >>confdefs.h <<\_ACEOF +#define USE_I386_IOPL 1 +_ACEOF + + SYS_LIBS=-li386 + ;; + *openbsd*) cat >>confdefs.h <<\_ACEOF +#define USE_I386_IOPL 1 +_ACEOF + + SYS_LIBS=-li386 + ;; + esac + ;; + powerpc*) + PPC_VIDEO=yes + case $host_os in + *freebsd*) DEFAULT_INT10=stub ;; + esac + ;; + sparc*) + xorg_loader_sparcmuldiv="yes" + SPARC64_VIDEO=yes + BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c" + ;; + x86_64*|amd64*) + use_x86_asm="yes" + I386_VIDEO=yes + case $host_os in + darwin*) use_x86_asm="no" ;; + *freebsd*) +cat >>confdefs.h <<\_ACEOF +#define USE_DEV_IO 1 +_ACEOF + ;; + *netbsd*) +cat >>confdefs.h <<\_ACEOF +#define USE_I386_IOPL 1 +_ACEOF + + SYS_LIBS=-lx86_64 + ;; + *openbsd*) +cat >>confdefs.h <<\_ACEOF +#define USE_AMD64_IOPL 1 +_ACEOF + + SYS_LIBS=-lamd64 + ;; + esac + ;; +esac + + if test "x$ALPHA_VIDEO" = xyes; then + ALPHA_VIDEO_TRUE= + ALPHA_VIDEO_FALSE='#' +else + ALPHA_VIDEO_TRUE='#' + ALPHA_VIDEO_FALSE= +fi + + if test "x$ARM_VIDEO" = xyes; then + ARM_VIDEO_TRUE= + ARM_VIDEO_FALSE='#' +else + ARM_VIDEO_TRUE='#' + ARM_VIDEO_FALSE= +fi + + if test "x$I386_VIDEO" = xyes; then + I386_VIDEO_TRUE= + I386_VIDEO_FALSE='#' +else + I386_VIDEO_TRUE='#' + I386_VIDEO_FALSE= +fi + + if test "x$PPC_VIDEO" = xyes; then + PPC_VIDEO_TRUE= + PPC_VIDEO_FALSE='#' +else + PPC_VIDEO_TRUE='#' + PPC_VIDEO_FALSE= +fi + + if test "x$SPARC64_VIDEO" = xyes; then + SPARC64_VIDEO_TRUE= + SPARC64_VIDEO_FALSE='#' +else + SPARC64_VIDEO_TRUE='#' + SPARC64_VIDEO_FALSE= +fi + + +DRI=no +KDRIVE_HW=no +case $host_os in + *freebsd*) + case $host_os in + kfreebsd*-gnu) ;; + *) +cat >>confdefs.h <<\_ACEOF +#define CSRG_BASED 1 +_ACEOF + ;; + esac + +cat >>confdefs.h <<\_ACEOF +#define PCCONS_SUPPORT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define PCVT_SUPPORT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define SYSCONS_SUPPORT 1 +_ACEOF + + DRI=yes + ;; + *netbsd*) + +cat >>confdefs.h <<\_ACEOF +#define CSRG_BASED 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define PCCONS_SUPPORT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define PCVT_SUPPORT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define WSCONS_SUPPORT 1 +_ACEOF + + DRI=yes + ;; + *openbsd*) + +cat >>confdefs.h <<\_ACEOF +#define CSRG_BASED 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define PCVT_SUPPORT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define WSCONS_SUPPORT 1 +_ACEOF + + ;; + *linux*) + DRI=yes + KDRIVE_HW=yes + ;; + *solaris*) + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + DRI=yes +else + DRI=no +fi + ;; +esac + if test "x$KDRIVE_HW" = xyes; then + KDRIVE_HW_TRUE= + KDRIVE_HW_FALSE='#' +else + KDRIVE_HW_TRUE='#' + KDRIVE_HW_FALSE= +fi + + + + +# Check whether --with-release-version was given. +if test "${with_release_version+set}" = set; then + withval=$with_release_version; RELEASE_VERSION="$withval" +else + RELEASE_VERSION="" +fi + + if test "x$RELEASE_VERSION" != "x"; then + PACKAGE="$PACKAGE-$RELEASE_VERSION" + PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" + { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5 +echo "$as_me: Building with package name set to $PACKAGE" >&6;} + fi + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1` +_ACEOF + + PVM=`echo $PACKAGE_VERSION | cut -d . -f 2` + if test "x$PVM" = "x"; then + PVM="0" + fi + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_MINOR $PVM +_ACEOF + + PVP=`echo $PACKAGE_VERSION | cut -d . -f 3` + if test "x$PVP" = "x"; then + PVP="0" + fi + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_PATCHLEVEL $PVP +_ACEOF + + +PVMAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1` +PVS=`echo $PACKAGE_VERSION | cut -d . -f 4` +if test "x$PVS" = "x"; then + PVS="0" +fi + +VENDOR_RELEASE="((($PVMAJOR) * 10000000) + (($PVM) * 100000) + (($PVP) * 1000) + $PVS)" +VENDOR_MAN_VERSION="Version ${PACKAGE_VERSION}" + +VENDOR_NAME="The X.Org Foundation" +VENDOR_NAME_SHORT="X.Org" +RELEASE_DATE="5 September 2007" +VENDOR_WEB="http://wiki.x.org" + + + +# Check whether --enable-werror was given. +if test "${enable_werror+set}" = set; then + enableval=$enable_werror; WERROR=$enableval +else + WERROR=no +fi + +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then + enableval=$enable_debug; DEBUGGING=$enableval +else + DEBUGGING=no +fi + + +# Check whether --with-int10 was given. +if test "${with_int10+set}" = set; then + withval=$with_int10; INT10="$withval" +else + INT10="$DEFAULT_INT10" +fi + + +# Check whether --with-vendor-name was given. +if test "${with_vendor_name+set}" = set; then + withval=$with_vendor_name; VENDOR_NAME="$withval" +fi + + +# Check whether --with-vendor-name-short was given. +if test "${with_vendor_name_short+set}" = set; then + withval=$with_vendor_name_short; VENDOR_NAME_SHORT="$withval" +fi + + +# Check whether --with-vendor-web was given. +if test "${with_vendor_web+set}" = set; then + withval=$with_vendor_web; VENDOR_WEB="$withval" +fi + + +# Check whether --with-module-dir was given. +if test "${with_module_dir+set}" = set; then + withval=$with_module_dir; moduledir="$withval" +else + moduledir="${libdir}/xorg/modules" +fi + + +# Check whether --with-log-dir was given. +if test "${with_log_dir+set}" = set; then + withval=$with_log_dir; logdir="$withval" +else + logdir="$localstatedir/log" +fi + + +# Check whether --with-builder-addr was given. +if test "${with_builder_addr+set}" = set; then + withval=$with_builder_addr; BUILDERADDR="$withval" +else + BUILDERADDR="xorg@lists.freedesktop.org" +fi + + +# Check whether --with-os-name was given. +if test "${with_os_name+set}" = set; then + withval=$with_os_name; OSNAME="$withval" +else + OSNAME=`uname -srm` +fi + + +# Check whether --with-os-vendor was given. +if test "${with_os_vendor+set}" = set; then + withval=$with_os_vendor; OSVENDOR="$withval" +else + OSVENDOR="" +fi + + +# Check whether --with-builderstring was given. +if test "${with_builderstring+set}" = set; then + withval=$with_builderstring; BUILDERSTRING="$withval" + +fi + + +# Check whether --with-fontdir was given. +if test "${with_fontdir+set}" = set; then + withval=$with_fontdir; FONTDIR="$withval" +else + FONTDIR="${libdir}/X11/fonts" +fi + +DEFAULT_FONT_PATH="${FONTDIR}/misc/,${FONTDIR}/TTF/,${FONTDIR}/OTF,${FONTDIR}/Type1/,${FONTDIR}/100dpi/,${FONTDIR}/75dpi/" + +# Check whether --with-default-font-path was given. +if test "${with_default_font_path+set}" = set; then + withval=$with_default_font_path; FONTPATH="$withval" +else + FONTPATH="${DEFAULT_FONT_PATH}" +fi + + +# Check whether --with-xkb-path was given. +if test "${with_xkb_path+set}" = set; then + withval=$with_xkb_path; XKBPATH="$withval" +else + XKBPATH="${datadir}/X11/xkb" +fi + + +# Check whether --with-xkb-output was given. +if test "${with_xkb_output+set}" = set; then + withval=$with_xkb_output; XKBOUTPUT="$withval" +else + XKBOUTPUT="compiled" +fi + + +# Check whether --with-rgb-path was given. +if test "${with_rgb_path+set}" = set; then + withval=$with_rgb_path; RGBPATH="$withval" +else + RGBPATH="${datadir}/X11/rgb" +fi + + +# Check whether --with-serverconfig-path was given. +if test "${with_serverconfig_path+set}" = set; then + withval=$with_serverconfig_path; SERVERCONFIG="$withval" +else + SERVERCONFIG="${libdir}/xserver" +fi + +APPLE_APPLICATIONS_DIR="${bindir}/Applications" + +# Check whether --with-apple-applications-dir was given. +if test "${with_apple_applications_dir+set}" = set; then + withval=$with_apple_applications_dir; APPLE_APPLICATIONS_DIR="${withval}" . + APPLE_APPLICATIONS_DIR="${bindir}/Applications" +fi + +# Check whether --enable-builddocs was given. +if test "${enable_builddocs+set}" = set; then + enableval=$enable_builddocs; BUILDDOCS=$enableval +else + BUILDDOCS=no +fi + +# Check whether --enable-install-libxf86config was given. +if test "${enable_install_libxf86config+set}" = set; then + enableval=$enable_install_libxf86config; INSTALL_LIBXF86CONFIG=$enableval +else + INSTALL_LIBXF86CONFIG=no +fi + +# Check whether --enable-builtin-fonts was given. +if test "${enable_builtin_fonts+set}" = set; then + enableval=$enable_builtin_fonts; BUILTIN_FONTS=$enableval +else + BUILTIN_FONTS=no +fi + +# Check whether --enable-null-root-cursor was given. +if test "${enable_null_root_cursor+set}" = set; then + enableval=$enable_null_root_cursor; NULL_ROOT_CURSOR=$enableval +else + NULL_ROOT_CURSOR=no +fi + + + +# Check whether --with-mesa-source was given. +if test "${with_mesa_source+set}" = set; then + withval=$with_mesa_source; MESA_SOURCE="$withval" +else + MESA_SOURCE="" +fi + + +# Check whether --with-dri-driver-path was given. +if test "${with_dri_driver_path+set}" = set; then + withval=$with_dri_driver_path; DRI_DRIVER_PATH="$withval" +else + DRI_DRIVER_PATH="${libdir}/dri" +fi + +# Check whether --enable-aiglx was given. +if test "${enable_aiglx+set}" = set; then + enableval=$enable_aiglx; AIGLX=$enableval +else + AIGLX=yes +fi + +# Check whether --enable-glx-tls was given. +if test "${enable_glx_tls+set}" = set; then + enableval=$enable_glx_tls; GLX_USE_TLS=$enableval +else + GLX_USE_TLS=no +fi + + +# Check whether --enable-composite was given. +if test "${enable_composite+set}" = set; then + enableval=$enable_composite; COMPOSITE=$enableval +else + COMPOSITE=yes +fi + +# Check whether --enable-mitshm was given. +if test "${enable_mitshm+set}" = set; then + enableval=$enable_mitshm; MITSHM=$enableval +else + MITSHM=yes +fi + +# Check whether --enable-xres was given. +if test "${enable_xres+set}" = set; then + enableval=$enable_xres; RES=$enableval +else + RES=yes +fi + +# Check whether --enable-xtrap was given. +if test "${enable_xtrap+set}" = set; then + enableval=$enable_xtrap; XTRAP=$enableval +else + XTRAP=yes +fi + +# Check whether --enable-record was given. +if test "${enable_record+set}" = set; then + enableval=$enable_record; RECORD=$enableval +else + RECORD=yes +fi + +# Check whether --enable-xv was given. +if test "${enable_xv+set}" = set; then + enableval=$enable_xv; XV=$enableval +else + XV=yes +fi + +# Check whether --enable-quartz was given. +if test "${enable_quartz+set}" = set; then + enableval=$enable_quartz; XQUARTZ=$enableval +else + XQUARTZ=auto +fi + +# Check whether --enable-xvmc was given. +if test "${enable_xvmc+set}" = set; then + enableval=$enable_xvmc; XVMC=$enableval +else + XVMC=yes +fi + +# Check whether --enable-dga was given. +if test "${enable_dga+set}" = set; then + enableval=$enable_dga; DGA=$enableval +else + DGA=auto +fi + +# Check whether --enable-screensaver was given. +if test "${enable_screensaver+set}" = set; then + enableval=$enable_screensaver; SCREENSAVER=$enableval +else + SCREENSAVER=yes +fi + +# Check whether --enable-xdmcp was given. +if test "${enable_xdmcp+set}" = set; then + enableval=$enable_xdmcp; XDMCP=$enableval +else + XDMCP=auto +fi + +# Check whether --enable-xdm-auth-1 was given. +if test "${enable_xdm_auth_1+set}" = set; then + enableval=$enable_xdm_auth_1; XDMAUTH=$enableval +else + XDMAUTH=auto +fi + +# Check whether --enable-glx was given. +if test "${enable_glx+set}" = set; then + enableval=$enable_glx; GLX=$enableval +else + GLX=yes +fi + +# Check whether --enable-dri was given. +if test "${enable_dri+set}" = set; then + enableval=$enable_dri; DRI=$enableval +fi + +# Check whether --enable-xinerama was given. +if test "${enable_xinerama+set}" = set; then + enableval=$enable_xinerama; XINERAMA=$enableval +else + XINERAMA=yes +fi + +# Check whether --enable-xf86vidmode was given. +if test "${enable_xf86vidmode+set}" = set; then + enableval=$enable_xf86vidmode; XF86VIDMODE=$enableval +else + XF86VIDMODE=auto +fi + +# Check whether --enable-xf86misc was given. +if test "${enable_xf86misc+set}" = set; then + enableval=$enable_xf86misc; XF86MISC=$enableval +else + XF86MISC=auto +fi + +# Check whether --enable-xace was given. +if test "${enable_xace+set}" = set; then + enableval=$enable_xace; XACE=$enableval +else + XACE=yes +fi + +# Check whether --enable-xcsecurity was given. +if test "${enable_xcsecurity+set}" = set; then + enableval=$enable_xcsecurity; XCSECURITY=$enableval +else + XCSECURITY=$XACE +fi + +# Check whether --enable-appgroup was given. +if test "${enable_appgroup+set}" = set; then + enableval=$enable_appgroup; APPGROUP=$enableval +else + APPGROUP=$XCSECURITY +fi + +# Check whether --enable-xcalibrate was given. +if test "${enable_xcalibrate+set}" = set; then + enableval=$enable_xcalibrate; XCALIBRATE=$enableval +else + XCALIBRATE=no +fi + +# Check whether --enable-tslib was given. +if test "${enable_tslib+set}" = set; then + enableval=$enable_tslib; TSLIB=$enableval +else + TSLIB=no +fi + +# Check whether --enable-xevie was given. +if test "${enable_xevie+set}" = set; then + enableval=$enable_xevie; XEVIE=$enableval +else + XEVIE=yes +fi + +# Check whether --enable-cup was given. +if test "${enable_cup+set}" = set; then + enableval=$enable_cup; CUP=$enableval +else + CUP=yes +fi + +# Check whether --enable-evi was given. +if test "${enable_evi+set}" = set; then + enableval=$enable_evi; EVI=$enableval +else + EVI=yes +fi + +# Check whether --enable-multibuffer was given. +if test "${enable_multibuffer+set}" = set; then + enableval=$enable_multibuffer; MULTIBUFFER=$enableval +else + MULTIBUFFER=no +fi + +# Check whether --enable-fontcache was given. +if test "${enable_fontcache+set}" = set; then + enableval=$enable_fontcache; FONTCACHE=$enableval +else + FONTCACHE=no +fi + +# Check whether --enable-dbe was given. +if test "${enable_dbe+set}" = set; then + enableval=$enable_dbe; DBE=$enableval +else + DBE=yes +fi + +# Check whether --enable-xf86bigfont was given. +if test "${enable_xf86bigfont+set}" = set; then + enableval=$enable_xf86bigfont; XF86BIGFONT=$enableval +else + XF86BIGFONT=yes +fi + +# Check whether --enable-dpms was given. +if test "${enable_dpms+set}" = set; then + enableval=$enable_dpms; DPMSExtension=$enableval +else + DPMSExtension=yes +fi + +# Check whether --enable-config-dbus was given. +if test "${enable_config_dbus+set}" = set; then + enableval=$enable_config_dbus; CONFIG_DBUS_API=$enableval +else + CONFIG_DBUS_API=no +fi + +# Check whether --enable-config-hal was given. +if test "${enable_config_hal+set}" = set; then + enableval=$enable_config_hal; CONFIG_HAL=$enableval +else + CONFIG_HAL=auto +fi + +# Check whether --enable-xfree86-utils was given. +if test "${enable_xfree86_utils+set}" = set; then + enableval=$enable_xfree86_utils; XF86UTILS=$enableval +else + XF86UTILS=yes +fi + + +# Check whether --enable-xorg was given. +if test "${enable_xorg+set}" = set; then + enableval=$enable_xorg; XORG=$enableval +else + XORG=auto +fi + +# Check whether --enable-dmx was given. +if test "${enable_dmx+set}" = set; then + enableval=$enable_dmx; DMX=$enableval +else + DMX=no +fi + +# Check whether --enable-xvfb was given. +if test "${enable_xvfb+set}" = set; then + enableval=$enable_xvfb; XVFB=$enableval +else + XVFB=yes +fi + +# Check whether --enable-xnest was given. +if test "${enable_xnest+set}" = set; then + enableval=$enable_xnest; XNEST=$enableval +else + XNEST=auto +fi + +# Check whether --enable-xwin was given. +if test "${enable_xwin+set}" = set; then + enableval=$enable_xwin; XWIN=$enableval +else + XWIN=auto +fi + +# Check whether --enable-xprint was given. +if test "${enable_xprint+set}" = set; then + enableval=$enable_xprint; XPRINT=$enableval +else + XPRINT=no +fi + +# Check whether --enable-xgl was given. +if test "${enable_xgl+set}" = set; then + enableval=$enable_xgl; XGL=$enableval +else + XGL=no +fi + +# Check whether --enable-xglx was given. +if test "${enable_xglx+set}" = set; then + enableval=$enable_xglx; XGLX=$enableval +else + XGLX=no +fi + +# Check whether --enable-xegl was given. +if test "${enable_xegl+set}" = set; then + enableval=$enable_xegl; XEGL=$enableval +else + XEGL=no +fi + +# Check whether --enable-mfb was given. +if test "${enable_mfb+set}" = set; then + enableval=$enable_mfb; MFB=$enableval +else + MFB=$XORG +fi + +# Check whether --enable-cfb was given. +if test "${enable_cfb+set}" = set; then + enableval=$enable_cfb; CFB=$enableval +else + CFB=$XORG +fi + +# Check whether --enable-afb was given. +if test "${enable_afb+set}" = set; then + enableval=$enable_afb; AFB=$enableval +else + AFB=$XORG +fi + +# Check whether --enable-kdrive was given. +if test "${enable_kdrive+set}" = set; then + enableval=$enable_kdrive; KDRIVE=$enableval +else + KDRIVE=no +fi + +# Check whether --enable-xephyr was given. +if test "${enable_xephyr+set}" = set; then + enableval=$enable_xephyr; XEPHYR=$enableval +else + XEPHYR=auto +fi + +# Check whether --enable-xsdl was given. +if test "${enable_xsdl+set}" = set; then + enableval=$enable_xsdl; XSDL=$enableval +else + XSDL=auto +fi + +# Check whether --enable-xfake was given. +if test "${enable_xfake+set}" = set; then + enableval=$enable_xfake; XFAKE=$enableval +else + XFAKE=auto +fi + +# Check whether --enable-xfbdev was given. +if test "${enable_xfbdev+set}" = set; then + enableval=$enable_xfbdev; XFBDEV=$enableval +else + XFBDEV=auto +fi + +# Check whether --enable-kdrive-vesa was given. +if test "${enable_kdrive_vesa+set}" = set; then + enableval=$enable_kdrive_vesa; KDRIVEVESA=$enableval +else + KDRIVEVESA=auto +fi + +# Check whether --enable-freetype was given. +if test "${enable_freetype+set}" = set; then + enableval=$enable_freetype; XP_USE_FREETYPE=$enableval +else + XP_USE_FREETYPE=no +fi + + +# Check whether --with-freetype-config was given. +if test "${with_freetype_config+set}" = set; then + withval=$with_freetype_config; freetype_config=$withval +else + freetype_config=auto +fi + + + +# Check whether --enable-install-setuid was given. +if test "${enable_install_setuid+set}" = set; then + enableval=$enable_install_setuid; SETUID=$enableval +else + SETUID=auto +fi + +{ echo "$as_me:$LINENO: checking to see if we can install the Xorg server as root" >&5 +echo $ECHO_N "checking to see if we can install the Xorg server as root... $ECHO_C" >&6; } +if test "x$SETUID" = "xauto" ; then + case $host_os in + darwin*) SETUID="no" ;; + *) + case $host_cpu in + sparc) SETUID="no" ;; + *) SETUID="yes" ;; + esac + esac + if test "x$SETUID" = xyes; then + touch testfile + chown root testfile > /dev/null 2>&1 || SETUID="no" + rm -f testfile + fi +fi +{ echo "$as_me:$LINENO: result: $SETUID" >&5 +echo "${ECHO_T}$SETUID" >&6; } + if test "x$SETUID" = "xyes"; then + INSTALL_SETUID_TRUE= + INSTALL_SETUID_FALSE='#' +else + INSTALL_SETUID_TRUE='#' + INSTALL_SETUID_FALSE= +fi + + + + +# Transport selection macro from xtrans.m4 + + + + # Check whether --enable-unix-transport was given. +if test "${enable_unix_transport+set}" = set; then + enableval=$enable_unix_transport; UNIXCONN=$enableval +else + UNIXCONN=yes +fi + + # Check whether --enable-tcp-transport was given. +if test "${enable_tcp_transport+set}" = set; then + enableval=$enable_tcp_transport; TCPCONN=$enableval +else + TCPCONN=yes +fi + + { echo "$as_me:$LINENO: checking if Xtrans should support UNIX socket connections" >&5 +echo $ECHO_N "checking if Xtrans should support UNIX socket connections... $ECHO_C" >&6; } + if test "$UNIXCONN" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define UNIXCONN 1 +_ACEOF + + fi + { echo "$as_me:$LINENO: result: $UNIXCONN" >&5 +echo "${ECHO_T}$UNIXCONN" >&6; } + { echo "$as_me:$LINENO: checking if Xtrans should support TCP socket connections" >&5 +echo $ECHO_N "checking if Xtrans should support TCP socket connections... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: $TCPCONN" >&5 +echo "${ECHO_T}$TCPCONN" >&6; } + if test "$TCPCONN" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define TCPCONN 1 +_ACEOF + + + # SVR4 hides these in libraries other than libc + { echo "$as_me:$LINENO: checking for library containing socket" >&5 +echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6; } +if test "${ac_cv_search_socket+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +for ac_lib in '' socket; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_socket=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_socket+set}" = set; then + break +fi +done +if test "${ac_cv_search_socket+set}" = set; then + : +else + ac_cv_search_socket=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5 +echo "${ECHO_T}$ac_cv_search_socket" >&6; } +ac_res=$ac_cv_search_socket +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + { echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 +echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6; } +if test "${ac_cv_search_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +for ac_lib in '' nsl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_gethostbyname=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_gethostbyname+set}" = set; then + break +fi +done +if test "${ac_cv_search_gethostbyname+set}" = set; then + : +else + ac_cv_search_gethostbyname=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6; } +ac_res=$ac_cv_search_gethostbyname +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + + # Needs to come after above checks for libsocket & libnsl for SVR4 systems + # Check whether --enable-ipv6 was given. +if test "${enable_ipv6+set}" = set; then + enableval=$enable_ipv6; IPV6CONN=$enableval +else + { echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } +if test "${ac_cv_func_getaddrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getaddrinfo to an innocuous variant, in case declares getaddrinfo. + For example, HP-UX 11i declares gettimeofday. */ +#define getaddrinfo innocuous_getaddrinfo + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getaddrinfo (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getaddrinfo + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getaddrinfo (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_getaddrinfo || defined __stub___getaddrinfo +choke me +#endif + +int +main () +{ +return getaddrinfo (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_getaddrinfo=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getaddrinfo=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } +if test $ac_cv_func_getaddrinfo = yes; then + IPV6CONN=yes +else + IPV6CONN=no +fi + +fi + + { echo "$as_me:$LINENO: checking if IPv6 support should be built" >&5 +echo $ECHO_N "checking if IPv6 support should be built... $ECHO_C" >&6; } + if test "$IPV6CONN" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define IPv6 1 +_ACEOF + + fi + { echo "$as_me:$LINENO: result: $IPV6CONN" >&5 +echo "${ECHO_T}$IPV6CONN" >&6; } + + # 4.3BSD-Reno added a new member to struct sockaddr_in + { echo "$as_me:$LINENO: checking for struct sockaddr_in.sin_len" >&5 +echo $ECHO_N "checking for struct sockaddr_in.sin_len... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_sockaddr_in_sin_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include + + +int +main () +{ +static struct sockaddr_in ac_aggr; +if (ac_aggr.sin_len) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_sockaddr_in_sin_len=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include + + +int +main () +{ +static struct sockaddr_in ac_aggr; +if (sizeof ac_aggr.sin_len) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_sockaddr_in_sin_len=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_sockaddr_in_sin_len=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in_sin_len" >&5 +echo "${ECHO_T}$ac_cv_member_struct_sockaddr_in_sin_len" >&6; } +if test $ac_cv_member_struct_sockaddr_in_sin_len = yes; then + +cat >>confdefs.h <<\_ACEOF +#define BSD44SOCKETS 1 +_ACEOF + +fi + + + fi + case $host_os in + solaris*|sco*|sysv4*) localdef="yes" ;; + *) localdef="no" ;; + esac + # Check whether --enable-local-transport was given. +if test "${enable_local_transport+set}" = set; then + enableval=$enable_local_transport; LOCALCONN=$enableval +else + LOCALCONN=$localdef +fi + + { echo "$as_me:$LINENO: checking if Xtrans should support os-specific local connections" >&5 +echo $ECHO_N "checking if Xtrans should support os-specific local connections... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: $LOCALCONN" >&5 +echo "${ECHO_T}$LOCALCONN" >&6; } + if test "$LOCALCONN" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define LOCALCONN 1 +_ACEOF + + fi + + + +# Secure RPC detection macro from xtrans.m4 + + # Check whether --enable-secure-rpc was given. +if test "${enable_secure_rpc+set}" = set; then + enableval=$enable_secure_rpc; SECURE_RPC=$enableval +else + SECURE_RPC="try" +fi + + + if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then + FOUND_SECURE_RPC="no" + + +for ac_func in authdes_seccreate authdes_create +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + FOUND_SECURE_RPC="yes" +fi +done + + if test "x$FOUND_SECURE_RPC" = "xno" ; then + if test "x$SECURE_RPC" = "xyes" ; then + { { echo "$as_me:$LINENO: error: Secure RPC requested, but required functions not found" >&5 +echo "$as_me: error: Secure RPC requested, but required functions not found" >&2;} + { (exit 1); exit 1; }; } + fi + SECURE_RPC="no" + else + { echo "$as_me:$LINENO: checking for library containing getsecretkey" >&5 +echo $ECHO_N "checking for library containing getsecretkey... $ECHO_C" >&6; } +if test "${ac_cv_search_getsecretkey+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getsecretkey (); +int +main () +{ +return getsecretkey (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rpcsvc; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_getsecretkey=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_getsecretkey+set}" = set; then + break +fi +done +if test "${ac_cv_search_getsecretkey+set}" = set; then + : +else + ac_cv_search_getsecretkey=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_getsecretkey" >&5 +echo "${ECHO_T}$ac_cv_search_getsecretkey" >&6; } +ac_res=$ac_cv_search_getsecretkey +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + SECURE_RPC="yes" + fi + fi + { echo "$as_me:$LINENO: checking if Secure RPC authentication (\"SUN-DES-1\") should be supported" >&5 +echo $ECHO_N "checking if Secure RPC authentication (\"SUN-DES-1\") should be supported... $ECHO_C" >&6; } + if test "x$SECURE_RPC" = "xyes" ; then + +cat >>confdefs.h <<\_ACEOF +#define SECURE_RPC 1 +_ACEOF + + fi + { echo "$as_me:$LINENO: result: $SECURE_RPC" >&5 +echo "${ECHO_T}$SECURE_RPC" >&6; } + + + if test "x$INT10" = xvm86; then + INT10_VM86_TRUE= + INT10_VM86_FALSE='#' +else + INT10_VM86_TRUE='#' + INT10_VM86_FALSE= +fi + + if test "x$INT10" = xx86emu; then + INT10_X86EMU_TRUE= + INT10_X86EMU_FALSE='#' +else + INT10_X86EMU_TRUE='#' + INT10_X86EMU_FALSE= +fi + + if test "x$INT10" = xstub; then + INT10_STUB_TRUE= + INT10_STUB_FALSE='#' +else + INT10_STUB_TRUE='#' + INT10_STUB_FALSE= +fi + +if test "x$INT10" = xyes; then + + +for ac_header in sys/vm86.h sys/io.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +fi + + if test "x$BUILDDOCS" = xyes; then + BUILDDOCS_TRUE= + BUILDDOCS_FALSE='#' +else + BUILDDOCS_TRUE='#' + BUILDDOCS_FALSE= +fi + + + +XORG_SGML_PATH=$prefix/share/sgml +HAVE_DEFS_ENT= + +as_ac_File=`echo "ac_cv_file_$XORG_SGML_PATH/X11/defs.ent" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $XORG_SGML_PATH/X11/defs.ent" >&5 +echo $ECHO_N "checking for $XORG_SGML_PATH/X11/defs.ent... $ECHO_C" >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "$XORG_SGML_PATH/X11/defs.ent"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +ac_res=`eval echo '${'$as_ac_File'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_File'}'` = yes; then + HAVE_DEFS_ENT=yes +fi + + +# Extract the first word of "linuxdoc", so it can be a program name with args. +set dummy linuxdoc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_LINUXDOC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $LINUXDOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_LINUXDOC="$LINUXDOC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_LINUXDOC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +LINUXDOC=$ac_cv_path_LINUXDOC +if test -n "$LINUXDOC"; then + { echo "$as_me:$LINENO: result: $LINUXDOC" >&5 +echo "${ECHO_T}$LINUXDOC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "ps2pdf", so it can be a program name with args. +set dummy ps2pdf; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PS2PDF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PS2PDF in + [\\/]* | ?:[\\/]*) + ac_cv_path_PS2PDF="$PS2PDF" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PS2PDF="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PS2PDF=$ac_cv_path_PS2PDF +if test -n "$PS2PDF"; then + { echo "$as_me:$LINENO: result: $PS2PDF" >&5 +echo "${ECHO_T}$PS2PDF" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + +{ echo "$as_me:$LINENO: checking Whether to build documentation" >&5 +echo $ECHO_N "checking Whether to build documentation... $ECHO_C" >&6; } + +if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then + BUILDDOC=yes +else + BUILDDOC=no +fi + + if test x$BUILDDOC = xyes; then + BUILD_LINUXDOC_TRUE= + BUILD_LINUXDOC_FALSE='#' +else + BUILD_LINUXDOC_TRUE='#' + BUILD_LINUXDOC_FALSE= +fi + + +{ echo "$as_me:$LINENO: result: $BUILDDOC" >&5 +echo "${ECHO_T}$BUILDDOC" >&6; } + +{ echo "$as_me:$LINENO: checking Whether to build pdf documentation" >&5 +echo $ECHO_N "checking Whether to build pdf documentation... $ECHO_C" >&6; } + +if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then + BUILDPDFDOC=yes +else + BUILDPDFDOC=no +fi + + if test x$BUILDPDFDOC = xyes; then + BUILD_PDFDOC_TRUE= + BUILD_PDFDOC_FALSE='#' +else + BUILD_PDFDOC_TRUE='#' + BUILD_PDFDOC_FALSE= +fi + + +{ echo "$as_me:$LINENO: result: $BUILDPDFDOC" >&5 +echo "${ECHO_T}$BUILDPDFDOC" >&6; } + +MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" +MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" +MAKE_PDF="$PS2PDF" +MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" + + + + + + + + if test "x$INSTALL_LIBXF86CONFIG" = xyes; then + INSTALL_LIBXF86CONFIG_TRUE= + INSTALL_LIBXF86CONFIG_FALSE='#' +else + INSTALL_LIBXF86CONFIG_TRUE='#' + INSTALL_LIBXF86CONFIG_FALSE= +fi + + +XEXT_INC='-I$(top_srcdir)/Xext' +XEXT_LIB='$(top_builddir)/Xext/libXext.la' +XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la' + +PIXMAN="pixman-1 >= 0.9.5" + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for PIXMAN" >&5 +echo $ECHO_N "checking for PIXMAN... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$PIXMAN_CFLAGS"; then + pkg_cv_PIXMAN_CFLAGS="$PIXMAN_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$PIXMAN\"") >&5 + ($PKG_CONFIG --exists --print-errors "$PIXMAN") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PIXMAN_CFLAGS=`$PKG_CONFIG --cflags "$PIXMAN" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$PIXMAN_LIBS"; then + pkg_cv_PIXMAN_LIBS="$PIXMAN_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$PIXMAN\"") >&5 + ($PKG_CONFIG --exists --print-errors "$PIXMAN") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PIXMAN_LIBS=`$PKG_CONFIG --libs "$PIXMAN" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + PIXMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$PIXMAN"` + else + PIXMAN_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$PIXMAN"` + fi + # Put the nasty error message in config.log where it belongs + echo "$PIXMAN_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements ($PIXMAN) were not met: + +$PIXMAN_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables PIXMAN_CFLAGS +and PIXMAN_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements ($PIXMAN) were not met: + +$PIXMAN_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables PIXMAN_CFLAGS +and PIXMAN_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables PIXMAN_CFLAGS +and PIXMAN_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables PIXMAN_CFLAGS +and PIXMAN_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + PIXMAN_CFLAGS=$pkg_cv_PIXMAN_CFLAGS + PIXMAN_LIBS=$pkg_cv_PIXMAN_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + +# Require updated renderproto for ABI sanity if we're 64-bit. +if test "$ac_cv_sizeof_unsigned_long" = 8; then + RENDERPROTO="renderproto >= 0.9.3" +else + RENDERPROTO="renderproto" +fi +REQUIRED_MODULES="randrproto >= 1.2 $RENDERPROTO fixesproto >= 4.0 damageproto >= 1.1 xcmiscproto xextproto xproto >= 7.0.9 xtrans scrnsaverproto >= 1.1 bigreqsproto resourceproto fontsproto inputproto >= 1.4.2 kbproto >= 1.0.3" +REQUIRED_LIBS="xfont xau fontenc $PIXMAN" + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for DBUS" >&5 +echo $ECHO_N "checking for DBUS... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$DBUS_CFLAGS"; then + pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1\"") >&5 + ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$DBUS_LIBS"; then + pkg_cv_DBUS_LIBS="$DBUS_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1\"") >&5 + ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dbus-1"` + else + DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1"` + fi + # Put the nasty error message in config.log where it belongs + echo "$DBUS_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + HAVE_DBUS=no +elif test $pkg_failed = untried; then + HAVE_DBUS=no +else + DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS + DBUS_LIBS=$pkg_cv_DBUS_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + HAVE_DBUS=yes +fi +if test "x$HAVE_DBUS" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DBUS 1 +_ACEOF + +fi + if test "x$HAVE_DBUS" = xyes; then + HAVE_DBUS_TRUE= + HAVE_DBUS_FALSE='#' +else + HAVE_DBUS_TRUE='#' + HAVE_DBUS_FALSE= +fi + + +if test "x$CONFIG_DBUS_API" = xauto; then + CONFIG_DBUS_API="$HAVE_DBUS" +fi +if test "x$CONFIG_DBUS_API" = xyes; then + if ! test "x$HAVE_DBUS" = xyes; then + { { echo "$as_me:$LINENO: error: D-Bus configuration API requested, but D-Bus is not installed." >&5 +echo "$as_me: error: D-Bus configuration API requested, but D-Bus is not installed." >&2;} + { (exit 1); exit 1; }; } + fi + + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_DBUS_API 1 +_ACEOF + + NEED_DBUS="yes" +fi + if test "x$CONFIG_DBUS_API" = xyes; then + CONFIG_DBUS_API_TRUE= + CONFIG_DBUS_API_FALSE='#' +else + CONFIG_DBUS_API_TRUE='#' + CONFIG_DBUS_API_FALSE= +fi + + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for HAL" >&5 +echo $ECHO_N "checking for HAL... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$HAL_CFLAGS"; then + pkg_cv_HAL_CFLAGS="$HAL_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"hal\"") >&5 + ($PKG_CONFIG --exists --print-errors "hal") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_HAL_CFLAGS=`$PKG_CONFIG --cflags "hal" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$HAL_LIBS"; then + pkg_cv_HAL_LIBS="$HAL_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"hal\"") >&5 + ($PKG_CONFIG --exists --print-errors "hal") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_HAL_LIBS=`$PKG_CONFIG --libs "hal" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + HAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "hal"` + else + HAL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "hal"` + fi + # Put the nasty error message in config.log where it belongs + echo "$HAL_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + HAVE_HAL=no +elif test $pkg_failed = untried; then + HAVE_HAL=no +else + HAL_CFLAGS=$pkg_cv_HAL_CFLAGS + HAL_LIBS=$pkg_cv_HAL_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + HAVE_HAL=yes +fi +if test "x$CONFIG_HAL" = xauto; then + CONFIG_HAL="$HAVE_HAL" +fi +if test "x$CONFIG_HAL" = xyes; then + if ! test "x$HAVE_HAL" = xyes; then + { { echo "$as_me:$LINENO: error: HAL hotplug API requested, but HAL is not installed." >&5 +echo "$as_me: error: HAL hotplug API requested, but HAL is not installed." >&2;} + { (exit 1); exit 1; }; } + fi + + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_HAL 1 +_ACEOF + + REQUIRED_LIBS="$REQUIRED_LIBS hal" + NEED_DBUS="yes" +fi + if test "x$CONFIG_HAL" = xyes; then + CONFIG_HAL_TRUE= + CONFIG_HAL_FALSE='#' +else + CONFIG_HAL_TRUE='#' + CONFIG_HAL_FALSE= +fi + + +if test "x$NEED_DBUS" = xyes; then + REQUIRED_LIBS="$REQUIRED_LIBS dbus-1" +fi +CONFIG_LIB='$(top_builddir)/config/libconfig.a' + + if test "x$XV" = xyes; then + XV_TRUE= + XV_FALSE='#' +else + XV_TRUE='#' + XV_FALSE= +fi + +if test "x$XV" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XV 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define XvExtension 1 +_ACEOF + + REQUIRED_MODULES="$REQUIRED_MODULES videoproto" +else + XVMC=no +fi + + if test "x$XVMC" = xyes; then + XVMC_TRUE= + XVMC_FALSE='#' +else + XVMC_TRUE='#' + XVMC_FALSE= +fi + +if test "x$XVMC" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XvMCExtension 1 +_ACEOF + +fi + + + if test "x$COMPOSITE" = xyes; then + COMPOSITE_TRUE= + COMPOSITE_FALSE='#' +else + COMPOSITE_TRUE='#' + COMPOSITE_FALSE= +fi + +if test "x$COMPOSITE" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define COMPOSITE 1 +_ACEOF + + REQUIRED_MODULES="$REQUIRED_MODULES compositeproto >= 0.4" + COMPOSITE_LIB='$(top_builddir)/composite/libcomposite.la' + COMPOSITE_INC='-I$(top_srcdir)/composite' +fi + + if test "x$MITSHM" = xyes; then + MITSHM_TRUE= + MITSHM_FALSE='#' +else + MITSHM_TRUE='#' + MITSHM_FALSE= +fi + +if test "x$MITSHM" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define MITSHM 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAS_SHM 1 +_ACEOF + +fi + + if test "x$XTRAP" = xyes; then + XTRAP_TRUE= + XTRAP_FALSE='#' +else + XTRAP_TRUE='#' + XTRAP_FALSE= +fi + +if test "x$XTRAP" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XTRAP 1 +_ACEOF + + REQUIRED_MODULES="$REQUIRED_MODULES trapproto" + XTRAP_LIB='$(top_builddir)/XTrap/libxtrap.la' +fi + + if test "x$RECORD" = xyes; then + RECORD_TRUE= + RECORD_FALSE='#' +else + RECORD_TRUE='#' + RECORD_FALSE= +fi + +if test "x$RECORD" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XRECORD 1 +_ACEOF + + REQUIRED_MODULES="$REQUIRED_MODULES recordproto" + RECORD_LIB='$(top_builddir)/record/librecord.la' +fi + + if test "x$SCREENSAVER" = xyes; then + SCREENSAVER_TRUE= + SCREENSAVER_FALSE='#' +else + SCREENSAVER_TRUE='#' + SCREENSAVER_FALSE= +fi + +if test "x$SCREENSAVER" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define SCREENSAVER 1 +_ACEOF + +fi + + if test "x$RES" = xyes; then + RES_TRUE= + RES_FALSE='#' +else + RES_TRUE='#' + RES_FALSE= +fi + +if test "x$RES" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define RES 1 +_ACEOF + + REQUIRED_MODULES="$REQUIRED_MODULES resourceproto" +fi + +if test "x$GLX" = xyes && ! test "x$MESA_SOURCE" = x; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XLIB" >&5 +echo $ECHO_N "checking for XLIB... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XLIB_CFLAGS"; then + pkg_cv_XLIB_CFLAGS="$XLIB_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XLIB_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XLIB_LIBS"; then + pkg_cv_XLIB_LIBS="$XLIB_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XLIB_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + XLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XLIB_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11) were not met: + +$XLIB_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XLIB_CFLAGS +and XLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (x11) were not met: + +$XLIB_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XLIB_CFLAGS +and XLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XLIB_CFLAGS +and XLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XLIB_CFLAGS +and XLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XLIB_CFLAGS=$pkg_cv_XLIB_CFLAGS + XLIB_LIBS=$pkg_cv_XLIB_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for GL" >&5 +echo $ECHO_N "checking for GL... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GL_CFLAGS"; then + pkg_cv_GL_CFLAGS="$GL_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.8\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.8") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "glproto >= 1.4.8" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GL_LIBS"; then + pkg_cv_GL_LIBS="$GL_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.8\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.8") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "glproto >= 1.4.8" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glproto >= 1.4.8"` + else + GL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glproto >= 1.4.8"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GL_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (glproto >= 1.4.8) were not met: + +$GL_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (glproto >= 1.4.8) were not met: + +$GL_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + GL_CFLAGS=$pkg_cv_GL_CFLAGS + GL_LIBS=$pkg_cv_GL_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + +cat >>confdefs.h <<\_ACEOF +#define GLXEXT 1 +_ACEOF + + GLX_LIBS='$(top_builddir)/GL/glx/libglx.la $(top_builddir)/GL/mesa/libGLcore.la' + test -d GL || mkdir GL + case $host_os in + solaris*) + SYMLINK_MESA="/usr/bin/bash $srcdir/GL/symlink-mesa.sh" ;; + *) SYMLINK_MESA=$srcdir/GL/symlink-mesa.sh ;; + esac + $SYMLINK_MESA $MESA_SOURCE GL/ + if test $? -ne 0; then + { { echo "$as_me:$LINENO: error: Failed to link Mesa source tree. Please specify a proper path to Mesa sources, or disable GLX." >&5 +echo "$as_me: error: Failed to link Mesa source tree. Please specify a proper path to Mesa sources, or disable GLX." >&2;} + { (exit 1); exit 1; }; } + fi +else + GLX=no +fi + if test "x$GLX" = xyes; then + GLX_TRUE= + GLX_FALSE='#' +else + GLX_TRUE='#' + GLX_FALSE= +fi + + + +if test "x$AIGLX" = xyes -a "x$GLX" = xyes -a "x$DRI" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define AIGLX 1 +_ACEOF + +else + AIGLX=no +fi + if test "x$AIGLX" = xyes; then + AIGLX_TRUE= + AIGLX_FALSE='#' +else + AIGLX_TRUE='#' + AIGLX_FALSE= +fi + + +if test "x$GLX_USE_TLS" = xyes -a "x$AIGLX" = xyes; then + GLX_DEFINES="-DGLX_USE_TLS -DPTHREADS" + GLX_LIBS="$GLX_LIBS -lpthread" +fi + + + if test "x$DRI" = xyes; then + DRI_TRUE= + DRI_FALSE='#' +else + DRI_TRUE='#' + DRI_FALSE= +fi + +if test "x$DRI" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XF86DRI 1 +_ACEOF + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for DRIPROTO" >&5 +echo $ECHO_N "checking for DRIPROTO... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$DRIPROTO_CFLAGS"; then + pkg_cv_DRIPROTO_CFLAGS="$DRIPROTO_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86driproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86driproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DRIPROTO_CFLAGS=`$PKG_CONFIG --cflags "xf86driproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$DRIPROTO_LIBS"; then + pkg_cv_DRIPROTO_LIBS="$DRIPROTO_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86driproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86driproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DRIPROTO_LIBS=`$PKG_CONFIG --libs "xf86driproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DRIPROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86driproto"` + else + DRIPROTO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86driproto"` + fi + # Put the nasty error message in config.log where it belongs + echo "$DRIPROTO_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xf86driproto) were not met: + +$DRIPROTO_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DRIPROTO_CFLAGS +and DRIPROTO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (xf86driproto) were not met: + +$DRIPROTO_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DRIPROTO_CFLAGS +and DRIPROTO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DRIPROTO_CFLAGS +and DRIPROTO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DRIPROTO_CFLAGS +and DRIPROTO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + DRIPROTO_CFLAGS=$pkg_cv_DRIPROTO_CFLAGS + DRIPROTO_LIBS=$pkg_cv_DRIPROTO_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for LIBDRM" >&5 +echo $ECHO_N "checking for LIBDRM... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$LIBDRM_CFLAGS"; then + pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.3.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm >= 2.3.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBDRM_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= 2.3.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$LIBDRM_LIBS"; then + pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.3.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm >= 2.3.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBDRM_LIBS=`$PKG_CONFIG --libs "libdrm >= 2.3.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libdrm >= 2.3.0"` + else + LIBDRM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libdrm >= 2.3.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBDRM_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (libdrm >= 2.3.0) were not met: + +$LIBDRM_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBDRM_CFLAGS +and LIBDRM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (libdrm >= 2.3.0) were not met: + +$LIBDRM_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBDRM_CFLAGS +and LIBDRM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBDRM_CFLAGS +and LIBDRM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBDRM_CFLAGS +and LIBDRM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + LIBDRM_CFLAGS=$pkg_cv_LIBDRM_CFLAGS + LIBDRM_LIBS=$pkg_cv_LIBDRM_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for GL" >&5 +echo $ECHO_N "checking for GL... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GL_CFLAGS"; then + pkg_cv_GL_CFLAGS="$GL_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.1\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.1") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "glproto >= 1.4.1" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GL_LIBS"; then + pkg_cv_GL_LIBS="$GL_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.1\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.1") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "glproto >= 1.4.1" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glproto >= 1.4.1"` + else + GL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glproto >= 1.4.1"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GL_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (glproto >= 1.4.1) were not met: + +$GL_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (glproto >= 1.4.1) were not met: + +$GL_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + GL_CFLAGS=$pkg_cv_GL_CFLAGS + GL_LIBS=$pkg_cv_GL_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm >= 2.2.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBDRM_2_2 1 +_ACEOF + +fi + + + + +fi + + if test "x$XINERAMA" = xyes; then + XINERAMA_TRUE= + XINERAMA_FALSE='#' +else + XINERAMA_TRUE='#' + XINERAMA_FALSE= +fi + +if test "x$XINERAMA" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XINERAMA 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define PANORAMIX 1 +_ACEOF + + REQUIRED_MODULES="$REQUIRED_MODULES xineramaproto" +fi + + if test "x$XACE" = xyes; then + XACE_TRUE= + XACE_FALSE='#' +else + XACE_TRUE='#' + XACE_FALSE= +fi + +if test "x$XACE" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XACE 1 +_ACEOF + +fi + + if test "x$XCSECURITY" = xyes; then + XCSECURITY_TRUE= + XCSECURITY_FALSE='#' +else + XCSECURITY_TRUE='#' + XCSECURITY_FALSE= +fi + +if test "x$XCSECURITY" = xyes; then + if test "x$XACE" != xyes; then + { { echo "$as_me:$LINENO: error: cannot build Security extension without X-ACE" >&5 +echo "$as_me: error: cannot build Security extension without X-ACE" >&2;} + { (exit 1); exit 1; }; } + fi + +cat >>confdefs.h <<\_ACEOF +#define XCSECURITY 1 +_ACEOF + +fi + + if test "x$XEVIE" = xyes; then + XEVIE_TRUE= + XEVIE_FALSE='#' +else + XEVIE_TRUE='#' + XEVIE_FALSE= +fi + +if test "x$XEVIE" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XEVIE 1 +_ACEOF + + REQUIRED_MODULES="$REQUIRED_MODULES evieproto" +fi + + if test "x$APPGROUP" = xyes; then + APPGROUP_TRUE= + APPGROUP_FALSE='#' +else + APPGROUP_TRUE='#' + APPGROUP_FALSE= +fi + +if test "x$APPGROUP" = xyes; then + if test "x$XACE" != xyes || test "x$XCSECURITY" != xyes; then + { { echo "$as_me:$LINENO: error: cannot build APPGROUP extension without X-ACE and XC-SECURITY" >&5 +echo "$as_me: error: cannot build APPGROUP extension without X-ACE and XC-SECURITY" >&2;} + { (exit 1); exit 1; }; } + fi + +cat >>confdefs.h <<\_ACEOF +#define XAPPGROUP 1 +_ACEOF + +fi + + if test "x$CUP" = xyes; then + CUP_TRUE= + CUP_FALSE='#' +else + CUP_TRUE='#' + CUP_FALSE= +fi + +if test "x$CUP" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define TOGCUP 1 +_ACEOF + + # Requires xextproto which is always required +fi + + if test "x$EVI" = xyes; then + EVI_TRUE= + EVI_FALSE='#' +else + EVI_TRUE='#' + EVI_FALSE= +fi + +if test "x$EVI" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define EVI 1 +_ACEOF + + # Requires xextproto which is always required +fi + + if test "x$MULTIBUFFER" = xyes; then + MULTIBUFFER_TRUE= + MULTIBUFFER_FALSE='#' +else + MULTIBUFFER_TRUE='#' + MULTIBUFFER_FALSE= +fi + +if test "x$MULTIBUFFER" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define MULTIBUFFER 1 +_ACEOF + + # Requires xextproto which is always required +fi + + if test "x$FONTCACHE" = xyes; then + FONTCACHE_TRUE= + FONTCACHE_FALSE='#' +else + FONTCACHE_TRUE='#' + FONTCACHE_FALSE= +fi + +if test "x$FONTCACHE" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define FONTCACHE 1 +_ACEOF + + REQUIRED_MODULES="$REQUIRED_MODULES fontcacheproto" +fi + + if test "x$DBE" = xyes; then + DBE_TRUE= + DBE_FALSE='#' +else + DBE_TRUE='#' + DBE_FALSE= +fi + +if test "x$DBE" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define DBE 1 +_ACEOF + + DBE_LIB='$(top_builddir)/dbe/libdbe.la' +fi + + if test "x$XF86BIGFONT" = xyes; then + XF86BIGFONT_TRUE= + XF86BIGFONT_FALSE='#' +else + XF86BIGFONT_TRUE='#' + XF86BIGFONT_FALSE= +fi + +if test "x$XF86BIGFONT" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XF86BIGFONT 1 +_ACEOF + +fi + + if test "x$DPMSExtension" = xyes; then + DPMSExtension_TRUE= + DPMSExtension_FALSE='#' +else + DPMSExtension_TRUE='#' + DPMSExtension_FALSE= +fi + +if test "x$DPMSExtension" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define DPMSExtension 1 +_ACEOF + +fi + +if test "x$XPRINT" = xauto; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XPRINTPROTO" >&5 +echo $ECHO_N "checking for XPRINTPROTO... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XPRINTPROTO_CFLAGS"; then + pkg_cv_XPRINTPROTO_CFLAGS="$XPRINTPROTO_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"printproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "printproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XPRINTPROTO_CFLAGS=`$PKG_CONFIG --cflags "printproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XPRINTPROTO_LIBS"; then + pkg_cv_XPRINTPROTO_LIBS="$XPRINTPROTO_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"printproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "printproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XPRINTPROTO_LIBS=`$PKG_CONFIG --libs "printproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XPRINTPROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "printproto"` + else + XPRINTPROTO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "printproto"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XPRINTPROTO_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + XPRINT=no +elif test $pkg_failed = untried; then + XPRINT=no +else + XPRINTPROTO_CFLAGS=$pkg_cv_XPRINTPROTO_CFLAGS + XPRINTPROTO_LIBS=$pkg_cv_XPRINTPROTO_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + XPRINT=yes +fi +fi + if test "x$XPRINT" = xyes; then + XPRINT_TRUE= + XPRINT_FALSE='#' +else + XPRINT_TRUE='#' + XPRINT_FALSE= +fi + +if test "x$XPRINT" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XPRINT 1 +_ACEOF + + REQUIRED_MODULES="$REQUIRED_MODULES printproto" +fi + +if test "x$BUILTIN_FONTS" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define BUILTIN_FONTS 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define NOFONTSERVERACCESS 1 +_ACEOF + + FONTPATH="built-ins" +fi + +if test "x$XCALIBRATE" = xyes && test "$KDRIVE" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define XCALIBRATE 1 +_ACEOF + + REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto" +else + XCALIBRATE=no +fi + if test "x$XCALIBRATE" = xyes; then + XCALIBRATE_TRUE= + XCALIBRATE_FALSE='#' +else + XCALIBRATE_TRUE='#' + XCALIBRATE_FALSE= +fi + + + +cat >>confdefs.h <<\_ACEOF +#define RENDER 1 +_ACEOF + +RENDER_LIB='$(top_builddir)/render/librender.la' +RENDER_INC='-I$(top_srcdir)/render' + + +cat >>confdefs.h <<\_ACEOF +#define RANDR 1 +_ACEOF + +RANDR_LIB='$(top_builddir)/randr/librandr.la' +RANDR_INC='-I$(top_srcdir)/randr' + + +cat >>confdefs.h <<\_ACEOF +#define XFIXES 1 +_ACEOF + +FIXES_LIB='$(top_builddir)/xfixes/libxfixes.la' +FIXES_INC='-I$(top_srcdir)/xfixes' + + +cat >>confdefs.h <<\_ACEOF +#define DAMAGE 1 +_ACEOF + +DAMAGE_LIB='$(top_builddir)/damageext/libdamageext.la' +DAMAGE_INC='-I$(top_srcdir)/damageext' +MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la' +MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage' + + +cat >>confdefs.h <<\_ACEOF +#define XINPUT 1 +_ACEOF + +XI_LIB='$(top_builddir)/Xi/libXi.la' +XI_INC='-I$(top_srcdir)/Xi' + + if test "x$XF86UTILS" = xyes; then + XF86UTILS_TRUE= + XF86UTILS_FALSE='#' +else + XF86UTILS_TRUE='#' + XF86UTILS_FALSE= +fi + + + +cat >>confdefs.h <<\_ACEOF +#define SHAPE 1 +_ACEOF + + + +cat >>confdefs.h <<\_ACEOF +#define XKB 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define XKB_IN_SERVER 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define XKB_DFLT_DISABLED 0 +_ACEOF + +REQUIRED_MODULES="$REQUIRED_MODULES xkbfile" +XKB_LIB='$(top_builddir)/xkb/libxkb.la' +XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la' + +{ echo "$as_me:$LINENO: checking for strcasecmp" >&5 +echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6; } +if test "${ac_cv_func_strcasecmp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define strcasecmp to an innocuous variant, in case declares strcasecmp. + For example, HP-UX 11i declares gettimeofday. */ +#define strcasecmp innocuous_strcasecmp + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strcasecmp (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef strcasecmp + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char strcasecmp (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_strcasecmp || defined __stub___strcasecmp +choke me +#endif + +int +main () +{ +return strcasecmp (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_strcasecmp=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_strcasecmp=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6; } +if test $ac_cv_func_strcasecmp = yes; then + : +else + +cat >>confdefs.h <<\_ACEOF +#define NEED_STRCASECMP 1 +_ACEOF + +fi + + +if test "x$NULL_ROOT_CURSOR" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define NULL_ROOT_CURSOR 1 +_ACEOF + +fi + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XDMCP" >&5 +echo $ECHO_N "checking for XDMCP... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XDMCP_CFLAGS"; then + pkg_cv_XDMCP_CFLAGS="$XDMCP_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xdmcp\"") >&5 + ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XDMCP_CFLAGS=`$PKG_CONFIG --cflags "xdmcp" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XDMCP_LIBS"; then + pkg_cv_XDMCP_LIBS="$XDMCP_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xdmcp\"") >&5 + ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XDMCP_LIBS=`$PKG_CONFIG --libs "xdmcp" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XDMCP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xdmcp"` + else + XDMCP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xdmcp"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XDMCP_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_libxdmcp="no" +elif test $pkg_failed = untried; then + have_libxdmcp="no" +else + XDMCP_CFLAGS=$pkg_cv_XDMCP_CFLAGS + XDMCP_LIBS=$pkg_cv_XDMCP_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + have_libxdmcp="yes" +fi +if test "x$have_libxdmcp" = xyes; then + { echo "$as_me:$LINENO: checking for XdmcpWrap in -lXdmcp" >&5 +echo $ECHO_N "checking for XdmcpWrap in -lXdmcp... $ECHO_C" >&6; } +if test "${ac_cv_lib_Xdmcp_XdmcpWrap+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXdmcp $XDMCP_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XdmcpWrap (); +int +main () +{ +return XdmcpWrap (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_Xdmcp_XdmcpWrap=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_Xdmcp_XdmcpWrap=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xdmcp_XdmcpWrap" >&5 +echo "${ECHO_T}$ac_cv_lib_Xdmcp_XdmcpWrap" >&6; } +if test $ac_cv_lib_Xdmcp_XdmcpWrap = yes; then + have_xdmcpwrap="yes" +else + have_xdmcpwrap="no" +fi + +fi +if test "x$XDMCP" = xauto; then + if test "x$have_libxdmcp" = xyes; then + XDMCP=yes + else + XDMCP=no + fi +fi +if test "x$XDMAUTH" = xauto; then + if test "x$have_libxdmcp" = xyes && test "x$have_xdmcpwrap" = xyes; then + XDMAUTH=yes + else + XDMAUTH=no + fi +fi + + if test "x$XDMCP" = xyes; then + XDMCP_TRUE= + XDMCP_FALSE='#' +else + XDMCP_TRUE='#' + XDMCP_FALSE= +fi + +if test "x$XDMCP" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XDMCP 1 +_ACEOF + + REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" + XDMCP_MODULES="xdmcp" +fi + + if test "x$XDMAUTH" = xyes; then + XDMAUTH_TRUE= + XDMAUTH_FALSE='#' +else + XDMAUTH_TRUE='#' + XDMAUTH_FALSE= +fi + +if test "x$XDMAUTH" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HASXDMAUTH 1 +_ACEOF + + if ! test "x$XDMCP" = xyes; then + REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" + XDMCP_MODULES="xdmcp" + fi +fi + + if test "x$USE_RGB_BUILTIN" = xyes; then + USE_RGB_BUILTIN_TRUE= + USE_RGB_BUILTIN_FALSE='#' +else + USE_RGB_BUILTIN_TRUE='#' + USE_RGB_BUILTIN_FALSE= +fi + +if test "x$USE_RGB_BUILTIN" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define USE_RGB_BUILTIN 1 +_ACEOF + +fi + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$FONTPATH\"" + eval ac_define_dir="\"$ac_define_dir\"" + COMPILEDDEFAULTFONTPATH="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define COMPILEDDEFAULTFONTPATH "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$RGBPATH\"" + eval ac_define_dir="\"$ac_define_dir\"" + RGB_DB="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define RGB_DB "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$SERVERCONFIG\"" + eval ac_define_dir="\"$ac_define_dir\"" + SERVERCONFIGdir="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define SERVERCONFIGdir "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$FONTDIR\"" + eval ac_define_dir="\"$ac_define_dir\"" + BASE_FONT_PATH="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define BASE_FONT_PATH "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$DRI_DRIVER_PATH\"" + eval ac_define_dir="\"$ac_define_dir\"" + DRI_DRIVER_PATH="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define DRI_DRIVER_PATH "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + +cat >>confdefs.h <<_ACEOF +#define XVENDORNAME "$VENDOR_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define XVENDORNAMESHORT "$VENDOR_NAME_SHORT" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define XORG_DATE "$RELEASE_DATE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define XORG_MAN_VERSION "$VENDOR_MAN_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define BUILDERADDR "$BUILDERADDR" +_ACEOF + + +if test -z "$OSNAME"; then + OSNAME="UNKNOWN" +fi + + +cat >>confdefs.h <<_ACEOF +#define OSNAME "$OSNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define OSVENDOR "$OSVENDOR" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define BUILDERSTRING "$BUILDERSTRING" +_ACEOF + + + + + + + + +cat >>confdefs.h <<\_ACEOF +#define DDXOSINIT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define SERVER_LOCK 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define SMART_SCHEDULE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define NO_LIBCWRAPPER 1 +_ACEOF + + +if test "x$DEBUGGING" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define DEBUG 1 +_ACEOF + +else + +cat >>confdefs.h <<\_ACEOF +#define NDEBUG 1 +_ACEOF + +fi + if test "x$DEBUGGING" = xyes; then + DEBUG_TRUE= + DEBUG_FALSE='#' +else + DEBUG_TRUE='#' + DEBUG_FALSE= +fi + + + +cat >>confdefs.h <<\_ACEOF +#define USE_RGB_TXT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define MITMISC 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define XTEST 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define XSYNC 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define XCMISC 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define BIGREQS 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define PIXPRIV 1 +_ACEOF + + +if test "x$WDTRACE" != "xno" ; then + DIX_LIB='$(top_builddir)/dix/dix.O' + OS_LIB='$(top_builddir)/os/os.O' +else + DIX_LIB='$(top_builddir)/dix/libdix.la' + OS_LIB='$(top_builddir)/os/libos.la' +fi +CWRAP_LIB='$(top_builddir)/os/libcwrapper.la' +MI_LIB='$(top_builddir)/mi/libmi.la' +MI_EXT_LIB='$(top_builddir)/mi/libmiext.la' +MI_INC='-I$(top_srcdir)/mi' +FB_LIB='$(top_builddir)/fb/libfb.la' +FB_INC='-I$(top_srcdir)/fb' +MIEXT_SHADOW_INC='-I$(top_srcdir)/miext/shadow' +MIEXT_SHADOW_LIB='$(top_builddir)/miext/shadow/libshadow.la' +XPSTUBS_LIB='$(top_builddir)/dix/libxpstubs.la' +CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include' + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XSERVERCFLAGS" >&5 +echo $ECHO_N "checking for XSERVERCFLAGS... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XSERVERCFLAGS_CFLAGS"; then + pkg_cv_XSERVERCFLAGS_CFLAGS="$XSERVERCFLAGS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_MODULES \$REQUIRED_LIBS\"") >&5 + ($PKG_CONFIG --exists --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XSERVERCFLAGS_CFLAGS=`$PKG_CONFIG --cflags "$REQUIRED_MODULES $REQUIRED_LIBS" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XSERVERCFLAGS_LIBS"; then + pkg_cv_XSERVERCFLAGS_LIBS="$XSERVERCFLAGS_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_MODULES \$REQUIRED_LIBS\"") >&5 + ($PKG_CONFIG --exists --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XSERVERCFLAGS_LIBS=`$PKG_CONFIG --libs "$REQUIRED_MODULES $REQUIRED_LIBS" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS"` + else + XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XSERVERCFLAGS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements ($REQUIRED_MODULES $REQUIRED_LIBS) were not met: + +$XSERVERCFLAGS_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS +and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements ($REQUIRED_MODULES $REQUIRED_LIBS) were not met: + +$XSERVERCFLAGS_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS +and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS +and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS +and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XSERVERCFLAGS_CFLAGS=$pkg_cv_XSERVERCFLAGS_CFLAGS + XSERVERCFLAGS_LIBS=$pkg_cv_XSERVERCFLAGS_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XSERVERLIBS" >&5 +echo $ECHO_N "checking for XSERVERLIBS... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XSERVERLIBS_CFLAGS"; then + pkg_cv_XSERVERLIBS_CFLAGS="$XSERVERLIBS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_LIBS\"") >&5 + ($PKG_CONFIG --exists --print-errors "$REQUIRED_LIBS") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XSERVERLIBS_CFLAGS=`$PKG_CONFIG --cflags "$REQUIRED_LIBS" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XSERVERLIBS_LIBS"; then + pkg_cv_XSERVERLIBS_LIBS="$XSERVERLIBS_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_LIBS\"") >&5 + ($PKG_CONFIG --exists --print-errors "$REQUIRED_LIBS") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XSERVERLIBS_LIBS=`$PKG_CONFIG --libs "$REQUIRED_LIBS" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$REQUIRED_LIBS"` + else + XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$REQUIRED_LIBS"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XSERVERLIBS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements ($REQUIRED_LIBS) were not met: + +$XSERVERLIBS_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS +and XSERVERLIBS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements ($REQUIRED_LIBS) were not met: + +$XSERVERLIBS_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS +and XSERVERLIBS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS +and XSERVERLIBS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS +and XSERVERLIBS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XSERVERLIBS_CFLAGS=$pkg_cv_XSERVERLIBS_CFLAGS + XSERVERLIBS_LIBS=$pkg_cv_XSERVERLIBS_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + +XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS}" +XSERVER_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}" + + +# The Xorg binary needs to export symbols so that they can be used from modules +# Some platforms require extra flags to do this. gcc should set these flags +# when -rdynamic is passed to it, other compilers/linkers may need to be added +# here. +if test "x$GCC" = "xyes"; then + GCC_WARNINGS1="-Wall -Wpointer-arith -Wstrict-prototypes" + GCC_WARNINGS2="-Wmissing-prototypes -Wmissing-declarations" + GCC_WARNINGS3="-Wnested-externs -fno-strict-aliasing" + GCC_WARNINGS="$GCC_WARNINGS1 $GCC_WARNINGS2 $GCC_WARNINGS3" + if test "x$WERROR" = "xyes"; then + GCC_WARNINGS="${GCC_WARNINGS} -Werror" + fi + XSERVER_CFLAGS="$GCC_WARNINGS $XSERVER_CFLAGS" + + LD_EXPORT_SYMBOLS_FLAG="-rdynamic" +fi +case $host_os in + darwin*) + LD_EXPORT_SYMBOLS_FLAG="" + ;; + openbsd*) + LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-dynamic" + ;; +esac + + + +for ac_func in clock_gettime +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + have_clock_gettime=yes +else + { echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5 +echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6; } +if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_rt_clock_gettime=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_rt_clock_gettime=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5 +echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6; } +if test $ac_cv_lib_rt_clock_gettime = yes; then + have_clock_gettime=-lrt +else + have_clock_gettime=no +fi + +fi +done + + +{ echo "$as_me:$LINENO: checking for a useful monotonic clock ..." >&5 +echo $ECHO_N "checking for a useful monotonic clock ...... $ECHO_C" >&6; } + +if ! test "x$have_clock_gettime" = xno; then + if ! test "x$have_clock_gettime" = xyes; then + CLOCK_LIBS="$have_clock_gettime" + else + CLOCK_LIBS="" + fi + + LIBS_SAVE="$LIBS" + LIBS="$CLOCK_LIBS" + + if test "$cross_compiling" = yes; then + MONOTONIC_CLOCK="cross compiling" +else + cat >conftest.$ac_ext <<_ACEOF + +#define _POSIX_C_SOURCE 199309L +#include + +int main(int argc, char *argv[]) { + struct timespec tp; + + if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) + return 0; + else + return 1; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + MONOTONIC_CLOCK=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +MONOTONIC_CLOCK=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + + LIBS="$LIBS_SAVE" +else + MONOTONIC_CLOCK=no +fi + +{ echo "$as_me:$LINENO: result: $MONOTONIC_CLOCK" >&5 +echo "${ECHO_T}$MONOTONIC_CLOCK" >&6; } + +if test "x$MONOTONIC_CLOCK" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define MONOTONIC_CLOCK 1 +_ACEOF + + XSERVER_LIBS="$XSERVER_LIBS $CLOCK_LIBS" + LIBS="$LIBS $CLOCK_LIBS" +fi + +{ echo "$as_me:$LINENO: checking if SVR4 needs to be defined" >&5 +echo $ECHO_N "checking if SVR4 needs to be defined... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#if defined(SVR4) || defined(__svr4__) || defined(__SVR4) + I_AM_SVR4 +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I_AM_SVR4" >/dev/null 2>&1; then + + +cat >>confdefs.h <<\_ACEOF +#define SVR4 1 +_ACEOF + +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +rm -f conftest* + + +XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC" + +cat >>confdefs.h <<_ACEOF +#define _X_BYTE_ORDER $ENDIAN +_ACEOF + + + + + + + + +{ echo "$as_me:$LINENO: checking whether to build Xdmx DDX" >&5 +echo $ECHO_N "checking whether to build Xdmx DDX... $ECHO_C" >&6; } + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for DMXMODULES" >&5 +echo $ECHO_N "checking for DMXMODULES... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$DMXMODULES_CFLAGS"; then + pkg_cv_DMXMODULES_CFLAGS="$DMXMODULES_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu xext x11 xrender xfixes xfont xi dmxproto xau \$XDMCP_MODULES \$PIXMAN\"") >&5 + ($PKG_CONFIG --exists --print-errors "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES $PIXMAN") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DMXMODULES_CFLAGS=`$PKG_CONFIG --cflags "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES $PIXMAN" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$DMXMODULES_LIBS"; then + pkg_cv_DMXMODULES_LIBS="$DMXMODULES_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu xext x11 xrender xfixes xfont xi dmxproto xau \$XDMCP_MODULES \$PIXMAN\"") >&5 + ($PKG_CONFIG --exists --print-errors "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES $PIXMAN") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DMXMODULES_LIBS=`$PKG_CONFIG --libs "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES $PIXMAN" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES $PIXMAN"` + else + DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES $PIXMAN"` + fi + # Put the nasty error message in config.log where it belongs + echo "$DMXMODULES_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_dmx=no +elif test $pkg_failed = untried; then + have_dmx=no +else + DMXMODULES_CFLAGS=$pkg_cv_DMXMODULES_CFLAGS + DMXMODULES_LIBS=$pkg_cv_DMXMODULES_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + have_dmx=yes +fi +if test "x$DMX" = xauto; then + DMX="$have_dmx" +fi +{ echo "$as_me:$LINENO: result: $DMX" >&5 +echo "${ECHO_T}$DMX" >&6; } + if test "x$DMX" = xyes; then + DMX_TRUE= + DMX_FALSE='#' +else + DMX_TRUE='#' + DMX_FALSE= +fi + + +if test "x$DMX" = xyes; then + if test "x$have_dmx" = xno; then + { { echo "$as_me:$LINENO: error: Xdmx build explicitly requested, but required + modules not found." >&5 +echo "$as_me: error: Xdmx build explicitly requested, but required + modules not found." >&2;} + { (exit 1); exit 1; }; } + fi + DMX_INCLUDES="$XEXT_INC $RENDER_INC $XTRAP_INC $RECORD_INC" + XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $CONFIG_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $OS_LIB $CWRAP_LIB" + + + if test "${ac_cv_header_linux_input_h+set}" = set; then + { echo "$as_me:$LINENO: checking for linux/input.h" >&5 +echo $ECHO_N "checking for linux/input.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_input_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_input_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_input_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking linux/input.h usability" >&5 +echo $ECHO_N "checking linux/input.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking linux/input.h presence" >&5 +echo $ECHO_N "checking linux/input.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: linux/input.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/input.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/input.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: linux/input.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: linux/input.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/input.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/input.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/input.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/input.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: linux/input.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/input.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: linux/input.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/input.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/input.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/input.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: linux/input.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for linux/input.h" >&5 +echo $ECHO_N "checking for linux/input.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_input_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_linux_input_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_input_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_input_h" >&6; } + +fi +if test $ac_cv_header_linux_input_h = yes; then + DMX_BUILD_USB="yes" +else + DMX_BUILD_USB="no" +fi + + + if test "${ac_cv_header_linux_keyboard_h+set}" = set; then + { echo "$as_me:$LINENO: checking for linux/keyboard.h" >&5 +echo $ECHO_N "checking for linux/keyboard.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_keyboard_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_keyboard_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_keyboard_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking linux/keyboard.h usability" >&5 +echo $ECHO_N "checking linux/keyboard.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking linux/keyboard.h presence" >&5 +echo $ECHO_N "checking linux/keyboard.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: linux/keyboard.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/keyboard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/keyboard.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: linux/keyboard.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: linux/keyboard.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/keyboard.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/keyboard.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/keyboard.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/keyboard.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: linux/keyboard.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/keyboard.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: linux/keyboard.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/keyboard.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/keyboard.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/keyboard.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: linux/keyboard.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for linux/keyboard.h" >&5 +echo $ECHO_N "checking for linux/keyboard.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_keyboard_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_linux_keyboard_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_keyboard_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_keyboard_h" >&6; } + +fi +if test $ac_cv_header_linux_keyboard_h = yes; then + DMX_BUILD_LNX="yes" +else + DMX_BUILD_LNX="no" +fi + + + if test "x$GLX" = xyes; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for GL" >&5 +echo $ECHO_N "checking for GL... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GL_CFLAGS"; then + pkg_cv_GL_CFLAGS="$GL_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "glproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GL_LIBS"; then + pkg_cv_GL_LIBS="$GL_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "glproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glproto"` + else + GL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glproto"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GL_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (glproto) were not met: + +$GL_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (glproto) were not met: + +$GL_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + GL_CFLAGS=$pkg_cv_GL_CFLAGS + GL_LIBS=$pkg_cv_GL_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + fi + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XDMXCONFIG_DEP" >&5 +echo $ECHO_N "checking for XDMXCONFIG_DEP... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XDMXCONFIG_DEP_CFLAGS"; then + pkg_cv_XDMXCONFIG_DEP_CFLAGS="$XDMXCONFIG_DEP_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt xpm x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt xpm x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XDMXCONFIG_DEP_CFLAGS=`$PKG_CONFIG --cflags "xaw7 xmu xt xpm x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XDMXCONFIG_DEP_LIBS"; then + pkg_cv_XDMXCONFIG_DEP_LIBS="$XDMXCONFIG_DEP_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt xpm x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt xpm x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XDMXCONFIG_DEP_LIBS=`$PKG_CONFIG --libs "xaw7 xmu xt xpm x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XDMXCONFIG_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xaw7 xmu xt xpm x11"` + else + XDMXCONFIG_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xaw7 xmu xt xpm x11"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XDMXCONFIG_DEP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xaw7 xmu xt xpm x11) were not met: + +$XDMXCONFIG_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XDMXCONFIG_DEP_CFLAGS +and XDMXCONFIG_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (xaw7 xmu xt xpm x11) were not met: + +$XDMXCONFIG_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XDMXCONFIG_DEP_CFLAGS +and XDMXCONFIG_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XDMXCONFIG_DEP_CFLAGS +and XDMXCONFIG_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XDMXCONFIG_DEP_CFLAGS +and XDMXCONFIG_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XDMXCONFIG_DEP_CFLAGS=$pkg_cv_XDMXCONFIG_DEP_CFLAGS + XDMXCONFIG_DEP_LIBS=$pkg_cv_XDMXCONFIG_DEP_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for DMXEXAMPLES_DEP" >&5 +echo $ECHO_N "checking for DMXEXAMPLES_DEP... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$DMXEXAMPLES_DEP_CFLAGS"; then + pkg_cv_DMXEXAMPLES_DEP_CFLAGS="$DMXEXAMPLES_DEP_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "dmx xext x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DMXEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "dmx xext x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$DMXEXAMPLES_DEP_LIBS"; then + pkg_cv_DMXEXAMPLES_DEP_LIBS="$DMXEXAMPLES_DEP_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "dmx xext x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DMXEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "dmx xext x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DMXEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dmx xext x11"` + else + DMXEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dmx xext x11"` + fi + # Put the nasty error message in config.log where it belongs + echo "$DMXEXAMPLES_DEP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (dmx xext x11) were not met: + +$DMXEXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DMXEXAMPLES_DEP_CFLAGS +and DMXEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (dmx xext x11) were not met: + +$DMXEXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DMXEXAMPLES_DEP_CFLAGS +and DMXEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DMXEXAMPLES_DEP_CFLAGS +and DMXEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DMXEXAMPLES_DEP_CFLAGS +and DMXEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + DMXEXAMPLES_DEP_CFLAGS=$pkg_cv_DMXEXAMPLES_DEP_CFLAGS + DMXEXAMPLES_DEP_LIBS=$pkg_cv_DMXEXAMPLES_DEP_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for DMXXMUEXAMPLES_DEP" >&5 +echo $ECHO_N "checking for DMXXMUEXAMPLES_DEP... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$DMXXMUEXAMPLES_DEP_CFLAGS"; then + pkg_cv_DMXXMUEXAMPLES_DEP_CFLAGS="$DMXXMUEXAMPLES_DEP_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xmu xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "dmx xmu xext x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DMXXMUEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "dmx xmu xext x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$DMXXMUEXAMPLES_DEP_LIBS"; then + pkg_cv_DMXXMUEXAMPLES_DEP_LIBS="$DMXXMUEXAMPLES_DEP_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xmu xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "dmx xmu xext x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DMXXMUEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "dmx xmu xext x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DMXXMUEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dmx xmu xext x11"` + else + DMXXMUEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dmx xmu xext x11"` + fi + # Put the nasty error message in config.log where it belongs + echo "$DMXXMUEXAMPLES_DEP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (dmx xmu xext x11) were not met: + +$DMXXMUEXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DMXXMUEXAMPLES_DEP_CFLAGS +and DMXXMUEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (dmx xmu xext x11) were not met: + +$DMXXMUEXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DMXXMUEXAMPLES_DEP_CFLAGS +and DMXXMUEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DMXXMUEXAMPLES_DEP_CFLAGS +and DMXXMUEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DMXXMUEXAMPLES_DEP_CFLAGS +and DMXXMUEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + DMXXMUEXAMPLES_DEP_CFLAGS=$pkg_cv_DMXXMUEXAMPLES_DEP_CFLAGS + DMXXMUEXAMPLES_DEP_LIBS=$pkg_cv_DMXXMUEXAMPLES_DEP_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for DMXXIEXAMPLES_DEP" >&5 +echo $ECHO_N "checking for DMXXIEXAMPLES_DEP... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$DMXXIEXAMPLES_DEP_CFLAGS"; then + pkg_cv_DMXXIEXAMPLES_DEP_CFLAGS="$DMXXIEXAMPLES_DEP_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xi xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "dmx xi xext x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DMXXIEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "dmx xi xext x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$DMXXIEXAMPLES_DEP_LIBS"; then + pkg_cv_DMXXIEXAMPLES_DEP_LIBS="$DMXXIEXAMPLES_DEP_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xi xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "dmx xi xext x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DMXXIEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "dmx xi xext x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DMXXIEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dmx xi xext x11"` + else + DMXXIEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dmx xi xext x11"` + fi + # Put the nasty error message in config.log where it belongs + echo "$DMXXIEXAMPLES_DEP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (dmx xi xext x11) were not met: + +$DMXXIEXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DMXXIEXAMPLES_DEP_CFLAGS +and DMXXIEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (dmx xi xext x11) were not met: + +$DMXXIEXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DMXXIEXAMPLES_DEP_CFLAGS +and DMXXIEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DMXXIEXAMPLES_DEP_CFLAGS +and DMXXIEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DMXXIEXAMPLES_DEP_CFLAGS +and DMXXIEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + DMXXIEXAMPLES_DEP_CFLAGS=$pkg_cv_DMXXIEXAMPLES_DEP_CFLAGS + DMXXIEXAMPLES_DEP_LIBS=$pkg_cv_DMXXIEXAMPLES_DEP_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XTSTEXAMPLES_DEP" >&5 +echo $ECHO_N "checking for XTSTEXAMPLES_DEP... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XTSTEXAMPLES_DEP_CFLAGS"; then + pkg_cv_XTSTEXAMPLES_DEP_CFLAGS="$XTSTEXAMPLES_DEP_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xtst xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xtst xext x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XTSTEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "xtst xext x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XTSTEXAMPLES_DEP_LIBS"; then + pkg_cv_XTSTEXAMPLES_DEP_LIBS="$XTSTEXAMPLES_DEP_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xtst xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xtst xext x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XTSTEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "xtst xext x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XTSTEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xtst xext x11"` + else + XTSTEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xtst xext x11"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XTSTEXAMPLES_DEP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xtst xext x11) were not met: + +$XTSTEXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XTSTEXAMPLES_DEP_CFLAGS +and XTSTEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (xtst xext x11) were not met: + +$XTSTEXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XTSTEXAMPLES_DEP_CFLAGS +and XTSTEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XTSTEXAMPLES_DEP_CFLAGS +and XTSTEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XTSTEXAMPLES_DEP_CFLAGS +and XTSTEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XTSTEXAMPLES_DEP_CFLAGS=$pkg_cv_XTSTEXAMPLES_DEP_CFLAGS + XTSTEXAMPLES_DEP_LIBS=$pkg_cv_XTSTEXAMPLES_DEP_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XRESEXAMPLES_DEP" >&5 +echo $ECHO_N "checking for XRESEXAMPLES_DEP... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XRESEXAMPLES_DEP_CFLAGS"; then + pkg_cv_XRESEXAMPLES_DEP_CFLAGS="$XRESEXAMPLES_DEP_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xres xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xres xext x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XRESEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "xres xext x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XRESEXAMPLES_DEP_LIBS"; then + pkg_cv_XRESEXAMPLES_DEP_LIBS="$XRESEXAMPLES_DEP_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xres xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xres xext x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XRESEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "xres xext x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XRESEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xres xext x11"` + else + XRESEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xres xext x11"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XRESEXAMPLES_DEP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xres xext x11) were not met: + +$XRESEXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XRESEXAMPLES_DEP_CFLAGS +and XRESEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (xres xext x11) were not met: + +$XRESEXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XRESEXAMPLES_DEP_CFLAGS +and XRESEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XRESEXAMPLES_DEP_CFLAGS +and XRESEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XRESEXAMPLES_DEP_CFLAGS +and XRESEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XRESEXAMPLES_DEP_CFLAGS=$pkg_cv_XRESEXAMPLES_DEP_CFLAGS + XRESEXAMPLES_DEP_LIBS=$pkg_cv_XRESEXAMPLES_DEP_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for X11EXAMPLES_DEP" >&5 +echo $ECHO_N "checking for X11EXAMPLES_DEP... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$X11EXAMPLES_DEP_CFLAGS"; then + pkg_cv_X11EXAMPLES_DEP_CFLAGS="$X11EXAMPLES_DEP_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xext x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_X11EXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "xext x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$X11EXAMPLES_DEP_LIBS"; then + pkg_cv_X11EXAMPLES_DEP_LIBS="$X11EXAMPLES_DEP_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xext x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_X11EXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "xext x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + X11EXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xext x11"` + else + X11EXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext x11"` + fi + # Put the nasty error message in config.log where it belongs + echo "$X11EXAMPLES_DEP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xext x11) were not met: + +$X11EXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables X11EXAMPLES_DEP_CFLAGS +and X11EXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (xext x11) were not met: + +$X11EXAMPLES_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables X11EXAMPLES_DEP_CFLAGS +and X11EXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables X11EXAMPLES_DEP_CFLAGS +and X11EXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables X11EXAMPLES_DEP_CFLAGS +and X11EXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + X11EXAMPLES_DEP_CFLAGS=$pkg_cv_X11EXAMPLES_DEP_CFLAGS + X11EXAMPLES_DEP_LIBS=$pkg_cv_X11EXAMPLES_DEP_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + +fi + if test "x$DMX_BUILD_LNX" = xyes; then + DMX_BUILD_LNX_TRUE= + DMX_BUILD_LNX_FALSE='#' +else + DMX_BUILD_LNX_TRUE='#' + DMX_BUILD_LNX_FALSE= +fi + + if test "x$DMX_BUILD_USB" = xyes; then + DMX_BUILD_USB_TRUE= + DMX_BUILD_USB_FALSE='#' +else + DMX_BUILD_USB_TRUE='#' + DMX_BUILD_USB_FALSE= +fi + + + + +{ echo "$as_me:$LINENO: checking whether to build Xvfb DDX" >&5 +echo $ECHO_N "checking whether to build Xvfb DDX... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $XVFB" >&5 +echo "${ECHO_T}$XVFB" >&6; } + if test "x$XVFB" = xyes; then + XVFB_TRUE= + XVFB_FALSE='#' +else + XVFB_TRUE='#' + XVFB_FALSE= +fi + + +if test "x$XVFB" = xyes; then + XVFB_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS" + +fi + + + +{ echo "$as_me:$LINENO: checking whether to build Xnest DDX" >&5 +echo $ECHO_N "checking whether to build Xnest DDX... $ECHO_C" >&6; } + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XNESTMODULES" >&5 +echo $ECHO_N "checking for XNESTMODULES... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XNESTMODULES_CFLAGS"; then + pkg_cv_XNESTMODULES_CFLAGS="$XNESTMODULES_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xfont xext x11 xau \$XDMCP_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xfont xext x11 xau $XDMCP_MODULES") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XNESTMODULES_CFLAGS=`$PKG_CONFIG --cflags "xfont xext x11 xau $XDMCP_MODULES" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XNESTMODULES_LIBS"; then + pkg_cv_XNESTMODULES_LIBS="$XNESTMODULES_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xfont xext x11 xau \$XDMCP_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xfont xext x11 xau $XDMCP_MODULES") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XNESTMODULES_LIBS=`$PKG_CONFIG --libs "xfont xext x11 xau $XDMCP_MODULES" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xfont xext x11 xau $XDMCP_MODULES"` + else + XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xfont xext x11 xau $XDMCP_MODULES"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XNESTMODULES_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_xnest=no +elif test $pkg_failed = untried; then + have_xnest=no +else + XNESTMODULES_CFLAGS=$pkg_cv_XNESTMODULES_CFLAGS + XNESTMODULES_LIBS=$pkg_cv_XNESTMODULES_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + have_xnest=yes +fi +if test "x$XNEST" = xauto; then + XNEST="$have_xnest" +fi +{ echo "$as_me:$LINENO: result: $XNEST" >&5 +echo "${ECHO_T}$XNEST" >&6; } + if test "x$XNEST" = xyes; then + XNEST_TRUE= + XNEST_FALSE='#' +else + XNEST_TRUE='#' + XNEST_FALSE= +fi + + +if test "x$XNEST" = xyes; then + XNEST_LIBS="$MI_LIB $CONFIG_LIB $XSERVER_LIBS $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS" + +fi + + + +{ echo "$as_me:$LINENO: checking whether to build Xorg DDX" >&5 +echo $ECHO_N "checking whether to build Xorg DDX... $ECHO_C" >&6; } +if test "x$XORG" = xauto; then + XORG="yes" + case $host_os in + cygwin*) XORG="no" ;; + esac +fi +{ echo "$as_me:$LINENO: result: $XORG" >&5 +echo "${ECHO_T}$XORG" >&6; } + + +{ echo "$as_me:$LINENO: checking whether to build Xgl DDX" >&5 +echo $ECHO_N "checking whether to build Xgl DDX... $ECHO_C" >&6; } +if test "x$XGL" != xno; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XGLMODULES" >&5 +echo $ECHO_N "checking for XGLMODULES... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XGLMODULES_CFLAGS"; then + pkg_cv_XGLMODULES_CFLAGS="$XGLMODULES_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glitz-glx >= 0.4.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "glitz-glx >= 0.4.3") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XGLMODULES_CFLAGS=`$PKG_CONFIG --cflags "glitz-glx >= 0.4.3" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XGLMODULES_LIBS"; then + pkg_cv_XGLMODULES_LIBS="$XGLMODULES_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glitz-glx >= 0.4.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "glitz-glx >= 0.4.3") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XGLMODULES_LIBS=`$PKG_CONFIG --libs "glitz-glx >= 0.4.3" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XGLMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glitz-glx >= 0.4.3"` + else + XGLMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glitz-glx >= 0.4.3"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XGLMODULES_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + XGL=no +elif test $pkg_failed = untried; then + XGL=no +else + XGLMODULES_CFLAGS=$pkg_cv_XGLMODULES_CFLAGS + XGLMODULES_LIBS=$pkg_cv_XGLMODULES_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + XGL=yes +fi + + +fi +{ echo "$as_me:$LINENO: result: $XGL" >&5 +echo "${ECHO_T}$XGL" >&6; } + if test "x$XGL" = xyes; then + XGL_TRUE= + XGL_FALSE='#' +else + XGL_TRUE='#' + XGL_FALSE= +fi + + +if test "x$XGL" = xyes; then + XGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB" + + +cat >>confdefs.h <<\_ACEOF +#define XGL_MODULAR 1 +_ACEOF + + + xglmoduledir="$moduledir/xgl" + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$xglmoduledir\"" + eval ac_define_dir="\"$ac_define_dir\"" + XGL_MODULE_PATH="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define XGL_MODULE_PATH "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + +fi + + +{ echo "$as_me:$LINENO: checking whether to build Xegl DDX" >&5 +echo $ECHO_N "checking whether to build Xegl DDX... $ECHO_C" >&6; } +if test "x$XEGL" != xno; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XGLMODULES" >&5 +echo $ECHO_N "checking for XGLMODULES... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XGLMODULES_CFLAGS"; then + pkg_cv_XGLMODULES_CFLAGS="$XGLMODULES_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glitz-glx >= 0.4.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "glitz-glx >= 0.4.3") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XGLMODULES_CFLAGS=`$PKG_CONFIG --cflags "glitz-glx >= 0.4.3" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XGLMODULES_LIBS"; then + pkg_cv_XGLMODULES_LIBS="$XGLMODULES_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glitz-glx >= 0.4.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "glitz-glx >= 0.4.3") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XGLMODULES_LIBS=`$PKG_CONFIG --libs "glitz-glx >= 0.4.3" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XGLMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glitz-glx >= 0.4.3"` + else + XGLMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glitz-glx >= 0.4.3"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XGLMODULES_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + XEGL=no +elif test $pkg_failed = untried; then + XEGL=no +else + XGLMODULES_CFLAGS=$pkg_cv_XGLMODULES_CFLAGS + XGLMODULES_LIBS=$pkg_cv_XGLMODULES_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + XEGL=yes +fi + + +fi +{ echo "$as_me:$LINENO: result: $XEGL" >&5 +echo "${ECHO_T}$XEGL" >&6; } + if test "x$XEGL" = xyes; then + XEGL_TRUE= + XEGL_FALSE='#' +else + XEGL_TRUE='#' + XEGL_FALSE= +fi + + +if test "x$XEGL" = xyes; then + XEGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB" + +fi + + +{ echo "$as_me:$LINENO: checking whether to build Xglx DDX" >&5 +echo $ECHO_N "checking whether to build Xglx DDX... $ECHO_C" >&6; } +if test "x$XGLX" != xno; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XGLXMODULES" >&5 +echo $ECHO_N "checking for XGLXMODULES... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XGLXMODULES_CFLAGS"; then + pkg_cv_XGLXMODULES_CFLAGS="$XGLXMODULES_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glitz-glx >= 0.4.3 xrender\"") >&5 + ($PKG_CONFIG --exists --print-errors "glitz-glx >= 0.4.3 xrender") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XGLXMODULES_CFLAGS=`$PKG_CONFIG --cflags "glitz-glx >= 0.4.3 xrender" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XGLXMODULES_LIBS"; then + pkg_cv_XGLXMODULES_LIBS="$XGLXMODULES_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glitz-glx >= 0.4.3 xrender\"") >&5 + ($PKG_CONFIG --exists --print-errors "glitz-glx >= 0.4.3 xrender") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XGLXMODULES_LIBS=`$PKG_CONFIG --libs "glitz-glx >= 0.4.3 xrender" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XGLXMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glitz-glx >= 0.4.3 xrender"` + else + XGLXMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glitz-glx >= 0.4.3 xrender"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XGLXMODULES_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + XGLX=no +elif test $pkg_failed = untried; then + XGLX=no +else + XGLXMODULES_CFLAGS=$pkg_cv_XGLXMODULES_CFLAGS + XGLXMODULES_LIBS=$pkg_cv_XGLXMODULES_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + XGLX=yes +fi + + +fi +{ echo "$as_me:$LINENO: result: $XGLX" >&5 +echo "${ECHO_T}$XGLX" >&6; } + if test "x$XGLX" = xyes; then + XGLX_TRUE= + XGLX_FALSE='#' +else + XGLX_TRUE='#' + XGLX_FALSE= +fi + + +if test "x$XGLX" = xyes; then + XGLX_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB" + +fi + +# XORG_CORE_LIBS is needed even if you're not building the Xorg DDX +XORG_CORE_LIBS="$DIX_LIB $CONFIG_LIB" + + +xorg_bus_linuxpci=no +xorg_bus_freebsdpci=no +xorg_bus_netbsdpci=no +xorg_bus_ix86pci=no +xorg_bus_ppcpci=no +xorg_bus_sparcpci=no +xorg_bus_sparc=no + +if test "x$XORG" = xyes -o "x$XGL" = xyes; then + XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common' + XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' + XORG_INCS="$XORG_DDXINCS $XORG_OSINCS" + XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" + XORG_LIBS="$COMPOSITE_LIB $MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $OS_LIB" + + { echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } +if test $ac_cv_func_dlopen = yes; then + : +else + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + XORG_LIBS="$XORG_LIBS -ldl" +fi + +fi + + + case $host_os in + darwin*) + XORG_OS="Darwin" + build_darwin=yes + if test "X$XQUARTZ" = Xauto; then + { echo "$as_me:$LINENO: checking for Carbon framework" >&5 +echo $ECHO_N "checking for Carbon framework... $ECHO_C" >&6; } +if test "${xorg_cv_Carbon_framework+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -framework Carbon" + cat >conftest.$ac_ext <<_ACEOF +char FSFindFolder(); +int main() { +FSFindFolder(); +return 0;} + +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + xorg_cv_Carbon_framework=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + xorg_cv_Carbon_framework=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS +fi +{ echo "$as_me:$LINENO: result: $xorg_cv_Carbon_framework" >&5 +echo "${ECHO_T}$xorg_cv_Carbon_framework" >&6; } + if test "X$xorg_cv_Carbon_framework" = Xyes; then + +cat >>confdefs.h <<\_ACEOF +#define DARWIN_WITH_QUARTZ 1 +_ACEOF + + XQUARTZ=yes + else + XQUARTZ=no + fi + fi +# glxAGL / glxCGL don't work yet +# AC_CACHE_CHECK([for AGL framework],xorg_cv_AGL_framework,[ +# save_LDFLAGS=$LDFLAGS +# LDFLAGS="$LDFLAGS -framework AGL" +# AC_LINK_IFELSE([char aglEnable(); +#int main() { +#aglEnable(); +#return 0;} +# ],[xorg_cv_AGL_framework=yes], +# [xorg_cv_AGL_framework=no]) +# LDFLAGS=$save_LDFLAGS +# ]) + xorg_cv_AGL_framework=no + DARWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB" + + { echo "$as_me:$LINENO: checking for xp_init in -lXplugin" >&5 +echo $ECHO_N "checking for xp_init in -lXplugin... $ECHO_C" >&6; } +if test "${ac_cv_lib_Xplugin_xp_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXplugin $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char xp_init (); +int +main () +{ +return xp_init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_Xplugin_xp_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_Xplugin_xp_init=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xplugin_xp_init" >&5 +echo "${ECHO_T}$ac_cv_lib_Xplugin_xp_init" >&6; } +if test $ac_cv_lib_Xplugin_xp_init = yes; then + : +fi + + + CFLAGS="${CFLAGS} -D__DARWIN__" + PLIST_VERSION_STRING=$PACKAGE_VERSION + + PLIST_VENDOR_WEB=$VENDOR_WEB + + # Not sure that we should be disabling all these... + if test "x$XF86MISC" = xyes || test "x$XF86MISC" = xauto; then + { echo "$as_me:$LINENO: Disabling XF86Misc extension" >&5 +echo "$as_me: Disabling XF86Misc extension" >&6;} + XF86MISC=no + fi + if test "x$XF86VIDMODE" = xyes || test "x$XF86VIDMODE" = xauto; then + { echo "$as_me:$LINENO: Disabling XF86VidMode extension" >&5 +echo "$as_me: Disabling XF86VidMode extension" >&6;} + XF86VIDMODE=no + fi + if test "x$DGA" = xyes || test "x$DGA" = xauto; then + { echo "$as_me:$LINENO: Disabling DGA extension" >&5 +echo "$as_me: Disabling DGA extension" >&6;} + DGA=no + fi + ;; + linux*) + if test "x$LNXAPM" = xyes; then + XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" + fi + XORG_OS="linux" + XORG_OS_SUBDIR="linux" + xorg_bus_linuxpci="yes" + linux_acpi="no" + case $host_cpu in + ia64*) + linux_ia64=yes + linux_acpi="yes" + ;; + alpha*) + linux_alpha=yes + XORG_OS_PCI="axp" + xorg_bus_linuxpci="no" + ;; + i*86|amd64*|x86_64*) + linux_acpi="yes" + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu) + XORG_OS="freebsd" + XORG_OS_SUBDIR="bsd" + case $host_cpu in + i*86) + ;; + *) + xorg_bus_freebsdpci="yes" + ;; + esac + ;; + netbsd*) + XORG_OS="netbsd" + XORG_OS_SUBDIR="bsd" + case $host_cpu in + i*86|amd64*|x86_64*|ia64*) + ;; + *) + xorg_bus_netbsdpci="yes" + ;; + esac + ;; + openbsd*) + XORG_OS="openbsd" + XORG_OS_SUBDIR="bsd" + case $host_cpu in + i*86|amd64*|x86_64*|ia64*) + ;; + *) + xorg_bus_freebsdpci="yes" + ;; + esac + ;; + solaris*) + XORG_OS="solaris" + XORG_OS_SUBDIR="solaris" + # This really should be tests for specific features, but the #ifdef's + # were done as a simple version check in XFree86 4.x and haven't been + # fixed yet + { echo "$as_me:$LINENO: checking Solaris version" >&5 +echo $ECHO_N "checking Solaris version... $ECHO_C" >&6; } + OS_MINOR=`echo ${host_os}|sed -e 's/^.*solaris2\.//' -e s'/\..*$//'` + if test "${OS_MINOR}" -ge 7 ; then + { echo "$as_me:$LINENO: result: Solaris ${OS_MINOR}" >&5 +echo "${ECHO_T}Solaris ${OS_MINOR}" >&6; } + else + { echo "$as_me:$LINENO: result: Solaris \`echo ${host_os}|sed -e 's/^.*solaris//\`" >&5 +echo "${ECHO_T}Solaris \`echo ${host_os}|sed -e 's/^.*solaris//\`" >&6; } + fi + if test "${OS_MINOR}" -ge 8 ; then + +cat >>confdefs.h <<\_ACEOF +#define __SOL8__ 1 +_ACEOF + + fi + { echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 +echo $ECHO_N "checking whether __SUNPRO_C is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef __SUNPRO_C + (void) __SUNPRO_C; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl___SUNPRO_C=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl___SUNPRO_C=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5 +echo "${ECHO_T}$ac_cv_have_decl___SUNPRO_C" >&6; } +if test $ac_cv_have_decl___SUNPRO_C = yes; then + SUNCC="yes" +else + SUNCC="no" +fi + + if test "x$SUNCC" = "xyes"; then + solaris_asm_inline="yes" + fi + { echo "$as_me:$LINENO: checking whether _LP64 is declared" >&5 +echo $ECHO_N "checking whether _LP64 is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl__LP64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef _LP64 + (void) _LP64; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl__LP64=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl__LP64=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__LP64" >&5 +echo "${ECHO_T}$ac_cv_have_decl__LP64" >&6; } +if test $ac_cv_have_decl__LP64 = yes; then + SOLARIS_64="yes" +else + SOLARIS_64="no" +fi + + + case $host_cpu in + sparc*) + SOLARIS_INOUT_ARCH="sparcv8plus" + ;; + i*86) + if test x$SOLARIS_64 = xyes ; then + SOLARIS_INOUT_ARCH="amd64" + else + SOLARIS_INOUT_ARCH="ia32" + fi + if test "${OS_MINOR}" -lt 8 ; then + solaris_usl_console="yes" + else + XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" + fi + ;; + *) + { { echo "$as_me:$LINENO: error: Unsupported Solaris platform. Only SPARC & x86 \ + are supported on Solaris in this release. If you are \ + interested in porting Xorg to your platform, please email \ + xorg@lists.freedesktop.org." >&5 +echo "$as_me: error: Unsupported Solaris platform. Only SPARC & x86 \ + are supported on Solaris in this release. If you are \ + interested in porting Xorg to your platform, please email \ + xorg@lists.freedesktop.org." >&2;} + { (exit 1); exit 1; }; } ;; + esac + + if test x$solaris_asm_inline = xyes ; then + SOLARIS_ASM_CFLAGS='$(top_srcdir)/hw/xfree86/os-support/solaris/solaris-$(SOLARIS_INOUT_ARCH).il' + XORG_CFLAGS="${XORG_CFLAGS} "'$(SOLARIS_ASM_CFLAGS)' + fi + + ;; + gnu*) + XORG_OS="gnu" + XORG_OS_SUBDIR="hurd" + ;; + *) + XORG_OS="unknown" + XORG_OS_SUBDIR="unknown" + { { echo "$as_me:$LINENO: error: Your OS is unknown. Xorg currently only supports Linux, \ + Free/Open/NetBSD, Solaris, and OS X. If you are interested in porting \ + Xorg to your platform, please email xorg@lists.freedesktop.org." >&5 +echo "$as_me: error: Your OS is unknown. Xorg currently only supports Linux, \ + Free/Open/NetBSD, Solaris, and OS X. If you are interested in porting \ + Xorg to your platform, please email xorg@lists.freedesktop.org." >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + case $host_cpu in + i*86) + case $host_os in + darwin*) ;; + *) xorg_bus_ix86pci=yes ;; + esac + ;; + powerpc*) + case $host_os in + darwin*|linux*|freebsd*|netbsd*|openbsd*|kfreebsd*-gnu) + ;; + *) + xorg_bus_ppcpci="yes" + ;; + esac + ;; + sparc*) + xorg_bus_sparcpci="yes" + xorg_bus_sparc="yes" + ;; + x86_64*|amd64*) + case $host_os in + darwin*|freebsd*|kfreebsd*-gnu) + # FreeBSD uses the system pci interface + ;; + *) + xorg_bus_ix86pci="yes" + ;; + esac + ;; + esac + + if test "x$XORG_OS_PCI" = x ; then + XORG_OS_PCI=$XORG_OS + fi + if test "x$DGA" = xauto; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for DGA" >&5 +echo $ECHO_N "checking for DGA... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$DGA_CFLAGS"; then + pkg_cv_DGA_CFLAGS="$DGA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86dgaproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "xf86dgaproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$DGA_LIBS"; then + pkg_cv_DGA_LIBS="$DGA_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86dgaproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "xf86dgaproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86dgaproto"` + else + DGA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86dgaproto"` + fi + # Put the nasty error message in config.log where it belongs + echo "$DGA_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + DGA=no +elif test $pkg_failed = untried; then + DGA=no +else + DGA_CFLAGS=$pkg_cv_DGA_CFLAGS + DGA_LIBS=$pkg_cv_DGA_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + DGA=yes +fi + fi + if test "x$DGA" = xyes; then + XORG_MODULES="$XORG_MODULES xf86dgaproto" + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for DGA" >&5 +echo $ECHO_N "checking for DGA... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$DGA_CFLAGS"; then + pkg_cv_DGA_CFLAGS="$DGA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86dgaproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "xf86dgaproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$DGA_LIBS"; then + pkg_cv_DGA_LIBS="$DGA_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86dgaproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "xf86dgaproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86dgaproto"` + else + DGA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86dgaproto"` + fi + # Put the nasty error message in config.log where it belongs + echo "$DGA_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xf86dgaproto) were not met: + +$DGA_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DGA_CFLAGS +and DGA_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (xf86dgaproto) were not met: + +$DGA_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DGA_CFLAGS +and DGA_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DGA_CFLAGS +and DGA_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DGA_CFLAGS +and DGA_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + DGA_CFLAGS=$pkg_cv_DGA_CFLAGS + DGA_LIBS=$pkg_cv_DGA_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + +cat >>confdefs.h <<\_ACEOF +#define DGA 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define XFreeXDGA 1 +_ACEOF + + fi + + if test "x$XF86MISC" = xauto; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XF86MISC" >&5 +echo $ECHO_N "checking for XF86MISC... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XF86MISC_CFLAGS"; then + pkg_cv_XF86MISC_CFLAGS="$XF86MISC_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86miscproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86miscproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XF86MISC_CFLAGS=`$PKG_CONFIG --cflags "xf86miscproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XF86MISC_LIBS"; then + pkg_cv_XF86MISC_LIBS="$XF86MISC_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86miscproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86miscproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XF86MISC_LIBS=`$PKG_CONFIG --libs "xf86miscproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XF86MISC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86miscproto"` + else + XF86MISC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86miscproto"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XF86MISC_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + XF86MISC=no +elif test $pkg_failed = untried; then + XF86MISC=no +else + XF86MISC_CFLAGS=$pkg_cv_XF86MISC_CFLAGS + XF86MISC_LIBS=$pkg_cv_XF86MISC_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + XF86MISC=yes +fi + fi + if test "x$XF86MISC" = xyes; then + XORG_MODULES="$XORG_MODULES xf86miscproto" + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XF86MISC" >&5 +echo $ECHO_N "checking for XF86MISC... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XF86MISC_CFLAGS"; then + pkg_cv_XF86MISC_CFLAGS="$XF86MISC_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86miscproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86miscproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XF86MISC_CFLAGS=`$PKG_CONFIG --cflags "xf86miscproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XF86MISC_LIBS"; then + pkg_cv_XF86MISC_LIBS="$XF86MISC_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86miscproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86miscproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XF86MISC_LIBS=`$PKG_CONFIG --libs "xf86miscproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XF86MISC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86miscproto"` + else + XF86MISC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86miscproto"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XF86MISC_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xf86miscproto) were not met: + +$XF86MISC_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XF86MISC_CFLAGS +and XF86MISC_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (xf86miscproto) were not met: + +$XF86MISC_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XF86MISC_CFLAGS +and XF86MISC_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XF86MISC_CFLAGS +and XF86MISC_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XF86MISC_CFLAGS +and XF86MISC_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XF86MISC_CFLAGS=$pkg_cv_XF86MISC_CFLAGS + XF86MISC_LIBS=$pkg_cv_XF86MISC_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + +cat >>confdefs.h <<\_ACEOF +#define XF86MISC 1 +_ACEOF + + fi + + if test "x$XF86VIDMODE" = xauto; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XF86VIDMODE" >&5 +echo $ECHO_N "checking for XF86VIDMODE... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XF86VIDMODE_CFLAGS"; then + pkg_cv_XF86VIDMODE_CFLAGS="$XF86VIDMODE_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XF86VIDMODE_CFLAGS=`$PKG_CONFIG --cflags "xf86vidmodeproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XF86VIDMODE_LIBS"; then + pkg_cv_XF86VIDMODE_LIBS="$XF86VIDMODE_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XF86VIDMODE_LIBS=`$PKG_CONFIG --libs "xf86vidmodeproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86vidmodeproto"` + else + XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86vidmodeproto"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XF86VIDMODE_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + XF86VIDMODE=no +elif test $pkg_failed = untried; then + XF86VIDMODE=no +else + XF86VIDMODE_CFLAGS=$pkg_cv_XF86VIDMODE_CFLAGS + XF86VIDMODE_LIBS=$pkg_cv_XF86VIDMODE_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + XF86VIDMODE=yes +fi + fi + if test "x$XF86VIDMODE" = xyes; then + XORG_MODULES="$XORG_MODULES xf86vidmodeproto" + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XF86VIDMODE" >&5 +echo $ECHO_N "checking for XF86VIDMODE... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XF86VIDMODE_CFLAGS"; then + pkg_cv_XF86VIDMODE_CFLAGS="$XF86VIDMODE_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XF86VIDMODE_CFLAGS=`$PKG_CONFIG --cflags "xf86vidmodeproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XF86VIDMODE_LIBS"; then + pkg_cv_XF86VIDMODE_LIBS="$XF86VIDMODE_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XF86VIDMODE_LIBS=`$PKG_CONFIG --libs "xf86vidmodeproto" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86vidmodeproto"` + else + XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86vidmodeproto"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XF86VIDMODE_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xf86vidmodeproto) were not met: + +$XF86VIDMODE_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XF86VIDMODE_CFLAGS +and XF86VIDMODE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (xf86vidmodeproto) were not met: + +$XF86VIDMODE_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XF86VIDMODE_CFLAGS +and XF86VIDMODE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XF86VIDMODE_CFLAGS +and XF86VIDMODE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XF86VIDMODE_CFLAGS +and XF86VIDMODE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XF86VIDMODE_CFLAGS=$pkg_cv_XF86VIDMODE_CFLAGS + XF86VIDMODE_LIBS=$pkg_cv_XF86VIDMODE_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + +cat >>confdefs.h <<\_ACEOF +#define XF86VIDMODE 1 +_ACEOF + + fi + + if test -n "$XORG_MODULES"; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XORG_MODULES" >&5 +echo $ECHO_N "checking for XORG_MODULES... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XORG_MODULES_CFLAGS"; then + pkg_cv_XORG_MODULES_CFLAGS="$XORG_MODULES_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$XORG_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "$XORG_MODULES") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XORG_MODULES_CFLAGS=`$PKG_CONFIG --cflags "$XORG_MODULES" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XORG_MODULES_LIBS"; then + pkg_cv_XORG_MODULES_LIBS="$XORG_MODULES_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$XORG_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "$XORG_MODULES") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XORG_MODULES_LIBS=`$PKG_CONFIG --libs "$XORG_MODULES" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$XORG_MODULES"` + else + XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$XORG_MODULES"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XORG_MODULES_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements ($XORG_MODULES) were not met: + +$XORG_MODULES_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XORG_MODULES_CFLAGS +and XORG_MODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements ($XORG_MODULES) were not met: + +$XORG_MODULES_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XORG_MODULES_CFLAGS +and XORG_MODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XORG_MODULES_CFLAGS +and XORG_MODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XORG_MODULES_CFLAGS +and XORG_MODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XORG_MODULES_CFLAGS=$pkg_cv_XORG_MODULES_CFLAGS + XORG_MODULES_LIBS=$pkg_cv_XORG_MODULES_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + XORG_CFLAGS="$XORG_CFLAGS $XORG_MODULES_CFLAGS" + XORG_LIBS="$XORG_LIBS $XORG_MODULES_LIBS" + fi + + + + + + + # Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PERL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no" + ;; +esac +fi +PERL=$ac_cv_path_PERL +if test -n "$PERL"; then + { echo "$as_me:$LINENO: result: $PERL" >&5 +echo "${ECHO_T}$PERL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + if test "x$PERL" = xno; then + { { echo "$as_me:$LINENO: error: Perl is required to build the XFree86/Xorg DDX." >&5 +echo "$as_me: error: Perl is required to build the XFree86/Xorg DDX." >&2;} + { (exit 1); exit 1; }; } + fi + + + + + XF86CONFIGFILE="xorg.conf" + CONFIGFILE="$sysconfdir/$XF86CONFIGFILE" + LOGPREFIX="$logdir/Xorg." + +cat >>confdefs.h <<\_ACEOF +#define XORG_SERVER 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define XORGSERVER 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define XFree86Server 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define XFree86LOADER 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define XORG_VERSION_CURRENT $VENDOR_RELEASE +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define NEED_XF86_TYPES 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define NEED_XF86_PROTOTYPES 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define __XSERVERNAME__ "Xorg" +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define WITH_VGAHW 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define DRIVERS {} +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define IDRIVERS {} +_ACEOF + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$XF86CONFIGFILE\"" + eval ac_define_dir="\"$ac_define_dir\"" + __XCONFIGFILE__="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define __XCONFIGFILE__ "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$XF86CONFIGFILE\"" + eval ac_define_dir="\"$ac_define_dir\"" + XF86CONFIGFILE="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define XF86CONFIGFILE "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$moduledir\"" + eval ac_define_dir="\"$ac_define_dir\"" + DEFAULT_MODULE_PATH="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define DEFAULT_MODULE_PATH "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$libdir\"" + eval ac_define_dir="\"$ac_define_dir\"" + DEFAULT_LIBRARY_PATH="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define DEFAULT_LIBRARY_PATH "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$LOGPREFIX\"" + eval ac_define_dir="\"$ac_define_dir\"" + DEFAULT_LOGPREFIX="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define DEFAULT_LOGPREFIX "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + +cat >>confdefs.h <<_ACEOF +#define __VENDORDWEBSUPPORT__ "$VENDOR_WEB" +_ACEOF + + + driverdir="$moduledir/drivers" + + + sdkdir="$includedir/xorg" + extdir="$includedir/X11/extensions" + + + +fi + if test "x$XORG" = xyes; then + XORG_TRUE= + XORG_FALSE='#' +else + XORG_TRUE='#' + XORG_FALSE= +fi + + if test "x$xorg_bus_linuxpci" = xyes; then + XORG_BUS_LINUXPCI_TRUE= + XORG_BUS_LINUXPCI_FALSE='#' +else + XORG_BUS_LINUXPCI_TRUE='#' + XORG_BUS_LINUXPCI_FALSE= +fi + + if test "x$xorg_bus_freebsdpci" = xyes; then + XORG_BUS_FREEBSDPCI_TRUE= + XORG_BUS_FREEBSDPCI_FALSE='#' +else + XORG_BUS_FREEBSDPCI_TRUE='#' + XORG_BUS_FREEBSDPCI_FALSE= +fi + + if test "x$xorg_bus_netbsdpci" = xyes; then + XORG_BUS_NETBSDPCI_TRUE= + XORG_BUS_NETBSDPCI_FALSE='#' +else + XORG_BUS_NETBSDPCI_TRUE='#' + XORG_BUS_NETBSDPCI_FALSE= +fi + + if test "x$xorg_bus_ix86pci" = xyes; then + XORG_BUS_IX86PCI_TRUE= + XORG_BUS_IX86PCI_FALSE='#' +else + XORG_BUS_IX86PCI_TRUE='#' + XORG_BUS_IX86PCI_FALSE= +fi + + if test "x$xorg_bus_ppcpci" = xyes; then + XORG_BUS_PPCPCI_TRUE= + XORG_BUS_PPCPCI_FALSE='#' +else + XORG_BUS_PPCPCI_TRUE='#' + XORG_BUS_PPCPCI_FALSE= +fi + + if test "x$xorg_bus_sparcpci" = xyes; then + XORG_BUS_SPARCPCI_TRUE= + XORG_BUS_SPARCPCI_FALSE='#' +else + XORG_BUS_SPARCPCI_TRUE='#' + XORG_BUS_SPARCPCI_FALSE= +fi + + if test "x$xorg_bus_sparc" = xyes; then + XORG_BUS_SPARC_TRUE= + XORG_BUS_SPARC_FALSE='#' +else + XORG_BUS_SPARC_TRUE='#' + XORG_BUS_SPARC_FALSE= +fi + + if test "x$xorg_loader_sparcmuldiv" = xyes; then + XORG_LOADER_SPARC_TRUE= + XORG_LOADER_SPARC_FALSE='#' +else + XORG_LOADER_SPARC_TRUE='#' + XORG_LOADER_SPARC_FALSE= +fi + + if test "x$linux_ia64" = xyes; then + LINUX_IA64_TRUE= + LINUX_IA64_FALSE='#' +else + LINUX_IA64_TRUE='#' + LINUX_IA64_FALSE= +fi + + if test "x$linux_alpha" = xyes; then + LINUX_ALPHA_TRUE= + LINUX_ALPHA_FALSE='#' +else + LINUX_ALPHA_TRUE='#' + LINUX_ALPHA_FALSE= +fi + + if test "x$linux_acpi" = xyes; then + LNXACPI_TRUE= + LNXACPI_FALSE='#' +else + LNXACPI_TRUE='#' + LNXACPI_FALSE= +fi + + if test "x$solaris_usl_console" = xyes; then + SOLARIS_USL_CONSOLE_TRUE= + SOLARIS_USL_CONSOLE_FALSE='#' +else + SOLARIS_USL_CONSOLE_TRUE='#' + SOLARIS_USL_CONSOLE_FALSE= +fi + + if test "x$solaris_asm_inline" = xyes; then + SOLARIS_ASM_INLINE_TRUE= + SOLARIS_ASM_INLINE_FALSE='#' +else + SOLARIS_ASM_INLINE_TRUE='#' + SOLARIS_ASM_INLINE_FALSE= +fi + + if test "X$build_darwin" = Xyes; then + BUILD_DARWIN_TRUE= + BUILD_DARWIN_FALSE='#' +else + BUILD_DARWIN_TRUE='#' + BUILD_DARWIN_FALSE= +fi + + if test "X$XQUARTZ" = Xyes; then + XQUARTZ_TRUE= + XQUARTZ_FALSE='#' +else + XQUARTZ_TRUE='#' + XQUARTZ_FALSE= +fi + + if test "x$DGA" = xyes; then + DGA_TRUE= + DGA_FALSE='#' +else + DGA_TRUE='#' + DGA_FALSE= +fi + + +test "x$MFB" = xauto && MFB="$XORG" +test "x$CFB" = xauto && CFB="$XORG" +test "x$AFB" = xauto && AFB="$XORG" + if test "x$MFB" = xyes; then + MFB_TRUE= + MFB_FALSE='#' +else + MFB_TRUE='#' + MFB_FALSE= +fi + + if test "x$CFB" = xyes; then + CFB_TRUE= + CFB_FALSE='#' +else + CFB_TRUE='#' + CFB_FALSE= +fi + + if test "x$AFB" = xyes; then + AFB_TRUE= + AFB_FALSE='#' +else + AFB_TRUE='#' + AFB_FALSE= +fi + +if test "x$MFB" = xyes -o "x$CFB" = xyes -o "x$AFB" = xyes; then + if test "x$XORG" != xyes; then + { { echo "$as_me:$LINENO: error: legacy fb support requires the Xorg server" >&5 +echo "$as_me: error: legacy fb support requires the Xorg server" >&2;} + { (exit 1); exit 1; }; } + fi +fi + + +{ echo "$as_me:$LINENO: checking whether to build Xprint DDX" >&5 +echo $ECHO_N "checking whether to build Xprint DDX... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $XPRINT" >&5 +echo "${ECHO_T}$XPRINT" >&6; } + +if test "x$XPRINT" = xyes; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XPRINT" >&5 +echo $ECHO_N "checking for XPRINT... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XPRINT_CFLAGS"; then + pkg_cv_XPRINT_CFLAGS="$XPRINT_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"printproto x11 xfont \$XDMCP_MODULES xau \$PIXMAN\"") >&5 + ($PKG_CONFIG --exists --print-errors "printproto x11 xfont $XDMCP_MODULES xau $PIXMAN") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XPRINT_CFLAGS=`$PKG_CONFIG --cflags "printproto x11 xfont $XDMCP_MODULES xau $PIXMAN" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XPRINT_LIBS"; then + pkg_cv_XPRINT_LIBS="$XPRINT_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"printproto x11 xfont \$XDMCP_MODULES xau \$PIXMAN\"") >&5 + ($PKG_CONFIG --exists --print-errors "printproto x11 xfont $XDMCP_MODULES xau $PIXMAN") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XPRINT_LIBS=`$PKG_CONFIG --libs "printproto x11 xfont $XDMCP_MODULES xau $PIXMAN" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XPRINT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "printproto x11 xfont $XDMCP_MODULES xau $PIXMAN"` + else + XPRINT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "printproto x11 xfont $XDMCP_MODULES xau $PIXMAN"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XPRINT_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (printproto x11 xfont $XDMCP_MODULES xau $PIXMAN) were not met: + +$XPRINT_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XPRINT_CFLAGS +and XPRINT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (printproto x11 xfont $XDMCP_MODULES xau $PIXMAN) were not met: + +$XPRINT_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XPRINT_CFLAGS +and XPRINT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XPRINT_CFLAGS +and XPRINT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XPRINT_CFLAGS +and XPRINT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XPRINT_CFLAGS=$pkg_cv_XPRINT_CFLAGS + XPRINT_LIBS=$pkg_cv_XPRINT_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + XPRINT_EXTENSIONS="$XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS" + XPRINT_LIBS="$DIX_LIB $XKB_LIB $XKB_STUB_LIB $XPRINT_EXTENSIONS $MI_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB $OS_LIB $LIBS $XPRINT_LIBS" + + + + xpconfigdir=$libdir/X11/xserver + + + # Extract the first word of "mkfontscale", so it can be a program name with args. +set dummy mkfontscale; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_MKFONTSCALE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MKFONTSCALE in + [\\/]* | ?:[\\/]*) + ac_cv_path_MKFONTSCALE="$MKFONTSCALE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MKFONTSCALE="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +MKFONTSCALE=$ac_cv_path_MKFONTSCALE +if test -n "$MKFONTSCALE"; then + { echo "$as_me:$LINENO: result: $MKFONTSCALE" >&5 +echo "${ECHO_T}$MKFONTSCALE" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + # Extract the first word of "mkfontdir", so it can be a program name with args. +set dummy mkfontdir; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_MKFONTDIR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MKFONTDIR in + [\\/]* | ?:[\\/]*) + ac_cv_path_MKFONTDIR="$MKFONTDIR" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MKFONTDIR="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +MKFONTDIR=$ac_cv_path_MKFONTDIR +if test -n "$MKFONTDIR"; then + { echo "$as_me:$LINENO: result: $MKFONTDIR" >&5 +echo "${ECHO_T}$MKFONTDIR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + + # freetype support code borrowed from lib/XFont + if test x$XP_USE_FREETYPE = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XP_USE_FREETYPE 1 +_ACEOF + + + if test "$freetype_config" = "auto" ; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for FREETYPE" >&5 +echo $ECHO_N "checking for FREETYPE... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$FREETYPE_CFLAGS"; then + pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2\"") >&5 + ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$FREETYPE_LIBS"; then + pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2\"") >&5 + ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "freetype2"` + else + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"` + fi + # Put the nasty error message in config.log where it belongs + echo "$FREETYPE_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + freetype_config=yes +elif test $pkg_failed = untried; then + freetype_config=yes +else + FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS + FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + freetype_config=no +fi + fi + + if test "$freetype_config" = "yes"; then + # Extract the first word of "freetype-config", so it can be a program name with args. +set dummy freetype-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ft_config+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ft_config in + [\\/]* | ?:[\\/]*) + ac_cv_path_ft_config="$ft_config" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ft_config="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_ft_config" && ac_cv_path_ft_config="no" + ;; +esac +fi +ft_config=$ac_cv_path_ft_config +if test -n "$ft_config"; then + { echo "$as_me:$LINENO: result: $ft_config" >&5 +echo "${ECHO_T}$ft_config" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + if test "$ft_config" = "no"; then + { { echo "$as_me:$LINENO: error: You must have freetype installed; see http://www.freetype.org/" >&5 +echo "$as_me: error: You must have freetype installed; see http://www.freetype.org/" >&2;} + { (exit 1); exit 1; }; } + fi + else + ft_config="$freetype_config" + fi + + if test "$freetype_config" != "no"; then + FREETYPE_CFLAGS="`$ft_config --cflags`" + FREETYPE_LIBS="`$ft_config --libs`" + fi + FREETYPE_REQUIRES="freetype2" + else + FREETYPE_CFLAGS="" + FREETYPE_LIBS="" + FREETYPE_REQUIRES="" + fi + + + + # end freetype support +fi + if test "x$XPRINT" = xyes && test "x$XP_USE_FREETYPE" = xyes; then + XP_USE_FREETYPE_TRUE= + XP_USE_FREETYPE_FALSE='#' +else + XP_USE_FREETYPE_TRUE='#' + XP_USE_FREETYPE_FALSE= +fi + + + + +{ echo "$as_me:$LINENO: checking whether to build XWin DDX" >&5 +echo $ECHO_N "checking whether to build XWin DDX... $ECHO_C" >&6; } +if test "x$XWIN" = xauto; then + case $host_os in + cygwin*) XWIN="yes" ;; + mingw*) XWIN="yes" ;; + *) XWIN="no" ;; + esac + XWIN_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $CONFIG_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $LAYER_LIB $XPSTUBS_LIB $OS_LIB $SHADOW_LIB" + +fi +{ echo "$as_me:$LINENO: result: $XWIN" >&5 +echo "${ECHO_T}$XWIN" >&6; } + +if test "x$XWIN" = xyes; then + XWIN_SERVER_NAME=XWin + case $host_os in + cygwin*) + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XWINMODULES" >&5 +echo $ECHO_N "checking for XWINMODULES... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XWINMODULES_CFLAGS"; then + pkg_cv_XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfont") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XWINMODULES_CFLAGS=`$PKG_CONFIG --cflags "x11 xdmcp xau xfont" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XWINMODULES_LIBS"; then + pkg_cv_XWINMODULES_LIBS="$XWINMODULES_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfont") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XWINMODULES_LIBS=`$PKG_CONFIG --libs "x11 xdmcp xau xfont" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xdmcp xau xfont"` + else + XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xdmcp xau xfont"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XWINMODULES_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xdmcp xau xfont) were not met: + +$XWINMODULES_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XWINMODULES_CFLAGS +and XWINMODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (x11 xdmcp xau xfont) were not met: + +$XWINMODULES_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XWINMODULES_CFLAGS +and XWINMODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XWINMODULES_CFLAGS +and XWINMODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XWINMODULES_CFLAGS +and XWINMODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XWINMODULES_CFLAGS=$pkg_cv_XWINMODULES_CFLAGS + XWINMODULES_LIBS=$pkg_cv_XWINMODULES_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + +cat >>confdefs.h <<\_ACEOF +#define HAS_DEVWINDOWS 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define ROOTLESS 1 +_ACEOF + + CFLAGS="$CFLAGS -DFD_SETSIZE=256" + ;; + mingw*) + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XWINMODULES" >&5 +echo $ECHO_N "checking for XWINMODULES... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XWINMODULES_CFLAGS"; then + pkg_cv_XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfont") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XWINMODULES_CFLAGS=`$PKG_CONFIG --cflags "x11 xdmcp xau xfont" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XWINMODULES_LIBS"; then + pkg_cv_XWINMODULES_LIBS="$XWINMODULES_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfont") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XWINMODULES_LIBS=`$PKG_CONFIG --libs "x11 xdmcp xau xfont" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xdmcp xau xfont"` + else + XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xdmcp xau xfont"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XWINMODULES_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xdmcp xau xfont) were not met: + +$XWINMODULES_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XWINMODULES_CFLAGS +and XWINMODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (x11 xdmcp xau xfont) were not met: + +$XWINMODULES_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XWINMODULES_CFLAGS +and XWINMODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XWINMODULES_CFLAGS +and XWINMODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XWINMODULES_CFLAGS +and XWINMODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XWINMODULES_CFLAGS=$pkg_cv_XWINMODULES_CFLAGS + XWINMODULES_LIBS=$pkg_cv_XWINMODULES_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + XWIN_SERVER_NAME=Xming + +cat >>confdefs.h <<\_ACEOF +#define RELOCATE_PROJECTROOT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAS_WINSOCK 1 +_ACEOF + + XWIN_SYSTEM_LIBS=-lwinsock2 + ;; + esac + + + + if test "x$DEBUGGING" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define CYGDEBUG 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define CYGWINDOWING_DEBUG 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define CYGMULTIWINDOW_DEBUG 1 +_ACEOF + + fi + + +cat >>confdefs.h <<\_ACEOF +#define DDXOSINIT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define DDXTIME 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define DDXOSFATALERROR 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define DDXOSVERRORF 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define DDXBEFORERESET 1 +_ACEOF + + if test "x$XF86VIDMODE" = xyes; then + { echo "$as_me:$LINENO: Disabling XF86VidMode extension" >&5 +echo "$as_me: Disabling XF86VidMode extension" >&6;} + XF86VIDMODE=no + fi + if test "x$XF86MISC" = xyes; then + { echo "$as_me:$LINENO: Disabling XF86Misc extension" >&5 +echo "$as_me: Disabling XF86Misc extension" >&6;} + XF86MISC=no + fi + if test "x$COMPOSITE" = xyes; then + { echo "$as_me:$LINENO: Disabling Composite extension" >&5 +echo "$as_me: Disabling Composite extension" >&6;} + COMPOSITE=no + fi +fi + if test "x$XWIN" = xyes; then + XWIN_TRUE= + XWIN_FALSE='#' +else + XWIN_TRUE='#' + XWIN_FALSE= +fi + + if test "x$XWIN" = xyes; then + XWIN_MULTIWINDOW_TRUE= + XWIN_MULTIWINDOW_FALSE='#' +else + XWIN_MULTIWINDOW_TRUE='#' + XWIN_MULTIWINDOW_FALSE= +fi + + if test "x$XWIN" = xyes && false; then + XWIN_MULTIWINDOWEXTWM_TRUE= + XWIN_MULTIWINDOWEXTWM_FALSE='#' +else + XWIN_MULTIWINDOWEXTWM_TRUE='#' + XWIN_MULTIWINDOWEXTWM_FALSE= +fi + + if test "x$XWIN" = xyes; then + XWIN_CLIPBOARD_TRUE= + XWIN_CLIPBOARD_FALSE='#' +else + XWIN_CLIPBOARD_TRUE='#' + XWIN_CLIPBOARD_FALSE= +fi + + if test "x$XWIN" = xyes && false; then + XWIN_GLX_WINDOWS_TRUE= + XWIN_GLX_WINDOWS_FALSE='#' +else + XWIN_GLX_WINDOWS_TRUE='#' + XWIN_GLX_WINDOWS_FALSE= +fi + + if test "x$XWIN" = xyes && false; then + XWIN_NATIVEGDI_TRUE= + XWIN_NATIVEGDI_FALSE='#' +else + XWIN_NATIVEGDI_TRUE='#' + XWIN_NATIVEGDI_FALSE= +fi + + if test "x$XWIN" = xyes && false; then + XWIN_PRIMARYFB_TRUE= + XWIN_PRIMARYFB_FALSE='#' +else + XWIN_PRIMARYFB_TRUE='#' + XWIN_PRIMARYFB_FALSE= +fi + + if test "x$XWIN" = xyes; then + XWIN_RANDR_TRUE= + XWIN_RANDR_FALSE='#' +else + XWIN_RANDR_TRUE='#' + XWIN_RANDR_FALSE= +fi + + if test "x$XWIN" = xyes && test "x$XV" = xyes; then + XWIN_XV_TRUE= + XWIN_XV_FALSE='#' +else + XWIN_XV_TRUE='#' + XWIN_XV_FALSE= +fi + + + if test "x$ac_cv_lib_Xplugin_xp_init" = xyes; then + HAVE_X_PLUGIN_TRUE= + HAVE_X_PLUGIN_FALSE='#' +else + HAVE_X_PLUGIN_TRUE='#' + HAVE_X_PLUGIN_FALSE= +fi + + if test "x$xorg_cv_AGL_framework" = xyes; then + HAVE_AGL_FRAMEWORK_TRUE= + HAVE_AGL_FRAMEWORK_FALSE='#' +else + HAVE_AGL_FRAMEWORK_TRUE='#' + HAVE_AGL_FRAMEWORK_FALSE= +fi + +# Support for objc in autotools is minimal and not +# documented. +OBJC='$(CC)' +OBJCLD='$(CCLD)' +OBJCLINK='$(LINK)' +OBJCFLAGS='$(CFLAGS)' + + + + +# internal, undocumented automake func follows :( + +depcc="$OBJC" am_compiler_list='gcc3 gcc' + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_OBJC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_OBJC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_OBJC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_OBJC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_OBJC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_OBJC_dependencies_compiler_type" >&6; } +OBJCDEPMODE=depmode=$am_cv_OBJC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_OBJC_dependencies_compiler_type" = gcc3; then + am__fastdepOBJC_TRUE= + am__fastdepOBJC_FALSE='#' +else + am__fastdepOBJC_TRUE='#' + am__fastdepOBJC_FALSE= +fi + + + + +XEPHYR_LIBS= +XEPHYR_INCS= +XSDL_LIBS= +XSDL_INCS= +XSDL_DIRS= + + if test x$KDRIVE = xyes; then + KDRIVE_TRUE= + KDRIVE_FALSE='#' +else + KDRIVE_TRUE='#' + KDRIVE_FALSE= +fi + +if test "$KDRIVE" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define KDRIVESERVER 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define KDRIVEDDXACTIONS +_ACEOF + + + + +for ac_header in sys/vm86.h sys/io.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + if test "$ac_cv_header_sys_vm86_h" = yes && test "x$KDRIVEVESA" = xauto; then + KDRIVEVESA=yes + fi + + if test "x$KDRIVEVESA" = xyes; then + KDRIVEFBDEVLIB=yes + +cat >>confdefs.h <<\_ACEOF +#define KDRIVEVESA 1 +_ACEOF + + fi + + +for ac_header in linux/fb.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + if test "$ac_cv_header_linux_fb_h" = yes && test "x$XFBDEV" = xauto; then + XFBDEV=yes + fi + + if test "x$XFBDEV" = xyes; then + KDRIVEFBDEVLIB=yes + +cat >>confdefs.h <<\_ACEOF +#define KDRIVEFBDEV 1 +_ACEOF + + fi + + # tslib... + { echo "$as_me:$LINENO: checking for ts_open in -lts" >&5 +echo $ECHO_N "checking for ts_open in -lts... $ECHO_C" >&6; } +if test "${ac_cv_lib_ts_ts_open+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lts $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ts_open (); +int +main () +{ +return ts_open (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_ts_ts_open=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_ts_ts_open=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ts_ts_open" >&5 +echo "${ECHO_T}$ac_cv_lib_ts_ts_open" >&6; } +if test $ac_cv_lib_ts_ts_open = yes; then + HAVE_TSLIB="yes" +fi + + if test "x$TSLIB" = xauto && test "x$HAVE_TSLIB" = xyes; then + TSLIB=yes + fi + + if test "x$TSLIB" = xyes; then + if ! test "x$HAVE_TSLIB" = xyes; then + { { echo "$as_me:$LINENO: error: tslib must be installed to build the tslib input driver." >&5 +echo "$as_me: error: tslib must be installed to build the tslib input driver." >&2;} + { (exit 1); exit 1; }; } + fi + TSLIB_LIBS="-lts" + +cat >>confdefs.h <<\_ACEOF +#define TSLIB 1 +_ACEOF + + fi + + +for ac_header in SDL/SDL.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + if test x"$ac_cv_header_SDL_SDL_h" = xyes && test "x$XSDL" = xauto; then + XSDL=yes + fi + + if test x"$XSDL" = xyes; then + # PKG_CHECK_MODULES(XSDL_EXTRA, Xfont xau $XDMCP_MODULES) + +cat >>confdefs.h <<\_ACEOF +#define XSDLSERVER 1 +_ACEOF + + XSDL_LIBS="`sdl-config --libs` $XSERVER_LIBS" + XSDL_INCS="`sdl-config --cflags` $XSERVER_CFLAGS" + fi + + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XEPHYR" >&5 +echo $ECHO_N "checking for XEPHYR... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XEPHYR_CFLAGS"; then + pkg_cv_XEPHYR_CFLAGS="$XEPHYR_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xext xfont xau xdmcp\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11 xext xfont xau xdmcp") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XEPHYR_CFLAGS=`$PKG_CONFIG --cflags "x11 xext xfont xau xdmcp" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XEPHYR_LIBS"; then + pkg_cv_XEPHYR_LIBS="$XEPHYR_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xext xfont xau xdmcp\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11 xext xfont xau xdmcp") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XEPHYR_LIBS=`$PKG_CONFIG --libs "x11 xext xfont xau xdmcp" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XEPHYR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xext xfont xau xdmcp"` + else + XEPHYR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xext xfont xau xdmcp"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XEPHYR_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + xephyr="no" +elif test $pkg_failed = untried; then + xephyr="no" +else + XEPHYR_CFLAGS=$pkg_cv_XEPHYR_CFLAGS + XEPHYR_LIBS=$pkg_cv_XEPHYR_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + xephyr="yes" +fi + if test "x$XEPHYR" = xauto; then + XEPHYR=$xephyr + fi + + # Xephyr needs nanosleep() which is in librt on Solaris + { echo "$as_me:$LINENO: checking for nanosleep" >&5 +echo $ECHO_N "checking for nanosleep... $ECHO_C" >&6; } +if test "${ac_cv_func_nanosleep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define nanosleep to an innocuous variant, in case declares nanosleep. + For example, HP-UX 11i declares gettimeofday. */ +#define nanosleep innocuous_nanosleep + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char nanosleep (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef nanosleep + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char nanosleep (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_nanosleep || defined __stub___nanosleep +choke me +#endif + +int +main () +{ +return nanosleep (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_nanosleep=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_nanosleep=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_nanosleep" >&5 +echo "${ECHO_T}$ac_cv_func_nanosleep" >&6; } +if test $ac_cv_func_nanosleep = yes; then + : +else + { echo "$as_me:$LINENO: checking for nanosleep in -lrt" >&5 +echo $ECHO_N "checking for nanosleep in -lrt... $ECHO_C" >&6; } +if test "${ac_cv_lib_rt_nanosleep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char nanosleep (); +int +main () +{ +return nanosleep (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_rt_nanosleep=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_rt_nanosleep=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_rt_nanosleep" >&5 +echo "${ECHO_T}$ac_cv_lib_rt_nanosleep" >&6; } +if test $ac_cv_lib_rt_nanosleep = yes; then + XEPHYR_LIBS="$XEPHYR_LIBS -lrt" +fi + +fi + + + if test "x$TSLIB" = xyes; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for TSLIB" >&5 +echo $ECHO_N "checking for TSLIB... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$TSLIB_CFLAGS"; then + pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tslib-0.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "tslib-0.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_TSLIB_CFLAGS=`$PKG_CONFIG --cflags "tslib-0.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$TSLIB_LIBS"; then + pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tslib-0.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "tslib-0.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_TSLIB_LIBS=`$PKG_CONFIG --libs "tslib-0.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "tslib-0.0"` + else + TSLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "tslib-0.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$TSLIB_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + HAVE_TSLIB="no" +elif test $pkg_failed = untried; then + HAVE_TSLIB="no" +else + TSLIB_CFLAGS=$pkg_cv_TSLIB_CFLAGS + TSLIB_LIBS=$pkg_cv_TSLIB_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + HAVE_TSLIB="yes" +fi + if test "x$HAVE_TSLIB" = xno; then + { { echo "$as_me:$LINENO: error: tslib must be installed to build the tslib driver. See http://tslib.berlios.de/" >&5 +echo "$as_me: error: tslib must be installed to build the tslib driver. See http://tslib.berlios.de/" >&2;} + { (exit 1); exit 1; }; } + fi + +cat >>confdefs.h <<\_ACEOF +#define TSLIB 1 +_ACEOF + + fi + + # damage shadow extension glx (NOTYET) fb mi + KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src' + KDRIVE_PURE_INCS="$KDRIVE_INC $MIEXT_DAMAGE_INC $MIEXT_SHADOW_INC $XEXT_INC $FB_INC $MI_INC" + KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux' + KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC" + + KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS" + + KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB" + KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a' + case $host_os in + *linux*) + KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a' + KDRIVELINUX=yes + ;; + esac + KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a' + KDRIVE_LOCAL_LIBS="$DIX_LIB $CONFIG_LIB $KDRIVE_LIB $TSLIB_LIBS $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB" + KDRIVE_LIBS="$XSERVERLIBS_LIBS $KDRIVE_LOCAL_LIBS" + + # check if we can build Xephyr + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XEPHYR" >&5 +echo $ECHO_N "checking for XEPHYR... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XEPHYR_CFLAGS"; then + pkg_cv_XEPHYR_CFLAGS="$XEPHYR_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xext xfont xau xdmcp\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11 xext xfont xau xdmcp") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XEPHYR_CFLAGS=`$PKG_CONFIG --cflags "x11 xext xfont xau xdmcp" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XEPHYR_LIBS"; then + pkg_cv_XEPHYR_LIBS="$XEPHYR_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xext xfont xau xdmcp\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11 xext xfont xau xdmcp") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XEPHYR_LIBS=`$PKG_CONFIG --libs "x11 xext xfont xau xdmcp" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XEPHYR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xext xfont xau xdmcp"` + else + XEPHYR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xext xfont xau xdmcp"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XEPHYR_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + xephyr="no" +elif test $pkg_failed = untried; then + xephyr="no" +else + XEPHYR_CFLAGS=$pkg_cv_XEPHYR_CFLAGS + XEPHYR_LIBS=$pkg_cv_XEPHYR_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + xephyr="yes" +fi + + + + + +fi + + + + + + + if test "x$KDRIVELINUX" = xyes; then + KDRIVELINUX_TRUE= + KDRIVELINUX_FALSE='#' +else + KDRIVELINUX_TRUE='#' + KDRIVELINUX_FALSE= +fi + + if test "x$HAVE_TSLIB" = xyes; then + TSLIB_TRUE= + TSLIB_FALSE='#' +else + TSLIB_TRUE='#' + TSLIB_FALSE= +fi + + if false; then + H3600_TS_TRUE= + H3600_TS_FALSE='#' +else + H3600_TS_TRUE='#' + H3600_TS_FALSE= +fi + + if test "x$KDRIVEVESA" = xyes; then + KDRIVEVESA_TRUE= + KDRIVEVESA_FALSE='#' +else + KDRIVEVESA_TRUE='#' + KDRIVEVESA_FALSE= +fi + + if test "x$XFBDEV" = xyes; then + KDRIVEFBDEV_TRUE= + KDRIVEFBDEV_FALSE='#' +else + KDRIVEFBDEV_TRUE='#' + KDRIVEFBDEV_FALSE= +fi + + if test x"$XSDL" = xyes; then + XSDLSERVER_TRUE= + XSDLSERVER_FALSE='#' +else + XSDLSERVER_TRUE='#' + XSDLSERVER_FALSE= +fi + + if test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes; then + XEPHYR_TRUE= + XEPHYR_FALSE='#' +else + XEPHYR_TRUE='#' + XEPHYR_FALSE= +fi + + if test "x$KDRIVE" = xyes && test "x$KDRIVEFBDEVLIB" = xyes; then + BUILD_KDRIVEFBDEVLIB_TRUE= + BUILD_KDRIVEFBDEVLIB_FALSE='#' +else + BUILD_KDRIVEFBDEVLIB_TRUE='#' + BUILD_KDRIVEFBDEVLIB_FALSE= +fi + + if test "x$KDRIVE" = xyes && test "x$XFAKE" = xyes; then + XFAKESERVER_TRUE= + XFAKESERVER_FALSE='#' +else + XFAKESERVER_TRUE='#' + XFAKESERVER_FALSE= +fi + + + +cat >>confdefs.h <<\_ACEOF +#define __XKBDEFRULES__ "xorg" +_ACEOF + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$XKBPATH\"" + eval ac_define_dir="\"$ac_define_dir\"" + XKB_BASE_DIRECTORY="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define XKB_BASE_DIRECTORY "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$bindir\"" + eval ac_define_dir="\"$ac_define_dir\"" + XKB_BIN_DIRECTORY="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define XKB_BIN_DIRECTORY "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + +# Make sure XKM_OUTPUT_DIR is an absolute path +XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1` + +if [ x$XKBOUTPUT_FIRSTCHAR != x/ ] ; then + XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT" +fi + +# XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed +# XKB_COMPILED_DIR (used in Makefiles) must not or install-sh gets confused + +XKBOUTPUT=`echo $XKBOUTPUT/ | sed 's|/*$|/|'` +XKB_COMPILED_DIR=`echo $XKBOUTPUT | sed 's|/*$||'` + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$XKBOUTPUT\"" + eval ac_define_dir="\"$ac_define_dir\"" + XKM_OUTPUT_DIR="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define XKM_OUTPUT_DIR "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + + + +cat >>confdefs.h <<\_ACEOF +#define XResExtension 1 +_ACEOF + + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#ifndef __GLIBC__ +#error not glibc +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + +cat >>confdefs.h <<\_ACEOF +#define _GNU_SOURCE 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$prefix\"" + eval ac_define_dir="\"$ac_define_dir\"" + PROJECTROOT="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define PROJECTROOT "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + +if test "x$XORG" = xyes; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XORGCONFIG_DEP" >&5 +echo $ECHO_N "checking for XORGCONFIG_DEP... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XORGCONFIG_DEP_CFLAGS"; then + pkg_cv_XORGCONFIG_DEP_CFLAGS="$XORGCONFIG_DEP_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xkbfile x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xkbfile x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XORGCONFIG_DEP_CFLAGS=`$PKG_CONFIG --cflags "xkbfile x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XORGCONFIG_DEP_LIBS"; then + pkg_cv_XORGCONFIG_DEP_LIBS="$XORGCONFIG_DEP_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xkbfile x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xkbfile x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XORGCONFIG_DEP_LIBS=`$PKG_CONFIG --libs "xkbfile x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XORGCONFIG_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xkbfile x11"` + else + XORGCONFIG_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xkbfile x11"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XORGCONFIG_DEP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xkbfile x11) were not met: + +$XORGCONFIG_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XORGCONFIG_DEP_CFLAGS +and XORGCONFIG_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (xkbfile x11) were not met: + +$XORGCONFIG_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XORGCONFIG_DEP_CFLAGS +and XORGCONFIG_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XORGCONFIG_DEP_CFLAGS +and XORGCONFIG_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XORGCONFIG_DEP_CFLAGS +and XORGCONFIG_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XORGCONFIG_DEP_CFLAGS=$pkg_cv_XORGCONFIG_DEP_CFLAGS + XORGCONFIG_DEP_LIBS=$pkg_cv_XORGCONFIG_DEP_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + + +fi + +# Check whether --enable-xorgcfg was given. +if test "${enable_xorgcfg+set}" = set; then + enableval=$enable_xorgcfg; XORGCFG=$enableval +else + XORGCFG=no +fi + +if test x$XORGCFG = xyes ; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XORGCFG_DEP" >&5 +echo $ECHO_N "checking for XORGCFG_DEP... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$XORGCFG_DEP_CFLAGS"; then + pkg_cv_XORGCFG_DEP_CFLAGS="$XORGCFG_DEP_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XORGCFG_DEP_CFLAGS=`$PKG_CONFIG --cflags "xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XORGCFG_DEP_LIBS"; then + pkg_cv_XORGCFG_DEP_LIBS="$XORGCFG_DEP_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XORGCFG_DEP_LIBS=`$PKG_CONFIG --libs "xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XORGCFG_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11"` + else + XORGCFG_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XORGCFG_DEP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11) were not met: + +$XORGCFG_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XORGCFG_DEP_CFLAGS +and XORGCFG_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11) were not met: + +$XORGCFG_DEP_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XORGCFG_DEP_CFLAGS +and XORGCFG_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XORGCFG_DEP_CFLAGS +and XORGCFG_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XORGCFG_DEP_CFLAGS +and XORGCFG_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XORGCFG_DEP_CFLAGS=$pkg_cv_XORGCFG_DEP_CFLAGS + XORGCFG_DEP_LIBS=$pkg_cv_XORGCFG_DEP_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi + XORGCFG_DEP_CFLAGS="$XORGCFG_DEP_CFLAGS $PIXMAN_CFLAGS" + { echo "$as_me:$LINENO: checking for waddstr in -lcurses" >&5 +echo $ECHO_N "checking for waddstr in -lcurses... $ECHO_C" >&6; } +if test "${ac_cv_lib_curses_waddstr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcurses $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char waddstr (); +int +main () +{ +return waddstr (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_curses_waddstr=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_curses_waddstr=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_curses_waddstr" >&5 +echo "${ECHO_T}$ac_cv_lib_curses_waddstr" >&6; } +if test $ac_cv_lib_curses_waddstr = yes; then + XORGCFG_DEP_LIBS="$XORGCFG_DEP_LIBS -lcurses"; CURSES=yes +else + { echo "$as_me:$LINENO: checking for waddstr in -lncurses" >&5 +echo $ECHO_N "checking for waddstr in -lncurses... $ECHO_C" >&6; } +if test "${ac_cv_lib_ncurses_waddstr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lncurses $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char waddstr (); +int +main () +{ +return waddstr (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_ncurses_waddstr=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_ncurses_waddstr=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_waddstr" >&5 +echo "${ECHO_T}$ac_cv_lib_ncurses_waddstr" >&6; } +if test $ac_cv_lib_ncurses_waddstr = yes; then + XORGCFG_DEP_LIBS="$XORGCFG_DEP_LIBS -lncurses" ; CURSES=yes +else + CURSES=no +fi + +fi + + + + + APPDEFAULTDIR=$(pkg-config --variable=appdefaultdir xt) + +fi + if test x$XORGCFG = xyes; then + BUILD_XORGCFG_TRUE= + BUILD_XORGCFG_FALSE='#' +else + BUILD_XORGCFG_TRUE='#' + BUILD_XORGCFG_FALSE= +fi + + if test x$CURSES = xyes; then + USE_CURSES_TRUE= + USE_CURSES_FALSE='#' +else + USE_CURSES_TRUE='#' + USE_CURSES_FALSE= +fi + + +# Check whether --enable-kbd_mode was given. +if test "${enable_kbd_mode+set}" = set; then + enableval=$enable_kbd_mode; BUILD_KBD_MODE=$enable_val +else + BUILD_KBD_MODE="auto" +fi + +if test x$BUILD_KBD_MODE != xno ; then + case $host_os in + *bsd*) + KBD_MODE_TYPE="bsd" +# BUILD_KBD_MODE="yes" # need to test on BSD before enabling + # by default + ;; + solaris*) + KBD_MODE_TYPE="sun" + BUILD_KBD_MODE="yes" # enabled by default + ;; + *) + BUILD_KBD_MODE="no" # disabled by default + ;; + esac +fi + if test x$BUILD_KBD_MODE = xyes; then + BUILD_KBD_MODE_TRUE= + BUILD_KBD_MODE_FALSE='#' +else + BUILD_KBD_MODE_TRUE='#' + BUILD_KBD_MODE_FALSE= +fi + + if test x$KBD_MODE_TYPE = xbsd; then + BSD_KBD_MODE_TRUE= + BSD_KBD_MODE_FALSE='#' +else + BSD_KBD_MODE_TRUE='#' + BSD_KBD_MODE_FALSE= +fi + + if test x$KBD_MODE_TYPE = xsun; then + SUN_KBD_MODE_TRUE= + SUN_KBD_MODE_FALSE='#' +else + SUN_KBD_MODE_TRUE='#' + SUN_KBD_MODE_FALSE= +fi + + +BUILD_DATE="$(date +'%Y%m%d')" + +BUILD_TIME="$(date +'1%H%M%S')" + + +DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS" + + + + + +# Man page sections - used in config utils & generating man pages + + + +if test x$APP_MAN_SUFFIX = x ; then + APP_MAN_SUFFIX=1 +fi +if test x$APP_MAN_DIR = x ; then + APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' +fi + +if test x$LIB_MAN_SUFFIX = x ; then + LIB_MAN_SUFFIX=3 +fi +if test x$LIB_MAN_DIR = x ; then + LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' +fi + +if test x$FILE_MAN_SUFFIX = x ; then + case $host_os in + solaris*) FILE_MAN_SUFFIX=4 ;; + *) FILE_MAN_SUFFIX=5 ;; + esac +fi +if test x$FILE_MAN_DIR = x ; then + FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' +fi + +if test x$MISC_MAN_SUFFIX = x ; then + case $host_os in + solaris*) MISC_MAN_SUFFIX=5 ;; + *) MISC_MAN_SUFFIX=7 ;; + esac +fi +if test x$MISC_MAN_DIR = x ; then + MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' +fi + +if test x$DRIVER_MAN_SUFFIX = x ; then + case $host_os in + solaris*) DRIVER_MAN_SUFFIX=7 ;; + *) DRIVER_MAN_SUFFIX=4 ;; + esac +fi +if test x$DRIVER_MAN_DIR = x ; then + DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' +fi + +if test x$ADMIN_MAN_SUFFIX = x ; then + case $host_os in + solaris*) ADMIN_MAN_SUFFIX=1m ;; + *) ADMIN_MAN_SUFFIX=8 ;; + esac +fi +if test x$ADMIN_MAN_DIR = x ; then + ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' +fi + + + + + + + + + + + + + + + + +ac_config_files="$ac_config_files Makefile GL/Makefile GL/apple/Makefile GL/glx/Makefile GL/mesa/Makefile GL/mesa/glapi/Makefile GL/mesa/main/Makefile GL/mesa/math/Makefile GL/mesa/shader/Makefile GL/mesa/shader/grammar/Makefile GL/mesa/shader/slang/Makefile GL/mesa/swrast/Makefile GL/mesa/swrast_setup/Makefile GL/mesa/tnl/Makefile GL/mesa/vbo/Makefile GL/mesa/X/Makefile include/Makefile afb/Makefile composite/Makefile damageext/Makefile dbe/Makefile dix/Makefile doc/Makefile fb/Makefile record/Makefile XTrap/Makefile mfb/Makefile cfb/Makefile cfb32/Makefile config/Makefile mi/Makefile miext/Makefile miext/damage/Makefile miext/shadow/Makefile miext/cw/Makefile miext/rootless/Makefile miext/rootless/safeAlpha/Makefile miext/rootless/accel/Makefile os/Makefile randr/Makefile render/Makefile xkb/Makefile Xext/Makefile Xi/Makefile xfixes/Makefile exa/Makefile hw/Makefile hw/xfree86/Makefile hw/xfree86/common/Makefile hw/xfree86/common/xf86Build.h hw/xfree86/ddc/Makefile hw/xfree86/dixmods/Makefile hw/xfree86/dixmods/extmod/Makefile hw/xfree86/doc/Makefile hw/xfree86/doc/devel/Makefile hw/xfree86/doc/man/Makefile hw/xfree86/doc/sgml/Makefile hw/xfree86/dri/Makefile hw/xfree86/dummylib/Makefile hw/xfree86/exa/Makefile hw/xfree86/fbdevhw/Makefile hw/xfree86/i2c/Makefile hw/xfree86/int10/Makefile hw/xfree86/loader/Makefile hw/xfree86/modes/Makefile hw/xfree86/os-support/Makefile hw/xfree86/os-support/bsd/Makefile hw/xfree86/os-support/bus/Makefile hw/xfree86/os-support/hurd/Makefile hw/xfree86/os-support/misc/Makefile hw/xfree86/os-support/linux/Makefile hw/xfree86/os-support/lynxos/Makefile hw/xfree86/os-support/sco/Makefile hw/xfree86/os-support/solaris/Makefile hw/xfree86/os-support/sysv/Makefile hw/xfree86/os-support/usl/Makefile hw/xfree86/parser/Makefile hw/xfree86/rac/Makefile hw/xfree86/ramdac/Makefile hw/xfree86/scanpci/Makefile hw/xfree86/shadowfb/Makefile hw/xfree86/vbe/Makefile hw/xfree86/vgahw/Makefile hw/xfree86/x86emu/Makefile hw/xfree86/xaa/Makefile hw/xfree86/xf1bpp/Makefile hw/xfree86/xf4bpp/Makefile hw/xfree86/xf8_16bpp/Makefile hw/xfree86/xf8_32bpp/Makefile hw/xfree86/utils/Makefile hw/xfree86/utils/cvt/Makefile hw/xfree86/utils/gtf/Makefile hw/xfree86/utils/ioport/Makefile hw/xfree86/utils/kbd_mode/Makefile hw/xfree86/utils/pcitweak/Makefile hw/xfree86/utils/scanpci/Makefile hw/xfree86/utils/xorgcfg/Makefile hw/xfree86/utils/xorgconfig/Makefile hw/dmx/config/Makefile hw/dmx/doc/Makefile hw/dmx/examples/Makefile hw/dmx/input/Makefile hw/dmx/glxProxy/Makefile hw/dmx/Makefile hw/vfb/Makefile hw/xgl/Makefile hw/xgl/egl/Makefile hw/xgl/egl/module/Makefile hw/xgl/glx/Makefile hw/xgl/glx/module/Makefile hw/xgl/glxext/Makefile hw/xgl/glxext/module/Makefile hw/xnest/Makefile hw/xwin/Makefile hw/darwin/Makefile hw/darwin/bundle/Makefile hw/darwin/bundle/Dutch.lproj/Makefile hw/darwin/bundle/English.lproj/Makefile hw/darwin/bundle/French.lproj/Makefile hw/darwin/bundle/German.lproj/Makefile hw/darwin/bundle/Japanese.lproj/Makefile hw/darwin/bundle/Portuguese.lproj/Makefile hw/darwin/bundle/Spanish.lproj/Makefile hw/darwin/bundle/Swedish.lproj/Makefile hw/darwin/bundle/ko.lproj/Makefile hw/darwin/iokit/Makefile hw/darwin/quartz/Makefile hw/darwin/utils/Makefile hw/kdrive/Makefile hw/kdrive/ati/Makefile hw/kdrive/chips/Makefile hw/kdrive/ephyr/Makefile hw/kdrive/epson/Makefile hw/kdrive/fake/Makefile hw/kdrive/fbdev/Makefile hw/kdrive/i810/Makefile hw/kdrive/linux/Makefile hw/kdrive/mach64/Makefile hw/kdrive/mga/Makefile hw/kdrive/neomagic/Makefile hw/kdrive/nvidia/Makefile hw/kdrive/pm2/Makefile hw/kdrive/r128/Makefile hw/kdrive/sdl/Makefile hw/kdrive/sis300/Makefile hw/kdrive/smi/Makefile hw/kdrive/src/Makefile hw/kdrive/vesa/Makefile hw/kdrive/via/Makefile hw/xprint/Makefile hw/xprint/doc/Makefile hw/xprint/pcl/Makefile hw/xprint/pcl-mono/Makefile hw/xprint/raster/Makefile hw/xprint/ps/Makefile hw/xprint/etc/Makefile hw/xprint/etc/Xsession.d/Makefile hw/xprint/etc/init.d/Makefile hw/xprint/etc/profile.d/Makefile hw/xprint/config/Makefile hw/xprint/config/C/print/attributes/Makefile hw/xprint/config/C/print/ddx-config/Makefile hw/xprint/config/C/print/ddx-config/raster/Makefile hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile hw/xprint/config/C/print/models/PSdefault/fonts/Makefile hw/xprint/config/C/print/models/PSdefault/Makefile hw/xprint/config/C/print/models/PSspooldir/Makefile hw/xprint/config/C/print/models/SPSPARC2/Makefile hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile hw/xprint/config/C/print/models/GSdefault/Makefile hw/xprint/config/C/print/models/HPLJ4050-PS/Makefile hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile hw/xprint/config/C/print/models/Makefile hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile hw/xprint/config/C/print/models/CANONC3200-PS/Makefile hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile hw/xprint/config/C/print/models/HPLJ4family/fonts/Makefile hw/xprint/config/C/print/models/HPLJ4family/Makefile hw/xprint/config/C/print/models/HPDJ1600C/Makefile hw/xprint/config/C/print/models/HPDJ1600C/fonts/Makefile hw/xprint/config/C/print/Makefile hw/xprint/config/C/Makefile hw/xprint/config/en_US/print/attributes/Makefile hw/xprint/config/en_US/print/Makefile hw/xprint/config/en_US/Makefile xorg-server.pc" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XSERVER_DTRACE_TRUE}" && test -z "${XSERVER_DTRACE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XSERVER_DTRACE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XSERVER_DTRACE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${NEED_STRLCAT_TRUE}" && test -z "${NEED_STRLCAT_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"NEED_STRLCAT\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"NEED_STRLCAT\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${NEED_VSNPRINTF_TRUE}" && test -z "${NEED_VSNPRINTF_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"NEED_VSNPRINTF\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"NEED_VSNPRINTF\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${AGP_TRUE}" && test -z "${AGP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AGP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AGP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${LNXAPM_TRUE}" && test -z "${LNXAPM_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"LNXAPM\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"LNXAPM\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${FBDEVHW_TRUE}" && test -z "${FBDEVHW_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"FBDEVHW\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"FBDEVHW\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${FREEBSD_KLDLOAD_TRUE}" && test -z "${FREEBSD_KLDLOAD_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"FREEBSD_KLDLOAD\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"FREEBSD_KLDLOAD\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ALPHA_VIDEO_TRUE}" && test -z "${ALPHA_VIDEO_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"ALPHA_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"ALPHA_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ARM_VIDEO_TRUE}" && test -z "${ARM_VIDEO_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"ARM_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"ARM_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${I386_VIDEO_TRUE}" && test -z "${I386_VIDEO_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"I386_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"I386_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${PPC_VIDEO_TRUE}" && test -z "${PPC_VIDEO_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"PPC_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"PPC_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SPARC64_VIDEO_TRUE}" && test -z "${SPARC64_VIDEO_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"SPARC64_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"SPARC64_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${KDRIVE_HW_TRUE}" && test -z "${KDRIVE_HW_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"KDRIVE_HW\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"KDRIVE_HW\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${INSTALL_SETUID_TRUE}" && test -z "${INSTALL_SETUID_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"INSTALL_SETUID\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"INSTALL_SETUID\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${INT10_VM86_TRUE}" && test -z "${INT10_VM86_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"INT10_VM86\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"INT10_VM86\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${INT10_X86EMU_TRUE}" && test -z "${INT10_X86EMU_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"INT10_X86EMU\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"INT10_X86EMU\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${INT10_STUB_TRUE}" && test -z "${INT10_STUB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"INT10_STUB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"INT10_STUB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILDDOCS_TRUE}" && test -z "${BUILDDOCS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILDDOCS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILDDOCS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILD_LINUXDOC_TRUE}" && test -z "${BUILD_LINUXDOC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_LINUXDOC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILD_LINUXDOC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILD_PDFDOC_TRUE}" && test -z "${BUILD_PDFDOC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_PDFDOC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILD_PDFDOC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${INSTALL_LIBXF86CONFIG_TRUE}" && test -z "${INSTALL_LIBXF86CONFIG_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"INSTALL_LIBXF86CONFIG\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"INSTALL_LIBXF86CONFIG\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_DBUS_TRUE}" && test -z "${HAVE_DBUS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_DBUS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_DBUS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${CONFIG_DBUS_API_TRUE}" && test -z "${CONFIG_DBUS_API_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CONFIG_DBUS_API\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CONFIG_DBUS_API\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${CONFIG_HAL_TRUE}" && test -z "${CONFIG_HAL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CONFIG_HAL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CONFIG_HAL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XV_TRUE}" && test -z "${XV_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XV\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XV\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XVMC_TRUE}" && test -z "${XVMC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XVMC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XVMC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${COMPOSITE_TRUE}" && test -z "${COMPOSITE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"COMPOSITE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"COMPOSITE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${MITSHM_TRUE}" && test -z "${MITSHM_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MITSHM\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MITSHM\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XTRAP_TRUE}" && test -z "${XTRAP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XTRAP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XTRAP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${RECORD_TRUE}" && test -z "${RECORD_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"RECORD\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"RECORD\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SCREENSAVER_TRUE}" && test -z "${SCREENSAVER_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"SCREENSAVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"SCREENSAVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${RES_TRUE}" && test -z "${RES_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"RES\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"RES\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${GLX_TRUE}" && test -z "${GLX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"GLX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"GLX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${AIGLX_TRUE}" && test -z "${AIGLX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AIGLX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AIGLX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${DRI_TRUE}" && test -z "${DRI_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"DRI\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"DRI\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XINERAMA_TRUE}" && test -z "${XINERAMA_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XINERAMA\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XINERAMA\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XACE_TRUE}" && test -z "${XACE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XACE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XACE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XCSECURITY_TRUE}" && test -z "${XCSECURITY_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XCSECURITY\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XCSECURITY\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XEVIE_TRUE}" && test -z "${XEVIE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XEVIE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XEVIE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${APPGROUP_TRUE}" && test -z "${APPGROUP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"APPGROUP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"APPGROUP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${CUP_TRUE}" && test -z "${CUP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CUP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CUP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${EVI_TRUE}" && test -z "${EVI_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"EVI\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"EVI\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${MULTIBUFFER_TRUE}" && test -z "${MULTIBUFFER_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MULTIBUFFER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MULTIBUFFER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${FONTCACHE_TRUE}" && test -z "${FONTCACHE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"FONTCACHE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"FONTCACHE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${DBE_TRUE}" && test -z "${DBE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"DBE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"DBE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XF86BIGFONT_TRUE}" && test -z "${XF86BIGFONT_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XF86BIGFONT\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XF86BIGFONT\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${DPMSExtension_TRUE}" && test -z "${DPMSExtension_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"DPMSExtension\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"DPMSExtension\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XPRINT_TRUE}" && test -z "${XPRINT_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XPRINT\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XPRINT\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XCALIBRATE_TRUE}" && test -z "${XCALIBRATE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XCALIBRATE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XCALIBRATE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XF86UTILS_TRUE}" && test -z "${XF86UTILS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XF86UTILS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XF86UTILS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XDMCP_TRUE}" && test -z "${XDMCP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XDMCP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XDMCP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XDMAUTH_TRUE}" && test -z "${XDMAUTH_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XDMAUTH\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XDMAUTH\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_RGB_BUILTIN_TRUE}" && test -z "${USE_RGB_BUILTIN_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_RGB_BUILTIN\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_RGB_BUILTIN\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"DEBUG\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"DEBUG\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${DMX_TRUE}" && test -z "${DMX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"DMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"DMX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${DMX_BUILD_LNX_TRUE}" && test -z "${DMX_BUILD_LNX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"DMX_BUILD_LNX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"DMX_BUILD_LNX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${DMX_BUILD_USB_TRUE}" && test -z "${DMX_BUILD_USB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"DMX_BUILD_USB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"DMX_BUILD_USB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XVFB_TRUE}" && test -z "${XVFB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XVFB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XVFB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XNEST_TRUE}" && test -z "${XNEST_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XNEST\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XNEST\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XGL_TRUE}" && test -z "${XGL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XGL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XGL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XEGL_TRUE}" && test -z "${XEGL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XEGL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XEGL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XGLX_TRUE}" && test -z "${XGLX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XGLX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XGLX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XORG_TRUE}" && test -z "${XORG_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XORG\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XORG\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XORG_BUS_LINUXPCI_TRUE}" && test -z "${XORG_BUS_LINUXPCI_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XORG_BUS_LINUXPCI\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XORG_BUS_LINUXPCI\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XORG_BUS_FREEBSDPCI_TRUE}" && test -z "${XORG_BUS_FREEBSDPCI_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XORG_BUS_FREEBSDPCI\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XORG_BUS_FREEBSDPCI\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XORG_BUS_NETBSDPCI_TRUE}" && test -z "${XORG_BUS_NETBSDPCI_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XORG_BUS_NETBSDPCI\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XORG_BUS_NETBSDPCI\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XORG_BUS_IX86PCI_TRUE}" && test -z "${XORG_BUS_IX86PCI_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XORG_BUS_IX86PCI\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XORG_BUS_IX86PCI\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XORG_BUS_PPCPCI_TRUE}" && test -z "${XORG_BUS_PPCPCI_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XORG_BUS_PPCPCI\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XORG_BUS_PPCPCI\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XORG_BUS_SPARCPCI_TRUE}" && test -z "${XORG_BUS_SPARCPCI_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XORG_BUS_SPARCPCI\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XORG_BUS_SPARCPCI\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XORG_BUS_SPARC_TRUE}" && test -z "${XORG_BUS_SPARC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XORG_BUS_SPARC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XORG_BUS_SPARC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XORG_LOADER_SPARC_TRUE}" && test -z "${XORG_LOADER_SPARC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XORG_LOADER_SPARC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XORG_LOADER_SPARC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${LINUX_IA64_TRUE}" && test -z "${LINUX_IA64_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"LINUX_IA64\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"LINUX_IA64\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${LINUX_ALPHA_TRUE}" && test -z "${LINUX_ALPHA_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"LINUX_ALPHA\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"LINUX_ALPHA\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${LNXACPI_TRUE}" && test -z "${LNXACPI_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"LNXACPI\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"LNXACPI\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SOLARIS_USL_CONSOLE_TRUE}" && test -z "${SOLARIS_USL_CONSOLE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"SOLARIS_USL_CONSOLE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"SOLARIS_USL_CONSOLE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SOLARIS_ASM_INLINE_TRUE}" && test -z "${SOLARIS_ASM_INLINE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"SOLARIS_ASM_INLINE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"SOLARIS_ASM_INLINE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILD_DARWIN_TRUE}" && test -z "${BUILD_DARWIN_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_DARWIN\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILD_DARWIN\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XQUARTZ_TRUE}" && test -z "${XQUARTZ_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XQUARTZ\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XQUARTZ\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${DGA_TRUE}" && test -z "${DGA_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"DGA\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"DGA\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${MFB_TRUE}" && test -z "${MFB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MFB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MFB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${CFB_TRUE}" && test -z "${CFB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CFB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CFB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${AFB_TRUE}" && test -z "${AFB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AFB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AFB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XP_USE_FREETYPE_TRUE}" && test -z "${XP_USE_FREETYPE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XP_USE_FREETYPE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XP_USE_FREETYPE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XWIN_TRUE}" && test -z "${XWIN_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XWIN\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XWIN\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XWIN_MULTIWINDOW_TRUE}" && test -z "${XWIN_MULTIWINDOW_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XWIN_MULTIWINDOW\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XWIN_MULTIWINDOW\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XWIN_MULTIWINDOWEXTWM_TRUE}" && test -z "${XWIN_MULTIWINDOWEXTWM_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XWIN_MULTIWINDOWEXTWM\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XWIN_MULTIWINDOWEXTWM\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XWIN_CLIPBOARD_TRUE}" && test -z "${XWIN_CLIPBOARD_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XWIN_CLIPBOARD\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XWIN_CLIPBOARD\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XWIN_GLX_WINDOWS_TRUE}" && test -z "${XWIN_GLX_WINDOWS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XWIN_GLX_WINDOWS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XWIN_GLX_WINDOWS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XWIN_NATIVEGDI_TRUE}" && test -z "${XWIN_NATIVEGDI_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XWIN_NATIVEGDI\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XWIN_NATIVEGDI\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XWIN_PRIMARYFB_TRUE}" && test -z "${XWIN_PRIMARYFB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XWIN_PRIMARYFB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XWIN_PRIMARYFB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XWIN_RANDR_TRUE}" && test -z "${XWIN_RANDR_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XWIN_RANDR\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XWIN_RANDR\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XWIN_XV_TRUE}" && test -z "${XWIN_XV_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XWIN_XV\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XWIN_XV\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_X_PLUGIN_TRUE}" && test -z "${HAVE_X_PLUGIN_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_X_PLUGIN\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_X_PLUGIN\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_AGL_FRAMEWORK_TRUE}" && test -z "${HAVE_AGL_FRAMEWORK_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_AGL_FRAMEWORK\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_AGL_FRAMEWORK\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepOBJC_TRUE}" && test -z "${am__fastdepOBJC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepOBJC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepOBJC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${KDRIVE_TRUE}" && test -z "${KDRIVE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"KDRIVE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"KDRIVE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${KDRIVELINUX_TRUE}" && test -z "${KDRIVELINUX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"KDRIVELINUX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"KDRIVELINUX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${TSLIB_TRUE}" && test -z "${TSLIB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"TSLIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"TSLIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${H3600_TS_TRUE}" && test -z "${H3600_TS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"H3600_TS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"H3600_TS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${KDRIVEVESA_TRUE}" && test -z "${KDRIVEVESA_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"KDRIVEVESA\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"KDRIVEVESA\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${KDRIVEFBDEV_TRUE}" && test -z "${KDRIVEFBDEV_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"KDRIVEFBDEV\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"KDRIVEFBDEV\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XSDLSERVER_TRUE}" && test -z "${XSDLSERVER_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XSDLSERVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XSDLSERVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XEPHYR_TRUE}" && test -z "${XEPHYR_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XEPHYR\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XEPHYR\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILD_KDRIVEFBDEVLIB_TRUE}" && test -z "${BUILD_KDRIVEFBDEVLIB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_KDRIVEFBDEVLIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILD_KDRIVEFBDEVLIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${XFAKESERVER_TRUE}" && test -z "${XFAKESERVER_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"XFAKESERVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"XFAKESERVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILD_XORGCFG_TRUE}" && test -z "${BUILD_XORGCFG_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_XORGCFG\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILD_XORGCFG\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_CURSES_TRUE}" && test -z "${USE_CURSES_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_CURSES\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_CURSES\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILD_KBD_MODE_TRUE}" && test -z "${BUILD_KBD_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_KBD_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILD_KBD_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BSD_KBD_MODE_TRUE}" && test -z "${BSD_KBD_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BSD_KBD_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BSD_KBD_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SUN_KBD_MODE_TRUE}" && test -z "${SUN_KBD_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"SUN_KBD_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"SUN_KBD_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +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 + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by xorg-server $as_me 1.4, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +xorg-server config.status 1.4 +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "include/do-not-use-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/do-not-use-config.h" ;; + "include/xorg-server.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xorg-server.h" ;; + "include/dix-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/dix-config.h" ;; + "include/xgl-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xgl-config.h" ;; + "include/xorg-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xorg-config.h" ;; + "include/xkb-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xkb-config.h" ;; + "include/xwin-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xwin-config.h" ;; + "include/kdrive-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/kdrive-config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "GL/Makefile") CONFIG_FILES="$CONFIG_FILES GL/Makefile" ;; + "GL/apple/Makefile") CONFIG_FILES="$CONFIG_FILES GL/apple/Makefile" ;; + "GL/glx/Makefile") CONFIG_FILES="$CONFIG_FILES GL/glx/Makefile" ;; + "GL/mesa/Makefile") CONFIG_FILES="$CONFIG_FILES GL/mesa/Makefile" ;; + "GL/mesa/glapi/Makefile") CONFIG_FILES="$CONFIG_FILES GL/mesa/glapi/Makefile" ;; + "GL/mesa/main/Makefile") CONFIG_FILES="$CONFIG_FILES GL/mesa/main/Makefile" ;; + "GL/mesa/math/Makefile") CONFIG_FILES="$CONFIG_FILES GL/mesa/math/Makefile" ;; + "GL/mesa/shader/Makefile") CONFIG_FILES="$CONFIG_FILES GL/mesa/shader/Makefile" ;; + "GL/mesa/shader/grammar/Makefile") CONFIG_FILES="$CONFIG_FILES GL/mesa/shader/grammar/Makefile" ;; + "GL/mesa/shader/slang/Makefile") CONFIG_FILES="$CONFIG_FILES GL/mesa/shader/slang/Makefile" ;; + "GL/mesa/swrast/Makefile") CONFIG_FILES="$CONFIG_FILES GL/mesa/swrast/Makefile" ;; + "GL/mesa/swrast_setup/Makefile") CONFIG_FILES="$CONFIG_FILES GL/mesa/swrast_setup/Makefile" ;; + "GL/mesa/tnl/Makefile") CONFIG_FILES="$CONFIG_FILES GL/mesa/tnl/Makefile" ;; + "GL/mesa/vbo/Makefile") CONFIG_FILES="$CONFIG_FILES GL/mesa/vbo/Makefile" ;; + "GL/mesa/X/Makefile") CONFIG_FILES="$CONFIG_FILES GL/mesa/X/Makefile" ;; + "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; + "afb/Makefile") CONFIG_FILES="$CONFIG_FILES afb/Makefile" ;; + "composite/Makefile") CONFIG_FILES="$CONFIG_FILES composite/Makefile" ;; + "damageext/Makefile") CONFIG_FILES="$CONFIG_FILES damageext/Makefile" ;; + "dbe/Makefile") CONFIG_FILES="$CONFIG_FILES dbe/Makefile" ;; + "dix/Makefile") CONFIG_FILES="$CONFIG_FILES dix/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "fb/Makefile") CONFIG_FILES="$CONFIG_FILES fb/Makefile" ;; + "record/Makefile") CONFIG_FILES="$CONFIG_FILES record/Makefile" ;; + "XTrap/Makefile") CONFIG_FILES="$CONFIG_FILES XTrap/Makefile" ;; + "mfb/Makefile") CONFIG_FILES="$CONFIG_FILES mfb/Makefile" ;; + "cfb/Makefile") CONFIG_FILES="$CONFIG_FILES cfb/Makefile" ;; + "cfb32/Makefile") CONFIG_FILES="$CONFIG_FILES cfb32/Makefile" ;; + "config/Makefile") CONFIG_FILES="$CONFIG_FILES config/Makefile" ;; + "mi/Makefile") CONFIG_FILES="$CONFIG_FILES mi/Makefile" ;; + "miext/Makefile") CONFIG_FILES="$CONFIG_FILES miext/Makefile" ;; + "miext/damage/Makefile") CONFIG_FILES="$CONFIG_FILES miext/damage/Makefile" ;; + "miext/shadow/Makefile") CONFIG_FILES="$CONFIG_FILES miext/shadow/Makefile" ;; + "miext/cw/Makefile") CONFIG_FILES="$CONFIG_FILES miext/cw/Makefile" ;; + "miext/rootless/Makefile") CONFIG_FILES="$CONFIG_FILES miext/rootless/Makefile" ;; + "miext/rootless/safeAlpha/Makefile") CONFIG_FILES="$CONFIG_FILES miext/rootless/safeAlpha/Makefile" ;; + "miext/rootless/accel/Makefile") CONFIG_FILES="$CONFIG_FILES miext/rootless/accel/Makefile" ;; + "os/Makefile") CONFIG_FILES="$CONFIG_FILES os/Makefile" ;; + "randr/Makefile") CONFIG_FILES="$CONFIG_FILES randr/Makefile" ;; + "render/Makefile") CONFIG_FILES="$CONFIG_FILES render/Makefile" ;; + "xkb/Makefile") CONFIG_FILES="$CONFIG_FILES xkb/Makefile" ;; + "Xext/Makefile") CONFIG_FILES="$CONFIG_FILES Xext/Makefile" ;; + "Xi/Makefile") CONFIG_FILES="$CONFIG_FILES Xi/Makefile" ;; + "xfixes/Makefile") CONFIG_FILES="$CONFIG_FILES xfixes/Makefile" ;; + "exa/Makefile") CONFIG_FILES="$CONFIG_FILES exa/Makefile" ;; + "hw/Makefile") CONFIG_FILES="$CONFIG_FILES hw/Makefile" ;; + "hw/xfree86/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/Makefile" ;; + "hw/xfree86/common/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/common/Makefile" ;; + "hw/xfree86/common/xf86Build.h") CONFIG_FILES="$CONFIG_FILES hw/xfree86/common/xf86Build.h" ;; + "hw/xfree86/ddc/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/ddc/Makefile" ;; + "hw/xfree86/dixmods/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dixmods/Makefile" ;; + "hw/xfree86/dixmods/extmod/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dixmods/extmod/Makefile" ;; + "hw/xfree86/doc/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/doc/Makefile" ;; + "hw/xfree86/doc/devel/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/doc/devel/Makefile" ;; + "hw/xfree86/doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/doc/man/Makefile" ;; + "hw/xfree86/doc/sgml/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/doc/sgml/Makefile" ;; + "hw/xfree86/dri/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dri/Makefile" ;; + "hw/xfree86/dummylib/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dummylib/Makefile" ;; + "hw/xfree86/exa/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/exa/Makefile" ;; + "hw/xfree86/fbdevhw/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/fbdevhw/Makefile" ;; + "hw/xfree86/i2c/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/i2c/Makefile" ;; + "hw/xfree86/int10/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/int10/Makefile" ;; + "hw/xfree86/loader/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/loader/Makefile" ;; + "hw/xfree86/modes/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/modes/Makefile" ;; + "hw/xfree86/os-support/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/Makefile" ;; + "hw/xfree86/os-support/bsd/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/bsd/Makefile" ;; + "hw/xfree86/os-support/bus/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/bus/Makefile" ;; + "hw/xfree86/os-support/hurd/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/hurd/Makefile" ;; + "hw/xfree86/os-support/misc/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/misc/Makefile" ;; + "hw/xfree86/os-support/linux/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/linux/Makefile" ;; + "hw/xfree86/os-support/lynxos/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/lynxos/Makefile" ;; + "hw/xfree86/os-support/sco/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/sco/Makefile" ;; + "hw/xfree86/os-support/solaris/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/solaris/Makefile" ;; + "hw/xfree86/os-support/sysv/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/sysv/Makefile" ;; + "hw/xfree86/os-support/usl/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/usl/Makefile" ;; + "hw/xfree86/parser/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/parser/Makefile" ;; + "hw/xfree86/rac/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/rac/Makefile" ;; + "hw/xfree86/ramdac/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/ramdac/Makefile" ;; + "hw/xfree86/scanpci/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/scanpci/Makefile" ;; + "hw/xfree86/shadowfb/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/shadowfb/Makefile" ;; + "hw/xfree86/vbe/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/vbe/Makefile" ;; + "hw/xfree86/vgahw/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/vgahw/Makefile" ;; + "hw/xfree86/x86emu/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/x86emu/Makefile" ;; + "hw/xfree86/xaa/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/xaa/Makefile" ;; + "hw/xfree86/xf1bpp/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/xf1bpp/Makefile" ;; + "hw/xfree86/xf4bpp/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/xf4bpp/Makefile" ;; + "hw/xfree86/xf8_16bpp/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/xf8_16bpp/Makefile" ;; + "hw/xfree86/xf8_32bpp/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/xf8_32bpp/Makefile" ;; + "hw/xfree86/utils/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/Makefile" ;; + "hw/xfree86/utils/cvt/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/cvt/Makefile" ;; + "hw/xfree86/utils/gtf/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/gtf/Makefile" ;; + "hw/xfree86/utils/ioport/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/ioport/Makefile" ;; + "hw/xfree86/utils/kbd_mode/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/kbd_mode/Makefile" ;; + "hw/xfree86/utils/pcitweak/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/pcitweak/Makefile" ;; + "hw/xfree86/utils/scanpci/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/scanpci/Makefile" ;; + "hw/xfree86/utils/xorgcfg/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/xorgcfg/Makefile" ;; + "hw/xfree86/utils/xorgconfig/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/xorgconfig/Makefile" ;; + "hw/dmx/config/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/config/Makefile" ;; + "hw/dmx/doc/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/doc/Makefile" ;; + "hw/dmx/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/examples/Makefile" ;; + "hw/dmx/input/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/input/Makefile" ;; + "hw/dmx/glxProxy/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/glxProxy/Makefile" ;; + "hw/dmx/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/Makefile" ;; + "hw/vfb/Makefile") CONFIG_FILES="$CONFIG_FILES hw/vfb/Makefile" ;; + "hw/xgl/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xgl/Makefile" ;; + "hw/xgl/egl/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xgl/egl/Makefile" ;; + "hw/xgl/egl/module/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xgl/egl/module/Makefile" ;; + "hw/xgl/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xgl/glx/Makefile" ;; + "hw/xgl/glx/module/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xgl/glx/module/Makefile" ;; + "hw/xgl/glxext/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xgl/glxext/Makefile" ;; + "hw/xgl/glxext/module/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xgl/glxext/module/Makefile" ;; + "hw/xnest/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xnest/Makefile" ;; + "hw/xwin/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xwin/Makefile" ;; + "hw/darwin/Makefile") CONFIG_FILES="$CONFIG_FILES hw/darwin/Makefile" ;; + "hw/darwin/bundle/Makefile") CONFIG_FILES="$CONFIG_FILES hw/darwin/bundle/Makefile" ;; + "hw/darwin/bundle/Dutch.lproj/Makefile") CONFIG_FILES="$CONFIG_FILES hw/darwin/bundle/Dutch.lproj/Makefile" ;; + "hw/darwin/bundle/English.lproj/Makefile") CONFIG_FILES="$CONFIG_FILES hw/darwin/bundle/English.lproj/Makefile" ;; + "hw/darwin/bundle/French.lproj/Makefile") CONFIG_FILES="$CONFIG_FILES hw/darwin/bundle/French.lproj/Makefile" ;; + "hw/darwin/bundle/German.lproj/Makefile") CONFIG_FILES="$CONFIG_FILES hw/darwin/bundle/German.lproj/Makefile" ;; + "hw/darwin/bundle/Japanese.lproj/Makefile") CONFIG_FILES="$CONFIG_FILES hw/darwin/bundle/Japanese.lproj/Makefile" ;; + "hw/darwin/bundle/Portuguese.lproj/Makefile") CONFIG_FILES="$CONFIG_FILES hw/darwin/bundle/Portuguese.lproj/Makefile" ;; + "hw/darwin/bundle/Spanish.lproj/Makefile") CONFIG_FILES="$CONFIG_FILES hw/darwin/bundle/Spanish.lproj/Makefile" ;; + "hw/darwin/bundle/Swedish.lproj/Makefile") CONFIG_FILES="$CONFIG_FILES hw/darwin/bundle/Swedish.lproj/Makefile" ;; + "hw/darwin/bundle/ko.lproj/Makefile") CONFIG_FILES="$CONFIG_FILES hw/darwin/bundle/ko.lproj/Makefile" ;; + "hw/darwin/iokit/Makefile") CONFIG_FILES="$CONFIG_FILES hw/darwin/iokit/Makefile" ;; + "hw/darwin/quartz/Makefile") CONFIG_FILES="$CONFIG_FILES hw/darwin/quartz/Makefile" ;; + "hw/darwin/utils/Makefile") CONFIG_FILES="$CONFIG_FILES hw/darwin/utils/Makefile" ;; + "hw/kdrive/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/Makefile" ;; + "hw/kdrive/ati/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/ati/Makefile" ;; + "hw/kdrive/chips/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/chips/Makefile" ;; + "hw/kdrive/ephyr/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/ephyr/Makefile" ;; + "hw/kdrive/epson/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/epson/Makefile" ;; + "hw/kdrive/fake/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/fake/Makefile" ;; + "hw/kdrive/fbdev/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/fbdev/Makefile" ;; + "hw/kdrive/i810/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/i810/Makefile" ;; + "hw/kdrive/linux/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/linux/Makefile" ;; + "hw/kdrive/mach64/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/mach64/Makefile" ;; + "hw/kdrive/mga/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/mga/Makefile" ;; + "hw/kdrive/neomagic/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/neomagic/Makefile" ;; + "hw/kdrive/nvidia/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/nvidia/Makefile" ;; + "hw/kdrive/pm2/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/pm2/Makefile" ;; + "hw/kdrive/r128/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/r128/Makefile" ;; + "hw/kdrive/sdl/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/sdl/Makefile" ;; + "hw/kdrive/sis300/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/sis300/Makefile" ;; + "hw/kdrive/smi/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/smi/Makefile" ;; + "hw/kdrive/src/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/src/Makefile" ;; + "hw/kdrive/vesa/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/vesa/Makefile" ;; + "hw/kdrive/via/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/via/Makefile" ;; + "hw/xprint/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/Makefile" ;; + "hw/xprint/doc/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/doc/Makefile" ;; + "hw/xprint/pcl/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/pcl/Makefile" ;; + "hw/xprint/pcl-mono/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/pcl-mono/Makefile" ;; + "hw/xprint/raster/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/raster/Makefile" ;; + "hw/xprint/ps/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/ps/Makefile" ;; + "hw/xprint/etc/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/etc/Makefile" ;; + "hw/xprint/etc/Xsession.d/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/etc/Xsession.d/Makefile" ;; + "hw/xprint/etc/init.d/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/etc/init.d/Makefile" ;; + "hw/xprint/etc/profile.d/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/etc/profile.d/Makefile" ;; + "hw/xprint/config/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/Makefile" ;; + "hw/xprint/config/C/print/attributes/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/attributes/Makefile" ;; + "hw/xprint/config/C/print/ddx-config/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/ddx-config/Makefile" ;; + "hw/xprint/config/C/print/ddx-config/raster/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/ddx-config/raster/Makefile" ;; + "hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile" ;; + "hw/xprint/config/C/print/models/PSdefault/fonts/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/PSdefault/fonts/Makefile" ;; + "hw/xprint/config/C/print/models/PSdefault/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/PSdefault/Makefile" ;; + "hw/xprint/config/C/print/models/PSspooldir/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/PSspooldir/Makefile" ;; + "hw/xprint/config/C/print/models/SPSPARC2/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/SPSPARC2/Makefile" ;; + "hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile" ;; + "hw/xprint/config/C/print/models/GSdefault/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/GSdefault/Makefile" ;; + "hw/xprint/config/C/print/models/HPLJ4050-PS/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/HPLJ4050-PS/Makefile" ;; + "hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile" ;; + "hw/xprint/config/C/print/models/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/Makefile" ;; + "hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile" ;; + "hw/xprint/config/C/print/models/CANONC3200-PS/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/CANONC3200-PS/Makefile" ;; + "hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile" ;; + "hw/xprint/config/C/print/models/HPLJ4family/fonts/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/HPLJ4family/fonts/Makefile" ;; + "hw/xprint/config/C/print/models/HPLJ4family/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/HPLJ4family/Makefile" ;; + "hw/xprint/config/C/print/models/HPDJ1600C/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/HPDJ1600C/Makefile" ;; + "hw/xprint/config/C/print/models/HPDJ1600C/fonts/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/models/HPDJ1600C/fonts/Makefile" ;; + "hw/xprint/config/C/print/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/print/Makefile" ;; + "hw/xprint/config/C/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/C/Makefile" ;; + "hw/xprint/config/en_US/print/attributes/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/en_US/print/attributes/Makefile" ;; + "hw/xprint/config/en_US/print/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/en_US/print/Makefile" ;; + "hw/xprint/config/en_US/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xprint/config/en_US/Makefile" ;; + "xorg-server.pc") CONFIG_FILES="$CONFIG_FILES xorg-server.pc" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim +MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim +MAINT!$MAINT$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +DEPDIR!$DEPDIR$ac_delim +am__include!$am__include$ac_delim +am__quote!$am__quote$ac_delim +AMDEP_TRUE!$AMDEP_TRUE$ac_delim +AMDEP_FALSE!$AMDEP_FALSE$ac_delim +AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim +CCDEPMODE!$CCDEPMODE$ac_delim +am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim +am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +CCAS!$CCAS$ac_delim +CCASFLAGS!$CCASFLAGS$ac_delim +CCASDEPMODE!$CCASDEPMODE$ac_delim +am__fastdepCCAS_TRUE!$am__fastdepCCAS_TRUE$ac_delim +am__fastdepCCAS_FALSE!$am__fastdepCCAS_FALSE$ac_delim +LN_S!$LN_S$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +ECHO!$ECHO$ac_delim +AR!$AR$ac_delim +RANLIB!$RANLIB$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +DLLTOOL!$DLLTOOL$ac_delim +AS!$AS$ac_delim +OBJDUMP!$OBJDUMP$ac_delim +CPP!$CPP$ac_delim +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$ac_delim +CXXDEPMODE!$CXXDEPMODE$ac_delim +am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim +am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim +CXXCPP!$CXXCPP$ac_delim +F77!$F77$ac_delim +FFLAGS!$FFLAGS$ac_delim +ac_ct_F77!$ac_ct_F77$ac_delim +LIBTOOL!$LIBTOOL$ac_delim +PKG_CONFIG!$PKG_CONFIG$ac_delim +LEX!$LEX$ac_delim +LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim +LEXLIB!$LEXLIB$ac_delim +YACC!$YACC$ac_delim +YFLAGS!$YFLAGS$ac_delim +RAWCPP!$RAWCPP$ac_delim +RAWCPPFLAGS!$RAWCPPFLAGS$ac_delim +DTRACE!$DTRACE$ac_delim +XSERVER_DTRACE_TRUE!$XSERVER_DTRACE_TRUE$ac_delim +XSERVER_DTRACE_FALSE!$XSERVER_DTRACE_FALSE$ac_delim +XERRORDB_PATH!$XERRORDB_PATH$ac_delim +ALLOCA!$ALLOCA$ac_delim +NEED_STRLCAT_TRUE!$NEED_STRLCAT_TRUE$ac_delim +NEED_STRLCAT_FALSE!$NEED_STRLCAT_FALSE$ac_delim +NEED_VSNPRINTF_TRUE!$NEED_VSNPRINTF_TRUE$ac_delim +NEED_VSNPRINTF_FALSE!$NEED_VSNPRINTF_FALSE$ac_delim +AGP_TRUE!$AGP_TRUE$ac_delim +AGP_FALSE!$AGP_FALSE$ac_delim +LNXAPM_TRUE!$LNXAPM_TRUE$ac_delim +LNXAPM_FALSE!$LNXAPM_FALSE$ac_delim +FBDEVHW_TRUE!$FBDEVHW_TRUE$ac_delim +FBDEVHW_FALSE!$FBDEVHW_FALSE$ac_delim +FREEBSD_KLDLOAD_TRUE!$FREEBSD_KLDLOAD_TRUE$ac_delim +FREEBSD_KLDLOAD_FALSE!$FREEBSD_KLDLOAD_FALSE$ac_delim +ALPHA_VIDEO_TRUE!$ALPHA_VIDEO_TRUE$ac_delim +ALPHA_VIDEO_FALSE!$ALPHA_VIDEO_FALSE$ac_delim +ARM_VIDEO_TRUE!$ARM_VIDEO_TRUE$ac_delim +ARM_VIDEO_FALSE!$ARM_VIDEO_FALSE$ac_delim +I386_VIDEO_TRUE!$I386_VIDEO_TRUE$ac_delim +I386_VIDEO_FALSE!$I386_VIDEO_FALSE$ac_delim +PPC_VIDEO_TRUE!$PPC_VIDEO_TRUE$ac_delim +PPC_VIDEO_FALSE!$PPC_VIDEO_FALSE$ac_delim +SPARC64_VIDEO_TRUE!$SPARC64_VIDEO_TRUE$ac_delim +SPARC64_VIDEO_FALSE!$SPARC64_VIDEO_FALSE$ac_delim +KDRIVE_HW_TRUE!$KDRIVE_HW_TRUE$ac_delim +KDRIVE_HW_FALSE!$KDRIVE_HW_FALSE$ac_delim +INSTALL_SETUID_TRUE!$INSTALL_SETUID_TRUE$ac_delim +INSTALL_SETUID_FALSE!$INSTALL_SETUID_FALSE$ac_delim +INT10_VM86_TRUE!$INT10_VM86_TRUE$ac_delim +INT10_VM86_FALSE!$INT10_VM86_FALSE$ac_delim +INT10_X86EMU_TRUE!$INT10_X86EMU_TRUE$ac_delim +INT10_X86EMU_FALSE!$INT10_X86EMU_FALSE$ac_delim +INT10_STUB_TRUE!$INT10_STUB_TRUE$ac_delim +INT10_STUB_FALSE!$INT10_STUB_FALSE$ac_delim +BUILDDOCS_TRUE!$BUILDDOCS_TRUE$ac_delim +BUILDDOCS_FALSE!$BUILDDOCS_FALSE$ac_delim +LINUXDOC!$LINUXDOC$ac_delim +PS2PDF!$PS2PDF$ac_delim +BUILD_LINUXDOC_TRUE!$BUILD_LINUXDOC_TRUE$ac_delim +BUILD_LINUXDOC_FALSE!$BUILD_LINUXDOC_FALSE$ac_delim +BUILD_PDFDOC_TRUE!$BUILD_PDFDOC_TRUE$ac_delim +BUILD_PDFDOC_FALSE!$BUILD_PDFDOC_FALSE$ac_delim +MAKE_TEXT!$MAKE_TEXT$ac_delim +MAKE_PS!$MAKE_PS$ac_delim +MAKE_PDF!$MAKE_PDF$ac_delim +MAKE_HTML!$MAKE_HTML$ac_delim +INSTALL_LIBXF86CONFIG_TRUE!$INSTALL_LIBXF86CONFIG_TRUE$ac_delim +INSTALL_LIBXF86CONFIG_FALSE!$INSTALL_LIBXF86CONFIG_FALSE$ac_delim +PIXMAN_CFLAGS!$PIXMAN_CFLAGS$ac_delim +PIXMAN_LIBS!$PIXMAN_LIBS$ac_delim +DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim +DBUS_LIBS!$DBUS_LIBS$ac_delim +HAVE_DBUS_TRUE!$HAVE_DBUS_TRUE$ac_delim +HAVE_DBUS_FALSE!$HAVE_DBUS_FALSE$ac_delim +CONFIG_DBUS_API_TRUE!$CONFIG_DBUS_API_TRUE$ac_delim +CONFIG_DBUS_API_FALSE!$CONFIG_DBUS_API_FALSE$ac_delim +HAL_CFLAGS!$HAL_CFLAGS$ac_delim +HAL_LIBS!$HAL_LIBS$ac_delim +CONFIG_HAL_TRUE!$CONFIG_HAL_TRUE$ac_delim +CONFIG_HAL_FALSE!$CONFIG_HAL_FALSE$ac_delim +XV_TRUE!$XV_TRUE$ac_delim +XV_FALSE!$XV_FALSE$ac_delim +XVMC_TRUE!$XVMC_TRUE$ac_delim +XVMC_FALSE!$XVMC_FALSE$ac_delim +COMPOSITE_TRUE!$COMPOSITE_TRUE$ac_delim +COMPOSITE_FALSE!$COMPOSITE_FALSE$ac_delim +MITSHM_TRUE!$MITSHM_TRUE$ac_delim +MITSHM_FALSE!$MITSHM_FALSE$ac_delim +XTRAP_TRUE!$XTRAP_TRUE$ac_delim +XTRAP_FALSE!$XTRAP_FALSE$ac_delim +RECORD_TRUE!$RECORD_TRUE$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +RECORD_FALSE!$RECORD_FALSE$ac_delim +SCREENSAVER_TRUE!$SCREENSAVER_TRUE$ac_delim +SCREENSAVER_FALSE!$SCREENSAVER_FALSE$ac_delim +RES_TRUE!$RES_TRUE$ac_delim +RES_FALSE!$RES_FALSE$ac_delim +XLIB_CFLAGS!$XLIB_CFLAGS$ac_delim +XLIB_LIBS!$XLIB_LIBS$ac_delim +GL_CFLAGS!$GL_CFLAGS$ac_delim +GL_LIBS!$GL_LIBS$ac_delim +GLX_TRUE!$GLX_TRUE$ac_delim +GLX_FALSE!$GLX_FALSE$ac_delim +MESA_SOURCE!$MESA_SOURCE$ac_delim +AIGLX_TRUE!$AIGLX_TRUE$ac_delim +AIGLX_FALSE!$AIGLX_FALSE$ac_delim +GLX_DEFINES!$GLX_DEFINES$ac_delim +DRI_TRUE!$DRI_TRUE$ac_delim +DRI_FALSE!$DRI_FALSE$ac_delim +DRIPROTO_CFLAGS!$DRIPROTO_CFLAGS$ac_delim +DRIPROTO_LIBS!$DRIPROTO_LIBS$ac_delim +LIBDRM_CFLAGS!$LIBDRM_CFLAGS$ac_delim +LIBDRM_LIBS!$LIBDRM_LIBS$ac_delim +XINERAMA_TRUE!$XINERAMA_TRUE$ac_delim +XINERAMA_FALSE!$XINERAMA_FALSE$ac_delim +XACE_TRUE!$XACE_TRUE$ac_delim +XACE_FALSE!$XACE_FALSE$ac_delim +XCSECURITY_TRUE!$XCSECURITY_TRUE$ac_delim +XCSECURITY_FALSE!$XCSECURITY_FALSE$ac_delim +XEVIE_TRUE!$XEVIE_TRUE$ac_delim +XEVIE_FALSE!$XEVIE_FALSE$ac_delim +APPGROUP_TRUE!$APPGROUP_TRUE$ac_delim +APPGROUP_FALSE!$APPGROUP_FALSE$ac_delim +CUP_TRUE!$CUP_TRUE$ac_delim +CUP_FALSE!$CUP_FALSE$ac_delim +EVI_TRUE!$EVI_TRUE$ac_delim +EVI_FALSE!$EVI_FALSE$ac_delim +MULTIBUFFER_TRUE!$MULTIBUFFER_TRUE$ac_delim +MULTIBUFFER_FALSE!$MULTIBUFFER_FALSE$ac_delim +FONTCACHE_TRUE!$FONTCACHE_TRUE$ac_delim +FONTCACHE_FALSE!$FONTCACHE_FALSE$ac_delim +DBE_TRUE!$DBE_TRUE$ac_delim +DBE_FALSE!$DBE_FALSE$ac_delim +XF86BIGFONT_TRUE!$XF86BIGFONT_TRUE$ac_delim +XF86BIGFONT_FALSE!$XF86BIGFONT_FALSE$ac_delim +DPMSExtension_TRUE!$DPMSExtension_TRUE$ac_delim +DPMSExtension_FALSE!$DPMSExtension_FALSE$ac_delim +XPRINTPROTO_CFLAGS!$XPRINTPROTO_CFLAGS$ac_delim +XPRINTPROTO_LIBS!$XPRINTPROTO_LIBS$ac_delim +XPRINT_TRUE!$XPRINT_TRUE$ac_delim +XPRINT_FALSE!$XPRINT_FALSE$ac_delim +XCALIBRATE_TRUE!$XCALIBRATE_TRUE$ac_delim +XCALIBRATE_FALSE!$XCALIBRATE_FALSE$ac_delim +XF86UTILS_TRUE!$XF86UTILS_TRUE$ac_delim +XF86UTILS_FALSE!$XF86UTILS_FALSE$ac_delim +XDMCP_CFLAGS!$XDMCP_CFLAGS$ac_delim +XDMCP_LIBS!$XDMCP_LIBS$ac_delim +XDMCP_TRUE!$XDMCP_TRUE$ac_delim +XDMCP_FALSE!$XDMCP_FALSE$ac_delim +XDMAUTH_TRUE!$XDMAUTH_TRUE$ac_delim +XDMAUTH_FALSE!$XDMAUTH_FALSE$ac_delim +USE_RGB_BUILTIN_TRUE!$USE_RGB_BUILTIN_TRUE$ac_delim +USE_RGB_BUILTIN_FALSE!$USE_RGB_BUILTIN_FALSE$ac_delim +COMPILEDDEFAULTFONTPATH!$COMPILEDDEFAULTFONTPATH$ac_delim +RGB_DB!$RGB_DB$ac_delim +SERVERCONFIGdir!$SERVERCONFIGdir$ac_delim +BASE_FONT_PATH!$BASE_FONT_PATH$ac_delim +DRI_DRIVER_PATH!$DRI_DRIVER_PATH$ac_delim +VENDOR_NAME!$VENDOR_NAME$ac_delim +VENDOR_NAME_SHORT!$VENDOR_NAME_SHORT$ac_delim +VENDOR_RELEASE!$VENDOR_RELEASE$ac_delim +VENDOR_MAN_VERSION!$VENDOR_MAN_VERSION$ac_delim +DEBUG_TRUE!$DEBUG_TRUE$ac_delim +DEBUG_FALSE!$DEBUG_FALSE$ac_delim +XSERVERCFLAGS_CFLAGS!$XSERVERCFLAGS_CFLAGS$ac_delim +XSERVERCFLAGS_LIBS!$XSERVERCFLAGS_LIBS$ac_delim +XSERVERLIBS_CFLAGS!$XSERVERLIBS_CFLAGS$ac_delim +XSERVERLIBS_LIBS!$XSERVERLIBS_LIBS$ac_delim +SYS_LIBS!$SYS_LIBS$ac_delim +LD_EXPORT_SYMBOLS_FLAG!$LD_EXPORT_SYMBOLS_FLAG$ac_delim +XSERVER_LIBS!$XSERVER_LIBS$ac_delim +DMXMODULES_CFLAGS!$DMXMODULES_CFLAGS$ac_delim +DMXMODULES_LIBS!$DMXMODULES_LIBS$ac_delim +DMX_TRUE!$DMX_TRUE$ac_delim +DMX_FALSE!$DMX_FALSE$ac_delim +XDMX_LIBS!$XDMX_LIBS$ac_delim +XDMXCONFIG_DEP_CFLAGS!$XDMXCONFIG_DEP_CFLAGS$ac_delim +XDMXCONFIG_DEP_LIBS!$XDMXCONFIG_DEP_LIBS$ac_delim +DMXEXAMPLES_DEP_CFLAGS!$DMXEXAMPLES_DEP_CFLAGS$ac_delim +DMXEXAMPLES_DEP_LIBS!$DMXEXAMPLES_DEP_LIBS$ac_delim +DMXXMUEXAMPLES_DEP_CFLAGS!$DMXXMUEXAMPLES_DEP_CFLAGS$ac_delim +DMXXMUEXAMPLES_DEP_LIBS!$DMXXMUEXAMPLES_DEP_LIBS$ac_delim +DMXXIEXAMPLES_DEP_CFLAGS!$DMXXIEXAMPLES_DEP_CFLAGS$ac_delim +DMXXIEXAMPLES_DEP_LIBS!$DMXXIEXAMPLES_DEP_LIBS$ac_delim +XTSTEXAMPLES_DEP_CFLAGS!$XTSTEXAMPLES_DEP_CFLAGS$ac_delim +XTSTEXAMPLES_DEP_LIBS!$XTSTEXAMPLES_DEP_LIBS$ac_delim +XRESEXAMPLES_DEP_CFLAGS!$XRESEXAMPLES_DEP_CFLAGS$ac_delim +XRESEXAMPLES_DEP_LIBS!$XRESEXAMPLES_DEP_LIBS$ac_delim +X11EXAMPLES_DEP_CFLAGS!$X11EXAMPLES_DEP_CFLAGS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +X11EXAMPLES_DEP_LIBS!$X11EXAMPLES_DEP_LIBS$ac_delim +DMX_BUILD_LNX_TRUE!$DMX_BUILD_LNX_TRUE$ac_delim +DMX_BUILD_LNX_FALSE!$DMX_BUILD_LNX_FALSE$ac_delim +DMX_BUILD_USB_TRUE!$DMX_BUILD_USB_TRUE$ac_delim +DMX_BUILD_USB_FALSE!$DMX_BUILD_USB_FALSE$ac_delim +XVFB_TRUE!$XVFB_TRUE$ac_delim +XVFB_FALSE!$XVFB_FALSE$ac_delim +XVFB_LIBS!$XVFB_LIBS$ac_delim +XNESTMODULES_CFLAGS!$XNESTMODULES_CFLAGS$ac_delim +XNESTMODULES_LIBS!$XNESTMODULES_LIBS$ac_delim +XNEST_TRUE!$XNEST_TRUE$ac_delim +XNEST_FALSE!$XNEST_FALSE$ac_delim +XNEST_LIBS!$XNEST_LIBS$ac_delim +XGLMODULES_CFLAGS!$XGLMODULES_CFLAGS$ac_delim +XGLMODULES_LIBS!$XGLMODULES_LIBS$ac_delim +XGL_TRUE!$XGL_TRUE$ac_delim +XGL_FALSE!$XGL_FALSE$ac_delim +XGL_LIBS!$XGL_LIBS$ac_delim +xglmoduledir!$xglmoduledir$ac_delim +XGL_MODULE_PATH!$XGL_MODULE_PATH$ac_delim +XEGLMODULES_CFLAGS!$XEGLMODULES_CFLAGS$ac_delim +XEGLMODULES_LIBS!$XEGLMODULES_LIBS$ac_delim +XEGL_TRUE!$XEGL_TRUE$ac_delim +XEGL_FALSE!$XEGL_FALSE$ac_delim +XEGL_LIBS!$XEGL_LIBS$ac_delim +XGLXMODULES_CFLAGS!$XGLXMODULES_CFLAGS$ac_delim +XGLXMODULES_LIBS!$XGLXMODULES_LIBS$ac_delim +XGLX_TRUE!$XGLX_TRUE$ac_delim +XGLX_FALSE!$XGLX_FALSE$ac_delim +XGLX_LIBS!$XGLX_LIBS$ac_delim +XORG_CORE_LIBS!$XORG_CORE_LIBS$ac_delim +DARWIN_LIBS!$DARWIN_LIBS$ac_delim +APPLE_APPLICATIONS_DIR!$APPLE_APPLICATIONS_DIR$ac_delim +PLIST_VERSION_STRING!$PLIST_VERSION_STRING$ac_delim +PLIST_VENDOR_WEB!$PLIST_VENDOR_WEB$ac_delim +SOLARIS_INOUT_ARCH!$SOLARIS_INOUT_ARCH$ac_delim +SOLARIS_ASM_CFLAGS!$SOLARIS_ASM_CFLAGS$ac_delim +DGA_CFLAGS!$DGA_CFLAGS$ac_delim +DGA_LIBS!$DGA_LIBS$ac_delim +XF86MISC_CFLAGS!$XF86MISC_CFLAGS$ac_delim +XF86MISC_LIBS!$XF86MISC_LIBS$ac_delim +XF86VIDMODE_CFLAGS!$XF86VIDMODE_CFLAGS$ac_delim +XF86VIDMODE_LIBS!$XF86VIDMODE_LIBS$ac_delim +XORG_MODULES_CFLAGS!$XORG_MODULES_CFLAGS$ac_delim +XORG_MODULES_LIBS!$XORG_MODULES_LIBS$ac_delim +XORG_LIBS!$XORG_LIBS$ac_delim +XORG_INCS!$XORG_INCS$ac_delim +XORG_OS!$XORG_OS$ac_delim +XORG_OS_SUBDIR!$XORG_OS_SUBDIR$ac_delim +PERL!$PERL$ac_delim +XORG_CFLAGS!$XORG_CFLAGS$ac_delim +__XCONFIGFILE__!$__XCONFIGFILE__$ac_delim +XF86CONFIGFILE!$XF86CONFIGFILE$ac_delim +DEFAULT_MODULE_PATH!$DEFAULT_MODULE_PATH$ac_delim +DEFAULT_LIBRARY_PATH!$DEFAULT_LIBRARY_PATH$ac_delim +DEFAULT_LOGPREFIX!$DEFAULT_LOGPREFIX$ac_delim +moduledir!$moduledir$ac_delim +driverdir!$driverdir$ac_delim +sdkdir!$sdkdir$ac_delim +extdir!$extdir$ac_delim +logdir!$logdir$ac_delim +XORG_TRUE!$XORG_TRUE$ac_delim +XORG_FALSE!$XORG_FALSE$ac_delim +XORG_BUS_LINUXPCI_TRUE!$XORG_BUS_LINUXPCI_TRUE$ac_delim +XORG_BUS_LINUXPCI_FALSE!$XORG_BUS_LINUXPCI_FALSE$ac_delim +XORG_BUS_FREEBSDPCI_TRUE!$XORG_BUS_FREEBSDPCI_TRUE$ac_delim +XORG_BUS_FREEBSDPCI_FALSE!$XORG_BUS_FREEBSDPCI_FALSE$ac_delim +XORG_BUS_NETBSDPCI_TRUE!$XORG_BUS_NETBSDPCI_TRUE$ac_delim +XORG_BUS_NETBSDPCI_FALSE!$XORG_BUS_NETBSDPCI_FALSE$ac_delim +XORG_BUS_IX86PCI_TRUE!$XORG_BUS_IX86PCI_TRUE$ac_delim +XORG_BUS_IX86PCI_FALSE!$XORG_BUS_IX86PCI_FALSE$ac_delim +XORG_BUS_PPCPCI_TRUE!$XORG_BUS_PPCPCI_TRUE$ac_delim +XORG_BUS_PPCPCI_FALSE!$XORG_BUS_PPCPCI_FALSE$ac_delim +XORG_BUS_SPARCPCI_TRUE!$XORG_BUS_SPARCPCI_TRUE$ac_delim +XORG_BUS_SPARCPCI_FALSE!$XORG_BUS_SPARCPCI_FALSE$ac_delim +XORG_BUS_SPARC_TRUE!$XORG_BUS_SPARC_TRUE$ac_delim +XORG_BUS_SPARC_FALSE!$XORG_BUS_SPARC_FALSE$ac_delim +XORG_LOADER_SPARC_TRUE!$XORG_LOADER_SPARC_TRUE$ac_delim +XORG_LOADER_SPARC_FALSE!$XORG_LOADER_SPARC_FALSE$ac_delim +LINUX_IA64_TRUE!$LINUX_IA64_TRUE$ac_delim +LINUX_IA64_FALSE!$LINUX_IA64_FALSE$ac_delim +LINUX_ALPHA_TRUE!$LINUX_ALPHA_TRUE$ac_delim +LINUX_ALPHA_FALSE!$LINUX_ALPHA_FALSE$ac_delim +LNXACPI_TRUE!$LNXACPI_TRUE$ac_delim +LNXACPI_FALSE!$LNXACPI_FALSE$ac_delim +SOLARIS_USL_CONSOLE_TRUE!$SOLARIS_USL_CONSOLE_TRUE$ac_delim +SOLARIS_USL_CONSOLE_FALSE!$SOLARIS_USL_CONSOLE_FALSE$ac_delim +SOLARIS_ASM_INLINE_TRUE!$SOLARIS_ASM_INLINE_TRUE$ac_delim +SOLARIS_ASM_INLINE_FALSE!$SOLARIS_ASM_INLINE_FALSE$ac_delim +BUILD_DARWIN_TRUE!$BUILD_DARWIN_TRUE$ac_delim +BUILD_DARWIN_FALSE!$BUILD_DARWIN_FALSE$ac_delim +XQUARTZ_TRUE!$XQUARTZ_TRUE$ac_delim +XQUARTZ_FALSE!$XQUARTZ_FALSE$ac_delim +DGA_TRUE!$DGA_TRUE$ac_delim +DGA_FALSE!$DGA_FALSE$ac_delim +MFB_TRUE!$MFB_TRUE$ac_delim +MFB_FALSE!$MFB_FALSE$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-4.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +CFB_TRUE!$CFB_TRUE$ac_delim +CFB_FALSE!$CFB_FALSE$ac_delim +AFB_TRUE!$AFB_TRUE$ac_delim +AFB_FALSE!$AFB_FALSE$ac_delim +XPRINT_CFLAGS!$XPRINT_CFLAGS$ac_delim +XPRINT_LIBS!$XPRINT_LIBS$ac_delim +xpconfigdir!$xpconfigdir$ac_delim +MKFONTSCALE!$MKFONTSCALE$ac_delim +MKFONTDIR!$MKFONTDIR$ac_delim +FREETYPE_CFLAGS!$FREETYPE_CFLAGS$ac_delim +FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim +ft_config!$ft_config$ac_delim +FREETYPE_REQUIRES!$FREETYPE_REQUIRES$ac_delim +XP_USE_FREETYPE_TRUE!$XP_USE_FREETYPE_TRUE$ac_delim +XP_USE_FREETYPE_FALSE!$XP_USE_FREETYPE_FALSE$ac_delim +XWIN_LIBS!$XWIN_LIBS$ac_delim +XWINMODULES_CFLAGS!$XWINMODULES_CFLAGS$ac_delim +XWINMODULES_LIBS!$XWINMODULES_LIBS$ac_delim +XWIN_SERVER_NAME!$XWIN_SERVER_NAME$ac_delim +XWIN_SYSTEM_LIBS!$XWIN_SYSTEM_LIBS$ac_delim +XWIN_TRUE!$XWIN_TRUE$ac_delim +XWIN_FALSE!$XWIN_FALSE$ac_delim +XWIN_MULTIWINDOW_TRUE!$XWIN_MULTIWINDOW_TRUE$ac_delim +XWIN_MULTIWINDOW_FALSE!$XWIN_MULTIWINDOW_FALSE$ac_delim +XWIN_MULTIWINDOWEXTWM_TRUE!$XWIN_MULTIWINDOWEXTWM_TRUE$ac_delim +XWIN_MULTIWINDOWEXTWM_FALSE!$XWIN_MULTIWINDOWEXTWM_FALSE$ac_delim +XWIN_CLIPBOARD_TRUE!$XWIN_CLIPBOARD_TRUE$ac_delim +XWIN_CLIPBOARD_FALSE!$XWIN_CLIPBOARD_FALSE$ac_delim +XWIN_GLX_WINDOWS_TRUE!$XWIN_GLX_WINDOWS_TRUE$ac_delim +XWIN_GLX_WINDOWS_FALSE!$XWIN_GLX_WINDOWS_FALSE$ac_delim +XWIN_NATIVEGDI_TRUE!$XWIN_NATIVEGDI_TRUE$ac_delim +XWIN_NATIVEGDI_FALSE!$XWIN_NATIVEGDI_FALSE$ac_delim +XWIN_PRIMARYFB_TRUE!$XWIN_PRIMARYFB_TRUE$ac_delim +XWIN_PRIMARYFB_FALSE!$XWIN_PRIMARYFB_FALSE$ac_delim +XWIN_RANDR_TRUE!$XWIN_RANDR_TRUE$ac_delim +XWIN_RANDR_FALSE!$XWIN_RANDR_FALSE$ac_delim +XWIN_XV_TRUE!$XWIN_XV_TRUE$ac_delim +XWIN_XV_FALSE!$XWIN_XV_FALSE$ac_delim +HAVE_X_PLUGIN_TRUE!$HAVE_X_PLUGIN_TRUE$ac_delim +HAVE_X_PLUGIN_FALSE!$HAVE_X_PLUGIN_FALSE$ac_delim +HAVE_AGL_FRAMEWORK_TRUE!$HAVE_AGL_FRAMEWORK_TRUE$ac_delim +HAVE_AGL_FRAMEWORK_FALSE!$HAVE_AGL_FRAMEWORK_FALSE$ac_delim +OBJC!$OBJC$ac_delim +OBJCCLD!$OBJCCLD$ac_delim +OBJCLINK!$OBJCLINK$ac_delim +OBJCFLAGS!$OBJCFLAGS$ac_delim +OBJCDEPMODE!$OBJCDEPMODE$ac_delim +am__fastdepOBJC_TRUE!$am__fastdepOBJC_TRUE$ac_delim +am__fastdepOBJC_FALSE!$am__fastdepOBJC_FALSE$ac_delim +KDRIVE_TRUE!$KDRIVE_TRUE$ac_delim +KDRIVE_FALSE!$KDRIVE_FALSE$ac_delim +XEPHYR_CFLAGS!$XEPHYR_CFLAGS$ac_delim +XEPHYR_LIBS!$XEPHYR_LIBS$ac_delim +TSLIB_CFLAGS!$TSLIB_CFLAGS$ac_delim +TSLIB_LIBS!$TSLIB_LIBS$ac_delim +XEPHYR_INCS!$XEPHYR_INCS$ac_delim +XSDL_LIBS!$XSDL_LIBS$ac_delim +XSDL_INCS!$XSDL_INCS$ac_delim +KDRIVE_INCS!$KDRIVE_INCS$ac_delim +KDRIVE_PURE_INCS!$KDRIVE_PURE_INCS$ac_delim +KDRIVE_CFLAGS!$KDRIVE_CFLAGS$ac_delim +KDRIVE_PURE_LIBS!$KDRIVE_PURE_LIBS$ac_delim +KDRIVE_LOCAL_LIBS!$KDRIVE_LOCAL_LIBS$ac_delim +KDRIVE_LIBS!$KDRIVE_LIBS$ac_delim +KDRIVELINUX_TRUE!$KDRIVELINUX_TRUE$ac_delim +KDRIVELINUX_FALSE!$KDRIVELINUX_FALSE$ac_delim +TSLIB_TRUE!$TSLIB_TRUE$ac_delim +TSLIB_FALSE!$TSLIB_FALSE$ac_delim +H3600_TS_TRUE!$H3600_TS_TRUE$ac_delim +H3600_TS_FALSE!$H3600_TS_FALSE$ac_delim +KDRIVEVESA_TRUE!$KDRIVEVESA_TRUE$ac_delim +KDRIVEVESA_FALSE!$KDRIVEVESA_FALSE$ac_delim +KDRIVEFBDEV_TRUE!$KDRIVEFBDEV_TRUE$ac_delim +KDRIVEFBDEV_FALSE!$KDRIVEFBDEV_FALSE$ac_delim +XSDLSERVER_TRUE!$XSDLSERVER_TRUE$ac_delim +XSDLSERVER_FALSE!$XSDLSERVER_FALSE$ac_delim +XEPHYR_TRUE!$XEPHYR_TRUE$ac_delim +XEPHYR_FALSE!$XEPHYR_FALSE$ac_delim +BUILD_KDRIVEFBDEVLIB_TRUE!$BUILD_KDRIVEFBDEVLIB_TRUE$ac_delim +BUILD_KDRIVEFBDEVLIB_FALSE!$BUILD_KDRIVEFBDEVLIB_FALSE$ac_delim +XFAKESERVER_TRUE!$XFAKESERVER_TRUE$ac_delim +XFAKESERVER_FALSE!$XFAKESERVER_FALSE$ac_delim +XKB_BASE_DIRECTORY!$XKB_BASE_DIRECTORY$ac_delim +XKB_BIN_DIRECTORY!$XKB_BIN_DIRECTORY$ac_delim +XKM_OUTPUT_DIR!$XKM_OUTPUT_DIR$ac_delim +XKB_COMPILED_DIR!$XKB_COMPILED_DIR$ac_delim +PROJECTROOT!$PROJECTROOT$ac_delim +XORGCONFIG_DEP_CFLAGS!$XORGCONFIG_DEP_CFLAGS$ac_delim +XORGCONFIG_DEP_LIBS!$XORGCONFIG_DEP_LIBS$ac_delim +XORGCFG_DEP_CFLAGS!$XORGCFG_DEP_CFLAGS$ac_delim +XORGCFG_DEP_LIBS!$XORGCFG_DEP_LIBS$ac_delim +APPDEFAULTDIR!$APPDEFAULTDIR$ac_delim +BUILD_XORGCFG_TRUE!$BUILD_XORGCFG_TRUE$ac_delim +BUILD_XORGCFG_FALSE!$BUILD_XORGCFG_FALSE$ac_delim +USE_CURSES_TRUE!$USE_CURSES_TRUE$ac_delim +USE_CURSES_FALSE!$USE_CURSES_FALSE$ac_delim +BUILD_KBD_MODE_TRUE!$BUILD_KBD_MODE_TRUE$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-5.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +BUILD_KBD_MODE_FALSE!$BUILD_KBD_MODE_FALSE$ac_delim +BSD_KBD_MODE_TRUE!$BSD_KBD_MODE_TRUE$ac_delim +BSD_KBD_MODE_FALSE!$BSD_KBD_MODE_FALSE$ac_delim +SUN_KBD_MODE_TRUE!$SUN_KBD_MODE_TRUE$ac_delim +SUN_KBD_MODE_FALSE!$SUN_KBD_MODE_FALSE$ac_delim +BUILD_DATE!$BUILD_DATE$ac_delim +BUILD_TIME!$BUILD_TIME$ac_delim +DIX_CFLAGS!$DIX_CFLAGS$ac_delim +libdir!$libdir$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +APP_MAN_SUFFIX!$APP_MAN_SUFFIX$ac_delim +LIB_MAN_SUFFIX!$LIB_MAN_SUFFIX$ac_delim +FILE_MAN_SUFFIX!$FILE_MAN_SUFFIX$ac_delim +MISC_MAN_SUFFIX!$MISC_MAN_SUFFIX$ac_delim +DRIVER_MAN_SUFFIX!$DRIVER_MAN_SUFFIX$ac_delim +ADMIN_MAN_SUFFIX!$ADMIN_MAN_SUFFIX$ac_delim +APP_MAN_DIR!$APP_MAN_DIR$ac_delim +LIB_MAN_DIR!$LIB_MAN_DIR$ac_delim +FILE_MAN_DIR!$FILE_MAN_DIR$ac_delim +MISC_MAN_DIR!$MISC_MAN_DIR$ac_delim +DRIVER_MAN_DIR!$DRIVER_MAN_DIR$ac_delim +ADMIN_MAN_DIR!$ADMIN_MAN_DIR$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-6.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" | sed -f "$tmp/subs-4.sed" | sed -f "$tmp/subs-5.sed" | sed -f "$tmp/subs-6.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' + +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file + fi + else + echo "/* $configure_input */" + cat "$ac_result" + fi + rm -f "$tmp/out12" +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| . 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + diff --git a/xorg-server-1.4/configure.ac b/xorg-server-1.4/configure.ac new file mode 100644 index 0000000..62fdd78 --- /dev/null +++ b/xorg-server-1.4/configure.ac @@ -0,0 +1,2154 @@ +dnl Copyright © 2003-2007 Keith Packard, Daniel Stone +dnl +dnl Permission is hereby granted, free of charge, to any person obtaining a +dnl copy of this software and associated documentation files (the "Software"), +dnl to deal in the Software without restriction, including without limitation +dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, +dnl and/or sell copies of the Software, and to permit persons to whom the +dnl Software is furnished to do so, subject to the following conditions: +dnl +dnl The above copyright notice and this permission notice (including the next +dnl paragraph) shall be included in all copies or substantial portions of the +dnl Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +dnl DEALINGS IN THE SOFTWARE. +dnl +dnl Authors: Keith Packard +dnl Daniel Stone +dnl an unwitting cast of miscellaneous others +dnl +dnl Process this file with autoconf to create configure. + +AC_PREREQ(2.57) +AC_INIT([xorg-server], 1.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +AC_CONFIG_SRCDIR([Makefile.am]) +AM_INIT_AUTOMAKE([dist-bzip2 foreign]) +AM_MAINTAINER_MODE + +dnl this gets generated by autoheader, and thus contains all the defines. we +dnl don't ever actually use it, internally. +AC_CONFIG_HEADERS(include/do-not-use-config.h) +dnl xorg-server.h is an external header, designed to be included by loadable +dnl drivers. +AC_CONFIG_HEADERS(include/xorg-server.h) +dnl dix-config.h covers most of the DIX (i.e. everything but the DDX, not just +dnl dix/). +AC_CONFIG_HEADERS(include/dix-config.h) +dnl xgl-config.h covers the Xgl DDX. +AC_CONFIG_HEADERS(include/xgl-config.h) +dnl xorg-config.h covers the Xorg DDX. +AC_CONFIG_HEADERS(include/xorg-config.h) +dnl xkb-config.h covers XKB for the Xorg and Xnest DDXs. +AC_CONFIG_HEADERS(include/xkb-config.h) +dnl xwin-config.h covers the XWin DDX. +AC_CONFIG_HEADERS(include/xwin-config.h) +dnl kdrive-config.h covers the kdrive DDX +AC_CONFIG_HEADERS(include/kdrive-config.h) + +AC_PROG_CC +AM_PROG_AS +AC_PROG_INSTALL +AC_PROG_LN_S +AC_LIBTOOL_WIN32_DLL +AC_DISABLE_STATIC +AC_PROG_LIBTOOL +AC_PROG_MAKE_SET +PKG_PROG_PKG_CONFIG +AC_PROG_LEX +AC_PROG_YACC +AC_SYS_LARGEFILE +XORG_PROG_RAWCPP + +dnl Check for dtrace program (needed to build Xserver dtrace probes) +AC_ARG_WITH(dtrace, AS_HELP_STRING([--with-dtrace=PATH], + [Enable dtrace probes (default: enabled if dtrace found)]), + [WDTRACE=$withval], [WDTRACE=auto]) +if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then + AC_PATH_PROG(DTRACE, [dtrace], [not_found], [$PATH:/usr/sbin]) + if test "x$DTRACE" = "xnot_found" ; then + if test "x$WDTRACE" = "xyes" ; then + AC_MSG_FAILURE([dtrace requested but not found]) + fi + WDTRACE="no" + fi +fi +if test "x$WDTRACE" != "xno" ; then + AC_DEFINE(XSERVER_DTRACE, 1, + [Define to 1 if the DTrace Xserver provider probes should be built in.]) +fi +AM_CONDITIONAL(XSERVER_DTRACE, [test "x$WDTRACE" != "xno"]) + +# DTrace support uses XErrorDB to get request names +AC_ARG_WITH(xerrordb, + AS_HELP_STRING([--with-xerrordb=PATH], [Path to XErrorDB file (default: ${datadir}/X11/XErrorDB)]), + [ XERRORDB_PATH="$withval" ], + [ XERRORDB_PATH="${datadir}/X11/XErrorDB" ]) +AC_DEFINE_DIR(XERRORDB_PATH, XERRORDB_PATH, [Path to XErrorDB file]) + +AC_HEADER_DIRENT +AC_HEADER_STDC +AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h]) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_C_BIGENDIAN([ENDIAN="X_BIG_ENDIAN"], [ENDIAN="X_LITTLE_ENDIAN"]) + +AC_CHECK_SIZEOF([unsigned long]) +if test "$ac_cv_sizeof_unsigned_long" = 8; then + AC_DEFINE(_XSERVER64, 1, [Define to 1 if unsigned long is 64 bits.]) +fi + +AC_TYPE_PID_T + +# Checks for headers/macros for byte swapping +# Known variants: +# bswap_16, bswap_32, bswap_64 (glibc) +# __swap16, __swap32, __swap64 (OpenBSD) +# bswap16, bswap32, bswap64 (other BSD's) +# and a fallback to local macros if none of the above are found + +# if is found, assume it's the correct version +AC_CHECK_HEADERS([byteswap.h]) + +# if is found, have to check which version +AC_CHECK_HEADER([sys/endian.h], [HAVE_SYS_ENDIAN_H="yes"], [HAVE_SYS_ENDIAN_H="no"]) + +if test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then + AC_MSG_CHECKING([for __swap16 variant of byteswapping macros]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([ +#include + ], [ +int a = 1, b; +b = __swap16(a); + ]) +], [SYS_ENDIAN__SWAP='yes'], [SYS_ENDIAN__SWAP='no']) + AC_MSG_RESULT([$SYS_ENDIAN__SWAP]) + + AC_MSG_CHECKING([for bswap16 variant of byteswapping macros]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([ +#include + ], [ +int a = 1, b; +b = bswap16(a); + ]) +], [SYS_ENDIAN_BSWAP='yes'], [SYS_ENDIAN_BSWAP='no']) + AC_MSG_RESULT([$SYS_ENDIAN_BSWAP]) + + if test "$SYS_ENDIAN_BSWAP" = "yes" ; then + USE_SYS_ENDIAN_H=yes + BSWAP=bswap + else + if test "$SYS_ENDIAN__SWAP" = "yes" ; then + USE_SYS_ENDIAN_H=yes + BSWAP=__swap + else + USE_SYS_ENDIAN_H=no + fi + fi + + if test "$USE_SYS_ENDIAN_H" = "yes" ; then + AC_DEFINE([USE_SYS_ENDIAN_H], 1, + [Define to use byteswap macros from ]) + AC_DEFINE_UNQUOTED([bswap_16], ${BSWAP}16, + [Define to 16-bit byteswap macro]) + AC_DEFINE_UNQUOTED([bswap_32], ${BSWAP}32, + [Define to 32-bit byteswap macro]) + AC_DEFINE_UNQUOTED([bswap_64], ${BSWAP}64, + [Define to 64-bit byteswap macro]) + fi +fi + +dnl Checks for library functions. +AC_FUNC_VPRINTF +AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \ + strtol getopt getopt_long vsnprintf walkcontext backtrace \ + getisax]) +AC_FUNC_ALLOCA +dnl Old HAS_* names used in os/*.c. +AC_CHECK_FUNC([getdtablesize], + AC_DEFINE(HAS_GETDTABLESIZE, 1, [Have the 'getdtablesize' function.])) +AC_CHECK_FUNC([getifaddrs], + AC_DEFINE(HAS_GETIFADDRS, 1, [Have the 'getifaddrs' function.])) +AC_CHECK_FUNC([getpeereid], + AC_DEFINE(HAS_GETPEEREID, 1, [Have the 'getpeereid' function.])) +AC_CHECK_FUNC([getpeerucred], + AC_DEFINE(HAS_GETPEERUCRED, 1, [Have the 'getpeerucred' function.])) +AC_CHECK_FUNC([strlcat], HAVE_STRLCAT=yes, HAVE_STRLCAT=no) +AM_CONDITIONAL(NEED_STRLCAT, [test x$HAVE_STRLCAT = xno]) + +AM_CONDITIONAL(NEED_VSNPRINTF, [test x$HAVE_VSNPRINTF = xno]) + +dnl Check for mmap support for Xvfb +AC_CHECK_FUNC([mmap], AC_DEFINE(HAS_MMAP, 1, [Have the 'mmap' function.])) + +dnl Find the math libary +AC_CHECK_LIB(m, sqrt) +AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT, 1, [Have the 'cbrt' function])) + +AC_CHECK_HEADERS([ndbm.h dbm.h rpcsvc/dbm.h]) + +dnl AGPGART headers +AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h], AGP=yes) +AM_CONDITIONAL(AGP, [test "x$AGP" = xyes]) + +dnl APM header +AC_CHECK_HEADERS([linux/apm_bios.h], LNXAPM=yes) +AM_CONDITIONAL(LNXAPM, [test "x$LNXAPM" = xyes]) + +dnl fbdev header +AC_CHECK_HEADERS([linux/fb.h], FBDEV=yes) +AM_CONDITIONAL(FBDEVHW, [test "x$FBDEV" = xyes]) + +dnl MTRR header +AC_CHECK_HEADERS([asm/mtrr.h], ac_cv_asm_mtrr_h=yes) +if test "x$ac_cv_asm_mtrr_h" = xyes; then + HAVE_MTRR=yes +fi + +dnl BSD MTRR header +AC_CHECK_HEADERS([sys/memrange.h], ac_cv_memrange_h=yes) +if test "x$ac_cv_memrange_h" = xyes; then + HAVE_MTRR=yes +fi + +if test "x$HAVE_MTRR" = xyes; then + AC_DEFINE(HAS_MTRR_SUPPORT, 1, [MTRR support available]) +fi + +dnl A NetBSD MTRR header +AC_CHECK_HEADERS([machine/mtrr.h], ac_cv_machine_mtrr_h=yes) +if test "x$ac_cv_machine_mtrr_h" = xyes; then + AC_DEFINE(HAS_MTRR_BUILTIN, 1, [Define to 1 if NetBSD built-in MTRR + support is available]) +fi + +dnl FreeBSD kldload support (sys/linker.h) +AC_CHECK_HEADERS([sys/linker.h], + [ac_cv_sys_linker_h=yes], + [ac_cv_sys_linker_h=no], + [#include ]) +AM_CONDITIONAL(FREEBSD_KLDLOAD, [test "x$ac_cv_sys_linker_h" = xyes]) + +AC_CACHE_CHECK([for SYSV IPC], + ac_cv_sysv_ipc, + [AC_TRY_LINK([ +#include +],[ +{ + int id; + id = shmget(IPC_PRIVATE, 512, SHM_W | SHM_R); + if (id < 0) return -1; + return shmctl(id, IPC_RMID, 0); +}], + [ac_cv_sysv_ipc=yes], + [ac_cv_sysv_ipc=no])]) +if test "x$ac_cv_sysv_ipc" = xyes; then + AC_DEFINE(HAVE_SYSV_IPC, 1, [Define to 1 if SYSV IPC is available]) +fi + +dnl OpenBSD /dev/xf86 aperture driver +if test -c /dev/xf86 ; then + AC_DEFINE(HAS_APERTURE_DRV, 1, [System has /dev/xf86 aperture driver]) +fi + +dnl glibc backtrace support check (hw/xfree86/common/xf86Events.c) +AC_CHECK_HEADER([execinfo.h],[ + AC_CHECK_LIB(c, backtrace, [ + AC_DEFINE(HAVE_BACKTRACE, 1, [Has backtrace support]) + AC_DEFINE(HAVE_EXECINFO_H, 1, [Have execinfo.h]) + ])] +) + +dnl --------------------------------------------------------------------------- +dnl Bus options and CPU capabilities. Replaces logic in +dnl hw/xfree86/os-support/bus/Makefile.am, among others. +dnl --------------------------------------------------------------------------- +DEFAULT_INT10="x86emu" +use_x86_asm="no" + +dnl Override defaults as needed for specific platforms: + +case $host_cpu in + alpha*) + ALPHA_VIDEO=yes + case $host_os in + *netbsd*) AC_DEFINE(USE_ALPHA_PIO, 1, [NetBSD PIO alpha IO]) ;; + esac + ;; + arm*) + ARM_VIDEO=yes + ;; + i*86) + use_x86_asm="yes" + I386_VIDEO=yes + case $host_os in + darwin*) use_x86_asm="no" ;; + *linux*) DEFAULT_INT10=vm86 ;; + *freebsd*) AC_DEFINE(USE_DEV_IO) ;; + *netbsd*) AC_DEFINE(USE_I386_IOPL) + SYS_LIBS=-li386 + ;; + *openbsd*) AC_DEFINE(USE_I386_IOPL) + SYS_LIBS=-li386 + ;; + esac + ;; + powerpc*) + PPC_VIDEO=yes + case $host_os in + *freebsd*) DEFAULT_INT10=stub ;; + esac + ;; + sparc*) + xorg_loader_sparcmuldiv="yes" + SPARC64_VIDEO=yes + BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c" + ;; + x86_64*|amd64*) + use_x86_asm="yes" + I386_VIDEO=yes + case $host_os in + darwin*) use_x86_asm="no" ;; + *freebsd*) AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;; + *netbsd*) AC_DEFINE(USE_I386_IOPL, 1, [BSD i386 iopl]) + SYS_LIBS=-lx86_64 + ;; + *openbsd*) AC_DEFINE(USE_AMD64_IOPL, 1, [BSD AMD64 iopl]) + SYS_LIBS=-lamd64 + ;; + esac + ;; +esac + +dnl BSD *_video.c selection +AM_CONDITIONAL(ALPHA_VIDEO, [test "x$ALPHA_VIDEO" = xyes]) +AM_CONDITIONAL(ARM_VIDEO, [test "x$ARM_VIDEO" = xyes]) +AM_CONDITIONAL(I386_VIDEO, [test "x$I386_VIDEO" = xyes]) +AM_CONDITIONAL(PPC_VIDEO, [test "x$PPC_VIDEO" = xyes]) +AM_CONDITIONAL(SPARC64_VIDEO, [test "x$SPARC64_VIDEO" = xyes]) + +DRI=no +KDRIVE_HW=no +dnl it would be nice to autodetect these *CONS_SUPPORTs +case $host_os in + *freebsd*) + case $host_os in + kfreebsd*-gnu) ;; + *) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) ;; + esac + AC_DEFINE(PCCONS_SUPPORT, 1, [System has PC console]) + AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console]) + AC_DEFINE(SYSCONS_SUPPORT, 1, [System has syscons console]) + DRI=yes + ;; + *netbsd*) + AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) + AC_DEFINE(PCCONS_SUPPORT, 1, [System has PC console]) + AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console]) + AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console]) + DRI=yes + ;; + *openbsd*) + AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) + AC_DEFINE(PCVT_SUPPORT, 1, [System has PC console]) + AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console]) + ;; + *linux*) + DRI=yes + KDRIVE_HW=yes + ;; + *solaris*) + PKG_CHECK_EXISTS(libdrm, DRI=yes, DRI=no) + ;; +esac +AM_CONDITIONAL(KDRIVE_HW, test "x$KDRIVE_HW" = xyes) + +XORG_RELEASE_VERSION +dnl augment XORG_RELEASE_VERSION for our snapshot number and to expose the +dnl major number +PVMAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1` +PVS=`echo $PACKAGE_VERSION | cut -d . -f 4` +if test "x$PVS" = "x"; then + PVS="0" +fi + +VENDOR_RELEASE="((($PVMAJOR) * 10000000) + (($PVM) * 100000) + (($PVP) * 1000) + $PVS)" +VENDOR_MAN_VERSION="Version ${PACKAGE_VERSION}" + +VENDOR_NAME="The X.Org Foundation" +VENDOR_NAME_SHORT="X.Org" +RELEASE_DATE="5 September 2007" +VENDOR_WEB="http://wiki.x.org" + +m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))]) + +dnl Build options. +AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror], + [Treat warnings as errors (default: disabled)]), + [WERROR=$enableval], [WERROR=no]) +AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], + [Enable debugging (default: disabled)]), + [DEBUGGING=$enableval], [DEBUGGING=no]) +AC_ARG_WITH(int10, AS_HELP_STRING([--with-int10=BACKEND], [int10 backend: vm86, x86emu or stub]), + [INT10="$withval"], + [INT10="$DEFAULT_INT10"]) +AC_ARG_WITH(vendor-name, AS_HELP_STRING([--with-vendor-name=VENDOR], + [Vendor string reported by the server]), + [ VENDOR_NAME="$withval" ], []) +AC_ARG_WITH(vendor-name-short, AS_HELP_STRING([--with-vendor-name-short=VENDOR], + [Short version of vendor string reported by the server]), + [ VENDOR_NAME_SHORT="$withval" ], []) +AC_ARG_WITH(vendor-web, AS_HELP_STRING([--with-vendor-web=URL], + [Vendor web address reported by the server]), + [ VENDOR_WEB="$withval" ], []) +AC_ARG_WITH(module-dir, AS_HELP_STRING([--with-module-dir=DIR], + [Directory where modules are installed (default: $libdir/xorg/modules)]), + [ moduledir="$withval" ], + [ moduledir="${libdir}/xorg/modules" ]) +AC_ARG_WITH(log-dir, AS_HELP_STRING([--with-log-dir=DIR], + [Directory where log files are kept (default: $localstatedir/log)]), + [ logdir="$withval" ], + [ logdir="$localstatedir/log" ]) +AC_ARG_WITH(builder-addr, AS_HELP_STRING([--with-builder-addr=ADDRESS], + [Builder address (default: xorg@lists.freedesktop.org)]), + [ BUILDERADDR="$withval" ], + [ BUILDERADDR="xorg@lists.freedesktop.org" ]) +AC_ARG_WITH(os-name, AS_HELP_STRING([--with-os-name=OSNAME], [Name of OS (default: output of "uname -srm")]), + [ OSNAME="$withval" ], + [ OSNAME=`uname -srm` ]) +AC_ARG_WITH(os-vendor, AS_HELP_STRING([--with-os-vendor=OSVENDOR], [Name of OS vendor]), + [ OSVENDOR="$withval" ], + [ OSVENDOR="" ]) +AC_ARG_WITH(builderstring, AS_HELP_STRING([--with-builderstring=BUILDERSTRING], [Additional builder string]), + [ BUILDERSTRING="$withval" ] + [ ]) +AC_ARG_WITH(fontdir, AS_HELP_STRING([--with-fontdir=FONTDIR], [Path to top level dir where fonts are installed (default: ${libdir}/X11/fonts)]), + [ FONTDIR="$withval" ], + [ FONTDIR="${libdir}/X11/fonts" ]) +DEFAULT_FONT_PATH="${FONTDIR}/misc/,${FONTDIR}/TTF/,${FONTDIR}/OTF,${FONTDIR}/Type1/,${FONTDIR}/100dpi/,${FONTDIR}/75dpi/" +AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]), + [ FONTPATH="$withval" ], + [ FONTPATH="${DEFAULT_FONT_PATH}" ]) +AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]), + [ XKBPATH="$withval" ], + [ XKBPATH="${datadir}/X11/xkb" ]) +AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]), + [ XKBOUTPUT="$withval" ], + [ XKBOUTPUT="compiled" ]) +AC_ARG_WITH(rgb-path, AS_HELP_STRING([--with-rgb-path=PATH], [Path to RGB database (default: ${datadir}/X11/rgb)]), + [ RGBPATH="$withval" ], + [ RGBPATH="${datadir}/X11/rgb" ]) +AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH], [Path to server config (default: ${libdir}/xserver)]), + [ SERVERCONFIG="$withval" ], + [ SERVERCONFIG="${libdir}/xserver" ]) +APPLE_APPLICATIONS_DIR="${bindir}/Applications" +AC_ARG_WITH(apple-applications-dir,AS_HELP_STRING([--with-apple-applications-dir=PATH], [Path to the Applications directory (default: ${bindir}/Applications)]), + [ APPLE_APPLICATIONS_DIR="${withval}" ]. + [ APPLE_APPLICATIONS_DIR="${bindir}/Applications" ]) +AC_ARG_ENABLE(builddocs, AS_HELP_STRING([--enable-builddocs], [Build docs (default: disabled)]), + [BUILDDOCS=$enableval], + [BUILDDOCS=no]) +AC_ARG_ENABLE(install-libxf86config, + AS_HELP_STRING([--enable-install-libxf86config], + [Install libxf86config (default: disabled)]), + [INSTALL_LIBXF86CONFIG=$enableval], + [INSTALL_LIBXF86CONFIG=no]) +AC_ARG_ENABLE(builtin-fonts, AS_HELP_STRING([--enable-builtin-fonts], [Use only built-in fonts (default: use external)]), + [BUILTIN_FONTS=$enableval], + [BUILTIN_FONTS=no]) +AC_ARG_ENABLE(null-root-cursor, AS_HELP_STRING([--enable-null-root-cursor], [Use an empty root cursor (default: use core cursor)]), + [NULL_ROOT_CURSOR=$enableval], + [NULL_ROOT_CURSOR=no]) + +dnl GLX build options +AC_ARG_WITH(mesa-source, AS_HELP_STRING([--with-mesa-source=MESA_SOURCE], [Path to Mesa source tree]), + [ MESA_SOURCE="$withval" ], + [ MESA_SOURCE="" ]) +AC_ARG_WITH(dri-driver-path, AS_HELP_STRING([--with-dri-driver-path=PATH], [Path to DRI drivers (default: ${libdir}/dri)]), + [ DRI_DRIVER_PATH="$withval" ], + [ DRI_DRIVER_PATH="${libdir}/dri" ]) +AC_ARG_ENABLE(aiglx, AS_HELP_STRING([--enable-aiglx], [Build accelerated indirect GLX (default: enabled)]), + [AIGLX=$enableval], + [AIGLX=yes]) +AC_ARG_ENABLE(glx-tls, AS_HELP_STRING([--enable-glx-tls], [Build GLX with TLS support (default: disabled)]), + [GLX_USE_TLS=$enableval], + [GLX_USE_TLS=no]) + +dnl Extensions. +AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes]) +AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-shm], [Build SHM extension (default: enabled)]), [MITSHM=$enableval], [MITSHM=yes]) +AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes]) +AC_ARG_ENABLE(xtrap, AS_HELP_STRING([--disable-xtrap], [Build XTrap extension (default: enabled)]), [XTRAP=$enableval], [XTRAP=yes]) +AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: enabled)]), [RECORD=$enableval], [RECORD=yes]) +AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes]) +AC_ARG_ENABLE(quartz, AS_HELP_STRING([--enable-quartz], [Build with darwin quartz support (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto]) +AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes]) +AC_ARG_ENABLE(dga, AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto]) +AC_ARG_ENABLE(screensaver, AS_HELP_STRING([--disable-screensaver], [Build ScreenSaver extension (default: enabled)]), [SCREENSAVER=$enableval], [SCREENSAVER=yes]) +AC_ARG_ENABLE(xdmcp, AS_HELP_STRING([--disable-xdmcp], [Build XDMCP extension (default: auto)]), [XDMCP=$enableval], [XDMCP=auto]) +AC_ARG_ENABLE(xdm-auth-1, AS_HELP_STRING([--disable-xdm-auth-1], [Build XDM-Auth-1 extension (default: auto)]), [XDMAUTH=$enableval], [XDMAUTH=auto]) +AC_ARG_ENABLE(glx, AS_HELP_STRING([--disable-glx], [Build GLX extension (default: enabled)]), [GLX=$enableval], [GLX=yes]) +AC_ARG_ENABLE(dri, AS_HELP_STRING([--enable-dri], [Build DRI extension (default: auto)]), [DRI=$enableval]) +AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinerama extension (default: enabled)]), [XINERAMA=$enableval], [XINERAMA=yes]) +AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: auto)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=auto]) +AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: auto)]), [XF86MISC=$enableval], [XF86MISC=auto]) +AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes]) +AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=$XACE]) +AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=$XCSECURITY]) +AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no]) +AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no]) +AC_ARG_ENABLE(xevie, AS_HELP_STRING([--disable-xevie], [Build XEvIE extension (default: enabled)]), [XEVIE=$enableval], [XEVIE=yes]) +AC_ARG_ENABLE(cup, AS_HELP_STRING([--disable-cup], [Build TOG-CUP extension (default: enabled)]), [CUP=$enableval], [CUP=yes]) +AC_ARG_ENABLE(evi, AS_HELP_STRING([--disable-evi], [Build Extended-Visual-Information extension (default: enabled)]), [EVI=$enableval], [EVI=yes]) +AC_ARG_ENABLE(multibuffer, AS_HELP_STRING([--enable-multibuffer], [Build Multibuffer extension (default: disabled)]), [MULTIBUFFER=$enableval], [MULTIBUFFER=no]) +AC_ARG_ENABLE(fontcache, AS_HELP_STRING([--enable-fontcache], [Build FontCache extension (default: disabled)]), [FONTCACHE=$enableval], [FONTCACHE=no]) +AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes]) +AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: enabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=yes]) +AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes]) +AC_ARG_ENABLE(config-dbus, AS_HELP_STRING([--enable-config-dbus], [Build D-BUS API support (default: no)]), [CONFIG_DBUS_API=$enableval], [CONFIG_DBUS_API=no]) +AC_ARG_ENABLE(config-hal, AS_HELP_STRING([--disable-config-hal], [Build HAL support (default: auto)]), [CONFIG_HAL=$enableval], [CONFIG_HAL=auto]) +AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes]) + +dnl DDXes. +AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto]) +AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (default: no)]), [DMX=$enableval], [DMX=no]) +AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes]) +AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto]) +AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto]) +AC_ARG_ENABLE(xprint, AS_HELP_STRING([--enable-xprint], [Build Xprint extension and server (default: no)]), [XPRINT=$enableval], [XPRINT=no]) +AC_ARG_ENABLE(xgl, AS_HELP_STRING([--enable-xgl], [Build Xgl server (default: no)]), [XGL=$enableval], [XGL=no]) +AC_ARG_ENABLE(xglx, AS_HELP_STRING([--enable-xglx], [Build Xglx xgl module (default: no)]), [XGLX=$enableval], [XGLX=no]) +AC_ARG_ENABLE(xegl, AS_HELP_STRING([--enable-xegl], [Build Xegl xgl module (default: no)]), [XEGL=$enableval], [XEGL=no]) +dnl legacy fb support +AC_ARG_ENABLE(mfb, AS_HELP_STRING([--enable-mfb], [Build legacy mono framebuffer support (default: enabled)]), [MFB=$enableval], [MFB=$XORG]) +AC_ARG_ENABLE(cfb, AS_HELP_STRING([--enable-cfb], [Build legacy color framebuffer support (default: enabled)]), [CFB=$enableval], [CFB=$XORG]) +AC_ARG_ENABLE(afb, AS_HELP_STRING([--enable-afb], [Build legacy advanced framebuffer support (default: enabled)]), [AFB=$enableval], [AFB=$XORG]) +dnl kdrive and its subsystems +AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no]) +AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto]) +AC_ARG_ENABLE(xsdl, AS_HELP_STRING([--enable-xsdl], [Build the kdrive Xsdl server (default: auto)]), [XSDL=$enableval], [XSDL=auto]) +AC_ARG_ENABLE(xfake, AS_HELP_STRING([--enable-xfake], [Build the kdrive 'fake' server (default: auto)]), [XFAKE=$enableval], [XFAKE=auto]) +AC_ARG_ENABLE(xfbdev, AS_HELP_STRING([--enable-xfbdev], [Build the kdrive framebuffer device server (default: auto)]), [XFBDEV=$enableval], [XFBDEV=auto]) +AC_ARG_ENABLE(kdrive-vesa, AS_HELP_STRING([--enable-kdrive-vesa], [Build the kdrive VESA-based servers (default: auto)]), [KDRIVEVESA=$enableval], [KDRIVEVESA=auto]) +dnl xprint +AC_ARG_ENABLE(freetype, AS_HELP_STRING([ --enable-freetype], [Build Xprint FreeType backend (default: yes)]), [XP_USE_FREETYPE=$enableval],[XP_USE_FREETYPE=no]) +AC_ARG_WITH(freetype-config, AS_HELP_STRING([ --with-freetype-config=PROG], [Use FreeType configuration program PROG (default: auto)]), freetype_config=$withval, freetype_config=auto) + + +dnl chown/chmod to be setuid root as part of build +dnl Replaces InstallXserverSetUID in imake +AC_ARG_ENABLE(install-setuid, + AS_HELP_STRING([--enable-install-setuid], + [Install Xorg server as owned by root with setuid bit (default: auto)]), + [SETUID=$enableval], [SETUID=auto]) +AC_MSG_CHECKING([to see if we can install the Xorg server as root]) +if test "x$SETUID" = "xauto" ; then + case $host_os in + darwin*) SETUID="no" ;; + *) + case $host_cpu in + sparc) SETUID="no" ;; + *) SETUID="yes" ;; + esac + esac + if test "x$SETUID" = xyes; then + touch testfile + chown root testfile > /dev/null 2>&1 || SETUID="no" + rm -f testfile + fi +fi +AC_MSG_RESULT([$SETUID]) +AM_CONDITIONAL(INSTALL_SETUID, [test "x$SETUID" = "xyes"]) + +dnl Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro +dnl was not expanded, since xorg-server with no transport types is rather useless. +dnl +dnl If you're seeing an error here, be sure you installed the lib/xtrans module +dnl first and if it's not in the default location, that you set the ACLOCAL +dnl environment variable to find it, such as: +dnl ACLOCAL="aclocal -I ${PREFIX}/share/aclocal" +m4_pattern_forbid(XTRANS_CONNECTION_FLAGS) + +# Transport selection macro from xtrans.m4 +XTRANS_CONNECTION_FLAGS + +# Secure RPC detection macro from xtrans.m4 +XTRANS_SECURE_RPC_FLAGS + +AM_CONDITIONAL(INT10_VM86, [test "x$INT10" = xvm86]) +AM_CONDITIONAL(INT10_X86EMU, [test "x$INT10" = xx86emu]) +AM_CONDITIONAL(INT10_STUB, [test "x$INT10" = xstub]) +if test "x$INT10" = xyes; then + dnl VM86 headers + AC_CHECK_HEADERS([sys/vm86.h sys/io.h]) +fi + +dnl Handle building documentation +AM_CONDITIONAL(BUILDDOCS, test "x$BUILDDOCS" = xyes) + +dnl Only build sgml docs when linuxdoc is available and +dnl def.ents has been installed +XORG_CHECK_LINUXDOC + +dnl Handle installing libxf86config +AM_CONDITIONAL(INSTALL_LIBXF86CONFIG, [test "x$INSTALL_LIBXF86CONFIG" = xyes]) + +dnl --------------------------------------------------------------------------- +dnl Extension section +dnl --------------------------------------------------------------------------- +XEXT_INC='-I$(top_srcdir)/Xext' +XEXT_LIB='$(top_builddir)/Xext/libXext.la' +XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la' + +PIXMAN="[pixman-1 >= 0.9.5]" +PKG_CHECK_MODULES(PIXMAN, $PIXMAN) +AC_SUBST(PIXMAN_CFLAGS) + +dnl Core modules for most extensions, et al. +# Require updated renderproto for ABI sanity if we're 64-bit. +if test "$ac_cv_sizeof_unsigned_long" = 8; then + RENDERPROTO="[renderproto >= 0.9.3]" +else + RENDERPROTO="renderproto" +fi +REQUIRED_MODULES="[randrproto >= 1.2] $RENDERPROTO [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto [xproto >= 7.0.9] xtrans [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto [inputproto >= 1.4.2] [kbproto >= 1.0.3]" +REQUIRED_LIBS="xfont xau fontenc $PIXMAN" + +dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas +dnl CONFIG_DBUS_API is true if we want to enable the D-Bus config +dnl API. +PKG_CHECK_MODULES(DBUS, dbus-1, [HAVE_DBUS=yes], [HAVE_DBUS=no]) +if test "x$HAVE_DBUS" = xyes; then + AC_DEFINE(HAVE_DBUS, 1, [Have D-Bus support]) +fi +AM_CONDITIONAL(HAVE_DBUS, [test "x$HAVE_DBUS" = xyes]) + +if test "x$CONFIG_DBUS_API" = xauto; then + CONFIG_DBUS_API="$HAVE_DBUS" +fi +if test "x$CONFIG_DBUS_API" = xyes; then + if ! test "x$HAVE_DBUS" = xyes; then + AC_MSG_ERROR([D-Bus configuration API requested, but D-Bus is not installed.]) + fi + + AC_DEFINE(CONFIG_DBUS_API, 1, [Use the D-Bus input configuration API]) + NEED_DBUS="yes" +fi +AM_CONDITIONAL(CONFIG_DBUS_API, [test "x$CONFIG_DBUS_API" = xyes]) + +PKG_CHECK_MODULES(HAL, hal, [HAVE_HAL=yes], [HAVE_HAL=no]) +if test "x$CONFIG_HAL" = xauto; then + CONFIG_HAL="$HAVE_HAL" +fi +if test "x$CONFIG_HAL" = xyes; then + if ! test "x$HAVE_HAL" = xyes; then + AC_MSG_ERROR([HAL hotplug API requested, but HAL is not installed.]) + fi + + AC_DEFINE(CONFIG_HAL, 1, [Use the HAL hotplug API]) + REQUIRED_LIBS="$REQUIRED_LIBS hal" + NEED_DBUS="yes" +fi +AM_CONDITIONAL(CONFIG_HAL, [test "x$CONFIG_HAL" = xyes]) + +if test "x$NEED_DBUS" = xyes; then + REQUIRED_LIBS="$REQUIRED_LIBS dbus-1" +fi +CONFIG_LIB='$(top_builddir)/config/libconfig.a' + +AM_CONDITIONAL(XV, [test "x$XV" = xyes]) +if test "x$XV" = xyes; then + AC_DEFINE(XV, 1, [Support Xv extension]) + AC_DEFINE(XvExtension, 1, [Build Xv extension]) + REQUIRED_MODULES="$REQUIRED_MODULES videoproto" +else + XVMC=no +fi + +AM_CONDITIONAL(XVMC, [test "x$XVMC" = xyes]) +if test "x$XVMC" = xyes; then + AC_DEFINE(XvMCExtension, 1, [Build XvMC extension]) +fi + + +AM_CONDITIONAL(COMPOSITE, [test "x$COMPOSITE" = xyes]) +if test "x$COMPOSITE" = xyes; then + AC_DEFINE(COMPOSITE, 1, [Support Composite Extension]) + REQUIRED_MODULES="$REQUIRED_MODULES [compositeproto >= 0.4]" + COMPOSITE_LIB='$(top_builddir)/composite/libcomposite.la' + COMPOSITE_INC='-I$(top_srcdir)/composite' +fi + +AM_CONDITIONAL(MITSHM, [test "x$MITSHM" = xyes]) +if test "x$MITSHM" = xyes; then + AC_DEFINE(MITSHM, 1, [Support MIT-SHM extension]) + AC_DEFINE(HAS_SHM, 1, [Support SHM]) +fi + +AM_CONDITIONAL(XTRAP, [test "x$XTRAP" = xyes]) +if test "x$XTRAP" = xyes; then + AC_DEFINE(XTRAP, 1, [Support XTrap extension]) + REQUIRED_MODULES="$REQUIRED_MODULES trapproto" + XTRAP_LIB='$(top_builddir)/XTrap/libxtrap.la' +fi + +AM_CONDITIONAL(RECORD, [test "x$RECORD" = xyes]) +if test "x$RECORD" = xyes; then + AC_DEFINE(XRECORD, 1, [Support Record extension]) + REQUIRED_MODULES="$REQUIRED_MODULES recordproto" + RECORD_LIB='$(top_builddir)/record/librecord.la' +fi + +AM_CONDITIONAL(SCREENSAVER, [test "x$SCREENSAVER" = xyes]) +if test "x$SCREENSAVER" = xyes; then + AC_DEFINE(SCREENSAVER, 1, [Support MIT-SCREEN-SAVER extension]) +fi + +AM_CONDITIONAL(RES, [test "x$RES" = xyes]) +if test "x$RES" = xyes; then + AC_DEFINE(RES, 1, [Support X resource extension]) + REQUIRED_MODULES="$REQUIRED_MODULES resourceproto" +fi + +if test "x$GLX" = xyes && ! test "x$MESA_SOURCE" = x; then + PKG_CHECK_MODULES([XLIB], [x11]) + PKG_CHECK_MODULES([GL], [glproto >= 1.4.8]) + AC_SUBST(XLIB_CFLAGS) + AC_DEFINE(GLXEXT, 1, [Build GLX extension]) + GLX_LIBS='$(top_builddir)/GL/glx/libglx.la $(top_builddir)/GL/mesa/libGLcore.la' + test -d GL || mkdir GL + case $host_os in + solaris*) + SYMLINK_MESA="/usr/bin/bash $srcdir/GL/symlink-mesa.sh" ;; + *) SYMLINK_MESA=$srcdir/GL/symlink-mesa.sh ;; + esac + $SYMLINK_MESA $MESA_SOURCE GL/ + if test $? -ne 0; then + AC_MSG_ERROR([Failed to link Mesa source tree. Please specify a proper path to Mesa sources, or disable GLX.]) + fi +else + GLX=no +fi +AM_CONDITIONAL(GLX, test "x$GLX" = xyes) +AC_SUBST([MESA_SOURCE]) + +if test "x$AIGLX" = xyes -a "x$GLX" = xyes -a "x$DRI" = xyes; then + AC_DEFINE(AIGLX, 1, [Build AIGLX loader]) +else + AIGLX=no +fi +AM_CONDITIONAL(AIGLX, test "x$AIGLX" = xyes) + +if test "x$GLX_USE_TLS" = xyes -a "x$AIGLX" = xyes; then + GLX_DEFINES="-DGLX_USE_TLS -DPTHREADS" + GLX_LIBS="$GLX_LIBS -lpthread" +fi +AC_SUBST([GLX_DEFINES]) + +AM_CONDITIONAL(DRI, test "x$DRI" = xyes) +if test "x$DRI" = xyes; then + AC_DEFINE(XF86DRI, 1, [Build DRI extension]) + PKG_CHECK_MODULES([DRIPROTO], [xf86driproto]) + PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.3.0]) + PKG_CHECK_MODULES([GL], [glproto >= 1.4.1]) + PKG_CHECK_EXISTS(libdrm >= 2.2.0, + [AC_DEFINE([HAVE_LIBDRM_2_2], 1, + [Has version 2.2 (or newer) of the drm library])]) + AC_SUBST(DRIPROTO_CFLAGS) + AC_SUBST(LIBDRM_CFLAGS) + AC_SUBST(LIBDRM_LIBS) + AC_SUBST(GL_CFLAGS) +fi + +AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes]) +if test "x$XINERAMA" = xyes; then + AC_DEFINE(XINERAMA, 1, [Support Xinerama extension]) + AC_DEFINE(PANORAMIX, 1, [Internal define for Xinerama]) + REQUIRED_MODULES="$REQUIRED_MODULES xineramaproto" +fi + +AM_CONDITIONAL(XACE, [test "x$XACE" = xyes]) +if test "x$XACE" = xyes; then + AC_DEFINE(XACE, 1, [Build X-ACE extension]) +fi + +AM_CONDITIONAL(XCSECURITY, [test "x$XCSECURITY" = xyes]) +if test "x$XCSECURITY" = xyes; then + if test "x$XACE" != xyes; then + AC_MSG_ERROR([cannot build Security extension without X-ACE]) + fi + AC_DEFINE(XCSECURITY, 1, [Build Security extension]) +fi + +AM_CONDITIONAL(XEVIE, [test "x$XEVIE" = xyes]) +if test "x$XEVIE" = xyes; then + AC_DEFINE(XEVIE, 1, [Build XEvIE extension]) + REQUIRED_MODULES="$REQUIRED_MODULES evieproto" +fi + +AM_CONDITIONAL(APPGROUP, [test "x$APPGROUP" = xyes]) +if test "x$APPGROUP" = xyes; then + if test "x$XACE" != xyes || test "x$XCSECURITY" != xyes; then + AC_MSG_ERROR([cannot build APPGROUP extension without X-ACE and XC-SECURITY]) + fi + AC_DEFINE(XAPPGROUP, 1, [Build APPGROUP extension]) +fi + +AM_CONDITIONAL(CUP, [test "x$CUP" = xyes]) +if test "x$CUP" = xyes; then + AC_DEFINE(TOGCUP, 1, [Build TOG-CUP extension]) + # Requires xextproto which is always required +fi + +AM_CONDITIONAL(EVI, [test "x$EVI" = xyes]) +if test "x$EVI" = xyes; then + AC_DEFINE(EVI, 1, [Build Extended-Visual-Information extension]) + # Requires xextproto which is always required +fi + +AM_CONDITIONAL(MULTIBUFFER, [test "x$MULTIBUFFER" = xyes]) +if test "x$MULTIBUFFER" = xyes; then + AC_DEFINE(MULTIBUFFER, 1, [Build Multibuffer extension]) + # Requires xextproto which is always required +fi + +AM_CONDITIONAL(FONTCACHE, [test "x$FONTCACHE" = xyes]) +if test "x$FONTCACHE" = xyes; then + AC_DEFINE(FONTCACHE, 1, [Build FontCache extension]) + REQUIRED_MODULES="$REQUIRED_MODULES fontcacheproto" +fi + +AM_CONDITIONAL(DBE, [test "x$DBE" = xyes]) +if test "x$DBE" = xyes; then + AC_DEFINE(DBE, 1, [Support DBE extension]) + DBE_LIB='$(top_builddir)/dbe/libdbe.la' +fi + +AM_CONDITIONAL(XF86BIGFONT, [test "x$XF86BIGFONT" = xyes]) +if test "x$XF86BIGFONT" = xyes; then + AC_DEFINE(XF86BIGFONT, 1, [Support XF86 Big font extension]) +fi + +AM_CONDITIONAL(DPMSExtension, [test "x$DPMSExtension" = xyes]) +if test "x$DPMSExtension" = xyes; then + AC_DEFINE(DPMSExtension, 1, [Support DPMS extension]) +fi + +if test "x$XPRINT" = xauto; then + PKG_CHECK_MODULES([XPRINTPROTO], [printproto], [XPRINT=yes], [XPRINT=no]) +fi +AM_CONDITIONAL(XPRINT, [test "x$XPRINT" = xyes]) +if test "x$XPRINT" = xyes; then + AC_DEFINE(XPRINT, 1, [Build Print extension]) + REQUIRED_MODULES="$REQUIRED_MODULES printproto" +fi + +if test "x$BUILTIN_FONTS" = xyes; then + AC_DEFINE(BUILTIN_FONTS, 1, [Use only built-in fonts]) + AC_DEFINE(NOFONTSERVERACCESS, 1, [Avoid using a font server]) + FONTPATH="built-ins" +fi + +if test "x$XCALIBRATE" = xyes && test "$KDRIVE" = yes; then + AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension]) + REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto" +else + XCALIBRATE=no +fi +AM_CONDITIONAL(XCALIBRATE, [test "x$XCALIBRATE" = xyes]) + +AC_DEFINE(RENDER, 1, [Support RENDER extension]) +RENDER_LIB='$(top_builddir)/render/librender.la' +RENDER_INC='-I$(top_srcdir)/render' + +AC_DEFINE(RANDR, 1, [Support RANDR extension]) +RANDR_LIB='$(top_builddir)/randr/librandr.la' +RANDR_INC='-I$(top_srcdir)/randr' + +AC_DEFINE(XFIXES,1,[Support XFixes extension]) +FIXES_LIB='$(top_builddir)/xfixes/libxfixes.la' +FIXES_INC='-I$(top_srcdir)/xfixes' + +AC_DEFINE(DAMAGE,1,[Support Damage extension]) +DAMAGE_LIB='$(top_builddir)/damageext/libdamageext.la' +DAMAGE_INC='-I$(top_srcdir)/damageext' +MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la' +MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage' + +AC_DEFINE(XINPUT, 1, [Support X Input extension]) +XI_LIB='$(top_builddir)/Xi/libXi.la' +XI_INC='-I$(top_srcdir)/Xi' + +AM_CONDITIONAL(XF86UTILS, test "x$XF86UTILS" = xyes) + +AC_DEFINE(SHAPE, 1, [Support SHAPE extension]) + +AC_DEFINE(XKB, 1, [Build XKB]) +AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server]) +AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default]) +REQUIRED_MODULES="$REQUIRED_MODULES xkbfile" +XKB_LIB='$(top_builddir)/xkb/libxkb.la' +XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la' + +AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1, + [Do not have 'strcasecmp'.])) + +if test "x$NULL_ROOT_CURSOR" = xyes; then + AC_DEFINE(NULL_ROOT_CURSOR, 1, [Use an empty root cursor]) +fi + +PKG_CHECK_MODULES([XDMCP], [xdmcp], [have_libxdmcp="yes"], [have_libxdmcp="no"]) +if test "x$have_libxdmcp" = xyes; then + AC_CHECK_LIB(Xdmcp, XdmcpWrap, [have_xdmcpwrap="yes"], [have_xdmcpwrap="no"], [$XDMCP_LIBS]) +fi +if test "x$XDMCP" = xauto; then + if test "x$have_libxdmcp" = xyes; then + XDMCP=yes + else + XDMCP=no + fi +fi +if test "x$XDMAUTH" = xauto; then + if test "x$have_libxdmcp" = xyes && test "x$have_xdmcpwrap" = xyes; then + XDMAUTH=yes + else + XDMAUTH=no + fi +fi + +AM_CONDITIONAL(XDMCP, [test "x$XDMCP" = xyes]) +if test "x$XDMCP" = xyes; then + AC_DEFINE(XDMCP, 1, [Support XDM Control Protocol]) + REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" + XDMCP_MODULES="xdmcp" +fi + +AM_CONDITIONAL(XDMAUTH, [test "x$XDMAUTH" = xyes]) +if test "x$XDMAUTH" = xyes; then + AC_DEFINE(HASXDMAUTH,1,[Support XDM-AUTH*-1]) + if ! test "x$XDMCP" = xyes; then + REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" + XDMCP_MODULES="xdmcp" + fi +fi + +AM_CONDITIONAL(USE_RGB_BUILTIN, [test "x$USE_RGB_BUILTIN" = xyes]) +if test "x$USE_RGB_BUILTIN" = xyes; then + AC_DEFINE(USE_RGB_BUILTIN, 1, [Use built-in RGB color database]) +fi + +AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path]) +AC_DEFINE_DIR(RGB_DB, RGBPATH, [Default RGB path]) +AC_DEFINE_DIR(SERVERCONFIGdir, SERVERCONFIG, [Server config path]) +AC_DEFINE_DIR(BASE_FONT_PATH, FONTDIR, [Default base font path]) +AC_DEFINE_DIR(DRI_DRIVER_PATH, DRI_DRIVER_PATH, [Default DRI driver path]) +AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_NAME"], [Vendor name]) +AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, ["$VENDOR_NAME_SHORT"], [Short vendor name]) +AC_DEFINE_UNQUOTED(XORG_DATE, ["$RELEASE_DATE"], [Vendor release]) +AC_DEFINE_UNQUOTED(XORG_MAN_VERSION, ["$VENDOR_MAN_VERSION"], [Vendor man version]) +AC_DEFINE_UNQUOTED(BUILDERADDR, ["$BUILDERADDR"], [Builder address]) + +if test -z "$OSNAME"; then + OSNAME="UNKNOWN" +fi + +AC_DEFINE_UNQUOTED(OSNAME, ["$OSNAME"], [Operating System Name]) +AC_DEFINE_UNQUOTED(OSVENDOR, ["$OSVENDOR"], [Operating System Vendor]) +AC_DEFINE_UNQUOTED(BUILDERSTRING, ["$BUILDERSTRING"], [Builder string]) + +AC_SUBST([VENDOR_NAME]) +AC_SUBST([VENDOR_NAME_SHORT]) +AC_SUBST([VENDOR_RELEASE]) +AC_SUBST([VENDOR_MAN_VERSION]) + +AC_DEFINE(DDXOSINIT, 1, [Use OsVendorInit]) +AC_DEFINE(SERVER_LOCK, 1, [Use a lock to prevent multiple servers on a display]) +AC_DEFINE(SMART_SCHEDULE, 1, [Include time-based scheduler]) +AC_DEFINE(NO_LIBCWRAPPER, 1, [Define to 1 if modules should avoid the libcwrapper]) + +if test "x$DEBUGGING" = xyes; then + AC_DEFINE(DEBUG, 1, [Enable debugging code]) +else + AC_DEFINE(NDEBUG, 1, [Disable some debugging code]) +fi +AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes]) + +AC_DEFINE(USE_RGB_TXT, 1, [Use rgb.txt directly]) +AC_DEFINE(MITMISC, 1, [Support MIT Misc extension]) +AC_DEFINE(XTEST, 1, [Support XTest extension]) +AC_DEFINE(XSYNC, 1, [Support XSync extension]) +AC_DEFINE(XCMISC, 1, [Support XCMisc extension]) +AC_DEFINE(BIGREQS, 1, [Support BigRequests extension]) +AC_DEFINE(PIXPRIV, 1, [Support pixmap privates]) + +if test "x$WDTRACE" != "xno" ; then + DIX_LIB='$(top_builddir)/dix/dix.O' + OS_LIB='$(top_builddir)/os/os.O' +else + DIX_LIB='$(top_builddir)/dix/libdix.la' + OS_LIB='$(top_builddir)/os/libos.la' +fi +CWRAP_LIB='$(top_builddir)/os/libcwrapper.la' +MI_LIB='$(top_builddir)/mi/libmi.la' +MI_EXT_LIB='$(top_builddir)/mi/libmiext.la' +MI_INC='-I$(top_srcdir)/mi' +FB_LIB='$(top_builddir)/fb/libfb.la' +FB_INC='-I$(top_srcdir)/fb' +MIEXT_SHADOW_INC='-I$(top_srcdir)/miext/shadow' +MIEXT_SHADOW_LIB='$(top_builddir)/miext/shadow/libshadow.la' +XPSTUBS_LIB='$(top_builddir)/dix/libxpstubs.la' +CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include' + +PKG_CHECK_MODULES([XSERVERCFLAGS], [$REQUIRED_MODULES $REQUIRED_LIBS]) +PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS]) + +XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS}" +XSERVER_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}" +AC_SUBST([SYS_LIBS]) + +# The Xorg binary needs to export symbols so that they can be used from modules +# Some platforms require extra flags to do this. gcc should set these flags +# when -rdynamic is passed to it, other compilers/linkers may need to be added +# here. +if test "x$GCC" = "xyes"; then + GCC_WARNINGS1="-Wall -Wpointer-arith -Wstrict-prototypes" + GCC_WARNINGS2="-Wmissing-prototypes -Wmissing-declarations" + GCC_WARNINGS3="-Wnested-externs -fno-strict-aliasing" + GCC_WARNINGS="$GCC_WARNINGS1 $GCC_WARNINGS2 $GCC_WARNINGS3" + if test "x$WERROR" = "xyes"; then + GCC_WARNINGS="${GCC_WARNINGS} -Werror" + fi + XSERVER_CFLAGS="$GCC_WARNINGS $XSERVER_CFLAGS" + + LD_EXPORT_SYMBOLS_FLAG="-rdynamic" +fi +case $host_os in + darwin*) + LD_EXPORT_SYMBOLS_FLAG="" + ;; + openbsd*) + LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-dynamic" + ;; +esac +AC_SUBST([LD_EXPORT_SYMBOLS_FLAG]) + +AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes], + [AC_CHECK_LIB([rt], [clock_gettime], [have_clock_gettime=-lrt], + [have_clock_gettime=no])]) + +AC_MSG_CHECKING([for a useful monotonic clock ...]) + +if ! test "x$have_clock_gettime" = xno; then + if ! test "x$have_clock_gettime" = xyes; then + CLOCK_LIBS="$have_clock_gettime" + else + CLOCK_LIBS="" + fi + + LIBS_SAVE="$LIBS" + LIBS="$CLOCK_LIBS" + + AC_RUN_IFELSE([ +#define _POSIX_C_SOURCE 199309L +#include + +int main(int argc, char *argv[[]]) { + struct timespec tp; + + if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) + return 0; + else + return 1; +} + ], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no], + [MONOTONIC_CLOCK="cross compiling"]) + + LIBS="$LIBS_SAVE" +else + MONOTONIC_CLOCK=no +fi + +AC_MSG_RESULT([$MONOTONIC_CLOCK]) + +if test "x$MONOTONIC_CLOCK" = xyes; then + AC_DEFINE(MONOTONIC_CLOCK, 1, [Have monotonic clock from clock_gettime()]) + XSERVER_LIBS="$XSERVER_LIBS $CLOCK_LIBS" + LIBS="$LIBS $CLOCK_LIBS" +fi + +dnl Imake defines SVR4 on SVR4 systems, and many files check for it, so +dnl we need to replicate that here until those can all be fixed +AC_MSG_CHECKING([if SVR4 needs to be defined]) +AC_EGREP_CPP([I_AM_SVR4],[ +#if defined(SVR4) || defined(__svr4__) || defined(__SVR4) + I_AM_SVR4 +#endif +],[ +AC_DEFINE([SVR4],1,[Define to 1 on systems derived from System V Release 4]) +AC_MSG_RESULT([yes])], AC_MSG_RESULT([no])) + +XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC" +AC_DEFINE_UNQUOTED(_X_BYTE_ORDER,[$ENDIAN],[Endian order]) +AH_VERBATIM([X_BYTE_ORDER],[ +/* Deal with multiple architecture compiles on Mac OS X */ +#ifndef __APPLE_CC__ +#define X_BYTE_ORDER _X_BYTE_ORDER +#else +#ifdef __BIG_ENDIAN__ +#define X_BYTE_ORDER X_BIG_ENDIAN +#else +#define X_BYTE_ORDER X_LITTLE_ENDIAN +#endif +#endif +]) + +AC_SUBST([XSERVER_LIBS]) + +dnl --------------------------------------------------------------------------- +dnl DDX section. +dnl --------------------------------------------------------------------------- + +dnl DMX DDX + +AC_MSG_CHECKING([whether to build Xdmx DDX]) +PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES $PIXMAN], [have_dmx=yes], [have_dmx=no]) +if test "x$DMX" = xauto; then + DMX="$have_dmx" +fi +AC_MSG_RESULT([$DMX]) +AM_CONDITIONAL(DMX, [test "x$DMX" = xyes]) + +if test "x$DMX" = xyes; then + if test "x$have_dmx" = xno; then + AC_MSG_ERROR([Xdmx build explicitly requested, but required + modules not found.]) + fi + DMX_INCLUDES="$XEXT_INC $RENDER_INC $XTRAP_INC $RECORD_INC" + XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $CONFIG_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $OS_LIB $CWRAP_LIB" + AC_SUBST([XDMX_LIBS]) + +dnl USB sources in DMX require + AC_CHECK_HEADER([linux/input.h], DMX_BUILD_USB="yes", + DMX_BUILD_USB="no") +dnl Linux sources in DMX require + AC_CHECK_HEADER([linux/keyboard.h], DMX_BUILD_LNX="yes", + DMX_BUILD_LNX="no") + if test "x$GLX" = xyes; then + PKG_CHECK_MODULES([GL], [glproto]) + fi + PKG_CHECK_MODULES([XDMXCONFIG_DEP], [xaw7 xmu xt xpm x11]) + AC_SUBST(XDMXCONFIG_DEP_CFLAGS) + AC_SUBST(XDMXCONFIG_DEP_LIBS) + PKG_CHECK_MODULES([DMXEXAMPLES_DEP], [dmx xext x11]) + AC_SUBST(DMXEXAMPLES_DEP_LIBS) + PKG_CHECK_MODULES([DMXXMUEXAMPLES_DEP], [dmx xmu xext x11]) + AC_SUBST(DMXXMUEXAMPLES_DEP_LIBS) + PKG_CHECK_MODULES([DMXXIEXAMPLES_DEP], [dmx xi xext x11]) + AC_SUBST(DMXXIEXAMPLES_DEP_LIBS) + PKG_CHECK_MODULES([XTSTEXAMPLES_DEP], [xtst xext x11]) + AC_SUBST(XTSTEXAMPLES_DEP_LIBS) + PKG_CHECK_MODULES([XRESEXAMPLES_DEP], [xres xext x11]) + AC_SUBST(XRESEXAMPLES_DEP_LIBS) + PKG_CHECK_MODULES([X11EXAMPLES_DEP], [xext x11]) + AC_SUBST(X11EXAMPLES_DEP_LIBS) +fi +AM_CONDITIONAL([DMX_BUILD_LNX], [test "x$DMX_BUILD_LNX" = xyes]) +AM_CONDITIONAL([DMX_BUILD_USB], [test "x$DMX_BUILD_USB" = xyes]) + + +dnl Xvfb DDX + +AC_MSG_CHECKING([whether to build Xvfb DDX]) +AC_MSG_RESULT([$XVFB]) +AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes]) + +if test "x$XVFB" = xyes; then + XVFB_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS" + AC_SUBST([XVFB_LIBS]) +fi + + +dnl Xnest DDX + +AC_MSG_CHECKING([whether to build Xnest DDX]) +PKG_CHECK_MODULES(XNESTMODULES, [xfont xext x11 xau $XDMCP_MODULES], [have_xnest=yes], [have_xnest=no]) +if test "x$XNEST" = xauto; then + XNEST="$have_xnest" +fi +AC_MSG_RESULT([$XNEST]) +AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes]) + +if test "x$XNEST" = xyes; then + XNEST_LIBS="$MI_LIB $CONFIG_LIB $XSERVER_LIBS $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS" + AC_SUBST([XNEST_LIBS]) +fi + + +dnl Xorg DDX + +AC_MSG_CHECKING([whether to build Xorg DDX]) +if test "x$XORG" = xauto; then + XORG="yes" + case $host_os in + cygwin*) XORG="no" ;; + esac +fi +AC_MSG_RESULT([$XORG]) + +dnl Xgl DDX + +AC_MSG_CHECKING([whether to build Xgl DDX]) +if test "x$XGL" != xno; then + PKG_CHECK_MODULES([XGLMODULES], [glitz-glx >= 0.4.3], [XGL=yes], [XGL=no]) + AC_SUBST(XGLMODULES_CFLAGS) + AC_SUBST(XGLMODULES_LIBS) +fi +AC_MSG_RESULT([$XGL]) +AM_CONDITIONAL(XGL, [test "x$XGL" = xyes]) + +if test "x$XGL" = xyes; then + XGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB" + AC_SUBST([XGL_LIBS]) + AC_DEFINE(XGL_MODULAR, 1, [Use loadable XGL modules]) + + xglmoduledir="$moduledir/xgl" + AC_SUBST([xglmoduledir]) + AC_DEFINE_DIR(XGL_MODULE_PATH, xglmoduledir, [Default XGL module search path]) +fi + +dnl Xegl DDX + +AC_MSG_CHECKING([whether to build Xegl DDX]) +if test "x$XEGL" != xno; then + PKG_CHECK_MODULES([XGLMODULES], [glitz-glx >= 0.4.3], [XEGL=yes], [XEGL=no]) + AC_SUBST(XEGLMODULES_CFLAGS) + AC_SUBST(XEGLMODULES_LIBS) +fi +AC_MSG_RESULT([$XEGL]) +AM_CONDITIONAL(XEGL, [test "x$XEGL" = xyes]) + +if test "x$XEGL" = xyes; then + XEGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB" + AC_SUBST([XEGL_LIBS]) +fi + +dnl Xglx DDX + +AC_MSG_CHECKING([whether to build Xglx DDX]) +if test "x$XGLX" != xno; then + PKG_CHECK_MODULES([XGLXMODULES], [glitz-glx >= 0.4.3 xrender], [XGLX=yes], [XGLX=no]) + AC_SUBST(XGLXMODULES_CFLAGS) + AC_SUBST(XGLXMODULES_LIBS) +fi +AC_MSG_RESULT([$XGLX]) +AM_CONDITIONAL(XGLX, [test "x$XGLX" = xyes]) + +if test "x$XGLX" = xyes; then + XGLX_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB" + AC_SUBST([XGLX_LIBS]) +fi + +# XORG_CORE_LIBS is needed even if you're not building the Xorg DDX +XORG_CORE_LIBS="$DIX_LIB $CONFIG_LIB" +AC_SUBST([XORG_CORE_LIBS]) + +xorg_bus_linuxpci=no +xorg_bus_freebsdpci=no +xorg_bus_netbsdpci=no +xorg_bus_ix86pci=no +xorg_bus_ppcpci=no +xorg_bus_sparcpci=no +xorg_bus_sparc=no + +if test "x$XORG" = xyes -o "x$XGL" = xyes; then + XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common' + XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' + XORG_INCS="$XORG_DDXINCS $XORG_OSINCS" + XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" + XORG_LIBS="$COMPOSITE_LIB $MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $OS_LIB" + +dnl Check to see if dlopen is in default libraries (like Solaris, which +dnl has it in libc), or if libdl is needed to get it. + AC_CHECK_FUNC([dlopen], [], + AC_CHECK_LIB([dl], [dlopen], XORG_LIBS="$XORG_LIBS -ldl")) + + case $host_os in + darwin*) + XORG_OS="Darwin" + build_darwin=yes + if test "X$XQUARTZ" = Xauto; then + AC_CACHE_CHECK([for Carbon framework],xorg_cv_Carbon_framework,[ + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -framework Carbon" + AC_LINK_IFELSE([char FSFindFolder(); +int main() { +FSFindFolder(); +return 0;} + ],[xorg_cv_Carbon_framework=yes], + [xorg_cv_Carbon_framework=no]) + LDFLAGS=$save_LDFLAGS]) + if test "X$xorg_cv_Carbon_framework" = Xyes; then + AC_DEFINE([DARWIN_WITH_QUARTZ],[1], + [Have Quartz]) + XQUARTZ=yes + else + XQUARTZ=no + fi + fi +# glxAGL / glxCGL don't work yet +# AC_CACHE_CHECK([for AGL framework],xorg_cv_AGL_framework,[ +# save_LDFLAGS=$LDFLAGS +# LDFLAGS="$LDFLAGS -framework AGL" +# AC_LINK_IFELSE([char aglEnable(); +#int main() { +#aglEnable(); +#return 0;} +# ],[xorg_cv_AGL_framework=yes], +# [xorg_cv_AGL_framework=no]) +# LDFLAGS=$save_LDFLAGS +# ]) + xorg_cv_AGL_framework=no + DARWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB" + AC_SUBST([DARWIN_LIBS]) + AC_CHECK_LIB([Xplugin],[xp_init],[:]) + AC_SUBST([APPLE_APPLICATIONS_DIR]) + CFLAGS="${CFLAGS} -D__DARWIN__" + PLIST_VERSION_STRING=$PACKAGE_VERSION + AC_SUBST([PLIST_VERSION_STRING]) + PLIST_VENDOR_WEB=$VENDOR_WEB + AC_SUBST([PLIST_VENDOR_WEB]) + # Not sure that we should be disabling all these... + if test "x$XF86MISC" = xyes || test "x$XF86MISC" = xauto; then + AC_MSG_NOTICE([Disabling XF86Misc extension]) + XF86MISC=no + fi + if test "x$XF86VIDMODE" = xyes || test "x$XF86VIDMODE" = xauto; then + AC_MSG_NOTICE([Disabling XF86VidMode extension]) + XF86VIDMODE=no + fi + if test "x$DGA" = xyes || test "x$DGA" = xauto; then + AC_MSG_NOTICE([Disabling DGA extension]) + DGA=no + fi + ;; + linux*) + if test "x$LNXAPM" = xyes; then + XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" + fi + XORG_OS="linux" + XORG_OS_SUBDIR="linux" + xorg_bus_linuxpci="yes" + linux_acpi="no" + case $host_cpu in + ia64*) + linux_ia64=yes + linux_acpi="yes" + ;; + alpha*) + linux_alpha=yes + XORG_OS_PCI="axp" + xorg_bus_linuxpci="no" + ;; + i*86|amd64*|x86_64*) + linux_acpi="yes" + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu) + XORG_OS="freebsd" + XORG_OS_SUBDIR="bsd" + case $host_cpu in + i*86) + ;; + *) + xorg_bus_freebsdpci="yes" + ;; + esac + ;; + netbsd*) + XORG_OS="netbsd" + XORG_OS_SUBDIR="bsd" + case $host_cpu in + i*86|amd64*|x86_64*|ia64*) + ;; + *) + xorg_bus_netbsdpci="yes" + ;; + esac + ;; + openbsd*) + XORG_OS="openbsd" + XORG_OS_SUBDIR="bsd" + case $host_cpu in + i*86|amd64*|x86_64*|ia64*) + ;; + *) + xorg_bus_freebsdpci="yes" + ;; + esac + ;; + solaris*) + XORG_OS="solaris" + XORG_OS_SUBDIR="solaris" + # This really should be tests for specific features, but the #ifdef's + # were done as a simple version check in XFree86 4.x and haven't been + # fixed yet + AC_MSG_CHECKING([Solaris version]) + OS_MINOR=`echo ${host_os}|sed -e 's/^.*solaris2\.//' -e s'/\..*$//'` + if test "${OS_MINOR}" -ge 7 ; then + AC_MSG_RESULT(Solaris ${OS_MINOR}) + else + AC_MSG_RESULT(Solaris `echo ${host_os}|sed -e 's/^.*solaris//`) + fi + if test "${OS_MINOR}" -ge 8 ; then + AC_DEFINE(__SOL8__,1,[Solaris 8 or later]) + fi + AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) + if test "x$SUNCC" = "xyes"; then + solaris_asm_inline="yes" + fi + AC_CHECK_DECL([_LP64], [SOLARIS_64="yes"], [SOLARIS_64="no"]) + + case $host_cpu in + sparc*) + SOLARIS_INOUT_ARCH="sparcv8plus" + ;; + i*86) + if test x$SOLARIS_64 = xyes ; then + SOLARIS_INOUT_ARCH="amd64" + else + SOLARIS_INOUT_ARCH="ia32" + fi + if test "${OS_MINOR}" -lt 8 ; then + solaris_usl_console="yes" + else + XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" + fi + ;; + *) + AC_MSG_ERROR([Unsupported Solaris platform. Only SPARC & x86 \ + are supported on Solaris in this release. If you are \ + interested in porting Xorg to your platform, please email \ + xorg@lists.freedesktop.org.]) ;; + esac + AC_SUBST([SOLARIS_INOUT_ARCH]) + if test x$solaris_asm_inline = xyes ; then + SOLARIS_ASM_CFLAGS='$(top_srcdir)/hw/xfree86/os-support/solaris/solaris-$(SOLARIS_INOUT_ARCH).il' + XORG_CFLAGS="${XORG_CFLAGS} "'$(SOLARIS_ASM_CFLAGS)' + fi + AC_SUBST([SOLARIS_ASM_CFLAGS]) + ;; + gnu*) + XORG_OS="gnu" + XORG_OS_SUBDIR="hurd" + ;; + *) + XORG_OS="unknown" + XORG_OS_SUBDIR="unknown" + AC_MSG_ERROR([Your OS is unknown. Xorg currently only supports Linux, \ + Free/Open/NetBSD, Solaris, and OS X. If you are interested in porting \ + Xorg to your platform, please email xorg@lists.freedesktop.org.]) + ;; + esac + + case $host_cpu in + i*86) + case $host_os in + darwin*) ;; + *) xorg_bus_ix86pci=yes ;; + esac + ;; + powerpc*) + case $host_os in + darwin*|linux*|freebsd*|netbsd*|openbsd*|kfreebsd*-gnu) + ;; + *) + xorg_bus_ppcpci="yes" + ;; + esac + ;; + sparc*) + xorg_bus_sparcpci="yes" + xorg_bus_sparc="yes" + ;; + x86_64*|amd64*) + case $host_os in + darwin*|freebsd*|kfreebsd*-gnu) + # FreeBSD uses the system pci interface + ;; + *) + xorg_bus_ix86pci="yes" + ;; + esac + ;; + esac + + if test "x$XORG_OS_PCI" = x ; then + XORG_OS_PCI=$XORG_OS + fi + if test "x$DGA" = xauto; then + PKG_CHECK_MODULES(DGA, xf86dgaproto, [DGA=yes], [DGA=no]) + fi + if test "x$DGA" = xyes; then + XORG_MODULES="$XORG_MODULES xf86dgaproto" + PKG_CHECK_MODULES(DGA, xf86dgaproto) + AC_DEFINE(DGA, 1, [Support DGA extension]) + AC_DEFINE(XFreeXDGA, 1, [Build XDGA support]) + fi + + if test "x$XF86MISC" = xauto; then + PKG_CHECK_MODULES(XF86MISC, xf86miscproto, [XF86MISC=yes], [XF86MISC=no]) + fi + if test "x$XF86MISC" = xyes; then + XORG_MODULES="$XORG_MODULES xf86miscproto" + PKG_CHECK_MODULES(XF86MISC, xf86miscproto) + AC_DEFINE(XF86MISC, 1, [Support XFree86 miscellaneous extensions]) + fi + + if test "x$XF86VIDMODE" = xauto; then + PKG_CHECK_MODULES(XF86VIDMODE, xf86vidmodeproto, [XF86VIDMODE=yes], [XF86VIDMODE=no]) + fi + if test "x$XF86VIDMODE" = xyes; then + XORG_MODULES="$XORG_MODULES xf86vidmodeproto" + PKG_CHECK_MODULES(XF86VIDMODE, xf86vidmodeproto) + AC_DEFINE(XF86VIDMODE, 1, [Support XFree86 Video Mode extension]) + fi + + if test -n "$XORG_MODULES"; then + PKG_CHECK_MODULES(XORG_MODULES, [$XORG_MODULES]) + XORG_CFLAGS="$XORG_CFLAGS $XORG_MODULES_CFLAGS" + XORG_LIBS="$XORG_LIBS $XORG_MODULES_LIBS" + fi + + AC_SUBST([XORG_LIBS]) + AC_SUBST([XORG_INCS]) + AC_SUBST([XORG_OS]) + AC_SUBST([XORG_OS_SUBDIR]) + + dnl only used in hw/xfree86/scanpci, TTBOMK + AC_PATH_PROG(PERL, perl, no) + dnl unlikely as this may be ... + if test "x$PERL" = xno; then + AC_MSG_ERROR([Perl is required to build the XFree86/Xorg DDX.]) + fi + AC_SUBST(PERL) + + AC_SUBST([XORG_CFLAGS]) + + dnl these only go in xorg-config.h + XF86CONFIGFILE="xorg.conf" + CONFIGFILE="$sysconfdir/$XF86CONFIGFILE" + LOGPREFIX="$logdir/Xorg." + AC_DEFINE(XORG_SERVER, 1, [Building Xorg server]) + AC_DEFINE(XORGSERVER, 1, [Building Xorg server]) + AC_DEFINE(XFree86Server, 1, [Building XFree86 server]) + AC_DEFINE(XFree86LOADER, 1, [Building loadable XFree86 server]) + AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version]) + AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs]) + AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions]) + AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server]) + AC_DEFINE(WITH_VGAHW, 1, [Building vgahw module]) + AC_DEFINE(DRIVERS, {}, [Built-in output drivers (none)]) + AC_DEFINE(IDRIVERS, {}, [Built-in input drivers (none)]) + AC_DEFINE_DIR(__XCONFIGFILE__, XF86CONFIGFILE, [Name of configuration file]) + AC_DEFINE_DIR(XF86CONFIGFILE, XF86CONFIGFILE, [Name of configuration file]) + AC_DEFINE_DIR(DEFAULT_MODULE_PATH, moduledir, [Default module search path]) + AC_DEFINE_DIR(DEFAULT_LIBRARY_PATH, libdir, [Default library install path]) + AC_DEFINE_DIR(DEFAULT_LOGPREFIX, LOGPREFIX, [Default log location]) + AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support]) + + driverdir="$moduledir/drivers" + AC_SUBST([moduledir]) + AC_SUBST([driverdir]) + sdkdir="$includedir/xorg" + extdir="$includedir/X11/extensions" + AC_SUBST([sdkdir]) + AC_SUBST([extdir]) + AC_SUBST([logdir]) +fi +AM_CONDITIONAL([XORG], [test "x$XORG" = xyes]) +AM_CONDITIONAL([XORG_BUS_LINUXPCI], [test "x$xorg_bus_linuxpci" = xyes]) +AM_CONDITIONAL([XORG_BUS_FREEBSDPCI], [test "x$xorg_bus_freebsdpci" = xyes]) +AM_CONDITIONAL([XORG_BUS_NETBSDPCI], [test "x$xorg_bus_netbsdpci" = xyes]) +AM_CONDITIONAL([XORG_BUS_IX86PCI], [test "x$xorg_bus_ix86pci" = xyes]) +AM_CONDITIONAL([XORG_BUS_PPCPCI], [test "x$xorg_bus_ppcpci" = xyes]) +AM_CONDITIONAL([XORG_BUS_SPARCPCI], [test "x$xorg_bus_sparcpci" = xyes]) +AM_CONDITIONAL([XORG_BUS_SPARC], [test "x$xorg_bus_sparc" = xyes]) +AM_CONDITIONAL([XORG_LOADER_SPARC], [test "x$xorg_loader_sparcmuldiv" = xyes]) +AM_CONDITIONAL([LINUX_IA64], [test "x$linux_ia64" = xyes]) +AM_CONDITIONAL([LINUX_ALPHA], [test "x$linux_alpha" = xyes]) +AM_CONDITIONAL([LNXACPI], [test "x$linux_acpi" = xyes]) +AM_CONDITIONAL([SOLARIS_USL_CONSOLE], [test "x$solaris_usl_console" = xyes]) +AM_CONDITIONAL([SOLARIS_ASM_INLINE], [test "x$solaris_asm_inline" = xyes]) +AM_CONDITIONAL([BUILD_DARWIN],[test "X$build_darwin" = Xyes]) +AM_CONDITIONAL([XQUARTZ],[test "X$XQUARTZ" = Xyes]) +AM_CONDITIONAL(DGA, [test "x$DGA" = xyes]) + +dnl legacy fb support +test "x$MFB" = xauto && MFB="$XORG" +test "x$CFB" = xauto && CFB="$XORG" +test "x$AFB" = xauto && AFB="$XORG" +AM_CONDITIONAL(MFB, [test "x$MFB" = xyes]) +AM_CONDITIONAL(CFB, [test "x$CFB" = xyes]) +AM_CONDITIONAL(AFB, [test "x$AFB" = xyes]) +if test "x$MFB" = xyes -o "x$CFB" = xyes -o "x$AFB" = xyes; then + if test "x$XORG" != xyes; then + AC_MSG_ERROR([legacy fb support requires the Xorg server]) + fi +fi + +dnl Xprint DDX + +AC_MSG_CHECKING([whether to build Xprint DDX]) +AC_MSG_RESULT([$XPRINT]) + +if test "x$XPRINT" = xyes; then + PKG_CHECK_MODULES([XPRINT], [printproto x11 xfont $XDMCP_MODULES xau $PIXMAN]) + XPRINT_EXTENSIONS="$XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS" + XPRINT_LIBS="$DIX_LIB $XKB_LIB $XKB_STUB_LIB $XPRINT_EXTENSIONS $MI_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB $OS_LIB $LIBS $XPRINT_LIBS" + AC_SUBST([XPRINT_CFLAGS]) + AC_SUBST([XPRINT_LIBS]) + + xpconfigdir=$libdir/X11/xserver + AC_SUBST([xpconfigdir]) + + AC_PATH_PROG(MKFONTSCALE, mkfontscale) + AC_PATH_PROG(MKFONTDIR, mkfontdir) + + # freetype support code borrowed from lib/XFont + if test x$XP_USE_FREETYPE = xyes; then + AC_DEFINE(XP_USE_FREETYPE,1,[Support FreeType rasterizer in Xprint for nearly all font file formats]) + + if test "$freetype_config" = "auto" ; then + PKG_CHECK_MODULES(FREETYPE, freetype2, + freetype_config=no, freetype_config=yes) + fi + + if test "$freetype_config" = "yes"; then + AC_PATH_PROG(ft_config,freetype-config,no) + if test "$ft_config" = "no"; then + AC_MSG_ERROR([You must have freetype installed; see http://www.freetype.org/]) + fi + else + ft_config="$freetype_config" + fi + + if test "$freetype_config" != "no"; then + FREETYPE_CFLAGS="`$ft_config --cflags`" + FREETYPE_LIBS="`$ft_config --libs`" + fi + FREETYPE_REQUIRES="freetype2" + else + FREETYPE_CFLAGS="" + FREETYPE_LIBS="" + FREETYPE_REQUIRES="" + fi + AC_SUBST(FREETYPE_LIBS) + AC_SUBST(FREETYPE_CFLAGS) + AC_SUBST(FREETYPE_REQUIRES) + # end freetype support +fi +AM_CONDITIONAL(XP_USE_FREETYPE, [test "x$XPRINT" = xyes && test "x$XP_USE_FREETYPE" = xyes]) + + +dnl XWin DDX + +AC_MSG_CHECKING([whether to build XWin DDX]) +if test "x$XWIN" = xauto; then + case $host_os in + cygwin*) XWIN="yes" ;; + mingw*) XWIN="yes" ;; + *) XWIN="no" ;; + esac + XWIN_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $CONFIG_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $LAYER_LIB $XPSTUBS_LIB $OS_LIB $SHADOW_LIB" + AC_SUBST([XWIN_LIBS]) +fi +AC_MSG_RESULT([$XWIN]) + +if test "x$XWIN" = xyes; then + XWIN_SERVER_NAME=XWin + case $host_os in + cygwin*) + PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau xfont]) + AC_DEFINE(HAS_DEVWINDOWS,1,[Cygwin has /dev/windows for signaling new win32 messages]) + AC_DEFINE(ROOTLESS,1,[Build Rootless code]) + CFLAGS="$CFLAGS -DFD_SETSIZE=256" + ;; + mingw*) + PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau xfont]) + XWIN_SERVER_NAME=Xming + AC_DEFINE(RELOCATE_PROJECTROOT,1,[Make PROJECT_ROOT relative to the xserver location]) + AC_DEFINE(HAS_WINSOCK,1,[Use Windows sockets]) + XWIN_SYSTEM_LIBS=-lwinsock2 + ;; + esac + AC_SUBST(XWIN_SERVER_NAME) + AC_SUBST(XWIN_SYSTEM_LIBS) + + if test "x$DEBUGGING" = xyes; then + AC_DEFINE(CYGDEBUG, 1, [Simple debug messages]) + AC_DEFINE(CYGWINDOWING_DEBUG, 1, [Debug messages for window handling]) + AC_DEFINE(CYGMULTIWINDOW_DEBUG, 1, [Debug window manager]) + fi + + AC_DEFINE(DDXOSINIT, 1, [Use OsVendorInit]) + AC_DEFINE(DDXTIME, 1, [Use GetTimeInMillis]) + AC_DEFINE(DDXOSFATALERROR, 1, [Use OsVendorFatalError]) + AC_DEFINE(DDXOSVERRORF, 1, [Use OsVendorVErrorF]) + AC_DEFINE(DDXBEFORERESET, 1, [Use ddxBeforeReset ]) + if test "x$XF86VIDMODE" = xyes; then + AC_MSG_NOTICE([Disabling XF86VidMode extension]) + XF86VIDMODE=no + fi + if test "x$XF86MISC" = xyes; then + AC_MSG_NOTICE([Disabling XF86Misc extension]) + XF86MISC=no + fi + if test "x$COMPOSITE" = xyes; then + AC_MSG_NOTICE([Disabling Composite extension]) + COMPOSITE=no + fi +fi +AM_CONDITIONAL(XWIN, [test "x$XWIN" = xyes]) +AM_CONDITIONAL(XWIN_MULTIWINDOW, [test "x$XWIN" = xyes]) +AM_CONDITIONAL(XWIN_MULTIWINDOWEXTWM, [test "x$XWIN" = xyes && false]) +AM_CONDITIONAL(XWIN_CLIPBOARD, [test "x$XWIN" = xyes]) +AM_CONDITIONAL(XWIN_GLX_WINDOWS, [test "x$XWIN" = xyes && false]) +AM_CONDITIONAL(XWIN_NATIVEGDI, [test "x$XWIN" = xyes && false]) +AM_CONDITIONAL(XWIN_PRIMARYFB, [test "x$XWIN" = xyes && false]) +AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes]) +AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes]) + +dnl Darwin / OS X DDX +AM_CONDITIONAL(HAVE_X_PLUGIN, [test "x$ac_cv_lib_Xplugin_xp_init" = xyes]) +AM_CONDITIONAL(HAVE_AGL_FRAMEWORK, [test "x$xorg_cv_AGL_framework" = xyes]) +# Support for objc in autotools is minimal and not +# documented. +OBJC='$(CC)' +OBJCLD='$(CCLD)' +OBJCLINK='$(LINK)' +OBJCFLAGS='$(CFLAGS)' +AC_SUBST([OBJC]) +AC_SUBST([OBJCCLD]) +AC_SUBST([OBJCLINK]) +AC_SUBST([OBJCFLAGS]) +# internal, undocumented automake func follows :( +_AM_DEPENDENCIES([OBJC]) + +dnl kdrive DDX + +XEPHYR_LIBS= +XEPHYR_INCS= +XSDL_LIBS= +XSDL_INCS= +XSDL_DIRS= + +AM_CONDITIONAL(KDRIVE, [test x$KDRIVE = xyes]) +if test "$KDRIVE" = yes; then + AC_DEFINE(KDRIVESERVER,1,[Build Kdrive X server]) + AC_DEFINE(KDRIVEDDXACTIONS,,[Build kdrive ddx]) + + AC_CHECK_HEADERS([sys/vm86.h sys/io.h]) + if test "$ac_cv_header_sys_vm86_h" = yes && test "x$KDRIVEVESA" = xauto; then + KDRIVEVESA=yes + fi + + if test "x$KDRIVEVESA" = xyes; then + KDRIVEFBDEVLIB=yes + AC_DEFINE(KDRIVEVESA, 1, [Build VESA-based kdrive servers]) + fi + + AC_CHECK_HEADERS([linux/fb.h]) + if test "$ac_cv_header_linux_fb_h" = yes && test "x$XFBDEV" = xauto; then + XFBDEV=yes + fi + + if test "x$XFBDEV" = xyes; then + KDRIVEFBDEVLIB=yes + AC_DEFINE(KDRIVEFBDEV, 1, [Build fbdev-based kdrive server]) + fi + + # tslib... + AC_CHECK_LIB(ts, ts_open, [HAVE_TSLIB="yes"]) + if test "x$TSLIB" = xauto && test "x$HAVE_TSLIB" = xyes; then + TSLIB=yes + fi + + if test "x$TSLIB" = xyes; then + if ! test "x$HAVE_TSLIB" = xyes; then + AC_MSG_ERROR([tslib must be installed to build the tslib input driver.]) + fi + TSLIB_LIBS="-lts" + AC_DEFINE(TSLIB, 1, [Have tslib support]) + fi + + AC_CHECK_HEADERS([SDL/SDL.h]) + if test x"$ac_cv_header_SDL_SDL_h" = xyes && test "x$XSDL" = xauto; then + XSDL=yes + fi + + if test x"$XSDL" = xyes; then + # PKG_CHECK_MODULES(XSDL_EXTRA, Xfont xau $XDMCP_MODULES) + AC_DEFINE(XSDLSERVER,1,[Build Xsdl server]) + XSDL_LIBS="`sdl-config --libs` $XSERVER_LIBS" + XSDL_INCS="`sdl-config --cflags` $XSERVER_CFLAGS" + fi + + PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"]) + if test "x$XEPHYR" = xauto; then + XEPHYR=$xephyr + fi + + # Xephyr needs nanosleep() which is in librt on Solaris + AC_CHECK_FUNC([nanosleep], [], + AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt")) + + if test "x$TSLIB" = xyes; then + PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"]) + if test "x$HAVE_TSLIB" = xno; then + AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/]) + fi + AC_DEFINE(TSLIB, 1, [Have tslib support]) + fi + + # damage shadow extension glx (NOTYET) fb mi + KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src' + KDRIVE_PURE_INCS="$KDRIVE_INC $MIEXT_DAMAGE_INC $MIEXT_SHADOW_INC $XEXT_INC $FB_INC $MI_INC" + KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux' + KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC" + + KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS" + + KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB" + KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a' + case $host_os in + *linux*) + KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a' + KDRIVELINUX=yes + ;; + esac + KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a' + KDRIVE_LOCAL_LIBS="$DIX_LIB $CONFIG_LIB $KDRIVE_LIB $TSLIB_LIBS $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB" + KDRIVE_LIBS="$XSERVERLIBS_LIBS $KDRIVE_LOCAL_LIBS" + + # check if we can build Xephyr + PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"]) + + AC_SUBST([XEPHYR_LIBS]) + AC_SUBST([XEPHYR_INCS]) + AC_SUBST([XSDL_LIBS]) + AC_SUBST([XSDL_INCS]) +fi +AC_SUBST([KDRIVE_INCS]) +AC_SUBST([KDRIVE_PURE_INCS]) +AC_SUBST([KDRIVE_CFLAGS]) +AC_SUBST([KDRIVE_PURE_LIBS]) +AC_SUBST([KDRIVE_LOCAL_LIBS]) +AC_SUBST([KDRIVE_LIBS]) +AM_CONDITIONAL(KDRIVELINUX, [test "x$KDRIVELINUX" = xyes]) +AM_CONDITIONAL(TSLIB, [test "x$HAVE_TSLIB" = xyes]) +AM_CONDITIONAL(H3600_TS, false) +AM_CONDITIONAL(KDRIVEVESA, [test "x$KDRIVEVESA" = xyes]) +AM_CONDITIONAL(KDRIVEFBDEV, [test "x$XFBDEV" = xyes]) +AM_CONDITIONAL(XSDLSERVER, [test x"$XSDL" = xyes]) +AM_CONDITIONAL(XEPHYR, [test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes]) +AM_CONDITIONAL(BUILD_KDRIVEFBDEVLIB, [test "x$KDRIVE" = xyes && test "x$KDRIVEFBDEVLIB" = xyes]) +AM_CONDITIONAL(XFAKESERVER, [test "x$KDRIVE" = xyes && test "x$XFAKE" = xyes]) + +dnl these only go in xkb-config.h (which is shared by the Xorg and Xnest servers) +AC_DEFINE(__XKBDEFRULES__, "xorg", [Default XKB rules]) +AC_DEFINE_DIR(XKB_BASE_DIRECTORY, XKBPATH, [Path to XKB data]) +AC_DEFINE_DIR(XKB_BIN_DIRECTORY, bindir, [Path to XKB bin dir]) + +# Make sure XKM_OUTPUT_DIR is an absolute path +XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1` + +if [[ x$XKBOUTPUT_FIRSTCHAR != x/ ]] ; then + XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT" +fi + +# XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed +# XKB_COMPILED_DIR (used in Makefiles) must not or install-sh gets confused + +XKBOUTPUT=`echo $XKBOUTPUT/ | sed 's|/*$|/|'` +XKB_COMPILED_DIR=`echo $XKBOUTPUT | sed 's|/*$||'` + +AC_DEFINE_DIR(XKM_OUTPUT_DIR, XKBOUTPUT, [Path to XKB output dir]) + +AC_SUBST(XKB_COMPILED_DIR) + +dnl and the rest of these are generic, so they're in config.h +AC_DEFINE(XResExtension, 1, [Build XRes extension]) + +AC_TRY_COMPILE([ +#include +#ifndef __GLIBC__ +#error not glibc +#endif +], [], [AC_DEFINE(_GNU_SOURCE, 1, + [ Enable GNU and other extensions to the C environment for glibc])]) + +AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix]) + +dnl xorgconfig CLI configuration utility +if test "x$XORG" = xyes; then + PKG_CHECK_MODULES([XORGCONFIG_DEP], [xkbfile x11]) + AC_SUBST(XORGCONFIG_DEP_CFLAGS) + AC_SUBST(XORGCONFIG_DEP_LIBS) +fi + +dnl xorgcfg GUI configuration utility +AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg], + [Build xorgcfg GUI configuration utility (default: no)]), + [XORGCFG=$enableval],[XORGCFG=no]) +if test x$XORGCFG = xyes ; then + PKG_CHECK_MODULES([XORGCFG_DEP], + [xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11]) + XORGCFG_DEP_CFLAGS="$XORGCFG_DEP_CFLAGS $PIXMAN_CFLAGS" + AC_CHECK_LIB([curses],[waddstr], + [XORGCFG_DEP_LIBS="$XORGCFG_DEP_LIBS -lcurses"; CURSES=yes], + AC_CHECK_LIB([ncurses],[waddstr], + [XORGCFG_DEP_LIBS="$XORGCFG_DEP_LIBS -lncurses" ; CURSES=yes], + [CURSES=no])) + AC_SUBST(XORGCFG_DEP_CFLAGS) + AC_SUBST(XORGCFG_DEP_LIBS) + + APPDEFAULTDIR=$(pkg-config --variable=appdefaultdir xt) + AC_SUBST(APPDEFAULTDIR) +fi +AM_CONDITIONAL(BUILD_XORGCFG, [test x$XORGCFG = xyes]) +AM_CONDITIONAL(USE_CURSES, [test x$CURSES = xyes]) + +AC_ARG_ENABLE(kbd_mode, AS_HELP_STRING([--enable-kbd_mode], + [Build kbd_mode utility (default: auto)]), + [BUILD_KBD_MODE=$enable_val], [BUILD_KBD_MODE="auto"]) +if test x$BUILD_KBD_MODE != xno ; then + case $host_os in + *bsd*) + KBD_MODE_TYPE="bsd" +# BUILD_KBD_MODE="yes" # need to test on BSD before enabling + # by default + ;; + solaris*) + KBD_MODE_TYPE="sun" + BUILD_KBD_MODE="yes" # enabled by default + ;; + *) + BUILD_KBD_MODE="no" # disabled by default + ;; + esac +fi +AM_CONDITIONAL(BUILD_KBD_MODE, [test x$BUILD_KBD_MODE = xyes]) +AM_CONDITIONAL(BSD_KBD_MODE, [test x$KBD_MODE_TYPE = xbsd]) +AM_CONDITIONAL(SUN_KBD_MODE, [test x$KBD_MODE_TYPE = xsun]) + +BUILD_DATE="$(date +'%Y%m%d')" +AC_SUBST([BUILD_DATE]) +BUILD_TIME="$(date +'1%H%M%S')" +AC_SUBST([BUILD_TIME]) + +DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS" + +AC_SUBST([DIX_CFLAGS]) + +AC_SUBST([libdir exec_prefix prefix]) + +# Man page sections - used in config utils & generating man pages +XORG_MANPAGE_SECTIONS + +AC_OUTPUT([ +Makefile +GL/Makefile +GL/apple/Makefile +GL/glx/Makefile +GL/mesa/Makefile +GL/mesa/glapi/Makefile +GL/mesa/main/Makefile +GL/mesa/math/Makefile +GL/mesa/shader/Makefile +GL/mesa/shader/grammar/Makefile +GL/mesa/shader/slang/Makefile +GL/mesa/swrast/Makefile +GL/mesa/swrast_setup/Makefile +GL/mesa/tnl/Makefile +GL/mesa/vbo/Makefile +GL/mesa/X/Makefile +include/Makefile +afb/Makefile +composite/Makefile +damageext/Makefile +dbe/Makefile +dix/Makefile +doc/Makefile +fb/Makefile +record/Makefile +XTrap/Makefile +mfb/Makefile +cfb/Makefile +cfb32/Makefile +config/Makefile +mi/Makefile +miext/Makefile +miext/damage/Makefile +miext/shadow/Makefile +miext/cw/Makefile +miext/rootless/Makefile +miext/rootless/safeAlpha/Makefile +miext/rootless/accel/Makefile +os/Makefile +randr/Makefile +render/Makefile +xkb/Makefile +Xext/Makefile +Xi/Makefile +xfixes/Makefile +exa/Makefile +hw/Makefile +hw/xfree86/Makefile +hw/xfree86/common/Makefile +hw/xfree86/common/xf86Build.h +hw/xfree86/ddc/Makefile +hw/xfree86/dixmods/Makefile +hw/xfree86/dixmods/extmod/Makefile +hw/xfree86/doc/Makefile +hw/xfree86/doc/devel/Makefile +hw/xfree86/doc/man/Makefile +hw/xfree86/doc/sgml/Makefile +hw/xfree86/dri/Makefile +hw/xfree86/dummylib/Makefile +hw/xfree86/exa/Makefile +hw/xfree86/fbdevhw/Makefile +hw/xfree86/i2c/Makefile +hw/xfree86/int10/Makefile +hw/xfree86/loader/Makefile +hw/xfree86/modes/Makefile +hw/xfree86/os-support/Makefile +hw/xfree86/os-support/bsd/Makefile +hw/xfree86/os-support/bus/Makefile +hw/xfree86/os-support/hurd/Makefile +hw/xfree86/os-support/misc/Makefile +hw/xfree86/os-support/linux/Makefile +hw/xfree86/os-support/lynxos/Makefile +hw/xfree86/os-support/sco/Makefile +hw/xfree86/os-support/solaris/Makefile +hw/xfree86/os-support/sysv/Makefile +hw/xfree86/os-support/usl/Makefile +hw/xfree86/parser/Makefile +hw/xfree86/rac/Makefile +hw/xfree86/ramdac/Makefile +hw/xfree86/scanpci/Makefile +hw/xfree86/shadowfb/Makefile +hw/xfree86/vbe/Makefile +hw/xfree86/vgahw/Makefile +hw/xfree86/x86emu/Makefile +hw/xfree86/xaa/Makefile +hw/xfree86/xf1bpp/Makefile +hw/xfree86/xf4bpp/Makefile +hw/xfree86/xf8_16bpp/Makefile +hw/xfree86/xf8_32bpp/Makefile +hw/xfree86/utils/Makefile +hw/xfree86/utils/cvt/Makefile +hw/xfree86/utils/gtf/Makefile +hw/xfree86/utils/ioport/Makefile +hw/xfree86/utils/kbd_mode/Makefile +hw/xfree86/utils/pcitweak/Makefile +hw/xfree86/utils/scanpci/Makefile +hw/xfree86/utils/xorgcfg/Makefile +hw/xfree86/utils/xorgconfig/Makefile +hw/dmx/config/Makefile +hw/dmx/doc/Makefile +hw/dmx/examples/Makefile +hw/dmx/input/Makefile +hw/dmx/glxProxy/Makefile +hw/dmx/Makefile +hw/vfb/Makefile +hw/xgl/Makefile +hw/xgl/egl/Makefile +hw/xgl/egl/module/Makefile +hw/xgl/glx/Makefile +hw/xgl/glx/module/Makefile +hw/xgl/glxext/Makefile +hw/xgl/glxext/module/Makefile +hw/xnest/Makefile +hw/xwin/Makefile +hw/darwin/Makefile +hw/darwin/bundle/Makefile +hw/darwin/bundle/Dutch.lproj/Makefile +hw/darwin/bundle/English.lproj/Makefile +hw/darwin/bundle/French.lproj/Makefile +hw/darwin/bundle/German.lproj/Makefile +hw/darwin/bundle/Japanese.lproj/Makefile +hw/darwin/bundle/Portuguese.lproj/Makefile +hw/darwin/bundle/Spanish.lproj/Makefile +hw/darwin/bundle/Swedish.lproj/Makefile +hw/darwin/bundle/ko.lproj/Makefile +hw/darwin/iokit/Makefile +hw/darwin/quartz/Makefile +hw/darwin/utils/Makefile +hw/kdrive/Makefile +hw/kdrive/ati/Makefile +hw/kdrive/chips/Makefile +hw/kdrive/ephyr/Makefile +hw/kdrive/epson/Makefile +hw/kdrive/fake/Makefile +hw/kdrive/fbdev/Makefile +hw/kdrive/i810/Makefile +hw/kdrive/linux/Makefile +hw/kdrive/mach64/Makefile +hw/kdrive/mga/Makefile +hw/kdrive/neomagic/Makefile +hw/kdrive/nvidia/Makefile +hw/kdrive/pm2/Makefile +hw/kdrive/r128/Makefile +hw/kdrive/sdl/Makefile +hw/kdrive/sis300/Makefile +hw/kdrive/smi/Makefile +hw/kdrive/src/Makefile +hw/kdrive/vesa/Makefile +hw/kdrive/via/Makefile +hw/xprint/Makefile +hw/xprint/doc/Makefile +hw/xprint/pcl/Makefile +hw/xprint/pcl-mono/Makefile +hw/xprint/raster/Makefile +hw/xprint/ps/Makefile +hw/xprint/etc/Makefile +hw/xprint/etc/Xsession.d/Makefile +hw/xprint/etc/init.d/Makefile +hw/xprint/etc/profile.d/Makefile +hw/xprint/config/Makefile +hw/xprint/config/C/print/attributes/Makefile +hw/xprint/config/C/print/ddx-config/Makefile +hw/xprint/config/C/print/ddx-config/raster/Makefile +hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile +hw/xprint/config/C/print/models/PSdefault/fonts/Makefile +hw/xprint/config/C/print/models/PSdefault/Makefile +hw/xprint/config/C/print/models/PSspooldir/Makefile +hw/xprint/config/C/print/models/SPSPARC2/Makefile +hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile +hw/xprint/config/C/print/models/GSdefault/Makefile +hw/xprint/config/C/print/models/HPLJ4050-PS/Makefile +hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile +hw/xprint/config/C/print/models/Makefile +hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile +hw/xprint/config/C/print/models/CANONC3200-PS/Makefile +hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile +hw/xprint/config/C/print/models/HPLJ4family/fonts/Makefile +hw/xprint/config/C/print/models/HPLJ4family/Makefile +hw/xprint/config/C/print/models/HPDJ1600C/Makefile +hw/xprint/config/C/print/models/HPDJ1600C/fonts/Makefile +hw/xprint/config/C/print/Makefile +hw/xprint/config/C/Makefile +hw/xprint/config/en_US/print/attributes/Makefile +hw/xprint/config/en_US/print/Makefile +hw/xprint/config/en_US/Makefile +xorg-server.pc +]) diff --git a/xorg-server-1.4/cpprules.in b/xorg-server-1.4/cpprules.in new file mode 100644 index 0000000..4901ea8 --- /dev/null +++ b/xorg-server-1.4/cpprules.in @@ -0,0 +1,46 @@ +# -*- Makefile -*- +# Rules for generating files using the C pre-processor +# (Replaces CppFileTarget from Imake) + +SED = sed + +SUFFIXES = .pre .man .man.pre + +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. + +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e '/\@\@$$/s/\@\@$$/\\/' + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ + XORGMANNAME = X Version 11 + XSERVERNAME = Xorg + +MANDEFS = \ + -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__appmansuffix__=$(APP_MAN_SUFFIX) \ + -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ + -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ + -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ + -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ + -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ + -D__mandir__=$(mandir) \ + -D__projectroot__=$(prefix) \ + -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ + -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) + +.pre: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ + +.man.pre.man: + $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ diff --git a/xorg-server-1.4/damageext/Makefile.am b/xorg-server-1.4/damageext/Makefile.am new file mode 100644 index 0000000..35f7620 --- /dev/null +++ b/xorg-server-1.4/damageext/Makefile.am @@ -0,0 +1,8 @@ +noinst_LTLIBRARIES = libdamageext.la + +AM_CFLAGS = $(DIX_CFLAGS) + +libdamageext_la_SOURCES = \ + damageext.c \ + damageext.h \ + damageextint.h diff --git a/xorg-server-1.4/damageext/Makefile.in b/xorg-server-1.4/damageext/Makefile.in new file mode 100644 index 0000000..4fa5d76 --- /dev/null +++ b/xorg-server-1.4/damageext/Makefile.in @@ -0,0 +1,623 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = damageext +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libdamageext_la_LIBADD = +am_libdamageext_la_OBJECTS = damageext.lo +libdamageext_la_OBJECTS = $(am_libdamageext_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libdamageext_la_SOURCES) +DIST_SOURCES = $(libdamageext_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libdamageext.la +AM_CFLAGS = $(DIX_CFLAGS) +libdamageext_la_SOURCES = \ + damageext.c \ + damageext.h \ + damageextint.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign damageext/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign damageext/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libdamageext.la: $(libdamageext_la_OBJECTS) $(libdamageext_la_DEPENDENCIES) + $(LINK) $(libdamageext_la_OBJECTS) $(libdamageext_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/damageext.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/damageext/damageext.c b/xorg-server-1.4/damageext/damageext.c new file mode 100755 index 0000000..e1724ec --- /dev/null +++ b/xorg-server-1.4/damageext/damageext.c @@ -0,0 +1,532 @@ +/* + * 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_DIX_CONFIG_H +#include +#endif + +#include "damageextint.h" + +static unsigned char DamageReqCode; +static int DamageEventBase; +static int DamageErrorBase; +static int DamageClientPrivateIndex; +static RESTYPE DamageExtType; +static RESTYPE DamageExtWinType; + +/* Version of the damage extension supported by the server, as opposed to the + * DAMAGE_* defines from damageproto for what version the proto header + * supports. + */ +#define SERVER_DAMAGE_MAJOR 1 +#define SERVER_DAMAGE_MINOR 1 + +#define prScreen screenInfo.screens[0] + +static void +DamageExtNotify (DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes) +{ + ClientPtr pClient = pDamageExt->pClient; + DamageClientPtr pDamageClient = GetDamageClient (pClient); + DrawablePtr pDrawable = pDamageExt->pDrawable; + xDamageNotifyEvent ev; + int i; + + UpdateCurrentTimeIf (); + ev.type = DamageEventBase + XDamageNotify; + ev.level = pDamageExt->level; + ev.sequenceNumber = pClient->sequence; + ev.drawable = pDrawable->id; + ev.damage = pDamageExt->id; + ev.timestamp = currentTime.milliseconds; + ev.geometry.x = pDrawable->x; + ev.geometry.y = pDrawable->y; + ev.geometry.width = pDrawable->width; + ev.geometry.height = pDrawable->height; + if (pBoxes) + { + for (i = 0; i < nBoxes; i++) + { + ev.level = pDamageExt->level; + if (i < nBoxes - 1) + ev.level |= DamageNotifyMore; + ev.area.x = pBoxes[i].x1; + ev.area.y = pBoxes[i].y1; + ev.area.width = pBoxes[i].x2 - pBoxes[i].x1; + ev.area.height = pBoxes[i].y2 - pBoxes[i].y1; + if (!pClient->clientGone) + WriteEventsToClient (pClient, 1, (xEvent *) &ev); + } + } + else + { + ev.area.x = 0; + ev.area.y = 0; + ev.area.width = pDrawable->width; + ev.area.height = pDrawable->height; + if (!pClient->clientGone) + WriteEventsToClient (pClient, 1, (xEvent *) &ev); + } + /* Composite extension marks clients with manual Subwindows as critical */ + if (pDamageClient->critical > 0) + { + SetCriticalOutputPending (); +#ifdef SMART_SCHEDULE + pClient->smart_priority = SMART_MAX_PRIORITY; +#endif + } +} + +static void +DamageExtReport (DamagePtr pDamage, RegionPtr pRegion, void *closure) +{ + DamageExtPtr pDamageExt = closure; + + switch (pDamageExt->level) { + case DamageReportRawRegion: + case DamageReportDeltaRegion: + DamageExtNotify (pDamageExt, REGION_RECTS(pRegion), REGION_NUM_RECTS(pRegion)); + break; + case DamageReportBoundingBox: + DamageExtNotify (pDamageExt, REGION_EXTENTS(prScreen, pRegion), 1); + break; + case DamageReportNonEmpty: + DamageExtNotify (pDamageExt, NullBox, 0); + break; + case DamageReportNone: + break; + } +} + +static void +DamageExtDestroy (DamagePtr pDamage, void *closure) +{ + DamageExtPtr pDamageExt = closure; + + pDamageExt->pDamage = 0; + if (pDamageExt->id) + FreeResource (pDamageExt->id, RT_NONE); +} + +void +DamageExtSetCritical (ClientPtr pClient, Bool critical) +{ + DamageClientPtr pDamageClient = GetDamageClient (pClient); + + if (pDamageClient) + pDamageClient->critical += critical ? 1 : -1; +} + +static int +ProcDamageQueryVersion(ClientPtr client) +{ + DamageClientPtr pDamageClient = GetDamageClient (client); + xDamageQueryVersionReply rep; + register int n; + REQUEST(xDamageQueryVersionReq); + + REQUEST_SIZE_MATCH(xDamageQueryVersionReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + if (stuff->majorVersion < SERVER_DAMAGE_MAJOR) { + rep.majorVersion = stuff->majorVersion; + rep.minorVersion = stuff->minorVersion; + } else { + rep.majorVersion = SERVER_DAMAGE_MAJOR; + if (stuff->majorVersion == SERVER_DAMAGE_MAJOR && + stuff->minorVersion < SERVER_DAMAGE_MINOR) + rep.minorVersion = stuff->minorVersion; + else + rep.minorVersion = SERVER_DAMAGE_MINOR; + } + pDamageClient->major_version = rep.majorVersion; + pDamageClient->minor_version = rep.minorVersion; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swapl(&rep.majorVersion, n); + swapl(&rep.minorVersion, n); + } + WriteToClient(client, sizeof(xDamageQueryVersionReply), (char *)&rep); + return(client->noClientException); +} + +static int +ProcDamageCreate (ClientPtr client) +{ + DrawablePtr pDrawable; + DamageExtPtr pDamageExt; + DamageReportLevel level; + RegionPtr pRegion; + int rc; + + REQUEST(xDamageCreateReq); + + REQUEST_SIZE_MATCH(xDamageCreateReq); + LEGAL_NEW_RESOURCE(stuff->damage, client); + rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, + DixReadAccess); + if (rc != Success) + return rc; + + switch (stuff->level) { + case XDamageReportRawRectangles: + level = DamageReportRawRegion; + break; + case XDamageReportDeltaRectangles: + level = DamageReportDeltaRegion; + break; + case XDamageReportBoundingBox: + level = DamageReportBoundingBox; + break; + case XDamageReportNonEmpty: + level = DamageReportNonEmpty; + break; + default: + client->errorValue = stuff->level; + return BadValue; + } + + pDamageExt = xalloc (sizeof (DamageExtRec)); + if (!pDamageExt) + return BadAlloc; + pDamageExt->id = stuff->damage; + pDamageExt->pDrawable = pDrawable; + pDamageExt->level = level; + pDamageExt->pClient = client; + pDamageExt->pDamage = DamageCreate (DamageExtReport, + DamageExtDestroy, + level, + FALSE, + pDrawable->pScreen, + pDamageExt); + if (!pDamageExt->pDamage) + { + xfree (pDamageExt); + return BadAlloc; + } + if (!AddResource (stuff->damage, DamageExtType, (pointer) pDamageExt)) + return BadAlloc; + + DamageRegister (pDamageExt->pDrawable, pDamageExt->pDamage); + + if (pDrawable->type == DRAWABLE_WINDOW) + { + pRegion = &((WindowPtr) pDrawable)->borderClip; + DamageDamageRegion (pDrawable, pRegion); + } + + return (client->noClientException); +} + +static int +ProcDamageDestroy (ClientPtr client) +{ + REQUEST(xDamageDestroyReq); + DamageExtPtr pDamageExt; + + REQUEST_SIZE_MATCH(xDamageDestroyReq); + VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess); + FreeResource (stuff->damage, RT_NONE); + return (client->noClientException); +} + +static int +ProcDamageSubtract (ClientPtr client) +{ + REQUEST(xDamageSubtractReq); + DamageExtPtr pDamageExt; + RegionPtr pRepair; + RegionPtr pParts; + + REQUEST_SIZE_MATCH(xDamageSubtractReq); + VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess); + VERIFY_REGION_OR_NONE(pRepair, stuff->repair, client, DixWriteAccess); + VERIFY_REGION_OR_NONE(pParts, stuff->parts, client, DixWriteAccess); + + if (pDamageExt->level != DamageReportRawRegion) + { + DamagePtr pDamage = pDamageExt->pDamage; + if (pRepair) + { + if (pParts) + REGION_INTERSECT (prScreen, pParts, DamageRegion (pDamage), pRepair); + if (DamageSubtract (pDamage, pRepair)) + DamageExtReport (pDamage, DamageRegion (pDamage), (void *) pDamageExt); + } + else + { + if (pParts) + REGION_COPY (prScreen, pParts, DamageRegion (pDamage)); + DamageEmpty (pDamage); + } + } + return (client->noClientException); +} + +static int +ProcDamageAdd (ClientPtr client) +{ + REQUEST(xDamageAddReq); + DrawablePtr pDrawable; + RegionPtr pRegion; + int rc; + + REQUEST_SIZE_MATCH(xDamageAddReq); + VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess); + rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, + DixReadAccess); + if (rc != Success) + return rc; + + /* The region is relative to the drawable origin, so translate it out to + * screen coordinates like damage expects. + */ + REGION_TRANSLATE(pScreen, pRegion, pDrawable->x, pDrawable->y); + DamageDamageRegion(pDrawable, pRegion); + REGION_TRANSLATE(pScreen, pRegion, -pDrawable->x, -pDrawable->y); + + return (client->noClientException); +} + +/* Major version controls available requests */ +static const int version_requests[] = { + X_DamageQueryVersion, /* before client sends QueryVersion */ + X_DamageAdd, /* Version 1 */ +}; + +#define NUM_VERSION_REQUESTS (sizeof (version_requests) / sizeof (version_requests[0])) + +static int (*ProcDamageVector[XDamageNumberRequests])(ClientPtr) = { +/*************** Version 1 ******************/ + ProcDamageQueryVersion, + ProcDamageCreate, + ProcDamageDestroy, + ProcDamageSubtract, +/*************** Version 1.1 ****************/ + ProcDamageAdd, +}; + + +static int +ProcDamageDispatch (ClientPtr client) +{ + REQUEST(xDamageReq); + DamageClientPtr pDamageClient = GetDamageClient (client); + + if (pDamageClient->major_version >= NUM_VERSION_REQUESTS) + return BadRequest; + if (stuff->damageReqType > version_requests[pDamageClient->major_version]) + return BadRequest; + return (*ProcDamageVector[stuff->damageReqType]) (client); +} + +static int +SProcDamageQueryVersion(ClientPtr client) +{ + register int n; + REQUEST(xDamageQueryVersionReq); + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xDamageQueryVersionReq); + swapl(&stuff->majorVersion, n); + swapl(&stuff->minorVersion, n); + return (*ProcDamageVector[stuff->damageReqType]) (client); +} + +static int +SProcDamageCreate (ClientPtr client) +{ + register int n; + REQUEST(xDamageCreateReq); + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xDamageCreateReq); + swapl (&stuff->damage, n); + swapl (&stuff->drawable, n); + return (*ProcDamageVector[stuff->damageReqType]) (client); +} + +static int +SProcDamageDestroy (ClientPtr client) +{ + register int n; + REQUEST(xDamageDestroyReq); + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xDamageDestroyReq); + swapl (&stuff->damage, n); + return (*ProcDamageVector[stuff->damageReqType]) (client); +} + +static int +SProcDamageSubtract (ClientPtr client) +{ + register int n; + REQUEST(xDamageSubtractReq); + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xDamageSubtractReq); + swapl (&stuff->damage, n); + swapl (&stuff->repair, n); + swapl (&stuff->parts, n); + return (*ProcDamageVector[stuff->damageReqType]) (client); +} + +static int +SProcDamageAdd (ClientPtr client) +{ + register int n; + REQUEST(xDamageAddReq); + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xDamageSubtractReq); + swapl (&stuff->drawable, n); + swapl (&stuff->region, n); + return (*ProcDamageVector[stuff->damageReqType]) (client); +} + +static int (*SProcDamageVector[XDamageNumberRequests])(ClientPtr) = { +/*************** Version 1 ******************/ + SProcDamageQueryVersion, + SProcDamageCreate, + SProcDamageDestroy, + SProcDamageSubtract, +/*************** Version 1.1 ****************/ + SProcDamageAdd, +}; + +static int +SProcDamageDispatch (ClientPtr client) +{ + REQUEST(xDamageReq); + if (stuff->damageReqType >= XDamageNumberRequests) + return BadRequest; + return (*SProcDamageVector[stuff->damageReqType]) (client); +} + +static void +DamageClientCallback (CallbackListPtr *list, + pointer closure, + pointer data) +{ + NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; + ClientPtr pClient = clientinfo->client; + DamageClientPtr pDamageClient = GetDamageClient (pClient); + + pDamageClient->critical = 0; + pDamageClient->major_version = 0; + pDamageClient->minor_version = 0; +} + +/*ARGSUSED*/ +static void +DamageResetProc (ExtensionEntry *extEntry) +{ + DeleteCallback (&ClientStateCallback, DamageClientCallback, 0); +} + +static int +FreeDamageExt (pointer value, XID did) +{ + DamageExtPtr pDamageExt = (DamageExtPtr) value; + + /* + * Get rid of the resource table entry hanging from the window id + */ + pDamageExt->id = 0; + if (WindowDrawable(pDamageExt->pDrawable->type)) + FreeResourceByType (pDamageExt->pDrawable->id, DamageExtWinType, TRUE); + if (pDamageExt->pDamage) + { + DamageUnregister (pDamageExt->pDrawable, pDamageExt->pDamage); + DamageDestroy (pDamageExt->pDamage); + } + xfree (pDamageExt); + return Success; +} + +static int +FreeDamageExtWin (pointer value, XID wid) +{ + DamageExtPtr pDamageExt = (DamageExtPtr) value; + + if (pDamageExt->id) + FreeResource (pDamageExt->id, RT_NONE); + return Success; +} + +static void +SDamageNotifyEvent (xDamageNotifyEvent *from, + xDamageNotifyEvent *to) +{ + to->type = from->type; + cpswaps (from->sequenceNumber, to->sequenceNumber); + cpswapl (from->drawable, to->drawable); + cpswapl (from->damage, to->damage); + cpswaps (from->area.x, to->area.x); + cpswaps (from->area.y, to->area.y); + cpswaps (from->area.width, to->area.width); + cpswaps (from->area.height, to->area.height); + cpswaps (from->geometry.x, to->geometry.x); + cpswaps (from->geometry.y, to->geometry.y); + cpswaps (from->geometry.width, to->geometry.width); + cpswaps (from->geometry.height, to->geometry.height); +} + +void +DamageExtensionInit(void) +{ + ExtensionEntry *extEntry; + int s; + + for (s = 0; s < screenInfo.numScreens; s++) + DamageSetup (screenInfo.screens[s]); + + DamageExtType = CreateNewResourceType (FreeDamageExt); + if (!DamageExtType) + return; + + DamageExtWinType = CreateNewResourceType (FreeDamageExtWin); + if (!DamageExtWinType) + return; + + DamageClientPrivateIndex = AllocateClientPrivateIndex (); + if (!AllocateClientPrivate (DamageClientPrivateIndex, + sizeof (DamageClientRec))) + return; + if (!AddCallback (&ClientStateCallback, DamageClientCallback, 0)) + return; + + if ((extEntry = AddExtension(DAMAGE_NAME, XDamageNumberEvents, + XDamageNumberErrors, + ProcDamageDispatch, SProcDamageDispatch, + DamageResetProc, StandardMinorOpcode)) != 0) + { + DamageReqCode = (unsigned char)extEntry->base; + DamageEventBase = extEntry->eventBase; + DamageErrorBase = extEntry->errorBase; + EventSwapVector[DamageEventBase + XDamageNotify] = + (EventSwapPtr) SDamageNotifyEvent; + } +} diff --git a/xorg-server-1.4/damageext/damageext.h b/xorg-server-1.4/damageext/damageext.h new file mode 100644 index 0000000..642800b --- /dev/null +++ b/xorg-server-1.4/damageext/damageext.h @@ -0,0 +1,33 @@ +/* + * 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_DIX_CONFIG_H +#include +#endif + +#ifndef _DAMAGEEXT_H_ +#define _DAMAGEEXT_H_ + +void +DamageExtensionInit(void); + +#endif /* _DAMAGEEXT_H_ */ diff --git a/xorg-server-1.4/damageext/damageextint.h b/xorg-server-1.4/damageext/damageextint.h new file mode 100644 index 0000000..dfafc93 --- /dev/null +++ b/xorg-server-1.4/damageext/damageextint.h @@ -0,0 +1,72 @@ +/* + * 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_DIX_CONFIG_H +#include +#endif + +#ifndef _DAMAGEEXTINT_H_ +#define _DAMAGEEXTINT_H_ + +#define NEED_EVENTS +#include +#include +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include +#include "windowstr.h" +#include "selection.h" +#include "scrnintstr.h" +#include "damageext.h" +#include "damage.h" +#include "xfixes.h" + +typedef struct _DamageClient { + CARD32 major_version; + CARD32 minor_version; + int critical; +} DamageClientRec, *DamageClientPtr; + +#define GetDamageClient(pClient) ((DamageClientPtr) (pClient)->devPrivates[DamageClientPrivateIndex].ptr) + +typedef struct _DamageExt { + DamagePtr pDamage; + DrawablePtr pDrawable; + DamageReportLevel level; + ClientPtr pClient; + XID id; +} DamageExtRec, *DamageExtPtr; + +#define VERIFY_DAMAGEEXT(pDamageExt, rid, client, mode) { \ + pDamageExt = SecurityLookupIDByType (client, rid, DamageExtType, mode); \ + if (!pDamageExt) { \ + client->errorValue = rid; \ + return DamageErrorBase + BadDamage; \ + } \ +} + +void +DamageExtSetCritical (ClientPtr pClient, Bool critical); + +#endif /* _DAMAGEEXTINT_H_ */ diff --git a/xorg-server-1.4/dbe/Makefile.am b/xorg-server-1.4/dbe/Makefile.am new file mode 100644 index 0000000..043555b --- /dev/null +++ b/xorg-server-1.4/dbe/Makefile.am @@ -0,0 +1,13 @@ +noinst_LTLIBRARIES = libdbe.la + +AM_CFLAGS = $(DIX_CFLAGS) + +if XORG +sdk_HEADERS = dbestruct.h +endif + +libdbe_la_SOURCES = \ + dbe.c \ + midbe.c \ + midbe.h \ + midbestr.h diff --git a/xorg-server-1.4/dbe/Makefile.in b/xorg-server-1.4/dbe/Makefile.in new file mode 100644 index 0000000..8095229 --- /dev/null +++ b/xorg-server-1.4/dbe/Makefile.in @@ -0,0 +1,659 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = dbe +DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libdbe_la_LIBADD = +am_libdbe_la_OBJECTS = dbe.lo midbe.lo +libdbe_la_OBJECTS = $(am_libdbe_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libdbe_la_SOURCES) +DIST_SOURCES = $(libdbe_la_SOURCES) +am__sdk_HEADERS_DIST = dbestruct.h +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(sdkdir)" +sdkHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(sdk_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libdbe.la +AM_CFLAGS = $(DIX_CFLAGS) +@XORG_TRUE@sdk_HEADERS = dbestruct.h +libdbe_la_SOURCES = \ + dbe.c \ + midbe.c \ + midbe.h \ + midbestr.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign dbe/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign dbe/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libdbe.la: $(libdbe_la_OBJECTS) $(libdbe_la_DEPENDENCIES) + $(LINK) $(libdbe_la_OBJECTS) $(libdbe_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbe.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/midbe.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-sdkHEADERS: $(sdk_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(sdkdir)" || $(MKDIR_P) "$(DESTDIR)$(sdkdir)" + @list='$(sdk_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(sdkHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(sdkdir)/$$f'"; \ + $(sdkHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(sdkdir)/$$f"; \ + done + +uninstall-sdkHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(sdk_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(sdkdir)/$$f'"; \ + rm -f "$(DESTDIR)$(sdkdir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(sdkdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-sdkHEADERS + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-sdkHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sdkHEADERS install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-sdkHEADERS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/dbe/dbe.c b/xorg-server-1.4/dbe/dbe.c new file mode 100644 index 0000000..d63620d --- /dev/null +++ b/xorg-server-1.4/dbe/dbe.c @@ -0,0 +1,1927 @@ +/****************************************************************************** + * + * 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. + * + * DIX DBE code + * + *****************************************************************************/ + + +/* INCLUDES */ + +#define NEED_EVENTS +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#if HAVE_STDINT_H +#include +#elif !defined(UINT32_MAX) +#define UINT32_MAX 0xffffffffU +#endif + +#include +#include +#include "scrnintstr.h" +#include "extnsionst.h" +#include "gcstruct.h" +#include "dixstruct.h" +#define NEED_DBE_PROTOCOL +#include "dbestruct.h" +#include "midbe.h" + +/* GLOBALS */ + +/* Per-screen initialization functions [init'ed by DbeRegisterFunction()] */ +static Bool (* DbeInitFunct[MAXSCREENS])(); /* pScreen, pDbeScreenPriv */ + +/* These are static globals copied to DBE's screen private for use by DDX */ +static int dbeScreenPrivIndex; +static int dbeWindowPrivIndex; + +/* These are static globals copied to DBE's screen private for use by DDX */ +static RESTYPE dbeDrawableResType; +static RESTYPE dbeWindowPrivResType; + +/* This global is used by DbeAllocWinPrivPrivIndex() */ +static int winPrivPrivCount = 0; + +/* Used to generate DBE's BadBuffer error. */ +static int dbeErrorBase; + +/* Used by DbeRegisterFunction() to initialize the initialization function + * table only once per server lifetime. + */ +static Bool firstRegistrationPass = TRUE; + + +/****************************************************************************** + * + * DBE DIX Procedure: DbeRegisterFunction + * + * Description: + * + * This function registers the DBE init function for the specified screen. + * + *****************************************************************************/ + +void +DbeRegisterFunction(ScreenPtr pScreen, Bool (*funct) (/* ??? */)) +{ + int i; + + /* Initialize the initialization function table if it has not been + * initialized already. + */ + if (firstRegistrationPass) + { + for (i = 0; i < MAXSCREENS; i++) + { + DbeInitFunct[i] = NULL; + } + + firstRegistrationPass = FALSE; + } + + DbeInitFunct[pScreen->myNum] = funct; + +} /* DbeRegisterFunction() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: DbeAllocWinPriv + * + * Description: + * + * This function was cloned from AllocateWindow() in window.c. + * This function allocates a window priv structure to be associated + * with a double-buffered window. + * + *****************************************************************************/ +static DbeWindowPrivPtr +DbeAllocWinPriv(ScreenPtr pScreen) +{ + DbeWindowPrivPtr pDbeWindowPriv; + DbeScreenPrivPtr pDbeScreenPriv; + register char *ptr; + register DevUnion *ppriv; + register unsigned int *sizes; + register unsigned int size; + register int i; + + pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); + pDbeWindowPriv = (DbeWindowPrivPtr)xalloc(pDbeScreenPriv->totalWinPrivSize); + + if (pDbeWindowPriv) + { + ppriv = (DevUnion *)(pDbeWindowPriv + 1); + pDbeWindowPriv->devPrivates = ppriv; + sizes = pDbeScreenPriv->winPrivPrivSizes; + ptr = (char *)(ppriv + pDbeScreenPriv->winPrivPrivLen); + for (i = pDbeScreenPriv->winPrivPrivLen; --i >= 0; ppriv++, sizes++) + { + if ((size = *sizes)) + { + ppriv->ptr = (pointer)ptr; + ptr += size; + } + else + ppriv->ptr = (pointer)NULL; + } + } + + return(pDbeWindowPriv); + +} /* DbeAllocWinPriv() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: DbeFallbackAllocWinPriv + * + * Description: + * + * This is a fallback function for AllocWinPriv(). + * + *****************************************************************************/ + +#if 0 /* NOT USED */ +static DbeWindowPrivPtr +DbeFallbackAllocWinPriv(pScreen) + ScreenPtr pScreen; +{ + return (NULL); +} /* DbeFallbackAllocWinPriv() */ +#endif + + +/****************************************************************************** + * + * DBE DIX Procedure: DbeAllocWinPrivPrivIndex + * + * Description: + * + * This function was cloned from AllocateWindowPrivateIndex() in window.c. + * This function allocates a new window priv priv index by simply returning + * an incremented private counter. + * + *****************************************************************************/ + +static int +DbeAllocWinPrivPrivIndex(void) +{ + return winPrivPrivCount++; + +} /* DbeAllocWinPrivPrivIndex() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: DbeAllocWinPrivPriv + * + * Description: + * + * This function was cloned from AllocateWindowPrivate() in privates.c. + * This function allocates a private structure to be hung off + * a window private. + * + *****************************************************************************/ + +static Bool +DbeAllocWinPrivPriv(register ScreenPtr pScreen, int index, unsigned int amount) +{ + DbeScreenPrivPtr pDbeScreenPriv; + unsigned int oldamount; + + + pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); + + if (index >= pDbeScreenPriv->winPrivPrivLen) + { + unsigned *nsizes; + nsizes = (unsigned *)xrealloc(pDbeScreenPriv->winPrivPrivSizes, + (index + 1) * sizeof(unsigned)); + if (!nsizes) + { + return(FALSE); + } + + while (pDbeScreenPriv->winPrivPrivLen <= index) + { + nsizes[pDbeScreenPriv->winPrivPrivLen++] = 0; + pDbeScreenPriv->totalWinPrivSize += sizeof(DevUnion); + } + + pDbeScreenPriv->winPrivPrivSizes = nsizes; + } + + oldamount = pDbeScreenPriv->winPrivPrivSizes[index]; + + if (amount > oldamount) + { + pDbeScreenPriv->winPrivPrivSizes[index] = amount; + pDbeScreenPriv->totalWinPrivSize += (amount - oldamount); + } + return(TRUE); + +} /* DbeAllocWinPrivPriv() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: DbeStubScreen + * + * Description: + * + * This is function stubs the function pointers in the given DBE screen + * private and increments the number of stubbed screens. + * + *****************************************************************************/ + +static void +DbeStubScreen(DbeScreenPrivPtr pDbeScreenPriv, int *nStubbedScreens) +{ + /* Stub DIX. */ + pDbeScreenPriv->SetupBackgroundPainter = NULL; + pDbeScreenPriv->AllocWinPriv = NULL; + pDbeScreenPriv->AllocWinPrivPrivIndex = NULL; + pDbeScreenPriv->AllocWinPrivPriv = NULL; + + /* Do not unwrap PositionWindow nor DestroyWindow. If the DDX + * initialization function failed, we assume that it did not wrap + * PositionWindow. Also, DestroyWindow is only wrapped if the DDX + * initialization function succeeded. + */ + + /* Stub DDX. */ + pDbeScreenPriv->GetVisualInfo = NULL; + pDbeScreenPriv->AllocBackBufferName = NULL; + pDbeScreenPriv->SwapBuffers = NULL; + pDbeScreenPriv->BeginIdiom = NULL; + pDbeScreenPriv->EndIdiom = NULL; + pDbeScreenPriv->WinPrivDelete = NULL; + pDbeScreenPriv->ResetProc = NULL; + + (*nStubbedScreens)++; + +} /* DbeStubScreen() */ + + + +/****************************************************************************** + * + * DBE DIX Procedure: ProcDbeGetVersion + * + * Description: + * + * This function is for processing a DbeGetVersion request. + * This request returns the major and minor version numbers of this + * extension. + * + * Return Values: + * + * Success + * + *****************************************************************************/ + +static int +ProcDbeGetVersion(ClientPtr client) +{ + /* REQUEST(xDbeGetVersionReq); */ + xDbeGetVersionReply rep; + register int n; + + + REQUEST_SIZE_MATCH(xDbeGetVersionReq); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.majorVersion = DBE_MAJOR_VERSION; + rep.minorVersion = DBE_MINOR_VERSION; + + if (client->swapped) + { + swaps(&rep.sequenceNumber, n); + } + + WriteToClient(client, sizeof(xDbeGetVersionReply), (char *)&rep); + + return(client->noClientException); + +} /* ProcDbeGetVersion() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: ProcDbeAllocateBackBufferName + * + * Description: + * + * This function is for processing a DbeAllocateBackBufferName request. + * This request allocates a drawable ID used to refer to the back buffer + * of a window. + * + * Return Values: + * + * BadAlloc - server can not allocate resources + * BadIDChoice - id is out of range for client; id is already in use + * BadMatch - window is not an InputOutput window; + * visual of window is not on list returned by + * DBEGetVisualInfo; + * BadValue - invalid swap action is specified + * BadWindow - window is not a valid window + * Success + * + *****************************************************************************/ + +static int +ProcDbeAllocateBackBufferName(ClientPtr client) +{ + REQUEST(xDbeAllocateBackBufferNameReq); + WindowPtr pWin; + DbeScreenPrivPtr pDbeScreenPriv; + DbeWindowPrivPtr pDbeWindowPriv; + XdbeScreenVisualInfo scrVisInfo; + register int i; + Bool visualMatched = FALSE; + xDbeSwapAction swapAction; + VisualID visual; + int status; + + + REQUEST_SIZE_MATCH(xDbeAllocateBackBufferNameReq); + + /* The window must be valid. */ + status = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (status != Success) + return status; + + /* The window must be InputOutput. */ + if (pWin->drawable.class != InputOutput) + { + return(BadMatch); + } + + /* The swap action must be valid. */ + swapAction = stuff->swapAction; /* use local var for performance. */ + if ((swapAction != XdbeUndefined ) && + (swapAction != XdbeBackground) && + (swapAction != XdbeUntouched ) && + (swapAction != XdbeCopied )) + { + return(BadValue); + } + + /* The id must be in range and not already in use. */ + LEGAL_NEW_RESOURCE(stuff->buffer, client); + + /* The visual of the window must be in the list returned by + * GetVisualInfo. + */ + pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW(pWin); + if (!pDbeScreenPriv->GetVisualInfo) + return(BadMatch); /* screen doesn't support double buffering */ + + if (!(*pDbeScreenPriv->GetVisualInfo)(pWin->drawable.pScreen, &scrVisInfo)) + { + /* GetVisualInfo() failed to allocate visual info data. */ + return(BadAlloc); + } + + /* See if the window's visual is on the list. */ + visual = wVisual(pWin); + for (i = 0; (i < scrVisInfo.count) && !visualMatched; i++) + { + if (scrVisInfo.visinfo[i].visual == visual) + { + visualMatched = TRUE; + } + } + + /* Free what was allocated by the GetVisualInfo() call above. */ + xfree(scrVisInfo.visinfo); + + if (!visualMatched) + { + return(BadMatch); + } + + if ((pDbeWindowPriv = DBE_WINDOW_PRIV(pWin)) == NULL) + { + /* There is no buffer associated with the window. + * Allocate a window priv. + */ + + if (!(pDbeWindowPriv = + (*pDbeScreenPriv->AllocWinPriv)(pWin->drawable.pScreen))) + { + return(BadAlloc); + } + + /* Make the window priv a DBE window priv resource. */ + if (!AddResource(stuff->buffer, dbeWindowPrivResType, + (pointer)pDbeWindowPriv)) + { + xfree(pDbeWindowPriv); + return(BadAlloc); + } + + /* Fill out window priv information. */ + pDbeWindowPriv->pWindow = pWin; + pDbeWindowPriv->width = pWin->drawable.width; + pDbeWindowPriv->height = pWin->drawable.height; + pDbeWindowPriv->x = pWin->drawable.x; + pDbeWindowPriv->y = pWin->drawable.y; + pDbeWindowPriv->nBufferIDs = 0; + + /* Set the buffer ID array pointer to the initial (static) array). */ + pDbeWindowPriv->IDs = pDbeWindowPriv->initIDs; + + /* Initialize the buffer ID list. */ + pDbeWindowPriv->maxAvailableIDs = DBE_INIT_MAX_IDS; + pDbeWindowPriv->IDs[0] = stuff->buffer; + for (i = 1; i < DBE_INIT_MAX_IDS; i++) + { + pDbeWindowPriv->IDs[i] = DBE_FREE_ID_ELEMENT; + } + + + /* Actually connect the window priv to the window. */ + pWin->devPrivates[dbeWindowPrivIndex].ptr = (pointer)pDbeWindowPriv; + + } /* if -- There is no buffer associated with the window. */ + + else + { + /* A buffer is already associated with the window. + * Add the new buffer ID to the array, reallocating the array memory + * if necessary. + */ + + /* Determine if there is a free element in the ID array. */ + for (i = 0; i < pDbeWindowPriv->maxAvailableIDs; i++) + { + if (pDbeWindowPriv->IDs[i] == DBE_FREE_ID_ELEMENT) + { + /* There is still room in the ID array. */ + break; + } + } + + if (i == pDbeWindowPriv->maxAvailableIDs) + { + /* No more room in the ID array -- reallocate another array. */ + XID *pIDs; + + + /* Setup an array pointer for the realloc operation below. */ + if (pDbeWindowPriv->maxAvailableIDs == DBE_INIT_MAX_IDS) + { + /* We will malloc a new array. */ + pIDs = NULL; + } + else + { + /* We will realloc a new array. */ + pIDs = pDbeWindowPriv->IDs; + } + + /* malloc/realloc a new array and initialize all elements to 0. */ + pDbeWindowPriv->IDs = (XID *)xrealloc(pIDs, + (pDbeWindowPriv->maxAvailableIDs+DBE_INCR_MAX_IDS)*sizeof(XID)); + if (!pDbeWindowPriv->IDs) + { + return(BadAlloc); + } + memset(&pDbeWindowPriv->IDs[pDbeWindowPriv->nBufferIDs], 0, + (pDbeWindowPriv->maxAvailableIDs + DBE_INCR_MAX_IDS - + pDbeWindowPriv->nBufferIDs) * sizeof(XID)); + + if (pDbeWindowPriv->maxAvailableIDs == DBE_INIT_MAX_IDS) + { + /* We just went from using the initial (static) array to a + * newly allocated array. Copy the IDs from the initial array + * to the new array. + */ + memcpy(pDbeWindowPriv->IDs, pDbeWindowPriv->initIDs, + DBE_INIT_MAX_IDS * sizeof(XID)); + } + + pDbeWindowPriv->maxAvailableIDs += DBE_INCR_MAX_IDS; + } + + /* Finally, record the buffer ID in the array. */ + pDbeWindowPriv->IDs[i] = stuff->buffer; + + /* Associate the new ID with an existing window priv. */ + if (!AddResource(stuff->buffer, dbeWindowPrivResType, + (pointer)pDbeWindowPriv)) + { + pDbeWindowPriv->IDs[i] = DBE_FREE_ID_ELEMENT; + return(BadAlloc); + } + + } /* else -- A buffer is already associated with the window. */ + + + /* Call the DDX routine to allocate the back buffer. */ + status = (*pDbeScreenPriv->AllocBackBufferName)(pWin, stuff->buffer, + stuff->swapAction); + + if ((status != Success) && (pDbeWindowPriv->nBufferIDs == 0)) + { + /* The DDX buffer allocation routine failed for the first buffer of + * this window. + */ + xfree(pDbeWindowPriv); + return(status); + } + + /* Increment the number of buffers (XIDs) associated with this window. */ + pDbeWindowPriv->nBufferIDs++; + + /* Set swap action on all calls. */ + pDbeWindowPriv->swapAction = stuff->swapAction; + + + return(status); + +} /* ProcDbeAllocateBackBufferName() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: ProcDbeDeallocateBackBufferName + * + * Description: + * + * This function is for processing a DbeDeallocateBackBufferName request. + * This request frees a drawable ID that was obtained by a + * DbeAllocateBackBufferName request. + * + * Return Values: + * + * BadBuffer - buffer to deallocate is not associated with a window + * Success + * + *****************************************************************************/ + +static int +ProcDbeDeallocateBackBufferName(ClientPtr client) +{ + REQUEST(xDbeDeallocateBackBufferNameReq); + DbeWindowPrivPtr pDbeWindowPriv; + int i; + + + REQUEST_SIZE_MATCH(xDbeDeallocateBackBufferNameReq); + + /* Buffer name must be valid */ + if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client, + stuff->buffer, dbeWindowPrivResType, DixDestroyAccess)) || + !(SecurityLookupIDByType(client, stuff->buffer, dbeDrawableResType, + DixDestroyAccess))) + { + client->errorValue = stuff->buffer; + return(dbeErrorBase + DbeBadBuffer); + } + + /* Make sure that the id is valid for the window. + * This is paranoid code since we already looked up the ID by type + * above. + */ + + for (i = 0; i < pDbeWindowPriv->nBufferIDs; i++) + { + /* Loop through the ID list to find the ID. */ + if (pDbeWindowPriv->IDs[i] == stuff->buffer) + { + break; + } + } + + if (i == pDbeWindowPriv->nBufferIDs) + { + /* We did not find the ID in the ID list. */ + client->errorValue = stuff->buffer; + return(dbeErrorBase + DbeBadBuffer); + } + + FreeResource(stuff->buffer, RT_NONE); + + return(Success); + +} /* ProcDbeDeallocateBackBufferName() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: ProcDbeSwapBuffers + * + * Description: + * + * This function is for processing a DbeSwapBuffers request. + * This request swaps the buffers for all windows listed, applying the + * appropriate swap action for each window. + * + * Return Values: + * + * BadAlloc - local allocation failed; this return value is not defined + * by the protocol + * BadMatch - a window in request is not double-buffered; a window in + * request is listed more than once + * BadValue - invalid swap action is specified; no swap action is + * specified + * BadWindow - a window in request is not valid + * Success + * + *****************************************************************************/ + +static int +ProcDbeSwapBuffers(ClientPtr client) +{ + REQUEST(xDbeSwapBuffersReq); + WindowPtr pWin; + DbeScreenPrivPtr pDbeScreenPriv; + DbeSwapInfoPtr swapInfo; + xDbeSwapInfo *dbeSwapInfo; + int error; + register int i, j; + int nStuff; + + + REQUEST_AT_LEAST_SIZE(xDbeSwapBuffersReq); + nStuff = stuff->n; /* use local variable for performance. */ + + if (nStuff == 0) + { + return(Success); + } + + if (nStuff > UINT32_MAX / sizeof(DbeSwapInfoRec)) + return BadAlloc; + + /* Get to the swap info appended to the end of the request. */ + dbeSwapInfo = (xDbeSwapInfo *)&stuff[1]; + + /* Allocate array to record swap information. */ + swapInfo = (DbeSwapInfoPtr)Xalloc(nStuff * sizeof(DbeSwapInfoRec)); + if (swapInfo == NULL) + { + return(BadAlloc); + } + + + for (i = 0; i < nStuff; i++) + { + /* Check all windows to swap. */ + + /* Each window must be a valid window - BadWindow. */ + error = dixLookupWindow(&pWin, dbeSwapInfo[i].window, client, + DixWriteAccess); + if (error != Success) { + Xfree(swapInfo); + return error; + } + + /* Each window must be double-buffered - BadMatch. */ + if (DBE_WINDOW_PRIV(pWin) == NULL) + { + Xfree(swapInfo); + return(BadMatch); + } + + /* Each window must only be specified once - BadMatch. */ + for (j = i + 1; j < nStuff; j++) + { + if (dbeSwapInfo[i].window == dbeSwapInfo[j].window) + { + Xfree(swapInfo); + return(BadMatch); + } + } + + /* Each swap action must be valid - BadValue. */ + if ((dbeSwapInfo[i].swapAction != XdbeUndefined ) && + (dbeSwapInfo[i].swapAction != XdbeBackground) && + (dbeSwapInfo[i].swapAction != XdbeUntouched ) && + (dbeSwapInfo[i].swapAction != XdbeCopied )) + { + Xfree(swapInfo); + return(BadValue); + } + + /* Everything checks out OK. Fill in the swap info array. */ + swapInfo[i].pWindow = pWin; + swapInfo[i].swapAction = dbeSwapInfo[i].swapAction; + + } /* for (i = 0; i < nStuff; i++) */ + + + /* Call the DDX routine to perform the swap(s). The DDX routine should + * scan the swap list (swap info), swap any buffers that it knows how to + * handle, delete them from the list, and update nStuff to indicate how + * many windows it did not handle. + * + * This scheme allows a range of sophistication in the DDX SwapBuffers() + * implementation. Naive implementations could just swap the first buffer + * in the list, move the last buffer to the front, decrement nStuff, and + * return. The next level of sophistication could be to scan the whole + * list for windows on the same screen. Up another level, the DDX routine + * could deal with cross-screen synchronization. + */ + + while (nStuff > 0) + { + pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW(swapInfo[0].pWindow); + error = (*pDbeScreenPriv->SwapBuffers)(client, &nStuff, swapInfo); + if (error != Success) + { + Xfree(swapInfo); + return(error); + } + } + + Xfree(swapInfo); + return(Success); + +} /* ProcDbeSwapBuffers() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: ProcDbeBeginIdiom + * + * Description: + * + * This function is for processing a DbeBeginIdiom request. + * This request informs the server that a complex swap will immediately + * follow this request. + * + * Return Values: + * + * Success + * + *****************************************************************************/ + +static int +ProcDbeBeginIdiom(ClientPtr client) +{ + /* REQUEST(xDbeBeginIdiomReq); */ + DbeScreenPrivPtr pDbeScreenPriv; + register int i; + + + REQUEST_SIZE_MATCH(xDbeBeginIdiomReq); + + for (i = 0; i < screenInfo.numScreens; i++) + { + pDbeScreenPriv = DBE_SCREEN_PRIV(screenInfo.screens[i]); + + /* Call the DDX begin idiom procedure if there is one. */ + if (pDbeScreenPriv->BeginIdiom) + { + (*pDbeScreenPriv->BeginIdiom)(client); + } + } + + return(Success); + +} /* ProcDbeBeginIdiom() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: ProcDbeGetVisualInfo + * + * Description: + * + * This function is for processing a ProcDbeGetVisualInfo request. + * This request returns information about which visuals support + * double buffering. + * + * Return Values: + * + * BadDrawable - value in screen specifiers is not a valid drawable + * Success + * + *****************************************************************************/ + +static int +ProcDbeGetVisualInfo(ClientPtr client) +{ + REQUEST(xDbeGetVisualInfoReq); + DbeScreenPrivPtr pDbeScreenPriv; + xDbeGetVisualInfoReply rep; + Drawable *drawables; + DrawablePtr *pDrawables = NULL; + register int i, j, n, rc; + register int count; /* number of visual infos in reply */ + register int length; /* length of reply */ + ScreenPtr pScreen; + XdbeScreenVisualInfo *pScrVisInfo; + + + REQUEST_AT_LEAST_SIZE(xDbeGetVisualInfoReq); + + if (stuff->n > UINT32_MAX / sizeof(DrawablePtr)) + return BadAlloc; + /* Make sure any specified drawables are valid. */ + if (stuff->n != 0) + { + if (!(pDrawables = (DrawablePtr *)Xalloc(stuff->n * + sizeof(DrawablePtr)))) + { + return(BadAlloc); + } + + drawables = (Drawable *)&stuff[1]; + + for (i = 0; i < stuff->n; i++) + { + rc = dixLookupDrawable(pDrawables+i, drawables[i], client, 0, + DixReadAccess); + if (rc != Success) { + Xfree(pDrawables); + return rc; + } + } + } + + count = (stuff->n == 0) ? screenInfo.numScreens : stuff->n; + if (!(pScrVisInfo = (XdbeScreenVisualInfo *)xalloc(count * + sizeof(XdbeScreenVisualInfo)))) + { + if (pDrawables) + { + Xfree(pDrawables); + } + + return(BadAlloc); + } + + length = 0; + + for (i = 0; i < count; i++) + { + pScreen = (stuff->n == 0) ? screenInfo.screens[i] : + pDrawables[i]->pScreen; + pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); + + if (!(*pDbeScreenPriv->GetVisualInfo)(pScreen, &pScrVisInfo[i])) + { + /* We failed to alloc pScrVisInfo[i].visinfo. */ + + /* Free visinfos that we allocated for previous screen infos.*/ + for (j = 0; j < i; j++) + { + xfree(pScrVisInfo[j].visinfo); + } + + /* Free pDrawables if we needed to allocate it above. */ + if (pDrawables) + { + Xfree(pDrawables); + } + + return(BadAlloc); + } + + /* Account for n, number of xDbeVisInfo items in list. */ + length += sizeof(CARD32); + + /* Account for n xDbeVisInfo items */ + length += pScrVisInfo[i].count * sizeof(xDbeVisInfo); + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = length >> 2; + rep.m = count; + + if (client->swapped) + { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swapl(&rep.m, n); + } + + /* Send off reply. */ + WriteToClient(client, sizeof(xDbeGetVisualInfoReply), (char *)&rep); + + for (i = 0; i < count; i++) + { + CARD32 data32; + + /* For each screen in the reply, send off the visual info */ + + /* Send off number of visuals. */ + data32 = (CARD32)pScrVisInfo[i].count; + + if (client->swapped) + { + swapl(&data32, n); + } + + WriteToClient(client, sizeof(CARD32), (char *)&data32); + + /* Now send off visual info items. */ + for (j = 0; j < pScrVisInfo[i].count; j++) + { + xDbeVisInfo visInfo; + + /* Copy the data in the client data structure to a protocol + * data structure. We will send data to the client from the + * protocol data structure. + */ + + visInfo.visualID = (CARD32)pScrVisInfo[i].visinfo[j].visual; + visInfo.depth = (CARD8) pScrVisInfo[i].visinfo[j].depth; + visInfo.perfLevel = (CARD8) pScrVisInfo[i].visinfo[j].perflevel; + + if (client->swapped) + { + swapl(&visInfo.visualID, n); + + /* We do not need to swap depth and perfLevel since they are + * already 1 byte quantities. + */ + } + + /* Write visualID(32), depth(8), perfLevel(8), and pad(16). */ + WriteToClient(client, 2*sizeof(CARD32), (char *)&visInfo.visualID); + } + } + + /* Clean up memory. */ + for (i = 0; i < count; i++) + { + xfree(pScrVisInfo[i].visinfo); + } + xfree(pScrVisInfo); + + if (pDrawables) + { + Xfree(pDrawables); + } + + return(client->noClientException); + +} /* ProcDbeGetVisualInfo() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: ProcDbeGetbackBufferAttributes + * + * Description: + * + * This function is for processing a ProcDbeGetbackBufferAttributes + * request. This request returns information about a back buffer. + * + * Return Values: + * + * Success + * + *****************************************************************************/ + +static int +ProcDbeGetBackBufferAttributes(ClientPtr client) +{ + REQUEST(xDbeGetBackBufferAttributesReq); + xDbeGetBackBufferAttributesReply rep; + DbeWindowPrivPtr pDbeWindowPriv; + int n; + + + REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq); + + if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client, + stuff->buffer, dbeWindowPrivResType, DixReadAccess))) + { + rep.attributes = None; + } + else + { + rep.attributes = pDbeWindowPriv->pWindow->drawable.id; + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + + if (client->swapped) + { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swapl(&rep.attributes, n); + } + + WriteToClient(client, sizeof(xDbeGetBackBufferAttributesReply), + (char *)&rep); + return(client->noClientException); + +} /* ProcDbeGetbackBufferAttributes() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: ProcDbeDispatch + * + * Description: + * + * This function dispatches DBE requests. + * + *****************************************************************************/ + +static int +ProcDbeDispatch(ClientPtr client) +{ + REQUEST(xReq); + + + switch (stuff->data) + { + case X_DbeGetVersion: + return(ProcDbeGetVersion(client)); + + case X_DbeAllocateBackBufferName: + return(ProcDbeAllocateBackBufferName(client)); + + case X_DbeDeallocateBackBufferName: + return(ProcDbeDeallocateBackBufferName(client)); + + case X_DbeSwapBuffers: + return(ProcDbeSwapBuffers(client)); + + case X_DbeBeginIdiom: + return(ProcDbeBeginIdiom(client)); + + case X_DbeEndIdiom: + return(Success); + + case X_DbeGetVisualInfo: + return(ProcDbeGetVisualInfo(client)); + + case X_DbeGetBackBufferAttributes: + return(ProcDbeGetBackBufferAttributes(client)); + + default: + return(BadRequest); + } + +} /* ProcDbeDispatch() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: SProcDbeGetVersion + * + * Description: + * + * This function is for processing a DbeGetVersion request on a swapped + * server. This request returns the major and minor version numbers of + * this extension. + * + * Return Values: + * + * Success + * + *****************************************************************************/ + +static int +SProcDbeGetVersion(ClientPtr client) +{ + REQUEST(xDbeGetVersionReq); + register int n; + + + swaps(&stuff->length, n); + return(ProcDbeGetVersion(client)); + +} /* SProcDbeGetVersion() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: SProcDbeAllocateBackBufferName + * + * Description: + * + * This function is for processing a DbeAllocateBackBufferName request on + * a swapped server. This request allocates a drawable ID used to refer + * to the back buffer of a window. + * + * Return Values: + * + * BadAlloc - server can not allocate resources + * BadIDChoice - id is out of range for client; id is already in use + * BadMatch - window is not an InputOutput window; + * visual of window is not on list returned by + * DBEGetVisualInfo; + * BadValue - invalid swap action is specified + * BadWindow - window is not a valid window + * Success + * + *****************************************************************************/ + +static int +SProcDbeAllocateBackBufferName(ClientPtr client) +{ + REQUEST(xDbeAllocateBackBufferNameReq); + register int n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xDbeAllocateBackBufferNameReq); + + swapl(&stuff->window, n); + swapl(&stuff->buffer, n); + /* stuff->swapAction is a byte. We do not need to swap this field. */ + + return(ProcDbeAllocateBackBufferName(client)); + +} /* SProcDbeAllocateBackBufferName() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: SProcDbeDeallocateBackBufferName + * + * Description: + * + * This function is for processing a DbeDeallocateBackBufferName request + * on a swapped server. This request frees a drawable ID that was + * obtained by a DbeAllocateBackBufferName request. + * + * Return Values: + * + * BadBuffer - buffer to deallocate is not associated with a window + * Success + * + *****************************************************************************/ + +static int +SProcDbeDeallocateBackBufferName(ClientPtr client) +{ + REQUEST (xDbeDeallocateBackBufferNameReq); + register int n; + + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xDbeDeallocateBackBufferNameReq); + + swapl(&stuff->buffer, n); + + return(ProcDbeDeallocateBackBufferName(client)); + +} /* SProcDbeDeallocateBackBufferName() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: SProcDbeSwapBuffers + * + * Description: + * + * This function is for processing a DbeSwapBuffers request on a swapped + * server. This request swaps the buffers for all windows listed, + * applying the appropriate swap action for each window. + * + * Return Values: + * + * BadMatch - a window in request is not double-buffered; a window in + * request is listed more than once; all windows in request do + * not have the same root + * BadValue - invalid swap action is specified + * BadWindow - a window in request is not valid + * Success + * + *****************************************************************************/ + +static int +SProcDbeSwapBuffers(ClientPtr client) +{ + REQUEST(xDbeSwapBuffersReq); + register int i, n; + xDbeSwapInfo *pSwapInfo; + + + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xDbeSwapBuffersReq); + + swapl(&stuff->n, n); + + if (stuff->n != 0) + { + pSwapInfo = (xDbeSwapInfo *)stuff+1; + + /* The swap info following the fix part of this request is a window(32) + * followed by a 1 byte swap action and then 3 pad bytes. We only need + * to swap the window information. + */ + for (i = 0; i < stuff->n; i++) + { + swapl(&pSwapInfo->window, n); + } + } + + return(ProcDbeSwapBuffers(client)); + +} /* SProcDbeSwapBuffers() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: SProcDbeBeginIdiom + * + * Description: + * + * This function is for processing a DbeBeginIdiom request on a swapped + * server. This request informs the server that a complex swap will + * immediately follow this request. + * + * Return Values: + * + * Success + * + *****************************************************************************/ + +static int +SProcDbeBeginIdiom(ClientPtr client) +{ + REQUEST(xDbeBeginIdiomReq); + register int n; + + swaps(&stuff->length, n); + return(ProcDbeBeginIdiom(client)); + +} /* SProcDbeBeginIdiom() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: SProcDbeGetVisualInfo + * + * Description: + * + * This function is for processing a ProcDbeGetVisualInfo request on a + * swapped server. This request returns information about which visuals + * support double buffering. + * + * Return Values: + * + * BadDrawable - value in screen specifiers is not a valid drawable + * Success + * + *****************************************************************************/ + +static int +SProcDbeGetVisualInfo(ClientPtr client) +{ + REQUEST(xDbeGetVisualInfoReq); + register int n; + + + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xDbeGetVisualInfoReq); + + swapl(&stuff->n, n); + SwapRestL(stuff); + + return(ProcDbeGetVisualInfo(client)); + +} /* SProcDbeGetVisualInfo() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: SProcDbeGetbackBufferAttributes + * + * Description: + * + * This function is for processing a ProcDbeGetbackBufferAttributes + * request on a swapped server. This request returns information about a + * back buffer. + * + * Return Values: + * + * Success + * + *****************************************************************************/ + +static int +SProcDbeGetBackBufferAttributes(ClientPtr client) +{ + REQUEST (xDbeGetBackBufferAttributesReq); + register int n; + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq); + + swapl(&stuff->buffer, n); + + return(ProcDbeGetBackBufferAttributes(client)); + +} /* SProcDbeGetBackBufferAttributes() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: SProcDbeDispatch + * + * Description: + * + * This function dispatches DBE requests on a swapped server. + * + *****************************************************************************/ + +static int +SProcDbeDispatch(ClientPtr client) +{ + REQUEST(xReq); + + + switch (stuff->data) + { + case X_DbeGetVersion: + return(SProcDbeGetVersion(client)); + + case X_DbeAllocateBackBufferName: + return(SProcDbeAllocateBackBufferName(client)); + + case X_DbeDeallocateBackBufferName: + return(SProcDbeDeallocateBackBufferName(client)); + + case X_DbeSwapBuffers: + return(SProcDbeSwapBuffers(client)); + + case X_DbeBeginIdiom: + return(SProcDbeBeginIdiom(client)); + + case X_DbeEndIdiom: + return(Success); + + case X_DbeGetVisualInfo: + return(SProcDbeGetVisualInfo(client)); + + case X_DbeGetBackBufferAttributes: + return(SProcDbeGetBackBufferAttributes(client)); + + default: + return (BadRequest); + } + +} /* SProcDbeDispatch() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: DbeSetupBackgroundPainter + * + * Description: + * + * This function sets up pGC to clear pixmaps. + * + * Return Values: + * + * TRUE - setup was successful + * FALSE - the window's background state is NONE + * + *****************************************************************************/ + +static Bool +DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC) +{ + pointer 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] = (pointer)background.pixel; + gcvalues[1] = (pointer)FillSolid; + gcmask = GCForeground|GCFillStyle; + break; + + case BackgroundPixmap: + gcvalues[0] = (pointer)FillTiled; + gcvalues[1] = (pointer)background.pixmap; + gcvalues[2] = (pointer)(long)ts_x_origin; + gcvalues[3] = (pointer)(long)ts_y_origin; + gcmask = GCFillStyle|GCTile|GCTileStipXOrigin|GCTileStipYOrigin; + break; + + default: + /* pWin->backgroundState == None */ + return(FALSE); + } + + if (DoChangeGC(pGC, gcmask, (XID *)gcvalues, TRUE) != 0) + { + return(FALSE); + } + + return(TRUE); + +} /* DbeSetupBackgroundPainter() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: DbeDrawableDelete + * + * Description: + * + * This is the resource delete function for dbeDrawableResType. + * It is registered when the drawable resource type is created in + * DbeExtensionInit(). + * + * To make resource deletion simple, we do not do anything in this function + * and leave all resource deleteion to DbeWindowPrivDelete(), which will + * eventually be called or already has been called. Deletion functions are + * not guaranteed to be called in any particular order. + * + *****************************************************************************/ +static int +DbeDrawableDelete(pointer pDrawable, XID id) +{ + return(Success); + +} /* DbeDrawableDelete() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: DbeWindowPrivDelete + * + * Description: + * + * This is the resource delete function for dbeWindowPrivResType. + * It is registered when the drawable resource type is created in + * DbeExtensionInit(). + * + *****************************************************************************/ +static int +DbeWindowPrivDelete(pointer pDbeWinPriv, XID id) +{ + DbeScreenPrivPtr pDbeScreenPriv; + DbeWindowPrivPtr pDbeWindowPriv = (DbeWindowPrivPtr)pDbeWinPriv; + int i; + + + /* + ************************************************************************** + ** Remove the buffer ID from the ID array. + ************************************************************************** + */ + + /* Find the ID in the ID array. */ + i = 0; + while ((i < pDbeWindowPriv->nBufferIDs) && (pDbeWindowPriv->IDs[i] != id)) + { + i++; + } + + if (i == pDbeWindowPriv->nBufferIDs) + { + /* We did not find the ID in the array. We should never get here. */ + return(BadValue); + } + + /* Remove the ID from the array. */ + + if (i < (pDbeWindowPriv->nBufferIDs - 1)) + { + /* Compress the buffer ID array, overwriting the ID in the process. */ + memmove(&pDbeWindowPriv->IDs[i], &pDbeWindowPriv->IDs[i+1], + (pDbeWindowPriv->nBufferIDs - i - 1) * sizeof(XID)); + } + else + { + /* We are removing the last ID in the array, in which case, the + * assignement below is all that we need to do. + */ + } + pDbeWindowPriv->IDs[pDbeWindowPriv->nBufferIDs - 1] = DBE_FREE_ID_ELEMENT; + + pDbeWindowPriv->nBufferIDs--; + + /* If an extended array was allocated, then check to see if the remaining + * buffer IDs will fit in the static array. + */ + + if ((pDbeWindowPriv->maxAvailableIDs > DBE_INIT_MAX_IDS) && + (pDbeWindowPriv->nBufferIDs == DBE_INIT_MAX_IDS)) + { + /* Copy the IDs back into the static array. */ + memcpy(pDbeWindowPriv->initIDs, pDbeWindowPriv->IDs, + DBE_INIT_MAX_IDS * sizeof(XID)); + + /* Free the extended array; use the static array. */ + xfree(pDbeWindowPriv->IDs); + pDbeWindowPriv->IDs = pDbeWindowPriv->initIDs; + pDbeWindowPriv->maxAvailableIDs = DBE_INIT_MAX_IDS; + } + + + /* + ************************************************************************** + ** Perform DDX level tasks. + ************************************************************************** + */ + + pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW_PRIV( + (DbeWindowPrivPtr)pDbeWindowPriv); + (*pDbeScreenPriv->WinPrivDelete)((DbeWindowPrivPtr)pDbeWindowPriv, id); + + + /* + ************************************************************************** + ** Perform miscellaneous tasks if this is the last buffer associated + ** with the window. + ************************************************************************** + */ + + if (pDbeWindowPriv->nBufferIDs == 0) + { + /* Reset the DBE window priv pointer. */ + pDbeWindowPriv->pWindow->devPrivates[dbeWindowPrivIndex].ptr = + (pointer)NULL; + + /* We are done with the window priv. */ + xfree(pDbeWindowPriv); + } + + return(Success); + +} /* DbeWindowPrivDelete() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: DbeResetProc + * + * Description: + * + * This routine is called at the end of every server generation. + * It deallocates any memory reserved for the extension and performs any + * other tasks related to shutting down the extension. + * + *****************************************************************************/ +static void +DbeResetProc(ExtensionEntry *extEntry) +{ + int i; + ScreenPtr pScreen; + DbeScreenPrivPtr pDbeScreenPriv; + + + if (dbeScreenPrivIndex < 0) + { + return; + } + + for (i = 0; i < screenInfo.numScreens; i++) + { + pScreen = screenInfo.screens[i]; + pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); + + if (pDbeScreenPriv) + { + /* Unwrap DestroyWindow, which was wrapped in DbeExtensionInit().*/ + pScreen->DestroyWindow = pDbeScreenPriv->DestroyWindow; + + if (pDbeScreenPriv->ResetProc) + (*pDbeScreenPriv->ResetProc)(pScreen); + + if (pDbeScreenPriv->winPrivPrivSizes) + { + xfree(pDbeScreenPriv->winPrivPrivSizes); + } + + xfree(pDbeScreenPriv); + } + } + + /* We want to init the initialization function table after every server + * reset in DbeRegisterFunction(). + */ + firstRegistrationPass = TRUE; + +} /* DbeResetProc() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: DbeDestroyWindow + * + * Description: + * + * This is the wrapper for pScreen->DestroyWindow. + * This function frees buffer resources for a window before it is + * destroyed. + * + *****************************************************************************/ + +static Bool +DbeDestroyWindow(WindowPtr pWin) +{ + DbeScreenPrivPtr pDbeScreenPriv; + DbeWindowPrivPtr pDbeWindowPriv; + ScreenPtr pScreen; + Bool ret; + + + /* + ************************************************************************** + ** 1. Unwrap the member routine. + ************************************************************************** + */ + + pScreen = pWin->drawable.pScreen; + pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); + pScreen->DestroyWindow = pDbeScreenPriv->DestroyWindow; + + /* + ************************************************************************** + ** 2. Do any work necessary before the member routine is called. + ** + ** Call the window priv delete function for all buffer IDs associated + ** with this window. + ************************************************************************** + */ + + if ((pDbeWindowPriv = DBE_WINDOW_PRIV(pWin))) + { + while (pDbeWindowPriv) + { + /* *DbeWinPrivDelete() will free the window private and set it to + * NULL if there are no more buffer IDs associated with this + * window. + */ + FreeResource(pDbeWindowPriv->IDs[0], RT_NONE); + pDbeWindowPriv = DBE_WINDOW_PRIV(pWin); + } + } + + /* + ************************************************************************** + ** 3. Call the member routine, saving its result if necessary. + ************************************************************************** + */ + + ret = (*pScreen->DestroyWindow)(pWin); + + /* + ************************************************************************** + ** 4. Rewrap the member routine, restoring the wrapper value first in case + ** the wrapper (or something that it wrapped) change this value. + ************************************************************************** + */ + + pDbeScreenPriv->DestroyWindow = pScreen->DestroyWindow; + pScreen->DestroyWindow = DbeDestroyWindow; + + /* + ************************************************************************** + ** 5. Do any work necessary after the member routine has been called. + ** + ** In this case we do not need to do anything. + ************************************************************************** + */ + + return(ret); + +} /* DbeDestroyWindow() */ + + +/****************************************************************************** + * + * DBE DIX Procedure: DbeExtensionInit + * + * Description: + * + * Called from InitExtensions in main() + * + *****************************************************************************/ + +void +DbeExtensionInit(void) +{ + ExtensionEntry *extEntry; + register int i, j; + ScreenPtr pScreen = NULL; + DbeScreenPrivPtr pDbeScreenPriv; + int nStubbedScreens = 0; + Bool ddxInitSuccess; + +#ifdef PANORAMIX + if(!noPanoramiXExtension) return; +#endif + + /* Allocate private pointers in windows and screens. */ + + if ((dbeScreenPrivIndex = AllocateScreenPrivateIndex()) < 0) + { + return; + } + + if ((dbeWindowPrivIndex = AllocateWindowPrivateIndex()) < 0) + { + return; + } + + /* Initialize the priv priv counts between server generations. */ + winPrivPrivCount = 0; + + /* Create the resource types. */ + dbeDrawableResType = + CreateNewResourceType(DbeDrawableDelete) | RC_CACHED | RC_DRAWABLE; + dbeWindowPrivResType = + CreateNewResourceType(DbeWindowPrivDelete); + + for (i = 0; i < screenInfo.numScreens; i++) + { + /* For each screen, set up DBE screen privates and init DIX and DDX + * interface. + */ + + pScreen = screenInfo.screens[i]; + + if (!AllocateWindowPrivate(pScreen, dbeWindowPrivIndex, 0) || + !(pDbeScreenPriv = + (DbeScreenPrivPtr)Xcalloc(sizeof(DbeScreenPrivRec)))) + { + /* If we can not alloc a window or screen private, + * then free any privates that we already alloc'ed and return + */ + + for (j = 0; j < i; j++) + { + xfree(screenInfo.screens[j]->devPrivates[dbeScreenPrivIndex].ptr); + screenInfo.screens[j]->devPrivates[dbeScreenPrivIndex].ptr = NULL; + } + return; + } + + pScreen->devPrivates[dbeScreenPrivIndex].ptr = (pointer)pDbeScreenPriv; + + /* Store the DBE priv priv size info for later use when allocating + * priv privs at the driver level. + */ + pDbeScreenPriv->winPrivPrivLen = 0; + pDbeScreenPriv->winPrivPrivSizes = (unsigned *)NULL; + pDbeScreenPriv->totalWinPrivSize = sizeof(DbeWindowPrivRec); + + /* Copy the resource types */ + pDbeScreenPriv->dbeDrawableResType = dbeDrawableResType; + pDbeScreenPriv->dbeWindowPrivResType = dbeWindowPrivResType; + + /* Copy the private indices */ + pDbeScreenPriv->dbeScreenPrivIndex = dbeScreenPrivIndex; + pDbeScreenPriv->dbeWindowPrivIndex = dbeWindowPrivIndex; + + if(DbeInitFunct[i]) + { + /* This screen supports DBE. */ + + /* Setup DIX. */ + pDbeScreenPriv->SetupBackgroundPainter = DbeSetupBackgroundPainter; + pDbeScreenPriv->AllocWinPriv = DbeAllocWinPriv; + pDbeScreenPriv->AllocWinPrivPrivIndex = DbeAllocWinPrivPrivIndex; + pDbeScreenPriv->AllocWinPrivPriv = DbeAllocWinPrivPriv; + + /* Setup DDX. */ + ddxInitSuccess = (*DbeInitFunct[i])(pScreen, pDbeScreenPriv); + + /* DDX DBE initialization may have the side affect of + * reallocating pDbeScreenPriv, so we need to update it. + */ + pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); + + if (ddxInitSuccess) + { + /* Wrap DestroyWindow. The DDX initialization function + * already wrapped PositionWindow for us. + */ + + pDbeScreenPriv->DestroyWindow = pScreen->DestroyWindow; + pScreen->DestroyWindow = DbeDestroyWindow; + } + else + { + /* DDX initialization failed. Stub the screen. */ + DbeStubScreen(pDbeScreenPriv, &nStubbedScreens); + } + } + else + { + /* This screen does not support DBE. */ + +#ifndef DISABLE_MI_DBE_BY_DEFAULT + /* Setup DIX. */ + pDbeScreenPriv->SetupBackgroundPainter = DbeSetupBackgroundPainter; + pDbeScreenPriv->AllocWinPriv = DbeAllocWinPriv; + pDbeScreenPriv->AllocWinPrivPrivIndex = DbeAllocWinPrivPrivIndex; + pDbeScreenPriv->AllocWinPrivPriv = DbeAllocWinPrivPriv; + + /* Setup DDX. */ + ddxInitSuccess = miDbeInit(pScreen, pDbeScreenPriv); + + /* DDX DBE initialization may have the side affect of + * reallocating pDbeScreenPriv, so we need to update it. + */ + pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); + + if (ddxInitSuccess) + { + /* Wrap DestroyWindow. The DDX initialization function + * already wrapped PositionWindow for us. + */ + + pDbeScreenPriv->DestroyWindow = pScreen->DestroyWindow; + pScreen->DestroyWindow = DbeDestroyWindow; + } + else + { + /* DDX initialization failed. Stub the screen. */ + DbeStubScreen(pDbeScreenPriv, &nStubbedScreens); + } +#else + DbeStubScreen(pDbeScreenPriv, &nStubbedScreens); +#endif + + } /* else -- this screen does not support DBE. */ + + } /* for (i = 0; i < screenInfo.numScreens; i++) */ + + + if (nStubbedScreens == screenInfo.numScreens) + { + /* All screens stubbed. Clean up and return. */ + + for (i = 0; i < screenInfo.numScreens; i++) + { + xfree(screenInfo.screens[i]->devPrivates[dbeScreenPrivIndex].ptr); + pScreen->devPrivates[dbeScreenPrivIndex].ptr = NULL; + } + return; + } + + + /* Now add the extension. */ + extEntry = AddExtension(DBE_PROTOCOL_NAME, DbeNumberEvents, + DbeNumberErrors, ProcDbeDispatch, SProcDbeDispatch, + DbeResetProc, StandardMinorOpcode); + + dbeErrorBase = extEntry->errorBase; + +} /* DbeExtensionInit() */ + diff --git a/xorg-server-1.4/dbe/dbestruct.h b/xorg-server-1.4/dbe/dbestruct.h new file mode 100644 index 0000000..90f1342 --- /dev/null +++ b/xorg-server-1.4/dbe/dbestruct.h @@ -0,0 +1,230 @@ +/****************************************************************************** + * + * 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 DIX-related DBE + * + *****************************************************************************/ + +#ifndef DBE_STRUCT_H +#define DBE_STRUCT_H + + +/* INCLUDES */ + +#define NEED_DBE_PROTOCOL +#include +#include "windowstr.h" + + +/* DEFINES */ + +#define DBE_SCREEN_PRIV(pScreen) \ + ((dbeScreenPrivIndex < 0) ? \ + NULL : \ + ((DbeScreenPrivPtr)((pScreen)->devPrivates[dbeScreenPrivIndex].ptr))) + +#define DBE_SCREEN_PRIV_FROM_DRAWABLE(pDrawable) \ + DBE_SCREEN_PRIV((pDrawable)->pScreen) + +#define DBE_SCREEN_PRIV_FROM_WINDOW_PRIV(pDbeWindowPriv) \ + DBE_SCREEN_PRIV((pDbeWindowPriv)->pWindow->drawable.pScreen) + +#define DBE_SCREEN_PRIV_FROM_WINDOW(pWindow) \ + DBE_SCREEN_PRIV((pWindow)->drawable.pScreen) + +#define DBE_SCREEN_PRIV_FROM_PIXMAP(pPixmap) \ + DBE_SCREEN_PRIV((pPixmap)->drawable.pScreen) + +#define DBE_SCREEN_PRIV_FROM_GC(pGC)\ + DBE_SCREEN_PRIV((pGC)->pScreen) + +#define DBE_WINDOW_PRIV(pWindow)\ + ((dbeWindowPrivIndex < 0) ? \ + NULL : \ + ((DbeWindowPrivPtr)(pWindow->devPrivates[dbeWindowPrivIndex].ptr))) + +/* Initial size of the buffer ID array in the window priv. */ +#define DBE_INIT_MAX_IDS 2 + +/* Reallocation increment for the buffer ID array. */ +#define DBE_INCR_MAX_IDS 4 + +/* Marker for free elements in the buffer ID array. */ +#define DBE_FREE_ID_ELEMENT 0 + + +/* TYPEDEFS */ + +/* Record used to pass swap information between DIX and DDX swapping + * procedures. + */ +typedef struct _DbeSwapInfoRec +{ + WindowPtr pWindow; + unsigned char swapAction; + +} DbeSwapInfoRec, *DbeSwapInfoPtr; + +/* + ****************************************************************************** + ** Per-window data + ****************************************************************************** + */ + +typedef struct _DbeWindowPrivRec +{ + /* A pointer to the window with which the DBE window private (buffer) is + * associated. + */ + WindowPtr pWindow; + + /* Last known swap action for this buffer. Legal values for this field + * are XdbeUndefined, XdbeBackground, XdbeUntouched, and XdbeCopied. + */ + unsigned char swapAction; + + /* Last known buffer size. + */ + unsigned short width, height; + + /* Coordinates used for static gravity when the window is positioned. + */ + short x, y; + + /* Number of XIDs associated with this buffer. + */ + int nBufferIDs; + + /* Capacity of the current buffer ID array, IDs. */ + int maxAvailableIDs; + + /* Pointer to the array of buffer IDs. This initially points to initIDs. + * When the static limit of the initIDs array is reached, the array is + * reallocated and this pointer is set to the new array instead of initIDs. + */ + XID *IDs; + + /* Initial array of buffer IDs. We are defining the XID array within the + * window priv to optimize for data locality. In most cases, only one + * buffer will be associated with a window. Having the array declared + * here can prevent us from accessing the data in another memory page, + * possibly resulting in a page swap and loss of performance. Initially we + * will use this array to store buffer IDs. For situations where we have + * more IDs than can fit in this static array, we will allocate a larger + * array to use, possibly suffering a performance loss. + */ + XID initIDs[DBE_INIT_MAX_IDS]; + + /* Device-specific private information. + */ + DevUnion *devPrivates; + +} DbeWindowPrivRec, *DbeWindowPrivPtr; + + +/* + ****************************************************************************** + ** Per-screen data + ****************************************************************************** + */ + +typedef struct _DbeScreenPrivRec +{ + /* Info for creating window privs */ + int winPrivPrivLen; /* Length of privs in DbeWindowPrivRec */ + unsigned int *winPrivPrivSizes; /* Array of private record sizes */ + unsigned int totalWinPrivSize; /* PrivRec + size of all priv priv ptrs */ + + /* Resources created by DIX to be used by DDX */ + RESTYPE dbeDrawableResType; + RESTYPE dbeWindowPrivResType; + + /* Private indices created by DIX to be used by DDX */ + int dbeScreenPrivIndex; + int dbeWindowPrivIndex; + + /* Wrapped functions + * It is the responsibilty of the DDX layer to wrap PositionWindow(). + * DbeExtensionInit wraps DestroyWindow(). + */ + PositionWindowProcPtr PositionWindow; + DestroyWindowProcPtr DestroyWindow; + + /* Per-screen DIX routines */ + Bool (*SetupBackgroundPainter)( + WindowPtr /*pWin*/, + GCPtr /*pGC*/ +); + DbeWindowPrivPtr (*AllocWinPriv)( + ScreenPtr /*pScreen*/ +); + int (*AllocWinPrivPrivIndex)( + void +); + Bool (*AllocWinPrivPriv)( + ScreenPtr /*pScreen*/, + int /*index*/, + unsigned /*amount*/ +); + + /* Per-screen DDX routines */ + Bool (*GetVisualInfo)( + ScreenPtr /*pScreen*/, + XdbeScreenVisualInfo * /*pVisInfo*/ +); + int (*AllocBackBufferName)( + WindowPtr /*pWin*/, + XID /*bufId*/, + int /*swapAction*/ +); + int (*SwapBuffers)( + ClientPtr /*client*/, + int * /*pNumWindows*/, + DbeSwapInfoPtr /*swapInfo*/ +); + void (*BeginIdiom)( + ClientPtr /*client*/ +); + void (*EndIdiom)( + ClientPtr /*client*/ +); + void (*WinPrivDelete)( + DbeWindowPrivPtr /*pDbeWindowPriv*/, + XID /*bufId*/ +); + void (*ResetProc)( + ScreenPtr /*pScreen*/ +); + + /* Device-specific private information. + */ + DevUnion *devPrivates; + +} DbeScreenPrivRec, *DbeScreenPrivPtr; + +#endif /* DBE_STRUCT_H */ diff --git a/xorg-server-1.4/dbe/midbe.c b/xorg-server-1.4/dbe/midbe.c new file mode 100644 index 0000000..014e365 --- /dev/null +++ b/xorg-server-1.4/dbe/midbe.c @@ -0,0 +1,821 @@ +/****************************************************************************** + * + * 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. + * + * Machine-independent DBE code + * + *****************************************************************************/ + + +/* INCLUDES */ + +#define NEED_REPLIES +#define NEED_EVENTS +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#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 "dbestruct.h" +#include "midbestr.h" +#include "regionstr.h" +#include "gcstruct.h" +#include "inputstr.h" +#include "midbe.h" + +#include + +static int miDbePrivPrivGeneration = 0; +static int miDbeWindowPrivPrivIndex = -1; +static RESTYPE dbeDrawableResType; +static RESTYPE dbeWindowPrivResType; +static int dbeScreenPrivIndex = -1; +static int dbeWindowPrivIndex = -1; + + +/****************************************************************************** + * + * DBE MI Procedure: miDbeGetVisualInfo + * + * Description: + * + * This is the MI function for the DbeGetVisualInfo request. This function + * is called through pDbeScreenPriv->GetVisualInfo. This function is also + * called for the DbeAllocateBackBufferName request at the extension level; + * it is called by ProcDbeAllocateBackBufferName() in dbe.c. + * + * If memory allocation fails or we can not get the visual info, this + * function returns FALSE. Otherwise, it returns TRUE for success. + * + *****************************************************************************/ + +static Bool +miDbeGetVisualInfo(ScreenPtr pScreen, XdbeScreenVisualInfo *pScrVisInfo) +{ + register int i, j, k; + register int count; + DepthPtr pDepth; + XdbeVisualInfo *visInfo; + + + /* Determine number of visuals for this screen. */ + for (i = 0, count = 0; i < pScreen->numDepths; i++) + { + count += pScreen->allowedDepths[i].numVids; + } + + /* Allocate an array of XdbeVisualInfo items. */ + if (!(visInfo = (XdbeVisualInfo *)xalloc(count * sizeof(XdbeVisualInfo)))) + { + return(FALSE); /* memory alloc failure */ + } + + for (i = 0, k = 0; i < pScreen->numDepths; i++) + { + /* For each depth of this screen, get visual information. */ + + pDepth = &pScreen->allowedDepths[i]; + + for (j = 0; j < pDepth->numVids; j++) + { + /* For each visual for this depth of this screen, get visual ID + * and visual depth. Since this is MI code, we will always return + * the same performance level for all visuals (0). A higher + * performance level value indicates higher performance. + */ + visInfo[k].visual = pDepth->vids[j]; + visInfo[k].depth = pDepth->depth; + visInfo[k].perflevel = 0; + k++; + } + } + + /* Record the number of visuals and point visual_depth to + * the array of visual info. + */ + pScrVisInfo->count = count; + pScrVisInfo->visinfo = visInfo; + + return(TRUE); /* success */ + +} /* miDbeGetVisualInfo() */ + + +/****************************************************************************** + * + * DBE MI Procedure: miAllocBackBufferName + * + * Description: + * + * This is the MI function for the DbeAllocateBackBufferName request. + * + *****************************************************************************/ + +static int +miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction) +{ + ScreenPtr pScreen; + DbeWindowPrivPtr pDbeWindowPriv; + MiDbeWindowPrivPrivPtr pDbeWindowPrivPriv; + DbeScreenPrivPtr pDbeScreenPriv; + GCPtr pGC; + xRectangle clearRect; + + + pScreen = pWin->drawable.pScreen; + pDbeWindowPriv = DBE_WINDOW_PRIV(pWin); + + if (pDbeWindowPriv->nBufferIDs == 0) + { + /* There is no buffer associated with the window. + * We have to create the window priv priv. Remember, the window + * priv was created at the DIX level, so all we need to do is + * create the priv priv and attach it to the priv. + */ + + pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); + + /* Setup the window priv priv. */ + pDbeWindowPrivPriv = MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv); + pDbeWindowPrivPriv->pDbeWindowPriv = pDbeWindowPriv; + + /* Get a front pixmap. */ + if (!(pDbeWindowPrivPriv->pFrontBuffer = + (*pScreen->CreatePixmap)(pScreen, pDbeWindowPriv->width, + pDbeWindowPriv->height, + pWin->drawable.depth))) + { + return(BadAlloc); + } + + /* Get a back pixmap. */ + if (!(pDbeWindowPrivPriv->pBackBuffer = + (*pScreen->CreatePixmap)(pScreen, pDbeWindowPriv->width, + pDbeWindowPriv->height, + pWin->drawable.depth))) + { + (*pScreen->DestroyPixmap)(pDbeWindowPrivPriv->pFrontBuffer); + return(BadAlloc); + } + + + /* Make the back pixmap a DBE drawable resource. */ + if (!AddResource(bufId, dbeDrawableResType, + (pointer)pDbeWindowPrivPriv->pBackBuffer)) + { + /* free the buffer and the drawable resource */ + FreeResource(bufId, RT_NONE); + return(BadAlloc); + } + + + /* Attach the priv priv to the priv. */ + pDbeWindowPriv->devPrivates[miDbeWindowPrivPrivIndex].ptr = + (pointer)pDbeWindowPrivPriv; + + + /* Clear the back buffer. */ + pGC = GetScratchGC(pWin->drawable.depth, pWin->drawable.pScreen); + if ((*pDbeScreenPriv->SetupBackgroundPainter)(pWin, pGC)) + { + ValidateGC((DrawablePtr)pDbeWindowPrivPriv->pBackBuffer, pGC); + clearRect.x = clearRect.y = 0; + clearRect.width = pDbeWindowPrivPriv->pBackBuffer->drawable.width; + clearRect.height = pDbeWindowPrivPriv->pBackBuffer->drawable.height; + (*pGC->ops->PolyFillRect)( + (DrawablePtr)pDbeWindowPrivPriv->pBackBuffer, pGC, 1, + &clearRect); + } + FreeScratchGC(pGC); + + } /* if no buffer associated with the window */ + + else + { + /* A buffer is already associated with the window. + * Place the new buffer ID information at the head of the ID list. + */ + + /* Associate the new ID with an existing pixmap. */ + pDbeWindowPrivPriv = MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv); + if (!AddResource(bufId, dbeDrawableResType, + (pointer)pDbeWindowPrivPriv->pBackBuffer)) + { + return(BadAlloc); + } + + } + + return(Success); + +} /* miDbeAllocBackBufferName() */ + + +/****************************************************************************** + * + * DBE MI Procedure: miDbeAliasBuffers + * + * Description: + * + * This function associates all XIDs of a buffer with the back pixmap + * stored in the window priv. + * + *****************************************************************************/ + +static void +miDbeAliasBuffers(DbeWindowPrivPtr pDbeWindowPriv) +{ + int i; + MiDbeWindowPrivPrivPtr pDbeWindowPrivPriv = + MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv); + + for (i = 0; i < pDbeWindowPriv->nBufferIDs; i++) + { + ChangeResourceValue(pDbeWindowPriv->IDs[i], dbeDrawableResType, + (pointer)pDbeWindowPrivPriv->pBackBuffer); + } + +} /* miDbeAliasBuffers() */ + + +/****************************************************************************** + * + * DBE MI Procedure: miDbeSwapBuffers + * + * Description: + * + * This is the MI function for the DbeSwapBuffers request. + * + *****************************************************************************/ + +static int +miDbeSwapBuffers(ClientPtr client, int *pNumWindows, DbeSwapInfoPtr swapInfo) +{ + DbeScreenPrivPtr pDbeScreenPriv; + GCPtr pGC; + WindowPtr pWin; + MiDbeWindowPrivPrivPtr pDbeWindowPrivPriv; + PixmapPtr pTmpBuffer; + xRectangle clearRect; + + + pWin = swapInfo[0].pWindow; + pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW(pWin); + pDbeWindowPrivPriv = MI_DBE_WINDOW_PRIV_PRIV_FROM_WINDOW(pWin); + pGC = GetScratchGC(pWin->drawable.depth, pWin->drawable.pScreen); + + /* + ********************************************************************** + ** Setup before swap. + ********************************************************************** + */ + + switch(swapInfo[0].swapAction) + { + case XdbeUndefined: + break; + + case XdbeBackground: + break; + + case XdbeUntouched: + ValidateGC((DrawablePtr)pDbeWindowPrivPriv->pFrontBuffer, pGC); + (*pGC->ops->CopyArea)((DrawablePtr)pWin, + (DrawablePtr)pDbeWindowPrivPriv->pFrontBuffer, + pGC, 0, 0, pWin->drawable.width, + pWin->drawable.height, 0, 0); + break; + + case XdbeCopied: + break; + + } + + /* + ********************************************************************** + ** Swap. + ********************************************************************** + */ + + ValidateGC((DrawablePtr)pWin, pGC); + (*pGC->ops->CopyArea)((DrawablePtr)pDbeWindowPrivPriv->pBackBuffer, + (DrawablePtr)pWin, pGC, 0, 0, + pWin->drawable.width, pWin->drawable.height, + 0, 0); + + /* + ********************************************************************** + ** Tasks after swap. + ********************************************************************** + */ + + switch(swapInfo[0].swapAction) + { + case XdbeUndefined: + break; + + case XdbeBackground: + if ((*pDbeScreenPriv->SetupBackgroundPainter)(pWin, pGC)) + { + ValidateGC((DrawablePtr)pDbeWindowPrivPriv->pBackBuffer, pGC); + clearRect.x = 0; + clearRect.y = 0; + clearRect.width = + pDbeWindowPrivPriv->pBackBuffer->drawable.width; + clearRect.height = + pDbeWindowPrivPriv->pBackBuffer->drawable.height; + (*pGC->ops->PolyFillRect)( + (DrawablePtr)pDbeWindowPrivPriv->pBackBuffer, + pGC, 1, &clearRect); + } + break; + + case XdbeUntouched: + /* Swap pixmap pointers. */ + pTmpBuffer = pDbeWindowPrivPriv->pBackBuffer; + pDbeWindowPrivPriv->pBackBuffer = + pDbeWindowPrivPriv->pFrontBuffer; + pDbeWindowPrivPriv->pFrontBuffer = pTmpBuffer; + + miDbeAliasBuffers(pDbeWindowPrivPriv->pDbeWindowPriv); + + break; + + case XdbeCopied: + break; + + } + + /* Remove the swapped window from the swap information array and decrement + * pNumWindows to indicate to the DIX level how many windows were actually + * swapped. + */ + + if (*pNumWindows > 1) + { + /* We were told to swap more than one window, but we only swapped the + * first one. Remove the first window in the list by moving the last + * window to the beginning. + */ + swapInfo[0].pWindow = swapInfo[*pNumWindows - 1].pWindow; + swapInfo[0].swapAction = swapInfo[*pNumWindows - 1].swapAction; + + /* Clear the last window information just to be safe. */ + swapInfo[*pNumWindows - 1].pWindow = (WindowPtr)NULL; + swapInfo[*pNumWindows - 1].swapAction = 0; + } + else + { + /* Clear the window information just to be safe. */ + swapInfo[0].pWindow = (WindowPtr)NULL; + swapInfo[0].swapAction = 0; + } + + (*pNumWindows)--; + + FreeScratchGC(pGC); + + return(Success); + +} /* miSwapBuffers() */ + + +/****************************************************************************** + * + * DBE MI Procedure: miDbeWinPrivDelete + * + * Description: + * + * This is the MI function for deleting the dbeWindowPrivResType resource. + * This function is invoked indirectly by calling FreeResource() to free + * the resources associated with a DBE buffer ID. There are 5 ways that + * miDbeWinPrivDelete() can be called by FreeResource(). They are: + * + * - A DBE window is destroyed, in which case the DbeDestroyWindow() + * wrapper is invoked. The wrapper calls FreeResource() for all DBE + * buffer IDs. + * + * - miDbeAllocBackBufferName() calls FreeResource() to clean up resources + * after a buffer allocation failure. + * + * - The PositionWindow wrapper, miDbePositionWindow(), calls + * FreeResource() when it fails to create buffers of the new size. + * FreeResource() is called for all DBE buffer IDs. + * + * - FreeClientResources() calls FreeResource() when a client dies or the + * the server resets. + * + * When FreeResource() is called for a DBE buffer ID, the delete function + * for the only other type of DBE resource, dbeDrawableResType, is also + * invoked. This delete function (DbeDrawableDelete) is a NOOP to make + * resource deletion easier. It is not guaranteed which delete function is + * called first. Hence, we will let miDbeWinPrivDelete() free all DBE + * resources. + * + * This function deletes/frees the following stuff associated with + * the window private: + * + * - the ID node in the ID list representing the passed in ID. + * + * In addition, pDbeWindowPriv->nBufferIDs is decremented. + * + * If this function is called for the last/only buffer ID for a window, + * these are additionally deleted/freed: + * + * - the front and back pixmaps + * - the window priv itself + * + *****************************************************************************/ + +static void +miDbeWinPrivDelete(DbeWindowPrivPtr pDbeWindowPriv, XID bufId) +{ + MiDbeWindowPrivPrivPtr pDbeWindowPrivPriv; + + + if (pDbeWindowPriv->nBufferIDs != 0) + { + /* We still have at least one more buffer ID associated with this + * window. + */ + return; + } + + + /* We have no more buffer IDs associated with this window. We need to + * free some stuff. + */ + + pDbeWindowPrivPriv = MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv); + + /* Destroy the front and back pixmaps. */ + if (pDbeWindowPrivPriv->pFrontBuffer) + { + (*pDbeWindowPriv->pWindow->drawable.pScreen->DestroyPixmap)( + pDbeWindowPrivPriv->pFrontBuffer); + } + if (pDbeWindowPrivPriv->pBackBuffer) + { + (*pDbeWindowPriv->pWindow->drawable.pScreen->DestroyPixmap)( + pDbeWindowPrivPriv->pBackBuffer); + } + +} /* miDbeWinPrivDelete() */ + + +/****************************************************************************** + * + * DBE MI Procedure: miDbePositionWindow + * + * Description: + * + * This function was cloned from miMbxPositionWindow() in mimultibuf.c. + * This function resizes the buffer when the window is resized. + * + *****************************************************************************/ + +static Bool +miDbePositionWindow(WindowPtr pWin, int x, int y) +{ + ScreenPtr pScreen; + DbeScreenPrivPtr pDbeScreenPriv; + DbeWindowPrivPtr pDbeWindowPriv; + int width, height; + int dx, dy, dw, dh; + int sourcex, sourcey; + int destx, desty; + int savewidth, saveheight; + PixmapPtr pFrontBuffer; + PixmapPtr pBackBuffer; + Bool clear; + GCPtr pGC; + xRectangle clearRect; + Bool ret; + + + /* + ************************************************************************** + ** 1. Unwrap the member routine. + ************************************************************************** + */ + + pScreen = pWin->drawable.pScreen; + pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); + pScreen->PositionWindow = pDbeScreenPriv->PositionWindow; + + /* + ************************************************************************** + ** 2. Do any work necessary before the member routine is called. + ** + ** In this case we do not need to do anything. + ************************************************************************** + */ + + /* + ************************************************************************** + ** 3. Call the member routine, saving its result if necessary. + ************************************************************************** + */ + + ret = (*pScreen->PositionWindow)(pWin, x, y); + + /* + ************************************************************************** + ** 4. Rewrap the member routine, restoring the wrapper value first in case + ** the wrapper (or something that it wrapped) change this value. + ************************************************************************** + */ + + pDbeScreenPriv->PositionWindow = pScreen->PositionWindow; + pScreen->PositionWindow = miDbePositionWindow; + + /* + ************************************************************************** + ** 5. Do any work necessary after the member routine has been called. + ************************************************************************** + */ + + if (!(pDbeWindowPriv = DBE_WINDOW_PRIV(pWin))) + { + return(ret); + } + + if (pDbeWindowPriv->width == pWin->drawable.width && + pDbeWindowPriv->height == pWin->drawable.height) + { + return(ret); + } + + width = pWin->drawable.width; + height = pWin->drawable.height; + + dx = pWin->drawable.x - pDbeWindowPriv->x; + dy = pWin->drawable.y - pDbeWindowPriv->y; + dw = width - pDbeWindowPriv->width; + dh = height - pDbeWindowPriv->height; + + GravityTranslate (0, 0, -dx, -dy, dw, dh, pWin->bitGravity, &destx, &desty); + + clear = ((pDbeWindowPriv->width < (unsigned short)width ) || + (pDbeWindowPriv->height < (unsigned short)height) || + (pWin->bitGravity == ForgetGravity)); + + sourcex = 0; + sourcey = 0; + savewidth = pDbeWindowPriv->width; + saveheight = pDbeWindowPriv->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; + } + + pDbeWindowPriv->width = width; + pDbeWindowPriv->height = height; + pDbeWindowPriv->x = pWin->drawable.x; + pDbeWindowPriv->y = pWin->drawable.y; + + pGC = GetScratchGC (pWin->drawable.depth, pScreen); + + if (clear) + { + if ((*pDbeScreenPriv->SetupBackgroundPainter)(pWin, pGC)) + { + clearRect.x = 0; + clearRect.y = 0; + clearRect.width = width; + clearRect.height = height; + } + else + { + clear = FALSE; + } + } + + /* Create DBE buffer pixmaps equal to size of resized window. */ + pFrontBuffer = (*pScreen->CreatePixmap)(pScreen, width, height, + pWin->drawable.depth); + + pBackBuffer = (*pScreen->CreatePixmap)(pScreen, width, height, + pWin->drawable.depth); + + if (!pFrontBuffer || !pBackBuffer) + { + /* We failed at creating 1 or 2 of the pixmaps. */ + + if (pFrontBuffer) + { + (*pScreen->DestroyPixmap)(pFrontBuffer); + } + + if (pBackBuffer) + { + (*pScreen->DestroyPixmap)(pBackBuffer); + } + + /* Destroy all buffers for this window. */ + while (pDbeWindowPriv) + { + /* DbeWindowPrivDelete() will free the window private if there no + * more buffer IDs associated with this window. + */ + FreeResource(pDbeWindowPriv->IDs[0], RT_NONE); + pDbeWindowPriv = DBE_WINDOW_PRIV(pWin); + } + + FreeScratchGC(pGC); + return(FALSE); + } + + else + { + /* Clear out the new DBE buffer pixmaps. */ + + MiDbeWindowPrivPrivPtr pDbeWindowPrivPriv; + + + pDbeWindowPrivPriv = MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv); + ValidateGC((DrawablePtr)pFrontBuffer, pGC); + + /* I suppose this could avoid quite a bit of work if + * it computed the minimal area required. + */ + if (clear) + { + (*pGC->ops->PolyFillRect)((DrawablePtr)pFrontBuffer, pGC, 1, + &clearRect); + (*pGC->ops->PolyFillRect)((DrawablePtr)pBackBuffer , pGC, 1, + &clearRect); + } + + /* Copy the contents of the old DBE pixmaps to the new pixmaps. */ + if (pWin->bitGravity != ForgetGravity) + { + (*pGC->ops->CopyArea)((DrawablePtr)pDbeWindowPrivPriv->pFrontBuffer, + (DrawablePtr)pFrontBuffer, pGC, sourcex, + sourcey, savewidth, saveheight, destx, desty); + (*pGC->ops->CopyArea)((DrawablePtr)pDbeWindowPrivPriv->pBackBuffer, + (DrawablePtr)pBackBuffer, pGC, sourcex, + sourcey, savewidth, saveheight, destx, desty); + } + + /* Destroy the old pixmaps, and point the DBE window priv to the new + * pixmaps. + */ + + (*pScreen->DestroyPixmap)(pDbeWindowPrivPriv->pFrontBuffer); + (*pScreen->DestroyPixmap)(pDbeWindowPrivPriv->pBackBuffer); + + pDbeWindowPrivPriv->pFrontBuffer = pFrontBuffer; + pDbeWindowPrivPriv->pBackBuffer = pBackBuffer; + + /* Make sure all XID are associated with the new back pixmap. */ + miDbeAliasBuffers(pDbeWindowPriv); + + FreeScratchGC(pGC); + } + + return(ret); + +} /* miDbePositionWindow() */ + + +/****************************************************************************** + * + * DBE MI Procedure: miDbeResetProc + * + * Description: + * + * This function is called from DbeResetProc(), which is called at the end + * of every server generation. This function peforms any MI-specific + * shutdown tasks. + * + *****************************************************************************/ + +static void +miDbeResetProc(ScreenPtr pScreen) +{ + DbeScreenPrivPtr pDbeScreenPriv; + + + pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); + + /* Unwrap wrappers */ + pScreen->PositionWindow = pDbeScreenPriv->PositionWindow; + +} /* miDbeResetProc() */ + + +/****************************************************************************** + * + * DBE MI Procedure: miDbeInit + * + * Description: + * + * This is the MI initialization function called by DbeExtensionInit(). + * + *****************************************************************************/ + +Bool +miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv) +{ + /* Copy resource types created by DIX */ + dbeDrawableResType = pDbeScreenPriv->dbeDrawableResType; + dbeWindowPrivResType = pDbeScreenPriv->dbeWindowPrivResType; + + /* Copy private indices created by DIX */ + dbeScreenPrivIndex = pDbeScreenPriv->dbeScreenPrivIndex; + dbeWindowPrivIndex = pDbeScreenPriv->dbeWindowPrivIndex; + + /* Reset the window priv privs if generations do not match. */ + if (miDbePrivPrivGeneration != serverGeneration) + { + /* + ********************************************************************** + ** Allocate the window priv priv. + ********************************************************************** + */ + + miDbeWindowPrivPrivIndex = (*pDbeScreenPriv->AllocWinPrivPrivIndex)(); + + /* Make sure we only do this code once. */ + miDbePrivPrivGeneration = serverGeneration; + + } /* if -- Reset priv privs. */ + + if (!(*pDbeScreenPriv->AllocWinPrivPriv)(pScreen, + miDbeWindowPrivPrivIndex, sizeof(MiDbeWindowPrivPrivRec))) + { + return(FALSE); + } + + /* Wrap functions. */ + pDbeScreenPriv->PositionWindow = pScreen->PositionWindow; + pScreen->PositionWindow = miDbePositionWindow; + + /* Initialize the per-screen DBE function pointers. */ + pDbeScreenPriv->GetVisualInfo = miDbeGetVisualInfo; + pDbeScreenPriv->AllocBackBufferName = miDbeAllocBackBufferName; + pDbeScreenPriv->SwapBuffers = miDbeSwapBuffers; + pDbeScreenPriv->BeginIdiom = 0; + pDbeScreenPriv->EndIdiom = 0; + pDbeScreenPriv->ResetProc = miDbeResetProc; + pDbeScreenPriv->WinPrivDelete = miDbeWinPrivDelete; + + return(TRUE); + +} /* miDbeInit() */ diff --git a/xorg-server-1.4/dbe/midbe.h b/xorg-server-1.4/dbe/midbe.h new file mode 100644 index 0000000..007f2e3 --- /dev/null +++ b/xorg-server-1.4/dbe/midbe.h @@ -0,0 +1,47 @@ +/****************************************************************************** + * 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 users of machine-independent DBE code + * + *****************************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef MIDBE_H +#define MIDBE_H + +/* EXTERNS */ + +extern Bool miDbeInit( + ScreenPtr pScreen, + DbeScreenPrivPtr pDbeScreenPriv +); + +#endif /* MIDBE_H */ + diff --git a/xorg-server-1.4/dbe/midbestr.h b/xorg-server-1.4/dbe/midbestr.h new file mode 100644 index 0000000..1ad0104 --- /dev/null +++ b/xorg-server-1.4/dbe/midbestr.h @@ -0,0 +1,99 @@ +/****************************************************************************** + * + * 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 users of machine-independent DBE code + * + *****************************************************************************/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef MIDBE_STRUCT_H +#define MIDBE_STRUCT_H + + +/* DEFINES */ + +#define MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv) \ + (((miDbeWindowPrivPrivIndex < 0) || (!pDbeWindowPriv)) ? \ + NULL : \ + ((MiDbeWindowPrivPrivPtr) \ + ((pDbeWindowPriv)->devPrivates[miDbeWindowPrivPrivIndex].ptr))) + +#define MI_DBE_WINDOW_PRIV_PRIV_FROM_WINDOW(pWin)\ + MI_DBE_WINDOW_PRIV_PRIV(DBE_WINDOW_PRIV(pWin)) + +#define MI_DBE_SCREEN_PRIV_PRIV(pDbeScreenPriv) \ + (((miDbeScreenPrivPrivIndex < 0) || (!pDbeScreenPriv)) ? \ + NULL : \ + ((MiDbeScreenPrivPrivPtr) \ + ((pDbeScreenPriv)->devPrivates[miDbeScreenPrivPrivIndex].ptr))) + + +/* TYPEDEFS */ + +typedef struct _MiDbeWindowPrivPrivRec +{ + /* Place machine-specific fields in here. + * Since this is mi code, we do not really have machine-specific fields. + */ + + /* Pointer to a drawable that contains the contents of the back buffer. + */ + PixmapPtr pBackBuffer; + + /* Pointer to a drawable that contains the contents of the front buffer. + * This pointer is only used for the XdbeUntouched swap action. For that + * swap action, we need to copy the front buffer (window) contents into + * this drawable, copy the contents of current back buffer drawable (the + * back buffer) into the window, swap the front and back drawable pointers, + * and then swap the drawable/resource associations in the resource + * database. + */ + PixmapPtr pFrontBuffer; + + /* Pointer back to our window private with which we are associated. */ + DbeWindowPrivPtr pDbeWindowPriv; + +} MiDbeWindowPrivPrivRec, *MiDbeWindowPrivPrivPtr; + +typedef struct _MiDbeScreenPrivPrivRec +{ + /* Place machine-specific fields in here. + * Since this is mi code, we do not really have machine-specific fields. + */ + + /* Pointer back to our screen private with which we are associated. */ + DbeScreenPrivPtr pDbeScreenPriv; + +} MiDbeScreenPrivPrivRec, *MiDbeScreenPrivPrivPtr; + +#endif /* MIDBE_STRUCT_H */ + diff --git a/xorg-server-1.4/depcomp b/xorg-server-1.4/depcomp new file mode 100755 index 0000000..ca5ea4e --- /dev/null +++ b/xorg-server-1.4/depcomp @@ -0,0 +1,584 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2006-10-15.18 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software +# Foundation, Inc. + +# 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, 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. + +# 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 Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + stat=$? + + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + outname="$stripped.o" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/xorg-server-1.4/dix/BuiltInAtoms b/xorg-server-1.4/dix/BuiltInAtoms new file mode 100644 index 0000000..910c627 --- /dev/null +++ b/xorg-server-1.4/dix/BuiltInAtoms @@ -0,0 +1,329 @@ +File: .../x11/server/dix/BuiltInAtoms + +This file is of a fixed format and is used to generate both the file +include/XAtom.h and dix/initatoms.c. Neither of those files should be +edited directly. Changing the atoms in this file, or even the order in +which they occur, is equivalent to forcing a new (minor) version number +on the server. Take care. + +The format of the file is that each built in atom starts in column 1 +with no text, other than spaces and tabs, on that line other than a +mandatory trailing "@" at the end of the line. For each atom (Foo) +below the defines will be of the form + #define XA_Foo +and the string value of the atom will be "Foo". + +The comment lines in this file are not guaranteed to be accurate. To see the +current truth, look at the Xlib documentation as well as the protocol spec. + +Atoms occur in five distinct name spaces within the protocol. Any particular +atom may or may not have some client interpretation within each of the name +spaces. For each of the built in atoms, the intended semantics and the space +within which it is defined is indicated. + +Those name spaces are + Property names + Property types + Selections + Font properties + Type of a ClientMessage event (none built into server) + +For the font properties mentioned here, see the spec for more information. + + -- Selections -- + +PRIMARY @ + Selection. +SECONDARY @ + Selection. + + -- Property types and names -- + +ARC @ + Property type: + x, y: INT16 + width, height: CARD16, + angle1, angle2: INT16 +ATOM @ + Property type: + atom: ATOM +BITMAP @ + Property type: + bitmap: PIXMAP + This is asserted to be of depth 1. +CARDINAL @ + Property type: + card: CARD32 or CARD16 or CARD8 + the datum size is dependent on the property format +COLORMAP @ + Property type: + colormap: COLORMAP +CURSOR @ + Property type: + cursor: CURSOR +CUT_BUFFER0 @ +CUT_BUFFER1 @ +CUT_BUFFER2 @ +CUT_BUFFER3 @ +CUT_BUFFER4 @ +CUT_BUFFER5 @ +CUT_BUFFER6 @ +CUT_BUFFER7 @ + Property name: (type: STRING) + Used to implement cut buffer ring, in particular Andrew uses + this mechanism. Anyone else using this sort of IPC mechanism + should use these properties. + + Data is normally fetched and stored out of CUT_BUFFER0; the + RotateProperties request is used to rotate these buffers. +DRAWABLE @ + Property type: + drawable: DRAWABLE +FONT @ + Property type: + font: FONT +INTEGER @ + Property type: + card: INT32 or INT16 or INT8 + the datum size is dependent on the property format +PIXMAP @ + Property type: + pixmap: PIXMAP +POINT @ + Property type: + x, y: INT16 +RECTANGLE @ + Property type: + x, y: INT16 + width, height: CARD16 +RESOURCE_MANAGER @ + Property name: (type: STRING) + Contents of the user's resource manager data base. +RGB_COLOR_MAP @ + Property type: + colormap: COLORMAP + red-max: CARD32 + red-mult: CARD32 + green-max: CARD32 + green-mult: CARD32 + blue-max: CARD32 + blue-mult: CARD32 + base-pixel: CARD32 + + The fields `red_max', `green_max', and `blue_max' give the maximum + red, green, and blue values, respectively. Each color + coefficient ranges from 0 to its max, inclusive. For example, + a common colormap allocation is 3/3/2: 3 planes for red, 3 + planes for green, and 2 planes for blue. Such a colormap would + have red_max == 7, green_max = 7, and blue_max = 3. An alternate + allocation that uses only 216 colors is red_max = 5, green_max = + 5, and blue_max = 5. + + The fields `red_mult', `green_mult', and `blue_mult' give the + scale factors used to compose a full pixel value. (See next + paragraph.) For a 3/3/2 allocation red_mult might be 32, + green_mult might be 4, and blue_mult might be 1. For a + 6-colors-each allocation, red_mult might be 36, green_mult might + be 6, and blue_mult might be 1. + + The field `base_pixel' gives the base pixel value used to + compose a full pixel value. Normally base_pixel is obtained + from a call to XAllocColorPlanes(). Given integer red, green, + and blue coefficients in their appropriate ranges, one can + compute a corresponding pixel value with the expression: + + r * red_mult + g * green_mult + b * blue_mult + base_pixel + + For gray-scale colormaps, only the colormap, red_max, red_mult, + and base_pixel fields are defined; the other fields are + ignored. To compute a gray-scale pixel value, use: + + gray * red_mult + base_pixel + + This is provided to allow applications to share color maps. + +RGB_BEST_MAP @ +RGB_BLUE_MAP @ +RGB_DEFAULT_MAP @ +RGB_GRAY_MAP @ +RGB_GREEN_MAP @ +RGB_RED_MAP @ + Property name: (type: RGB_COLOR_MAP) + The needs of most applications can be met with five colormaps. + Polite applications may need only a small RGB space, and can + use a portion of the default color map. Applications doing + high-quality RGB rendering will need an entire colormap, + filled with as large an RGB space as possible, e.g. 332. For + color separations, an application may need maximum device + resolution for each of red, green, and blue, even if this + requires three renderings with three colormaps. + + Each of the above five names would be used for sharing color + maps. +STRING @ + Property type: + sequence of Bytes +VISUALID @ + Property type: + visual: VISUALID +WINDOW @ + Property type: + window: WINDOW +WM_COMMAND @ + Property name: (type: STRING) + Command line arguments used to invoke this application. The + arguments are delimited by null characters (ASCII 0). +WM_HINTS @ + Property type: + flags: CARD32 + input: BOOL32 + initial-state: CARD32 + icon-pixmap: PIXMAP + icon-window: WINDOW + icon_mask: BITMAP + icon-x, icon-y: INT32 + flags contains the following bits + 0x00000001 input hint + 0x00000002 state hint + 0x00000004 icon pixmap hint + 0x00000008 icon window hint + 0x00000010 icon position hint + values for initial-state + 0 unspecified -> application does not + care and WM should pick one. + 1 normal + 2 zoomed + 3 iconic + 4 inactive -> application believes + itself to be seldomly used. WM may wish to + place it on an inactive menu. + This type is potentially extensible. The order is critical; + append to the end only. + Property name: (type: WM_HINTS) + Additional hints set by the client for use by the window + manager. +WM_CLIENT_MACHINE @ + Property name: (type: STRING) + used to communicate with the window manager. The host name + of the machine the client is running on may be set here. +WM_ICON_NAME @ + Property name: (type: STRING) + what the application would like the label to be for + the iconic form of the window. +WM_ICON_SIZE @ + Property type: + minWidth, min-height: CARD32 + maxWidth, max-height: CARD32 + widthInc, height-inc: CARD32 + Property name: (type: ICON_SIZE) + The window manager may set this property on the root window + to specify the icon sizes it allows. +WM_NAME @ + Property name: (type: STRING) + used to communicate with the window manager. This is + what the application would like the label for the window. +WM_NORMAL_HINTS @ + Property name: (type: SIZE_HINTS) + used to communicate with the window manager. This is size + hints for a window in its "normal" state. +WM_SIZE_HINTS @ + Property type: + flags: CARD32 + x, y: INT32 + width, height: CARD32 + min-width, min-height: CARD32 + max-width, max-height: CARD32 + width-inc, height-inc: CARD32 + min-aspect-x, min-aspect-y: CARD32 + max-aspect-x, max-aspect-y: CARD32 + flags contains the following bits + 0x00000001 user specified x and y + 0x00000002 user specified width and height + 0x00000004 program specified position + 0x00000008 program specified size + 0x00000010 program specified minimum size + 0x00000020 program specified maximum size + 0x00000040 program specified resize increment + 0x00000080 program specified aspect ratio + This type is potentially extensible. The order is critical; + append to the end only. +WM_ZOOM_HINTS @ + Property name: (type: SIZE_HINTS) + used to communicate with the window manager. This is size + hints for a window in its "zoomed" state. + + -- Font properties -- + +MIN_SPACE @ + Font property: CARD32 +NORM_SPACE @ + Font property: CARD32 +MAX_SPACE @ + Font property: CARD32 +END_SPACE @ + Font property: CARD32 +SUPERSCRIPT_X @ + Font property: INT32 +SUPERSCRIPT_Y @ + Font property: INT32 +SUBSCRIPT_X @ + Font property: INT32 +SUBSCRIPT_Y @ + Font property: INT32 +UNDERLINE_POSITION @ + Font property: INT32 +UNDERLINE_THICKNESS @ + Font property: CARD32 +STRIKEOUT_ASCENT @ + Font property: INT32 +STRIKEOUT_DESCENT @ + Font property: INT32 +ITALIC_ANGLE @ + Font property: INT32 +X_HEIGHT @ + Font property: INT32 +QUAD_WIDTH @ + Font property: INT32 +WEIGHT @ + Font property: CARD32 +POINT_SIZE @ + Font property: CARD32 +RESOLUTION @ + Font property: CARD32 + +The following optional properties on fonts have values that are atoms. The +atom print name is the useful information. + +COPYRIGHT @ + of the font distribution +NOTICE @ + trademark/copyright of the character shapes +FONT_NAME @ + name of this particular instance of a font +FAMILY_NAME @ + name of the 'font family' to which it belongs +FULL_NAME @ + full text name of the font + +The following aren't in order but putting them at the end avoids encoding +changes. + +CAP_HEIGHT @ + Font property: CARD32 + + +WM_CLASS @ + Property name: (type: STRING) + Used (possibly by some window managers; definitely by + session managers) to look up resources in the resource + data base on behalf of the client who set this property. + There are 2 elements: + {char *resource_name; char *resource_class;} + delimited by a null character (ascii 0) + +WM_TRANSIENT_FOR @ + Property name: (type: WINDOW) + Used by transient top-level windows, such as dialog + boxes, to point to their logical "parents". The window + manager can then take down the dialog boxes when the + "parent" gets iconified, for instance. diff --git a/xorg-server-1.4/dix/CHANGES b/xorg-server-1.4/dix/CHANGES new file mode 100644 index 0000000..d8fb7c3 --- /dev/null +++ b/xorg-server-1.4/dix/CHANGES @@ -0,0 +1,17 @@ +The following changes have been made to this directory since R3 (for +a full description, see doc/Server/r4.tbl.ms): + + o Windows restructured (memory reduction, devPrivates and speedups) + o GCs restructured (memory reduction, devPrivates and wrappers) + o Screens restructured (window ops merged in, devPrivates) + o Pixmaps restructured (drawable changes mostly) + o Cursors restructured (shares glyph bits now) + o Visuals restructured (screen index removed, fields rearranged) + o Devices restructured (input extension changes) + o Out of memory changes. Many interfaces now return OutOfMemory + status. + o Synchronous grab code rewritten. Should conform to our + understanding of the protocol now. Be careful when time + stamping events (don't allow time to run backwards). + o Resource types redesigned and rewritten. + o Internal fake color allocation routine for software cursors. diff --git a/xorg-server-1.4/dix/Makefile.am b/xorg-server-1.4/dix/Makefile.am new file mode 100644 index 0000000..28c2d8b --- /dev/null +++ b/xorg-server-1.4/dix/Makefile.am @@ -0,0 +1,64 @@ +noinst_LTLIBRARIES = libdix.la libxpstubs.la + +AM_CFLAGS = $(DIX_CFLAGS) \ + -DVENDOR_NAME=\""@VENDOR_NAME@"\" \ + -DVENDOR_RELEASE="@VENDOR_RELEASE@" + +libdix_la_SOURCES = \ + atom.c \ + colormap.c \ + cursor.c \ + devices.c \ + dispatch.c \ + dispatch.h \ + dixfonts.c \ + dixutils.c \ + events.c \ + extension.c \ + ffs.c \ + gc.c \ + getevents.c \ + globals.c \ + glyphcurs.c \ + grabs.c \ + initatoms.c \ + main.c \ + pixmap.c \ + privates.c \ + property.c \ + resource.c \ + swaprep.c \ + swapreq.c \ + tables.c \ + window.c \ + strcasecmp.c + +libxpstubs_la_SOURCES = \ + xpstubs.c + +INCLUDES = -I$(top_srcdir)/Xprint + +EXTRA_DIST = buildatoms BuiltInAtoms CHANGES Xserver.d Xserver-dtrace.h.in + +if XSERVER_DTRACE +# Generate dtrace header file for C sources to include +BUILT_SOURCES = Xserver-dtrace.h + +Xserver-dtrace.h: $(srcdir)/Xserver.d + $(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d \ + || cp Xserver-dtrace.h.in $@ + +# Generate dtrace object code for probes in libdix +dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS) + $(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o + +noinst_PROGRAMS = dix.O + +dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS) + ld -r -o $@ .libs/*.o +endif + +dix.c: + touch $@ + +CLEANFILES = dix.c diff --git a/xorg-server-1.4/dix/Makefile.in b/xorg-server-1.4/dix/Makefile.in new file mode 100644 index 0000000..ca5cffa --- /dev/null +++ b/xorg-server-1.4/dix/Makefile.in @@ -0,0 +1,732 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@XSERVER_DTRACE_TRUE@noinst_PROGRAMS = dix.O$(EXEEXT) +subdir = dix +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libdix_la_LIBADD = +am_libdix_la_OBJECTS = atom.lo colormap.lo cursor.lo devices.lo \ + dispatch.lo dixfonts.lo dixutils.lo events.lo extension.lo \ + ffs.lo gc.lo getevents.lo globals.lo glyphcurs.lo grabs.lo \ + initatoms.lo main.lo pixmap.lo privates.lo property.lo \ + resource.lo swaprep.lo swapreq.lo tables.lo window.lo \ + strcasecmp.lo +libdix_la_OBJECTS = $(am_libdix_la_OBJECTS) +libxpstubs_la_LIBADD = +am_libxpstubs_la_OBJECTS = xpstubs.lo +libxpstubs_la_OBJECTS = $(am_libxpstubs_la_OBJECTS) +PROGRAMS = $(noinst_PROGRAMS) +dix_O_SOURCES = dix.c +dix_O_OBJECTS = dix.$(OBJEXT) +dix_O_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libdix_la_SOURCES) $(libxpstubs_la_SOURCES) dix.c +DIST_SOURCES = $(libdix_la_SOURCES) $(libxpstubs_la_SOURCES) dix.c +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libdix.la libxpstubs.la +AM_CFLAGS = $(DIX_CFLAGS) \ + -DVENDOR_NAME=\""@VENDOR_NAME@"\" \ + -DVENDOR_RELEASE="@VENDOR_RELEASE@" + +libdix_la_SOURCES = \ + atom.c \ + colormap.c \ + cursor.c \ + devices.c \ + dispatch.c \ + dispatch.h \ + dixfonts.c \ + dixutils.c \ + events.c \ + extension.c \ + ffs.c \ + gc.c \ + getevents.c \ + globals.c \ + glyphcurs.c \ + grabs.c \ + initatoms.c \ + main.c \ + pixmap.c \ + privates.c \ + property.c \ + resource.c \ + swaprep.c \ + swapreq.c \ + tables.c \ + window.c \ + strcasecmp.c + +libxpstubs_la_SOURCES = \ + xpstubs.c + +INCLUDES = -I$(top_srcdir)/Xprint +EXTRA_DIST = buildatoms BuiltInAtoms CHANGES Xserver.d Xserver-dtrace.h.in + +# Generate dtrace header file for C sources to include +@XSERVER_DTRACE_TRUE@BUILT_SOURCES = Xserver-dtrace.h +CLEANFILES = dix.c +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign dix/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign dix/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libdix.la: $(libdix_la_OBJECTS) $(libdix_la_DEPENDENCIES) + $(LINK) $(libdix_la_OBJECTS) $(libdix_la_LIBADD) $(LIBS) +libxpstubs.la: $(libxpstubs_la_OBJECTS) $(libxpstubs_la_DEPENDENCIES) + $(LINK) $(libxpstubs_la_OBJECTS) $(libxpstubs_la_LIBADD) $(LIBS) + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +@XSERVER_DTRACE_FALSE@dix.O$(EXEEXT): $(dix_O_OBJECTS) $(dix_O_DEPENDENCIES) +@XSERVER_DTRACE_FALSE@ @rm -f dix.O$(EXEEXT) +@XSERVER_DTRACE_FALSE@ $(LINK) $(dix_O_OBJECTS) $(dix_O_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colormap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cursor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devices.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dispatch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dix.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dixfonts.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dixutils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/events.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extension.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ffs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getevents.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globals.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glyphcurs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grabs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/initatoms.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pixmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/privates.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/property.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swaprep.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swapreq.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tables.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/window.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpstubs.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) +installdirs: +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am + + +@XSERVER_DTRACE_TRUE@Xserver-dtrace.h: $(srcdir)/Xserver.d +@XSERVER_DTRACE_TRUE@ $(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d \ +@XSERVER_DTRACE_TRUE@ || cp Xserver-dtrace.h.in $@ + +# Generate dtrace object code for probes in libdix +@XSERVER_DTRACE_TRUE@dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS) +@XSERVER_DTRACE_TRUE@ $(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o + +@XSERVER_DTRACE_TRUE@dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS) +@XSERVER_DTRACE_TRUE@ ld -r -o $@ .libs/*.o + +dix.c: + touch $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/dix/Xserver-dtrace.h.in b/xorg-server-1.4/dix/Xserver-dtrace.h.in new file mode 100644 index 0000000..26a8b40 --- /dev/null +++ b/xorg-server-1.4/dix/Xserver-dtrace.h.in @@ -0,0 +1,100 @@ +/* Copyright 2006 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. + */ + +/* + * Generated by dtrace(1M), and then modified for backwards compatibility + * with older versions of dtrace. Used if dtrace -h fails. + * (Since _ENABLED support was added after dtrace -h, this assumes if + * dtrace -h fails, _ENABLED will too.) + */ + +#ifndef _XSERVER_DTRACE_H +#define _XSERVER_DTRACE_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#if _DTRACE_VERSION + +#define XSERVER_CLIENT_AUTH(arg0, arg1, arg2, arg3) \ + __dtrace_Xserver___client__auth(arg0, arg1, arg2, arg3) +#define XSERVER_CLIENT_CONNECT(arg0, arg1) \ + __dtrace_Xserver___client__connect(arg0, arg1) +#define XSERVER_CLIENT_DISCONNECT(arg0) \ + __dtrace_Xserver___client__disconnect(arg0) +#define XSERVER_REQUEST_DONE(arg0, arg1, arg2, arg3, arg4) \ + __dtrace_Xserver___request__done(arg0, arg1, arg2, arg3, arg4) +#define XSERVER_REQUEST_START(arg0, arg1, arg2, arg3, arg4) \ + __dtrace_Xserver___request__start(arg0, arg1, arg2, arg3, arg4) +#define XSERVER_RESOURCE_ALLOC(arg0, arg1, arg2, arg3) \ + __dtrace_Xserver___resource__alloc(arg0, arg1, arg2, arg3) +#define XSERVER_RESOURCE_FREE(arg0, arg1, arg2, arg3) \ + __dtrace_Xserver___resource__free(arg0, arg1, arg2, arg3) +#define XSERVER_SEND_EVENT(arg0, arg1, arg2) \ + __dtrace_Xserver___send__event(arg0, arg1, arg2) + + +extern void __dtrace_Xserver___client__auth(int, string, pid_t, zoneid_t); +extern void __dtrace_Xserver___client__connect(int, int); +extern void __dtrace_Xserver___client__disconnect(int); +extern void __dtrace_Xserver___request__done(string, uint8_t, uint32_t, int, int); +extern void __dtrace_Xserver___request__start(string, uint8_t, uint16_t, int, void *); +extern void __dtrace_Xserver___resource__alloc(uint32_t, uint32_t, void *, string); +extern void __dtrace_Xserver___resource__free(uint32_t, uint32_t, void *, string); +extern void __dtrace_Xserver___send__event(int, uint8_t, void *); + +#else + +#define XSERVER_CLIENT_AUTH(arg0, arg1, arg2, arg3) +#define XSERVER_CLIENT_CONNECT(arg0, arg1) +#define XSERVER_CLIENT_DISCONNECT(arg0) +#define XSERVER_REQUEST_DONE(arg0, arg1, arg2, arg3, arg4) +#define XSERVER_REQUEST_START(arg0, arg1, arg2, arg3, arg4) +#define XSERVER_RESOURCE_ALLOC(arg0, arg1, arg2, arg3) +#define XSERVER_RESOURCE_FREE(arg0, arg1, arg2, arg3) +#define XSERVER_SEND_EVENT(arg0, arg1, arg2) + +#endif + +#define XSERVER_CLIENT_AUTH_ENABLED() (1) +#define XSERVER_CLIENT_CONNECT_ENABLED() (1) +#define XSERVER_CLIENT_DISCONNECT_ENABLED() (1) +#define XSERVER_REQUEST_DONE_ENABLED() (1) +#define XSERVER_REQUEST_START_ENABLED() (1) +#define XSERVER_RESOURCE_ALLOC_ENABLED() (1) +#define XSERVER_RESOURCE_FREE_ENABLED() (1) +#define XSERVER_SEND_EVENT_ENABLED() (1) + +#ifdef __cplusplus +} +#endif + +#endif /* _XSERVER_DTRACE_H */ diff --git a/xorg-server-1.4/dix/Xserver.d b/xorg-server-1.4/dix/Xserver.d new file mode 100644 index 0000000..e4c9b83 --- /dev/null +++ b/xorg-server-1.4/dix/Xserver.d @@ -0,0 +1,59 @@ +/* Copyright 2005-2006 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. + */ + +/* + * Xserver dtrace provider definition + */ + +#include + +provider Xserver { + /* reqType, data, length, client id, request buffer */ + probe request__start(string, uint8_t, uint16_t, int, void *); + /* reqType, data, sequence, client id, result */ + probe request__done(string, uint8_t, uint32_t, int, int); + /* client id, client fd */ + probe client__connect(int, int); + /* client id, client address, client pid, client zone id */ + probe client__auth(int, string, pid_t, zoneid_t); + /* client id */ + probe client__disconnect(int); + /* resource id, resource type, value, resource type name */ + probe resource__alloc(uint32_t, uint32_t, void *, string); + /* resource id, resource type, value, resource type name */ + probe resource__free(uint32_t, uint32_t, void *, string); + /* client id, event type, event* */ + probe send__event(int, uint8_t, void *); +}; + +#pragma D attributes Unstable/Unstable/Common provider Xserver provider +#pragma D attributes Private/Private/Unknown provider Xserver module +#pragma D attributes Private/Private/Unknown provider Xserver function +#pragma D attributes Unstable/Unstable/Common provider Xserver name +#pragma D attributes Unstable/Unstable/Common provider Xserver args + diff --git a/xorg-server-1.4/dix/atom.c b/xorg-server-1.4/dix/atom.c new file mode 100644 index 0000000..6ae3e31 --- /dev/null +++ b/xorg-server-1.4/dix/atom.c @@ -0,0 +1,213 @@ +/*********************************************************** + +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 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. + +******************************************************************/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include "misc.h" +#include "resource.h" +#include "dix.h" + +#define InitialTableSize 100 + +typedef struct _Node { + struct _Node *left, *right; + Atom a; + unsigned int fingerPrint; + char *string; +} NodeRec, *NodePtr; + +static Atom lastAtom = None; +static NodePtr atomRoot = (NodePtr)NULL; +static unsigned long tableLength; +static NodePtr *nodeTable; + +void FreeAtom(NodePtr patom); + +_X_EXPORT Atom +MakeAtom(char *string, unsigned len, Bool makeit) +{ + NodePtr * np; + unsigned i; + int comp; + unsigned int fp = 0; + + np = &atomRoot; + for (i = 0; i < (len+1)/2; i++) + { + fp = fp * 27 + string[i]; + fp = fp * 27 + string[len - 1 - i]; + } + while (*np != (NodePtr) NULL) + { + if (fp < (*np)->fingerPrint) + np = &((*np)->left); + else if (fp > (*np)->fingerPrint) + np = &((*np)->right); + else + { /* now start testing the strings */ + comp = strncmp(string, (*np)->string, (int)len); + if ((comp < 0) || ((comp == 0) && (len < strlen((*np)->string)))) + np = &((*np)->left); + else if (comp > 0) + np = &((*np)->right); + else + return(*np)->a; + } + } + if (makeit) + { + NodePtr nd; + + nd = (NodePtr) xalloc(sizeof(NodeRec)); + if (!nd) + return BAD_RESOURCE; + if (lastAtom < XA_LAST_PREDEFINED) + { + nd->string = string; + } + else + { + nd->string = (char *) xalloc(len + 1); + if (!nd->string) { + xfree(nd); + return BAD_RESOURCE; + } + strncpy(nd->string, string, (int)len); + nd->string[len] = 0; + } + if ((lastAtom + 1) >= tableLength) { + NodePtr *table; + + table = (NodePtr *) xrealloc(nodeTable, + tableLength * (2 * sizeof(NodePtr))); + if (!table) { + if (nd->string != string) + xfree(nd->string); + xfree(nd); + return BAD_RESOURCE; + } + tableLength <<= 1; + nodeTable = table; + } + *np = nd; + nd->left = nd->right = (NodePtr) NULL; + nd->fingerPrint = fp; + nd->a = (++lastAtom); + *(nodeTable+lastAtom) = nd; + return nd->a; + } + else + return None; +} + +_X_EXPORT Bool +ValidAtom(Atom atom) +{ + return (atom != None) && (atom <= lastAtom); +} + +_X_EXPORT char * +NameForAtom(Atom atom) +{ + NodePtr node; + if (atom > lastAtom) return 0; + if ((node = nodeTable[atom]) == (NodePtr)NULL) return 0; + return node->string; +} + +void +AtomError(void) +{ + FatalError("initializing atoms"); +} + +void +FreeAtom(NodePtr patom) +{ + if(patom->left) + FreeAtom(patom->left); + if(patom->right) + FreeAtom(patom->right); + if (patom->a > XA_LAST_PREDEFINED) + xfree(patom->string); + xfree(patom); +} + +void +FreeAllAtoms(void) +{ + if(atomRoot == (NodePtr)NULL) + return; + FreeAtom(atomRoot); + atomRoot = (NodePtr)NULL; + xfree(nodeTable); + nodeTable = (NodePtr *)NULL; + lastAtom = None; +} + +void +InitAtoms(void) +{ + FreeAllAtoms(); + tableLength = InitialTableSize; + nodeTable = (NodePtr *)xalloc(InitialTableSize*sizeof(NodePtr)); + if (!nodeTable) + AtomError(); + nodeTable[None] = (NodePtr)NULL; + MakePredeclaredAtoms(); + if (lastAtom != XA_LAST_PREDEFINED) + AtomError (); +} + + diff --git a/xorg-server-1.4/dix/buildatoms b/xorg-server-1.4/dix/buildatoms new file mode 100644 index 0000000..dfbbca8 --- /dev/null +++ b/xorg-server-1.4/dix/buildatoms @@ -0,0 +1,43 @@ +#!/bin/sh +hfile=../../../include/Xatom.h +cfile=initatoms.c +rm -f $hfile $cfile +umask 222 +awk ' +BEGIN { + hfile = "'$hfile'"; + cfile = "'$cfile'"; + hformat = "#define XA_%s ((Atom) %d)\n"; + printf("#ifndef XATOM_H\n") > hfile; + printf("#define XATOM_H 1\n\n") > hfile; + printf("/* THIS IS A GENERATED FILE\n") > hfile; + printf(" *\n") > hfile; + printf(" * Do not change! Changing this file implies a protocol change!\n") > hfile; + printf(" */\n\n") > hfile; + + printf("/* THIS IS A GENERATED FILE\n") > cfile; + printf(" *\n") > cfile; + printf(" * Do not change! Changing this file implies a protocol change!\n") > cfile; + printf(" */\n\n") > cfile; + printf("#include \"X.h\"\n") > cfile; + printf("#include \"Xatom.h\"\n") > cfile; + printf("#include \"misc.h\"\n") > cfile; + printf("#include \"dix.h\"\n") > cfile; + printf("void MakePredeclaredAtoms()\n") > cfile; + printf("{\n") > cfile; + + } + +NF == 2 && $2 == "@" { + printf(hformat, $1, ++atomno) > hfile ; + printf(" if (MakeAtom(\"%s\", %d, 1) != XA_%s) AtomError();\n", $1, length($1), $1) > cfile ; + } + +END { + printf("\n") > hfile; + printf(hformat, "LAST_PREDEFINED", atomno) > hfile ; + printf("#endif /* XATOM_H */\n") > hfile; + printf("}\n") > cfile ; + } +' BuiltInAtoms +exit 0 diff --git a/xorg-server-1.4/dix/colormap.c b/xorg-server-1.4/dix/colormap.c new file mode 100644 index 0000000..73b6669 --- /dev/null +++ b/xorg-server-1.4/dix/colormap.c @@ -0,0 +1,2699 @@ +/*********************************************************** + +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 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. + +******************************************************************/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#define NEED_EVENTS +#include +#include +#include +#include +#include "misc.h" +#include "dix.h" +#include "colormapst.h" +#include "os.h" +#include "scrnintstr.h" +#include "resource.h" +#include "windowstr.h" + +extern XID clientErrorValue; +extern int colormapPrivateCount; + +static Pixel FindBestPixel( + EntryPtr /*pentFirst*/, + int /*size*/, + xrgb * /*prgb*/, + int /*channel*/ +); + +static int AllComp( + EntryPtr /*pent*/, + xrgb * /*prgb*/ +); + +static int RedComp( + EntryPtr /*pent*/, + xrgb * /*prgb*/ +); + +static int GreenComp( + EntryPtr /*pent*/, + xrgb * /*prgb*/ +); + +static int BlueComp( + EntryPtr /*pent*/, + xrgb * /*prgb*/ +); + +static void FreePixels( + ColormapPtr /*pmap*/, + int /*client*/ +); + +static void CopyFree( + int /*channel*/, + int /*client*/, + ColormapPtr /*pmapSrc*/, + ColormapPtr /*pmapDst*/ +); + +static void FreeCell( + ColormapPtr /*pmap*/, + Pixel /*i*/, + int /*channel*/ +); + +static void UpdateColors( + ColormapPtr /*pmap*/ +); + +static int AllocDirect( + int /*client*/, + ColormapPtr /*pmap*/, + int /*c*/, + int /*r*/, + int /*g*/, + int /*b*/, + Bool /*contig*/, + Pixel * /*pixels*/, + Pixel * /*prmask*/, + Pixel * /*pgmask*/, + Pixel * /*pbmask*/ +); + +static int AllocPseudo( + int /*client*/, + ColormapPtr /*pmap*/, + int /*c*/, + int /*r*/, + Bool /*contig*/, + Pixel * /*pixels*/, + Pixel * /*pmask*/, + Pixel ** /*pppixFirst*/ +); + +static Bool AllocCP( + ColormapPtr /*pmap*/, + EntryPtr /*pentFirst*/, + int /*count*/, + int /*planes*/, + Bool /*contig*/, + Pixel * /*pixels*/, + Pixel * /*pMask*/ +); + +static Bool AllocShared( + ColormapPtr /*pmap*/, + Pixel * /*ppix*/, + int /*c*/, + int /*r*/, + int /*g*/, + int /*b*/, + Pixel /*rmask*/, + Pixel /*gmask*/, + Pixel /*bmask*/, + Pixel * /*ppixFirst*/ +); + +static int FreeCo( + ColormapPtr /*pmap*/, + int /*client*/, + int /*color*/, + int /*npixIn*/, + Pixel * /*ppixIn*/, + Pixel /*mask*/ +); + +static int TellNoMap( + WindowPtr /*pwin*/, + Colormap * /*pmid*/ +); + +static void FindColorInRootCmap ( + ColormapPtr /* pmap */, + EntryPtr /* pentFirst */, + int /* size */, + xrgb* /* prgb */, + Pixel* /* pPixel */, + int /* channel */, + ColorCompareProcPtr /* comp */ +); + +#define NUMRED(vis) ((vis->redMask >> vis->offsetRed) + 1) +#define NUMGREEN(vis) ((vis->greenMask >> vis->offsetGreen) + 1) +#define NUMBLUE(vis) ((vis->blueMask >> vis->offsetBlue) + 1) +#if COMPOSITE +#define ALPHAMASK(vis) ((vis)->nplanes < 32 ? 0 : \ + (CARD32) ~((vis)->redMask|(vis)->greenMask|(vis)->blueMask)) +#else +#define ALPHAMASK(vis) 0 +#endif + +#define RGBMASK(vis) (vis->redMask | vis->greenMask | vis->blueMask | ALPHAMASK(vis)) + +/* GetNextBitsOrBreak(bits, mask, base) -- + * (Suggestion: First read the macro, then read this explanation. + * + * Either generate the next value to OR in to a pixel or break out of this + * while loop + * + * This macro is used when we're trying to generate all 2^n combinations of + * bits in mask. What we're doing here is counting in binary, except that + * the bits we use to count may not be contiguous. This macro will be + * called 2^n times, returning a different value in bits each time. Then + * it will cause us to break out of a surrounding loop. (It will always be + * called from within a while loop.) + * On call: mask is the value we want to find all the combinations for + * base has 1 bit set where the least significant bit of mask is set + * + * For example,if mask is 01010, base should be 0010 and we count like this: + * 00010 (see this isn't so hard), + * then we add base to bits and get 0100. (bits & ~mask) is (0100 & 0100) so + * we add that to bits getting (0100 + 0100) = + * 01000 for our next value. + * then we add 0010 to get + * 01010 and we're done (easy as 1, 2, 3) + */ +#define GetNextBitsOrBreak(bits, mask, base) \ + if((bits) == (mask)) \ + break; \ + (bits) += (base); \ + while((bits) & ~(mask)) \ + (bits) += ((bits) & ~(mask)); +/* ID of server as client */ +#define SERVER_ID 0 + +typedef struct _colorResource +{ + Colormap mid; + int client; +} colorResource; + +/* Invariants: + * refcnt == 0 means entry is empty + * refcnt > 0 means entry is useable by many clients, so it can't be changed + * refcnt == AllocPrivate means entry owned by one client only + * fShared should only be set if refcnt == AllocPrivate, and only in red map + */ + + +/** + * Create and initialize the color map + * + * \param mid resource to use for this colormap + * \param alloc 1 iff all entries are allocated writable + */ +_X_EXPORT int +CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, + ColormapPtr *ppcmap, int alloc, int client) +{ + int class, size; + unsigned long sizebytes; + ColormapPtr pmap; + EntryPtr pent; + int i; + Pixel *ppix, **pptr; + + class = pVisual->class; + if(!(class & DynamicClass) && (alloc != AllocNone) && (client != SERVER_ID)) + return (BadMatch); + + size = pVisual->ColormapEntries; + sizebytes = (size * sizeof(Entry)) + + (MAXCLIENTS * sizeof(Pixel *)) + + (MAXCLIENTS * sizeof(int)); + if ((class | DynamicClass) == DirectColor) + sizebytes *= 3; + sizebytes += sizeof(ColormapRec); + pmap = (ColormapPtr) xalloc(sizebytes); + if (!pmap) + return (BadAlloc); +#if defined(_XSERVER64) + pmap->pad0 = 0; + pmap->pad1 = 0; +#if (X_BYTE_ORDER == X_LITTLE_ENDIAN) + pmap->pad2 = 0; +#endif +#endif + pmap->red = (EntryPtr)((char *)pmap + sizeof(ColormapRec)); + sizebytes = size * sizeof(Entry); + pmap->clientPixelsRed = (Pixel **)((char *)pmap->red + sizebytes); + pmap->numPixelsRed = (int *)((char *)pmap->clientPixelsRed + + (MAXCLIENTS * sizeof(Pixel *))); + pmap->mid = mid; + pmap->flags = 0; /* start out with all flags clear */ + if(mid == pScreen->defColormap) + pmap->flags |= IsDefault; + pmap->pScreen = pScreen; + pmap->pVisual = pVisual; + pmap->class = class; + if ((class | DynamicClass) == DirectColor) + size = NUMRED(pVisual); + pmap->freeRed = size; + bzero ((char *) pmap->red, (int)sizebytes); + bzero((char *) pmap->numPixelsRed, MAXCLIENTS * sizeof(int)); + for (pptr = &pmap->clientPixelsRed[MAXCLIENTS]; --pptr >= pmap->clientPixelsRed; ) + *pptr = (Pixel *)NULL; + if (alloc == AllocAll) + { + if (class & DynamicClass) + pmap->flags |= AllAllocated; + for (pent = &pmap->red[size - 1]; pent >= pmap->red; pent--) + pent->refcnt = AllocPrivate; + pmap->freeRed = 0; + ppix = (Pixel *)xalloc(size * sizeof(Pixel)); + if (!ppix) + { + xfree(pmap); + return (BadAlloc); + } + pmap->clientPixelsRed[client] = ppix; + for(i = 0; i < size; i++) + ppix[i] = i; + pmap->numPixelsRed[client] = size; + } + + if ((class | DynamicClass) == DirectColor) + { + pmap->freeGreen = NUMGREEN(pVisual); + pmap->green = (EntryPtr)((char *)pmap->numPixelsRed + + (MAXCLIENTS * sizeof(int))); + pmap->clientPixelsGreen = (Pixel **)((char *)pmap->green + sizebytes); + pmap->numPixelsGreen = (int *)((char *)pmap->clientPixelsGreen + + (MAXCLIENTS * sizeof(Pixel *))); + pmap->freeBlue = NUMBLUE(pVisual); + pmap->blue = (EntryPtr)((char *)pmap->numPixelsGreen + + (MAXCLIENTS * sizeof(int))); + pmap->clientPixelsBlue = (Pixel **)((char *)pmap->blue + sizebytes); + pmap->numPixelsBlue = (int *)((char *)pmap->clientPixelsBlue + + (MAXCLIENTS * sizeof(Pixel *))); + + bzero ((char *) pmap->green, (int)sizebytes); + bzero ((char *) pmap->blue, (int)sizebytes); + + memmove((char *) pmap->clientPixelsGreen, + (char *) pmap->clientPixelsRed, + MAXCLIENTS * sizeof(Pixel *)); + memmove((char *) pmap->clientPixelsBlue, + (char *) pmap->clientPixelsRed, + MAXCLIENTS * sizeof(Pixel *)); + bzero((char *) pmap->numPixelsGreen, MAXCLIENTS * sizeof(int)); + bzero((char *) pmap->numPixelsBlue, MAXCLIENTS * sizeof(int)); + + /* If every cell is allocated, mark its refcnt */ + if (alloc == AllocAll) + { + size = pmap->freeGreen; + for(pent = &pmap->green[size-1]; pent >= pmap->green; pent--) + pent->refcnt = AllocPrivate; + pmap->freeGreen = 0; + ppix = (Pixel *) xalloc(size * sizeof(Pixel)); + if (!ppix) + { + xfree(pmap->clientPixelsRed[client]); + xfree(pmap); + return(BadAlloc); + } + pmap->clientPixelsGreen[client] = ppix; + for(i = 0; i < size; i++) + ppix[i] = i; + pmap->numPixelsGreen[client] = size; + + size = pmap->freeBlue; + for(pent = &pmap->blue[size-1]; pent >= pmap->blue; pent--) + pent->refcnt = AllocPrivate; + pmap->freeBlue = 0; + ppix = (Pixel *) xalloc(size * sizeof(Pixel)); + if (!ppix) + { + xfree(pmap->clientPixelsGreen[client]); + xfree(pmap->clientPixelsRed[client]); + xfree(pmap); + return(BadAlloc); + } + pmap->clientPixelsBlue[client] = ppix; + for(i = 0; i < size; i++) + ppix[i] = i; + pmap->numPixelsBlue[client] = size; + } + } + if (!AddResource(mid, RT_COLORMAP, (pointer)pmap)) + return (BadAlloc); + /* If the device wants a chance to initialize the colormap in any way, + * this is it. In specific, if this is a Static colormap, this is the + * time to fill in the colormap's values */ + pmap->flags |= BeingCreated; + + + /* + * Allocate the array of devPrivate's for this colormap. + */ + + if (colormapPrivateCount == 0) + pmap->devPrivates = NULL; + else + { + pmap->devPrivates = (DevUnion *) xcalloc ( + sizeof(DevUnion), colormapPrivateCount); + if (!pmap->devPrivates) + { + FreeResource (mid, RT_NONE); + return BadAlloc; + } + } + + if (!(*pScreen->CreateColormap)(pmap)) + { + FreeResource (mid, RT_NONE); + return BadAlloc; + } + pmap->flags &= ~BeingCreated; + *ppcmap = pmap; + return (Success); +} + +/** + * + * \param value must conform to DeleteType + */ +int +FreeColormap (pointer value, XID mid) +{ + int i; + EntryPtr pent; + ColormapPtr pmap = (ColormapPtr)value; + + if(CLIENT_ID(mid) != SERVER_ID) + { + (*pmap->pScreen->UninstallColormap) (pmap); + WalkTree(pmap->pScreen, (VisitWindowProcPtr)TellNoMap, (pointer) &mid); + } + + /* This is the device's chance to undo anything it needs to, especially + * to free any storage it allocated */ + (*pmap->pScreen->DestroyColormap)(pmap); + + if(pmap->clientPixelsRed) + { + for(i = 0; i < MAXCLIENTS; i++) + xfree(pmap->clientPixelsRed[i]); + } + + if ((pmap->class == PseudoColor) || (pmap->class == GrayScale)) + { + for(pent = &pmap->red[pmap->pVisual->ColormapEntries - 1]; + pent >= pmap->red; + pent--) + { + if(pent->fShared) + { + if (--pent->co.shco.red->refcnt == 0) + xfree(pent->co.shco.red); + if (--pent->co.shco.green->refcnt == 0) + xfree(pent->co.shco.green); + if (--pent->co.shco.blue->refcnt == 0) + xfree(pent->co.shco.blue); + } + } + } + if((pmap->class | DynamicClass) == DirectColor) + { + for(i = 0; i < MAXCLIENTS; i++) + { + xfree(pmap->clientPixelsGreen[i]); + xfree(pmap->clientPixelsBlue[i]); + } + } + + if (pmap->devPrivates) + xfree(pmap->devPrivates); + + xfree(pmap); + return(Success); +} + +/* Tell window that pmid has disappeared */ +static int +TellNoMap (WindowPtr pwin, Colormap *pmid) +{ + xEvent xE; + + if (wColormap(pwin) == *pmid) + { + /* This should be call to DeliverEvent */ + xE.u.u.type = ColormapNotify; + xE.u.colormap.window = pwin->drawable.id; + xE.u.colormap.colormap = None; + xE.u.colormap.new = TRUE; + xE.u.colormap.state = ColormapUninstalled; +#ifdef PANORAMIX + if(noPanoramiXExtension || !pwin->drawable.pScreen->myNum) +#endif + DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL); + if (pwin->optional) { + pwin->optional->colormap = None; + CheckWindowOptionalNeed (pwin); + } + } + + return (WT_WALKCHILDREN); +} + +/* Tell window that pmid got uninstalled */ +_X_EXPORT int +TellLostMap (WindowPtr pwin, pointer value) +{ + Colormap *pmid = (Colormap *)value; + xEvent xE; + +#ifdef PANORAMIX + if(!noPanoramiXExtension && pwin->drawable.pScreen->myNum) + return WT_STOPWALKING; +#endif + if (wColormap(pwin) == *pmid) + { + /* This should be call to DeliverEvent */ + xE.u.u.type = ColormapNotify; + xE.u.colormap.window = pwin->drawable.id; + xE.u.colormap.colormap = *pmid; + xE.u.colormap.new = FALSE; + xE.u.colormap.state = ColormapUninstalled; + DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL); + } + + return (WT_WALKCHILDREN); +} + +/* Tell window that pmid got installed */ +_X_EXPORT int +TellGainedMap (WindowPtr pwin, pointer value) +{ + Colormap *pmid = (Colormap *)value; + xEvent xE; + +#ifdef PANORAMIX + if(!noPanoramiXExtension && pwin->drawable.pScreen->myNum) + return WT_STOPWALKING; +#endif + if (wColormap (pwin) == *pmid) + { + /* This should be call to DeliverEvent */ + xE.u.u.type = ColormapNotify; + xE.u.colormap.window = pwin->drawable.id; + xE.u.colormap.colormap = *pmid; + xE.u.colormap.new = FALSE; + xE.u.colormap.state = ColormapInstalled; + DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL); + } + + return (WT_WALKCHILDREN); +} + + +int +CopyColormapAndFree (Colormap mid, ColormapPtr pSrc, int client) +{ + ColormapPtr pmap = (ColormapPtr) NULL; + int result, alloc, size; + Colormap midSrc; + ScreenPtr pScreen; + VisualPtr pVisual; + + pScreen = pSrc->pScreen; + pVisual = pSrc->pVisual; + midSrc = pSrc->mid; + alloc = ((pSrc->flags & AllAllocated) && CLIENT_ID(midSrc) == client) ? + AllocAll : AllocNone; + size = pVisual->ColormapEntries; + + /* If the create returns non-0, it failed */ + result = CreateColormap (mid, pScreen, pVisual, &pmap, alloc, client); + if(result != Success) + return(result); + if(alloc == AllocAll) + { + memmove((char *)pmap->red, (char *)pSrc->red, size * sizeof(Entry)); + if((pmap->class | DynamicClass) == DirectColor) + { + memmove((char *)pmap->green, (char *)pSrc->green, size * sizeof(Entry)); + memmove((char *)pmap->blue, (char *)pSrc->blue, size * sizeof(Entry)); + } + pSrc->flags &= ~AllAllocated; + FreePixels(pSrc, client); + UpdateColors(pmap); + return(Success); + } + + CopyFree(REDMAP, client, pSrc, pmap); + if ((pmap->class | DynamicClass) == DirectColor) + { + CopyFree(GREENMAP, client, pSrc, pmap); + CopyFree(BLUEMAP, client, pSrc, pmap); + } + if (pmap->class & DynamicClass) + UpdateColors(pmap); + /* XXX should worry about removing any RT_CMAPENTRY resource */ + return(Success); +} + +/* Helper routine for freeing large numbers of cells from a map */ +static void +CopyFree (int channel, int client, ColormapPtr pmapSrc, ColormapPtr pmapDst) +{ + int z, npix; + EntryPtr pentSrcFirst, pentDstFirst; + EntryPtr pentSrc, pentDst; + Pixel *ppix; + int nalloc; + + switch(channel) + { + default: /* so compiler can see that everything gets initialized */ + case REDMAP: + ppix = (pmapSrc->clientPixelsRed)[client]; + npix = (pmapSrc->numPixelsRed)[client]; + pentSrcFirst = pmapSrc->red; + pentDstFirst = pmapDst->red; + break; + case GREENMAP: + ppix = (pmapSrc->clientPixelsGreen)[client]; + npix = (pmapSrc->numPixelsGreen)[client]; + pentSrcFirst = pmapSrc->green; + pentDstFirst = pmapDst->green; + break; + case BLUEMAP: + ppix = (pmapSrc->clientPixelsBlue)[client]; + npix = (pmapSrc->numPixelsBlue)[client]; + pentSrcFirst = pmapSrc->blue; + pentDstFirst = pmapDst->blue; + break; + } + nalloc = 0; + if (pmapSrc->class & DynamicClass) + { + for(z = npix; --z >= 0; ppix++) + { + /* Copy entries */ + pentSrc = pentSrcFirst + *ppix; + pentDst = pentDstFirst + *ppix; + if (pentDst->refcnt > 0) + { + pentDst->refcnt++; + } + else + { + *pentDst = *pentSrc; + nalloc++; + if (pentSrc->refcnt > 0) + pentDst->refcnt = 1; + else + pentSrc->fShared = FALSE; + } + FreeCell(pmapSrc, *ppix, channel); + } + } + + /* Note that FreeCell has already fixed pmapSrc->free{Color} */ + switch(channel) + { + case REDMAP: + pmapDst->freeRed -= nalloc; + (pmapDst->clientPixelsRed)[client] = + (pmapSrc->clientPixelsRed)[client]; + (pmapSrc->clientPixelsRed)[client] = (Pixel *) NULL; + (pmapDst->numPixelsRed)[client] = (pmapSrc->numPixelsRed)[client]; + (pmapSrc->numPixelsRed)[client] = 0; + break; + case GREENMAP: + pmapDst->freeGreen -= nalloc; + (pmapDst->clientPixelsGreen)[client] = + (pmapSrc->clientPixelsGreen)[client]; + (pmapSrc->clientPixelsGreen)[client] = (Pixel *) NULL; + (pmapDst->numPixelsGreen)[client] = (pmapSrc->numPixelsGreen)[client]; + (pmapSrc->numPixelsGreen)[client] = 0; + break; + case BLUEMAP: + pmapDst->freeBlue -= nalloc; + pmapDst->clientPixelsBlue[client] = pmapSrc->clientPixelsBlue[client]; + pmapSrc->clientPixelsBlue[client] = (Pixel *) NULL; + pmapDst->numPixelsBlue[client] = pmapSrc->numPixelsBlue[client]; + pmapSrc->numPixelsBlue[client] = 0; + break; + } +} + +/* Free the ith entry in a color map. Must handle freeing of + * colors allocated through AllocColorPlanes */ +static void +FreeCell (ColormapPtr pmap, Pixel i, int channel) +{ + EntryPtr pent; + int *pCount; + + + switch (channel) + { + default: /* so compiler can see that everything gets initialized */ + case PSEUDOMAP: + case REDMAP: + pent = (EntryPtr) &pmap->red[i]; + pCount = &pmap->freeRed; + break; + case GREENMAP: + pent = (EntryPtr) &pmap->green[i]; + pCount = &pmap->freeGreen; + break; + case BLUEMAP: + pent = (EntryPtr) &pmap->blue[i]; + pCount = &pmap->freeBlue; + break; + } + /* If it's not privately allocated and it's not time to free it, just + * decrement the count */ + if (pent->refcnt > 1) + pent->refcnt--; + else + { + /* If the color type is shared, find the sharedcolor. If decremented + * refcnt is 0, free the shared cell. */ + if (pent->fShared) + { + if(--pent->co.shco.red->refcnt == 0) + xfree(pent->co.shco.red); + if(--pent->co.shco.green->refcnt == 0) + xfree(pent->co.shco.green); + if(--pent->co.shco.blue->refcnt == 0) + xfree(pent->co.shco.blue); + pent->fShared = FALSE; + } + pent->refcnt = 0; + *pCount += 1; + } +} + +static void +UpdateColors (ColormapPtr pmap) +{ + xColorItem *defs; + xColorItem *pdef; + EntryPtr pent; + VisualPtr pVisual; + int i, n, size; + + pVisual = pmap->pVisual; + size = pVisual->ColormapEntries; + defs = (xColorItem *)ALLOCATE_LOCAL(size * sizeof(xColorItem)); + if (!defs) + return; + n = 0; + pdef = defs; + if (pmap->class == DirectColor) + { + for (i = 0; i < size; i++) + { + if (!pmap->red[i].refcnt && + !pmap->green[i].refcnt && + !pmap->blue[i].refcnt) + continue; + pdef->pixel = ((Pixel)i << pVisual->offsetRed) | + ((Pixel)i << pVisual->offsetGreen) | + ((Pixel)i << pVisual->offsetBlue); + pdef->red = pmap->red[i].co.local.red; + pdef->green = pmap->green[i].co.local.green; + pdef->blue = pmap->blue[i].co.local.blue; + pdef->flags = DoRed|DoGreen|DoBlue; + pdef++; + n++; + } + } + else + { + for (i = 0, pent = pmap->red; i < size; i++, pent++) + { + if (!pent->refcnt) + continue; + pdef->pixel = i; + if(pent->fShared) + { + pdef->red = pent->co.shco.red->color; + pdef->green = pent->co.shco.green->color; + pdef->blue = pent->co.shco.blue->color; + } + else + { + pdef->red = pent->co.local.red; + pdef->green = pent->co.local.green; + pdef->blue = pent->co.local.blue; + } + pdef->flags = DoRed|DoGreen|DoBlue; + pdef++; + n++; + } + } + if (n) + (*pmap->pScreen->StoreColors)(pmap, n, defs); + DEALLOCATE_LOCAL(defs); +} + +/* Get a read-only color from a ColorMap (probably slow for large maps) + * Returns by changing the value in pred, pgreen, pblue and pPix + */ +_X_EXPORT int +AllocColor (ColormapPtr pmap, + unsigned short *pred, unsigned short *pgreen, unsigned short *pblue, + Pixel *pPix, int client) +{ + Pixel pixR, pixG, pixB; + int entries; + xrgb rgb; + int class; + VisualPtr pVisual; + int npix; + Pixel *ppix; + + pVisual = pmap->pVisual; + (*pmap->pScreen->ResolveColor) (pred, pgreen, pblue, pVisual); + rgb.red = *pred; + rgb.green = *pgreen; + rgb.blue = *pblue; + class = pmap->class; + entries = pVisual->ColormapEntries; + + /* If the colormap is being created, then we want to be able to change + * the colormap, even if it's a static type. Otherwise, we'd never be + * able to initialize static colormaps + */ + if(pmap->flags & BeingCreated) + class |= DynamicClass; + + /* If this is one of the static storage classes, and we're not initializing + * it, the best we can do is to find the closest color entry to the + * requested one and return that. + */ + switch (class) { + case StaticColor: + case StaticGray: + /* Look up all three components in the same pmap */ + *pPix = pixR = FindBestPixel(pmap->red, entries, &rgb, PSEUDOMAP); + *pred = pmap->red[pixR].co.local.red; + *pgreen = pmap->red[pixR].co.local.green; + *pblue = pmap->red[pixR].co.local.blue; + npix = pmap->numPixelsRed[client]; + ppix = (Pixel *) xrealloc(pmap->clientPixelsRed[client], + (npix + 1) * sizeof(Pixel)); + if (!ppix) + return (BadAlloc); + ppix[npix] = pixR; + pmap->clientPixelsRed[client] = ppix; + pmap->numPixelsRed[client]++; + break; + + case TrueColor: + /* Look up each component in its own map, then OR them together */ + pixR = FindBestPixel(pmap->red, NUMRED(pVisual), &rgb, REDMAP); + pixG = FindBestPixel(pmap->green, NUMGREEN(pVisual), &rgb, GREENMAP); + pixB = FindBestPixel(pmap->blue, NUMBLUE(pVisual), &rgb, BLUEMAP); + *pPix = (pixR << pVisual->offsetRed) | + (pixG << pVisual->offsetGreen) | + (pixB << pVisual->offsetBlue) | + ALPHAMASK(pVisual); + + *pred = pmap->red[pixR].co.local.red; + *pgreen = pmap->green[pixG].co.local.green; + *pblue = pmap->blue[pixB].co.local.blue; + npix = pmap->numPixelsRed[client]; + ppix = (Pixel *) xrealloc(pmap->clientPixelsRed[client], + (npix + 1) * sizeof(Pixel)); + if (!ppix) + return (BadAlloc); + ppix[npix] = pixR; + pmap->clientPixelsRed[client] = ppix; + npix = pmap->numPixelsGreen[client]; + ppix = (Pixel *) xrealloc(pmap->clientPixelsGreen[client], + (npix + 1) * sizeof(Pixel)); + if (!ppix) + return (BadAlloc); + ppix[npix] = pixG; + pmap->clientPixelsGreen[client] = ppix; + npix = pmap->numPixelsBlue[client]; + ppix = (Pixel *) xrealloc(pmap->clientPixelsBlue[client], + (npix + 1) * sizeof(Pixel)); + if (!ppix) + return (BadAlloc); + ppix[npix] = pixB; + pmap->clientPixelsBlue[client] = ppix; + pmap->numPixelsRed[client]++; + pmap->numPixelsGreen[client]++; + pmap->numPixelsBlue[client]++; + break; + + case GrayScale: + case PseudoColor: + if (pmap->mid != pmap->pScreen->defColormap && + pmap->pVisual->vid == pmap->pScreen->rootVisual) + { + ColormapPtr prootmap = (ColormapPtr) + SecurityLookupIDByType (clients[client], pmap->pScreen->defColormap, + RT_COLORMAP, DixReadAccess); + + if (pmap->class == prootmap->class) + FindColorInRootCmap (prootmap, prootmap->red, entries, &rgb, + pPix, PSEUDOMAP, AllComp); + } + if (FindColor(pmap, pmap->red, entries, &rgb, pPix, PSEUDOMAP, + client, AllComp) != Success) + return (BadAlloc); + break; + + case DirectColor: + if (pmap->mid != pmap->pScreen->defColormap && + pmap->pVisual->vid == pmap->pScreen->rootVisual) + { + ColormapPtr prootmap = (ColormapPtr) + SecurityLookupIDByType (clients[client], pmap->pScreen->defColormap, + RT_COLORMAP, DixReadAccess); + + if (pmap->class == prootmap->class) + { + pixR = (*pPix & pVisual->redMask) >> pVisual->offsetRed; + FindColorInRootCmap (prootmap, prootmap->red, entries, &rgb, + &pixR, REDMAP, RedComp); + pixG = (*pPix & pVisual->greenMask) >> pVisual->offsetGreen; + FindColorInRootCmap (prootmap, prootmap->green, entries, &rgb, + &pixG, GREENMAP, GreenComp); + pixB = (*pPix & pVisual->blueMask) >> pVisual->offsetBlue; + FindColorInRootCmap (prootmap, prootmap->blue, entries, &rgb, + &pixB, BLUEMAP, BlueComp); + *pPix = pixR | pixG | pixB; + } + } + + pixR = (*pPix & pVisual->redMask) >> pVisual->offsetRed; + if (FindColor(pmap, pmap->red, NUMRED(pVisual), &rgb, &pixR, REDMAP, + client, RedComp) != Success) + return (BadAlloc); + pixG = (*pPix & pVisual->greenMask) >> pVisual->offsetGreen; + if (FindColor(pmap, pmap->green, NUMGREEN(pVisual), &rgb, &pixG, + GREENMAP, client, GreenComp) != Success) + { + (void)FreeCo(pmap, client, REDMAP, 1, &pixR, (Pixel)0); + return (BadAlloc); + } + pixB = (*pPix & pVisual->blueMask) >> pVisual->offsetBlue; + if (FindColor(pmap, pmap->blue, NUMBLUE(pVisual), &rgb, &pixB, BLUEMAP, + client, BlueComp) != Success) + { + (void)FreeCo(pmap, client, GREENMAP, 1, &pixG, (Pixel)0); + (void)FreeCo(pmap, client, REDMAP, 1, &pixR, (Pixel)0); + return (BadAlloc); + } + *pPix = pixR | pixG | pixB | ALPHAMASK(pVisual); + + break; + } + + /* if this is the client's first pixel in this colormap, tell the + * resource manager that the client has pixels in this colormap which + * should be freed when the client dies */ + if ((pmap->numPixelsRed[client] == 1) && + (CLIENT_ID(pmap->mid) != client) && + !(pmap->flags & BeingCreated)) + { + colorResource *pcr; + + pcr = (colorResource *) xalloc(sizeof(colorResource)); + if (!pcr) + { + (void)FreeColors(pmap, client, 1, pPix, (Pixel)0); + return (BadAlloc); + } + pcr->mid = pmap->mid; + pcr->client = client; + if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (pointer)pcr)) + return (BadAlloc); + } + return (Success); +} + +/* + * FakeAllocColor -- fake an AllocColor request by + * returning a free pixel if availible, otherwise returning + * the closest matching pixel. This is used by the mi + * software sprite code to recolor cursors. A nice side-effect + * is that this routine will never return failure. + */ + +_X_EXPORT void +FakeAllocColor (ColormapPtr pmap, xColorItem *item) +{ + Pixel pixR, pixG, pixB; + Pixel temp; + int entries; + xrgb rgb; + int class; + VisualPtr pVisual; + + pVisual = pmap->pVisual; + rgb.red = item->red; + rgb.green = item->green; + rgb.blue = item->blue; + (*pmap->pScreen->ResolveColor) (&rgb.red, &rgb.green, &rgb.blue, pVisual); + class = pmap->class; + entries = pVisual->ColormapEntries; + + switch (class) { + case GrayScale: + case PseudoColor: + item->pixel = 0; + if (FindColor(pmap, pmap->red, entries, &rgb, &temp, PSEUDOMAP, + -1, AllComp) == Success) { + item->pixel = temp; + break; + } + /* fall through ... */ + case StaticColor: + case StaticGray: + item->pixel = FindBestPixel(pmap->red, entries, &rgb, PSEUDOMAP); + break; + + case DirectColor: + /* Look up each component in its own map, then OR them together */ + pixR = (item->pixel & pVisual->redMask) >> pVisual->offsetRed; + pixG = (item->pixel & pVisual->greenMask) >> pVisual->offsetGreen; + pixB = (item->pixel & pVisual->blueMask) >> pVisual->offsetBlue; + if (FindColor(pmap, pmap->red, NUMRED(pVisual), &rgb, &pixR, REDMAP, + -1, RedComp) != Success) + pixR = FindBestPixel(pmap->red, NUMRED(pVisual), &rgb, REDMAP) + << pVisual->offsetRed; + if (FindColor(pmap, pmap->green, NUMGREEN(pVisual), &rgb, &pixG, + GREENMAP, -1, GreenComp) != Success) + pixG = FindBestPixel(pmap->green, NUMGREEN(pVisual), &rgb, + GREENMAP) << pVisual->offsetGreen; + if (FindColor(pmap, pmap->blue, NUMBLUE(pVisual), &rgb, &pixB, BLUEMAP, + -1, BlueComp) != Success) + pixB = FindBestPixel(pmap->blue, NUMBLUE(pVisual), &rgb, BLUEMAP) + << pVisual->offsetBlue; + item->pixel = pixR | pixG | pixB; + break; + + case TrueColor: + /* Look up each component in its own map, then OR them together */ + pixR = FindBestPixel(pmap->red, NUMRED(pVisual), &rgb, REDMAP); + pixG = FindBestPixel(pmap->green, NUMGREEN(pVisual), &rgb, GREENMAP); + pixB = FindBestPixel(pmap->blue, NUMBLUE(pVisual), &rgb, BLUEMAP); + item->pixel = (pixR << pVisual->offsetRed) | + (pixG << pVisual->offsetGreen) | + (pixB << pVisual->offsetBlue); + break; + } +} + +/* free a pixel value obtained from FakeAllocColor */ +_X_EXPORT void +FakeFreeColor(ColormapPtr pmap, Pixel pixel) +{ + VisualPtr pVisual; + Pixel pixR, pixG, pixB; + + switch (pmap->class) { + case GrayScale: + case PseudoColor: + if (pmap->red[pixel].refcnt == AllocTemporary) + pmap->red[pixel].refcnt = 0; + break; + case DirectColor: + pVisual = pmap->pVisual; + pixR = (pixel & pVisual->redMask) >> pVisual->offsetRed; + pixG = (pixel & pVisual->greenMask) >> pVisual->offsetGreen; + pixB = (pixel & pVisual->blueMask) >> pVisual->offsetBlue; + if (pmap->red[pixR].refcnt == AllocTemporary) + pmap->red[pixR].refcnt = 0; + if (pmap->green[pixG].refcnt == AllocTemporary) + pmap->green[pixG].refcnt = 0; + if (pmap->blue[pixB].refcnt == AllocTemporary) + pmap->blue[pixB].refcnt = 0; + break; + } +} + +typedef unsigned short BigNumUpper; +typedef unsigned long BigNumLower; + +#define BIGNUMLOWERBITS 24 +#define BIGNUMUPPERBITS 16 +#define BIGNUMLOWER (1 << BIGNUMLOWERBITS) +#define BIGNUMUPPER (1 << BIGNUMUPPERBITS) +#define UPPERPART(i) ((i) >> BIGNUMLOWERBITS) +#define LOWERPART(i) ((i) & (BIGNUMLOWER - 1)) + +typedef struct _bignum { + BigNumUpper upper; + BigNumLower lower; +} BigNumRec, *BigNumPtr; + +#define BigNumGreater(x,y) (((x)->upper > (y)->upper) ||\ + ((x)->upper == (y)->upper && (x)->lower > (y)->lower)) + +#define UnsignedToBigNum(u,r) (((r)->upper = UPPERPART(u)), \ + ((r)->lower = LOWERPART(u))) + +#define MaxBigNum(r) (((r)->upper = BIGNUMUPPER-1), \ + ((r)->lower = BIGNUMLOWER-1)) + +static void +BigNumAdd (BigNumPtr x, BigNumPtr y, BigNumPtr r) +{ + BigNumLower lower, carry = 0; + + lower = x->lower + y->lower; + if (lower >= BIGNUMLOWER) { + lower -= BIGNUMLOWER; + carry = 1; + } + r->lower = lower; + r->upper = x->upper + y->upper + carry; +} + +static Pixel +FindBestPixel(EntryPtr pentFirst, int size, xrgb *prgb, int channel) +{ + EntryPtr pent; + Pixel pixel, final; + long dr, dg, db; + unsigned long sq; + BigNumRec minval, sum, temp; + + final = 0; + MaxBigNum(&minval); + /* look for the minimal difference */ + for (pent = pentFirst, pixel = 0; pixel < size; pent++, pixel++) + { + dr = dg = db = 0; + switch(channel) + { + case PSEUDOMAP: + dg = (long) pent->co.local.green - prgb->green; + db = (long) pent->co.local.blue - prgb->blue; + case REDMAP: + dr = (long) pent->co.local.red - prgb->red; + break; + case GREENMAP: + dg = (long) pent->co.local.green - prgb->green; + break; + case BLUEMAP: + db = (long) pent->co.local.blue - prgb->blue; + break; + } + sq = dr * dr; + UnsignedToBigNum (sq, &sum); + sq = dg * dg; + UnsignedToBigNum (sq, &temp); + BigNumAdd (&sum, &temp, &sum); + sq = db * db; + UnsignedToBigNum (sq, &temp); + BigNumAdd (&sum, &temp, &sum); + if (BigNumGreater (&minval, &sum)) + { + final = pixel; + minval = sum; + } + } + return(final); +} + +static void +FindColorInRootCmap (ColormapPtr pmap, EntryPtr pentFirst, int size, + xrgb *prgb, Pixel *pPixel, int channel, + ColorCompareProcPtr comp) +{ + EntryPtr pent; + Pixel pixel; + int count; + + if ((pixel = *pPixel) >= size) + pixel = 0; + for (pent = pentFirst + pixel, count = size; --count >= 0; pent++, pixel++) + { + if (pent->refcnt > 0 && (*comp) (pent, prgb)) + { + switch (channel) + { + case REDMAP: + pixel <<= pmap->pVisual->offsetRed; + break; + case GREENMAP: + pixel <<= pmap->pVisual->offsetGreen; + break; + case BLUEMAP: + pixel <<= pmap->pVisual->offsetBlue; + break; + default: /* PSEUDOMAP */ + break; + } + *pPixel = pixel; + } + } +} + +/* Tries to find a color in pmap that exactly matches the one requested in prgb + * if it can't it allocates one. + * Starts looking at pentFirst + *pPixel, so if you want a specific pixel, + * load *pPixel with that value, otherwise set it to 0 + */ +int +FindColor (ColormapPtr pmap, EntryPtr pentFirst, int size, xrgb *prgb, + Pixel *pPixel, int channel, int client, + ColorCompareProcPtr comp) +{ + EntryPtr pent; + Bool foundFree; + Pixel pixel, Free = 0; + int npix, count, *nump = NULL; + Pixel **pixp = NULL, *ppix; + xColorItem def; + + foundFree = FALSE; + + if((pixel = *pPixel) >= size) + pixel = 0; + /* see if there is a match, and also look for a free entry */ + for (pent = pentFirst + pixel, count = size; --count >= 0; ) + { + if (pent->refcnt > 0) + { + if ((*comp) (pent, prgb)) + { + if (client >= 0) + pent->refcnt++; + *pPixel = pixel; + switch(channel) + { + case REDMAP: + *pPixel <<= pmap->pVisual->offsetRed; + case PSEUDOMAP: + break; + case GREENMAP: + *pPixel <<= pmap->pVisual->offsetGreen; + break; + case BLUEMAP: + *pPixel <<= pmap->pVisual->offsetBlue; + break; + } + goto gotit; + } + } + else if (!foundFree && pent->refcnt == 0) + { + Free = pixel; + foundFree = TRUE; + /* If we're initializing the colormap, then we are looking for + * the first free cell we can find, not to minimize the number + * of entries we use. So don't look any further. */ + if(pmap->flags & BeingCreated) + break; + } + pixel++; + if(pixel >= size) + { + pent = pentFirst; + pixel = 0; + } + else + pent++; + } + + /* If we got here, we didn't find a match. If we also didn't find + * a free entry, we're out of luck. Otherwise, we'll usurp a free + * entry and fill it in */ + if (!foundFree) + return (BadAlloc); + pent = pentFirst + Free; + pent->fShared = FALSE; + pent->refcnt = (client >= 0) ? 1 : AllocTemporary; + + switch (channel) + { + case PSEUDOMAP: + pent->co.local.red = prgb->red; + pent->co.local.green = prgb->green; + pent->co.local.blue = prgb->blue; + def.red = prgb->red; + def.green = prgb->green; + def.blue = prgb->blue; + def.flags = (DoRed|DoGreen|DoBlue); + if (client >= 0) + pmap->freeRed--; + def.pixel = Free; + break; + + case REDMAP: + pent->co.local.red = prgb->red; + def.red = prgb->red; + def.green = pmap->green[0].co.local.green; + def.blue = pmap->blue[0].co.local.blue; + def.flags = DoRed; + if (client >= 0) + pmap->freeRed--; + def.pixel = Free << pmap->pVisual->offsetRed; + break; + + case GREENMAP: + pent->co.local.green = prgb->green; + def.red = pmap->red[0].co.local.red; + def.green = prgb->green; + def.blue = pmap->blue[0].co.local.blue; + def.flags = DoGreen; + if (client >= 0) + pmap->freeGreen--; + def.pixel = Free << pmap->pVisual->offsetGreen; + break; + + case BLUEMAP: + pent->co.local.blue = prgb->blue; + def.red = pmap->red[0].co.local.red; + def.green = pmap->green[0].co.local.green; + def.blue = prgb->blue; + def.flags = DoBlue; + if (client >= 0) + pmap->freeBlue--; + def.pixel = Free << pmap->pVisual->offsetBlue; + break; + } + (*pmap->pScreen->StoreColors) (pmap, 1, &def); + pixel = Free; + *pPixel = def.pixel; + +gotit: + if (pmap->flags & BeingCreated || client == -1) + return(Success); + /* Now remember the pixel, for freeing later */ + switch (channel) + { + case PSEUDOMAP: + case REDMAP: + nump = pmap->numPixelsRed; + pixp = pmap->clientPixelsRed; + break; + + case GREENMAP: + nump = pmap->numPixelsGreen; + pixp = pmap->clientPixelsGreen; + break; + + case BLUEMAP: + nump = pmap->numPixelsBlue; + pixp = pmap->clientPixelsBlue; + break; + } + npix = nump[client]; + ppix = (Pixel *) xrealloc (pixp[client], (npix + 1) * sizeof(Pixel)); + if (!ppix) + { + pent->refcnt--; + if (!pent->fShared) + switch (channel) + { + case PSEUDOMAP: + case REDMAP: + pmap->freeRed++; + break; + case GREENMAP: + pmap->freeGreen++; + break; + case BLUEMAP: + pmap->freeBlue++; + break; + } + return(BadAlloc); + } + ppix[npix] = pixel; + pixp[client] = ppix; + nump[client]++; + + return(Success); +} + +/* Comparison functions -- passed to FindColor to determine if an + * entry is already the color we're looking for or not */ +static int +AllComp (EntryPtr pent, xrgb *prgb) +{ + if((pent->co.local.red == prgb->red) && + (pent->co.local.green == prgb->green) && + (pent->co.local.blue == prgb->blue) ) + return (1); + return (0); +} + +static int +RedComp (EntryPtr pent, xrgb *prgb) +{ + if (pent->co.local.red == prgb->red) + return (1); + return (0); +} + +static int +GreenComp (EntryPtr pent, xrgb *prgb) +{ + if (pent->co.local.green == prgb->green) + return (1); + return (0); +} + +static int +BlueComp (EntryPtr pent, xrgb *prgb) +{ + if (pent->co.local.blue == prgb->blue) + return (1); + return (0); +} + + +/* Read the color value of a cell */ + +_X_EXPORT int +QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList) +{ + Pixel *ppix, pixel; + xrgb *prgb; + VisualPtr pVisual; + EntryPtr pent; + Pixel i; + int errVal = Success; + + pVisual = pmap->pVisual; + if ((pmap->class | DynamicClass) == DirectColor) + { + int numred, numgreen, numblue; + Pixel rgbbad; + + numred = NUMRED(pVisual); + numgreen = NUMGREEN(pVisual); + numblue = NUMBLUE(pVisual); + rgbbad = ~RGBMASK(pVisual); + for( ppix = ppixIn, prgb = prgbList; --count >= 0; ppix++, prgb++) + { + pixel = *ppix; + if (pixel & rgbbad) { + clientErrorValue = pixel; + errVal = BadValue; + continue; + } + i = (pixel & pVisual->redMask) >> pVisual->offsetRed; + if (i >= numred) + { + clientErrorValue = pixel; + errVal = BadValue; + continue; + } + prgb->red = pmap->red[i].co.local.red; + i = (pixel & pVisual->greenMask) >> pVisual->offsetGreen; + if (i >= numgreen) + { + clientErrorValue = pixel; + errVal = BadValue; + continue; + } + prgb->green = pmap->green[i].co.local.green; + i = (pixel & pVisual->blueMask) >> pVisual->offsetBlue; + if (i >= numblue) + { + clientErrorValue = pixel; + errVal = BadValue; + continue; + } + prgb->blue = pmap->blue[i].co.local.blue; + } + } + else + { + for( ppix = ppixIn, prgb = prgbList; --count >= 0; ppix++, prgb++) + { + pixel = *ppix; + if (pixel >= pVisual->ColormapEntries) + { + clientErrorValue = pixel; + errVal = BadValue; + } + else + { + pent = (EntryPtr)&pmap->red[pixel]; + if (pent->fShared) + { + prgb->red = pent->co.shco.red->color; + prgb->green = pent->co.shco.green->color; + prgb->blue = pent->co.shco.blue->color; + } + else + { + prgb->red = pent->co.local.red; + prgb->green = pent->co.local.green; + prgb->blue = pent->co.local.blue; + } + } + } + } + return (errVal); +} + +static void +FreePixels(ColormapPtr pmap, int client) +{ + Pixel *ppix, *ppixStart; + int n; + int class; + + class = pmap->class; + ppixStart = pmap->clientPixelsRed[client]; + if (class & DynamicClass) + { + n = pmap->numPixelsRed[client]; + for (ppix = ppixStart; --n >= 0; ) + { + FreeCell(pmap, *ppix, REDMAP); + ppix++; + } + } + + xfree(ppixStart); + pmap->clientPixelsRed[client] = (Pixel *) NULL; + pmap->numPixelsRed[client] = 0; + if ((class | DynamicClass) == DirectColor) + { + ppixStart = pmap->clientPixelsGreen[client]; + if (class & DynamicClass) + for (ppix = ppixStart, n = pmap->numPixelsGreen[client]; --n >= 0;) + FreeCell(pmap, *ppix++, GREENMAP); + xfree(ppixStart); + pmap->clientPixelsGreen[client] = (Pixel *) NULL; + pmap->numPixelsGreen[client] = 0; + + ppixStart = pmap->clientPixelsBlue[client]; + if (class & DynamicClass) + for (ppix = ppixStart, n = pmap->numPixelsBlue[client]; --n >= 0; ) + FreeCell(pmap, *ppix++, BLUEMAP); + xfree(ppixStart); + pmap->clientPixelsBlue[client] = (Pixel *) NULL; + pmap->numPixelsBlue[client] = 0; + } +} + +/** + * Frees all of a client's colors and cells. + * + * \param value must conform to DeleteType + * \unused fakeid + */ +int +FreeClientPixels (pointer value, XID fakeid) +{ + ColormapPtr pmap; + colorResource *pcr = (colorResource *)value; + + pmap = (ColormapPtr) LookupIDByType(pcr->mid, RT_COLORMAP); + if (pmap) + FreePixels(pmap, pcr->client); + xfree(pcr); + return Success; +} + +int +AllocColorCells (int client, ColormapPtr pmap, int colors, int planes, + Bool contig, Pixel *ppix, Pixel *masks) +{ + Pixel rmask, gmask, bmask, *ppixFirst, r, g, b; + int n, class; + int ok; + int oldcount; + colorResource *pcr = (colorResource *)NULL; + + class = pmap->class; + if (!(class & DynamicClass)) + return (BadAlloc); /* Shouldn't try on this type */ + oldcount = pmap->numPixelsRed[client]; + if (pmap->class == DirectColor) + oldcount += pmap->numPixelsGreen[client] + pmap->numPixelsBlue[client]; + if (!oldcount && (CLIENT_ID(pmap->mid) != client)) + { + pcr = (colorResource *) xalloc(sizeof(colorResource)); + if (!pcr) + return (BadAlloc); + } + + if (pmap->class == DirectColor) + { + ok = AllocDirect (client, pmap, colors, planes, planes, planes, + contig, ppix, &rmask, &gmask, &bmask); + if(ok == Success) + { + for (r = g = b = 1, n = planes; --n >= 0; r += r, g += g, b += b) + { + while(!(rmask & r)) + r += r; + while(!(gmask & g)) + g += g; + while(!(bmask & b)) + b += b; + *masks++ = r | g | b; + } + } + } + else + { + ok = AllocPseudo (client, pmap, colors, planes, contig, ppix, &rmask, + &ppixFirst); + if(ok == Success) + { + for (r = 1, n = planes; --n >= 0; r += r) + { + while(!(rmask & r)) + r += r; + *masks++ = r; + } + } + } + + /* if this is the client's first pixels in this colormap, tell the + * resource manager that the client has pixels in this colormap which + * should be freed when the client dies */ + if ((ok == Success) && pcr) + { + pcr->mid = pmap->mid; + pcr->client = client; + if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (pointer)pcr)) + ok = BadAlloc; + } else if (pcr) + xfree(pcr); + + return (ok); +} + + +int +AllocColorPlanes (int client, ColormapPtr pmap, int colors, + int r, int g, int b, Bool contig, Pixel *pixels, + Pixel *prmask, Pixel *pgmask, Pixel *pbmask) +{ + int ok; + Pixel mask, *ppixFirst; + Pixel shift; + int i; + int class; + int oldcount; + colorResource *pcr = (colorResource *)NULL; + + class = pmap->class; + if (!(class & DynamicClass)) + return (BadAlloc); /* Shouldn't try on this type */ + oldcount = pmap->numPixelsRed[client]; + if (class == DirectColor) + oldcount += pmap->numPixelsGreen[client] + pmap->numPixelsBlue[client]; + if (!oldcount && (CLIENT_ID(pmap->mid) != client)) + { + pcr = (colorResource *) xalloc(sizeof(colorResource)); + if (!pcr) + return (BadAlloc); + } + + if (class == DirectColor) + { + ok = AllocDirect (client, pmap, colors, r, g, b, contig, pixels, + prmask, pgmask, pbmask); + } + else + { + /* Allocate the proper pixels */ + /* XXX This is sort of bad, because of contig is set, we force all + * r + g + b bits to be contiguous. Should only force contiguity + * per mask + */ + ok = AllocPseudo (client, pmap, colors, r + g + b, contig, pixels, + &mask, &ppixFirst); + + if(ok == Success) + { + /* now split that mask into three */ + *prmask = *pgmask = *pbmask = 0; + shift = 1; + for (i = r; --i >= 0; shift += shift) + { + while (!(mask & shift)) + shift += shift; + *prmask |= shift; + } + for (i = g; --i >= 0; shift += shift) + { + while (!(mask & shift)) + shift += shift; + *pgmask |= shift; + } + for (i = b; --i >= 0; shift += shift) + { + while (!(mask & shift)) + shift += shift; + *pbmask |= shift; + } + + /* set up the shared color cells */ + if (!AllocShared(pmap, pixels, colors, r, g, b, + *prmask, *pgmask, *pbmask, ppixFirst)) + { + (void)FreeColors(pmap, client, colors, pixels, mask); + ok = BadAlloc; + } + } + } + + /* if this is the client's first pixels in this colormap, tell the + * resource manager that the client has pixels in this colormap which + * should be freed when the client dies */ + if ((ok == Success) && pcr) + { + pcr->mid = pmap->mid; + pcr->client = client; + if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (pointer)pcr)) + ok = BadAlloc; + } else if (pcr) + xfree(pcr); + + return (ok); +} + +static int +AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool contig, + Pixel *pixels, Pixel *prmask, Pixel *pgmask, Pixel *pbmask) +{ + Pixel *ppixRed, *ppixGreen, *ppixBlue; + Pixel *ppix, *pDst, *p; + int npix, npixR, npixG, npixB; + Bool okR, okG, okB; + Pixel *rpix = 0, *gpix = 0, *bpix = 0; + + npixR = c << r; + npixG = c << g; + npixB = c << b; + if ((r >= 32) || (g >= 32) || (b >= 32) || + (npixR > pmap->freeRed) || (npixR < c) || + (npixG > pmap->freeGreen) || (npixG < c) || + (npixB > pmap->freeBlue) || (npixB < c)) + return BadAlloc; + + /* start out with empty pixels */ + for(p = pixels; p < pixels + c; p++) + *p = 0; + + ppixRed = (Pixel *)ALLOCATE_LOCAL(npixR * sizeof(Pixel)); + ppixGreen = (Pixel *)ALLOCATE_LOCAL(npixG * sizeof(Pixel)); + ppixBlue = (Pixel *)ALLOCATE_LOCAL(npixB * sizeof(Pixel)); + if (!ppixRed || !ppixGreen || !ppixBlue) + { + if (ppixBlue) DEALLOCATE_LOCAL(ppixBlue); + if (ppixGreen) DEALLOCATE_LOCAL(ppixGreen); + if (ppixRed) DEALLOCATE_LOCAL(ppixRed); + return(BadAlloc); + } + + okR = AllocCP(pmap, pmap->red, c, r, contig, ppixRed, prmask); + okG = AllocCP(pmap, pmap->green, c, g, contig, ppixGreen, pgmask); + okB = AllocCP(pmap, pmap->blue, c, b, contig, ppixBlue, pbmask); + + if (okR && okG && okB) + { + rpix = (Pixel *) xrealloc(pmap->clientPixelsRed[client], + (pmap->numPixelsRed[client] + (c << r)) * + sizeof(Pixel)); + if (rpix) + pmap->clientPixelsRed[client] = rpix; + gpix = (Pixel *) xrealloc(pmap->clientPixelsGreen[client], + (pmap->numPixelsGreen[client] + (c << g)) * + sizeof(Pixel)); + if (gpix) + pmap->clientPixelsGreen[client] = gpix; + bpix = (Pixel *) xrealloc(pmap->clientPixelsBlue[client], + (pmap->numPixelsBlue[client] + (c << b)) * + sizeof(Pixel)); + if (bpix) + pmap->clientPixelsBlue[client] = bpix; + } + + if (!okR || !okG || !okB || !rpix || !gpix || !bpix) + { + if (okR) + for(ppix = ppixRed, npix = npixR; --npix >= 0; ppix++) + pmap->red[*ppix].refcnt = 0; + if (okG) + for(ppix = ppixGreen, npix = npixG; --npix >= 0; ppix++) + pmap->green[*ppix].refcnt = 0; + if (okB) + for(ppix = ppixBlue, npix = npixB; --npix >= 0; ppix++) + pmap->blue[*ppix].refcnt = 0; + DEALLOCATE_LOCAL(ppixBlue); + DEALLOCATE_LOCAL(ppixGreen); + DEALLOCATE_LOCAL(ppixRed); + return(BadAlloc); + } + + *prmask <<= pmap->pVisual->offsetRed; + *pgmask <<= pmap->pVisual->offsetGreen; + *pbmask <<= pmap->pVisual->offsetBlue; + + ppix = rpix + pmap->numPixelsRed[client]; + for (pDst = pixels, p = ppixRed; p < ppixRed + npixR; p++) + { + *ppix++ = *p; + if(p < ppixRed + c) + *pDst++ |= *p << pmap->pVisual->offsetRed; + } + pmap->numPixelsRed[client] += npixR; + pmap->freeRed -= npixR; + + ppix = gpix + pmap->numPixelsGreen[client]; + for (pDst = pixels, p = ppixGreen; p < ppixGreen + npixG; p++) + { + *ppix++ = *p; + if(p < ppixGreen + c) + *pDst++ |= *p << pmap->pVisual->offsetGreen; + } + pmap->numPixelsGreen[client] += npixG; + pmap->freeGreen -= npixG; + + ppix = bpix + pmap->numPixelsBlue[client]; + for (pDst = pixels, p = ppixBlue; p < ppixBlue + npixB; p++) + { + *ppix++ = *p; + if(p < ppixBlue + c) + *pDst++ |= *p << pmap->pVisual->offsetBlue; + } + pmap->numPixelsBlue[client] += npixB; + pmap->freeBlue -= npixB; + + + for (pDst = pixels; pDst < pixels + c; pDst++) + *pDst |= ALPHAMASK(pmap->pVisual); + + DEALLOCATE_LOCAL(ppixBlue); + DEALLOCATE_LOCAL(ppixGreen); + DEALLOCATE_LOCAL(ppixRed); + + return (Success); +} + +static int +AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig, + Pixel *pixels, Pixel *pmask, Pixel **pppixFirst) +{ + Pixel *ppix, *p, *pDst, *ppixTemp; + int npix; + Bool ok; + + npix = c << r; + if ((r >= 32) || (npix > pmap->freeRed) || (npix < c)) + return(BadAlloc); + if(!(ppixTemp = (Pixel *)ALLOCATE_LOCAL(npix * sizeof(Pixel)))) + return(BadAlloc); + ok = AllocCP(pmap, pmap->red, c, r, contig, ppixTemp, pmask); + + if (ok) + { + + /* all the allocated pixels are added to the client pixel list, + * but only the unique ones are returned to the client */ + ppix = (Pixel *)xrealloc(pmap->clientPixelsRed[client], + (pmap->numPixelsRed[client] + npix) * sizeof(Pixel)); + if (!ppix) + { + for (p = ppixTemp; p < ppixTemp + npix; p++) + pmap->red[*p].refcnt = 0; + return (BadAlloc); + } + pmap->clientPixelsRed[client] = ppix; + ppix += pmap->numPixelsRed[client]; + *pppixFirst = ppix; + pDst = pixels; + for (p = ppixTemp; p < ppixTemp + npix; p++) + { + *ppix++ = *p; + if(p < ppixTemp + c) + *pDst++ = *p; + } + pmap->numPixelsRed[client] += npix; + pmap->freeRed -= npix; + } + DEALLOCATE_LOCAL(ppixTemp); + return (ok ? Success : BadAlloc); +} + +/* Allocates count << planes pixels from colormap pmap for client. If + * contig, then the plane mask is made of consecutive bits. Returns + * all count << pixels in the array pixels. The first count of those + * pixels are the unique pixels. *pMask has the mask to Or with the + * unique pixels to get the rest of them. + * + * Returns True iff all pixels could be allocated + * All cells allocated will have refcnt set to AllocPrivate and shared to FALSE + * (see AllocShared for why we care) + */ +static Bool +AllocCP (ColormapPtr pmap, EntryPtr pentFirst, int count, int planes, + Bool contig, Pixel *pixels, Pixel *pMask) +{ + EntryPtr ent; + Pixel pixel, base, entries, maxp, save; + int dplanes, found; + Pixel *ppix; + Pixel mask; + Pixel finalmask; + + dplanes = pmap->pVisual->nplanes; + + /* Easy case. Allocate pixels only */ + if (planes == 0) + { + /* allocate writable entries */ + ppix = pixels; + ent = pentFirst; + pixel = 0; + while (--count >= 0) + { + /* Just find count unallocated cells */ + while (ent->refcnt) + { + ent++; + pixel++; + } + ent->refcnt = AllocPrivate; + *ppix++ = pixel; + ent->fShared = FALSE; + } + *pMask = 0; + return (TRUE); + } + else if (planes > dplanes) + { + return (FALSE); + } + + /* General case count pixels * 2 ^ planes cells to be allocated */ + + /* make room for new pixels */ + ent = pentFirst; + + /* first try for contiguous planes, since it's fastest */ + for (mask = (((Pixel)1) << planes) - 1, base = 1, dplanes -= (planes - 1); + --dplanes >= 0; + mask += mask, base += base) + { + ppix = pixels; + found = 0; + pixel = 0; + entries = pmap->pVisual->ColormapEntries - mask; + while (pixel < entries) + { + save = pixel; + maxp = pixel + mask + base; + /* check if all are free */ + while (pixel != maxp && ent[pixel].refcnt == 0) + pixel += base; + if (pixel == maxp) + { + /* this one works */ + *ppix++ = save; + found++; + if (found == count) + { + /* found enough, allocate them all */ + while (--count >= 0) + { + pixel = pixels[count]; + maxp = pixel + mask; + while (1) + { + ent[pixel].refcnt = AllocPrivate; + ent[pixel].fShared = FALSE; + if (pixel == maxp) + break; + pixel += base; + *ppix++ = pixel; + } + } + *pMask = mask; + return (TRUE); + } + } + pixel = save + 1; + if (pixel & mask) + pixel += mask; + } + } + + dplanes = pmap->pVisual->nplanes; + if (contig || planes == 1 || dplanes < 3) + return (FALSE); + + /* this will be very slow for large maps, need a better algorithm */ + + /* + we can generate the smallest and largest numbers that fits in dplanes + bits and contain exactly planes bits set as follows. First, we need to + check that it is possible to generate such a mask at all. + (Non-contiguous masks need one more bit than contiguous masks). Then + the smallest such mask consists of the rightmost planes-1 bits set, then + a zero, then a one in position planes + 1. The formula is + (3 << (planes-1)) -1 + The largest such masks consists of the leftmost planes-1 bits set, then + a zero, then a one bit in position dplanes-planes-1. If dplanes is + smaller than 32 (the number of bits in a word) then the formula is: + (1<>> + + */ + + finalmask = + (((((Pixel)1)<<(planes-1)) - 1) << (dplanes-planes+1)) + + (((Pixel)1)<<(dplanes-planes-1)); + for (mask = (((Pixel)3) << (planes -1)) - 1; mask <= finalmask; mask++) + { + /* next 3 magic statements count number of ones (HAKMEM #169) */ + pixel = (mask >> 1) & 033333333333; + pixel = mask - pixel - ((pixel >> 1) & 033333333333); + if ((((pixel + (pixel >> 3)) & 030707070707) % 077) != planes) + continue; + ppix = pixels; + found = 0; + entries = pmap->pVisual->ColormapEntries - mask; + base = lowbit (mask); + for (pixel = 0; pixel < entries; pixel++) + { + if (pixel & mask) + continue; + maxp = 0; + /* check if all are free */ + while (ent[pixel + maxp].refcnt == 0) + { + GetNextBitsOrBreak(maxp, mask, base); + } + if ((maxp < mask) || (ent[pixel + mask].refcnt != 0)) + continue; + /* this one works */ + *ppix++ = pixel; + found++; + if (found < count) + continue; + /* found enough, allocate them all */ + while (--count >= 0) + { + pixel = (pixels)[count]; + maxp = 0; + while (1) + { + ent[pixel + maxp].refcnt = AllocPrivate; + ent[pixel + maxp].fShared = FALSE; + GetNextBitsOrBreak(maxp, mask, base); + *ppix++ = pixel + maxp; + } + } + + *pMask = mask; + return (TRUE); + } + } + return (FALSE); +} + +/** + * + * \param ppixFirst First of the client's new pixels + */ +static Bool +AllocShared (ColormapPtr pmap, Pixel *ppix, int c, int r, int g, int b, + Pixel rmask, Pixel gmask, Pixel bmask, Pixel *ppixFirst) +{ + Pixel *pptr, *cptr; + int npix, z, npixClientNew, npixShared; + Pixel basemask, base, bits, common; + SHAREDCOLOR *pshared, **ppshared, **psharedList; + + npixClientNew = c << (r + g + b); + npixShared = (c << r) + (c << g) + (c << b); + psharedList = (SHAREDCOLOR **)ALLOCATE_LOCAL(npixShared * + sizeof(SHAREDCOLOR *)); + if (!psharedList) + return FALSE; + ppshared = psharedList; + for (z = npixShared; --z >= 0; ) + { + if (!(ppshared[z] = (SHAREDCOLOR *)xalloc(sizeof(SHAREDCOLOR)))) + { + for (z++ ; z < npixShared; z++) + xfree(ppshared[z]); + return FALSE; + } + } + for(pptr = ppix, npix = c; --npix >= 0; pptr++) + { + basemask = ~(gmask | bmask); + common = *pptr & basemask; + if (rmask) + { + bits = 0; + base = lowbit (rmask); + while(1) + { + pshared = *ppshared++; + pshared->refcnt = 1 << (g + b); + for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) + { + if ((*cptr & basemask) == (common | bits)) + { + pmap->red[*cptr].fShared = TRUE; + pmap->red[*cptr].co.shco.red = pshared; + } + } + GetNextBitsOrBreak(bits, rmask, base); + } + } + else + { + pshared = *ppshared++; + pshared->refcnt = 1 << (g + b); + for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) + { + if ((*cptr & basemask) == common) + { + pmap->red[*cptr].fShared = TRUE; + pmap->red[*cptr].co.shco.red = pshared; + } + } + } + basemask = ~(rmask | bmask); + common = *pptr & basemask; + if (gmask) + { + bits = 0; + base = lowbit (gmask); + while(1) + { + pshared = *ppshared++; + pshared->refcnt = 1 << (r + b); + for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) + { + if ((*cptr & basemask) == (common | bits)) + { + pmap->red[*cptr].co.shco.green = pshared; + } + } + GetNextBitsOrBreak(bits, gmask, base); + } + } + else + { + pshared = *ppshared++; + pshared->refcnt = 1 << (g + b); + for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) + { + if ((*cptr & basemask) == common) + { + pmap->red[*cptr].co.shco.green = pshared; + } + } + } + basemask = ~(rmask | gmask); + common = *pptr & basemask; + if (bmask) + { + bits = 0; + base = lowbit (bmask); + while(1) + { + pshared = *ppshared++; + pshared->refcnt = 1 << (r + g); + for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) + { + if ((*cptr & basemask) == (common | bits)) + { + pmap->red[*cptr].co.shco.blue = pshared; + } + } + GetNextBitsOrBreak(bits, bmask, base); + } + } + else + { + pshared = *ppshared++; + pshared->refcnt = 1 << (g + b); + for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) + { + if ((*cptr & basemask) == common) + { + pmap->red[*cptr].co.shco.blue = pshared; + } + } + } + } + DEALLOCATE_LOCAL(psharedList); + return TRUE; +} + + +/** FreeColors + * Free colors and/or cells (probably slow for large numbers) + */ +_X_EXPORT int +FreeColors (ColormapPtr pmap, int client, int count, Pixel *pixels, Pixel mask) +{ + int rval, result, class; + Pixel rmask; + + class = pmap->class; + if (pmap->flags & AllAllocated) + return(BadAccess); + if ((class | DynamicClass) == DirectColor) + { + rmask = mask & RGBMASK(pmap->pVisual); + result = FreeCo(pmap, client, REDMAP, count, pixels, + mask & pmap->pVisual->redMask); + /* If any of the three calls fails, we must report that, if more + * than one fails, it's ok that we report the last one */ + rval = FreeCo(pmap, client, GREENMAP, count, pixels, + mask & pmap->pVisual->greenMask); + if(rval != Success) + result = rval; + rval = FreeCo(pmap, client, BLUEMAP, count, pixels, + mask & pmap->pVisual->blueMask); + if(rval != Success) + result = rval; + } + else + { + rmask = mask & ((((Pixel)1) << pmap->pVisual->nplanes) - 1); + result = FreeCo(pmap, client, PSEUDOMAP, count, pixels, rmask); + } + if ((mask != rmask) && count) + { + clientErrorValue = *pixels | mask; + result = BadValue; + } + /* XXX should worry about removing any RT_CMAPENTRY resource */ + return (result); +} + +/** + * Helper for FreeColors -- frees all combinations of *newpixels and mask bits + * which the client has allocated in channel colormap cells of pmap. + * doesn't change newpixels if it doesn't need to + * + * \param pmap which colormap head + * \param color which sub-map, eg, RED, BLUE, PSEUDO + * \param npixIn number of pixels passed in + * \param ppixIn number of base pixels + * \param mask mask client gave us + */ +static int +FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixel mask) +{ + Pixel *ppixClient, pixTest; + int npixClient, npixNew, npix; + Pixel bits, base, cmask, rgbbad; + Pixel *pptr, *cptr; + int n, zapped; + int errVal = Success; + int offset, numents; + + if (npixIn == 0) + return (errVal); + bits = 0; + zapped = 0; + base = lowbit (mask); + + switch(color) + { + case REDMAP: + cmask = pmap->pVisual->redMask; + rgbbad = ~RGBMASK(pmap->pVisual); + offset = pmap->pVisual->offsetRed; + numents = (cmask >> offset) + 1; + ppixClient = pmap->clientPixelsRed[client]; + npixClient = pmap->numPixelsRed[client]; + break; + case GREENMAP: + cmask = pmap->pVisual->greenMask; + rgbbad = ~RGBMASK(pmap->pVisual); + offset = pmap->pVisual->offsetGreen; + numents = (cmask >> offset) + 1; + ppixClient = pmap->clientPixelsGreen[client]; + npixClient = pmap->numPixelsGreen[client]; + break; + case BLUEMAP: + cmask = pmap->pVisual->blueMask; + rgbbad = ~RGBMASK(pmap->pVisual); + offset = pmap->pVisual->offsetBlue; + numents = (cmask >> offset) + 1; + ppixClient = pmap->clientPixelsBlue[client]; + npixClient = pmap->numPixelsBlue[client]; + break; + default: /* so compiler can see that everything gets initialized */ + case PSEUDOMAP: + cmask = ~((Pixel)0); + rgbbad = 0; + offset = 0; + numents = pmap->pVisual->ColormapEntries; + ppixClient = pmap->clientPixelsRed[client]; + npixClient = pmap->numPixelsRed[client]; + break; + } + + + /* zap all pixels which match */ + while (1) + { + /* go through pixel list */ + for (pptr = ppixIn, n = npixIn; --n >= 0; pptr++) + { + pixTest = ((*pptr | bits) & cmask) >> offset; + if ((pixTest >= numents) || (*pptr & rgbbad)) + { + clientErrorValue = *pptr | bits; + errVal = BadValue; + continue; + } + + /* find match in client list */ + for (cptr = ppixClient, npix = npixClient; + --npix >= 0 && *cptr != pixTest; + cptr++) ; + + if (npix >= 0) + { + if (pmap->class & DynamicClass) + { + FreeCell(pmap, pixTest, color); + } + *cptr = ~((Pixel)0); + zapped++; + } + else + errVal = BadAccess; + } + /* generate next bits value */ + GetNextBitsOrBreak(bits, mask, base); + } + + /* delete freed pixels from client pixel list */ + if (zapped) + { + npixNew = npixClient - zapped; + if (npixNew) + { + /* Since the list can only get smaller, we can do a copy in + * place and then realloc to a smaller size */ + pptr = cptr = ppixClient; + + /* If we have all the new pixels, we don't have to examine the + * rest of the old ones */ + for(npix = 0; npix < npixNew; cptr++) + { + if (*cptr != ~((Pixel)0)) + { + *pptr++ = *cptr; + npix++; + } + } + pptr = (Pixel *)xrealloc(ppixClient, npixNew * sizeof(Pixel)); + if (pptr) + ppixClient = pptr; + npixClient = npixNew; + } + else + { + npixClient = 0; + xfree(ppixClient); + ppixClient = (Pixel *)NULL; + } + switch(color) + { + case PSEUDOMAP: + case REDMAP: + pmap->clientPixelsRed[client] = ppixClient; + pmap->numPixelsRed[client] = npixClient; + break; + case GREENMAP: + pmap->clientPixelsGreen[client] = ppixClient; + pmap->numPixelsGreen[client] = npixClient; + break; + case BLUEMAP: + pmap->clientPixelsBlue[client] = ppixClient; + pmap->numPixelsBlue[client] = npixClient; + break; + } + } + return (errVal); +} + + + +/* Redefine color values */ +_X_EXPORT int +StoreColors (ColormapPtr pmap, int count, xColorItem *defs) +{ + Pixel pix; + xColorItem *pdef; + EntryPtr pent, pentT, pentLast; + VisualPtr pVisual; + SHAREDCOLOR *pred, *pgreen, *pblue; + int n, ChgRed, ChgGreen, ChgBlue, idef; + int class, errVal = Success; + int ok; + + + class = pmap->class; + if(!(class & DynamicClass) && !(pmap->flags & BeingCreated)) + { + return(BadAccess); + } + pVisual = pmap->pVisual; + + idef = 0; + if((class | DynamicClass) == DirectColor) + { + int numred, numgreen, numblue; + Pixel rgbbad; + + numred = NUMRED(pVisual); + numgreen = NUMGREEN(pVisual); + numblue = NUMBLUE(pVisual); + rgbbad = ~RGBMASK(pVisual); + for (pdef = defs, n = 0; n < count; pdef++, n++) + { + ok = TRUE; + (*pmap->pScreen->ResolveColor) + (&pdef->red, &pdef->green, &pdef->blue, pmap->pVisual); + + if (pdef->pixel & rgbbad) + { + errVal = BadValue; + clientErrorValue = pdef->pixel; + continue; + } + pix = (pdef->pixel & pVisual->redMask) >> pVisual->offsetRed; + if (pix >= numred) + { + errVal = BadValue; + ok = FALSE; + } + else if (pmap->red[pix].refcnt != AllocPrivate) + { + errVal = BadAccess; + ok = FALSE; + } + else if (pdef->flags & DoRed) + { + pmap->red[pix].co.local.red = pdef->red; + } + else + { + pdef->red = pmap->red[pix].co.local.red; + } + + pix = (pdef->pixel & pVisual->greenMask) >> pVisual->offsetGreen; + if (pix >= numgreen) + { + errVal = BadValue; + ok = FALSE; + } + else if (pmap->green[pix].refcnt != AllocPrivate) + { + errVal = BadAccess; + ok = FALSE; + } + else if (pdef->flags & DoGreen) + { + pmap->green[pix].co.local.green = pdef->green; + } + else + { + pdef->green = pmap->green[pix].co.local.green; + } + + pix = (pdef->pixel & pVisual->blueMask) >> pVisual->offsetBlue; + if (pix >= numblue) + { + errVal = BadValue; + ok = FALSE; + } + else if (pmap->blue[pix].refcnt != AllocPrivate) + { + errVal = BadAccess; + ok = FALSE; + } + else if (pdef->flags & DoBlue) + { + pmap->blue[pix].co.local.blue = pdef->blue; + } + else + { + pdef->blue = pmap->blue[pix].co.local.blue; + } + /* If this is an o.k. entry, then it gets added to the list + * to be sent to the hardware. If not, skip it. Once we've + * skipped one, we have to copy all the others. + */ + if(ok) + { + if(idef != n) + defs[idef] = defs[n]; + idef++; + } else + clientErrorValue = pdef->pixel; + } + } + else + { + for (pdef = defs, n = 0; n < count; pdef++, n++) + { + + ok = TRUE; + if (pdef->pixel >= pVisual->ColormapEntries) + { + clientErrorValue = pdef->pixel; + errVal = BadValue; + ok = FALSE; + } + else if (pmap->red[pdef->pixel].refcnt != AllocPrivate) + { + errVal = BadAccess; + ok = FALSE; + } + + /* If this is an o.k. entry, then it gets added to the list + * to be sent to the hardware. If not, skip it. Once we've + * skipped one, we have to copy all the others. + */ + if(ok) + { + if(idef != n) + defs[idef] = defs[n]; + idef++; + } + else + continue; + + (*pmap->pScreen->ResolveColor) + (&pdef->red, &pdef->green, &pdef->blue, pmap->pVisual); + + pent = &pmap->red[pdef->pixel]; + + if(pdef->flags & DoRed) + { + if(pent->fShared) + { + pent->co.shco.red->color = pdef->red; + if (pent->co.shco.red->refcnt > 1) + ok = FALSE; + } + else + pent->co.local.red = pdef->red; + } + else + { + if(pent->fShared) + pdef->red = pent->co.shco.red->color; + else + pdef->red = pent->co.local.red; + } + if(pdef->flags & DoGreen) + { + if(pent->fShared) + { + pent->co.shco.green->color = pdef->green; + if (pent->co.shco.green->refcnt > 1) + ok = FALSE; + } + else + pent->co.local.green = pdef->green; + } + else + { + if(pent->fShared) + pdef->green = pent->co.shco.green->color; + else + pdef->green = pent->co.local.green; + } + if(pdef->flags & DoBlue) + { + if(pent->fShared) + { + pent->co.shco.blue->color = pdef->blue; + if (pent->co.shco.blue->refcnt > 1) + ok = FALSE; + } + else + pent->co.local.blue = pdef->blue; + } + else + { + if(pent->fShared) + pdef->blue = pent->co.shco.blue->color; + else + pdef->blue = pent->co.local.blue; + } + + if(!ok) + { + /* have to run through the colormap and change anybody who + * shares this value */ + pred = pent->co.shco.red; + pgreen = pent->co.shco.green; + pblue = pent->co.shco.blue; + ChgRed = pdef->flags & DoRed; + ChgGreen = pdef->flags & DoGreen; + ChgBlue = pdef->flags & DoBlue; + pentLast = pmap->red + pVisual->ColormapEntries; + + for(pentT = pmap->red; pentT < pentLast; pentT++) + { + if(pentT->fShared && (pentT != pent)) + { + xColorItem defChg; + + /* There are, alas, devices in this world too dumb + * to read their own hardware colormaps. Sick, but + * true. So we're going to be really nice and load + * the xColorItem with the proper value for all the + * fields. We will only set the flags for those + * fields that actually change. Smart devices can + * arrange to change only those fields. Dumb devices + * can rest assured that we have provided for them, + * and can change all three fields */ + + defChg.flags = 0; + if(ChgRed && pentT->co.shco.red == pred) + { + defChg.flags |= DoRed; + } + if(ChgGreen && pentT->co.shco.green == pgreen) + { + defChg.flags |= DoGreen; + } + if(ChgBlue && pentT->co.shco.blue == pblue) + { + defChg.flags |= DoBlue; + } + if(defChg.flags != 0) + { + defChg.pixel = pentT - pmap->red; + defChg.red = pentT->co.shco.red->color; + defChg.green = pentT->co.shco.green->color; + defChg.blue = pentT->co.shco.blue->color; + (*pmap->pScreen->StoreColors) (pmap, 1, &defChg); + } + } + } + + } + } + } + /* Note that we use idef, the count of acceptable entries, and not + * count, the count of proposed entries */ + if (idef != 0) + ( *pmap->pScreen->StoreColors) (pmap, idef, defs); + return (errVal); +} + +int +IsMapInstalled(Colormap map, WindowPtr pWin) +{ + Colormap *pmaps; + int imap, nummaps, found; + + pmaps = (Colormap *) ALLOCATE_LOCAL( + pWin->drawable.pScreen->maxInstalledCmaps * sizeof(Colormap)); + if(!pmaps) + return(FALSE); + nummaps = (*pWin->drawable.pScreen->ListInstalledColormaps) + (pWin->drawable.pScreen, pmaps); + found = FALSE; + for(imap = 0; imap < nummaps; imap++) + { + if(pmaps[imap] == map) + { + found = TRUE; + break; + } + } + DEALLOCATE_LOCAL(pmaps); + return (found); +} diff --git a/xorg-server-1.4/dix/cursor.c b/xorg-server-1.4/dix/cursor.c new file mode 100644 index 0000000..d903124 --- /dev/null +++ b/xorg-server-1.4/dix/cursor.c @@ -0,0 +1,473 @@ +/*********************************************************** + +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 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. + +******************************************************************/ + + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "servermd.h" +#include "scrnintstr.h" +#include "dixstruct.h" +#include "cursorstr.h" +#include "dixfontstr.h" +#include "opaque.h" + +typedef struct _GlyphShare { + FontPtr font; + unsigned short sourceChar; + unsigned short maskChar; + CursorBitsPtr bits; + struct _GlyphShare *next; +} GlyphShare, *GlyphSharePtr; + +static GlyphSharePtr sharedGlyphs = (GlyphSharePtr)NULL; + +#ifdef XFIXES +static CARD32 cursorSerial; +#endif + +static void +FreeCursorBits(CursorBitsPtr bits) +{ + if (--bits->refcnt > 0) + return; + xfree(bits->source); + xfree(bits->mask); +#ifdef ARGB_CURSOR + xfree(bits->argb); +#endif + if (bits->refcnt == 0) + { + GlyphSharePtr *prev, this; + + for (prev = &sharedGlyphs; + (this = *prev) && (this->bits != bits); + prev = &this->next) + ; + if (this) + { + *prev = this->next; + CloseFont(this->font, (Font)0); + xfree(this); + } + xfree(bits); + } +} + +/** + * To be called indirectly by DeleteResource; must use exactly two args. + * + * \param value must conform to DeleteType + */ +_X_EXPORT int +FreeCursor(pointer value, XID cid) +{ + int nscr; + CursorPtr pCurs = (CursorPtr)value; + + ScreenPtr pscr; + + if ( --pCurs->refcnt > 0) + return(Success); + + for (nscr = 0; nscr < screenInfo.numScreens; nscr++) + { + pscr = screenInfo.screens[nscr]; + (void)( *pscr->UnrealizeCursor)( pscr, pCurs); + } + FreeCursorBits(pCurs->bits); + xfree( pCurs); + return(Success); +} + + +/* + * We check for empty cursors so that we won't have to display them + */ +static void +CheckForEmptyMask(CursorBitsPtr bits) +{ + unsigned char *msk = bits->mask; + int n = BitmapBytePad(bits->width) * bits->height; + + bits->emptyMask = FALSE; + while(n--) + if(*(msk++) != 0) return; +#ifdef ARGB_CURSOR + if (bits->argb) + { + CARD32 *argb = bits->argb; + int n = bits->width * bits->height; + while (n--) + if (*argb++ & 0xff000000) return; + } +#endif + bits->emptyMask = TRUE; +} + +/** + * does nothing about the resource table, just creates the data structure. + * does not copy the src and mask bits + * + * \param psrcbits server-defined padding + * \param pmaskbits server-defined padding + * \param argb no padding + */ +CursorPtr +AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, + CursorMetricPtr cm, + unsigned foreRed, unsigned foreGreen, unsigned foreBlue, + unsigned backRed, unsigned backGreen, unsigned backBlue) +{ + CursorBitsPtr bits; + CursorPtr pCurs; + int nscr; + ScreenPtr pscr; + + pCurs = (CursorPtr)xalloc(sizeof(CursorRec) + sizeof(CursorBits)); + if (!pCurs) + { + xfree(psrcbits); + xfree(pmaskbits); + return (CursorPtr)NULL; + } + bits = (CursorBitsPtr)((char *)pCurs + sizeof(CursorRec)); + bits->source = psrcbits; + bits->mask = pmaskbits; +#ifdef ARGB_CURSOR + bits->argb = argb; +#endif + bits->width = cm->width; + bits->height = cm->height; + bits->xhot = cm->xhot; + bits->yhot = cm->yhot; + bits->refcnt = -1; + CheckForEmptyMask(bits); + + pCurs->bits = bits; + pCurs->refcnt = 1; +#ifdef XFIXES + pCurs->serialNumber = ++cursorSerial; + pCurs->name = None; +#endif + + pCurs->foreRed = foreRed; + pCurs->foreGreen = foreGreen; + pCurs->foreBlue = foreBlue; + + pCurs->backRed = backRed; + pCurs->backGreen = backGreen; + pCurs->backBlue = backBlue; + + /* + * realize the cursor for every screen + */ + for (nscr = 0; nscr < screenInfo.numScreens; nscr++) + { + pscr = screenInfo.screens[nscr]; + if (!( *pscr->RealizeCursor)( pscr, pCurs)) + { + while (--nscr >= 0) + { + pscr = screenInfo.screens[nscr]; + ( *pscr->UnrealizeCursor)( pscr, pCurs); + } + FreeCursorBits(bits); + xfree(pCurs); + return (CursorPtr)NULL; + } + } + return pCurs; +} + +/** + * + * \param psrcbits server-defined padding + * \param pmaskbits server-defined padding + */ +CursorPtr +AllocCursor(unsigned char *psrcbits, unsigned char *pmaskbits, + CursorMetricPtr cm, + unsigned foreRed, unsigned foreGreen, unsigned foreBlue, + unsigned backRed, unsigned backGreen, unsigned backBlue) +{ + return AllocCursorARGB (psrcbits, pmaskbits, (CARD32 *) 0, cm, + foreRed, foreGreen, foreBlue, + backRed, backGreen, backBlue); +} + +int +AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, + unsigned foreRed, unsigned foreGreen, unsigned foreBlue, + unsigned backRed, unsigned backGreen, unsigned backBlue, + CursorPtr *ppCurs, ClientPtr client) +{ + FontPtr sourcefont, maskfont; + unsigned char *srcbits; + unsigned char *mskbits; + CursorMetricRec cm; + int res; + CursorBitsPtr bits; + CursorPtr pCurs; + int nscr; + ScreenPtr pscr; + GlyphSharePtr pShare; + + sourcefont = (FontPtr) SecurityLookupIDByType(client, source, RT_FONT, + DixReadAccess); + maskfont = (FontPtr) SecurityLookupIDByType(client, mask, RT_FONT, + DixReadAccess); + + if (!sourcefont) + { + client->errorValue = source; + return(BadFont); + } + if (!maskfont && (mask != None)) + { + client->errorValue = mask; + return(BadFont); + } + if (sourcefont != maskfont) + pShare = (GlyphSharePtr)NULL; + else + { + for (pShare = sharedGlyphs; + pShare && + ((pShare->font != sourcefont) || + (pShare->sourceChar != sourceChar) || + (pShare->maskChar != maskChar)); + pShare = pShare->next) + ; + } + if (pShare) + { + pCurs = (CursorPtr)xalloc(sizeof(CursorRec)); + if (!pCurs) + return BadAlloc; + bits = pShare->bits; + bits->refcnt++; + } + else + { + if (!CursorMetricsFromGlyph(sourcefont, sourceChar, &cm)) + { + client->errorValue = sourceChar; + return BadValue; + } + if (!maskfont) + { + long n; + unsigned char *mskptr; + + n = BitmapBytePad(cm.width)*(long)cm.height; + mskptr = mskbits = (unsigned char *)xalloc(n); + if (!mskptr) + return BadAlloc; + while (--n >= 0) + *mskptr++ = ~0; + } + else + { + if (!CursorMetricsFromGlyph(maskfont, maskChar, &cm)) + { + client->errorValue = maskChar; + return BadValue; + } + if ((res = ServerBitsFromGlyph(maskfont, maskChar, &cm, &mskbits)) != 0) + return res; + } + if ((res = ServerBitsFromGlyph(sourcefont, sourceChar, &cm, &srcbits)) != 0) + { + xfree(mskbits); + return res; + } + if (sourcefont != maskfont) + { + pCurs = (CursorPtr)xalloc(sizeof(CursorRec) + sizeof(CursorBits)); + if (pCurs) + bits = (CursorBitsPtr)((char *)pCurs + sizeof(CursorRec)); + else + bits = (CursorBitsPtr)NULL; + } + else + { + pCurs = (CursorPtr)xalloc(sizeof(CursorRec)); + if (pCurs) + bits = (CursorBitsPtr)xalloc(sizeof(CursorBits)); + else + bits = (CursorBitsPtr)NULL; + } + if (!bits) + { + xfree(pCurs); + xfree(mskbits); + xfree(srcbits); + return BadAlloc; + } + bits->source = srcbits; + bits->mask = mskbits; +#ifdef ARGB_CURSOR + bits->argb = 0; +#endif + bits->width = cm.width; + bits->height = cm.height; + bits->xhot = cm.xhot; + bits->yhot = cm.yhot; + if (sourcefont != maskfont) + bits->refcnt = -1; + else + { + bits->refcnt = 1; + pShare = (GlyphSharePtr)xalloc(sizeof(GlyphShare)); + if (!pShare) + { + FreeCursorBits(bits); + return BadAlloc; + } + pShare->font = sourcefont; + sourcefont->refcnt++; + pShare->sourceChar = sourceChar; + pShare->maskChar = maskChar; + pShare->bits = bits; + pShare->next = sharedGlyphs; + sharedGlyphs = pShare; + } + } + CheckForEmptyMask(bits); + pCurs->bits = bits; + pCurs->refcnt = 1; +#ifdef XFIXES + pCurs->serialNumber = ++cursorSerial; + pCurs->name = None; +#endif + + pCurs->foreRed = foreRed; + pCurs->foreGreen = foreGreen; + pCurs->foreBlue = foreBlue; + + pCurs->backRed = backRed; + pCurs->backGreen = backGreen; + pCurs->backBlue = backBlue; + + /* + * realize the cursor for every screen + */ + for (nscr = 0; nscr < screenInfo.numScreens; nscr++) + { + pscr = screenInfo.screens[nscr]; + if (!( *pscr->RealizeCursor)( pscr, pCurs)) + { + while (--nscr >= 0) + { + pscr = screenInfo.screens[nscr]; + ( *pscr->UnrealizeCursor)( pscr, pCurs); + } + FreeCursorBits(pCurs->bits); + xfree(pCurs); + return BadAlloc; + } + } + *ppCurs = pCurs; + return Success; +} + +/** CreateRootCursor + * + * look up the name of a font + * open the font + * add the font to the resource table + * make a cursor from the glyphs + * add the cursor to the resource table + *************************************************************/ + +CursorPtr +CreateRootCursor(char *unused1, unsigned int unused2) +{ + CursorPtr curs; +#ifdef NULL_ROOT_CURSOR + CursorMetricRec cm; +#else + FontPtr cursorfont; + int err; + XID fontID; +#endif + +#ifdef NULL_ROOT_CURSOR + cm.width = 0; + cm.height = 0; + cm.xhot = 0; + cm.yhot = 0; + + curs = AllocCursor(NULL, NULL, &cm, 0, 0, 0, 0, 0, 0); + + if (curs == NullCursor) + return NullCursor; +#else + fontID = FakeClientID(0); + err = OpenFont(serverClient, fontID, FontLoadAll | FontOpenSync, + (unsigned)strlen(defaultCursorFont), defaultCursorFont); + if (err != Success) + return NullCursor; + + cursorfont = (FontPtr)LookupIDByType(fontID, RT_FONT); + if (!cursorfont) + return NullCursor; + if (AllocGlyphCursor(fontID, 0, fontID, 1, + 0, 0, 0, ~0, ~0, ~0, &curs, serverClient) != Success) + return NullCursor; +#endif + + if (!AddResource(FakeClientID(0), RT_CURSOR, (pointer)curs)) + return NullCursor; + + return curs; +} diff --git a/xorg-server-1.4/dix/devices.c b/xorg-server-1.4/dix/devices.c new file mode 100644 index 0000000..9f3c576 --- /dev/null +++ b/xorg-server-1.4/dix/devices.c @@ -0,0 +1,2053 @@ +/************************************************************ + +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 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. + +********************************************************/ + + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "misc.h" +#include "resource.h" +#define NEED_EVENTS +#define NEED_REPLIES +#include +#include "windowstr.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "cursorstr.h" +#include "dixstruct.h" +#include "site.h" +#ifndef XKB_IN_SERVER +#define XKB_IN_SERVER +#endif +#ifdef XKB +#include +#endif +#include "xace.h" + +#include "dispatch.h" +#include "swaprep.h" +#include "dixevents.h" + +#include +#include +#include "exglobals.h" +#include "exevents.h" + +/** @file + * This file handles input device-related stuff. + */ + +int CoreDevicePrivatesIndex = 0; +static int CoreDevicePrivatesGeneration = -1; + +/** + * Create a new input device and init it to sane values. The device is added + * to the server's off_devices list. + * + * @param deviceProc Callback for device control function (switch dev on/off). + * @return The newly created device. + */ +DeviceIntPtr +AddInputDevice(DeviceProc deviceProc, Bool autoStart) +{ + DeviceIntPtr dev, *prev; /* not a typo */ + DeviceIntPtr devtmp; + int devid; + char devind[MAX_DEVICES]; + + /* Find next available id */ + memset(devind, 0, sizeof(char)*MAX_DEVICES); + for (devtmp = inputInfo.devices; devtmp; devtmp = devtmp->next) + devind[devtmp->id]++; + for (devtmp = inputInfo.off_devices; devtmp; devtmp = devtmp->next) + devind[devtmp->id]++; + for (devid = 0; devid < MAX_DEVICES && devind[devid]; devid++) + ; + + if (devid >= MAX_DEVICES) + return (DeviceIntPtr)NULL; + dev = (DeviceIntPtr) xcalloc(sizeof(DeviceIntRec), 1); + if (!dev) + return (DeviceIntPtr)NULL; + dev->name = (char *)NULL; + dev->type = 0; + dev->id = devid; + inputInfo.numDevices++; + dev->public.on = FALSE; + dev->public.processInputProc = (ProcessInputProc)NoopDDA; + dev->public.realInputProc = (ProcessInputProc)NoopDDA; + dev->public.enqueueInputProc = EnqueueEvent; + dev->deviceProc = deviceProc; + dev->startup = autoStart; + dev->sync.frozen = FALSE; + dev->sync.other = NullGrab; + dev->sync.state = NOT_GRABBED; + dev->sync.event = (xEvent *) NULL; + dev->sync.evcount = 0; + dev->grab = NullGrab; + dev->grabTime = currentTime; + dev->fromPassiveGrab = FALSE; + dev->key = (KeyClassPtr)NULL; + dev->valuator = (ValuatorClassPtr)NULL; + dev->button = (ButtonClassPtr)NULL; + dev->focus = (FocusClassPtr)NULL; + dev->proximity = (ProximityClassPtr)NULL; + dev->absolute = (AbsoluteClassPtr)NULL; + dev->kbdfeed = (KbdFeedbackPtr)NULL; + dev->ptrfeed = (PtrFeedbackPtr)NULL; + dev->intfeed = (IntegerFeedbackPtr)NULL; + dev->stringfeed = (StringFeedbackPtr)NULL; + dev->bell = (BellFeedbackPtr)NULL; + dev->leds = (LedFeedbackPtr)NULL; +#ifdef XKB + dev->xkb_interest = NULL; +#endif + dev->config_info = NULL; + dev->nPrivates = 0; + dev->devPrivates = NULL; + dev->unwrapProc = NULL; + dev->coreEvents = TRUE; + dev->inited = FALSE; + dev->enabled = FALSE; + + for (prev = &inputInfo.off_devices; *prev; prev = &(*prev)->next) + ; + *prev = dev; + dev->next = NULL; + + return dev; +} + +/** + * Switch device ON through the driver and push it onto the global device + * list. All clients are notified about the device being enabled. + * + * A device will send events once enabled. + * + * @param The device to be enabled. + * @return TRUE on success or FALSE otherwise. + */ +Bool +EnableDevice(DeviceIntPtr dev) +{ + DeviceIntPtr *prev; + int ret; + DeviceIntRec dummyDev; + devicePresenceNotify ev; + + for (prev = &inputInfo.off_devices; + *prev && (*prev != dev); + prev = &(*prev)->next) + ; + if ((*prev != dev) || !dev->inited || + ((ret = (*dev->deviceProc)(dev, DEVICE_ON)) != Success)) { + ErrorF("couldn't enable device %d\n", dev->id); + return FALSE; + } + dev->enabled = TRUE; + *prev = dev->next; + + for (prev = &inputInfo.devices; *prev; prev = &(*prev)->next) + ; + *prev = dev; + dev->next = NULL; + + ev.type = DevicePresenceNotify; + ev.time = currentTime.milliseconds; + ev.devchange = DeviceEnabled; + ev.deviceid = dev->id; + dummyDev.id = 0; + SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, + (xEvent *) &ev, 1); + + return TRUE; +} + +/** + * Switch a device off through the driver and push it onto the off_devices + * list. A device will not send events while disabled. All clients are + * notified about the device being disabled. + * + * @return TRUE on success or FALSE otherwise. + */ +Bool +DisableDevice(DeviceIntPtr dev) +{ + DeviceIntPtr *prev; + DeviceIntRec dummyDev; + devicePresenceNotify ev; + + for (prev = &inputInfo.devices; + *prev && (*prev != dev); + prev = &(*prev)->next) + ; + if (*prev != dev) + return FALSE; + (void)(*dev->deviceProc)(dev, DEVICE_OFF); + dev->enabled = FALSE; + *prev = dev->next; + dev->next = inputInfo.off_devices; + inputInfo.off_devices = dev; + + ev.type = DevicePresenceNotify; + ev.time = currentTime.milliseconds; + ev.devchange = DeviceDisabled; + ev.deviceid = dev->id; + dummyDev.id = 0; + SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, + (xEvent *) &ev, 1); + + return TRUE; +} + +/** + * Initialise a new device through the driver and tell all clients about the + * new device. + * + * The device will NOT send events until it is enabled! + * + * @return Success or an error code on failure. + */ +int +ActivateDevice(DeviceIntPtr dev) +{ + int ret = Success; + devicePresenceNotify ev; + DeviceIntRec dummyDev; + + if (!dev || !dev->deviceProc) + return BadImplementation; + + ret = (*dev->deviceProc) (dev, DEVICE_INIT); + dev->inited = (ret == Success); + + ev.type = DevicePresenceNotify; + ev.time = currentTime.milliseconds; + ev.devchange = DeviceAdded; + ev.deviceid = dev->id; + dummyDev.id = 0; + SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, + (xEvent *) &ev, 1); + + return ret; +} + +/** + * Ring the bell. + * The actual task of ringing the bell is the job of the DDX. + */ +static void +CoreKeyboardBell(int volume, DeviceIntPtr pDev, pointer arg, int something) +{ + KeybdCtrl *ctrl = arg; + + DDXRingBell(volume, ctrl->bell_pitch, ctrl->bell_duration); +} + +static void +CoreKeyboardCtl(DeviceIntPtr pDev, KeybdCtrl *ctrl) +{ + return; +} + +/** + * Device control function for the Virtual Core Keyboard. + */ +static int +CoreKeyboardProc(DeviceIntPtr pDev, int what) +{ + CARD8 *modMap; + KeySymsRec keySyms; +#ifdef XKB + XkbComponentNamesRec names; +#endif + + switch (what) { + case DEVICE_INIT: + keySyms.minKeyCode = 8; + keySyms.maxKeyCode = 255; + keySyms.mapWidth = 4; + keySyms.map = (KeySym *)xcalloc(sizeof(KeySym), + (keySyms.maxKeyCode - + keySyms.minKeyCode + 1) * + keySyms.mapWidth); + if (!keySyms.map) { + ErrorF("Couldn't allocate core keymap\n"); + return BadAlloc; + } + + modMap = (CARD8 *)xalloc(MAP_LENGTH); + if (!modMap) { + ErrorF("Couldn't allocate core modifier map\n"); + return BadAlloc; + } + bzero((char *)modMap, MAP_LENGTH); + +#ifdef XKB + if (!noXkbExtension) { + bzero(&names, sizeof(names)); + XkbSetRulesDflts("base", "pc105", "us", NULL, NULL); + XkbInitKeyboardDeviceStruct(pDev, &names, &keySyms, modMap, + CoreKeyboardBell, CoreKeyboardCtl); + } + else +#endif + { + /* FIXME Our keymap here isn't exactly useful. */ + InitKeyboardDeviceStruct((DevicePtr)pDev, &keySyms, modMap, + CoreKeyboardBell, CoreKeyboardCtl); + } + + xfree(keySyms.map); + xfree(modMap); + + break; + + case DEVICE_CLOSE: + pDev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; + break; + + default: + break; + } + return Success; +} + +/** + * Device control function for the Virtual Core Pointer. + */ +static int +CorePointerProc(DeviceIntPtr pDev, int what) +{ + BYTE map[33]; + int i = 0; + + switch (what) { + case DEVICE_INIT: + for (i = 1; i <= 32; i++) + map[i] = i; + InitPointerDeviceStruct((DevicePtr)pDev, map, 32, + GetMotionHistory, (PtrCtrlProcPtr)NoopDDA, + GetMotionHistorySize(), 2); + pDev->valuator->axisVal[0] = screenInfo.screens[0]->width / 2; + pDev->valuator->lastx = pDev->valuator->axisVal[0]; + pDev->valuator->axisVal[1] = screenInfo.screens[0]->height / 2; + pDev->valuator->lasty = pDev->valuator->axisVal[1]; + break; + + case DEVICE_CLOSE: + pDev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; + break; + + default: + break; + } + + return Success; +} + +/** + * Initialise the two core devices, VCP and VCK (see events.c). + * The devices are activated but not enabled. + * Note that the server MUST have two core devices at all times, even if there + * is no physical device connected. + */ +void +InitCoreDevices(void) +{ + DeviceIntPtr dev; + + if (CoreDevicePrivatesGeneration != serverGeneration) { + CoreDevicePrivatesIndex = AllocateDevicePrivateIndex(); + CoreDevicePrivatesGeneration = serverGeneration; + } + + if (!inputInfo.keyboard) { + dev = AddInputDevice(CoreKeyboardProc, TRUE); + if (!dev) + FatalError("Failed to allocate core keyboard"); + dev->name = strdup("Virtual core keyboard"); +#ifdef XKB + dev->public.processInputProc = CoreProcessKeyboardEvent; + dev->public.realInputProc = CoreProcessKeyboardEvent; + if (!noXkbExtension) + XkbSetExtension(dev, ProcessKeyboardEvent); +#else + dev->public.processInputProc = ProcessKeyboardEvent; + dev->public.realInputProc = ProcessKeyboardEvent; +#endif + dev->ActivateGrab = ActivateKeyboardGrab; + dev->DeactivateGrab = DeactivateKeyboardGrab; + dev->coreEvents = FALSE; + if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) + FatalError("Couldn't allocate keyboard devPrivates\n"); + dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; + (void)ActivateDevice(dev); + inputInfo.keyboard = dev; + } + + if (!inputInfo.pointer) { + dev = AddInputDevice(CorePointerProc, TRUE); + if (!dev) + FatalError("Failed to allocate core pointer"); + dev->name = strdup("Virtual core pointer"); +#ifdef XKB + dev->public.processInputProc = CoreProcessPointerEvent; + dev->public.realInputProc = CoreProcessPointerEvent; + if (!noXkbExtension) + XkbSetExtension(dev, ProcessPointerEvent); +#else + dev->public.processInputProc = ProcessPointerEvent; + dev->public.realInputProc = ProcessPointerEvent; +#endif + dev->ActivateGrab = ActivatePointerGrab; + dev->DeactivateGrab = DeactivatePointerGrab; + dev->coreEvents = FALSE; + if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) + FatalError("Couldn't allocate pointer devPrivates\n"); + dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; + (void)ActivateDevice(dev); + inputInfo.pointer = dev; + } +} + +/** + * Activate all switched-off devices and then enable all those devices. + * + * Will return an error if no core keyboard or core pointer is present. + * In theory this should never happen if you call InitCoreDevices() first. + * + * @return Success or error code on failure. + */ +int +InitAndStartDevices(void) +{ + DeviceIntPtr dev, next; + + for (dev = inputInfo.off_devices; dev; dev = dev->next) { + DebugF("(dix) initialising device %d\n", dev->id); + ActivateDevice(dev); + } + for (dev = inputInfo.off_devices; dev; dev = next) + { + DebugF("(dix) enabling device %d\n", dev->id); + next = dev->next; + if (dev->inited && dev->startup) + (void)EnableDevice(dev); + } + for (dev = inputInfo.devices; + dev && (dev != inputInfo.keyboard); + dev = dev->next) + ; + if (!dev || (dev != inputInfo.keyboard)) { + ErrorF("No core keyboard\n"); + return BadImplementation; + } + for (dev = inputInfo.devices; + dev && (dev != inputInfo.pointer); + dev = dev->next) + ; + if (!dev || (dev != inputInfo.pointer)) { + ErrorF("No core pointer\n"); + return BadImplementation; + } + return Success; +} + +/** + * Close down a device and free all resources. + * Once closed down, the driver will probably not expect you that you'll ever + * enable it again and free associated structs. If you want the device to just + * be disabled, DisableDevice(). + * Don't call this function directly, use RemoveDevice() instead. + */ +static void +CloseDevice(DeviceIntPtr dev) +{ + KbdFeedbackPtr k, knext; + PtrFeedbackPtr p, pnext; + IntegerFeedbackPtr i, inext; + StringFeedbackPtr s, snext; + BellFeedbackPtr b, bnext; + LedFeedbackPtr l, lnext; + + if (dev->inited) + (void)(*dev->deviceProc)(dev, DEVICE_CLOSE); + + xfree(dev->name); + + if (dev->key) { +#ifdef XKB + if (dev->key->xkbInfo) + XkbFreeInfo(dev->key->xkbInfo); +#endif + xfree(dev->key->curKeySyms.map); + xfree(dev->key->modifierKeyMap); + xfree(dev->key); + } + + if (dev->valuator) { + /* Counterpart to 'biggest hack ever' in init. */ + if (dev->valuator->motion && + dev->valuator->GetMotionProc == GetMotionHistory) + xfree(dev->valuator->motion); + xfree(dev->valuator); + } + + if (dev->button) { +#ifdef XKB + if (dev->button->xkb_acts) + xfree(dev->button->xkb_acts); +#endif + xfree(dev->button); + } + + if (dev->focus) { + xfree(dev->focus->trace); + xfree(dev->focus); + } + + if (dev->proximity) + xfree(dev->proximity); + + for (k = dev->kbdfeed; k; k = knext) { + knext = k->next; +#ifdef XKB + if (k->xkb_sli) + XkbFreeSrvLedInfo(k->xkb_sli); +#endif + xfree(k); + } + + for (p = dev->ptrfeed; p; p = pnext) { + pnext = p->next; + xfree(p); + } + + for (i = dev->intfeed; i; i = inext) { + inext = i->next; + xfree(i); + } + + for (s = dev->stringfeed; s; s = snext) { + snext = s->next; + xfree(s->ctrl.symbols_supported); + xfree(s->ctrl.symbols_displayed); + xfree(s); + } + + for (b = dev->bell; b; b = bnext) { + bnext = b->next; + xfree(b); + } + + for (l = dev->leds; l; l = lnext) { + lnext = l->next; +#ifdef XKB + if (l->xkb_sli) + XkbFreeSrvLedInfo(l->xkb_sli); +#endif + xfree(l); + } + +#ifdef XKB + while (dev->xkb_interest) + XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource); +#endif + + if (dev->devPrivates) + xfree(dev->devPrivates); + + xfree(dev->sync.event); + xfree(dev); +} + +/** + * Shut down all devices, free all resources, etc. + * Only useful if you're shutting down the server! + */ +void +CloseDownDevices(void) +{ + DeviceIntPtr dev, next; + + for (dev = inputInfo.devices; dev; dev = next) + { + next = dev->next; + CloseDevice(dev); + } + for (dev = inputInfo.off_devices; dev; dev = next) + { + next = dev->next; + CloseDevice(dev); + } + inputInfo.devices = NULL; + inputInfo.off_devices = NULL; + inputInfo.keyboard = NULL; + inputInfo.pointer = NULL; +} + +/** + * Remove a device from the device list, closes it and thus frees all + * resources. + * Removes both enabled and disabled devices and notifies all devices about + * the removal of the device. + */ +int +RemoveDevice(DeviceIntPtr dev) +{ + DeviceIntPtr prev,tmp,next; + int ret = BadMatch; + devicePresenceNotify ev; + DeviceIntRec dummyDev; + int deviceid; + + DebugF("(dix) removing device %d\n", dev->id); + + if (!dev || dev == inputInfo.keyboard || dev == inputInfo.pointer) + return BadImplementation; + + deviceid = dev->id; + DisableDevice(dev); + + prev = NULL; + for (tmp = inputInfo.devices; tmp; (prev = tmp), (tmp = next)) { + next = tmp->next; + if (tmp == dev) { + CloseDevice(tmp); + + if (prev==NULL) + inputInfo.devices = next; + else + prev->next = next; + + ret = Success; + } + } + + prev = NULL; + for (tmp = inputInfo.off_devices; tmp; (prev = tmp), (tmp = next)) { + next = tmp->next; + if (tmp == dev) { + CloseDevice(tmp); + + if (prev == NULL) + inputInfo.off_devices = next; + else + prev->next = next; + + ret = Success; + } + } + + if (ret == Success) { + inputInfo.numDevices--; + ev.type = DevicePresenceNotify; + ev.time = currentTime.milliseconds; + ev.devchange = DeviceRemoved; + ev.deviceid = deviceid; + dummyDev.id = 0; + SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, + (xEvent *) &ev, 1); + } + + return ret; +} + +int +NumMotionEvents(void) +{ + return inputInfo.pointer->valuator->numMotionEvents; +} + +void +RegisterPointerDevice(DeviceIntPtr device) +{ + RegisterOtherDevice(device); +} + +void +RegisterKeyboardDevice(DeviceIntPtr device) +{ + RegisterOtherDevice(device); +} + +_X_EXPORT DevicePtr +LookupKeyboardDevice(void) +{ + return inputInfo.keyboard ? &inputInfo.keyboard->public : NULL; +} + +_X_EXPORT DevicePtr +LookupPointerDevice(void) +{ + return inputInfo.pointer ? &inputInfo.pointer->public : NULL; +} + +DevicePtr +LookupDevice(int id) +{ + DeviceIntPtr dev; + + for (dev=inputInfo.devices; dev; dev=dev->next) { + if (dev->id == (CARD8)id) + return (DevicePtr)dev; + } + for (dev=inputInfo.off_devices; dev; dev=dev->next) { + if (dev->id == (CARD8)id) + return (DevicePtr)dev; + } + return NULL; +} + +void +QueryMinMaxKeyCodes(KeyCode *minCode, KeyCode *maxCode) +{ + if (inputInfo.keyboard) { + *minCode = inputInfo.keyboard->key->curKeySyms.minKeyCode; + *maxCode = inputInfo.keyboard->key->curKeySyms.maxKeyCode; + } +} + +Bool +SetKeySymsMap(KeySymsPtr dst, KeySymsPtr src) +{ + int i, j; + int rowDif = src->minKeyCode - dst->minKeyCode; + + /* if keysym map size changes, grow map first */ + if (src->mapWidth < dst->mapWidth) + { + for (i = src->minKeyCode; i <= src->maxKeyCode; i++) + { +#define SI(r, c) (((r-src->minKeyCode)*src->mapWidth) + (c)) +#define DI(r, c) (((r - dst->minKeyCode)*dst->mapWidth) + (c)) + for (j = 0; j < src->mapWidth; j++) + dst->map[DI(i, j)] = src->map[SI(i, j)]; + for (j = src->mapWidth; j < dst->mapWidth; j++) + dst->map[DI(i, j)] = NoSymbol; +#undef SI +#undef DI + } + return TRUE; + } + else if (src->mapWidth > dst->mapWidth) + { + KeySym *map; + int bytes = sizeof(KeySym) * src->mapWidth * + (dst->maxKeyCode - dst->minKeyCode + 1); + map = (KeySym *)xalloc(bytes); + if (!map) + return FALSE; + bzero((char *)map, bytes); + if (dst->map) + { + for (i = 0; i <= dst->maxKeyCode-dst->minKeyCode; i++) + memmove((char *)&map[i*src->mapWidth], + (char *)&dst->map[i*dst->mapWidth], + dst->mapWidth * sizeof(KeySym)); + xfree(dst->map); + } + dst->mapWidth = src->mapWidth; + dst->map = map; + } + memmove((char *)&dst->map[rowDif * dst->mapWidth], + (char *)src->map, + (int)(src->maxKeyCode - src->minKeyCode + 1) * + dst->mapWidth * sizeof(KeySym)); + return TRUE; +} + +static Bool +InitModMap(KeyClassPtr keyc) +{ + int i, j; + CARD8 keysPerModifier[8]; + CARD8 mask; + + keyc->maxKeysPerModifier = 0; + for (i = 0; i < 8; i++) + keysPerModifier[i] = 0; + for (i = 8; i < MAP_LENGTH; i++) + { + for (j = 0, mask = 1; j < 8; j++, mask <<= 1) + { + if (mask & keyc->modifierMap[i]) + { + if (++keysPerModifier[j] > keyc->maxKeysPerModifier) + keyc->maxKeysPerModifier = keysPerModifier[j]; + } + } + } + keyc->modifierKeyMap = (KeyCode *)xalloc(8*keyc->maxKeysPerModifier); + if (!keyc->modifierKeyMap && keyc->maxKeysPerModifier) + return (FALSE); + bzero((char *)keyc->modifierKeyMap, 8*(int)keyc->maxKeysPerModifier); + for (i = 0; i < 8; i++) + keysPerModifier[i] = 0; + for (i = 8; i < MAP_LENGTH; i++) + { + for (j = 0, mask = 1; j < 8; j++, mask <<= 1) + { + if (mask & keyc->modifierMap[i]) + { + keyc->modifierKeyMap[(j*keyc->maxKeysPerModifier) + + keysPerModifier[j]] = i; + keysPerModifier[j]++; + } + } + } + return TRUE; +} + +_X_EXPORT Bool +InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers[]) +{ + int i; + KeyClassPtr keyc; + + keyc = (KeyClassPtr)xalloc(sizeof(KeyClassRec)); + if (!keyc) + return FALSE; + keyc->curKeySyms.map = (KeySym *)NULL; + keyc->curKeySyms.mapWidth = 0; + keyc->curKeySyms.minKeyCode = pKeySyms->minKeyCode; + keyc->curKeySyms.maxKeyCode = pKeySyms->maxKeyCode; + keyc->modifierKeyMap = (KeyCode *)NULL; + keyc->state = 0; + keyc->prev_state = 0; + if (pModifiers) + memmove((char *)keyc->modifierMap, (char *)pModifiers, MAP_LENGTH); + else + bzero((char *)keyc->modifierMap, MAP_LENGTH); + bzero((char *)keyc->down, DOWN_LENGTH); + bzero((char *)keyc->postdown, DOWN_LENGTH); + for (i = 0; i < 8; i++) + keyc->modifierKeyCount[i] = 0; + if (!SetKeySymsMap(&keyc->curKeySyms, pKeySyms) || !InitModMap(keyc)) + { + xfree(keyc->curKeySyms.map); + xfree(keyc->modifierKeyMap); + xfree(keyc); + return FALSE; + } + dev->key = keyc; +#ifdef XKB + dev->key->xkbInfo= NULL; + if (!noXkbExtension) XkbInitDevice(dev); +#endif + return TRUE; +} + +_X_EXPORT Bool +InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, + CARD8 *map) +{ + ButtonClassPtr butc; + int i; + + butc = (ButtonClassPtr)xalloc(sizeof(ButtonClassRec)); + if (!butc) + return FALSE; + butc->numButtons = numButtons; + for (i = 1; i <= numButtons; i++) + butc->map[i] = map[i]; + butc->buttonsDown = 0; + butc->state = 0; + butc->motionMask = 0; + bzero((char *)butc->down, DOWN_LENGTH); +#ifdef XKB + butc->xkb_acts= NULL; +#endif + dev->button = butc; + return TRUE; +} + +_X_EXPORT Bool +InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, + ValuatorMotionProcPtr motionProc, + int numMotionEvents, int mode) +{ + int i; + ValuatorClassPtr valc; + + if (!dev) + return FALSE; + + valc = (ValuatorClassPtr)xalloc(sizeof(ValuatorClassRec) + + numAxes * sizeof(AxisInfo) + + numAxes * sizeof(unsigned int)); + if (!valc) + return FALSE; + + valc->motion = NULL; + valc->first_motion = 0; + valc->last_motion = 0; + valc->GetMotionProc = motionProc; + + valc->numMotionEvents = numMotionEvents; + valc->motionHintWindow = NullWindow; + valc->numAxes = numAxes; + valc->mode = mode; + valc->axes = (AxisInfoPtr)(valc + 1); + valc->axisVal = (int *)(valc->axes + numAxes); + valc->lastx = 0; + valc->lasty = 0; + valc->dxremaind = 0; + valc->dyremaind = 0; + dev->valuator = valc; + + /* biggest hack ever. */ + if (motionProc == GetMotionHistory) + AllocateMotionHistory(dev); + + for (i=0; iaxisVal[i]=0; + } + return TRUE; +} + +_X_EXPORT Bool +InitAbsoluteClassDeviceStruct(DeviceIntPtr dev) +{ + AbsoluteClassPtr abs; + + abs = (AbsoluteClassPtr)xalloc(sizeof(AbsoluteClassRec)); + if (!abs) + return FALSE; + + /* we don't do anything sensible with these, but should */ + abs->min_x = -1; + abs->min_y = -1; + abs->max_x = -1; + abs->max_y = -1; + abs->flip_x = 0; + abs->flip_y = 0; + abs->rotation = 0; + abs->button_threshold = 0; + + abs->offset_x = 0; + abs->offset_y = 0; + abs->width = -1; + abs->height = -1; + abs->following = 0; + abs->screen = 0; + + dev->absolute = abs; + + return TRUE; +} + +_X_EXPORT Bool +InitFocusClassDeviceStruct(DeviceIntPtr dev) +{ + FocusClassPtr focc; + + focc = (FocusClassPtr)xalloc(sizeof(FocusClassRec)); + if (!focc) + return FALSE; + focc->win = PointerRootWin; + focc->revert = None; + focc->time = currentTime; + focc->trace = (WindowPtr *)NULL; + focc->traceSize = 0; + focc->traceGood = 0; + dev->focus = focc; + return TRUE; +} + +_X_EXPORT Bool +InitKbdFeedbackClassDeviceStruct(DeviceIntPtr dev, BellProcPtr bellProc, + KbdCtrlProcPtr controlProc) +{ + KbdFeedbackPtr feedc; + + feedc = (KbdFeedbackPtr)xalloc(sizeof(KbdFeedbackClassRec)); + if (!feedc) + return FALSE; + feedc->BellProc = bellProc; + feedc->CtrlProc = controlProc; +#ifdef XKB + defaultKeyboardControl.autoRepeat = TRUE; +#endif + feedc->ctrl = defaultKeyboardControl; + feedc->ctrl.id = 0; + if ((feedc->next = dev->kbdfeed) != 0) + feedc->ctrl.id = dev->kbdfeed->ctrl.id + 1; + dev->kbdfeed = feedc; +#ifdef XKB + feedc->xkb_sli= NULL; + if (!noXkbExtension) + XkbFinishDeviceInit(dev); +#endif + (*dev->kbdfeed->CtrlProc)(dev,&dev->kbdfeed->ctrl); + return TRUE; +} + +_X_EXPORT Bool +InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc) +{ + PtrFeedbackPtr feedc; + + feedc = (PtrFeedbackPtr)xalloc(sizeof(PtrFeedbackClassRec)); + if (!feedc) + return FALSE; + feedc->CtrlProc = controlProc; + feedc->ctrl = defaultPointerControl; + feedc->ctrl.id = 0; + if ( (feedc->next = dev->ptrfeed) ) + feedc->ctrl.id = dev->ptrfeed->ctrl.id + 1; + dev->ptrfeed = feedc; + (*controlProc)(dev, &feedc->ctrl); + return TRUE; +} + + +static LedCtrl defaultLedControl = { + DEFAULT_LEDS, DEFAULT_LEDS_MASK, 0}; + +static BellCtrl defaultBellControl = { + DEFAULT_BELL, + DEFAULT_BELL_PITCH, + DEFAULT_BELL_DURATION, + 0}; + +static IntegerCtrl defaultIntegerControl = { + DEFAULT_INT_RESOLUTION, + DEFAULT_INT_MIN_VALUE, + DEFAULT_INT_MAX_VALUE, + DEFAULT_INT_DISPLAYED, + 0}; + +_X_EXPORT Bool +InitStringFeedbackClassDeviceStruct ( + DeviceIntPtr dev, StringCtrlProcPtr controlProc, + int max_symbols, int num_symbols_supported, KeySym *symbols) +{ + int i; + StringFeedbackPtr feedc; + + feedc = (StringFeedbackPtr)xalloc(sizeof(StringFeedbackClassRec)); + if (!feedc) + return FALSE; + feedc->CtrlProc = controlProc; + feedc->ctrl.num_symbols_supported = num_symbols_supported; + feedc->ctrl.num_symbols_displayed = 0; + feedc->ctrl.max_symbols = max_symbols; + feedc->ctrl.symbols_supported = (KeySym *) + xalloc (sizeof (KeySym) * num_symbols_supported); + feedc->ctrl.symbols_displayed = (KeySym *) + xalloc (sizeof (KeySym) * max_symbols); + if (!feedc->ctrl.symbols_supported || !feedc->ctrl.symbols_displayed) + { + if (feedc->ctrl.symbols_supported) + xfree(feedc->ctrl.symbols_supported); + if (feedc->ctrl.symbols_displayed) + xfree(feedc->ctrl.symbols_displayed); + xfree(feedc); + return FALSE; + } + for (i=0; ictrl.symbols_supported+i) = *symbols++; + for (i=0; ictrl.symbols_displayed+i) = (KeySym) NULL; + feedc->ctrl.id = 0; + if ( (feedc->next = dev->stringfeed) ) + feedc->ctrl.id = dev->stringfeed->ctrl.id + 1; + dev->stringfeed = feedc; + (*controlProc)(dev, &feedc->ctrl); + return TRUE; +} + +_X_EXPORT Bool +InitBellFeedbackClassDeviceStruct (DeviceIntPtr dev, BellProcPtr bellProc, + BellCtrlProcPtr controlProc) +{ + BellFeedbackPtr feedc; + + feedc = (BellFeedbackPtr)xalloc(sizeof(BellFeedbackClassRec)); + if (!feedc) + return FALSE; + feedc->CtrlProc = controlProc; + feedc->BellProc = bellProc; + feedc->ctrl = defaultBellControl; + feedc->ctrl.id = 0; + if ( (feedc->next = dev->bell) ) + feedc->ctrl.id = dev->bell->ctrl.id + 1; + dev->bell = feedc; + (*controlProc)(dev, &feedc->ctrl); + return TRUE; +} + +_X_EXPORT Bool +InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc) +{ + LedFeedbackPtr feedc; + + feedc = (LedFeedbackPtr)xalloc(sizeof(LedFeedbackClassRec)); + if (!feedc) + return FALSE; + feedc->CtrlProc = controlProc; + feedc->ctrl = defaultLedControl; + feedc->ctrl.id = 0; + if ( (feedc->next = dev->leds) ) + feedc->ctrl.id = dev->leds->ctrl.id + 1; +#ifdef XKB + feedc->xkb_sli= NULL; +#endif + dev->leds = feedc; + (*controlProc)(dev, &feedc->ctrl); + return TRUE; +} + +_X_EXPORT Bool +InitIntegerFeedbackClassDeviceStruct (DeviceIntPtr dev, IntegerCtrlProcPtr controlProc) +{ + IntegerFeedbackPtr feedc; + + feedc = (IntegerFeedbackPtr)xalloc(sizeof(IntegerFeedbackClassRec)); + if (!feedc) + return FALSE; + feedc->CtrlProc = controlProc; + feedc->ctrl = defaultIntegerControl; + feedc->ctrl.id = 0; + if ( (feedc->next = dev->intfeed) ) + feedc->ctrl.id = dev->intfeed->ctrl.id + 1; + dev->intfeed = feedc; + (*controlProc)(dev, &feedc->ctrl); + return TRUE; +} + +_X_EXPORT Bool +InitPointerDeviceStruct(DevicePtr device, CARD8 *map, int numButtons, + ValuatorMotionProcPtr motionProc, + PtrCtrlProcPtr controlProc, int numMotionEvents, + int numAxes) +{ + DeviceIntPtr dev = (DeviceIntPtr)device; + + return(InitButtonClassDeviceStruct(dev, numButtons, map) && + InitValuatorClassDeviceStruct(dev, numAxes, motionProc, + numMotionEvents, 0) && + InitPtrFeedbackClassDeviceStruct(dev, controlProc)); +} + +_X_EXPORT Bool +InitKeyboardDeviceStruct(DevicePtr device, KeySymsPtr pKeySyms, + CARD8 pModifiers[], BellProcPtr bellProc, + KbdCtrlProcPtr controlProc) +{ + DeviceIntPtr dev = (DeviceIntPtr)device; + + return(InitKeyClassDeviceStruct(dev, pKeySyms, pModifiers) && + InitFocusClassDeviceStruct(dev) && + InitKbdFeedbackClassDeviceStruct(dev, bellProc, controlProc)); +} + +_X_EXPORT void +SendMappingNotify(unsigned request, unsigned firstKeyCode, unsigned count, + ClientPtr client) +{ + int i; + xEvent event; + + event.u.u.type = MappingNotify; + event.u.mappingNotify.request = request; + if (request == MappingKeyboard) + { + event.u.mappingNotify.firstKeyCode = firstKeyCode; + event.u.mappingNotify.count = count; + } +#ifdef XKB + if (!noXkbExtension && + ((request == MappingKeyboard) || (request == MappingModifier))) { + XkbApplyMappingChange(inputInfo.keyboard,request,firstKeyCode,count, + client); + } +#endif + + /* 0 is the server client */ + for (i=1; iclientState == ClientStateRunning) + { +#ifdef XKB + if (!noXkbExtension && + (request == MappingKeyboard) && + (clients[i]->xkbClientFlags != 0) && + (clients[i]->mapNotifyMask&XkbKeySymsMask)) + continue; +#endif + event.u.u.sequenceNumber = clients[i]->sequence; + WriteEventsToClient(clients[i], 1, &event); + } + } +} + +/* + * n-squared algorithm. n < 255 and don't want to copy the whole thing and + * sort it to do the checking. How often is it called? Just being lazy? + */ +Bool +BadDeviceMap(BYTE *buff, int length, unsigned low, unsigned high, XID *errval) +{ + int i, j; + + for (i = 0; i < length; i++) + if (buff[i]) /* only check non-zero elements */ + { + if ((low > buff[i]) || (high < buff[i])) + { + *errval = buff[i]; + return TRUE; + } + for (j = i + 1; j < length; j++) + if (buff[i] == buff[j]) + { + *errval = buff[i]; + return TRUE; + } + } + return FALSE; +} + +Bool +AllModifierKeysAreUp(dev, map1, per1, map2, per2) + DeviceIntPtr dev; + CARD8 *map1, *map2; + int per1, per2; +{ + int i, j, k; + CARD8 *down = dev->key->down; + + for (i = 8; --i >= 0; map2 += per2) + { + for (j = per1; --j >= 0; map1++) + { + if (*map1 && BitIsOn(down, *map1)) + { + for (k = per2; (--k >= 0) && (*map1 != map2[k]);) + ; + if (k < 0) + return FALSE; + } + } + } + return TRUE; +} + +static int +DoSetModifierMapping(ClientPtr client, KeyCode *inputMap, + int numKeyPerModifier) +{ + DeviceIntPtr pDev = NULL; + int i = 0, inputMapLen = numKeyPerModifier * 8; + + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { + for (i = 0; i < inputMapLen; i++) { + /* Check that all the new modifiers fall within the advertised + * keycode range, and are okay with the DDX. */ + if (inputMap[i] && ((inputMap[i] < pDev->key->curKeySyms.minKeyCode || + inputMap[i] > pDev->key->curKeySyms.maxKeyCode) || + !LegalModifier(inputMap[i], pDev))) { + client->errorValue = inputMap[i]; + return BadValue; + } + } + + if (!XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE)) + return BadAccess; + + /* None of the modifiers (old or new) may be down while we change + * the map. */ + if (!AllModifierKeysAreUp(pDev, pDev->key->modifierKeyMap, + pDev->key->maxKeysPerModifier, + inputMap, numKeyPerModifier) || + !AllModifierKeysAreUp(pDev, inputMap, numKeyPerModifier, + pDev->key->modifierKeyMap, + pDev->key->maxKeysPerModifier)) { + return MappingBusy; + } + } + } + + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + + if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { + bzero(pDev->key->modifierMap, MAP_LENGTH); + + /* Annoyingly, we lack a modifierKeyMap size, so we have to just free + * and re-alloc it every time. */ + if (pDev->key->modifierKeyMap) + xfree(pDev->key->modifierKeyMap); + + if (inputMapLen) { + pDev->key->modifierKeyMap = (KeyCode *) xalloc(inputMapLen); + if (!pDev->key->modifierKeyMap) + return BadAlloc; + + memcpy(pDev->key->modifierKeyMap, inputMap, inputMapLen); + pDev->key->maxKeysPerModifier = numKeyPerModifier; + + for (i = 0; i < inputMapLen; i++) { + if (inputMap[i]) { + pDev->key->modifierMap[inputMap[i]] |= + (1 << (((unsigned int)i) / numKeyPerModifier)); + } + } + } + else { + pDev->key->modifierKeyMap = NULL; + pDev->key->maxKeysPerModifier = 0; + } + } + } + + return Success; +} + +int +ProcSetModifierMapping(ClientPtr client) +{ + xSetModifierMappingReply rep; + REQUEST(xSetModifierMappingReq); + + REQUEST_AT_LEAST_SIZE(xSetModifierMappingReq); + + if (client->req_len != ((stuff->numKeyPerModifier << 1) + + (sizeof (xSetModifierMappingReq) >> 2))) + return BadLength; + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + rep.success = DoSetModifierMapping(client, (KeyCode *)&stuff[1], + stuff->numKeyPerModifier); + + /* FIXME: Send mapping notifies for all the extended devices as well. */ + SendMappingNotify(MappingModifier, 0, 0, client); + WriteReplyToClient(client, sizeof(xSetModifierMappingReply), &rep); + return client->noClientException; +} + +int +ProcGetModifierMapping(ClientPtr client) +{ + xGetModifierMappingReply rep; + KeyClassPtr keyc = inputInfo.keyboard->key; + + REQUEST_SIZE_MATCH(xReq); + rep.type = X_Reply; + rep.numKeyPerModifier = keyc->maxKeysPerModifier; + rep.sequenceNumber = client->sequence; + /* length counts 4 byte quantities - there are 8 modifiers 1 byte big */ + rep.length = keyc->maxKeysPerModifier << 1; + + WriteReplyToClient(client, sizeof(xGetModifierMappingReply), &rep); + + /* Use the (modified by DDX) map that SetModifierMapping passed in */ + (void)WriteToClient(client, (int)(keyc->maxKeysPerModifier << 3), + (char *)keyc->modifierKeyMap); + return client->noClientException; +} + +int +ProcChangeKeyboardMapping(ClientPtr client) +{ + REQUEST(xChangeKeyboardMappingReq); + unsigned len; + KeySymsRec keysyms; + KeySymsPtr curKeySyms = &inputInfo.keyboard->key->curKeySyms; + DeviceIntPtr pDev = NULL; + REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq); + + len = client->req_len - (sizeof(xChangeKeyboardMappingReq) >> 2); + if (len != (stuff->keyCodes * stuff->keySymsPerKeyCode)) + return BadLength; + + if ((stuff->firstKeyCode < curKeySyms->minKeyCode) || + (stuff->firstKeyCode > curKeySyms->maxKeyCode)) { + client->errorValue = stuff->firstKeyCode; + return BadValue; + + } + if (((unsigned)(stuff->firstKeyCode + stuff->keyCodes - 1) > + curKeySyms->maxKeyCode) || (stuff->keySymsPerKeyCode == 0)) { + client->errorValue = stuff->keySymsPerKeyCode; + return BadValue; + } + + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { + if (!XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE)) + return BadAccess; + } + } + + keysyms.minKeyCode = stuff->firstKeyCode; + keysyms.maxKeyCode = stuff->firstKeyCode + stuff->keyCodes - 1; + keysyms.mapWidth = stuff->keySymsPerKeyCode; + keysyms.map = (KeySym *)&stuff[1]; + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { + if (!SetKeySymsMap(&pDev->key->curKeySyms, &keysyms)) + return BadAlloc; + } + } + + /* FIXME: Send mapping notifies for all the extended devices as well. */ + SendMappingNotify(MappingKeyboard, stuff->firstKeyCode, stuff->keyCodes, + client); + return client->noClientException; +} + +static int +DoSetPointerMapping(DeviceIntPtr device, BYTE *map, int n) +{ + int i = 0; + DeviceIntPtr dev = NULL; + + if (!device || !device->button) + return BadDevice; + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if ((dev->coreEvents || dev == inputInfo.pointer) && dev->button) { + for (i = 0; i < n; i++) { + if ((device->button->map[i + 1] != map[i]) && + BitIsOn(device->button->down, i + 1)) { + return MappingBusy; + } + } + } + } + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if ((dev->coreEvents || dev == inputInfo.pointer) && dev->button) { + for (i = 0; i < n; i++) + dev->button->map[i + 1] = map[i]; + } + } + + return Success; +} + +int +ProcSetPointerMapping(ClientPtr client) +{ + REQUEST(xSetPointerMappingReq); + BYTE *map; + int ret; + xSetPointerMappingReply rep; + + REQUEST_AT_LEAST_SIZE(xSetPointerMappingReq); + if (client->req_len != (sizeof(xSetPointerMappingReq)+stuff->nElts+3) >> 2) + return BadLength; + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.success = MappingSuccess; + map = (BYTE *)&stuff[1]; + + /* So we're bounded here by the number of core buttons. This check + * probably wants disabling through XFixes. */ + if (stuff->nElts != inputInfo.pointer->button->numButtons) { + client->errorValue = stuff->nElts; + return BadValue; + } + if (BadDeviceMap(&map[0], (int)stuff->nElts, 1, 255, &client->errorValue)) + return BadValue; + + ret = DoSetPointerMapping(inputInfo.pointer, map, stuff->nElts); + if (ret != Success) { + rep.success = ret; + WriteReplyToClient(client, sizeof(xSetPointerMappingReply), &rep); + return Success; + } + + /* FIXME: Send mapping notifies for all the extended devices as well. */ + SendMappingNotify(MappingPointer, 0, 0, client); + WriteReplyToClient(client, sizeof(xSetPointerMappingReply), &rep); + return Success; +} + +int +ProcGetKeyboardMapping(ClientPtr client) +{ + xGetKeyboardMappingReply rep; + REQUEST(xGetKeyboardMappingReq); + KeySymsPtr curKeySyms = &inputInfo.keyboard->key->curKeySyms; + + REQUEST_SIZE_MATCH(xGetKeyboardMappingReq); + + if ((stuff->firstKeyCode < curKeySyms->minKeyCode) || + (stuff->firstKeyCode > curKeySyms->maxKeyCode)) { + client->errorValue = stuff->firstKeyCode; + return BadValue; + } + if (stuff->firstKeyCode + stuff->count > + (unsigned)(curKeySyms->maxKeyCode + 1)) { + client->errorValue = stuff->count; + return BadValue; + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.keySymsPerKeyCode = curKeySyms->mapWidth; + /* length is a count of 4 byte quantities and KeySyms are 4 bytes */ + rep.length = (curKeySyms->mapWidth * stuff->count); + WriteReplyToClient(client, sizeof(xGetKeyboardMappingReply), &rep); + client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; + WriteSwappedDataToClient( + client, + curKeySyms->mapWidth * stuff->count * sizeof(KeySym), + &curKeySyms->map[(stuff->firstKeyCode - curKeySyms->minKeyCode) * + curKeySyms->mapWidth]); + + return client->noClientException; +} + +int +ProcGetPointerMapping(ClientPtr client) +{ + xGetPointerMappingReply rep; + ButtonClassPtr butc = inputInfo.pointer->button; + + REQUEST_SIZE_MATCH(xReq); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.nElts = butc->numButtons; + rep.length = ((unsigned)rep.nElts + (4-1))/4; + WriteReplyToClient(client, sizeof(xGetPointerMappingReply), &rep); + (void)WriteToClient(client, (int)rep.nElts, (char *)&butc->map[1]); + return Success; +} + +void +NoteLedState(DeviceIntPtr keybd, int led, Bool on) +{ + KeybdCtrl *ctrl = &keybd->kbdfeed->ctrl; + if (on) + ctrl->leds |= ((Leds)1 << (led - 1)); + else + ctrl->leds &= ~((Leds)1 << (led - 1)); +} + +_X_EXPORT int +Ones(unsigned long mask) /* HACKMEM 169 */ +{ + unsigned long y; + + y = (mask >> 1) &033333333333; + y = mask - y - ((y >>1) & 033333333333); + return (((y + (y >> 3)) & 030707070707) % 077); +} + +static int +DoChangeKeyboardControl (ClientPtr client, DeviceIntPtr keybd, XID *vlist, + BITS32 vmask) +{ +#define DO_ALL (-1) + KeybdCtrl ctrl; + int t; + int led = DO_ALL; + int key = DO_ALL; + BITS32 index2; + int mask = vmask, i; + + ctrl = keybd->kbdfeed->ctrl; + while (vmask) { + index2 = (BITS32) lowbit (vmask); + vmask &= ~index2; + switch (index2) { + case KBKeyClickPercent: + t = (INT8)*vlist; + vlist++; + if (t == -1) { + t = defaultKeyboardControl.click; + } + else if (t < 0 || t > 100) { + client->errorValue = t; + return BadValue; + } + ctrl.click = t; + break; + case KBBellPercent: + t = (INT8)*vlist; + vlist++; + if (t == -1) { + t = defaultKeyboardControl.bell; + } + else if (t < 0 || t > 100) { + client->errorValue = t; + return BadValue; + } + ctrl.bell = t; + break; + case KBBellPitch: + t = (INT16)*vlist; + vlist++; + if (t == -1) { + t = defaultKeyboardControl.bell_pitch; + } + else if (t < 0) { + client->errorValue = t; + return BadValue; + } + ctrl.bell_pitch = t; + break; + case KBBellDuration: + t = (INT16)*vlist; + vlist++; + if (t == -1) + t = defaultKeyboardControl.bell_duration; + else if (t < 0) { + client->errorValue = t; + return BadValue; + } + ctrl.bell_duration = t; + break; + case KBLed: + led = (CARD8)*vlist; + vlist++; + if (led < 1 || led > 32) { + client->errorValue = led; + return BadValue; + } + if (!(mask & KBLedMode)) + return BadMatch; + break; + case KBLedMode: + t = (CARD8)*vlist; + vlist++; + if (t == LedModeOff) { + if (led == DO_ALL) + ctrl.leds = 0x0; + else + ctrl.leds &= ~(((Leds)(1)) << (led - 1)); + } + else if (t == LedModeOn) { + if (led == DO_ALL) + ctrl.leds = ~0L; + else + ctrl.leds |= (((Leds)(1)) << (led - 1)); + } + else { + client->errorValue = t; + return BadValue; + } +#ifdef XKB + if (!noXkbExtension) { + XkbEventCauseRec cause; + XkbSetCauseCoreReq(&cause,X_ChangeKeyboardControl,client); + XkbSetIndicators(keybd,((led == DO_ALL) ? ~0L : (1L<<(led-1))), + ctrl.leds, &cause); + ctrl.leds = keybd->kbdfeed->ctrl.leds; + } +#endif + break; + case KBKey: + key = (KeyCode)*vlist; + vlist++; + if ((KeyCode)key < inputInfo.keyboard->key->curKeySyms.minKeyCode || + (KeyCode)key > inputInfo.keyboard->key->curKeySyms.maxKeyCode) { + client->errorValue = key; + return BadValue; + } + if (!(mask & KBAutoRepeatMode)) + return BadMatch; + break; + case KBAutoRepeatMode: + i = (key >> 3); + mask = (1 << (key & 7)); + t = (CARD8)*vlist; + vlist++; +#ifdef XKB + if (!noXkbExtension && key != DO_ALL) + XkbDisableComputedAutoRepeats(keybd,key); +#endif + if (t == AutoRepeatModeOff) { + if (key == DO_ALL) + ctrl.autoRepeat = FALSE; + else + ctrl.autoRepeats[i] &= ~mask; + } + else if (t == AutoRepeatModeOn) { + if (key == DO_ALL) + ctrl.autoRepeat = TRUE; + else + ctrl.autoRepeats[i] |= mask; + } + else if (t == AutoRepeatModeDefault) { + if (key == DO_ALL) + ctrl.autoRepeat = defaultKeyboardControl.autoRepeat; + else + ctrl.autoRepeats[i] = + (ctrl.autoRepeats[i] & ~mask) | + (defaultKeyboardControl.autoRepeats[i] & mask); + } + else { + client->errorValue = t; + return BadValue; + } + break; + default: + client->errorValue = mask; + return BadValue; + } + } + keybd->kbdfeed->ctrl = ctrl; + +#ifdef XKB + /* The XKB RepeatKeys control and core protocol global autorepeat */ + /* value are linked */ + if (!noXkbExtension) + XkbSetRepeatKeys(keybd, key, keybd->kbdfeed->ctrl.autoRepeat); + else +#endif + (*keybd->kbdfeed->CtrlProc)(keybd, &keybd->kbdfeed->ctrl); + + return Success; + +#undef DO_ALL +} + +int +ProcChangeKeyboardControl (ClientPtr client) +{ + XID *vlist; + BITS32 vmask; + int ret = Success, error = Success; + DeviceIntPtr pDev = NULL; + REQUEST(xChangeKeyboardControlReq); + + REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq); + + vmask = stuff->mask; + vlist = (XID *)&stuff[1]; + + if (client->req_len != (sizeof(xChangeKeyboardControlReq)>>2)+Ones(vmask)) + return BadLength; + + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + if ((pDev->coreEvents || pDev == inputInfo.keyboard) && + pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { + if (!XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE)) + return BadAccess; + } + } + + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + if ((pDev->coreEvents || pDev == inputInfo.keyboard) && + pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { + ret = DoChangeKeyboardControl(client, pDev, vlist, vmask); + if (ret != Success) + error = ret; + } + } + + return error; +} + +int +ProcGetKeyboardControl (ClientPtr client) +{ + int i; + KeybdCtrl *ctrl = &inputInfo.keyboard->kbdfeed->ctrl; + xGetKeyboardControlReply rep; + + REQUEST_SIZE_MATCH(xReq); + rep.type = X_Reply; + rep.length = 5; + rep.sequenceNumber = client->sequence; + rep.globalAutoRepeat = ctrl->autoRepeat; + rep.keyClickPercent = ctrl->click; + rep.bellPercent = ctrl->bell; + rep.bellPitch = ctrl->bell_pitch; + rep.bellDuration = ctrl->bell_duration; + rep.ledMask = ctrl->leds; + for (i = 0; i < 32; i++) + rep.map[i] = ctrl->autoRepeats[i]; + WriteReplyToClient(client, sizeof(xGetKeyboardControlReply), &rep); + return Success; +} + +int +ProcBell(ClientPtr client) +{ + DeviceIntPtr keybd = inputInfo.keyboard; + int base = keybd->kbdfeed->ctrl.bell; + int newpercent; + REQUEST(xBellReq); + REQUEST_SIZE_MATCH(xBellReq); + + if (!keybd->kbdfeed->BellProc) + return BadDevice; + + if (stuff->percent < -100 || stuff->percent > 100) { + client->errorValue = stuff->percent; + return BadValue; + } + + newpercent = (base * stuff->percent) / 100; + if (stuff->percent < 0) + newpercent = base + newpercent; + else + newpercent = base - newpercent + stuff->percent; + + for (keybd = inputInfo.devices; keybd; keybd = keybd->next) { + if ((keybd->coreEvents || keybd == inputInfo.keyboard) && + keybd->kbdfeed && keybd->kbdfeed->BellProc) { +#ifdef XKB + if (!noXkbExtension) + XkbHandleBell(FALSE, FALSE, keybd, newpercent, + &keybd->kbdfeed->ctrl, 0, None, NULL, client); + else +#endif + (*keybd->kbdfeed->BellProc)(newpercent, keybd, + &keybd->kbdfeed->ctrl, 0); + } + } + + return Success; +} + +int +ProcChangePointerControl(ClientPtr client) +{ + DeviceIntPtr mouse = inputInfo.pointer; + PtrCtrl ctrl; /* might get BadValue part way through */ + REQUEST(xChangePointerControlReq); + + REQUEST_SIZE_MATCH(xChangePointerControlReq); + + if (!mouse->ptrfeed->CtrlProc) + return BadDevice; + + ctrl = mouse->ptrfeed->ctrl; + if ((stuff->doAccel != xTrue) && (stuff->doAccel != xFalse)) { + client->errorValue = stuff->doAccel; + return(BadValue); + } + if ((stuff->doThresh != xTrue) && (stuff->doThresh != xFalse)) { + client->errorValue = stuff->doThresh; + return(BadValue); + } + if (stuff->doAccel) { + if (stuff->accelNum == -1) { + ctrl.num = defaultPointerControl.num; + } + else if (stuff->accelNum < 0) { + client->errorValue = stuff->accelNum; + return BadValue; + } + else { + ctrl.num = stuff->accelNum; + } + + if (stuff->accelDenum == -1) { + ctrl.den = defaultPointerControl.den; + } + else if (stuff->accelDenum <= 0) { + client->errorValue = stuff->accelDenum; + return BadValue; + } + else { + ctrl.den = stuff->accelDenum; + } + } + if (stuff->doThresh) { + if (stuff->threshold == -1) { + ctrl.threshold = defaultPointerControl.threshold; + } + else if (stuff->threshold < 0) { + client->errorValue = stuff->threshold; + return BadValue; + } + else { + ctrl.threshold = stuff->threshold; + } + } + + + for (mouse = inputInfo.devices; mouse; mouse = mouse->next) { + if ((mouse->coreEvents || mouse == inputInfo.pointer) && + mouse->ptrfeed && mouse->ptrfeed->CtrlProc) { + mouse->ptrfeed->ctrl = ctrl; + (*mouse->ptrfeed->CtrlProc)(mouse, &mouse->ptrfeed->ctrl); + } + } + + return Success; +} + +int +ProcGetPointerControl(ClientPtr client) +{ + PtrCtrl *ctrl = &inputInfo.pointer->ptrfeed->ctrl; + xGetPointerControlReply rep; + + REQUEST_SIZE_MATCH(xReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.threshold = ctrl->threshold; + rep.accelNumerator = ctrl->num; + rep.accelDenominator = ctrl->den; + WriteReplyToClient(client, sizeof(xGenericReply), &rep); + return Success; +} + +void +MaybeStopHint(DeviceIntPtr dev, ClientPtr client) +{ + GrabPtr grab = dev->grab; + + if ((grab && SameClient(grab, client) && + ((grab->eventMask & PointerMotionHintMask) || + (grab->ownerEvents && + (EventMaskForClient(dev->valuator->motionHintWindow, client) & + PointerMotionHintMask)))) || + (!grab && + (EventMaskForClient(dev->valuator->motionHintWindow, client) & + PointerMotionHintMask))) + dev->valuator->motionHintWindow = NullWindow; +} + +int +ProcGetMotionEvents(ClientPtr client) +{ + WindowPtr pWin; + xTimecoord * coords = (xTimecoord *) NULL; + xGetMotionEventsReply rep; + int i, count, xmin, xmax, ymin, ymax, rc; + unsigned long nEvents; + DeviceIntPtr mouse = inputInfo.pointer; + TimeStamp start, stop; + REQUEST(xGetMotionEventsReq); + + REQUEST_SIZE_MATCH(xGetMotionEventsReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; + if (mouse->valuator->motionHintWindow) + MaybeStopHint(mouse, client); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + nEvents = 0; + start = ClientTimeToServerTime(stuff->start); + stop = ClientTimeToServerTime(stuff->stop); + if ((CompareTimeStamps(start, stop) != LATER) && + (CompareTimeStamps(start, currentTime) != LATER) && + mouse->valuator->numMotionEvents) + { + if (CompareTimeStamps(stop, currentTime) == LATER) + stop = currentTime; + coords = (xTimecoord *)ALLOCATE_LOCAL(mouse->valuator->numMotionEvents + * sizeof(xTimecoord)); + if (!coords) + return BadAlloc; + count = (*mouse->valuator->GetMotionProc) (mouse, coords, + start.milliseconds, + stop.milliseconds, + pWin->drawable.pScreen); + xmin = pWin->drawable.x - wBorderWidth (pWin); + xmax = pWin->drawable.x + (int)pWin->drawable.width + + wBorderWidth (pWin); + ymin = pWin->drawable.y - wBorderWidth (pWin); + ymax = pWin->drawable.y + (int)pWin->drawable.height + + wBorderWidth (pWin); + for (i = 0; i < count; i++) + if ((xmin <= coords[i].x) && (coords[i].x < xmax) && + (ymin <= coords[i].y) && (coords[i].y < ymax)) + { + coords[nEvents].time = coords[i].time; + coords[nEvents].x = coords[i].x - pWin->drawable.x; + coords[nEvents].y = coords[i].y - pWin->drawable.y; + nEvents++; + } + } + rep.length = nEvents * (sizeof(xTimecoord) >> 2); + rep.nEvents = nEvents; + WriteReplyToClient(client, sizeof(xGetMotionEventsReply), &rep); + if (nEvents) + { + client->pSwapReplyFunc = (ReplySwapPtr) SwapTimeCoordWrite; + WriteSwappedDataToClient(client, nEvents * sizeof(xTimecoord), + (char *)coords); + } + if (coords) + DEALLOCATE_LOCAL(coords); + return Success; +} + +int +ProcQueryKeymap(ClientPtr client) +{ + xQueryKeymapReply rep; + int i; + CARD8 *down = inputInfo.keyboard->key->down; + + REQUEST_SIZE_MATCH(xReq); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 2; + + if (XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) + for (i = 0; i<32; i++) + rep.map[i] = down[i]; + else + bzero((char *)&rep.map[0], 32); + + WriteReplyToClient(client, sizeof(xQueryKeymapReply), &rep); + return Success; +} diff --git a/xorg-server-1.4/dix/dispatch.c b/xorg-server-1.4/dix/dispatch.c new file mode 100644 index 0000000..c313796 --- /dev/null +++ b/xorg-server-1.4/dix/dispatch.c @@ -0,0 +1,4094 @@ +/************************************************************ + +Copyright 1987, 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. + + +Copyright 1987, 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. + +********************************************************/ + +/* The panoramix components contained the following notice */ +/***************************************************************** + +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. + +******************************************************************/ + +/* XSERVER_DTRACE additions: + * Copyright 2005-2006 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. + */ + + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifdef PANORAMIX_DEBUG +#include +int ProcInitialConnection(); +#endif + +#include "windowstr.h" +#include +#include "dixfontstr.h" +#include "gcstruct.h" +#include "selection.h" +#include "colormapst.h" +#include "cursorstr.h" +#include "scrnintstr.h" +#include "opaque.h" +#include "input.h" +#include "servermd.h" +#include "extnsionst.h" +#include "dixfont.h" +#include "dispatch.h" +#include "swaprep.h" +#include "swapreq.h" +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif +#include "xace.h" +#ifdef XAPPGROUP +#include "appgroup.h" +#endif +#ifdef XKB +#ifndef XKB_IN_SERVER +#define XKB_IN_SERVER +#endif +#include "inputstr.h" +#include +#endif + +#ifdef XSERVER_DTRACE +#include +typedef const char *string; +#include "Xserver-dtrace.h" + +char *RequestNames[256]; +static void LoadRequestNames(void); +static void FreeRequestNames(void); +#define GetRequestName(i) (RequestNames[i]) +#endif + +#define mskcnt ((MAXCLIENTS + 31) / 32) +#define BITMASK(i) (1U << ((i) & 31)) +#define MASKIDX(i) ((i) >> 5) +#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)) + +extern xConnSetupPrefix connSetupPrefix; +extern char *ConnectionInfo; + +_X_EXPORT Selection *CurrentSelections; +_X_EXPORT int NumCurrentSelections; +CallbackListPtr SelectionCallback = NULL; + +static ClientPtr grabClient; +#define GrabNone 0 +#define GrabActive 1 +#define GrabKickout 2 +static int grabState = GrabNone; +static long grabWaiters[mskcnt]; +_X_EXPORT CallbackListPtr ServerGrabCallback = NULL; +HWEventQueuePtr checkForInput[2]; +extern int connBlockScreenStart; + +static void KillAllClients(void); + +static void DeleteClientFromAnySelections(ClientPtr client); + +static int nextFreeClientID; /* always MIN free client ID */ + +static int nClients; /* number of authorized clients */ + +_X_EXPORT CallbackListPtr ClientStateCallback; + +/* dispatchException & isItTimeToYield must be declared volatile since they + * are modified by signal handlers - otherwise optimizer may assume it doesn't + * need to actually check value in memory when used and may miss changes from + * signal handlers. + */ +_X_EXPORT volatile char dispatchException = 0; +_X_EXPORT volatile char isItTimeToYield; + +/* Various of the DIX function interfaces were not designed to allow + * the client->errorValue to be set on BadValue and other errors. + * Rather than changing interfaces and breaking untold code we introduce + * a new global that dispatch can use. + */ +XID clientErrorValue; /* XXX this is a kludge */ + +#define SAME_SCREENS(a, b) (\ + (a.pScreen == b.pScreen)) + +_X_EXPORT void +SetInputCheck(HWEventQueuePtr c0, HWEventQueuePtr c1) +{ + checkForInput[0] = c0; + checkForInput[1] = c1; +} + +_X_EXPORT void +UpdateCurrentTime(void) +{ + TimeStamp systime; + + /* To avoid time running backwards, we must call GetTimeInMillis before + * calling ProcessInputEvents. + */ + systime.months = currentTime.months; + systime.milliseconds = GetTimeInMillis(); + if (systime.milliseconds < currentTime.milliseconds) + systime.months++; + if (*checkForInput[0] != *checkForInput[1]) + ProcessInputEvents(); + if (CompareTimeStamps(systime, currentTime) == LATER) + currentTime = systime; +} + +/* Like UpdateCurrentTime, but can't call ProcessInputEvents */ +_X_EXPORT void +UpdateCurrentTimeIf(void) +{ + TimeStamp systime; + + systime.months = currentTime.months; + systime.milliseconds = GetTimeInMillis(); + if (systime.milliseconds < currentTime.milliseconds) + systime.months++; + if (*checkForInput[0] == *checkForInput[1]) + currentTime = systime; +} + +void +InitSelections(void) +{ + if (CurrentSelections) + xfree(CurrentSelections); + CurrentSelections = (Selection *)NULL; + NumCurrentSelections = 0; +} + +void +FlushClientCaches(XID id) +{ + int i; + ClientPtr client; + + client = clients[CLIENT_ID(id)]; + if (client == NullClient) + return ; + for (i=0; ilastDrawableID == id) + { + client->lastDrawableID = WindowTable[0]->drawable.id; + client->lastDrawable = (DrawablePtr)WindowTable[0]; + } + else if (client->lastGCID == id) + { + client->lastGCID = INVALID; + client->lastGC = (GCPtr)NULL; + } + } + } +} +#ifdef SMART_SCHEDULE + +#undef SMART_DEBUG + +#define SMART_SCHEDULE_DEFAULT_INTERVAL 20 /* ms */ +#define SMART_SCHEDULE_MAX_SLICE 200 /* ms */ + +Bool SmartScheduleDisable = FALSE; +long SmartScheduleSlice = SMART_SCHEDULE_DEFAULT_INTERVAL; +long SmartScheduleInterval = SMART_SCHEDULE_DEFAULT_INTERVAL; +long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE; +long SmartScheduleTime; +static ClientPtr SmartLastClient; +static int SmartLastIndex[SMART_MAX_PRIORITY-SMART_MIN_PRIORITY+1]; + +#ifdef SMART_DEBUG +long SmartLastPrint; +#endif + +void Dispatch(void); +void InitProcVectors(void); + +static int +SmartScheduleClient (int *clientReady, int nready) +{ + ClientPtr pClient; + int i; + int client; + int bestPrio, best = 0; + int bestRobin, robin; + long now = SmartScheduleTime; + long idle; + + bestPrio = -0x7fffffff; + bestRobin = 0; + idle = 2 * SmartScheduleSlice; + for (i = 0; i < nready; i++) + { + client = clientReady[i]; + pClient = clients[client]; + /* Praise clients which are idle */ + if ((now - pClient->smart_check_tick) >= idle) + { + if (pClient->smart_priority < 0) + pClient->smart_priority++; + } + pClient->smart_check_tick = now; + + /* check priority to select best client */ + robin = (pClient->index - SmartLastIndex[pClient->smart_priority-SMART_MIN_PRIORITY]) & 0xff; + if (pClient->smart_priority > bestPrio || + (pClient->smart_priority == bestPrio && robin > bestRobin)) + { + bestPrio = pClient->smart_priority; + bestRobin = robin; + best = client; + } +#ifdef SMART_DEBUG + if ((now - SmartLastPrint) >= 5000) + fprintf (stderr, " %2d: %3d", client, pClient->smart_priority); +#endif + } +#ifdef SMART_DEBUG + if ((now - SmartLastPrint) >= 5000) + { + fprintf (stderr, " use %2d\n", best); + SmartLastPrint = now; + } +#endif + pClient = clients[best]; + SmartLastIndex[bestPrio-SMART_MIN_PRIORITY] = pClient->index; + /* + * Set current client pointer + */ + if (SmartLastClient != pClient) + { + pClient->smart_start_tick = now; + SmartLastClient = pClient; + } + /* + * Adjust slice + */ + if (nready == 1) + { + /* + * If it's been a long time since another client + * has run, bump the slice up to get maximal + * performance from a single client + */ + if ((now - pClient->smart_start_tick) > 1000 && + SmartScheduleSlice < SmartScheduleMaxSlice) + { + SmartScheduleSlice += SmartScheduleInterval; + } + } + else + { + SmartScheduleSlice = SmartScheduleInterval; + } + return best; +} +#endif + +#define MAJOROP ((xReq *)client->requestBuffer)->reqType + +void +Dispatch(void) +{ + int *clientReady; /* array of request ready clients */ + int result; + ClientPtr client; + int nready; + HWEventQueuePtr* icheck = checkForInput; +#ifdef SMART_SCHEDULE + long start_tick; +#endif + + nextFreeClientID = 1; + InitSelections(); + nClients = 0; + + clientReady = (int *) ALLOCATE_LOCAL(sizeof(int) * MaxClients); + if (!clientReady) + return; + +#ifdef XSERVER_DTRACE + LoadRequestNames(); +#endif + + while (!dispatchException) + { + if (*icheck[0] != *icheck[1]) + { + ProcessInputEvents(); + FlushIfCriticalOutputPending(); + } + + nready = WaitForSomething(clientReady); + +#ifdef SMART_SCHEDULE + if (nready && !SmartScheduleDisable) + { + clientReady[0] = SmartScheduleClient (clientReady, nready); + nready = 1; + } +#endif + /***************** + * Handle events in round robin fashion, doing input between + * each round + *****************/ + + while (!dispatchException && (--nready >= 0)) + { + client = clients[clientReady[nready]]; + if (! client) + { + /* KillClient can cause this to happen */ + continue; + } + /* GrabServer activation can cause this to be true */ + if (grabState == GrabKickout) + { + grabState = GrabActive; + break; + } + isItTimeToYield = FALSE; + + requestingClient = client; +#ifdef SMART_SCHEDULE + start_tick = SmartScheduleTime; +#endif + while (!isItTimeToYield) + { + if (*icheck[0] != *icheck[1]) + { + ProcessInputEvents(); + FlushIfCriticalOutputPending(); + } +#ifdef SMART_SCHEDULE + if (!SmartScheduleDisable && + (SmartScheduleTime - start_tick) >= SmartScheduleSlice) + { + /* Penalize clients which consume ticks */ + if (client->smart_priority > SMART_MIN_PRIORITY) + client->smart_priority--; + break; + } +#endif + /* now, finally, deal with client requests */ + + result = ReadRequestFromClient(client); + if (result <= 0) + { + if (result < 0) + CloseDownClient(client); + break; + } + + client->sequence++; +#ifdef DEBUG + if (client->requestLogIndex == MAX_REQUEST_LOG) + client->requestLogIndex = 0; + client->requestLog[client->requestLogIndex] = MAJOROP; + client->requestLogIndex++; +#endif +#ifdef XSERVER_DTRACE + XSERVER_REQUEST_START(GetRequestName(MAJOROP), MAJOROP, + ((xReq *)client->requestBuffer)->length, + client->index, client->requestBuffer); +#endif + if (result > (maxBigRequestSize << 2)) + result = BadLength; + else { + XaceHook(XACE_AUDIT_BEGIN, client); + result = (* client->requestVector[MAJOROP])(client); + XaceHook(XACE_AUDIT_END, client, result); + } +#ifdef XSERVER_DTRACE + XSERVER_REQUEST_DONE(GetRequestName(MAJOROP), MAJOROP, + client->sequence, client->index, result); +#endif + + if (result != Success) + { + if (client->noClientException != Success) + CloseDownClient(client); + else + SendErrorToClient(client, MAJOROP, + MinorOpcodeOfRequest(client), + client->errorValue, result); + break; + } +#ifdef DAMAGEEXT + FlushIfCriticalOutputPending (); +#endif + } + FlushAllOutput(); +#ifdef SMART_SCHEDULE + client = clients[clientReady[nready]]; + if (client) + client->smart_stop_tick = SmartScheduleTime; +#endif + requestingClient = NULL; + } + dispatchException &= ~DE_PRIORITYCHANGE; + } +#if defined(DDXBEFORERESET) + ddxBeforeReset (); +#endif + KillAllClients(); + DEALLOCATE_LOCAL(clientReady); + dispatchException &= ~DE_RESET; +#ifdef XSERVER_DTRACE + FreeRequestNames(); +#endif +} + +#undef MAJOROP + +_X_EXPORT int +ProcBadRequest(ClientPtr client) +{ + return (BadRequest); +} + +int +ProcCreateWindow(ClientPtr client) +{ + WindowPtr pParent, pWin; + REQUEST(xCreateWindowReq); + int result, len, rc; + + REQUEST_AT_LEAST_SIZE(xCreateWindowReq); + + LEGAL_NEW_RESOURCE(stuff->wid, client); + rc = dixLookupWindow(&pParent, stuff->parent, client, DixWriteAccess); + if (rc != Success) + return rc; + len = client->req_len - (sizeof(xCreateWindowReq) >> 2); + if (Ones(stuff->mask) != len) + return BadLength; + if (!stuff->width || !stuff->height) + { + client->errorValue = 0; + return BadValue; + } + pWin = CreateWindow(stuff->wid, pParent, stuff->x, + stuff->y, stuff->width, stuff->height, + stuff->borderWidth, stuff->class, + stuff->mask, (XID *) &stuff[1], + (int)stuff->depth, + client, stuff->visual, &result); + if (pWin) + { + Mask mask = pWin->eventMask; + + pWin->eventMask = 0; /* subterfuge in case AddResource fails */ + if (!AddResource(stuff->wid, RT_WINDOW, (pointer)pWin)) + return BadAlloc; + pWin->eventMask = mask; + } + if (client->noClientException != Success) + return(client->noClientException); + else + return(result); +} + +int +ProcChangeWindowAttributes(ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xChangeWindowAttributesReq); + int result; + int len, rc; + + REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) + return rc; + len = client->req_len - (sizeof(xChangeWindowAttributesReq) >> 2); + if (len != Ones(stuff->valueMask)) + return BadLength; + result = ChangeWindowAttributes(pWin, + stuff->valueMask, + (XID *) &stuff[1], + client); + if (client->noClientException != Success) + return(client->noClientException); + else + return(result); +} + +int +ProcGetWindowAttributes(ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xResourceReq); + xGetWindowAttributesReply wa; + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; + GetWindowAttributes(pWin, client, &wa); + WriteReplyToClient(client, sizeof(xGetWindowAttributesReply), &wa); + return(client->noClientException); +} + +int +ProcDestroyWindow(ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xResourceReq); + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixDestroyAccess); + if (rc != Success) + return rc; + if (pWin->parent) + FreeResource(stuff->id, RT_NONE); + return(client->noClientException); +} + +int +ProcDestroySubwindows(ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xResourceReq); + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixDestroyAccess); + if (rc != Success) + return rc; + DestroySubwindows(pWin, client); + return(client->noClientException); +} + +int +ProcChangeSaveSet(ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xChangeSaveSetReq); + int result, rc; + + REQUEST_SIZE_MATCH(xChangeSaveSetReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + if (rc != Success) + return rc; + if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id))) + return BadMatch; + if ((stuff->mode == SetModeInsert) || (stuff->mode == SetModeDelete)) + { + result = AlterSaveSetForClient(client, pWin, stuff->mode, FALSE, TRUE); + if (client->noClientException != Success) + return(client->noClientException); + else + return(result); + } + else + { + client->errorValue = stuff->mode; + return( BadValue ); + } +} + +int +ProcReparentWindow(ClientPtr client) +{ + WindowPtr pWin, pParent; + REQUEST(xReparentWindowReq); + int result, rc; + + REQUEST_SIZE_MATCH(xReparentWindowReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) + return rc; + rc = dixLookupWindow(&pParent, stuff->parent, client, DixWriteAccess); + if (rc != Success) + return rc; + if (SAME_SCREENS(pWin->drawable, pParent->drawable)) + { + if ((pWin->backgroundState == ParentRelative) && + (pParent->drawable.depth != pWin->drawable.depth)) + return BadMatch; + if ((pWin->drawable.class != InputOnly) && + (pParent->drawable.class == InputOnly)) + return BadMatch; + result = ReparentWindow(pWin, pParent, + (short)stuff->x, (short)stuff->y, client); + if (client->noClientException != Success) + return(client->noClientException); + else + return(result); + } + else + return (BadMatch); +} + +int +ProcMapWindow(ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xResourceReq); + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; + MapWindow(pWin, client); + /* update cache to say it is mapped */ + return(client->noClientException); +} + +int +ProcMapSubwindows(ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xResourceReq); + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; + MapSubwindows(pWin, client); + /* update cache to say it is mapped */ + return(client->noClientException); +} + +int +ProcUnmapWindow(ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xResourceReq); + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; + UnmapWindow(pWin, FALSE); + /* update cache to say it is mapped */ + return(client->noClientException); +} + +int +ProcUnmapSubwindows(ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xResourceReq); + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; + UnmapSubwindows(pWin); + return(client->noClientException); +} + +int +ProcConfigureWindow(ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xConfigureWindowReq); + int result; + int len, rc; + + REQUEST_AT_LEAST_SIZE(xConfigureWindowReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) + return rc; + len = client->req_len - (sizeof(xConfigureWindowReq) >> 2); + if (Ones((Mask)stuff->mask) != len) + return BadLength; + result = ConfigureWindow(pWin, (Mask)stuff->mask, (XID *) &stuff[1], + client); + if (client->noClientException != Success) + return(client->noClientException); + else + return(result); +} + +int +ProcCirculateWindow(ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xCirculateWindowReq); + int rc; + + REQUEST_SIZE_MATCH(xCirculateWindowReq); + if ((stuff->direction != RaiseLowest) && + (stuff->direction != LowerHighest)) + { + client->errorValue = stuff->direction; + return BadValue; + } + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) + return rc; + CirculateWindow(pWin, (int)stuff->direction, client); + return(client->noClientException); +} + +static int +GetGeometry(ClientPtr client, xGetGeometryReply *rep) +{ + DrawablePtr pDraw; + int rc; + REQUEST(xResourceReq); + REQUEST_SIZE_MATCH(xResourceReq); + + rc = dixLookupDrawable(&pDraw, stuff->id, client, M_ANY, DixReadAccess); + if (rc != Success) + return rc; + + rep->type = X_Reply; + rep->length = 0; + rep->sequenceNumber = client->sequence; + rep->root = WindowTable[pDraw->pScreen->myNum]->drawable.id; + rep->depth = pDraw->depth; + rep->width = pDraw->width; + rep->height = pDraw->height; + + /* XXX - Because the pixmap-implementation of the multibuffer extension + * may have the buffer-id's drawable resource value be a pointer + * to the buffer's window instead of the buffer itself + * (this happens if the buffer is the displayed buffer), + * we also have to check that the id matches before we can + * truly say that it is a DRAWABLE_WINDOW. + */ + + if ((pDraw->type == UNDRAWABLE_WINDOW) || + ((pDraw->type == DRAWABLE_WINDOW) && (stuff->id == pDraw->id))) + { + WindowPtr pWin = (WindowPtr)pDraw; + rep->x = pWin->origin.x - wBorderWidth (pWin); + rep->y = pWin->origin.y - wBorderWidth (pWin); + rep->borderWidth = pWin->borderWidth; + } + else /* DRAWABLE_PIXMAP or DRAWABLE_BUFFER */ + { + rep->x = rep->y = rep->borderWidth = 0; + } + + return Success; +} + + +int +ProcGetGeometry(ClientPtr client) +{ + xGetGeometryReply rep; + int status; + + if ((status = GetGeometry(client, &rep)) != Success) + return status; + + WriteReplyToClient(client, sizeof(xGetGeometryReply), &rep); + return(client->noClientException); +} + + +int +ProcQueryTree(ClientPtr client) +{ + xQueryTreeReply reply; + int rc, numChildren = 0; + WindowPtr pChild, pWin, pHead; + Window *childIDs = (Window *)NULL; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; + reply.type = X_Reply; + reply.root = WindowTable[pWin->drawable.pScreen->myNum]->drawable.id; + reply.sequenceNumber = client->sequence; + if (pWin->parent) + reply.parent = pWin->parent->drawable.id; + else + reply.parent = (Window)None; + pHead = RealChildHead(pWin); + for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib) + numChildren++; + if (numChildren) + { + int curChild = 0; + + childIDs = (Window *) ALLOCATE_LOCAL(numChildren * sizeof(Window)); + if (!childIDs) + return BadAlloc; + for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib) + childIDs[curChild++] = pChild->drawable.id; + } + + reply.nChildren = numChildren; + reply.length = (numChildren * sizeof(Window)) >> 2; + + WriteReplyToClient(client, sizeof(xQueryTreeReply), &reply); + if (numChildren) + { + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, numChildren * sizeof(Window), childIDs); + DEALLOCATE_LOCAL(childIDs); + } + + return(client->noClientException); +} + +int +ProcInternAtom(ClientPtr client) +{ + Atom atom; + char *tchar; + REQUEST(xInternAtomReq); + + REQUEST_FIXED_SIZE(xInternAtomReq, stuff->nbytes); + if ((stuff->onlyIfExists != xTrue) && (stuff->onlyIfExists != xFalse)) + { + client->errorValue = stuff->onlyIfExists; + return(BadValue); + } + tchar = (char *) &stuff[1]; + atom = MakeAtom(tchar, stuff->nbytes, !stuff->onlyIfExists); + if (atom != BAD_RESOURCE) + { + xInternAtomReply reply; + reply.type = X_Reply; + reply.length = 0; + reply.sequenceNumber = client->sequence; + reply.atom = atom; + WriteReplyToClient(client, sizeof(xInternAtomReply), &reply); + return(client->noClientException); + } + else + return (BadAlloc); +} + +int +ProcGetAtomName(ClientPtr client) +{ + char *str; + xGetAtomNameReply reply; + int len; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + if ( (str = NameForAtom(stuff->id)) ) + { + len = strlen(str); + reply.type = X_Reply; + reply.length = (len + 3) >> 2; + reply.sequenceNumber = client->sequence; + reply.nameLength = len; + WriteReplyToClient(client, sizeof(xGetAtomNameReply), &reply); + (void)WriteToClient(client, len, str); + return(client->noClientException); + } + else + { + client->errorValue = stuff->id; + return (BadAtom); + } +} + +int +ProcSetSelectionOwner(ClientPtr client) +{ + WindowPtr pWin; + TimeStamp time; + REQUEST(xSetSelectionOwnerReq); + + REQUEST_SIZE_MATCH(xSetSelectionOwnerReq); + UpdateCurrentTime(); + time = ClientTimeToServerTime(stuff->time); + + /* If the client's time stamp is in the future relative to the server's + time stamp, do not set the selection, just return success. */ + if (CompareTimeStamps(time, currentTime) == LATER) + return Success; + if (stuff->window != None) + { + int rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + if (rc != Success) + return rc; + } + else + pWin = (WindowPtr)None; + if (ValidAtom(stuff->selection)) + { + int i = 0; + + /* + * First, see if the selection is already set... + */ + while ((i < NumCurrentSelections) && + CurrentSelections[i].selection != stuff->selection) + i++; + if (i < NumCurrentSelections) + { + xEvent event; + + /* If the timestamp in client's request is in the past relative + to the time stamp indicating the last time the owner of the + selection was set, do not set the selection, just return + success. */ + if (CompareTimeStamps(time, CurrentSelections[i].lastTimeChanged) + == EARLIER) + return Success; + if (CurrentSelections[i].client && + (!pWin || (CurrentSelections[i].client != client))) + { + event.u.u.type = SelectionClear; + event.u.selectionClear.time = time.milliseconds; + event.u.selectionClear.window = CurrentSelections[i].window; + event.u.selectionClear.atom = CurrentSelections[i].selection; + (void) TryClientEvents (CurrentSelections[i].client, &event, 1, + NoEventMask, NoEventMask /* CantBeFiltered */, + NullGrab); + } + } + else + { + /* + * It doesn't exist, so add it... + */ + Selection *newsels; + + if (i == 0) + newsels = (Selection *)xalloc(sizeof(Selection)); + else + newsels = (Selection *)xrealloc(CurrentSelections, + (NumCurrentSelections + 1) * sizeof(Selection)); + if (!newsels) + return BadAlloc; + NumCurrentSelections++; + CurrentSelections = newsels; + CurrentSelections[i].selection = stuff->selection; + } + CurrentSelections[i].lastTimeChanged = time; + CurrentSelections[i].window = stuff->window; + CurrentSelections[i].pWin = pWin; + CurrentSelections[i].client = (pWin ? client : NullClient); + if (SelectionCallback) + { + SelectionInfoRec info; + + info.selection = &CurrentSelections[i]; + info.kind= SelectionSetOwner; + CallCallbacks(&SelectionCallback, &info); + } + return (client->noClientException); + } + else + { + client->errorValue = stuff->selection; + return (BadAtom); + } +} + +int +ProcGetSelectionOwner(ClientPtr client) +{ + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + if (ValidAtom(stuff->id)) + { + int i; + xGetSelectionOwnerReply reply; + + i = 0; + while ((i < NumCurrentSelections) && + CurrentSelections[i].selection != stuff->id) i++; + reply.type = X_Reply; + reply.length = 0; + reply.sequenceNumber = client->sequence; + if (i < NumCurrentSelections) + reply.owner = CurrentSelections[i].window; + else + reply.owner = None; + WriteReplyToClient(client, sizeof(xGetSelectionOwnerReply), &reply); + return(client->noClientException); + } + else + { + client->errorValue = stuff->id; + return (BadAtom); + } +} + +int +ProcConvertSelection(ClientPtr client) +{ + Bool paramsOkay; + xEvent event; + WindowPtr pWin; + REQUEST(xConvertSelectionReq); + int rc; + + REQUEST_SIZE_MATCH(xConvertSelectionReq); + rc = dixLookupWindow(&pWin, stuff->requestor, client, DixReadAccess); + if (rc != Success) + return rc; + + paramsOkay = (ValidAtom(stuff->selection) && ValidAtom(stuff->target)); + if (stuff->property != None) + paramsOkay &= ValidAtom(stuff->property); + if (paramsOkay) + { + int i; + + i = 0; + while ((i < NumCurrentSelections) && + CurrentSelections[i].selection != stuff->selection) i++; + if ((i < NumCurrentSelections) && + (CurrentSelections[i].window != None) && + XaceHook(XACE_RESOURCE_ACCESS, client, + CurrentSelections[i].window, RT_WINDOW, + DixReadAccess, CurrentSelections[i].pWin)) + { + event.u.u.type = SelectionRequest; + event.u.selectionRequest.time = stuff->time; + event.u.selectionRequest.owner = + CurrentSelections[i].window; + event.u.selectionRequest.requestor = stuff->requestor; + event.u.selectionRequest.selection = stuff->selection; + event.u.selectionRequest.target = stuff->target; + event.u.selectionRequest.property = stuff->property; + if (TryClientEvents( + CurrentSelections[i].client, &event, 1, NoEventMask, + NoEventMask /* CantBeFiltered */, NullGrab)) + return (client->noClientException); + } + event.u.u.type = SelectionNotify; + event.u.selectionNotify.time = stuff->time; + event.u.selectionNotify.requestor = stuff->requestor; + event.u.selectionNotify.selection = stuff->selection; + event.u.selectionNotify.target = stuff->target; + event.u.selectionNotify.property = None; + (void) TryClientEvents(client, &event, 1, NoEventMask, + NoEventMask /* CantBeFiltered */, NullGrab); + return (client->noClientException); + } + else + { + client->errorValue = stuff->property; + return (BadAtom); + } +} + +int +ProcGrabServer(ClientPtr client) +{ + REQUEST_SIZE_MATCH(xReq); + if (grabState != GrabNone && client != grabClient) + { + ResetCurrentRequest(client); + client->sequence--; + BITSET(grabWaiters, client->index); + IgnoreClient(client); + return(client->noClientException); + } + OnlyListenToOneClient(client); + grabState = GrabKickout; + grabClient = client; + + if (ServerGrabCallback) + { + ServerGrabInfoRec grabinfo; + grabinfo.client = client; + grabinfo.grabstate = SERVER_GRABBED; + CallCallbacks(&ServerGrabCallback, (pointer)&grabinfo); + } + + return(client->noClientException); +} + +static void +UngrabServer(ClientPtr client) +{ + int i; + + grabState = GrabNone; + ListenToAllClients(); + for (i = mskcnt; --i >= 0 && !grabWaiters[i]; ) + ; + if (i >= 0) + { + i <<= 5; + while (!GETBIT(grabWaiters, i)) + i++; + BITCLEAR(grabWaiters, i); + AttendClient(clients[i]); + } + + if (ServerGrabCallback) + { + ServerGrabInfoRec grabinfo; + grabinfo.client = client; + grabinfo.grabstate = SERVER_UNGRABBED; + CallCallbacks(&ServerGrabCallback, (pointer)&grabinfo); + } +} + +int +ProcUngrabServer(ClientPtr client) +{ + REQUEST_SIZE_MATCH(xReq); + UngrabServer(client); + return(client->noClientException); +} + +int +ProcTranslateCoords(ClientPtr client) +{ + REQUEST(xTranslateCoordsReq); + + WindowPtr pWin, pDst; + xTranslateCoordsReply rep; + int rc; + + REQUEST_SIZE_MATCH(xTranslateCoordsReq); + rc = dixLookupWindow(&pWin, stuff->srcWid, client, DixReadAccess); + if (rc != Success) + return rc; + rc = dixLookupWindow(&pDst, stuff->dstWid, client, DixReadAccess); + if (rc != Success) + return rc; + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + if (!SAME_SCREENS(pWin->drawable, pDst->drawable)) + { + rep.sameScreen = xFalse; + rep.child = None; + rep.dstX = rep.dstY = 0; + } + else + { + INT16 x, y; + rep.sameScreen = xTrue; + rep.child = None; + /* computing absolute coordinates -- adjust to destination later */ + x = pWin->drawable.x + stuff->srcX; + y = pWin->drawable.y + stuff->srcY; + pWin = pDst->firstChild; + while (pWin) + { +#ifdef SHAPE + BoxRec box; +#endif + if ((pWin->mapped) && + (x >= pWin->drawable.x - wBorderWidth (pWin)) && + (x < pWin->drawable.x + (int)pWin->drawable.width + + wBorderWidth (pWin)) && + (y >= pWin->drawable.y - wBorderWidth (pWin)) && + (y < pWin->drawable.y + (int)pWin->drawable.height + + wBorderWidth (pWin)) +#ifdef SHAPE + /* When a window is shaped, a further check + * is made to see if the point is inside + * borderSize + */ + && (!wBoundingShape(pWin) || + POINT_IN_REGION(pWin->drawable.pScreen, + &pWin->borderSize, x, y, &box)) + + && (!wInputShape(pWin) || + POINT_IN_REGION(pWin->drawable.pScreen, + wInputShape(pWin), + x - pWin->drawable.x, + y - pWin->drawable.y, &box)) +#endif + ) + { + rep.child = pWin->drawable.id; + pWin = (WindowPtr) NULL; + } + else + pWin = pWin->nextSib; + } + /* adjust to destination coordinates */ + rep.dstX = x - pDst->drawable.x; + rep.dstY = y - pDst->drawable.y; + } + WriteReplyToClient(client, sizeof(xTranslateCoordsReply), &rep); + return(client->noClientException); +} + +int +ProcOpenFont(ClientPtr client) +{ + int err; + REQUEST(xOpenFontReq); + + REQUEST_FIXED_SIZE(xOpenFontReq, stuff->nbytes); + client->errorValue = stuff->fid; + LEGAL_NEW_RESOURCE(stuff->fid, client); + err = OpenFont(client, stuff->fid, (Mask) 0, + stuff->nbytes, (char *)&stuff[1]); + if (err == Success) + { + return(client->noClientException); + } + else + return err; +} + +int +ProcCloseFont(ClientPtr client) +{ + FontPtr pFont; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT, + DixDestroyAccess); + if ( pFont != (FontPtr)NULL) /* id was valid */ + { + FreeResource(stuff->id, RT_NONE); + return(client->noClientException); + } + else + { + client->errorValue = stuff->id; + return (BadFont); + } +} + +int +ProcQueryFont(ClientPtr client) +{ + xQueryFontReply *reply; + FontPtr pFont; + GC *pGC; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + client->errorValue = stuff->id; /* EITHER font or gc */ + pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT, + DixReadAccess); + if (!pFont) + { + pGC = (GC *) SecurityLookupIDByType(client, stuff->id, RT_GC, + DixReadAccess); + if (!pGC) + { + client->errorValue = stuff->id; + return(BadFont); /* procotol spec says only error is BadFont */ + } + pFont = pGC->font; + } + + { + xCharInfo *pmax = FONTINKMAX(pFont); + xCharInfo *pmin = FONTINKMIN(pFont); + int nprotoxcistructs; + int rlength; + + nprotoxcistructs = ( + pmax->rightSideBearing == pmin->rightSideBearing && + pmax->leftSideBearing == pmin->leftSideBearing && + pmax->descent == pmin->descent && + pmax->ascent == pmin->ascent && + pmax->characterWidth == pmin->characterWidth) ? + 0 : N2dChars(pFont); + + rlength = sizeof(xQueryFontReply) + + FONTINFONPROPS(FONTCHARSET(pFont)) * sizeof(xFontProp) + + nprotoxcistructs * sizeof(xCharInfo); + reply = (xQueryFontReply *)ALLOCATE_LOCAL(rlength); + if(!reply) + { + return(BadAlloc); + } + + reply->type = X_Reply; + reply->length = (rlength - sizeof(xGenericReply)) >> 2; + reply->sequenceNumber = client->sequence; + QueryFont( pFont, reply, nprotoxcistructs); + + WriteReplyToClient(client, rlength, reply); + DEALLOCATE_LOCAL(reply); + return(client->noClientException); + } +} + +int +ProcQueryTextExtents(ClientPtr client) +{ + REQUEST(xQueryTextExtentsReq); + xQueryTextExtentsReply reply; + FontPtr pFont; + GC *pGC; + ExtentInfoRec info; + unsigned long length; + + REQUEST_AT_LEAST_SIZE(xQueryTextExtentsReq); + + pFont = (FontPtr)SecurityLookupIDByType(client, stuff->fid, RT_FONT, + DixReadAccess); + if (!pFont) + { + pGC = (GC *)SecurityLookupIDByType(client, stuff->fid, RT_GC, + DixReadAccess); + if (!pGC) + { + client->errorValue = stuff->fid; + return(BadFont); + } + pFont = pGC->font; + } + length = client->req_len - (sizeof(xQueryTextExtentsReq) >> 2); + length = length << 1; + if (stuff->oddLength) + { + if (length == 0) + return(BadLength); + length--; + } + if (!QueryTextExtents(pFont, length, (unsigned char *)&stuff[1], &info)) + return(BadAlloc); + reply.type = X_Reply; + reply.length = 0; + reply.sequenceNumber = client->sequence; + reply.drawDirection = info.drawDirection; + reply.fontAscent = info.fontAscent; + reply.fontDescent = info.fontDescent; + reply.overallAscent = info.overallAscent; + reply.overallDescent = info.overallDescent; + reply.overallWidth = info.overallWidth; + reply.overallLeft = info.overallLeft; + reply.overallRight = info.overallRight; + WriteReplyToClient(client, sizeof(xQueryTextExtentsReply), &reply); + return(client->noClientException); +} + +int +ProcListFonts(ClientPtr client) +{ + REQUEST(xListFontsReq); + + REQUEST_FIXED_SIZE(xListFontsReq, stuff->nbytes); + + return ListFonts(client, (unsigned char *) &stuff[1], stuff->nbytes, + stuff->maxNames); +} + +int +ProcListFontsWithInfo(ClientPtr client) +{ + REQUEST(xListFontsWithInfoReq); + + REQUEST_FIXED_SIZE(xListFontsWithInfoReq, stuff->nbytes); + + return StartListFontsWithInfo(client, stuff->nbytes, + (unsigned char *) &stuff[1], stuff->maxNames); +} + +/** + * + * \param value must conform to DeleteType + */ +int +dixDestroyPixmap(pointer value, XID pid) +{ + PixmapPtr pPixmap = (PixmapPtr)value; + return (*pPixmap->drawable.pScreen->DestroyPixmap)(pPixmap); +} + +int +ProcCreatePixmap(ClientPtr client) +{ + PixmapPtr pMap; + DrawablePtr pDraw; + REQUEST(xCreatePixmapReq); + DepthPtr pDepth; + int i, rc; + + REQUEST_SIZE_MATCH(xCreatePixmapReq); + client->errorValue = stuff->pid; + LEGAL_NEW_RESOURCE(stuff->pid, client); + + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, + DixReadAccess); + if (rc != Success) + return rc; + + if (!stuff->width || !stuff->height) + { + 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; + for (i=0; ipScreen->numDepths; i++, pDepth++) + if (pDepth->depth == stuff->depth) + goto CreatePmap; + client->errorValue = stuff->depth; + return BadValue; + } +CreatePmap: + pMap = (PixmapPtr)(*pDraw->pScreen->CreatePixmap) + (pDraw->pScreen, stuff->width, + stuff->height, stuff->depth); + if (pMap) + { + pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + pMap->drawable.id = stuff->pid; + if (AddResource(stuff->pid, RT_PIXMAP, (pointer)pMap)) + return(client->noClientException); + } + return (BadAlloc); +} + +int +ProcFreePixmap(ClientPtr client) +{ + PixmapPtr pMap; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + pMap = (PixmapPtr)SecurityLookupIDByType(client, stuff->id, RT_PIXMAP, + DixDestroyAccess); + if (pMap) + { + FreeResource(stuff->id, RT_NONE); + return(client->noClientException); + } + else + { + client->errorValue = stuff->id; + return (BadPixmap); + } +} + +int +ProcCreateGC(ClientPtr client) +{ + int error, rc; + GC *pGC; + DrawablePtr pDraw; + unsigned len; + REQUEST(xCreateGCReq); + + REQUEST_AT_LEAST_SIZE(xCreateGCReq); + client->errorValue = stuff->gc; + LEGAL_NEW_RESOURCE(stuff->gc, client); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixReadAccess); + if (rc != Success) + return rc; + + len = client->req_len - (sizeof(xCreateGCReq) >> 2); + if (len != Ones(stuff->mask)) + return BadLength; + pGC = (GC *)CreateGC(pDraw, stuff->mask, + (XID *) &stuff[1], &error); + if (error != Success) + return error; + if (!AddResource(stuff->gc, RT_GC, (pointer)pGC)) + return (BadAlloc); + return(client->noClientException); +} + +int +ProcChangeGC(ClientPtr client) +{ + GC *pGC; + int result; + unsigned len; + REQUEST(xChangeGCReq); + REQUEST_AT_LEAST_SIZE(xChangeGCReq); + + result = dixLookupGC(&pGC, stuff->gc, client, DixWriteAccess); + if (result != Success) + return result; + + len = client->req_len - (sizeof(xChangeGCReq) >> 2); + if (len != Ones(stuff->mask)) + return BadLength; + + result = dixChangeGC(client, pGC, stuff->mask, (CARD32 *) &stuff[1], 0); + if (client->noClientException != Success) + return(client->noClientException); + else + { + client->errorValue = clientErrorValue; + return(result); + } +} + +int +ProcCopyGC(ClientPtr client) +{ + GC *dstGC; + GC *pGC; + int result; + REQUEST(xCopyGCReq); + REQUEST_SIZE_MATCH(xCopyGCReq); + + result = dixLookupGC(&pGC, stuff->srcGC, client, DixReadAccess); + if (result != Success) + return result; + result = dixLookupGC(&dstGC, stuff->dstGC, client, DixWriteAccess); + if (result != Success) + return result; + if ((dstGC->pScreen != pGC->pScreen) || (dstGC->depth != pGC->depth)) + return (BadMatch); + result = CopyGC(pGC, dstGC, stuff->mask); + if (client->noClientException != Success) + return(client->noClientException); + else + { + client->errorValue = clientErrorValue; + return(result); + } +} + +int +ProcSetDashes(ClientPtr client) +{ + GC *pGC; + int result; + REQUEST(xSetDashesReq); + + REQUEST_FIXED_SIZE(xSetDashesReq, stuff->nDashes); + if (stuff->nDashes == 0) + { + client->errorValue = 0; + return BadValue; + } + + result = dixLookupGC(&pGC,stuff->gc, client, DixWriteAccess); + if (result != Success) + return result; + + result = SetDashes(pGC, stuff->dashOffset, stuff->nDashes, + (unsigned char *)&stuff[1]); + if (client->noClientException != Success) + return(client->noClientException); + else + { + client->errorValue = clientErrorValue; + return(result); + } +} + +int +ProcSetClipRectangles(ClientPtr client) +{ + int nr, result; + GC *pGC; + REQUEST(xSetClipRectanglesReq); + + REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq); + if ((stuff->ordering != Unsorted) && (stuff->ordering != YSorted) && + (stuff->ordering != YXSorted) && (stuff->ordering != YXBanded)) + { + client->errorValue = stuff->ordering; + return BadValue; + } + result = dixLookupGC(&pGC,stuff->gc, client, DixWriteAccess); + if (result != Success) + return result; + + nr = (client->req_len << 2) - sizeof(xSetClipRectanglesReq); + if (nr & 4) + return(BadLength); + nr >>= 3; + result = SetClipRects(pGC, stuff->xOrigin, stuff->yOrigin, + nr, (xRectangle *)&stuff[1], (int)stuff->ordering); + if (client->noClientException != Success) + return(client->noClientException); + else + return(result); +} + +int +ProcFreeGC(ClientPtr client) +{ + GC *pGC; + int rc; + REQUEST(xResourceReq); + REQUEST_SIZE_MATCH(xResourceReq); + + rc = dixLookupGC(&pGC, stuff->id, client, DixDestroyAccess); + if (rc != Success) + return rc; + + FreeResource(stuff->id, RT_NONE); + return(client->noClientException); +} + +int +ProcClearToBackground(ClientPtr client) +{ + REQUEST(xClearAreaReq); + WindowPtr pWin; + int rc; + + REQUEST_SIZE_MATCH(xClearAreaReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) + return rc; + if (pWin->drawable.class == InputOnly) + { + client->errorValue = stuff->window; + return (BadMatch); + } + if ((stuff->exposures != xTrue) && (stuff->exposures != xFalse)) + { + client->errorValue = stuff->exposures; + return(BadValue); + } + (*pWin->drawable.pScreen->ClearToBackground)(pWin, stuff->x, stuff->y, + stuff->width, stuff->height, + (Bool)stuff->exposures); + return(client->noClientException); +} + +int +ProcCopyArea(ClientPtr client) +{ + DrawablePtr pDst; + DrawablePtr pSrc; + GC *pGC; + REQUEST(xCopyAreaReq); + RegionPtr pRgn; + int rc; + + REQUEST_SIZE_MATCH(xCopyAreaReq); + + VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, pGC, client); + if (stuff->dstDrawable != stuff->srcDrawable) + { + rc = dixLookupDrawable(&pSrc, stuff->srcDrawable, client, 0, + DixReadAccess); + if (rc != Success) + return rc; + if ((pDst->pScreen != pSrc->pScreen) || (pDst->depth != pSrc->depth)) + { + client->errorValue = stuff->dstDrawable; + return (BadMatch); + } + } + else + pSrc = pDst; + + pRgn = (*pGC->ops->CopyArea)(pSrc, pDst, pGC, stuff->srcX, stuff->srcY, + stuff->width, stuff->height, + stuff->dstX, stuff->dstY); + if (pGC->graphicsExposures) + { + (*pDst->pScreen->SendGraphicsExpose) + (client, pRgn, stuff->dstDrawable, X_CopyArea, 0); + if (pRgn) + REGION_DESTROY(pDst->pScreen, pRgn); + } + + return(client->noClientException); +} + +int +ProcCopyPlane(ClientPtr client) +{ + DrawablePtr psrcDraw, pdstDraw; + GC *pGC; + REQUEST(xCopyPlaneReq); + RegionPtr pRgn; + int rc; + + REQUEST_SIZE_MATCH(xCopyPlaneReq); + + VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, pGC, client); + if (stuff->dstDrawable != stuff->srcDrawable) + { + rc = dixLookupDrawable(&psrcDraw, stuff->srcDrawable, client, 0, + DixReadAccess); + if (rc != Success) + return rc; + + if (pdstDraw->pScreen != psrcDraw->pScreen) + { + client->errorValue = stuff->dstDrawable; + return (BadMatch); + } + } + else + psrcDraw = pdstDraw; + + /* Check to see if stuff->bitPlane has exactly ONE good bit set */ + if(stuff->bitPlane == 0 || (stuff->bitPlane & (stuff->bitPlane - 1)) || + (stuff->bitPlane > (1L << (psrcDraw->depth - 1)))) + { + client->errorValue = stuff->bitPlane; + return(BadValue); + } + + pRgn = (*pGC->ops->CopyPlane)(psrcDraw, pdstDraw, pGC, stuff->srcX, stuff->srcY, + stuff->width, stuff->height, + stuff->dstX, stuff->dstY, stuff->bitPlane); + if (pGC->graphicsExposures) + { + (*pdstDraw->pScreen->SendGraphicsExpose) + (client, pRgn, stuff->dstDrawable, X_CopyPlane, 0); + if (pRgn) + REGION_DESTROY(pdstDraw->pScreen, pRgn); + } + return(client->noClientException); +} + +int +ProcPolyPoint(ClientPtr client) +{ + int npoint; + GC *pGC; + DrawablePtr pDraw; + REQUEST(xPolyPointReq); + + REQUEST_AT_LEAST_SIZE(xPolyPointReq); + if ((stuff->coordMode != CoordModeOrigin) && + (stuff->coordMode != CoordModePrevious)) + { + client->errorValue = stuff->coordMode; + return BadValue; + } + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + npoint = ((client->req_len << 2) - sizeof(xPolyPointReq)) >> 2; + if (npoint) + (*pGC->ops->PolyPoint)(pDraw, pGC, stuff->coordMode, npoint, + (xPoint *) &stuff[1]); + return (client->noClientException); +} + +int +ProcPolyLine(ClientPtr client) +{ + int npoint; + GC *pGC; + DrawablePtr pDraw; + REQUEST(xPolyLineReq); + + REQUEST_AT_LEAST_SIZE(xPolyLineReq); + if ((stuff->coordMode != CoordModeOrigin) && + (stuff->coordMode != CoordModePrevious)) + { + client->errorValue = stuff->coordMode; + return BadValue; + } + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + npoint = ((client->req_len << 2) - sizeof(xPolyLineReq)) >> 2; + if (npoint > 1) + (*pGC->ops->Polylines)(pDraw, pGC, stuff->coordMode, npoint, + (DDXPointPtr) &stuff[1]); + return(client->noClientException); +} + +int +ProcPolySegment(ClientPtr client) +{ + int nsegs; + GC *pGC; + DrawablePtr pDraw; + REQUEST(xPolySegmentReq); + + REQUEST_AT_LEAST_SIZE(xPolySegmentReq); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + nsegs = (client->req_len << 2) - sizeof(xPolySegmentReq); + if (nsegs & 4) + return(BadLength); + nsegs >>= 3; + if (nsegs) + (*pGC->ops->PolySegment)(pDraw, pGC, nsegs, (xSegment *) &stuff[1]); + return (client->noClientException); +} + +int +ProcPolyRectangle (ClientPtr client) +{ + int nrects; + GC *pGC; + DrawablePtr pDraw; + REQUEST(xPolyRectangleReq); + + REQUEST_AT_LEAST_SIZE(xPolyRectangleReq); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + nrects = (client->req_len << 2) - sizeof(xPolyRectangleReq); + if (nrects & 4) + return(BadLength); + nrects >>= 3; + if (nrects) + (*pGC->ops->PolyRectangle)(pDraw, pGC, + nrects, (xRectangle *) &stuff[1]); + return(client->noClientException); +} + +int +ProcPolyArc(ClientPtr client) +{ + int narcs; + GC *pGC; + DrawablePtr pDraw; + REQUEST(xPolyArcReq); + + REQUEST_AT_LEAST_SIZE(xPolyArcReq); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + narcs = (client->req_len << 2) - sizeof(xPolyArcReq); + if (narcs % sizeof(xArc)) + return(BadLength); + narcs /= sizeof(xArc); + if (narcs) + (*pGC->ops->PolyArc)(pDraw, pGC, narcs, (xArc *) &stuff[1]); + return (client->noClientException); +} + +int +ProcFillPoly(ClientPtr client) +{ + int things; + GC *pGC; + DrawablePtr pDraw; + REQUEST(xFillPolyReq); + + REQUEST_AT_LEAST_SIZE(xFillPolyReq); + if ((stuff->shape != Complex) && (stuff->shape != Nonconvex) && + (stuff->shape != Convex)) + { + client->errorValue = stuff->shape; + return BadValue; + } + if ((stuff->coordMode != CoordModeOrigin) && + (stuff->coordMode != CoordModePrevious)) + { + client->errorValue = stuff->coordMode; + return BadValue; + } + + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + things = ((client->req_len << 2) - sizeof(xFillPolyReq)) >> 2; + if (things) + (*pGC->ops->FillPolygon) (pDraw, pGC, stuff->shape, + stuff->coordMode, things, + (DDXPointPtr) &stuff[1]); + return(client->noClientException); +} + +int +ProcPolyFillRectangle(ClientPtr client) +{ + int things; + GC *pGC; + DrawablePtr pDraw; + REQUEST(xPolyFillRectangleReq); + + REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + things = (client->req_len << 2) - sizeof(xPolyFillRectangleReq); + if (things & 4) + return(BadLength); + things >>= 3; + + if (things) + (*pGC->ops->PolyFillRect) (pDraw, pGC, things, + (xRectangle *) &stuff[1]); + return (client->noClientException); +} + +int +ProcPolyFillArc(ClientPtr client) +{ + int narcs; + GC *pGC; + DrawablePtr pDraw; + REQUEST(xPolyFillArcReq); + + REQUEST_AT_LEAST_SIZE(xPolyFillArcReq); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq); + if (narcs % sizeof(xArc)) + return(BadLength); + narcs /= sizeof(xArc); + if (narcs) + (*pGC->ops->PolyFillArc) (pDraw, pGC, narcs, (xArc *) &stuff[1]); + return (client->noClientException); +} + +#ifdef MATCH_CLIENT_ENDIAN + +int +ServerOrder (void) +{ + int whichbyte = 1; + + if (*((char *) &whichbyte)) + return LSBFirst; + return MSBFirst; +} + +#define ClientOrder(client) ((client)->swapped ? !ServerOrder() : ServerOrder()) + +void +ReformatImage (char *base, int nbytes, int bpp, int order) +{ + switch (bpp) { + case 1: /* yuck */ + if (BITMAP_BIT_ORDER != order) + BitOrderInvert ((unsigned char *) base, nbytes); +#if IMAGE_BYTE_ORDER != BITMAP_BIT_ORDER && BITMAP_SCANLINE_UNIT != 8 + ReformatImage (base, nbytes, BITMAP_SCANLINE_UNIT, order); +#endif + break; + case 4: + break; /* yuck */ + case 8: + break; + case 16: + if (IMAGE_BYTE_ORDER != order) + TwoByteSwap ((unsigned char *) base, nbytes); + break; + case 32: + if (IMAGE_BYTE_ORDER != order) + FourByteSwap ((unsigned char *) base, nbytes); + break; + } +} +#else +#define ReformatImage(b,n,bpp,o) +#endif + +/* 64-bit server notes: the protocol restricts padding of images to + * 8-, 16-, or 32-bits. We would like to have 64-bits for the server + * to use internally. Removes need for internal alignment checking. + * All of the PutImage functions could be changed individually, but + * as currently written, they call other routines which require things + * to be 64-bit padded on scanlines, so we changed things here. + * If an image would be padded differently for 64- versus 32-, then + * copy each scanline to a 64-bit padded scanline. + * Also, we need to make sure that the image is aligned on a 64-bit + * boundary, even if the scanlines are padded to our satisfaction. + */ +int +ProcPutImage(ClientPtr client) +{ + GC *pGC; + DrawablePtr pDraw; + long length; /* length of scanline server padded */ + long lengthProto; /* length of scanline protocol padded */ + char *tmpImage; + REQUEST(xPutImageReq); + + REQUEST_AT_LEAST_SIZE(xPutImageReq); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + if (stuff->format == XYBitmap) + { + if ((stuff->depth != 1) || + (stuff->leftPad >= (unsigned int)screenInfo.bitmapScanlinePad)) + return BadMatch; + length = BitmapBytePad(stuff->width + stuff->leftPad); + } + else if (stuff->format == XYPixmap) + { + if ((pDraw->depth != stuff->depth) || + (stuff->leftPad >= (unsigned int)screenInfo.bitmapScanlinePad)) + return BadMatch; + length = BitmapBytePad(stuff->width + stuff->leftPad); + length *= stuff->depth; + } + else if (stuff->format == ZPixmap) + { + if ((pDraw->depth != stuff->depth) || (stuff->leftPad != 0)) + return BadMatch; + length = PixmapBytePad(stuff->width, stuff->depth); + } + else + { + client->errorValue = stuff->format; + return BadValue; + } + + tmpImage = (char *)&stuff[1]; + lengthProto = length; + + if (((((lengthProto * stuff->height) + (unsigned)3) >> 2) + + (sizeof(xPutImageReq) >> 2)) != client->req_len) + return BadLength; + + ReformatImage (tmpImage, lengthProto * stuff->height, + stuff->format == ZPixmap ? BitsPerPixel (stuff->depth) : 1, + ClientOrder(client)); + + (*pGC->ops->PutImage) (pDraw, pGC, stuff->depth, stuff->dstX, stuff->dstY, + stuff->width, stuff->height, + stuff->leftPad, stuff->format, tmpImage); + + return (client->noClientException); +} + +static int +DoGetImage(ClientPtr client, int format, Drawable drawable, + int x, int y, int width, int height, + Mask planemask, xGetImageReply **im_return) +{ + DrawablePtr pDraw; + int nlines, linesPerBuf, rc; + int linesDone; + long widthBytesLine, length; + Mask plane = 0; + char *pBuf; + xGetImageReply xgi; + RegionPtr pVisibleRegion = NULL; + + if ((format != XYPixmap) && (format != ZPixmap)) + { + client->errorValue = format; + return(BadValue); + } + rc = dixLookupDrawable(&pDraw, drawable, client, 0, DixReadAccess); + if (rc != Success) + return rc; + + if(pDraw->type == DRAWABLE_WINDOW) + { + if( /* check for being viewable */ + !((WindowPtr) pDraw)->realized || + /* check for being on screen */ + pDraw->x + x < 0 || + pDraw->x + x + width > pDraw->pScreen->width || + pDraw->y + y < 0 || + pDraw->y + y + height > pDraw->pScreen->height || + /* check for being inside of border */ + x < - wBorderWidth((WindowPtr)pDraw) || + x + width > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width || + y < -wBorderWidth((WindowPtr)pDraw) || + y + height > wBorderWidth ((WindowPtr)pDraw) + (int)pDraw->height + ) + return(BadMatch); + xgi.visual = wVisual (((WindowPtr) pDraw)); + } + else + { + if(x < 0 || + x+width > (int)pDraw->width || + y < 0 || + y+height > (int)pDraw->height + ) + return(BadMatch); + xgi.visual = None; + } + + xgi.type = X_Reply; + xgi.sequenceNumber = client->sequence; + xgi.depth = pDraw->depth; + if(format == ZPixmap) + { + widthBytesLine = PixmapBytePad(width, pDraw->depth); + length = widthBytesLine * height; + + } + else + { + widthBytesLine = BitmapBytePad(width); + plane = ((Mask)1) << (pDraw->depth - 1); + /* only planes asked for */ + length = widthBytesLine * height * + Ones(planemask & (plane | (plane - 1))); + + } + + xgi.length = length; + + if (im_return) { + pBuf = (char *)xalloc(sz_xGetImageReply + length); + if (!pBuf) + return (BadAlloc); + if (widthBytesLine == 0) + linesPerBuf = 0; + else + linesPerBuf = height; + *im_return = (xGetImageReply *)pBuf; + *(xGetImageReply *)pBuf = xgi; + pBuf += sz_xGetImageReply; + } else { + xgi.length = (xgi.length + 3) >> 2; + if (widthBytesLine == 0 || height == 0) + linesPerBuf = 0; + else if (widthBytesLine >= IMAGE_BUFSIZE) + linesPerBuf = 1; + else + { + linesPerBuf = IMAGE_BUFSIZE / widthBytesLine; + if (linesPerBuf > height) + linesPerBuf = height; + } + length = linesPerBuf * widthBytesLine; + if (linesPerBuf < height) + { + /* we have to make sure intermediate buffers don't need padding */ + while ((linesPerBuf > 1) && + (length & ((1L << LOG2_BYTES_PER_SCANLINE_PAD)-1))) + { + linesPerBuf--; + length -= widthBytesLine; + } + while (length & ((1L << LOG2_BYTES_PER_SCANLINE_PAD)-1)) + { + linesPerBuf++; + length += widthBytesLine; + } + } + if(!(pBuf = (char *) ALLOCATE_LOCAL(length))) + return (BadAlloc); + WriteReplyToClient(client, sizeof (xGetImageReply), &xgi); + } + + if (pDraw->type == DRAWABLE_WINDOW && + !XaceHook(XACE_DRAWABLE_ACCESS, client, pDraw)) + { + pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw); + if (pVisibleRegion) + { + REGION_TRANSLATE(pDraw->pScreen, pVisibleRegion, + -pDraw->x, -pDraw->y); + } + } + + if (linesPerBuf == 0) + { + /* nothing to do */ + } + else if (format == ZPixmap) + { + linesDone = 0; + while (height - linesDone > 0) + { + nlines = min(linesPerBuf, height - linesDone); + (*pDraw->pScreen->GetImage) (pDraw, + x, + y + linesDone, + width, + nlines, + format, + planemask, + (pointer) pBuf); + if (pVisibleRegion) + XaceCensorImage(client, pVisibleRegion, widthBytesLine, + pDraw, x, y + linesDone, width, + nlines, format, pBuf); + + /* Note that this is NOT a call to WriteSwappedDataToClient, + as we do NOT byte swap */ + if (!im_return) + { + ReformatImage (pBuf, (int)(nlines * widthBytesLine), + BitsPerPixel (pDraw->depth), + ClientOrder(client)); + +/* Don't split me, gcc pukes when you do */ + (void)WriteToClient(client, + (int)(nlines * widthBytesLine), + pBuf); + } + linesDone += nlines; + } + } + else /* XYPixmap */ + { + for (; plane; plane >>= 1) + { + if (planemask & plane) + { + linesDone = 0; + while (height - linesDone > 0) + { + nlines = min(linesPerBuf, height - linesDone); + (*pDraw->pScreen->GetImage) (pDraw, + x, + y + linesDone, + width, + nlines, + format, + plane, + (pointer)pBuf); + if (pVisibleRegion) + XaceCensorImage(client, pVisibleRegion, + widthBytesLine, + pDraw, x, y + linesDone, width, + nlines, format, pBuf); + + /* Note: NOT a call to WriteSwappedDataToClient, + as we do NOT byte swap */ + if (im_return) { + pBuf += nlines * widthBytesLine; + } else { + ReformatImage (pBuf, + (int)(nlines * widthBytesLine), + 1, + ClientOrder (client)); + +/* Don't split me, gcc pukes when you do */ + (void)WriteToClient(client, + (int)(nlines * widthBytesLine), + pBuf); + } + linesDone += nlines; + } + } + } + } + if (pVisibleRegion) + REGION_DESTROY(pDraw->pScreen, pVisibleRegion); + if (!im_return) + DEALLOCATE_LOCAL(pBuf); + return (client->noClientException); +} + +int +ProcGetImage(ClientPtr client) +{ + REQUEST(xGetImageReq); + + REQUEST_SIZE_MATCH(xGetImageReq); + + return DoGetImage(client, stuff->format, stuff->drawable, + stuff->x, stuff->y, + (int)stuff->width, (int)stuff->height, + stuff->planeMask, (xGetImageReply **)NULL); +} + +int +ProcPolyText(ClientPtr client) +{ + int err; + REQUEST(xPolyTextReq); + DrawablePtr pDraw; + GC *pGC; + + REQUEST_AT_LEAST_SIZE(xPolyTextReq); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + + err = PolyText(client, + pDraw, + pGC, + (unsigned char *)&stuff[1], + ((unsigned char *) stuff) + (client->req_len << 2), + stuff->x, + stuff->y, + stuff->reqType, + stuff->drawable); + + if (err == Success) + { + return(client->noClientException); + } + else + return err; +} + +int +ProcImageText8(ClientPtr client) +{ + int err; + DrawablePtr pDraw; + GC *pGC; + + REQUEST(xImageTextReq); + + REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + + err = ImageText(client, + pDraw, + pGC, + stuff->nChars, + (unsigned char *)&stuff[1], + stuff->x, + stuff->y, + stuff->reqType, + stuff->drawable); + + if (err == Success) + { + return(client->noClientException); + } + else + return err; +} + +int +ProcImageText16(ClientPtr client) +{ + int err; + DrawablePtr pDraw; + GC *pGC; + + REQUEST(xImageTextReq); + + REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars << 1); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + + err = ImageText(client, + pDraw, + pGC, + stuff->nChars, + (unsigned char *)&stuff[1], + stuff->x, + stuff->y, + stuff->reqType, + stuff->drawable); + + if (err == Success) + { + return(client->noClientException); + } + else + return err; +} + + +int +ProcCreateColormap(ClientPtr client) +{ + VisualPtr pVisual; + ColormapPtr pmap; + Colormap mid; + WindowPtr pWin; + ScreenPtr pScreen; + REQUEST(xCreateColormapReq); + int i, result; + + REQUEST_SIZE_MATCH(xCreateColormapReq); + + if ((stuff->alloc != AllocNone) && (stuff->alloc != AllocAll)) + { + client->errorValue = stuff->alloc; + return(BadValue); + } + mid = stuff->mid; + LEGAL_NEW_RESOURCE(mid, client); + result = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + if (result != Success) + return result; + + pScreen = pWin->drawable.pScreen; + for (i = 0, pVisual = pScreen->visuals; + i < pScreen->numVisuals; + i++, pVisual++) + { + if (pVisual->vid != stuff->visual) + continue; + result = CreateColormap(mid, pScreen, pVisual, &pmap, + (int)stuff->alloc, client->index); + if (client->noClientException != Success) + return(client->noClientException); + else + return(result); + } + client->errorValue = stuff->visual; + return(BadMatch); +} + +int +ProcFreeColormap(ClientPtr client) +{ + ColormapPtr pmap; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + pmap = (ColormapPtr )SecurityLookupIDByType(client, stuff->id, RT_COLORMAP, + DixDestroyAccess); + if (pmap) + { + /* Freeing a default colormap is a no-op */ + if (!(pmap->flags & IsDefault)) + FreeResource(stuff->id, RT_NONE); + return (client->noClientException); + } + else + { + client->errorValue = stuff->id; + return (BadColor); + } +} + + +int +ProcCopyColormapAndFree(ClientPtr client) +{ + Colormap mid; + ColormapPtr pSrcMap; + REQUEST(xCopyColormapAndFreeReq); + int result; + + REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq); + mid = stuff->mid; + LEGAL_NEW_RESOURCE(mid, client); + if( (pSrcMap = (ColormapPtr )SecurityLookupIDByType(client, stuff->srcCmap, + RT_COLORMAP, DixReadAccess|DixWriteAccess)) ) + { + result = CopyColormapAndFree(mid, pSrcMap, client->index); + if (client->noClientException != Success) + return(client->noClientException); + else + return(result); + } + else + { + client->errorValue = stuff->srcCmap; + return(BadColor); + } +} + +int +ProcInstallColormap(ClientPtr client) +{ + ColormapPtr pcmp; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->id, + RT_COLORMAP, DixReadAccess); + if (pcmp) + { + (*(pcmp->pScreen->InstallColormap)) (pcmp); + return (client->noClientException); + } + else + { + client->errorValue = stuff->id; + return (BadColor); + } +} + +int +ProcUninstallColormap(ClientPtr client) +{ + ColormapPtr pcmp; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->id, + RT_COLORMAP, DixReadAccess); + if (pcmp) + { + if(pcmp->mid != pcmp->pScreen->defColormap) + (*(pcmp->pScreen->UninstallColormap)) (pcmp); + return (client->noClientException); + } + else + { + client->errorValue = stuff->id; + return (BadColor); + } +} + +int +ProcListInstalledColormaps(ClientPtr client) +{ + xListInstalledColormapsReply *preply; + int nummaps, rc; + WindowPtr pWin; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; + + preply = (xListInstalledColormapsReply *) + ALLOCATE_LOCAL(sizeof(xListInstalledColormapsReply) + + pWin->drawable.pScreen->maxInstalledCmaps * + sizeof(Colormap)); + if(!preply) + return(BadAlloc); + + preply->type = X_Reply; + preply->sequenceNumber = client->sequence; + nummaps = (*pWin->drawable.pScreen->ListInstalledColormaps) + (pWin->drawable.pScreen, (Colormap *)&preply[1]); + preply->nColormaps = nummaps; + preply->length = nummaps; + WriteReplyToClient(client, sizeof (xListInstalledColormapsReply), preply); + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, nummaps * sizeof(Colormap), &preply[1]); + DEALLOCATE_LOCAL(preply); + return(client->noClientException); +} + +int +ProcAllocColor (ClientPtr client) +{ + ColormapPtr pmap; + int retval; + xAllocColorReply acr; + REQUEST(xAllocColorReq); + + REQUEST_SIZE_MATCH(xAllocColorReq); + pmap = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, + RT_COLORMAP, DixWriteAccess); + if (pmap) + { + acr.type = X_Reply; + acr.length = 0; + acr.sequenceNumber = client->sequence; + acr.red = stuff->red; + acr.green = stuff->green; + acr.blue = stuff->blue; + acr.pixel = 0; + if( (retval = AllocColor(pmap, &acr.red, &acr.green, &acr.blue, + &acr.pixel, client->index)) ) + { + if (client->noClientException != Success) + return(client->noClientException); + else + return (retval); + } +#ifdef PANORAMIX + if (noPanoramiXExtension || !pmap->pScreen->myNum) +#endif + WriteReplyToClient(client, sizeof(xAllocColorReply), &acr); + return (client->noClientException); + + } + else + { + client->errorValue = stuff->cmap; + return (BadColor); + } +} + +int +ProcAllocNamedColor (ClientPtr client) +{ + ColormapPtr pcmp; + REQUEST(xAllocNamedColorReq); + + REQUEST_FIXED_SIZE(xAllocNamedColorReq, stuff->nbytes); + pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, + RT_COLORMAP, DixWriteAccess); + if (pcmp) + { + int retval; + + xAllocNamedColorReply ancr; + + ancr.type = X_Reply; + ancr.length = 0; + ancr.sequenceNumber = client->sequence; + + if(OsLookupColor(pcmp->pScreen->myNum, (char *)&stuff[1], stuff->nbytes, + &ancr.exactRed, &ancr.exactGreen, &ancr.exactBlue)) + { + ancr.screenRed = ancr.exactRed; + ancr.screenGreen = ancr.exactGreen; + ancr.screenBlue = ancr.exactBlue; + ancr.pixel = 0; + if( (retval = AllocColor(pcmp, + &ancr.screenRed, &ancr.screenGreen, &ancr.screenBlue, + &ancr.pixel, client->index)) ) + { + if (client->noClientException != Success) + return(client->noClientException); + else + return(retval); + } +#ifdef PANORAMIX + if (noPanoramiXExtension || !pcmp->pScreen->myNum) +#endif + WriteReplyToClient(client, sizeof (xAllocNamedColorReply), &ancr); + return (client->noClientException); + } + else + return(BadName); + + } + else + { + client->errorValue = stuff->cmap; + return (BadColor); + } +} + +int +ProcAllocColorCells (ClientPtr client) +{ + ColormapPtr pcmp; + REQUEST(xAllocColorCellsReq); + + REQUEST_SIZE_MATCH(xAllocColorCellsReq); + pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, + RT_COLORMAP, DixWriteAccess); + if (pcmp) + { + xAllocColorCellsReply accr; + int npixels, nmasks, retval; + long length; + Pixel *ppixels, *pmasks; + + npixels = stuff->colors; + if (!npixels) + { + client->errorValue = npixels; + return (BadValue); + } + if (stuff->contiguous != xTrue && stuff->contiguous != xFalse) + { + client->errorValue = stuff->contiguous; + return (BadValue); + } + nmasks = stuff->planes; + length = ((long)npixels + (long)nmasks) * sizeof(Pixel); + ppixels = (Pixel *)ALLOCATE_LOCAL(length); + if(!ppixels) + return(BadAlloc); + pmasks = ppixels + npixels; + + if( (retval = AllocColorCells(client->index, pcmp, npixels, nmasks, + (Bool)stuff->contiguous, ppixels, pmasks)) ) + { + DEALLOCATE_LOCAL(ppixels); + if (client->noClientException != Success) + return(client->noClientException); + else + return(retval); + } +#ifdef PANORAMIX + if (noPanoramiXExtension || !pcmp->pScreen->myNum) +#endif + { + accr.type = X_Reply; + accr.length = length >> 2; + accr.sequenceNumber = client->sequence; + accr.nPixels = npixels; + accr.nMasks = nmasks; + WriteReplyToClient(client, sizeof (xAllocColorCellsReply), &accr); + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, length, ppixels); + } + DEALLOCATE_LOCAL(ppixels); + return (client->noClientException); + } + else + { + client->errorValue = stuff->cmap; + return (BadColor); + } +} + +int +ProcAllocColorPlanes(ClientPtr client) +{ + ColormapPtr pcmp; + REQUEST(xAllocColorPlanesReq); + + REQUEST_SIZE_MATCH(xAllocColorPlanesReq); + pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, + RT_COLORMAP, DixWriteAccess); + if (pcmp) + { + xAllocColorPlanesReply acpr; + int npixels, retval; + long length; + Pixel *ppixels; + + npixels = stuff->colors; + if (!npixels) + { + client->errorValue = npixels; + return (BadValue); + } + if (stuff->contiguous != xTrue && stuff->contiguous != xFalse) + { + client->errorValue = stuff->contiguous; + return (BadValue); + } + acpr.type = X_Reply; + acpr.sequenceNumber = client->sequence; + acpr.nPixels = npixels; + length = (long)npixels * sizeof(Pixel); + ppixels = (Pixel *)ALLOCATE_LOCAL(length); + if(!ppixels) + return(BadAlloc); + if( (retval = AllocColorPlanes(client->index, pcmp, npixels, + (int)stuff->red, (int)stuff->green, (int)stuff->blue, + (Bool)stuff->contiguous, ppixels, + &acpr.redMask, &acpr.greenMask, &acpr.blueMask)) ) + { + DEALLOCATE_LOCAL(ppixels); + if (client->noClientException != Success) + return(client->noClientException); + else + return(retval); + } + acpr.length = length >> 2; +#ifdef PANORAMIX + if (noPanoramiXExtension || !pcmp->pScreen->myNum) +#endif + { + WriteReplyToClient(client, sizeof(xAllocColorPlanesReply), &acpr); + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, length, ppixels); + } + DEALLOCATE_LOCAL(ppixels); + return (client->noClientException); + } + else + { + client->errorValue = stuff->cmap; + return (BadColor); + } +} + +int +ProcFreeColors(ClientPtr client) +{ + ColormapPtr pcmp; + REQUEST(xFreeColorsReq); + + REQUEST_AT_LEAST_SIZE(xFreeColorsReq); + pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, + RT_COLORMAP, DixWriteAccess); + if (pcmp) + { + int count; + int retval; + + if(pcmp->flags & AllAllocated) + return(BadAccess); + count = ((client->req_len << 2)- sizeof(xFreeColorsReq)) >> 2; + retval = FreeColors(pcmp, client->index, count, + (Pixel *)&stuff[1], (Pixel)stuff->planeMask); + if (client->noClientException != Success) + return(client->noClientException); + else + { + client->errorValue = clientErrorValue; + return(retval); + } + + } + else + { + client->errorValue = stuff->cmap; + return (BadColor); + } +} + +int +ProcStoreColors (ClientPtr client) +{ + ColormapPtr pcmp; + REQUEST(xStoreColorsReq); + + REQUEST_AT_LEAST_SIZE(xStoreColorsReq); + pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, + RT_COLORMAP, DixWriteAccess); + if (pcmp) + { + int count; + int retval; + + count = (client->req_len << 2) - sizeof(xStoreColorsReq); + if (count % sizeof(xColorItem)) + return(BadLength); + count /= sizeof(xColorItem); + retval = StoreColors(pcmp, count, (xColorItem *)&stuff[1]); + if (client->noClientException != Success) + return(client->noClientException); + else + { + client->errorValue = clientErrorValue; + return(retval); + } + } + else + { + client->errorValue = stuff->cmap; + return (BadColor); + } +} + +int +ProcStoreNamedColor (ClientPtr client) +{ + ColormapPtr pcmp; + REQUEST(xStoreNamedColorReq); + + REQUEST_FIXED_SIZE(xStoreNamedColorReq, stuff->nbytes); + pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, + RT_COLORMAP, DixWriteAccess); + if (pcmp) + { + xColorItem def; + int retval; + + if(OsLookupColor(pcmp->pScreen->myNum, (char *)&stuff[1], + stuff->nbytes, &def.red, &def.green, &def.blue)) + { + def.flags = stuff->flags; + def.pixel = stuff->pixel; + retval = StoreColors(pcmp, 1, &def); + if (client->noClientException != Success) + return(client->noClientException); + else + return(retval); + } + return (BadName); + } + else + { + client->errorValue = stuff->cmap; + return (BadColor); + } +} + +int +ProcQueryColors(ClientPtr client) +{ + ColormapPtr pcmp; + REQUEST(xQueryColorsReq); + + REQUEST_AT_LEAST_SIZE(xQueryColorsReq); + pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, + RT_COLORMAP, DixReadAccess); + if (pcmp) + { + int count, retval; + xrgb *prgbs; + xQueryColorsReply qcr; + + count = ((client->req_len << 2) - sizeof(xQueryColorsReq)) >> 2; + prgbs = (xrgb *)ALLOCATE_LOCAL(count * sizeof(xrgb)); + if(!prgbs && count) + return(BadAlloc); + if( (retval = QueryColors(pcmp, count, (Pixel *)&stuff[1], prgbs)) ) + { + if (prgbs) DEALLOCATE_LOCAL(prgbs); + if (client->noClientException != Success) + return(client->noClientException); + else + { + client->errorValue = clientErrorValue; + return (retval); + } + } + qcr.type = X_Reply; + qcr.length = (count * sizeof(xrgb)) >> 2; + qcr.sequenceNumber = client->sequence; + qcr.nColors = count; + WriteReplyToClient(client, sizeof(xQueryColorsReply), &qcr); + if (count) + { + client->pSwapReplyFunc = (ReplySwapPtr) SQColorsExtend; + WriteSwappedDataToClient(client, count * sizeof(xrgb), prgbs); + } + if (prgbs) DEALLOCATE_LOCAL(prgbs); + return(client->noClientException); + + } + else + { + client->errorValue = stuff->cmap; + return (BadColor); + } +} + +int +ProcLookupColor(ClientPtr client) +{ + ColormapPtr pcmp; + REQUEST(xLookupColorReq); + + REQUEST_FIXED_SIZE(xLookupColorReq, stuff->nbytes); + pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, + RT_COLORMAP, DixReadAccess); + if (pcmp) + { + xLookupColorReply lcr; + + if(OsLookupColor(pcmp->pScreen->myNum, (char *)&stuff[1], stuff->nbytes, + &lcr.exactRed, &lcr.exactGreen, &lcr.exactBlue)) + { + lcr.type = X_Reply; + lcr.length = 0; + lcr.sequenceNumber = client->sequence; + lcr.screenRed = lcr.exactRed; + lcr.screenGreen = lcr.exactGreen; + lcr.screenBlue = lcr.exactBlue; + (*pcmp->pScreen->ResolveColor)(&lcr.screenRed, + &lcr.screenGreen, + &lcr.screenBlue, + pcmp->pVisual); + WriteReplyToClient(client, sizeof(xLookupColorReply), &lcr); + return(client->noClientException); + } + return (BadName); + } + else + { + client->errorValue = stuff->cmap; + return (BadColor); + } +} + +int +ProcCreateCursor (ClientPtr client) +{ + CursorPtr pCursor; + PixmapPtr src; + PixmapPtr msk; + unsigned char * srcbits; + unsigned char * mskbits; + unsigned short width, height; + long n; + CursorMetricRec cm; + + + REQUEST(xCreateCursorReq); + + REQUEST_SIZE_MATCH(xCreateCursorReq); + LEGAL_NEW_RESOURCE(stuff->cid, client); + + src = (PixmapPtr)SecurityLookupIDByType(client, stuff->source, + RT_PIXMAP, DixReadAccess); + msk = (PixmapPtr)SecurityLookupIDByType(client, stuff->mask, + RT_PIXMAP, DixReadAccess); + if ( src == (PixmapPtr)NULL) + { + client->errorValue = stuff->source; + return (BadPixmap); + } + if ( msk == (PixmapPtr)NULL) + { + if (stuff->mask != None) + { + client->errorValue = stuff->mask; + return (BadPixmap); + } + } + else if ( src->drawable.width != msk->drawable.width + || src->drawable.height != msk->drawable.height + || src->drawable.depth != 1 + || msk->drawable.depth != 1) + return (BadMatch); + + width = src->drawable.width; + height = src->drawable.height; + + if ( stuff->x > width + || stuff->y > height ) + return (BadMatch); + + n = BitmapBytePad(width)*height; + srcbits = (unsigned char *)xalloc(n); + if (!srcbits) + return (BadAlloc); + mskbits = (unsigned char *)xalloc(n); + if (!mskbits) + { + xfree(srcbits); + return (BadAlloc); + } + + /* zeroing the (pad) bits helps some ddx cursor handling */ + bzero((char *)srcbits, n); + (* src->drawable.pScreen->GetImage)( (DrawablePtr)src, 0, 0, width, height, + XYPixmap, 1, (pointer)srcbits); + if ( msk == (PixmapPtr)NULL) + { + unsigned char *bits = mskbits; + while (--n >= 0) + *bits++ = ~0; + } + else + { + /* zeroing the (pad) bits helps some ddx cursor handling */ + bzero((char *)mskbits, n); + (* msk->drawable.pScreen->GetImage)( (DrawablePtr)msk, 0, 0, width, + height, XYPixmap, 1, (pointer)mskbits); + } + cm.width = width; + cm.height = height; + cm.xhot = stuff->x; + cm.yhot = stuff->y; + pCursor = AllocCursor( srcbits, mskbits, &cm, + stuff->foreRed, stuff->foreGreen, stuff->foreBlue, + stuff->backRed, stuff->backGreen, stuff->backBlue); + + if (pCursor && AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor)) + return (client->noClientException); + return BadAlloc; +} + +int +ProcCreateGlyphCursor (ClientPtr client) +{ + CursorPtr pCursor; + int res; + + REQUEST(xCreateGlyphCursorReq); + + REQUEST_SIZE_MATCH(xCreateGlyphCursorReq); + LEGAL_NEW_RESOURCE(stuff->cid, client); + + res = AllocGlyphCursor(stuff->source, stuff->sourceChar, + stuff->mask, stuff->maskChar, + stuff->foreRed, stuff->foreGreen, stuff->foreBlue, + stuff->backRed, stuff->backGreen, stuff->backBlue, + &pCursor, client); + if (res != Success) + return res; + if (AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor)) + return client->noClientException; + return BadAlloc; +} + + +int +ProcFreeCursor (ClientPtr client) +{ + CursorPtr pCursor; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->id, + RT_CURSOR, DixDestroyAccess); + if (pCursor) + { + FreeResource(stuff->id, RT_NONE); + return (client->noClientException); + } + else + { + client->errorValue = stuff->id; + return (BadCursor); + } +} + +int +ProcQueryBestSize (ClientPtr client) +{ + xQueryBestSizeReply reply; + DrawablePtr pDraw; + ScreenPtr pScreen; + int rc; + REQUEST(xQueryBestSizeReq); + REQUEST_SIZE_MATCH(xQueryBestSizeReq); + + if ((stuff->class != CursorShape) && + (stuff->class != TileShape) && + (stuff->class != StippleShape)) + { + client->errorValue = stuff->class; + return(BadValue); + } + + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, + DixReadAccess); + if (rc != Success) + return rc; + if (stuff->class != CursorShape && pDraw->type == UNDRAWABLE_WINDOW) + return (BadMatch); + pScreen = pDraw->pScreen; + (* pScreen->QueryBestSize)(stuff->class, &stuff->width, + &stuff->height, pScreen); + reply.type = X_Reply; + reply.length = 0; + reply.sequenceNumber = client->sequence; + reply.width = stuff->width; + reply.height = stuff->height; + WriteReplyToClient(client, sizeof(xQueryBestSizeReply), &reply); + return (client->noClientException); +} + + +int +ProcSetScreenSaver (ClientPtr client) +{ + int blankingOption, exposureOption; + REQUEST(xSetScreenSaverReq); + + REQUEST_SIZE_MATCH(xSetScreenSaverReq); + blankingOption = stuff->preferBlank; + if ((blankingOption != DontPreferBlanking) && + (blankingOption != PreferBlanking) && + (blankingOption != DefaultBlanking)) + { + client->errorValue = blankingOption; + return BadValue; + } + exposureOption = stuff->allowExpose; + if ((exposureOption != DontAllowExposures) && + (exposureOption != AllowExposures) && + (exposureOption != DefaultExposures)) + { + client->errorValue = exposureOption; + return BadValue; + } + if (stuff->timeout < -1) + { + client->errorValue = stuff->timeout; + return BadValue; + } + if (stuff->interval < -1) + { + client->errorValue = stuff->interval; + return BadValue; + } + + if (blankingOption == DefaultBlanking) + ScreenSaverBlanking = defaultScreenSaverBlanking; + else + ScreenSaverBlanking = blankingOption; + if (exposureOption == DefaultExposures) + ScreenSaverAllowExposures = defaultScreenSaverAllowExposures; + else + ScreenSaverAllowExposures = exposureOption; + + if (stuff->timeout >= 0) + ScreenSaverTime = stuff->timeout * MILLI_PER_SECOND; + else + ScreenSaverTime = defaultScreenSaverTime; + if (stuff->interval >= 0) + ScreenSaverInterval = stuff->interval * MILLI_PER_SECOND; + else + ScreenSaverInterval = defaultScreenSaverInterval; + + SetScreenSaverTimer(); + return (client->noClientException); +} + +int +ProcGetScreenSaver(ClientPtr client) +{ + xGetScreenSaverReply rep; + + REQUEST_SIZE_MATCH(xReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.timeout = ScreenSaverTime / MILLI_PER_SECOND; + rep.interval = ScreenSaverInterval / MILLI_PER_SECOND; + rep.preferBlanking = ScreenSaverBlanking; + rep.allowExposures = ScreenSaverAllowExposures; + WriteReplyToClient(client, sizeof(xGetScreenSaverReply), &rep); + return (client->noClientException); +} + +int +ProcChangeHosts(ClientPtr client) +{ + REQUEST(xChangeHostsReq); + int result; + + REQUEST_FIXED_SIZE(xChangeHostsReq, stuff->hostLength); + + if(stuff->mode == HostInsert) + result = AddHost(client, (int)stuff->hostFamily, + stuff->hostLength, (pointer)&stuff[1]); + else if (stuff->mode == HostDelete) + result = RemoveHost(client, (int)stuff->hostFamily, + stuff->hostLength, (pointer)&stuff[1]); + else + { + client->errorValue = stuff->mode; + return BadValue; + } + if (!result) + result = client->noClientException; + return (result); +} + +int +ProcListHosts(ClientPtr client) +{ + xListHostsReply reply; + int len, nHosts, result; + pointer pdata; + /* REQUEST(xListHostsReq); */ + + REQUEST_SIZE_MATCH(xListHostsReq); + + /* untrusted clients can't list hosts */ + if (!XaceHook(XACE_HOSTLIST_ACCESS, client, DixReadAccess)) + return BadAccess; + + result = GetHosts(&pdata, &nHosts, &len, &reply.enabled); + if (result != Success) + return(result); + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + reply.nHosts = nHosts; + reply.length = len >> 2; + WriteReplyToClient(client, sizeof(xListHostsReply), &reply); + if (nHosts) + { + client->pSwapReplyFunc = (ReplySwapPtr) SLHostsExtend; + WriteSwappedDataToClient(client, len, pdata); + } + xfree(pdata); + return (client->noClientException); +} + +int +ProcChangeAccessControl(ClientPtr client) +{ + int result; + REQUEST(xSetAccessControlReq); + + REQUEST_SIZE_MATCH(xSetAccessControlReq); + if ((stuff->mode != EnableAccess) && (stuff->mode != DisableAccess)) + { + client->errorValue = stuff->mode; + return BadValue; + } + result = ChangeAccessControl(client, stuff->mode == EnableAccess); + if (!result) + result = client->noClientException; + return (result); +} + +/********************* + * CloseDownRetainedResources + * + * Find all clients that are gone and have terminated in RetainTemporary + * and destroy their resources. + *********************/ + +static void +CloseDownRetainedResources(void) +{ + int i; + ClientPtr client; + + for (i=1; icloseDownMode == RetainTemporary) + && (client->clientGone)) + CloseDownClient(client); + } +} + +int +ProcKillClient(ClientPtr client) +{ + REQUEST(xResourceReq); + ClientPtr killclient; + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + if (stuff->id == AllTemporary) + { + CloseDownRetainedResources(); + return (client->noClientException); + } + + rc = dixLookupClient(&killclient, stuff->id, client, DixDestroyAccess); + if (rc == Success) { + CloseDownClient(killclient); + /* if an LBX proxy gets killed, isItTimeToYield will be set */ + if (isItTimeToYield || (client == killclient)) + { + /* force yield and return Success, so that Dispatch() + * doesn't try to touch client + */ + isItTimeToYield = TRUE; + return (Success); + } + return (client->noClientException); + } + else + return rc; +} + +int +ProcSetFontPath(ClientPtr client) +{ + unsigned char *ptr; + unsigned long nbytes, total; + long nfonts; + int n, result; + int error; + REQUEST(xSetFontPathReq); + + REQUEST_AT_LEAST_SIZE(xSetFontPathReq); + + nbytes = (client->req_len << 2) - sizeof(xSetFontPathReq); + total = nbytes; + ptr = (unsigned char *)&stuff[1]; + nfonts = stuff->nFonts; + while (--nfonts >= 0) + { + if ((total == 0) || (total < (n = (*ptr + 1)))) + return(BadLength); + total -= n; + ptr += n; + } + if (total >= 4) + return(BadLength); + result = SetFontPath(client, stuff->nFonts, (unsigned char *)&stuff[1], + &error); + if (!result) + { + result = client->noClientException; + client->errorValue = error; + } + return (result); +} + +int +ProcGetFontPath(ClientPtr client) +{ + xGetFontPathReply reply; + int stringLens, numpaths; + unsigned char *bufferStart; + /* REQUEST (xReq); */ + + REQUEST_SIZE_MATCH(xReq); + bufferStart = GetFontPath(&numpaths, &stringLens); + + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + reply.length = (stringLens + numpaths + 3) >> 2; + reply.nPaths = numpaths; + + WriteReplyToClient(client, sizeof(xGetFontPathReply), &reply); + if (stringLens || numpaths) + (void)WriteToClient(client, stringLens + numpaths, (char *)bufferStart); + return(client->noClientException); +} + +int +ProcChangeCloseDownMode(ClientPtr client) +{ + REQUEST(xSetCloseDownModeReq); + + REQUEST_SIZE_MATCH(xSetCloseDownModeReq); + if ((stuff->mode == AllTemporary) || + (stuff->mode == RetainPermanent) || + (stuff->mode == RetainTemporary)) + { + client->closeDownMode = stuff->mode; + return (client->noClientException); + } + else + { + client->errorValue = stuff->mode; + return (BadValue); + } +} + +int ProcForceScreenSaver(ClientPtr client) +{ + REQUEST(xForceScreenSaverReq); + + REQUEST_SIZE_MATCH(xForceScreenSaverReq); + + if ((stuff->mode != ScreenSaverReset) && + (stuff->mode != ScreenSaverActive)) + { + client->errorValue = stuff->mode; + return BadValue; + } + SaveScreens(SCREEN_SAVER_FORCER, (int)stuff->mode); + return client->noClientException; +} + +int ProcNoOperation(ClientPtr client) +{ + REQUEST_AT_LEAST_SIZE(xReq); + + /* noop -- don't do anything */ + return(client->noClientException); +} + +void +InitProcVectors(void) +{ + int i; + for (i = 0; i<256; i++) + { + if(!ProcVector[i]) + { + ProcVector[i] = SwappedProcVector[i] = ProcBadRequest; + ReplySwapVector[i] = ReplyNotSwappd; + } + } + for(i = LASTEvent; i < 128; i++) + { + EventSwapVector[i] = NotImplemented; + } + +} + +/********************** + * CloseDownClient + * + * Client can either mark his resources destroy or retain. If retained and + * then killed again, the client is really destroyed. + *********************/ + +char dispatchExceptionAtReset = DE_RESET; + +void +CloseDownClient(ClientPtr client) +{ + Bool really_close_down = client->clientGone || + client->closeDownMode == DestroyAll; + + if (!client->clientGone) + { + /* ungrab server if grabbing client dies */ + if (grabState != GrabNone && grabClient == client) + { + UngrabServer(client); + } + BITCLEAR(grabWaiters, client->index); + DeleteClientFromAnySelections(client); + ReleaseActiveGrabs(client); + DeleteClientFontStuff(client); + if (!really_close_down) + { + /* This frees resources that should never be retained + * no matter what the close down mode is. Actually we + * could do this unconditionally, but it's probably + * better not to traverse all the client's resources + * twice (once here, once a few lines down in + * FreeClientResources) in the common case of + * really_close_down == TRUE. + */ + FreeClientNeverRetainResources(client); + client->clientState = ClientStateRetained; + if (ClientStateCallback) + { + NewClientInfoRec clientinfo; + + clientinfo.client = client; + clientinfo.prefix = (xConnSetupPrefix *)NULL; + clientinfo.setup = (xConnSetup *) NULL; + CallCallbacks((&ClientStateCallback), (pointer)&clientinfo); + } + } + client->clientGone = TRUE; /* so events aren't sent to client */ + if (ClientIsAsleep(client)) + ClientSignal (client); + ProcessWorkQueueZombies(); + CloseDownConnection(client); + + /* If the client made it to the Running stage, nClients has + * been incremented on its behalf, so we need to decrement it + * now. If it hasn't gotten to Running, nClients has *not* + * been incremented, so *don't* decrement it. + */ + if (client->clientState != ClientStateInitial && + client->clientState != ClientStateAuthenticating ) + { + --nClients; + } + } + + if (really_close_down) + { + if (client->clientState == ClientStateRunning && nClients == 0) + dispatchException |= dispatchExceptionAtReset; + + client->clientState = ClientStateGone; + if (ClientStateCallback) + { + NewClientInfoRec clientinfo; + + clientinfo.client = client; + clientinfo.prefix = (xConnSetupPrefix *)NULL; + clientinfo.setup = (xConnSetup *) NULL; + CallCallbacks((&ClientStateCallback), (pointer)&clientinfo); + } + FreeClientResources(client); +#ifdef XSERVER_DTRACE + XSERVER_CLIENT_DISCONNECT(client->index); +#endif + if (client->index < nextFreeClientID) + nextFreeClientID = client->index; + clients[client->index] = NullClient; +#ifdef SMART_SCHEDULE + SmartLastClient = NullClient; +#endif + xfree(client); + + while (!clients[currentMaxClients-1]) + currentMaxClients--; + } +} + +static void +KillAllClients(void) +{ + int i; + for (i=1; icloseDownMode = DestroyAll; + CloseDownClient(clients[i]); + } +} + +extern int clientPrivateLen; +extern unsigned *clientPrivateSizes; +extern unsigned totalClientSize; + +void InitClient(ClientPtr client, int i, pointer ospriv) +{ + client->index = i; + client->sequence = 0; + client->clientAsMask = ((Mask)i) << CLIENTOFFSET; + client->clientGone = FALSE; + if (i) + { + client->closeDownMode = DestroyAll; + client->lastDrawable = (DrawablePtr)WindowTable[0]; + client->lastDrawableID = WindowTable[0]->drawable.id; + } + else + { + client->closeDownMode = RetainPermanent; + client->lastDrawable = (DrawablePtr)NULL; + client->lastDrawableID = INVALID; + } + client->lastGC = (GCPtr) NULL; + client->lastGCID = INVALID; + client->numSaved = 0; + client->saveSet = (SaveSetElt *)NULL; + client->noClientException = Success; +#ifdef DEBUG + client->requestLogIndex = 0; +#endif + client->requestVector = InitialVector; + client->osPrivate = ospriv; + client->swapped = FALSE; + client->big_requests = FALSE; + client->priority = 0; + client->clientState = ClientStateInitial; +#ifdef XKB + if (!noXkbExtension) { + client->xkbClientFlags = 0; + client->mapNotifyMask = 0; + QueryMinMaxKeyCodes(&client->minKC,&client->maxKC); + } +#endif + client->replyBytesRemaining = 0; +#ifdef XAPPGROUP + client->appgroup = NULL; +#endif + client->fontResFunc = NULL; +#ifdef SMART_SCHEDULE + client->smart_priority = 0; + client->smart_start_tick = SmartScheduleTime; + client->smart_stop_tick = SmartScheduleTime; + client->smart_check_tick = SmartScheduleTime; +#endif +} + +int +InitClientPrivates(ClientPtr client) +{ + char *ptr; + DevUnion *ppriv; + unsigned *sizes; + unsigned size; + int i; + + if (totalClientSize == sizeof(ClientRec)) + ppriv = (DevUnion *)NULL; + else if (client->index) + ppriv = (DevUnion *)(client + 1); + else + { + ppriv = (DevUnion *)xalloc(totalClientSize - sizeof(ClientRec)); + if (!ppriv) + return 0; + } + client->devPrivates = ppriv; + sizes = clientPrivateSizes; + ptr = (char *)(ppriv + clientPrivateLen); + if (ppriv) + bzero(ppriv, totalClientSize - sizeof(ClientRec)); + for (i = clientPrivateLen; --i >= 0; ppriv++, sizes++) + { + if ( (size = *sizes) ) + { + ppriv->ptr = (pointer)ptr; + ptr += size; + } + else + ppriv->ptr = (pointer)NULL; + } + + /* Allow registrants to initialize the serverClient devPrivates */ + if (!client->index && ClientStateCallback) + { + NewClientInfoRec clientinfo; + + clientinfo.client = client; + clientinfo.prefix = (xConnSetupPrefix *)NULL; + clientinfo.setup = (xConnSetup *) NULL; + CallCallbacks((&ClientStateCallback), (pointer)&clientinfo); + } + return 1; +} + +/************************ + * int NextAvailableClient(ospriv) + * + * OS dependent portion can't assign client id's because of CloseDownModes. + * Returns NULL if there are no free clients. + *************************/ + +ClientPtr NextAvailableClient(pointer ospriv) +{ + int i; + ClientPtr client; + xReq data; + + i = nextFreeClientID; + if (i == MAXCLIENTS) + return (ClientPtr)NULL; + clients[i] = client = (ClientPtr)xalloc(totalClientSize); + if (!client) + return (ClientPtr)NULL; + InitClient(client, i, ospriv); + InitClientPrivates(client); + if (!InitClientResources(client)) + { + xfree(client); + return (ClientPtr)NULL; + } + data.reqType = 1; + data.length = (sz_xReq + sz_xConnClientPrefix) >> 2; + if (!InsertFakeRequest(client, (char *)&data, sz_xReq)) + { + FreeClientResources(client); + xfree(client); + return (ClientPtr)NULL; + } + if (i == currentMaxClients) + currentMaxClients++; + while ((nextFreeClientID < MAXCLIENTS) && clients[nextFreeClientID]) + nextFreeClientID++; + if (ClientStateCallback) + { + NewClientInfoRec clientinfo; + + clientinfo.client = client; + clientinfo.prefix = (xConnSetupPrefix *)NULL; + clientinfo.setup = (xConnSetup *) NULL; + CallCallbacks((&ClientStateCallback), (pointer)&clientinfo); + } + return(client); +} + +int +ProcInitialConnection(ClientPtr client) +{ + REQUEST(xReq); + xConnClientPrefix *prefix; + int whichbyte = 1; + + prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq); + if ((prefix->byteOrder != 'l') && (prefix->byteOrder != 'B')) + return (client->noClientException = -1); + if (((*(char *) &whichbyte) && (prefix->byteOrder == 'B')) || + (!(*(char *) &whichbyte) && (prefix->byteOrder == 'l'))) + { + client->swapped = TRUE; + SwapConnClientPrefix(prefix); + } + stuff->reqType = 2; + stuff->length += ((prefix->nbytesAuthProto + (unsigned)3) >> 2) + + ((prefix->nbytesAuthString + (unsigned)3) >> 2); + if (client->swapped) + { + swaps(&stuff->length, whichbyte); + } + ResetCurrentRequest(client); + return (client->noClientException); +} + +int +SendConnSetup(ClientPtr client, char *reason) +{ + xWindowRoot *root; + int i; + int numScreens; + char* lConnectionInfo; + xConnSetupPrefix* lconnSetupPrefix; + + if (reason) + { + xConnSetupPrefix csp; + + csp.success = xFalse; + csp.lengthReason = strlen(reason); + csp.length = (csp.lengthReason + (unsigned)3) >> 2; + csp.majorVersion = X_PROTOCOL; + csp.minorVersion = X_PROTOCOL_REVISION; + if (client->swapped) + WriteSConnSetupPrefix(client, &csp); + else + (void)WriteToClient(client, sz_xConnSetupPrefix, (char *) &csp); + (void)WriteToClient(client, (int)csp.lengthReason, reason); + return (client->noClientException = -1); + } + + numScreens = screenInfo.numScreens; + lConnectionInfo = ConnectionInfo; + lconnSetupPrefix = &connSetupPrefix; + + /* We're about to start speaking X protocol back to the client by + * sending the connection setup info. This means the authorization + * step is complete, and we can count the client as an + * authorized one. + */ + nClients++; + + client->requestVector = client->swapped ? SwappedProcVector : ProcVector; + client->sequence = 0; +#ifdef XAPPGROUP + XagConnectionInfo (client, &lconnSetupPrefix, &lConnectionInfo, &numScreens); +#endif + ((xConnSetup *)lConnectionInfo)->ridBase = client->clientAsMask; + ((xConnSetup *)lConnectionInfo)->ridMask = RESOURCE_ID_MASK; +#ifdef MATCH_CLIENT_ENDIAN + ((xConnSetup *)lConnectionInfo)->imageByteOrder = ClientOrder (client); + ((xConnSetup *)lConnectionInfo)->bitmapBitOrder = ClientOrder (client); +#endif + /* fill in the "currentInputMask" */ + root = (xWindowRoot *)(lConnectionInfo + connBlockScreenStart); +#ifdef PANORAMIX + if (noPanoramiXExtension) + numScreens = screenInfo.numScreens; + else + numScreens = ((xConnSetup *)ConnectionInfo)->numRoots; +#endif + + for (i=0; icurrentInputMask = WindowTable[i]->eventMask | + wOtherEventMasks (WindowTable[i]); + pDepth = (xDepth *)(root + 1); + for (j = 0; j < root->nDepths; j++) + { + pDepth = (xDepth *)(((char *)(pDepth + 1)) + + pDepth->nVisuals * sizeof(xVisualType)); + } + root = (xWindowRoot *)pDepth; + } + + if (client->swapped) + { + WriteSConnSetupPrefix(client, lconnSetupPrefix); + WriteSConnectionInfo(client, + (unsigned long)(lconnSetupPrefix->length << 2), + lConnectionInfo); + } + else + { + (void)WriteToClient(client, sizeof(xConnSetupPrefix), + (char *) lconnSetupPrefix); + (void)WriteToClient(client, (int)(lconnSetupPrefix->length << 2), + lConnectionInfo); + } + client->clientState = ClientStateRunning; + if (ClientStateCallback) + { + NewClientInfoRec clientinfo; + + clientinfo.client = client; + clientinfo.prefix = lconnSetupPrefix; + clientinfo.setup = (xConnSetup *)lConnectionInfo; + CallCallbacks((&ClientStateCallback), (pointer)&clientinfo); + } + return (client->noClientException); +} + +int +ProcEstablishConnection(ClientPtr client) +{ + char *reason, *auth_proto, *auth_string; + xConnClientPrefix *prefix; + REQUEST(xReq); + + prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq); + auth_proto = (char *)prefix + sz_xConnClientPrefix; + auth_string = auth_proto + ((prefix->nbytesAuthProto + 3) & ~3); + if ((prefix->majorVersion != X_PROTOCOL) || + (prefix->minorVersion != X_PROTOCOL_REVISION)) + reason = "Protocol version mismatch"; + else + reason = ClientAuthorized(client, + (unsigned short)prefix->nbytesAuthProto, + auth_proto, + (unsigned short)prefix->nbytesAuthString, + auth_string); + /* + * If Kerberos is being used for this client, the clientState + * will be set to ClientStateAuthenticating at this point. + * More messages need to be exchanged among the X server, Kerberos + * server, and client to figure out if everyone is authorized. + * So we don't want to send the connection setup info yet, since + * the auth step isn't really done. + */ + if (client->clientState == ClientStateCheckingSecurity) + client->clientState = ClientStateCheckedSecurity; + else if (client->clientState != ClientStateAuthenticating) + return(SendConnSetup(client, reason)); + return(client->noClientException); +} + +_X_EXPORT void +SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode, + XID resId, int errorCode) +{ + xError rep; + + rep.type = X_Error; + rep.sequenceNumber = client->sequence; + rep.errorCode = errorCode; + rep.majorCode = majorCode; + rep.minorCode = minorCode; + rep.resourceID = resId; + + WriteEventsToClient (client, 1, (xEvent *)&rep); +} + +void +DeleteWindowFromAnySelections(WindowPtr pWin) +{ + int i; + + for (i = 0; i< NumCurrentSelections; i++) + if (CurrentSelections[i].pWin == pWin) + { + if (SelectionCallback) + { + SelectionInfoRec info; + + info.selection = &CurrentSelections[i]; + info.kind = SelectionWindowDestroy; + CallCallbacks(&SelectionCallback, &info); + } + CurrentSelections[i].pWin = (WindowPtr)NULL; + CurrentSelections[i].window = None; + CurrentSelections[i].client = NullClient; + } +} + +static void +DeleteClientFromAnySelections(ClientPtr client) +{ + int i; + + for (i = 0; i< NumCurrentSelections; i++) + if (CurrentSelections[i].client == client) + { + if (SelectionCallback) + { + SelectionInfoRec info; + + info.selection = &CurrentSelections[i]; + info.kind = SelectionWindowDestroy; + CallCallbacks(&SelectionCallback, &info); + } + CurrentSelections[i].pWin = (WindowPtr)NULL; + CurrentSelections[i].window = None; + CurrentSelections[i].client = NullClient; + } +} + +void +MarkClientException(ClientPtr client) +{ + client->noClientException = -1; +} + +#ifdef XSERVER_DTRACE +#include + +/* Load table of request names for dtrace probes */ +static void LoadRequestNames(void) +{ + int i; + FILE *xedb; + extern void LoadExtensionNames(char **RequestNames); + + bzero(RequestNames, 256 * sizeof(char *)); + + xedb = fopen(XERRORDB_PATH, "r"); + if (xedb != NULL) { + char buf[256]; + while (fgets(buf, sizeof(buf), xedb)) { + if ((strncmp("XRequest.", buf, 9) == 0) && (isdigit(buf[9]))) { + char *name; + i = strtol(buf + 9, &name, 10); + if (RequestNames[i] == 0) { + char *end = strchr(name, '\n'); + if (end) { *end = '\0'; } + RequestNames[i] = strdup(name + 1); + } + } + } + fclose(xedb); + } + + LoadExtensionNames(RequestNames); + + for (i = 0; i < 256; i++) { + if (RequestNames[i] == 0) { +#define RN_SIZE 12 /* "Request#' + up to 3 digits + \0 */ + RequestNames[i] = xalloc(RN_SIZE); + if (RequestNames[i]) { + snprintf(RequestNames[i], RN_SIZE, "Request#%d", i); + } + } + /* fprintf(stderr, "%d: %s\n", i, RequestNames[i]); */ + } +} + +static void FreeRequestNames(void) +{ + int i; + + for (i = 0; i < 256; i++) { + if (RequestNames[i] != 0) { + free(RequestNames[i]); + RequestNames[i] = 0; + } + } +} + +#endif diff --git a/xorg-server-1.4/dix/dispatch.h b/xorg-server-1.4/dix/dispatch.h new file mode 100644 index 0000000..dd07096 --- /dev/null +++ b/xorg-server-1.4/dix/dispatch.h @@ -0,0 +1,146 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 prototypes the dispatch.c module (except for functions declared in + * global headers), plus related dispatch procedures from devices.c, events.c, + * extension.c, property.c. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef DISPATCH_H +#define DISPATCH_H 1 + +DISPATCH_PROC(InitClientPrivates); +DISPATCH_PROC(ProcAllocColor); +DISPATCH_PROC(ProcAllocColorCells); +DISPATCH_PROC(ProcAllocColorPlanes); +DISPATCH_PROC(ProcAllocNamedColor); +DISPATCH_PROC(ProcBell); +DISPATCH_PROC(ProcChangeAccessControl); +DISPATCH_PROC(ProcChangeCloseDownMode); +DISPATCH_PROC(ProcChangeGC); +DISPATCH_PROC(ProcChangeHosts); +DISPATCH_PROC(ProcChangeKeyboardControl); +DISPATCH_PROC(ProcChangeKeyboardMapping); +DISPATCH_PROC(ProcChangePointerControl); +DISPATCH_PROC(ProcChangeProperty); +DISPATCH_PROC(ProcChangeSaveSet); +DISPATCH_PROC(ProcChangeWindowAttributes); +DISPATCH_PROC(ProcCirculateWindow); +DISPATCH_PROC(ProcClearToBackground); +DISPATCH_PROC(ProcCloseFont); +DISPATCH_PROC(ProcConfigureWindow); +DISPATCH_PROC(ProcConvertSelection); +DISPATCH_PROC(ProcCopyArea); +DISPATCH_PROC(ProcCopyColormapAndFree); +DISPATCH_PROC(ProcCopyGC); +DISPATCH_PROC(ProcCopyPlane); +DISPATCH_PROC(ProcCreateColormap); +DISPATCH_PROC(ProcCreateCursor); +DISPATCH_PROC(ProcCreateGC); +DISPATCH_PROC(ProcCreateGlyphCursor); +DISPATCH_PROC(ProcCreatePixmap); +DISPATCH_PROC(ProcCreateWindow); +DISPATCH_PROC(ProcDeleteProperty); +DISPATCH_PROC(ProcDestroySubwindows); +DISPATCH_PROC(ProcDestroyWindow); +DISPATCH_PROC(ProcEstablishConnection); +DISPATCH_PROC(ProcFillPoly); +DISPATCH_PROC(ProcForceScreenSaver); +DISPATCH_PROC(ProcFreeColormap); +DISPATCH_PROC(ProcFreeColors); +DISPATCH_PROC(ProcFreeCursor); +DISPATCH_PROC(ProcFreeGC); +DISPATCH_PROC(ProcFreePixmap); +DISPATCH_PROC(ProcGetAtomName); +DISPATCH_PROC(ProcGetFontPath); +DISPATCH_PROC(ProcGetGeometry); +DISPATCH_PROC(ProcGetImage); +DISPATCH_PROC(ProcGetKeyboardControl); +DISPATCH_PROC(ProcGetKeyboardMapping); +DISPATCH_PROC(ProcGetModifierMapping); +DISPATCH_PROC(ProcGetMotionEvents); +DISPATCH_PROC(ProcGetPointerControl); +DISPATCH_PROC(ProcGetPointerMapping); +DISPATCH_PROC(ProcGetProperty); +DISPATCH_PROC(ProcGetScreenSaver); +DISPATCH_PROC(ProcGetSelectionOwner); +DISPATCH_PROC(ProcGetWindowAttributes); +DISPATCH_PROC(ProcGrabServer); +DISPATCH_PROC(ProcImageText16); +DISPATCH_PROC(ProcImageText8); +DISPATCH_PROC(ProcInitialConnection); +DISPATCH_PROC(ProcInstallColormap); +DISPATCH_PROC(ProcInternAtom); +DISPATCH_PROC(ProcKillClient); +DISPATCH_PROC(ProcListExtensions); +DISPATCH_PROC(ProcListFonts); +DISPATCH_PROC(ProcListFontsWithInfo); +DISPATCH_PROC(ProcListHosts); +DISPATCH_PROC(ProcListInstalledColormaps); +DISPATCH_PROC(ProcListProperties); +DISPATCH_PROC(ProcLookupColor); +DISPATCH_PROC(ProcMapSubwindows); +DISPATCH_PROC(ProcMapWindow); +DISPATCH_PROC(ProcNoOperation); +DISPATCH_PROC(ProcOpenFont); +DISPATCH_PROC(ProcPolyArc); +DISPATCH_PROC(ProcPolyFillArc); +DISPATCH_PROC(ProcPolyFillRectangle); +DISPATCH_PROC(ProcPolyLine); +DISPATCH_PROC(ProcPolyPoint); +DISPATCH_PROC(ProcPolyRectangle); +DISPATCH_PROC(ProcPolySegment); +DISPATCH_PROC(ProcPolyText); +DISPATCH_PROC(ProcPutImage); +DISPATCH_PROC(ProcQueryBestSize); +DISPATCH_PROC(ProcQueryColors); +DISPATCH_PROC(ProcQueryExtension); +DISPATCH_PROC(ProcQueryFont); +DISPATCH_PROC(ProcQueryKeymap); +DISPATCH_PROC(ProcQueryTextExtents); +DISPATCH_PROC(ProcQueryTree); +DISPATCH_PROC(ProcReparentWindow); +DISPATCH_PROC(ProcRotateProperties); +DISPATCH_PROC(ProcSetClipRectangles); +DISPATCH_PROC(ProcSetDashes); +DISPATCH_PROC(ProcSetFontPath); +DISPATCH_PROC(ProcSetModifierMapping); +DISPATCH_PROC(ProcSetPointerMapping); +DISPATCH_PROC(ProcSetScreenSaver); +DISPATCH_PROC(ProcSetSelectionOwner); +DISPATCH_PROC(ProcStoreColors); +DISPATCH_PROC(ProcStoreNamedColor); +DISPATCH_PROC(ProcTranslateCoords); +DISPATCH_PROC(ProcUngrabServer); +DISPATCH_PROC(ProcUninstallColormap); +DISPATCH_PROC(ProcUnmapSubwindows); +DISPATCH_PROC(ProcUnmapWindow); + +#endif /* DISPATCH_H */ diff --git a/xorg-server-1.4/dix/dix.c b/xorg-server-1.4/dix/dix.c new file mode 100644 index 0000000..e69de29 diff --git a/xorg-server-1.4/dix/dixfonts.c b/xorg-server-1.4/dix/dixfonts.c new file mode 100644 index 0000000..c21b3ec --- /dev/null +++ b/xorg-server-1.4/dix/dixfonts.c @@ -0,0 +1,2079 @@ +/************************************************************************ +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. + +************************************************************************/ +/* The panoramix components contained the following notice */ +/* +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. + +******************************************************************/ + +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include "scrnintstr.h" +#include "resource.h" +#include "dixstruct.h" +#include "cursorstr.h" +#include "misc.h" +#include "opaque.h" +#include "dixfontstr.h" +#include "closestr.h" +#include "dixfont.h" + +#ifdef DEBUG +#include +#endif + +#ifdef PANORAMIX +#include "panoramiX.h" +#endif + +#ifdef XF86BIGFONT +#define _XF86BIGFONT_SERVER_ +#include +#endif + +#define QUERYCHARINFO(pci, pr) *(pr) = (pci)->metrics + +extern pointer fosNaturalParams; +extern FontPtr defaultFont; + +static FontPathElementPtr *font_path_elements = (FontPathElementPtr *) 0; +static int num_fpes = 0; +_X_EXPORT FPEFunctions *fpe_functions = (FPEFunctions *) 0; +static int num_fpe_types = 0; + +static unsigned char *font_path_string; + +static int num_slept_fpes = 0; +static int size_slept_fpes = 0; +static FontPathElementPtr *slept_fpes = (FontPathElementPtr *) 0; +static FontPatternCachePtr patternCache; + +_X_EXPORT int +FontToXError(err) + int err; +{ + switch (err) { + case Successful: + return Success; + case AllocError: + return BadAlloc; + case BadFontName: + return BadName; + case BadFontPath: + case BadFontFormat: /* is there something better? */ + case BadCharRange: + return BadValue; + default: + return err; + } +} + + +/* + * adding RT_FONT prevents conflict with default cursor font + */ +Bool +SetDefaultFont(char *defaultfontname) +{ + int err; + FontPtr pf; + XID fid; + + fid = FakeClientID(0); + err = OpenFont(serverClient, fid, FontLoadAll | FontOpenSync, + (unsigned) strlen(defaultfontname), defaultfontname); + if (err != Success) + return FALSE; + pf = (FontPtr) LookupIDByType(fid, RT_FONT); + if (pf == (FontPtr) NULL) + return FALSE; + defaultFont = pf; + return TRUE; +} + +/* + * note that the font wakeup queue is not refcounted. this is because + * an fpe needs to be added when it's inited, and removed when it's finally + * freed, in order to handle any data that isn't requested, like FS events. + * + * since the only thing that should call these routines is the renderer's + * init_fpe() and free_fpe(), there shouldn't be any problem in using + * freed data. + */ +void +QueueFontWakeup(FontPathElementPtr fpe) +{ + int i; + FontPathElementPtr *new; + + for (i = 0; i < num_slept_fpes; i++) { + if (slept_fpes[i] == fpe) { + return; + } + } + if (num_slept_fpes == size_slept_fpes) { + new = (FontPathElementPtr *) + xrealloc(slept_fpes, + sizeof(FontPathElementPtr) * (size_slept_fpes + 4)); + if (!new) + return; + slept_fpes = new; + size_slept_fpes += 4; + } + slept_fpes[num_slept_fpes] = fpe; + num_slept_fpes++; +} + +void +RemoveFontWakeup(FontPathElementPtr fpe) +{ + int i, + j; + + for (i = 0; i < num_slept_fpes; i++) { + if (slept_fpes[i] == fpe) { + for (j = i; j < num_slept_fpes; j++) { + slept_fpes[j] = slept_fpes[j + 1]; + } + num_slept_fpes--; + return; + } + } +} + +void +FontWakeup(pointer data, int count, pointer LastSelectMask) +{ + int i; + FontPathElementPtr fpe; + + if (count < 0) + return; + /* wake up any fpe's that may be waiting for information */ + for (i = 0; i < num_slept_fpes; i++) { + fpe = slept_fpes[i]; + (void) (*fpe_functions[fpe->type].wakeup_fpe) (fpe, LastSelectMask); + } +} + +/* XXX -- these two funcs may want to be broken into macros */ +static void +UseFPE(FontPathElementPtr fpe) +{ + fpe->refcount++; +} + +static void +FreeFPE (FontPathElementPtr fpe) +{ + fpe->refcount--; + if (fpe->refcount == 0) { + (*fpe_functions[fpe->type].free_fpe) (fpe); + xfree(fpe->name); + xfree(fpe); + } +} + +static Bool +doOpenFont(ClientPtr client, OFclosurePtr c) +{ + FontPtr pfont = NullFont; + FontPathElementPtr fpe = NULL; + ScreenPtr pScr; + int err = Successful; + int i; + char *alias, + *newname; + int newlen; + int aliascount = 20; + /* + * Decide at runtime what FontFormat to use. + */ + Mask FontFormat = + + ((screenInfo.imageByteOrder == LSBFirst) ? + BitmapFormatByteOrderLSB : BitmapFormatByteOrderMSB) | + + ((screenInfo.bitmapBitOrder == LSBFirst) ? + BitmapFormatBitOrderLSB : BitmapFormatBitOrderMSB) | + + BitmapFormatImageRectMin | + +#if GLYPHPADBYTES == 1 + BitmapFormatScanlinePad8 | +#endif + +#if GLYPHPADBYTES == 2 + BitmapFormatScanlinePad16 | +#endif + +#if GLYPHPADBYTES == 4 + BitmapFormatScanlinePad32 | +#endif + +#if GLYPHPADBYTES == 8 + BitmapFormatScanlinePad64 | +#endif + + BitmapFormatScanlineUnit8; + + if (client->clientGone) + { + if (c->current_fpe < c->num_fpes) + { + fpe = c->fpe_list[c->current_fpe]; + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + } + err = Successful; + goto bail; + } + while (c->current_fpe < c->num_fpes) { + fpe = c->fpe_list[c->current_fpe]; + err = (*fpe_functions[fpe->type].open_font) + ((pointer) client, fpe, c->flags, + c->fontname, c->fnamelen, FontFormat, + BitmapFormatMaskByte | + BitmapFormatMaskBit | + BitmapFormatMaskImageRectangle | + BitmapFormatMaskScanLinePad | + BitmapFormatMaskScanLineUnit, + c->fontid, &pfont, &alias, + c->non_cachable_font && c->non_cachable_font->fpe == fpe ? + c->non_cachable_font : + (FontPtr)0); + + if (err == FontNameAlias && alias) { + newlen = strlen(alias); + newname = (char *) xrealloc(c->fontname, newlen); + if (!newname) { + err = AllocError; + break; + } + memmove(newname, alias, newlen); + c->fontname = newname; + c->fnamelen = newlen; + c->current_fpe = 0; + if (--aliascount <= 0) + break; + continue; + } + if (err == BadFontName) { + c->current_fpe++; + continue; + } + if (err == Suspended) { + if (!c->slept) { + c->slept = TRUE; + ClientSleep(client, (ClientSleepProcPtr)doOpenFont, (pointer) c); + } + return TRUE; + } + break; + } + + if (err != Successful) + goto bail; + if (!pfont) { + err = BadFontName; + goto bail; + } + if (!pfont->fpe) + pfont->fpe = fpe; + pfont->refcnt++; + if (pfont->refcnt == 1) { + UseFPE(pfont->fpe); + for (i = 0; i < screenInfo.numScreens; i++) { + pScr = screenInfo.screens[i]; + if (pScr->RealizeFont) + { + if (!(*pScr->RealizeFont) (pScr, pfont)) + { + CloseFont (pfont, (Font) 0); + err = AllocError; + goto bail; + } + } + } + } + if (!AddResource(c->fontid, RT_FONT, (pointer) pfont)) { + err = AllocError; + goto bail; + } + if (patternCache && pfont != c->non_cachable_font) + CacheFontPattern(patternCache, c->origFontName, c->origFontNameLen, + pfont); +bail: + if (err != Successful && c->client != serverClient) { + SendErrorToClient(c->client, X_OpenFont, 0, + c->fontid, FontToXError(err)); + } + if (c->slept) + ClientWakeup(c->client); + for (i = 0; i < c->num_fpes; i++) { + FreeFPE(c->fpe_list[i]); + } + xfree(c->fpe_list); + xfree(c->fontname); + xfree(c); + return TRUE; +} + +int +OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontname) +{ + OFclosurePtr c; + int i; + FontPtr cached = (FontPtr)0; + +#ifdef FONTDEBUG + char *f; + f = (char *)xalloc(lenfname + 1); + memmove(f, pfontname, lenfname); + f[lenfname] = '\0'; + ErrorF("OpenFont: fontname is \"%s\"\n", f); + xfree(f); +#endif + if (!lenfname || lenfname > XLFDMAXFONTNAMELEN) + return BadName; + if (patternCache) + { + + /* + ** Check name cache. If we find a cached version of this font that + ** is cachable, immediately satisfy the request with it. If we find + ** a cached version of this font that is non-cachable, we do not + ** satisfy the request with it. Instead, we pass the FontPtr to the + ** FPE's open_font code (the fontfile FPE in turn passes the + ** information to the rasterizer; the fserve FPE ignores it). + ** + ** Presumably, the font is marked non-cachable because the FPE has + ** put some licensing restrictions on it. If the FPE, using + ** whatever logic it relies on, determines that it is willing to + ** share this existing font with the client, then it has the option + ** to return the FontPtr we passed it as the newly-opened font. + ** This allows the FPE to exercise its licensing logic without + ** having to create another instance of a font that already exists. + */ + + cached = FindCachedFontPattern(patternCache, pfontname, lenfname); + if (cached && cached->info.cachable) + { + if (!AddResource(fid, RT_FONT, (pointer) cached)) + return BadAlloc; + cached->refcnt++; + return Success; + } + } + c = (OFclosurePtr) xalloc(sizeof(OFclosureRec)); + if (!c) + return BadAlloc; + c->fontname = (char *) xalloc(lenfname); + c->origFontName = pfontname; + c->origFontNameLen = lenfname; + if (!c->fontname) { + xfree(c); + return BadAlloc; + } + /* + * copy the current FPE list, so that if it gets changed by another client + * while we're blocking, the request still appears atomic + */ + c->fpe_list = (FontPathElementPtr *) + xalloc(sizeof(FontPathElementPtr) * num_fpes); + if (!c->fpe_list) { + xfree(c->fontname); + xfree(c); + return BadAlloc; + } + memmove(c->fontname, pfontname, lenfname); + for (i = 0; i < num_fpes; i++) { + c->fpe_list[i] = font_path_elements[i]; + UseFPE(c->fpe_list[i]); + } + c->client = client; + c->fontid = fid; + c->current_fpe = 0; + c->num_fpes = num_fpes; + c->fnamelen = lenfname; + c->slept = FALSE; + c->flags = flags; + c->non_cachable_font = cached; + + (void) doOpenFont(client, c); + return Success; +} + +/** + * Decrement font's ref count, and free storage if ref count equals zero + * + * \param value must conform to DeleteType + */ +_X_EXPORT int +CloseFont(pointer value, XID fid) +{ + int nscr; + ScreenPtr pscr; + FontPathElementPtr fpe; + FontPtr pfont = (FontPtr)value; + + if (pfont == NullFont) + return (Success); + if (--pfont->refcnt == 0) { + if (patternCache) + RemoveCachedFontPattern (patternCache, pfont); + /* + * since the last reference is gone, ask each screen to free any + * storage it may have allocated locally for it. + */ + for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { + pscr = screenInfo.screens[nscr]; + if (pscr->UnrealizeFont) + (*pscr->UnrealizeFont) (pscr, pfont); + } + if (pfont == defaultFont) + defaultFont = NULL; +#ifdef XF86BIGFONT + XF86BigfontFreeFontShm(pfont); +#endif + fpe = pfont->fpe; + (*fpe_functions[fpe->type].close_font) (fpe, pfont); + FreeFPE(fpe); + } + return (Success); +} + + +/***====================================================================***/ + +/** + * Sets up pReply as the correct QueryFontReply for pFont with the first + * nProtoCCIStructs char infos. + * + * \param pReply caller must allocate this storage + */ +void +QueryFont(FontPtr pFont, xQueryFontReply *pReply, int nProtoCCIStructs) +{ + FontPropPtr pFP; + int r, + c, + i; + xFontProp *prFP; + xCharInfo *prCI; + xCharInfo *charInfos[256]; + unsigned char chars[512]; + int ninfos; + unsigned long ncols; + unsigned long count; + + /* pr->length set in dispatch */ + pReply->minCharOrByte2 = pFont->info.firstCol; + pReply->defaultChar = pFont->info.defaultCh; + pReply->maxCharOrByte2 = pFont->info.lastCol; + pReply->drawDirection = pFont->info.drawDirection; + pReply->allCharsExist = pFont->info.allExist; + pReply->minByte1 = pFont->info.firstRow; + pReply->maxByte1 = pFont->info.lastRow; + pReply->fontAscent = pFont->info.fontAscent; + pReply->fontDescent = pFont->info.fontDescent; + + pReply->minBounds = pFont->info.ink_minbounds; + pReply->maxBounds = pFont->info.ink_maxbounds; + + pReply->nFontProps = pFont->info.nprops; + pReply->nCharInfos = nProtoCCIStructs; + + for (i = 0, pFP = pFont->info.props, prFP = (xFontProp *) (&pReply[1]); + i < pFont->info.nprops; + i++, pFP++, prFP++) { + prFP->name = pFP->name; + prFP->value = pFP->value; + } + + ninfos = 0; + ncols = (unsigned long) (pFont->info.lastCol - pFont->info.firstCol + 1); + prCI = (xCharInfo *) (prFP); + for (r = pFont->info.firstRow; + ninfos < nProtoCCIStructs && r <= (int)pFont->info.lastRow; + r++) { + i = 0; + for (c = pFont->info.firstCol; c <= (int)pFont->info.lastCol; c++) { + chars[i++] = r; + chars[i++] = c; + } + (*pFont->get_metrics) (pFont, ncols, chars, + TwoD16Bit, &count, charInfos); + i = 0; + for (i = 0; i < (int) count && ninfos < nProtoCCIStructs; i++) { + *prCI = *charInfos[i]; + prCI++; + ninfos++; + } + } + return; +} + +static Bool +doListFontsAndAliases(ClientPtr client, LFclosurePtr c) +{ + FontPathElementPtr fpe; + int err = Successful; + FontNamesPtr names = NULL; + char *name, *resolved=NULL; + int namelen, resolvedlen; + int nnames; + int stringLens; + int i; + xListFontsReply reply; + char *bufptr; + char *bufferStart; + int aliascount = 0; + + if (client->clientGone) + { + if (c->current.current_fpe < c->num_fpes) + { + fpe = c->fpe_list[c->current.current_fpe]; + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + } + err = Successful; + goto bail; + } + + if (!c->current.patlen) + goto finish; + + while (c->current.current_fpe < c->num_fpes) { + fpe = c->fpe_list[c->current.current_fpe]; + err = Successful; + + if (!fpe_functions[fpe->type].start_list_fonts_and_aliases) + { + /* This FPE doesn't support/require list_fonts_and_aliases */ + + err = (*fpe_functions[fpe->type].list_fonts) + ((pointer) c->client, fpe, c->current.pattern, + c->current.patlen, c->current.max_names - c->names->nnames, + c->names); + + if (err == Suspended) { + if (!c->slept) { + c->slept = TRUE; + ClientSleep(client, + (ClientSleepProcPtr)doListFontsAndAliases, + (pointer) c); + } + return TRUE; + } + + err = BadFontName; + } + else + { + /* Start of list_fonts_and_aliases functionality. Modeled + after list_fonts_with_info in that it resolves aliases, + except that the information collected from FPEs is just + names, not font info. Each list_next_font_or_alias() + returns either a name into name/namelen or an alias into + name/namelen and its target name into resolved/resolvedlen. + The code at this level then resolves the alias by polling + the FPEs. */ + + if (!c->current.list_started) { + err = (*fpe_functions[fpe->type].start_list_fonts_and_aliases) + ((pointer) c->client, fpe, c->current.pattern, + c->current.patlen, c->current.max_names - c->names->nnames, + &c->current.private); + if (err == Suspended) { + if (!c->slept) { + ClientSleep(client, + (ClientSleepProcPtr)doListFontsAndAliases, + (pointer) c); + c->slept = TRUE; + } + return TRUE; + } + if (err == Successful) + c->current.list_started = TRUE; + } + if (err == Successful) { + char *tmpname; + name = 0; + err = (*fpe_functions[fpe->type].list_next_font_or_alias) + ((pointer) c->client, fpe, &name, &namelen, &tmpname, + &resolvedlen, c->current.private); + if (err == Suspended) { + if (!c->slept) { + ClientSleep(client, + (ClientSleepProcPtr)doListFontsAndAliases, + (pointer) c); + c->slept = TRUE; + } + return TRUE; + } + if (err == FontNameAlias) { + if (resolved) xfree(resolved); + resolved = (char *) xalloc(resolvedlen + 1); + if (resolved) + memmove(resolved, tmpname, resolvedlen + 1); + } + } + + if (err == Successful) + { + if (c->haveSaved) + { + if (c->savedName) + (void)AddFontNamesName(c->names, c->savedName, + c->savedNameLen); + } + else + (void)AddFontNamesName(c->names, name, namelen); + } + + /* + * When we get an alias back, save our state and reset back to + * the start of the FPE looking for the specified name. As + * soon as a real font is found for the alias, pop back to the + * old state + */ + else if (err == FontNameAlias) { + char tmp_pattern[XLFDMAXFONTNAMELEN]; + /* + * when an alias recurses, we need to give + * the last FPE a chance to clean up; so we call + * it again, and assume that the error returned + * is BadFontName, indicating the alias resolution + * is complete. + */ + memmove(tmp_pattern, resolved, resolvedlen); + if (c->haveSaved) + { + char *tmpname; + int tmpnamelen; + + tmpname = 0; + (void) (*fpe_functions[fpe->type].list_next_font_or_alias) + ((pointer) c->client, fpe, &tmpname, &tmpnamelen, + &tmpname, &tmpnamelen, c->current.private); + if (--aliascount <= 0) + { + err = BadFontName; + goto ContBadFontName; + } + } + else + { + c->saved = c->current; + c->haveSaved = TRUE; + if (c->savedName) + xfree(c->savedName); + c->savedName = (char *)xalloc(namelen + 1); + if (c->savedName) + memmove(c->savedName, name, namelen + 1); + c->savedNameLen = namelen; + aliascount = 20; + } + memmove(c->current.pattern, tmp_pattern, resolvedlen); + c->current.patlen = resolvedlen; + c->current.max_names = c->names->nnames + 1; + c->current.current_fpe = -1; + c->current.private = 0; + err = BadFontName; + } + } + /* + * At the end of this FPE, step to the next. If we've finished + * processing an alias, pop state back. If we've collected enough + * font names, quit. + */ + if (err == BadFontName) { + ContBadFontName: ; + c->current.list_started = FALSE; + c->current.current_fpe++; + err = Successful; + if (c->haveSaved) + { + if (c->names->nnames == c->current.max_names || + c->current.current_fpe == c->num_fpes) { + c->haveSaved = FALSE; + c->current = c->saved; + /* Give the saved namelist a chance to clean itself up */ + continue; + } + } + if (c->names->nnames == c->current.max_names) + break; + } + } + + /* + * send the reply + */ + if (err != Successful) { + SendErrorToClient(client, X_ListFonts, 0, 0, FontToXError(err)); + goto bail; + } + +finish: + + names = c->names; + nnames = names->nnames; + client = c->client; + stringLens = 0; + for (i = 0; i < nnames; i++) + stringLens += (names->length[i] <= 255) ? names->length[i] : 0; + + reply.type = X_Reply; + reply.length = (stringLens + nnames + 3) >> 2; + reply.nFonts = nnames; + reply.sequenceNumber = client->sequence; + + bufptr = bufferStart = (char *) ALLOCATE_LOCAL(reply.length << 2); + + if (!bufptr && reply.length) { + SendErrorToClient(client, X_ListFonts, 0, 0, BadAlloc); + goto bail; + } + /* + * since WriteToClient long word aligns things, copy to temp buffer and + * write all at once + */ + for (i = 0; i < nnames; i++) { + if (names->length[i] > 255) + reply.nFonts--; + else + { + *bufptr++ = names->length[i]; + memmove( bufptr, names->names[i], names->length[i]); + bufptr += names->length[i]; + } + } + nnames = reply.nFonts; + reply.length = (stringLens + nnames + 3) >> 2; + client->pSwapReplyFunc = ReplySwapVector[X_ListFonts]; + WriteSwappedDataToClient(client, sizeof(xListFontsReply), &reply); + (void) WriteToClient(client, stringLens + nnames, bufferStart); + DEALLOCATE_LOCAL(bufferStart); + +bail: + if (c->slept) + ClientWakeup(client); + for (i = 0; i < c->num_fpes; i++) + FreeFPE(c->fpe_list[i]); + xfree(c->fpe_list); + if (c->savedName) xfree(c->savedName); + FreeFontNames(names); + xfree(c); + if (resolved) xfree(resolved); + return TRUE; +} + +int +ListFonts(ClientPtr client, unsigned char *pattern, unsigned length, + unsigned max_names) +{ + int i; + LFclosurePtr c; + + /* + * The right error to return here would be BadName, however the + * specification does not allow for a Name error on this request. + * Perhaps a better solution would be to return a nil list, i.e. + * a list containing zero fontnames. + */ + if (length > XLFDMAXFONTNAMELEN) + return BadAlloc; + + if (!(c = (LFclosurePtr) xalloc(sizeof *c))) + return BadAlloc; + c->fpe_list = (FontPathElementPtr *) + xalloc(sizeof(FontPathElementPtr) * num_fpes); + if (!c->fpe_list) { + xfree(c); + return BadAlloc; + } + c->names = MakeFontNamesRecord(max_names < 100 ? max_names : 100); + if (!c->names) + { + xfree(c->fpe_list); + xfree(c); + return BadAlloc; + } + memmove( c->current.pattern, pattern, length); + for (i = 0; i < num_fpes; i++) { + c->fpe_list[i] = font_path_elements[i]; + UseFPE(c->fpe_list[i]); + } + c->client = client; + c->num_fpes = num_fpes; + c->current.patlen = length; + c->current.current_fpe = 0; + c->current.max_names = max_names; + c->current.list_started = FALSE; + c->current.private = 0; + c->haveSaved = FALSE; + c->slept = FALSE; + c->savedName = 0; + doListFontsAndAliases(client, c); + return Success; +} + +int +doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) +{ + FontPathElementPtr fpe; + int err = Successful; + char *name; + int namelen; + int numFonts; + FontInfoRec fontInfo, + *pFontInfo; + xListFontsWithInfoReply *reply; + int length; + xFontProp *pFP; + int i; + int aliascount = 0; + xListFontsWithInfoReply finalReply; + + if (client->clientGone) + { + if (c->current.current_fpe < c->num_fpes) + { + fpe = c->fpe_list[c->current.current_fpe]; + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + } + err = Successful; + goto bail; + } + client->pSwapReplyFunc = ReplySwapVector[X_ListFontsWithInfo]; + if (!c->current.patlen) + goto finish; + while (c->current.current_fpe < c->num_fpes) + { + fpe = c->fpe_list[c->current.current_fpe]; + err = Successful; + if (!c->current.list_started) + { + err = (*fpe_functions[fpe->type].start_list_fonts_with_info) + (client, fpe, c->current.pattern, c->current.patlen, + c->current.max_names, &c->current.private); + if (err == Suspended) + { + if (!c->slept) + { + ClientSleep(client, (ClientSleepProcPtr)doListFontsWithInfo, c); + c->slept = TRUE; + } + return TRUE; + } + if (err == Successful) + c->current.list_started = TRUE; + } + if (err == Successful) + { + name = 0; + pFontInfo = &fontInfo; + err = (*fpe_functions[fpe->type].list_next_font_with_info) + (client, fpe, &name, &namelen, &pFontInfo, + &numFonts, c->current.private); + if (err == Suspended) + { + if (!c->slept) + { + ClientSleep(client, + (ClientSleepProcPtr)doListFontsWithInfo, + c); + c->slept = TRUE; + } + return TRUE; + } + } + /* + * When we get an alias back, save our state and reset back to the + * start of the FPE looking for the specified name. As soon as a real + * font is found for the alias, pop back to the old state + */ + if (err == FontNameAlias) + { + /* + * when an alias recurses, we need to give + * the last FPE a chance to clean up; so we call + * it again, and assume that the error returned + * is BadFontName, indicating the alias resolution + * is complete. + */ + if (c->haveSaved) + { + char *tmpname; + int tmpnamelen; + FontInfoPtr tmpFontInfo; + + tmpname = 0; + tmpFontInfo = &fontInfo; + (void) (*fpe_functions[fpe->type].list_next_font_with_info) + (client, fpe, &tmpname, &tmpnamelen, &tmpFontInfo, + &numFonts, c->current.private); + if (--aliascount <= 0) + { + err = BadFontName; + goto ContBadFontName; + } + } + else + { + c->saved = c->current; + c->haveSaved = TRUE; + c->savedNumFonts = numFonts; + if (c->savedName) + xfree(c->savedName); + c->savedName = (char *)xalloc(namelen + 1); + if (c->savedName) + memmove(c->savedName, name, namelen + 1); + aliascount = 20; + } + memmove(c->current.pattern, name, namelen); + c->current.patlen = namelen; + c->current.max_names = 1; + c->current.current_fpe = 0; + c->current.private = 0; + c->current.list_started = FALSE; + } + /* + * At the end of this FPE, step to the next. If we've finished + * processing an alias, pop state back. If we've sent enough font + * names, quit. Always wait for BadFontName to let the FPE + * have a chance to clean up. + */ + else if (err == BadFontName) + { + ContBadFontName: ; + c->current.list_started = FALSE; + c->current.current_fpe++; + err = Successful; + if (c->haveSaved) + { + if (c->current.max_names == 0 || + c->current.current_fpe == c->num_fpes) + { + c->haveSaved = FALSE; + c->saved.max_names -= (1 - c->current.max_names); + c->current = c->saved; + } + } + else if (c->current.max_names == 0) + break; + } + else if (err == Successful) + { + length = sizeof(*reply) + pFontInfo->nprops * sizeof(xFontProp); + reply = c->reply; + if (c->length < length) + { + reply = (xListFontsWithInfoReply *) xrealloc(c->reply, length); + if (!reply) + { + err = AllocError; + break; + } + c->reply = reply; + c->length = length; + } + if (c->haveSaved) + { + numFonts = c->savedNumFonts; + name = c->savedName; + namelen = strlen(name); + } + reply->type = X_Reply; + reply->length = (sizeof *reply - sizeof(xGenericReply) + + pFontInfo->nprops * sizeof(xFontProp) + + namelen + 3) >> 2; + reply->sequenceNumber = client->sequence; + reply->nameLength = namelen; + reply->minBounds = pFontInfo->ink_minbounds; + reply->maxBounds = pFontInfo->ink_maxbounds; + reply->minCharOrByte2 = pFontInfo->firstCol; + reply->maxCharOrByte2 = pFontInfo->lastCol; + reply->defaultChar = pFontInfo->defaultCh; + reply->nFontProps = pFontInfo->nprops; + reply->drawDirection = pFontInfo->drawDirection; + reply->minByte1 = pFontInfo->firstRow; + reply->maxByte1 = pFontInfo->lastRow; + reply->allCharsExist = pFontInfo->allExist; + reply->fontAscent = pFontInfo->fontAscent; + reply->fontDescent = pFontInfo->fontDescent; + reply->nReplies = numFonts; + pFP = (xFontProp *) (reply + 1); + for (i = 0; i < pFontInfo->nprops; i++) + { + pFP->name = pFontInfo->props[i].name; + pFP->value = pFontInfo->props[i].value; + pFP++; + } + WriteSwappedDataToClient(client, length, reply); + (void) WriteToClient(client, namelen, name); + if (pFontInfo == &fontInfo) + { + xfree(fontInfo.props); + xfree(fontInfo.isStringProp); + } + --c->current.max_names; + } + } +finish: + length = sizeof(xListFontsWithInfoReply); + bzero((char *) &finalReply, sizeof(xListFontsWithInfoReply)); + finalReply.type = X_Reply; + finalReply.sequenceNumber = client->sequence; + finalReply.length = (sizeof(xListFontsWithInfoReply) + - sizeof(xGenericReply)) >> 2; + WriteSwappedDataToClient(client, length, &finalReply); +bail: + if (c->slept) + ClientWakeup(client); + for (i = 0; i < c->num_fpes; i++) + FreeFPE(c->fpe_list[i]); + xfree(c->reply); + xfree(c->fpe_list); + if (c->savedName) xfree(c->savedName); + xfree(c); + return TRUE; +} + +int +StartListFontsWithInfo(ClientPtr client, int length, unsigned char *pattern, + int max_names) +{ + int i; + LFWIclosurePtr c; + + /* + * The right error to return here would be BadName, however the + * specification does not allow for a Name error on this request. + * Perhaps a better solution would be to return a nil list, i.e. + * a list containing zero fontnames. + */ + if (length > XLFDMAXFONTNAMELEN) + return BadAlloc; + + if (!(c = (LFWIclosurePtr) xalloc(sizeof *c))) + goto badAlloc; + c->fpe_list = (FontPathElementPtr *) + xalloc(sizeof(FontPathElementPtr) * num_fpes); + if (!c->fpe_list) + { + xfree(c); + goto badAlloc; + } + memmove(c->current.pattern, pattern, length); + for (i = 0; i < num_fpes; i++) + { + c->fpe_list[i] = font_path_elements[i]; + UseFPE(c->fpe_list[i]); + } + c->client = client; + c->num_fpes = num_fpes; + c->reply = 0; + c->length = 0; + c->current.patlen = length; + c->current.current_fpe = 0; + c->current.max_names = max_names; + c->current.list_started = FALSE; + c->current.private = 0; + c->savedNumFonts = 0; + c->haveSaved = FALSE; + c->slept = FALSE; + c->savedName = 0; + doListFontsWithInfo(client, c); + return Success; +badAlloc: + return BadAlloc; +} + +#define TextEltHeader 2 +#define FontShiftSize 5 +static XID clearGC[] = { CT_NONE }; +#define clearGCmask (GCClipMask) + +int +doPolyText(ClientPtr client, PTclosurePtr c) +{ + FontPtr pFont = c->pGC->font, oldpFont; + Font fid, oldfid; + int err = Success, lgerr; /* err is in X error, not font error, space */ + enum { NEVER_SLEPT, START_SLEEP, SLEEPING } client_state = NEVER_SLEPT; + FontPathElementPtr fpe; + GC *origGC = NULL; + + if (client->clientGone) + { + fpe = c->pGC->font->fpe; + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + + if (c->slept) + { + /* Client has died, but we cannot bail out right now. We + need to clean up after the work we did when going to + sleep. Setting the drawable pointer to 0 makes this + happen without any attempts to render or perform other + unnecessary activities. */ + c->pDraw = (DrawablePtr)0; + } + else + { + err = Success; + goto bail; + } + } + + /* Make sure our drawable hasn't disappeared while we slept. */ + if (c->slept && + c->pDraw && + c->pDraw != (DrawablePtr)SecurityLookupIDByClass(client, c->did, + RC_DRAWABLE, DixWriteAccess)) + { + /* Our drawable has disappeared. Treat like client died... ask + the FPE code to clean up after client and avoid further + rendering while we clean up after ourself. */ + fpe = c->pGC->font->fpe; + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + c->pDraw = (DrawablePtr)0; + } + + client_state = c->slept ? SLEEPING : NEVER_SLEPT; + + while (c->endReq - c->pElt > TextEltHeader) + { + if (*c->pElt == FontChange) + { + if (c->endReq - c->pElt < FontShiftSize) + { + err = BadLength; + goto bail; + } + + oldpFont = pFont; + oldfid = fid; + + fid = ((Font)*(c->pElt+4)) /* big-endian */ + | ((Font)*(c->pElt+3)) << 8 + | ((Font)*(c->pElt+2)) << 16 + | ((Font)*(c->pElt+1)) << 24; + pFont = (FontPtr)SecurityLookupIDByType(client, fid, RT_FONT, + DixReadAccess); + if (!pFont) + { + client->errorValue = fid; + err = BadFont; + /* restore pFont and fid for step 4 (described below) */ + pFont = oldpFont; + fid = oldfid; + + /* If we're in START_SLEEP mode, the following step + shortens the request... in the unlikely event that + the fid somehow becomes valid before we come through + again to actually execute the polytext, which would + then mess up our refcounting scheme badly. */ + c->err = err; + c->endReq = c->pElt; + + goto bail; + } + + /* Step 3 (described below) on our new font */ + if (client_state == START_SLEEP) + pFont->refcnt++; + else + { + if (pFont != c->pGC->font && c->pDraw) + { + ChangeGC( c->pGC, GCFont, &fid); + ValidateGC(c->pDraw, c->pGC); + if (c->reqType == X_PolyText8) + c->polyText = (PolyTextPtr) c->pGC->ops->PolyText8; + else + c->polyText = (PolyTextPtr) c->pGC->ops->PolyText16; + } + + /* Undo the refcnt++ we performed when going to sleep */ + if (client_state == SLEEPING) + (void)CloseFont(c->pGC->font, (Font)0); + } + c->pElt += FontShiftSize; + } + else /* print a string */ + { + unsigned char *pNextElt; + pNextElt = c->pElt + TextEltHeader + (*c->pElt)*c->itemSize; + if ( pNextElt > c->endReq) + { + err = BadLength; + goto bail; + } + if (client_state == START_SLEEP) + { + c->pElt = pNextElt; + continue; + } + if (c->pDraw) + { + lgerr = LoadGlyphs(client, c->pGC->font, *c->pElt, c->itemSize, + c->pElt + TextEltHeader); + } + else lgerr = Successful; + + if (lgerr == Suspended) + { + if (!c->slept) { + int len; + GC *pGC; + PTclosurePtr new_closure; + + /* We're putting the client to sleep. We need to do a few things + to ensure successful and atomic-appearing execution of the + remainder of the request. First, copy the remainder of the + request into a safe malloc'd area. Second, create a scratch GC + to use for the remainder of the request. Third, mark all fonts + referenced in the remainder of the request to prevent their + deallocation. Fourth, make the original GC look like the + request has completed... set its font to the final font value + from this request. These GC manipulations are for the unlikely + (but possible) event that some other client is using the GC. + Steps 3 and 4 are performed by running this procedure through + the remainder of the request in a special no-render mode + indicated by client_state = START_SLEEP. */ + + /* Step 1 */ + /* Allocate a malloc'd closure structure to replace + the local one we were passed */ + new_closure = (PTclosurePtr) xalloc(sizeof(PTclosureRec)); + if (!new_closure) + { + err = BadAlloc; + goto bail; + } + *new_closure = *c; + c = new_closure; + + len = c->endReq - c->pElt; + c->data = (unsigned char *)xalloc(len); + if (!c->data) + { + xfree(c); + err = BadAlloc; + goto bail; + } + memmove(c->data, c->pElt, len); + c->pElt = c->data; + c->endReq = c->pElt + len; + + /* Step 2 */ + + pGC = GetScratchGC(c->pGC->depth, c->pGC->pScreen); + if (!pGC) + { + xfree(c->data); + xfree(c); + err = BadAlloc; + goto bail; + } + if ((err = CopyGC(c->pGC, pGC, GCFunction | + GCPlaneMask | GCForeground | + GCBackground | GCFillStyle | + GCTile | GCStipple | + GCTileStipXOrigin | + GCTileStipYOrigin | GCFont | + GCSubwindowMode | GCClipXOrigin | + GCClipYOrigin | GCClipMask)) != + Success) + { + FreeScratchGC(pGC); + xfree(c->data); + xfree(c); + err = BadAlloc; + goto bail; + } + origGC = c->pGC; + c->pGC = pGC; + ValidateGC(c->pDraw, c->pGC); + + c->slept = TRUE; + ClientSleep(client, + (ClientSleepProcPtr)doPolyText, + (pointer) c); + + /* Set up to perform steps 3 and 4 */ + client_state = START_SLEEP; + continue; /* on to steps 3 and 4 */ + } + return TRUE; + } + else if (lgerr != Successful) + { + err = FontToXError(lgerr); + goto bail; + } + if (c->pDraw) + { + c->xorg += *((INT8 *)(c->pElt + 1)); /* must be signed */ + c->xorg = (* c->polyText)(c->pDraw, c->pGC, c->xorg, c->yorg, + *c->pElt, c->pElt + TextEltHeader); + } + c->pElt = pNextElt; + } + } + +bail: + + if (client_state == START_SLEEP) + { + /* Step 4 */ + if (pFont != origGC->font) + { + ChangeGC(origGC, GCFont, &fid); + ValidateGC(c->pDraw, origGC); + } + + /* restore pElt pointer for execution of remainder of the request */ + c->pElt = c->data; + return TRUE; + } + + if (c->err != Success) err = c->err; + if (err != Success && c->client != serverClient) { +#ifdef PANORAMIX + if (noPanoramiXExtension || !c->pGC->pScreen->myNum) +#endif + SendErrorToClient(c->client, c->reqType, 0, 0, err); + } + if (c->slept) + { + ClientWakeup(c->client); + ChangeGC(c->pGC, clearGCmask, clearGC); + + /* Unreference the font from the scratch GC */ + CloseFont(c->pGC->font, (Font)0); + c->pGC->font = NullFont; + + FreeScratchGC(c->pGC); + xfree(c->data); + xfree(c); + } + return TRUE; +} + +int +PolyText(ClientPtr client, DrawablePtr pDraw, GC *pGC, unsigned char *pElt, + unsigned char *endReq, int xorg, int yorg, int reqType, XID did) +{ + PTclosureRec local_closure; + + local_closure.pElt = pElt; + local_closure.endReq = endReq; + local_closure.client = client; + local_closure.pDraw = pDraw; + local_closure.xorg = xorg; + local_closure.yorg = yorg; + if ((local_closure.reqType = reqType) == X_PolyText8) + { + local_closure.polyText = (PolyTextPtr) pGC->ops->PolyText8; + local_closure.itemSize = 1; + } + else + { + local_closure.polyText = (PolyTextPtr) pGC->ops->PolyText16; + local_closure.itemSize = 2; + } + local_closure.pGC = pGC; + local_closure.did = did; + local_closure.err = Success; + local_closure.slept = FALSE; + + (void) doPolyText(client, &local_closure); + return Success; +} + + +#undef TextEltHeader +#undef FontShiftSize + +int +doImageText(ClientPtr client, ITclosurePtr c) +{ + int err = Success, lgerr; /* err is in X error, not font error, space */ + FontPathElementPtr fpe; + + if (client->clientGone) + { + fpe = c->pGC->font->fpe; + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + err = Success; + goto bail; + } + + /* Make sure our drawable hasn't disappeared while we slept. */ + if (c->slept && + c->pDraw && + c->pDraw != (DrawablePtr)SecurityLookupIDByClass(client, c->did, + RC_DRAWABLE, DixWriteAccess)) + { + /* Our drawable has disappeared. Treat like client died... ask + the FPE code to clean up after client. */ + fpe = c->pGC->font->fpe; + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + err = Success; + goto bail; + } + + lgerr = LoadGlyphs(client, c->pGC->font, c->nChars, c->itemSize, c->data); + if (lgerr == Suspended) + { + if (!c->slept) { + GC *pGC; + unsigned char *data; + ITclosurePtr new_closure; + + /* We're putting the client to sleep. We need to + save some state. Similar problem to that handled + in doPolyText, but much simpler because the + request structure is much simpler. */ + + new_closure = (ITclosurePtr) xalloc(sizeof(ITclosureRec)); + if (!new_closure) + { + err = BadAlloc; + goto bail; + } + *new_closure = *c; + c = new_closure; + + data = (unsigned char *)xalloc(c->nChars * c->itemSize); + if (!data) + { + xfree(c); + err = BadAlloc; + goto bail; + } + memmove(data, c->data, c->nChars * c->itemSize); + c->data = data; + + pGC = GetScratchGC(c->pGC->depth, c->pGC->pScreen); + if (!pGC) + { + xfree(c->data); + xfree(c); + err = BadAlloc; + goto bail; + } + if ((err = CopyGC(c->pGC, pGC, GCFunction | GCPlaneMask | + GCForeground | GCBackground | GCFillStyle | + GCTile | GCStipple | GCTileStipXOrigin | + GCTileStipYOrigin | GCFont | + GCSubwindowMode | GCClipXOrigin | + GCClipYOrigin | GCClipMask)) != Success) + { + FreeScratchGC(pGC); + xfree(c->data); + xfree(c); + err = BadAlloc; + goto bail; + } + c->pGC = pGC; + ValidateGC(c->pDraw, c->pGC); + + c->slept = TRUE; + ClientSleep(client, (ClientSleepProcPtr)doImageText, (pointer) c); + } + return TRUE; + } + else if (lgerr != Successful) + { + err = FontToXError(lgerr); + goto bail; + } + if (c->pDraw) + { + (* c->imageText)(c->pDraw, c->pGC, c->xorg, c->yorg, + c->nChars, c->data); + } + +bail: + + if (err != Success && c->client != serverClient) { + SendErrorToClient(c->client, c->reqType, 0, 0, err); + } + if (c->slept) + { + ClientWakeup(c->client); + ChangeGC(c->pGC, clearGCmask, clearGC); + + /* Unreference the font from the scratch GC */ + CloseFont(c->pGC->font, (Font)0); + c->pGC->font = NullFont; + + FreeScratchGC(c->pGC); + xfree(c->data); + xfree(c); + } + return TRUE; +} + +int +ImageText(ClientPtr client, DrawablePtr pDraw, GC *pGC, int nChars, + unsigned char *data, int xorg, int yorg, int reqType, XID did) +{ + ITclosureRec local_closure; + + local_closure.client = client; + local_closure.pDraw = pDraw; + local_closure.pGC = pGC; + local_closure.nChars = nChars; + local_closure.data = data; + local_closure.xorg = xorg; + local_closure.yorg = yorg; + if ((local_closure.reqType = reqType) == X_ImageText8) + { + local_closure.imageText = (ImageTextPtr) pGC->ops->ImageText8; + local_closure.itemSize = 1; + } + else + { + local_closure.imageText = (ImageTextPtr) pGC->ops->ImageText16; + local_closure.itemSize = 2; + } + local_closure.did = did; + local_closure.slept = FALSE; + + (void) doImageText(client, &local_closure); + return Success; +} + + +/* does the necessary magic to figure out the fpe type */ +static int +DetermineFPEType(char *pathname) +{ + int i; + + for (i = 0; i < num_fpe_types; i++) { + if ((*fpe_functions[i].name_check) (pathname)) + return i; + } + return -1; +} + + +static void +FreeFontPath(FontPathElementPtr *list, int n, Bool force) +{ + int i; + + for (i = 0; i < n; i++) { + if (force) { + /* Sanity check that all refcounts will be 0 by the time + we get to the end of the list. */ + int found = 1; /* the first reference is us */ + int j; + for (j = i+1; j < n; j++) { + if (list[j] == list[i]) + found++; + } + if (list[i]->refcount != found) { + ErrorF("FreeFontPath: FPE \"%.*s\" refcount is %d, should be %d; fixing.\n", + list[i]->name_length, list[i]->name, + list[i]->refcount, found); + list[i]->refcount = found; /* ensure it will get freed */ + } + } + FreeFPE(list[i]); + } + xfree((char *) list); +} + +static FontPathElementPtr +find_existing_fpe(FontPathElementPtr *list, int num, unsigned char *name, int len) +{ + FontPathElementPtr fpe; + int i; + + for (i = 0; i < num; i++) { + fpe = list[i]; + if (fpe->name_length == len && memcmp(name, fpe->name, len) == 0) + return fpe; + } + return (FontPathElementPtr) 0; +} + + +static int +SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist) +{ + int i, err = 0; + int valid_paths = 0; + unsigned int len; + unsigned char *cp = paths; + FontPathElementPtr fpe = NULL, *fplist; + + fplist = (FontPathElementPtr *) + xalloc(sizeof(FontPathElementPtr) * npaths); + if (!fplist) { + *bad = 0; + return BadAlloc; + } + for (i = 0; i < num_fpe_types; i++) { + if (fpe_functions[i].set_path_hook) + (*fpe_functions[i].set_path_hook) (); + } + for (i = 0; i < npaths; i++) + { + len = (unsigned int) (*cp++); + + if (len == 0) + { + if (persist) + ErrorF ("Removing empty element from the valid list of fontpaths\n"); + err = BadValue; + } + else + { + /* if it's already in our active list, just reset it */ + /* + * note that this can miss FPE's in limbo -- may be worth catching + * them, though it'd muck up refcounting + */ + fpe = find_existing_fpe(font_path_elements, num_fpes, cp, len); + if (fpe) + { + err = (*fpe_functions[fpe->type].reset_fpe) (fpe); + if (err == Successful) + { + UseFPE(fpe);/* since it'll be decref'd later when freed + * from the old list */ + } + else + fpe = 0; + } + /* if error or can't do it, act like it's a new one */ + if (!fpe) + { + fpe = (FontPathElementPtr) xalloc(sizeof(FontPathElementRec)); + if (!fpe) + { + err = BadAlloc; + goto bail; + } + fpe->name = (char *) xalloc(len + 1); + if (!fpe->name) + { + xfree(fpe); + err = BadAlloc; + goto bail; + } + fpe->refcount = 1; + + strncpy(fpe->name, (char *) cp, (int) len); + fpe->name[len] = '\0'; + fpe->name_length = len; + fpe->type = DetermineFPEType(fpe->name); + if (fpe->type == -1) + err = BadValue; + else + err = (*fpe_functions[fpe->type].init_fpe) (fpe); + if (err != Successful) + { + if (persist) + { + ErrorF("Could not init font path element %s, removing from list!\n", + fpe->name); + } + xfree (fpe->name); + xfree (fpe); + } + } + } + if (err != Successful) + { + if (!persist) + goto bail; + } + else + { + fplist[valid_paths++] = fpe; + } + cp += len; + } + + FreeFontPath(font_path_elements, num_fpes, FALSE); + font_path_elements = fplist; + if (patternCache) + EmptyFontPatternCache(patternCache); + num_fpes = valid_paths; + + return Success; +bail: + *bad = i; + while (--valid_paths >= 0) + FreeFPE(fplist[valid_paths]); + xfree(fplist); + return FontToXError(err); +} + +/* XXX -- do we need to pass error down to each renderer? */ +int +SetFontPath(ClientPtr client, int npaths, unsigned char *paths, int *error) +{ + int err = Success; + + if (npaths == 0) { + if (SetDefaultFontPath(defaultFontPath) != Success) + return BadValue; + } else { + err = SetFontPathElements(npaths, paths, error, FALSE); + } + return err; +} + +int +SetDefaultFontPath(char *path) +{ + unsigned char *cp, + *pp, + *nump, + *newpath; + int num = 1, + len, + err, + size = 0, + bad; + + /* get enough for string, plus values -- use up commas */ + len = strlen(path) + 1; + nump = cp = newpath = (unsigned char *) ALLOCATE_LOCAL(len); + if (!newpath) + return BadAlloc; + pp = (unsigned char *) path; + cp++; + while (*pp) { + if (*pp == ',') { + *nump = (unsigned char) size; + nump = cp++; + pp++; + num++; + size = 0; + } else { + *cp++ = *pp++; + size++; + } + } + *nump = (unsigned char) size; + + err = SetFontPathElements(num, newpath, &bad, TRUE); + + DEALLOCATE_LOCAL(newpath); + + return err; +} + +unsigned char * +GetFontPath(int *count, int *length) +{ + int i; + unsigned char *c; + int len; + FontPathElementPtr fpe; + + len = 0; + for (i = 0; i < num_fpes; i++) { + fpe = font_path_elements[i]; + len += fpe->name_length + 1; + } + font_path_string = (unsigned char *) xrealloc(font_path_string, len); + if (!font_path_string) + return NULL; + + c = font_path_string; + *length = 0; + for (i = 0; i < num_fpes; i++) { + fpe = font_path_elements[i]; + *c = fpe->name_length; + *length += *c++; + memmove(c, fpe->name, fpe->name_length); + c += fpe->name_length; + } + *count = num_fpes; + return font_path_string; +} + +_X_EXPORT int +LoadGlyphs(ClientPtr client, FontPtr pfont, unsigned nchars, int item_size, unsigned char *data) +{ + if (fpe_functions[pfont->fpe->type].load_glyphs) + return (*fpe_functions[pfont->fpe->type].load_glyphs) + (client, pfont, 0, nchars, item_size, data); + else + return Successful; +} + +void +DeleteClientFontStuff(ClientPtr client) +{ + int i; + FontPathElementPtr fpe; + + for (i = 0; i < num_fpes; i++) + { + fpe = font_path_elements[i]; + if (fpe_functions[fpe->type].client_died) + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + } +} + +void +InitFonts (void) +{ + patternCache = MakeFontPatternCache(); + +#ifndef BUILTIN_FONTS + if (screenInfo.numScreens > screenInfo.numVideoScreens) { + PrinterFontRegisterFpeFunctions(); + FontFileCheckRegisterFpeFunctions(); + check_fs_register_fpe_functions(); + } else +#endif + { +#ifdef BUILTIN_FONTS + BuiltinRegisterFpeFunctions(); +#else + FontFileRegisterFpeFunctions(); +#endif +#ifndef NOFONTSERVERACCESS + fs_register_fpe_functions(); +#endif + } +} + +int +GetDefaultPointSize () +{ + return 120; +} + + +FontResolutionPtr +GetClientResolutions (int *num) +{ + if (requestingClient && requestingClient->fontResFunc != NULL && + !requestingClient->clientGone) + { + return (*requestingClient->fontResFunc)(requestingClient, num); + } + else { + static struct _FontResolution res; + ScreenPtr pScreen; + + pScreen = screenInfo.screens[0]; + res.x_resolution = (pScreen->width * 25.4) / pScreen->mmWidth; + /* + * XXX - we'll want this as long as bitmap instances are prevalent + so that we can match them from scalable fonts + */ + if (res.x_resolution < 88) + res.x_resolution = 75; + else + res.x_resolution = 100; + res.y_resolution = (pScreen->height * 25.4) / pScreen->mmHeight; + if (res.y_resolution < 88) + res.y_resolution = 75; + else + res.y_resolution = 100; + res.point_size = 120; + *num = 1; + return &res; + } +} + +/* + * returns the type index of the new fpe + * + * should be called (only once!) by each type of fpe when initialized + */ + +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) +{ + FPEFunctions *new; + + /* grow the list */ + new = (FPEFunctions *) xrealloc(fpe_functions, + (num_fpe_types + 1) * sizeof(FPEFunctions)); + if (!new) + return -1; + fpe_functions = new; + + fpe_functions[num_fpe_types].name_check = name_func; + fpe_functions[num_fpe_types].open_font = open_func; + fpe_functions[num_fpe_types].close_font = close_func; + fpe_functions[num_fpe_types].wakeup_fpe = wakeup_func; + fpe_functions[num_fpe_types].list_fonts = list_func; + fpe_functions[num_fpe_types].start_list_fonts_with_info = + start_lfwi_func; + fpe_functions[num_fpe_types].list_next_font_with_info = + next_lfwi_func; + fpe_functions[num_fpe_types].init_fpe = init_func; + fpe_functions[num_fpe_types].free_fpe = free_func; + fpe_functions[num_fpe_types].reset_fpe = reset_func; + fpe_functions[num_fpe_types].client_died = client_died; + fpe_functions[num_fpe_types].load_glyphs = load_glyphs; + fpe_functions[num_fpe_types].start_list_fonts_and_aliases = + start_list_alias_func; + fpe_functions[num_fpe_types].list_next_font_or_alias = + next_list_alias_func; + fpe_functions[num_fpe_types].set_path_hook = set_path_func; + + return num_fpe_types++; +} + +void +FreeFonts(void) +{ + if (patternCache) { + FreeFontPatternCache(patternCache); + patternCache = 0; + } + FreeFontPath(font_path_elements, num_fpes, TRUE); + font_path_elements = 0; + num_fpes = 0; + xfree(fpe_functions); + num_fpe_types = 0; + fpe_functions = (FPEFunctions *) 0; +} + +/* convenience functions for FS interface */ + +FontPtr +find_old_font(XID id) +{ + return (FontPtr) SecurityLookupIDByType(NullClient, id, RT_NONE, + DixUnknownAccess); +} + +Font +GetNewFontClientID() +{ + return FakeClientID(0); +} + +int +StoreFontClientFont(FontPtr pfont, Font id) +{ + return AddResource(id, RT_NONE, (pointer) pfont); +} + +void +DeleteFontClientID(Font id) +{ + FreeResource(id, RT_NONE); +} + +int +client_auth_generation(ClientPtr client) +{ + return 0; +} + +static int fs_handlers_installed = 0; +static unsigned int last_server_gen; + +int +init_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler) +{ + /* if server has reset, make sure the b&w handlers are reinstalled */ + if (last_server_gen < serverGeneration) { + last_server_gen = serverGeneration; + fs_handlers_installed = 0; + } + if (fs_handlers_installed == 0) { + if (!RegisterBlockAndWakeupHandlers(block_handler, + FontWakeup, (pointer) 0)) + return AllocError; + fs_handlers_installed++; + } + QueueFontWakeup(fpe); + return Successful; +} + +void +remove_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler, Bool all) +{ + if (all) { + /* remove the handlers if no one else is using them */ + if (--fs_handlers_installed == 0) { + RemoveBlockAndWakeupHandlers(block_handler, FontWakeup, + (pointer) 0); + } + } + RemoveFontWakeup(fpe); +} diff --git a/xorg-server-1.4/dix/dixutils.c b/xorg-server-1.4/dix/dixutils.c new file mode 100644 index 0000000..c1e30ff --- /dev/null +++ b/xorg-server-1.4/dix/dixutils.c @@ -0,0 +1,965 @@ +/*********************************************************** + +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 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. + +******************************************************************/ + +/* + +(c)Copyright 1988,1991 Adobe Systems Incorporated. All rights reserved. + +Permission to use, copy, modify, distribute, and sublicense this software and its +documentation for any purpose and without fee is hereby granted, provided that +the above copyright notices appear in all copies and that both those copyright +notices and this permission notice appear in supporting documentation and that +the name of Adobe Systems Incorporated not be used in advertising or publicity +pertaining to distribution of the software without specific, written prior +permission. No trademark license to use the Adobe trademarks is hereby +granted. If the Adobe trademark "Display PostScript"(tm) is used to describe +this software, its functionality or for any other purpose, such use shall be +limited to a statement that this software works in conjunction with the Display +PostScript system. Proper trademark attribution to reflect Adobe's ownership +of the trademark shall be given whenever any such reference to the Display +PostScript system is made. + +ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR ANY +PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ADOBE +DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON- +INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE TO YOU +OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,NEGLIGENCE, STRICT +LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT PROVIDE ANY TRAINING OR OTHER +SUPPORT FOR THE SOFTWARE. + +Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems +Incorporated which may be registered in certain jurisdictions. + +Author: Adobe Systems Incorporated + +*/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "misc.h" +#include "windowstr.h" +#include "dixstruct.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#define XK_LATIN1 +#include +#include "xace.h" + +/* + * CompareTimeStamps returns -1, 0, or +1 depending on if the first + * argument is less than, equal to or greater than the second argument. + */ + +_X_EXPORT int +CompareTimeStamps(TimeStamp a, TimeStamp b) +{ + if (a.months < b.months) + return EARLIER; + if (a.months > b.months) + return LATER; + if (a.milliseconds < b.milliseconds) + return EARLIER; + if (a.milliseconds > b.milliseconds) + return LATER; + return SAMETIME; +} + +/* + * convert client times to server TimeStamps + */ + +#define HALFMONTH ((unsigned long) 1<<31) +_X_EXPORT TimeStamp +ClientTimeToServerTime(CARD32 c) +{ + TimeStamp ts; + if (c == CurrentTime) + return currentTime; + ts.months = currentTime.months; + ts.milliseconds = c; + if (c > currentTime.milliseconds) + { + if (((unsigned long) c - currentTime.milliseconds) > HALFMONTH) + ts.months -= 1; + } + else if (c < currentTime.milliseconds) + { + if (((unsigned long)currentTime.milliseconds - c) > HALFMONTH) + ts.months += 1; + } + return ts; +} + +/* + * ISO Latin-1 case conversion routine + * + * this routine always null-terminates the result, so + * beware of too-small buffers + */ + +static unsigned char +ISOLatin1ToLower (unsigned char source) +{ + unsigned char dest; + 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; + return dest; +} + + +_X_EXPORT void +CopyISOLatin1Lowered(unsigned char *dest, unsigned char *source, int length) +{ + int i; + + for (i = 0; i < length; i++, source++, dest++) + *dest = ISOLatin1ToLower (*source); + *dest = '\0'; +} + +int +CompareISOLatin1Lowered(unsigned char *s1, int s1len, + unsigned char *s2, int s2len) +{ + unsigned char c1, c2; + + for (;;) + { + /* note -- compare against zero so that -1 ignores len */ + c1 = s1len-- ? *s1++ : '\0'; + c2 = s2len-- ? *s2++ : '\0'; + if (!c1 || + (c1 != c2 && + (c1 = ISOLatin1ToLower (c1)) != (c2 = ISOLatin1ToLower (c2)))) + break; + } + return (int) c1 - (int) c2; +} + +/* + * dixLookupWindow and dixLookupDrawable: + * Look up the window/drawable taking into account the client doing the + * lookup, the type of drawable desired, and the type of access desired. + * Return Success with *pDraw set if the window/drawable exists and the client + * is allowed access, else return an error code with *pDraw set to NULL. The + * access mask values are defined in resource.h. The type mask values are + * defined in pixmap.h, with zero equivalent to M_DRAWABLE. + */ +_X_EXPORT int +dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client, + Mask type, Mask access) +{ + DrawablePtr pTmp; + RESTYPE rtype; + *pDraw = NULL; + client->errorValue = id; + + if (id == INVALID) + return BadDrawable; + + if (id == client->lastDrawableID) { + pTmp = client->lastDrawable; + + /* an access check is required for cached drawables */ + rtype = (type & M_WINDOW) ? RT_WINDOW : RT_PIXMAP; + if (!XaceHook(XACE_RESOURCE_ACCESS, client, id, rtype, access, pTmp)) + return BadDrawable; + } else + pTmp = (DrawablePtr)SecurityLookupIDByClass(client, id, RC_DRAWABLE, + access); + if (!pTmp) + return BadDrawable; + if (!((1 << pTmp->type) & (type ? type : M_DRAWABLE))) + return BadMatch; + + if (type & M_DRAWABLE) { + client->lastDrawable = pTmp; + client->lastDrawableID = id; + client->lastGCID = INVALID; + client->lastGC = (GCPtr)NULL; + } + *pDraw = pTmp; + return Success; +} + +_X_EXPORT int +dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access) +{ + int rc; + rc = dixLookupDrawable((DrawablePtr*)pWin, id, client, M_WINDOW, access); + return (rc == BadDrawable) ? BadWindow : rc; +} + +_X_EXPORT int +dixLookupGC(GCPtr *pGC, XID id, ClientPtr client, Mask access) +{ + GCPtr pTmp = (GCPtr)SecurityLookupIDByType(client, id, RT_GC, access); + if (pTmp) { + *pGC = pTmp; + return Success; + } + client->errorValue = id; + *pGC = NULL; + return BadGC; +} + +_X_EXPORT int +dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access) +{ + pointer pRes = (pointer)SecurityLookupIDByClass(client, rid, RC_ANY, + access); + int clientIndex = CLIENT_ID(rid); + client->errorValue = rid; + + if (clientIndex && pRes && clients[clientIndex] && !(rid & SERVER_BIT)) { + *pClient = clients[clientIndex]; + return Success; + } + *pClient = NULL; + return BadValue; +} + +/* + * These are deprecated compatibility functions and will be removed soon! + * Please use the new dixLookup*() functions above. + */ +_X_EXPORT _X_DEPRECATED WindowPtr +SecurityLookupWindow(XID id, ClientPtr client, Mask access_mode) +{ + WindowPtr pWin; + int i = dixLookupWindow(&pWin, id, client, access_mode); + static int warn = 1; + if (warn-- > 0) + ErrorF("Warning: LookupWindow()/SecurityLookupWindow() " + "are deprecated. Please convert your driver/module " + "to use dixLookupWindow().\n"); + return (i == Success) ? pWin : NULL; +} + +_X_EXPORT _X_DEPRECATED WindowPtr +LookupWindow(XID id, ClientPtr client) +{ + return SecurityLookupWindow(id, client, DixUnknownAccess); +} + +_X_EXPORT _X_DEPRECATED pointer +SecurityLookupDrawable(XID id, ClientPtr client, Mask access_mode) +{ + DrawablePtr pDraw; + int i = dixLookupDrawable(&pDraw, id, client, M_DRAWABLE, access_mode); + static int warn = 1; + if (warn-- > 0) + ErrorF("Warning: LookupDrawable()/SecurityLookupDrawable() " + "are deprecated. Please convert your driver/module " + "to use dixLookupDrawable().\n"); + return (i == Success) ? pDraw : NULL; +} + +_X_EXPORT _X_DEPRECATED pointer +LookupDrawable(XID id, ClientPtr client) +{ + return SecurityLookupDrawable(id, client, DixUnknownAccess); +} + +_X_EXPORT _X_DEPRECATED ClientPtr +LookupClient(XID id, ClientPtr client) +{ + ClientPtr pClient; + int i = dixLookupClient(&pClient, id, client, DixUnknownAccess); + static int warn = 1; + if (warn-- > 0) + ErrorF("Warning: LookupClient() is deprecated. Please convert your " + "driver/module to use dixLookupClient().\n"); + return (i == Success) ? pClient : NULL; +} + +/* end deprecated functions */ + +int +AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode, + Bool toRoot, Bool remap) +{ + int numnow; + SaveSetElt *pTmp = NULL; + int j; + + numnow = client->numSaved; + j = 0; + if (numnow) + { + pTmp = client->saveSet; + while ((j < numnow) && (SaveSetWindow(pTmp[j]) != (pointer)pWin)) + j++; + } + if (mode == SetModeInsert) + { + if (j < numnow) /* duplicate */ + return(Success); + numnow++; + pTmp = (SaveSetElt *)xrealloc(client->saveSet, sizeof(*pTmp) * numnow); + if (!pTmp) + return(BadAlloc); + client->saveSet = pTmp; + client->numSaved = numnow; + SaveSetAssignWindow(client->saveSet[numnow - 1], pWin); + SaveSetAssignToRoot(client->saveSet[numnow - 1], toRoot); + SaveSetAssignRemap(client->saveSet[numnow - 1], remap); + return(Success); + } + else if ((mode == SetModeDelete) && (j < numnow)) + { + while (j < numnow-1) + { + pTmp[j] = pTmp[j+1]; + j++; + } + numnow--; + if (numnow) + { + pTmp = (SaveSetElt *)xrealloc(client->saveSet, sizeof(*pTmp) * numnow); + if (pTmp) + client->saveSet = pTmp; + } + else + { + xfree(client->saveSet); + client->saveSet = (SaveSetElt *)NULL; + } + client->numSaved = numnow; + return(Success); + } + return(Success); +} + +void +DeleteWindowFromAnySaveSet(WindowPtr pWin) +{ + int i; + ClientPtr client; + + for (i = 0; i< currentMaxClients; i++) + { + client = clients[i]; + if (client && client->numSaved) + (void)AlterSaveSetForClient(client, pWin, SetModeDelete, FALSE, TRUE); + } +} + +/* No-op Don't Do Anything : sometimes we need to be able to call a procedure + * that doesn't do anything. For example, on screen with only static + * colormaps, if someone calls install colormap, it's easier to have a dummy + * procedure to call than to check if there's a procedure + */ +_X_EXPORT void +NoopDDA(void) +{ +} + +typedef struct _BlockHandler { + BlockHandlerProcPtr BlockHandler; + WakeupHandlerProcPtr WakeupHandler; + pointer blockData; + Bool deleted; +} BlockHandlerRec, *BlockHandlerPtr; + +static BlockHandlerPtr handlers; +static int numHandlers; +static int sizeHandlers; +static Bool inHandler; +static Bool handlerDeleted; + +/** + * + * \param pTimeout DIX doesn't want to know how OS represents time + * \param pReadMask nor how it represents the det of descriptors + */ +void +BlockHandler(pointer pTimeout, pointer pReadmask) +{ + int i, j; + + ++inHandler; + for (i = 0; i < screenInfo.numScreens; i++) + (* screenInfo.screens[i]->BlockHandler)(i, + screenInfo.screens[i]->blockData, + pTimeout, pReadmask); + for (i = 0; i < numHandlers; i++) + (*handlers[i].BlockHandler) (handlers[i].blockData, + pTimeout, pReadmask); + if (handlerDeleted) + { + for (i = 0; i < numHandlers;) + if (handlers[i].deleted) + { + for (j = i; j < numHandlers - 1; j++) + handlers[j] = handlers[j+1]; + numHandlers--; + } + else + i++; + handlerDeleted = FALSE; + } + --inHandler; +} + +/** + * + * \param result 32 bits of undefined result from the wait + * \param pReadmask the resulting descriptor mask + */ +void +WakeupHandler(int result, pointer pReadmask) +{ + int i, j; + + ++inHandler; + for (i = numHandlers - 1; i >= 0; i--) + (*handlers[i].WakeupHandler) (handlers[i].blockData, + result, pReadmask); + for (i = 0; i < screenInfo.numScreens; i++) + (* screenInfo.screens[i]->WakeupHandler)(i, + screenInfo.screens[i]->wakeupData, + result, pReadmask); + if (handlerDeleted) + { + for (i = 0; i < numHandlers;) + if (handlers[i].deleted) + { + for (j = i; j < numHandlers - 1; j++) + handlers[j] = handlers[j+1]; + numHandlers--; + } + else + i++; + handlerDeleted = FALSE; + } + --inHandler; +} + +/** + * Reentrant with BlockHandler and WakeupHandler, except wakeup won't + * get called until next time + */ +_X_EXPORT Bool +RegisterBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler, + WakeupHandlerProcPtr wakeupHandler, + pointer blockData) +{ + BlockHandlerPtr new; + + if (numHandlers >= sizeHandlers) + { + new = (BlockHandlerPtr) xrealloc (handlers, (numHandlers + 1) * + sizeof (BlockHandlerRec)); + if (!new) + return FALSE; + handlers = new; + sizeHandlers = numHandlers + 1; + } + handlers[numHandlers].BlockHandler = blockHandler; + handlers[numHandlers].WakeupHandler = wakeupHandler; + handlers[numHandlers].blockData = blockData; + handlers[numHandlers].deleted = FALSE; + numHandlers = numHandlers + 1; + return TRUE; +} + +_X_EXPORT void +RemoveBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler, + WakeupHandlerProcPtr wakeupHandler, + pointer blockData) +{ + int i; + + for (i = 0; i < numHandlers; i++) + if (handlers[i].BlockHandler == blockHandler && + handlers[i].WakeupHandler == wakeupHandler && + handlers[i].blockData == blockData) + { + if (inHandler) + { + handlerDeleted = TRUE; + handlers[i].deleted = TRUE; + } + else + { + for (; i < numHandlers - 1; i++) + handlers[i] = handlers[i+1]; + numHandlers--; + } + break; + } +} + +void +InitBlockAndWakeupHandlers (void) +{ + xfree (handlers); + handlers = (BlockHandlerPtr) 0; + numHandlers = 0; + sizeHandlers = 0; +} + +/* + * A general work queue. Perform some task before the server + * sleeps for input. + */ + +WorkQueuePtr workQueue; +static WorkQueuePtr *workQueueLast = &workQueue; + +void +ProcessWorkQueue(void) +{ + WorkQueuePtr q, *p; + + p = &workQueue; + /* + * Scan the work queue once, calling each function. Those + * which return TRUE are removed from the queue, otherwise + * they will be called again. This must be reentrant with + * QueueWorkProc. + */ + while ((q = *p)) + { + if ((*q->function) (q->client, q->closure)) + { + /* remove q from the list */ + *p = q->next; /* don't fetch until after func called */ + xfree (q); + } + else + { + p = &q->next; /* don't fetch until after func called */ + } + } + workQueueLast = p; +} + +void +ProcessWorkQueueZombies(void) +{ + WorkQueuePtr q, *p; + + p = &workQueue; + while ((q = *p)) + { + if (q->client && q->client->clientGone) + { + (void) (*q->function) (q->client, q->closure); + /* remove q from the list */ + *p = q->next; /* don't fetch until after func called */ + xfree (q); + } + else + { + p = &q->next; /* don't fetch until after func called */ + } + } + workQueueLast = p; +} + +_X_EXPORT Bool +QueueWorkProc ( + Bool (*function)(ClientPtr /* pClient */, pointer /* closure */), + ClientPtr client, pointer closure) +{ + WorkQueuePtr q; + + q = (WorkQueuePtr) xalloc (sizeof *q); + if (!q) + return FALSE; + q->function = function; + q->client = client; + q->closure = closure; + q->next = NULL; + *workQueueLast = q; + workQueueLast = &q->next; + return TRUE; +} + +/* + * Manage a queue of sleeping clients, awakening them + * when requested, by using the OS functions IgnoreClient + * and AttendClient. Note that this *ignores* the troubles + * with request data interleaving itself with events, but + * we'll leave that until a later time. + */ + +typedef struct _SleepQueue { + struct _SleepQueue *next; + ClientPtr client; + ClientSleepProcPtr function; + pointer closure; +} SleepQueueRec, *SleepQueuePtr; + +static SleepQueuePtr sleepQueue = NULL; + +_X_EXPORT Bool +ClientSleep (ClientPtr client, ClientSleepProcPtr function, pointer closure) +{ + SleepQueuePtr q; + + q = (SleepQueuePtr) xalloc (sizeof *q); + if (!q) + return FALSE; + + IgnoreClient (client); + q->next = sleepQueue; + q->client = client; + q->function = function; + q->closure = closure; + sleepQueue = q; + return TRUE; +} + +Bool +ClientSignal (ClientPtr client) +{ + SleepQueuePtr q; + + for (q = sleepQueue; q; q = q->next) + if (q->client == client) + { + return QueueWorkProc (q->function, q->client, q->closure); + } + return FALSE; +} + +_X_EXPORT void +ClientWakeup (ClientPtr client) +{ + SleepQueuePtr q, *prev; + + prev = &sleepQueue; + while ( (q = *prev) ) + { + if (q->client == client) + { + *prev = q->next; + xfree (q); + if (client->clientGone) + /* Oops -- new zombie cleanup code ensures this only + * happens from inside CloseDownClient; don't want to + * recurse here... + */ + /* CloseDownClient(client) */; + else + AttendClient (client); + break; + } + prev = &q->next; + } +} + +Bool +ClientIsAsleep (ClientPtr client) +{ + SleepQueuePtr q; + + for (q = sleepQueue; q; q = q->next) + if (q->client == client) + return TRUE; + return FALSE; +} + +/* + * Generic Callback Manager + */ + +/* ===== Private Procedures ===== */ + +static int numCallbackListsToCleanup = 0; +static CallbackListPtr **listsToCleanup = NULL; + +static Bool +_AddCallback( + CallbackListPtr *pcbl, + CallbackProcPtr callback, + pointer data) +{ + CallbackPtr cbr; + + cbr = (CallbackPtr) xalloc(sizeof(CallbackRec)); + if (!cbr) + return FALSE; + cbr->proc = callback; + cbr->data = data; + cbr->next = (*pcbl)->list; + cbr->deleted = FALSE; + (*pcbl)->list = cbr; + return TRUE; +} + +static Bool +_DeleteCallback( + CallbackListPtr *pcbl, + CallbackProcPtr callback, + pointer data) +{ + CallbackListPtr cbl = *pcbl; + CallbackPtr cbr, pcbr; + + for (pcbr = NULL, cbr = cbl->list; + cbr != NULL; + pcbr = cbr, cbr = cbr->next) + { + if ((cbr->proc == callback) && (cbr->data == data)) + break; + } + if (cbr != NULL) + { + if (cbl->inCallback) + { + ++(cbl->numDeleted); + cbr->deleted = TRUE; + } + else + { + if (pcbr == NULL) + cbl->list = cbr->next; + else + pcbr->next = cbr->next; + xfree(cbr); + } + return TRUE; + } + return FALSE; +} + +static void +_CallCallbacks( + CallbackListPtr *pcbl, + pointer call_data) +{ + CallbackListPtr cbl = *pcbl; + CallbackPtr cbr, pcbr; + + ++(cbl->inCallback); + for (cbr = cbl->list; cbr != NULL; cbr = cbr->next) + { + (*(cbr->proc)) (pcbl, cbr->data, call_data); + } + --(cbl->inCallback); + + if (cbl->inCallback) return; + + /* Was the entire list marked for deletion? */ + + if (cbl->deleted) + { + DeleteCallbackList(pcbl); + return; + } + + /* Were some individual callbacks on the list marked for deletion? + * If so, do the deletions. + */ + + if (cbl->numDeleted) + { + for (pcbr = NULL, cbr = cbl->list; (cbr != NULL) && cbl->numDeleted; ) + { + if (cbr->deleted) + { + if (pcbr) + { + cbr = cbr->next; + xfree(pcbr->next); + pcbr->next = cbr; + } else + { + cbr = cbr->next; + xfree(cbl->list); + cbl->list = cbr; + } + cbl->numDeleted--; + } + else /* this one wasn't deleted */ + { + pcbr = cbr; + cbr = cbr->next; + } + } + } +} + +static void +_DeleteCallbackList( + CallbackListPtr *pcbl) +{ + CallbackListPtr cbl = *pcbl; + CallbackPtr cbr, nextcbr; + int i; + + if (cbl->inCallback) + { + cbl->deleted = TRUE; + return; + } + + for (i = 0; i < numCallbackListsToCleanup; i++) + { + if ((listsToCleanup[i] = pcbl) != 0) + { + listsToCleanup[i] = NULL; + break; + } + } + + for (cbr = cbl->list; cbr != NULL; cbr = nextcbr) + { + nextcbr = cbr->next; + xfree(cbr); + } + xfree(cbl); + *pcbl = NULL; +} + +static CallbackFuncsRec default_cbfuncs = +{ + _AddCallback, + _DeleteCallback, + _CallCallbacks, + _DeleteCallbackList +}; + +static Bool +CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs) +{ + CallbackListPtr cbl; + int i; + + if (!pcbl) return FALSE; + cbl = (CallbackListPtr) xalloc(sizeof(CallbackListRec)); + if (!cbl) return FALSE; + cbl->funcs = cbfuncs ? *cbfuncs : default_cbfuncs; + cbl->inCallback = 0; + cbl->deleted = FALSE; + cbl->numDeleted = 0; + cbl->list = NULL; + *pcbl = cbl; + + for (i = 0; i < numCallbackListsToCleanup; i++) + { + if (!listsToCleanup[i]) + { + listsToCleanup[i] = pcbl; + return TRUE; + } + } + + listsToCleanup = (CallbackListPtr **)xnfrealloc(listsToCleanup, + sizeof(CallbackListPtr *) * (numCallbackListsToCleanup+1)); + listsToCleanup[numCallbackListsToCleanup] = pcbl; + numCallbackListsToCleanup++; + return TRUE; +} + +/* ===== Public Procedures ===== */ + +_X_EXPORT Bool +AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data) +{ + if (!pcbl) return FALSE; + if (!*pcbl) + { /* list hasn't been created yet; go create it */ + if (!CreateCallbackList(pcbl, (CallbackFuncsPtr)NULL)) + return FALSE; + } + return ((*(*pcbl)->funcs.AddCallback) (pcbl, callback, data)); +} + +_X_EXPORT Bool +DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data) +{ + if (!pcbl || !*pcbl) return FALSE; + return ((*(*pcbl)->funcs.DeleteCallback) (pcbl, callback, data)); +} + +void +CallCallbacks(CallbackListPtr *pcbl, pointer call_data) +{ + if (!pcbl || !*pcbl) return; + (*(*pcbl)->funcs.CallCallbacks) (pcbl, call_data); +} + +void +DeleteCallbackList(CallbackListPtr *pcbl) +{ + if (!pcbl || !*pcbl) return; + (*(*pcbl)->funcs.DeleteCallbackList) (pcbl); +} + +void +InitCallbackManager(void) +{ + int i; + + for (i = 0; i < numCallbackListsToCleanup; i++) + { + DeleteCallbackList(listsToCleanup[i]); + } + if (listsToCleanup) xfree(listsToCleanup); + + numCallbackListsToCleanup = 0; + listsToCleanup = NULL; +} diff --git a/xorg-server-1.4/dix/events.c b/xorg-server-1.4/dix/events.c new file mode 100644 index 0000000..7b4cab0 --- /dev/null +++ b/xorg-server-1.4/dix/events.c @@ -0,0 +1,5024 @@ +/************************************************************ + +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 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. + +********************************************************/ + +/* The panoramix components contained the following notice */ +/***************************************************************** + +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. + +******************************************************************/ + +/***************************************************************** + +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. + +******************************************************************/ + +/** @file + * This file handles event delivery and a big part of the server-side protocol + * handling (the parts for input devices). + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "misc.h" +#include "resource.h" +#define NEED_EVENTS +#define NEED_REPLIES +#include +#include "windowstr.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "cursorstr.h" + +#include "dixstruct.h" +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif +#include "globals.h" + +#ifdef XKB +#include +#include +extern Bool XkbFilterEvents(ClientPtr, int, xEvent *); +#endif + +#include "xace.h" + +#ifdef XSERVER_DTRACE +#include +typedef const char *string; +#include "Xserver-dtrace.h" +#endif + +#ifdef XEVIE +extern WindowPtr *WindowTable; +extern int xevieFlag; +extern int xevieClientIndex; +extern DeviceIntPtr xeviemouse; +extern DeviceIntPtr xeviekb; +extern Mask xevieMask; +extern Mask xevieFilters[128]; +extern int xevieEventSent; +extern int xevieKBEventSent; +int xeviegrabState = 0; +#endif + +#include +#include "exglobals.h" +#include "exevents.h" +#include "exglobals.h" +#include "extnsionst.h" + +#include "dixevents.h" +#include "dixgrabs.h" +#include "dispatch.h" +/** + * Extension events type numbering starts at EXTENSION_EVENT_BASE. + */ +#define EXTENSION_EVENT_BASE 64 + +#define NoSuchEvent 0x80000000 /* so doesn't match NoEventMask */ +#define StructureAndSubMask ( StructureNotifyMask | SubstructureNotifyMask ) +#define AllButtonsMask ( \ + Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask ) +#define MotionMask ( \ + PointerMotionMask | Button1MotionMask | \ + Button2MotionMask | Button3MotionMask | Button4MotionMask | \ + Button5MotionMask | ButtonMotionMask ) +#define PropagateMask ( \ + KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | \ + MotionMask ) +#define PointerGrabMask ( \ + ButtonPressMask | ButtonReleaseMask | \ + EnterWindowMask | LeaveWindowMask | \ + PointerMotionHintMask | KeymapStateMask | \ + MotionMask ) +#define AllModifiersMask ( \ + ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ + Mod3Mask | Mod4Mask | Mod5Mask ) +#define AllEventMasks (lastEventMask|(lastEventMask-1)) +/* + * The following relies on the fact that the ButtonMotionMasks are equal + * to the corresponding ButtonMasks from the current modifier/button state. + */ +#define Motion_Filter(class) (PointerMotionMask | \ + (class)->state | (class)->motionMask) + + +#define WID(w) ((w) ? ((w)->drawable.id) : 0) + +#define XE_KBPTR (xE->u.keyButtonPointer) + + +#define rClient(obj) (clients[CLIENT_ID((obj)->resource)]) + +_X_EXPORT CallbackListPtr EventCallback; +_X_EXPORT CallbackListPtr DeviceEventCallback; + +#define DNPMCOUNT 8 + +Mask DontPropagateMasks[DNPMCOUNT]; +static int DontPropagateRefCnts[DNPMCOUNT]; + +/** + * Main input device struct. + * inputInfo.pointer + * is the core pointer. Referred to as "virtual core pointer", "VCP", + * "core pointer" or inputInfo.pointer. There is exactly one core pointer, + * but multiple devices may send core events. If a device generates core + * events, those events will appear to originate from the core pointer. + * + * inputInfo.keyboard + * is the core keyboard ("virtual core keyboard", "VCK", "core keyboard"). + * See inputInfo.pointer. + * + * inputInfo.devices + * linked list containing all devices including VCK and VCP. The VCK will + * always be the first entry, the VCP the second entry in the device list. + * + * inputInfo.off_devices + * Devices that have not been initialized and are thus turned off. + * + * inputInfo.numDevices + * Total number of devices. + */ +_X_EXPORT InputInfo inputInfo; + +static struct { + QdEventPtr pending, *pendtail; + DeviceIntPtr replayDev; /* kludgy rock to put flag for */ + WindowPtr replayWin; /* ComputeFreezes */ + Bool playingEvents; + TimeStamp time; +} syncEvents; + +/* + * The window trace information is used to avoid having to compute all the + * windows between the root and the current pointer window each time a button + * or key goes down. The grabs on each of those windows must be checked. + * + * @see XYToWindow() for a documentation on how the array is set up. + */ +static WindowPtr *spriteTrace = (WindowPtr *)NULL; +#define ROOT spriteTrace[0] +static int spriteTraceSize = 0; +static int spriteTraceGood; + +/** + * DIX sprite information. This is the sprite as seen from the DIX. It does + * not represent the actual sprite rendered to the screen. + * + */ +static struct { + CursorPtr current; + BoxRec hotLimits; /* logical constraints of hot spot */ + Bool confined; /* confined to screen */ +#if defined(SHAPE) || defined(PANORAMIX) + RegionPtr hotShape; /* additional logical shape constraint */ +#endif + BoxRec physLimits; /* physical constraints of hot spot */ + WindowPtr win; /* window of logical position */ + HotSpot hot; /* logical pointer position */ + HotSpot hotPhys; /* physical pointer position */ +#ifdef PANORAMIX + ScreenPtr screen; /* all others are in Screen 0 coordinates */ + RegionRec Reg1; /* Region 1 for confining motion */ + RegionRec Reg2; /* Region 2 for confining virtual motion */ + WindowPtr windows[MAXSCREENS]; + WindowPtr confineWin; /* confine window */ +#endif +} sprite; /* info about the cursor sprite */ + +#ifdef XEVIE +_X_EXPORT WindowPtr xeviewin; +_X_EXPORT HotSpot xeviehot; +#endif + +static void DoEnterLeaveEvents( + WindowPtr fromWin, + WindowPtr toWin, + int mode +); + +static WindowPtr XYToWindow( + int x, + int y +); + +/** + * Max event opcode. + */ +extern int lastEvent; + +static Mask lastEventMask; + +#ifdef XINPUT +extern int DeviceMotionNotify; +#endif + +#define CantBeFiltered NoEventMask +static Mask filters[128] = +{ + NoSuchEvent, /* 0 */ + NoSuchEvent, /* 1 */ + KeyPressMask, /* KeyPress */ + KeyReleaseMask, /* KeyRelease */ + ButtonPressMask, /* ButtonPress */ + ButtonReleaseMask, /* ButtonRelease */ + PointerMotionMask, /* MotionNotify (initial state) */ + EnterWindowMask, /* EnterNotify */ + LeaveWindowMask, /* LeaveNotify */ + FocusChangeMask, /* FocusIn */ + FocusChangeMask, /* FocusOut */ + KeymapStateMask, /* KeymapNotify */ + ExposureMask, /* Expose */ + CantBeFiltered, /* GraphicsExpose */ + CantBeFiltered, /* NoExpose */ + VisibilityChangeMask, /* VisibilityNotify */ + SubstructureNotifyMask, /* CreateNotify */ + StructureAndSubMask, /* DestroyNotify */ + StructureAndSubMask, /* UnmapNotify */ + StructureAndSubMask, /* MapNotify */ + SubstructureRedirectMask, /* MapRequest */ + StructureAndSubMask, /* ReparentNotify */ + StructureAndSubMask, /* ConfigureNotify */ + SubstructureRedirectMask, /* ConfigureRequest */ + StructureAndSubMask, /* GravityNotify */ + ResizeRedirectMask, /* ResizeRequest */ + StructureAndSubMask, /* CirculateNotify */ + SubstructureRedirectMask, /* CirculateRequest */ + PropertyChangeMask, /* PropertyNotify */ + CantBeFiltered, /* SelectionClear */ + CantBeFiltered, /* SelectionRequest */ + CantBeFiltered, /* SelectionNotify */ + ColormapChangeMask, /* ColormapNotify */ + CantBeFiltered, /* ClientMessage */ + CantBeFiltered /* MappingNotify */ +}; + +static CARD8 criticalEvents[32] = +{ + 0x7c /* key and button events */ +}; + +#ifdef PANORAMIX +static void ConfineToShape(RegionPtr shape, int *px, int *py); +static void PostNewCursor(void); + +#define SyntheticMotion(x, y) \ + PostSyntheticMotion(x, y, noPanoramiXExtension ? 0 : \ + sprite.screen->myNum, \ + syncEvents.playingEvents ? \ + syncEvents.time.milliseconds : \ + currentTime.milliseconds); + +static Bool +XineramaSetCursorPosition( + int x, + int y, + Bool generateEvent +){ + ScreenPtr pScreen; + BoxRec box; + int i; + + /* x,y are in Screen 0 coordinates. We need to decide what Screen + to send the message too and what the coordinates relative to + that screen are. */ + + pScreen = sprite.screen; + x += panoramiXdataPtr[0].x; + y += panoramiXdataPtr[0].y; + + if(!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum], + x, y, &box)) + { + FOR_NSCREENS(i) + { + if(i == pScreen->myNum) + continue; + if(POINT_IN_REGION(pScreen, &XineramaScreenRegions[i], x, y, &box)) + { + pScreen = screenInfo.screens[i]; + break; + } + } + } + + sprite.screen = pScreen; + sprite.hotPhys.x = x - panoramiXdataPtr[0].x; + sprite.hotPhys.y = y - panoramiXdataPtr[0].y; + x -= panoramiXdataPtr[pScreen->myNum].x; + y -= panoramiXdataPtr[pScreen->myNum].y; + + return (*pScreen->SetCursorPosition)(pScreen, x, y, generateEvent); +} + + +static void +XineramaConstrainCursor(void) +{ + ScreenPtr pScreen = sprite.screen; + BoxRec newBox = sprite.physLimits; + + /* Translate the constraining box to the screen + the sprite is actually on */ + newBox.x1 += panoramiXdataPtr[0].x - panoramiXdataPtr[pScreen->myNum].x; + newBox.x2 += panoramiXdataPtr[0].x - panoramiXdataPtr[pScreen->myNum].x; + newBox.y1 += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y; + newBox.y2 += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y; + + (* pScreen->ConstrainCursor)(pScreen, &newBox); +} + +static void +XineramaCheckPhysLimits( + CursorPtr cursor, + Bool generateEvents +){ + HotSpot new; + + if (!cursor) + return; + + new = sprite.hotPhys; + + /* I don't care what the DDX has to say about it */ + sprite.physLimits = sprite.hotLimits; + + /* constrain the pointer to those limits */ + if (new.x < sprite.physLimits.x1) + new.x = sprite.physLimits.x1; + else + if (new.x >= sprite.physLimits.x2) + new.x = sprite.physLimits.x2 - 1; + if (new.y < sprite.physLimits.y1) + new.y = sprite.physLimits.y1; + else + if (new.y >= sprite.physLimits.y2) + new.y = sprite.physLimits.y2 - 1; + + if (sprite.hotShape) /* more work if the shape is a mess */ + ConfineToShape(sprite.hotShape, &new.x, &new.y); + + if((new.x != sprite.hotPhys.x) || (new.y != sprite.hotPhys.y)) + { + XineramaSetCursorPosition (new.x, new.y, generateEvents); + if (!generateEvents) + SyntheticMotion(new.x, new.y); + } + + /* Tell DDX what the limits are */ + XineramaConstrainCursor(); +} + + +static Bool +XineramaSetWindowPntrs(WindowPtr pWin) +{ + if(pWin == WindowTable[0]) { + memcpy(sprite.windows, WindowTable, + PanoramiXNumScreens*sizeof(WindowPtr)); + } else { + PanoramiXRes *win; + int i; + + win = (PanoramiXRes*)LookupIDByType(pWin->drawable.id, XRT_WINDOW); + + if(!win) + return FALSE; + + for(i = 0; i < PanoramiXNumScreens; i++) { + sprite.windows[i] = LookupIDByType(win->info[i].id, RT_WINDOW); + if(!sprite.windows[i]) /* window is being unmapped */ + return FALSE; + } + } + return TRUE; +} + +static void +XineramaCheckVirtualMotion( + QdEventPtr qe, + WindowPtr pWin +){ + + if (qe) + { + sprite.hot.pScreen = qe->pScreen; /* should always be Screen 0 */ + sprite.hot.x = qe->event->u.keyButtonPointer.rootX; + sprite.hot.y = qe->event->u.keyButtonPointer.rootY; + pWin = inputInfo.pointer->grab ? inputInfo.pointer->grab->confineTo : + NullWindow; + } + if (pWin) + { + int x, y, off_x, off_y, i; + BoxRec lims; + + if(!XineramaSetWindowPntrs(pWin)) + return; + + i = PanoramiXNumScreens - 1; + + REGION_COPY(sprite.screen, &sprite.Reg2, + &sprite.windows[i]->borderSize); + off_x = panoramiXdataPtr[i].x; + off_y = panoramiXdataPtr[i].y; + + while(i--) { + x = off_x - panoramiXdataPtr[i].x; + y = off_y - panoramiXdataPtr[i].y; + + if(x || y) + REGION_TRANSLATE(sprite.screen, &sprite.Reg2, x, y); + + REGION_UNION(sprite.screen, &sprite.Reg2, &sprite.Reg2, + &sprite.windows[i]->borderSize); + + off_x = panoramiXdataPtr[i].x; + off_y = panoramiXdataPtr[i].y; + } + + lims = *REGION_EXTENTS(sprite.screen, &sprite.Reg2); + + if (sprite.hot.x < lims.x1) + sprite.hot.x = lims.x1; + else if (sprite.hot.x >= lims.x2) + sprite.hot.x = lims.x2 - 1; + if (sprite.hot.y < lims.y1) + sprite.hot.y = lims.y1; + else if (sprite.hot.y >= lims.y2) + sprite.hot.y = lims.y2 - 1; + + if (REGION_NUM_RECTS(&sprite.Reg2) > 1) + ConfineToShape(&sprite.Reg2, &sprite.hot.x, &sprite.hot.y); + + if (qe) + { + qe->pScreen = sprite.hot.pScreen; + qe->event->u.keyButtonPointer.rootX = sprite.hot.x; + qe->event->u.keyButtonPointer.rootY = sprite.hot.y; + } + } +#ifdef XEVIE + xeviehot.x = sprite.hot.x; + xeviehot.y = sprite.hot.y; +#endif +} + + +static Bool +XineramaCheckMotion(xEvent *xE) +{ + WindowPtr prevSpriteWin = sprite.win; + + if (xE && !syncEvents.playingEvents) + { + /* Motion events entering DIX get translated to Screen 0 + coordinates. Replayed events have already been + translated since they've entered DIX before */ + XE_KBPTR.rootX += panoramiXdataPtr[sprite.screen->myNum].x - + panoramiXdataPtr[0].x; + XE_KBPTR.rootY += panoramiXdataPtr[sprite.screen->myNum].y - + panoramiXdataPtr[0].y; + sprite.hot.x = XE_KBPTR.rootX; + sprite.hot.y = XE_KBPTR.rootY; + if (sprite.hot.x < sprite.physLimits.x1) + sprite.hot.x = sprite.physLimits.x1; + else if (sprite.hot.x >= sprite.physLimits.x2) + sprite.hot.x = sprite.physLimits.x2 - 1; + if (sprite.hot.y < sprite.physLimits.y1) + sprite.hot.y = sprite.physLimits.y1; + else if (sprite.hot.y >= sprite.physLimits.y2) + sprite.hot.y = sprite.physLimits.y2 - 1; + + if (sprite.hotShape) + ConfineToShape(sprite.hotShape, &sprite.hot.x, &sprite.hot.y); + + sprite.hotPhys = sprite.hot; + if ((sprite.hotPhys.x != XE_KBPTR.rootX) || + (sprite.hotPhys.y != XE_KBPTR.rootY)) + { + XineramaSetCursorPosition( + sprite.hotPhys.x, sprite.hotPhys.y, FALSE); + } + XE_KBPTR.rootX = sprite.hot.x; + XE_KBPTR.rootY = sprite.hot.y; + } + +#ifdef XEVIE + xeviehot.x = sprite.hot.x; + xeviehot.y = sprite.hot.y; + xeviewin = +#endif + sprite.win = XYToWindow(sprite.hot.x, sprite.hot.y); + + if (sprite.win != prevSpriteWin) + { + if (prevSpriteWin != NullWindow) { + if (!xE) + UpdateCurrentTimeIf(); + DoEnterLeaveEvents(prevSpriteWin, sprite.win, NotifyNormal); + } + PostNewCursor(); + return FALSE; + } + return TRUE; +} + + +static void +XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents) +{ + + if (syncEvents.playingEvents) + { + XineramaCheckVirtualMotion((QdEventPtr)NULL, pWin); + SyntheticMotion(sprite.hot.x, sprite.hot.y); + } + else + { + int x, y, off_x, off_y, i; + + if(!XineramaSetWindowPntrs(pWin)) + return; + + i = PanoramiXNumScreens - 1; + + REGION_COPY(sprite.screen, &sprite.Reg1, + &sprite.windows[i]->borderSize); + off_x = panoramiXdataPtr[i].x; + off_y = panoramiXdataPtr[i].y; + + while(i--) { + x = off_x - panoramiXdataPtr[i].x; + y = off_y - panoramiXdataPtr[i].y; + + if(x || y) + REGION_TRANSLATE(sprite.screen, &sprite.Reg1, x, y); + + REGION_UNION(sprite.screen, &sprite.Reg1, &sprite.Reg1, + &sprite.windows[i]->borderSize); + + off_x = panoramiXdataPtr[i].x; + off_y = panoramiXdataPtr[i].y; + } + + sprite.hotLimits = *REGION_EXTENTS(sprite.screen, &sprite.Reg1); + + if(REGION_NUM_RECTS(&sprite.Reg1) > 1) + sprite.hotShape = &sprite.Reg1; + else + sprite.hotShape = NullRegion; + + sprite.confined = FALSE; + sprite.confineWin = (pWin == WindowTable[0]) ? NullWindow : pWin; + + XineramaCheckPhysLimits(sprite.current, generateEvents); + } +} + + +static void +XineramaChangeToCursor(CursorPtr cursor) +{ + if (cursor != sprite.current) + { + if ((sprite.current->bits->xhot != cursor->bits->xhot) || + (sprite.current->bits->yhot != cursor->bits->yhot)) + XineramaCheckPhysLimits(cursor, FALSE); + (*sprite.screen->DisplayCursor)(sprite.screen, cursor); + FreeCursor(sprite.current, (Cursor)0); + sprite.current = cursor; + sprite.current->refcnt++; + } +} + +#else +#define SyntheticMotion(x, y) \ + PostSyntheticMotion(x, y, \ + 0, \ + syncEvents.playingEvents ? \ + syncEvents.time.milliseconds : \ + currentTime.milliseconds); + +#endif /* PANORAMIX */ + +void +SetMaskForEvent(Mask mask, int event) +{ + if ((event < LASTEvent) || (event >= 128)) + FatalError("SetMaskForEvent: bogus event number"); + filters[event] = mask; +} + +_X_EXPORT void +SetCriticalEvent(int event) +{ + if (event >= 128) + FatalError("SetCriticalEvent: bogus event number"); + criticalEvents[event >> 3] |= 1 << (event & 7); +} + +#ifdef SHAPE +static void +ConfineToShape(RegionPtr shape, int *px, int *py) +{ + BoxRec box; + int x = *px, y = *py; + int incx = 1, incy = 1; + + if (POINT_IN_REGION(sprite.hot.pScreen, shape, x, y, &box)) + return; + box = *REGION_EXTENTS(sprite.hot.pScreen, shape); + /* this is rather crude */ + do { + x += incx; + if (x >= box.x2) + { + incx = -1; + x = *px - 1; + } + else if (x < box.x1) + { + incx = 1; + x = *px; + y += incy; + if (y >= box.y2) + { + incy = -1; + y = *py - 1; + } + else if (y < box.y1) + return; /* should never get here! */ + } + } while (!POINT_IN_REGION(sprite.hot.pScreen, shape, x, y, &box)); + *px = x; + *py = y; +} +#endif + +static void +CheckPhysLimits( + CursorPtr cursor, + Bool generateEvents, + Bool confineToScreen, + ScreenPtr pScreen) +{ + HotSpot new; + + if (!cursor) + return; + new = sprite.hotPhys; + if (pScreen) + new.pScreen = pScreen; + else + pScreen = new.pScreen; + (*pScreen->CursorLimits) (pScreen, cursor, &sprite.hotLimits, + &sprite.physLimits); + sprite.confined = confineToScreen; + (* pScreen->ConstrainCursor)(pScreen, &sprite.physLimits); + if (new.x < sprite.physLimits.x1) + new.x = sprite.physLimits.x1; + else + if (new.x >= sprite.physLimits.x2) + new.x = sprite.physLimits.x2 - 1; + if (new.y < sprite.physLimits.y1) + new.y = sprite.physLimits.y1; + else + if (new.y >= sprite.physLimits.y2) + new.y = sprite.physLimits.y2 - 1; +#ifdef SHAPE + if (sprite.hotShape) + ConfineToShape(sprite.hotShape, &new.x, &new.y); +#endif + if ((pScreen != sprite.hotPhys.pScreen) || + (new.x != sprite.hotPhys.x) || (new.y != sprite.hotPhys.y)) + { + if (pScreen != sprite.hotPhys.pScreen) + sprite.hotPhys = new; + (*pScreen->SetCursorPosition) (pScreen, new.x, new.y, generateEvents); + if (!generateEvents) + SyntheticMotion(new.x, new.y); + } +} + +static void +CheckVirtualMotion( + QdEventPtr qe, + WindowPtr pWin) +{ +#ifdef PANORAMIX + if(!noPanoramiXExtension) { + XineramaCheckVirtualMotion(qe, pWin); + return; + } +#endif + if (qe) + { + sprite.hot.pScreen = qe->pScreen; + sprite.hot.x = qe->event->u.keyButtonPointer.rootX; + sprite.hot.y = qe->event->u.keyButtonPointer.rootY; + pWin = inputInfo.pointer->grab ? inputInfo.pointer->grab->confineTo : + NullWindow; + } + if (pWin) + { + BoxRec lims; + + if (sprite.hot.pScreen != pWin->drawable.pScreen) + { + sprite.hot.pScreen = pWin->drawable.pScreen; + sprite.hot.x = sprite.hot.y = 0; + } + lims = *REGION_EXTENTS(pWin->drawable.pScreen, &pWin->borderSize); + if (sprite.hot.x < lims.x1) + sprite.hot.x = lims.x1; + else if (sprite.hot.x >= lims.x2) + sprite.hot.x = lims.x2 - 1; + if (sprite.hot.y < lims.y1) + sprite.hot.y = lims.y1; + else if (sprite.hot.y >= lims.y2) + sprite.hot.y = lims.y2 - 1; +#ifdef SHAPE + if (wBoundingShape(pWin)) + ConfineToShape(&pWin->borderSize, &sprite.hot.x, &sprite.hot.y); +#endif + if (qe) + { + qe->pScreen = sprite.hot.pScreen; + qe->event->u.keyButtonPointer.rootX = sprite.hot.x; + qe->event->u.keyButtonPointer.rootY = sprite.hot.y; + } + } +#ifdef XEVIE + xeviehot.x = sprite.hot.x; + xeviehot.y = sprite.hot.y; +#endif + ROOT = WindowTable[sprite.hot.pScreen->myNum]; +} + +static void +ConfineCursorToWindow(WindowPtr pWin, Bool generateEvents, Bool confineToScreen) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + +#ifdef PANORAMIX + if(!noPanoramiXExtension) { + XineramaConfineCursorToWindow(pWin, generateEvents); + return; + } +#endif + + if (syncEvents.playingEvents) + { + CheckVirtualMotion((QdEventPtr)NULL, pWin); + SyntheticMotion(sprite.hot.x, sprite.hot.y); + } + else + { + sprite.hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize); +#ifdef SHAPE + sprite.hotShape = wBoundingShape(pWin) ? &pWin->borderSize + : NullRegion; +#endif + CheckPhysLimits(sprite.current, generateEvents, confineToScreen, + pScreen); + } +} + +_X_EXPORT Bool +PointerConfinedToScreen(void) +{ + return sprite.confined; +} + +/** + * Update the sprite cursor to the given cursor. + * + * ChangeToCursor() will display the new cursor and free the old cursor (if + * applicable). If the provided cursor is already the updated cursor, nothing + * happens. + */ +static void +ChangeToCursor(CursorPtr cursor) +{ +#ifdef PANORAMIX + if(!noPanoramiXExtension) { + XineramaChangeToCursor(cursor); + return; + } +#endif + + if (cursor != sprite.current) + { + if ((sprite.current->bits->xhot != cursor->bits->xhot) || + (sprite.current->bits->yhot != cursor->bits->yhot)) + CheckPhysLimits(cursor, FALSE, sprite.confined, + (ScreenPtr)NULL); + (*sprite.hotPhys.pScreen->DisplayCursor) (sprite.hotPhys.pScreen, + cursor); + FreeCursor(sprite.current, (Cursor)0); + sprite.current = cursor; + sprite.current->refcnt++; + } +} + +/** + * @returns true if b is a descendent of a + */ +Bool +IsParent(WindowPtr a, WindowPtr b) +{ + for (b = b->parent; b; b = b->parent) + if (b == a) return TRUE; + return FALSE; +} + +/** + * Update the cursor displayed on the screen. + * + * Called whenever a cursor may have changed shape or position. + */ +static void +PostNewCursor(void) +{ + WindowPtr win; + GrabPtr grab = inputInfo.pointer->grab; + + if (syncEvents.playingEvents) + return; + if (grab) + { + if (grab->cursor) + { + ChangeToCursor(grab->cursor); + return; + } + if (IsParent(grab->window, sprite.win)) + win = sprite.win; + else + win = grab->window; + } + else + win = sprite.win; + for (; win; win = win->parent) + if (win->optional && win->optional->cursor != NullCursor) + { + ChangeToCursor(win->optional->cursor); + return; + } +} + +/** + * @return root window of current active screen. + */ +_X_EXPORT WindowPtr +GetCurrentRootWindow(void) +{ + return ROOT; +} + +/** + * @return window underneath the cursor sprite. + */ +_X_EXPORT WindowPtr +GetSpriteWindow(void) +{ + return sprite.win; +} + +/** + * @return current sprite cursor. + */ +_X_EXPORT CursorPtr +GetSpriteCursor(void) +{ + return sprite.current; +} + +/** + * Set x/y current sprite position in screen coordinates. + */ +_X_EXPORT void +GetSpritePosition(int *px, int *py) +{ + *px = sprite.hotPhys.x; + *py = sprite.hotPhys.y; +} + +#ifdef PANORAMIX +_X_EXPORT int +XineramaGetCursorScreen(void) +{ + if(!noPanoramiXExtension) { + return sprite.screen->myNum; + } else { + return 0; + } +} +#endif /* PANORAMIX */ + +#define TIMESLOP (5 * 60 * 1000) /* 5 minutes */ + +static void +MonthChangedOrBadTime(xEvent *xE) +{ + /* If the ddx/OS is careless about not processing timestamped events from + * different sources in sorted order, then it's possible for time to go + * backwards when it should not. Here we ensure a decent time. + */ + if ((currentTime.milliseconds - XE_KBPTR.time) > TIMESLOP) + currentTime.months++; + else + XE_KBPTR.time = currentTime.milliseconds; +} + +#define NoticeTime(xE) { \ + if ((xE)->u.keyButtonPointer.time < currentTime.milliseconds) \ + MonthChangedOrBadTime(xE); \ + currentTime.milliseconds = (xE)->u.keyButtonPointer.time; \ + lastDeviceEventTime = currentTime; } + +void +NoticeEventTime(xEvent *xE) +{ + if (!syncEvents.playingEvents) + NoticeTime(xE); +} + +/************************************************************************** + * The following procedures deal with synchronous events * + **************************************************************************/ + +void +EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) +{ + QdEventPtr tail = *syncEvents.pendtail; + QdEventPtr qe; + xEvent *qxE; + + NoticeTime(xE); + +#ifdef XKB + /* Fix for key repeating bug. */ + if (device->key != NULL && device->key->xkbInfo != NULL && + xE->u.u.type == KeyRelease) + AccessXCancelRepeatKey(device->key->xkbInfo, xE->u.u.detail); +#endif + + if (DeviceEventCallback) + { + DeviceEventInfoRec eventinfo; + /* The RECORD spec says that the root window field of motion events + * must be valid. At this point, it hasn't been filled in yet, so + * we do it here. The long expression below is necessary to get + * the current root window; the apparently reasonable alternative + * GetCurrentRootWindow()->drawable.id doesn't give you the right + * answer on the first motion event after a screen change because + * the data that GetCurrentRootWindow relies on hasn't been + * updated yet. + */ + if (xE->u.u.type == MotionNotify) + XE_KBPTR.root = + WindowTable[sprite.hotPhys.pScreen->myNum]->drawable.id; + eventinfo.events = xE; + eventinfo.count = count; + CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo); + } + if (xE->u.u.type == MotionNotify) + { +#ifdef PANORAMIX + if(!noPanoramiXExtension) { + XE_KBPTR.rootX += panoramiXdataPtr[sprite.screen->myNum].x - + panoramiXdataPtr[0].x; + XE_KBPTR.rootY += panoramiXdataPtr[sprite.screen->myNum].y - + panoramiXdataPtr[0].y; + } +#endif + sprite.hotPhys.x = XE_KBPTR.rootX; + sprite.hotPhys.y = XE_KBPTR.rootY; + /* do motion compression */ + if (tail && + (tail->event->u.u.type == MotionNotify) && + (tail->pScreen == sprite.hotPhys.pScreen)) + { + tail->event->u.keyButtonPointer.rootX = sprite.hotPhys.x; + tail->event->u.keyButtonPointer.rootY = sprite.hotPhys.y; + tail->event->u.keyButtonPointer.time = XE_KBPTR.time; + tail->months = currentTime.months; + return; + } + } + qe = (QdEventPtr)xalloc(sizeof(QdEventRec) + (count * sizeof(xEvent))); + if (!qe) + return; + qe->next = (QdEventPtr)NULL; + qe->device = device; + qe->pScreen = sprite.hotPhys.pScreen; + qe->months = currentTime.months; + qe->event = (xEvent *)(qe + 1); + qe->evcount = count; + for (qxE = qe->event; --count >= 0; qxE++, xE++) + *qxE = *xE; + if (tail) + syncEvents.pendtail = &tail->next; + *syncEvents.pendtail = qe; +} + +static void +PlayReleasedEvents(void) +{ + QdEventPtr *prev, qe; + DeviceIntPtr dev; + + prev = &syncEvents.pending; + while ( (qe = *prev) ) + { + if (!qe->device->sync.frozen) + { + *prev = qe->next; + if (*syncEvents.pendtail == *prev) + syncEvents.pendtail = prev; + if (qe->event->u.u.type == MotionNotify) + CheckVirtualMotion(qe, NullWindow); + syncEvents.time.months = qe->months; + syncEvents.time.milliseconds = qe->event->u.keyButtonPointer.time; +#ifdef PANORAMIX + /* Translate back to the sprite screen since processInputProc + will translate from sprite screen to screen 0 upon reentry + to the DIX layer */ + if(!noPanoramiXExtension) { + qe->event->u.keyButtonPointer.rootX += + panoramiXdataPtr[0].x - + panoramiXdataPtr[sprite.screen->myNum].x; + qe->event->u.keyButtonPointer.rootY += + panoramiXdataPtr[0].y - + panoramiXdataPtr[sprite.screen->myNum].y; + } +#endif + (*qe->device->public.processInputProc)(qe->event, qe->device, + qe->evcount); + xfree(qe); + for (dev = inputInfo.devices; dev && dev->sync.frozen; dev = dev->next) + ; + if (!dev) + break; + /* Playing the event may have unfrozen another device. */ + /* So to play it safe, restart at the head of the queue */ + prev = &syncEvents.pending; + } + else + prev = &qe->next; + } +} + +static void +FreezeThaw(DeviceIntPtr dev, Bool frozen) +{ + dev->sync.frozen = frozen; + if (frozen) + dev->public.processInputProc = dev->public.enqueueInputProc; + else + dev->public.processInputProc = dev->public.realInputProc; +} + +void +ComputeFreezes(void) +{ + DeviceIntPtr replayDev = syncEvents.replayDev; + int i; + WindowPtr w; + xEvent *xE; + int count; + GrabPtr grab; + DeviceIntPtr dev; + + for (dev = inputInfo.devices; dev; dev = dev->next) + FreezeThaw(dev, dev->sync.other || (dev->sync.state >= FROZEN)); + if (syncEvents.playingEvents || (!replayDev && !syncEvents.pending)) + return; + syncEvents.playingEvents = TRUE; + if (replayDev) + { + xE = replayDev->sync.event; + count = replayDev->sync.evcount; + syncEvents.replayDev = (DeviceIntPtr)NULL; + + w = XYToWindow( XE_KBPTR.rootX, XE_KBPTR.rootY); + for (i = 0; i < spriteTraceGood; i++) + { + if (syncEvents.replayWin == spriteTrace[i]) + { + if (!CheckDeviceGrabs(replayDev, xE, i+1, count)) { + if (replayDev->focus) + DeliverFocusedEvent(replayDev, xE, w, count); + else + DeliverDeviceEvents(w, xE, NullGrab, NullWindow, + replayDev, count); + } + goto playmore; + } + } + /* must not still be in the same stack */ + if (replayDev->focus) + DeliverFocusedEvent(replayDev, xE, w, count); + else + DeliverDeviceEvents(w, xE, NullGrab, NullWindow, replayDev, count); + } +playmore: + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (!dev->sync.frozen) + { + PlayReleasedEvents(); + break; + } + } + syncEvents.playingEvents = FALSE; + /* the following may have been skipped during replay, so do it now */ + if ((grab = inputInfo.pointer->grab) && grab->confineTo) + { + if (grab->confineTo->drawable.pScreen != sprite.hotPhys.pScreen) + sprite.hotPhys.x = sprite.hotPhys.y = 0; + ConfineCursorToWindow(grab->confineTo, TRUE, TRUE); + } + else + ConfineCursorToWindow(WindowTable[sprite.hotPhys.pScreen->myNum], + TRUE, FALSE); + PostNewCursor(); +} + +#ifdef RANDR +void +ScreenRestructured (ScreenPtr pScreen) +{ + GrabPtr grab; + + if ((grab = inputInfo.pointer->grab) && grab->confineTo) + { + if (grab->confineTo->drawable.pScreen != sprite.hotPhys.pScreen) + sprite.hotPhys.x = sprite.hotPhys.y = 0; + ConfineCursorToWindow(grab->confineTo, TRUE, TRUE); + } + else + ConfineCursorToWindow(WindowTable[sprite.hotPhys.pScreen->myNum], + TRUE, FALSE); +} +#endif + +void +CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) +{ + GrabPtr grab = thisDev->grab; + DeviceIntPtr dev; + + if (thisMode == GrabModeSync) + thisDev->sync.state = FROZEN_NO_EVENT; + else + { /* free both if same client owns both */ + thisDev->sync.state = THAWED; + if (thisDev->sync.other && + (CLIENT_BITS(thisDev->sync.other->resource) == + CLIENT_BITS(grab->resource))) + thisDev->sync.other = NullGrab; + } + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (dev != thisDev) + { + if (otherMode == GrabModeSync) + dev->sync.other = grab; + else + { /* free both if same client owns both */ + if (dev->sync.other && + (CLIENT_BITS(dev->sync.other->resource) == + CLIENT_BITS(grab->resource))) + dev->sync.other = NullGrab; + } + } + } + ComputeFreezes(); +} + +/** + * Activate a pointer grab on the given device. A pointer grab will cause all + * core pointer events to be delivered to the grabbing client only. Can cause + * the cursor to change if a grab cursor is set. + * + * As a pointer grab can only be issued on the core devices, mouse is always + * inputInfo.pointer. Extension devices are set up for ActivateKeyboardGrab(). + * + * @param mouse The device to grab. + * @param grab The grab structure, needs to be setup. + * @param autoGrab True if the grab was caused by a button down event and not + * explicitely by a client. + */ +void +ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, + TimeStamp time, Bool autoGrab) +{ + WindowPtr oldWin = (mouse->grab) ? mouse->grab->window + : sprite.win; + + if (grab->confineTo) + { + if (grab->confineTo->drawable.pScreen != sprite.hotPhys.pScreen) + sprite.hotPhys.x = sprite.hotPhys.y = 0; + ConfineCursorToWindow(grab->confineTo, FALSE, TRUE); + } + DoEnterLeaveEvents(oldWin, grab->window, NotifyGrab); + mouse->valuator->motionHintWindow = NullWindow; + if (syncEvents.playingEvents) + mouse->grabTime = syncEvents.time; + else + mouse->grabTime = time; + if (grab->cursor) + grab->cursor->refcnt++; + mouse->activeGrab = *grab; + mouse->grab = &mouse->activeGrab; + mouse->fromPassiveGrab = autoGrab; + PostNewCursor(); + CheckGrabForSyncs(mouse,(Bool)grab->pointerMode, (Bool)grab->keyboardMode); +} + +/** + * Delete grab on given device, update the sprite. + * + * As a pointer grab can only be issued on the core devices, mouse is always + * inputInfo.pointer. Extension devices are set up for ActivateKeyboardGrab(). + */ +void +DeactivatePointerGrab(DeviceIntPtr mouse) +{ + GrabPtr grab = mouse->grab; + DeviceIntPtr dev; + + mouse->valuator->motionHintWindow = NullWindow; + mouse->grab = NullGrab; + mouse->sync.state = NOT_GRABBED; + mouse->fromPassiveGrab = FALSE; + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (dev->sync.other == grab) + dev->sync.other = NullGrab; + } + DoEnterLeaveEvents(grab->window, sprite.win, NotifyUngrab); + if (grab->confineTo) + ConfineCursorToWindow(ROOT, FALSE, FALSE); + PostNewCursor(); + if (grab->cursor) + FreeCursor(grab->cursor, (Cursor)0); + ComputeFreezes(); +} + +/** + * Activate a keyboard grab on the given device. + * + * Extension devices have ActivateKeyboardGrab() set as their grabbing proc. + */ +void +ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive) +{ + WindowPtr oldWin; + + if (keybd->grab) + oldWin = keybd->grab->window; + else if (keybd->focus) + oldWin = keybd->focus->win; + else + oldWin = sprite.win; + if (oldWin == FollowKeyboardWin) + oldWin = inputInfo.keyboard->focus->win; + if (keybd->valuator) + keybd->valuator->motionHintWindow = NullWindow; + DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab); + if (syncEvents.playingEvents) + keybd->grabTime = syncEvents.time; + else + keybd->grabTime = time; + keybd->activeGrab = *grab; + keybd->grab = &keybd->activeGrab; + keybd->fromPassiveGrab = passive; + CheckGrabForSyncs(keybd, (Bool)grab->keyboardMode, (Bool)grab->pointerMode); +} + +/** + * Delete keyboard grab for the given device. + */ +void +DeactivateKeyboardGrab(DeviceIntPtr keybd) +{ + GrabPtr grab = keybd->grab; + DeviceIntPtr dev; + WindowPtr focusWin = keybd->focus ? keybd->focus->win + : sprite.win; + + if (focusWin == FollowKeyboardWin) + focusWin = inputInfo.keyboard->focus->win; + if (keybd->valuator) + keybd->valuator->motionHintWindow = NullWindow; + keybd->grab = NullGrab; + keybd->sync.state = NOT_GRABBED; + keybd->fromPassiveGrab = FALSE; + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (dev->sync.other == grab) + dev->sync.other = NullGrab; + } + DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab); + ComputeFreezes(); +} + +void +AllowSome(ClientPtr client, TimeStamp time, DeviceIntPtr thisDev, int newState) +{ + Bool thisGrabbed, otherGrabbed, othersFrozen, thisSynced; + TimeStamp grabTime; + DeviceIntPtr dev; + + thisGrabbed = thisDev->grab && SameClient(thisDev->grab, client); + thisSynced = FALSE; + otherGrabbed = FALSE; + othersFrozen = TRUE; + grabTime = thisDev->grabTime; + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (dev == thisDev) + continue; + if (dev->grab && SameClient(dev->grab, client)) + { + if (!(thisGrabbed || otherGrabbed) || + (CompareTimeStamps(dev->grabTime, grabTime) == LATER)) + grabTime = dev->grabTime; + otherGrabbed = TRUE; + if (thisDev->sync.other == dev->grab) + thisSynced = TRUE; + if (dev->sync.state < FROZEN) + othersFrozen = FALSE; + } + else if (!dev->sync.other || !SameClient(dev->sync.other, client)) + othersFrozen = FALSE; + } + if (!((thisGrabbed && thisDev->sync.state >= FROZEN) || thisSynced)) + return; + if ((CompareTimeStamps(time, currentTime) == LATER) || + (CompareTimeStamps(time, grabTime) == EARLIER)) + return; + switch (newState) + { + case THAWED: /* Async */ + if (thisGrabbed) + thisDev->sync.state = THAWED; + if (thisSynced) + thisDev->sync.other = NullGrab; + ComputeFreezes(); + break; + case FREEZE_NEXT_EVENT: /* Sync */ + if (thisGrabbed) + { + thisDev->sync.state = FREEZE_NEXT_EVENT; + if (thisSynced) + thisDev->sync.other = NullGrab; + ComputeFreezes(); + } + break; + case THAWED_BOTH: /* AsyncBoth */ + if (othersFrozen) + { + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (dev->grab && SameClient(dev->grab, client)) + dev->sync.state = THAWED; + if (dev->sync.other && SameClient(dev->sync.other, client)) + dev->sync.other = NullGrab; + } + ComputeFreezes(); + } + break; + case FREEZE_BOTH_NEXT_EVENT: /* SyncBoth */ + if (othersFrozen) + { + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (dev->grab && SameClient(dev->grab, client)) + dev->sync.state = FREEZE_BOTH_NEXT_EVENT; + if (dev->sync.other && SameClient(dev->sync.other, client)) + dev->sync.other = NullGrab; + } + ComputeFreezes(); + } + break; + case NOT_GRABBED: /* Replay */ + if (thisGrabbed && thisDev->sync.state == FROZEN_WITH_EVENT) + { + if (thisSynced) + thisDev->sync.other = NullGrab; + syncEvents.replayDev = thisDev; + syncEvents.replayWin = thisDev->grab->window; + (*thisDev->DeactivateGrab)(thisDev); + syncEvents.replayDev = (DeviceIntPtr)NULL; + } + break; + case THAW_OTHERS: /* AsyncOthers */ + if (othersFrozen) + { + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (dev == thisDev) + continue; + if (dev->grab && SameClient(dev->grab, client)) + dev->sync.state = THAWED; + if (dev->sync.other && SameClient(dev->sync.other, client)) + dev->sync.other = NullGrab; + } + ComputeFreezes(); + } + break; + } +} + +/** + * Server-side protocol handling for AllowEvents request. + * + * Release some events from a frozen device. Only applicable for core devices. + */ +int +ProcAllowEvents(ClientPtr client) +{ + TimeStamp time; + DeviceIntPtr mouse = inputInfo.pointer; + DeviceIntPtr keybd = inputInfo.keyboard; + REQUEST(xAllowEventsReq); + + REQUEST_SIZE_MATCH(xAllowEventsReq); + time = ClientTimeToServerTime(stuff->time); + switch (stuff->mode) + { + case ReplayPointer: + AllowSome(client, time, mouse, NOT_GRABBED); + break; + case SyncPointer: + AllowSome(client, time, mouse, FREEZE_NEXT_EVENT); + break; + case AsyncPointer: + AllowSome(client, time, mouse, THAWED); + break; + case ReplayKeyboard: + AllowSome(client, time, keybd, NOT_GRABBED); + break; + case SyncKeyboard: + AllowSome(client, time, keybd, FREEZE_NEXT_EVENT); + break; + case AsyncKeyboard: + AllowSome(client, time, keybd, THAWED); + break; + case SyncBoth: + AllowSome(client, time, keybd, FREEZE_BOTH_NEXT_EVENT); + break; + case AsyncBoth: + AllowSome(client, time, keybd, THAWED_BOTH); + break; + default: + client->errorValue = stuff->mode; + return BadValue; + } + return Success; +} + +/** + * Deactivate grabs from any device that has been grabbed by the client. + */ +void +ReleaseActiveGrabs(ClientPtr client) +{ + DeviceIntPtr dev; + Bool done; + + /* XXX CloseDownClient should remove passive grabs before + * releasing active grabs. + */ + do { + done = TRUE; + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (dev->grab && SameClient(dev->grab, client)) + { + (*dev->DeactivateGrab)(dev); + done = FALSE; + } + } + } while (!done); +} + +/************************************************************************** + * The following procedures deal with delivering events * + **************************************************************************/ + +/** + * Deliver the given events to the given client. + * + * More than one event may be delivered at a time. This is the case with + * DeviceMotionNotifies which may be followed by DeviceValuator events. + * + * TryClientEvents() is the last station before actually writing the events to + * the socket. Anything that is not filtered here, will get delivered to the + * client. + * An event is only delivered if + * - mask and filter match up. + * - no other client has a grab on the device that caused the event. + * + * + * @param client The target client to deliver to. + * @param pEvents The events to be delivered. + * @param count Number of elements in pEvents. + * @param mask Event mask as set by the window. + * @param filter Mask based on event type. + * @param grab Possible grab on the device that caused the event. + * + * @return 1 if event was delivered, 0 if not or -1 if grab was not set by the + * client. + */ +_X_EXPORT int +TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, + Mask filter, GrabPtr grab) +{ + int i; + int type; + +#ifdef DEBUG_EVENTS + ErrorF("Event([%d, %d], mask=0x%x), client=%d", + pEvents->u.u.type, pEvents->u.u.detail, mask, client->index); +#endif + if ((client) && (client != serverClient) && (!client->clientGone) && + ((filter == CantBeFiltered) || (mask & filter))) + { + if (grab && !SameClient(grab, client)) + return -1; /* don't send, but notify caller */ + type = pEvents->u.u.type; + if (type == MotionNotify) + { + if (mask & PointerMotionHintMask) + { + if (WID(inputInfo.pointer->valuator->motionHintWindow) == + pEvents->u.keyButtonPointer.event) + { +#ifdef DEBUG_EVENTS + ErrorF("\n"); + ErrorF("motionHintWindow == keyButtonPointer.event\n"); +#endif + return 1; /* don't send, but pretend we did */ + } + pEvents->u.u.detail = NotifyHint; + } + else + { + pEvents->u.u.detail = NotifyNormal; + } + } +#ifdef XINPUT + else + { + if ((type == DeviceMotionNotify) && + MaybeSendDeviceMotionNotifyHint + ((deviceKeyButtonPointer*)pEvents, mask) != 0) + return 1; + } +#endif + type &= 0177; + if (type != KeymapNotify) + { + /* all extension events must have a sequence number */ + for (i = 0; i < count; i++) + pEvents[i].u.u.sequenceNumber = client->sequence; + } + + if (BitIsOn(criticalEvents, type)) + { +#ifdef SMART_SCHEDULE + if (client->smart_priority < SMART_MAX_PRIORITY) + client->smart_priority++; +#endif + SetCriticalOutputPending(); + } + + WriteEventsToClient(client, count, pEvents); +#ifdef DEBUG_EVENTS + ErrorF( " delivered\n"); +#endif + return 1; + } + else + { +#ifdef DEBUG_EVENTS + ErrorF("\n"); +#endif + return 0; + } +} + +/** + * Deliver events to a window. At this point, we do not yet know if the event + * actually needs to be delivered. May activate a grab if the event is a + * button press. + * + * More than one event may be delivered at a time. This is the case with + * DeviceMotionNotifies which may be followed by DeviceValuator events. + * + * @param pWin The window that would get the event. + * @param pEvents The events to be delivered. + * @param count Number of elements in pEvents. + * @param filter Mask based on event type. + * @param grab Possible grab on the device that caused the event. + * @param mskidx Mask index, depending on device that caused event. + * + * @return Number of events delivered to various clients. + */ +int +DeliverEventsToWindow(WindowPtr pWin, xEvent *pEvents, int count, + Mask filter, GrabPtr grab, int mskidx) +{ + int deliveries = 0, nondeliveries = 0; + int attempt; + InputClients *other; + ClientPtr client = NullClient; + Mask deliveryMask = 0; /* If a grab occurs due to a button press, then + this mask is the mask of the grab. */ + int type = pEvents->u.u.type; + + /* CantBeFiltered means only window owner gets the event */ + if ((filter == CantBeFiltered) || !(type & EXTENSION_EVENT_BASE)) + { + /* if nobody ever wants to see this event, skip some work */ + if (filter != CantBeFiltered && + !((wOtherEventMasks(pWin)|pWin->eventMask) & filter)) + return 0; + if ( (attempt = TryClientEvents(wClient(pWin), pEvents, count, + pWin->eventMask, filter, grab)) ) + { + if (attempt > 0) + { + deliveries++; + client = wClient(pWin); + deliveryMask = pWin->eventMask; + } else + nondeliveries--; + } + } + if (filter != CantBeFiltered) + { + if (type & EXTENSION_EVENT_BASE) + { + OtherInputMasks *inputMasks; + + inputMasks = wOtherInputMasks(pWin); + if (!inputMasks || + !(inputMasks->inputEvents[mskidx] & filter)) + return 0; + other = inputMasks->inputClients; + } + else + other = (InputClients *)wOtherClients(pWin); + for (; other; other = other->next) + { + if ( (attempt = TryClientEvents(rClient(other), pEvents, count, + other->mask[mskidx], filter, grab)) ) + { + if (attempt > 0) + { + deliveries++; + client = rClient(other); + deliveryMask = other->mask[mskidx]; + } else + nondeliveries--; + } + } + } + if ((type == ButtonPress) && deliveries && (!grab)) + { + GrabRec tempGrab; + + tempGrab.device = inputInfo.pointer; + tempGrab.resource = client->clientAsMask; + tempGrab.window = pWin; + tempGrab.ownerEvents = (deliveryMask & OwnerGrabButtonMask) ? TRUE : FALSE; + tempGrab.eventMask = deliveryMask; + tempGrab.keyboardMode = GrabModeAsync; + tempGrab.pointerMode = GrabModeAsync; + tempGrab.confineTo = NullWindow; + tempGrab.cursor = NullCursor; + (*inputInfo.pointer->ActivateGrab)(inputInfo.pointer, &tempGrab, + currentTime, TRUE); + } + else if ((type == MotionNotify) && deliveries) + inputInfo.pointer->valuator->motionHintWindow = pWin; +#ifdef XINPUT + else + { + if (((type == DeviceMotionNotify) +#ifdef XKB + || (type == DeviceButtonPress) +#endif + ) && deliveries) + CheckDeviceGrabAndHintWindow (pWin, type, + (deviceKeyButtonPointer*) pEvents, + grab, client, deliveryMask); + } +#endif + if (deliveries) + return deliveries; + return nondeliveries; +} + +/* If the event goes to dontClient, don't send it and return 0. if + send works, return 1 or if send didn't work, return 2. + Only works for core events. +*/ + +#ifdef PANORAMIX +static int +XineramaTryClientEventsResult( + ClientPtr client, + GrabPtr grab, + Mask mask, + Mask filter +){ + if ((client) && (client != serverClient) && (!client->clientGone) && + ((filter == CantBeFiltered) || (mask & filter))) + { + if (grab && !SameClient(grab, client)) return -1; + else return 1; + } + return 0; +} +#endif + +/** + * Try to deliver events to the interested parties. + * + * @param pWin The window that would get the event. + * @param pEvents The events to be delivered. + * @param count Number of elements in pEvents. + * @param filter Mask based on event type. + * @param dontClient Don't deliver to the dontClient. + */ +int +MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, + int count, Mask filter, ClientPtr dontClient) +{ + OtherClients *other; + + + if (pWin->eventMask & filter) + { + if (wClient(pWin) == dontClient) + return 0; +#ifdef PANORAMIX + if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) + return XineramaTryClientEventsResult( + wClient(pWin), NullGrab, pWin->eventMask, filter); +#endif + return TryClientEvents(wClient(pWin), pEvents, count, + pWin->eventMask, filter, NullGrab); + } + for (other = wOtherClients(pWin); other; other = other->next) + { + if (other->mask & filter) + { + if (SameClient(other, dontClient)) + return 0; +#ifdef PANORAMIX + if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) + return XineramaTryClientEventsResult( + rClient(other), NullGrab, other->mask, filter); +#endif + return TryClientEvents(rClient(other), pEvents, count, + other->mask, filter, NullGrab); + } + } + return 2; +} + +/** + * Adjust event fields to comply with the window properties. + * + * @param xE Event to be modified in place + * @param pWin The window to get the information from. + * @param child Child window setting for event (if applicable) + * @param calcChild If True, calculate the child window. + */ +static void +FixUpEventFromWindow( + xEvent *xE, + WindowPtr pWin, + Window child, + Bool calcChild) +{ + if (calcChild) + { + WindowPtr w=spriteTrace[spriteTraceGood-1]; + /* If the search ends up past the root should the child field be + set to none or should the value in the argument be passed + through. It probably doesn't matter since everyone calls + this function with child == None anyway. */ + + while (w) + { + /* If the source window is same as event window, child should be + none. Don't bother going all all the way back to the root. */ + + if (w == pWin) + { + child = None; + break; + } + + if (w->parent == pWin) + { + child = w->drawable.id; + break; + } + w = w->parent; + } + } + XE_KBPTR.root = ROOT->drawable.id; + XE_KBPTR.event = pWin->drawable.id; + if (sprite.hot.pScreen == pWin->drawable.pScreen) + { + XE_KBPTR.sameScreen = xTrue; + XE_KBPTR.child = child; + XE_KBPTR.eventX = + XE_KBPTR.rootX - pWin->drawable.x; + XE_KBPTR.eventY = + XE_KBPTR.rootY - pWin->drawable.y; + } + else + { + XE_KBPTR.sameScreen = xFalse; + XE_KBPTR.child = None; + XE_KBPTR.eventX = 0; + XE_KBPTR.eventY = 0; + } +} + +/** + * Deliver events caused by input devices. Called for all core input events + * and XI events. No filtering of events happens before DeliverDeviceEvents(), + * it will be called for any event that comes out of the event queue. + * + * For all core events, dev is either inputInfo.pointer or inputInfo.keyboard. + * For all extension events, dev is the device that caused the event. + * + * @param pWin Window to deliver event to. + * @param xE Events to deliver. + * @param grab Possible grab on a device. + * @param stopAt Don't recurse up to the root window. + * @param dev The device that is responsible for the event. + * @param count number of events in xE. + * + */ +int +DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, + WindowPtr stopAt, DeviceIntPtr dev, int count) +{ + Window child = None; + int type = xE->u.u.type; + Mask filter = filters[type]; + int deliveries = 0; + + if (type & EXTENSION_EVENT_BASE) + { + OtherInputMasks *inputMasks; + int mskidx = dev->id; + + inputMasks = wOtherInputMasks(pWin); + if (inputMasks && !(filter & inputMasks->deliverableEvents[mskidx])) + return 0; + while (pWin) + { + if (inputMasks && (inputMasks->inputEvents[mskidx] & filter)) + { + FixUpEventFromWindow(xE, pWin, child, FALSE); + deliveries = DeliverEventsToWindow(pWin, xE, count, filter, + grab, mskidx); + if (deliveries > 0) + return deliveries; + } + if ((deliveries < 0) || + (pWin == stopAt) || + (inputMasks && + (filter & inputMasks->dontPropagateMask[mskidx]))) + return 0; + child = pWin->drawable.id; + pWin = pWin->parent; + if (pWin) + inputMasks = wOtherInputMasks(pWin); + } + } + else + { + if (!(filter & pWin->deliverableEvents)) + return 0; + while (pWin) + { + if ((wOtherEventMasks(pWin)|pWin->eventMask) & filter) + { + FixUpEventFromWindow(xE, pWin, child, FALSE); + deliveries = DeliverEventsToWindow(pWin, xE, count, filter, + grab, 0); + if (deliveries > 0) + return deliveries; + } + if ((deliveries < 0) || + (pWin == stopAt) || + (filter & wDontPropagateMask(pWin))) + return 0; + child = pWin->drawable.id; + pWin = pWin->parent; + } + } + return 0; +} + +/** + * Deliver event to a window and it's immediate parent. Used for most window + * events (CreateNotify, ConfigureNotify, etc.). Not useful for events that + * propagate up the tree or extension events + * + * In case of a ReparentNotify event, the event will be delivered to the + * otherParent as well. + * + * @param pWin Window to deliver events to. + * @param xE Events to deliver. + * @param count number of events in xE. + * @param otherParent Used for ReparentNotify events. + */ +_X_EXPORT int +DeliverEvents(WindowPtr pWin, xEvent *xE, int count, + WindowPtr otherParent) +{ + Mask filter; + int deliveries; + +#ifdef PANORAMIX + if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) + return count; +#endif + + if (!count) + return 0; + filter = filters[xE->u.u.type]; + if ((filter & SubstructureNotifyMask) && (xE->u.u.type != CreateNotify)) + xE->u.destroyNotify.event = pWin->drawable.id; + if (filter != StructureAndSubMask) + return DeliverEventsToWindow(pWin, xE, count, filter, NullGrab, 0); + deliveries = DeliverEventsToWindow(pWin, xE, count, StructureNotifyMask, + NullGrab, 0); + if (pWin->parent) + { + xE->u.destroyNotify.event = pWin->parent->drawable.id; + deliveries += DeliverEventsToWindow(pWin->parent, xE, count, + SubstructureNotifyMask, NullGrab, + 0); + if (xE->u.u.type == ReparentNotify) + { + xE->u.destroyNotify.event = otherParent->drawable.id; + deliveries += DeliverEventsToWindow(otherParent, xE, count, + SubstructureNotifyMask, + NullGrab, 0); + } + } + return deliveries; +} + + +static Bool +PointInBorderSize(WindowPtr pWin, int x, int y) +{ + BoxRec box; + + if(POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderSize, x, y, &box)) + return TRUE; + +#ifdef PANORAMIX + if(!noPanoramiXExtension && XineramaSetWindowPntrs(pWin)) { + int i; + + for(i = 1; i < PanoramiXNumScreens; i++) { + if(POINT_IN_REGION(sprite.screen, + &sprite.windows[i]->borderSize, + x + panoramiXdataPtr[0].x - panoramiXdataPtr[i].x, + y + panoramiXdataPtr[0].y - panoramiXdataPtr[i].y, + &box)) + return TRUE; + } + } +#endif + return FALSE; +} + +/** + * Traversed from the root window to the window at the position x/y. While + * traversing, it sets up the traversal history in the spriteTrace array. + * After completing, the spriteTrace history is set in the following way: + * spriteTrace[0] ... root window + * spriteTrace[1] ... top level window that encloses x/y + * ... + * spriteTrace[spriteTraceGood - 1] ... window at x/y + * + * @returns the window at the given coordinates. + */ +static WindowPtr +XYToWindow(int x, int y) +{ + WindowPtr pWin; + BoxRec box; + + spriteTraceGood = 1; /* root window still there */ + pWin = ROOT->firstChild; + while (pWin) + { + if ((pWin->mapped) && + (x >= pWin->drawable.x - wBorderWidth (pWin)) && + (x < pWin->drawable.x + (int)pWin->drawable.width + + wBorderWidth(pWin)) && + (y >= pWin->drawable.y - wBorderWidth (pWin)) && + (y < pWin->drawable.y + (int)pWin->drawable.height + + wBorderWidth (pWin)) +#ifdef SHAPE + /* When a window is shaped, a further check + * is made to see if the point is inside + * borderSize + */ + && (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y)) + && (!wInputShape(pWin) || + POINT_IN_REGION(pWin->drawable.pScreen, + wInputShape(pWin), + x - pWin->drawable.x, + y - pWin->drawable.y, &box)) +#endif + ) + { + if (spriteTraceGood >= spriteTraceSize) + { + spriteTraceSize += 10; + Must_have_memory = TRUE; /* XXX */ + spriteTrace = (WindowPtr *)xrealloc( + spriteTrace, spriteTraceSize*sizeof(WindowPtr)); + Must_have_memory = FALSE; /* XXX */ + } + spriteTrace[spriteTraceGood++] = pWin; + pWin = pWin->firstChild; + } + else + pWin = pWin->nextSib; + } + return spriteTrace[spriteTraceGood-1]; +} + +/** + * Update the sprite coordinates based on the event. Update the cursor + * position, then update the event with the new coordinates that may have been + * changed. If the window underneath the sprite has changed, change to new + * cursor and send enter/leave events. + */ +static Bool +CheckMotion(xEvent *xE) +{ + WindowPtr prevSpriteWin = sprite.win; + +#ifdef PANORAMIX + if(!noPanoramiXExtension) + return XineramaCheckMotion(xE); +#endif + + if (xE && !syncEvents.playingEvents) + { + if (sprite.hot.pScreen != sprite.hotPhys.pScreen) + { + sprite.hot.pScreen = sprite.hotPhys.pScreen; + ROOT = WindowTable[sprite.hot.pScreen->myNum]; + } + sprite.hot.x = XE_KBPTR.rootX; + sprite.hot.y = XE_KBPTR.rootY; + if (sprite.hot.x < sprite.physLimits.x1) + sprite.hot.x = sprite.physLimits.x1; + else if (sprite.hot.x >= sprite.physLimits.x2) + sprite.hot.x = sprite.physLimits.x2 - 1; + if (sprite.hot.y < sprite.physLimits.y1) + sprite.hot.y = sprite.physLimits.y1; + else if (sprite.hot.y >= sprite.physLimits.y2) + sprite.hot.y = sprite.physLimits.y2 - 1; +#ifdef SHAPE + if (sprite.hotShape) + ConfineToShape(sprite.hotShape, &sprite.hot.x, &sprite.hot.y); +#endif +#ifdef XEVIE + xeviehot.x = sprite.hot.x; + xeviehot.y = sprite.hot.y; +#endif + sprite.hotPhys = sprite.hot; + if ((sprite.hotPhys.x != XE_KBPTR.rootX) || + (sprite.hotPhys.y != XE_KBPTR.rootY)) + { + (*sprite.hotPhys.pScreen->SetCursorPosition)( + sprite.hotPhys.pScreen, + sprite.hotPhys.x, sprite.hotPhys.y, FALSE); + } + XE_KBPTR.rootX = sprite.hot.x; + XE_KBPTR.rootY = sprite.hot.y; + } + +#ifdef XEVIE + xeviewin = +#endif + sprite.win = XYToWindow(sprite.hot.x, sprite.hot.y); +#ifdef notyet + if (!(sprite.win->deliverableEvents & + Motion_Filter(inputInfo.pointer->button)) + !syncEvents.playingEvents) + { + /* XXX Do PointerNonInterestBox here */ + } +#endif + if (sprite.win != prevSpriteWin) + { + if (prevSpriteWin != NullWindow) { + if (!xE) + UpdateCurrentTimeIf(); + DoEnterLeaveEvents(prevSpriteWin, sprite.win, NotifyNormal); + } + PostNewCursor(); + return FALSE; + } + return TRUE; +} + +/** + * Windows have restructured, we need to update the sprite position and the + * sprite's cursor. + */ +_X_EXPORT void +WindowsRestructured(void) +{ + (void) CheckMotion((xEvent *)NULL); +} + +#ifdef PANORAMIX +/* This was added to support reconfiguration under Xdmx. The problem is + * that if the 0th screen (i.e., WindowTable[0]) is moved to an origin + * other than 0,0, the information in the private sprite structure must + * be updated accordingly, or XYToWindow (and other routines) will not + * compute correctly. */ +void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) +{ + GrabPtr grab; + + if (noPanoramiXExtension) return; + + sprite.hot.x -= xoff; + sprite.hot.y -= yoff; + + sprite.hotPhys.x -= xoff; + sprite.hotPhys.y -= yoff; + + sprite.hotLimits.x1 -= xoff; + sprite.hotLimits.y1 -= yoff; + sprite.hotLimits.x2 -= xoff; + sprite.hotLimits.y2 -= yoff; + + if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg1)) + REGION_TRANSLATE(sprite.screen, &sprite.Reg1, xoff, yoff); + if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg2)) + REGION_TRANSLATE(sprite.screen, &sprite.Reg2, xoff, yoff); + + /* FIXME: if we call ConfineCursorToWindow, must we do anything else? */ + if ((grab = inputInfo.pointer->grab) && grab->confineTo) { + if (grab->confineTo->drawable.pScreen != sprite.hotPhys.pScreen) + sprite.hotPhys.x = sprite.hotPhys.y = 0; + ConfineCursorToWindow(grab->confineTo, TRUE, TRUE); + } else + ConfineCursorToWindow(WindowTable[sprite.hotPhys.pScreen->myNum], + TRUE, FALSE); +} +#endif + +/** + * Set the given window to sane values, display the cursor in the center of + * the screen. Called from main() with the root window on the first screen. + */ +void +DefineInitialRootWindow(WindowPtr win) +{ + ScreenPtr pScreen = win->drawable.pScreen; + + sprite.hotPhys.pScreen = pScreen; + sprite.hotPhys.x = pScreen->width / 2; + sprite.hotPhys.y = pScreen->height / 2; + sprite.hot = sprite.hotPhys; + sprite.hotLimits.x2 = pScreen->width; + sprite.hotLimits.y2 = pScreen->height; +#ifdef XEVIE + xeviewin = +#endif + sprite.win = win; + sprite.current = wCursor (win); + sprite.current->refcnt++; + spriteTraceGood = 1; + ROOT = win; + (*pScreen->CursorLimits) ( + pScreen, sprite.current, &sprite.hotLimits, &sprite.physLimits); + sprite.confined = FALSE; + (*pScreen->ConstrainCursor) (pScreen, &sprite.physLimits); + (*pScreen->SetCursorPosition) (pScreen, sprite.hot.x, sprite.hot.y, FALSE); + (*pScreen->DisplayCursor) (pScreen, sprite.current); + +#ifdef PANORAMIX + if(!noPanoramiXExtension) { + sprite.hotLimits.x1 = -panoramiXdataPtr[0].x; + sprite.hotLimits.y1 = -panoramiXdataPtr[0].y; + sprite.hotLimits.x2 = PanoramiXPixWidth - panoramiXdataPtr[0].x; + sprite.hotLimits.y2 = PanoramiXPixHeight - panoramiXdataPtr[0].y; + sprite.physLimits = sprite.hotLimits; + sprite.confineWin = NullWindow; +#ifdef SHAPE + sprite.hotShape = NullRegion; +#endif + sprite.screen = pScreen; + /* gotta UNINIT these someplace */ + REGION_NULL(pScreen, &sprite.Reg1); + REGION_NULL(pScreen, &sprite.Reg2); + } +#endif +} + +/* + * This does not take any shortcuts, and even ignores its argument, since + * it does not happen very often, and one has to walk up the tree since + * this might be a newly instantiated cursor for an intermediate window + * between the one the pointer is in and the one that the last cursor was + * instantiated from. + */ +void +WindowHasNewCursor(WindowPtr pWin) +{ + PostNewCursor(); +} + +_X_EXPORT void +NewCurrentScreen(ScreenPtr newScreen, int x, int y) +{ + sprite.hotPhys.x = x; + sprite.hotPhys.y = y; +#ifdef PANORAMIX + if(!noPanoramiXExtension) { + sprite.hotPhys.x += panoramiXdataPtr[newScreen->myNum].x - + panoramiXdataPtr[0].x; + sprite.hotPhys.y += panoramiXdataPtr[newScreen->myNum].y - + panoramiXdataPtr[0].y; + if (newScreen != sprite.screen) { + sprite.screen = newScreen; + /* Make sure we tell the DDX to update its copy of the screen */ + if(sprite.confineWin) + XineramaConfineCursorToWindow(sprite.confineWin, TRUE); + else + XineramaConfineCursorToWindow(WindowTable[0], TRUE); + /* if the pointer wasn't confined, the DDX won't get + told of the pointer warp so we reposition it here */ + if(!syncEvents.playingEvents) + (*sprite.screen->SetCursorPosition)(sprite.screen, + sprite.hotPhys.x + panoramiXdataPtr[0].x - + panoramiXdataPtr[sprite.screen->myNum].x, + sprite.hotPhys.y + panoramiXdataPtr[0].y - + panoramiXdataPtr[sprite.screen->myNum].y, FALSE); + } + } else +#endif + if (newScreen != sprite.hotPhys.pScreen) + ConfineCursorToWindow(WindowTable[newScreen->myNum], TRUE, FALSE); +} + +#ifdef PANORAMIX + +static Bool +XineramaPointInWindowIsVisible( + WindowPtr pWin, + int x, + int y +) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + BoxRec box; + int i, xoff, yoff; + + if (!pWin->realized) return FALSE; + + if (POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box)) + return TRUE; + + if(!XineramaSetWindowPntrs(pWin)) return FALSE; + + xoff = x + panoramiXdataPtr[0].x; + yoff = y + panoramiXdataPtr[0].y; + + for(i = 1; i < PanoramiXNumScreens; i++) { + pWin = sprite.windows[i]; + pScreen = pWin->drawable.pScreen; + x = xoff - panoramiXdataPtr[i].x; + y = yoff - panoramiXdataPtr[i].y; + + if(POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box) + && (!wInputShape(pWin) || + POINT_IN_REGION(pWin->drawable.pScreen, + wInputShape(pWin), + x - pWin->drawable.x, + y - pWin->drawable.y, &box))) + return TRUE; + + } + + return FALSE; +} + +static int +XineramaWarpPointer(ClientPtr client) +{ + WindowPtr dest = NULL; + int x, y, rc; + + REQUEST(xWarpPointerReq); + + + if (stuff->dstWid != None) { + rc = dixLookupWindow(&dest, stuff->dstWid, client, DixReadAccess); + if (rc != Success) + return rc; + } + x = sprite.hotPhys.x; + y = sprite.hotPhys.y; + + if (stuff->srcWid != None) + { + int winX, winY; + XID winID = stuff->srcWid; + WindowPtr source; + + rc = dixLookupWindow(&source, winID, client, DixReadAccess); + if (rc != Success) + return rc; + + winX = source->drawable.x; + winY = source->drawable.y; + if(source == WindowTable[0]) { + winX -= panoramiXdataPtr[0].x; + winY -= panoramiXdataPtr[0].y; + } + if (x < winX + stuff->srcX || + y < winY + stuff->srcY || + (stuff->srcWidth != 0 && + winX + stuff->srcX + (int)stuff->srcWidth < x) || + (stuff->srcHeight != 0 && + winY + stuff->srcY + (int)stuff->srcHeight < y) || + !XineramaPointInWindowIsVisible(source, x, y)) + return Success; + } + if (dest) { + x = dest->drawable.x; + y = dest->drawable.y; + if(dest == WindowTable[0]) { + x -= panoramiXdataPtr[0].x; + y -= panoramiXdataPtr[0].y; + } + } + + x += stuff->dstX; + y += stuff->dstY; + + if (x < sprite.physLimits.x1) + x = sprite.physLimits.x1; + else if (x >= sprite.physLimits.x2) + x = sprite.physLimits.x2 - 1; + if (y < sprite.physLimits.y1) + y = sprite.physLimits.y1; + else if (y >= sprite.physLimits.y2) + y = sprite.physLimits.y2 - 1; + if (sprite.hotShape) + ConfineToShape(sprite.hotShape, &x, &y); + + XineramaSetCursorPosition(x, y, TRUE); + + return Success; +} + +#endif + + +/** + * Server-side protocol handling for WarpPointer request. + * Warps the cursor position to the coordinates given in the request. + */ +int +ProcWarpPointer(ClientPtr client) +{ + WindowPtr dest = NULL; + int x, y, rc; + ScreenPtr newScreen; + + REQUEST(xWarpPointerReq); + + REQUEST_SIZE_MATCH(xWarpPointerReq); + +#ifdef PANORAMIX + if(!noPanoramiXExtension) + return XineramaWarpPointer(client); +#endif + + if (stuff->dstWid != None) { + rc = dixLookupWindow(&dest, stuff->dstWid, client, DixReadAccess); + if (rc != Success) + return rc; + } + x = sprite.hotPhys.x; + y = sprite.hotPhys.y; + + if (stuff->srcWid != None) + { + int winX, winY; + XID winID = stuff->srcWid; + WindowPtr source; + + rc = dixLookupWindow(&source, winID, client, DixReadAccess); + if (rc != Success) + return rc; + + winX = source->drawable.x; + winY = source->drawable.y; + if (source->drawable.pScreen != sprite.hotPhys.pScreen || + x < winX + stuff->srcX || + y < winY + stuff->srcY || + (stuff->srcWidth != 0 && + winX + stuff->srcX + (int)stuff->srcWidth < x) || + (stuff->srcHeight != 0 && + winY + stuff->srcY + (int)stuff->srcHeight < y) || + !PointInWindowIsVisible(source, x, y)) + return Success; + } + if (dest) + { + x = dest->drawable.x; + y = dest->drawable.y; + newScreen = dest->drawable.pScreen; + } else + newScreen = sprite.hotPhys.pScreen; + + x += stuff->dstX; + y += stuff->dstY; + + if (x < 0) + x = 0; + else if (x >= newScreen->width) + x = newScreen->width - 1; + if (y < 0) + y = 0; + else if (y >= newScreen->height) + y = newScreen->height - 1; + + if (newScreen == sprite.hotPhys.pScreen) + { + if (x < sprite.physLimits.x1) + x = sprite.physLimits.x1; + else if (x >= sprite.physLimits.x2) + x = sprite.physLimits.x2 - 1; + if (y < sprite.physLimits.y1) + y = sprite.physLimits.y1; + else if (y >= sprite.physLimits.y2) + y = sprite.physLimits.y2 - 1; +#if defined(SHAPE) + if (sprite.hotShape) + ConfineToShape(sprite.hotShape, &x, &y); +#endif + (*newScreen->SetCursorPosition)(newScreen, x, y, TRUE); + } + else if (!PointerConfinedToScreen()) + { + NewCurrentScreen(newScreen, x, y); + } + return Success; +} + +static Bool +BorderSizeNotEmpty(WindowPtr pWin) +{ + if(REGION_NOTEMPTY(sprite.hotPhys.pScreen, &pWin->borderSize)) + return TRUE; + +#ifdef PANORAMIX + if(!noPanoramiXExtension && XineramaSetWindowPntrs(pWin)) { + int i; + + for(i = 1; i < PanoramiXNumScreens; i++) { + if(REGION_NOTEMPTY(sprite.screen, &sprite.windows[i]->borderSize)) + return TRUE; + } + } +#endif + return FALSE; +} + +/** + * "CheckPassiveGrabsOnWindow" checks to see if the event passed in causes a + * passive grab set on the window to be activated. + * If a passive grab is activated, the event will be delivered to the client. + * + * @param pWin The window that may be subject to a passive grab. + * @param device Device that caused the event. + * @param xE List of events (multiple ones for DeviceMotionNotify) + * @count number of elements in xE. + */ + +static Bool +CheckPassiveGrabsOnWindow( + WindowPtr pWin, + DeviceIntPtr device, + xEvent *xE, + int count) +{ + GrabPtr grab = wPassiveGrabs(pWin); + GrabRec tempGrab; + xEvent *dxE; + + if (!grab) + return FALSE; + tempGrab.window = pWin; + tempGrab.device = device; + tempGrab.type = xE->u.u.type; + tempGrab.detail.exact = xE->u.u.detail; + tempGrab.detail.pMask = NULL; + tempGrab.modifiersDetail.pMask = NULL; + for (; grab; grab = grab->next) + { +#ifdef XKB + DeviceIntPtr gdev; + XkbSrvInfoPtr xkbi; + + gdev= grab->modifierDevice; + xkbi= gdev->key->xkbInfo; +#endif + tempGrab.modifierDevice = grab->modifierDevice; + if ((device == grab->modifierDevice) && + ((xE->u.u.type == KeyPress) +#if defined(XINPUT) && defined(XKB) + || (xE->u.u.type == DeviceKeyPress) +#endif + )) + tempGrab.modifiersDetail.exact = +#ifdef XKB + (noXkbExtension?gdev->key->prev_state:xkbi->state.grab_mods); +#else + grab->modifierDevice->key->prev_state; +#endif + else + tempGrab.modifiersDetail.exact = +#ifdef XKB + (noXkbExtension ? gdev->key->state : xkbi->state.grab_mods); +#else + grab->modifierDevice->key->state; +#endif + if (GrabMatchesSecond(&tempGrab, grab) && + (!grab->confineTo || + (grab->confineTo->realized && + BorderSizeNotEmpty(grab->confineTo)))) + { + if (!XaceHook(XACE_DEVICE_ACCESS, wClient(pWin), device, FALSE)) + return FALSE; +#ifdef XKB + if (!noXkbExtension) { + XE_KBPTR.state &= 0x1f00; + XE_KBPTR.state |= + tempGrab.modifiersDetail.exact&(~0x1f00); + } +#endif + (*device->ActivateGrab)(device, grab, currentTime, TRUE); + + FixUpEventFromWindow(xE, grab->window, None, TRUE); + + (void) TryClientEvents(rClient(grab), xE, count, + filters[xE->u.u.type], + filters[xE->u.u.type], grab); + + if (device->sync.state == FROZEN_NO_EVENT) + { + if (device->sync.evcount < count) + { + Must_have_memory = TRUE; /* XXX */ + device->sync.event = (xEvent *)xrealloc(device->sync.event, + count* + sizeof(xEvent)); + Must_have_memory = FALSE; /* XXX */ + } + device->sync.evcount = count; + for (dxE = device->sync.event; --count >= 0; dxE++, xE++) + *dxE = *xE; + device->sync.state = FROZEN_WITH_EVENT; + } + return TRUE; + } + } + return FALSE; +} + +/** + * CheckDeviceGrabs handles both keyboard and pointer events that may cause + * a passive grab to be activated. + * + * If the event is a keyboard event, the ancestors of the focus window are + * traced down and tried to see if they have any passive grabs to be + * activated. If the focus window itself is reached and it's descendants + * contain the pointer, the ancestors of the window that the pointer is in + * are then traced down starting at the focus window, otherwise no grabs are + * activated. + * If the event is a pointer event, the ancestors of the window that the + * pointer is in are traced down starting at the root until CheckPassiveGrabs + * causes a passive grab to activate or all the windows are + * tried. PRH + * + * If a grab is activated, the event has been sent to the client already! + * + * @param device The device that caused the event. + * @param xE The event to handle (most likely {Device}ButtonPress). + * @param count Number of events in list. + * @return TRUE if a grab has been activated or false otherwise. +*/ + +Bool +CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE, + int checkFirst, int count) +{ + int i; + WindowPtr pWin = NULL; + FocusClassPtr focus = device->focus; + + if (((xE->u.u.type == ButtonPress) +#if defined(XINPUT) && defined(XKB) + || (xE->u.u.type == DeviceButtonPress) +#endif + ) && (device->button->buttonsDown != 1)) + return FALSE; + + i = checkFirst; + + if (focus) + { + for (; i < focus->traceGood; i++) + { + pWin = focus->trace[i]; + if (pWin->optional && + CheckPassiveGrabsOnWindow(pWin, device, xE, count)) + return TRUE; + } + + if ((focus->win == NoneWin) || + (i >= spriteTraceGood) || + ((i > checkFirst) && (pWin != spriteTrace[i-1]))) + return FALSE; + } + + for (; i < spriteTraceGood; i++) + { + pWin = spriteTrace[i]; + if (pWin->optional && + CheckPassiveGrabsOnWindow(pWin, device, xE, count)) + return TRUE; + } + + return FALSE; +} + +/** + * Called for keyboard events to deliver event to whatever client owns the + * focus. Event is delivered to the keyboard's focus window, the root window + * or to the window owning the input focus. + * + * @param keybd The keyboard originating the event. + * @param xE The event list. + * @param window Window underneath the sprite. + * @param count number of events in xE. + */ +void +DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) +{ + WindowPtr focus = keybd->focus->win; + int mskidx = 0; + + if (focus == FollowKeyboardWin) + focus = inputInfo.keyboard->focus->win; + if (!focus) + return; + if (focus == PointerRootWin) + { + DeliverDeviceEvents(window, xE, NullGrab, NullWindow, keybd, count); + return; + } + if ((focus == window) || IsParent(focus, window)) + { + if (DeliverDeviceEvents(window, xE, NullGrab, focus, keybd, count)) + return; + } + /* just deliver it to the focus window */ + FixUpEventFromWindow(xE, focus, None, FALSE); + if (xE->u.u.type & EXTENSION_EVENT_BASE) + mskidx = keybd->id; + (void)DeliverEventsToWindow(focus, xE, count, filters[xE->u.u.type], + NullGrab, mskidx); +} + +/** + * Deliver an event from a device that is currently grabbed. Uses + * DeliverDeviceEvents() for further delivery if a ownerEvents is set on the + * grab. If not, TryClientEvents() is used. + * + * @param deactivateGrab True if the device's grab should be deactivated. + */ +void +DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, + Bool deactivateGrab, int count) +{ + GrabPtr grab = thisDev->grab; + int deliveries = 0; + DeviceIntPtr dev; + xEvent *dxE; + + if (grab->ownerEvents) + { + WindowPtr focus; + + if (thisDev->focus) + { + focus = thisDev->focus->win; + if (focus == FollowKeyboardWin) + focus = inputInfo.keyboard->focus->win; + } + else + focus = PointerRootWin; + if (focus == PointerRootWin) + deliveries = DeliverDeviceEvents(sprite.win, xE, grab, NullWindow, + thisDev, count); + else if (focus && (focus == sprite.win || IsParent(focus, sprite.win))) + deliveries = DeliverDeviceEvents(sprite.win, xE, grab, focus, + thisDev, count); + else if (focus) + deliveries = DeliverDeviceEvents(focus, xE, grab, focus, + thisDev, count); + } + if (!deliveries) + { + FixUpEventFromWindow(xE, grab->window, None, TRUE); + deliveries = TryClientEvents(rClient(grab), xE, count, + (Mask)grab->eventMask, + filters[xE->u.u.type], grab); + if (deliveries && (xE->u.u.type == MotionNotify +#ifdef XINPUT + || xE->u.u.type == DeviceMotionNotify +#endif + )) + thisDev->valuator->motionHintWindow = grab->window; + } + if (deliveries && !deactivateGrab && (xE->u.u.type != MotionNotify +#ifdef XINPUT + && xE->u.u.type != DeviceMotionNotify +#endif + )) + switch (thisDev->sync.state) + { + case FREEZE_BOTH_NEXT_EVENT: + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (dev == thisDev) + continue; + FreezeThaw(dev, TRUE); + if ((dev->sync.state == FREEZE_BOTH_NEXT_EVENT) && + (CLIENT_BITS(dev->grab->resource) == + CLIENT_BITS(thisDev->grab->resource))) + dev->sync.state = FROZEN_NO_EVENT; + else + dev->sync.other = thisDev->grab; + } + /* fall through */ + case FREEZE_NEXT_EVENT: + thisDev->sync.state = FROZEN_WITH_EVENT; + FreezeThaw(thisDev, TRUE); + if (thisDev->sync.evcount < count) + { + Must_have_memory = TRUE; /* XXX */ + thisDev->sync.event = (xEvent *)xrealloc(thisDev->sync.event, + count*sizeof(xEvent)); + Must_have_memory = FALSE; /* XXX */ + } + thisDev->sync.evcount = count; + for (dxE = thisDev->sync.event; --count >= 0; dxE++, xE++) + *dxE = *xE; + break; + } +} + +/** + * Main keyboard event processing function for core keyboard events. + * Updates the events fields from the current pointer state and delivers the + * event. + * + * For key events, xE will always be a single event. + * + * @param xE Event list + * @param keybd The device that caused an event. + * @param count Number of elements in xE. + */ +void +#ifdef XKB +CoreProcessKeyboardEvent (xEvent *xE, DeviceIntPtr keybd, int count) +#else +ProcessKeyboardEvent (xEvent *xE, DeviceIntPtr keybd, int count) +#endif +{ + int key, bit; + BYTE *kptr; + int i; + CARD8 modifiers; + CARD16 mask; + GrabPtr grab = keybd->grab; + Bool deactivateGrab = FALSE; + KeyClassPtr keyc = keybd->key; +#ifdef XEVIE + static Window rootWin = 0; + + if(!xeviegrabState && xevieFlag && clients[xevieClientIndex] && + (xevieMask & xevieFilters[xE->u.u.type])) { + key = xE->u.u.detail; + kptr = &keyc->down[key >> 3]; + bit = 1 << (key & 7); + if((xE->u.u.type == KeyPress && (*kptr & bit)) || + (xE->u.u.type == KeyRelease && !(*kptr & bit))) + {} else { +#ifdef XKB + if(!noXkbExtension) + xevieKBEventSent = 1; +#endif + if(!xevieKBEventSent) + { + xeviekb = keybd; + if(!rootWin) { + rootWin = GetCurrentRootWindow()->drawable.id; + } + xE->u.keyButtonPointer.event = xeviewin->drawable.id; + xE->u.keyButtonPointer.root = rootWin; + 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; + WriteToClient(clients[xevieClientIndex], sizeof(xEvent), (char *)xE); +#ifdef XKB + if(noXkbExtension) +#endif + return; + } else { + xevieKBEventSent = 0; + } + } + } +#endif + + if (!syncEvents.playingEvents) + { + NoticeTime(xE); + if (DeviceEventCallback) + { + DeviceEventInfoRec eventinfo; + eventinfo.events = xE; + eventinfo.count = count; + CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo); + } + } +#ifdef XEVIE + /* fix for bug5094030: don't change the state bit if the event is from XEvIE client */ + if(!(!xeviegrabState && xevieFlag && clients[xevieClientIndex] && + (xevieMask & xevieFilters[xE->u.u.type] +#ifdef XKB + && !noXkbExtension +#endif + ))) +#endif + XE_KBPTR.state = (keyc->state | inputInfo.pointer->button->state); + XE_KBPTR.rootX = sprite.hot.x; + XE_KBPTR.rootY = sprite.hot.y; + key = xE->u.u.detail; + kptr = &keyc->down[key >> 3]; + bit = 1 << (key & 7); + modifiers = keyc->modifierMap[key]; +#if defined(XKB) && defined(XEVIE) + if(!noXkbExtension && !xeviegrabState && + xevieFlag && clients[xevieClientIndex] && + (xevieMask & xevieFilters[xE->u.u.type])) { + switch(xE->u.u.type) { + case KeyPress: *kptr &= ~bit; break; + case KeyRelease: *kptr |= bit; break; + } + } +#endif + + switch (xE->u.u.type) + { + case KeyPress: + if (*kptr & bit) /* allow ddx to generate multiple downs */ + { + if (!modifiers) + { + xE->u.u.type = KeyRelease; + (*keybd->public.processInputProc)(xE, keybd, count); + xE->u.u.type = KeyPress; + /* release can have side effects, don't fall through */ + (*keybd->public.processInputProc)(xE, keybd, count); + } + return; + } + inputInfo.pointer->valuator->motionHintWindow = NullWindow; + *kptr |= bit; + keyc->prev_state = keyc->state; + for (i = 0, mask = 1; modifiers; i++, mask <<= 1) + { + if (mask & modifiers) + { + /* This key affects modifier "i" */ + keyc->modifierKeyCount[i]++; + keyc->state |= mask; + modifiers &= ~mask; + } + } + if (!grab && CheckDeviceGrabs(keybd, xE, 0, count)) + { + keybd->activatingKey = key; + return; + } + break; + case KeyRelease: + if (!(*kptr & bit)) /* guard against duplicates */ + return; + inputInfo.pointer->valuator->motionHintWindow = NullWindow; + *kptr &= ~bit; + keyc->prev_state = keyc->state; + for (i = 0, mask = 1; modifiers; i++, mask <<= 1) + { + if (mask & modifiers) { + /* This key affects modifier "i" */ + if (--keyc->modifierKeyCount[i] <= 0) { + keyc->state &= ~mask; + keyc->modifierKeyCount[i] = 0; + } + modifiers &= ~mask; + } + } + if (keybd->fromPassiveGrab && (key == keybd->activatingKey)) + deactivateGrab = TRUE; + break; + default: + FatalError("Impossible keyboard event"); + } + if (grab) + DeliverGrabbedEvent(xE, keybd, deactivateGrab, count); + else + DeliverFocusedEvent(keybd, xE, sprite.win, count); + if (deactivateGrab) + (*keybd->DeactivateGrab)(keybd); + + XaceHook(XACE_KEY_AVAIL, xE, keybd, count); +} + +#ifdef XKB +/* This function is used to set the key pressed or key released state - + this is only used when the pressing of keys does not cause + CoreProcessKeyEvent to be called, as in for example Mouse Keys. +*/ +void +FixKeyState (xEvent *xE, DeviceIntPtr keybd) +{ + int key, bit; + BYTE *kptr; + KeyClassPtr keyc = keybd->key; + + key = xE->u.u.detail; + kptr = &keyc->down[key >> 3]; + bit = 1 << (key & 7); + + if (((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease))) { + DebugF("FixKeyState: Key %d %s\n",key, + (xE->u.u.type==KeyPress?"down":"up")); + } + + switch (xE->u.u.type) + { + case KeyPress: + *kptr |= bit; + break; + case KeyRelease: + *kptr &= ~bit; + break; + default: + FatalError("Impossible keyboard event"); + } +} +#endif + +/** + * Main pointer event processing function for core pointer events. + * For motion events: update the sprite. + * For all other events: Update the event fields based on the current sprite + * state. + * + * For core pointer events, xE will always be a single event. + * + * @param xE Event list + * @param mouse The device that caused an event. + * @param count Number of elements in xE. + */ +void +#ifdef XKB +CoreProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) +#else +ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) +#endif +{ + GrabPtr grab = mouse->grab; + Bool deactivateGrab = FALSE; + ButtonClassPtr butc = mouse->button; +#ifdef XKB + XkbSrvInfoPtr xkbi= inputInfo.keyboard->key->xkbInfo; +#endif +#ifdef XEVIE + if(xevieFlag && clients[xevieClientIndex] && !xeviegrabState && + (xevieMask & xevieFilters[xE->u.u.type])) { + if(xevieEventSent) + xevieEventSent = 0; + else { + xeviemouse = mouse; + WriteToClient(clients[xevieClientIndex], sizeof(xEvent), (char *)xE); + return; + } + } +#endif + + if (!syncEvents.playingEvents) + NoticeTime(xE) + XE_KBPTR.state = (butc->state | ( +#ifdef XKB + (noXkbExtension ? + inputInfo.keyboard->key->state : + xkbi->state.grab_mods) +#else + inputInfo.keyboard->key->state +#endif + )); + { + NoticeTime(xE); + if (DeviceEventCallback) + { + DeviceEventInfoRec eventinfo; + /* see comment in EnqueueEvents regarding the next three lines */ + if (xE->u.u.type == MotionNotify) + XE_KBPTR.root = + WindowTable[sprite.hotPhys.pScreen->myNum]->drawable.id; + eventinfo.events = xE; + eventinfo.count = count; + CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo); + } + } + if (xE->u.u.type != MotionNotify) + { + int key; + BYTE *kptr; + int bit; + + XE_KBPTR.rootX = sprite.hot.x; + XE_KBPTR.rootY = sprite.hot.y; + + key = xE->u.u.detail; + kptr = &butc->down[key >> 3]; + bit = 1 << (key & 7); + switch (xE->u.u.type) + { + case ButtonPress: + mouse->valuator->motionHintWindow = NullWindow; + if (!(*kptr & bit)) + butc->buttonsDown++; + butc->motionMask = ButtonMotionMask; + *kptr |= bit; + if (xE->u.u.detail == 0) + return; + if (xE->u.u.detail <= 5) + butc->state |= (Button1Mask >> 1) << xE->u.u.detail; + filters[MotionNotify] = Motion_Filter(butc); + if (!grab) + if (CheckDeviceGrabs(mouse, xE, 0, count)) + return; + break; + case ButtonRelease: + mouse->valuator->motionHintWindow = NullWindow; + if (*kptr & bit) + --butc->buttonsDown; + if (!butc->buttonsDown) + butc->motionMask = 0; + *kptr &= ~bit; + if (xE->u.u.detail == 0) + return; + if (xE->u.u.detail <= 5) + butc->state &= ~((Button1Mask >> 1) << xE->u.u.detail); + filters[MotionNotify] = Motion_Filter(butc); + if (!butc->state && mouse->fromPassiveGrab) + deactivateGrab = TRUE; + break; + default: + FatalError("bogus pointer event from ddx"); + } + } + else if (!CheckMotion(xE)) + return; + if (grab) + DeliverGrabbedEvent(xE, mouse, deactivateGrab, count); + else + DeliverDeviceEvents(sprite.win, xE, NullGrab, NullWindow, + mouse, count); + if (deactivateGrab) + (*mouse->DeactivateGrab)(mouse); +} + +#define AtMostOneClient \ + (SubstructureRedirectMask | ResizeRedirectMask | ButtonPressMask) + +/** + * Recalculate which events may be deliverable for the given window. + * Recalculated mask is used for quicker determination which events may be + * delivered to a window. + * + * The otherEventMasks on a WindowOptional is the combination of all event + * masks set by all clients on the window. + * deliverableEventMask is the combination of the eventMask and the + * otherEventMask. + * + * Traverses to siblings and parents of the window. + */ +void +RecalculateDeliverableEvents(pWin) + WindowPtr pWin; +{ + OtherClients *others; + WindowPtr pChild; + + pChild = pWin; + while (1) + { + if (pChild->optional) + { + pChild->optional->otherEventMasks = 0; + for (others = wOtherClients(pChild); others; others = others->next) + { + pChild->optional->otherEventMasks |= others->mask; + } + } + pChild->deliverableEvents = pChild->eventMask| + wOtherEventMasks(pChild); + if (pChild->parent) + pChild->deliverableEvents |= + (pChild->parent->deliverableEvents & + ~wDontPropagateMask(pChild) & PropagateMask); + if (pChild->firstChild) + { + pChild = pChild->firstChild; + continue; + } + while (!pChild->nextSib && (pChild != pWin)) + pChild = pChild->parent; + if (pChild == pWin) + break; + pChild = pChild->nextSib; + } +} + +/** + * + * \param value must conform to DeleteType + */ +int +OtherClientGone(pointer value, XID id) +{ + OtherClientsPtr other, prev; + WindowPtr pWin = (WindowPtr)value; + + prev = 0; + for (other = wOtherClients(pWin); other; other = other->next) + { + if (other->resource == id) + { + if (prev) + prev->next = other->next; + else + { + if (!(pWin->optional->otherClients = other->next)) + CheckWindowOptionalNeed (pWin); + } + xfree(other); + RecalculateDeliverableEvents(pWin); + return(Success); + } + prev = other; + } + FatalError("client not on event list"); + /*NOTREACHED*/ + return -1; /* make compiler happy */ +} + +int +EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask) +{ + Mask check; + OtherClients * others; + + if (mask & ~AllEventMasks) + { + client->errorValue = mask; + return BadValue; + } + check = (mask & AtMostOneClient); + if (check & (pWin->eventMask|wOtherEventMasks(pWin))) + { /* It is illegal for two different + clients to select on any of the + events for AtMostOneClient. However, + it is OK, for some client to + continue selecting on one of those + events. */ + if ((wClient(pWin) != client) && (check & pWin->eventMask)) + return BadAccess; + for (others = wOtherClients (pWin); others; others = others->next) + { + if (!SameClient(others, client) && (check & others->mask)) + return BadAccess; + } + } + if (wClient (pWin) == client) + { + check = pWin->eventMask; + pWin->eventMask = mask; + } + else + { + for (others = wOtherClients (pWin); others; others = others->next) + { + if (SameClient(others, client)) + { + check = others->mask; + if (mask == 0) + { + FreeResource(others->resource, RT_NONE); + return Success; + } + else + others->mask = mask; + goto maskSet; + } + } + check = 0; + if (!pWin->optional && !MakeWindowOptional (pWin)) + return BadAlloc; + others = (OtherClients *) xalloc(sizeof(OtherClients)); + if (!others) + return BadAlloc; + others->mask = mask; + others->resource = FakeClientID(client->index); + others->next = pWin->optional->otherClients; + pWin->optional->otherClients = others; + if (!AddResource(others->resource, RT_OTHERCLIENT, (pointer)pWin)) + return BadAlloc; + } +maskSet: + if ((inputInfo.pointer->valuator->motionHintWindow == pWin) && + (mask & PointerMotionHintMask) && + !(check & PointerMotionHintMask) && + !inputInfo.pointer->grab) + inputInfo.pointer->valuator->motionHintWindow = NullWindow; + RecalculateDeliverableEvents(pWin); + return Success; +} + +int +EventSuppressForWindow(WindowPtr pWin, ClientPtr client, + Mask mask, Bool *checkOptional) +{ + int i, free; + + if (mask & ~PropagateMask) + { + client->errorValue = mask; + return BadValue; + } + if (pWin->dontPropagate) + DontPropagateRefCnts[pWin->dontPropagate]--; + if (!mask) + i = 0; + else + { + for (i = DNPMCOUNT, free = 0; --i > 0; ) + { + if (!DontPropagateRefCnts[i]) + free = i; + else if (mask == DontPropagateMasks[i]) + break; + } + if (!i && free) + { + i = free; + DontPropagateMasks[i] = mask; + } + } + if (i || !mask) + { + pWin->dontPropagate = i; + if (i) + DontPropagateRefCnts[i]++; + if (pWin->optional) + { + pWin->optional->dontPropagateMask = mask; + *checkOptional = TRUE; + } + } + else + { + if (!pWin->optional && !MakeWindowOptional (pWin)) + { + if (pWin->dontPropagate) + DontPropagateRefCnts[pWin->dontPropagate]++; + return BadAlloc; + } + pWin->dontPropagate = 0; + pWin->optional->dontPropagateMask = mask; + } + RecalculateDeliverableEvents(pWin); + return Success; +} + +/** + * @return The window that is the first ancestor of both a and b. + */ +static WindowPtr +CommonAncestor( + WindowPtr a, + WindowPtr b) +{ + for (b = b->parent; b; b = b->parent) + if (IsParent(b, a)) return b; + return NullWindow; +} + +/** + * Assembles an EnterNotify or LeaveNotify and sends it event to the client. + * The core devices are used to fill in the event fields. + */ +static void +EnterLeaveEvent( + int type, + int mode, + int detail, + WindowPtr pWin, + Window child) +{ + xEvent event; + DeviceIntPtr keybd = inputInfo.keyboard; + WindowPtr focus; + DeviceIntPtr mouse = inputInfo.pointer; + GrabPtr grab = mouse->grab; + Mask mask; + + if ((pWin == mouse->valuator->motionHintWindow) && + (detail != NotifyInferior)) + mouse->valuator->motionHintWindow = NullWindow; + if (grab) + { + mask = (pWin == grab->window) ? grab->eventMask : 0; + if (grab->ownerEvents) + mask |= EventMaskForClient(pWin, rClient(grab)); + } + else + { + mask = pWin->eventMask | wOtherEventMasks(pWin); + } + if (mask & filters[type]) + { + event.u.u.type = type; + event.u.u.detail = detail; + event.u.enterLeave.time = currentTime.milliseconds; + event.u.enterLeave.rootX = sprite.hot.x; + event.u.enterLeave.rootY = sprite.hot.y; + /* Counts on the same initial structure of crossing & button events! */ + FixUpEventFromWindow(&event, pWin, None, FALSE); + /* Enter/Leave events always set child */ + event.u.enterLeave.child = child; + event.u.enterLeave.flags = event.u.keyButtonPointer.sameScreen ? + ELFlagSameScreen : 0; +#ifdef XKB + if (!noXkbExtension) { + event.u.enterLeave.state = mouse->button->state & 0x1f00; + event.u.enterLeave.state |= + XkbGrabStateFromRec(&keybd->key->xkbInfo->state); + } else +#endif + event.u.enterLeave.state = keybd->key->state | mouse->button->state; + event.u.enterLeave.mode = mode; + focus = keybd->focus->win; + if ((focus != NoneWin) && + ((pWin == focus) || (focus == PointerRootWin) || + IsParent(focus, pWin))) + event.u.enterLeave.flags |= ELFlagFocus; + if (grab) + (void)TryClientEvents(rClient(grab), &event, 1, mask, + filters[type], grab); + else + (void)DeliverEventsToWindow(pWin, &event, 1, filters[type], + NullGrab, 0); + } + if ((type == EnterNotify) && (mask & KeymapStateMask)) + { + xKeymapEvent ke; + ClientPtr client = grab ? rClient(grab) + : clients[CLIENT_ID(pWin->drawable.id)]; + if (XaceHook(XACE_DEVICE_ACCESS, client, keybd, FALSE)) + memmove((char *)&ke.map[0], (char *)&keybd->key->down[1], 31); + else + bzero((char *)&ke.map[0], 31); + + ke.type = KeymapNotify; + if (grab) + (void)TryClientEvents(rClient(grab), (xEvent *)&ke, 1, mask, + KeymapStateMask, grab); + else + (void)DeliverEventsToWindow(pWin, (xEvent *)&ke, 1, + KeymapStateMask, NullGrab, 0); + } +} + +/** + * Send enter notifies to all parent windows up to ancestor. + * This function recurses. + */ +static void +EnterNotifies(WindowPtr ancestor, WindowPtr child, int mode, int detail) +{ + WindowPtr parent = child->parent; + + if (ancestor == parent) + return; + EnterNotifies(ancestor, parent, mode, detail); + EnterLeaveEvent(EnterNotify, mode, detail, parent, child->drawable.id); +} + + +/** + * Send leave notifies to all parent windows up to ancestor. + * This function recurses. + */ +static void +LeaveNotifies(WindowPtr child, WindowPtr ancestor, int mode, int detail) +{ + WindowPtr pWin; + + if (ancestor == child) + return; + for (pWin = child->parent; pWin != ancestor; pWin = pWin->parent) + { + EnterLeaveEvent(LeaveNotify, mode, detail, pWin, child->drawable.id); + child = pWin; + } +} + +/** + * Figure out if enter/leave events are necessary and send them to the + * appropriate windows. + * + * @param fromWin Window the sprite moved out of. + * @param toWin Window the sprite moved into. + */ +static void +DoEnterLeaveEvents(WindowPtr fromWin, WindowPtr toWin, int mode) +{ + if (fromWin == toWin) + return; + if (IsParent(fromWin, toWin)) + { + EnterLeaveEvent(LeaveNotify, mode, NotifyInferior, fromWin, None); + EnterNotifies(fromWin, toWin, mode, NotifyVirtual); + EnterLeaveEvent(EnterNotify, mode, NotifyAncestor, toWin, None); + } + else if (IsParent(toWin, fromWin)) + { + EnterLeaveEvent(LeaveNotify, mode, NotifyAncestor, fromWin, None); + LeaveNotifies(fromWin, toWin, mode, NotifyVirtual); + EnterLeaveEvent(EnterNotify, mode, NotifyInferior, toWin, None); + } + else + { /* neither fromWin nor toWin is descendent of the other */ + WindowPtr common = CommonAncestor(toWin, fromWin); + /* common == NullWindow ==> different screens */ + EnterLeaveEvent(LeaveNotify, mode, NotifyNonlinear, fromWin, None); + LeaveNotifies(fromWin, common, mode, NotifyNonlinearVirtual); + EnterNotifies(common, toWin, mode, NotifyNonlinearVirtual); + EnterLeaveEvent(EnterNotify, mode, NotifyNonlinear, toWin, None); + } +} + +static void +FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) +{ + xEvent event; + +#ifdef XINPUT + if (dev != inputInfo.keyboard) + { + DeviceFocusEvent(dev, type, mode, detail, pWin); + return; + } +#endif + event.u.focus.mode = mode; + event.u.u.type = type; + event.u.u.detail = detail; + event.u.focus.window = pWin->drawable.id; + (void)DeliverEventsToWindow(pWin, &event, 1, filters[type], NullGrab, + 0); + if ((type == FocusIn) && + ((pWin->eventMask | wOtherEventMasks(pWin)) & KeymapStateMask)) + { + xKeymapEvent ke; + ClientPtr client = clients[CLIENT_ID(pWin->drawable.id)]; + if (XaceHook(XACE_DEVICE_ACCESS, client, dev, FALSE)) + memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31); + else + bzero((char *)&ke.map[0], 31); + + ke.type = KeymapNotify; + (void)DeliverEventsToWindow(pWin, (xEvent *)&ke, 1, + KeymapStateMask, NullGrab, 0); + } +} + + /* + * recursive because it is easier + * no-op if child not descended from ancestor + */ +static Bool +FocusInEvents( + DeviceIntPtr dev, + WindowPtr ancestor, WindowPtr child, WindowPtr skipChild, + int mode, int detail, + Bool doAncestor) +{ + if (child == NullWindow) + return ancestor == NullWindow; + if (ancestor == child) + { + if (doAncestor) + FocusEvent(dev, FocusIn, mode, detail, child); + return TRUE; + } + if (FocusInEvents(dev, ancestor, child->parent, skipChild, mode, detail, + doAncestor)) + { + if (child != skipChild) + FocusEvent(dev, FocusIn, mode, detail, child); + return TRUE; + } + return FALSE; +} + +/* dies horribly if ancestor is not an ancestor of child */ +static void +FocusOutEvents( + DeviceIntPtr dev, + WindowPtr child, WindowPtr ancestor, + int mode, int detail, + Bool doAncestor) +{ + WindowPtr pWin; + + for (pWin = child; pWin != ancestor; pWin = pWin->parent) + FocusEvent(dev, FocusOut, mode, detail, pWin); + if (doAncestor) + FocusEvent(dev, FocusOut, mode, detail, ancestor); +} + +void +DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) +{ + int out, in; /* for holding details for to/from + PointerRoot/None */ + int i; + + if (fromWin == toWin) + return; + out = (fromWin == NoneWin) ? NotifyDetailNone : NotifyPointerRoot; + in = (toWin == NoneWin) ? NotifyDetailNone : NotifyPointerRoot; + /* wrong values if neither, but then not referenced */ + + if ((toWin == NullWindow) || (toWin == PointerRootWin)) + { + if ((fromWin == NullWindow) || (fromWin == PointerRootWin)) + { + if (fromWin == PointerRootWin) + FocusOutEvents(dev, sprite.win, ROOT, mode, NotifyPointer, + TRUE); + /* Notify all the roots */ +#ifdef PANORAMIX + if ( !noPanoramiXExtension ) + FocusEvent(dev, FocusOut, mode, out, WindowTable[0]); + else +#endif + for (i=0; iparent, NullWindow, mode, + NotifyNonlinearVirtual, FALSE); + } + /* Notify all the roots */ +#ifdef PANORAMIX + if ( !noPanoramiXExtension ) + FocusEvent(dev, FocusIn, mode, in, WindowTable[0]); + else +#endif + for (i=0; iparent != NullWindow) + (void)FocusInEvents(dev, ROOT, toWin, toWin, mode, + NotifyNonlinearVirtual, TRUE); + FocusEvent(dev, FocusIn, mode, NotifyNonlinear, toWin); + if (IsParent(toWin, sprite.win)) + (void)FocusInEvents(dev, toWin, sprite.win, NullWindow, mode, + NotifyPointer, FALSE); + } + else + { + if (IsParent(toWin, fromWin)) + { + FocusEvent(dev, FocusOut, mode, NotifyAncestor, fromWin); + FocusOutEvents(dev, fromWin->parent, toWin, mode, + NotifyVirtual, FALSE); + FocusEvent(dev, FocusIn, mode, NotifyInferior, toWin); + if ((IsParent(toWin, sprite.win)) && + (sprite.win != fromWin) && + (!IsParent(fromWin, sprite.win)) && + (!IsParent(sprite.win, fromWin))) + (void)FocusInEvents(dev, toWin, sprite.win, NullWindow, + mode, NotifyPointer, FALSE); + } + else + if (IsParent(fromWin, toWin)) + { + if ((IsParent(fromWin, sprite.win)) && + (sprite.win != fromWin) && + (!IsParent(toWin, sprite.win)) && + (!IsParent(sprite.win, toWin))) + FocusOutEvents(dev, sprite.win, fromWin, mode, + NotifyPointer, FALSE); + FocusEvent(dev, FocusOut, mode, NotifyInferior, fromWin); + (void)FocusInEvents(dev, fromWin, toWin, toWin, mode, + NotifyVirtual, FALSE); + FocusEvent(dev, FocusIn, mode, NotifyAncestor, toWin); + } + else + { + /* neither fromWin or toWin is child of other */ + WindowPtr common = CommonAncestor(toWin, fromWin); + /* common == NullWindow ==> different screens */ + if (IsParent(fromWin, sprite.win)) + FocusOutEvents(dev, sprite.win, fromWin, mode, + NotifyPointer, FALSE); + FocusEvent(dev, FocusOut, mode, NotifyNonlinear, fromWin); + if (fromWin->parent != NullWindow) + FocusOutEvents(dev, fromWin->parent, common, mode, + NotifyNonlinearVirtual, FALSE); + if (toWin->parent != NullWindow) + (void)FocusInEvents(dev, common, toWin, toWin, mode, + NotifyNonlinearVirtual, FALSE); + FocusEvent(dev, FocusIn, mode, NotifyNonlinear, toWin); + if (IsParent(toWin, sprite.win)) + (void)FocusInEvents(dev, toWin, sprite.win, NullWindow, + mode, NotifyPointer, FALSE); + } + } + } +} + +/** + * Set the input focus to the given window. Subsequent keyboard events will be + * delivered to the given window. + * + * Usually called from ProcSetInputFocus as result of a client request. If so, + * the device is the inputInfo.keyboard. + * If called from ProcXSetInputFocus as result of a client xinput request, the + * device is set to the device specified by the client. + * + * @param client Client that requested input focus change. + * @param dev Focus device. + * @param focusID The window to obtain the focus. Can be PointerRoot or None. + * @param revertTo Specifies where the focus reverts to when window becomes + * unviewable. + * @param ctime Specifies the time. + * @param followOK True if pointer is allowed to follow the keyboard. + */ +int +SetInputFocus( + ClientPtr client, + DeviceIntPtr dev, + Window focusID, + CARD8 revertTo, + Time ctime, + Bool followOK) +{ + FocusClassPtr focus; + WindowPtr focusWin; + int mode, rc; + TimeStamp time; + + UpdateCurrentTime(); + if ((revertTo != RevertToParent) && + (revertTo != RevertToPointerRoot) && + (revertTo != RevertToNone) && + ((revertTo != RevertToFollowKeyboard) || !followOK)) + { + client->errorValue = revertTo; + return BadValue; + } + time = ClientTimeToServerTime(ctime); + if ((focusID == None) || (focusID == PointerRoot)) + focusWin = (WindowPtr)(long)focusID; + else if ((focusID == FollowKeyboard) && followOK) + focusWin = inputInfo.keyboard->focus->win; + else { + rc = dixLookupWindow(&focusWin, focusID, client, DixReadAccess); + if (rc != Success) + return rc; + /* It is a match error to try to set the input focus to an + unviewable window. */ + if(!focusWin->realized) + return(BadMatch); + } + focus = dev->focus; + if ((CompareTimeStamps(time, currentTime) == LATER) || + (CompareTimeStamps(time, focus->time) == EARLIER)) + return Success; + mode = (dev->grab) ? NotifyWhileGrabbed : NotifyNormal; + if (focus->win == FollowKeyboardWin) + DoFocusEvents(dev, inputInfo.keyboard->focus->win, focusWin, mode); + else + DoFocusEvents(dev, focus->win, focusWin, mode); + focus->time = time; + focus->revert = revertTo; + if (focusID == FollowKeyboard) + focus->win = FollowKeyboardWin; + else + focus->win = focusWin; + if ((focusWin == NoneWin) || (focusWin == PointerRootWin)) + focus->traceGood = 0; + else + { + int depth = 0; + WindowPtr pWin; + + for (pWin = focusWin; pWin; pWin = pWin->parent) depth++; + if (depth > focus->traceSize) + { + focus->traceSize = depth+1; + Must_have_memory = TRUE; /* XXX */ + focus->trace = (WindowPtr *)xrealloc(focus->trace, + focus->traceSize * + sizeof(WindowPtr)); + Must_have_memory = FALSE; /* XXX */ + } + focus->traceGood = depth; + for (pWin = focusWin, depth--; pWin; pWin = pWin->parent, depth--) + focus->trace[depth] = pWin; + } + return Success; +} + +/** + * Server-side protocol handling for SetInputFocus request. + * + * Sets the input focus for the virtual core keyboard. + */ +int +ProcSetInputFocus(client) + ClientPtr client; +{ + REQUEST(xSetInputFocusReq); + + REQUEST_SIZE_MATCH(xSetInputFocusReq); + + if (!XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) + return Success; + + return SetInputFocus(client, inputInfo.keyboard, stuff->focus, + stuff->revertTo, stuff->time, FALSE); +} + +/** + * Server-side protocol handling for GetInputFocus request. + * + * Sends the current input focus for the virtual core keyboard back to the + * client. + */ +int +ProcGetInputFocus(ClientPtr client) +{ + xGetInputFocusReply rep; + /* REQUEST(xReq); */ + FocusClassPtr focus = inputInfo.keyboard->focus; + + REQUEST_SIZE_MATCH(xReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + if (focus->win == NoneWin) + rep.focus = None; + else if (focus->win == PointerRootWin) + rep.focus = PointerRoot; + else rep.focus = focus->win->drawable.id; + rep.revertTo = focus->revert; + WriteReplyToClient(client, sizeof(xGetInputFocusReply), &rep); + return Success; +} + +/** + * Server-side protocol handling for Grabpointer request. + * + * Sets an active grab on the inputInfo.pointer and returns success status to + * client. + */ +int +ProcGrabPointer(ClientPtr client) +{ + xGrabPointerReply rep; + DeviceIntPtr device = inputInfo.pointer; + GrabPtr grab; + WindowPtr pWin, confineTo; + CursorPtr cursor, oldCursor; + REQUEST(xGrabPointerReq); + TimeStamp time; + int rc; + + REQUEST_SIZE_MATCH(xGrabPointerReq); + UpdateCurrentTime(); + if ((stuff->pointerMode != GrabModeSync) && + (stuff->pointerMode != GrabModeAsync)) + { + client->errorValue = stuff->pointerMode; + return BadValue; + } + if ((stuff->keyboardMode != GrabModeSync) && + (stuff->keyboardMode != GrabModeAsync)) + { + client->errorValue = stuff->keyboardMode; + return BadValue; + } + if ((stuff->ownerEvents != xFalse) && (stuff->ownerEvents != xTrue)) + { + client->errorValue = stuff->ownerEvents; + return BadValue; + } + if (stuff->eventMask & ~PointerGrabMask) + { + client->errorValue = stuff->eventMask; + return BadValue; + } + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); + if (rc != Success) + return rc; + if (stuff->confineTo == None) + confineTo = NullWindow; + else + { + rc = dixLookupWindow(&confineTo, stuff->confineTo, client, + DixReadAccess); + if (rc != Success) + return rc; + } + if (stuff->cursor == None) + cursor = NullCursor; + else + { + cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, + RT_CURSOR, DixReadAccess); + if (!cursor) + { + client->errorValue = stuff->cursor; + return BadCursor; + } + } + /* at this point, some sort of reply is guaranteed. */ + time = ClientTimeToServerTime(stuff->time); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + grab = device->grab; + if ((grab) && !SameClient(grab, client)) + rep.status = AlreadyGrabbed; + else if ((!pWin->realized) || + (confineTo && + !(confineTo->realized && BorderSizeNotEmpty(confineTo)))) + rep.status = GrabNotViewable; + else if (device->sync.frozen && + device->sync.other && !SameClient(device->sync.other, client)) + rep.status = GrabFrozen; + else if ((CompareTimeStamps(time, currentTime) == LATER) || + (CompareTimeStamps(time, device->grabTime) == EARLIER)) + rep.status = GrabInvalidTime; + else + { + GrabRec tempGrab; + + oldCursor = NullCursor; + if (grab) + { + if (grab->confineTo && !confineTo) + ConfineCursorToWindow(ROOT, FALSE, FALSE); + oldCursor = grab->cursor; + } + tempGrab.cursor = cursor; + tempGrab.resource = client->clientAsMask; + tempGrab.ownerEvents = stuff->ownerEvents; + tempGrab.eventMask = stuff->eventMask; + tempGrab.confineTo = confineTo; + tempGrab.window = pWin; + tempGrab.keyboardMode = stuff->keyboardMode; + tempGrab.pointerMode = stuff->pointerMode; + tempGrab.device = device; + (*device->ActivateGrab)(device, &tempGrab, time, FALSE); + if (oldCursor) + FreeCursor (oldCursor, (Cursor)0); + rep.status = GrabSuccess; + } + WriteReplyToClient(client, sizeof(xGrabPointerReply), &rep); + return Success; +} + +/** + * Server-side protocol handling for ChangeActivePointerGrab request. + * + * Changes properties of the grab hold by the client. If the client does not + * hold an active grab on the device, nothing happens. + * + * Works on the core pointer only. + */ +int +ProcChangeActivePointerGrab(ClientPtr client) +{ + DeviceIntPtr device = inputInfo.pointer; + GrabPtr grab = device->grab; + CursorPtr newCursor, oldCursor; + REQUEST(xChangeActivePointerGrabReq); + TimeStamp time; + + REQUEST_SIZE_MATCH(xChangeActivePointerGrabReq); + if (stuff->eventMask & ~PointerGrabMask) + { + client->errorValue = stuff->eventMask; + return BadValue; + } + if (stuff->cursor == None) + newCursor = NullCursor; + else + { + newCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, + RT_CURSOR, DixReadAccess); + if (!newCursor) + { + client->errorValue = stuff->cursor; + return BadCursor; + } + } + if (!grab) + return Success; + if (!SameClient(grab, client)) + return Success; + time = ClientTimeToServerTime(stuff->time); + if ((CompareTimeStamps(time, currentTime) == LATER) || + (CompareTimeStamps(time, device->grabTime) == EARLIER)) + return Success; + oldCursor = grab->cursor; + grab->cursor = newCursor; + if (newCursor) + newCursor->refcnt++; + PostNewCursor(); + if (oldCursor) + FreeCursor(oldCursor, (Cursor)0); + grab->eventMask = stuff->eventMask; + return Success; +} + +/** + * Server-side protocol handling for UngrabPointer request. + * + * Deletes the pointer grab on the core pointer device. + */ +int +ProcUngrabPointer(ClientPtr client) +{ + DeviceIntPtr device = inputInfo.pointer; + GrabPtr grab; + TimeStamp time; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + UpdateCurrentTime(); + grab = device->grab; + time = ClientTimeToServerTime(stuff->id); + if ((CompareTimeStamps(time, currentTime) != LATER) && + (CompareTimeStamps(time, device->grabTime) != EARLIER) && + (grab) && SameClient(grab, client)) + (*device->DeactivateGrab)(device); + return Success; +} + +/** + * Sets a grab on the given device. + * + * Called from ProcGrabKeyboard to work on the inputInfo.keyboard. + * Called from ProcXGrabDevice to work on the device specified by the client. + * + * The parameters this_mode and other_mode represent the keyboard_mode and + * pointer_mode parameters of XGrabKeyboard(). + * See man page for details on all the parameters + * + * @param client Client that owns the grab. + * @param dev The device to grab. + * @param this_mode GrabModeSync or GrabModeAsync + * @param other_mode GrabModeSync or GrabModeAsync + * @param status Return code to be returned to the caller. + * + * @returns Success or BadValue. + */ +int +GrabDevice(ClientPtr client, DeviceIntPtr dev, + unsigned this_mode, unsigned other_mode, Window grabWindow, + unsigned ownerEvents, Time ctime, Mask mask, CARD8 *status) +{ + WindowPtr pWin; + GrabPtr grab; + TimeStamp time; + int rc; + + UpdateCurrentTime(); + if ((this_mode != GrabModeSync) && (this_mode != GrabModeAsync)) + { + client->errorValue = this_mode; + return BadValue; + } + if ((other_mode != GrabModeSync) && (other_mode != GrabModeAsync)) + { + client->errorValue = other_mode; + return BadValue; + } + if ((ownerEvents != xFalse) && (ownerEvents != xTrue)) + { + client->errorValue = ownerEvents; + return BadValue; + } + rc = dixLookupWindow(&pWin, grabWindow, client, DixReadAccess); + if (rc != Success) + return rc; + time = ClientTimeToServerTime(ctime); + grab = dev->grab; + if (grab && !SameClient(grab, client)) + *status = AlreadyGrabbed; + else if (!pWin->realized) + *status = GrabNotViewable; + else if ((CompareTimeStamps(time, currentTime) == LATER) || + (CompareTimeStamps(time, dev->grabTime) == EARLIER)) + *status = GrabInvalidTime; + else if (dev->sync.frozen && + dev->sync.other && !SameClient(dev->sync.other, client)) + *status = GrabFrozen; + else + { + GrabRec tempGrab; + + tempGrab.window = pWin; + tempGrab.resource = client->clientAsMask; + tempGrab.ownerEvents = ownerEvents; + tempGrab.keyboardMode = this_mode; + tempGrab.pointerMode = other_mode; + tempGrab.eventMask = mask; + tempGrab.device = dev; + (*dev->ActivateGrab)(dev, &tempGrab, time, FALSE); + *status = GrabSuccess; + } + return Success; +} + +/** + * Server-side protocol handling for GrabKeyboard request. + * + * Grabs the inputInfo.keyboad and returns success status to client. + */ +int +ProcGrabKeyboard(ClientPtr client) +{ + xGrabKeyboardReply rep; + REQUEST(xGrabKeyboardReq); + int result; + + REQUEST_SIZE_MATCH(xGrabKeyboardReq); + + if (XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) + result = GrabDevice(client, inputInfo.keyboard, stuff->keyboardMode, + stuff->pointerMode, stuff->grabWindow, + stuff->ownerEvents, stuff->time, + KeyPressMask | KeyReleaseMask, &rep.status); + else { + result = Success; + rep.status = AlreadyGrabbed; + } + + if (result != Success) + return result; + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + WriteReplyToClient(client, sizeof(xGrabKeyboardReply), &rep); + return Success; +} + +/** + * Server-side protocol handling for UngrabKeyboard request. + * + * Deletes a possible grab on the inputInfo.keyboard. + */ +int +ProcUngrabKeyboard(ClientPtr client) +{ + DeviceIntPtr device = inputInfo.keyboard; + GrabPtr grab; + TimeStamp time; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + UpdateCurrentTime(); + grab = device->grab; + time = ClientTimeToServerTime(stuff->id); + if ((CompareTimeStamps(time, currentTime) != LATER) && + (CompareTimeStamps(time, device->grabTime) != EARLIER) && + (grab) && SameClient(grab, client)) + (*device->DeactivateGrab)(device); + return Success; +} + +/** + * Server-side protocol handling for QueryPointer request. + * + * Returns the current state and position of the core pointer to the client. + */ +int +ProcQueryPointer(ClientPtr client) +{ + xQueryPointerReply rep; + WindowPtr pWin, t; + REQUEST(xResourceReq); + DeviceIntPtr mouse = inputInfo.pointer; + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; + if (mouse->valuator->motionHintWindow) + MaybeStopHint(mouse, client); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.mask = mouse->button->state | inputInfo.keyboard->key->state; + rep.length = 0; + rep.root = (ROOT)->drawable.id; + rep.rootX = sprite.hot.x; + rep.rootY = sprite.hot.y; + rep.child = None; + if (sprite.hot.pScreen == pWin->drawable.pScreen) + { + rep.sameScreen = xTrue; + rep.winX = sprite.hot.x - pWin->drawable.x; + rep.winY = sprite.hot.y - pWin->drawable.y; + for (t = sprite.win; t; t = t->parent) + if (t->parent == pWin) + { + rep.child = t->drawable.id; + break; + } + } + else + { + rep.sameScreen = xFalse; + rep.winX = 0; + rep.winY = 0; + } + +#ifdef PANORAMIX + if(!noPanoramiXExtension) { + rep.rootX += panoramiXdataPtr[0].x; + rep.rootY += panoramiXdataPtr[0].y; + if(stuff->id == rep.root) { + rep.winX += panoramiXdataPtr[0].x; + rep.winY += panoramiXdataPtr[0].y; + } + } +#endif + + WriteReplyToClient(client, sizeof(xQueryPointerReply), &rep); + + return(Success); +} + +/** + * Initializes the device list and the DIX sprite to sane values. Allocates + * trace memory used for quick window traversal. + */ +void +InitEvents(void) +{ + int i; + + sprite.hot.pScreen = sprite.hotPhys.pScreen = (ScreenPtr)NULL; + inputInfo.numDevices = 0; + inputInfo.devices = (DeviceIntPtr)NULL; + inputInfo.off_devices = (DeviceIntPtr)NULL; + inputInfo.keyboard = (DeviceIntPtr)NULL; + inputInfo.pointer = (DeviceIntPtr)NULL; + if (spriteTraceSize == 0) + { + spriteTraceSize = 32; + spriteTrace = (WindowPtr *)xalloc(32*sizeof(WindowPtr)); + if (!spriteTrace) + FatalError("failed to allocate spriteTrace"); + } + spriteTraceGood = 0; + lastEventMask = OwnerGrabButtonMask; + filters[MotionNotify] = PointerMotionMask; +#ifdef XEVIE + xeviewin = +#endif + sprite.win = NullWindow; + sprite.current = NullCursor; + sprite.hotLimits.x1 = 0; + sprite.hotLimits.y1 = 0; + sprite.hotLimits.x2 = 0; + sprite.hotLimits.y2 = 0; + sprite.confined = FALSE; + syncEvents.replayDev = (DeviceIntPtr)NULL; + syncEvents.replayWin = NullWindow; + while (syncEvents.pending) + { + QdEventPtr next = syncEvents.pending->next; + xfree(syncEvents.pending); + syncEvents.pending = next; + } + syncEvents.pendtail = &syncEvents.pending; + syncEvents.playingEvents = FALSE; + syncEvents.time.months = 0; + syncEvents.time.milliseconds = 0; /* hardly matters */ + currentTime.months = 0; + currentTime.milliseconds = GetTimeInMillis(); + lastDeviceEventTime = currentTime; + for (i = 0; i < DNPMCOUNT; i++) + { + DontPropagateMasks[i] = 0; + DontPropagateRefCnts[i] = 0; + } +} + +void +CloseDownEvents(void) +{ + xfree(spriteTrace); + spriteTrace = NULL; + spriteTraceSize = 0; +} + +/** + * Server-side protocol handling for SendEvent request. + * + * Locates the window to send the event to and forwards the event. + */ +int +ProcSendEvent(ClientPtr client) +{ + WindowPtr pWin; + WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */ + REQUEST(xSendEventReq); + + REQUEST_SIZE_MATCH(xSendEventReq); + + /* The client's event type must be a core event type or one defined by an + extension. */ + + if ( ! ((stuff->event.u.u.type > X_Reply && + stuff->event.u.u.type < LASTEvent) || + (stuff->event.u.u.type >= EXTENSION_EVENT_BASE && + stuff->event.u.u.type < (unsigned)lastEvent))) + { + client->errorValue = stuff->event.u.u.type; + return BadValue; + } + if (stuff->event.u.u.type == ClientMessage && + stuff->event.u.u.detail != 8 && + stuff->event.u.u.detail != 16 && + stuff->event.u.u.detail != 32) + { + client->errorValue = stuff->event.u.u.detail; + return BadValue; + } + if (stuff->eventMask & ~AllEventMasks) + { + client->errorValue = stuff->eventMask; + return BadValue; + } + + if (stuff->destination == PointerWindow) + pWin = sprite.win; + else if (stuff->destination == InputFocus) + { + WindowPtr inputFocus = inputInfo.keyboard->focus->win; + + if (inputFocus == NoneWin) + return Success; + + /* If the input focus is PointerRootWin, send the event to where + the pointer is if possible, then perhaps propogate up to root. */ + if (inputFocus == PointerRootWin) + inputFocus = ROOT; + + if (IsParent(inputFocus, sprite.win)) + { + effectiveFocus = inputFocus; + pWin = sprite.win; + } + else + effectiveFocus = pWin = inputFocus; + } + else + dixLookupWindow(&pWin, stuff->destination, client, DixReadAccess); + + if (!pWin) + return BadWindow; + if ((stuff->propagate != xFalse) && (stuff->propagate != xTrue)) + { + client->errorValue = stuff->propagate; + return BadValue; + } + stuff->event.u.u.type |= 0x80; + if (stuff->propagate) + { + for (;pWin; pWin = pWin->parent) + { + if (DeliverEventsToWindow(pWin, &stuff->event, 1, stuff->eventMask, + NullGrab, 0)) + return Success; + if (pWin == effectiveFocus) + return Success; + stuff->eventMask &= ~wDontPropagateMask(pWin); + if (!stuff->eventMask) + break; + } + } + else + (void)DeliverEventsToWindow(pWin, &stuff->event, 1, stuff->eventMask, + NullGrab, 0); + return Success; +} + +/** + * Server-side protocol handling for UngrabKey request. + * + * Deletes a passive grab for the given key. Only works on the + * inputInfo.keyboard. + */ +int +ProcUngrabKey(ClientPtr client) +{ + REQUEST(xUngrabKeyReq); + WindowPtr pWin; + GrabRec tempGrab; + DeviceIntPtr keybd = inputInfo.keyboard; + int rc; + + REQUEST_SIZE_MATCH(xUngrabKeyReq); + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); + if (rc != Success) + return rc; + + if (((stuff->key > keybd->key->curKeySyms.maxKeyCode) || + (stuff->key < keybd->key->curKeySyms.minKeyCode)) + && (stuff->key != AnyKey)) + { + client->errorValue = stuff->key; + return BadValue; + } + if ((stuff->modifiers != AnyModifier) && + (stuff->modifiers & ~AllModifiersMask)) + { + client->errorValue = stuff->modifiers; + return BadValue; + } + tempGrab.resource = client->clientAsMask; + tempGrab.device = keybd; + tempGrab.window = pWin; + tempGrab.modifiersDetail.exact = stuff->modifiers; + tempGrab.modifiersDetail.pMask = NULL; + tempGrab.modifierDevice = inputInfo.keyboard; + tempGrab.type = KeyPress; + tempGrab.detail.exact = stuff->key; + tempGrab.detail.pMask = NULL; + + if (!DeletePassiveGrabFromList(&tempGrab)) + return(BadAlloc); + return(Success); +} + +/** + * Server-side protocol handling for GrabKey request. + * + * Creates a grab for the inputInfo.keyboard and adds it to the list of + * passive grabs. + */ +int +ProcGrabKey(ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xGrabKeyReq); + GrabPtr grab; + DeviceIntPtr keybd = inputInfo.keyboard; + int rc; + + REQUEST_SIZE_MATCH(xGrabKeyReq); + if ((stuff->ownerEvents != xTrue) && (stuff->ownerEvents != xFalse)) + { + client->errorValue = stuff->ownerEvents; + return(BadValue); + } + if ((stuff->pointerMode != GrabModeSync) && + (stuff->pointerMode != GrabModeAsync)) + { + client->errorValue = stuff->pointerMode; + return BadValue; + } + if ((stuff->keyboardMode != GrabModeSync) && + (stuff->keyboardMode != GrabModeAsync)) + { + client->errorValue = stuff->keyboardMode; + return BadValue; + } + if (((stuff->key > keybd->key->curKeySyms.maxKeyCode) || + (stuff->key < keybd->key->curKeySyms.minKeyCode)) + && (stuff->key != AnyKey)) + { + client->errorValue = stuff->key; + return BadValue; + } + if ((stuff->modifiers != AnyModifier) && + (stuff->modifiers & ~AllModifiersMask)) + { + client->errorValue = stuff->modifiers; + return BadValue; + } + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); + if (rc != Success) + return rc; + + grab = CreateGrab(client->index, keybd, pWin, + (Mask)(KeyPressMask | KeyReleaseMask), (Bool)stuff->ownerEvents, + (Bool)stuff->keyboardMode, (Bool)stuff->pointerMode, + keybd, stuff->modifiers, KeyPress, stuff->key, + NullWindow, NullCursor); + if (!grab) + return BadAlloc; + return AddPassiveGrabToList(grab); +} + + +/** + * Server-side protocol handling for GrabButton request. + * + * Creates a grab for the inputInfo.pointer and adds it as a passive grab to + * the list. + */ +int +ProcGrabButton(ClientPtr client) +{ + WindowPtr pWin, confineTo; + REQUEST(xGrabButtonReq); + CursorPtr cursor; + GrabPtr grab; + int rc; + + REQUEST_SIZE_MATCH(xGrabButtonReq); + if ((stuff->pointerMode != GrabModeSync) && + (stuff->pointerMode != GrabModeAsync)) + { + client->errorValue = stuff->pointerMode; + return BadValue; + } + if ((stuff->keyboardMode != GrabModeSync) && + (stuff->keyboardMode != GrabModeAsync)) + { + client->errorValue = stuff->keyboardMode; + return BadValue; + } + if ((stuff->modifiers != AnyModifier) && + (stuff->modifiers & ~AllModifiersMask)) + { + client->errorValue = stuff->modifiers; + return BadValue; + } + if ((stuff->ownerEvents != xFalse) && (stuff->ownerEvents != xTrue)) + { + client->errorValue = stuff->ownerEvents; + return BadValue; + } + if (stuff->eventMask & ~PointerGrabMask) + { + client->errorValue = stuff->eventMask; + return BadValue; + } + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); + if (rc != Success) + return rc; + if (stuff->confineTo == None) + confineTo = NullWindow; + else { + rc = dixLookupWindow(&confineTo, stuff->confineTo, client, + DixReadAccess); + if (rc != Success) + return rc; + } + if (stuff->cursor == None) + cursor = NullCursor; + else + { + cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, + RT_CURSOR, DixReadAccess); + if (!cursor) + { + client->errorValue = stuff->cursor; + return BadCursor; + } + } + + + grab = CreateGrab(client->index, inputInfo.pointer, pWin, + (Mask)stuff->eventMask, (Bool)stuff->ownerEvents, + (Bool) stuff->keyboardMode, (Bool)stuff->pointerMode, + inputInfo.keyboard, stuff->modifiers, ButtonPress, + stuff->button, confineTo, cursor); + if (!grab) + return BadAlloc; + return AddPassiveGrabToList(grab); +} + +/** + * Server-side protocol handling for UngrabButton request. + * + * Deletes a passive grab on the inputInfo.pointer from the list. + */ +int +ProcUngrabButton(ClientPtr client) +{ + REQUEST(xUngrabButtonReq); + WindowPtr pWin; + GrabRec tempGrab; + int rc; + + REQUEST_SIZE_MATCH(xUngrabButtonReq); + if ((stuff->modifiers != AnyModifier) && + (stuff->modifiers & ~AllModifiersMask)) + { + client->errorValue = stuff->modifiers; + return BadValue; + } + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); + if (rc != Success) + return rc; + tempGrab.resource = client->clientAsMask; + tempGrab.device = inputInfo.pointer; + tempGrab.window = pWin; + tempGrab.modifiersDetail.exact = stuff->modifiers; + tempGrab.modifiersDetail.pMask = NULL; + tempGrab.modifierDevice = inputInfo.keyboard; + tempGrab.type = ButtonPress; + tempGrab.detail.exact = stuff->button; + tempGrab.detail.pMask = NULL; + + if (!DeletePassiveGrabFromList(&tempGrab)) + return(BadAlloc); + return(Success); +} + +/** + * Deactivate any grab that may be on the window, remove the focus. + * Delete any XInput extension events from the window too. Does not change the + * window mask. Use just before the window is deleted. + * + * If freeResources is set, passive grabs on the window are deleted. + * + * @param pWin The window to delete events from. + * @param freeResources True if resources associated with the window should be + * deleted. + */ +void +DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) +{ + WindowPtr parent; + DeviceIntPtr mouse = inputInfo.pointer; + DeviceIntPtr keybd = inputInfo.keyboard; + FocusClassPtr focus = keybd->focus; + OtherClientsPtr oc; + GrabPtr passive; + + + /* Deactivate any grabs performed on this window, before making any + input focus changes. */ + + if (mouse->grab && + ((mouse->grab->window == pWin) || (mouse->grab->confineTo == pWin))) + (*mouse->DeactivateGrab)(mouse); + + /* Deactivating a keyboard grab should cause focus events. */ + + if (keybd->grab && (keybd->grab->window == pWin)) + (*keybd->DeactivateGrab)(keybd); + + /* If the focus window is a root window (ie. has no parent) then don't + delete the focus from it. */ + + if ((pWin == focus->win) && (pWin->parent != NullWindow)) + { + int focusEventMode = NotifyNormal; + + /* If a grab is in progress, then alter the mode of focus events. */ + + if (keybd->grab) + focusEventMode = NotifyWhileGrabbed; + + switch (focus->revert) + { + case RevertToNone: + DoFocusEvents(keybd, pWin, NoneWin, focusEventMode); + focus->win = NoneWin; + focus->traceGood = 0; + break; + case RevertToParent: + parent = pWin; + do + { + parent = parent->parent; + focus->traceGood--; + } while (!parent->realized +/* This would be a good protocol change -- windows being reparented + during SaveSet processing would cause the focus to revert to the + nearest enclosing window which will survive the death of the exiting + client, instead of ending up reverting to a dying window and thence + to None + */ +#ifdef NOTDEF + || clients[CLIENT_ID(parent->drawable.id)]->clientGone +#endif + ); + DoFocusEvents(keybd, pWin, parent, focusEventMode); + focus->win = parent; + focus->revert = RevertToNone; + break; + case RevertToPointerRoot: + DoFocusEvents(keybd, pWin, PointerRootWin, focusEventMode); + focus->win = PointerRootWin; + focus->traceGood = 0; + break; + } + } + + if (mouse->valuator->motionHintWindow == pWin) + mouse->valuator->motionHintWindow = NullWindow; + + if (freeResources) + { + if (pWin->dontPropagate) + DontPropagateRefCnts[pWin->dontPropagate]--; + while ( (oc = wOtherClients(pWin)) ) + FreeResource(oc->resource, RT_NONE); + while ( (passive = wPassiveGrabs(pWin)) ) + FreeResource(passive->resource, RT_NONE); + } +#ifdef XINPUT + DeleteWindowFromAnyExtEvents(pWin, freeResources); +#endif +} + +/** + * Call this whenever some window at or below pWin has changed geometry. If + * there is a grab on the window, the cursor will be re-confined into the + * window. + */ +_X_EXPORT void +CheckCursorConfinement(WindowPtr pWin) +{ + GrabPtr grab = inputInfo.pointer->grab; + WindowPtr confineTo; + +#ifdef PANORAMIX + if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) return; +#endif + + if (grab && (confineTo = grab->confineTo)) + { + if (!BorderSizeNotEmpty(confineTo)) + (*inputInfo.pointer->DeactivateGrab)(inputInfo.pointer); + else if ((pWin == confineTo) || IsParent(pWin, confineTo)) + ConfineCursorToWindow(confineTo, TRUE, TRUE); + } +} + +Mask +EventMaskForClient(WindowPtr pWin, ClientPtr client) +{ + OtherClientsPtr other; + + if (wClient (pWin) == client) + return pWin->eventMask; + for (other = wOtherClients(pWin); other; other = other->next) + { + if (SameClient(other, client)) + return other->mask; + } + return 0; +} + +/** + * Server-side protocol handling for RecolorCursor request. + */ +int +ProcRecolorCursor(ClientPtr client) +{ + CursorPtr pCursor; + int nscr; + ScreenPtr pscr; + Bool displayed; + REQUEST(xRecolorCursorReq); + + REQUEST_SIZE_MATCH(xRecolorCursorReq); + pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, + RT_CURSOR, DixWriteAccess); + if ( !pCursor) + { + client->errorValue = stuff->cursor; + return (BadCursor); + } + + pCursor->foreRed = stuff->foreRed; + pCursor->foreGreen = stuff->foreGreen; + pCursor->foreBlue = stuff->foreBlue; + + pCursor->backRed = stuff->backRed; + pCursor->backGreen = stuff->backGreen; + pCursor->backBlue = stuff->backBlue; + + for (nscr = 0; nscr < screenInfo.numScreens; nscr++) + { + pscr = screenInfo.screens[nscr]; +#ifdef PANORAMIX + if(!noPanoramiXExtension) + displayed = (pscr == sprite.screen); + else +#endif + displayed = (pscr == sprite.hotPhys.pScreen); + ( *pscr->RecolorCursor)(pscr, pCursor, + (pCursor == sprite.current) && displayed); + } + return (Success); +} + +/** + * Write the given events to a client, swapping the byte order if necessary. + * To swap the byte ordering, a callback is called that has to be set up for + * the given event type. + * + * In the case of DeviceMotionNotify trailed by DeviceValuators, the events + * can be more than one. Usually it's just one event. + * + * Do not modify the event structure passed in. See comment below. + * + * @param pClient Client to send events to. + * @param count Number of events. + * @param events The event list. + */ +_X_EXPORT void +WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) +{ +#ifdef PANORAMIX + xEvent eventCopy; +#endif + xEvent eventTo, *eventFrom; + int i; + +#ifdef XKB + if ((!noXkbExtension)&&(!XkbFilterEvents(pClient, count, events))) + return; +#endif + +#ifdef PANORAMIX + if(!noPanoramiXExtension && + (panoramiXdataPtr[0].x || panoramiXdataPtr[0].y)) + { + switch(events->u.u.type) { + case MotionNotify: + case ButtonPress: + case ButtonRelease: + case KeyPress: + case KeyRelease: + case EnterNotify: + case LeaveNotify: + /* + When multiple clients want the same event DeliverEventsToWindow + passes the same event structure multiple times so we can't + modify the one passed to us + */ + count = 1; /* should always be 1 */ + memcpy(&eventCopy, events, sizeof(xEvent)); + eventCopy.u.keyButtonPointer.rootX += panoramiXdataPtr[0].x; + eventCopy.u.keyButtonPointer.rootY += panoramiXdataPtr[0].y; + if(eventCopy.u.keyButtonPointer.event == + eventCopy.u.keyButtonPointer.root) + { + eventCopy.u.keyButtonPointer.eventX += panoramiXdataPtr[0].x; + eventCopy.u.keyButtonPointer.eventY += panoramiXdataPtr[0].y; + } + events = &eventCopy; + break; + default: break; + } + } +#endif + + if (EventCallback) + { + EventInfoRec eventinfo; + eventinfo.client = pClient; + eventinfo.events = events; + eventinfo.count = count; + CallCallbacks(&EventCallback, (pointer)&eventinfo); + } +#ifdef XSERVER_DTRACE + if (XSERVER_SEND_EVENT_ENABLED()) { + for (i = 0; i < count; i++) + { + XSERVER_SEND_EVENT(pClient->index, events[i].u.u.type, &events[i]); + } + } +#endif + if(pClient->swapped) + { + for(i = 0; i < count; i++) + { + eventFrom = &events[i]; + /* Remember to strip off the leading bit of type in case + this event was sent with "SendEvent." */ + (*EventSwapVector[eventFrom->u.u.type & 0177]) + (eventFrom, &eventTo); + (void)WriteToClient(pClient, sizeof(xEvent), (char *)&eventTo); + } + } + else + { + (void)WriteToClient(pClient, count * sizeof(xEvent), (char *) events); + } +} diff --git a/xorg-server-1.4/dix/extension.c b/xorg-server-1.4/dix/extension.c new file mode 100644 index 0000000..186574d --- /dev/null +++ b/xorg-server-1.4/dix/extension.c @@ -0,0 +1,406 @@ +/*********************************************************** + +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 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. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#define NEED_EVENTS +#define NEED_REPLIES +#include +#include "misc.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "gcstruct.h" +#include "scrnintstr.h" +#include "dispatch.h" +#include "xace.h" + +#define EXTENSION_BASE 128 +#define EXTENSION_EVENT_BASE 64 +#define LAST_EVENT 128 +#define LAST_ERROR 255 + +static ExtensionEntry **extensions = (ExtensionEntry **)NULL; + +int lastEvent = EXTENSION_EVENT_BASE; +static int lastError = FirstExtensionError; +static unsigned int NumExtensions = 0; + +extern int extensionPrivateLen; +extern unsigned *extensionPrivateSizes; +extern unsigned totalExtensionSize; + +static void +InitExtensionPrivates(ExtensionEntry *ext) +{ + char *ptr; + DevUnion *ppriv; + unsigned *sizes; + unsigned size; + int i; + + if (totalExtensionSize == sizeof(ExtensionEntry)) + ppriv = (DevUnion *)NULL; + else + ppriv = (DevUnion *)(ext + 1); + + ext->devPrivates = ppriv; + sizes = extensionPrivateSizes; + ptr = (char *)(ppriv + extensionPrivateLen); + for (i = extensionPrivateLen; --i >= 0; ppriv++, sizes++) + { + if ( (size = *sizes) ) + { + ppriv->ptr = (pointer)ptr; + ptr += size; + } + else + ppriv->ptr = (pointer)NULL; + } +} + +_X_EXPORT ExtensionEntry * +AddExtension(char *name, int NumEvents, int NumErrors, + int (*MainProc)(ClientPtr c1), + int (*SwappedMainProc)(ClientPtr c2), + void (*CloseDownProc)(ExtensionEntry *e), + unsigned short (*MinorOpcodeProc)(ClientPtr c3)) +{ + int i; + ExtensionEntry *ext, **newexts; + + if (!MainProc || !SwappedMainProc || !CloseDownProc || !MinorOpcodeProc) + return((ExtensionEntry *) NULL); + if ((lastEvent + NumEvents > LAST_EVENT) || + (unsigned)(lastError + NumErrors > LAST_ERROR)) + return((ExtensionEntry *) NULL); + + ext = (ExtensionEntry *) xalloc(totalExtensionSize); + if (!ext) + return((ExtensionEntry *) NULL); + bzero(ext, totalExtensionSize); + InitExtensionPrivates(ext); + ext->name = (char *)xalloc(strlen(name) + 1); + ext->num_aliases = 0; + ext->aliases = (char **)NULL; + if (!ext->name) + { + xfree(ext); + return((ExtensionEntry *) NULL); + } + strcpy(ext->name, name); + i = NumExtensions; + newexts = (ExtensionEntry **) xrealloc(extensions, + (i + 1) * sizeof(ExtensionEntry *)); + if (!newexts) + { + xfree(ext->name); + xfree(ext); + return((ExtensionEntry *) NULL); + } + NumExtensions++; + extensions = newexts; + extensions[i] = ext; + ext->index = i; + ext->base = i + EXTENSION_BASE; + ext->CloseDown = CloseDownProc; + ext->MinorOpcode = MinorOpcodeProc; + ProcVector[i + EXTENSION_BASE] = MainProc; + SwappedProcVector[i + EXTENSION_BASE] = SwappedMainProc; + if (NumEvents) + { + ext->eventBase = lastEvent; + ext->eventLast = lastEvent + NumEvents; + lastEvent += NumEvents; + } + else + { + ext->eventBase = 0; + ext->eventLast = 0; + } + if (NumErrors) + { + ext->errorBase = lastError; + ext->errorLast = lastError + NumErrors; + lastError += NumErrors; + } + else + { + ext->errorBase = 0; + ext->errorLast = 0; + } + + return(ext); +} + +_X_EXPORT Bool AddExtensionAlias(char *alias, ExtensionEntry *ext) +{ + char *name; + char **aliases; + + aliases = (char **)xrealloc(ext->aliases, + (ext->num_aliases + 1) * sizeof(char *)); + if (!aliases) + return FALSE; + ext->aliases = aliases; + name = (char *)xalloc(strlen(alias) + 1); + if (!name) + return FALSE; + strcpy(name, alias); + ext->aliases[ext->num_aliases] = name; + ext->num_aliases++; + return TRUE; +} + +static int +FindExtension(char *extname, int len) +{ + int i, j; + + for (i=0; iname) == len) && + !strncmp(extname, extensions[i]->name, len)) + break; + for (j = extensions[i]->num_aliases; --j >= 0;) + { + if ((strlen(extensions[i]->aliases[j]) == len) && + !strncmp(extname, extensions[i]->aliases[j], len)) + break; + } + if (j >= 0) break; + } + return ((i == NumExtensions) ? -1 : i); +} + +/* + * CheckExtension returns the extensions[] entry for the requested + * extension name. Maybe this could just return a Bool instead? + */ +_X_EXPORT ExtensionEntry * +CheckExtension(const char *extname) +{ + int n; + + n = FindExtension((char*)extname, strlen(extname)); + if (n != -1) + return extensions[n]; + else + return NULL; +} + +/* + * Added as part of Xace. + */ +ExtensionEntry * +GetExtensionEntry(int major) +{ + if (major < EXTENSION_BASE) + return NULL; + major -= EXTENSION_BASE; + if (major >= NumExtensions) + return NULL; + return extensions[major]; +} + +_X_EXPORT void +DeclareExtensionSecurity(char *extname, Bool secure) +{ + int i = FindExtension(extname, strlen(extname)); + if (i >= 0) + XaceHook(XACE_DECLARE_EXT_SECURE, extensions[i], secure); +} + +_X_EXPORT unsigned short +StandardMinorOpcode(ClientPtr client) +{ + return ((xReq *)client->requestBuffer)->data; +} + +_X_EXPORT unsigned short +MinorOpcodeOfRequest(ClientPtr client) +{ + unsigned char major; + + major = ((xReq *)client->requestBuffer)->reqType; + if (major < EXTENSION_BASE) + return 0; + major -= EXTENSION_BASE; + if (major >= NumExtensions) + return 0; + return (*extensions[major]->MinorOpcode)(client); +} + +void +CloseDownExtensions(void) +{ + int i,j; + + for (i = NumExtensions - 1; i >= 0; i--) + { + (* extensions[i]->CloseDown)(extensions[i]); + NumExtensions = i; + xfree(extensions[i]->name); + for (j = extensions[i]->num_aliases; --j >= 0;) + xfree(extensions[i]->aliases[j]); + xfree(extensions[i]->aliases); + xfree(extensions[i]); + } + xfree(extensions); + extensions = (ExtensionEntry **)NULL; + lastEvent = EXTENSION_EVENT_BASE; + lastError = FirstExtensionError; +} + +int +ProcQueryExtension(ClientPtr client) +{ + xQueryExtensionReply reply; + int i; + REQUEST(xQueryExtensionReq); + + REQUEST_FIXED_SIZE(xQueryExtensionReq, stuff->nbytes); + + reply.type = X_Reply; + reply.length = 0; + reply.major_opcode = 0; + reply.sequenceNumber = client->sequence; + + if ( ! NumExtensions ) + reply.present = xFalse; + else + { + i = FindExtension((char *)&stuff[1], stuff->nbytes); + if (i < 0 || !XaceHook(XACE_EXT_ACCESS, client, extensions[i])) + reply.present = xFalse; + else + { + reply.present = xTrue; + reply.major_opcode = extensions[i]->base; + reply.first_event = extensions[i]->eventBase; + reply.first_error = extensions[i]->errorBase; + } + } + WriteReplyToClient(client, sizeof(xQueryExtensionReply), &reply); + return(client->noClientException); +} + +int +ProcListExtensions(ClientPtr client) +{ + xListExtensionsReply reply; + char *bufptr, *buffer; + int total_length = 0; + + REQUEST_SIZE_MATCH(xReq); + + reply.type = X_Reply; + reply.nExtensions = 0; + reply.length = 0; + reply.sequenceNumber = client->sequence; + buffer = NULL; + + if ( NumExtensions ) + { + int i, j; + + for (i=0; iname) + 1; + reply.nExtensions += 1 + extensions[i]->num_aliases; + for (j = extensions[i]->num_aliases; --j >= 0;) + total_length += strlen(extensions[i]->aliases[j]) + 1; + } + reply.length = (total_length + 3) >> 2; + buffer = bufptr = (char *)ALLOCATE_LOCAL(total_length); + if (!buffer) + return(BadAlloc); + for (i=0; iname); + memmove(bufptr, extensions[i]->name, len); + bufptr += len; + for (j = extensions[i]->num_aliases; --j >= 0;) + { + *bufptr++ = len = strlen(extensions[i]->aliases[j]); + memmove(bufptr, extensions[i]->aliases[j], len); + bufptr += len; + } + } + } + WriteReplyToClient(client, sizeof(xListExtensionsReply), &reply); + if (reply.length) + { + WriteToClient(client, total_length, buffer); + DEALLOCATE_LOCAL(buffer); + } + return(client->noClientException); +} + +#ifdef XSERVER_DTRACE +void LoadExtensionNames(char **RequestNames) { + int i; + + for (i=0; ibase; + + if (RequestNames[r] == NULL) { + RequestNames[r] = strdup(extensions[i]->name); + } + } +} +#endif diff --git a/xorg-server-1.4/dix/ffs.c b/xorg-server-1.4/dix/ffs.c new file mode 100644 index 0000000..b75657d --- /dev/null +++ b/xorg-server-1.4/dix/ffs.c @@ -0,0 +1,44 @@ +/* + +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 MERCHANTABIL- +ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL- +ITY, 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. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "dix.h" + +int +ffs(int i) +{ + int j; + if (i == 0) + return 0; + for (j = 1; (i & 1) == 0; j++) + i >>= 1; + return j; +} diff --git a/xorg-server-1.4/dix/gc.c b/xorg-server-1.4/dix/gc.c new file mode 100644 index 0000000..7a76dd9 --- /dev/null +++ b/xorg-server-1.4/dix/gc.c @@ -0,0 +1,1275 @@ +/*********************************************************** + +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 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. + +******************************************************************/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include "misc.h" +#include "resource.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "dixfontstr.h" +#include "scrnintstr.h" +#include "region.h" + +#include "dix.h" +#include + +extern XID clientErrorValue; +extern FontPtr defaultFont; + +static Bool CreateDefaultTile(GCPtr pGC); + +static unsigned char DefaultDash[2] = {4, 4}; + +_X_EXPORT void +ValidateGC(DrawablePtr pDraw, GC *pGC) +{ + (*pGC->funcs->ValidateGC) (pGC, pGC->stateChanges, pDraw); + pGC->stateChanges = 0; + pGC->serialNumber = pDraw->serialNumber; +} + + +/* dixChangeGC(client, pGC, mask, pC32, pUnion) + * + * This function was created as part of the Security extension + * implementation. The client performing the gc change must be passed so + * that access checks can be performed on any tiles, stipples, or fonts + * that are specified. ddxen can call this too; they should normally + * pass NullClient for the client since any access checking should have + * already been done at a higher level. + * + * Since we had to create a new function anyway, we decided to change the + * way the list of gc values is passed to eliminate the compiler warnings + * caused by the DoChangeGC interface. You can pass the values via pC32 + * or pUnion, but not both; one of them must be NULL. If you don't need + * to pass any pointers, you can use either one: + * + * example calling dixChangeGC using pC32 parameter + * + * CARD32 v[2]; + * v[0] = foreground; + * v[1] = background; + * dixChangeGC(client, pGC, GCForeground|GCBackground, v, NULL); + * + * example calling dixChangeGC using pUnion parameter; + * same effect as above + * + * ChangeGCVal v[2]; + * v[0].val = foreground; + * v[1].val = background; + * dixChangeGC(client, pGC, GCForeground|GCBackground, NULL, v); + * + * However, if you need to pass a pointer to a pixmap or font, you MUST + * use the pUnion parameter. + * + * example calling dixChangeGC passing pointers in the value list + * v[1].ptr is a pointer to a pixmap + * + * ChangeGCVal v[2]; + * v[0].val = FillTiled; + * v[1].ptr = pPixmap; + * dixChangeGC(client, pGC, GCFillStyle|GCTile, NULL, v); + * + * Note: we could have gotten by with just the pUnion parameter, but on + * 64 bit machines that would have forced us to copy the value list that + * comes in the ChangeGC request. + * + * Ideally, we'd change all the DoChangeGC calls to dixChangeGC, but this + * is far too many changes to consider at this time, so we've only + * changed the ones that caused compiler warnings. New code should use + * dixChangeGC. + * + * dpw + */ + +#define NEXTVAL(_type, _var) { \ + if (pC32) _var = (_type)*pC32++; \ + else { \ + _var = (_type)(pUnion->val); pUnion++; \ + } \ + } + +#define NEXT_PTR(_type, _var) { \ + assert(pUnion); _var = (_type)pUnion->ptr; pUnion++; } + +_X_EXPORT int +dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pUnion) +{ + BITS32 index2; + int error = 0; + PixmapPtr pPixmap; + BITS32 maskQ; + + assert( (pC32 && !pUnion) || (!pC32 && pUnion) ); + pGC->serialNumber |= GC_CHANGE_SERIAL_BIT; + + maskQ = mask; /* save these for when we walk the GCque */ + while (mask && !error) + { + index2 = (BITS32) lowbit (mask); + mask &= ~index2; + pGC->stateChanges |= index2; + switch (index2) + { + case GCFunction: + { + CARD8 newalu; + NEXTVAL(CARD8, newalu); + if (newalu <= GXset) + pGC->alu = newalu; + else + { + clientErrorValue = newalu; + error = BadValue; + } + break; + } + case GCPlaneMask: + NEXTVAL(unsigned long, pGC->planemask); + break; + case GCForeground: + NEXTVAL(unsigned long, pGC->fgPixel); + /* + * this is for CreateGC + */ + if (!pGC->tileIsPixel && !pGC->tile.pixmap) + { + pGC->tileIsPixel = TRUE; + pGC->tile.pixel = pGC->fgPixel; + } + break; + case GCBackground: + NEXTVAL(unsigned long, pGC->bgPixel); + break; + case GCLineWidth: /* ??? line width is a CARD16 */ + NEXTVAL(CARD16, pGC->lineWidth); + break; + case GCLineStyle: + { + unsigned int newlinestyle; + NEXTVAL(unsigned int, newlinestyle); + if (newlinestyle <= LineDoubleDash) + pGC->lineStyle = newlinestyle; + else + { + clientErrorValue = newlinestyle; + error = BadValue; + } + break; + } + case GCCapStyle: + { + unsigned int newcapstyle; + NEXTVAL(unsigned int, newcapstyle); + if (newcapstyle <= CapProjecting) + pGC->capStyle = newcapstyle; + else + { + clientErrorValue = newcapstyle; + error = BadValue; + } + break; + } + case GCJoinStyle: + { + unsigned int newjoinstyle; + NEXTVAL(unsigned int, newjoinstyle); + if (newjoinstyle <= JoinBevel) + pGC->joinStyle = newjoinstyle; + else + { + clientErrorValue = newjoinstyle; + error = BadValue; + } + break; + } + case GCFillStyle: + { + unsigned int newfillstyle; + NEXTVAL(unsigned int, newfillstyle); + if (newfillstyle <= FillOpaqueStippled) + pGC->fillStyle = newfillstyle; + else + { + clientErrorValue = newfillstyle; + error = BadValue; + } + break; + } + case GCFillRule: + { + unsigned int newfillrule; + NEXTVAL(unsigned int, newfillrule); + if (newfillrule <= WindingRule) + pGC->fillRule = newfillrule; + else + { + clientErrorValue = newfillrule; + error = BadValue; + } + break; + } + case GCTile: + { + XID newpix = 0; + if (pUnion) + { + NEXT_PTR(PixmapPtr, pPixmap); + } + else + { + NEXTVAL(XID, newpix); + pPixmap = (PixmapPtr)SecurityLookupIDByType(client, + newpix, RT_PIXMAP, DixReadAccess); + } + if (pPixmap) + { + if ((pPixmap->drawable.depth != pGC->depth) || + (pPixmap->drawable.pScreen != pGC->pScreen)) + { + error = BadMatch; + } + else + { + pPixmap->refcnt++; + if (!pGC->tileIsPixel) + (* pGC->pScreen->DestroyPixmap)(pGC->tile.pixmap); + pGC->tileIsPixel = FALSE; + pGC->tile.pixmap = pPixmap; + } + } + else + { + clientErrorValue = newpix; + error = BadPixmap; + } + break; + } + case GCStipple: + { + XID newstipple = 0; + if (pUnion) + { + NEXT_PTR(PixmapPtr, pPixmap); + } + else + { + NEXTVAL(XID, newstipple) + pPixmap = (PixmapPtr)SecurityLookupIDByType(client, + newstipple, RT_PIXMAP, DixReadAccess); + } + if (pPixmap) + { + if ((pPixmap->drawable.depth != 1) || + (pPixmap->drawable.pScreen != pGC->pScreen)) + { + error = BadMatch; + } + else + { + pPixmap->refcnt++; + if (pGC->stipple) + (* pGC->pScreen->DestroyPixmap)(pGC->stipple); + pGC->stipple = pPixmap; + } + } + else + { + clientErrorValue = newstipple; + error = BadPixmap; + } + break; + } + case GCTileStipXOrigin: + NEXTVAL(INT16, pGC->patOrg.x); + break; + case GCTileStipYOrigin: + NEXTVAL(INT16, pGC->patOrg.y); + break; + case GCFont: + { + FontPtr pFont; + XID newfont = 0; + if (pUnion) + { + NEXT_PTR(FontPtr, pFont); + } + else + { + NEXTVAL(XID, newfont) + pFont = (FontPtr)SecurityLookupIDByType(client, newfont, + RT_FONT, DixReadAccess); + } + if (pFont) + { + pFont->refcnt++; + if (pGC->font) + CloseFont(pGC->font, (Font)0); + pGC->font = pFont; + } + else + { + clientErrorValue = newfont; + error = BadFont; + } + break; + } + case GCSubwindowMode: + { + unsigned int newclipmode; + NEXTVAL(unsigned int, newclipmode); + if (newclipmode <= IncludeInferiors) + pGC->subWindowMode = newclipmode; + else + { + clientErrorValue = newclipmode; + error = BadValue; + } + break; + } + case GCGraphicsExposures: + { + unsigned int newge; + NEXTVAL(unsigned int, newge); + if (newge <= xTrue) + pGC->graphicsExposures = newge; + else + { + clientErrorValue = newge; + error = BadValue; + } + break; + } + case GCClipXOrigin: + NEXTVAL(INT16, pGC->clipOrg.x); + break; + case GCClipYOrigin: + NEXTVAL(INT16, pGC->clipOrg.y); + break; + case GCClipMask: + { + Pixmap pid = 0; + int clipType = 0; + + if (pUnion) + { + NEXT_PTR(PixmapPtr, pPixmap); + } + else + { + NEXTVAL(Pixmap, pid) + if (pid == None) + { + clipType = CT_NONE; + pPixmap = NullPixmap; + } + else + pPixmap = (PixmapPtr)SecurityLookupIDByType(client, + pid, RT_PIXMAP, DixReadAccess); + } + + if (pPixmap) + { + if ((pPixmap->drawable.depth != 1) || + (pPixmap->drawable.pScreen != pGC->pScreen)) + { + error = BadMatch; + } + else + { + clipType = CT_PIXMAP; + pPixmap->refcnt++; + } + } + else if (!pUnion && (pid != None)) + { + clientErrorValue = pid; + error = BadPixmap; + } + if(error == Success) + { + (*pGC->funcs->ChangeClip)(pGC, clipType, + (pointer)pPixmap, 0); + } + break; + } + case GCDashOffset: + NEXTVAL(INT16, pGC->dashOffset); + break; + case GCDashList: + { + CARD8 newdash; + NEXTVAL(CARD8, newdash); + if (newdash == 4) + { + if (pGC->dash != DefaultDash) + { + xfree(pGC->dash); + pGC->numInDashList = 2; + pGC->dash = DefaultDash; + } + } + else if (newdash != 0) + { + unsigned char *dash; + + dash = (unsigned char *)xalloc(2 * sizeof(unsigned char)); + if (dash) + { + if (pGC->dash != DefaultDash) + xfree(pGC->dash); + pGC->numInDashList = 2; + pGC->dash = dash; + dash[0] = newdash; + dash[1] = newdash; + } + else + error = BadAlloc; + } + else + { + clientErrorValue = newdash; + error = BadValue; + } + break; + } + case GCArcMode: + { + unsigned int newarcmode; + NEXTVAL(unsigned int, newarcmode); + if (newarcmode <= ArcPieSlice) + pGC->arcMode = newarcmode; + else + { + clientErrorValue = newarcmode; + error = BadValue; + } + break; + } + default: + clientErrorValue = maskQ; + error = BadValue; + break; + } + } /* end while mask && !error */ + + if (pGC->fillStyle == FillTiled && pGC->tileIsPixel) + { + if (!CreateDefaultTile (pGC)) + { + pGC->fillStyle = FillSolid; + error = BadAlloc; + } + } + (*pGC->funcs->ChangeGC)(pGC, maskQ); + return error; +} + +#undef NEXTVAL +#undef NEXT_PTR + +/* Publically defined entry to ChangeGC. Just calls dixChangeGC and tells + * it that all of the entries are constants or IDs */ +_X_EXPORT int +ChangeGC(GC *pGC, BITS32 mask, XID *pval) +{ + return (dixChangeGC(NullClient, pGC, mask, pval, NULL)); +} + +/* DoChangeGC(pGC, mask, pval, fPointer) + mask is a set of bits indicating which values to change. + pval contains an appropriate value for each mask. + fPointer is true if the values for tiles, stipples, fonts or clipmasks + are pointers instead of IDs. Note: if you are passing pointers you + MUST declare the array of values as type pointer! Other data types + may not be large enough to hold pointers on some machines. Yes, + this means you have to cast to (XID *) when you pass the array to + DoChangeGC. Similarly, if you are not passing pointers (fPointer = 0) you + MUST declare the array as type XID (not unsigned long!), or again the wrong + size data type may be used. To avoid this cruftiness, use dixChangeGC + above. + + if there is an error, the value is marked as changed + anyway, which is probably wrong, but infrequent. + +NOTE: + all values sent over the protocol for ChangeGC requests are +32 bits long +*/ +_X_EXPORT int +DoChangeGC(GC *pGC, BITS32 mask, XID *pval, int fPointer) +{ + if (fPointer) + /* XXX might be a problem on 64 bit big-endian servers */ + return dixChangeGC(NullClient, pGC, mask, NULL, (ChangeGCValPtr)pval); + else + return dixChangeGC(NullClient, pGC, mask, pval, NULL); +} + + +/* CreateGC(pDrawable, mask, pval, pStatus) + creates a default GC for the given drawable, using mask to fill + in any non-default values. + Returns a pointer to the new GC on success, NULL otherwise. + returns status of non-default fields in pStatus +BUG: + should check for failure to create default tile + +*/ + +static GCPtr +AllocateGC(ScreenPtr pScreen) +{ + GCPtr pGC; + char *ptr; + DevUnion *ppriv; + unsigned *sizes; + unsigned size; + int i; + + pGC = (GCPtr)xalloc(pScreen->totalGCSize); + if (pGC) + { + ppriv = (DevUnion *)(pGC + 1); + pGC->devPrivates = ppriv; + sizes = pScreen->GCPrivateSizes; + ptr = (char *)(ppriv + pScreen->GCPrivateLen); + for (i = pScreen->GCPrivateLen; --i >= 0; ppriv++, sizes++) + { + if ( (size = *sizes) ) + { + ppriv->ptr = (pointer)ptr; + ptr += size; + } + else + ppriv->ptr = (pointer)NULL; + } + } + return pGC; +} + +_X_EXPORT GCPtr +CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus) +{ + GCPtr pGC; + + pGC = AllocateGC(pDrawable->pScreen); + if (!pGC) + { + *pStatus = BadAlloc; + return (GCPtr)NULL; + } + + pGC->pScreen = pDrawable->pScreen; + pGC->depth = pDrawable->depth; + pGC->alu = GXcopy; /* dst <- src */ + pGC->planemask = ~0; + pGC->serialNumber = GC_CHANGE_SERIAL_BIT; + pGC->funcs = 0; + + pGC->fgPixel = 0; + pGC->bgPixel = 1; + pGC->lineWidth = 0; + pGC->lineStyle = LineSolid; + pGC->capStyle = CapButt; + pGC->joinStyle = JoinMiter; + pGC->fillStyle = FillSolid; + pGC->fillRule = EvenOddRule; + pGC->arcMode = ArcPieSlice; + if (mask & GCForeground) + { + /* + * magic special case -- ChangeGC checks for this condition + * and snags the Foreground value to create a pseudo default-tile + */ + pGC->tileIsPixel = FALSE; + pGC->tile.pixmap = NullPixmap; + } + else + { + pGC->tileIsPixel = TRUE; + pGC->tile.pixel = 0; + } + + pGC->patOrg.x = 0; + pGC->patOrg.y = 0; + pGC->subWindowMode = ClipByChildren; + pGC->graphicsExposures = TRUE; + pGC->clipOrg.x = 0; + pGC->clipOrg.y = 0; + pGC->clientClipType = CT_NONE; + pGC->clientClip = (pointer)NULL; + pGC->numInDashList = 2; + pGC->dash = DefaultDash; + pGC->dashOffset = 0; + pGC->lastWinOrg.x = 0; + pGC->lastWinOrg.y = 0; + + /* use the default font and stipple */ + pGC->font = defaultFont; + defaultFont->refcnt++; + pGC->stipple = pGC->pScreen->PixmapPerDepth[0]; + pGC->stipple->refcnt++; + + pGC->stateChanges = (1 << (GCLastBit+1)) - 1; + if (!(*pGC->pScreen->CreateGC)(pGC)) + *pStatus = BadAlloc; + else if (mask) + *pStatus = ChangeGC(pGC, mask, pval); + else + *pStatus = Success; + if (*pStatus != Success) + { + if (!pGC->tileIsPixel && !pGC->tile.pixmap) + pGC->tileIsPixel = TRUE; /* undo special case */ + FreeGC(pGC, (XID)0); + pGC = (GCPtr)NULL; + } + + return (pGC); +} + +static Bool +CreateDefaultTile (GCPtr pGC) +{ + XID tmpval[3]; + PixmapPtr pTile; + GCPtr pgcScratch; + xRectangle rect; + CARD16 w, h; + + w = 1; + h = 1; + (*pGC->pScreen->QueryBestSize)(TileShape, &w, &h, pGC->pScreen); + pTile = (PixmapPtr) + (*pGC->pScreen->CreatePixmap)(pGC->pScreen, + w, h, pGC->depth); + pgcScratch = GetScratchGC(pGC->depth, pGC->pScreen); + if (!pTile || !pgcScratch) + { + if (pTile) + (*pTile->drawable.pScreen->DestroyPixmap)(pTile); + if (pgcScratch) + FreeScratchGC(pgcScratch); + return FALSE; + } + tmpval[0] = GXcopy; + tmpval[1] = pGC->tile.pixel; + tmpval[2] = FillSolid; + (void)ChangeGC(pgcScratch, GCFunction | GCForeground | GCFillStyle, + tmpval); + ValidateGC((DrawablePtr)pTile, pgcScratch); + rect.x = 0; + rect.y = 0; + rect.width = w; + rect.height = h; + (*pgcScratch->ops->PolyFillRect)((DrawablePtr)pTile, pgcScratch, 1, &rect); + /* Always remember to free the scratch graphics context after use. */ + FreeScratchGC(pgcScratch); + + pGC->tileIsPixel = FALSE; + pGC->tile.pixmap = pTile; + return TRUE; +} + +_X_EXPORT int +CopyGC(GC *pgcSrc, GC *pgcDst, BITS32 mask) +{ + BITS32 index2; + BITS32 maskQ; + int error = 0; + + if (pgcSrc == pgcDst) + return Success; + pgcDst->serialNumber |= GC_CHANGE_SERIAL_BIT; + pgcDst->stateChanges |= mask; + maskQ = mask; + while (mask) + { + index2 = (BITS32) lowbit (mask); + mask &= ~index2; + switch (index2) + { + case GCFunction: + pgcDst->alu = pgcSrc->alu; + break; + case GCPlaneMask: + pgcDst->planemask = pgcSrc->planemask; + break; + case GCForeground: + pgcDst->fgPixel = pgcSrc->fgPixel; + break; + case GCBackground: + pgcDst->bgPixel = pgcSrc->bgPixel; + break; + case GCLineWidth: + pgcDst->lineWidth = pgcSrc->lineWidth; + break; + case GCLineStyle: + pgcDst->lineStyle = pgcSrc->lineStyle; + break; + case GCCapStyle: + pgcDst->capStyle = pgcSrc->capStyle; + break; + case GCJoinStyle: + pgcDst->joinStyle = pgcSrc->joinStyle; + break; + case GCFillStyle: + pgcDst->fillStyle = pgcSrc->fillStyle; + break; + case GCFillRule: + pgcDst->fillRule = pgcSrc->fillRule; + break; + case GCTile: + { + if (EqualPixUnion(pgcDst->tileIsPixel, + pgcDst->tile, + pgcSrc->tileIsPixel, + pgcSrc->tile)) + { + break; + } + if (!pgcDst->tileIsPixel) + (* pgcDst->pScreen->DestroyPixmap)(pgcDst->tile.pixmap); + pgcDst->tileIsPixel = pgcSrc->tileIsPixel; + pgcDst->tile = pgcSrc->tile; + if (!pgcDst->tileIsPixel) + pgcDst->tile.pixmap->refcnt++; + break; + } + case GCStipple: + { + if (pgcDst->stipple == pgcSrc->stipple) + break; + if (pgcDst->stipple) + (* pgcDst->pScreen->DestroyPixmap)(pgcDst->stipple); + pgcDst->stipple = pgcSrc->stipple; + if (pgcDst->stipple) + pgcDst->stipple->refcnt ++; + break; + } + case GCTileStipXOrigin: + pgcDst->patOrg.x = pgcSrc->patOrg.x; + break; + case GCTileStipYOrigin: + pgcDst->patOrg.y = pgcSrc->patOrg.y; + break; + case GCFont: + if (pgcDst->font == pgcSrc->font) + break; + if (pgcDst->font) + CloseFont(pgcDst->font, (Font)0); + if ((pgcDst->font = pgcSrc->font) != NullFont) + (pgcDst->font)->refcnt++; + break; + case GCSubwindowMode: + pgcDst->subWindowMode = pgcSrc->subWindowMode; + break; + case GCGraphicsExposures: + pgcDst->graphicsExposures = pgcSrc->graphicsExposures; + break; + case GCClipXOrigin: + pgcDst->clipOrg.x = pgcSrc->clipOrg.x; + break; + case GCClipYOrigin: + pgcDst->clipOrg.y = pgcSrc->clipOrg.y; + break; + case GCClipMask: + (* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc); + break; + case GCDashOffset: + pgcDst->dashOffset = pgcSrc->dashOffset; + break; + case GCDashList: + if (pgcSrc->dash == DefaultDash) + { + if (pgcDst->dash != DefaultDash) + { + xfree(pgcDst->dash); + pgcDst->numInDashList = pgcSrc->numInDashList; + pgcDst->dash = pgcSrc->dash; + } + } + else + { + unsigned char *dash; + unsigned int i; + + dash = (unsigned char *)xalloc(pgcSrc->numInDashList * + sizeof(unsigned char)); + if (dash) + { + if (pgcDst->dash != DefaultDash) + xfree(pgcDst->dash); + pgcDst->numInDashList = pgcSrc->numInDashList; + pgcDst->dash = dash; + for (i=0; inumInDashList; i++) + dash[i] = pgcSrc->dash[i]; + } + else + error = BadAlloc; + } + break; + case GCArcMode: + pgcDst->arcMode = pgcSrc->arcMode; + break; + default: + clientErrorValue = maskQ; + error = BadValue; + break; + } + } + if (pgcDst->fillStyle == FillTiled && pgcDst->tileIsPixel) + { + if (!CreateDefaultTile (pgcDst)) + { + pgcDst->fillStyle = FillSolid; + error = BadAlloc; + } + } + (*pgcDst->funcs->CopyGC) (pgcSrc, maskQ, pgcDst); + return error; +} + +/** + * does the diX part of freeing the characteristics in the GC. + * + * \param value must conform to DeleteType + */ +_X_EXPORT int +FreeGC(pointer value, XID gid) +{ + GCPtr pGC = (GCPtr)value; + + CloseFont(pGC->font, (Font)0); + (* pGC->funcs->DestroyClip)(pGC); + + if (!pGC->tileIsPixel) + (* pGC->pScreen->DestroyPixmap)(pGC->tile.pixmap); + if (pGC->stipple) + (* pGC->pScreen->DestroyPixmap)(pGC->stipple); + + (*pGC->funcs->DestroyGC) (pGC); + if (pGC->dash != DefaultDash) + xfree(pGC->dash); + xfree(pGC); + return(Success); +} + +/* CreateScratchGC(pScreen, depth) + like CreateGC, but doesn't do the default tile or stipple, +since we can't create them without already having a GC. any code +using the tile or stipple has to set them explicitly anyway, +since the state of the scratch gc is unknown. This is OK +because ChangeGC() has to be able to deal with NULL tiles and +stipples anyway (in case the CreateGC() call has provided a +value for them -- we can't set the default tile until the +client-supplied attributes are installed, since the fgPixel +is what fills the default tile. (maybe this comment should +go with CreateGC() or ChangeGC().) +*/ + +_X_EXPORT GCPtr +CreateScratchGC(ScreenPtr pScreen, unsigned depth) +{ + GCPtr pGC; + + pGC = AllocateGC(pScreen); + if (!pGC) + return (GCPtr)NULL; + + pGC->pScreen = pScreen; + pGC->depth = depth; + pGC->alu = GXcopy; /* dst <- src */ + pGC->planemask = ~0; + pGC->serialNumber = 0; + + pGC->fgPixel = 0; + pGC->bgPixel = 1; + pGC->lineWidth = 0; + pGC->lineStyle = LineSolid; + pGC->capStyle = CapButt; + pGC->joinStyle = JoinMiter; + pGC->fillStyle = FillSolid; + pGC->fillRule = EvenOddRule; + pGC->arcMode = ArcPieSlice; + pGC->font = defaultFont; + if ( pGC->font) /* necessary, because open of default font could fail */ + pGC->font->refcnt++; + pGC->tileIsPixel = TRUE; + pGC->tile.pixel = 0; + pGC->stipple = NullPixmap; + pGC->patOrg.x = 0; + pGC->patOrg.y = 0; + pGC->subWindowMode = ClipByChildren; + pGC->graphicsExposures = TRUE; + pGC->clipOrg.x = 0; + pGC->clipOrg.y = 0; + pGC->clientClipType = CT_NONE; + pGC->dashOffset = 0; + pGC->numInDashList = 2; + pGC->dash = DefaultDash; + pGC->lastWinOrg.x = 0; + pGC->lastWinOrg.y = 0; + + pGC->stateChanges = (1 << (GCLastBit+1)) - 1; + if (!(*pScreen->CreateGC)(pGC)) + { + FreeGC(pGC, (XID)0); + pGC = (GCPtr)NULL; + } + return pGC; +} + +void +FreeGCperDepth(int screenNum) +{ + int i; + ScreenPtr pScreen; + GCPtr *ppGC; + + pScreen = screenInfo.screens[screenNum]; + ppGC = pScreen->GCperDepth; + + for (i = 0; i <= pScreen->numDepths; i++) + (void)FreeGC(ppGC[i], (XID)0); + pScreen->rgf = ~0L; +} + + +Bool +CreateGCperDepth(int screenNum) +{ + int i; + ScreenPtr pScreen; + DepthPtr pDepth; + GCPtr *ppGC; + + pScreen = screenInfo.screens[screenNum]; + pScreen->rgf = 0; + ppGC = pScreen->GCperDepth; + /* do depth 1 separately because it's not included in list */ + if (!(ppGC[0] = CreateScratchGC(pScreen, 1))) + return FALSE; + ppGC[0]->graphicsExposures = FALSE; + /* Make sure we don't overflow GCperDepth[] */ + if( pScreen->numDepths > MAXFORMATS ) + return FALSE; + + pDepth = pScreen->allowedDepths; + for (i=0; inumDepths; i++, pDepth++) + { + if (!(ppGC[i+1] = CreateScratchGC(pScreen, pDepth->depth))) + { + for (; i >= 0; i--) + (void)FreeGC(ppGC[i], (XID)0); + return FALSE; + } + ppGC[i+1]->graphicsExposures = FALSE; + } + return TRUE; +} + +Bool +CreateDefaultStipple(int screenNum) +{ + ScreenPtr pScreen; + XID tmpval[3]; + xRectangle rect; + CARD16 w, h; + GCPtr pgcScratch; + + pScreen = screenInfo.screens[screenNum]; + + w = 16; + h = 16; + (* pScreen->QueryBestSize)(StippleShape, &w, &h, pScreen); + if (!(pScreen->PixmapPerDepth[0] = + (*pScreen->CreatePixmap)(pScreen, w, h, 1))) + return FALSE; + /* fill stipple with 1 */ + tmpval[0] = GXcopy; tmpval[1] = 1; tmpval[2] = FillSolid; + pgcScratch = GetScratchGC(1, pScreen); + if (!pgcScratch) + { + (*pScreen->DestroyPixmap)(pScreen->PixmapPerDepth[0]); + return FALSE; + } + (void)ChangeGC(pgcScratch, GCFunction|GCForeground|GCFillStyle, tmpval); + ValidateGC((DrawablePtr)pScreen->PixmapPerDepth[0], pgcScratch); + rect.x = 0; + rect.y = 0; + rect.width = w; + rect.height = h; + (*pgcScratch->ops->PolyFillRect)((DrawablePtr)pScreen->PixmapPerDepth[0], + pgcScratch, 1, &rect); + FreeScratchGC(pgcScratch); + return TRUE; +} + +void +FreeDefaultStipple(int screenNum) +{ + ScreenPtr pScreen = screenInfo.screens[screenNum]; + (*pScreen->DestroyPixmap)(pScreen->PixmapPerDepth[0]); +} + +_X_EXPORT int +SetDashes(GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pdash) +{ + long i; + unsigned char *p, *indash; + BITS32 maskQ = 0; + + i = ndash; + p = pdash; + while (i--) + { + if (!*p++) + { + /* dash segment must be > 0 */ + clientErrorValue = 0; + return BadValue; + } + } + + if (ndash & 1) + p = (unsigned char *)xalloc(2 * ndash * sizeof(unsigned char)); + else + p = (unsigned char *)xalloc(ndash * sizeof(unsigned char)); + if (!p) + return BadAlloc; + + pGC->serialNumber |= GC_CHANGE_SERIAL_BIT; + if (offset != pGC->dashOffset) + { + pGC->dashOffset = offset; + pGC->stateChanges |= GCDashOffset; + maskQ |= GCDashOffset; + } + + if (pGC->dash != DefaultDash) + xfree(pGC->dash); + pGC->numInDashList = ndash; + pGC->dash = p; + if (ndash & 1) + { + pGC->numInDashList += ndash; + indash = pdash; + i = ndash; + while (i--) + *p++ = *indash++; + } + while(ndash--) + *p++ = *pdash++; + pGC->stateChanges |= GCDashList; + maskQ |= GCDashList; + + if (pGC->funcs->ChangeGC) + (*pGC->funcs->ChangeGC) (pGC, maskQ); + return Success; +} + +_X_EXPORT int +VerifyRectOrder(int nrects, xRectangle *prects, int ordering) +{ + xRectangle *prectP, *prectN; + int i; + + switch(ordering) + { + case Unsorted: + return CT_UNSORTED; + case YSorted: + if(nrects > 1) + { + for(i = 1, prectP = prects, prectN = prects + 1; + i < nrects; + i++, prectP++, prectN++) + if(prectN->y < prectP->y) + return -1; + } + return CT_YSORTED; + case YXSorted: + if(nrects > 1) + { + for(i = 1, prectP = prects, prectN = prects + 1; + i < nrects; + i++, prectP++, prectN++) + if((prectN->y < prectP->y) || + ( (prectN->y == prectP->y) && + (prectN->x < prectP->x) ) ) + return -1; + } + return CT_YXSORTED; + case YXBanded: + if(nrects > 1) + { + for(i = 1, prectP = prects, prectN = prects + 1; + i < nrects; + i++, prectP++, prectN++) + if((prectN->y != prectP->y && + prectN->y < prectP->y + (int) prectP->height) || + ((prectN->y == prectP->y) && + (prectN->height != prectP->height || + prectN->x < prectP->x + (int) prectP->width))) + return -1; + } + return CT_YXBANDED; + } + return -1; +} + +_X_EXPORT int +SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects, + xRectangle *prects, int ordering) +{ + int newct, size; + xRectangle *prectsNew; + + newct = VerifyRectOrder(nrects, prects, ordering); + if (newct < 0) + return(BadMatch); + size = nrects * sizeof(xRectangle); + prectsNew = (xRectangle *) xalloc(size); + if (!prectsNew && size) + return BadAlloc; + + pGC->serialNumber |= GC_CHANGE_SERIAL_BIT; + pGC->clipOrg.x = xOrigin; + pGC->stateChanges |= GCClipXOrigin; + + pGC->clipOrg.y = yOrigin; + pGC->stateChanges |= GCClipYOrigin; + + if (size) + memmove((char *)prectsNew, (char *)prects, size); + (*pGC->funcs->ChangeClip)(pGC, newct, (pointer)prectsNew, nrects); + if (pGC->funcs->ChangeGC) + (*pGC->funcs->ChangeGC) (pGC, GCClipXOrigin|GCClipYOrigin|GCClipMask); + return Success; +} + + +/* + sets reasonable defaults + if we can get a pre-allocated one, use it and mark it as used. + if we can't, create one out of whole cloth (The Velveteen GC -- if + you use it often enough it will become real.) +*/ +_X_EXPORT GCPtr +GetScratchGC(unsigned depth, ScreenPtr pScreen) +{ + int i; + GCPtr pGC; + + for (i=0; i<=pScreen->numDepths; i++) + if ( pScreen->GCperDepth[i]->depth == depth && + !(pScreen->rgf & (1L << (i+1))) + ) + { + pScreen->rgf |= (1L << (i+1)); + pGC = (pScreen->GCperDepth[i]); + + pGC->alu = GXcopy; + pGC->planemask = ~0; + pGC->serialNumber = 0; + pGC->fgPixel = 0; + pGC->bgPixel = 1; + pGC->lineWidth = 0; + pGC->lineStyle = LineSolid; + pGC->capStyle = CapButt; + pGC->joinStyle = JoinMiter; + pGC->fillStyle = FillSolid; + pGC->fillRule = EvenOddRule; + pGC->arcMode = ArcChord; + pGC->patOrg.x = 0; + pGC->patOrg.y = 0; + pGC->subWindowMode = ClipByChildren; + pGC->graphicsExposures = FALSE; + pGC->clipOrg.x = 0; + pGC->clipOrg.y = 0; + if (pGC->clientClipType != CT_NONE) + (*pGC->funcs->ChangeClip) (pGC, CT_NONE, NULL, 0); + pGC->stateChanges = (1 << (GCLastBit+1)) - 1; + return pGC; + } + /* if we make it this far, need to roll our own */ + pGC = CreateScratchGC(pScreen, depth); + if (pGC) + pGC->graphicsExposures = FALSE; + return pGC; +} + +/* + if the gc to free is in the table of pre-existing ones, +mark it as available. + if not, free it for real +*/ +_X_EXPORT void +FreeScratchGC(GCPtr pGC) +{ + ScreenPtr pScreen = pGC->pScreen; + int i; + + for (i=0; i<=pScreen->numDepths; i++) + { + if ( pScreen->GCperDepth[i] == pGC) + { + pScreen->rgf &= ~(1L << (i+1)); + return; + } + } + (void)FreeGC(pGC, (GContext)0); +} diff --git a/xorg-server-1.4/dix/getevents.c b/xorg-server-1.4/dix/getevents.c new file mode 100644 index 0000000..f92a021 --- /dev/null +++ b/xorg-server-1.4/dix/getevents.c @@ -0,0 +1,842 @@ +/* + * Copyright © 2006 Nokia Corporation + * Copyright © 2006-2007 Daniel Stone + * + * 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 (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 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. + * + * Author: Daniel Stone + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#define NEED_EVENTS +#define NEED_REPLIES +#include + +#include "misc.h" +#include "resource.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "cursorstr.h" +#include "dixstruct.h" +#include "globals.h" +#include "dixevents.h" +#include "mipointer.h" + +#ifdef XKB +#include +#include +extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies); +#endif + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif + +#include +#include +#include "exglobals.h" +#include "exevents.h" +#include "exglobals.h" +#include "extnsionst.h" + + +/* Maximum number of valuators, divided by six, rounded up, to get number + * of events. */ +#define MAX_VALUATOR_EVENTS 6 + +/* Number of motion history events to store. */ +#define MOTION_HISTORY_SIZE 256 + + +/** + * Pick some arbitrary size for Xi motion history. + */ +_X_EXPORT int +GetMotionHistorySize(void) +{ + return MOTION_HISTORY_SIZE; +} + +static void +set_key_down(DeviceIntPtr pDev, int key_code) +{ + pDev->key->postdown[key_code >> 3] |= (1 << (key_code & 7)); +} + +static void +set_key_up(DeviceIntPtr pDev, int key_code) +{ + pDev->key->postdown[key_code >> 3] &= ~(1 << (key_code & 7)); +} + +static Bool +key_is_down(DeviceIntPtr pDev, int key_code) +{ + return pDev->key->postdown[key_code >> 3] >> (key_code & 7); +} + +/** + * Allocate the motion history buffer. + */ +_X_EXPORT void +AllocateMotionHistory(DeviceIntPtr pDev) +{ + if (pDev->valuator->motion) + xfree(pDev->valuator->motion); + + if (pDev->valuator->numMotionEvents < 1) + return; + + pDev->valuator->motion = xalloc(((sizeof(INT32) * pDev->valuator->numAxes) + + sizeof(Time)) * + pDev->valuator->numMotionEvents); + pDev->valuator->first_motion = 0; + pDev->valuator->last_motion = 0; +} + + +/** + * Dump the motion history between start and stop into the supplied buffer. + * Only records the event for a given screen in theory, but in practice, we + * sort of ignore this. + */ +_X_EXPORT int +GetMotionHistory(DeviceIntPtr pDev, xTimecoord *buff, unsigned long start, + unsigned long stop, ScreenPtr pScreen) +{ + char *ibuff = NULL, *obuff = (char *) buff; + int i = 0, ret = 0; + Time current; + /* The size of a single motion event. */ + int size = (sizeof(INT32) * pDev->valuator->numAxes) + sizeof(Time); + + if (!pDev->valuator || !pDev->valuator->numMotionEvents) + return 0; + + for (i = pDev->valuator->first_motion; + i != pDev->valuator->last_motion; + i = (i + 1) % pDev->valuator->numMotionEvents) { + /* We index the input buffer by which element we're accessing, which + * is not monotonic, and the output buffer by how many events we've + * written so far. */ + ibuff = (char *) pDev->valuator->motion + (i * size); + memcpy(¤t, ibuff, sizeof(Time)); + + if (current > stop) { + return ret; + } + else if (current >= start) { + memcpy(obuff, ibuff, size); + obuff += size; + ret++; + } + } + + return ret; +} + + +/** + * Update the motion history for a specific device, with the list of + * valuators. + */ +static void +updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, int first_valuator, + int num_valuators, int *valuators) +{ + char *buff = (char *) pDev->valuator->motion; + + if (!pDev->valuator->numMotionEvents) + return; + + buff += ((sizeof(INT32) * pDev->valuator->numAxes) + sizeof(CARD32)) * + pDev->valuator->last_motion; + memcpy(buff, &ms, sizeof(Time)); + + buff += sizeof(Time); + bzero(buff, sizeof(INT32) * pDev->valuator->numAxes); + + buff += sizeof(INT32) * first_valuator; + memcpy(buff, valuators, sizeof(INT32) * num_valuators); + + pDev->valuator->last_motion = (pDev->valuator->last_motion + 1) % + pDev->valuator->numMotionEvents; + + /* If we're wrapping around, just keep the circular buffer going. */ + if (pDev->valuator->first_motion == pDev->valuator->last_motion) + pDev->valuator->first_motion = (pDev->valuator->first_motion + 1) % + pDev->valuator->numMotionEvents; + + return; +} + + +/** + * Returns the maximum number of events GetKeyboardEvents, + * GetKeyboardValuatorEvents, and GetPointerEvents will ever return. + * + * Should be used in DIX as: + * xEvent *events = xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + */ +_X_EXPORT int +GetMaximumEventsNum(void) { + /* Two base events -- core and device, plus valuator events. Multiply + * by two if we're doing key repeats. */ + int ret = 2 + MAX_VALUATOR_EVENTS; + +#ifdef XKB + if (noXkbExtension) +#endif + ret *= 2; + + return ret; +} + + +/* Originally a part of xf86PostMotionEvent; modifies valuators + * in-place. */ +static void +acceleratePointer(DeviceIntPtr pDev, int first_valuator, int num_valuators, + int *valuators) +{ + float mult = 0.0; + int dx = 0, dy = 0; + int *px = NULL, *py = NULL; + + if (!num_valuators || !valuators) + return; + + if (first_valuator == 0) { + dx = valuators[0]; + px = &valuators[0]; + } + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) { + dy = valuators[1 - first_valuator]; + py = &valuators[1 - first_valuator]; + } + + if (!dx && !dy) + return; + + if (pDev->ptrfeed && pDev->ptrfeed->ctrl.num) { + /* modeled from xf86Events.c */ + if (pDev->ptrfeed->ctrl.threshold) { + if ((abs(dx) + abs(dy)) >= pDev->ptrfeed->ctrl.threshold) { + pDev->valuator->dxremaind = ((float)dx * + (float)(pDev->ptrfeed->ctrl.num)) / + (float)(pDev->ptrfeed->ctrl.den) + + pDev->valuator->dxremaind; + if (px) { + *px = (int)pDev->valuator->dxremaind; + pDev->valuator->dxremaind = pDev->valuator->dxremaind - + (float)(*px); + } + + pDev->valuator->dyremaind = ((float)dy * + (float)(pDev->ptrfeed->ctrl.num)) / + (float)(pDev->ptrfeed->ctrl.den) + + pDev->valuator->dyremaind; + if (py) { + *py = (int)pDev->valuator->dyremaind; + pDev->valuator->dyremaind = pDev->valuator->dyremaind - + (float)(*py); + } + } + } + else { + mult = pow((float)dx * (float)dx + (float)dy * (float)dy, + ((float)(pDev->ptrfeed->ctrl.num) / + (float)(pDev->ptrfeed->ctrl.den) - 1.0) / + 2.0) / 2.0; + if (dx) { + pDev->valuator->dxremaind = mult * (float)dx + + pDev->valuator->dxremaind; + *px = (int)pDev->valuator->dxremaind; + pDev->valuator->dxremaind = pDev->valuator->dxremaind - + (float)(*px); + } + if (dy) { + pDev->valuator->dyremaind = mult * (float)dy + + pDev->valuator->dyremaind; + *py = (int)pDev->valuator->dyremaind; + pDev->valuator->dyremaind = pDev->valuator->dyremaind - + (float)(*py); + } + } + } +} + + +/** + * Clip an axis to its bounds, which are declared in the call to + * InitValuatorAxisClassStruct. + */ +static void +clipAxis(DeviceIntPtr pDev, int axisNum, int *val) +{ + AxisInfoPtr axes = pDev->valuator->axes + axisNum; + + if (*val < axes->min_value) + *val = axes->min_value; + if (axes->max_value >= 0 && *val > axes->max_value) + *val = axes->max_value; +} + +/** + * Clip every axis in the list of valuators to its bounds. + */ +static void +clipValuators(DeviceIntPtr pDev, int first_valuator, int num_valuators, + int *valuators) +{ + AxisInfoPtr axes = pDev->valuator->axes + first_valuator; + int i; + + for (i = 0; i < num_valuators; i++, axes++) + clipAxis(pDev, i + first_valuator, &(valuators[i])); +} + + +/** + * Fills events with valuator events for pDev, as given by the other + * parameters. + * + * FIXME: Need to fix ValuatorClassRec to store all the valuators as + * last posted, not just x and y; otherwise relative non-x/y + * valuators, though a very narrow use case, will be broken. + */ +static xEvent * +getValuatorEvents(xEvent *events, DeviceIntPtr pDev, int first_valuator, + int num_valuators, int *valuators) { + deviceValuator *xv = (deviceValuator *) events; + int i = 0, final_valuator = first_valuator + num_valuators; + + for (i = first_valuator; i < final_valuator; i += 6, xv++, events++) { + xv->type = DeviceValuator; + xv->first_valuator = i; + xv->num_valuators = num_valuators; + xv->deviceid = pDev->id; + switch (final_valuator - i) { + case 6: + xv->valuator5 = valuators[i + 5]; + case 5: + xv->valuator4 = valuators[i + 4]; + case 4: + xv->valuator3 = valuators[i + 3]; + case 3: + xv->valuator2 = valuators[i + 2]; + case 2: + xv->valuator1 = valuators[i + 1]; + case 1: + xv->valuator0 = valuators[i]; + } + + if (i + 6 < final_valuator) + xv->deviceid |= MORE_EVENTS; + } + + return events; +} + + +/** + * Convenience wrapper around GetKeyboardValuatorEvents, that takes no + * valuators. + */ +_X_EXPORT int +GetKeyboardEvents(xEvent *events, DeviceIntPtr pDev, int type, int key_code) { + return GetKeyboardValuatorEvents(events, pDev, type, key_code, 0, 0, NULL); +} + + +/** + * Returns a set of keyboard events for KeyPress/KeyRelease, optionally + * also with valuator events. Handles Xi and XKB. + * + * events is not NULL-terminated; the return value is the number of events. + * The DDX is responsible for allocating the event structure in the first + * place via GetMaximumEventsNum(), and for freeing it. + * + * This function does not change the core keymap to that of the device; + * that is done by SwitchCoreKeyboard, which is called from + * mieqProcessInputEvents. If replacing that function, take care to call + * SetCoreKeyboard before processInputProc, so keymaps are altered to suit. + * + * Note that this function recurses! If called for non-XKB, a repeating + * key press will trigger a matching KeyRelease, as well as the + * KeyPresses. + */ +_X_EXPORT int +GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type, + int key_code, int first_valuator, + int num_valuators, int *valuators) { + int numEvents = 0; + CARD32 ms = 0; + KeySym *map = pDev->key->curKeySyms.map; + KeySym sym = map[key_code * pDev->key->curKeySyms.mapWidth]; + deviceKeyButtonPointer *kbp = NULL; + + if (!events) + return 0; + + if (type != KeyPress && type != KeyRelease) + return 0; + + if (!pDev->key || !pDev->focus || !pDev->kbdfeed || + (pDev->coreEvents && !inputInfo.keyboard->key)) + return 0; + + if (pDev->coreEvents) + numEvents = 2; + else + numEvents = 1; + + if (num_valuators) { + if ((num_valuators / 6) + 1 > MAX_VALUATOR_EVENTS) + num_valuators = MAX_VALUATOR_EVENTS; + numEvents += (num_valuators / 6) + 1; + } + +#ifdef XKB + if (noXkbExtension) +#endif + { + switch (sym) { + case XK_Num_Lock: + case XK_Caps_Lock: + case XK_Scroll_Lock: + case XK_Shift_Lock: + if (type == KeyRelease) + return 0; + else if (type == KeyPress && key_is_down(pDev, key_code)) + type = KeyRelease; + } + } + + /* Handle core repeating, via press/release/press/release. + * FIXME: In theory, if you're repeating with two keyboards in non-XKB, + * you could get unbalanced events here. */ + if (type == KeyPress && key_is_down(pDev, key_code)) { + if (!pDev->kbdfeed->ctrl.autoRepeat || + pDev->key->modifierMap[key_code] || + !(pDev->kbdfeed->ctrl.autoRepeats[key_code >> 3] + & (1 << (key_code & 7)))) + return 0; + +#ifdef XKB + if (noXkbExtension) +#endif + { + numEvents += GetKeyboardValuatorEvents(events, pDev, + KeyRelease, key_code, + first_valuator, num_valuators, + valuators); + events += numEvents; + } + } + + ms = GetTimeInMillis(); + + if (pDev->coreEvents) { + events->u.keyButtonPointer.time = ms; + events->u.u.type = type; + events->u.u.detail = key_code; + if (type == KeyPress) + set_key_down(inputInfo.keyboard, key_code); + else if (type == KeyRelease) + set_key_up(inputInfo.keyboard, key_code); + events++; + } + + kbp = (deviceKeyButtonPointer *) events; + kbp->time = ms; + kbp->deviceid = pDev->id; + kbp->detail = key_code; + if (type == KeyPress) { + kbp->type = DeviceKeyPress; + set_key_down(pDev, key_code); + } + else if (type == KeyRelease) { + kbp->type = DeviceKeyRelease; + set_key_up(pDev, key_code); + } + + events++; + if (num_valuators) { + kbp->deviceid |= MORE_EVENTS; + clipValuators(pDev, first_valuator, num_valuators, valuators); + events = getValuatorEvents(events, pDev, first_valuator, + num_valuators, valuators); + } + + return numEvents; +} + + +/** + * Generate a series of xEvents (returned in xE) representing pointer + * motion, or button presses. Xi and XKB-aware. + * + * events is not NULL-terminated; the return value is the number of events. + * The DDX is responsible for allocating the event structure in the first + * place via GetMaximumEventsNum(), and for freeing it. + */ +_X_EXPORT int +GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, + int flags, int first_valuator, int num_valuators, + int *valuators) { + int num_events = 0, final_valuator = 0; + CARD32 ms = 0; + deviceKeyButtonPointer *kbp = NULL; + /* Thanks to a broken lib, we _always_ have to chase DeviceMotionNotifies + * with DeviceValuators. */ + Bool sendValuators = (type == MotionNotify || flags & POINTER_ABSOLUTE); + DeviceIntPtr cp = inputInfo.pointer; + int x = 0, y = 0; + Bool coreOnly = (pDev == inputInfo.pointer); + + /* Sanity checks. */ + if (type != MotionNotify && type != ButtonPress && type != ButtonRelease) + return 0; + + if ((type == ButtonPress || type == ButtonRelease) && !pDev->button) + return 0; + + /* FIXME: I guess it should, in theory, be possible to post button events + * from devices without valuators. */ + if (!pDev->valuator) + return 0; + + if (!coreOnly && pDev->coreEvents) + num_events = 2; + else + num_events = 1; + + if (type == MotionNotify && num_valuators <= 0) + return 0; + + /* Do we need to send a DeviceValuator event? */ + if (!coreOnly && sendValuators) { + if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS) + num_valuators = MAX_VALUATOR_EVENTS * 6; + num_events += ((num_valuators - 1) / 6) + 1; + } + + final_valuator = num_valuators + first_valuator; + + /* You fail. */ + if (first_valuator < 0 || final_valuator > pDev->valuator->numAxes) + return 0; + + ms = GetTimeInMillis(); + + /* Set x and y based on whether this is absolute or relative, and + * accelerate if we need to. */ + if (flags & POINTER_ABSOLUTE) { + if (num_valuators >= 1 && first_valuator == 0) { + x = valuators[0]; + } + else { + if (pDev->coreEvents) + x = cp->valuator->lastx; + else + x = pDev->valuator->lastx; + } + + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) { + y = valuators[1 - first_valuator]; + } + else { + if (pDev->coreEvents) + y = cp->valuator->lasty; + else + y = pDev->valuator->lasty; + } + } + else { + if (flags & POINTER_ACCELERATE) + acceleratePointer(pDev, first_valuator, num_valuators, + valuators); + + if (pDev->coreEvents) { + if (first_valuator == 0 && num_valuators >= 1) + x = cp->valuator->lastx + valuators[0]; + else + x = cp->valuator->lastx; + + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) + y = cp->valuator->lasty + valuators[1 - first_valuator]; + else + y = cp->valuator->lasty; + } + else { + if (first_valuator == 0 && num_valuators >= 1) + x = pDev->valuator->lastx + valuators[0]; + else + x = pDev->valuator->lastx; + + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) + y = pDev->valuator->lasty + valuators[1 - first_valuator]; + else + y = pDev->valuator->lasty; + } + } + + /* Clip both x and y to the defined limits (usually co-ord space limit). */ + clipAxis(pDev, 0, &x); + clipAxis(pDev, 1, &y); + + /* This takes care of crossing screens for us, as well as clipping + * to the current screen. Right now, we only have one history buffer, + * so we don't set this for both the device and core.*/ + miPointerSetPosition(pDev, &x, &y, ms); + + /* Drop x and y back into the valuators list, if they were originally + * present. */ + if (first_valuator == 0 && num_valuators >= 1) + valuators[0] = x; + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) + valuators[1 - first_valuator] = y; + + updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); + + if (pDev->coreEvents) { + cp->valuator->lastx = x; + cp->valuator->lasty = y; + } + pDev->valuator->lastx = x; + pDev->valuator->lasty = y; + + /* for some reason inputInfo.pointer does not have coreEvents set */ + if (coreOnly || pDev->coreEvents) { + events->u.u.type = type; + events->u.keyButtonPointer.time = ms; + events->u.keyButtonPointer.rootX = x; + events->u.keyButtonPointer.rootY = y; + + if (type == ButtonPress || type == ButtonRelease) { + /* We hijack SetPointerMapping to work on all core-sending + * devices, so we use the device-specific map here instead of + * the core one. */ + events->u.u.detail = pDev->button->map[buttons]; + } + else { + events->u.u.detail = 0; + } + + events++; + } + + if (!coreOnly) { + kbp = (deviceKeyButtonPointer *) events; + kbp->time = ms; + kbp->deviceid = pDev->id; + + if (type == MotionNotify) { + kbp->type = DeviceMotionNotify; + } + else { + if (type == ButtonPress) + kbp->type = DeviceButtonPress; + else if (type == ButtonRelease) + kbp->type = DeviceButtonRelease; + kbp->detail = pDev->button->map[buttons]; + } + + kbp->root_x = x; + kbp->root_y = y; + + events++; + if (sendValuators) { + kbp->deviceid |= MORE_EVENTS; + clipValuators(pDev, first_valuator, num_valuators, valuators); + events = getValuatorEvents(events, pDev, first_valuator, + num_valuators, valuators); + } + } + + return num_events; +} + + +/** + * Post ProximityIn/ProximityOut events, accompanied by valuators. + * + * events is not NULL-terminated; the return value is the number of events. + * The DDX is responsible for allocating the event structure in the first + * place via GetMaximumEventsNum(), and for freeing it. + */ +_X_EXPORT int +GetProximityEvents(xEvent *events, DeviceIntPtr pDev, int type, + int first_valuator, int num_valuators, int *valuators) +{ + int num_events = 0; + deviceKeyButtonPointer *kbp = (deviceKeyButtonPointer *) events; + + /* Sanity checks. */ + if (type != ProximityIn && type != ProximityOut) + return 0; + + if (!pDev->valuator) + return 0; + + /* Do we need to send a DeviceValuator event? */ + if ((pDev->valuator->mode & 1) == Relative) + num_valuators = 0; + + if (num_valuators) { + if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS) + num_valuators = MAX_VALUATOR_EVENTS * 6; + num_events += ((num_valuators - 1) / 6) + 1; + } + + /* You fail. */ + if (first_valuator < 0 || + (num_valuators + first_valuator) > pDev->valuator->numAxes) + return 0; + + kbp->type = type; + kbp->deviceid = pDev->id; + kbp->detail = 0; + kbp->time = GetTimeInMillis(); + + if (num_valuators) { + kbp->deviceid |= MORE_EVENTS; + events++; + clipValuators(pDev, first_valuator, num_valuators, valuators); + events = getValuatorEvents(events, pDev, first_valuator, + num_valuators, valuators); + } + + return num_events; +} + + +/** + * Note that pDev was the last device to send a core event. This function + * copies the complete keymap from the originating device to the core + * device, and makes sure the appropriate notifications are generated. + * + * Call this just before processInputProc. + */ +_X_EXPORT void +SwitchCoreKeyboard(DeviceIntPtr pDev) +{ + KeyClassPtr ckeyc = inputInfo.keyboard->key; + int i = 0; + + if (inputInfo.keyboard->devPrivates[CoreDevicePrivatesIndex].ptr != pDev) { + memcpy(ckeyc->modifierMap, pDev->key->modifierMap, MAP_LENGTH); + if (ckeyc->modifierKeyMap) + xfree(ckeyc->modifierKeyMap); + ckeyc->modifierKeyMap = xalloc(8 * pDev->key->maxKeysPerModifier); + memcpy(ckeyc->modifierKeyMap, pDev->key->modifierKeyMap, + (8 * pDev->key->maxKeysPerModifier)); + + ckeyc->maxKeysPerModifier = pDev->key->maxKeysPerModifier; + ckeyc->curKeySyms.minKeyCode = pDev->key->curKeySyms.minKeyCode; + ckeyc->curKeySyms.maxKeyCode = pDev->key->curKeySyms.maxKeyCode; + SetKeySymsMap(&ckeyc->curKeySyms, &pDev->key->curKeySyms); + + /* + * Copy state from the extended keyboard to core. If you omit this, + * holding Ctrl on keyboard one, and pressing Q on keyboard two, will + * cause your app to quit. This feels wrong to me, hence the below + * code. + * + * XXX: If you synthesise core modifier events, the state will get + * clobbered here. You'll have to work out something sensible + * to fix that. Good luck. + */ + +#define KEYBOARD_MASK (ShiftMask | LockMask | ControlMask | Mod1Mask | \ + Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask) + ckeyc->state &= ~(KEYBOARD_MASK); + ckeyc->state |= (pDev->key->state & KEYBOARD_MASK); +#undef KEYBOARD_MASK + for (i = 0; i < 8; i++) + ckeyc->modifierKeyCount[i] = pDev->key->modifierKeyCount[i]; + +#ifdef XKB + if (!noXkbExtension && pDev->key->xkbInfo && pDev->key->xkbInfo->desc) { + if (!XkbCopyKeymap(pDev->key->xkbInfo->desc, ckeyc->xkbInfo->desc, + True)) + FatalError("Couldn't pivot keymap from device to core!\n"); + } +#endif + + SendMappingNotify(MappingKeyboard, ckeyc->curKeySyms.minKeyCode, + (ckeyc->curKeySyms.maxKeyCode - + ckeyc->curKeySyms.minKeyCode), + serverClient); + inputInfo.keyboard->devPrivates[CoreDevicePrivatesIndex].ptr = pDev; + } +} + + +/** + * Note that pDev was the last function to send a core pointer event. + * Currently a no-op. + * + * Call this just before processInputProc. + */ +_X_EXPORT void +SwitchCorePointer(DeviceIntPtr pDev) +{ + if (inputInfo.pointer->devPrivates[CoreDevicePrivatesIndex].ptr != pDev) + inputInfo.pointer->devPrivates[CoreDevicePrivatesIndex].ptr = pDev; +} + + +/** + * Synthesize a single motion event for the core pointer. + * + * Used in cursor functions, e.g. when cursor confinement changes, and we need + * to shift the pointer to get it inside the new bounds. + */ +void +PostSyntheticMotion(int x, int y, int screen, unsigned long time) +{ + xEvent xE; + +#ifdef PANORAMIX + /* Translate back to the sprite screen since processInputProc + will translate from sprite screen to screen 0 upon reentry + to the DIX layer. */ + if (!noPanoramiXExtension) { + x += panoramiXdataPtr[0].x - panoramiXdataPtr[screen].x; + y += panoramiXdataPtr[0].y - panoramiXdataPtr[screen].y; + } +#endif + + memset(&xE, 0, sizeof(xEvent)); + xE.u.u.type = MotionNotify; + xE.u.keyButtonPointer.rootX = x; + xE.u.keyButtonPointer.rootY = y; + xE.u.keyButtonPointer.time = time; + + (*inputInfo.pointer->public.processInputProc)(&xE, inputInfo.pointer, 1); +} diff --git a/xorg-server-1.4/dix/globals.c b/xorg-server-1.4/dix/globals.c new file mode 100644 index 0000000..f86c602 --- /dev/null +++ b/xorg-server-1.4/dix/globals.c @@ -0,0 +1,161 @@ +/************************************************************ + +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 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. + +********************************************************/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "misc.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "input.h" +#include "dixfont.h" +#include "site.h" +#include "dixstruct.h" +#include "os.h" + +_X_EXPORT ScreenInfo screenInfo; +KeybdCtrl defaultKeyboardControl = { + DEFAULT_KEYBOARD_CLICK, + DEFAULT_BELL, + DEFAULT_BELL_PITCH, + DEFAULT_BELL_DURATION, + DEFAULT_AUTOREPEAT, + DEFAULT_AUTOREPEATS, + DEFAULT_LEDS, + 0}; + +PtrCtrl defaultPointerControl = { + DEFAULT_PTR_NUMERATOR, + DEFAULT_PTR_DENOMINATOR, + DEFAULT_PTR_THRESHOLD, + 0}; + +_X_EXPORT ClientPtr *clients; +_X_EXPORT ClientPtr serverClient; +_X_EXPORT int currentMaxClients; /* current size of clients array */ +_X_EXPORT long maxBigRequestSize = MAX_BIG_REQUEST_SIZE; + +_X_EXPORT WindowPtr *WindowTable; + +_X_EXPORT unsigned long globalSerialNumber = 0; +_X_EXPORT unsigned long serverGeneration = 0; + +/* these next four are initialized in main.c */ +_X_EXPORT CARD32 ScreenSaverTime; +CARD32 ScreenSaverInterval; +_X_EXPORT int ScreenSaverBlanking; +int ScreenSaverAllowExposures; + +#ifdef DPMSExtension +# ifndef DEFAULT_STANDBY_TIME +# define DEFAULT_STANDBY_TIME DEFAULT_SCREEN_SAVER_TIME * 2 +# endif +# ifndef DEFAULT_SUSPEND_TIME +# define DEFAULT_SUSPEND_TIME DEFAULT_SCREEN_SAVER_TIME * 3 +# endif +# ifndef DEFAULT_OFF_TIME +# define DEFAULT_OFF_TIME DEFAULT_SCREEN_SAVER_TIME * 4 +# endif +# ifndef DEFAULT_DPMS_ENABLED +# define DEFAULT_DPMS_ENABLED TRUE +# endif +CARD32 defaultDPMSStandbyTime = DEFAULT_STANDBY_TIME; +CARD32 defaultDPMSSuspendTime = DEFAULT_SUSPEND_TIME; +CARD32 defaultDPMSOffTime = DEFAULT_OFF_TIME; +_X_EXPORT CARD16 DPMSPowerLevel = 0; +_X_EXPORT Bool defaultDPMSEnabled = DEFAULT_DPMS_ENABLED; +_X_EXPORT Bool DPMSEnabledSwitch = FALSE; /* these denote the DPMS command */ +_X_EXPORT Bool DPMSDisabledSwitch = FALSE; /* lind switch states */ +_X_EXPORT Bool DPMSCapableFlag = FALSE; +_X_EXPORT CARD32 DPMSStandbyTime; +_X_EXPORT CARD32 DPMSSuspendTime; +_X_EXPORT CARD32 DPMSOffTime; +_X_EXPORT Bool DPMSEnabled; +#endif + +CARD32 defaultScreenSaverTime = DEFAULT_SCREEN_SAVER_TIME; +CARD32 defaultScreenSaverInterval = DEFAULT_SCREEN_SAVER_INTERVAL; +int defaultScreenSaverBlanking = DEFAULT_SCREEN_SAVER_BLANKING; +int defaultScreenSaverAllowExposures = DEFAULT_SCREEN_SAVER_EXPOSURES; +#ifndef NOLOGOHACK +int logoScreenSaver = DEFAULT_LOGO_SCREEN_SAVER; +#endif + +#ifdef SCREENSAVER +Bool screenSaverSuspended = FALSE; +#endif + +char *defaultFontPath = COMPILEDDEFAULTFONTPATH; +char *defaultTextFont = COMPILEDDEFAULTFONT; +char *defaultCursorFont = COMPILEDCURSORFONT; +char *rgbPath = RGB_DB; +char *defaultDisplayClass = COMPILEDDISPLAYCLASS; +FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in + every compilation of dix code */ +Bool loadableFonts = FALSE; +CursorPtr rootCursor; +Bool blackRoot=FALSE; +Bool whiteRoot=FALSE; +ClientPtr requestingClient; /* XXX this should be obsolete now, remove? */ + +_X_EXPORT TimeStamp currentTime; +_X_EXPORT TimeStamp lastDeviceEventTime; + +_X_EXPORT int defaultColorVisualClass = -1; +_X_EXPORT int monitorResolution = 0; + +_X_EXPORT char *display; + +CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND; +int argcGlobal; +char **argvGlobal; + +DDXPointRec dixScreenOrigins[MAXSCREENS]; diff --git a/xorg-server-1.4/dix/glyphcurs.c b/xorg-server-1.4/dix/glyphcurs.c new file mode 100644 index 0000000..70b1ff8 --- /dev/null +++ b/xorg-server-1.4/dix/glyphcurs.c @@ -0,0 +1,193 @@ +/************************************************************************ + +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 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. + +************************************************************************/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "misc.h" +#include +#include "dixfontstr.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "resource.h" +#include "dix.h" +#include "cursorstr.h" +#include "opaque.h" +#include "servermd.h" + + +/* + get the bits out of the font in a portable way. to avoid +dealing with padding and such-like, we draw the glyph into +a bitmap, then read the bits out with GetImage, which +uses server-natural format. + since all screens return the same bitmap format, we'll just use +the first one we find. + the character origin lines up with the hotspot in the +cursor metrics. +*/ + +int +ServerBitsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm, unsigned char **ppbits) +{ + ScreenPtr pScreen; + GCPtr pGC; + xRectangle rect; + PixmapPtr ppix; + long nby; + char *pbits; + ChangeGCVal gcval[3]; + unsigned char char2b[2]; + + /* turn glyph index into a protocol-format char2b */ + char2b[0] = (unsigned char)(ch >> 8); + char2b[1] = (unsigned char)(ch & 0xff); + + pScreen = screenInfo.screens[0]; + nby = BitmapBytePad(cm->width) * (long)cm->height; + pbits = (char *)xalloc(nby); + if (!pbits) + return BadAlloc; + /* zeroing the (pad) bits seems to help some ddx cursor handling */ + bzero(pbits, nby); + + ppix = (PixmapPtr)(*pScreen->CreatePixmap)(pScreen, cm->width, + cm->height, 1); + pGC = GetScratchGC(1, pScreen); + if (!ppix || !pGC) + { + if (ppix) + (*pScreen->DestroyPixmap)(ppix); + if (pGC) + FreeScratchGC(pGC); + xfree(pbits); + return BadAlloc; + } + + rect.x = 0; + rect.y = 0; + rect.width = cm->width; + rect.height = cm->height; + + /* fill the pixmap with 0 */ + gcval[0].val = GXcopy; + gcval[1].val = 0; + gcval[2].ptr = (pointer)pfont; + dixChangeGC(NullClient, pGC, GCFunction | GCForeground | GCFont, + NULL, gcval); + ValidateGC((DrawablePtr)ppix, pGC); + (*pGC->ops->PolyFillRect)((DrawablePtr)ppix, pGC, 1, &rect); + + /* draw the glyph */ + gcval[0].val = 1; + dixChangeGC(NullClient, pGC, GCForeground, NULL, gcval); + ValidateGC((DrawablePtr)ppix, pGC); + (*pGC->ops->PolyText16)((DrawablePtr)ppix, pGC, cm->xhot, cm->yhot, + 1, (unsigned short *)char2b); + (*pScreen->GetImage)((DrawablePtr)ppix, 0, 0, cm->width, cm->height, + XYPixmap, 1, pbits); + *ppbits = (unsigned char *)pbits; + FreeScratchGC(pGC); + (*pScreen->DestroyPixmap)(ppix); + return Success; +} + + +Bool +CursorMetricsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm) +{ + CharInfoPtr pci; + unsigned long nglyphs; + CARD8 chs[2]; + FontEncoding encoding; + + chs[0] = ch >> 8; + chs[1] = ch; + encoding = (FONTLASTROW(pfont) == 0) ? Linear16Bit : TwoD16Bit; + if (encoding == Linear16Bit) + { + if (ch < pfont->info.firstCol || pfont->info.lastCol < ch) + return FALSE; + } + else + { + if (chs[0] < pfont->info.firstRow || pfont->info.lastRow < chs[0]) + return FALSE; + if (chs[1] < pfont->info.firstCol || pfont->info.lastCol < chs[1]) + return FALSE; + } + (*pfont->get_glyphs) (pfont, 1, chs, encoding, &nglyphs, &pci); + if (nglyphs == 0) + return FALSE; + cm->width = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; + cm->height = pci->metrics.descent + pci->metrics.ascent; + if (pci->metrics.leftSideBearing > 0) + { + cm->width += pci->metrics.leftSideBearing; + cm->xhot = 0; + } + else + { + cm->xhot = -pci->metrics.leftSideBearing; + if (pci->metrics.rightSideBearing < 0) + cm->width -= pci->metrics.rightSideBearing; + } + if (pci->metrics.ascent < 0) + { + cm->height -= pci->metrics.ascent; + cm->yhot = 0; + } + else + { + cm->yhot = pci->metrics.ascent; + if (pci->metrics.descent < 0) + cm->height -= pci->metrics.descent; + } + return TRUE; +} diff --git a/xorg-server-1.4/dix/grabs.c b/xorg-server-1.4/dix/grabs.c new file mode 100644 index 0000000..2210cd0 --- /dev/null +++ b/xorg-server-1.4/dix/grabs.c @@ -0,0 +1,483 @@ +/* + +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 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. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "misc.h" +#define NEED_EVENTS +#include +#include "windowstr.h" +#include "inputstr.h" +#include "cursorstr.h" +#include "dixgrabs.h" + +#define BITMASK(i) (((Mask)1) << ((i) & 31)) +#define MASKIDX(i) ((i) >> 5) +#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)) + +GrabPtr +CreateGrab( + int client, + DeviceIntPtr device, + WindowPtr window, + Mask eventMask, + Bool ownerEvents, Bool keyboardMode, Bool pointerMode, + DeviceIntPtr modDevice, + unsigned short modifiers, + int type, + KeyCode keybut, /* key or button */ + WindowPtr confineTo, + CursorPtr cursor) +{ + GrabPtr grab; + + grab = (GrabPtr)xalloc(sizeof(GrabRec)); + if (!grab) + return (GrabPtr)NULL; + grab->resource = FakeClientID(client); + grab->device = device; + grab->coreGrab = ((device == inputInfo.keyboard) || + (device == inputInfo.pointer)); + grab->window = window; + grab->eventMask = eventMask; + grab->ownerEvents = ownerEvents; + grab->keyboardMode = keyboardMode; + grab->pointerMode = pointerMode; + grab->modifiersDetail.exact = modifiers; + grab->modifiersDetail.pMask = NULL; + grab->modifierDevice = modDevice; + grab->coreMods = ((modDevice == inputInfo.keyboard) || + (modDevice == inputInfo.pointer)); + grab->type = type; + grab->detail.exact = keybut; + grab->detail.pMask = NULL; + grab->confineTo = confineTo; + grab->cursor = cursor; + if (cursor) + cursor->refcnt++; + return grab; + +} + +static void +FreeGrab(GrabPtr pGrab) +{ + if (pGrab->modifiersDetail.pMask != NULL) + xfree(pGrab->modifiersDetail.pMask); + + if (pGrab->detail.pMask != NULL) + xfree(pGrab->detail.pMask); + + if (pGrab->cursor) + FreeCursor(pGrab->cursor, (Cursor)0); + + xfree(pGrab); +} + +int +DeletePassiveGrab(pointer value, XID id) +{ + GrabPtr g, prev; + GrabPtr pGrab = (GrabPtr)value; + + /* it is OK if the grab isn't found */ + prev = 0; + for (g = (wPassiveGrabs (pGrab->window)); g; g = g->next) + { + if (pGrab == g) + { + if (prev) + prev->next = g->next; + else + if (!(pGrab->window->optional->passiveGrabs = g->next)) + CheckWindowOptionalNeed (pGrab->window); + break; + } + prev = g; + } + FreeGrab(pGrab); + return Success; +} + +static Mask * +DeleteDetailFromMask(Mask *pDetailMask, unsigned short detail) +{ + Mask *mask; + int i; + + mask = (Mask *)xalloc(sizeof(Mask) * MasksPerDetailMask); + if (mask) + { + if (pDetailMask) + for (i = 0; i < MasksPerDetailMask; i++) + mask[i]= pDetailMask[i]; + else + for (i = 0; i < MasksPerDetailMask; i++) + mask[i]= ~0L; + BITCLEAR(mask, detail); + } + return mask; +} + +static Bool +IsInGrabMask( + DetailRec firstDetail, + DetailRec secondDetail, + unsigned short exception) +{ + if (firstDetail.exact == exception) + { + if (firstDetail.pMask == NULL) + return TRUE; + + /* (at present) never called with two non-null pMasks */ + if (secondDetail.exact == exception) + return FALSE; + + if (GETBIT(firstDetail.pMask, secondDetail.exact)) + return TRUE; + } + + return FALSE; +} + +static Bool +IdenticalExactDetails( + unsigned short firstExact, + unsigned short secondExact, + unsigned short exception) +{ + if ((firstExact == exception) || (secondExact == exception)) + return FALSE; + + if (firstExact == secondExact) + return TRUE; + + return FALSE; +} + +static Bool +DetailSupersedesSecond( + DetailRec firstDetail, + DetailRec secondDetail, + unsigned short exception) +{ + if (IsInGrabMask(firstDetail, secondDetail, exception)) + return TRUE; + + if (IdenticalExactDetails(firstDetail.exact, secondDetail.exact, + exception)) + return TRUE; + + return FALSE; +} + +static Bool +GrabSupersedesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab) +{ + if (!DetailSupersedesSecond(pFirstGrab->modifiersDetail, + pSecondGrab->modifiersDetail, + (unsigned short)AnyModifier)) + return FALSE; + + if (DetailSupersedesSecond(pFirstGrab->detail, + pSecondGrab->detail, (unsigned short)AnyKey)) + return TRUE; + + return FALSE; +} + +Bool +GrabMatchesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab) +{ + if ((pFirstGrab->device != pSecondGrab->device) || + (pFirstGrab->modifierDevice != pSecondGrab->modifierDevice) || + (pFirstGrab->type != pSecondGrab->type)) + return FALSE; + + if (GrabSupersedesSecond(pFirstGrab, pSecondGrab) || + GrabSupersedesSecond(pSecondGrab, pFirstGrab)) + return TRUE; + + if (DetailSupersedesSecond(pSecondGrab->detail, pFirstGrab->detail, + (unsigned short)AnyKey) + && + DetailSupersedesSecond(pFirstGrab->modifiersDetail, + pSecondGrab->modifiersDetail, + (unsigned short)AnyModifier)) + return TRUE; + + if (DetailSupersedesSecond(pFirstGrab->detail, pSecondGrab->detail, + (unsigned short)AnyKey) + && + DetailSupersedesSecond(pSecondGrab->modifiersDetail, + pFirstGrab->modifiersDetail, + (unsigned short)AnyModifier)) + return TRUE; + + return FALSE; +} + +static Bool +GrabsAreIdentical(GrabPtr pFirstGrab, GrabPtr pSecondGrab) +{ + if (pFirstGrab->device != pSecondGrab->device || + (pFirstGrab->modifierDevice != pSecondGrab->modifierDevice) || + (pFirstGrab->type != pSecondGrab->type)) + return FALSE; + + if (!(DetailSupersedesSecond(pFirstGrab->detail, + pSecondGrab->detail, + (unsigned short)AnyKey) && + DetailSupersedesSecond(pSecondGrab->detail, + pFirstGrab->detail, + (unsigned short)AnyKey))) + return FALSE; + + if (!(DetailSupersedesSecond(pFirstGrab->modifiersDetail, + pSecondGrab->modifiersDetail, + (unsigned short)AnyModifier) && + DetailSupersedesSecond(pSecondGrab->modifiersDetail, + pFirstGrab->modifiersDetail, + (unsigned short)AnyModifier))) + return FALSE; + + return TRUE; +} + + +/** + * Prepend the new grab to the list of passive grabs on the window. + * Any previously existing grab that matches the new grab will be removed. + * Adding a new grab that would override another client's grab will result in + * a BadAccess. + * + * @return Success or X error code on failure. + */ +int +AddPassiveGrabToList(GrabPtr pGrab) +{ + GrabPtr grab; + + for (grab = wPassiveGrabs(pGrab->window); grab; grab = grab->next) + { + if (GrabMatchesSecond(pGrab, grab)) + { + if (CLIENT_BITS(pGrab->resource) != CLIENT_BITS(grab->resource)) + { + FreeGrab(pGrab); + return BadAccess; + } + } + } + + /* Remove all grabs that match the new one exactly */ + for (grab = wPassiveGrabs(pGrab->window); grab; grab = grab->next) + { + if (GrabsAreIdentical(pGrab, grab)) + { + DeletePassiveGrabFromList(grab); + break; + } + } + + if (!pGrab->window->optional && !MakeWindowOptional (pGrab->window)) + { + FreeGrab(pGrab); + return BadAlloc; + } + + pGrab->next = pGrab->window->optional->passiveGrabs; + pGrab->window->optional->passiveGrabs = pGrab; + if (AddResource(pGrab->resource, RT_PASSIVEGRAB, (pointer)pGrab)) + return Success; + return BadAlloc; +} + +/* the following is kinda complicated, because we need to be able to back out + * if any allocation fails + */ + +Bool +DeletePassiveGrabFromList(GrabPtr pMinuendGrab) +{ + GrabPtr grab; + GrabPtr *deletes, *adds; + Mask ***updates, **details; + int i, ndels, nadds, nups; + Bool ok; + +#define UPDATE(mask,exact) \ + if (!(details[nups] = DeleteDetailFromMask(mask, exact))) \ + ok = FALSE; \ + else \ + updates[nups++] = &(mask) + + i = 0; + for (grab = wPassiveGrabs(pMinuendGrab->window); grab; grab = grab->next) + i++; + if (!i) + return TRUE; + deletes = (GrabPtr *)ALLOCATE_LOCAL(i * sizeof(GrabPtr)); + adds = (GrabPtr *)ALLOCATE_LOCAL(i * sizeof(GrabPtr)); + updates = (Mask ***)ALLOCATE_LOCAL(i * sizeof(Mask **)); + details = (Mask **)ALLOCATE_LOCAL(i * sizeof(Mask *)); + if (!deletes || !adds || !updates || !details) + { + if (details) DEALLOCATE_LOCAL(details); + if (updates) DEALLOCATE_LOCAL(updates); + if (adds) DEALLOCATE_LOCAL(adds); + if (deletes) DEALLOCATE_LOCAL(deletes); + return FALSE; + } + ndels = nadds = nups = 0; + ok = TRUE; + for (grab = wPassiveGrabs(pMinuendGrab->window); + grab && ok; + grab = grab->next) + { + if ((CLIENT_BITS(grab->resource) != CLIENT_BITS(pMinuendGrab->resource)) || + !GrabMatchesSecond(grab, pMinuendGrab)) + continue; + if (GrabSupersedesSecond(pMinuendGrab, grab)) + { + deletes[ndels++] = grab; + } + else if ((grab->detail.exact == AnyKey) + && (grab->modifiersDetail.exact != AnyModifier)) + { + UPDATE(grab->detail.pMask, pMinuendGrab->detail.exact); + } + else if ((grab->modifiersDetail.exact == AnyModifier) + && (grab->detail.exact != AnyKey)) + { + UPDATE(grab->modifiersDetail.pMask, + pMinuendGrab->modifiersDetail.exact); + } + else if ((pMinuendGrab->detail.exact != AnyKey) + && (pMinuendGrab->modifiersDetail.exact != AnyModifier)) + { + GrabPtr pNewGrab; + + UPDATE(grab->detail.pMask, pMinuendGrab->detail.exact); + + pNewGrab = CreateGrab(CLIENT_ID(grab->resource), grab->device, + grab->window, (Mask)grab->eventMask, + (Bool)grab->ownerEvents, + (Bool)grab->keyboardMode, + (Bool)grab->pointerMode, + grab->modifierDevice, + AnyModifier, (int)grab->type, + pMinuendGrab->detail.exact, + grab->confineTo, grab->cursor); + if (!pNewGrab) + ok = FALSE; + else if (!(pNewGrab->modifiersDetail.pMask = + DeleteDetailFromMask(grab->modifiersDetail.pMask, + pMinuendGrab->modifiersDetail.exact)) + || + (!pNewGrab->window->optional && + !MakeWindowOptional(pNewGrab->window))) + { + FreeGrab(pNewGrab); + ok = FALSE; + } + else if (!AddResource(pNewGrab->resource, RT_PASSIVEGRAB, + (pointer)pNewGrab)) + ok = FALSE; + else + adds[nadds++] = pNewGrab; + } + else if (pMinuendGrab->detail.exact == AnyKey) + { + UPDATE(grab->modifiersDetail.pMask, + pMinuendGrab->modifiersDetail.exact); + } + else + { + UPDATE(grab->detail.pMask, pMinuendGrab->detail.exact); + } + } + + if (!ok) + { + for (i = 0; i < nadds; i++) + FreeResource(adds[i]->resource, RT_NONE); + for (i = 0; i < nups; i++) + xfree(details[i]); + } + else + { + for (i = 0; i < ndels; i++) + FreeResource(deletes[i]->resource, RT_NONE); + for (i = 0; i < nadds; i++) + { + grab = adds[i]; + grab->next = grab->window->optional->passiveGrabs; + grab->window->optional->passiveGrabs = grab; + } + for (i = 0; i < nups; i++) + { + xfree(*updates[i]); + *updates[i] = details[i]; + } + } + DEALLOCATE_LOCAL(details); + DEALLOCATE_LOCAL(updates); + DEALLOCATE_LOCAL(adds); + DEALLOCATE_LOCAL(deletes); + return ok; + +#undef UPDATE +} diff --git a/xorg-server-1.4/dix/initatoms.c b/xorg-server-1.4/dix/initatoms.c new file mode 100644 index 0000000..de101bd --- /dev/null +++ b/xorg-server-1.4/dix/initatoms.c @@ -0,0 +1,84 @@ +/* THIS IS A GENERATED FILE + * + * Do not change! Changing this file implies a protocol change! + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "misc.h" +#include "dix.h" +void MakePredeclaredAtoms(void) +{ + if (MakeAtom("PRIMARY", 7, 1) != XA_PRIMARY) AtomError(); + if (MakeAtom("SECONDARY", 9, 1) != XA_SECONDARY) AtomError(); + if (MakeAtom("ARC", 3, 1) != XA_ARC) AtomError(); + if (MakeAtom("ATOM", 4, 1) != XA_ATOM) AtomError(); + if (MakeAtom("BITMAP", 6, 1) != XA_BITMAP) AtomError(); + if (MakeAtom("CARDINAL", 8, 1) != XA_CARDINAL) AtomError(); + if (MakeAtom("COLORMAP", 8, 1) != XA_COLORMAP) AtomError(); + if (MakeAtom("CURSOR", 6, 1) != XA_CURSOR) AtomError(); + if (MakeAtom("CUT_BUFFER0", 11, 1) != XA_CUT_BUFFER0) AtomError(); + if (MakeAtom("CUT_BUFFER1", 11, 1) != XA_CUT_BUFFER1) AtomError(); + if (MakeAtom("CUT_BUFFER2", 11, 1) != XA_CUT_BUFFER2) AtomError(); + if (MakeAtom("CUT_BUFFER3", 11, 1) != XA_CUT_BUFFER3) AtomError(); + if (MakeAtom("CUT_BUFFER4", 11, 1) != XA_CUT_BUFFER4) AtomError(); + if (MakeAtom("CUT_BUFFER5", 11, 1) != XA_CUT_BUFFER5) AtomError(); + if (MakeAtom("CUT_BUFFER6", 11, 1) != XA_CUT_BUFFER6) AtomError(); + if (MakeAtom("CUT_BUFFER7", 11, 1) != XA_CUT_BUFFER7) AtomError(); + if (MakeAtom("DRAWABLE", 8, 1) != XA_DRAWABLE) AtomError(); + if (MakeAtom("FONT", 4, 1) != XA_FONT) AtomError(); + if (MakeAtom("INTEGER", 7, 1) != XA_INTEGER) AtomError(); + if (MakeAtom("PIXMAP", 6, 1) != XA_PIXMAP) AtomError(); + if (MakeAtom("POINT", 5, 1) != XA_POINT) AtomError(); + if (MakeAtom("RECTANGLE", 9, 1) != XA_RECTANGLE) AtomError(); + if (MakeAtom("RESOURCE_MANAGER", 16, 1) != XA_RESOURCE_MANAGER) AtomError(); + if (MakeAtom("RGB_COLOR_MAP", 13, 1) != XA_RGB_COLOR_MAP) AtomError(); + if (MakeAtom("RGB_BEST_MAP", 12, 1) != XA_RGB_BEST_MAP) AtomError(); + if (MakeAtom("RGB_BLUE_MAP", 12, 1) != XA_RGB_BLUE_MAP) AtomError(); + if (MakeAtom("RGB_DEFAULT_MAP", 15, 1) != XA_RGB_DEFAULT_MAP) AtomError(); + if (MakeAtom("RGB_GRAY_MAP", 12, 1) != XA_RGB_GRAY_MAP) AtomError(); + if (MakeAtom("RGB_GREEN_MAP", 13, 1) != XA_RGB_GREEN_MAP) AtomError(); + if (MakeAtom("RGB_RED_MAP", 11, 1) != XA_RGB_RED_MAP) AtomError(); + if (MakeAtom("STRING", 6, 1) != XA_STRING) AtomError(); + if (MakeAtom("VISUALID", 8, 1) != XA_VISUALID) AtomError(); + if (MakeAtom("WINDOW", 6, 1) != XA_WINDOW) AtomError(); + if (MakeAtom("WM_COMMAND", 10, 1) != XA_WM_COMMAND) AtomError(); + if (MakeAtom("WM_HINTS", 8, 1) != XA_WM_HINTS) AtomError(); + if (MakeAtom("WM_CLIENT_MACHINE", 17, 1) != XA_WM_CLIENT_MACHINE) AtomError(); + if (MakeAtom("WM_ICON_NAME", 12, 1) != XA_WM_ICON_NAME) AtomError(); + if (MakeAtom("WM_ICON_SIZE", 12, 1) != XA_WM_ICON_SIZE) AtomError(); + if (MakeAtom("WM_NAME", 7, 1) != XA_WM_NAME) AtomError(); + if (MakeAtom("WM_NORMAL_HINTS", 15, 1) != XA_WM_NORMAL_HINTS) AtomError(); + if (MakeAtom("WM_SIZE_HINTS", 13, 1) != XA_WM_SIZE_HINTS) AtomError(); + if (MakeAtom("WM_ZOOM_HINTS", 13, 1) != XA_WM_ZOOM_HINTS) AtomError(); + if (MakeAtom("MIN_SPACE", 9, 1) != XA_MIN_SPACE) AtomError(); + if (MakeAtom("NORM_SPACE", 10, 1) != XA_NORM_SPACE) AtomError(); + if (MakeAtom("MAX_SPACE", 9, 1) != XA_MAX_SPACE) AtomError(); + if (MakeAtom("END_SPACE", 9, 1) != XA_END_SPACE) AtomError(); + if (MakeAtom("SUPERSCRIPT_X", 13, 1) != XA_SUPERSCRIPT_X) AtomError(); + if (MakeAtom("SUPERSCRIPT_Y", 13, 1) != XA_SUPERSCRIPT_Y) AtomError(); + if (MakeAtom("SUBSCRIPT_X", 11, 1) != XA_SUBSCRIPT_X) AtomError(); + if (MakeAtom("SUBSCRIPT_Y", 11, 1) != XA_SUBSCRIPT_Y) AtomError(); + if (MakeAtom("UNDERLINE_POSITION", 18, 1) != XA_UNDERLINE_POSITION) AtomError(); + if (MakeAtom("UNDERLINE_THICKNESS", 19, 1) != XA_UNDERLINE_THICKNESS) AtomError(); + if (MakeAtom("STRIKEOUT_ASCENT", 16, 1) != XA_STRIKEOUT_ASCENT) AtomError(); + if (MakeAtom("STRIKEOUT_DESCENT", 17, 1) != XA_STRIKEOUT_DESCENT) AtomError(); + if (MakeAtom("ITALIC_ANGLE", 12, 1) != XA_ITALIC_ANGLE) AtomError(); + if (MakeAtom("X_HEIGHT", 8, 1) != XA_X_HEIGHT) AtomError(); + if (MakeAtom("QUAD_WIDTH", 10, 1) != XA_QUAD_WIDTH) AtomError(); + if (MakeAtom("WEIGHT", 6, 1) != XA_WEIGHT) AtomError(); + if (MakeAtom("POINT_SIZE", 10, 1) != XA_POINT_SIZE) AtomError(); + if (MakeAtom("RESOLUTION", 10, 1) != XA_RESOLUTION) AtomError(); + if (MakeAtom("COPYRIGHT", 9, 1) != XA_COPYRIGHT) AtomError(); + if (MakeAtom("NOTICE", 6, 1) != XA_NOTICE) AtomError(); + if (MakeAtom("FONT_NAME", 9, 1) != XA_FONT_NAME) AtomError(); + if (MakeAtom("FAMILY_NAME", 11, 1) != XA_FAMILY_NAME) AtomError(); + if (MakeAtom("FULL_NAME", 9, 1) != XA_FULL_NAME) AtomError(); + if (MakeAtom("CAP_HEIGHT", 10, 1) != XA_CAP_HEIGHT) AtomError(); + if (MakeAtom("WM_CLASS", 8, 1) != XA_WM_CLASS) AtomError(); + if (MakeAtom("WM_TRANSIENT_FOR", 16, 1) != XA_WM_TRANSIENT_FOR) AtomError(); +} diff --git a/xorg-server-1.4/dix/main.c b/xorg-server-1.4/dix/main.c new file mode 100644 index 0000000..31e291b --- /dev/null +++ b/xorg-server-1.4/dix/main.c @@ -0,0 +1,786 @@ +/*********************************************************** + +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 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. + +******************************************************************/ + +/* The panoramix components contained the following notice */ +/***************************************************************** + +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. + +******************************************************************/ + +#define NEED_EVENTS +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include /* for unistd.h */ +#include +#include "scrnintstr.h" +#include "misc.h" +#include "os.h" +#include "windowstr.h" +#include "resource.h" +#include "dixstruct.h" +#include "gcstruct.h" +#include "extension.h" +#include "colormap.h" +#include "colormapst.h" +#include "cursorstr.h" +#include +#include "opaque.h" +#include "servermd.h" +#include "hotplug.h" +#include "site.h" +#include "dixfont.h" +#include "extnsionst.h" +#ifdef XPRINT +#include "DiPrint.h" +#endif +#ifdef PANORAMIX +#include "panoramiXsrv.h" +#else +#include "dixevents.h" /* InitEvents() */ +#include "dispatch.h" /* InitProcVectors() */ +#endif + +#ifdef DPMSExtension +#define DPMS_SERVER +#include +#include "dpmsproc.h" +#endif + +extern int InitClientPrivates(ClientPtr client); + +extern void Dispatch(void); + +char *ConnectionInfo; +xConnSetupPrefix connSetupPrefix; + +extern FontPtr defaultFont; +extern int screenPrivateCount; + +extern void InitProcVectors(void); +extern Bool CreateGCperDepthArray(void); + +#ifndef PANORAMIX +static +#endif +Bool CreateConnectionBlock(void); + +static void FreeScreen(ScreenPtr); + +_X_EXPORT PaddingInfo PixmapWidthPaddingInfo[33]; + +int connBlockScreenStart; + +static int restart = 0; + +_X_EXPORT void +NotImplemented(xEvent *from, xEvent *to) +{ + FatalError("Not implemented"); +} + +/* + * Dummy entry for ReplySwapVector[] + */ + +void +ReplyNotSwappd( + ClientPtr pClient , + int size , + void * pbuf + ) +{ + FatalError("Not implemented"); +} + +/* + * This array encodes the answer to the question "what is the log base 2 + * of the number of pixels that fit in a scanline pad unit?" + * Note that ~0 is an invalid entry (mostly for the benefit of the reader). + */ +static int answer[6][4] = { + /* pad pad pad pad*/ + /* 8 16 32 64 */ + + { 3, 4, 5 , 6 }, /* 1 bit per pixel */ + { 1, 2, 3 , 4 }, /* 4 bits per pixel */ + { 0, 1, 2 , 3 }, /* 8 bits per pixel */ + { ~0, 0, 1 , 2 }, /* 16 bits per pixel */ + { ~0, ~0, 0 , 1 }, /* 24 bits per pixel */ + { ~0, ~0, 0 , 1 } /* 32 bits per pixel */ +}; + +/* + * This array gives the answer to the question "what is the first index for + * the answer array above given the number of bits per pixel?" + * Note that ~0 is an invalid entry (mostly for the benefit of the reader). + */ +static int indexForBitsPerPixel[ 33 ] = { + ~0, 0, ~0, ~0, /* 1 bit per pixel */ + 1, ~0, ~0, ~0, /* 4 bits per pixel */ + 2, ~0, ~0, ~0, /* 8 bits per pixel */ + ~0,~0, ~0, ~0, + 3, ~0, ~0, ~0, /* 16 bits per pixel */ + ~0,~0, ~0, ~0, + 4, ~0, ~0, ~0, /* 24 bits per pixel */ + ~0,~0, ~0, ~0, + 5 /* 32 bits per pixel */ +}; + +/* + * This array gives the bytesperPixel value for cases where the number + * of bits per pixel is a multiple of 8 but not a power of 2. + */ +static int answerBytesPerPixel[ 33 ] = { + ~0, 0, ~0, ~0, /* 1 bit per pixel */ + 0, ~0, ~0, ~0, /* 4 bits per pixel */ + 0, ~0, ~0, ~0, /* 8 bits per pixel */ + ~0,~0, ~0, ~0, + 0, ~0, ~0, ~0, /* 16 bits per pixel */ + ~0,~0, ~0, ~0, + 3, ~0, ~0, ~0, /* 24 bits per pixel */ + ~0,~0, ~0, ~0, + 0 /* 32 bits per pixel */ +}; + +/* + * This array gives the answer to the question "what is the second index for + * the answer array above given the number of bits per scanline pad unit?" + * Note that ~0 is an invalid entry (mostly for the benefit of the reader). + */ +static int indexForScanlinePad[ 65 ] = { + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + 0, ~0, ~0, ~0, /* 8 bits per scanline pad unit */ + ~0, ~0, ~0, ~0, + 1, ~0, ~0, ~0, /* 16 bits per scanline pad unit */ + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + 2, ~0, ~0, ~0, /* 32 bits per scanline pad unit */ + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + 3 /* 64 bits per scanline pad unit */ +}; + +#ifndef MIN +#define MIN(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +int +main(int argc, char *argv[], char *envp[]) +{ + int i, j, k, error; + char *xauthfile; + HWEventQueueType alwaysCheckForInput[2]; + + display = "0"; + + InitGlobals(); + InitRegions(); +#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 + * from another thread. */ +#if defined(__DARWIN__) && defined(DARWIN_WITH_QUARTZ) + DarwinHandleGUI(argc, argv, envp); +#endif + + /* Notice if we're restarted. Probably this is because we jumped through + * an uninitialized pointer */ + if (restart) + FatalError("server restarted. Jumped through uninitialized pointer?\n"); + else + restart = 1; + + CheckUserParameters(argc, argv, envp); + + CheckUserAuthorization(); + +#ifdef COMMANDLINE_CHALLENGED_OPERATING_SYSTEMS + ExpandCommandLine(&argc, &argv); +#endif + + InitConnectionLimits(); + + /* These are needed by some routines which are called from interrupt + * handlers, thus have no direct calling path back to main and thus + * can't be passed argc, argv as parameters */ + argcGlobal = argc; + argvGlobal = argv; + /* prep X authority file from environment; this can be overriden by a + * command line option */ + xauthfile = getenv("XAUTHORITY"); + if (xauthfile) InitAuthorization (xauthfile); + ProcessCommandLine(argc, argv); + + alwaysCheckForInput[0] = 0; + alwaysCheckForInput[1] = 1; + while(1) + { + serverGeneration++; + ScreenSaverTime = defaultScreenSaverTime; + ScreenSaverInterval = defaultScreenSaverInterval; + ScreenSaverBlanking = defaultScreenSaverBlanking; + ScreenSaverAllowExposures = defaultScreenSaverAllowExposures; +#ifdef DPMSExtension + DPMSStandbyTime = defaultDPMSStandbyTime; + DPMSSuspendTime = defaultDPMSSuspendTime; + DPMSOffTime = defaultDPMSOffTime; + DPMSEnabled = defaultDPMSEnabled; + DPMSPowerLevel = 0; +#endif + InitBlockAndWakeupHandlers(); + /* Perform any operating system dependent initializations you'd like */ + OsInit(); + config_init(); + if(serverGeneration == 1) + { + CreateWellKnownSockets(); + InitProcVectors(); + clients = (ClientPtr *)xalloc(MAXCLIENTS * sizeof(ClientPtr)); + if (!clients) + FatalError("couldn't create client array"); + for (i=1; iCreateScreenResources && + !(*pScreen->CreateScreenResources)(pScreen)) + FatalError("failed to create screen resources"); + if (!CreateGCperDepth(i)) + FatalError("failed to create scratch GCs"); + if (!CreateDefaultStipple(i)) + FatalError("failed to create default stipple"); + if (!CreateRootWindow(pScreen)) + FatalError("failed to create root window"); + } + InitCoreDevices(); + InitInput(argc, argv); + if (InitAndStartDevices() != Success) + FatalError("failed to initialize core devices"); + + InitFonts(); + if (loadableFonts) { + SetFontPath(0, 0, (unsigned char *)defaultFontPath, &error); + } + else { + if (SetDefaultFontPath(defaultFontPath) != Success) + ErrorF("failed to set default font path '%s'", + defaultFontPath); + } + if (!SetDefaultFont(defaultTextFont)) { + FatalError("could not open default font '%s'", defaultTextFont); + } + + if (!(rootCursor = CreateRootCursor(NULL, 0))) { + FatalError("could not open default cursor font '%s'", + defaultCursorFont); + } + +#ifdef DPMSExtension + /* check all screens, looking for DPMS Capabilities */ + DPMSCapableFlag = DPMSSupported(); + if (!DPMSCapableFlag) + DPMSEnabled = FALSE; +#endif + +#ifdef PANORAMIX + /* + * Consolidate window and colourmap information for each screen + */ + if (!noPanoramiXExtension) + PanoramiXConsolidate(); +#endif + + for (i = 0; i < screenInfo.numScreens; i++) + InitRootWindow(WindowTable[i]); + DefineInitialRootWindow(WindowTable[0]); + SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverReset); + +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + if (!PanoramiXCreateConnectionBlock()) { + FatalError("could not create connection block info"); + } + } else +#endif + { + if (!CreateConnectionBlock()) { + FatalError("could not create connection block info"); + } + } + + Dispatch(); + + /* Now free up whatever must be freed */ + if (screenIsSaved == SCREEN_SAVER_ON) + SaveScreens(SCREEN_SAVER_OFF, ScreenSaverReset); + FreeScreenSaverTimer(); + CloseDownExtensions(); + +#ifdef PANORAMIX + { + Bool remember_it = noPanoramiXExtension; + noPanoramiXExtension = TRUE; + FreeAllResources(); + noPanoramiXExtension = remember_it; + } +#else + FreeAllResources(); +#endif + + config_fini(); + CloseDownDevices(); + for (i = screenInfo.numScreens - 1; i >= 0; i--) + { + FreeScratchPixmapsForScreen(i); + FreeGCperDepth(i); + FreeDefaultStipple(i); + (* screenInfo.screens[i]->CloseScreen)(i, screenInfo.screens[i]); + FreeScreen(screenInfo.screens[i]); + screenInfo.numScreens = i; + } + CloseDownEvents(); + xfree(WindowTable); + WindowTable = NULL; + FreeFonts(); + + FreeAuditTimer(); + + xfree(serverClient->devPrivates); + serverClient->devPrivates = NULL; + + if (dispatchException & DE_TERMINATE) + { + CloseWellKnownConnections(); + } + + OsCleanup((dispatchException & DE_TERMINATE) != 0); + + if (dispatchException & DE_TERMINATE) + { + ddxGiveUp(); + break; + } + + xfree(ConnectionInfo); + ConnectionInfo = NULL; + } + return(0); +} + +static int VendorRelease = VENDOR_RELEASE; +static char *VendorString = VENDOR_NAME; + +void +SetVendorRelease(int release) +{ + VendorRelease = release; +} + +void +SetVendorString(char *string) +{ + VendorString = string; +} + +static int padlength[4] = {0, 3, 2, 1}; + +#ifndef PANORAMIX +static +#endif +Bool +CreateConnectionBlock(void) +{ + xConnSetup setup; + xWindowRoot root; + xDepth depth; + xVisualType visual; + xPixmapFormat format; + unsigned long vid; + int i, j, k, + lenofblock, + sizesofar = 0; + char *pBuf; + + + /* Leave off the ridBase and ridMask, these must be sent with + connection */ + + setup.release = VendorRelease; + /* + * per-server image and bitmap parameters are defined in Xmd.h + */ + setup.imageByteOrder = screenInfo.imageByteOrder; + + setup.bitmapScanlineUnit = screenInfo.bitmapScanlineUnit; + setup.bitmapScanlinePad = screenInfo.bitmapScanlinePad; + + setup.bitmapBitOrder = screenInfo.bitmapBitOrder; + setup.motionBufferSize = NumMotionEvents(); + setup.numRoots = screenInfo.numScreens; + setup.nbytesVendor = strlen(VendorString); + setup.numFormats = screenInfo.numPixmapFormats; + setup.maxRequestSize = MAX_REQUEST_SIZE; + QueryMinMaxKeyCodes(&setup.minKeyCode, &setup.maxKeyCode); + + lenofblock = sizeof(xConnSetup) + + ((setup.nbytesVendor + 3) & ~3) + + (setup.numFormats * sizeof(xPixmapFormat)) + + (setup.numRoots * sizeof(xWindowRoot)); + ConnectionInfo = (char *) xalloc(lenofblock); + if (!ConnectionInfo) + return FALSE; + + memmove(ConnectionInfo, (char *)&setup, sizeof(xConnSetup)); + sizesofar = sizeof(xConnSetup); + pBuf = ConnectionInfo + sizeof(xConnSetup); + + memmove(pBuf, VendorString, (int)setup.nbytesVendor); + sizesofar += setup.nbytesVendor; + pBuf += setup.nbytesVendor; + i = padlength[setup.nbytesVendor & 3]; + sizesofar += i; + while (--i >= 0) + *pBuf++ = 0; + + for (i=0; idrawable.id; + root.defaultColormap = pScreen->defColormap; + root.whitePixel = pScreen->whitePixel; + root.blackPixel = pScreen->blackPixel; + root.currentInputMask = 0; /* filled in when sent */ + root.pixWidth = pScreen->width; + root.pixHeight = pScreen->height; + root.mmWidth = pScreen->mmWidth; + root.mmHeight = pScreen->mmHeight; + root.minInstalledMaps = pScreen->minInstalledCmaps; + root.maxInstalledMaps = pScreen->maxInstalledCmaps; + root.rootVisualID = pScreen->rootVisual; + root.backingStore = pScreen->backingStoreSupport; + root.saveUnders = pScreen->saveUnderSupport != NotUseful; + root.rootDepth = pScreen->rootDepth; + root.nDepths = pScreen->numDepths; + memmove(pBuf, (char *)&root, sizeof(xWindowRoot)); + sizesofar += sizeof(xWindowRoot); + pBuf += sizeof(xWindowRoot); + + pDepth = pScreen->allowedDepths; + for(j = 0; j < pScreen->numDepths; j++, pDepth++) + { + lenofblock += sizeof(xDepth) + + (pDepth->numVids * sizeof(xVisualType)); + pBuf = (char *)xrealloc(ConnectionInfo, lenofblock); + if (!pBuf) + { + xfree(ConnectionInfo); + return FALSE; + } + ConnectionInfo = pBuf; + pBuf += sizesofar; + depth.depth = pDepth->depth; + depth.nVisuals = pDepth->numVids; + memmove(pBuf, (char *)&depth, sizeof(xDepth)); + pBuf += sizeof(xDepth); + sizesofar += sizeof(xDepth); + for(k = 0; k < pDepth->numVids; k++) + { + vid = pDepth->vids[k]; + for (pVisual = pScreen->visuals; + pVisual->vid != vid; + pVisual++) + ; + visual.visualID = vid; + visual.class = pVisual->class; + visual.bitsPerRGB = pVisual->bitsPerRGBValue; + visual.colormapEntries = pVisual->ColormapEntries; + visual.redMask = pVisual->redMask; + visual.greenMask = pVisual->greenMask; + visual.blueMask = pVisual->blueMask; + memmove(pBuf, (char *)&visual, sizeof(xVisualType)); + pBuf += sizeof(xVisualType); + sizesofar += sizeof(xVisualType); + } + } + } + connSetupPrefix.success = xTrue; + connSetupPrefix.length = lenofblock/4; + connSetupPrefix.majorVersion = X_PROTOCOL; + connSetupPrefix.minorVersion = X_PROTOCOL_REVISION; + return TRUE; +} + +/* + grow the array of screenRecs if necessary. + call the device-supplied initialization procedure +with its screen number, a pointer to its ScreenRec, argc, and argv. + return the number of successfully installed screens. + +*/ + +int +AddScreen( + Bool (* pfnInit)( + int /*index*/, + ScreenPtr /*pScreen*/, + int /*argc*/, + char ** /*argv*/ + ), + int argc, + char **argv) +{ + + int i; + int scanlinepad, format, depth, bitsPerPixel, j, k; + ScreenPtr pScreen; + + i = screenInfo.numScreens; + if (i == MAXSCREENS) + return -1; + + pScreen = (ScreenPtr) xcalloc(1, sizeof(ScreenRec)); + if (!pScreen) + return -1; + + pScreen->devPrivates = (DevUnion *)xcalloc(sizeof(DevUnion), + screenPrivateCount); + if (!pScreen->devPrivates && screenPrivateCount) + { + xfree(pScreen); + return -1; + } + pScreen->myNum = i; + pScreen->WindowPrivateLen = 0; + pScreen->WindowPrivateSizes = (unsigned *)NULL; + pScreen->totalWindowSize = + ((sizeof(WindowRec) + sizeof(long) - 1) / sizeof(long)) * sizeof(long); + pScreen->GCPrivateLen = 0; + pScreen->GCPrivateSizes = (unsigned *)NULL; + pScreen->totalGCSize = + ((sizeof(GC) + sizeof(long) - 1) / sizeof(long)) * sizeof(long); + pScreen->PixmapPrivateLen = 0; + pScreen->PixmapPrivateSizes = (unsigned *)NULL; + pScreen->totalPixmapSize = BitmapBytePad(sizeof(PixmapRec)*8); + pScreen->ClipNotify = 0; /* for R4 ddx compatibility */ + pScreen->CreateScreenResources = 0; + + /* + * This loop gets run once for every Screen that gets added, + * but thats ok. If the ddx layer initializes the formats + * one at a time calling AddScreen() after each, then each + * iteration will make it a little more accurate. Worst case + * we do this loop N * numPixmapFormats where N is # of screens. + * Anyway, this must be called after InitOutput and before the + * screen init routine is called. + */ + for (format=0; formatrgf = ~0L; /* there are no scratch GCs yet*/ + WindowTable[i] = NullWindow; + screenInfo.screens[i] = pScreen; + screenInfo.numScreens++; + if (!(*pfnInit)(i, pScreen, argc, argv)) + { + FreeScreen(pScreen); + screenInfo.numScreens--; + return -1; + } + return i; +} + +static void +FreeScreen(ScreenPtr pScreen) +{ + xfree(pScreen->WindowPrivateSizes); + xfree(pScreen->GCPrivateSizes); + xfree(pScreen->PixmapPrivateSizes); + xfree(pScreen->devPrivates); + xfree(pScreen); +} diff --git a/xorg-server-1.4/dix/pixmap.c b/xorg-server-1.4/dix/pixmap.c new file mode 100644 index 0000000..c280a3b --- /dev/null +++ b/xorg-server-1.4/dix/pixmap.c @@ -0,0 +1,147 @@ +/* + +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. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "scrnintstr.h" +#include "misc.h" +#include "os.h" +#include "windowstr.h" +#include "resource.h" +#include "dixstruct.h" +#include "gcstruct.h" +#include "servermd.h" +#include "site.h" + + +/* + * Scratch pixmap management and device independent pixmap allocation + * function. + */ + + +/* callable by ddx */ +_X_EXPORT PixmapPtr +GetScratchPixmapHeader(ScreenPtr pScreen, int width, int height, int depth, + int bitsPerPixel, int devKind, pointer pPixData) +{ + PixmapPtr pPixmap = pScreen->pScratchPixmap; + + if (pPixmap) + pScreen->pScratchPixmap = NULL; + else + /* width and height of 0 means don't allocate any pixmap data */ + pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth); + + if (pPixmap) { + if ((*pScreen->ModifyPixmapHeader)(pPixmap, width, height, depth, + bitsPerPixel, devKind, pPixData)) + return pPixmap; + (*pScreen->DestroyPixmap)(pPixmap); + } + return NullPixmap; +} + + +/* callable by ddx */ +_X_EXPORT void +FreeScratchPixmapHeader(PixmapPtr pPixmap) +{ + if (pPixmap) + { + ScreenPtr pScreen = pPixmap->drawable.pScreen; + + pPixmap->devPrivate.ptr = NULL; /* lest ddx chases bad ptr */ + if (pScreen->pScratchPixmap) + (*pScreen->DestroyPixmap)(pPixmap); + else + pScreen->pScratchPixmap = pPixmap; + } +} + + +Bool +CreateScratchPixmapsForScreen(int scrnum) +{ + /* let it be created on first use */ + screenInfo.screens[scrnum]->pScratchPixmap = NULL; + return TRUE; +} + + +void +FreeScratchPixmapsForScreen(int scrnum) +{ + FreeScratchPixmapHeader(screenInfo.screens[scrnum]->pScratchPixmap); +} + + +/* callable by ddx */ +_X_EXPORT PixmapPtr +AllocatePixmap(ScreenPtr pScreen, int pixDataSize) +{ + PixmapPtr pPixmap; + char *ptr; + DevUnion *ppriv; + unsigned *sizes; + unsigned size; + int i; + + if (pScreen->totalPixmapSize > ((size_t)-1) - pixDataSize) + return NullPixmap; + + pPixmap = (PixmapPtr)xalloc(pScreen->totalPixmapSize + pixDataSize); + if (!pPixmap) + return NullPixmap; + ppriv = (DevUnion *)(pPixmap + 1); + pPixmap->devPrivates = ppriv; + sizes = pScreen->PixmapPrivateSizes; + ptr = (char *)(ppriv + pScreen->PixmapPrivateLen); + for (i = pScreen->PixmapPrivateLen; --i >= 0; ppriv++, sizes++) + { + if ((size = *sizes) != 0) + { + ppriv->ptr = (pointer)ptr; + ptr += size; + } + else + ppriv->ptr = (pointer)NULL; + } + +#ifdef _XSERVER64 + if (pPixmap) { + pPixmap->drawable.pad0 = 0; + pPixmap->drawable.pad1 = 0; + } +#endif + + return pPixmap; +} diff --git a/xorg-server-1.4/dix/privates.c b/xorg-server-1.4/dix/privates.c new file mode 100644 index 0000000..2465971 --- /dev/null +++ b/xorg-server-1.4/dix/privates.c @@ -0,0 +1,454 @@ +/* + +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. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "scrnintstr.h" +#include "misc.h" +#include "os.h" +#include "windowstr.h" +#include "resource.h" +#include "dixstruct.h" +#include "gcstruct.h" +#include "colormapst.h" +#include "servermd.h" +#include "site.h" +#include "inputstr.h" +#include "extnsionst.h" + +/* + * See the Wrappers and devPrivates section in "Definition of the + * Porting Layer for the X v11 Sample Server" (doc/Server/ddx.tbl.ms) + * for information on how to use devPrivates. + */ + +/* + * extension private machinery + */ + +static int extensionPrivateCount; +int extensionPrivateLen; +unsigned *extensionPrivateSizes; +unsigned totalExtensionSize; + +void +ResetExtensionPrivates(void) +{ + extensionPrivateCount = 0; + extensionPrivateLen = 0; + xfree(extensionPrivateSizes); + extensionPrivateSizes = (unsigned *)NULL; + totalExtensionSize = + ((sizeof(ExtensionEntry) + sizeof(long) - 1) / sizeof(long)) * sizeof(long); +} + +_X_EXPORT int +AllocateExtensionPrivateIndex(void) +{ + return extensionPrivateCount++; +} + +_X_EXPORT Bool +AllocateExtensionPrivate(int index2, unsigned amount) +{ + unsigned oldamount; + + /* Round up sizes for proper alignment */ + amount = ((amount + (sizeof(long) - 1)) / sizeof(long)) * sizeof(long); + + if (index2 >= extensionPrivateLen) + { + unsigned *nsizes; + nsizes = (unsigned *)xrealloc(extensionPrivateSizes, + (index2 + 1) * sizeof(unsigned)); + if (!nsizes) + return FALSE; + while (extensionPrivateLen <= index2) + { + nsizes[extensionPrivateLen++] = 0; + totalExtensionSize += sizeof(DevUnion); + } + extensionPrivateSizes = nsizes; + } + oldamount = extensionPrivateSizes[index2]; + if (amount > oldamount) + { + extensionPrivateSizes[index2] = amount; + totalExtensionSize += (amount - oldamount); + } + return TRUE; +} + +/* + * client private machinery + */ + +static int clientPrivateCount; +int clientPrivateLen; +unsigned *clientPrivateSizes; +unsigned totalClientSize; + +void +ResetClientPrivates(void) +{ + clientPrivateCount = 0; + clientPrivateLen = 0; + xfree(clientPrivateSizes); + clientPrivateSizes = (unsigned *)NULL; + totalClientSize = + ((sizeof(ClientRec) + sizeof(long) - 1) / sizeof(long)) * sizeof(long); +} + +_X_EXPORT int +AllocateClientPrivateIndex(void) +{ + return clientPrivateCount++; +} + +_X_EXPORT Bool +AllocateClientPrivate(int index2, unsigned amount) +{ + unsigned oldamount; + + /* Round up sizes for proper alignment */ + amount = ((amount + (sizeof(long) - 1)) / sizeof(long)) * sizeof(long); + + if (index2 >= clientPrivateLen) + { + unsigned *nsizes; + nsizes = (unsigned *)xrealloc(clientPrivateSizes, + (index2 + 1) * sizeof(unsigned)); + if (!nsizes) + return FALSE; + while (clientPrivateLen <= index2) + { + nsizes[clientPrivateLen++] = 0; + totalClientSize += sizeof(DevUnion); + } + clientPrivateSizes = nsizes; + } + oldamount = clientPrivateSizes[index2]; + if (amount > oldamount) + { + clientPrivateSizes[index2] = amount; + totalClientSize += (amount - oldamount); + } + return TRUE; +} + +/* + * screen private machinery + */ + +int screenPrivateCount; + +void +ResetScreenPrivates(void) +{ + screenPrivateCount = 0; +} + +/* this can be called after some screens have been created, + * so we have to worry about resizing existing devPrivates + */ +_X_EXPORT int +AllocateScreenPrivateIndex(void) +{ + int idx; + int i; + ScreenPtr pScreen; + DevUnion *nprivs; + + idx = screenPrivateCount++; + for (i = 0; i < screenInfo.numScreens; i++) + { + pScreen = screenInfo.screens[i]; + nprivs = (DevUnion *)xrealloc(pScreen->devPrivates, + screenPrivateCount * sizeof(DevUnion)); + if (!nprivs) + { + screenPrivateCount--; + return -1; + } + /* Zero the new private */ + bzero(&nprivs[idx], sizeof(DevUnion)); + pScreen->devPrivates = nprivs; + } + return idx; +} + + +/* + * window private machinery + */ + +static int windowPrivateCount; + +void +ResetWindowPrivates(void) +{ + windowPrivateCount = 0; +} + +_X_EXPORT int +AllocateWindowPrivateIndex(void) +{ + return windowPrivateCount++; +} + +_X_EXPORT Bool +AllocateWindowPrivate(ScreenPtr pScreen, int index2, unsigned amount) +{ + unsigned oldamount; + + /* Round up sizes for proper alignment */ + amount = ((amount + (sizeof(long) - 1)) / sizeof(long)) * sizeof(long); + + if (index2 >= pScreen->WindowPrivateLen) + { + unsigned *nsizes; + nsizes = (unsigned *)xrealloc(pScreen->WindowPrivateSizes, + (index2 + 1) * sizeof(unsigned)); + if (!nsizes) + return FALSE; + while (pScreen->WindowPrivateLen <= index2) + { + nsizes[pScreen->WindowPrivateLen++] = 0; + pScreen->totalWindowSize += sizeof(DevUnion); + } + pScreen->WindowPrivateSizes = nsizes; + } + oldamount = pScreen->WindowPrivateSizes[index2]; + if (amount > oldamount) + { + pScreen->WindowPrivateSizes[index2] = amount; + pScreen->totalWindowSize += (amount - oldamount); + } + return TRUE; +} + + +/* + * gc private machinery + */ + +static int gcPrivateCount; + +void +ResetGCPrivates(void) +{ + gcPrivateCount = 0; +} + +_X_EXPORT int +AllocateGCPrivateIndex(void) +{ + return gcPrivateCount++; +} + +_X_EXPORT Bool +AllocateGCPrivate(ScreenPtr pScreen, int index2, unsigned amount) +{ + unsigned oldamount; + + /* Round up sizes for proper alignment */ + amount = ((amount + (sizeof(long) - 1)) / sizeof(long)) * sizeof(long); + + if (index2 >= pScreen->GCPrivateLen) + { + unsigned *nsizes; + nsizes = (unsigned *)xrealloc(pScreen->GCPrivateSizes, + (index2 + 1) * sizeof(unsigned)); + if (!nsizes) + return FALSE; + while (pScreen->GCPrivateLen <= index2) + { + nsizes[pScreen->GCPrivateLen++] = 0; + pScreen->totalGCSize += sizeof(DevUnion); + } + pScreen->GCPrivateSizes = nsizes; + } + oldamount = pScreen->GCPrivateSizes[index2]; + if (amount > oldamount) + { + pScreen->GCPrivateSizes[index2] = amount; + pScreen->totalGCSize += (amount - oldamount); + } + return TRUE; +} + + +/* + * pixmap private machinery + */ +static int pixmapPrivateCount; + +void +ResetPixmapPrivates(void) +{ + pixmapPrivateCount = 0; +} + +_X_EXPORT int +AllocatePixmapPrivateIndex(void) +{ + return pixmapPrivateCount++; +} + +_X_EXPORT Bool +AllocatePixmapPrivate(ScreenPtr pScreen, int index2, unsigned amount) +{ + unsigned oldamount; + + /* Round up sizes for proper alignment */ + amount = ((amount + (sizeof(long) - 1)) / sizeof(long)) * sizeof(long); + + if (index2 >= pScreen->PixmapPrivateLen) + { + unsigned *nsizes; + nsizes = (unsigned *)xrealloc(pScreen->PixmapPrivateSizes, + (index2 + 1) * sizeof(unsigned)); + if (!nsizes) + return FALSE; + while (pScreen->PixmapPrivateLen <= index2) + { + nsizes[pScreen->PixmapPrivateLen++] = 0; + pScreen->totalPixmapSize += sizeof(DevUnion); + } + pScreen->PixmapPrivateSizes = nsizes; + } + oldamount = pScreen->PixmapPrivateSizes[index2]; + if (amount > oldamount) + { + pScreen->PixmapPrivateSizes[index2] = amount; + pScreen->totalPixmapSize += (amount - oldamount); + } + pScreen->totalPixmapSize = BitmapBytePad(pScreen->totalPixmapSize * 8); + return TRUE; +} + + +/* + * colormap private machinery + */ + +int colormapPrivateCount; + +void +ResetColormapPrivates(void) +{ + colormapPrivateCount = 0; +} + + +_X_EXPORT int +AllocateColormapPrivateIndex (InitCmapPrivFunc initPrivFunc) +{ + int index; + int i; + ColormapPtr pColormap; + DevUnion *privs; + + index = colormapPrivateCount++; + + for (i = 0; i < screenInfo.numScreens; i++) + { + /* + * AllocateColormapPrivateIndex may be called after the + * default colormap has been created on each screen! + * + * We must resize the devPrivates array for the default + * colormap on each screen, making room for this new private. + * We also call the initialization function 'initPrivFunc' on + * the new private allocated for each default colormap. + */ + + ScreenPtr pScreen = screenInfo.screens[i]; + + pColormap = (ColormapPtr) LookupIDByType ( + pScreen->defColormap, RT_COLORMAP); + + if (pColormap) + { + privs = (DevUnion *) xrealloc (pColormap->devPrivates, + colormapPrivateCount * sizeof(DevUnion)); + if (!privs) { + colormapPrivateCount--; + return -1; + } + bzero(&privs[index], sizeof(DevUnion)); + pColormap->devPrivates = privs; + if (!(*initPrivFunc)(pColormap,index)) + { + colormapPrivateCount--; + return -1; + } + } + } + + return index; +} + +/* + * device private machinery + */ + +static int devicePrivateIndex = 0; + +_X_EXPORT int +AllocateDevicePrivateIndex(void) +{ + return devicePrivateIndex++; +} + +_X_EXPORT Bool +AllocateDevicePrivate(DeviceIntPtr device, int index) +{ + if (device->nPrivates < ++index) { + DevUnion *nprivs = (DevUnion *) xrealloc(device->devPrivates, + index * sizeof(DevUnion)); + if (!nprivs) + return FALSE; + device->devPrivates = nprivs; + bzero(&nprivs[device->nPrivates], sizeof(DevUnion) + * (index - device->nPrivates)); + device->nPrivates = index; + return TRUE; + } else { + return TRUE; + } +} + +void +ResetDevicePrivateIndex(void) +{ + devicePrivateIndex = 0; +} diff --git a/xorg-server-1.4/dix/property.c b/xorg-server-1.4/dix/property.c new file mode 100644 index 0000000..e281dd7 --- /dev/null +++ b/xorg-server-1.4/dix/property.c @@ -0,0 +1,635 @@ +/*********************************************************** + +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 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. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#define NEED_REPLIES +#define NEED_EVENTS +#include +#include "windowstr.h" +#include "propertyst.h" +#include "dixstruct.h" +#include "dispatch.h" +#include "swaprep.h" +#include "xace.h" + +/***************************************************************** + * Property Stuff + * + * ChangeProperty, DeleteProperty, GetProperties, + * ListProperties + * + * Properties below to windows. A allocate slots each time + * a property is added. No fancy searching done. + * + *****************************************************************/ + +#ifdef notdef +static void +PrintPropertys(WindowPtr pWin) +{ + PropertyPtr pProp; + int j; + + pProp = pWin->userProps; + while (pProp) + { + ErrorF( "%x %x\n", pProp->propertyName, pProp->type); + ErrorF("property format: %d\n", pProp->format); + ErrorF("property data: \n"); + for (j=0; j<(pProp->format/8)*pProp->size; j++) + ErrorF("%c\n", pProp->data[j]); + pProp = pProp->next; + } +} +#endif + +static void +deliverPropertyNotifyEvent(WindowPtr pWin, int state, Atom atom) +{ + xEvent event; + + event.u.u.type = PropertyNotify; + event.u.property.window = pWin->drawable.id; + event.u.property.state = state; + event.u.property.atom = atom; + event.u.property.time = currentTime.milliseconds; + DeliverEvents(pWin, &event, 1, (WindowPtr)NULL); +} + +int +ProcRotateProperties(ClientPtr client) +{ + int i, j, delta, rc; + REQUEST(xRotatePropertiesReq); + WindowPtr pWin; + Atom * atoms; + PropertyPtr * props; /* array of pointer */ + PropertyPtr pProp; + + REQUEST_FIXED_SIZE(xRotatePropertiesReq, stuff->nAtoms << 2); + UpdateCurrentTime(); + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) + return rc; + if (!stuff->nAtoms) + return(Success); + atoms = (Atom *) & stuff[1]; + props = (PropertyPtr *)ALLOCATE_LOCAL(stuff->nAtoms * sizeof(PropertyPtr)); + if (!props) + return(BadAlloc); + for (i = 0; i < stuff->nAtoms; i++) + { + char action = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, atoms[i], + DixReadAccess|DixWriteAccess); + + if (!ValidAtom(atoms[i]) || (XaceErrorOperation == action)) { + DEALLOCATE_LOCAL(props); + client->errorValue = atoms[i]; + return BadAtom; + } + if (XaceIgnoreOperation == action) { + DEALLOCATE_LOCAL(props); + return Success; + } + + for (j = i + 1; j < stuff->nAtoms; j++) + if (atoms[j] == atoms[i]) + { + DEALLOCATE_LOCAL(props); + return BadMatch; + } + pProp = wUserProps (pWin); + while (pProp) + { + if (pProp->propertyName == atoms[i]) + goto found; + pProp = pProp->next; + } + DEALLOCATE_LOCAL(props); + return BadMatch; +found: + props[i] = pProp; + } + delta = stuff->nPositions; + + /* If the rotation is a complete 360 degrees, then moving the properties + around and generating PropertyNotify events should be skipped. */ + + if ( (stuff->nAtoms != 0) && (abs(delta) % stuff->nAtoms) != 0 ) + { + while (delta < 0) /* faster if abs value is small */ + delta += stuff->nAtoms; + for (i = 0; i < stuff->nAtoms; i++) + { + deliverPropertyNotifyEvent(pWin, PropertyNewValue, + props[i]->propertyName); + + props[i]->propertyName = atoms[(i + delta) % stuff->nAtoms]; + } + } + DEALLOCATE_LOCAL(props); + return Success; +} + +int +ProcChangeProperty(ClientPtr client) +{ + WindowPtr pWin; + char format, mode; + unsigned long len; + int sizeInBytes, totalSize, err; + REQUEST(xChangePropertyReq); + + REQUEST_AT_LEAST_SIZE(xChangePropertyReq); + UpdateCurrentTime(); + format = stuff->format; + mode = stuff->mode; + if ((mode != PropModeReplace) && (mode != PropModeAppend) && + (mode != PropModePrepend)) + { + client->errorValue = mode; + return BadValue; + } + if ((format != 8) && (format != 16) && (format != 32)) + { + client->errorValue = format; + return BadValue; + } + len = stuff->nUnits; + if (len > ((0xffffffff - sizeof(xChangePropertyReq)) >> 2)) + return BadLength; + sizeInBytes = format>>3; + totalSize = len * sizeInBytes; + REQUEST_FIXED_SIZE(xChangePropertyReq, totalSize); + + err = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (err != Success) + return err; + if (!ValidAtom(stuff->property)) + { + client->errorValue = stuff->property; + return(BadAtom); + } + if (!ValidAtom(stuff->type)) + { + client->errorValue = stuff->type; + return(BadAtom); + } + + switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, + DixWriteAccess)) + { + case XaceErrorOperation: + client->errorValue = stuff->property; + return BadAtom; + case XaceIgnoreOperation: + return Success; + } + + err = ChangeWindowProperty(pWin, stuff->property, stuff->type, (int)format, + (int)mode, len, (pointer)&stuff[1], TRUE); + if (err != Success) + return err; + else + return client->noClientException; +} + +_X_EXPORT int +ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, + int mode, unsigned long len, pointer value, + Bool sendevent) +{ + PropertyPtr pProp; + int sizeInBytes; + int totalSize; + pointer data; + + sizeInBytes = format>>3; + totalSize = len * sizeInBytes; + + /* first see if property already exists */ + + pProp = wUserProps (pWin); + while (pProp) + { + if (pProp->propertyName == property) + break; + pProp = pProp->next; + } + if (!pProp) /* just add to list */ + { + if (!pWin->optional && !MakeWindowOptional (pWin)) + return(BadAlloc); + pProp = (PropertyPtr)xalloc(sizeof(PropertyRec)); + if (!pProp) + return(BadAlloc); + data = (pointer)xalloc(totalSize); + if (!data && len) + { + xfree(pProp); + return(BadAlloc); + } + pProp->propertyName = property; + pProp->type = type; + pProp->format = format; + pProp->data = data; + if (len) + memmove((char *)data, (char *)value, totalSize); + pProp->size = len; + pProp->next = pWin->optional->userProps; + pWin->optional->userProps = pProp; + } + else + { + /* To append or prepend to a property the request format and type + must match those of the already defined property. The + existing format and type are irrelevant when using the mode + "PropModeReplace" since they will be written over. */ + + if ((format != pProp->format) && (mode != PropModeReplace)) + return(BadMatch); + if ((pProp->type != type) && (mode != PropModeReplace)) + return(BadMatch); + if (mode == PropModeReplace) + { + if (totalSize != pProp->size * (pProp->format >> 3)) + { + data = (pointer)xrealloc(pProp->data, totalSize); + if (!data && len) + return(BadAlloc); + pProp->data = data; + } + if (len) + memmove((char *)pProp->data, (char *)value, totalSize); + pProp->size = len; + pProp->type = type; + pProp->format = format; + } + else if (len == 0) + { + /* do nothing */ + } + else if (mode == PropModeAppend) + { + data = (pointer)xrealloc(pProp->data, + sizeInBytes * (len + pProp->size)); + if (!data) + return(BadAlloc); + pProp->data = data; + memmove(&((char *)data)[pProp->size * sizeInBytes], + (char *)value, + totalSize); + pProp->size += len; + } + else if (mode == PropModePrepend) + { + data = (pointer)xalloc(sizeInBytes * (len + pProp->size)); + if (!data) + return(BadAlloc); + memmove(&((char *)data)[totalSize], (char *)pProp->data, + (int)(pProp->size * sizeInBytes)); + memmove((char *)data, (char *)value, totalSize); + xfree(pProp->data); + pProp->data = data; + pProp->size += len; + } + } + + if (sendevent) + deliverPropertyNotifyEvent(pWin, PropertyNewValue, pProp->propertyName); + + return(Success); +} + +int +DeleteProperty(WindowPtr pWin, Atom propName) +{ + PropertyPtr pProp, prevProp; + + if (!(pProp = wUserProps (pWin))) + return(Success); + prevProp = (PropertyPtr)NULL; + while (pProp) + { + if (pProp->propertyName == propName) + break; + prevProp = pProp; + pProp = pProp->next; + } + if (pProp) + { + if (prevProp == (PropertyPtr)NULL) /* takes care of head */ + { + if (!(pWin->optional->userProps = pProp->next)) + CheckWindowOptionalNeed (pWin); + } + else + { + prevProp->next = pProp->next; + } + deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp->propertyName); + xfree(pProp->data); + xfree(pProp); + } + return(Success); +} + +void +DeleteAllWindowProperties(WindowPtr pWin) +{ + PropertyPtr pProp, pNextProp; + + pProp = wUserProps (pWin); + while (pProp) + { + deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp->propertyName); + pNextProp = pProp->next; + xfree(pProp->data); + xfree(pProp); + pProp = pNextProp; + } +} + +static int +NullPropertyReply( + ClientPtr client, + ATOM propertyType, + int format, + xGetPropertyReply *reply) +{ + reply->nItems = 0; + reply->length = 0; + reply->bytesAfter = 0; + reply->propertyType = propertyType; + reply->format = format; + WriteReplyToClient(client, sizeof(xGenericReply), reply); + return(client->noClientException); +} + +/***************** + * GetProperty + * If type Any is specified, returns the property from the specified + * window regardless of its type. If a type is specified, returns the + * property only if its type equals the specified type. + * If delete is True and a property is returned, the property is also + * deleted from the window and a PropertyNotify event is generated on the + * window. + *****************/ + +int +ProcGetProperty(ClientPtr client) +{ + PropertyPtr pProp, prevProp; + unsigned long n, len, ind, rc; + WindowPtr pWin; + xGetPropertyReply reply; + Mask access_mode = DixReadAccess; + REQUEST(xGetPropertyReq); + + REQUEST_SIZE_MATCH(xGetPropertyReq); + if (stuff->delete) + UpdateCurrentTime(); + rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + if (rc != Success) + return rc; + + if (!ValidAtom(stuff->property)) + { + client->errorValue = stuff->property; + return(BadAtom); + } + if ((stuff->delete != xTrue) && (stuff->delete != xFalse)) + { + client->errorValue = stuff->delete; + return(BadValue); + } + if ((stuff->type != AnyPropertyType) && !ValidAtom(stuff->type)) + { + client->errorValue = stuff->type; + return(BadAtom); + } + + pProp = wUserProps (pWin); + prevProp = (PropertyPtr)NULL; + while (pProp) + { + if (pProp->propertyName == stuff->property) + break; + prevProp = pProp; + pProp = pProp->next; + } + + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + if (!pProp) + return NullPropertyReply(client, None, 0, &reply); + + if (stuff->delete) + access_mode |= DixDestroyAccess; + switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, + access_mode)) + { + case XaceErrorOperation: + client->errorValue = stuff->property; + return BadAtom;; + case XaceIgnoreOperation: + return NullPropertyReply(client, pProp->type, pProp->format, &reply); + } + + /* If the request type and actual type don't match. Return the + property information, but not the data. */ + + if (((stuff->type != pProp->type) && + (stuff->type != AnyPropertyType)) + ) + { + reply.bytesAfter = pProp->size; + reply.format = pProp->format; + reply.length = 0; + reply.nItems = 0; + reply.propertyType = pProp->type; + WriteReplyToClient(client, sizeof(xGenericReply), &reply); + return(Success); + } + +/* + * Return type, format, value to client + */ + n = (pProp->format/8) * pProp->size; /* size (bytes) of prop */ + ind = stuff->longOffset << 2; + + /* If longOffset is invalid such that it causes "len" to + be negative, it's a value error. */ + + if (n < ind) + { + client->errorValue = stuff->longOffset; + return BadValue; + } + + len = min(n - ind, 4 * stuff->longLength); + + reply.bytesAfter = n - (ind + len); + reply.format = pProp->format; + reply.length = (len + 3) >> 2; + reply.nItems = len / (pProp->format / 8 ); + reply.propertyType = pProp->type; + + if (stuff->delete && (reply.bytesAfter == 0)) + deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp->propertyName); + + WriteReplyToClient(client, sizeof(xGenericReply), &reply); + if (len) + { + switch (reply.format) { + case 32: client->pSwapReplyFunc = (ReplySwapPtr)CopySwap32Write; break; + case 16: client->pSwapReplyFunc = (ReplySwapPtr)CopySwap16Write; break; + default: client->pSwapReplyFunc = (ReplySwapPtr)WriteToClient; break; + } + WriteSwappedDataToClient(client, len, + (char *)pProp->data + ind); + } + + if (stuff->delete && (reply.bytesAfter == 0)) + { /* delete the Property */ + if (prevProp == (PropertyPtr)NULL) /* takes care of head */ + { + if (!(pWin->optional->userProps = pProp->next)) + CheckWindowOptionalNeed (pWin); + } + else + prevProp->next = pProp->next; + xfree(pProp->data); + xfree(pProp); + } + return(client->noClientException); +} + +int +ProcListProperties(ClientPtr client) +{ + Atom *pAtoms = NULL, *temppAtoms; + xListPropertiesReply xlpr; + int rc, numProps = 0; + WindowPtr pWin; + PropertyPtr pProp; + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; + + pProp = wUserProps (pWin); + while (pProp) + { + pProp = pProp->next; + numProps++; + } + if (numProps) + if(!(pAtoms = (Atom *)ALLOCATE_LOCAL(numProps * sizeof(Atom)))) + return(BadAlloc); + + xlpr.type = X_Reply; + xlpr.nProperties = numProps; + xlpr.length = (numProps * sizeof(Atom)) >> 2; + xlpr.sequenceNumber = client->sequence; + pProp = wUserProps (pWin); + temppAtoms = pAtoms; + while (pProp) + { + *temppAtoms++ = pProp->propertyName; + pProp = pProp->next; + } + WriteReplyToClient(client, sizeof(xGenericReply), &xlpr); + if (numProps) + { + client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write; + WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms); + DEALLOCATE_LOCAL(pAtoms); + } + return(client->noClientException); +} + +int +ProcDeleteProperty(ClientPtr client) +{ + WindowPtr pWin; + REQUEST(xDeletePropertyReq); + int result; + + REQUEST_SIZE_MATCH(xDeletePropertyReq); + UpdateCurrentTime(); + result = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (result != Success) + return result; + if (!ValidAtom(stuff->property)) + { + client->errorValue = stuff->property; + return (BadAtom); + } + + switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, + DixDestroyAccess)) + { + case XaceErrorOperation: + client->errorValue = stuff->property; + return BadAtom;; + case XaceIgnoreOperation: + return Success; + } + + result = DeleteProperty(pWin, stuff->property); + if (client->noClientException != Success) + return(client->noClientException); + else + return(result); +} diff --git a/xorg-server-1.4/dix/resource.c b/xorg-server-1.4/dix/resource.c new file mode 100644 index 0000000..e83c529 --- /dev/null +++ b/xorg-server-1.4/dix/resource.c @@ -0,0 +1,953 @@ +/************************************************************ + +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 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. + +********************************************************/ +/* The panoramix components contained the following notice */ +/***************************************************************** + +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. + +******************************************************************/ +/* XSERVER_DTRACE additions: + * Copyright 2005-2006 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. + */ + +/* Routines to manage various kinds of resources: + * + * CreateNewResourceType, CreateNewResourceClass, InitClientResources, + * FakeClientID, AddResource, FreeResource, FreeClientResources, + * FreeAllResources, LookupIDByType, LookupIDByClass, GetXIDRange + */ + +/* + * A resource ID is a 32 bit quantity, the upper 2 bits of which are + * off-limits for client-visible resources. The next 8 bits are + * used as client ID, and the low 22 bits come from the client. + * A resource ID is "hashed" by extracting and xoring subfields + * (varying with the size of the hash table). + * + * It is sometimes necessary for the server to create an ID that looks + * like it belongs to a client. This ID, however, must not be one + * the client actually can create, or we have the potential for conflict. + * The 31st bit of the ID is reserved for the server's use for this + * purpose. By setting CLIENT_ID(id) to the client, the SERVER_BIT to + * 1, and an otherwise arbitrary ID in the low 22 bits, we can create a + * resource "owned" by the client. + */ + +#define NEED_EVENTS +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "misc.h" +#include "os.h" +#include "resource.h" +#include "dixstruct.h" +#include "opaque.h" +#include "windowstr.h" +#include "dixfont.h" +#include "colormap.h" +#include "inputstr.h" +#include "dixevents.h" +#include "dixgrabs.h" +#include "cursor.h" +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif +#include "xace.h" +#include + +#ifdef XSERVER_DTRACE +#include +typedef const char *string; +#include "Xserver-dtrace.h" + +#define TypeNameString(t) NameForAtom(ResourceNames[t & TypeMask]) +#endif + +static void RebuildTable( + int /*client*/ +); + +#define SERVER_MINID 32 + +#define INITBUCKETS 64 +#define INITHASHSIZE 6 +#define MAXHASHSIZE 11 + +typedef struct _Resource { + struct _Resource *next; + XID id; + RESTYPE type; + pointer value; +} ResourceRec, *ResourcePtr; +#define NullResource ((ResourcePtr)NULL) + +typedef struct _ClientResource { + ResourcePtr *resources; + int elements; + int buckets; + int hashsize; /* log(2)(buckets) */ + XID fakeID; + XID endFakeID; + XID expectID; +} ClientResourceRec; + +_X_EXPORT RESTYPE lastResourceType; +static RESTYPE lastResourceClass; +_X_EXPORT RESTYPE TypeMask; + +static DeleteType *DeleteFuncs = (DeleteType *)NULL; + +#ifdef XResExtension + +_X_EXPORT Atom * ResourceNames = NULL; + +_X_EXPORT void RegisterResourceName (RESTYPE type, char *name) +{ + ResourceNames[type & TypeMask] = MakeAtom(name, strlen(name), TRUE); +} + +#endif + +_X_EXPORT RESTYPE +CreateNewResourceType(DeleteType deleteFunc) +{ + RESTYPE next = lastResourceType + 1; + DeleteType *funcs; + + if (next & lastResourceClass) + return 0; + funcs = (DeleteType *)xrealloc(DeleteFuncs, + (next + 1) * sizeof(DeleteType)); + if (!funcs) + return 0; + +#ifdef XResExtension + { + Atom *newnames; + newnames = xrealloc(ResourceNames, (next + 1) * sizeof(Atom)); + if(!newnames) + return 0; + ResourceNames = newnames; + ResourceNames[next] = 0; + } +#endif + + lastResourceType = next; + DeleteFuncs = funcs; + DeleteFuncs[next] = deleteFunc; + return next; +} + +_X_EXPORT RESTYPE +CreateNewResourceClass(void) +{ + RESTYPE next = lastResourceClass >> 1; + + if (next & lastResourceType) + return 0; + lastResourceClass = next; + TypeMask = next - 1; + return next; +} + +static ClientResourceRec clientTable[MAXCLIENTS]; + +/***************** + * InitClientResources + * When a new client is created, call this to allocate space + * in resource table + *****************/ + +Bool +InitClientResources(ClientPtr client) +{ + int i, j; + + if (client == serverClient) + { + lastResourceType = RT_LASTPREDEF; + lastResourceClass = RC_LASTPREDEF; + TypeMask = RC_LASTPREDEF - 1; + if (DeleteFuncs) + xfree(DeleteFuncs); + DeleteFuncs = (DeleteType *)xalloc((lastResourceType + 1) * + sizeof(DeleteType)); + if (!DeleteFuncs) + return FALSE; + DeleteFuncs[RT_NONE & TypeMask] = (DeleteType)NoopDDA; + DeleteFuncs[RT_WINDOW & TypeMask] = DeleteWindow; + DeleteFuncs[RT_PIXMAP & TypeMask] = dixDestroyPixmap; + DeleteFuncs[RT_GC & TypeMask] = FreeGC; + DeleteFuncs[RT_FONT & TypeMask] = CloseFont; + DeleteFuncs[RT_CURSOR & TypeMask] = FreeCursor; + DeleteFuncs[RT_COLORMAP & TypeMask] = FreeColormap; + DeleteFuncs[RT_CMAPENTRY & TypeMask] = FreeClientPixels; + DeleteFuncs[RT_OTHERCLIENT & TypeMask] = OtherClientGone; + DeleteFuncs[RT_PASSIVEGRAB & TypeMask] = DeletePassiveGrab; + +#ifdef XResExtension + if(ResourceNames) + xfree(ResourceNames); + ResourceNames = xalloc((lastResourceType + 1) * sizeof(Atom)); + if(!ResourceNames) + return FALSE; +#endif + } + clientTable[i = client->index].resources = + (ResourcePtr *)xalloc(INITBUCKETS*sizeof(ResourcePtr)); + if (!clientTable[i].resources) + return FALSE; + clientTable[i].buckets = INITBUCKETS; + clientTable[i].elements = 0; + clientTable[i].hashsize = INITHASHSIZE; + /* Many IDs allocated from the server client are visible to clients, + * so we don't use the SERVER_BIT for them, but we have to start + * past the magic value constants used in the protocol. For normal + * clients, we can start from zero, with SERVER_BIT set. + */ + clientTable[i].fakeID = client->clientAsMask | + (client->index ? SERVER_BIT : SERVER_MINID); + clientTable[i].endFakeID = (clientTable[i].fakeID | RESOURCE_ID_MASK) + 1; + clientTable[i].expectID = client->clientAsMask; + for (j=0; j>6) ^ (id>>12)))); + case 7: + return ((int)(0x07F & (id ^ (id>>7) ^ (id>>13)))); + case 8: + return ((int)(0x0FF & (id ^ (id>>8) ^ (id>>16)))); + case 9: + return ((int)(0x1FF & (id ^ (id>>9)))); + case 10: + return ((int)(0x3FF & (id ^ (id>>10)))); + case 11: + return ((int)(0x7FF & (id ^ (id>>11)))); + } + return -1; +} + +static XID +AvailableID( + int client, + XID id, + XID maxid, + XID goodid) +{ + ResourcePtr res; + + if ((goodid >= id) && (goodid <= maxid)) + return goodid; + for (; id <= maxid; id++) + { + res = clientTable[client].resources[Hash(client, id)]; + while (res && (res->id != id)) + res = res->next; + if (!res) + return id; + } + return 0; +} + +_X_EXPORT void +GetXIDRange(int client, Bool server, XID *minp, XID *maxp) +{ + XID id, maxid; + ResourcePtr *resp; + ResourcePtr res; + int i; + XID goodid; + + id = (Mask)client << CLIENTOFFSET; + if (server) + id |= client ? SERVER_BIT : SERVER_MINID; + maxid = id | RESOURCE_ID_MASK; + goodid = 0; + for (resp = clientTable[client].resources, i = clientTable[client].buckets; + --i >= 0;) + { + for (res = *resp++; res; res = res->next) + { + if ((res->id < id) || (res->id > maxid)) + continue; + if (((res->id - id) >= (maxid - res->id)) ? + (goodid = AvailableID(client, id, res->id - 1, goodid)) : + !(goodid = AvailableID(client, res->id + 1, maxid, goodid))) + maxid = res->id - 1; + else + id = res->id + 1; + } + } + if (id > maxid) + id = maxid = 0; + *minp = id; + *maxp = maxid; +} + +/** + * GetXIDList is called by the XC-MISC extension's MiscGetXIDList function. + * This function tries to find count unused XIDs for the given client. It + * puts the IDs in the array pids and returns the number found, which should + * almost always be the number requested. + * + * The circumstances that lead to a call to this function are very rare. + * Xlib must run out of IDs while trying to generate a request that wants + * multiple ID's, like the Multi-buffering CreateImageBuffers request. + * + * No rocket science in the implementation; just iterate over all + * possible IDs for the given client and pick the first count IDs + * that aren't in use. A more efficient algorithm could probably be + * invented, but this will be used so rarely that this should suffice. + */ + +_X_EXPORT unsigned int +GetXIDList(ClientPtr pClient, unsigned count, XID *pids) +{ + unsigned int found = 0; + XID id = pClient->clientAsMask; + XID maxid; + + maxid = id | RESOURCE_ID_MASK; + while ( (found < count) && (id <= maxid) ) + { + if (!LookupIDByClass(id, RC_ANY)) + { + pids[found++] = id; + } + id++; + } + return found; +} + +/* + * Return the next usable fake client ID. + * + * Normally this is just the next one in line, but if we've used the last + * in the range, we need to find a new range of safe IDs to avoid + * over-running another client. + */ + +_X_EXPORT XID +FakeClientID(int client) +{ + XID id, maxid; + + id = clientTable[client].fakeID++; + if (id != clientTable[client].endFakeID) + return id; + GetXIDRange(client, TRUE, &id, &maxid); + if (!id) { + if (!client) + FatalError("FakeClientID: server internal ids exhausted\n"); + MarkClientException(clients[client]); + id = ((Mask)client << CLIENTOFFSET) | (SERVER_BIT * 3); + maxid = id | RESOURCE_ID_MASK; + } + clientTable[client].fakeID = id + 1; + clientTable[client].endFakeID = maxid + 1; + return id; +} + +_X_EXPORT Bool +AddResource(XID id, RESTYPE type, pointer value) +{ + int client; + ClientResourceRec *rrec; + ResourcePtr res, *head; + +#ifdef XSERVER_DTRACE + XSERVER_RESOURCE_ALLOC(id, type, value, TypeNameString(type)); +#endif + client = CLIENT_ID(id); + rrec = &clientTable[client]; + if (!rrec->buckets) + { + ErrorF("AddResource(%lx, %lx, %lx), client=%d \n", + (unsigned long)id, type, (unsigned long)value, client); + FatalError("client not in use\n"); + } + if ((rrec->elements >= 4*rrec->buckets) && + (rrec->hashsize < MAXHASHSIZE)) + RebuildTable(client); + head = &rrec->resources[Hash(client, id)]; + res = (ResourcePtr)xalloc(sizeof(ResourceRec)); + if (!res) + { + (*DeleteFuncs[type & TypeMask])(value, id); + return FALSE; + } + res->next = *head; + res->id = id; + res->type = type; + res->value = value; + *head = res; + rrec->elements++; + if (!(id & SERVER_BIT) && (id >= rrec->expectID)) + rrec->expectID = id + 1; + return TRUE; +} + +static void +RebuildTable(int client) +{ + int j; + ResourcePtr res, next; + ResourcePtr **tails, *resources; + ResourcePtr **tptr, *rptr; + + /* + * For now, preserve insertion order, since some ddx layers depend + * on resources being free in the opposite order they are added. + */ + + j = 2 * clientTable[client].buckets; + tails = (ResourcePtr **)ALLOCATE_LOCAL(j * sizeof(ResourcePtr *)); + if (!tails) + return; + resources = (ResourcePtr *)xalloc(j * sizeof(ResourcePtr)); + if (!resources) + { + DEALLOCATE_LOCAL(tails); + return; + } + for (rptr = resources, tptr = tails; --j >= 0; rptr++, tptr++) + { + *rptr = NullResource; + *tptr = rptr; + } + clientTable[client].hashsize++; + for (j = clientTable[client].buckets, + rptr = clientTable[client].resources; + --j >= 0; + rptr++) + { + for (res = *rptr; res; res = next) + { + next = res->next; + res->next = NullResource; + tptr = &tails[Hash(client, res->id)]; + **tptr = res; + *tptr = &res->next; + } + } + DEALLOCATE_LOCAL(tails); + clientTable[client].buckets *= 2; + xfree(clientTable[client].resources); + clientTable[client].resources = resources; +} + +_X_EXPORT void +FreeResource(XID id, RESTYPE skipDeleteFuncType) +{ + int cid; + ResourcePtr res; + ResourcePtr *prev, *head; + int *eltptr; + int elements; + Bool gotOne = FALSE; + + if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets) + { + head = &clientTable[cid].resources[Hash(cid, id)]; + eltptr = &clientTable[cid].elements; + + prev = head; + while ( (res = *prev) ) + { + if (res->id == id) + { + RESTYPE rtype = res->type; + +#ifdef XSERVER_DTRACE + XSERVER_RESOURCE_FREE(res->id, res->type, + res->value, TypeNameString(res->type)); +#endif + *prev = res->next; + elements = --*eltptr; + if (rtype & RC_CACHED) + FlushClientCaches(res->id); + if (rtype != skipDeleteFuncType) + (*DeleteFuncs[rtype & TypeMask])(res->value, res->id); + xfree(res); + if (*eltptr != elements) + prev = head; /* prev may no longer be valid */ + gotOne = TRUE; + } + else + prev = &res->next; + } + if(clients[cid] && (id == clients[cid]->lastDrawableID)) + { + clients[cid]->lastDrawable = (DrawablePtr)WindowTable[0]; + clients[cid]->lastDrawableID = WindowTable[0]->drawable.id; + } + } + if (!gotOne) + ErrorF("Freeing resource id=%lX which isn't there.\n", + (unsigned long)id); +} + + +_X_EXPORT void +FreeResourceByType(XID id, RESTYPE type, Bool skipFree) +{ + int cid; + ResourcePtr res; + ResourcePtr *prev, *head; + if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets) + { + head = &clientTable[cid].resources[Hash(cid, id)]; + + prev = head; + while ( (res = *prev) ) + { + if (res->id == id && res->type == type) + { +#ifdef XSERVER_DTRACE + XSERVER_RESOURCE_FREE(res->id, res->type, + res->value, TypeNameString(res->type)); +#endif + *prev = res->next; + if (type & RC_CACHED) + FlushClientCaches(res->id); + if (!skipFree) + (*DeleteFuncs[type & TypeMask])(res->value, res->id); + xfree(res); + break; + } + else + prev = &res->next; + } + if(clients[cid] && (id == clients[cid]->lastDrawableID)) + { + clients[cid]->lastDrawable = (DrawablePtr)WindowTable[0]; + clients[cid]->lastDrawableID = WindowTable[0]->drawable.id; + } + } +} + +/* + * Change the value associated with a resource id. Caller + * is responsible for "doing the right thing" with the old + * data + */ + +_X_EXPORT Bool +ChangeResourceValue (XID id, RESTYPE rtype, pointer value) +{ + int cid; + ResourcePtr res; + + if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets) + { + res = clientTable[cid].resources[Hash(cid, id)]; + + for (; res; res = res->next) + if ((res->id == id) && (res->type == rtype)) + { + if (rtype & RC_CACHED) + FlushClientCaches(res->id); + res->value = value; + return TRUE; + } + } + return FALSE; +} + +/* Note: if func adds or deletes resources, then func can get called + * more than once for some resources. If func adds new resources, + * func might or might not get called for them. func cannot both + * add and delete an equal number of resources! + */ + +_X_EXPORT void +FindClientResourcesByType( + ClientPtr client, + RESTYPE type, + FindResType func, + pointer cdata +){ + ResourcePtr *resources; + ResourcePtr this, next; + int i, elements; + int *eltptr; + + if (!client) + client = serverClient; + + resources = clientTable[client->index].resources; + eltptr = &clientTable[client->index].elements; + for (i = 0; i < clientTable[client->index].buckets; i++) + { + for (this = resources[i]; this; this = next) + { + next = this->next; + if (!type || this->type == type) { + elements = *eltptr; + (*func)(this->value, this->id, cdata); + if (*eltptr != elements) + next = resources[i]; /* start over */ + } + } + } +} + +_X_EXPORT void +FindAllClientResources( + ClientPtr client, + FindAllRes func, + pointer cdata +){ + ResourcePtr *resources; + ResourcePtr this, next; + int i, elements; + int *eltptr; + + if (!client) + client = serverClient; + + resources = clientTable[client->index].resources; + eltptr = &clientTable[client->index].elements; + for (i = 0; i < clientTable[client->index].buckets; i++) + { + for (this = resources[i]; this; this = next) + { + next = this->next; + elements = *eltptr; + (*func)(this->value, this->id, this->type, cdata); + if (*eltptr != elements) + next = resources[i]; /* start over */ + } + } +} + + +pointer +LookupClientResourceComplex( + ClientPtr client, + RESTYPE type, + FindComplexResType func, + pointer cdata +){ + ResourcePtr *resources; + ResourcePtr this; + int i; + + if (!client) + client = serverClient; + + resources = clientTable[client->index].resources; + for (i = 0; i < clientTable[client->index].buckets; i++) { + for (this = resources[i]; this; this = this->next) { + if (!type || this->type == type) { + if((*func)(this->value, this->id, cdata)) + return this->value; + } + } + } + return NULL; +} + + +void +FreeClientNeverRetainResources(ClientPtr client) +{ + ResourcePtr *resources; + ResourcePtr this; + ResourcePtr *prev; + int j; + + if (!client) + return; + + resources = clientTable[client->index].resources; + for (j=0; j < clientTable[client->index].buckets; j++) + { + prev = &resources[j]; + while ( (this = *prev) ) + { + RESTYPE rtype = this->type; + if (rtype & RC_NEVERRETAIN) + { +#ifdef XSERVER_DTRACE + XSERVER_RESOURCE_FREE(this->id, this->type, + this->value, TypeNameString(this->type)); +#endif + *prev = this->next; + if (rtype & RC_CACHED) + FlushClientCaches(this->id); + (*DeleteFuncs[rtype & TypeMask])(this->value, this->id); + xfree(this); + } + else + prev = &this->next; + } + } +} + +void +FreeClientResources(ClientPtr client) +{ + ResourcePtr *resources; + ResourcePtr this; + int j; + + /* This routine shouldn't be called with a null client, but just in + case ... */ + + if (!client) + return; + + HandleSaveSet(client); + + resources = clientTable[client->index].resources; + for (j=0; j < clientTable[client->index].buckets; j++) + { + /* It may seem silly to update the head of this resource list as + we delete the members, since the entire list will be deleted any way, + but there are some resource deletion functions "FreeClientPixels" for + one which do a LookupID on another resource id (a Colormap id in this + case), so the resource list must be kept valid up to the point that + it is deleted, so every time we delete a resource, we must update the + head, just like in FreeResource. I hope that this doesn't slow down + mass deletion appreciably. PRH */ + + ResourcePtr *head; + + head = &resources[j]; + + for (this = *head; this; this = *head) + { + RESTYPE rtype = this->type; +#ifdef XSERVER_DTRACE + XSERVER_RESOURCE_FREE(this->id, this->type, + this->value, TypeNameString(this->type)); +#endif + *head = this->next; + if (rtype & RC_CACHED) + FlushClientCaches(this->id); + (*DeleteFuncs[rtype & TypeMask])(this->value, this->id); + xfree(this); + } + } + xfree(clientTable[client->index].resources); + clientTable[client->index].resources = NULL; + clientTable[client->index].buckets = 0; +} + +void +FreeAllResources(void) +{ + int i; + + for (i = currentMaxClients; --i >= 0; ) + { + if (clientTable[i].buckets) + FreeClientResources(clients[i]); + } +} + +_X_EXPORT Bool +LegalNewID(XID id, ClientPtr client) +{ + +#ifdef PANORAMIX + XID minid, maxid; + + if (!noPanoramiXExtension) { + minid = client->clientAsMask | (client->index ? + SERVER_BIT : SERVER_MINID); + maxid = (clientTable[client->index].fakeID | RESOURCE_ID_MASK) + 1; + if ((id >= minid) && (id <= maxid)) + return TRUE; + } +#endif /* PANORAMIX */ + return ((client->clientAsMask == (id & ~RESOURCE_ID_MASK)) && + ((clientTable[client->index].expectID <= id) || + !LookupIDByClass(id, RC_ANY))); +} + +/* SecurityLookupIDByType and SecurityLookupIDByClass: + * These are the heart of the resource ID security system. They take + * two additional arguments compared to the old LookupID functions: + * the client doing the lookup, and the access mode (see resource.h). + * The resource is returned if it exists and the client is allowed access, + * else NULL is returned. + */ + +_X_EXPORT pointer +SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask mode) +{ + int cid; + ResourcePtr res; + pointer retval = NULL; + + if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && + clientTable[cid].buckets) + { + res = clientTable[cid].resources[Hash(cid, id)]; + + for (; res; res = res->next) + if ((res->id == id) && (res->type == rtype)) + { + retval = res->value; + break; + } + } + if (retval && client && + !XaceHook(XACE_RESOURCE_ACCESS, client, id, rtype, mode, retval)) + retval = NULL; + + return retval; +} + + +_X_EXPORT pointer +SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask mode) +{ + int cid; + ResourcePtr res = NULL; + pointer retval = NULL; + + if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && + clientTable[cid].buckets) + { + res = clientTable[cid].resources[Hash(cid, id)]; + + for (; res; res = res->next) + if ((res->id == id) && (res->type & classes)) + { + retval = res->value; + break; + } + } + if (retval && client && + !XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type, mode, retval)) + retval = NULL; + + return retval; +} + +/* We can't replace the LookupIDByType and LookupIDByClass functions with + * macros because of compatibility with loadable servers. + */ + +_X_EXPORT pointer +LookupIDByType(XID id, RESTYPE rtype) +{ + return SecurityLookupIDByType(NullClient, id, rtype, + DixUnknownAccess); +} + +_X_EXPORT pointer +LookupIDByClass(XID id, RESTYPE classes) +{ + return SecurityLookupIDByClass(NullClient, id, classes, + DixUnknownAccess); +} diff --git a/xorg-server-1.4/dix/strcasecmp.c b/xorg-server-1.4/dix/strcasecmp.c new file mode 100644 index 0000000..58f0961 --- /dev/null +++ b/xorg-server-1.4/dix/strcasecmp.c @@ -0,0 +1,48 @@ +/************************************************************ + Copyright (c) 1995 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. + + ********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "dix.h" + +#ifdef NEED_STRCASECMP +int +xstrcasecmp(char *str1,char *str2) +{ + const u_char *us1 = (const u_char *)str1, *us2 = (const u_char *)str2; + + while (tolower(*us1) == tolower(*us2)) { + if (*us1++ == '\0') + return (0); + us2++; + } + + return (tolower(*us1) - tolower(*us2)); +} +#endif diff --git a/xorg-server-1.4/dix/swaprep.c b/xorg-server-1.4/dix/swaprep.c new file mode 100644 index 0000000..7d3251a --- /dev/null +++ b/xorg-server-1.4/dix/swaprep.c @@ -0,0 +1,1298 @@ +/************************************************************ + +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 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. + +********************************************************/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#define NEED_REPLIES +#define NEED_EVENTS +#include +#include "misc.h" +#include "dixstruct.h" +#include +#include "scrnintstr.h" +#include "swaprep.h" +#include "globals.h" + +static void SwapFontInfo(xQueryFontReply *pr); + +static void SwapCharInfo(xCharInfo *pInfo); + +static void SwapFont(xQueryFontReply *pr, Bool hasGlyphs); + +/** + * Thanks to Jack Palevich for testing and subsequently rewriting all this + * + * \param size size in bytes + */ +_X_EXPORT void +Swap32Write(ClientPtr pClient, int size, CARD32 *pbuf) +{ + int i; + char n; + + size >>= 2; + for(i = 0; i < size; i++) + /* brackets are mandatory here, because "swapl" macro expands + to several statements */ + { + swapl(&pbuf[i], n); + } + (void)WriteToClient(pClient, size << 2, (char *) pbuf); +} + +/** + * + * \param size size in bytes + */ +_X_EXPORT void +CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf) +{ + int bufsize = size; + CARD32 *pbufT; + CARD32 *from, *to, *fromLast, *toLast; + CARD32 tmpbuf[1]; + + /* Allocate as big a buffer as we can... */ + while (!(pbufT = (CARD32 *) ALLOCATE_LOCAL(bufsize))) + { + bufsize >>= 1; + if (bufsize == 4) + { + pbufT = tmpbuf; + break; + } + } + + /* convert lengths from # of bytes to # of longs */ + size >>= 2; + bufsize >>= 2; + + from = pbuf; + fromLast = from + size; + while (from < fromLast) { + int nbytes; + to = pbufT; + toLast = to + min (bufsize, fromLast - from); + nbytes = (toLast - to) << 2; + while (to < toLast) { + /* can't write "cpswapl(*from++, *to++)" because cpswapl is a macro + that evaulates its args more than once */ + cpswapl(*from, *to); + from++; + to++; + } + (void)WriteToClient (pClient, nbytes, (char *) pbufT); + } + + if (pbufT != tmpbuf) + DEALLOCATE_LOCAL ((char *) pbufT); +} + +/** + * + * \param size size in bytes + */ +void +CopySwap16Write(ClientPtr pClient, int size, short *pbuf) +{ + int bufsize = size; + short *pbufT; + short *from, *to, *fromLast, *toLast; + short tmpbuf[2]; + + /* Allocate as big a buffer as we can... */ + while (!(pbufT = (short *) ALLOCATE_LOCAL(bufsize))) + { + bufsize >>= 1; + if (bufsize == 4) + { + pbufT = tmpbuf; + break; + } + } + + /* convert lengths from # of bytes to # of shorts */ + size >>= 1; + bufsize >>= 1; + + from = pbuf; + fromLast = from + size; + while (from < fromLast) { + int nbytes; + to = pbufT; + toLast = to + min (bufsize, fromLast - from); + nbytes = (toLast - to) << 1; + while (to < toLast) { + /* can't write "cpswaps(*from++, *to++)" because cpswaps is a macro + that evaulates its args more than once */ + cpswaps(*from, *to); + from++; + to++; + } + (void)WriteToClient (pClient, nbytes, (char *) pbufT); + } + + if (pbufT != tmpbuf) + DEALLOCATE_LOCAL ((char *) pbufT); +} + + +/* Extra-small reply */ +void +SGenericReply(ClientPtr pClient, int size, xGenericReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +/* Extra-large reply */ +void +SGetWindowAttributesReply(ClientPtr pClient, int size, + xGetWindowAttributesReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + swapl(&pRep->visualID, n); + swaps(&pRep->class, n); + swapl(&pRep->backingBitPlanes, n); + swapl(&pRep->backingPixel, n); + swapl(&pRep->colormap, n); + swapl(&pRep->allEventMasks, n); + swapl(&pRep->yourEventMask, n); + swaps(&pRep->doNotPropagateMask, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SGetGeometryReply(ClientPtr pClient, int size, xGetGeometryReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->root, n); + swaps(&pRep->x, n); + swaps(&pRep->y, n); + swaps(&pRep->width, n); + swaps(&pRep->height, n); + swaps(&pRep->borderWidth, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SQueryTreeReply(ClientPtr pClient, int size, xQueryTreeReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + swapl(&pRep->root, n); + swapl(&pRep->parent, n); + swaps(&pRep->nChildren, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SInternAtomReply(ClientPtr pClient, int size, xInternAtomReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->atom, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SGetAtomNameReply(ClientPtr pClient, int size, xGetAtomNameReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + swaps(&pRep->nameLength, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + + +void +SGetPropertyReply(ClientPtr pClient, int size, xGetPropertyReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + swapl(&pRep->propertyType, n); + swapl(&pRep->bytesAfter, n); + swapl(&pRep->nItems, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SListPropertiesReply(ClientPtr pClient, int size, xListPropertiesReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + swaps(&pRep->nProperties, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SGetSelectionOwnerReply(ClientPtr pClient, int size, + xGetSelectionOwnerReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->owner, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + + +void +SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->root, n); + swapl(&pRep->child, n); + swaps(&pRep->rootX, n); + swaps(&pRep->rootY, n); + swaps(&pRep->winX, n); + swaps(&pRep->winY, n); + swaps(&pRep->mask, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +static void +SwapTimecoord(xTimecoord* pCoord) +{ + char n; + + swapl(&pCoord->time, n); + swaps(&pCoord->x, n); + swaps(&pCoord->y, n); +} + +void +SwapTimeCoordWrite(ClientPtr pClient, int size, xTimecoord *pRep) +{ + int i, n; + xTimecoord *pRepT; + + n = size / sizeof(xTimecoord); + pRepT = pRep; + for(i = 0; i < n; i++) + { + SwapTimecoord(pRepT); + pRepT++; + } + (void)WriteToClient(pClient, size, (char *) pRep); + +} +void +SGetMotionEventsReply(ClientPtr pClient, int size, xGetMotionEventsReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + swapl(&pRep->nEvents, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +STranslateCoordsReply(ClientPtr pClient, int size, xTranslateCoordsReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->child, n); + swaps(&pRep->dstX, n); + swaps(&pRep->dstY, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->focus, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +/* extra long reply */ +void +SQueryKeymapReply(ClientPtr pClient, int size, xQueryKeymapReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +static void +SwapCharInfo(xCharInfo *pInfo) +{ + char n; + + swaps(&pInfo->leftSideBearing, n); + swaps(&pInfo->rightSideBearing, n); + swaps(&pInfo->characterWidth, n); + swaps(&pInfo->ascent, n); + swaps(&pInfo->descent, n); + swaps(&pInfo->attributes, n); +} + +static void +SwapFontInfo(xQueryFontReply *pr) +{ + char n; + + swaps(&pr->minCharOrByte2, n); + swaps(&pr->maxCharOrByte2, n); + swaps(&pr->defaultChar, n); + swaps(&pr->nFontProps, n); + swaps(&pr->fontAscent, n); + swaps(&pr->fontDescent, n); + SwapCharInfo( &pr->minBounds); + SwapCharInfo( &pr->maxBounds); + swapl(&pr->nCharInfos, n); +} + +static void +SwapFont(xQueryFontReply *pr, Bool hasGlyphs) +{ + unsigned i; + xCharInfo * pxci; + unsigned nchars, nprops; + char *pby; + char n; + + swaps(&pr->sequenceNumber, n); + swapl(&pr->length, n); + nchars = pr->nCharInfos; + nprops = pr->nFontProps; + SwapFontInfo(pr); + pby = (char *) &pr[1]; + /* Font properties are an atom and either an int32 or a CARD32, so + * they are always 2 4 byte values */ + for(i = 0; i < nprops; i++) + { + swapl(pby, n); + pby += 4; + swapl(pby, n); + pby += 4; + } + if (hasGlyphs) + { + pxci = (xCharInfo *)pby; + for(i = 0; i< nchars; i++, pxci++) + SwapCharInfo(pxci); + } +} + +void +SQueryFontReply(ClientPtr pClient, int size, xQueryFontReply *pRep) +{ + SwapFont(pRep, TRUE); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SQueryTextExtentsReply(ClientPtr pClient, int size, xQueryTextExtentsReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swaps(&pRep->fontAscent, n); + swaps(&pRep->fontDescent, n); + swaps(&pRep->overallAscent, n); + swaps(&pRep->overallDescent, n); + swapl(&pRep->overallWidth, n); + swapl(&pRep->overallLeft, n); + swapl(&pRep->overallRight, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SListFontsReply(ClientPtr pClient, int size, xListFontsReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + swaps(&pRep->nFonts, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SListFontsWithInfoReply(ClientPtr pClient, int size, + xListFontsWithInfoReply *pRep) +{ + SwapFont((xQueryFontReply *)pRep, FALSE); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + swaps(&pRep->nPaths, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SGetImageReply(ClientPtr pClient, int size, xGetImageReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + swapl(&pRep->visual, n); + (void)WriteToClient(pClient, size, (char *) pRep); + /* Fortunately, image doesn't need swapping */ +} + +void +SListInstalledColormapsReply(ClientPtr pClient, int size, + xListInstalledColormapsReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + swaps(&pRep->nColormaps, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SAllocColorReply(pClient, size, pRep) + ClientPtr pClient; + int size; + xAllocColorReply *pRep; +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swaps(&pRep->red, n); + swaps(&pRep->green, n); + swaps(&pRep->blue, n); + swapl(&pRep->pixel, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SAllocNamedColorReply(ClientPtr pClient, int size, xAllocNamedColorReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->pixel, n); + swaps(&pRep->exactRed, n); + swaps(&pRep->exactGreen, n); + swaps(&pRep->exactBlue, n); + swaps(&pRep->screenRed, n); + swaps(&pRep->screenGreen, n); + swaps(&pRep->screenBlue, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + swaps(&pRep->nPixels, n); + swaps(&pRep->nMasks, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + + +void +SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + swaps(&pRep->nPixels, n); + swapl(&pRep->redMask, n); + swapl(&pRep->greenMask, n); + swapl(&pRep->blueMask, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +static void +SwapRGB(xrgb *prgb) +{ + char n; + + swaps(&prgb->red, n); + swaps(&prgb->green, n); + swaps(&prgb->blue, n); +} + +void +SQColorsExtend(ClientPtr pClient, int size, xrgb *prgb) +{ + int i, n; + xrgb *prgbT; + + n = size / sizeof(xrgb); + prgbT = prgb; + for(i = 0; i < n; i++) + { + SwapRGB(prgbT); + prgbT++; + } + (void)WriteToClient(pClient, size, (char *) prgb); +} + +void +SQueryColorsReply(ClientPtr pClient, int size, xQueryColorsReply* pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + swaps(&pRep->nColors, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SLookupColorReply(ClientPtr pClient, int size, xLookupColorReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swaps(&pRep->exactRed, n); + swaps(&pRep->exactGreen, n); + swaps(&pRep->exactBlue, n); + swaps(&pRep->screenRed, n); + swaps(&pRep->screenGreen, n); + swaps(&pRep->screenBlue, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SQueryBestSizeReply(ClientPtr pClient, int size, xQueryBestSizeReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swaps(&pRep->width, n); + swaps(&pRep->height, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SGetKeyboardMappingReply(ClientPtr pClient, int size, + xGetKeyboardMappingReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SGetPointerMappingReply(ClientPtr pClient, int size, + xGetPointerMappingReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SGetModifierMappingReply(ClientPtr pClient, int size, + xGetModifierMappingReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SGetKeyboardControlReply(ClientPtr pClient, int size, xGetKeyboardControlReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + swapl(&pRep->ledMask, n); + swaps(&pRep->bellPitch, n); + swaps(&pRep->bellDuration, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SGetPointerControlReply(ClientPtr pClient, int size, xGetPointerControlReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swaps(&pRep->accelNumerator, n); + swaps(&pRep->accelDenominator, n); + swaps(&pRep->threshold, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SGetScreenSaverReply(ClientPtr pClient, int size, xGetScreenSaverReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swaps(&pRep->timeout, n); + swaps(&pRep->interval, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + +void +SLHostsExtend(ClientPtr pClient, int size, char *buf) +{ + char *bufT = buf; + char *endbuf = buf + size; + while (bufT < endbuf) { + xHostEntry *host = (xHostEntry *) bufT; + int len = host->length; + char n; + swaps (&host->length, n); + bufT += sizeof (xHostEntry) + (((len + 3) >> 2) << 2); + } + (void)WriteToClient (pClient, size, buf); +} + +void +SListHostsReply(ClientPtr pClient, int size, xListHostsReply *pRep) +{ + char n; + + swaps(&pRep->sequenceNumber, n); + swapl(&pRep->length, n); + swaps(&pRep->nHosts, n); + (void)WriteToClient(pClient, size, (char *) pRep); +} + + + +void +SErrorEvent(xError *from, xError *to) +{ + to->type = X_Error; + to->errorCode = from->errorCode; + cpswaps(from->sequenceNumber, to->sequenceNumber); + cpswapl(from->resourceID, to->resourceID); + cpswaps(from->minorCode, to->minorCode); + to->majorCode = from->majorCode; +} + +void +SKeyButtonPtrEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + to->u.u.detail = from->u.u.detail; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.keyButtonPointer.time, + to->u.keyButtonPointer.time); + cpswapl(from->u.keyButtonPointer.root, + to->u.keyButtonPointer.root); + cpswapl(from->u.keyButtonPointer.event, + to->u.keyButtonPointer.event); + cpswapl(from->u.keyButtonPointer.child, + to->u.keyButtonPointer.child); + cpswaps(from->u.keyButtonPointer.rootX, + to->u.keyButtonPointer.rootX); + cpswaps(from->u.keyButtonPointer.rootY, + to->u.keyButtonPointer.rootY); + cpswaps(from->u.keyButtonPointer.eventX, + to->u.keyButtonPointer.eventX); + cpswaps(from->u.keyButtonPointer.eventY, + to->u.keyButtonPointer.eventY); + cpswaps(from->u.keyButtonPointer.state, + to->u.keyButtonPointer.state); + to->u.keyButtonPointer.sameScreen = + from->u.keyButtonPointer.sameScreen; +} + +void +SEnterLeaveEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + to->u.u.detail = from->u.u.detail; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.enterLeave.time, to->u.enterLeave.time); + cpswapl(from->u.enterLeave.root, to->u.enterLeave.root); + cpswapl(from->u.enterLeave.event, to->u.enterLeave.event); + cpswapl(from->u.enterLeave.child, to->u.enterLeave.child); + cpswaps(from->u.enterLeave.rootX, to->u.enterLeave.rootX); + cpswaps(from->u.enterLeave.rootY, to->u.enterLeave.rootY); + cpswaps(from->u.enterLeave.eventX, to->u.enterLeave.eventX); + cpswaps(from->u.enterLeave.eventY, to->u.enterLeave.eventY); + cpswaps(from->u.enterLeave.state, to->u.enterLeave.state); + to->u.enterLeave.mode = from->u.enterLeave.mode; + to->u.enterLeave.flags = from->u.enterLeave.flags; +} + +void +SFocusEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + to->u.u.detail = from->u.u.detail; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.focus.window, to->u.focus.window); + to->u.focus.mode = from->u.focus.mode; +} + +void +SExposeEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.expose.window, to->u.expose.window); + cpswaps(from->u.expose.x, to->u.expose.x); + cpswaps(from->u.expose.y, to->u.expose.y); + cpswaps(from->u.expose.width, to->u.expose.width); + cpswaps(from->u.expose.height, to->u.expose.height); + cpswaps(from->u.expose.count, to->u.expose.count); +} + +void +SGraphicsExposureEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.graphicsExposure.drawable, + to->u.graphicsExposure.drawable); + cpswaps(from->u.graphicsExposure.x, + to->u.graphicsExposure.x); + cpswaps(from->u.graphicsExposure.y, + to->u.graphicsExposure.y); + cpswaps(from->u.graphicsExposure.width, + to->u.graphicsExposure.width); + cpswaps(from->u.graphicsExposure.height, + to->u.graphicsExposure.height); + cpswaps(from->u.graphicsExposure.minorEvent, + to->u.graphicsExposure.minorEvent); + cpswaps(from->u.graphicsExposure.count, + to->u.graphicsExposure.count); + to->u.graphicsExposure.majorEvent = + from->u.graphicsExposure.majorEvent; +} + +void +SNoExposureEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.noExposure.drawable, to->u.noExposure.drawable); + cpswaps(from->u.noExposure.minorEvent, to->u.noExposure.minorEvent); + to->u.noExposure.majorEvent = from->u.noExposure.majorEvent; +} + +void +SVisibilityEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.visibility.window, to->u.visibility.window); + to->u.visibility.state = from->u.visibility.state; +} + +void +SCreateNotifyEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.createNotify.window, to->u.createNotify.window); + cpswapl(from->u.createNotify.parent, to->u.createNotify.parent); + cpswaps(from->u.createNotify.x, to->u.createNotify.x); + cpswaps(from->u.createNotify.y, to->u.createNotify.y); + cpswaps(from->u.createNotify.width, to->u.createNotify.width); + cpswaps(from->u.createNotify.height, to->u.createNotify.height); + cpswaps(from->u.createNotify.borderWidth, + to->u.createNotify.borderWidth); + to->u.createNotify.override = from->u.createNotify.override; +} + +void +SDestroyNotifyEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.destroyNotify.event, to->u.destroyNotify.event); + cpswapl(from->u.destroyNotify.window, to->u.destroyNotify.window); +} + +void +SUnmapNotifyEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.unmapNotify.event, to->u.unmapNotify.event); + cpswapl(from->u.unmapNotify.window, to->u.unmapNotify.window); + to->u.unmapNotify.fromConfigure = from->u.unmapNotify.fromConfigure; +} + +void +SMapNotifyEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.mapNotify.event, to->u.mapNotify.event); + cpswapl(from->u.mapNotify.window, to->u.mapNotify.window); + to->u.mapNotify.override = from->u.mapNotify.override; +} + +void +SMapRequestEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.mapRequest.parent, to->u.mapRequest.parent); + cpswapl(from->u.mapRequest.window, to->u.mapRequest.window); +} + +void +SReparentEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.reparent.event, to->u.reparent.event); + cpswapl(from->u.reparent.window, to->u.reparent.window); + cpswapl(from->u.reparent.parent, to->u.reparent.parent); + cpswaps(from->u.reparent.x, to->u.reparent.x); + cpswaps(from->u.reparent.y, to->u.reparent.y); + to->u.reparent.override = from->u.reparent.override; +} + +void +SConfigureNotifyEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.configureNotify.event, + to->u.configureNotify.event); + cpswapl(from->u.configureNotify.window, + to->u.configureNotify.window); + cpswapl(from->u.configureNotify.aboveSibling, + to->u.configureNotify.aboveSibling); + cpswaps(from->u.configureNotify.x, to->u.configureNotify.x); + cpswaps(from->u.configureNotify.y, to->u.configureNotify.y); + cpswaps(from->u.configureNotify.width, to->u.configureNotify.width); + cpswaps(from->u.configureNotify.height, + to->u.configureNotify.height); + cpswaps(from->u.configureNotify.borderWidth, + to->u.configureNotify.borderWidth); + to->u.configureNotify.override = from->u.configureNotify.override; +} + +void +SConfigureRequestEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + to->u.u.detail = from->u.u.detail; /* actually stack-mode */ + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.configureRequest.parent, + to->u.configureRequest.parent); + cpswapl(from->u.configureRequest.window, + to->u.configureRequest.window); + cpswapl(from->u.configureRequest.sibling, + to->u.configureRequest.sibling); + cpswaps(from->u.configureRequest.x, to->u.configureRequest.x); + cpswaps(from->u.configureRequest.y, to->u.configureRequest.y); + cpswaps(from->u.configureRequest.width, + to->u.configureRequest.width); + cpswaps(from->u.configureRequest.height, + to->u.configureRequest.height); + cpswaps(from->u.configureRequest.borderWidth, + to->u.configureRequest.borderWidth); + cpswaps(from->u.configureRequest.valueMask, + to->u.configureRequest.valueMask); +} + + +void +SGravityEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.gravity.event, to->u.gravity.event); + cpswapl(from->u.gravity.window, to->u.gravity.window); + cpswaps(from->u.gravity.x, to->u.gravity.x); + cpswaps(from->u.gravity.y, to->u.gravity.y); +} + +void +SResizeRequestEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.resizeRequest.window, to->u.resizeRequest.window); + cpswaps(from->u.resizeRequest.width, to->u.resizeRequest.width); + cpswaps(from->u.resizeRequest.height, to->u.resizeRequest.height); +} + +void +SCirculateEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + to->u.u.detail = from->u.u.detail; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.circulate.event, to->u.circulate.event); + cpswapl(from->u.circulate.window, to->u.circulate.window); + cpswapl(from->u.circulate.parent, to->u.circulate.parent); + to->u.circulate.place = from->u.circulate.place; +} + +void +SPropertyEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.property.window, to->u.property.window); + cpswapl(from->u.property.atom, to->u.property.atom); + cpswapl(from->u.property.time, to->u.property.time); + to->u.property.state = from->u.property.state; +} + +void +SSelectionClearEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.selectionClear.time, to->u.selectionClear.time); + cpswapl(from->u.selectionClear.window, to->u.selectionClear.window); + cpswapl(from->u.selectionClear.atom, to->u.selectionClear.atom); +} + +void +SSelectionRequestEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.selectionRequest.time, to->u.selectionRequest.time); + cpswapl(from->u.selectionRequest.owner, + to->u.selectionRequest.owner); + cpswapl(from->u.selectionRequest.requestor, + to->u.selectionRequest.requestor); + cpswapl(from->u.selectionRequest.selection, + to->u.selectionRequest.selection); + cpswapl(from->u.selectionRequest.target, + to->u.selectionRequest.target); + cpswapl(from->u.selectionRequest.property, + to->u.selectionRequest.property); +} + +void +SSelectionNotifyEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.selectionNotify.time, to->u.selectionNotify.time); + cpswapl(from->u.selectionNotify.requestor, + to->u.selectionNotify.requestor); + cpswapl(from->u.selectionNotify.selection, + to->u.selectionNotify.selection); + cpswapl(from->u.selectionNotify.target, + to->u.selectionNotify.target); + cpswapl(from->u.selectionNotify.property, + to->u.selectionNotify.property); +} + +void +SColormapEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.colormap.window, to->u.colormap.window); + cpswapl(from->u.colormap.colormap, to->u.colormap.colormap); + to->u.colormap.new = from->u.colormap.new; + to->u.colormap.state = from->u.colormap.state; +} + +void +SMappingEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + to->u.mappingNotify.request = from->u.mappingNotify.request; + to->u.mappingNotify.firstKeyCode = + from->u.mappingNotify.firstKeyCode; + to->u.mappingNotify.count = from->u.mappingNotify.count; +} + +void +SClientMessageEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + to->u.u.detail = from->u.u.detail; /* actually format */ + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.clientMessage.window, to->u.clientMessage.window); + cpswapl(from->u.clientMessage.u.l.type, + to->u.clientMessage.u.l.type); + switch (from->u.u.detail) { + case 8: + memmove(to->u.clientMessage.u.b.bytes, + from->u.clientMessage.u.b.bytes,20); + break; + case 16: + cpswaps(from->u.clientMessage.u.s.shorts0, + to->u.clientMessage.u.s.shorts0); + cpswaps(from->u.clientMessage.u.s.shorts1, + to->u.clientMessage.u.s.shorts1); + cpswaps(from->u.clientMessage.u.s.shorts2, + to->u.clientMessage.u.s.shorts2); + cpswaps(from->u.clientMessage.u.s.shorts3, + to->u.clientMessage.u.s.shorts3); + cpswaps(from->u.clientMessage.u.s.shorts4, + to->u.clientMessage.u.s.shorts4); + cpswaps(from->u.clientMessage.u.s.shorts5, + to->u.clientMessage.u.s.shorts5); + cpswaps(from->u.clientMessage.u.s.shorts6, + to->u.clientMessage.u.s.shorts6); + cpswaps(from->u.clientMessage.u.s.shorts7, + to->u.clientMessage.u.s.shorts7); + cpswaps(from->u.clientMessage.u.s.shorts8, + to->u.clientMessage.u.s.shorts8); + cpswaps(from->u.clientMessage.u.s.shorts9, + to->u.clientMessage.u.s.shorts9); + break; + case 32: + cpswapl(from->u.clientMessage.u.l.longs0, + to->u.clientMessage.u.l.longs0); + cpswapl(from->u.clientMessage.u.l.longs1, + to->u.clientMessage.u.l.longs1); + cpswapl(from->u.clientMessage.u.l.longs2, + to->u.clientMessage.u.l.longs2); + cpswapl(from->u.clientMessage.u.l.longs3, + to->u.clientMessage.u.l.longs3); + cpswapl(from->u.clientMessage.u.l.longs4, + to->u.clientMessage.u.l.longs4); + break; + } +} + +void +SKeymapNotifyEvent(xEvent *from, xEvent *to) +{ + /* Keymap notify events are special; they have no + sequence number field, and contain entirely 8-bit data */ + *to = *from; +} + +static void +SwapConnSetup(xConnSetup *pConnSetup, xConnSetup *pConnSetupT) +{ + cpswapl(pConnSetup->release, pConnSetupT->release); + cpswapl(pConnSetup->ridBase, pConnSetupT->ridBase); + cpswapl(pConnSetup->ridMask, pConnSetupT->ridMask); + cpswapl(pConnSetup->motionBufferSize, pConnSetupT->motionBufferSize); + cpswaps(pConnSetup->nbytesVendor, pConnSetupT->nbytesVendor); + cpswaps(pConnSetup->maxRequestSize, pConnSetupT->maxRequestSize); + pConnSetupT->minKeyCode = pConnSetup->minKeyCode; + pConnSetupT->maxKeyCode = pConnSetup->maxKeyCode; + pConnSetupT->numRoots = pConnSetup->numRoots; + pConnSetupT->numFormats = pConnSetup->numFormats; + pConnSetupT->imageByteOrder = pConnSetup->imageByteOrder; + pConnSetupT->bitmapBitOrder = pConnSetup->bitmapBitOrder; + pConnSetupT->bitmapScanlineUnit = pConnSetup->bitmapScanlineUnit; + pConnSetupT->bitmapScanlinePad = pConnSetup->bitmapScanlinePad; +} + +static void +SwapWinRoot(xWindowRoot *pRoot, xWindowRoot *pRootT) +{ + cpswapl(pRoot->windowId, pRootT->windowId); + cpswapl(pRoot->defaultColormap, pRootT->defaultColormap); + cpswapl(pRoot->whitePixel, pRootT->whitePixel); + cpswapl(pRoot->blackPixel, pRootT->blackPixel); + cpswapl(pRoot->currentInputMask, pRootT->currentInputMask); + cpswaps(pRoot->pixWidth, pRootT->pixWidth); + cpswaps(pRoot->pixHeight, pRootT->pixHeight); + cpswaps(pRoot->mmWidth, pRootT->mmWidth); + cpswaps(pRoot->mmHeight, pRootT->mmHeight); + cpswaps(pRoot->minInstalledMaps, pRootT->minInstalledMaps); + cpswaps(pRoot->maxInstalledMaps, pRootT->maxInstalledMaps); + cpswapl(pRoot->rootVisualID, pRootT->rootVisualID); + pRootT->backingStore = pRoot->backingStore; + pRootT->saveUnders = pRoot->saveUnders; + pRootT->rootDepth = pRoot->rootDepth; + pRootT->nDepths = pRoot->nDepths; +} + +static void +SwapVisual(xVisualType *pVis, xVisualType *pVisT) +{ + cpswapl(pVis->visualID, pVisT->visualID); + pVisT->class = pVis->class; + pVisT->bitsPerRGB = pVis->bitsPerRGB; + cpswaps(pVis->colormapEntries, pVisT->colormapEntries); + cpswapl(pVis->redMask, pVisT->redMask); + cpswapl(pVis->greenMask, pVisT->greenMask); + cpswapl(pVis->blueMask, pVisT->blueMask); +} + +_X_EXPORT void +SwapConnSetupInfo( + char *pInfo, + char *pInfoT +) +{ + int i, j, k; + xConnSetup *pConnSetup = (xConnSetup *)pInfo; + xDepth *depth; + xWindowRoot *root; + + SwapConnSetup(pConnSetup, (xConnSetup *)pInfoT); + pInfo += sizeof(xConnSetup); + pInfoT += sizeof(xConnSetup); + + /* Copy the vendor string */ + i = (pConnSetup->nbytesVendor + 3) & ~3; + memcpy(pInfoT, pInfo, i); + pInfo += i; + pInfoT += i; + + /* The Pixmap formats don't need to be swapped, just copied. */ + i = sizeof(xPixmapFormat) * pConnSetup->numFormats; + memcpy(pInfoT, pInfo, i); + pInfo += i; + pInfoT += i; + + for(i = 0; i < pConnSetup->numRoots; i++) + { + root = (xWindowRoot*)pInfo; + SwapWinRoot(root, (xWindowRoot *)pInfoT); + pInfo += sizeof(xWindowRoot); + pInfoT += sizeof(xWindowRoot); + + for(j = 0; j < root->nDepths; j++) + { + depth = (xDepth*)pInfo; + ((xDepth *)pInfoT)->depth = depth->depth; + cpswaps(depth->nVisuals, ((xDepth *)pInfoT)->nVisuals); + pInfo += sizeof(xDepth); + pInfoT += sizeof(xDepth); + for(k = 0; k < depth->nVisuals; k++) + { + SwapVisual((xVisualType *)pInfo, (xVisualType *)pInfoT); + pInfo += sizeof(xVisualType); + pInfoT += sizeof(xVisualType); + } + } + } +} + +void +WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo) +{ + char *pInfoTBase; + + pInfoTBase = (char *) ALLOCATE_LOCAL(size); + if (!pInfoTBase) + { + pClient->noClientException = -1; + return; + } + SwapConnSetupInfo(pInfo, pInfoTBase); + (void)WriteToClient(pClient, (int)size, (char *) pInfoTBase); + DEALLOCATE_LOCAL(pInfoTBase); +} + +_X_EXPORT void +SwapConnSetupPrefix(xConnSetupPrefix *pcspFrom, xConnSetupPrefix *pcspTo) +{ + pcspTo->success = pcspFrom->success; + pcspTo->lengthReason = pcspFrom->lengthReason; + cpswaps(pcspFrom->majorVersion, pcspTo->majorVersion); + cpswaps(pcspFrom->minorVersion, pcspTo->minorVersion); + cpswaps(pcspFrom->length, pcspTo->length); +} + +void +WriteSConnSetupPrefix(ClientPtr pClient, xConnSetupPrefix *pcsp) +{ + xConnSetupPrefix cspT; + + SwapConnSetupPrefix(pcsp, &cspT); + (void)WriteToClient(pClient, sizeof(cspT), (char *) &cspT); +} diff --git a/xorg-server-1.4/dix/swapreq.c b/xorg-server-1.4/dix/swapreq.c new file mode 100644 index 0000000..ad60d17 --- /dev/null +++ b/xorg-server-1.4/dix/swapreq.c @@ -0,0 +1,1100 @@ +/************************************************************ + +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 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. + +********************************************************/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#define NEED_EVENTS +#include +#include +#include "misc.h" +#include "dixstruct.h" +#include "extnsionst.h" /* for SendEvent */ +#include "swapreq.h" + +/* Thanks to Jack Palevich for testing and subsequently rewriting all this */ + +/* Byte swap a list of longs */ +_X_EXPORT void +SwapLongs (CARD32 *list, unsigned long count) +{ + 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 */ +_X_EXPORT void +SwapShorts (short *list, unsigned long count) +{ + 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); + } +} + +/* The following is used for all requests that have + no fields to be swapped (except "length") */ +int +SProcSimpleReq(ClientPtr client) +{ + char n; + + REQUEST(xReq); + swaps(&stuff->length, n); + return(*ProcVector[stuff->reqType])(client); +} + +/* The following is used for all requests that have + only a single 32-bit field to be swapped, coming + right after the "length" field */ +int +SProcResourceReq(ClientPtr client) +{ + char n; + + REQUEST(xResourceReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xResourceReq); /* not EXACT */ + swapl(&stuff->id, n); + return(*ProcVector[stuff->reqType])(client); +} + +int +SProcCreateWindow(ClientPtr client) +{ + char n; + + REQUEST(xCreateWindowReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xCreateWindowReq); + swapl(&stuff->wid, n); + swapl(&stuff->parent, n); + swaps(&stuff->x, n); + swaps(&stuff->y, n); + swaps(&stuff->width, n); + swaps(&stuff->height, n); + swaps(&stuff->borderWidth, n); + swaps(&stuff->class, n); + swapl(&stuff->visual, n); + swapl(&stuff->mask, n); + SwapRestL(stuff); + return((* ProcVector[X_CreateWindow])(client)); +} + +int +SProcChangeWindowAttributes(ClientPtr client) +{ + char n; + + REQUEST(xChangeWindowAttributesReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); + swapl(&stuff->window, n); + swapl(&stuff->valueMask, n); + SwapRestL(stuff); + return((* ProcVector[X_ChangeWindowAttributes])(client)); +} + +int +SProcReparentWindow(ClientPtr client) +{ + char n; + REQUEST(xReparentWindowReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xReparentWindowReq); + swapl(&stuff->window, n); + swapl(&stuff->parent, n); + swaps(&stuff->x, n); + swaps(&stuff->y, n); + return((* ProcVector[X_ReparentWindow])(client)); +} + +int +SProcConfigureWindow(ClientPtr client) +{ + char n; + REQUEST(xConfigureWindowReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xConfigureWindowReq); + swapl(&stuff->window, n); + swaps(&stuff->mask, n); + SwapRestL(stuff); + return((* ProcVector[X_ConfigureWindow])(client)); + +} + + +int +SProcInternAtom(ClientPtr client) +{ + char n; + REQUEST(xInternAtomReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xInternAtomReq); + swaps(&stuff->nbytes, n); + return((* ProcVector[X_InternAtom])(client)); +} + +int +SProcChangeProperty(ClientPtr client) +{ + char n; + REQUEST(xChangePropertyReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xChangePropertyReq); + swapl(&stuff->window, n); + swapl(&stuff->property, n); + swapl(&stuff->type, n); + swapl(&stuff->nUnits, n); + switch ( stuff->format ) { + case 8 : + break; + case 16: + SwapRestS(stuff); + break; + case 32: + SwapRestL(stuff); + break; + } + return((* ProcVector[X_ChangeProperty])(client)); +} + +int +SProcDeleteProperty(ClientPtr client) +{ + char n; + REQUEST(xDeletePropertyReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xDeletePropertyReq); + swapl(&stuff->window, n); + swapl(&stuff->property, n); + return((* ProcVector[X_DeleteProperty])(client)); + +} + +int +SProcGetProperty(ClientPtr client) +{ + char n; + REQUEST(xGetPropertyReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xGetPropertyReq); + swapl(&stuff->window, n); + swapl(&stuff->property, n); + swapl(&stuff->type, n); + swapl(&stuff->longOffset, n); + swapl(&stuff->longLength, n); + return((* ProcVector[X_GetProperty])(client)); +} + +int +SProcSetSelectionOwner(ClientPtr client) +{ + char n; + REQUEST(xSetSelectionOwnerReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xSetSelectionOwnerReq); + swapl(&stuff->window, n); + swapl(&stuff->selection, n); + swapl(&stuff->time, n); + return((* ProcVector[X_SetSelectionOwner])(client)); +} + +int +SProcConvertSelection(ClientPtr client) +{ + char n; + REQUEST(xConvertSelectionReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xConvertSelectionReq); + swapl(&stuff->requestor, n); + swapl(&stuff->selection, n); + swapl(&stuff->target, n); + swapl(&stuff->property, n); + swapl(&stuff->time, n); + return((* ProcVector[X_ConvertSelection])(client)); +} + +int +SProcSendEvent(ClientPtr client) +{ + char n; + xEvent eventT; + EventSwapPtr proc; + REQUEST(xSendEventReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xSendEventReq); + swapl(&stuff->destination, n); + swapl(&stuff->eventMask, n); + + /* Swap event */ + proc = EventSwapVector[stuff->event.u.u.type & 0177]; + if (!proc || proc == NotImplemented) /* no swapping proc; invalid event type? */ + return (BadValue); + (*proc)(&stuff->event, &eventT); + stuff->event = eventT; + + return((* ProcVector[X_SendEvent])(client)); +} + +int +SProcGrabPointer(ClientPtr client) +{ + char n; + REQUEST(xGrabPointerReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xGrabPointerReq); + swapl(&stuff->grabWindow, n); + swaps(&stuff->eventMask, n); + swapl(&stuff->confineTo, n); + swapl(&stuff->cursor, n); + swapl(&stuff->time, n); + return((* ProcVector[X_GrabPointer])(client)); +} + +int +SProcGrabButton(ClientPtr client) +{ + char n; + REQUEST(xGrabButtonReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xGrabButtonReq); + swapl(&stuff->grabWindow, n); + swaps(&stuff->eventMask, n); + swapl(&stuff->confineTo, n); + swapl(&stuff->cursor, n); + swaps(&stuff->modifiers, n); + return((* ProcVector[X_GrabButton])(client)); +} + +int +SProcUngrabButton(ClientPtr client) +{ + char n; + REQUEST(xUngrabButtonReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xUngrabButtonReq); + swapl(&stuff->grabWindow, n); + swaps(&stuff->modifiers, n); + return((* ProcVector[X_UngrabButton])(client)); +} + +int +SProcChangeActivePointerGrab(ClientPtr client) +{ + char n; + REQUEST(xChangeActivePointerGrabReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xChangeActivePointerGrabReq); + swapl(&stuff->cursor, n); + swapl(&stuff->time, n); + swaps(&stuff->eventMask, n); + return((* ProcVector[X_ChangeActivePointerGrab])(client)); +} + +int +SProcGrabKeyboard(ClientPtr client) +{ + char n; + REQUEST(xGrabKeyboardReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xGrabKeyboardReq); + swapl(&stuff->grabWindow, n); + swapl(&stuff->time, n); + return((* ProcVector[X_GrabKeyboard])(client)); +} + +int +SProcGrabKey(ClientPtr client) +{ + char n; + REQUEST(xGrabKeyReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xGrabKeyReq); + swapl(&stuff->grabWindow, n); + swaps(&stuff->modifiers, n); + return((* ProcVector[X_GrabKey])(client)); +} + +int +SProcUngrabKey(ClientPtr client) +{ + char n; + REQUEST(xUngrabKeyReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xUngrabKeyReq); + swapl(&stuff->grabWindow, n); + swaps(&stuff->modifiers, n); + return((* ProcVector[X_UngrabKey])(client)); +} + +int +SProcGetMotionEvents(ClientPtr client) +{ + char n; + REQUEST(xGetMotionEventsReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xGetMotionEventsReq); + swapl(&stuff->window, n); + swapl(&stuff->start, n); + swapl(&stuff->stop, n); + return((* ProcVector[X_GetMotionEvents])(client)); +} + +int +SProcTranslateCoords(ClientPtr client) +{ + char n; + REQUEST(xTranslateCoordsReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xTranslateCoordsReq); + swapl(&stuff->srcWid, n); + swapl(&stuff->dstWid, n); + swaps(&stuff->srcX, n); + swaps(&stuff->srcY, n); + return((* ProcVector[X_TranslateCoords])(client)); +} + +int +SProcWarpPointer(ClientPtr client) +{ + char n; + REQUEST(xWarpPointerReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xWarpPointerReq); + swapl(&stuff->srcWid, n); + swapl(&stuff->dstWid, n); + swaps(&stuff->srcX, n); + swaps(&stuff->srcY, n); + swaps(&stuff->srcWidth, n); + swaps(&stuff->srcHeight, n); + swaps(&stuff->dstX, n); + swaps(&stuff->dstY, n); + return((* ProcVector[X_WarpPointer])(client)); +} + +int +SProcSetInputFocus(ClientPtr client) +{ + char n; + REQUEST(xSetInputFocusReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xSetInputFocusReq); + swapl(&stuff->focus, n); + swapl(&stuff->time, n); + return((* ProcVector[X_SetInputFocus])(client)); +} + +int +SProcOpenFont(ClientPtr client) +{ + char n; + REQUEST(xOpenFontReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xOpenFontReq); + swapl(&stuff->fid, n); + swaps(&stuff->nbytes, n); + return((* ProcVector[X_OpenFont])(client)); +} + +int +SProcListFonts(ClientPtr client) +{ + char n; + REQUEST(xListFontsReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xListFontsReq); + swaps(&stuff->maxNames, n); + swaps(&stuff->nbytes, n); + return((* ProcVector[X_ListFonts])(client)); +} + +int +SProcListFontsWithInfo(ClientPtr client) +{ + char n; + REQUEST(xListFontsWithInfoReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xListFontsWithInfoReq); + swaps(&stuff->maxNames, n); + swaps(&stuff->nbytes, n); + return((* ProcVector[X_ListFontsWithInfo])(client)); +} + +int +SProcSetFontPath(ClientPtr client) +{ + char n; + REQUEST(xSetFontPathReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xSetFontPathReq); + swaps(&stuff->nFonts, n); + return((* ProcVector[X_SetFontPath])(client)); +} + +int +SProcCreatePixmap(ClientPtr client) +{ + char n; + REQUEST(xCreatePixmapReq); + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xCreatePixmapReq); + swapl(&stuff->pid, n); + swapl(&stuff->drawable, n); + swaps(&stuff->width, n); + swaps(&stuff->height, n); + return((* ProcVector[X_CreatePixmap])(client)); +} + +int +SProcCreateGC(ClientPtr client) +{ + char n; + REQUEST(xCreateGCReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xCreateGCReq); + swapl(&stuff->gc, n); + swapl(&stuff->drawable, n); + swapl(&stuff->mask, n); + SwapRestL(stuff); + return((* ProcVector[X_CreateGC])(client)); +} + +int +SProcChangeGC(ClientPtr client) +{ + char n; + REQUEST(xChangeGCReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xChangeGCReq); + swapl(&stuff->gc, n); + swapl(&stuff->mask, n); + SwapRestL(stuff); + return((* ProcVector[X_ChangeGC])(client)); +} + +int +SProcCopyGC(ClientPtr client) +{ + char n; + REQUEST(xCopyGCReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xCopyGCReq); + swapl(&stuff->srcGC, n); + swapl(&stuff->dstGC, n); + swapl(&stuff->mask, n); + return((* ProcVector[X_CopyGC])(client)); +} + +int +SProcSetDashes(ClientPtr client) +{ + char n; + REQUEST(xSetDashesReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xSetDashesReq); + swapl(&stuff->gc, n); + swaps(&stuff->dashOffset, n); + swaps(&stuff->nDashes, n); + return((* ProcVector[X_SetDashes])(client)); + +} + +int +SProcSetClipRectangles(ClientPtr client) +{ + char n; + REQUEST(xSetClipRectanglesReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq); + swapl(&stuff->gc, n); + swaps(&stuff->xOrigin, n); + swaps(&stuff->yOrigin, n); + SwapRestS(stuff); + return((* ProcVector[X_SetClipRectangles])(client)); +} + +int +SProcClearToBackground(ClientPtr client) +{ + char n; + REQUEST(xClearAreaReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xClearAreaReq); + swapl(&stuff->window, n); + swaps(&stuff->x, n); + swaps(&stuff->y, n); + swaps(&stuff->width, n); + swaps(&stuff->height, n); + return((* ProcVector[X_ClearArea])(client)); +} + +int +SProcCopyArea(ClientPtr client) +{ + char n; + REQUEST(xCopyAreaReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xCopyAreaReq); + swapl(&stuff->srcDrawable, n); + swapl(&stuff->dstDrawable, n); + swapl(&stuff->gc, n); + swaps(&stuff->srcX, n); + swaps(&stuff->srcY, n); + swaps(&stuff->dstX, n); + swaps(&stuff->dstY, n); + swaps(&stuff->width, n); + swaps(&stuff->height, n); + return((* ProcVector[X_CopyArea])(client)); +} + +int +SProcCopyPlane(ClientPtr client) +{ + char n; + REQUEST(xCopyPlaneReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xCopyPlaneReq); + swapl(&stuff->srcDrawable, n); + swapl(&stuff->dstDrawable, n); + swapl(&stuff->gc, n); + swaps(&stuff->srcX, n); + swaps(&stuff->srcY, n); + swaps(&stuff->dstX, n); + swaps(&stuff->dstY, n); + swaps(&stuff->width, n); + swaps(&stuff->height, n); + swapl(&stuff->bitPlane, n); + return((* ProcVector[X_CopyPlane])(client)); +} + +/* The following routine is used for all Poly drawing requests + (except FillPoly, which uses a different request format) */ +int +SProcPoly(ClientPtr client) +{ + char n; + + REQUEST(xPolyPointReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xPolyPointReq); + swapl(&stuff->drawable, n); + swapl(&stuff->gc, n); + SwapRestS(stuff); + return((* ProcVector[stuff->reqType])(client)); +} + +/* cannot use SProcPoly for this one, because xFillPolyReq + is longer than xPolyPointReq, and we don't want to swap + the difference as shorts! */ +int +SProcFillPoly(ClientPtr client) +{ + char n; + + REQUEST(xFillPolyReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xFillPolyReq); + swapl(&stuff->drawable, n); + swapl(&stuff->gc, n); + SwapRestS(stuff); + return((* ProcVector[X_FillPoly])(client)); +} + +int +SProcPutImage(ClientPtr client) +{ + char n; + REQUEST(xPutImageReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xPutImageReq); + swapl(&stuff->drawable, n); + swapl(&stuff->gc, n); + swaps(&stuff->width, n); + swaps(&stuff->height, n); + swaps(&stuff->dstX, n); + swaps(&stuff->dstY, n); + /* Image should already be swapped */ + return((* ProcVector[X_PutImage])(client)); + +} + +int +SProcGetImage(ClientPtr client) +{ + char n; + REQUEST(xGetImageReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xGetImageReq); + swapl(&stuff->drawable, n); + swaps(&stuff->x, n); + swaps(&stuff->y, n); + swaps(&stuff->width, n); + swaps(&stuff->height, n); + swapl(&stuff->planeMask, n); + return((* ProcVector[X_GetImage])(client)); +} + +/* ProcPolyText used for both PolyText8 and PolyText16 */ + +int +SProcPolyText(ClientPtr client) +{ + char n; + REQUEST(xPolyTextReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xPolyTextReq); + swapl(&stuff->drawable, n); + swapl(&stuff->gc, n); + swaps(&stuff->x, n); + swaps(&stuff->y, n); + return((* ProcVector[stuff->reqType])(client)); +} + +/* ProcImageText used for both ImageText8 and ImageText16 */ + +int +SProcImageText(ClientPtr client) +{ + char n; + REQUEST(xImageTextReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xImageTextReq); + swapl(&stuff->drawable, n); + swapl(&stuff->gc, n); + swaps(&stuff->x, n); + swaps(&stuff->y, n); + return((* ProcVector[stuff->reqType])(client)); +} + +int +SProcCreateColormap(ClientPtr client) +{ + char n; + REQUEST(xCreateColormapReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xCreateColormapReq); + swapl(&stuff->mid, n); + swapl(&stuff->window, n); + swapl(&stuff->visual, n); + return((* ProcVector[X_CreateColormap])(client)); +} + + +int +SProcCopyColormapAndFree(ClientPtr client) +{ + char n; + REQUEST(xCopyColormapAndFreeReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq); + swapl(&stuff->mid, n); + swapl(&stuff->srcCmap, n); + return((* ProcVector[X_CopyColormapAndFree])(client)); + +} + +int +SProcAllocColor(ClientPtr client) +{ + char n; + REQUEST(xAllocColorReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xAllocColorReq); + swapl(&stuff->cmap, n); + swaps(&stuff->red, n); + swaps(&stuff->green, n); + swaps(&stuff->blue, n); + return((* ProcVector[X_AllocColor])(client)); +} + +int +SProcAllocNamedColor(ClientPtr client) +{ + char n; + + REQUEST(xAllocNamedColorReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xAllocNamedColorReq); + swapl(&stuff->cmap, n); + swaps(&stuff->nbytes, n); + return((* ProcVector[X_AllocNamedColor])(client)); +} + +int +SProcAllocColorCells(ClientPtr client) +{ + char n; + REQUEST(xAllocColorCellsReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xAllocColorCellsReq); + swapl(&stuff->cmap, n); + swaps(&stuff->colors, n); + swaps(&stuff->planes, n); + return((* ProcVector[X_AllocColorCells])(client)); +} + +int +SProcAllocColorPlanes(ClientPtr client) +{ + char n; + REQUEST(xAllocColorPlanesReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xAllocColorPlanesReq); + swapl(&stuff->cmap, n); + swaps(&stuff->colors, n); + swaps(&stuff->red, n); + swaps(&stuff->green, n); + swaps(&stuff->blue, n); + return((* ProcVector[X_AllocColorPlanes])(client)); +} + +int +SProcFreeColors(ClientPtr client) +{ + char n; + REQUEST(xFreeColorsReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xFreeColorsReq); + swapl(&stuff->cmap, n); + swapl(&stuff->planeMask, n); + SwapRestL(stuff); + return((* ProcVector[X_FreeColors])(client)); + +} + +_X_EXPORT void +SwapColorItem(xColorItem *pItem) +{ + char n; + + swapl(&pItem->pixel, n); + swaps(&pItem->red, n); + swaps(&pItem->green, n); + swaps(&pItem->blue, n); +} + +int +SProcStoreColors(ClientPtr client) +{ + char n; + long count; + xColorItem *pItem; + + REQUEST(xStoreColorsReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xStoreColorsReq); + swapl(&stuff->cmap, n); + pItem = (xColorItem *) &stuff[1]; + for(count = LengthRestB(stuff)/sizeof(xColorItem); --count >= 0; ) + SwapColorItem(pItem++); + return((* ProcVector[X_StoreColors])(client)); +} + +int +SProcStoreNamedColor (ClientPtr client) +{ + char n; + REQUEST(xStoreNamedColorReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xStoreNamedColorReq); + swapl(&stuff->cmap, n); + swapl(&stuff->pixel, n); + swaps(&stuff->nbytes, n); + return((* ProcVector[X_StoreNamedColor])(client)); +} + +int +SProcQueryColors (ClientPtr client) +{ + char n; + REQUEST(xQueryColorsReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xQueryColorsReq); + swapl(&stuff->cmap, n); + SwapRestL(stuff); + return((* ProcVector[X_QueryColors])(client)); +} + +int +SProcLookupColor (ClientPtr client) +{ + char n; + REQUEST(xLookupColorReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xLookupColorReq); + swapl(&stuff->cmap, n); + swaps(&stuff->nbytes, n); + return((* ProcVector[X_LookupColor])(client)); +} + +int +SProcCreateCursor (ClientPtr client) +{ + char n; + REQUEST(xCreateCursorReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xCreateCursorReq); + swapl(&stuff->cid, n); + swapl(&stuff->source, n); + swapl(&stuff->mask, n); + swaps(&stuff->foreRed, n); + swaps(&stuff->foreGreen, n); + swaps(&stuff->foreBlue, n); + swaps(&stuff->backRed, n); + swaps(&stuff->backGreen, n); + swaps(&stuff->backBlue, n); + swaps(&stuff->x, n); + swaps(&stuff->y, n); + return((* ProcVector[X_CreateCursor])(client)); +} + +int +SProcCreateGlyphCursor (ClientPtr client) +{ + char n; + REQUEST(xCreateGlyphCursorReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xCreateGlyphCursorReq); + swapl(&stuff->cid, n); + swapl(&stuff->source, n); + swapl(&stuff->mask, n); + swaps(&stuff->sourceChar, n); + swaps(&stuff->maskChar, n); + swaps(&stuff->foreRed, n); + swaps(&stuff->foreGreen, n); + swaps(&stuff->foreBlue, n); + swaps(&stuff->backRed, n); + swaps(&stuff->backGreen, n); + swaps(&stuff->backBlue, n); + return((* ProcVector[X_CreateGlyphCursor])(client)); +} + + +int +SProcRecolorCursor (ClientPtr client) +{ + char n; + REQUEST(xRecolorCursorReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xRecolorCursorReq); + swapl(&stuff->cursor, n); + swaps(&stuff->foreRed, n); + swaps(&stuff->foreGreen, n); + swaps(&stuff->foreBlue, n); + swaps(&stuff->backRed, n); + swaps(&stuff->backGreen, n); + swaps(&stuff->backBlue, n); + return((* ProcVector[X_RecolorCursor])(client)); +} + +int +SProcQueryBestSize (ClientPtr client) +{ + char n; + REQUEST(xQueryBestSizeReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xQueryBestSizeReq); + swapl(&stuff->drawable, n); + swaps(&stuff->width, n); + swaps(&stuff->height, n); + return((* ProcVector[X_QueryBestSize])(client)); + +} + +int +SProcQueryExtension (ClientPtr client) +{ + char n; + REQUEST(xQueryExtensionReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xQueryExtensionReq); + swaps(&stuff->nbytes, n); + return((* ProcVector[X_QueryExtension])(client)); +} + +int +SProcChangeKeyboardMapping (ClientPtr client) +{ + char n; + REQUEST(xChangeKeyboardMappingReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq); + SwapRestL(stuff); + return((* ProcVector[X_ChangeKeyboardMapping])(client)); +} + + +int +SProcChangeKeyboardControl (ClientPtr client) +{ + char n; + REQUEST(xChangeKeyboardControlReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq); + swapl(&stuff->mask, n); + SwapRestL(stuff); + return((* ProcVector[X_ChangeKeyboardControl])(client)); +} + +int +SProcChangePointerControl (ClientPtr client) +{ + char n; + REQUEST(xChangePointerControlReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xChangePointerControlReq); + swaps(&stuff->accelNum, n); + swaps(&stuff->accelDenum, n); + swaps(&stuff->threshold, n); + return((* ProcVector[X_ChangePointerControl])(client)); +} + + +int +SProcSetScreenSaver (ClientPtr client) +{ + char n; + REQUEST(xSetScreenSaverReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xSetScreenSaverReq); + swaps(&stuff->timeout, n); + swaps(&stuff->interval, n); + return((* ProcVector[X_SetScreenSaver])(client)); +} + +int +SProcChangeHosts (ClientPtr client) +{ + char n; + + REQUEST(xChangeHostsReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xChangeHostsReq); + swaps(&stuff->hostLength, n); + return((* ProcVector[X_ChangeHosts])(client)); + +} + +int SProcRotateProperties (ClientPtr client) +{ + char n; + REQUEST(xRotatePropertiesReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xRotatePropertiesReq); + swapl(&stuff->window, n); + swaps(&stuff->nAtoms, n); + swaps(&stuff->nPositions, n); + SwapRestL(stuff); + return ((* ProcVector[X_RotateProperties])(client)); +} + +int +SProcNoOperation(ClientPtr client) +{ + char n; + REQUEST(xReq); + swaps(&stuff->length, n); + return ((* ProcVector[X_NoOperation])(client)); +} + +void +SwapConnClientPrefix(xConnClientPrefix *pCCP) +{ + char n; + + swaps(&pCCP->majorVersion, n); + swaps(&pCCP->minorVersion, n); + swaps(&pCCP->nbytesAuthProto, n); + swaps(&pCCP->nbytesAuthString, n); +} diff --git a/xorg-server-1.4/dix/tables.c b/xorg-server-1.4/dix/tables.c new file mode 100644 index 0000000..2200e3c --- /dev/null +++ b/xorg-server-1.4/dix/tables.c @@ -0,0 +1,512 @@ +/*********************************************************** + +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 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. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#define NEED_EVENTS +#define NEED_REPLIES +#include +#include "windowstr.h" +#include "extnsionst.h" +#include "dixstruct.h" +#include "dixevents.h" +#include "dispatch.h" +#include "swaprep.h" +#include "swapreq.h" + +int (* InitialVector[3]) ( + ClientPtr /* client */ + ) = +{ + 0, + ProcInitialConnection, + ProcEstablishConnection +}; + +_X_EXPORT int (* ProcVector[256]) ( + ClientPtr /* client */ + ) = +{ + ProcBadRequest, + ProcCreateWindow, + ProcChangeWindowAttributes, + ProcGetWindowAttributes, + ProcDestroyWindow, + ProcDestroySubwindows, /* 5 */ + ProcChangeSaveSet, + ProcReparentWindow, + ProcMapWindow, + ProcMapSubwindows, + ProcUnmapWindow, /* 10 */ + ProcUnmapSubwindows, + ProcConfigureWindow, + ProcCirculateWindow, + ProcGetGeometry, + ProcQueryTree, /* 15 */ + ProcInternAtom, + ProcGetAtomName, + ProcChangeProperty, + ProcDeleteProperty, + ProcGetProperty, /* 20 */ + ProcListProperties, + ProcSetSelectionOwner, + ProcGetSelectionOwner, + ProcConvertSelection, + ProcSendEvent, /* 25 */ + ProcGrabPointer, + ProcUngrabPointer, + ProcGrabButton, + ProcUngrabButton, + ProcChangeActivePointerGrab, /* 30 */ + ProcGrabKeyboard, + ProcUngrabKeyboard, + ProcGrabKey, + ProcUngrabKey, + ProcAllowEvents, /* 35 */ + ProcGrabServer, + ProcUngrabServer, + ProcQueryPointer, + ProcGetMotionEvents, + ProcTranslateCoords, /* 40 */ + ProcWarpPointer, + ProcSetInputFocus, + ProcGetInputFocus, + ProcQueryKeymap, + ProcOpenFont, /* 45 */ + ProcCloseFont, + ProcQueryFont, + ProcQueryTextExtents, + ProcListFonts, + ProcListFontsWithInfo, /* 50 */ + ProcSetFontPath, + ProcGetFontPath, + ProcCreatePixmap, + ProcFreePixmap, + ProcCreateGC, /* 55 */ + ProcChangeGC, + ProcCopyGC, + ProcSetDashes, + ProcSetClipRectangles, + ProcFreeGC, /* 60 */ + ProcClearToBackground, + ProcCopyArea, + ProcCopyPlane, + ProcPolyPoint, + ProcPolyLine, /* 65 */ + ProcPolySegment, + ProcPolyRectangle, + ProcPolyArc, + ProcFillPoly, + ProcPolyFillRectangle, /* 70 */ + ProcPolyFillArc, + ProcPutImage, + ProcGetImage, + ProcPolyText, + ProcPolyText, /* 75 */ + ProcImageText8, + ProcImageText16, + ProcCreateColormap, + ProcFreeColormap, + ProcCopyColormapAndFree, /* 80 */ + ProcInstallColormap, + ProcUninstallColormap, + ProcListInstalledColormaps, + ProcAllocColor, + ProcAllocNamedColor, /* 85 */ + ProcAllocColorCells, + ProcAllocColorPlanes, + ProcFreeColors, + ProcStoreColors, + ProcStoreNamedColor, /* 90 */ + ProcQueryColors, + ProcLookupColor, + ProcCreateCursor, + ProcCreateGlyphCursor, + ProcFreeCursor, /* 95 */ + ProcRecolorCursor, + ProcQueryBestSize, + ProcQueryExtension, + ProcListExtensions, + ProcChangeKeyboardMapping, /* 100 */ + ProcGetKeyboardMapping, + ProcChangeKeyboardControl, + ProcGetKeyboardControl, + ProcBell, + ProcChangePointerControl, /* 105 */ + ProcGetPointerControl, + ProcSetScreenSaver, + ProcGetScreenSaver, + ProcChangeHosts, + ProcListHosts, /* 110 */ + ProcChangeAccessControl, + ProcChangeCloseDownMode, + ProcKillClient, + ProcRotateProperties, + ProcForceScreenSaver, /* 115 */ + ProcSetPointerMapping, + ProcGetPointerMapping, + ProcSetModifierMapping, + ProcGetModifierMapping, + 0, /* 120 */ + 0, + 0, + 0, + 0, + 0, /* 125 */ + 0, + ProcNoOperation +}; + +int (* SwappedProcVector[256]) ( + ClientPtr /* client */ + ) = +{ + ProcBadRequest, + SProcCreateWindow, + SProcChangeWindowAttributes, + SProcResourceReq, /* GetWindowAttributes */ + SProcResourceReq, /* DestroyWindow */ + SProcResourceReq, /* 5 DestroySubwindows */ + SProcResourceReq, /* SProcChangeSaveSet, */ + SProcReparentWindow, + SProcResourceReq, /* MapWindow */ + SProcResourceReq, /* MapSubwindows */ + SProcResourceReq, /* 10 UnmapWindow */ + SProcResourceReq, /* UnmapSubwindows */ + SProcConfigureWindow, + SProcResourceReq, /* SProcCirculateWindow, */ + SProcResourceReq, /* GetGeometry */ + SProcResourceReq, /* 15 QueryTree */ + SProcInternAtom, + SProcResourceReq, /* SProcGetAtomName, */ + SProcChangeProperty, + SProcDeleteProperty, + SProcGetProperty, /* 20 */ + SProcResourceReq, /* SProcListProperties, */ + SProcSetSelectionOwner, + SProcResourceReq, /* SProcGetSelectionOwner, */ + SProcConvertSelection, + SProcSendEvent, /* 25 */ + SProcGrabPointer, + SProcResourceReq, /* SProcUngrabPointer, */ + SProcGrabButton, + SProcUngrabButton, + SProcChangeActivePointerGrab, /* 30 */ + SProcGrabKeyboard, + SProcResourceReq, /* SProcUngrabKeyboard, */ + SProcGrabKey, + SProcUngrabKey, + SProcResourceReq, /* 35 SProcAllowEvents, */ + SProcSimpleReq, /* SProcGrabServer, */ + SProcSimpleReq, /* SProcUngrabServer, */ + SProcResourceReq, /* SProcQueryPointer, */ + SProcGetMotionEvents, + SProcTranslateCoords, /*40 */ + SProcWarpPointer, + SProcSetInputFocus, + SProcSimpleReq, /* SProcGetInputFocus, */ + SProcSimpleReq, /* QueryKeymap, */ + SProcOpenFont, /* 45 */ + SProcResourceReq, /* SProcCloseFont, */ + SProcResourceReq, /* SProcQueryFont, */ + SProcResourceReq, /* SProcQueryTextExtents, */ + SProcListFonts, + SProcListFontsWithInfo, /* 50 */ + SProcSetFontPath, + SProcSimpleReq, /* GetFontPath, */ + SProcCreatePixmap, + SProcResourceReq, /* SProcFreePixmap, */ + SProcCreateGC, /* 55 */ + SProcChangeGC, + SProcCopyGC, + SProcSetDashes, + SProcSetClipRectangles, + SProcResourceReq, /* 60 SProcFreeGC, */ + SProcClearToBackground, + SProcCopyArea, + SProcCopyPlane, + SProcPoly, /* PolyPoint, */ + SProcPoly, /* 65 PolyLine */ + SProcPoly, /* PolySegment, */ + SProcPoly, /* PolyRectangle, */ + SProcPoly, /* PolyArc, */ + SProcFillPoly, + SProcPoly, /* 70 PolyFillRectangle */ + SProcPoly, /* PolyFillArc, */ + SProcPutImage, + SProcGetImage, + SProcPolyText, + SProcPolyText, /* 75 */ + SProcImageText, + SProcImageText, + SProcCreateColormap, + SProcResourceReq, /* SProcFreeColormap, */ + SProcCopyColormapAndFree, /* 80 */ + SProcResourceReq, /* SProcInstallColormap, */ + SProcResourceReq, /* SProcUninstallColormap, */ + SProcResourceReq, /* SProcListInstalledColormaps, */ + SProcAllocColor, + SProcAllocNamedColor, /* 85 */ + SProcAllocColorCells, + SProcAllocColorPlanes, + SProcFreeColors, + SProcStoreColors, + SProcStoreNamedColor, /* 90 */ + SProcQueryColors, + SProcLookupColor, + SProcCreateCursor, + SProcCreateGlyphCursor, + SProcResourceReq, /* 95 SProcFreeCursor, */ + SProcRecolorCursor, + SProcQueryBestSize, + SProcQueryExtension, + SProcSimpleReq, /* ListExtensions, */ + SProcChangeKeyboardMapping, /* 100 */ + SProcSimpleReq, /* GetKeyboardMapping, */ + SProcChangeKeyboardControl, + SProcSimpleReq, /* GetKeyboardControl, */ + SProcSimpleReq, /* Bell, */ + SProcChangePointerControl, /* 105 */ + SProcSimpleReq, /* GetPointerControl, */ + SProcSetScreenSaver, + SProcSimpleReq, /* GetScreenSaver, */ + SProcChangeHosts, + SProcSimpleReq, /* 110 ListHosts, */ + SProcSimpleReq, /* SProcChangeAccessControl, */ + SProcSimpleReq, /* SProcChangeCloseDownMode, */ + SProcResourceReq, /* SProcKillClient, */ + SProcRotateProperties, + SProcSimpleReq, /* 115 ForceScreenSaver */ + SProcSimpleReq, /* SetPointerMapping, */ + SProcSimpleReq, /* GetPointerMapping, */ + SProcSimpleReq, /* SetModifierMapping, */ + SProcSimpleReq, /* GetModifierMapping, */ + 0, /* 120 */ + 0, + 0, + 0, + 0, + 0, /* 125 */ + 0, + SProcNoOperation +}; + +_X_EXPORT EventSwapPtr EventSwapVector[128] = +{ + (EventSwapPtr)SErrorEvent, + NotImplemented, + SKeyButtonPtrEvent, + SKeyButtonPtrEvent, + SKeyButtonPtrEvent, + SKeyButtonPtrEvent, /* 5 */ + SKeyButtonPtrEvent, + SEnterLeaveEvent, + SEnterLeaveEvent, + SFocusEvent, + SFocusEvent, /* 10 */ + SKeymapNotifyEvent, + SExposeEvent, + SGraphicsExposureEvent, + SNoExposureEvent, + SVisibilityEvent, /* 15 */ + SCreateNotifyEvent, + SDestroyNotifyEvent, + SUnmapNotifyEvent, + SMapNotifyEvent, + SMapRequestEvent, /* 20 */ + SReparentEvent, + SConfigureNotifyEvent, + SConfigureRequestEvent, + SGravityEvent, + SResizeRequestEvent, /* 25 */ + SCirculateEvent, + SCirculateEvent, + SPropertyEvent, + SSelectionClearEvent, + SSelectionRequestEvent, /* 30 */ + SSelectionNotifyEvent, + SColormapEvent, + SClientMessageEvent, + SMappingEvent, +}; + + +_X_EXPORT ReplySwapPtr ReplySwapVector[256] = +{ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + (ReplySwapPtr)SGetWindowAttributesReply, + ReplyNotSwappd, + ReplyNotSwappd, /* 5 */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 10 */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + (ReplySwapPtr)SGetGeometryReply, + (ReplySwapPtr)SQueryTreeReply, /* 15 */ + (ReplySwapPtr)SInternAtomReply, + (ReplySwapPtr)SGetAtomNameReply, + ReplyNotSwappd, + ReplyNotSwappd, + (ReplySwapPtr)SGetPropertyReply, /* 20 */ + (ReplySwapPtr)SListPropertiesReply, + ReplyNotSwappd, + (ReplySwapPtr)SGetSelectionOwnerReply, + ReplyNotSwappd, + ReplyNotSwappd, /* 25 */ + (ReplySwapPtr)SGenericReply, /* SGrabPointerReply, */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 30 */ + (ReplySwapPtr)SGenericReply, /* SGrabKeyboardReply, */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 35 */ + ReplyNotSwappd, + ReplyNotSwappd, + (ReplySwapPtr)SQueryPointerReply, + (ReplySwapPtr)SGetMotionEventsReply, + (ReplySwapPtr)STranslateCoordsReply, /* 40 */ + ReplyNotSwappd, + ReplyNotSwappd, + (ReplySwapPtr)SGetInputFocusReply, + (ReplySwapPtr)SQueryKeymapReply, + ReplyNotSwappd, /* 45 */ + ReplyNotSwappd, + (ReplySwapPtr)SQueryFontReply, + (ReplySwapPtr)SQueryTextExtentsReply, + (ReplySwapPtr)SListFontsReply, + (ReplySwapPtr)SListFontsWithInfoReply, /* 50 */ + ReplyNotSwappd, + (ReplySwapPtr)SGetFontPathReply, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 55 */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 60 */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 65 */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 70 */ + ReplyNotSwappd, + ReplyNotSwappd, + (ReplySwapPtr)SGetImageReply, + ReplyNotSwappd, + ReplyNotSwappd, /* 75 */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 80 */ + ReplyNotSwappd, + ReplyNotSwappd, + (ReplySwapPtr)SListInstalledColormapsReply, + (ReplySwapPtr)SAllocColorReply, + (ReplySwapPtr)SAllocNamedColorReply, /* 85 */ + (ReplySwapPtr)SAllocColorCellsReply, + (ReplySwapPtr)SAllocColorPlanesReply, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 90 */ + (ReplySwapPtr)SQueryColorsReply, + (ReplySwapPtr)SLookupColorReply, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 95 */ + ReplyNotSwappd, + (ReplySwapPtr)SQueryBestSizeReply, + (ReplySwapPtr)SGenericReply, /* SQueryExtensionReply, */ + (ReplySwapPtr)SListExtensionsReply, + ReplyNotSwappd, /* 100 */ + (ReplySwapPtr)SGetKeyboardMappingReply, + ReplyNotSwappd, + (ReplySwapPtr)SGetKeyboardControlReply, + ReplyNotSwappd, + ReplyNotSwappd, /* 105 */ + (ReplySwapPtr)SGetPointerControlReply, + ReplyNotSwappd, + (ReplySwapPtr)SGetScreenSaverReply, + ReplyNotSwappd, + (ReplySwapPtr)SListHostsReply, /* 110 */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 115 */ + (ReplySwapPtr)SGenericReply, /* SetPointerMapping */ + (ReplySwapPtr)SGetPointerMappingReply, + (ReplySwapPtr)SGenericReply, /* SetModifierMapping */ + (ReplySwapPtr)SGetModifierMappingReply, /* 119 */ + ReplyNotSwappd, /* 120 */ + ReplyNotSwappd, /* 121 */ + ReplyNotSwappd, /* 122 */ + ReplyNotSwappd, /* 123 */ + ReplyNotSwappd, /* 124 */ + ReplyNotSwappd, /* 125 */ + ReplyNotSwappd, /* 126 */ + ReplyNotSwappd, /* NoOperation */ + ReplyNotSwappd +}; diff --git a/xorg-server-1.4/dix/window.c b/xorg-server-1.4/dix/window.c new file mode 100644 index 0000000..be4ea2c --- /dev/null +++ b/xorg-server-1.4/dix/window.c @@ -0,0 +1,3889 @@ +/* + +Copyright (c) 2006, 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. + +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 +RED HAT 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 Red Hat shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from Red Hat. + +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 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. + +*/ + +/* The panoramix components contained the following notice */ +/***************************************************************** + +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. + +******************************************************************/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "misc.h" +#include "scrnintstr.h" +#include "os.h" +#include "regionstr.h" +#include "validate.h" +#include "windowstr.h" +#include "input.h" +#include "resource.h" +#include "colormapst.h" +#include "cursorstr.h" +#include "dixstruct.h" +#include "gcstruct.h" +#include "servermd.h" +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif +#include "dixevents.h" +#include "globals.h" + +#ifdef XAPPGROUP +#include "appgroup.h" +#endif +#include "xace.h" + +/****** + * Window stuff for server + * + * CreateRootWindow, CreateWindow, ChangeWindowAttributes, + * GetWindowAttributes, DeleteWindow, DestroySubWindows, + * HandleSaveSet, ReparentWindow, MapWindow, MapSubWindows, + * UnmapWindow, UnmapSubWindows, ConfigureWindow, CirculateWindow, + * + ******/ + +static unsigned char _back_lsb[4] = {0x88, 0x22, 0x44, 0x11}; +static unsigned char _back_msb[4] = {0x11, 0x44, 0x22, 0x88}; + +_X_EXPORT int screenIsSaved = SCREEN_SAVER_OFF; + +_X_EXPORT ScreenSaverStuffRec savedScreenInfo[MAXSCREENS]; + +#if 0 +extern void DeleteWindowFromAnyEvents(); +extern Mask EventMaskForClient(); +extern void WindowHasNewCursor(); +extern void RecalculateDeliverableEvents(); +#endif + +static Bool TileScreenSaver(int i, int kind); + + +#define INPUTONLY_LEGAL_MASK (CWWinGravity | CWEventMask | \ + CWDontPropagate | CWOverrideRedirect | CWCursor ) + +#define BOXES_OVERLAP(b1, b2) \ + (!( ((b1)->x2 <= (b2)->x1) || \ + ( ((b1)->x1 >= (b2)->x2)) || \ + ( ((b1)->y2 <= (b2)->y1)) || \ + ( ((b1)->y1 >= (b2)->y2)) ) ) + +#define RedirectSend(pWin) \ + ((pWin->eventMask|wOtherEventMasks(pWin)) & SubstructureRedirectMask) + +#define SubSend(pWin) \ + ((pWin->eventMask|wOtherEventMasks(pWin)) & SubstructureNotifyMask) + +#define StrSend(pWin) \ + ((pWin->eventMask|wOtherEventMasks(pWin)) & StructureNotifyMask) + +#define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent)) + + +_X_EXPORT int numSaveUndersViewable = 0; +_X_EXPORT int deltaSaveUndersViewable = 0; + +#ifdef DEBUG +/****** + * PrintWindowTree + * For debugging only + ******/ + +static void +PrintChildren(WindowPtr p1, int indent) +{ + WindowPtr p2; + int i; + + while (p1) + { + p2 = p1->firstChild; + for (i=0; idrawable.id); + miPrintRegion(&p1->clipList); + PrintChildren(p2, indent+4); + p1 = p1->nextSib; + } +} + +static void +PrintWindowTree(void) +{ + int i; + WindowPtr pWin, p1; + + for (i=0; iclipList); + p1 = pWin->firstChild; + PrintChildren(p1, 4); + } +} +#endif + +_X_EXPORT int +TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data) +{ + int result; + WindowPtr pChild; + + if (!(pChild = pWin)) + return(WT_NOMATCH); + while (1) + { + result = (* func)(pChild, data); + if (result == WT_STOPWALKING) + return(WT_STOPWALKING); + if ((result == WT_WALKCHILDREN) && pChild->firstChild) + { + pChild = pChild->firstChild; + continue; + } + while (!pChild->nextSib && (pChild != pWin)) + pChild = pChild->parent; + if (pChild == pWin) + break; + pChild = pChild->nextSib; + } + return(WT_NOMATCH); +} + +/***** + * WalkTree + * Walk the window tree, for SCREEN, preforming FUNC(pWin, data) on + * each window. If FUNC returns WT_WALKCHILDREN, traverse the children, + * if it returns WT_DONTWALKCHILDREN, dont. If it returns WT_STOPWALKING + * exit WalkTree. Does depth-first traverse. + *****/ + +_X_EXPORT int +WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, pointer data) +{ + return(TraverseTree(WindowTable[pScreen->myNum], func, data)); +} + +/* hack for forcing backing store on all windows */ +int defaultBackingStore = NotUseful; +/* hack to force no backing store */ +Bool disableBackingStore = FALSE; +Bool enableBackingStore = FALSE; +/* hack to force no save unders */ +Bool disableSaveUnders = FALSE; + +static void +SetWindowToDefaults(WindowPtr pWin) +{ + pWin->prevSib = NullWindow; + pWin->firstChild = NullWindow; + pWin->lastChild = NullWindow; + + pWin->valdata = (ValidatePtr)NULL; + pWin->optional = (WindowOptPtr)NULL; + pWin->cursorIsNone = TRUE; + + pWin->backingStore = NotUseful; + pWin->DIXsaveUnder = FALSE; + pWin->backStorage = (pointer) NULL; + + pWin->mapped = FALSE; /* off */ + pWin->realized = FALSE; /* off */ + pWin->viewable = FALSE; + pWin->visibility = VisibilityNotViewable; + pWin->overrideRedirect = FALSE; + pWin->saveUnder = FALSE; + + pWin->bitGravity = ForgetGravity; + pWin->winGravity = NorthWestGravity; + + pWin->eventMask = 0; + pWin->deliverableEvents = 0; + pWin->dontPropagate = 0; + pWin->forcedBS = FALSE; +#ifdef COMPOSITE + pWin->redirectDraw = RedirectDrawNone; +#endif +} + +static void +MakeRootTile(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + GCPtr pGC; + unsigned char back[128]; + int len = BitmapBytePad(sizeof(long)); + unsigned char *from, *to; + int i, j; + + pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4, + pScreen->rootDepth); + + pWin->backgroundState = BackgroundPixmap; + pGC = GetScratchGC(pScreen->rootDepth, pScreen); + if (!pWin->background.pixmap || !pGC) + FatalError("could not create root tile"); + + { + CARD32 attributes[2]; + + attributes[0] = pScreen->whitePixel; + attributes[1] = pScreen->blackPixel; + + (void)ChangeGC(pGC, GCForeground | GCBackground, attributes); + } + + ValidateGC((DrawablePtr)pWin->background.pixmap, pGC); + + from = (screenInfo.bitmapBitOrder == LSBFirst) ? _back_lsb : _back_msb; + to = back; + + for (i = 4; i > 0; i--, from++) + for (j = len; j > 0; j--) + *to++ = *from; + + (*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap, pGC, 1, + 0, 0, len, 4, 0, XYBitmap, (char *)back); + + FreeScratchGC(pGC); + +} + +WindowPtr +AllocateWindow(ScreenPtr pScreen) +{ + WindowPtr pWin; + char *ptr; + DevUnion *ppriv; + unsigned *sizes; + unsigned size; + int i; + + pWin = (WindowPtr)xalloc(pScreen->totalWindowSize); + if (pWin) + { + ppriv = (DevUnion *)(pWin + 1); + pWin->devPrivates = ppriv; + sizes = pScreen->WindowPrivateSizes; + ptr = (char *)(ppriv + pScreen->WindowPrivateLen); + for (i = pScreen->WindowPrivateLen; --i >= 0; ppriv++, sizes++) + { + if ( (size = *sizes) ) + { + ppriv->ptr = (pointer)ptr; + ptr += size; + } + else + ppriv->ptr = (pointer)NULL; + } +#if _XSERVER64 + pWin->drawable.pad0 = 0; + pWin->drawable.pad1 = 0; +#endif + } + return pWin; +} + +/***** + * CreateRootWindow + * Makes a window at initialization time for specified screen + *****/ + +Bool +CreateRootWindow(ScreenPtr pScreen) +{ + WindowPtr pWin; + BoxRec box; + PixmapFormatRec *format; + + pWin = AllocateWindow(pScreen); + if (!pWin) + return FALSE; + + savedScreenInfo[pScreen->myNum].pWindow = NULL; + savedScreenInfo[pScreen->myNum].wid = FakeClientID(0); + savedScreenInfo[pScreen->myNum].ExternalScreenSaver = NULL; + screenIsSaved = SCREEN_SAVER_OFF; + + WindowTable[pScreen->myNum] = pWin; + + pWin->drawable.pScreen = pScreen; + pWin->drawable.type = DRAWABLE_WINDOW; + + pWin->drawable.depth = pScreen->rootDepth; + for (format = screenInfo.formats; + format->depth != pScreen->rootDepth; + format++) + ; + pWin->drawable.bitsPerPixel = format->bitsPerPixel; + + pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; + + pWin->parent = NullWindow; + SetWindowToDefaults(pWin); + + pWin->optional = (WindowOptRec *) xalloc (sizeof (WindowOptRec)); + if (!pWin->optional) + return FALSE; + + pWin->optional->dontPropagateMask = 0; + pWin->optional->otherEventMasks = 0; + pWin->optional->otherClients = NULL; + pWin->optional->passiveGrabs = NULL; + pWin->optional->userProps = NULL; + pWin->optional->backingBitPlanes = ~0L; + pWin->optional->backingPixel = 0; +#ifdef SHAPE + pWin->optional->boundingShape = NULL; + pWin->optional->clipShape = NULL; + pWin->optional->inputShape = NULL; +#endif +#ifdef XINPUT + pWin->optional->inputMasks = NULL; +#endif + pWin->optional->colormap = pScreen->defColormap; + pWin->optional->visual = pScreen->rootVisual; + + pWin->nextSib = NullWindow; + + pWin->drawable.id = FakeClientID(0); + + pWin->origin.x = pWin->origin.y = 0; + pWin->drawable.height = pScreen->height; + pWin->drawable.width = pScreen->width; + pWin->drawable.x = pWin->drawable.y = 0; + + box.x1 = 0; + box.y1 = 0; + box.x2 = pScreen->width; + box.y2 = pScreen->height; + REGION_INIT(pScreen, &pWin->clipList, &box, 1); + REGION_INIT(pScreen, &pWin->winSize, &box, 1); + REGION_INIT(pScreen, &pWin->borderSize, &box, 1); + REGION_INIT(pScreen, &pWin->borderClip, &box, 1); + + pWin->drawable.class = InputOutput; + pWin->optional->visual = pScreen->rootVisual; + + pWin->backgroundState = BackgroundPixel; + pWin->background.pixel = pScreen->whitePixel; + + pWin->borderIsPixel = TRUE; + pWin->border.pixel = pScreen->blackPixel; + pWin->borderWidth = 0; + + if (!AddResource(pWin->drawable.id, RT_WINDOW, (pointer)pWin)) + return FALSE; + + if (disableBackingStore) + pScreen->backingStoreSupport = NotUseful; + if (enableBackingStore) + pScreen->backingStoreSupport = Always; + +#ifdef DO_SAVE_UNDERS + if ((pScreen->backingStoreSupport != NotUseful) && + (pScreen->saveUnderSupport == NotUseful)) + { + /* + * If the screen has backing-store but no save-unders, let the + * clients know we can support save-unders using backing-store. + */ + pScreen->saveUnderSupport = USE_DIX_SAVE_UNDERS; + } +#endif /* DO_SAVE_UNDERS */ + + if (disableSaveUnders) + pScreen->saveUnderSupport = NotUseful; + + return TRUE; +} + +void +InitRootWindow(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + int backFlag = CWBorderPixel | CWCursor | CWBackingStore; + + if (!(*pScreen->CreateWindow)(pWin)) + return; /* XXX */ + (*pScreen->PositionWindow)(pWin, 0, 0); + + pWin->cursorIsNone = FALSE; + pWin->optional->cursor = rootCursor; + rootCursor->refcnt++; + + if (!blackRoot && !whiteRoot) { + MakeRootTile(pWin); + backFlag |= CWBackPixmap; + } + else { + if (blackRoot) + pWin->background.pixel = pScreen->blackPixel; + else + pWin->background.pixel = pScreen->whitePixel; + backFlag |= CWBackPixel; + } + + pWin->backingStore = defaultBackingStore; + pWin->forcedBS = (defaultBackingStore != NotUseful); + /* We SHOULD check for an error value here XXX */ + (*pScreen->ChangeWindowAttributes)(pWin, backFlag); + + XaceHook(XACE_WINDOW_INIT, serverClient, pWin); + + MapWindow(pWin, serverClient); +} + +/* Set the region to the intersection of the rectangle and the + * window's winSize. The window is typically the parent of the + * window from which the region came. + */ + +static void +ClippedRegionFromBox(WindowPtr pWin, RegionPtr Rgn, + int x, int y, + int w, int h) +{ + ScreenPtr pScreen; + BoxRec box; + + pScreen = pWin->drawable.pScreen; + + box = *(REGION_EXTENTS(pScreen, &pWin->winSize)); + /* we do these calculations to avoid overflows */ + if (x > box.x1) + box.x1 = x; + if (y > box.y1) + box.y1 = y; + x += w; + if (x < box.x2) + box.x2 = x; + y += h; + if (y < box.y2) + box.y2 = y; + if (box.x1 > box.x2) + box.x2 = box.x1; + if (box.y1 > box.y2) + box.y2 = box.y1; + REGION_RESET(pScreen, Rgn, &box); + REGION_INTERSECT(pScreen, Rgn, Rgn, &pWin->winSize); +} + +static RealChildHeadProc realChildHeadProc = NULL; + +void +RegisterRealChildHeadProc (RealChildHeadProc proc) +{ + realChildHeadProc = proc; +} + + +WindowPtr +RealChildHead(WindowPtr pWin) +{ + if (realChildHeadProc) { + return realChildHeadProc (pWin); + } + + if (!pWin->parent && + (screenIsSaved == SCREEN_SAVER_ON) && + (HasSaverWindow (pWin->drawable.pScreen->myNum))) + return (pWin->firstChild); + else + return (NullWindow); +} + +/***** + * CreateWindow + * Makes a window in response to client request + *****/ + +_X_EXPORT WindowPtr +CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, + unsigned h, unsigned bw, unsigned class, Mask vmask, XID *vlist, + int depth, ClientPtr client, VisualID visual, int *error) +{ + WindowPtr pWin; + WindowPtr pHead; + ScreenPtr pScreen; + xEvent event; + int idepth, ivisual; + Bool fOK; + DepthPtr pDepth; + PixmapFormatRec *format; + WindowOptPtr ancwopt; + + if (class == CopyFromParent) + class = pParent->drawable.class; + + if ((class != InputOutput) && (class != InputOnly)) + { + *error = BadValue; + client->errorValue = class; + return NullWindow; + } + + if ((class != InputOnly) && (pParent->drawable.class == InputOnly)) + { + *error = BadMatch; + return NullWindow; + } + + if ((class == InputOnly) && ((bw != 0) || (depth != 0))) + { + *error = BadMatch; + return NullWindow; + } + + pScreen = pParent->drawable.pScreen; + if ((class == InputOutput) && (depth == 0)) + depth = pParent->drawable.depth; + ancwopt = pParent->optional; + if (!ancwopt) + ancwopt = FindWindowWithOptional(pParent)->optional; + if (visual == CopyFromParent) { +#ifdef XAPPGROUP + VisualID ag_visual; + + if (client->appgroup && !pParent->parent && + (ag_visual = XagRootVisual (client))) + visual = ag_visual; + else +#endif + visual = ancwopt->visual; + } + + /* Find out if the depth and visual are acceptable for this Screen */ + if ((visual != ancwopt->visual) || (depth != pParent->drawable.depth)) + { + fOK = FALSE; + for(idepth = 0; idepth < pScreen->numDepths; idepth++) + { + pDepth = (DepthPtr) &pScreen->allowedDepths[idepth]; + if ((depth == pDepth->depth) || (depth == 0)) + { + for (ivisual = 0; ivisual < pDepth->numVids; ivisual++) + { + if (visual == pDepth->vids[ivisual]) + { + fOK = TRUE; + break; + } + } + } + } + if (fOK == FALSE) + { + *error = BadMatch; + return NullWindow; + } + } + + if (((vmask & (CWBorderPixmap | CWBorderPixel)) == 0) && + (class != InputOnly) && + (depth != pParent->drawable.depth)) + { + *error = BadMatch; + return NullWindow; + } + + if (((vmask & CWColormap) == 0) && + (class != InputOnly) && + ((visual != ancwopt->visual) || (ancwopt->colormap == None))) + { + *error = BadMatch; + return NullWindow; + } + + pWin = AllocateWindow(pScreen); + if (!pWin) + { + *error = BadAlloc; + return NullWindow; + } + pWin->drawable = pParent->drawable; + pWin->drawable.depth = depth; + if (depth == pParent->drawable.depth) + pWin->drawable.bitsPerPixel = pParent->drawable.bitsPerPixel; + else + { + for (format = screenInfo.formats; format->depth != depth; format++) + ; + pWin->drawable.bitsPerPixel = format->bitsPerPixel; + } + if (class == InputOnly) + pWin->drawable.type = (short) UNDRAWABLE_WINDOW; + pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; + + pWin->drawable.id = wid; + pWin->drawable.class = class; + + pWin->parent = pParent; + SetWindowToDefaults(pWin); + + if (visual != ancwopt->visual) + { + if (!MakeWindowOptional (pWin)) + { + xfree (pWin); + *error = BadAlloc; + return NullWindow; + } + pWin->optional->visual = visual; + pWin->optional->colormap = None; + } + + pWin->borderWidth = bw; + + /* can't let untrusted clients have background None windows; + * they make it too easy to steal window contents + */ + if (XaceHook(XACE_BACKGRND_ACCESS, client, pWin)) + pWin->backgroundState = None; + else { + pWin->backgroundState = BackgroundPixel; + pWin->background.pixel = 0; + } + + pWin->borderIsPixel = pParent->borderIsPixel; + pWin->border = pParent->border; + if (pWin->borderIsPixel == FALSE) + pWin->border.pixmap->refcnt++; + + pWin->origin.x = x + (int)bw; + pWin->origin.y = y + (int)bw; + pWin->drawable.width = w; + pWin->drawable.height = h; + pWin->drawable.x = pParent->drawable.x + x + (int)bw; + pWin->drawable.y = pParent->drawable.y + y + (int)bw; + + /* set up clip list correctly for unobscured WindowPtr */ + REGION_NULL(pScreen, &pWin->clipList); + REGION_NULL(pScreen, &pWin->borderClip); + REGION_NULL(pScreen, &pWin->winSize); + REGION_NULL(pScreen, &pWin->borderSize); + + XaceHook(XACE_WINDOW_INIT, client, pWin); + + pHead = RealChildHead(pParent); + if (pHead) + { + pWin->nextSib = pHead->nextSib; + if (pHead->nextSib) + pHead->nextSib->prevSib = pWin; + else + pParent->lastChild = pWin; + pHead->nextSib = pWin; + pWin->prevSib = pHead; + } + else + { + pWin->nextSib = pParent->firstChild; + if (pParent->firstChild) + pParent->firstChild->prevSib = pWin; + else + pParent->lastChild = pWin; + pParent->firstChild = pWin; + } + + SetWinSize (pWin); + SetBorderSize (pWin); + + /* We SHOULD check for an error value here XXX */ + if (!(*pScreen->CreateWindow)(pWin)) + { + *error = BadAlloc; + DeleteWindow(pWin, None); + return NullWindow; + } + /* We SHOULD check for an error value here XXX */ + (*pScreen->PositionWindow)(pWin, pWin->drawable.x, pWin->drawable.y); + + if (!(vmask & CWEventMask)) + RecalculateDeliverableEvents(pWin); + + if (vmask) + *error = ChangeWindowAttributes(pWin, vmask, vlist, wClient (pWin)); + else + *error = Success; + + if (*error != Success) + { + DeleteWindow(pWin, None); + return NullWindow; + } + if (!(vmask & CWBackingStore) && (defaultBackingStore != NotUseful)) + { + XID value = defaultBackingStore; + (void)ChangeWindowAttributes(pWin, CWBackingStore, &value, wClient (pWin)); + pWin->forcedBS = TRUE; + } + + if (SubSend(pParent)) + { + event.u.u.type = CreateNotify; + event.u.createNotify.window = wid; + event.u.createNotify.parent = pParent->drawable.id; + event.u.createNotify.x = x; + event.u.createNotify.y = y; + event.u.createNotify.width = w; + event.u.createNotify.height = h; + event.u.createNotify.borderWidth = bw; + event.u.createNotify.override = pWin->overrideRedirect; + DeliverEvents(pParent, &event, 1, NullWindow); + } + return pWin; +} + +static void +DisposeWindowOptional (WindowPtr pWin) +{ + if (!pWin->optional) + return; + /* + * everything is peachy. Delete the optional record + * and clean up + */ + if (pWin->optional->cursor) + { + FreeCursor (pWin->optional->cursor, (Cursor)0); + pWin->cursorIsNone = FALSE; + } + else + pWin->cursorIsNone = TRUE; + xfree (pWin->optional); + pWin->optional = NULL; +} + +static void +FreeWindowResources(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + DeleteWindowFromAnySaveSet(pWin); + DeleteWindowFromAnySelections(pWin); + DeleteWindowFromAnyEvents(pWin, TRUE); + REGION_UNINIT(pScreen, &pWin->clipList); + REGION_UNINIT(pScreen, &pWin->winSize); + REGION_UNINIT(pScreen, &pWin->borderClip); + REGION_UNINIT(pScreen, &pWin->borderSize); +#ifdef SHAPE + if (wBoundingShape (pWin)) + REGION_DESTROY(pScreen, wBoundingShape (pWin)); + if (wClipShape (pWin)) + REGION_DESTROY(pScreen, wClipShape (pWin)); + if (wInputShape (pWin)) + REGION_DESTROY(pScreen, wInputShape (pWin)); +#endif + if (pWin->borderIsPixel == FALSE) + (*pScreen->DestroyPixmap)(pWin->border.pixmap); + if (pWin->backgroundState == BackgroundPixmap) + (*pScreen->DestroyPixmap)(pWin->background.pixmap); + + DeleteAllWindowProperties(pWin); + /* We SHOULD check for an error value here XXX */ + (*pScreen->DestroyWindow)(pWin); + DisposeWindowOptional (pWin); +} + +static void +CrushTree(WindowPtr pWin) +{ + WindowPtr pChild, pSib, pParent; + UnrealizeWindowProcPtr UnrealizeWindow; + xEvent event; + + if (!(pChild = pWin->firstChild)) + return; + UnrealizeWindow = pWin->drawable.pScreen->UnrealizeWindow; + while (1) + { + if (pChild->firstChild) + { + pChild = pChild->firstChild; + continue; + } + while (1) + { + pParent = pChild->parent; + if (SubStrSend(pChild, pParent)) + { + event.u.u.type = DestroyNotify; + event.u.destroyNotify.window = pChild->drawable.id; + DeliverEvents(pChild, &event, 1, NullWindow); + } + FreeResource(pChild->drawable.id, RT_WINDOW); + pSib = pChild->nextSib; +#ifdef DO_SAVE_UNDERS + if (pChild->saveUnder && pChild->viewable) + deltaSaveUndersViewable--; +#endif + pChild->viewable = FALSE; + if (pChild->realized) + { + pChild->realized = FALSE; + (*UnrealizeWindow)(pChild); + } + FreeWindowResources(pChild); + xfree(pChild); + if ( (pChild = pSib) ) + break; + pChild = pParent; + pChild->firstChild = NullWindow; + pChild->lastChild = NullWindow; + if (pChild == pWin) + return; + } + } +} + +/***** + * DeleteWindow + * Deletes child of window then window itself + * If wid is None, don't send any events + *****/ + +int +DeleteWindow(pointer value, XID wid) + { + WindowPtr pParent; + WindowPtr pWin = (WindowPtr)value; + xEvent event; + + UnmapWindow(pWin, FALSE); + + CrushTree(pWin); + + pParent = pWin->parent; + if (wid && pParent && SubStrSend(pWin, pParent)) + { + event.u.u.type = DestroyNotify; + event.u.destroyNotify.window = pWin->drawable.id; + DeliverEvents(pWin, &event, 1, NullWindow); + } + + FreeWindowResources(pWin); + if (pParent) + { + if (pParent->firstChild == pWin) + pParent->firstChild = pWin->nextSib; + if (pParent->lastChild == pWin) + pParent->lastChild = pWin->prevSib; + if (pWin->nextSib) + pWin->nextSib->prevSib = pWin->prevSib; + if (pWin->prevSib) + pWin->prevSib->nextSib = pWin->nextSib; + } + xfree(pWin); + return Success; +} + +void +DestroySubwindows(WindowPtr pWin, ClientPtr client) +{ + /* XXX + * The protocol is quite clear that each window should be + * destroyed in turn, however, unmapping all of the first + * eliminates most of the calls to ValidateTree. So, + * this implementation is incorrect in that all of the + * UnmapNotifies occur before all of the DestroyNotifies. + * If you care, simply delete the call to UnmapSubwindows. + */ + UnmapSubwindows(pWin); + while (pWin->lastChild) + FreeResource(pWin->lastChild->drawable.id, RT_NONE); +} + +#define DeviceEventMasks (KeyPressMask | KeyReleaseMask | ButtonPressMask | \ + ButtonReleaseMask | PointerMotionMask) + +/***** + * ChangeWindowAttributes + * + * The value-mask specifies which attributes are to be changed; the + * value-list contains one value for each one bit in the mask, from least + * to most significant bit in the mask. + *****/ + +_X_EXPORT int +ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) +{ + Mask index2; + XID *pVlist; + PixmapPtr pPixmap; + Pixmap pixID; + CursorPtr pCursor, pOldCursor; + Cursor cursorID; + WindowPtr pChild; + Colormap cmap; + ColormapPtr pCmap; + xEvent xE; + int result; + ScreenPtr pScreen; + Mask vmaskCopy = 0; + Mask tmask; + unsigned int val; + int error; + Bool checkOptional = FALSE; + Bool borderRelative = FALSE; + WindowPtr pLayerWin; + + if ((pWin->drawable.class == InputOnly) && (vmask & (~INPUTONLY_LEGAL_MASK))) + return BadMatch; + + error = Success; + pScreen = pWin->drawable.pScreen; + pVlist = vlist; + tmask = vmask; + while (tmask) + { + index2 = (Mask) lowbit (tmask); + tmask &= ~index2; + switch (index2) + { + case CWBackPixmap: + pixID = (Pixmap )*pVlist; + pVlist++; + if (pWin->backgroundState == ParentRelative) + borderRelative = TRUE; + if (pixID == None) + { + /* can't let untrusted clients have background None windows */ + if (XaceHook(XACE_BACKGRND_ACCESS, client, pWin)) { + if (pWin->backgroundState == BackgroundPixmap) + (*pScreen->DestroyPixmap)(pWin->background.pixmap); + if (!pWin->parent) + MakeRootTile(pWin); + else + pWin->backgroundState = None; + } else { + /* didn't change the backgrnd to None, so don't tell ddx */ + index2 = 0; + } + } + else if (pixID == ParentRelative) + { + if (pWin->parent && + pWin->drawable.depth != pWin->parent->drawable.depth) + { + error = BadMatch; + goto PatchUp; + } + if (pWin->backgroundState == BackgroundPixmap) + (*pScreen->DestroyPixmap)(pWin->background.pixmap); + if (!pWin->parent) + MakeRootTile(pWin); + else + pWin->backgroundState = ParentRelative; + borderRelative = TRUE; + /* Note that the parent's backgroundTile's refcnt is NOT + * incremented. */ + } + else + { + pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pixID, + RT_PIXMAP, DixReadAccess); + if (pPixmap != (PixmapPtr) NULL) + { + if ((pPixmap->drawable.depth != pWin->drawable.depth) || + (pPixmap->drawable.pScreen != pScreen)) + { + error = BadMatch; + goto PatchUp; + } + if (pWin->backgroundState == BackgroundPixmap) + (*pScreen->DestroyPixmap)(pWin->background.pixmap); + pWin->backgroundState = BackgroundPixmap; + pWin->background.pixmap = pPixmap; + pPixmap->refcnt++; + } + else + { + error = BadPixmap; + client->errorValue = pixID; + goto PatchUp; + } + } + break; + case CWBackPixel: + if (pWin->backgroundState == ParentRelative) + borderRelative = TRUE; + if (pWin->backgroundState == BackgroundPixmap) + (*pScreen->DestroyPixmap)(pWin->background.pixmap); + pWin->backgroundState = BackgroundPixel; + pWin->background.pixel = (CARD32 ) *pVlist; + /* background pixel overrides background pixmap, + so don't let the ddx layer see both bits */ + vmaskCopy &= ~CWBackPixmap; + pVlist++; + break; + case CWBorderPixmap: + pixID = (Pixmap ) *pVlist; + pVlist++; + if (pixID == CopyFromParent) + { + if (!pWin->parent || + (pWin->drawable.depth != pWin->parent->drawable.depth)) + { + error = BadMatch; + goto PatchUp; + } + if (pWin->borderIsPixel == FALSE) + (*pScreen->DestroyPixmap)(pWin->border.pixmap); + pWin->border = pWin->parent->border; + if ((pWin->borderIsPixel = pWin->parent->borderIsPixel) == TRUE) + { + index2 = CWBorderPixel; + } + else + { + pWin->parent->border.pixmap->refcnt++; + } + } + else + { + pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pixID, + RT_PIXMAP, DixReadAccess); + if (pPixmap) + { + if ((pPixmap->drawable.depth != pWin->drawable.depth) || + (pPixmap->drawable.pScreen != pScreen)) + { + error = BadMatch; + goto PatchUp; + } + if (pWin->borderIsPixel == FALSE) + (*pScreen->DestroyPixmap)(pWin->border.pixmap); + pWin->borderIsPixel = FALSE; + pWin->border.pixmap = pPixmap; + pPixmap->refcnt++; + } + else + { + error = BadPixmap; + client->errorValue = pixID; + goto PatchUp; + } + } + break; + case CWBorderPixel: + if (pWin->borderIsPixel == FALSE) + (*pScreen->DestroyPixmap)(pWin->border.pixmap); + pWin->borderIsPixel = TRUE; + pWin->border.pixel = (CARD32) *pVlist; + /* border pixel overrides border pixmap, + so don't let the ddx layer see both bits */ + vmaskCopy &= ~CWBorderPixmap; + pVlist++; + break; + case CWBitGravity: + val = (CARD8 )*pVlist; + pVlist++; + if (val > StaticGravity) + { + error = BadValue; + client->errorValue = val; + goto PatchUp; + } + pWin->bitGravity = val; + break; + case CWWinGravity: + val = (CARD8 )*pVlist; + pVlist++; + if (val > StaticGravity) + { + error = BadValue; + client->errorValue = val; + goto PatchUp; + } + pWin->winGravity = val; + break; + case CWBackingStore: + val = (CARD8 )*pVlist; + pVlist++; + if ((val != NotUseful) && (val != WhenMapped) && (val != Always)) + { + error = BadValue; + client->errorValue = val; + goto PatchUp; + } + pWin->backingStore = val; + pWin->forcedBS = FALSE; + break; + case CWBackingPlanes: + if (pWin->optional || ((CARD32)*pVlist != (CARD32)~0L)) { + if (!pWin->optional && !MakeWindowOptional (pWin)) + { + error = BadAlloc; + goto PatchUp; + } + pWin->optional->backingBitPlanes = (CARD32) *pVlist; + if ((CARD32)*pVlist == (CARD32)~0L) + checkOptional = TRUE; + } + pVlist++; + break; + case CWBackingPixel: + if (pWin->optional || (CARD32) *pVlist) { + if (!pWin->optional && !MakeWindowOptional (pWin)) + { + error = BadAlloc; + goto PatchUp; + } + pWin->optional->backingPixel = (CARD32) *pVlist; + if (!*pVlist) + checkOptional = TRUE; + } + pVlist++; + break; + case CWSaveUnder: + val = (BOOL) *pVlist; + pVlist++; + if ((val != xTrue) && (val != xFalse)) + { + error = BadValue; + client->errorValue = val; + goto PatchUp; + } +#ifdef DO_SAVE_UNDERS + if (pWin->parent && (pWin->saveUnder != val) && (pWin->viewable) && + DO_SAVE_UNDERS(pWin)) + { + /* + * Re-check all siblings and inferiors for obscurity or + * exposition (hee hee). + */ + if (pWin->saveUnder) + deltaSaveUndersViewable--; + else + deltaSaveUndersViewable++; + pWin->saveUnder = val; + + if (pWin->firstChild) + { + pLayerWin = (*pScreen->GetLayerWindow)(pWin); + if ((*pScreen->ChangeSaveUnder)(pLayerWin->parent, pWin->nextSib)) + (*pScreen->PostChangeSaveUnder)(pLayerWin->parent, + pWin->nextSib); + } + else + { + if ((*pScreen->ChangeSaveUnder)(pWin, pWin->nextSib)) + (*pScreen->PostChangeSaveUnder)(pWin, + pWin->nextSib); + } + } + else + { + /* If we're changing the saveUnder attribute of the root + * window, all we do is set pWin->saveUnder so that + * GetWindowAttributes returns the right value. We don't + * do the "normal" save-under processing (as above). + * Hope that doesn't cause any problems. + */ + pWin->saveUnder = val; + } +#else + pWin->saveUnder = val; +#endif /* DO_SAVE_UNDERS */ + break; + case CWEventMask: + result = EventSelectForWindow(pWin, client, (Mask )*pVlist); + if (result) + { + error = result; + goto PatchUp; + } + pVlist++; + break; + case CWDontPropagate: + result = EventSuppressForWindow(pWin, client, (Mask )*pVlist, + &checkOptional); + if (result) + { + error = result; + goto PatchUp; + } + pVlist++; + break; + case CWOverrideRedirect: + val = (BOOL ) *pVlist; + pVlist++; + if ((val != xTrue) && (val != xFalse)) + { + error = BadValue; + client->errorValue = val; + goto PatchUp; + } + pWin->overrideRedirect = val; + break; + case CWColormap: + cmap = (Colormap) *pVlist; + pVlist++; + if (cmap == CopyFromParent) + { +#ifdef XAPPGROUP + Colormap ag_colormap; + ClientPtr win_owner; + + /* + * win_owner == client for CreateWindow, other clients + * can ChangeWindowAttributes + */ + win_owner = clients[CLIENT_ID(pWin->drawable.id)]; + + if ( win_owner && win_owner->appgroup && + !pWin->parent->parent && + (ag_colormap = XagDefaultColormap (win_owner))) + cmap = ag_colormap; + else +#endif + if (pWin->parent && + (!pWin->optional || + pWin->optional->visual == wVisual (pWin->parent))) + { + cmap = wColormap (pWin->parent); + } + else + cmap = None; + } + if (cmap == None) + { + error = BadMatch; + goto PatchUp; + } + pCmap = (ColormapPtr)SecurityLookupIDByType(client, cmap, + RT_COLORMAP, DixReadAccess); + if (!pCmap) + { + error = BadColor; + client->errorValue = cmap; + goto PatchUp; + } + if (pCmap->pVisual->vid != wVisual (pWin) || + pCmap->pScreen != pScreen) + { + error = BadMatch; + goto PatchUp; + } + if (cmap != wColormap (pWin)) + { + if (!pWin->optional) + { + if (!MakeWindowOptional (pWin)) + { + error = BadAlloc; + goto PatchUp; + } + } + else if (pWin->parent && cmap == wColormap (pWin->parent)) + checkOptional = TRUE; + + /* + * propagate the original colormap to any children + * inheriting it + */ + + for (pChild = pWin->firstChild; pChild; pChild=pChild->nextSib) + { + if (!pChild->optional && !MakeWindowOptional (pChild)) + { + error = BadAlloc; + goto PatchUp; + } + } + + pWin->optional->colormap = cmap; + + /* + * check on any children now matching the new colormap + */ + + for (pChild = pWin->firstChild; pChild; pChild=pChild->nextSib) + { + if (pChild->optional->colormap == cmap) + CheckWindowOptionalNeed (pChild); + } + + xE.u.u.type = ColormapNotify; + xE.u.colormap.window = pWin->drawable.id; + xE.u.colormap.colormap = cmap; + xE.u.colormap.new = xTrue; + xE.u.colormap.state = IsMapInstalled(cmap, pWin); + DeliverEvents(pWin, &xE, 1, NullWindow); + } + break; + case CWCursor: + cursorID = (Cursor ) *pVlist; + pVlist++; + /* + * install the new + */ + if ( cursorID == None) + { + if (pWin == WindowTable[pWin->drawable.pScreen->myNum]) + pCursor = rootCursor; + else + pCursor = (CursorPtr) None; + } + else + { + pCursor = (CursorPtr)SecurityLookupIDByType(client, cursorID, + RT_CURSOR, DixReadAccess); + if (!pCursor) + { + error = BadCursor; + client->errorValue = cursorID; + goto PatchUp; + } + } + + if (pCursor != wCursor (pWin)) + { + /* + * patch up child windows so they don't lose cursors. + */ + + for (pChild = pWin->firstChild; pChild; pChild=pChild->nextSib) + { + if (!pChild->optional && !pChild->cursorIsNone && + !MakeWindowOptional (pChild)) + { + error = BadAlloc; + goto PatchUp; + } + } + + pOldCursor = 0; + if (pCursor == (CursorPtr) None) + { + pWin->cursorIsNone = TRUE; + if (pWin->optional) + { + pOldCursor = pWin->optional->cursor; + pWin->optional->cursor = (CursorPtr) None; + checkOptional = TRUE; + } + } else { + if (!pWin->optional) + { + if (!MakeWindowOptional (pWin)) + { + error = BadAlloc; + goto PatchUp; + } + } + else if (pWin->parent && pCursor == wCursor (pWin->parent)) + checkOptional = TRUE; + pOldCursor = pWin->optional->cursor; + pWin->optional->cursor = pCursor; + pCursor->refcnt++; + pWin->cursorIsNone = FALSE; + /* + * check on any children now matching the new cursor + */ + + for (pChild=pWin->firstChild; pChild; pChild=pChild->nextSib) + { + if (pChild->optional && + (pChild->optional->cursor == pCursor)) + CheckWindowOptionalNeed (pChild); + } + } + + if (pWin->realized) + WindowHasNewCursor( pWin); + + /* Can't free cursor until here - old cursor + * is needed in WindowHasNewCursor + */ + if (pOldCursor) + FreeCursor (pOldCursor, (Cursor)0); + } + break; + default: + error = BadValue; + client->errorValue = vmask; + goto PatchUp; + } + vmaskCopy |= index2; + } +PatchUp: + if (checkOptional) + CheckWindowOptionalNeed (pWin); + + /* We SHOULD check for an error value here XXX */ + (*pScreen->ChangeWindowAttributes)(pWin, vmaskCopy); + + /* + If the border contents have changed, redraw the border. + Note that this has to be done AFTER pScreen->ChangeWindowAttributes + for the tile to be rotated, and the correct function selected. + */ + if (((vmaskCopy & (CWBorderPixel | CWBorderPixmap)) || borderRelative) + && pWin->viewable && HasBorder (pWin)) + { + RegionRec exposed; + + REGION_NULL(pScreen, &exposed); + REGION_SUBTRACT(pScreen, &exposed, &pWin->borderClip, &pWin->winSize); + (*pWin->drawable.pScreen->PaintWindowBorder)(pWin, &exposed, PW_BORDER); + REGION_UNINIT(pScreen, &exposed); + } + return error; +} + + +/***** + * GetWindowAttributes + * Notice that this is different than ChangeWindowAttributes + *****/ + +void +GetWindowAttributes(WindowPtr pWin, ClientPtr client, xGetWindowAttributesReply *wa) +{ + wa->type = X_Reply; + wa->bitGravity = pWin->bitGravity; + wa->winGravity = pWin->winGravity; + if (pWin->forcedBS && pWin->backingStore != Always) + wa->backingStore = NotUseful; + else + wa->backingStore = pWin->backingStore; + wa->length = (sizeof(xGetWindowAttributesReply) - + sizeof(xGenericReply)) >> 2; + wa->sequenceNumber = client->sequence; + wa->backingBitPlanes = wBackingBitPlanes (pWin); + wa->backingPixel = wBackingPixel (pWin); + wa->saveUnder = (BOOL)pWin->saveUnder; + wa->override = pWin->overrideRedirect; + if (!pWin->mapped) + wa->mapState = IsUnmapped; + else if (pWin->realized) + wa->mapState = IsViewable; + else + wa->mapState = IsUnviewable; + + wa->colormap = wColormap (pWin); + wa->mapInstalled = (wa->colormap == None) ? xFalse + : IsMapInstalled(wa->colormap, pWin); + + wa->yourEventMask = EventMaskForClient(pWin, client); + wa->allEventMasks = pWin->eventMask | wOtherEventMasks (pWin); + wa->doNotPropagateMask = wDontPropagateMask (pWin); + wa->class = pWin->drawable.class; + wa->visualID = wVisual (pWin); +} + + +_X_EXPORT WindowPtr +MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib) +{ + WindowPtr pParent = pWin->parent; + WindowPtr pFirstChange = pWin; /* highest window where list changes */ + + if (pWin->nextSib != pNextSib) + { + WindowPtr pOldNextSib = pWin->nextSib; + + if (!pNextSib) /* move to bottom */ + { + if (pParent->firstChild == pWin) + pParent->firstChild = pWin->nextSib; + /* if (pWin->nextSib) */ /* is always True: pNextSib == NULL + * and pWin->nextSib != pNextSib + * therefore pWin->nextSib != NULL */ + pFirstChange = pWin->nextSib; + pWin->nextSib->prevSib = pWin->prevSib; + if (pWin->prevSib) + pWin->prevSib->nextSib = pWin->nextSib; + pParent->lastChild->nextSib = pWin; + pWin->prevSib = pParent->lastChild; + pWin->nextSib = NullWindow; + pParent->lastChild = pWin; + } + else if (pParent->firstChild == pNextSib) /* move to top */ + { + pFirstChange = pWin; + if (pParent->lastChild == pWin) + pParent->lastChild = pWin->prevSib; + if (pWin->nextSib) + pWin->nextSib->prevSib = pWin->prevSib; + if (pWin->prevSib) + pWin->prevSib->nextSib = pWin->nextSib; + pWin->nextSib = pParent->firstChild; + pWin->prevSib = (WindowPtr ) NULL; + pNextSib->prevSib = pWin; + pParent->firstChild = pWin; + } + else /* move in middle of list */ + { + WindowPtr pOldNext = pWin->nextSib; + + pFirstChange = NullWindow; + if (pParent->firstChild == pWin) + pFirstChange = pParent->firstChild = pWin->nextSib; + if (pParent->lastChild == pWin) { + pFirstChange = pWin; + pParent->lastChild = pWin->prevSib; + } + if (pWin->nextSib) + pWin->nextSib->prevSib = pWin->prevSib; + if (pWin->prevSib) + pWin->prevSib->nextSib = pWin->nextSib; + pWin->nextSib = pNextSib; + pWin->prevSib = pNextSib->prevSib; + if (pNextSib->prevSib) + pNextSib->prevSib->nextSib = pWin; + pNextSib->prevSib = pWin; + if (!pFirstChange) { /* do we know it yet? */ + pFirstChange = pParent->firstChild; /* no, search from top */ + while ((pFirstChange != pWin) && (pFirstChange != pOldNext)) + pFirstChange = pFirstChange->nextSib; + } + } + if(pWin->drawable.pScreen->RestackWindow) + (*pWin->drawable.pScreen->RestackWindow)(pWin, pOldNextSib); + } + +#ifdef ROOTLESS + /* + * In rootless mode we can't optimize away window restacks. + * There may be non-X windows around, so even if the window + * is in the correct position from X's point of view, + * the underlying window system may want to reorder it. + */ + else if (pWin->drawable.pScreen->RestackWindow) + (*pWin->drawable.pScreen->RestackWindow)(pWin, pWin->nextSib); +#endif + + return( pFirstChange ); +} + +_X_EXPORT RegionPtr +CreateUnclippedWinSize (WindowPtr pWin) +{ + RegionPtr pRgn; + BoxRec box; + + box.x1 = pWin->drawable.x; + box.y1 = pWin->drawable.y; + box.x2 = pWin->drawable.x + (int) pWin->drawable.width; + box.y2 = pWin->drawable.y + (int) pWin->drawable.height; + pRgn = REGION_CREATE(pWin->drawable.pScreen, &box, 1); +#ifdef SHAPE + if (wBoundingShape (pWin) || wClipShape (pWin)) { + ScreenPtr pScreen; + pScreen = pWin->drawable.pScreen; + + REGION_TRANSLATE(pScreen, pRgn, - pWin->drawable.x, + - pWin->drawable.y); + if (wBoundingShape (pWin)) + REGION_INTERSECT(pScreen, pRgn, pRgn, wBoundingShape (pWin)); + if (wClipShape (pWin)) + REGION_INTERSECT(pScreen, pRgn, pRgn, wClipShape (pWin)); + REGION_TRANSLATE(pScreen, pRgn, pWin->drawable.x, pWin->drawable.y); + } +#endif + return pRgn; +} + +_X_EXPORT void +SetWinSize (WindowPtr pWin) +{ +#ifdef COMPOSITE + if (pWin->redirectDraw != RedirectDrawNone) + { + BoxRec box; + + /* + * Redirected clients get clip list equal to their + * own geometry, not clipped to their parent + */ + box.x1 = pWin->drawable.x; + box.y1 = pWin->drawable.y; + box.x2 = pWin->drawable.x + pWin->drawable.width; + box.y2 = pWin->drawable.y + pWin->drawable.height; + REGION_RESET (pScreen, &pWin->winSize, &box); + } + else +#endif + ClippedRegionFromBox(pWin->parent, &pWin->winSize, + pWin->drawable.x, pWin->drawable.y, + (int)pWin->drawable.width, + (int)pWin->drawable.height); +#ifdef SHAPE + if (wBoundingShape (pWin) || wClipShape (pWin)) { + ScreenPtr pScreen; + pScreen = pWin->drawable.pScreen; + + REGION_TRANSLATE(pScreen, &pWin->winSize, - pWin->drawable.x, + - pWin->drawable.y); + if (wBoundingShape (pWin)) + REGION_INTERSECT(pScreen, &pWin->winSize, &pWin->winSize, + wBoundingShape (pWin)); + if (wClipShape (pWin)) + REGION_INTERSECT(pScreen, &pWin->winSize, &pWin->winSize, + wClipShape (pWin)); + REGION_TRANSLATE(pScreen, &pWin->winSize, pWin->drawable.x, + pWin->drawable.y); + } +#endif +} + +_X_EXPORT void +SetBorderSize (WindowPtr pWin) +{ + int bw; + + if (HasBorder (pWin)) { + bw = wBorderWidth (pWin); +#ifdef COMPOSITE + if (pWin->redirectDraw != RedirectDrawNone) + { + BoxRec box; + + /* + * Redirected clients get clip list equal to their + * own geometry, not clipped to their parent + */ + box.x1 = pWin->drawable.x - bw; + box.y1 = pWin->drawable.y - bw; + box.x2 = pWin->drawable.x + pWin->drawable.width + bw; + box.y2 = pWin->drawable.y + pWin->drawable.height + bw; + REGION_RESET (pScreen, &pWin->borderSize, &box); + } + else +#endif + ClippedRegionFromBox(pWin->parent, &pWin->borderSize, + pWin->drawable.x - bw, pWin->drawable.y - bw, + (int)(pWin->drawable.width + (bw<<1)), + (int)(pWin->drawable.height + (bw<<1))); +#ifdef SHAPE + if (wBoundingShape (pWin)) { + ScreenPtr pScreen; + pScreen = pWin->drawable.pScreen; + + REGION_TRANSLATE(pScreen, &pWin->borderSize, - pWin->drawable.x, + - pWin->drawable.y); + REGION_INTERSECT(pScreen, &pWin->borderSize, &pWin->borderSize, + wBoundingShape (pWin)); + REGION_TRANSLATE(pScreen, &pWin->borderSize, pWin->drawable.x, + pWin->drawable.y); + REGION_UNION(pScreen, &pWin->borderSize, &pWin->borderSize, + &pWin->winSize); + } +#endif + } else { + REGION_COPY(pWin->drawable.pScreen, &pWin->borderSize, + &pWin->winSize); + } +} + +/** + * + * \param x,y new window position + * \param oldx,oldy old window position + * \param destx,desty position relative to gravity + */ + +_X_EXPORT void +GravityTranslate (int x, int y, int oldx, int oldy, + int dw, int dh, unsigned gravity, + int *destx, int *desty) +{ + switch (gravity) { + case NorthGravity: + *destx = x + dw / 2; + *desty = y; + break; + case NorthEastGravity: + *destx = x + dw; + *desty = y; + break; + case WestGravity: + *destx = x; + *desty = y + dh / 2; + break; + case CenterGravity: + *destx = x + dw / 2; + *desty = y + dh / 2; + break; + case EastGravity: + *destx = x + dw; + *desty = y + dh / 2; + break; + case SouthWestGravity: + *destx = x; + *desty = y + dh; + break; + case SouthGravity: + *destx = x + dw / 2; + *desty = y + dh; + break; + case SouthEastGravity: + *destx = x + dw; + *desty = y + dh; + break; + case StaticGravity: + *destx = oldx; + *desty = oldy; + break; + default: + *destx = x; + *desty = y; + break; + } +} + +/* XXX need to retile border on each window with ParentRelative origin */ +_X_EXPORT void +ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh) +{ + ScreenPtr pScreen; + WindowPtr pSib, pChild; + Bool resized = (dw || dh); + + pScreen = pWin->drawable.pScreen; + + for (pSib = pWin->firstChild; pSib; pSib = pSib->nextSib) + { + if (resized && (pSib->winGravity > NorthWestGravity)) + { + int cwsx, cwsy; + + cwsx = pSib->origin.x; + cwsy = pSib->origin.y; + GravityTranslate (cwsx, cwsy, cwsx - dx, cwsy - dy, dw, dh, + pSib->winGravity, &cwsx, &cwsy); + if (cwsx != pSib->origin.x || cwsy != pSib->origin.y) + { + xEvent event; + + event.u.u.type = GravityNotify; + event.u.gravity.window = pSib->drawable.id; + event.u.gravity.x = cwsx - wBorderWidth (pSib); + event.u.gravity.y = cwsy - wBorderWidth (pSib); + DeliverEvents (pSib, &event, 1, NullWindow); + pSib->origin.x = cwsx; + pSib->origin.y = cwsy; + } + } + pSib->drawable.x = pWin->drawable.x + pSib->origin.x; + pSib->drawable.y = pWin->drawable.y + pSib->origin.y; + SetWinSize (pSib); + SetBorderSize (pSib); + (*pScreen->PositionWindow)(pSib, pSib->drawable.x, pSib->drawable.y); + + if ( (pChild = pSib->firstChild) ) + { + while (1) + { + pChild->drawable.x = pChild->parent->drawable.x + + pChild->origin.x; + pChild->drawable.y = pChild->parent->drawable.y + + pChild->origin.y; + SetWinSize (pChild); + SetBorderSize (pChild); + (*pScreen->PositionWindow)(pChild, + pChild->drawable.x, pChild->drawable.y); + if (pChild->firstChild) + { + pChild = pChild->firstChild; + continue; + } + while (!pChild->nextSib && (pChild != pSib)) + pChild = pChild->parent; + if (pChild == pSib) + break; + pChild = pChild->nextSib; + } + } + } +} + +#define GET_INT16(m, f) \ + if (m & mask) \ + { \ + f = (INT16) *pVlist;\ + pVlist++; \ + } +#define GET_CARD16(m, f) \ + if (m & mask) \ + { \ + f = (CARD16) *pVlist;\ + pVlist++;\ + } + +#define GET_CARD8(m, f) \ + if (m & mask) \ + { \ + f = (CARD8) *pVlist;\ + pVlist++;\ + } + +#define ChangeMask ((Mask)(CWX | CWY | CWWidth | CWHeight)) + +#define IllegalInputOnlyConfigureMask (CWBorderWidth) + +/* + * IsSiblingAboveMe + * returns Above if pSib above pMe in stack or Below otherwise + */ + +static int +IsSiblingAboveMe( + WindowPtr pMe, + WindowPtr pSib) +{ + WindowPtr pWin; + + pWin = pMe->parent->firstChild; + while (pWin) + { + if (pWin == pSib) + return(Above); + else if (pWin == pMe) + return(Below); + pWin = pWin->nextSib; + } + return(Below); +} + +static BoxPtr +WindowExtents( + WindowPtr pWin, + BoxPtr pBox) +{ + pBox->x1 = pWin->drawable.x - wBorderWidth (pWin); + pBox->y1 = pWin->drawable.y - wBorderWidth (pWin); + pBox->x2 = pWin->drawable.x + (int)pWin->drawable.width + + wBorderWidth (pWin); + pBox->y2 = pWin->drawable.y + (int)pWin->drawable.height + + wBorderWidth (pWin); + return(pBox); +} + +#ifdef SHAPE +#define IS_SHAPED(pWin) (wBoundingShape (pWin) != (RegionPtr) NULL) + +static RegionPtr +MakeBoundingRegion ( + WindowPtr pWin, + BoxPtr pBox) +{ + RegionPtr pRgn; + ScreenPtr pScreen; + pScreen = pWin->drawable.pScreen; + + pRgn = REGION_CREATE(pScreen, pBox, 1); + if (wBoundingShape (pWin)) { + REGION_TRANSLATE(pScreen, pRgn, -pWin->origin.x, + -pWin->origin.y); + REGION_INTERSECT(pScreen, pRgn, pRgn, wBoundingShape (pWin)); + REGION_TRANSLATE(pScreen, pRgn, pWin->origin.x, + pWin->origin.y); + } + return pRgn; +} + +static Bool +ShapeOverlap ( + WindowPtr pWin, + BoxPtr pWinBox, + WindowPtr pSib, + BoxPtr pSibBox) +{ + RegionPtr pWinRgn, pSibRgn; + ScreenPtr pScreen; + Bool ret; + + if (!IS_SHAPED(pWin) && !IS_SHAPED(pSib)) + return TRUE; + pScreen = pWin->drawable.pScreen; + pWinRgn = MakeBoundingRegion (pWin, pWinBox); + pSibRgn = MakeBoundingRegion (pSib, pSibBox); + REGION_INTERSECT(pScreen, pWinRgn, pWinRgn, pSibRgn); + ret = REGION_NOTEMPTY(pScreen, pWinRgn); + REGION_DESTROY(pScreen, pWinRgn); + REGION_DESTROY(pScreen, pSibRgn); + return ret; +} +#endif + +static Bool +AnyWindowOverlapsMe( + WindowPtr pWin, + WindowPtr pHead, + BoxPtr box) +{ + WindowPtr pSib; + BoxRec sboxrec; + BoxPtr sbox; + + for (pSib = pWin->prevSib; pSib != pHead; pSib = pSib->prevSib) + { + if (pSib->mapped) + { + sbox = WindowExtents(pSib, &sboxrec); + if (BOXES_OVERLAP(sbox, box) +#ifdef SHAPE + && ShapeOverlap (pWin, box, pSib, sbox) +#endif + ) + return(TRUE); + } + } + return(FALSE); +} + +static Bool +IOverlapAnyWindow( + WindowPtr pWin, + BoxPtr box) +{ + WindowPtr pSib; + BoxRec sboxrec; + BoxPtr sbox; + + for (pSib = pWin->nextSib; pSib; pSib = pSib->nextSib) + { + if (pSib->mapped) + { + sbox = WindowExtents(pSib, &sboxrec); + if (BOXES_OVERLAP(sbox, box) +#ifdef SHAPE + && ShapeOverlap (pWin, box, pSib, sbox) +#endif + ) + return(TRUE); + } + } + return(FALSE); +} + +/* + * WhereDoIGoInTheStack() + * Given pWin and pSib and the relationshipe smode, return + * the window that pWin should go ABOVE. + * If a pSib is specified: + * Above: pWin is placed just above pSib + * Below: pWin is placed just below pSib + * TopIf: if pSib occludes pWin, then pWin is placed + * at the top of the stack + * BottomIf: if pWin occludes pSib, then pWin is + * placed at the bottom of the stack + * Opposite: if pSib occludes pWin, then pWin is placed at the + * top of the stack, else if pWin occludes pSib, then + * pWin is placed at the bottom of the stack + * + * If pSib is NULL: + * Above: pWin is placed at the top of the stack + * Below: pWin is placed at the bottom of the stack + * TopIf: if any sibling occludes pWin, then pWin is placed at + * the top of the stack + * BottomIf: if pWin occludes any sibline, then pWin is placed at + * the bottom of the stack + * Opposite: if any sibling occludes pWin, then pWin is placed at + * the top of the stack, else if pWin occludes any + * sibling, then pWin is placed at the bottom of the stack + * + */ + +static WindowPtr +WhereDoIGoInTheStack( + WindowPtr pWin, + WindowPtr pSib, + short x, + short y, + unsigned short w, + unsigned short h, + int smode) +{ + BoxRec box; + ScreenPtr pScreen; + WindowPtr pHead, pFirst; + + if ((pWin == pWin->parent->firstChild) && + (pWin == pWin->parent->lastChild)) + return((WindowPtr ) NULL); + pHead = RealChildHead(pWin->parent); + pFirst = pHead ? pHead->nextSib : pWin->parent->firstChild; + pScreen = pWin->drawable.pScreen; + box.x1 = x; + box.y1 = y; + box.x2 = x + (int)w; + box.y2 = y + (int)h; + switch (smode) + { + case Above: + if (pSib) + return(pSib); + else if (pWin == pFirst) + return(pWin->nextSib); + else + return(pFirst); + case Below: + if (pSib) + if (pSib->nextSib != pWin) + return(pSib->nextSib); + else + return(pWin->nextSib); + else + return NullWindow; + case TopIf: + if ((!pWin->mapped || (pSib && !pSib->mapped))) + return(pWin->nextSib); + else if (pSib) + { + if ((IsSiblingAboveMe(pWin, pSib) == Above) && + (RECT_IN_REGION(pScreen, &pSib->borderSize, &box) != rgnOUT)) + return(pFirst); + else + return(pWin->nextSib); + } + else if (AnyWindowOverlapsMe(pWin, pHead, &box)) + return(pFirst); + else + return(pWin->nextSib); + case BottomIf: + if ((!pWin->mapped || (pSib && !pSib->mapped))) + return(pWin->nextSib); + else if (pSib) + { + if ((IsSiblingAboveMe(pWin, pSib) == Below) && + (RECT_IN_REGION(pScreen, &pSib->borderSize, &box) != rgnOUT)) + return NullWindow; + else + return(pWin->nextSib); + } + else if (IOverlapAnyWindow(pWin, &box)) + return NullWindow; + else + return(pWin->nextSib); + case Opposite: + if ((!pWin->mapped || (pSib && !pSib->mapped))) + return(pWin->nextSib); + else if (pSib) + { + if (RECT_IN_REGION(pScreen, &pSib->borderSize, &box) != rgnOUT) + { + if (IsSiblingAboveMe(pWin, pSib) == Above) + return(pFirst); + else + return NullWindow; + } + else + return(pWin->nextSib); + } + else if (AnyWindowOverlapsMe(pWin, pHead, &box)) + { + /* If I'm occluded, I can't possibly be the first child + * if (pWin == pWin->parent->firstChild) + * return pWin->nextSib; + */ + return(pFirst); + } + else if (IOverlapAnyWindow(pWin, &box)) + return NullWindow; + else + return pWin->nextSib; + default: + { + ErrorF("Internal error in ConfigureWindow, smode == %d\n",smode ); + return pWin->nextSib; + } + } +} + +static void +ReflectStackChange( + WindowPtr pWin, + WindowPtr pSib, + VTKind kind) +{ +/* Note that pSib might be NULL */ + + Bool WasViewable = (Bool)pWin->viewable; + Bool anyMarked; + WindowPtr pFirstChange; +#ifdef DO_SAVE_UNDERS + Bool dosave = FALSE; +#endif + WindowPtr pLayerWin; + ScreenPtr pScreen = pWin->drawable.pScreen; + + /* if this is a root window, can't be restacked */ + if (!pWin->parent) + return; + + pFirstChange = MoveWindowInStack(pWin, pSib); + + if (WasViewable) + { + anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pFirstChange, + &pLayerWin); + if (pLayerWin != pWin) pFirstChange = pLayerWin; +#ifdef DO_SAVE_UNDERS + if (DO_SAVE_UNDERS(pWin)) + { + dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pFirstChange); + } +#endif /* DO_SAVE_UNDERS */ + if (anyMarked) + { + (*pScreen->ValidateTree)(pLayerWin->parent, pFirstChange, kind); + (*pScreen->HandleExposures)(pLayerWin->parent); + } +#ifdef DO_SAVE_UNDERS + if (dosave) + (*pScreen->PostChangeSaveUnder)(pLayerWin, pFirstChange); +#endif /* DO_SAVE_UNDERS */ + if (anyMarked && pWin->drawable.pScreen->PostValidateTree) + (*pScreen->PostValidateTree)(pLayerWin->parent, pFirstChange, kind); + } + if (pWin->realized) + WindowsRestructured (); +} + +/***** + * ConfigureWindow + *****/ + +int +ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) +{ +#define RESTACK_WIN 0 +#define MOVE_WIN 1 +#define RESIZE_WIN 2 +#define REBORDER_WIN 3 + WindowPtr pSib = NullWindow; + WindowPtr pParent = pWin->parent; + Window sibwid = 0; + Mask index2, tmask; + XID *pVlist; + short x, y, beforeX, beforeY; + unsigned short w = pWin->drawable.width, + h = pWin->drawable.height, + bw = pWin->borderWidth; + int action, smode = Above; +#ifdef XAPPGROUP + ClientPtr win_owner; + ClientPtr ag_leader = NULL; +#endif + xEvent event; + + if ((pWin->drawable.class == InputOnly) && (mask & IllegalInputOnlyConfigureMask)) + return(BadMatch); + + if ((mask & CWSibling) && !(mask & CWStackMode)) + return(BadMatch); + + pVlist = vlist; + + if (pParent) + { + x = pWin->drawable.x - pParent->drawable.x - (int)bw; + y = pWin->drawable.y - pParent->drawable.y - (int)bw; + } + else + { + x = pWin->drawable.x; + y = pWin->drawable.y; + } + beforeX = x; + beforeY = y; + action = RESTACK_WIN; + if ((mask & (CWX | CWY)) && (!(mask & (CWHeight | CWWidth)))) + { + GET_INT16(CWX, x); + GET_INT16(CWY, y); + action = MOVE_WIN; + } + /* or should be resized */ + else if (mask & (CWX | CWY | CWWidth | CWHeight)) + { + GET_INT16(CWX, x); + GET_INT16(CWY, y); + GET_CARD16(CWWidth, w); + GET_CARD16 (CWHeight, h); + if (!w || !h) + { + client->errorValue = 0; + return BadValue; + } + action = RESIZE_WIN; + } + tmask = mask & ~ChangeMask; + while (tmask) + { + index2 = (Mask)lowbit (tmask); + tmask &= ~index2; + switch (index2) + { + case CWBorderWidth: + GET_CARD16(CWBorderWidth, bw); + break; + case CWSibling: + sibwid = (Window ) *pVlist; + pVlist++; + pSib = (WindowPtr )SecurityLookupIDByType(client, sibwid, + RT_WINDOW, DixReadAccess); + if (!pSib) + { + client->errorValue = sibwid; + return(BadWindow); + } + if (pSib->parent != pParent) + return(BadMatch); + if (pSib == pWin) + return(BadMatch); + break; + case CWStackMode: + GET_CARD8(CWStackMode, smode); + if ((smode != TopIf) && (smode != BottomIf) && + (smode != Opposite) && (smode != Above) && (smode != Below)) + { + client->errorValue = smode; + return(BadValue); + } + break; + default: + client->errorValue = mask; + return(BadValue); + } + } + /* root really can't be reconfigured, so just return */ + if (!pParent) + return Success; + + /* Figure out if the window should be moved. Doesnt + make the changes to the window if event sent */ + + if (mask & CWStackMode) + pSib = WhereDoIGoInTheStack(pWin, pSib, pParent->drawable.x + x, + pParent->drawable.y + y, + w + (bw << 1), h + (bw << 1), smode); + else + pSib = pWin->nextSib; + +#ifdef XAPPGROUP + win_owner = clients[CLIENT_ID(pWin->drawable.id)]; + ag_leader = XagLeader (win_owner); +#endif + + if ((!pWin->overrideRedirect) && + (RedirectSend(pParent) +#ifdef XAPPGROUP + || (win_owner->appgroup && ag_leader && + XagIsControlledRoot (client, pParent)) +#endif + )) + { + event.u.u.type = ConfigureRequest; + event.u.configureRequest.window = pWin->drawable.id; + if (mask & CWSibling) + event.u.configureRequest.sibling = sibwid; + else + event.u.configureRequest.sibling = None; + if (mask & CWStackMode) + event.u.u.detail = smode; + else + event.u.u.detail = Above; + event.u.configureRequest.x = x; + event.u.configureRequest.y = y; +#ifdef PANORAMIX + if(!noPanoramiXExtension && (!pParent || !pParent->parent)) { + event.u.configureRequest.x += panoramiXdataPtr[0].x; + event.u.configureRequest.y += panoramiXdataPtr[0].y; + } +#endif + event.u.configureRequest.width = w; + event.u.configureRequest.height = h; + event.u.configureRequest.borderWidth = bw; + event.u.configureRequest.valueMask = mask; +#ifdef XAPPGROUP + /* make sure if the ag_leader maps the window it goes to the wm */ + if (ag_leader && ag_leader != client && + XagIsControlledRoot (client, pParent)) { + event.u.configureRequest.parent = XagId (win_owner); + (void) TryClientEvents (ag_leader, &event, 1, + NoEventMask, NoEventMask, NullGrab); + return Success; + } +#endif + event.u.configureRequest.parent = pParent->drawable.id; + if (MaybeDeliverEventsToClient(pParent, &event, 1, + SubstructureRedirectMask, client) == 1) + return(Success); + } + if (action == RESIZE_WIN) + { + Bool size_change = (w != pWin->drawable.width) + || (h != pWin->drawable.height); + if (size_change && ((pWin->eventMask|wOtherEventMasks(pWin)) & ResizeRedirectMask)) + { + xEvent eventT; + eventT.u.u.type = ResizeRequest; + eventT.u.resizeRequest.window = pWin->drawable.id; + eventT.u.resizeRequest.width = w; + eventT.u.resizeRequest.height = h; + if (MaybeDeliverEventsToClient(pWin, &eventT, 1, + ResizeRedirectMask, client) == 1) + { + /* if event is delivered, leave the actual size alone. */ + w = pWin->drawable.width; + h = pWin->drawable.height; + size_change = FALSE; + } + } + if (!size_change) + { + if (mask & (CWX | CWY)) + action = MOVE_WIN; + else if (mask & (CWStackMode | CWBorderWidth)) + action = RESTACK_WIN; + else /* really nothing to do */ + return(Success) ; + } + } + + if (action == RESIZE_WIN) + /* we've already checked whether there's really a size change */ + goto ActuallyDoSomething; + if ((mask & CWX) && (x != beforeX)) + goto ActuallyDoSomething; + if ((mask & CWY) && (y != beforeY)) + goto ActuallyDoSomething; + if ((mask & CWBorderWidth) && (bw != wBorderWidth (pWin))) + goto ActuallyDoSomething; + if (mask & CWStackMode) + { +#ifndef ROOTLESS + /* See above for why we always reorder in rootless mode. */ + if (pWin->nextSib != pSib) +#endif + goto ActuallyDoSomething; + } + return(Success); + +ActuallyDoSomething: + if (SubStrSend(pWin, pParent)) + { + event.u.u.type = ConfigureNotify; + event.u.configureNotify.window = pWin->drawable.id; + if (pSib) + event.u.configureNotify.aboveSibling = pSib->drawable.id; + else + event.u.configureNotify.aboveSibling = None; + event.u.configureNotify.x = x; + event.u.configureNotify.y = y; +#ifdef PANORAMIX + if(!noPanoramiXExtension && (!pParent || !pParent->parent)) { + event.u.configureNotify.x += panoramiXdataPtr[0].x; + event.u.configureNotify.y += panoramiXdataPtr[0].y; + } +#endif + event.u.configureNotify.width = w; + event.u.configureNotify.height = h; + event.u.configureNotify.borderWidth = bw; + event.u.configureNotify.override = pWin->overrideRedirect; + DeliverEvents(pWin, &event, 1, NullWindow); + } + if (mask & CWBorderWidth) + { + if (action == RESTACK_WIN) + { + action = MOVE_WIN; + pWin->borderWidth = bw; + } + else if ((action == MOVE_WIN) && + (beforeX + wBorderWidth (pWin) == x + (int)bw) && + (beforeY + wBorderWidth (pWin) == y + (int)bw)) + { + action = REBORDER_WIN; + (*pWin->drawable.pScreen->ChangeBorderWidth)(pWin, bw); + } + else + pWin->borderWidth = bw; + } + if (action == MOVE_WIN) + (*pWin->drawable.pScreen->MoveWindow)(pWin, x, y, pSib, + (mask & CWBorderWidth) ? VTOther : VTMove); + else if (action == RESIZE_WIN) + (*pWin->drawable.pScreen->ResizeWindow)(pWin, x, y, w, h, pSib); + else if (mask & CWStackMode) + ReflectStackChange(pWin, pSib, VTOther); + + if (action != RESTACK_WIN) + CheckCursorConfinement(pWin); + return(Success); +#undef RESTACK_WIN +#undef MOVE_WIN +#undef RESIZE_WIN +#undef REBORDER_WIN +} + + +/****** + * + * CirculateWindow + * For RaiseLowest, raises the lowest mapped child (if any) that is + * obscured by another child to the top of the stack. For LowerHighest, + * lowers the highest mapped child (if any) that is obscuring another + * child to the bottom of the stack. Exposure processing is performed + * + ******/ + +int +CirculateWindow(WindowPtr pParent, int direction, ClientPtr client) +{ + WindowPtr pWin, pHead, pFirst; + xEvent event; + BoxRec box; + + pHead = RealChildHead(pParent); + pFirst = pHead ? pHead->nextSib : pParent->firstChild; + if (direction == RaiseLowest) + { + for (pWin = pParent->lastChild; + (pWin != pHead) && + !(pWin->mapped && + AnyWindowOverlapsMe(pWin, pHead, WindowExtents(pWin, &box))); + pWin = pWin->prevSib) ; + if (pWin == pHead) + return Success; + } + else + { + for (pWin = pFirst; + pWin && + !(pWin->mapped && + IOverlapAnyWindow(pWin, WindowExtents(pWin, &box))); + pWin = pWin->nextSib) ; + if (!pWin) + return Success; + } + + event.u.circulate.window = pWin->drawable.id; + event.u.circulate.parent = pParent->drawable.id; + event.u.circulate.event = pParent->drawable.id; + if (direction == RaiseLowest) + event.u.circulate.place = PlaceOnTop; + else + event.u.circulate.place = PlaceOnBottom; + + if (RedirectSend(pParent)) + { + event.u.u.type = CirculateRequest; + if (MaybeDeliverEventsToClient(pParent, &event, 1, + SubstructureRedirectMask, client) == 1) + return(Success); + } + + event.u.u.type = CirculateNotify; + DeliverEvents(pWin, &event, 1, NullWindow); + ReflectStackChange(pWin, + (direction == RaiseLowest) ? pFirst : NullWindow, + VTStack); + + return(Success); +} + +static int +CompareWIDs( + WindowPtr pWin, + pointer value) /* must conform to VisitWindowProcPtr */ +{ + Window *wid = (Window *)value; + + if (pWin->drawable.id == *wid) + return(WT_STOPWALKING); + else + return(WT_WALKCHILDREN); +} + +/***** + * ReparentWindow + *****/ + +int +ReparentWindow(WindowPtr pWin, WindowPtr pParent, + int x, int y, ClientPtr client) +{ + WindowPtr pPrev, pPriorParent; + Bool WasMapped = (Bool)(pWin->mapped); + xEvent event; + int bw = wBorderWidth (pWin); + ScreenPtr pScreen; + + pScreen = pWin->drawable.pScreen; + if (TraverseTree(pWin, CompareWIDs, (pointer)&pParent->drawable.id) == WT_STOPWALKING) + return(BadMatch); + if (!MakeWindowOptional(pWin)) + return(BadAlloc); + + if (WasMapped) + UnmapWindow(pWin, FALSE); + + event.u.u.type = ReparentNotify; + event.u.reparent.window = pWin->drawable.id; + event.u.reparent.parent = pParent->drawable.id; + event.u.reparent.x = x; + event.u.reparent.y = y; +#ifdef PANORAMIX + if(!noPanoramiXExtension && !pParent->parent) { + event.u.reparent.x += panoramiXdataPtr[0].x; + event.u.reparent.y += panoramiXdataPtr[0].y; + } +#endif + event.u.reparent.override = pWin->overrideRedirect; + DeliverEvents(pWin, &event, 1, pParent); + + /* take out of sibling chain */ + + pPriorParent = pPrev = pWin->parent; + if (pPrev->firstChild == pWin) + pPrev->firstChild = pWin->nextSib; + if (pPrev->lastChild == pWin) + pPrev->lastChild = pWin->prevSib; + + if (pWin->nextSib) + pWin->nextSib->prevSib = pWin->prevSib; + if (pWin->prevSib) + pWin->prevSib->nextSib = pWin->nextSib; + + /* insert at begining of pParent */ + pWin->parent = pParent; + pPrev = RealChildHead(pParent); + if (pPrev) + { + pWin->nextSib = pPrev->nextSib; + if (pPrev->nextSib) + pPrev->nextSib->prevSib = pWin; + else + pParent->lastChild = pWin; + pPrev->nextSib = pWin; + pWin->prevSib = pPrev; + } + else + { + pWin->nextSib = pParent->firstChild; + pWin->prevSib = NullWindow; + if (pParent->firstChild) + pParent->firstChild->prevSib = pWin; + else + pParent->lastChild = pWin; + pParent->firstChild = pWin; + } + + pWin->origin.x = x + bw; + pWin->origin.y = y + bw; + pWin->drawable.x = x + bw + pParent->drawable.x; + pWin->drawable.y = y + bw + pParent->drawable.y; + + /* clip to parent */ + SetWinSize (pWin); + SetBorderSize (pWin); + + if (pScreen->ReparentWindow) + (*pScreen->ReparentWindow)(pWin, pPriorParent); + (*pScreen->PositionWindow)(pWin, pWin->drawable.x, pWin->drawable.y); + ResizeChildrenWinSize(pWin, 0, 0, 0, 0); + + CheckWindowOptionalNeed(pWin); + + if (WasMapped) + MapWindow(pWin, client); + RecalculateDeliverableEvents(pWin); + return(Success); +} + +static void +RealizeTree(WindowPtr pWin) +{ + WindowPtr pChild; + RealizeWindowProcPtr Realize; + + Realize = pWin->drawable.pScreen->RealizeWindow; + pChild = pWin; + while (1) + { + if (pChild->mapped) + { + pChild->realized = TRUE; +#ifdef DO_SAVE_UNDERS + if (pChild->saveUnder) + deltaSaveUndersViewable++; +#endif + pChild->viewable = (pChild->drawable.class == InputOutput); + (* Realize)(pChild); + if (pChild->firstChild) + { + pChild = pChild->firstChild; + continue; + } + } + while (!pChild->nextSib && (pChild != pWin)) + pChild = pChild->parent; + if (pChild == pWin) + return; + pChild = pChild->nextSib; + } +} + +static WindowPtr windowDisableMapUnmapEvents; + +void +DisableMapUnmapEvents(WindowPtr pWin) +{ + assert (windowDisableMapUnmapEvents == NULL); + + windowDisableMapUnmapEvents = pWin; +} + +void +EnableMapUnmapEvents(WindowPtr pWin) +{ + assert (windowDisableMapUnmapEvents != NULL); + + windowDisableMapUnmapEvents = NULL; +} + +static Bool +MapUnmapEventsEnabled(WindowPtr pWin) +{ + return pWin != windowDisableMapUnmapEvents; +} + +/***** + * MapWindow + * If some other client has selected SubStructureReDirect on the parent + * and override-redirect is xFalse, then a MapRequest event is generated, + * but the window remains unmapped. Otherwise, the window is mapped and a + * MapNotify event is generated. + *****/ + +_X_EXPORT int +MapWindow(WindowPtr pWin, ClientPtr client) +{ + ScreenPtr pScreen; + + WindowPtr pParent; +#ifdef DO_SAVE_UNDERS + Bool dosave = FALSE; +#endif + WindowPtr pLayerWin; + + if (pWin->mapped) + return(Success); + + /* general check for permission to map window */ + if (!XaceHook(XACE_MAP_ACCESS, client, pWin)) + return Success; + + pScreen = pWin->drawable.pScreen; + if ( (pParent = pWin->parent) ) + { + xEvent event; + Bool anyMarked; +#ifdef XAPPGROUP + ClientPtr win_owner = clients[CLIENT_ID(pWin->drawable.id)]; + ClientPtr ag_leader = XagLeader (win_owner); +#endif + + if ((!pWin->overrideRedirect) && + (RedirectSend(pParent) +#ifdef XAPPGROUP + || (win_owner->appgroup && ag_leader && + XagIsControlledRoot (client, pParent)) +#endif + )) + { + event.u.u.type = MapRequest; + event.u.mapRequest.window = pWin->drawable.id; +#ifdef XAPPGROUP + /* make sure if the ag_leader maps the window it goes to the wm */ + if (ag_leader && ag_leader != client && + XagIsControlledRoot (client, pParent)) { + event.u.mapRequest.parent = XagId (win_owner); + (void) TryClientEvents (ag_leader, &event, 1, + NoEventMask, NoEventMask, NullGrab); + return Success; + } +#endif + event.u.mapRequest.parent = pParent->drawable.id; + + if (MaybeDeliverEventsToClient(pParent, &event, 1, + SubstructureRedirectMask, client) == 1) + return(Success); + } + + pWin->mapped = TRUE; + if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin)) + { + event.u.u.type = MapNotify; + event.u.mapNotify.window = pWin->drawable.id; + event.u.mapNotify.override = pWin->overrideRedirect; + DeliverEvents(pWin, &event, 1, NullWindow); + } + + if (!pParent->realized) + return(Success); + RealizeTree(pWin); + if (pWin->viewable) + { + anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pWin, + &pLayerWin); +#ifdef DO_SAVE_UNDERS + if (DO_SAVE_UNDERS(pWin)) + { + dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pWin->nextSib); + } +#endif /* DO_SAVE_UNDERS */ + if (anyMarked) + { + (*pScreen->ValidateTree)(pLayerWin->parent, pLayerWin, VTMap); + (*pScreen->HandleExposures)(pLayerWin->parent); + } +#ifdef DO_SAVE_UNDERS + if (dosave) + (*pScreen->PostChangeSaveUnder)(pLayerWin, pWin->nextSib); +#endif /* DO_SAVE_UNDERS */ + if (anyMarked && pScreen->PostValidateTree) + (*pScreen->PostValidateTree)(pLayerWin->parent, pLayerWin, VTMap); + } + WindowsRestructured (); + } + else + { + RegionRec temp; + + pWin->mapped = TRUE; + pWin->realized = TRUE; /* for roots */ + pWin->viewable = pWin->drawable.class == InputOutput; + /* We SHOULD check for an error value here XXX */ + (*pScreen->RealizeWindow)(pWin); + if (pScreen->ClipNotify) + (*pScreen->ClipNotify) (pWin, 0, 0); + if (pScreen->PostValidateTree) + (*pScreen->PostValidateTree)(NullWindow, pWin, VTMap); + REGION_NULL(pScreen, &temp); + REGION_COPY(pScreen, &temp, &pWin->clipList); + (*pScreen->WindowExposures) (pWin, &temp, NullRegion); + REGION_UNINIT(pScreen, &temp); + } + + return(Success); +} + + +/***** + * MapSubwindows + * Performs a MapWindow all unmapped children of the window, in top + * to bottom stacking order. + *****/ + +void +MapSubwindows(WindowPtr pParent, ClientPtr client) +{ + WindowPtr pWin; + WindowPtr pFirstMapped = NullWindow; +#ifdef DO_SAVE_UNDERS + WindowPtr pFirstSaveUndered = NullWindow; +#endif + ScreenPtr pScreen; + Mask parentRedirect; + Mask parentNotify; + xEvent event; + Bool anyMarked; +#ifdef DO_SAVE_UNDERS + Bool dosave = FALSE; +#endif + WindowPtr pLayerWin; + + pScreen = pParent->drawable.pScreen; + parentRedirect = RedirectSend(pParent); + parentNotify = SubSend(pParent); + anyMarked = FALSE; + for (pWin = pParent->firstChild; pWin; pWin = pWin->nextSib) + { + if (!pWin->mapped) + { + if (parentRedirect && !pWin->overrideRedirect) + { + event.u.u.type = MapRequest; + event.u.mapRequest.window = pWin->drawable.id; + event.u.mapRequest.parent = pParent->drawable.id; + + if (MaybeDeliverEventsToClient(pParent, &event, 1, + SubstructureRedirectMask, client) == 1) + continue; + } + + pWin->mapped = TRUE; + if (parentNotify || StrSend(pWin)) + { + event.u.u.type = MapNotify; + event.u.mapNotify.window = pWin->drawable.id; + event.u.mapNotify.override = pWin->overrideRedirect; + DeliverEvents(pWin, &event, 1, NullWindow); + } + + if (!pFirstMapped) + pFirstMapped = pWin; + if (pParent->realized) + { + RealizeTree(pWin); + if (pWin->viewable) + { + anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pWin, + (WindowPtr *)NULL); +#ifdef DO_SAVE_UNDERS + if (DO_SAVE_UNDERS(pWin)) + { + dosave = TRUE; + } +#endif /* DO_SAVE_UNDERS */ + } + } + } + } + + if (pFirstMapped) + { + pLayerWin = (*pScreen->GetLayerWindow)(pParent); + if (pLayerWin->parent != pParent) { + anyMarked |= (*pScreen->MarkOverlappedWindows)(pLayerWin, + pLayerWin, + (WindowPtr *)NULL); + pFirstMapped = pLayerWin; + } + if (anyMarked) + { +#ifdef DO_SAVE_UNDERS + if (pLayerWin->parent != pParent) + { + if (dosave || (DO_SAVE_UNDERS(pLayerWin))) + { + dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, + pLayerWin); + } + } + else if (dosave) + { + dosave = FALSE; + for (pWin = pParent->firstChild; pWin; pWin = pWin->nextSib) + { + if (DO_SAVE_UNDERS(pWin)) + { + dosave |= (*pScreen->ChangeSaveUnder)(pWin, + pWin->nextSib); + if (dosave && !pFirstSaveUndered) + pFirstSaveUndered = pWin; + } + } + } +#endif /* DO_SAVE_UNDERS */ + (*pScreen->ValidateTree)(pLayerWin->parent, pFirstMapped, VTMap); + (*pScreen->HandleExposures)(pLayerWin->parent); + } +#ifdef DO_SAVE_UNDERS + if (dosave) + (*pScreen->PostChangeSaveUnder)(pLayerWin, + pFirstSaveUndered->nextSib); +#endif /* DO_SAVE_UNDERS */ + if (anyMarked && pScreen->PostValidateTree) + (*pScreen->PostValidateTree)(pLayerWin->parent, pFirstMapped, + VTMap); + WindowsRestructured (); + } +} + +static void +UnrealizeTree( + WindowPtr pWin, + Bool fromConfigure) +{ + WindowPtr pChild; + UnrealizeWindowProcPtr Unrealize; + MarkUnrealizedWindowProcPtr MarkUnrealizedWindow; + + Unrealize = pWin->drawable.pScreen->UnrealizeWindow; + MarkUnrealizedWindow = pWin->drawable.pScreen->MarkUnrealizedWindow; + pChild = pWin; + while (1) + { + if (pChild->realized) + { + pChild->realized = FALSE; + pChild->visibility = VisibilityNotViewable; +#ifdef PANORAMIX + if(!noPanoramiXExtension && !pChild->drawable.pScreen->myNum) { + PanoramiXRes *win; + win = (PanoramiXRes*)LookupIDByType(pChild->drawable.id, + XRT_WINDOW); + if(win) + win->u.win.visibility = VisibilityNotViewable; + } +#endif + (* Unrealize)(pChild); + DeleteWindowFromAnyEvents(pChild, FALSE); + if (pChild->viewable) + { +#ifdef DO_SAVE_UNDERS + if (pChild->saveUnder) + deltaSaveUndersViewable--; +#endif + pChild->viewable = FALSE; + if (pChild->backStorage) + (*pChild->drawable.pScreen->SaveDoomedAreas)( + pChild, &pChild->clipList, 0, 0); + (* MarkUnrealizedWindow)(pChild, pWin, fromConfigure); + pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; + } + if (pChild->firstChild) + { + pChild = pChild->firstChild; + continue; + } + } + while (!pChild->nextSib && (pChild != pWin)) + pChild = pChild->parent; + if (pChild == pWin) + return; + pChild = pChild->nextSib; + } +} + +/***** + * UnmapWindow + * If the window is already unmapped, this request has no effect. + * Otherwise, the window is unmapped and an UnMapNotify event is + * generated. Cannot unmap a root window. + *****/ + +_X_EXPORT int +UnmapWindow(WindowPtr pWin, Bool fromConfigure) +{ + WindowPtr pParent; + xEvent event; + Bool wasRealized = (Bool)pWin->realized; + Bool wasViewable = (Bool)pWin->viewable; + ScreenPtr pScreen = pWin->drawable.pScreen; + WindowPtr pLayerWin = pWin; + + if ((!pWin->mapped) || (!(pParent = pWin->parent))) + return(Success); + if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin)) + { + event.u.u.type = UnmapNotify; + event.u.unmapNotify.window = pWin->drawable.id; + event.u.unmapNotify.fromConfigure = fromConfigure; + DeliverEvents(pWin, &event, 1, NullWindow); + } + if (wasViewable && !fromConfigure) + { + pWin->valdata = UnmapValData; + (*pScreen->MarkOverlappedWindows)(pWin, pWin->nextSib, &pLayerWin); + (*pScreen->MarkWindow)(pLayerWin->parent); + } + pWin->mapped = FALSE; + if (wasRealized) + UnrealizeTree(pWin, fromConfigure); + if (wasViewable) + { + if (!fromConfigure) + { + (*pScreen->ValidateTree)(pLayerWin->parent, pWin, VTUnmap); + (*pScreen->HandleExposures)(pLayerWin->parent); + } +#ifdef DO_SAVE_UNDERS + if (DO_SAVE_UNDERS(pWin)) + { + if ( (*pScreen->ChangeSaveUnder)(pLayerWin, pWin->nextSib) ) + { + (*pScreen->PostChangeSaveUnder)(pLayerWin, pWin->nextSib); + } + } + pWin->DIXsaveUnder = FALSE; +#endif /* DO_SAVE_UNDERS */ + if (!fromConfigure && pScreen->PostValidateTree) + (*pScreen->PostValidateTree)(pLayerWin->parent, pWin, VTUnmap); + } + if (wasRealized && !fromConfigure) + WindowsRestructured (); + return(Success); +} + +/***** + * UnmapSubwindows + * Performs an UnmapWindow request with the specified mode on all mapped + * children of the window, in bottom to top stacking order. + *****/ + +void +UnmapSubwindows(WindowPtr pWin) +{ + WindowPtr pChild, pHead; + xEvent event; + Bool wasRealized = (Bool)pWin->realized; + Bool wasViewable = (Bool)pWin->viewable; + Bool anyMarked = FALSE; + Mask parentNotify; + WindowPtr pLayerWin = NULL; + ScreenPtr pScreen = pWin->drawable.pScreen; + + if (!pWin->firstChild) + return; + parentNotify = SubSend(pWin); + pHead = RealChildHead(pWin); + + if (wasViewable) + pLayerWin = (*pScreen->GetLayerWindow)(pWin); + + for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib) + { + if (pChild->mapped) + { + if (parentNotify || StrSend(pChild)) + { + event.u.u.type = UnmapNotify; + event.u.unmapNotify.window = pChild->drawable.id; + event.u.unmapNotify.fromConfigure = xFalse; + DeliverEvents(pChild, &event, 1, NullWindow); + } + if (pChild->viewable) + { + pChild->valdata = UnmapValData; + anyMarked = TRUE; + } + pChild->mapped = FALSE; + if (pChild->realized) + UnrealizeTree(pChild, FALSE); + if (wasViewable) + { +#ifdef DO_SAVE_UNDERS + pChild->DIXsaveUnder = FALSE; +#endif /* DO_SAVE_UNDERS */ + if (pChild->backStorage) + (*pScreen->SaveDoomedAreas)( + pChild, &pChild->clipList, 0, 0); + } + } + } + if (wasViewable) + { + if (anyMarked) + { + if (pLayerWin->parent == pWin) + (*pScreen->MarkWindow)(pWin); + else + { + WindowPtr ptmp; + (*pScreen->MarkOverlappedWindows)(pWin, pLayerWin, + (WindowPtr *)NULL); + (*pScreen->MarkWindow)(pLayerWin->parent); + + /* Windows between pWin and pLayerWin may not have been marked */ + ptmp = pWin; + + while (ptmp != pLayerWin->parent) + { + (*pScreen->MarkWindow)(ptmp); + ptmp = ptmp->parent; + } + pHead = pWin->firstChild; + } + (*pScreen->ValidateTree)(pLayerWin->parent, pHead, VTUnmap); + (*pScreen->HandleExposures)(pLayerWin->parent); + } +#ifdef DO_SAVE_UNDERS + if (DO_SAVE_UNDERS(pWin)) + { + if ( (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin)) + (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin); + } +#endif /* DO_SAVE_UNDERS */ + if (anyMarked && pScreen->PostValidateTree) + (*pScreen->PostValidateTree)(pLayerWin->parent, pHead, VTUnmap); + } + if (wasRealized) + WindowsRestructured (); +} + + +void +HandleSaveSet(ClientPtr client) +{ + WindowPtr pParent, pWin; + int j; + + for (j=0; jnumSaved; j++) + { + pWin = SaveSetWindow(client->saveSet[j]); +#ifdef XFIXES + if (SaveSetToRoot(client->saveSet[j])) + pParent = WindowTable[pWin->drawable.pScreen->myNum]; + else +#endif + { + pParent = pWin->parent; + while (pParent && (wClient (pParent) == client)) + pParent = pParent->parent; + } + if (pParent) + { + if (pParent != pWin->parent) + { + ReparentWindow(pWin, pParent, + pWin->drawable.x - wBorderWidth (pWin) - pParent->drawable.x, + pWin->drawable.y - wBorderWidth (pWin) - pParent->drawable.y, + client); + if(!pWin->realized && pWin->mapped) + pWin->mapped = FALSE; + } +#ifdef XFIXES + if (SaveSetRemap (client->saveSet[j])) +#endif + MapWindow(pWin, client); + } + } + xfree(client->saveSet); + client->numSaved = 0; + client->saveSet = (SaveSetElt *)NULL; +} + +/** + * + * \param x,y in root + */ +Bool +PointInWindowIsVisible(WindowPtr pWin, int x, int y) +{ + BoxRec box; + + if (!pWin->realized) + return (FALSE); + if (POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderClip, + x, y, &box) + && (!wInputShape(pWin) || + POINT_IN_REGION(pWin->drawable.pScreen, + wInputShape(pWin), + x - pWin->drawable.x, + y - pWin->drawable.y, &box))) + return(TRUE); + return(FALSE); +} + + +_X_EXPORT RegionPtr +NotClippedByChildren(WindowPtr pWin) +{ + ScreenPtr pScreen; + RegionPtr pReg; + + pScreen = pWin->drawable.pScreen; + pReg = REGION_CREATE(pScreen, NullBox, 1); + if (pWin->parent || + screenIsSaved != SCREEN_SAVER_ON || + !HasSaverWindow (pWin->drawable.pScreen->myNum)) + { + REGION_INTERSECT(pScreen, pReg, &pWin->borderClip, &pWin->winSize); + } + return(pReg); +} + +_X_EXPORT void +SendVisibilityNotify(WindowPtr pWin) +{ + xEvent event; +#ifndef NO_XINERAMA_PORT + unsigned int visibility = pWin->visibility; +#endif +#ifdef PANORAMIX + /* This is not quite correct yet, but it's close */ + if(!noPanoramiXExtension) { + PanoramiXRes *win; + WindowPtr pWin2; + int i, Scrnum; + + Scrnum = pWin->drawable.pScreen->myNum; + + win = PanoramiXFindIDByScrnum(XRT_WINDOW, pWin->drawable.id, Scrnum); + + if(!win || (win->u.win.visibility == visibility)) + return; + + switch(visibility) { + case VisibilityUnobscured: + for(i = 0; i < PanoramiXNumScreens; i++) { + if(i == Scrnum) continue; + + pWin2 = (WindowPtr)LookupIDByType(win->info[i].id, RT_WINDOW); + + if (pWin2) { + if(pWin2->visibility == VisibilityPartiallyObscured) + return; + + if(!i) pWin = pWin2; + } + } + break; + case VisibilityPartiallyObscured: + if(Scrnum) { + pWin2 = (WindowPtr)LookupIDByType(win->info[0].id, RT_WINDOW); + if (pWin2) pWin = pWin2; + } + break; + case VisibilityFullyObscured: + for(i = 0; i < PanoramiXNumScreens; i++) { + if(i == Scrnum) continue; + + pWin2 = (WindowPtr)LookupIDByType(win->info[i].id, RT_WINDOW); + + if (pWin2) { + if(pWin2->visibility != VisibilityFullyObscured) + return; + + if(!i) pWin = pWin2; + } + } + break; + } + + win->u.win.visibility = visibility; + } +#endif + + event.u.u.type = VisibilityNotify; + event.u.visibility.window = pWin->drawable.id; + event.u.visibility.state = visibility; + DeliverEvents(pWin, &event, 1, NullWindow); +} + +#define RANDOM_WIDTH 32 + +#ifndef NOLOGOHACK +static void DrawLogo( + WindowPtr pWin +); +#endif + +_X_EXPORT void +SaveScreens(int on, int mode) +{ + int i; + int what; + int type; + + if (on == SCREEN_SAVER_FORCER) + { + UpdateCurrentTimeIf(); + lastDeviceEventTime = currentTime; + if (mode == ScreenSaverReset) + what = SCREEN_SAVER_OFF; + else + what = SCREEN_SAVER_ON; + type = what; + } + else + { + what = on; + type = what; + if (what == screenIsSaved) + type = SCREEN_SAVER_CYCLE; + } + for (i = 0; i < screenInfo.numScreens; i++) + { + if (on == SCREEN_SAVER_FORCER) + (* screenInfo.screens[i]->SaveScreen) (screenInfo.screens[i], on); + if (savedScreenInfo[i].ExternalScreenSaver) + { + if ((*savedScreenInfo[i].ExternalScreenSaver) + (screenInfo.screens[i], type, on == SCREEN_SAVER_FORCER)) + continue; + } + if (type == screenIsSaved) + continue; + switch (type) { + case SCREEN_SAVER_OFF: + if (savedScreenInfo[i].blanked == SCREEN_IS_BLANKED) + { + (* screenInfo.screens[i]->SaveScreen) (screenInfo.screens[i], + what); + } + else if (HasSaverWindow (i)) + { + savedScreenInfo[i].pWindow = NullWindow; + FreeResource(savedScreenInfo[i].wid, RT_NONE); + } + break; + case SCREEN_SAVER_CYCLE: + if (savedScreenInfo[i].blanked == SCREEN_IS_TILED) + { + WindowPtr pWin = savedScreenInfo[i].pWindow; + /* make it look like screen saver is off, so that + * NotClippedByChildren will compute a clip list + * for the root window, so miPaintWindow works + */ + screenIsSaved = SCREEN_SAVER_OFF; +#ifndef NOLOGOHACK + if (logoScreenSaver) + (*pWin->drawable.pScreen->ClearToBackground)(pWin, 0, 0, 0, 0, FALSE); +#endif + (*pWin->drawable.pScreen->MoveWindow)(pWin, + (short)(-(rand() % RANDOM_WIDTH)), + (short)(-(rand() % RANDOM_WIDTH)), + pWin->nextSib, VTMove); +#ifndef NOLOGOHACK + if (logoScreenSaver) + DrawLogo(pWin); +#endif + screenIsSaved = SCREEN_SAVER_ON; + } + /* + * Call the DDX saver in case it wants to do something + * at cycle time + */ + else if (savedScreenInfo[i].blanked == SCREEN_IS_BLANKED) + { + (* screenInfo.screens[i]->SaveScreen) (screenInfo.screens[i], + type); + } + break; + case SCREEN_SAVER_ON: + if (ScreenSaverBlanking != DontPreferBlanking) + { + if ((* screenInfo.screens[i]->SaveScreen) + (screenInfo.screens[i], what)) + { + savedScreenInfo[i].blanked = SCREEN_IS_BLANKED; + continue; + } + if ((ScreenSaverAllowExposures != DontAllowExposures) && + TileScreenSaver(i, SCREEN_IS_BLACK)) + { + savedScreenInfo[i].blanked = SCREEN_IS_BLACK; + continue; + } + } + if ((ScreenSaverAllowExposures != DontAllowExposures) && + TileScreenSaver(i, SCREEN_IS_TILED)) + { + savedScreenInfo[i].blanked = SCREEN_IS_TILED; + } + else + savedScreenInfo[i].blanked = SCREEN_ISNT_SAVED; + break; + } + } + screenIsSaved = what; + if (mode == ScreenSaverReset) + SetScreenSaverTimer(); +} + +static Bool +TileScreenSaver(int i, int kind) +{ + int j; + int result; + XID attributes[3]; + Mask mask; + WindowPtr pWin; + CursorMetricRec cm; + unsigned char *srcbits, *mskbits; + CursorPtr cursor; + XID cursorID = 0; + int attri; + + mask = 0; + attri = 0; + switch (kind) { + case SCREEN_IS_TILED: + switch (WindowTable[i]->backgroundState) { + case BackgroundPixel: + attributes[attri++] = WindowTable[i]->background.pixel; + mask |= CWBackPixel; + break; + case BackgroundPixmap: + attributes[attri++] = None; + mask |= CWBackPixmap; + break; + default: + break; + } + break; + case SCREEN_IS_BLACK: + attributes[attri++] = WindowTable[i]->drawable.pScreen->blackPixel; + mask |= CWBackPixel; + break; + } + mask |= CWOverrideRedirect; + attributes[attri++] = xTrue; + + /* + * create a blank cursor + */ + + cm.width=16; + cm.height=16; + cm.xhot=8; + cm.yhot=8; + srcbits = (unsigned char *)xalloc( BitmapBytePad(32)*16); + mskbits = (unsigned char *)xalloc( BitmapBytePad(32)*16); + if (!srcbits || !mskbits) + { + xfree(srcbits); + xfree(mskbits); + cursor = 0; + } + else + { + for (j=0; jwidth + RANDOM_WIDTH, + (unsigned short)screenInfo.screens[i]->height + RANDOM_WIDTH, + 0, InputOutput, mask, attributes, 0, serverClient, + wVisual (WindowTable[i]), &result); + + if (cursor) + FreeResource (cursorID, RT_NONE); + + if (!pWin) + return FALSE; + + if (!AddResource(pWin->drawable.id, RT_WINDOW, + (pointer)savedScreenInfo[i].pWindow)) + return FALSE; + + if (mask & CWBackPixmap) + { + MakeRootTile (pWin); + (*pWin->drawable.pScreen->ChangeWindowAttributes)(pWin, CWBackPixmap); + } + MapWindow(pWin, serverClient); +#ifndef NOLOGOHACK + if (kind == SCREEN_IS_TILED && logoScreenSaver) + DrawLogo(pWin); +#endif + return TRUE; +} + +/* + * FindWindowWithOptional + * + * search ancestors of the given window for an entry containing + * a WindowOpt structure. Assumptions: some parent will + * contain the structure. + */ + +_X_EXPORT WindowPtr +FindWindowWithOptional (WindowPtr w) +{ + do + w = w->parent; + while (!w->optional); + return w; +} + +/* + * CheckWindowOptionalNeed + * + * check each optional entry in the given window to see if + * the value is satisfied by the default rules. If so, + * release the optional record + */ + +_X_EXPORT void +CheckWindowOptionalNeed (WindowPtr w) +{ + WindowOptPtr optional; + WindowOptPtr parentOptional; + + if (!w->parent) + return; + optional = w->optional; + if (optional->dontPropagateMask != DontPropagateMasks[w->dontPropagate]) + return; + if (optional->otherEventMasks != 0) + return; + if (optional->otherClients != NULL) + return; + if (optional->passiveGrabs != NULL) + return; + if (optional->userProps != NULL) + return; + if (optional->backingBitPlanes != ~0L) + return; + if (optional->backingPixel != 0) + return; +#ifdef SHAPE + if (optional->boundingShape != NULL) + return; + if (optional->clipShape != NULL) + return; + if (optional->inputShape != NULL) + return; +#endif +#ifdef XINPUT + if (optional->inputMasks != NULL) + return; +#endif + parentOptional = FindWindowWithOptional(w)->optional; + if (optional->visual != parentOptional->visual) + return; + if (optional->cursor != None && + (optional->cursor != parentOptional->cursor || + w->parent->cursorIsNone)) + return; + if (optional->colormap != parentOptional->colormap) + return; + DisposeWindowOptional (w); +} + +/* + * MakeWindowOptional + * + * create an optional record and initialize it with the default + * values. + */ + +_X_EXPORT Bool +MakeWindowOptional (WindowPtr pWin) +{ + WindowOptPtr optional; + WindowOptPtr parentOptional; + + if (pWin->optional) + return TRUE; + optional = (WindowOptPtr) xalloc (sizeof (WindowOptRec)); + if (!optional) + return FALSE; + optional->dontPropagateMask = DontPropagateMasks[pWin->dontPropagate]; + optional->otherEventMasks = 0; + optional->otherClients = NULL; + optional->passiveGrabs = NULL; + optional->userProps = NULL; + optional->backingBitPlanes = ~0L; + optional->backingPixel = 0; +#ifdef SHAPE + optional->boundingShape = NULL; + optional->clipShape = NULL; + optional->inputShape = NULL; +#endif +#ifdef XINPUT + optional->inputMasks = NULL; +#endif + parentOptional = FindWindowWithOptional(pWin)->optional; + optional->visual = parentOptional->visual; + if (!pWin->cursorIsNone) + { + optional->cursor = parentOptional->cursor; + optional->cursor->refcnt++; + } + else + { + optional->cursor = None; + } + optional->colormap = parentOptional->colormap; + pWin->optional = optional; + return TRUE; +} + +#ifndef NOLOGOHACK +static void +DrawLogo(WindowPtr pWin) +{ + DrawablePtr pDraw; + ScreenPtr pScreen; + int x, y; + unsigned int width, height, size; + GC *pGC; + int thin, gap, d31; + DDXPointRec poly[4]; + ChangeGCVal fore[2], back[2]; + xrgb rgb[2]; + BITS32 fmask, bmask; + ColormapPtr cmap; + + pDraw = (DrawablePtr)pWin; + pScreen = pDraw->pScreen; + x = -pWin->origin.x; + y = -pWin->origin.y; + width = pScreen->width; + height = pScreen->height; + pGC = GetScratchGC(pScreen->rootDepth, pScreen); + if (!pGC) + return; + + if ((rand() % 100) <= 17) /* make the probability for white fairly low */ + fore[0].val = pScreen->whitePixel; + else + fore[0].val = pScreen->blackPixel; + if ((pWin->backgroundState == BackgroundPixel) && + (cmap = (ColormapPtr)LookupIDByType(wColormap (pWin), RT_COLORMAP))) { + Pixel querypixels[2]; + + querypixels[0] = fore[0].val; + querypixels[1] = pWin->background.pixel; + QueryColors(cmap, 2, querypixels, rgb); + if ((rgb[0].red == rgb[1].red) && + (rgb[0].green == rgb[1].green) && + (rgb[0].blue == rgb[1].blue)) { + if (fore[0].val == pScreen->blackPixel) + fore[0].val = pScreen->whitePixel; + else + fore[0].val = pScreen->blackPixel; + } + } + fore[1].val = FillSolid; + fmask = GCForeground|GCFillStyle; + if (pWin->backgroundState == BackgroundPixel) { + back[0].val = pWin->background.pixel; + back[1].val = FillSolid; + bmask = GCForeground|GCFillStyle; + } else { + back[0].val = 0; + back[1].val = 0; + dixChangeGC(NullClient, pGC, GCTileStipXOrigin|GCTileStipYOrigin, + NULL, back); + back[0].val = FillTiled; + back[1].ptr = pWin->background.pixmap; + bmask = GCFillStyle|GCTile; + } + + /* should be the same as the reference function XmuDrawLogo() */ + + size = width; + if (height < width) + size = height; + size = RANDOM_WIDTH + rand() % (size - RANDOM_WIDTH); + size &= ~1; + x += rand() % (width - size); + y += rand() % (height - size); + +/* + * Draw what will be the thin strokes. + * + * ----- + * / / + * / / + * / / + * / / + * /____/ + * d + * + * Point d is 9/44 (~1/5) of the way across. + */ + + thin = (size / 11); + if (thin < 1) thin = 1; + gap = (thin+3) / 4; + d31 = thin + thin + gap; + poly[0].x = x + size; poly[0].y = y; + poly[1].x = x + size-d31; poly[1].y = y; + poly[2].x = x + 0; poly[2].y = y + size; + poly[3].x = x + d31; poly[3].y = y + size; + dixChangeGC(NullClient, pGC, fmask, NULL, fore); + ValidateGC(pDraw, pGC); + (*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly); + +/* + * Erase area not needed for lower thin stroke. + * + * ------ + * / / + * / __ / + * / / / + * / / / + * /__/__/ + */ + + poly[0].x = x + d31/2; poly[0].y = y + size; + poly[1].x = x + size / 2; poly[1].y = y + size/2; + poly[2].x = x + (size/2)+(d31-(d31/2)); poly[2].y = y + size/2; + poly[3].x = x + d31; poly[3].y = y + size; + dixChangeGC(NullClient, pGC, bmask, NULL, back); + ValidateGC(pDraw, pGC); + (*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly); + +/* + * Erase area not needed for upper thin stroke. + * + * ------ + * / / / + * /--/ / + * / / + * / / + * /_____/ + */ + + poly[0].x = x + size - d31/2; poly[0].y = y; + poly[1].x = x + size / 2; poly[1].y = y + size/2; + poly[2].x = x + (size/2)-(d31-(d31/2)); poly[2].y = y + size/2; + poly[3].x = x + size - d31; poly[3].y = y; + ValidateGC(pDraw, pGC); + (*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly); + +/* + * Draw thick stroke. + * Point b is 1/4 of the way across. + * + * b + * ----- + * \ \ + * \ \ + * \ \ + * \ \ + * \____\ + */ + + poly[0].x = x; poly[0].y = y; + poly[1].x = x + size/4; poly[1].y = y; + poly[2].x = x + size; poly[2].y = y + size; + poly[3].x = x + size - size/4; poly[3].y = y + size; + dixChangeGC(NullClient, pGC, fmask, NULL, fore); + ValidateGC(pDraw, pGC); + (*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly); + +/* + * Erase to create gap. + * + * / + * / + * / + * / + * / + */ + + poly[0].x = x + size- thin; poly[0].y = y; + poly[1].x = x + size-( thin+gap); poly[1].y = y; + poly[2].x = x + thin; poly[2].y = y + size; + poly[3].x = x + thin + gap; poly[3].y = y + size; + dixChangeGC(NullClient, pGC, bmask, NULL, back); + ValidateGC(pDraw, pGC); + (*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly); + + FreeScratchGC(pGC); +} + +#endif diff --git a/xorg-server-1.4/dix/xpstubs.c b/xorg-server-1.4/dix/xpstubs.c new file mode 100644 index 0000000..59340ad --- /dev/null +++ b/xorg-server-1.4/dix/xpstubs.c @@ -0,0 +1,78 @@ +/* +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. +*/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "misc.h" +#include +#ifdef XPRINT +#include "DiPrint.h" +#else +extern Bool XpClientIsBitmapClient(ClientPtr client); +extern Bool XpClientIsPrintClient(ClientPtr client, FontPathElementPtr fpe); +#endif + +Bool +XpClientIsBitmapClient( + ClientPtr client) +{ + return TRUE; +} + +Bool +XpClientIsPrintClient( + ClientPtr client, + FontPathElementPtr fpe) +{ + 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/xorg-server-1.4/doc/Makefile.am b/xorg-server-1.4/doc/Makefile.am new file mode 100644 index 0000000..ce1979d --- /dev/null +++ b/xorg-server-1.4/doc/Makefile.am @@ -0,0 +1,35 @@ +appmandir = $(APP_MAN_DIR) +filemandir = $(FILE_MAN_DIR) + +# Xserver.man covers options generic to all X servers built in this tree +# (i.e. those handled in the os/utils.c options processing instead of in +# the DDX-level options processing) +appman_PRE = Xserver.man.pre +fileman_PRE = SecurityPolicy.man.pre + +appman_PROCESSED = $(appman_PRE:man.pre=man) +fileman_PROCESSED = $(fileman_PRE:man.pre=man) + +appman_DATA = $(appman_PRE:man.pre=@APP_MAN_SUFFIX@) +fileman_DATA = $(fileman_PRE:man.pre=@FILE_MAN_SUFFIX@) + +BUILT_SOURCES = $(appman_PROCESSED) $(fileman_PROCESSED) + +CLEANFILES = $(appman_PROCESSED) $(appman_DATA) \ + $(fileman_PROCESSED) $(fileman_DATA) + +include $(top_srcdir)/cpprules.in + +.man.$(APP_MAN_SUFFIX): + cp $< $@ + +.man.$(FILE_MAN_SUFFIX): + cp $< $@ + +EXTRAMANDEFS = -D__default_font_path__="`echo $(COMPILEDDEFAULTFONTPATH) | sed -e 's/,/, /g'`" + +# Docs about X server internals that we ship with source but don't install +DEVEL_DOCS = smartsched + + +EXTRA_DIST = $(DEVEL_DOCS) $(appman_PRE) $(fileman_PRE) diff --git a/xorg-server-1.4/doc/Makefile.in b/xorg-server-1.4/doc/Makefile.in new file mode 100644 index 0000000..fb6043f --- /dev/null +++ b/xorg-server-1.4/doc/Makefile.in @@ -0,0 +1,636 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*- Makefile -*- +# Rules for generating files using the C pre-processor +# (Replaces CppFileTarget from Imake) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/cpprules.in +subdir = doc +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(filemandir)" +appmanDATA_INSTALL = $(INSTALL_DATA) +filemanDATA_INSTALL = $(INSTALL_DATA) +DATA = $(appman_DATA) $(fileman_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +appmandir = $(APP_MAN_DIR) +filemandir = $(FILE_MAN_DIR) + +# Xserver.man covers options generic to all X servers built in this tree +# (i.e. those handled in the os/utils.c options processing instead of in +# the DDX-level options processing) +appman_PRE = Xserver.man.pre +fileman_PRE = SecurityPolicy.man.pre +appman_PROCESSED = $(appman_PRE:man.pre=man) +fileman_PROCESSED = $(fileman_PRE:man.pre=man) +appman_DATA = $(appman_PRE:man.pre=@APP_MAN_SUFFIX@) +fileman_DATA = $(fileman_PRE:man.pre=@FILE_MAN_SUFFIX@) +BUILT_SOURCES = $(appman_PROCESSED) $(fileman_PROCESSED) +CLEANFILES = $(appman_PROCESSED) $(appman_DATA) \ + $(fileman_PROCESSED) $(fileman_DATA) + +SED = sed +SUFFIXES = .pre .man .man.pre + +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e '/\@\@$$/s/\@\@$$/\\/' + + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ +XORGMANNAME = X Version 11 +XSERVERNAME = Xorg +MANDEFS = \ + -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__appmansuffix__=$(APP_MAN_SUFFIX) \ + -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ + -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ + -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ + -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ + -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ + -D__mandir__=$(mandir) \ + -D__projectroot__=$(prefix) \ + -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ + -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) + +EXTRAMANDEFS = -D__default_font_path__="`echo $(COMPILEDDEFAULTFONTPATH) | sed -e 's/,/, /g'`" + +# Docs about X server internals that we ship with source but don't install +DEVEL_DOCS = smartsched +EXTRA_DIST = $(DEVEL_DOCS) $(appman_PRE) $(fileman_PRE) +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .pre .man .man.pre .$(APP_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-appmanDATA: $(appman_DATA) + @$(NORMAL_INSTALL) + test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)" + @list='$(appman_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \ + $(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \ + done + +uninstall-appmanDATA: + @$(NORMAL_UNINSTALL) + @list='$(appman_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \ + rm -f "$(DESTDIR)$(appmandir)/$$f"; \ + done +install-filemanDATA: $(fileman_DATA) + @$(NORMAL_INSTALL) + test -z "$(filemandir)" || $(MKDIR_P) "$(DESTDIR)$(filemandir)" + @list='$(fileman_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(filemanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(filemandir)/$$f'"; \ + $(filemanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(filemandir)/$$f"; \ + done + +uninstall-filemanDATA: + @$(NORMAL_UNINSTALL) + @list='$(fileman_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(filemandir)/$$f'"; \ + rm -f "$(DESTDIR)$(filemandir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(filemandir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-appmanDATA install-filemanDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-appmanDATA uninstall-filemanDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-appmanDATA install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am \ + install-filemanDATA install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-appmanDATA uninstall-filemanDATA + + +.pre: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ + +.man.pre.man: + $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ + +.man.$(APP_MAN_SUFFIX): + cp $< $@ + +.man.$(FILE_MAN_SUFFIX): + cp $< $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/doc/SecurityPolicy.man.pre b/xorg-server-1.4/doc/SecurityPolicy.man.pre new file mode 100644 index 0000000..f5aff0c --- /dev/null +++ b/xorg-server-1.4/doc/SecurityPolicy.man.pre @@ -0,0 +1,258 @@ +.\" Split out of Xserver.man, which was covered by this notice: +.\" Copyright 1984 - 1991, 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. +.\" $XFree86: xc/programs/Xserver/Xserver.man,v 3.31 2004/01/10 22:27:46 dawes Exp $ +.\" shorthand for double quote that works everywhere. +.ds q \N'34' +.TH SecurityPolicy __filemansuffix__ __xorgversion__ +.SH NAME +SecurityPolicy \- X Window System SECURITY Extension Policy file format +.SH DESCRIPTION +The SECURITY extension to the X Window System uses a policy file to determine +which operations should be allowed or denied. The default location for this +file is +.IR __projectroot__/lib/xserver/SecurityPolicy . +.PP +The syntax of the security policy file is as follows. +Notation: "*" means zero or more occurrences of the preceding element, +and "+" means one or more occurrences. To interpret , ignore +the text after the /; it is used to distinguish between instances of + in the next section. +.PP +.nf + ::= * + + ::= '\en' + + ::= | | | + + ::= # * '\en' + + ::= '\en' + + ::= sitepolicy '\en' + + ::= property '\en' + + ::= + + ::= any | root | + + ::= | + + ::= = + + ::= [ | | ]* + + ::= r | w | d + + ::= a | i | e + + ::= | | + + ::= " * " + + ::= ' * ' + + ::= + + + ::= [ ' ' | '\et' ]* + +Character sets: + + ::= any character except '\en' + ::= any character except " + ::= any character except ' + ::= any character except those in +.fi +.PP +The semantics associated with the above syntax are as follows. +.PP +, the first line in the file, specifies the file format +version. If the server does not recognize the version , it +ignores the rest of the file. The version string for the file format +described here is "version-1" . +.PP +Once past the , lines that do not match the above syntax +are ignored. +.PP + lines are ignored. +.PP + lines are currently ignored. They are intended to +specify the site policies used by the XC-QUERY-SECURITY-1 +authorization method. +.PP + lines specify how the server should react to untrusted +client requests that affect the X Window property named . +The rest of this section describes the interpretation of an +. +.PP +For an to apply to a given instance of , + must be on a window that is in the set of windows +specified by . If is any, the rule applies to + on any window. If is root, the rule applies to + only on root windows. +.PP +If is , the following apply. If is a , the rule applies when the window also +has that , regardless of its value. If is a , must also have +the value specified by . In this case, the property must +have type STRING and format 8, and should contain one or more +null-terminated strings. If any of the strings match , the +rule applies. +.PP +The definition of string matching is simple case-sensitive string +comparison with one elaboration: the occurrence of the character '*' in + is a wildcard meaning "any string." A can +contain multiple wildcards anywhere in the string. For example, "x*" +matches strings that begin with x, "*x" matches strings that end with +x, "*x*" matches strings containing x, and "x*y*" matches strings that +start with x and subsequently contain y. +.PP +There may be multiple lines for a given . +The rules are tested in the order that they appear in the file. The +first rule that applies is used. +.PP + specify operations that untrusted clients may attempt, and +the actions that the server should take in response to those operations. +.PP + can be r (read), w (write), or d (delete). The following +table shows how X Protocol property requests map to these operations +in the X.Org server implementation. +.PP +.nf +GetProperty r, or r and d if delete = True +ChangeProperty w +RotateProperties r and w +DeleteProperty d +ListProperties none, untrusted clients can always list all properties +.fi +.PP + can be a (allow), i (ignore), or e (error). Allow means +execute the request as if it had been issued by a trusted client. +Ignore means treat the request as a no-op. In the case of +GetProperty, ignore means return an empty property value if the +property exists, regardless of its actual value. Error means do not +execute the request and return a BadAtom error with the atom set to +the property name. Error is the default action for all properties, +including those not listed in the security policy file. +.PP +An applies to all s that follow it, until the next + is encountered. Thus, irwad means ignore read and write, +allow delete. +.PP +GetProperty and RotateProperties may do multiple operations (r and d, +or r and w). If different actions apply to the operations, the most +severe action is applied to the whole request; there is no partial +request execution. The severity ordering is: allow < ignore < error. +Thus, if the for a property are ired (ignore read, error +delete), and an untrusted client attempts GetProperty on that property +with delete = True, an error is returned, but the property value is +not. Similarly, if any of the properties in a RotateProperties do not +allow both read and write, an error is returned without changing any +property values. +.PP +Here is an example security policy file. +.PP +.ta 3i 4i +.nf +version-1 + +XCOMM Allow reading of application resources, but not writing. +property RESOURCE_MANAGER root ar iw +property SCREEN_RESOURCES root ar iw + +XCOMM Ignore attempts to use cut buffers. Giving errors causes apps to crash, +XCOMM and allowing access may give away too much information. +property CUT_BUFFER0 root irw +property CUT_BUFFER1 root irw +property CUT_BUFFER2 root irw +property CUT_BUFFER3 root irw +property CUT_BUFFER4 root irw +property CUT_BUFFER5 root irw +property CUT_BUFFER6 root irw +property CUT_BUFFER7 root irw + +XCOMM If you are using Motif, you probably want these. +property _MOTIF_DEFAULT_BINDINGS root ar iw +property _MOTIF_DRAG_WINDOW root ar iw +property _MOTIF_DRAG_TARGETS any ar iw +property _MOTIF_DRAG_ATOMS any ar iw +property _MOTIF_DRAG_ATOM_PAIRS any ar iw + +XCOMM The next two rules let xwininfo -tree work when untrusted. +property WM_NAME any ar + +XCOMM Allow read of WM_CLASS, but only for windows with WM_NAME. +XCOMM This might be more restrictive than necessary, but demonstrates +XCOMM the facility, and is also an attempt to +XCOMM say "top level windows only." +property WM_CLASS WM_NAME ar + +XCOMM These next three let xlsclients work untrusted. Think carefully +XCOMM before including these; giving away the client machine name and command +XCOMM may be exposing too much. +property WM_STATE WM_NAME ar +property WM_CLIENT_MACHINE WM_NAME ar +property WM_COMMAND WM_NAME ar + +XCOMM To let untrusted clients use the standard colormaps created by +XCOMM xstdcmap, include these lines. +property RGB_DEFAULT_MAP root ar +property RGB_BEST_MAP root ar +property RGB_RED_MAP root ar +property RGB_GREEN_MAP root ar +property RGB_BLUE_MAP root ar +property RGB_GRAY_MAP root ar + +XCOMM To let untrusted clients use the color management database created +XCOMM by xcmsdb, include these lines. +property XDCCC_LINEAR_RGB_CORRECTION root ar +property XDCCC_LINEAR_RGB_MATRICES root ar +property XDCCC_GRAY_SCREENWHITEPOINT root ar +property XDCCC_GRAY_CORRECTION root ar + +XCOMM To let untrusted clients use the overlay visuals that many vendors +XCOMM support, include this line. +property SERVER_OVERLAY_VISUALS root ar + +XCOMM Dumb examples to show other capabilities. + +XCOMM oddball property names and explicit specification of error conditions +property "property with spaces" 'property with "' aw er ed + +XCOMM Allow deletion of Woo-Hoo if window also has property OhBoy with value +XCOMM ending in "son". Reads and writes will cause an error. +property Woo-Hoo OhBoy = "*son" ad + +.fi +.SH FILES +.TP 30 +.I __projectroot__/lib/xserver/SecurityPolicy +Default X server security policy +.SH "SEE ALSO" +.PP +\fIXserver\fp(__appmansuffix__), +.I "Security Extension Specification" diff --git a/xorg-server-1.4/doc/Xserver.man.pre b/xorg-server-1.4/doc/Xserver.man.pre new file mode 100644 index 0000000..aac3b51 --- /dev/null +++ b/xorg-server-1.4/doc/Xserver.man.pre @@ -0,0 +1,583 @@ +.\" $Xorg: Xserver.man,v 1.4 2001/02/09 02:04:07 xorgcvs Exp $ +.\" $XdotOrg: xserver/xorg/doc/Xserver.man.pre,v 1.4 2005/12/23 20:11:12 alanc Exp $ +.\" Copyright 1984 - 1991, 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. +.\" $XFree86: xc/programs/Xserver/Xserver.man,v 3.31 2004/01/10 22:27:46 dawes Exp $ +.\" shorthand for double quote that works everywhere. +.ds q \N'34' +.TH XSERVER 1 __xorgversion__ +.SH NAME +Xserver \- X Window System display server +.SH SYNOPSIS +.B X +[option ...] +.SH DESCRIPTION +.I X +is the generic name for the X Window System display server. It is +frequently a link or a copy of the appropriate server binary for +driving the most frequently used server on a given machine. +.SH "STARTING THE SERVER" +The X server is usually started from the X Display Manager program +\fIxdm\fP(1) or a similar display manager program. +This utility is run from the system boot files and takes care of keeping +the server running, prompting for usernames and passwords, and starting up +the user sessions. +.PP +Installations that run more than one window system may need to use the +\fIxinit\fP(1) utility instead of a display manager. However, \fIxinit\fP is +to be considered a tool for building startup scripts and is not +intended for use by end users. Site administrators are \fBstrongly\fP +urged to use a display manager, or build other interfaces for novice users. +.PP +The X server may also be started directly by the user, though this +method is usually reserved for testing and is not recommended for +normal operation. On some platforms, the user must have special +permission to start the X server, often because access to certain +devices (e.g. \fI/dev/mouse\fP) is restricted. +.PP +When the X server starts up, it typically takes over the display. If +you are running on a workstation whose console is the display, you may +not be able to log into the console while the server is running. +.SH OPTIONS +Many X servers have device-specific command line options. See the manual +pages for the individual servers for more details; a list of +server-specific manual pages is provided in the SEE ALSO section below. +.PP +All of the X servers accept the command line options described below. +Some X servers may have alternative ways of providing the parameters +described here, but the values provided via the command line options +should override values specified via other mechanisms. +.TP 8 +.B :\fIdisplaynumber\fP +The X server runs as the given \fIdisplaynumber\fP, which by default is 0. +If multiple X servers are to run simultaneously on a host, each must have +a unique display number. See the DISPLAY +NAMES section of the \fIX\fP(__miscmansuffix__) manual page to learn how to +specify which display number clients should try to use. +.TP 8 +.B \-a \fInumber\fP +sets pointer acceleration (i.e. the ratio of how much is reported to how much +the user actually moved the pointer). +.TP 8 +.B \-ac +disables host-based access control mechanisms. Enables access by any host, +and permits any host to modify the access control list. +Use with extreme caution. +This option exists primarily for running test suites remotely. +.TP 8 +.B \-audit \fIlevel\fP +sets the audit trail level. The default level is 1, meaning only connection +rejections are reported. Level 2 additionally reports all successful +connections and disconnects. Level 4 enables messages from the +SECURITY extension, if present, including generation and revocation of +authorizations and violations of the security policy. +Level 0 turns off the audit trail. +Audit lines are sent as standard error output. +.TP 8 +.B \-auth \fIauthorization-file\fP +specifies a file which contains a collection of authorization records used +to authenticate access. See also the \fIxdm\fP(1) and +\fIXsecurity\fP(__miscmansuffix__) manual pages. +.TP 8 +.B \-bs +disables backing store support on all screens. +.TP 8 +.B \-br +sets the default root window to solid black instead of the standard root weave +pattern. +.TP 8 +.B \-c +turns off key-click. +.TP 8 +.B c \fIvolume\fP +sets key-click volume (allowable range: 0-100). +.TP 8 +.B \-cc \fIclass\fP +sets the visual class for the root window of color screens. +The class numbers are as specified in the X protocol. +Not obeyed by all servers. +.TP 8 +.B \-co \fIfilename\fP +sets name of RGB color database. The default is +.IR __projectroot__/share/X11/rgb . +.ig +.TP 8 +.B \-config \fIfilename\fP +reads more options from the given file. Options in the file may be separated +by newlines if desired. If a '#' character appears on a line, all characters +between it and the next newline are ignored, providing a simple commenting +facility. The \fB\-config\fP option itself may appear in the file. +.BR NOTE : +This option is disabled when the Xserver is run with an effective uid +different from the user's real uid. +.. +.TP 8 +.B \-core +causes the server to generate a core dump on fatal errors. +.TP 8 +.B \-deferglyphs \fIwhichfonts\fP +specifies the types of fonts for which the server should attempt to use +deferred glyph loading. \fIwhichfonts\fP can be all (all fonts), +none (no fonts), or 16 (16 bit fonts only). +.TP 8 +.B \-dpi \fIresolution\fP +sets the resolution for all screens, in dots per inch. +To be used when the server cannot determine the screen size(s) from the +hardware. +.TP 8 +.B dpms +enables DPMS (display power management services), where supported. The +default state is platform and configuration specific. +.TP 8 +.B \-dpms +disables DPMS (display power management services). The default state +is platform and configuration specific. +.TP 8 +.BI \-extension extensionName +disables named extension. If an unknown extension name is specified, +a list of accepted extension names is printed. +.TP 8 +.BI \+extension extensionName +enables named extension. If an unknown extension name is specified, +a list of accepted extension names is printed. +.TP 8 +.B \-f \fIvolume\fP +sets feep (bell) volume (allowable range: 0-100). +.TP 8 +.B \-fc \fIcursorFont\fP +sets default cursor font. +.TP 8 +.B \-fn \fIfont\fP +sets the default font. +.TP 8 +.B \-fp \fIfontPath\fP +sets the search path for fonts. This path is a comma separated list +of directories which the X server searches for font databases. +See the FONTS section of this manual page for more information and the default +list. +.TP 8 +.B \-help +prints a usage message. +.TP 8 +.B \-I +causes all remaining command line arguments to be ignored. +.TP 8 +.B \-maxbigreqsize \fIsize\fP +sets the maximum big request to +.I size +MB. +.TP 8 +.B \-nolisten \fItrans-type\fP +disables a transport type. For example, TCP/IP connections can be disabled +with +.BR "\-nolisten tcp" . +This option may be issued multiple times to disable listening to different +transport types. +.TP 8 +.B \-noreset +prevents a server reset when the last client connection is closed. This +overrides a previous +.B \-terminate +command line option. +.TP 8 +.B \-p \fIminutes\fP +sets screen-saver pattern cycle time in minutes. +.TP 8 +.B \-pn +permits the server to continue running if it fails to establish all of +its well-known sockets (connection points for clients), but +establishes at least one. This option is set by default. +.TP 8 +.B \-nopn +causes the server to exit if it fails to establish all of its well-known +sockets (connection points for clients). +.TP 8 +.B \-r +turns off auto-repeat. +.TP 8 +.B r +turns on auto-repeat. +.TP 8 +.B \-s \fIminutes\fP +sets screen-saver timeout time in minutes. +.TP 8 +.B \-su +disables save under support on all screens. +.TP 8 +.B \-t \fInumber\fP +sets pointer acceleration threshold in pixels (i.e. after how many pixels +pointer acceleration should take effect). +.TP 8 +.B \-terminate +causes the server to terminate at server reset, instead of continuing to run. +This overrides a previous +.B \-noreset +command line option. +.TP 8 +.B \-to \fIseconds\fP +sets default connection timeout in seconds. +.TP 8 +.B \-tst +disables all testing extensions (e.g., XTEST, XTrap, XTestExtension1, RECORD). +.TP 8 +.B tty\fIxx\fP +ignored, for servers started the ancient way (from init). +.TP 8 +.B v +sets video-off screen-saver preference. +.TP 8 +.B \-v +sets video-on screen-saver preference. +.TP 8 +.B \-wm +forces the default backing-store of all windows to be WhenMapped. This +is a backdoor way of getting backing-store to apply to all windows. +Although all mapped windows will have backing store, the backing store +attribute value reported by the server for a window will be the last +value established by a client. If it has never been set by a client, +the server will report the default value, NotUseful. This behavior is +required by the X protocol, which allows the server to exceed the +client's backing store expectations but does not provide a way to tell +the client that it is doing so. +.TP 8 +.B \-wr +sets the default root window to solid white instead of the standard root weave +pattern. +.TP 8 +.B \-x \fIextension\fP +loads the specified extension at init. +This is a no-op for most implementations. +.TP 8 +.B [+-]xinerama +enables(+) or disables(-) the XINERAMA extension. The default state is +platform and configuration specific. +.SH SERVER DEPENDENT OPTIONS +Some X servers accept the following options: +.TP 8 +.B \-ld \fIkilobytes\fP +sets the data space limit of the server to the specified number of kilobytes. +A value of zero makes the data size as large as possible. The default value +of \-1 leaves the data space limit unchanged. +.TP 8 +.B \-lf \fIfiles\fP +sets the number-of-open-files limit of the server to the specified number. +A value of zero makes the limit as large as possible. The default value +of \-1 leaves the limit unchanged. +.TP 8 +.B \-ls \fIkilobytes\fP +sets the stack space limit of the server to the specified number of kilobytes. +A value of zero makes the stack size as large as possible. The default value +of \-1 leaves the stack space limit unchanged. +.TP 8 +.B \-logo +turns on the X Window System logo display in the screen-saver. +There is currently no way to change this from a client. +.TP 8 +.B nologo +turns off the X Window System logo display in the screen-saver. +There is currently no way to change this from a client. +.TP 8 +.B \-render +.BR default | mono | gray | color +sets the color allocation policy that will be used by the render extension. +.RS 8 +.TP 8 +.I default +selects the default policy defined for the display depth of the X +server. +.TP 8 +.I mono +don't use any color cell. +.TP 8 +.I gray +use a gray map of 13 color cells for the X render extension. +.TP 8 +.I color +use a color cube of at most 4*4*4 colors (that is 64 color cells). +.RE +.TP 8 +.B \-dumbSched +disables smart scheduling on platforms that support the smart scheduler. +.TP +.B \-schedInterval \fIinterval\fP +sets the smart scheduler's scheduling interval to +.I interval +milliseconds. +.SH XDMCP OPTIONS +X servers that support XDMCP have the following options. +See the \fIX Display Manager Control Protocol\fP specification for more +information. +.TP 8 +.B \-query \fIhostname\fP +enables XDMCP and sends Query packets to the specified +.IR hostname . +.TP 8 +.B \-broadcast +enable XDMCP and broadcasts BroadcastQuery packets to the network. The +first responding display manager will be chosen for the session. +.TP 8 +.B \-multicast [\fIaddress\fP [\fIhop count\fP]] +Enable XDMCP and multicast BroadcastQuery packets to the network. +The first responding display manager is chosen for the session. If an +address is specified, the multicast is sent to that address. If no +address is specified, the multicast is sent to the default XDMCP IPv6 +multicast group. If a hop count is specified, it is used as the maximum +hop count for the multicast. If no hop count is specified, the multicast +is set to a maximum of 1 hop, to prevent the multicast from being routed +beyond the local network. +.TP 8 +.B \-indirect \fIhostname\fP +enables XDMCP and send IndirectQuery packets to the specified +.IR hostname . +.TP 8 +.B \-port \fIport-number\fP +uses the specified \fIport-number\fP for XDMCP packets, instead of the +default. This option must be specified before any \-query, \-broadcast, +\-multicast, or \-indirect options. +.TP 8 +.B \-from \fIlocal-address\fP +specifies the local address to connect from (useful if the connecting host +has multiple network interfaces). The \fIlocal-address\fP may be expressed +in any form acceptable to the host platform's \fIgethostbyname\fP(3) +implementation. +.TP 8 +.B \-once +causes the server to terminate (rather than reset) when the XDMCP session +ends. +.TP 8 +.B \-class \fIdisplay-class\fP +XDMCP has an additional display qualifier used in resource lookup for +display-specific options. This option sets that value, by default it +is "MIT-Unspecified" (not a very useful value). +.TP 8 +.B \-cookie \fIxdm-auth-bits\fP +When testing XDM-AUTHENTICATION-1, a private key is shared between the +server and the manager. This option sets the value of that private +data (not that it is very private, being on the command line!). +.TP 8 +.B \-displayID \fIdisplay-id\fP +Yet another XDMCP specific value, this one allows the display manager to +identify each display so that it can locate the shared key. +.SH XKEYBOARD OPTIONS +X servers that support the XKEYBOARD (a.k.a. \*qXKB\*q) extension accept the +following options. All layout files specified on the command line must be +located in the XKB base directory or a subdirectory, and specified as the +relative path from the XKB base directory. The default XKB base directory is +.IR __projectroot__/lib/X11/xkb . +.TP 8 +.B [+-]kb +enables(+) or disables(-) the XKEYBOARD extension. +.TP 8 +.BR [+-]accessx " [ \fItimeout\fP [ \fItimeout_mask\fP [ \fIfeedback\fP [ \fIoptions_mask\fP ] ] ] ]" +enables(+) or disables(-) AccessX key sequences. +.TP 8 +.B \-xkbdir \fIdirectory\fP +base directory for keyboard layout files. This option is not available +for setuid X servers (i.e., when the X server's real and effective uids +are different). +.TP 8 +.B \-ardelay \fImilliseconds\fP +sets the autorepeat delay (length of time in milliseconds that a key must +be depressed before autorepeat starts). +.TP 8 +.B \-arinterval \fImilliseconds\fP +sets the autorepeat interval (length of time in milliseconds that should +elapse between autorepeat-generated keystrokes). +.TP 8 +.B \-xkbmap \fIfilename\fP +loads keyboard description in \fIfilename\fP on server startup. +.SH SECURITY EXTENSION OPTIONS +X servers that support the SECURITY extension accept the following option: +.TP 8 +.B \-sp \fIfilename\fP +causes the server to attempt to read and interpret filename as a security +policy file with the format described below. The file is read at server +startup and reread at each server reset. +The syntax of the security policy file is described in +\fISecurityPolicy\fP(__filemansuffix__). +.SH "NETWORK CONNECTIONS" +The X server supports client connections via a platform-dependent subset of +the following transport types: TCP\/IP, Unix Domain sockets, DECnet, +and several varieties of SVR4 local connections. See the DISPLAY +NAMES section of the \fIX\fP(__miscmansuffix__) manual page to learn how to +specify which transport type clients should try to use. +.SH GRANTING ACCESS +The X server implements a platform-dependent subset of the following +authorization protocols: MIT-MAGIC-COOKIE-1, XDM-AUTHORIZATION-1, +XDM-AUTHORIZATION-2, SUN-DES-1, and MIT-KERBEROS-5. See the +\fIXsecurity\fP(__miscmansuffix__) manual page for information on the +operation of these protocols. +.PP +Authorization data required by the above protocols is passed to the +server in a private file named with the \fB\-auth\fP command line +option. Each time the server is about to accept the first connection +after a reset (or when the server is starting), it reads this file. +If this file contains any authorization records, the local host is not +automatically allowed access to the server, and only clients which +send one of the authorization records contained in the file in the +connection setup information will be allowed access. See the +\fIXau\fP manual page for a description of the binary format of this +file. See \fIxauth\fP(1) for maintenance of this file, and distribution +of its contents to remote hosts. +.PP +The X server also uses a host-based access control list for deciding +whether or not to accept connections from clients on a particular machine. +If no other authorization mechanism is being used, +this list initially consists of the host on which the server is running as +well as any machines listed in the file \fI/etc/X\fBn\fI.hosts\fR, where +\fBn\fP is the display number of the server. Each line of the file should +contain either an Internet hostname (e.g. expo.lcs.mit.edu) or a DECnet +hostname in double colon format (e.g. hydra::) or a complete name in the format +\fIfamily\fP:\fIname\fP as described in the \fIxhost\fP(1) manual page. +There should be no leading or trailing spaces on any lines. For example: +.sp +.in +8 +.nf +joesworkstation +corporate.company.com +star:: +inet:bigcpu +local: +.fi +.in -8 +.PP +Users can add or remove hosts from this list and enable or disable access +control using the \fIxhost\fP command from the same machine as the server. +.PP +If the X FireWall Proxy (\fIxfwp\fP) is being used without a sitepolicy, +host-based authorization must be turned on for clients to be able to +connect to the X server via the \fIxfwp\fP. If \fIxfwp\fP is run without +a configuration file and thus no sitepolicy is defined, if \fIxfwp\fP +is using an X server where xhost + has been run to turn off host-based +authorization checks, when a client tries to connect to this X server +via \fIxfwp\fP, the X server will deny the connection. See \fIxfwp\fP(1) +for more information about this proxy. +.PP +The X protocol intrinsically does not have any notion of window operation +permissions or place any restrictions on what a client can do; if a program can +connect to a display, it has full run of the screen. +X servers that support the SECURITY extension fare better because clients +can be designated untrusted via the authorization they use to connect; see +the \fIxauth\fP(1) manual page for details. Restrictions are imposed +on untrusted clients that curtail the mischief they can do. See the SECURITY +extension specification for a complete list of these restrictions. +.PP +Sites that have better +authentication and authorization systems might wish to make +use of the hooks in the libraries and the server to provide additional +security models. +.SH SIGNALS +The X server attaches special meaning to the following signals: +.TP 8 +.I SIGHUP +This signal causes the server to close all existing connections, free all +resources, and restore all defaults. It is sent by the display manager +whenever the main user's main application (usually an \fIxterm\fP or window +manager) exits to force the server to clean up and prepare for the next +user. +.TP 8 +.I SIGTERM +This signal causes the server to exit cleanly. +.TP 8 +.I SIGUSR1 +This signal is used quite differently from either of the above. When the +server starts, it checks to see if it has inherited SIGUSR1 as SIG_IGN +instead of the usual SIG_DFL. In this case, the server sends a SIGUSR1 to +its parent process after it has set up the various connection schemes. +\fIXdm\fP uses this feature to recognize when connecting to the server +is possible. +.SH FONTS +The X server +can obtain fonts from directories and/or from font servers. +The list of directories and font servers +the X server uses when trying to open a font is controlled +by the \fIfont path\fP. +.LP +The default font path is +__default_font_path__ . +.LP +The font path can be set with the \fB\-fp\fP option or by \fIxset\fP(1) +after the server has started. +.SH FILES +.TP 30 +.I /etc/X\fBn\fP.hosts +Initial access control list for display number \fBn\fP +.TP 30 +.IR __projectroot__/lib/X11/fonts/misc , __projectroot__/lib/X11/fonts/75dpi , __projectroot__/lib/X11/fonts/100dpi +Bitmap font directories +.TP 30 +.IR __projectroot__/lib/X11/fonts/TTF , __projectroot__/lib/X11/fonts/Type1 +Outline font directories +.TP 30 +.I __projectroot__/share/X11/rgb.txt +Color database +.TP 30 +.I /tmp/.X11-unix/X\fBn\fP +Unix domain socket for display number \fBn\fP +.TP 30 +.IR /tmp/rcX\fBn\fP +Kerberos 5 replay cache for display number \fBn\fP +.TP 30 +.I /usr/adm/X\fBn\fPmsgs +Error log file for display number \fBn\fP if run from \fIinit\fP(__adminmansuffix__) +.TP 30 +.I __projectroot__/lib/X11/xdm/xdm-errors +Default error log file if the server is run from \fIxdm\fP(1) +.TP 30 +.I __projectroot__/lib/xserver/SecurityPolicy +Default X server security policy +.SH "SEE ALSO" +General information: \fIX\fP(__miscmansuffix__) +.PP +Protocols: +.I "X Window System Protocol," +.I "The X Font Service Protocol," +.I "X Display Manager Control Protocol" +.PP +Fonts: \fIbdftopcf\fP(1), \fImkfontdir\fP(1), \fImkfontscale\fP(1), +\fIxfs\fP(1), \fIxlsfonts\fP(1), \fIxfontsel\fP(1), \fIxfd\fP(1), +.I "X Logical Font Description Conventions" +.PP +Security: \fIXsecurity\fP(__miscmansuffix__), \fIxauth\fP(1), \fIXau\fP(1), +\fIxdm\fP(1), \fIxhost\fP(1), \fIxfwp\fP(1), +\fISecurityPolicy\fP(__filemansuffix__), +.I "Security Extension Specification" +.PP +Starting the server: \fIxdm\fP(1), \fIxinit\fP(1) +.PP +Controlling the server once started: \fIxset\fP(1), \fIxsetroot\fP(1), +\fIxhost\fP(1) +.PP +Server-specific man pages: +\fIXorg\fP(1), \fIXdmx\fP(1), \fIXnest\fP(1), +\fIXvfb\fP(1), \fIXDarwin\fP(1), \fIXWin\fP(1). +.PP +Server internal documentation: +.I "Definition of the Porting Layer for the X v11 Sample Server" +.SH AUTHORS +The sample server was originally written by Susan Angebranndt, Raymond +Drewry, Philip Karlton, and Todd Newman, from Digital Equipment +Corporation, with support from a large cast. It has since been +extensively rewritten by Keith Packard and Bob Scheifler, from MIT. +Dave Wiggins took over post-R5 and made substantial improvements. diff --git a/xorg-server-1.4/doc/smartsched b/xorg-server-1.4/doc/smartsched new file mode 100644 index 0000000..057a759 --- /dev/null +++ b/xorg-server-1.4/doc/smartsched @@ -0,0 +1,204 @@ + Client Scheduling in X + Keith Packard + SuSE + 10/28/99 + +History: + +Since the original X server was written at Digital in 1987, the OS and DIX +layers shared responsibility for scheduling the order to service +client requests. The original design was simplistic; under the maximum +first make it work, then make it work well, this was a good idea. Now +that we have a bit more experience with X applications, it's time to +rethink the design. + +The basic dispatch loop in DIX looks like: + + for (;;) + { + nready = WaitForSomething (...); + while (nready--) + { + isItTimeToYield = FALSE; + while (!isItTimeToYield) + { + if (!ReadRequestFromClient (...)) + break; + (execute request); + } + } + } + +WaitForSomething looks like: + + for (;;) + if (ANYSET (ClientsWithInput)) + return popcount (ClientsWithInput); + select (...) + compute clientsReadable from select result; + return popcount (clientsReadable) + } + +ReadRequestFromClient looks like: + + if (!fullRequestQueued) + { + read (); + if (!fullRequestQueued) + { + remove from ClientsWithInput; + timesThisConnection = 0; + return 0; + } + } + if (twoFullRequestsQueued) + add to ClientsWithInput; + + if (++timesThisConnection >= 10) + { + isItTimeToYield = TRUE; + timesThisConnection = 0; + } + return 1; + +Here's what happens in this code: + +With a single client executing a stream of requests: + + A client sends a packet of requests to the server. + + WaitForSomething wakes up from select and returns that client + to Dispatch + + Dispatch calls ReadRequestFromClient which reads a buffer (4K) + full of requests from the client + + The server executes requests from this buffer until it emptys, + in two stages -- 10 requests at a time are executed in the + inner Dispatch loop, a buffer full of requests are executed + because WaitForSomething immediately returns if any clients + have complete requests pending in their input queues. + + When the buffer finally emptys, the next call to ReadRequest + FromClient will return zero and Dispatch will go back to + WaitForSomething; now that the client has no requests pending, + WaitForSomething will block in select again. If the client + is active, this select will immediately return that client + as ready to read. + +With multiple clients sending streams of requests, the sequence +of operations is similar, except that ReadRequestFromClient will +set isItTimeToYield after each 10 requests executed causing the +server to round-robin among the clients with available requests. + +It's important to realize here that any complete requests which have been +read from clients will be executed before the server will use select again +to discover input from other clients. A single busy client can easily +monopolize the X server. + +So, the X server doesn't share well with clients which are more interactive +in nature. + +The X server executes at most a buffer full of requests before again heading +into select; ReadRequestFromClient causes the server to yield when the +client request buffer doesn't contain a complete request. When +that buffer is executed quickly, the server spends a lot of time +in select discovering that the same client again has input ready. Thus +the server also runs busy clients less efficiently than is would be +possible. + +What to do. + +There are several things evident from the above discussion: + + 1 The server has a poor metric for deciding how much work it + should do at one time on behalf of a particular client. + + 2 The server doesn't call select often enough to detect less + aggressive clients in the face of busy clients, especially + when those clients are executing slow requests. + + 3 The server calls select too often when executing fast requests. + + 4 Some priority scheme is needed to keep interactive clients + responding to the user. + +And, there are some assumptions about how X applications work: + + 1 Each X request is executed relatively quickly; a request-granularity + is good enough for interactive response almost all of the time. + + 2 X applications receiving mouse/keyboard events are likely to + warrant additional attention from the X server. + +Instead of a request-count metric for work, a time-based metric should be +used. The server should select a reasonable time slice for each client +and execute requests for the entire timeslice before yielding to +another client. + +Instead of returning immediately from WaitForSomething if clients have +complete requests queued, the server should go through select each +time and gather as many ready clients as possible. This involves +polling instead of blocking and adding the ClientsWithInput to +clientsReadable after the select returns. + +Instead of yielding when the request buffer is empty for a particular +client, leave the yielding to the upper level scheduling and allow +the server to try and read again from the socket. If the client +is busy, another buffer full of requests will already be waiting +to be delivered thus avoiding the call through select and the +additional overhead in WaitForSomething. + +Finally, the dispatch loop should not simply execute requests from the +first available client, instead each client should be prioritized with +busy clients penalized and clients receiving user events praised. + +How it's done: + +Polling the current time of day from the OS is too expensive to +be done at each request boundary, so instead an interval timer is +set allowing the server to track time changes by counting invocations +of the related signal handler. Instead of using the wall time for +this purpose, the process CPU time is used instead. This serves +two purposes -- first, it allows the server to consume no CPU cycles +when idle, second it avoids conflicts with SIGALRM usage in other +parts of the server code. It's not without problems though; other +CPU intensive processes on the same machine can reduce interactive +response time within the X server. The dispatch loop can now +calculate an approximate time value using the number of signals +received. The granularity of the timer sets the scheduling jitter, +at 20ms it's only occasionally noticeable. + +The changes to WaitForSomething and ReadRequestFromClient are +straightforward, adjusting when select is called and avoiding +setting isItTimeToYield too often. + +The dispatch loop changes are more extensive, now instead of +executing requests from all available clients, a single client +is chosen after each call to WaitForSomething, requests are +executed for that client and WaitForSomething is called again. + +Each client is assigned a priority, the dispatch loop chooses the +client with the highest priority to execute. Priorities are +updated in three ways: + + 1. Clients which consume their entire slice are penalized + by having their priority reduced by one until they + reach some minimum value. + + 2. Clients which have executed no requests for some time + are praised by having their priority raised until they + return to normal priority. + + 3. Clients which receive user input are praised by having + their priority rased until they reach some maximal + value, above normal priority. + +The effect of these changes is to both improve interactive application +response and benchmark numbers at the same time. + + + + + +$XFree86: $ diff --git a/xorg-server-1.4/exa/Makefile.am b/xorg-server-1.4/exa/Makefile.am new file mode 100644 index 0000000..e2f7ed3 --- /dev/null +++ b/xorg-server-1.4/exa/Makefile.am @@ -0,0 +1,26 @@ +noinst_LTLIBRARIES = libexa.la + +# Override these since EXA doesn't need them and the needed files aren't +# built (in hw/xfree86/os-support/solaris) until after EXA is built +SOLARIS_ASM_CFLAGS="" + +if XORG +sdk_HEADERS = exa.h +endif + +INCLUDES = \ + $(XORG_INCS) \ + -I$(srcdir)/../miext/cw + +AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) + +libexa_la_SOURCES = \ + exa.c \ + exa.h \ + exa_accel.c \ + exa_migration.c \ + exa_offscreen.c \ + exa_render.c \ + exa_priv.h \ + exa_unaccel.c + diff --git a/xorg-server-1.4/exa/Makefile.in b/xorg-server-1.4/exa/Makefile.in new file mode 100644 index 0000000..051375f --- /dev/null +++ b/xorg-server-1.4/exa/Makefile.in @@ -0,0 +1,675 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = exa +DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libexa_la_LIBADD = +am_libexa_la_OBJECTS = exa.lo exa_accel.lo exa_migration.lo \ + exa_offscreen.lo exa_render.lo exa_unaccel.lo +libexa_la_OBJECTS = $(am_libexa_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libexa_la_SOURCES) +DIST_SOURCES = $(libexa_la_SOURCES) +am__sdk_HEADERS_DIST = exa.h +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(sdkdir)" +sdkHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(sdk_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ + +# Override these since EXA doesn't need them and the needed files aren't +# built (in hw/xfree86/os-support/solaris) until after EXA is built +SOLARIS_ASM_CFLAGS = "" +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libexa.la +@XORG_TRUE@sdk_HEADERS = exa.h +INCLUDES = \ + $(XORG_INCS) \ + -I$(srcdir)/../miext/cw + +AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) +libexa_la_SOURCES = \ + exa.c \ + exa.h \ + exa_accel.c \ + exa_migration.c \ + exa_offscreen.c \ + exa_render.c \ + exa_priv.h \ + exa_unaccel.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign exa/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign exa/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libexa.la: $(libexa_la_OBJECTS) $(libexa_la_DEPENDENCIES) + $(LINK) $(libexa_la_OBJECTS) $(libexa_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_accel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_migration.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_offscreen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_render.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_unaccel.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-sdkHEADERS: $(sdk_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(sdkdir)" || $(MKDIR_P) "$(DESTDIR)$(sdkdir)" + @list='$(sdk_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(sdkHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(sdkdir)/$$f'"; \ + $(sdkHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(sdkdir)/$$f"; \ + done + +uninstall-sdkHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(sdk_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(sdkdir)/$$f'"; \ + rm -f "$(DESTDIR)$(sdkdir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(sdkdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-sdkHEADERS + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-sdkHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sdkHEADERS install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-sdkHEADERS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/exa/exa.c b/xorg-server-1.4/exa/exa.c new file mode 100644 index 0000000..aa42b92 --- /dev/null +++ b/xorg-server-1.4/exa/exa.c @@ -0,0 +1,809 @@ +/* + * Copyright © 2001 Keith Packard + * + * Partly based on code that is Copyright © 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. + */ + +/** @file + * This file covers the initialization and teardown of EXA, and has various + * functions not responsible for performing rendering, pixmap migration, or + * memory management. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifdef MITSHM +#include "shmint.h" +#endif + +#include + +#include "exa_priv.h" +#include +#include "dixfontstr.h" +#include "exa.h" +#include "cw.h" + +static int exaGeneration; +int exaScreenPrivateIndex; +int exaPixmapPrivateIndex; + +/** + * exaGetPixmapOffset() returns the offset (in bytes) within the framebuffer of + * the beginning of the given pixmap. + * + * Note that drivers are free to, and often do, munge this offset as necessary + * for handing to the hardware -- for example, translating it into a different + * aperture. This function may need to be extended in the future if we grow + * support for having multiple card-accessible offscreen, such as an AGP memory + * pool alongside the framebuffer pool. + */ +unsigned long +exaGetPixmapOffset(PixmapPtr pPix) +{ + ExaScreenPriv (pPix->drawable.pScreen); + ExaPixmapPriv (pPix); + void *ptr; + + /* Return the offscreen pointer if we've hidden the data. */ + if (pPix->devPrivate.ptr == NULL) + ptr = pExaPixmap->fb_ptr; + else + ptr = pPix->devPrivate.ptr; + + return ((unsigned long)ptr - (unsigned long)pExaScr->info->memoryBase); +} + +/** + * exaGetPixmapPitch() returns the pitch (in bytes) of the given pixmap. + * + * This is a helper to make driver code more obvious, due to the rather obscure + * naming of the pitch field in the pixmap. + */ +unsigned long +exaGetPixmapPitch(PixmapPtr pPix) +{ + return pPix->devKind; +} + +/** + * exaGetPixmapSize() returns the size in bytes of the given pixmap in video + * memory. Only valid when the pixmap is currently in framebuffer. + */ +unsigned long +exaGetPixmapSize(PixmapPtr pPix) +{ + ExaPixmapPrivPtr pExaPixmap; + + pExaPixmap = ExaGetPixmapPriv(pPix); + if (pExaPixmap != NULL) + return pExaPixmap->fb_size; + return 0; +} + +/** + * exaGetDrawablePixmap() returns a backing pixmap for a given drawable. + * + * @param pDrawable the drawable being requested. + * + * This function returns the backing pixmap for a drawable, whether it is a + * redirected window, unredirected window, or already a pixmap. Note that + * coordinate translation is needed when drawing to the backing pixmap of a + * redirected window, and the translation coordinates are provided by calling + * exaGetOffscreenPixmap() on the drawable. + */ +PixmapPtr +exaGetDrawablePixmap(DrawablePtr pDrawable) +{ + if (pDrawable->type == DRAWABLE_WINDOW) + return pDrawable->pScreen->GetWindowPixmap ((WindowPtr) pDrawable); + else + return (PixmapPtr) pDrawable; +} + +/** + * Sets the offsets to add to coordinates to make them address the same bits in + * the backing drawable. These coordinates are nonzero only for redirected + * windows. + */ +void +exaGetDrawableDeltas (DrawablePtr pDrawable, PixmapPtr pPixmap, + int *xp, int *yp) +{ +#ifdef COMPOSITE + if (pDrawable->type == DRAWABLE_WINDOW) { + *xp = -pPixmap->screen_x; + *yp = -pPixmap->screen_y; + return; + } +#endif + + *xp = 0; + *yp = 0; +} + +/** + * exaPixmapDirty() marks a pixmap as dirty, allowing for + * optimizations in pixmap migration when no changes have occurred. + */ +void +exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2) +{ + ExaPixmapPriv(pPix); + BoxRec box; + RegionPtr pDamageReg; + RegionRec region; + + if (!pExaPixmap) + return; + + box.x1 = max(x1, 0); + box.y1 = max(y1, 0); + box.x2 = min(x2, pPix->drawable.width); + box.y2 = min(y2, pPix->drawable.height); + + if (box.x1 >= box.x2 || box.y1 >= box.y2) + return; + + pDamageReg = DamageRegion(pExaPixmap->pDamage); + + REGION_INIT(pScreen, ®ion, &box, 1); + REGION_UNION(pScreen, pDamageReg, pDamageReg, ®ion); + REGION_UNINIT(pScreen, ®ion); +} + +static Bool +exaDestroyPixmap (PixmapPtr pPixmap) +{ + if (pPixmap->refcnt == 1) + { + ExaPixmapPriv (pPixmap); + if (pExaPixmap->area) + { + DBG_PIXMAP(("-- 0x%p (0x%x) (%dx%d)\n", + (void*)pPixmap->drawable.id, + ExaGetPixmapPriv(pPixmap)->area->offset, + pPixmap->drawable.width, + pPixmap->drawable.height)); + /* Free the offscreen area */ + exaOffscreenFree (pPixmap->drawable.pScreen, pExaPixmap->area); + pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; + pPixmap->devKind = pExaPixmap->sys_pitch; + } + REGION_UNINIT(pPixmap->drawable.pScreen, &pExaPixmap->validReg); + } + return fbDestroyPixmap (pPixmap); +} + +static int +exaLog2(int val) +{ + int bits; + + if (val <= 0) + return 0; + for (bits = 0; val != 0; bits++) + val >>= 1; + return bits - 1; +} + +/** + * exaCreatePixmap() creates a new pixmap. + * + * If width and height are 0, this won't be a full-fledged pixmap and it will + * get ModifyPixmapHeader() called on it later. So, we mark it as pinned, because + * ModifyPixmapHeader() would break migration. These types of pixmaps are used + * for scratch pixmaps, or to represent the visible screen. + */ +static PixmapPtr +exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth) +{ + PixmapPtr pPixmap; + ExaPixmapPrivPtr pExaPixmap; + int bpp; + ExaScreenPriv(pScreen); + + if (w > 32767 || h > 32767) + return NullPixmap; + + pPixmap = fbCreatePixmap (pScreen, w, h, depth); + if (!pPixmap) + return NULL; + pExaPixmap = ExaGetPixmapPriv(pPixmap); + + bpp = pPixmap->drawable.bitsPerPixel; + + /* Glyphs have w/h equal to zero, and may not be migrated. See exaGlyphs. */ + if (!w || !h) + pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; + else + pExaPixmap->score = EXA_PIXMAP_SCORE_INIT; + + pExaPixmap->area = NULL; + + pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr; + pExaPixmap->sys_pitch = pPixmap->devKind; + + pExaPixmap->fb_ptr = NULL; + if (pExaScr->info->flags & EXA_OFFSCREEN_ALIGN_POT && w != 1) + pExaPixmap->fb_pitch = (1 << (exaLog2(w - 1) + 1)) * bpp / 8; + else + pExaPixmap->fb_pitch = w * bpp / 8; + pExaPixmap->fb_pitch = EXA_ALIGN(pExaPixmap->fb_pitch, + pExaScr->info->pixmapPitchAlign); + pExaPixmap->fb_size = pExaPixmap->fb_pitch * h; + + if (pExaPixmap->fb_pitch > 32767) { + fbDestroyPixmap(pPixmap); + return NULL; + } + + /* Set up damage tracking */ + pExaPixmap->pDamage = DamageCreate (NULL, NULL, DamageReportNone, TRUE, + pScreen, pPixmap); + + if (pExaPixmap->pDamage == NULL) { + fbDestroyPixmap (pPixmap); + return NULL; + } + + DamageRegister (&pPixmap->drawable, pExaPixmap->pDamage); + DamageSetReportAfterOp (pExaPixmap->pDamage, TRUE); + + /* None of the pixmap bits are valid initially */ + REGION_NULL(pScreen, &pExaPixmap->validReg); + + return pPixmap; +} + +/** + * exaPixmapIsOffscreen() is used to determine if a pixmap is in offscreen + * memory, meaning that acceleration could probably be done to it, and that it + * will need to be wrapped by PrepareAccess()/FinishAccess() when accessing it + * with the CPU. + * + * Note that except for UploadToScreen()/DownloadFromScreen() (which explicitly + * deal with moving pixmaps in and out of system memory), EXA will give drivers + * pixmaps as arguments for which exaPixmapIsOffscreen() is TRUE. + * + * @return TRUE if the given drawable is in framebuffer memory. + */ +Bool +exaPixmapIsOffscreen(PixmapPtr p) +{ + ScreenPtr pScreen = p->drawable.pScreen; + ExaScreenPriv(pScreen); + + /* If the devPrivate.ptr is NULL, it's offscreen but we've hidden the data. + */ + if (p->devPrivate.ptr == NULL) + return TRUE; + + if (pExaScr->info->PixmapIsOffscreen) + return pExaScr->info->PixmapIsOffscreen(p); + + return ((unsigned long) ((CARD8 *) p->devPrivate.ptr - + (CARD8 *) pExaScr->info->memoryBase) < + pExaScr->info->memorySize); +} + +/** + * exaDrawableIsOffscreen() is a convenience wrapper for exaPixmapIsOffscreen(). + */ +Bool +exaDrawableIsOffscreen (DrawablePtr pDrawable) +{ + return exaPixmapIsOffscreen (exaGetDrawablePixmap (pDrawable)); +} + +/** + * Returns the pixmap which backs a drawable, and the offsets to add to + * coordinates to make them address the same bits in the backing drawable. + */ +PixmapPtr +exaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp) +{ + PixmapPtr pPixmap = exaGetDrawablePixmap (pDrawable); + + exaGetDrawableDeltas (pDrawable, pPixmap, xp, yp); + + if (exaPixmapIsOffscreen (pPixmap)) + return pPixmap; + else + return NULL; +} + +/** + * exaPrepareAccess() is EXA's wrapper for the driver's PrepareAccess() handler. + * + * It deals with waiting for synchronization with the card, determining if + * PrepareAccess() is necessary, and working around PrepareAccess() failure. + */ +void +exaPrepareAccess(DrawablePtr pDrawable, int index) +{ + ScreenPtr pScreen = pDrawable->pScreen; + ExaScreenPriv (pScreen); + PixmapPtr pPixmap; + + pPixmap = exaGetDrawablePixmap (pDrawable); + + if (exaPixmapIsOffscreen (pPixmap)) + exaWaitSync (pDrawable->pScreen); + else + return; + + /* Unhide pixmap pointer */ + if (pPixmap->devPrivate.ptr == NULL) { + ExaPixmapPriv (pPixmap); + + pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr; + } + + if (pExaScr->info->PrepareAccess == NULL) + return; + + if (!(*pExaScr->info->PrepareAccess) (pPixmap, index)) { + ExaPixmapPriv (pPixmap); + if (pExaPixmap->score != EXA_PIXMAP_SCORE_PINNED) + FatalError("Driver failed PrepareAccess on a pinned pixmap\n"); + exaMoveOutPixmap (pPixmap); + } +} + +/** + * exaFinishAccess() is EXA's wrapper for the driver's FinishAccess() handler. + * + * It deals with calling the driver's FinishAccess() only if necessary. + */ +void +exaFinishAccess(DrawablePtr pDrawable, int index) +{ + ScreenPtr pScreen = pDrawable->pScreen; + ExaScreenPriv (pScreen); + PixmapPtr pPixmap; + ExaPixmapPrivPtr pExaPixmap; + + pPixmap = exaGetDrawablePixmap (pDrawable); + + pExaPixmap = ExaGetPixmapPriv(pPixmap); + + /* Rehide pixmap pointer if we're doing that. */ + if (pExaPixmap != NULL && pExaScr->hideOffscreenPixmapData && + pExaPixmap->fb_ptr == pPixmap->devPrivate.ptr) + { + pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr; + } + + if (pExaScr->info->FinishAccess == NULL) + return; + + if (!exaPixmapIsOffscreen (pPixmap)) + return; + + (*pExaScr->info->FinishAccess) (pPixmap, index); +} + +/** + * exaValidateGC() sets the ops to EXA's implementations, which may be + * accelerated or may sync the card and fall back to fb. + */ +static void +exaValidateGC (GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) +{ + /* fbValidateGC will do direct access to pixmaps if the tiling has changed. + * Preempt fbValidateGC by doing its work and masking the change out, so + * that we can do the Prepare/FinishAccess. + */ +#ifdef FB_24_32BIT + if ((changes & GCTile) && fbGetRotatedPixmap(pGC)) { + (*pGC->pScreen->DestroyPixmap) (fbGetRotatedPixmap(pGC)); + fbGetRotatedPixmap(pGC) = 0; + } + + if (pGC->fillStyle == FillTiled) { + PixmapPtr pOldTile, pNewTile; + + pOldTile = pGC->tile.pixmap; + if (pOldTile->drawable.bitsPerPixel != pDrawable->bitsPerPixel) + { + pNewTile = fbGetRotatedPixmap(pGC); + if (!pNewTile || + pNewTile ->drawable.bitsPerPixel != pDrawable->bitsPerPixel) + { + if (pNewTile) + (*pGC->pScreen->DestroyPixmap) (pNewTile); + /* fb24_32ReformatTile will do direct access of a newly- + * allocated pixmap. This isn't a problem yet, since we don't + * put pixmaps in FB until at least one accelerated EXA op. + */ + exaPrepareAccess(&pOldTile->drawable, EXA_PREPARE_SRC); + pNewTile = fb24_32ReformatTile (pOldTile, + pDrawable->bitsPerPixel); + exaPixmapDirty(pNewTile, 0, 0, pNewTile->drawable.width, pNewTile->drawable.height); + exaFinishAccess(&pOldTile->drawable, EXA_PREPARE_SRC); + } + if (pNewTile) + { + fbGetRotatedPixmap(pGC) = pOldTile; + pGC->tile.pixmap = pNewTile; + changes |= GCTile; + } + } + } +#endif + if (changes & GCTile) { + if (!pGC->tileIsPixel && FbEvenTile (pGC->tile.pixmap->drawable.width * + pDrawable->bitsPerPixel)) + { + /* XXX This fixes corruption with tiled pixmaps, but may just be a + * workaround for broken drivers + */ + exaMoveOutPixmap(pGC->tile.pixmap); + fbPadPixmap (pGC->tile.pixmap); + exaPixmapDirty(pGC->tile.pixmap, 0, 0, + pGC->tile.pixmap->drawable.width, + pGC->tile.pixmap->drawable.height); + } + /* Mask out the GCTile change notification, now that we've done FB's + * job for it. + */ + changes &= ~GCTile; + } + + fbValidateGC (pGC, changes, pDrawable); + + pGC->ops = (GCOps *) &exaOps; +} + +static GCFuncs exaGCFuncs = { + exaValidateGC, + miChangeGC, + miCopyGC, + miDestroyGC, + miChangeClip, + miDestroyClip, + miCopyClip +}; + +/** + * exaCreateGC makes a new GC and hooks up its funcs handler, so that + * exaValidateGC() will get called. + */ +static int +exaCreateGC (GCPtr pGC) +{ + if (!fbCreateGC (pGC)) + return FALSE; + + pGC->funcs = &exaGCFuncs; + + return TRUE; +} + +/** + * exaCloseScreen() unwraps its wrapped screen functions and tears down EXA's + * screen private, before calling down to the next CloseSccreen. + */ +static Bool +exaCloseScreen(int i, ScreenPtr pScreen) +{ + ExaScreenPriv(pScreen); +#ifdef RENDER + PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); +#endif + + pScreen->CreateGC = pExaScr->SavedCreateGC; + pScreen->CloseScreen = pExaScr->SavedCloseScreen; + pScreen->GetImage = pExaScr->SavedGetImage; + pScreen->GetSpans = pExaScr->SavedGetSpans; + pScreen->PaintWindowBackground = pExaScr->SavedPaintWindowBackground; + pScreen->PaintWindowBorder = pExaScr->SavedPaintWindowBorder; + pScreen->CreatePixmap = pExaScr->SavedCreatePixmap; + pScreen->DestroyPixmap = pExaScr->SavedDestroyPixmap; + pScreen->CopyWindow = pExaScr->SavedCopyWindow; +#ifdef RENDER + if (ps) { + ps->Composite = pExaScr->SavedComposite; + ps->Glyphs = pExaScr->SavedGlyphs; + ps->Trapezoids = pExaScr->SavedTrapezoids; + } +#endif + + xfree (pExaScr); + + return (*pScreen->CloseScreen) (i, pScreen); +} + +/** + * This function allocates a driver structure for EXA drivers to fill in. By + * having EXA allocate the structure, the driver structure can be extended + * without breaking ABI between EXA and the drivers. The driver's + * responsibility is to check beforehand that the EXA module has a matching + * major number and sufficient minor. Drivers are responsible for freeing the + * driver structure using xfree(). + * + * @return a newly allocated, zero-filled driver structure + */ +ExaDriverPtr +exaDriverAlloc(void) +{ + return xcalloc(1, sizeof(ExaDriverRec)); +} + +/** + * @param pScreen screen being initialized + * @param pScreenInfo EXA driver record + * + * exaDriverInit sets up EXA given a driver record filled in by the driver. + * pScreenInfo should have been allocated by exaDriverAlloc(). See the + * comments in _ExaDriver for what must be filled in and what is optional. + * + * @return TRUE if EXA was successfully initialized. + */ +Bool +exaDriverInit (ScreenPtr pScreen, + ExaDriverPtr pScreenInfo) +{ + ExaScreenPrivPtr pExaScr; +#ifdef RENDER + PictureScreenPtr ps; +#endif + + if (!pScreenInfo) + return FALSE; + + if (!pScreenInfo->memoryBase) { + LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::memoryBase must be " + "non-zero\n", pScreen->myNum); + return FALSE; + } + + if (!pScreenInfo->memorySize) { + LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::memorySize must be " + "non-zero\n", pScreen->myNum); + return FALSE; + } + + if (pScreenInfo->offScreenBase > pScreenInfo->memorySize) { + LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::offScreenBase must be <= " + "ExaDriverRec::memorySize\n", pScreen->myNum); + return FALSE; + } + + if (!pScreenInfo->PrepareSolid) { + LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::PrepareSolid must be " + "non-NULL\n", pScreen->myNum); + return FALSE; + } + + if (!pScreenInfo->PrepareCopy) { + LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::PrepareCopy must be " + "non-NULL\n", pScreen->myNum); + return FALSE; + } + + if (!pScreenInfo->WaitMarker) { + LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::WaitMarker must be " + "non-NULL\n", pScreen->myNum); + return FALSE; + } + + if (pScreenInfo->exa_major != EXA_VERSION_MAJOR || + pScreenInfo->exa_minor > EXA_VERSION_MINOR) + { + LogMessage(X_ERROR, "EXA(%d): driver's EXA version requirements " + "(%d.%d) are incompatible with EXA version (%d.%d)\n", + pScreen->myNum, + pScreenInfo->exa_major, pScreenInfo->exa_minor, + EXA_VERSION_MAJOR, EXA_VERSION_MINOR); + return FALSE; + } + +#ifdef RENDER + ps = GetPictureScreenIfSet(pScreen); +#endif + if (exaGeneration != serverGeneration) + { + exaScreenPrivateIndex = AllocateScreenPrivateIndex(); + exaPixmapPrivateIndex = AllocatePixmapPrivateIndex(); + exaGeneration = serverGeneration; + } + + pExaScr = xcalloc (sizeof (ExaScreenPrivRec), 1); + + if (!pExaScr) { + LogMessage(X_WARNING, "EXA(%d): Failed to allocate screen private\n", + pScreen->myNum); + return FALSE; + } + + pExaScr->info = pScreenInfo; + + pScreen->devPrivates[exaScreenPrivateIndex].ptr = (pointer) pExaScr; + + pExaScr->migration = ExaMigrationAlways; + + exaDDXDriverInit(pScreen); + + /* + * Replace various fb screen functions + */ + pExaScr->SavedCloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = exaCloseScreen; + + pExaScr->SavedCreateGC = pScreen->CreateGC; + pScreen->CreateGC = exaCreateGC; + + pExaScr->SavedGetImage = pScreen->GetImage; + pScreen->GetImage = exaGetImage; + + pExaScr->SavedGetSpans = pScreen->GetSpans; + pScreen->GetSpans = exaGetSpans; + + pExaScr->SavedCopyWindow = pScreen->CopyWindow; + pScreen->CopyWindow = exaCopyWindow; + + pExaScr->SavedPaintWindowBackground = pScreen->PaintWindowBackground; + pScreen->PaintWindowBackground = exaPaintWindow; + + pExaScr->SavedPaintWindowBorder = pScreen->PaintWindowBorder; + pScreen->PaintWindowBorder = exaPaintWindow; + + pScreen->BackingStoreFuncs.SaveAreas = ExaCheckSaveAreas; + pScreen->BackingStoreFuncs.RestoreAreas = ExaCheckRestoreAreas; +#ifdef RENDER + if (ps) { + pExaScr->SavedComposite = ps->Composite; + ps->Composite = exaComposite; + + pExaScr->SavedRasterizeTrapezoid = ps->RasterizeTrapezoid; + ps->RasterizeTrapezoid = exaRasterizeTrapezoid; + + pExaScr->SavedAddTriangles = ps->AddTriangles; + ps->AddTriangles = exaAddTriangles; + + pExaScr->SavedGlyphs = ps->Glyphs; + ps->Glyphs = exaGlyphs; + + pExaScr->SavedTrapezoids = ps->Trapezoids; + ps->Trapezoids = exaTrapezoids; + } +#endif + +#ifdef MITSHM + /* Re-register with the MI funcs, which don't allow shared pixmaps. + * Shared pixmaps are almost always a performance loss for us, but this + * still allows for SHM PutImage. + */ + ShmRegisterFuncs(pScreen, NULL); +#endif + /* + * Hookup offscreen pixmaps + */ + if ((pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) && + pExaScr->info->offScreenBase < pExaScr->info->memorySize) + { + if (!AllocatePixmapPrivate(pScreen, exaPixmapPrivateIndex, + sizeof (ExaPixmapPrivRec))) { + LogMessage(X_WARNING, + "EXA(%d): Failed to allocate pixmap private\n", + pScreen->myNum); + return FALSE; + } + pExaScr->SavedCreatePixmap = pScreen->CreatePixmap; + pScreen->CreatePixmap = exaCreatePixmap; + + pExaScr->SavedDestroyPixmap = pScreen->DestroyPixmap; + pScreen->DestroyPixmap = exaDestroyPixmap; + + LogMessage(X_INFO, "EXA(%d): Offscreen pixmap area of %d bytes\n", + pScreen->myNum, + pExaScr->info->memorySize - pExaScr->info->offScreenBase); + } + else + { + LogMessage(X_INFO, "EXA(%d): No offscreen pixmaps\n", pScreen->myNum); + if (!AllocatePixmapPrivate(pScreen, exaPixmapPrivateIndex, 0)) + return FALSE; + } + + DBG_PIXMAP(("============== %ld < %ld\n", pExaScr->info->offScreenBase, + pExaScr->info->memorySize)); + if (pExaScr->info->offScreenBase < pExaScr->info->memorySize) { + if (!exaOffscreenInit (pScreen)) { + LogMessage(X_WARNING, "EXA(%d): Offscreen pixmap setup failed\n", + pScreen->myNum); + return FALSE; + } + } + + LogMessage(X_INFO, "EXA(%d): Driver registered support for the following" + " operations:\n", pScreen->myNum); + assert(pScreenInfo->PrepareSolid != NULL); + LogMessage(X_INFO, " Solid\n"); + assert(pScreenInfo->PrepareCopy != NULL); + LogMessage(X_INFO, " Copy\n"); + if (pScreenInfo->PrepareComposite != NULL) { + LogMessage(X_INFO, " Composite (RENDER acceleration)\n"); + } + if (pScreenInfo->UploadToScreen != NULL) { + LogMessage(X_INFO, " UploadToScreen\n"); + } + if (pScreenInfo->DownloadFromScreen != NULL) { + LogMessage(X_INFO, " DownloadFromScreen\n"); + } + + return TRUE; +} + +/** + * exaDriverFini tears down EXA on a given screen. + * + * @param pScreen screen being torn down. + */ +void +exaDriverFini (ScreenPtr pScreen) +{ + /*right now does nothing*/ +} + +/** + * exaMarkSync() should be called after any asynchronous drawing by the hardware. + * + * @param pScreen screen which drawing occurred on + * + * exaMarkSync() sets a flag to indicate that some asynchronous drawing has + * happened and a WaitSync() will be necessary before relying on the contents of + * offscreen memory from the CPU's perspective. It also calls an optional + * driver MarkSync() callback, the return value of which may be used to do partial + * synchronization with the hardware in the future. + */ +void exaMarkSync(ScreenPtr pScreen) +{ + ExaScreenPriv(pScreen); + + pExaScr->info->needsSync = TRUE; + if (pExaScr->info->MarkSync != NULL) { + pExaScr->info->lastMarker = (*pExaScr->info->MarkSync)(pScreen); + } +} + +/** + * exaWaitSync() ensures that all drawing has been completed. + * + * @param pScreen screen being synchronized. + * + * Calls down into the driver to ensure that all previous drawing has completed. + * It should always be called before relying on the framebuffer contents + * reflecting previous drawing, from a CPU perspective. + */ +void exaWaitSync(ScreenPtr pScreen) +{ + ExaScreenPriv(pScreen); + + if (pExaScr->info->needsSync && !pExaScr->swappedOut) { + (*pExaScr->info->WaitMarker)(pScreen, pExaScr->info->lastMarker); + pExaScr->info->needsSync = FALSE; + } +} diff --git a/xorg-server-1.4/exa/exa.h b/xorg-server-1.4/exa/exa.h new file mode 100644 index 0000000..9ea5933 --- /dev/null +++ b/xorg-server-1.4/exa/exa.h @@ -0,0 +1,753 @@ +/* + * + * Copyright (C) 2000 Keith Packard + * 2004 Eric Anholt + * 2005 Zack Rusin + * + * 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 copyright holders not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. 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. + */ + +/** @file + * This is the header containing the public API of EXA for exa drivers. + */ + +#ifndef EXA_H +#define EXA_H + +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "windowstr.h" +#include "gcstruct.h" +#include "picturestr.h" +#include "fb.h" + +#define EXA_VERSION_MAJOR 2 +#define EXA_VERSION_MINOR 2 +#define EXA_VERSION_RELEASE 0 + +typedef struct _ExaOffscreenArea ExaOffscreenArea; + +typedef void (*ExaOffscreenSaveProc) (ScreenPtr pScreen, ExaOffscreenArea *area); + +typedef enum _ExaOffscreenState { + ExaOffscreenAvail, + ExaOffscreenRemovable, + ExaOffscreenLocked +} ExaOffscreenState; + +struct _ExaOffscreenArea { + int base_offset; /* allocation base */ + int offset; /* aligned offset */ + int size; /* total allocation size */ + int score; + pointer privData; + + ExaOffscreenSaveProc save; + + ExaOffscreenState state; + + ExaOffscreenArea *next; +}; + +/** + * The ExaDriver structure is allocated through exaDriverAlloc(), and then + * fllled in by drivers. + */ +typedef struct _ExaDriver { + /** + * exa_major and exa_minor should be set by the driver to the version of + * EXA which the driver was compiled for (or configures itself at runtime + * to support). This allows EXA to extend the structure for new features + * without breaking ABI for drivers compiled against older versions. + */ + int exa_major, exa_minor; + + /** + * memoryBase is the address of the beginning of framebuffer memory. + * The visible screen should be within memoryBase to memoryBase + + * memorySize. + */ + CARD8 *memoryBase; + + /** + * offScreenBase is the offset from memoryBase of the beginning of the area + * to be managed by EXA's linear offscreen memory manager. + * + * In XFree86 DDX drivers, this is probably: + * (pScrn->displayWidth * cpp * pScrn->virtualY) + */ + unsigned long offScreenBase; + + /** + * memorySize is the length (in bytes) of framebuffer memory beginning + * from memoryBase. + * + * The offscreen memory manager will manage the area beginning at + * (memoryBase + offScreenBase), with a length of (memorySize - + * offScreenBase) + * + * In XFree86 DDX drivers, this is probably (pScrn->videoRam * 1024) + */ + unsigned long memorySize; + + /** + * pixmapOffsetAlign is the byte alignment necessary for pixmap offsets + * within framebuffer. + * + * Hardware typically has a required alignment of offsets, which may or may + * not be a power of two. EXA will ensure that pixmaps managed by the + * offscreen memory manager meet this alignment requirement. + */ + int pixmapOffsetAlign; + + /** + * pixmapPitchAlign is the byte alignment necessary for pixmap pitches + * within the framebuffer. + * + * Hardware typically has a required alignment of pitches for acceleration. + * For 3D hardware, Composite acceleration often requires that source and + * mask pixmaps (textures) have a power-of-two pitch, which can be demanded + * using EXA_OFFSCREEN_ALIGN_POT. These pitch requirements only apply to + * pixmaps managed by the offscreen memory manager. Thus, it is up to the + * driver to ensure that the visible screen has an appropriate pitch for + * acceleration. + */ + int pixmapPitchAlign; + + /** + * The flags field is bitfield of boolean values controlling EXA's behavior. + * + * The flags in clude EXA_OFFSCREEN_PIXMAPS, EXA_OFFSCREEN_ALIGN_POT, and + * EXA_TWO_BITBLT_DIRECTIONS. + */ + int flags; + + /** @{ */ + /** + * maxX controls the X coordinate limitation for rendering from the card. + * The driver should never receive a request for rendering beyond maxX + * in the X direction from the origin of a pixmap. + */ + int maxX; + + /** + * maxY controls the Y coordinate limitation for rendering from the card. + * The driver should never receive a request for rendering beyond maxY + * in the Y direction from the origin of a pixmap. + */ + int maxY; + /** @} */ + + /* private */ + ExaOffscreenArea *offScreenAreas; + Bool needsSync; + int lastMarker; + + /** @name Solid + * @{ + */ + /** + * PrepareSolid() sets up the driver for doing a solid fill. + * @param pPixmap Destination pixmap + * @param alu raster operation + * @param planemask write mask for the fill + * @param fg "foreground" color for the fill + * + * This call should set up the driver for doing a series of solid fills + * through the Solid() call. The alu raster op is one of the GX* + * graphics functions listed in X.h, and typically maps to a similar + * single-byte "ROP" setting in all hardware. The planemask controls + * which bits of the destination should be affected, and will only represent + * the bits up to the depth of pPixmap. The fg is the pixel value of the + * foreground color referred to in ROP descriptions. + * + * Note that many drivers will need to store some of the data in the driver + * private record, for sending to the hardware with each drawing command. + * + * The PrepareSolid() call is required of all drivers, but it may fail for any + * reason. Failure results in a fallback to software rendering. + */ + Bool (*PrepareSolid) (PixmapPtr pPixmap, + int alu, + Pixel planemask, + Pixel fg); + + /** + * Solid() performs a solid fill set up in the last PrepareSolid() call. + * + * @param pPixmap destination pixmap + * @param x1 left coordinate + * @param y1 top coordinate + * @param x2 right coordinate + * @param y2 bottom coordinate + * + * Performs the fill set up by the last PrepareSolid() call, covering the + * area from (x1,y1) to (x2,y2) in pPixmap. Note that the coordinates are + * in the coordinate space of the destination pixmap, so the driver will + * need to set up the hardware's offset and pitch for the destination + * coordinates according to the pixmap's offset and pitch within + * framebuffer. This likely means using exaGetPixmapOffset() and + * exaGetPixmapPitch(). + * + * This call is required if PrepareSolid() ever succeeds. + */ + void (*Solid) (PixmapPtr pPixmap, int x1, int y1, int x2, int y2); + + /** + * DoneSolid() finishes a set of solid fills. + * + * @param pPixmap destination pixmap. + * + * The DoneSolid() call is called at the end of a series of consecutive + * Solid() calls following a successful PrepareSolid(). This allows drivers + * to finish up emitting drawing commands that were buffered, or clean up + * state from PrepareSolid(). + * + * This call is required if PrepareSolid() ever succeeds. + */ + void (*DoneSolid) (PixmapPtr pPixmap); + /** @} */ + + /** @name Copy + * @{ + */ + /** + * PrepareCopy() sets up the driver for doing a copy within video + * memory. + * + * @param pSrcPixmap source pixmap + * @param pDstPixmap destination pixmap + * @param dx X copy direction + * @param dy Y copy direction + * @param alu raster operation + * @param planemask write mask for the fill + * + * This call should set up the driver for doing a series of copies from the + * the pSrcPixmap to the pDstPixmap. The dx flag will be positive if the + * hardware should do the copy from the left to the right, and dy will be + * positive if the copy should be done from the top to the bottom. This + * is to deal with self-overlapping copies when pSrcPixmap == pDstPixmap. + * If your hardware can only support blits that are (left to right, top to + * bottom) or (right to left, bottom to top), then you should set + * #EXA_TWO_BITBLT_DIRECTIONS, and EXA will break down Copy operations to + * ones that meet those requirements. The alu raster op is one of the GX* + * graphics functions listed in X.h, and typically maps to a similar + * single-byte "ROP" setting in all hardware. The planemask controls which + * bits of the destination should be affected, and will only represent the + * bits up to the depth of pPixmap. + * + * Note that many drivers will need to store some of the data in the driver + * private record, for sending to the hardware with each drawing command. + * + * The PrepareCopy() call is required of all drivers, but it may fail for any + * reason. Failure results in a fallback to software rendering. + */ + Bool (*PrepareCopy) (PixmapPtr pSrcPixmap, + PixmapPtr pDstPixmap, + int dx, + int dy, + int alu, + Pixel planemask); + + /** + * Copy() performs a copy set up in the last PrepareCopy call. + * + * @param pDstPixmap destination pixmap + * @param srcX source X coordinate + * @param srcY source Y coordinate + * @param dstX destination X coordinate + * @param dstY destination Y coordinate + * @param width width of the rectangle to be copied + * @param height height of the rectangle to be copied. + * + * Performs the copy set up by the last PrepareCopy() call, copying the + * rectangle from (srcX, srcY) to (srcX + width, srcY + width) in the source + * pixmap to the same-sized rectangle at (dstX, dstY) in the destination + * pixmap. Those rectangles may overlap in memory, if + * pSrcPixmap == pDstPixmap. Note that this call does not receive the + * pSrcPixmap as an argument -- if it's needed in this function, it should + * be stored in the driver private during PrepareCopy(). As with Solid(), + * the coordinates are in the coordinate space of each pixmap, so the driver + * will need to set up source and destination pitches and offsets from those + * pixmaps, probably using exaGetPixmapOffset() and exaGetPixmapPitch(). + * + * This call is required if PrepareCopy ever succeeds. + */ + void (*Copy) (PixmapPtr pDstPixmap, + int srcX, + int srcY, + int dstX, + int dstY, + int width, + int height); + + /** + * DoneCopy() finishes a set of copies. + * + * @param pPixmap destination pixmap. + * + * The DoneCopy() call is called at the end of a series of consecutive + * Copy() calls following a successful PrepareCopy(). This allows drivers + * to finish up emitting drawing commands that were buffered, or clean up + * state from PrepareCopy(). + * + * This call is required if PrepareCopy() ever succeeds. + */ + void (*DoneCopy) (PixmapPtr pDstPixmap); + /** @} */ + + /** @name Composite + * @{ + */ + /** + * CheckComposite() checks to see if a composite operation could be + * accelerated. + * + * @param op Render operation + * @param pSrcPicture source Picture + * @param pMaskPicture mask picture + * @param pDstPicture destination Picture + * + * The CheckComposite() call checks if the driver could handle acceleration + * of op with the given source, mask, and destination pictures. This allows + * drivers to check source and destination formats, supported operations, + * transformations, and component alpha state, and send operations it can't + * support to software rendering early on. This avoids costly pixmap + * migration to the wrong places when the driver can't accelerate + * operations. Note that because migration hasn't happened, the driver + * can't know during CheckComposite() what the offsets and pitches of the + * pixmaps are going to be. + * + * See PrepareComposite() for more details on likely issues that drivers + * will have in accelerating Composite operations. + * + * The CheckComposite() call is recommended if PrepareComposite() is + * implemented, but is not required. + */ + Bool (*CheckComposite) (int op, + PicturePtr pSrcPicture, + PicturePtr pMaskPicture, + PicturePtr pDstPicture); + + /** + * PrepareComposite() sets up the driver for doing a Composite operation + * described in the Render extension protocol spec. + * + * @param op Render operation + * @param pSrcPicture source Picture + * @param pMaskPicture mask picture + * @param pDstPicture destination Picture + * @param pSrc source pixmap + * @param pMask mask pixmap + * @param pDst destination pixmap + * + * This call should set up the driver for doing a series of Composite + * operations, as described in the Render protocol spec, with the given + * pSrcPicture, pMaskPicture, and pDstPicture. The pSrc, pMask, and + * pDst are the pixmaps containing the pixel data, and should be used for + * setting the offset and pitch used for the coordinate spaces for each of + * the Pictures. + * + * Notes on interpreting Picture structures: + * - The Picture structures will always have a valid pDrawable. + * - The Picture structures will never have alphaMap set. + * - The mask Picture (and therefore pMask) may be NULL, in which case the + * operation is simply src OP dst instead of src IN mask OP dst, and + * mask coordinates should be ignored. + * - pMarkPicture may have componentAlpha set, which greatly changes + * the behavior of the Composite operation. componentAlpha has no effect + * when set on pSrcPicture or pDstPicture. + * - The source and mask Pictures may have a transformation set + * (Picture->transform != NULL), which means that the source coordinates + * should be transformed by that transformation, resulting in scaling, + * rotation, etc. The PictureTransformPoint() call can transform + * coordinates for you. Transforms have no effect on Pictures when used + * as a destination. + * - The source and mask pictures may have a filter set. PictFilterNearest + * and PictFilterBilinear are defined in the Render protocol, but others + * may be encountered, and must be handled correctly (usually by + * PrepareComposite failing, and falling back to software). Filters have + * no effect on Pictures when used as a destination. + * - The source and mask Pictures may have repeating set, which must be + * respected. Many chipsets will be unable to support repeating on + * pixmaps that have a width or height that is not a power of two. + * + * If your hardware can't support source pictures (textures) with + * non-power-of-two pitches, you should set #EXA_OFFSCREEN_ALIGN_POT. + * + * Note that many drivers will need to store some of the data in the driver + * private record, for sending to the hardware with each drawing command. + * + * The PrepareComposite() call is not required. However, it is highly + * recommended for performance of antialiased font rendering and performance + * of cairo applications. Failure results in a fallback to software + * rendering. + */ + Bool (*PrepareComposite) (int op, + PicturePtr pSrcPicture, + PicturePtr pMaskPicture, + PicturePtr pDstPicture, + PixmapPtr pSrc, + PixmapPtr pMask, + PixmapPtr pDst); + + /** + * Composite() performs a Composite operation set up in the last + * PrepareComposite() call. + * + * @param pDstPixmap destination pixmap + * @param srcX source X coordinate + * @param srcY source Y coordinate + * @param maskX source X coordinate + * @param maskY source Y coordinate + * @param dstX destination X coordinate + * @param dstY destination Y coordinate + * @param width destination rectangle width + * @param height destination rectangle height + * + * Performs the Composite operation set up by the last PrepareComposite() + * call, to the rectangle from (dstX, dstY) to (dstX + width, dstY + height) + * in the destination Pixmap. Note that if a transformation was set on + * the source or mask Pictures, the source rectangles may not be the same + * size as the destination rectangles and filtering. Getting the coordinate + * transformation right at the subpixel level can be tricky, and rendercheck + * can test this for you. + * + * This call is required if PrepareComposite() ever succeeds. + */ + void (*Composite) (PixmapPtr pDst, + int srcX, + int srcY, + int maskX, + int maskY, + int dstX, + int dstY, + int width, + int height); + + /** + * DoneComposite() finishes a set of Composite operations. + * + * @param pPixmap destination pixmap. + * + * The DoneComposite() call is called at the end of a series of consecutive + * Composite() calls following a successful PrepareComposite(). This allows + * drivers to finish up emitting drawing commands that were buffered, or + * clean up state from PrepareComposite(). + * + * This call is required if PrepareComposite() ever succeeds. + */ + void (*DoneComposite) (PixmapPtr pDst); + /** @} */ + + /** + * UploadToScreen() loads a rectangle of data from src into pDst. + * + * @param pDst destination pixmap + * @param x destination X coordinate. + * @param y destination Y coordinate + * @param width width of the rectangle to be copied + * @param height height of the rectangle to be copied + * @param src pointer to the beginning of the source data + * @param src_pitch pitch (in bytes) of the lines of source data. + * + * UploadToScreen() copies data in system memory beginning at src (with + * pitch src_pitch) into the destination pixmap from (x, y) to + * (x + width, y + height). This is typically done with hostdata uploads, + * where the CPU sets up a blit command on the hardware with instructions + * that the blit data will be fed through some sort of aperture on the card. + * + * If UploadToScreen() is performed asynchronously, it is up to the driver + * to call exaMarkSync(). This is in contrast to most other acceleration + * calls in EXA. + * + * UploadToScreen() can aid in pixmap migration, but is most important for + * the performance of exaGlyphs() (antialiased font drawing) by allowing + * pipelining of data uploads, avoiding a sync of the card after each glyph. + * + * @return TRUE if the driver successfully uploaded the data. FALSE + * indicates that EXA should fall back to doing the upload in software. + * + * UploadToScreen() is not required, but is recommended if Composite + * acceleration is supported. + */ + Bool (*UploadToScreen) (PixmapPtr pDst, + int x, + int y, + int w, + int h, + char *src, + int src_pitch); + + /** + * UploadToScratch() is used to upload a pixmap to a scratch area for + * acceleration. + * + * @param pSrc source pixmap in host memory + * @param pDst fake, scratch pixmap to be set up in offscreen memory. + * + * The UploadToScratch() call was added to support Xati before Xati had + * support for hostdata uploads and before exaGlyphs() was written. It + * behaves incorrectly (uses an invalid pixmap as pDst), + * and UploadToScreen() should be implemented instead. + * + * Drivers implementing UploadToScratch() had to set up space (likely in a + * statically allocated area) in offscreen memory, copy pSrc to that + * scratch area, and adust pDst->devKind for the pitch and + * pDst->devPrivate.ptr for the pointer to that scratch area. The driver + * was responsible for syncing (as it was implemented using memcpy() in + * Xati), and only the data from the last UploadToScratch() was guaranteed + * to be valid at any given time. + * + * UploadToScratch() should not be implemented by drivers, and will likely + * be removed in a future version of EXA. + */ + Bool (*UploadToScratch) (PixmapPtr pSrc, + PixmapPtr pDst); + + /** + * DownloadFromScreen() loads a rectangle of data from pSrc into dst + * + * @param pSrc source pixmap + * @param x source X coordinate. + * @param y source Y coordinate + * @param width width of the rectangle to be copied + * @param height height of the rectangle to be copied + * @param dst pointer to the beginning of the destination data + * @param dst_pitch pitch (in bytes) of the lines of destination data. + * + * DownloadFromScreen() copies data from offscreen memory in pSrc from + * (x, y) to (x + width, y + height), to system memory starting at + * dst (with pitch dst_pitch). This would usually be done + * using scatter-gather DMA, supported by a DRM call, or by blitting to AGP + * and then synchronously reading from AGP. Because the implementation + * might be synchronous, EXA leaves it up to the driver to call + * exaMarkSync() if DownloadFromScreen() was asynchronous. This is in + * contrast to most other acceleration calls in EXA. + * + * DownloadFromScreen() can aid in the largest bottleneck in pixmap + * migration, which is the read from framebuffer when evicting pixmaps from + * framebuffer memory. Thus, it is highly recommended, even though + * implementations are typically complicated. + * + * @return TRUE if the driver successfully downloaded the data. FALSE + * indicates that EXA should fall back to doing the download in software. + * + * DownloadFromScreen() is not required, but is highly recommended. + */ + Bool (*DownloadFromScreen)(PixmapPtr pSrc, + int x, int y, + int w, int h, + char *dst, int dst_pitch); + + /** + * MarkSync() requests that the driver mark a synchronization point, + * returning an driver-defined integer marker which could be requested for + * synchronization to later in WaitMarker(). This might be used in the + * future to avoid waiting for full hardware stalls before accessing pixmap + * data with the CPU, but is not important in the current incarnation of + * EXA. + * + * Note that drivers should call exaMarkSync() when they have done some + * acceleration, rather than their own MarkSync() handler, as otherwise EXA + * will be unaware of the driver's acceleration and not sync to it during + * fallbacks. + * + * MarkSync() is optional. + */ + int (*MarkSync) (ScreenPtr pScreen); + + /** + * WaitMarker() waits for all rendering before the given marker to have + * completed. If the driver does not implement MarkSync(), marker is + * meaningless, and all rendering by the hardware should be completed before + * WaitMarker() returns. + * + * Note that drivers should call exaWaitSync() to wait for all acceleration + * to finish, as otherwise EXA will be unaware of the driver having + * synchronized, resulting in excessive WaitMarker() calls. + * + * WaitMarker() is required of all drivers. + */ + void (*WaitMarker) (ScreenPtr pScreen, int marker); + + /** @{ */ + /** + * PrepareAccess() is called before CPU access to an offscreen pixmap. + * + * @param pPix the pixmap being accessed + * @param index the index of the pixmap being accessed. + * + * PrepareAccess() will be called before CPU access to an offscreen pixmap. + * This can be used to set up hardware surfaces for byteswapping or + * untiling, or to adjust the pixmap's devPrivate.ptr for the purpose of + * making CPU access use a different aperture. + * + * The index is one of #EXA_PREPARE_DEST, #EXA_PREPARE_SRC, or + * #EXA_PREPARE_MASK, indicating which pixmap is in question. Since only up + * to three pixmaps will have PrepareAccess() called on them per operation, + * drivers can have a small, statically-allocated space to maintain state + * for PrepareAccess() and FinishAccess() in. Note that the same pixmap may + * have PrepareAccess() called on it more than once, for example when doing + * a copy within the same pixmap (so it gets PrepareAccess as() + * #EXA_PREPARE_DEST and then as #EXA_PREPARE_SRC). + * + * PrepareAccess() may fail. An example might be the case of hardware that + * can set up 1 or 2 surfaces for CPU access, but not 3. If PrepareAccess() + * fails, EXA will migrate the pixmap to system memory. + * DownloadFromScreen() must be implemented and must not fail if a driver + * wishes to fail in PrepareAccess(). PrepareAccess() must not fail when + * pPix is the visible screen, because the visible screen can not be + * migrated. + * + * @return TRUE if PrepareAccess() successfully prepared the pixmap for CPU + * drawing. + * @return FALSE if PrepareAccess() is unsuccessful and EXA should use + * DownloadFromScreen() to migate the pixmap out. + */ + Bool (*PrepareAccess)(PixmapPtr pPix, int index); + + /** + * FinishAccess() is called after CPU access to an offscreen pixmap. + * + * @param pPix the pixmap being accessed + * @param index the index of the pixmap being accessed. + * + * FinishAccess() will be called after finishing CPU access of an offscreen + * pixmap set up by PrepareAccess(). Note that the FinishAccess() will not be + * called if PrepareAccess() failed and the pixmap was migrated out. + */ + void (*FinishAccess)(PixmapPtr pPix, int index); + + /** + * PixmapIsOffscreen() is an optional driver replacement to + * exaPixmapIsOffscreen(). Set to NULL if you want the standard behaviour + * of exaPixmapIsOffscreen(). + * + * @param pPix the pixmap + * @return TRUE if the given drawable is in framebuffer memory. + * + * exaPixmapIsOffscreen() is used to determine if a pixmap is in offscreen + * memory, meaning that acceleration could probably be done to it, and that it + * will need to be wrapped by PrepareAccess()/FinishAccess() when accessing it + * with the CPU. + * + * + */ + Bool (*PixmapIsOffscreen)(PixmapPtr pPix); + + /** @name PrepareAccess() and FinishAccess() indices + * @{ + */ + /** + * EXA_PREPARE_DEST is the index for a pixmap that may be drawn to or + * read from. + */ + #define EXA_PREPARE_DEST 0 + /** + * EXA_PREPARE_SRC is the index for a pixmap that may be read from + */ + #define EXA_PREPARE_SRC 1 + /** + * EXA_PREPARE_SRC is the index for a second pixmap that may be read + * from. + */ + #define EXA_PREPARE_MASK 2 + /** @} */ + /** @} */ +} ExaDriverRec, *ExaDriverPtr; + +/** @name EXA driver flags + * @{ + */ +/** + * EXA_OFFSCREEN_PIXMAPS indicates to EXA that the driver can support + * offscreen pixmaps. + */ +#define EXA_OFFSCREEN_PIXMAPS (1 << 0) + +/** + * EXA_OFFSCREEN_ALIGN_POT indicates to EXA that the driver needs pixmaps + * to have a power-of-two pitch. + */ +#define EXA_OFFSCREEN_ALIGN_POT (1 << 1) + +/** + * EXA_TWO_BITBLT_DIRECTIONS indicates to EXA that the driver can only + * support copies that are (left-to-right, top-to-bottom) or + * (right-to-left, bottom-to-top). + */ +#define EXA_TWO_BITBLT_DIRECTIONS (1 << 2) +/** @} */ + +ExaDriverPtr +exaDriverAlloc(void); + +Bool +exaDriverInit(ScreenPtr pScreen, + ExaDriverPtr pScreenInfo); + +void +exaDriverFini(ScreenPtr pScreen); + +void +exaMarkSync(ScreenPtr pScreen); +void +exaWaitSync(ScreenPtr pScreen); + +ExaOffscreenArea * +exaOffscreenAlloc(ScreenPtr pScreen, int size, int align, + Bool locked, + ExaOffscreenSaveProc save, + pointer privData); + +ExaOffscreenArea * +exaOffscreenFree(ScreenPtr pScreen, ExaOffscreenArea *area); + +void +ExaOffscreenMarkUsed (PixmapPtr pPixmap); + +unsigned long +exaGetPixmapOffset(PixmapPtr pPix); + +unsigned long +exaGetPixmapPitch(PixmapPtr pPix); + +unsigned long +exaGetPixmapSize(PixmapPtr pPix); + +void +exaEnableDisableFBAccess (int index, Bool enable); + +void +exaMoveInPixmap (PixmapPtr pPixmap); + +void +exaMoveOutPixmap (PixmapPtr pPixmap); + +/** + * Returns TRUE if the given planemask covers all the significant bits in the + * pixel values for pDrawable. + */ +#define EXA_PM_IS_SOLID(_pDrawable, _pm) \ + (((_pm) & FbFullMask((_pDrawable)->depth)) == \ + FbFullMask((_pDrawable)->depth)) + +#endif /* EXA_H */ diff --git a/xorg-server-1.4/exa/exa_accel.c b/xorg-server-1.4/exa/exa_accel.c new file mode 100644 index 0000000..cc383cc --- /dev/null +++ b/xorg-server-1.4/exa/exa_accel.c @@ -0,0 +1,1378 @@ +/* + * Copyright © 2001 Keith Packard + * + * Partly based on code that is Copyright © 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. + * + * Authors: + * Eric Anholt + * Michel Dänzer + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif +#include "exa_priv.h" +#include +#include "dixfontstr.h" +#include "exa.h" +#include "cw.h" + +static void +exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n, + DDXPointPtr ppt, int *pwidth, int fSorted) +{ + ScreenPtr pScreen = pDrawable->pScreen; + ExaScreenPriv (pScreen); + RegionPtr pClip = fbGetCompositeClip(pGC); + PixmapPtr pPixmap; + BoxPtr pextent, pbox; + int nbox; + int extentX1, extentX2, extentY1, extentY2; + int fullX1, fullX2, fullY1; + int partX1, partX2; + int off_x, off_y; + ExaMigrationRec pixmaps[1]; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable); + + if (pExaScr->swappedOut || + pGC->fillStyle != FillSolid || + pPixmap->drawable.width > pExaScr->info->maxX || + pPixmap->drawable.height > pExaScr->info->maxY) + { + exaDoMigration (pixmaps, 1, FALSE); + ExaCheckFillSpans (pDrawable, pGC, n, ppt, pwidth, fSorted); + return; + } else { + exaDoMigration (pixmaps, 1, TRUE); + } + + if (!(pPixmap = exaGetOffscreenPixmap (pDrawable, &off_x, &off_y)) || + !(*pExaScr->info->PrepareSolid) (pPixmap, + pGC->alu, + pGC->planemask, + pGC->fgPixel)) + { + exaDoMigration (pixmaps, 1, FALSE); + ExaCheckFillSpans (pDrawable, pGC, n, ppt, pwidth, fSorted); + return; + } + + pextent = REGION_EXTENTS(pGC->pScreen, pClip); + extentX1 = pextent->x1; + extentY1 = pextent->y1; + extentX2 = pextent->x2; + extentY2 = pextent->y2; + while (n--) + { + fullX1 = ppt->x; + fullY1 = ppt->y; + fullX2 = fullX1 + (int) *pwidth; + ppt++; + pwidth++; + + if (fullY1 < extentY1 || extentY2 <= fullY1) + continue; + + if (fullX1 < extentX1) + fullX1 = extentX1; + + if (fullX2 > extentX2) + fullX2 = extentX2; + + if (fullX1 >= fullX2) + continue; + + nbox = REGION_NUM_RECTS (pClip); + if (nbox == 1) + { + (*pExaScr->info->Solid) (pPixmap, + fullX1 + off_x, fullY1 + off_y, + fullX2 + off_x, fullY1 + 1 + off_y); + } + else + { + pbox = REGION_RECTS(pClip); + while(nbox--) + { + if (pbox->y1 <= fullY1 && fullY1 < pbox->y2) + { + partX1 = pbox->x1; + if (partX1 < fullX1) + partX1 = fullX1; + partX2 = pbox->x2; + if (partX2 > fullX2) + partX2 = fullX2; + if (partX2 > partX1) { + (*pExaScr->info->Solid) (pPixmap, + partX1 + off_x, fullY1 + off_y, + partX2 + off_x, fullY1 + 1 + off_y); + } + } + pbox++; + } + } + } + (*pExaScr->info->DoneSolid) (pPixmap); + exaMarkSync(pScreen); +} + +static void +exaPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, + int w, int h, int leftPad, int format, char *bits) +{ + ExaScreenPriv (pDrawable->pScreen); + PixmapPtr pPix; + ExaMigrationRec pixmaps[1]; + RegionPtr pClip; + BoxPtr pbox; + int nbox; + int xoff, yoff; + int src_stride, bpp = pDrawable->bitsPerPixel; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable); + + /* Don't bother with under 8bpp, XYPixmaps. */ + if (format != ZPixmap || bpp < 8) + goto migrate_and_fallback; + + /* Only accelerate copies: no rop or planemask. */ + if (!EXA_PM_IS_SOLID(pDrawable, pGC->planemask) || pGC->alu != GXcopy) + goto migrate_and_fallback; + + if (pExaScr->swappedOut) + goto fallback; + + exaDoMigration (pixmaps, 1, TRUE); + + if (pExaScr->info->UploadToScreen == NULL) + goto fallback; + + pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff); + + if (pPix == NULL) + goto fallback; + + x += pDrawable->x; + y += pDrawable->y; + + pClip = fbGetCompositeClip(pGC); + src_stride = PixmapBytePad(w, pDrawable->depth); + for (nbox = REGION_NUM_RECTS(pClip), + pbox = REGION_RECTS(pClip); + nbox--; + pbox++) + { + int x1 = x; + int y1 = y; + int x2 = x + w; + int y2 = y + h; + char *src; + Bool ok; + + if (x1 < pbox->x1) + x1 = pbox->x1; + if (y1 < pbox->y1) + y1 = pbox->y1; + if (x2 > pbox->x2) + x2 = pbox->x2; + if (y2 > pbox->y2) + y2 = pbox->y2; + if (x1 >= x2 || y1 >= y2) + continue; + + src = bits + (y1 - y) * src_stride + (x1 - x) * (bpp / 8); + ok = pExaScr->info->UploadToScreen(pPix, x1 + xoff, y1 + yoff, + x2 - x1, y2 - y1, src, src_stride); + /* If we fail to accelerate the upload, fall back to using unaccelerated + * fb calls. + */ + if (!ok) { + FbStip *dst; + FbStride dst_stride; + int dstBpp; + int dstXoff, dstYoff; + + exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); + + fbGetStipDrawable(pDrawable, dst, dst_stride, dstBpp, + dstXoff, dstYoff); + + fbBltStip((FbStip *)bits + (y1 - y) * (src_stride / sizeof(FbStip)), + src_stride / sizeof(FbStip), + (x1 - x) * dstBpp, + dst + (y1 + dstYoff) * dst_stride, + dst_stride, + (x1 + dstXoff) * dstBpp, + (x2 - x1) * dstBpp, + y2 - y1, + GXcopy, FB_ALLONES, dstBpp); + + exaFinishAccess(pDrawable, EXA_PREPARE_DEST); + } + + exaPixmapDirty(pPix, x1 + xoff, y1 + yoff, x2 + xoff, y2 + yoff); + } + + return; + +migrate_and_fallback: + exaDoMigration (pixmaps, 1, FALSE); + +fallback: + ExaCheckPutImage(pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits); +} + +static Bool inline +exaCopyNtoNTwoDir (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, + GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy) +{ + ExaScreenPriv (pDstDrawable->pScreen); + PixmapPtr pSrcPixmap, pDstPixmap; + int src_off_x, src_off_y, dst_off_x, dst_off_y; + int dirsetup; + + /* Need to get both pixmaps to call the driver routines */ + pSrcPixmap = exaGetOffscreenPixmap (pSrcDrawable, &src_off_x, &src_off_y); + pDstPixmap = exaGetOffscreenPixmap (pDstDrawable, &dst_off_x, &dst_off_y); + if (!pSrcPixmap || !pDstPixmap) + return FALSE; + + /* + * Now the case of a chip that only supports xdir = ydir = 1 or + * xdir = ydir = -1, but we have xdir != ydir. + */ + dirsetup = 0; /* No direction set up yet. */ + for (; nbox; pbox++, nbox--) { + if (dx >= 0 && (src_off_y + pbox->y1 + dy) != pbox->y1) { + /* Do a xdir = ydir = -1 blit instead. */ + if (dirsetup != -1) { + if (dirsetup != 0) + pExaScr->info->DoneCopy(pDstPixmap); + dirsetup = -1; + if (!(*pExaScr->info->PrepareCopy)(pSrcPixmap, + pDstPixmap, + -1, -1, + pGC ? pGC->alu : GXcopy, + pGC ? pGC->planemask : + FB_ALLONES)) + return FALSE; + } + (*pExaScr->info->Copy)(pDstPixmap, + src_off_x + pbox->x1 + dx, + src_off_y + pbox->y1 + dy, + dst_off_x + pbox->x1, + dst_off_y + pbox->y1, + pbox->x2 - pbox->x1, + pbox->y2 - pbox->y1); + } else if (dx < 0 && (src_off_y + pbox->y1 + dy) != pbox->y1) { + /* Do a xdir = ydir = 1 blit instead. */ + if (dirsetup != 1) { + if (dirsetup != 0) + pExaScr->info->DoneCopy(pDstPixmap); + dirsetup = 1; + if (!(*pExaScr->info->PrepareCopy)(pSrcPixmap, + pDstPixmap, + 1, 1, + pGC ? pGC->alu : GXcopy, + pGC ? pGC->planemask : + FB_ALLONES)) + return FALSE; + } + (*pExaScr->info->Copy)(pDstPixmap, + src_off_x + pbox->x1 + dx, + src_off_y + pbox->y1 + dy, + dst_off_x + pbox->x1, + dst_off_y + pbox->y1, + pbox->x2 - pbox->x1, + pbox->y2 - pbox->y1); + } else if (dx >= 0) { + /* + * xdir = 1, ydir = -1. + * Perform line-by-line xdir = ydir = 1 blits, going up. + */ + int i; + if (dirsetup != 1) { + if (dirsetup != 0) + pExaScr->info->DoneCopy(pDstPixmap); + dirsetup = 1; + if (!(*pExaScr->info->PrepareCopy)(pSrcPixmap, + pDstPixmap, + 1, 1, + pGC ? pGC->alu : GXcopy, + pGC ? pGC->planemask : + FB_ALLONES)) + return FALSE; + } + for (i = pbox->y2 - pbox->y1 - 1; i >= 0; i--) + (*pExaScr->info->Copy)(pDstPixmap, + src_off_x + pbox->x1 + dx, + src_off_y + pbox->y1 + dy + i, + dst_off_x + pbox->x1, + dst_off_y + pbox->y1 + i, + pbox->x2 - pbox->x1, 1); + } else { + /* + * xdir = -1, ydir = 1. + * Perform line-by-line xdir = ydir = -1 blits, going down. + */ + int i; + if (dirsetup != -1) { + if (dirsetup != 0) + pExaScr->info->DoneCopy(pDstPixmap); + dirsetup = -1; + if (!(*pExaScr->info->PrepareCopy)(pSrcPixmap, + pDstPixmap, + -1, -1, + pGC ? pGC->alu : GXcopy, + pGC ? pGC->planemask : + FB_ALLONES)) + return FALSE; + } + for (i = 0; i < pbox->y2 - pbox->y1; i++) + (*pExaScr->info->Copy)(pDstPixmap, + src_off_x + pbox->x1 + dx, + src_off_y + pbox->y1 + dy + i, + dst_off_x + pbox->x1, + dst_off_y + pbox->y1 + i, + pbox->x2 - pbox->x1, 1); + } + exaPixmapDirty(pDstPixmap, dst_off_x + pbox->x1, dst_off_y + pbox->y1, + dst_off_x + pbox->x2, dst_off_y + pbox->y2); + } + if (dirsetup != 0) + pExaScr->info->DoneCopy(pDstPixmap); + exaMarkSync(pDstDrawable->pScreen); + return TRUE; +} + +void +exaCopyNtoN (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure) +{ + ExaScreenPriv (pDstDrawable->pScreen); + PixmapPtr pSrcPixmap, pDstPixmap; + int src_off_x, src_off_y; + int dst_off_x, dst_off_y; + ExaMigrationRec pixmaps[2]; + Bool fallback = FALSE; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pDstPixmap = exaGetDrawablePixmap (pDstDrawable); + pixmaps[1].as_dst = FALSE; + pixmaps[1].as_src = TRUE; + pixmaps[1].pPix = pSrcPixmap = exaGetDrawablePixmap (pSrcDrawable); + + /* Respect maxX/maxY in a trivial way: don't set up drawing when we might + * violate the limits. The proper solution would be a temporary pixmap + * adjusted so that the drawing happened within limits. + */ + if (pSrcPixmap->drawable.width > pExaScr->info->maxX || + pSrcPixmap->drawable.height > pExaScr->info->maxY || + pDstPixmap->drawable.width > pExaScr->info->maxX || + pDstPixmap->drawable.height > pExaScr->info->maxY) + { + fallback = TRUE; + } else { + exaDoMigration (pixmaps, 2, TRUE); + } + + /* Mixed directions must be handled specially if the card is lame */ + if (!fallback && (pExaScr->info->flags & EXA_TWO_BITBLT_DIRECTIONS) && + reverse != upsidedown) { + if (exaCopyNtoNTwoDir(pSrcDrawable, pDstDrawable, pGC, pbox, nbox, + dx, dy)) + return; + fallback = TRUE; + } + + pSrcPixmap = exaGetDrawablePixmap (pSrcDrawable); + pDstPixmap = exaGetDrawablePixmap (pDstDrawable); + + exaGetDrawableDeltas (pSrcDrawable, pSrcPixmap, &src_off_x, &src_off_y); + exaGetDrawableDeltas (pDstDrawable, pDstPixmap, &dst_off_x, &dst_off_y); + + if (fallback || !exaPixmapIsOffscreen(pSrcPixmap) || + !exaPixmapIsOffscreen(pDstPixmap) || + !(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, reverse ? -1 : 1, + upsidedown ? -1 : 1, + pGC ? pGC->alu : GXcopy, + pGC ? pGC->planemask : FB_ALLONES)) { + fallback = TRUE; + EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrcDrawable, pDstDrawable, + exaDrawableLocation(pSrcDrawable), + exaDrawableLocation(pDstDrawable))); + exaDoMigration (pixmaps, 2, FALSE); + exaPrepareAccess (pDstDrawable, EXA_PREPARE_DEST); + exaPrepareAccess (pSrcDrawable, EXA_PREPARE_SRC); + fbCopyNtoN (pSrcDrawable, pDstDrawable, pGC, + pbox, nbox, dx, dy, reverse, upsidedown, + bitplane, closure); + exaFinishAccess (pSrcDrawable, EXA_PREPARE_SRC); + exaFinishAccess (pDstDrawable, EXA_PREPARE_DEST); + } + + while (nbox--) + { + if (!fallback) + (*pExaScr->info->Copy) (pDstPixmap, + pbox->x1 + dx + src_off_x, + pbox->y1 + dy + src_off_y, + pbox->x1 + dst_off_x, pbox->y1 + dst_off_y, + pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); + exaPixmapDirty (pDstPixmap, pbox->x1 + dst_off_x, pbox->y1 + dst_off_y, + pbox->x2 + dst_off_x, pbox->y2 + dst_off_y); + pbox++; + } + + if (fallback) + return; + + (*pExaScr->info->DoneCopy) (pDstPixmap); + exaMarkSync (pDstDrawable->pScreen); +} + +RegionPtr +exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, + int srcx, int srcy, int width, int height, int dstx, int dsty) +{ + ExaScreenPriv (pDstDrawable->pScreen); + + if (pExaScr->swappedOut) { + return ExaCheckCopyArea(pSrcDrawable, pDstDrawable, pGC, + srcx, srcy, width, height, dstx, dsty); + } + + return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, + srcx, srcy, width, height, + dstx, dsty, exaCopyNtoN, 0, NULL); +} + +static void +exaPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, + DDXPointPtr ppt) +{ + int i; + xRectangle *prect; + + /* If we can't reuse the current GC as is, don't bother accelerating the + * points. + */ + if (pGC->fillStyle != FillSolid) { + ExaCheckPolyPoint(pDrawable, pGC, mode, npt, ppt); + return; + } + + prect = ALLOCATE_LOCAL(sizeof(xRectangle) * npt); + for (i = 0; i < npt; i++) { + prect[i].x = ppt[i].x; + prect[i].y = ppt[i].y; + if (i > 0 && mode == CoordModePrevious) { + prect[i].x += prect[i - 1].x; + prect[i].y += prect[i - 1].y; + } + prect[i].width = 1; + prect[i].height = 1; + } + pGC->ops->PolyFillRect(pDrawable, pGC, npt, prect); + DEALLOCATE_LOCAL(prect); +} + +/** + * exaPolylines() checks if it can accelerate the lines as a group of + * horizontal or vertical lines (rectangles), and uses existing rectangle fill + * acceleration if so. + */ +static void +exaPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, + DDXPointPtr ppt) +{ + xRectangle *prect; + int x1, x2, y1, y2; + int i; + + /* Don't try to do wide lines or non-solid fill style. */ + if (pGC->lineWidth != 0 || pGC->lineStyle != LineSolid || + pGC->fillStyle != FillSolid) { + ExaCheckPolylines(pDrawable, pGC, mode, npt, ppt); + return; + } + + prect = ALLOCATE_LOCAL(sizeof(xRectangle) * (npt - 1)); + x1 = ppt[0].x; + y1 = ppt[0].y; + /* If we have any non-horizontal/vertical, fall back. */ + for (i = 0; i < npt; i++) { + if (mode == CoordModePrevious) { + x2 = x1 + ppt[i + 1].x; + y2 = y1 + ppt[i + 1].y; + } else { + x2 = ppt[i + 1].x; + y2 = ppt[i + 1].y; + } + + if (x1 != x2 && y1 != y2) { + DEALLOCATE_LOCAL(prect); + ExaCheckPolylines(pDrawable, pGC, mode, npt, ppt); + return; + } + + if (x1 < x2) { + prect[i].x = x1; + prect[i].width = x2 - x1 + 1; + } else { + prect[i].x = x2; + prect[i].width = x1 - x2 + 1; + } + if (y1 < y2) { + prect[i].y = y1; + prect[i].height = y2 - y1 + 1; + } else { + prect[i].y = y2; + prect[i].height = y1 - y2 + 1; + } + + x1 = x2; + y1 = y2; + } + pGC->ops->PolyFillRect(pDrawable, pGC, npt - 1, prect); + DEALLOCATE_LOCAL(prect); +} + +/** + * exaPolySegment() checks if it can accelerate the lines as a group of + * horizontal or vertical lines (rectangles), and uses existing rectangle fill + * acceleration if so. + */ +static void +exaPolySegment (DrawablePtr pDrawable, GCPtr pGC, int nseg, + xSegment *pSeg) +{ + xRectangle *prect; + int i; + + /* Don't try to do wide lines or non-solid fill style. */ + if (pGC->lineWidth != 0 || pGC->lineStyle != LineSolid || + pGC->fillStyle != FillSolid) + { + ExaCheckPolySegment(pDrawable, pGC, nseg, pSeg); + return; + } + + /* If we have any non-horizontal/vertical, fall back. */ + for (i = 0; i < nseg; i++) { + if (pSeg[i].x1 != pSeg[i].x2 && pSeg[i].y1 != pSeg[i].y2) { + ExaCheckPolySegment(pDrawable, pGC, nseg, pSeg); + return; + } + } + + prect = ALLOCATE_LOCAL(sizeof(xRectangle) * nseg); + for (i = 0; i < nseg; i++) { + if (pSeg[i].x1 < pSeg[i].x2) { + prect[i].x = pSeg[i].x1; + prect[i].width = pSeg[i].x2 - pSeg[i].x1 + 1; + } else { + prect[i].x = pSeg[i].x2; + prect[i].width = pSeg[i].x1 - pSeg[i].x2 + 1; + } + if (pSeg[i].y1 < pSeg[i].y2) { + prect[i].y = pSeg[i].y1; + prect[i].height = pSeg[i].y2 - pSeg[i].y1 + 1; + } else { + prect[i].y = pSeg[i].y2; + prect[i].height = pSeg[i].y1 - pSeg[i].y2 + 1; + } + } + pGC->ops->PolyFillRect(pDrawable, pGC, nseg, prect); + DEALLOCATE_LOCAL(prect); +} + +static Bool exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, + Pixel pixel, CARD32 planemask, CARD32 alu); + +static void +exaPolyFillRect(DrawablePtr pDrawable, + GCPtr pGC, + int nrect, + xRectangle *prect) +{ + ExaScreenPriv (pDrawable->pScreen); + RegionPtr pClip = fbGetCompositeClip(pGC); + PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); + register BoxPtr pbox; + BoxPtr pextent; + int extentX1, extentX2, extentY1, extentY2; + int fullX1, fullX2, fullY1, fullY2; + int partX1, partX2, partY1, partY2; + int xoff, yoff; + int xorg, yorg; + int n; + ExaMigrationRec pixmaps[2]; + RegionPtr pReg = RECTS_TO_REGION(pScreen, nrect, prect, CT_UNSORTED); + + /* Compute intersection of rects and clip region */ + REGION_TRANSLATE(pScreen, pReg, pDrawable->x, pDrawable->y); + REGION_INTERSECT(pScreen, pReg, pClip, pReg); + + if (!REGION_NUM_RECTS(pReg)) { + goto out; + } + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pPixmap; + + exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff); + + if (pExaScr->swappedOut || + pPixmap->drawable.width > pExaScr->info->maxX || + pPixmap->drawable.height > pExaScr->info->maxY) + { + goto fallback; + } + + /* For ROPs where overlaps don't matter, convert rectangles to region and + * call exaFillRegion{Solid,Tiled}. + */ + if ((pGC->fillStyle == FillSolid || pGC->fillStyle == FillTiled) && + (pGC->alu == GXcopy || pGC->alu == GXclear || pGC->alu == GXnoop || + pGC->alu == GXcopyInverted || pGC->alu == GXset)) { + if (((pGC->fillStyle == FillSolid || pGC->tileIsPixel) && + exaFillRegionSolid(pDrawable, pReg, pGC->fillStyle == FillSolid ? + pGC->fgPixel : pGC->tile.pixel, pGC->planemask, + pGC->alu)) || + (pGC->fillStyle == FillTiled && !pGC->tileIsPixel && + exaFillRegionTiled(pDrawable, pReg, pGC->tile.pixmap, &pGC->patOrg, + pGC->planemask, pGC->alu))) { + goto out; + } + } + + if (pGC->fillStyle != FillSolid && + !(pGC->tileIsPixel && pGC->fillStyle == FillTiled)) + { + goto fallback; + } + + exaDoMigration (pixmaps, 1, TRUE); + + if (!exaPixmapIsOffscreen (pPixmap) || + !(*pExaScr->info->PrepareSolid) (pPixmap, + pGC->alu, + pGC->planemask, + pGC->fgPixel)) + { +fallback: + if (pGC->fillStyle == FillTiled && !pGC->tileIsPixel) { + pixmaps[1].as_dst = FALSE; + pixmaps[1].as_src = TRUE; + pixmaps[1].pPix = pGC->tile.pixmap; + exaDoMigration (pixmaps, 2, FALSE); + } else { + exaDoMigration (pixmaps, 1, FALSE); + } + + ExaCheckPolyFillRect (pDrawable, pGC, nrect, prect); + goto out; + } + + xorg = pDrawable->x; + yorg = pDrawable->y; + + pextent = REGION_EXTENTS(pGC->pScreen, pClip); + extentX1 = pextent->x1; + extentY1 = pextent->y1; + extentX2 = pextent->x2; + extentY2 = pextent->y2; + while (nrect--) + { + fullX1 = prect->x + xorg; + fullY1 = prect->y + yorg; + fullX2 = fullX1 + (int) prect->width; + fullY2 = fullY1 + (int) prect->height; + prect++; + + if (fullX1 < extentX1) + fullX1 = extentX1; + + if (fullY1 < extentY1) + fullY1 = extentY1; + + if (fullX2 > extentX2) + fullX2 = extentX2; + + if (fullY2 > extentY2) + fullY2 = extentY2; + + if ((fullX1 >= fullX2) || (fullY1 >= fullY2)) + continue; + n = REGION_NUM_RECTS (pClip); + if (n == 1) + { + (*pExaScr->info->Solid) (pPixmap, + fullX1 + xoff, fullY1 + yoff, + fullX2 + xoff, fullY2 + yoff); + } + else + { + pbox = REGION_RECTS(pClip); + /* + * clip the rectangle to each box in the clip region + * this is logically equivalent to calling Intersect(), + * but rectangles may overlap each other here. + */ + while(n--) + { + partX1 = pbox->x1; + if (partX1 < fullX1) + partX1 = fullX1; + partY1 = pbox->y1; + if (partY1 < fullY1) + partY1 = fullY1; + partX2 = pbox->x2; + if (partX2 > fullX2) + partX2 = fullX2; + partY2 = pbox->y2; + if (partY2 > fullY2) + partY2 = fullY2; + + pbox++; + + if (partX1 < partX2 && partY1 < partY2) { + (*pExaScr->info->Solid) (pPixmap, + partX1 + xoff, partY1 + yoff, + partX2 + xoff, partY2 + yoff); + } + } + } + } + (*pExaScr->info->DoneSolid) (pPixmap); + exaMarkSync(pDrawable->pScreen); + +out: + REGION_DESTROY(pScreen, pReg); +} + +static void +exaSolidBoxClipped (DrawablePtr pDrawable, + RegionPtr pClip, + FbBits pm, + FbBits fg, + int x1, + int y1, + int x2, + int y2) +{ + ExaScreenPriv (pDrawable->pScreen); + PixmapPtr pPixmap; + BoxPtr pbox; + int nbox; + int xoff, yoff; + int partX1, partX2, partY1, partY2; + ExaMigrationRec pixmaps[1]; + Bool fallback = FALSE; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable); + + if (pExaScr->swappedOut || + pPixmap->drawable.width > pExaScr->info->maxX || + pPixmap->drawable.height > pExaScr->info->maxY) + { + fallback = TRUE; + } else { + exaDoMigration (pixmaps, 1, TRUE); + } + + exaGetDrawableDeltas (pDrawable, pPixmap, &xoff, &yoff); + + if (fallback || !exaPixmapIsOffscreen(pPixmap) || + !(*pExaScr->info->PrepareSolid) (pPixmap, GXcopy, pm, fg)) + { + EXA_FALLBACK(("to %p (%c)\n", pDrawable, + exaDrawableLocation(pDrawable))); + exaDoMigration (pixmaps, 1, FALSE); + fallback = TRUE; + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + fg = fbReplicatePixel (fg, pDrawable->bitsPerPixel); + fbSolidBoxClipped (pDrawable, pClip, x1, y1, x2, y2, + fbAnd (GXcopy, fg, pm), + fbXor (GXcopy, fg, pm)); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + } + for (nbox = REGION_NUM_RECTS(pClip), pbox = REGION_RECTS(pClip); + nbox--; + pbox++) + { + partX1 = pbox->x1; + if (partX1 < x1) + partX1 = x1; + + partX2 = pbox->x2; + if (partX2 > x2) + partX2 = x2; + + if (partX2 <= partX1) + continue; + + partY1 = pbox->y1; + if (partY1 < y1) + partY1 = y1; + + partY2 = pbox->y2; + if (partY2 > y2) + partY2 = y2; + + if (partY2 <= partY1) + continue; + + if (!fallback) { + (*pExaScr->info->Solid) (pPixmap, + partX1 + xoff, partY1 + yoff, + partX2 + xoff, partY2 + yoff); + } + + exaPixmapDirty (pPixmap, partX1 + xoff, partY1 + yoff, partX2 + xoff, + partY2 + yoff); + } + + if (fallback) + return; + + (*pExaScr->info->DoneSolid) (pPixmap); + exaMarkSync(pDrawable->pScreen); +} + +static void +exaImageGlyphBlt (DrawablePtr pDrawable, + GCPtr pGC, + int x, + int y, + unsigned int nglyph, + CharInfoPtr *ppciInit, + pointer pglyphBase) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + CharInfoPtr *ppci; + CharInfoPtr pci; + unsigned char *pglyph; /* pointer bits in glyph */ + int gWidth, gHeight; /* width and height of glyph */ + FbStride gStride; /* stride of glyph */ + Bool opaque; + int n; + int gx, gy; + void (*glyph) (FbBits *, + FbStride, + int, + FbStip *, + FbBits, + int, + int); + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbBits depthMask; + PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); + ExaMigrationRec pixmaps[1]; + int xBack, widthBack, yBack, heightBack; + + for (ppci = ppciInit, n = nglyph, widthBack = 0; n; n--) + widthBack += (*ppci++)->metrics.characterWidth; + + xBack = x; + if (widthBack < 0) + { + xBack += widthBack; + widthBack = -widthBack; + } + yBack = y - FONTASCENT(pGC->font); + heightBack = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); + + if (xBack >= pDrawable->width || yBack >= pDrawable->height || + (xBack + widthBack) <= 0 || (yBack + heightBack) <= 0) + return; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = TRUE; + pixmaps[0].pPix = pPixmap; + + depthMask = FbFullMask(pDrawable->depth); + if ((pGC->planemask & depthMask) != depthMask) + { + exaDoMigration(pixmaps, 1, FALSE); + ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase); + goto damage; + } + glyph = NULL; + switch (pDrawable->bitsPerPixel) { + case 8: glyph = fbGlyph8; break; + case 16: glyph = fbGlyph16; break; + case 24: glyph = fbGlyph24; break; + case 32: glyph = fbGlyph32; break; + } + + x += pDrawable->x; + y += pDrawable->y; + xBack += pDrawable->x; + yBack += pDrawable->y; + + if (TERMINALFONT (pGC->font) && !glyph) + { + opaque = TRUE; + } + else + { + exaSolidBoxClipped (pDrawable, + fbGetCompositeClip(pGC), + pGC->planemask, + pGC->bgPixel, + xBack, + yBack, + xBack + widthBack, + yBack + heightBack); + opaque = FALSE; + } + + EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + exaDoMigration(pixmaps, 1, FALSE); + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC (pGC); + + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + for (ppci = ppciInit; nglyph; nglyph--, x += pci->metrics.characterWidth) + { + pci = *ppci++; + gWidth = GLYPHWIDTHPIXELS(pci); + gHeight = GLYPHHEIGHTPIXELS(pci); + gx = x + pci->metrics.leftSideBearing; + gy = y - pci->metrics.ascent; + + if (!gWidth || !gHeight || (gx + gWidth) <= xBack || + (gy + gHeight) <= yBack || gx >= (xBack + widthBack) || + gy >= (yBack + heightBack)) + continue; + + pglyph = FONTGLYPHBITS(pglyphBase, pci); + + if (glyph && gWidth <= sizeof (FbStip) * 8 && + fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) + { + (*glyph) (dst + (gy + dstYoff) * dstStride, dstStride, dstBpp, + (FbStip *) pglyph, pPriv->fg, gx + dstXoff, gHeight); + } + else + { + RegionPtr pClip = fbGetCompositeClip(pGC); + + gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof (FbStip); + fbPutXYImage (pDrawable, pClip, pPriv->fg, pPriv->bg, pPriv->pm, + GXcopy, opaque, gx, gy, gWidth, gHeight, + (FbStip *) pglyph, gStride, 0); + } + } + exaFinishAccessGC (pGC); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + +damage: + exaGetDrawableDeltas(pDrawable, pPixmap, &dstXoff, &dstYoff); + exaPixmapDirty(pPixmap, xBack + dstXoff, yBack + dstYoff, + xBack + dstXoff + widthBack, yBack + dstYoff + heightBack); +} + +const GCOps exaOps = { + exaFillSpans, + ExaCheckSetSpans, + exaPutImage, + exaCopyArea, + ExaCheckCopyPlane, + exaPolyPoint, + exaPolylines, + exaPolySegment, + miPolyRectangle, + ExaCheckPolyArc, + miFillPolygon, + exaPolyFillRect, + miPolyFillArc, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + exaImageGlyphBlt, + ExaCheckPolyGlyphBlt, + ExaCheckPushPixels, +}; + +void +exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + RegionRec rgnDst; + int dx, dy; + PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin); + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); + + REGION_INIT (pWin->drawable.pScreen, &rgnDst, NullBox, 0); + + REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, &pWin->borderClip, prgnSrc); +#ifdef COMPOSITE + if (pPixmap->screen_x || pPixmap->screen_y) + REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst, + -pPixmap->screen_x, -pPixmap->screen_y); +#endif + + fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable, + NULL, + &rgnDst, dx, dy, exaCopyNtoN, 0, NULL); + + REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); +} + +static Bool +exaFillRegionSolid (DrawablePtr pDrawable, + RegionPtr pRegion, + Pixel pixel, + CARD32 planemask, + CARD32 alu) +{ + ExaScreenPriv(pDrawable->pScreen); + PixmapPtr pPixmap; + int xoff, yoff; + ExaMigrationRec pixmaps[1]; + int nbox = REGION_NUM_RECTS (pRegion); + BoxPtr pBox = REGION_RECTS (pRegion); + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable); + + if (pPixmap->drawable.width > pExaScr->info->maxX || + pPixmap->drawable.height > pExaScr->info->maxY) + { + goto fallback; + } else { + exaDoMigration (pixmaps, 1, TRUE); + } + + if ((pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) && + (*pExaScr->info->PrepareSolid) (pPixmap, alu, planemask, pixel)) + { + while (nbox--) + { + (*pExaScr->info->Solid) (pPixmap, + pBox->x1 + xoff, pBox->y1 + yoff, + pBox->x2 + xoff, pBox->y2 + yoff); + pBox++; + } + (*pExaScr->info->DoneSolid) (pPixmap); + exaMarkSync(pDrawable->pScreen); + } + else + { +fallback: + if (alu != GXcopy || planemask != FB_ALLONES) + return FALSE; + EXA_FALLBACK(("to %p (%c)\n", pDrawable, + exaDrawableLocation(pDrawable))); + exaDoMigration (pixmaps, 1, FALSE); + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + fbFillRegionSolid (pDrawable, pRegion, 0, + fbReplicatePixel (pixel, pDrawable->bitsPerPixel)); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + } + + return TRUE; +} + +/* Try to do an accelerated tile of the pTile into pRegion of pDrawable. + * Based on fbFillRegionTiled(), fbTile(). + */ +Bool +exaFillRegionTiled (DrawablePtr pDrawable, + RegionPtr pRegion, + PixmapPtr pTile, + DDXPointPtr pPatOrg, + CARD32 planemask, + CARD32 alu) +{ + ExaScreenPriv(pDrawable->pScreen); + PixmapPtr pPixmap; + int xoff, yoff, tileXoff, tileYoff; + int tileWidth, tileHeight; + ExaMigrationRec pixmaps[2]; + int nbox = REGION_NUM_RECTS (pRegion); + BoxPtr pBox = REGION_RECTS (pRegion); + + tileWidth = pTile->drawable.width; + tileHeight = pTile->drawable.height; + + /* If we're filling with a solid color, grab it out and go to + * FillRegionSolid, saving numerous copies. + */ + if (tileWidth == 1 && tileHeight == 1) + return exaFillRegionSolid(pDrawable, pRegion, + exaGetPixmapFirstPixel (pTile), planemask, + alu); + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable); + pixmaps[1].as_dst = FALSE; + pixmaps[1].as_src = TRUE; + pixmaps[1].pPix = pTile; + + if (pPixmap->drawable.width > pExaScr->info->maxX || + pPixmap->drawable.height > pExaScr->info->maxY || + tileWidth > pExaScr->info->maxX || + tileHeight > pExaScr->info->maxY) + { + goto fallback; + } else { + exaDoMigration (pixmaps, 2, TRUE); + } + + pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff); + + if (!pPixmap) + goto fallback; + + if (!exaPixmapIsOffscreen(pTile)) + goto fallback; + + if ((*pExaScr->info->PrepareCopy) (exaGetOffscreenPixmap((DrawablePtr)pTile, + &tileXoff, &tileYoff), + pPixmap, 0, 0, alu, planemask)) + { + while (nbox--) + { + int height = pBox->y2 - pBox->y1; + int dstY = pBox->y1; + int tileY; + + tileY = (dstY - pDrawable->y - pPatOrg->y) % tileHeight; + while (height > 0) { + int width = pBox->x2 - pBox->x1; + int dstX = pBox->x1; + int tileX; + int h = tileHeight - tileY; + + if (h > height) + h = height; + height -= h; + + tileX = (dstX - pDrawable->x - pPatOrg->x) % tileWidth; + while (width > 0) { + int w = tileWidth - tileX; + if (w > width) + w = width; + width -= w; + + (*pExaScr->info->Copy) (pPixmap, + tileX + tileXoff, tileY + tileYoff, + dstX + xoff, dstY + yoff, + w, h); + dstX += w; + tileX = 0; + } + dstY += h; + tileY = 0; + } + pBox++; + } + (*pExaScr->info->DoneCopy) (pPixmap); + exaMarkSync(pDrawable->pScreen); + return TRUE; + } + +fallback: + if (alu != GXcopy || planemask != FB_ALLONES) + return FALSE; + EXA_FALLBACK(("from %p to %p (%c,%c)\n", pTile, pDrawable, + exaDrawableLocation(&pTile->drawable), + exaDrawableLocation(pDrawable))); + exaDoMigration (pixmaps, 2, FALSE); + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + exaPrepareAccess ((DrawablePtr)pTile, EXA_PREPARE_SRC); + fbFillRegionTiled (pDrawable, pRegion, pTile); + exaFinishAccess ((DrawablePtr)pTile, EXA_PREPARE_SRC); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + + return TRUE; +} + +void +exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) +{ + ExaScreenPriv (pWin->drawable.pScreen); + PixmapPtr pPixmap = exaGetDrawablePixmap((DrawablePtr)pWin); + int xoff, yoff; + BoxPtr pBox; + int nbox = REGION_NUM_RECTS(pRegion); + + if (!nbox) + return; + + if (!pExaScr->swappedOut) { + DDXPointRec zeros = { 0, 0 }; + + switch (what) { + case PW_BACKGROUND: + switch (pWin->backgroundState) { + case None: + return; + case ParentRelative: + do { + pWin = pWin->parent; + } while (pWin->backgroundState == ParentRelative); + (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, + what); + return; + case BackgroundPixel: + exaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->background.pixel, + FB_ALLONES, GXcopy); + goto damage; + case BackgroundPixmap: + exaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->background.pixmap, + &zeros, FB_ALLONES, GXcopy); + goto damage; + } + break; + case PW_BORDER: + if (pWin->borderIsPixel) { + exaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->border.pixel, + FB_ALLONES, GXcopy); + goto damage; + } else { + exaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->border.pixmap, + &zeros, FB_ALLONES, GXcopy); + goto damage; + } + break; + } + } + ExaCheckPaintWindow (pWin, pRegion, what); + +damage: + exaGetDrawableDeltas((DrawablePtr)pWin, pPixmap, &xoff, &yoff); + + pBox = REGION_RECTS(pRegion); + + while (nbox--) + { + exaPixmapDirty (pPixmap, pBox->x1 + xoff, pBox->y1 + yoff, + pBox->x2 + xoff, pBox->y2 + yoff); + pBox++; + } +} + +/** + * Accelerates GetImage for solid ZPixmap downloads from framebuffer memory. + * + * This is probably the only case we actually care about. The rest fall through + * to migration and ExaCheckGetImage, which hopefully will result in migration + * pushing the pixmap out of framebuffer. + */ +void +exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h, + unsigned int format, unsigned long planeMask, char *d) +{ + ExaScreenPriv (pDrawable->pScreen); + ExaMigrationRec pixmaps[1]; + PixmapPtr pPix; + int xoff, yoff; + Bool ok; + + if (pExaScr->swappedOut || (w == 1 && h == 1)) + goto fallback; + + if (pExaScr->info->DownloadFromScreen == NULL) + goto migrate_and_fallback; + + /* Only cover the ZPixmap, solid copy case. */ + if (format != ZPixmap || !EXA_PM_IS_SOLID(pDrawable, planeMask)) + goto migrate_and_fallback; + + /* Only try to handle the 8bpp and up cases, since we don't want to think + * about <8bpp. + */ + if (pDrawable->bitsPerPixel < 8) + goto migrate_and_fallback; + + pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff); + if (pPix == NULL) + goto fallback; + + xoff += pDrawable->x; + yoff += pDrawable->y; + + ok = pExaScr->info->DownloadFromScreen(pPix, x + xoff, y + yoff, w, h, d, + PixmapBytePad(w, pDrawable->depth)); + if (ok) { + exaWaitSync(pDrawable->pScreen); + return; + } + +migrate_and_fallback: + pixmaps[0].as_dst = FALSE; + pixmaps[0].as_src = TRUE; + pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable); + exaDoMigration (pixmaps, 1, FALSE); +fallback: + ExaCheckGetImage (pDrawable, x, y, w, h, format, planeMask, d); +} + +/** + * GetSpans isn't accelerated yet, but performs migration so that we'll + * hopefully avoid the read-from-framebuffer cost. + */ +void +exaGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth, + int nspans, char *pdstStart) +{ + ExaMigrationRec pixmaps[1]; + + pixmaps[0].as_dst = FALSE; + pixmaps[0].as_src = TRUE; + pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable); + exaDoMigration (pixmaps, 1, FALSE); + + ExaCheckGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart); +} diff --git a/xorg-server-1.4/exa/exa_migration.c b/xorg-server-1.4/exa/exa_migration.c new file mode 100644 index 0000000..70d8e12 --- /dev/null +++ b/xorg-server-1.4/exa/exa_migration.c @@ -0,0 +1,638 @@ +/* + * Copyright © 2006 Intel Corporation + * + * 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 (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 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. + * + * Authors: + * Eric Anholt + * Michel Dänzer + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "exa_priv.h" +#include +#include "dixfontstr.h" +#include "exa.h" +#include "cw.h" + +#if DEBUG_MIGRATE +#define DBG_MIGRATE(a) ErrorF a +#else +#define DBG_MIGRATE(a) +#endif + +/** + * Returns TRUE if the pixmap is not movable. This is the case where it's a + * fake pixmap for the frontbuffer (no pixmap private) or it's a scratch + * pixmap created by some other X Server internals (the score says it's + * pinned). + */ +static Bool +exaPixmapIsPinned (PixmapPtr pPix) +{ + ExaPixmapPriv (pPix); + + return pExaPixmap == NULL || pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED; +} + +/** + * The fallback path for UTS/DFS failing is to just memcpy. exaCopyDirtyToSys + * and exaCopyDirtyToFb both needed to do this loop. + */ +static void +exaMemcpyBox (PixmapPtr pPixmap, BoxPtr pbox, CARD8 *src, int src_pitch, + CARD8 *dst, int dst_pitch) + { + int i, cpp = pPixmap->drawable.bitsPerPixel / 8; + int bytes = (pbox->x2 - pbox->x1) * cpp; + + src += pbox->y1 * src_pitch + pbox->x1 * cpp; + dst += pbox->y1 * dst_pitch + pbox->x1 * cpp; + + for (i = pbox->y2 - pbox->y1; i; i--) { + memcpy (dst, src, bytes); + src += src_pitch; + dst += dst_pitch; + } +} + +/** + * Returns TRUE if the pixmap is dirty (has been modified in its current + * location compared to the other), or lacks a private for tracking + * dirtiness. + */ +static Bool +exaPixmapIsDirty (PixmapPtr pPix) +{ + ExaPixmapPriv (pPix); + + return pExaPixmap == NULL || + REGION_NOTEMPTY (pScreen, DamageRegion(pExaPixmap->pDamage)); +} + +/** + * Returns TRUE if the pixmap is either pinned in FB, or has a sufficient score + * to be considered "should be in framebuffer". That's just anything that has + * had more acceleration than fallbacks, or has no score yet. + * + * Only valid if using a migration scheme that tracks score. + */ +static Bool +exaPixmapShouldBeInFB (PixmapPtr pPix) +{ + ExaPixmapPriv (pPix); + + if (exaPixmapIsPinned (pPix)) + return TRUE; + + return pExaPixmap->score >= 0; +} + +/** + * If the pixmap is currently dirty, this copies at least the dirty area from + * the framebuffer memory copy to the system memory copy. Both areas must be + * allocated. + */ +static void +exaCopyDirtyToSys (PixmapPtr pPixmap) +{ + ExaScreenPriv (pPixmap->drawable.pScreen); + ExaPixmapPriv (pPixmap); + RegionPtr pRegion = DamageRegion (pExaPixmap->pDamage); + CARD8 *save_ptr; + int save_pitch; + BoxPtr pBox = REGION_RECTS(pRegion); + int nbox = REGION_NUM_RECTS(pRegion); + Bool do_sync = FALSE; + + save_ptr = pPixmap->devPrivate.ptr; + save_pitch = pPixmap->devKind; + pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr; + pPixmap->devKind = pExaPixmap->fb_pitch; + + while (nbox--) { + pBox->x1 = max(pBox->x1, 0); + pBox->y1 = max(pBox->y1, 0); + pBox->x2 = min(pBox->x2, pPixmap->drawable.width); + pBox->y2 = min(pBox->y2, pPixmap->drawable.height); + + if (pBox->x1 >= pBox->x2 || pBox->y1 >= pBox->y2) + continue; + + if (pExaScr->info->DownloadFromScreen == NULL || + !pExaScr->info->DownloadFromScreen (pPixmap, + pBox->x1, pBox->y1, + pBox->x2 - pBox->x1, + pBox->y2 - pBox->y1, + pExaPixmap->sys_ptr + + pBox->y1 * pExaPixmap->sys_pitch + + pBox->x1 * pPixmap->drawable.bitsPerPixel / 8, + pExaPixmap->sys_pitch)) + { + exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_SRC); + exaMemcpyBox (pPixmap, pBox, + pExaPixmap->fb_ptr, pExaPixmap->fb_pitch, + pExaPixmap->sys_ptr, pExaPixmap->sys_pitch); + exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC); + } + else + do_sync = TRUE; + + pBox++; + } + + /* Make sure the bits have actually landed, since we don't necessarily sync + * when accessing pixmaps in system memory. + */ + if (do_sync) + exaWaitSync (pPixmap->drawable.pScreen); + + pPixmap->devPrivate.ptr = save_ptr; + pPixmap->devKind = save_pitch; + + /* The previously damaged bits are now no longer damaged but valid */ + REGION_UNION(pPixmap->drawable.pScreen, + &pExaPixmap->validReg, &pExaPixmap->validReg, pRegion); + DamageEmpty (pExaPixmap->pDamage); +} + +/** + * If the pixmap is currently dirty, this copies at least the dirty area from + * the system memory copy to the framebuffer memory copy. Both areas must be + * allocated. + */ +static void +exaCopyDirtyToFb (PixmapPtr pPixmap) +{ + ExaScreenPriv (pPixmap->drawable.pScreen); + ExaPixmapPriv (pPixmap); + RegionPtr pRegion = DamageRegion (pExaPixmap->pDamage); + CARD8 *save_ptr; + int save_pitch; + BoxPtr pBox = REGION_RECTS(pRegion); + int nbox = REGION_NUM_RECTS(pRegion); + Bool do_sync = FALSE; + + save_ptr = pPixmap->devPrivate.ptr; + save_pitch = pPixmap->devKind; + pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr; + pPixmap->devKind = pExaPixmap->fb_pitch; + + while (nbox--) { + pBox->x1 = max(pBox->x1, 0); + pBox->y1 = max(pBox->y1, 0); + pBox->x2 = min(pBox->x2, pPixmap->drawable.width); + pBox->y2 = min(pBox->y2, pPixmap->drawable.height); + + if (pBox->x1 >= pBox->x2 || pBox->y1 >= pBox->y2) + continue; + + if (pExaScr->info->UploadToScreen == NULL || + !pExaScr->info->UploadToScreen (pPixmap, + pBox->x1, pBox->y1, + pBox->x2 - pBox->x1, + pBox->y2 - pBox->y1, + pExaPixmap->sys_ptr + + pBox->y1 * pExaPixmap->sys_pitch + + pBox->x1 * pPixmap->drawable.bitsPerPixel / 8, + pExaPixmap->sys_pitch)) + { + exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_DEST); + exaMemcpyBox (pPixmap, pBox, + pExaPixmap->sys_ptr, pExaPixmap->sys_pitch, + pExaPixmap->fb_ptr, pExaPixmap->fb_pitch); + exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_DEST); + } + else + do_sync = TRUE; + + pBox++; + } + + if (do_sync) + exaMarkSync (pPixmap->drawable.pScreen); + + pPixmap->devPrivate.ptr = save_ptr; + pPixmap->devKind = save_pitch; + + /* The previously damaged bits are now no longer damaged but valid */ + REGION_UNION(pPixmap->drawable.pScreen, + &pExaPixmap->validReg, &pExaPixmap->validReg, pRegion); + DamageEmpty (pExaPixmap->pDamage); +} + +/** + * Copies out important pixmap data and removes references to framebuffer area. + * Called when the memory manager decides it's time to kick the pixmap out of + * framebuffer entirely. + */ +void +exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area) +{ + PixmapPtr pPixmap = area->privData; + ExaPixmapPriv(pPixmap); + RegionPtr pDamageReg = DamageRegion(pExaPixmap->pDamage); + + DBG_MIGRATE (("Save %p (%p) (%dx%d) (%c)\n", pPixmap, + (void*)(ExaGetPixmapPriv(pPixmap)->area ? + ExaGetPixmapPriv(pPixmap)->area->offset : 0), + pPixmap->drawable.width, + pPixmap->drawable.height, + exaPixmapIsDirty(pPixmap) ? 'd' : 'c')); + + if (exaPixmapIsOffscreen(pPixmap)) { + exaCopyDirtyToSys (pPixmap); + pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; + pPixmap->devKind = pExaPixmap->sys_pitch; + pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + } + + pExaPixmap->fb_ptr = NULL; + pExaPixmap->area = NULL; + + /* Mark all valid bits as damaged, so they'll get copied to FB next time */ + REGION_UNION(pPixmap->drawable.pScreen, pDamageReg, pDamageReg, + &pExaPixmap->validReg); +} + +/** + * Allocates a framebuffer copy of the pixmap if necessary, and then copies + * any necessary pixmap data into the framebuffer copy and points the pixmap at + * it. + * + * Note that when first allocated, a pixmap will have FALSE dirty flag. + * This is intentional because pixmap data starts out undefined. So if we move + * it in due to the first operation against it being accelerated, it will have + * undefined framebuffer contents that we didn't have to upload. If we do + * moveouts (and moveins) after the first movein, then we will only have to copy + * back and forth if the pixmap was written to after the last synchronization of + * the two copies. Then, at exaPixmapSave (when the framebuffer copy goes away) + * we mark the pixmap dirty, so that the next exaMoveInPixmap will actually move + * all the data, since it's almost surely all valid now. + */ +void +exaMoveInPixmap (PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPriv (pScreen); + ExaPixmapPriv (pPixmap); + + /* If we're VT-switched away, no touching card memory allowed. */ + if (pExaScr->swappedOut) + return; + + /* If we're already in FB, our work is done. */ + if (exaPixmapIsOffscreen(pPixmap)) + return; + + /* If we're not allowed to move, then fail. */ + if (exaPixmapIsPinned(pPixmap)) + return; + + /* Don't migrate in pixmaps which are less than 8bpp. This avoids a lot of + * fragility in EXA, and <8bpp is probably not used enough any more to care + * (at least, not in acceleratd paths). + */ + if (pPixmap->drawable.bitsPerPixel < 8) + return; + + if (pExaPixmap->area == NULL) { + pExaPixmap->area = + exaOffscreenAlloc (pScreen, pExaPixmap->fb_size, + pExaScr->info->pixmapOffsetAlign, FALSE, + exaPixmapSave, (pointer) pPixmap); + if (pExaPixmap->area == NULL) + return; + + pExaPixmap->fb_ptr = (CARD8 *) pExaScr->info->memoryBase + + pExaPixmap->area->offset; + } + + DBG_MIGRATE (("-> %p (0x%x) (%dx%d) (%c)\n", pPixmap, + (ExaGetPixmapPriv(pPixmap)->area ? + ExaGetPixmapPriv(pPixmap)->area->offset : 0), + pPixmap->drawable.width, + pPixmap->drawable.height, + exaPixmapIsDirty(pPixmap) ? 'd' : 'c')); + + exaCopyDirtyToFb (pPixmap); + + if (pExaScr->hideOffscreenPixmapData) + pPixmap->devPrivate.ptr = NULL; + else + pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr; + pPixmap->devKind = pExaPixmap->fb_pitch; + pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; +} + +/** + * Switches the current active location of the pixmap to system memory, copying + * updated data out if necessary. + */ +void +exaMoveOutPixmap (PixmapPtr pPixmap) +{ + ExaPixmapPriv (pPixmap); + + if (exaPixmapIsPinned(pPixmap)) + return; + + if (exaPixmapIsOffscreen(pPixmap)) { + + DBG_MIGRATE (("<- %p (%p) (%dx%d) (%c)\n", pPixmap, + (void*)(ExaGetPixmapPriv(pPixmap)->area ? + ExaGetPixmapPriv(pPixmap)->area->offset : 0), + pPixmap->drawable.width, + pPixmap->drawable.height, + exaPixmapIsDirty(pPixmap) ? 'd' : 'c')); + + exaCopyDirtyToSys (pPixmap); + + pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; + pPixmap->devKind = pExaPixmap->sys_pitch; + pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + } +} + +/** + * For the "greedy" migration scheme, pushes the pixmap toward being located in + * framebuffer memory. + */ +static void +exaMigrateTowardFb (PixmapPtr pPixmap) +{ + ExaPixmapPriv (pPixmap); + + if (pExaPixmap == NULL) { + DBG_MIGRATE(("UseScreen: ignoring exa-uncontrolled pixmap %p (%s)\n", + (pointer)pPixmap, + exaPixmapIsOffscreen(pPixmap) ? "s" : "m")); + return; + } + + if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED) { + DBG_MIGRATE(("UseScreen: not migrating pinned pixmap %p\n", + (pointer)pPixmap)); + return; + } + + DBG_MIGRATE(("UseScreen %p score %d\n", + (pointer)pPixmap, pExaPixmap->score)); + + if (pExaPixmap->score == EXA_PIXMAP_SCORE_INIT) { + exaMoveInPixmap(pPixmap); + pExaPixmap->score = 0; + } + + if (pExaPixmap->score < EXA_PIXMAP_SCORE_MAX) + pExaPixmap->score++; + + if (pExaPixmap->score >= EXA_PIXMAP_SCORE_MOVE_IN && + !exaPixmapIsOffscreen(pPixmap)) + { + exaMoveInPixmap (pPixmap); + } + + ExaOffscreenMarkUsed (pPixmap); +} + +/** + * For the "greedy" migration scheme, pushes the pixmap toward being located in + * system memory. + */ +static void +exaMigrateTowardSys (PixmapPtr pPixmap) +{ + ExaPixmapPriv (pPixmap); + + if (pExaPixmap == NULL) { + DBG_MIGRATE(("UseMem: ignoring exa-uncontrolled pixmap %p (%s)\n", + (pointer)pPixmap, + exaPixmapIsOffscreen(pPixmap) ? "s" : "m")); + return; + } + + DBG_MIGRATE(("UseMem: %p score %d\n", (pointer)pPixmap, pExaPixmap->score)); + + if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED) + return; + + if (pExaPixmap->score == EXA_PIXMAP_SCORE_INIT) + pExaPixmap->score = 0; + + if (pExaPixmap->score > EXA_PIXMAP_SCORE_MIN) + pExaPixmap->score--; + + if (pExaPixmap->score <= EXA_PIXMAP_SCORE_MOVE_OUT && pExaPixmap->area) + exaMoveOutPixmap (pPixmap); +} + +/** + * If the pixmap has both a framebuffer and system memory copy, this function + * asserts that both of them are the same. + */ +static Bool +exaAssertNotDirty (PixmapPtr pPixmap) +{ + ExaPixmapPriv (pPixmap); + CARD8 *dst, *src; + RegionPtr pValidReg = &pExaPixmap->validReg; + int dst_pitch, src_pitch, cpp, y, nbox = REGION_NUM_RECTS(pValidReg); + BoxPtr pBox = REGION_RECTS(pValidReg); + Bool ret = TRUE; + + if (!nbox || exaPixmapIsPinned(pPixmap) || pExaPixmap->fb_ptr == NULL) + return ret; + + dst_pitch = pExaPixmap->sys_pitch; + src_pitch = pExaPixmap->fb_pitch; + cpp = pPixmap->drawable.bitsPerPixel / 8; + + exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_SRC); + while (nbox--) { + int rowbytes; + + pBox->x1 = max(pBox->x1, 0); + pBox->y1 = max(pBox->y1, 0); + pBox->x2 = min(pBox->x2, pPixmap->drawable.width); + pBox->y2 = min(pBox->y2, pPixmap->drawable.height); + + if (pBox->x1 >= pBox->x2 || pBox->y1 >= pBox->y2) + continue; + + rowbytes = (pBox->x2 - pBox->x1) * cpp; + src = pExaPixmap->fb_ptr + pBox->y1 * src_pitch + pBox->x1 * cpp; + dst = pExaPixmap->sys_ptr + pBox->y1 * dst_pitch + pBox->x1 * cpp; + + for (y = pBox->y1; y < pBox->y2; + y++, src += src_pitch, dst += dst_pitch) { + if (memcmp(dst, src, rowbytes) != 0) { + ret = FALSE; + exaPixmapDirty(pPixmap, pBox->x1, pBox->y1, pBox->x2, + pBox->y2); + break; + } + } + } + exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC); + + return ret; +} + +/** + * Performs migration of the pixmaps according to the operation information + * provided in pixmaps and can_accel and the migration scheme chosen in the + * config file. + */ +void +exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel) +{ + ScreenPtr pScreen = pixmaps[0].pPix->drawable.pScreen; + ExaScreenPriv(pScreen); + int i, j; + + /* If this debugging flag is set, check each pixmap for whether it is marked + * as clean, and if so, actually check if that's the case. This should help + * catch issues with failing to mark a drawable as dirty. While it will + * catch them late (after the operation happened), it at least explains what + * went wrong, and instrumenting the code to find what operation happened + * to the pixmap last shouldn't be hard. + */ + if (pExaScr->checkDirtyCorrectness) { + for (i = 0; i < npixmaps; i++) { + if (!exaPixmapIsDirty (pixmaps[i].pPix) && + !exaAssertNotDirty (pixmaps[i].pPix)) + ErrorF("%s: Pixmap %d dirty but not marked as such!\n", __func__, i); + } + } + /* If anything is pinned in system memory, we won't be able to + * accelerate. + */ + for (i = 0; i < npixmaps; i++) { + if (exaPixmapIsPinned (pixmaps[i].pPix) && + !exaPixmapIsOffscreen (pixmaps[i].pPix)) + { + EXA_FALLBACK(("Pixmap %p (%dx%d) pinned in sys\n", pixmaps[i].pPix, + pixmaps[i].pPix->drawable.width, + pixmaps[i].pPix->drawable.height)); + can_accel = FALSE; + break; + } + } + + if (pExaScr->migration == ExaMigrationSmart) { + /* If we've got something as a destination that we shouldn't cause to + * become newly dirtied, take the unaccelerated route. + */ + for (i = 0; i < npixmaps; i++) { + if (pixmaps[i].as_dst && !exaPixmapShouldBeInFB (pixmaps[i].pPix) && + !exaPixmapIsDirty (pixmaps[i].pPix)) + { + for (i = 0; i < npixmaps; i++) { + if (!exaPixmapIsDirty (pixmaps[i].pPix)) + exaMoveOutPixmap (pixmaps[i].pPix); + } + return; + } + } + + /* If we aren't going to accelerate, then we migrate everybody toward + * system memory, and kick out if it's free. + */ + if (!can_accel) { + for (i = 0; i < npixmaps; i++) { + exaMigrateTowardSys (pixmaps[i].pPix); + if (!exaPixmapIsDirty (pixmaps[i].pPix)) + exaMoveOutPixmap (pixmaps[i].pPix); + } + return; + } + + /* Finally, the acceleration path. Move them all in. */ + for (i = 0; i < npixmaps; i++) { + exaMigrateTowardFb(pixmaps[i].pPix); + exaMoveInPixmap(pixmaps[i].pPix); + } + } else if (pExaScr->migration == ExaMigrationGreedy) { + /* If we can't accelerate, either because the driver can't or because one of + * the pixmaps is pinned in system memory, then we migrate everybody toward + * system memory. + * + * We also migrate toward system if all pixmaps involved are currently in + * system memory -- this can mitigate thrashing when there are significantly + * more pixmaps active than would fit in memory. + * + * If not, then we migrate toward FB so that hopefully acceleration can + * happen. + */ + if (!can_accel) { + for (i = 0; i < npixmaps; i++) + exaMigrateTowardSys (pixmaps[i].pPix); + return; + } + + for (i = 0; i < npixmaps; i++) { + if (exaPixmapIsOffscreen(pixmaps[i].pPix)) { + /* Found one in FB, so move all to FB. */ + for (j = 0; j < npixmaps; j++) + exaMigrateTowardFb(pixmaps[j].pPix); + return; + } + } + + /* Nobody's in FB, so move all away from FB. */ + for (i = 0; i < npixmaps; i++) + exaMigrateTowardSys(pixmaps[i].pPix); + } else if (pExaScr->migration == ExaMigrationAlways) { + /* Always move the pixmaps out if we can't accelerate. If we can + * accelerate, try to move them all in. If that fails, then move them + * back out. + */ + if (!can_accel) { + for (i = 0; i < npixmaps; i++) + exaMoveOutPixmap(pixmaps[i].pPix); + return; + } + + /* Now, try to move them all into FB */ + for (i = 0; i < npixmaps; i++) { + exaMoveInPixmap(pixmaps[i].pPix); + ExaOffscreenMarkUsed (pixmaps[i].pPix); + } + + /* If we couldn't fit everything in, then kick back out */ + for (i = 0; i < npixmaps; i++) { + if (!exaPixmapIsOffscreen(pixmaps[i].pPix)) { + EXA_FALLBACK(("Pixmap %p (%dx%d) not in fb\n", pixmaps[i].pPix, + pixmaps[i].pPix->drawable.width, + pixmaps[i].pPix->drawable.height)); + for (j = 0; j < npixmaps; j++) + exaMoveOutPixmap(pixmaps[j].pPix); + break; + } + } + } +} diff --git a/xorg-server-1.4/exa/exa_offscreen.c b/xorg-server-1.4/exa/exa_offscreen.c new file mode 100644 index 0000000..c666b00 --- /dev/null +++ b/xorg-server-1.4/exa/exa_offscreen.c @@ -0,0 +1,497 @@ +/* + * Copyright © 2003 Anders Carlsson + * + * 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 Anders Carlsson not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Anders Carlsson makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * ANDERS CARLSSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL ANDERS CARLSSON 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. + */ + +/** @file + * This allocator allocates blocks of memory by maintaining a list of areas + * and a score for each area. As an area is marked used, its score is + * incremented, and periodically all of the areas have their scores decayed by + * a fraction. When allocating, the contiguous block of areas with the minimum + * score is found and evicted in order to make room for the new allocation. + */ + +#include "exa_priv.h" + +#include +#include +#include + +#if DEBUG_OFFSCREEN +#define DBG_OFFSCREEN(a) ErrorF a +#else +#define DBG_OFFSCREEN(a) +#endif + +#if DEBUG_OFFSCREEN +static void +ExaOffscreenValidate (ScreenPtr pScreen) +{ + ExaScreenPriv (pScreen); + ExaOffscreenArea *prev = 0, *area; + + assert (pExaScr->info->offScreenAreas->base_offset == + pExaScr->info->offScreenBase); + for (area = pExaScr->info->offScreenAreas; area; area = area->next) + { + assert (area->offset >= area->base_offset && + area->offset < (area->base_offset + area->size)); + if (prev) + assert (prev->base_offset + prev->size == area->base_offset); + prev = area; + } + assert (prev->base_offset + prev->size == pExaScr->info->memorySize); +} +#else +#define ExaOffscreenValidate(s) +#endif + +static ExaOffscreenArea * +ExaOffscreenKickOut (ScreenPtr pScreen, ExaOffscreenArea *area) +{ + if (area->save) + (*area->save) (pScreen, area); + return exaOffscreenFree (pScreen, area); +} + +/** + * exaOffscreenAlloc allocates offscreen memory + * + * @param pScreen current screen + * @param size size in bytes of the allocation + * @param align byte alignment requirement for the offset of the allocated area + * @param locked whether the allocated area is locked and can't be kicked out + * @param save callback for when the area is evicted from memory + * @param privdata private data for the save callback. + * + * Allocates offscreen memory from the device associated with pScreen. size + * and align deteremine where and how large the allocated area is, and locked + * will mark whether it should be held in card memory. privdata may be any + * pointer for the save callback when the area is removed. + * + * Note that locked areas do get evicted on VT switch unless the driver + * requested version 2.1 or newer behavior. In that case, the save callback is + * still called. + */ +ExaOffscreenArea * +exaOffscreenAlloc (ScreenPtr pScreen, int size, int align, + Bool locked, + ExaOffscreenSaveProc save, + pointer privData) +{ + ExaOffscreenArea *area, *begin, *best; + ExaScreenPriv (pScreen); + int tmp, real_size = 0, best_score; +#if DEBUG_OFFSCREEN + static int number = 0; + ErrorF("================= ============ allocating a new pixmap %d\n", ++number); +#endif + + ExaOffscreenValidate (pScreen); + if (!align) + align = 1; + + if (!size) + { + DBG_OFFSCREEN (("Alloc 0x%x -> EMPTY\n", size)); + return NULL; + } + + /* throw out requests that cannot fit */ + if (size > (pExaScr->info->memorySize - pExaScr->info->offScreenBase)) + { + DBG_OFFSCREEN (("Alloc 0x%x vs (0x%lx) -> TOBIG\n", size, + pExaScr->info->memorySize - + pExaScr->info->offScreenBase)); + return NULL; + } + + /* Try to find a free space that'll fit. */ + for (area = pExaScr->info->offScreenAreas; area; area = area->next) + { + /* skip allocated areas */ + if (area->state != ExaOffscreenAvail) + continue; + + /* adjust size to match alignment requirement */ + real_size = size; + tmp = area->base_offset % align; + if (tmp) + real_size += (align - tmp); + + /* does it fit? */ + if (real_size <= area->size) + break; + } + + if (!area) + { + /* + * Kick out existing users to make space. + * + * First, locate a region which can hold the desired object. + */ + + /* prev points at the first object to boot */ + best = NULL; + best_score = INT_MAX; + for (begin = pExaScr->info->offScreenAreas; begin != NULL; + begin = begin->next) + { + int avail, score; + ExaOffscreenArea *scan; + + if (begin->state == ExaOffscreenLocked) + continue; + + /* adjust size needed to account for alignment loss for this area */ + real_size = size; + tmp = begin->base_offset % align; + if (tmp) + real_size += (align - tmp); + + avail = 0; + score = 0; + /* now see if we can make room here, and how "costly" it'll be. */ + for (scan = begin; scan != NULL; scan = scan->next) + { + if (scan->state == ExaOffscreenLocked) { + /* Can't make room here, start after this locked area. */ + begin = scan; + break; + } + /* Score should only be non-zero for ExaOffscreenRemovable */ + score += scan->score; + avail += scan->size; + if (avail >= real_size) + break; + } + /* Is it the best option we've found so far? */ + if (avail >= real_size && score < best_score) { + best = begin; + best_score = score; + } + } + area = best; + if (!area) + { + DBG_OFFSCREEN (("Alloc 0x%x -> NOSPACE\n", size)); + /* Could not allocate memory */ + ExaOffscreenValidate (pScreen); + return NULL; + } + + /* adjust size needed to account for alignment loss for this area */ + real_size = size; + tmp = area->base_offset % align; + if (tmp) + real_size += (align - tmp); + + /* + * Kick out first area if in use + */ + if (area->state != ExaOffscreenAvail) + area = ExaOffscreenKickOut (pScreen, area); + /* + * Now get the system to merge the other needed areas together + */ + while (area->size < real_size) + { + assert (area->next && area->next->state == ExaOffscreenRemovable); + (void) ExaOffscreenKickOut (pScreen, area->next); + } + } + + /* save extra space in new area */ + if (real_size < area->size) + { + ExaOffscreenArea *new_area = xalloc (sizeof (ExaOffscreenArea)); + if (!new_area) + return NULL; + new_area->base_offset = area->base_offset + real_size; + new_area->offset = new_area->base_offset; + new_area->size = area->size - real_size; + new_area->state = ExaOffscreenAvail; + new_area->save = NULL; + new_area->score = 0; + new_area->next = area->next; + area->next = new_area; + area->size = real_size; + } + /* + * Mark this area as in use + */ + if (locked) + area->state = ExaOffscreenLocked; + else + area->state = ExaOffscreenRemovable; + area->privData = privData; + area->save = save; + area->score = 0; + area->offset = (area->base_offset + align - 1); + area->offset -= area->offset % align; + + ExaOffscreenValidate (pScreen); + + DBG_OFFSCREEN (("Alloc 0x%x -> 0x%x (0x%x)\n", size, + area->base_offset, area->offset)); + return area; +} + +/** + * Ejects all offscreen areas, and uninitializes the offscreen memory manager. + */ +void +ExaOffscreenSwapOut (ScreenPtr pScreen) +{ + ExaScreenPriv (pScreen); + + ExaOffscreenValidate (pScreen); + /* loop until a single free area spans the space */ + for (;;) + { + ExaOffscreenArea *area = pExaScr->info->offScreenAreas; + + if (!area) + break; + if (area->state == ExaOffscreenAvail) + { + area = area->next; + if (!area) + break; + } + assert (area->state != ExaOffscreenAvail); + (void) ExaOffscreenKickOut (pScreen, area); + ExaOffscreenValidate (pScreen); + } + ExaOffscreenValidate (pScreen); + ExaOffscreenFini (pScreen); +} + +/** Ejects all pixmaps managed by EXA. */ +static void +ExaOffscreenEjectPixmaps (ScreenPtr pScreen) +{ + ExaScreenPriv (pScreen); + + ExaOffscreenValidate (pScreen); + /* loop until a single free area spans the space */ + for (;;) + { + ExaOffscreenArea *area; + + for (area = pExaScr->info->offScreenAreas; area != NULL; + area = area->next) + { + if (area->state == ExaOffscreenRemovable && + area->save == exaPixmapSave) + { + (void) ExaOffscreenKickOut (pScreen, area); + ExaOffscreenValidate (pScreen); + break; + } + } + if (area == NULL) + break; + } + ExaOffscreenValidate (pScreen); +} + +void +ExaOffscreenSwapIn (ScreenPtr pScreen) +{ + exaOffscreenInit (pScreen); +} + +/** + * Prepares EXA for disabling of FB access, or restoring it. + * + * In version 2.1, the disabling results in pixmaps being ejected, while other + * allocations remain. With this plus the prevention of migration while + * swappedOut is set, EXA by itself should not cause any access of the + * framebuffer to occur while swapped out. Any remaining issues are the + * responsibility of the driver. + * + * Prior to version 2.1, all allocations, including locked ones, are ejected + * when access is disabled, and the allocator is torn down while swappedOut + * is set. This is more drastic, and caused implementation difficulties for + * many drivers that could otherwise handle the lack of FB access while + * swapped out. + */ +void +exaEnableDisableFBAccess (int index, Bool enable) +{ + ScreenPtr pScreen = screenInfo.screens[index]; + ExaScreenPriv (pScreen); + + if (!enable && pExaScr->disableFbCount++ == 0) { + if (pExaScr->info->exa_minor < 1) + ExaOffscreenSwapOut (pScreen); + else + ExaOffscreenEjectPixmaps (pScreen); + pExaScr->swappedOut = TRUE; + } + + if (enable && --pExaScr->disableFbCount == 0) { + if (pExaScr->info->exa_minor < 1) + ExaOffscreenSwapIn (pScreen); + pExaScr->swappedOut = FALSE; + } +} + +/* merge the next free area into this one */ +static void +ExaOffscreenMerge (ExaOffscreenArea *area) +{ + ExaOffscreenArea *next = area->next; + + /* account for space */ + area->size += next->size; + /* frob pointer */ + area->next = next->next; + xfree (next); +} + +/** + * exaOffscreenFree frees an allocation. + * + * @param pScreen current screen + * @param area offscreen area to free + * + * exaOffscreenFree frees an allocation created by exaOffscreenAlloc. Note that + * the save callback of the area is not called, and it is up to the driver to + * do any cleanup necessary as a result. + * + * @return pointer to the newly freed area. This behavior should not be relied + * on. + */ +ExaOffscreenArea * +exaOffscreenFree (ScreenPtr pScreen, ExaOffscreenArea *area) +{ + ExaScreenPriv(pScreen); + ExaOffscreenArea *next = area->next; + ExaOffscreenArea *prev; + + DBG_OFFSCREEN (("Free 0x%x -> 0x%x (0x%x)\n", area->size, + area->base_offset, area->offset)); + ExaOffscreenValidate (pScreen); + + area->state = ExaOffscreenAvail; + area->save = NULL; + area->score = 0; + /* + * Find previous area + */ + if (area == pExaScr->info->offScreenAreas) + prev = NULL; + else + for (prev = pExaScr->info->offScreenAreas; prev; prev = prev->next) + if (prev->next == area) + break; + + /* link with next area if free */ + if (next && next->state == ExaOffscreenAvail) + ExaOffscreenMerge (area); + + /* link with prev area if free */ + if (prev && prev->state == ExaOffscreenAvail) + { + area = prev; + ExaOffscreenMerge (area); + } + + ExaOffscreenValidate (pScreen); + DBG_OFFSCREEN(("\tdone freeing\n")); + return area; +} + +void +ExaOffscreenMarkUsed (PixmapPtr pPixmap) +{ + ExaPixmapPriv (pPixmap); + ExaScreenPriv (pPixmap->drawable.pScreen); + static int iter = 0; + + if (!pExaPixmap || !pExaPixmap->area) + return; + + /* The numbers here are arbitrary. We may want to tune these. */ + pExaPixmap->area->score += 100; + if (++iter == 10) { + ExaOffscreenArea *area; + for (area = pExaScr->info->offScreenAreas; area != NULL; + area = area->next) + { + if (area->state == ExaOffscreenRemovable) + area->score = (area->score * 7) / 8; + } + iter = 0; + } +} + +/** + * exaOffscreenInit initializes the offscreen memory manager. + * + * @param pScreen current screen + * + * exaOffscreenInit is called by exaDriverInit to set up the memory manager for + * the screen, if any offscreen memory is available. + */ +Bool +exaOffscreenInit (ScreenPtr pScreen) +{ + ExaScreenPriv (pScreen); + ExaOffscreenArea *area; + + /* Allocate a big free area */ + area = xalloc (sizeof (ExaOffscreenArea)); + + if (!area) + return FALSE; + + area->state = ExaOffscreenAvail; + area->base_offset = pExaScr->info->offScreenBase; + area->offset = area->base_offset; + area->size = pExaScr->info->memorySize - area->base_offset; + area->save = NULL; + area->next = NULL; + area->score = 0; + + /* Add it to the free areas */ + pExaScr->info->offScreenAreas = area; + + ExaOffscreenValidate (pScreen); + + return TRUE; +} + +void +ExaOffscreenFini (ScreenPtr pScreen) +{ + ExaScreenPriv (pScreen); + ExaOffscreenArea *area; + + /* just free all of the area records */ + while ((area = pExaScr->info->offScreenAreas)) + { + pExaScr->info->offScreenAreas = area->next; + xfree (area); + } +} diff --git a/xorg-server-1.4/exa/exa_priv.h b/xorg-server-1.4/exa/exa_priv.h new file mode 100644 index 0000000..bab8aa2 --- /dev/null +++ b/xorg-server-1.4/exa/exa_priv.h @@ -0,0 +1,427 @@ +/* + * + * Copyright (C) 2000 Keith Packard, member of The XFree86 Project, Inc. + * 2005 Zack Rusin, Trolltech + * + * 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. + * + * 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. + */ + +#ifndef EXAPRIV_H +#define EXAPRIV_H + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "exa.h" + +#include +#define NEED_EVENTS +#include +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "windowstr.h" +#include "servermd.h" +#include "mibstore.h" +#include "colormapst.h" +#include "gcstruct.h" +#include "input.h" +#include "mipointer.h" +#include "mi.h" +#include "dix.h" +#include "fb.h" +#include "fboverlay.h" +#ifdef RENDER +#include "fbpict.h" +#endif +#include "damage.h" + +#define DEBUG_TRACE_FALL 0 +#define DEBUG_MIGRATE 0 +#define DEBUG_PIXMAP 0 +#define DEBUG_OFFSCREEN 0 + +#if DEBUG_TRACE_FALL +#define EXA_FALLBACK(x) \ +do { \ + ErrorF("EXA fallback at %s: ", __FUNCTION__); \ + ErrorF x; \ +} while (0) + +char +exaDrawableLocation(DrawablePtr pDrawable); +#else +#define EXA_FALLBACK(x) +#endif + +#if DEBUG_PIXMAP +#define DBG_PIXMAP(a) ErrorF a +#else +#define DBG_PIXMAP(a) +#endif + +#ifndef EXA_MAX_FB +#define EXA_MAX_FB FB_OVERLAY_MAX +#endif + +/** + * This is the list of migration heuristics supported by EXA. See + * exaDoMigration() for what their implementations do. + */ +enum ExaMigrationHeuristic { + ExaMigrationGreedy, + ExaMigrationAlways, + ExaMigrationSmart +}; + +typedef void (*EnableDisableFBAccessProcPtr)(int, Bool); +typedef struct { + ExaDriverPtr info; + CreateGCProcPtr SavedCreateGC; + CloseScreenProcPtr SavedCloseScreen; + GetImageProcPtr SavedGetImage; + GetSpansProcPtr SavedGetSpans; + PaintWindowBackgroundProcPtr SavedPaintWindowBackground; + CreatePixmapProcPtr SavedCreatePixmap; + DestroyPixmapProcPtr SavedDestroyPixmap; + PaintWindowBorderProcPtr SavedPaintWindowBorder; + CopyWindowProcPtr SavedCopyWindow; +#ifdef RENDER + CompositeProcPtr SavedComposite; + RasterizeTrapezoidProcPtr SavedRasterizeTrapezoid; + AddTrianglesProcPtr SavedAddTriangles; + GlyphsProcPtr SavedGlyphs; + TrapezoidsProcPtr SavedTrapezoids; +#endif + Bool swappedOut; + enum ExaMigrationHeuristic migration; + Bool hideOffscreenPixmapData; + Bool checkDirtyCorrectness; + unsigned disableFbCount; +} ExaScreenPrivRec, *ExaScreenPrivPtr; + +/* + * This is the only completely portable way to + * compute this info. + */ +#ifndef BitsPerPixel +#define BitsPerPixel(d) (\ + PixmapWidthPaddingInfo[d].notPower2 ? \ + (PixmapWidthPaddingInfo[d].bytesPerPixel * 8) : \ + ((1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \ + (PixmapWidthPaddingInfo[d].padRoundUp+1))) +#endif + +extern int exaScreenPrivateIndex; +extern int exaPixmapPrivateIndex; +#define ExaGetScreenPriv(s) ((ExaScreenPrivPtr)(s)->devPrivates[exaScreenPrivateIndex].ptr) +#define ExaScreenPriv(s) ExaScreenPrivPtr pExaScr = ExaGetScreenPriv(s) + +/** Align an offset to an arbitrary alignment */ +#define EXA_ALIGN(offset, align) (((offset) + (align) - 1) - \ + (((offset) + (align) - 1) % (align))) +/** Align an offset to a power-of-two alignment */ +#define EXA_ALIGN2(offset, align) (((offset) + (align) - 1) & ~((align) - 1)) + +#define EXA_PIXMAP_SCORE_MOVE_IN 10 +#define EXA_PIXMAP_SCORE_MAX 20 +#define EXA_PIXMAP_SCORE_MOVE_OUT -10 +#define EXA_PIXMAP_SCORE_MIN -20 +#define EXA_PIXMAP_SCORE_PINNED 1000 +#define EXA_PIXMAP_SCORE_INIT 1001 + +#define ExaGetPixmapPriv(p) ((ExaPixmapPrivPtr)(p)->devPrivates[exaPixmapPrivateIndex].ptr) +#define ExaSetPixmapPriv(p,a) ((p)->devPrivates[exaPixmapPrivateIndex].ptr = (pointer) (a)) +#define ExaPixmapPriv(p) ExaPixmapPrivPtr pExaPixmap = ExaGetPixmapPriv(p) + +typedef struct { + ExaOffscreenArea *area; + int score; /**< score for the move-in vs move-out heuristic */ + + CARD8 *sys_ptr; /**< pointer to pixmap data in system memory */ + int sys_pitch; /**< pitch of pixmap in system memory */ + + CARD8 *fb_ptr; /**< pointer to pixmap data in framebuffer memory */ + int fb_pitch; /**< pitch of pixmap in framebuffer memory */ + unsigned int fb_size; /**< size of pixmap in framebuffer memory */ + + /** + * The damage record contains the areas of the pixmap's current location + * (framebuffer or system) that have been damaged compared to the other + * location. + */ + DamagePtr pDamage; + /** + * The valid region marks the valid bits of a drawable (at least, as it's + * derived from damage, which may be overreported). + */ + RegionRec validReg; +} ExaPixmapPrivRec, *ExaPixmapPrivPtr; + +typedef struct _ExaMigrationRec { + Bool as_dst; + Bool as_src; + PixmapPtr pPix; +} ExaMigrationRec, *ExaMigrationPtr; + +/** + * exaDDXDriverInit must be implemented by the DDX using EXA, and is the place + * to set EXA options or hook in screen functions to handle using EXA as the AA. + */ +void exaDDXDriverInit (ScreenPtr pScreen); + +/* exa_unaccel.c */ +void +exaPrepareAccessGC(GCPtr pGC); + +void +exaFinishAccessGC(GCPtr pGC); + +void +ExaCheckFillSpans (DrawablePtr pDrawable, GCPtr pGC, int nspans, + DDXPointPtr ppt, int *pwidth, int fSorted); + +void +ExaCheckSetSpans (DrawablePtr pDrawable, GCPtr pGC, char *psrc, + DDXPointPtr ppt, int *pwidth, int nspans, int fSorted); + +void +ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, + int x, int y, int w, int h, int leftPad, int format, + char *bits); + +RegionPtr +ExaCheckCopyArea (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, + int srcx, int srcy, int w, int h, int dstx, int dsty); + +RegionPtr +ExaCheckCopyPlane (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, + int srcx, int srcy, int w, int h, int dstx, int dsty, + unsigned long bitPlane); + +void +ExaCheckPolyPoint (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, + DDXPointPtr pptInit); + +void +ExaCheckPolylines (DrawablePtr pDrawable, GCPtr pGC, + int mode, int npt, DDXPointPtr ppt); + +void +ExaCheckPolySegment (DrawablePtr pDrawable, GCPtr pGC, + int nsegInit, xSegment *pSegInit); + +void +ExaCheckPolyArc (DrawablePtr pDrawable, GCPtr pGC, + int narcs, xArc *pArcs); + +void +ExaCheckPolyFillRect (DrawablePtr pDrawable, GCPtr pGC, + int nrect, xRectangle *prect); + +void +ExaCheckImageGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr *ppci, pointer pglyphBase); + +void +ExaCheckPolyGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr *ppci, pointer pglyphBase); + +void +ExaCheckPushPixels (GCPtr pGC, PixmapPtr pBitmap, + DrawablePtr pDrawable, + int w, int h, int x, int y); + +void +ExaCheckGetImage (DrawablePtr pDrawable, + int x, int y, int w, int h, + unsigned int format, unsigned long planeMask, + char *d); + +void +ExaCheckGetSpans (DrawablePtr pDrawable, + int wMax, + DDXPointPtr ppt, + int *pwidth, + int nspans, + char *pdstStart); + +void +ExaCheckSaveAreas (PixmapPtr pPixmap, + RegionPtr prgnSave, + int xorg, + int yorg, + WindowPtr pWin); + +void +ExaCheckRestoreAreas (PixmapPtr pPixmap, + RegionPtr prgnSave, + int xorg, + int yorg, + WindowPtr pWin); + +void +ExaCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what); + +CARD32 +exaGetPixmapFirstPixel (PixmapPtr pPixmap); + +/* exa_accel.c */ +void +exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); + +Bool +exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile, + DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu); + +void +exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what); + +void +exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h, + unsigned int format, unsigned long planeMask, char *d); + +void +exaGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth, + int nspans, char *pdstStart); + +extern const GCOps exaOps; + +#ifdef RENDER +void +ExaCheckComposite (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height); +#endif + +/* exa_offscreen.c */ +void +ExaOffscreenSwapOut (ScreenPtr pScreen); + +void +ExaOffscreenSwapIn (ScreenPtr pScreen); + +Bool +exaOffscreenInit(ScreenPtr pScreen); + +void +ExaOffscreenFini (ScreenPtr pScreen); + +/* exa.c */ +void +exaPrepareAccess(DrawablePtr pDrawable, int index); + +void +exaFinishAccess(DrawablePtr pDrawable, int index); + +void +exaPixmapDirty(PixmapPtr pPix, int x1, int y1, int x2, int y2); + +void +exaGetDrawableDeltas (DrawablePtr pDrawable, PixmapPtr pPixmap, + int *xp, int *yp); + +Bool +exaDrawableIsOffscreen (DrawablePtr pDrawable); + +Bool +exaPixmapIsOffscreen(PixmapPtr p); + +PixmapPtr +exaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp); + +PixmapPtr +exaGetDrawablePixmap(DrawablePtr pDrawable); + +RegionPtr +exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, + int srcx, int srcy, int width, int height, int dstx, int dsty); + +void +exaCopyNtoN (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure); + +/* exa_render.c */ +void +exaComposite(CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height); + +void +exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, + int ntrap, xTrapezoid *traps); + +void +exaRasterizeTrapezoid (PicturePtr pPicture, xTrapezoid *trap, + int x_off, int y_off); + +void +exaAddTriangles (PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntri, + xTriangle *tris); + +void +exaGlyphs (CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, + int nlist, + GlyphListPtr list, + GlyphPtr *glyphs); + +/* exa_migration.c */ +void +exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); + +void +exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area); + +#endif /* EXAPRIV_H */ diff --git a/xorg-server-1.4/exa/exa_render.c b/xorg-server-1.4/exa/exa_render.c new file mode 100644 index 0000000..2dd3fc1 --- /dev/null +++ b/xorg-server-1.4/exa/exa_render.c @@ -0,0 +1,1284 @@ +/* + * Copyright © 2001 Keith Packard + * + * Partly based on code that is Copyright © 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_DIX_CONFIG_H +#include +#endif + +#include + +#include "exa_priv.h" + +#ifdef RENDER +#include "mipict.h" + +#if DEBUG_TRACE_FALL +static void exaCompositeFallbackPictDesc(PicturePtr pict, char *string, int n) +{ + char format[20]; + char size[20]; + char loc; + int temp; + + if (!pict) { + snprintf(string, n, "None"); + return; + } + + switch (pict->format) + { + case PICT_a8r8g8b8: + snprintf(format, 20, "ARGB8888"); + break; + case PICT_r5g6b5: + snprintf(format, 20, "RGB565 "); + break; + case PICT_x1r5g5b5: + snprintf(format, 20, "RGB555 "); + break; + case PICT_a8: + snprintf(format, 20, "A8 "); + break; + case PICT_a1: + snprintf(format, 20, "A1 "); + break; + default: + snprintf(format, 20, "0x%x", (int)pict->format); + break; + } + + loc = exaGetOffscreenPixmap(pict->pDrawable, &temp, &temp) ? 's' : 'm'; + + snprintf(size, 20, "%dx%d%s", pict->pDrawable->width, + pict->pDrawable->height, pict->repeat ? + " R" : ""); + + snprintf(string, n, "%p:%c fmt %s (%s)", pict->pDrawable, loc, format, size); +} + +static void +exaPrintCompositeFallback(CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst) +{ + char sop[20]; + char srcdesc[40], maskdesc[40], dstdesc[40]; + + switch(op) + { + case PictOpSrc: + sprintf(sop, "Src"); + break; + case PictOpOver: + sprintf(sop, "Over"); + break; + default: + sprintf(sop, "0x%x", (int)op); + break; + } + + exaCompositeFallbackPictDesc(pSrc, srcdesc, 40); + exaCompositeFallbackPictDesc(pMask, maskdesc, 40); + exaCompositeFallbackPictDesc(pDst, dstdesc, 40); + + ErrorF("Composite fallback: op %s, \n" + " src %s, \n" + " mask %s, \n" + " dst %s, \n", + sop, srcdesc, maskdesc, dstdesc); +} +#endif /* DEBUG_TRACE_FALL */ + +static Bool +exaOpReadsDestination (CARD8 op) +{ + /* FALSE (does not read destination) is the list of ops in the protocol + * document with "0" in the "Fb" column and no "Ab" in the "Fa" column. + * That's just Clear and Src. ReduceCompositeOp() will already have + * converted con/disjoint clear/src to Clear or Src. + */ + switch (op) { + case PictOpClear: + case PictOpSrc: + return FALSE; + default: + return TRUE; + } +} + + +static Bool +exaGetPixelFromRGBA(CARD32 *pixel, + CARD16 red, + CARD16 green, + CARD16 blue, + CARD16 alpha, + CARD32 format) +{ + int rbits, bbits, gbits, abits; + int rshift, bshift, gshift, ashift; + + *pixel = 0; + + if (!PICT_FORMAT_COLOR(format)) + return FALSE; + + rbits = PICT_FORMAT_R(format); + gbits = PICT_FORMAT_G(format); + bbits = PICT_FORMAT_B(format); + abits = PICT_FORMAT_A(format); + + if (PICT_FORMAT_TYPE(format) == PICT_TYPE_ARGB) { + bshift = 0; + gshift = bbits; + rshift = gshift + gbits; + ashift = rshift + rbits; + } else { /* PICT_TYPE_ABGR */ + rshift = 0; + gshift = rbits; + bshift = gshift + gbits; + ashift = bshift + bbits; + } + + *pixel |= ( blue >> (16 - bbits)) << bshift; + *pixel |= ( red >> (16 - rbits)) << rshift; + *pixel |= (green >> (16 - gbits)) << gshift; + *pixel |= (alpha >> (16 - abits)) << ashift; + + return TRUE; +} + +static Bool +exaGetRGBAFromPixel(CARD32 pixel, + CARD16 *red, + CARD16 *green, + CARD16 *blue, + CARD16 *alpha, + CARD32 format) +{ + int rbits, bbits, gbits, abits; + int rshift, bshift, gshift, ashift; + + if (!PICT_FORMAT_COLOR(format)) + return FALSE; + + rbits = PICT_FORMAT_R(format); + gbits = PICT_FORMAT_G(format); + bbits = PICT_FORMAT_B(format); + abits = PICT_FORMAT_A(format); + + if (PICT_FORMAT_TYPE(format) == PICT_TYPE_ARGB) { + bshift = 0; + gshift = bbits; + rshift = gshift + gbits; + ashift = rshift + rbits; + } else { /* PICT_TYPE_ABGR */ + rshift = 0; + gshift = rbits; + bshift = gshift + gbits; + ashift = bshift + bbits; + } + + *red = ((pixel >> rshift ) & ((1 << rbits) - 1)) << (16 - rbits); + while (rbits < 16) { + *red |= *red >> rbits; + rbits <<= 1; + } + + *green = ((pixel >> gshift ) & ((1 << gbits) - 1)) << (16 - gbits); + while (gbits < 16) { + *green |= *green >> gbits; + gbits <<= 1; + } + + *blue = ((pixel >> bshift ) & ((1 << bbits) - 1)) << (16 - bbits); + while (bbits < 16) { + *blue |= *blue >> bbits; + bbits <<= 1; + } + + if (abits) { + *alpha = ((pixel >> ashift ) & ((1 << abits) - 1)) << (16 - abits); + while (abits < 16) { + *alpha |= *alpha >> abits; + abits <<= 1; + } + } else + *alpha = 0xffff; + + return TRUE; +} + +static int +exaTryDriverSolidFill(PicturePtr pSrc, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) +{ + ExaScreenPriv (pDst->pDrawable->pScreen); + RegionRec region; + BoxPtr pbox; + int nbox; + int dst_off_x, dst_off_y; + PixmapPtr pSrcPix, pDstPix; + CARD32 pixel; + CARD16 red, green, blue, alpha; + ExaMigrationRec pixmaps[1]; + + xDst += pDst->pDrawable->x; + yDst += pDst->pDrawable->y; + xSrc += pSrc->pDrawable->x; + ySrc += pSrc->pDrawable->y; + + if (!miComputeCompositeRegion (®ion, pSrc, NULL, pDst, + xSrc, ySrc, 0, 0, xDst, yDst, + width, height)) + return 1; + + pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable); + pixel = exaGetPixmapFirstPixel (pSrcPix); + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = exaGetDrawablePixmap (pDst->pDrawable); + exaDoMigration(pixmaps, 1, TRUE); + + pDstPix = exaGetOffscreenPixmap (pDst->pDrawable, &dst_off_x, &dst_off_y); + if (!pDstPix) { + REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + return 0; + } + + if (!exaGetRGBAFromPixel(pixel, &red, &green, &blue, &alpha, + pSrc->format)) + { + REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + return -1; + } + + if (!exaGetPixelFromRGBA(&pixel, red, green, blue, alpha, + pDst->format)) + { + REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + return -1; + } + + if (!(*pExaScr->info->PrepareSolid) (pDstPix, GXcopy, 0xffffffff, pixel)) + { + REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + return -1; + } + + nbox = REGION_NUM_RECTS(®ion); + pbox = REGION_RECTS(®ion); + + while (nbox--) + { + (*pExaScr->info->Solid) (pDstPix, + pbox->x1 + dst_off_x, pbox->y1 + dst_off_y, + pbox->x2 + dst_off_x, pbox->y2 + dst_off_y); + pbox++; + } + + (*pExaScr->info->DoneSolid) (pDstPix); + exaMarkSync(pDst->pDrawable->pScreen); + + REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + return 1; +} + +static int +exaTryDriverComposite(CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) +{ + ExaScreenPriv (pDst->pDrawable->pScreen); + RegionRec region; + BoxPtr pbox; + int nbox; + int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y; + PixmapPtr pSrcPix, pMaskPix = NULL, pDstPix; + struct _Pixmap scratch; + ExaMigrationRec pixmaps[3]; + + pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable); + pDstPix = exaGetDrawablePixmap(pDst->pDrawable); + if (pMask) + pMaskPix = exaGetDrawablePixmap(pMask->pDrawable); + + /* Bail if we might exceed coord limits by rendering from/to these. We + * should really be making some scratch pixmaps with offsets and coords + * adjusted to deal with this, but it hasn't been done yet. + */ + if (pSrcPix->drawable.width > pExaScr->info->maxX || + pSrcPix->drawable.height > pExaScr->info->maxY || + pDstPix->drawable.width > pExaScr->info->maxX || + pDstPix->drawable.height > pExaScr->info->maxY || + (pMask && (pMaskPix->drawable.width > pExaScr->info->maxX || + pMaskPix->drawable.height > pExaScr->info->maxY))) + { + return -1; + } + + xDst += pDst->pDrawable->x; + yDst += pDst->pDrawable->y; + + if (pMask) { + xMask += pMask->pDrawable->x; + yMask += pMask->pDrawable->y; + } + + xSrc += pSrc->pDrawable->x; + ySrc += pSrc->pDrawable->y; + + if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, xDst, yDst, + width, height)) + return 1; + + if (pExaScr->info->CheckComposite && + !(*pExaScr->info->CheckComposite) (op, pSrc, pMask, pDst)) + { + REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + return -1; + } + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = exaOpReadsDestination(op); + pixmaps[0].pPix = exaGetDrawablePixmap (pDst->pDrawable); + pixmaps[1].as_dst = FALSE; + pixmaps[1].as_src = TRUE; + pixmaps[1].pPix = exaGetDrawablePixmap (pSrc->pDrawable); + if (pMask) { + pixmaps[2].as_dst = FALSE; + pixmaps[2].as_src = TRUE; + pixmaps[2].pPix = exaGetDrawablePixmap (pMask->pDrawable); + exaDoMigration(pixmaps, 3, TRUE); + } else { + exaDoMigration(pixmaps, 2, TRUE); + } + + pSrcPix = exaGetOffscreenPixmap (pSrc->pDrawable, &src_off_x, &src_off_y); + if (pMask) + pMaskPix = exaGetOffscreenPixmap (pMask->pDrawable, &mask_off_x, + &mask_off_y); + pDstPix = exaGetOffscreenPixmap (pDst->pDrawable, &dst_off_x, &dst_off_y); + + if (!pDstPix) { + REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + return 0; + } + + if (!pSrcPix && (!pMask || pMaskPix) && pExaScr->info->UploadToScratch) { + pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable); + if ((*pExaScr->info->UploadToScratch) (pSrcPix, &scratch)) + pSrcPix = &scratch; + } else if (pSrcPix && pMask && !pMaskPix && pExaScr->info->UploadToScratch) { + pMaskPix = exaGetDrawablePixmap (pMask->pDrawable); + if ((*pExaScr->info->UploadToScratch) (pMaskPix, &scratch)) + pMaskPix = &scratch; + } + + if (!pSrcPix || (pMask && !pMaskPix)) { + REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + return 0; + } + + if (!(*pExaScr->info->PrepareComposite) (op, pSrc, pMask, pDst, pSrcPix, + pMaskPix, pDstPix)) + { + REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + return -1; + } + + nbox = REGION_NUM_RECTS(®ion); + pbox = REGION_RECTS(®ion); + + xMask -= xDst; + yMask -= yDst; + + xSrc -= xDst; + ySrc -= yDst; + + while (nbox--) + { + (*pExaScr->info->Composite) (pDstPix, + pbox->x1 + xSrc + src_off_x, + pbox->y1 + ySrc + src_off_y, + pbox->x1 + xMask + mask_off_x, + pbox->y1 + yMask + mask_off_y, + pbox->x1 + dst_off_x, + pbox->y1 + dst_off_y, + pbox->x2 - pbox->x1, + pbox->y2 - pbox->y1); + pbox++; + } + (*pExaScr->info->DoneComposite) (pDstPix); + exaMarkSync(pDst->pDrawable->pScreen); + + REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + return 1; +} + +/** + * exaTryMagicTwoPassCompositeHelper implements PictOpOver using two passes of + * simpler operations PictOpOutReverse and PictOpAdd. Mainly used for component + * alpha and limited 1-tmu cards. + * + * From http://anholt.livejournal.com/32058.html: + * + * The trouble is that component-alpha rendering requires two different sources + * for blending: one for the source value to the blender, which is the + * per-channel multiplication of source and mask, and one for the source alpha + * for multiplying with the destination channels, which is the multiplication + * of the source channels by the mask alpha. So the equation for Over is: + * + * dst.A = src.A * mask.A + (1 - (src.A * mask.A)) * dst.A + * dst.R = src.R * mask.R + (1 - (src.A * mask.R)) * dst.R + * dst.G = src.G * mask.G + (1 - (src.A * mask.G)) * dst.G + * dst.B = src.B * mask.B + (1 - (src.A * mask.B)) * dst.B + * + * But we can do some simpler operations, right? How about PictOpOutReverse, + * which has a source factor of 0 and dest factor of (1 - source alpha). We + * can get the source alpha value (srca.X = src.A * mask.X) out of the texture + * blenders pretty easily. So we can do a component-alpha OutReverse, which + * gets us: + * + * dst.A = 0 + (1 - (src.A * mask.A)) * dst.A + * dst.R = 0 + (1 - (src.A * mask.R)) * dst.R + * dst.G = 0 + (1 - (src.A * mask.G)) * dst.G + * dst.B = 0 + (1 - (src.A * mask.B)) * dst.B + * + * OK. And if an op doesn't use the source alpha value for the destination + * factor, then we can do the channel multiplication in the texture blenders + * to get the source value, and ignore the source alpha that we wouldn't use. + * We've supported this in the Radeon driver for a long time. An example would + * be PictOpAdd, which does: + * + * dst.A = src.A * mask.A + dst.A + * dst.R = src.R * mask.R + dst.R + * dst.G = src.G * mask.G + dst.G + * dst.B = src.B * mask.B + dst.B + * + * Hey, this looks good! If we do a PictOpOutReverse and then a PictOpAdd right + * after it, we get: + * + * dst.A = src.A * mask.A + ((1 - (src.A * mask.A)) * dst.A) + * dst.R = src.R * mask.R + ((1 - (src.A * mask.R)) * dst.R) + * dst.G = src.G * mask.G + ((1 - (src.A * mask.G)) * dst.G) + * dst.B = src.B * mask.B + ((1 - (src.A * mask.B)) * dst.B) + */ + +static int +exaTryMagicTwoPassCompositeHelper(CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) +{ + ExaScreenPriv (pDst->pDrawable->pScreen); + DrawablePtr pDstDraw = pDst->pDrawable; + PixmapPtr pDstPixmap = exaGetDrawablePixmap(pDstDraw); + int xoff, yoff; + + assert(op == PictOpOver); + + if (pExaScr->info->CheckComposite && + (!(*pExaScr->info->CheckComposite)(PictOpOutReverse, pSrc, pMask, + pDst) || + !(*pExaScr->info->CheckComposite)(PictOpAdd, pSrc, pMask, pDst))) + { + return -1; + } + + /* Now, we think we should be able to accelerate this operation. First, + * composite the destination to be the destination times the source alpha + * factors. + */ + exaComposite(PictOpOutReverse, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, + xDst, yDst, width, height); + + exaGetDrawableDeltas(pDstDraw, pDstPixmap, &xoff, &yoff); + xoff += pDstDraw->x; + yoff += pDstDraw->y; + exaPixmapDirty(pDstPixmap, xDst + xoff, yDst + yoff, xDst + xoff + width, + yDst + yoff + height); + + /* Then, add in the source value times the destination alpha factors (1.0). + */ + exaComposite(PictOpAdd, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, + xDst, yDst, width, height); + + return 1; +} + +void +exaComposite(CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) +{ + ExaScreenPriv (pDst->pDrawable->pScreen); + int ret = -1; + Bool saveSrcRepeat = pSrc->repeat; + Bool saveMaskRepeat = pMask ? pMask->repeat : 0; + ExaMigrationRec pixmaps[3]; + int npixmaps = 1; + PixmapPtr pSrcPixmap = NULL; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = exaOpReadsDestination(op); + pixmaps[0].pPix = exaGetDrawablePixmap (pDst->pDrawable); + + if (pSrc->pDrawable) { + pSrcPixmap = exaGetDrawablePixmap (pSrc->pDrawable); + pixmaps[npixmaps].as_dst = FALSE; + pixmaps[npixmaps].as_src = TRUE; + pixmaps[npixmaps].pPix = pSrcPixmap; + npixmaps++; + } + + if (pMask && pMask->pDrawable) { + pixmaps[npixmaps].as_dst = FALSE; + pixmaps[npixmaps].as_src = TRUE; + pixmaps[npixmaps].pPix = exaGetDrawablePixmap (pMask->pDrawable); + npixmaps++; + } + + /* We currently don't support acceleration of gradients, or other pictures + * with a NULL pDrawable. + */ + if (pExaScr->swappedOut || + pSrc->pDrawable == NULL || (pMask != NULL && pMask->pDrawable == NULL)) + { + goto fallback; + } + + /* Remove repeat in source if useless */ + if (pSrc->repeat && !pSrc->transform && xSrc >= 0 && + (xSrc + width) <= pSrc->pDrawable->width && ySrc >= 0 && + (ySrc + height) <= pSrc->pDrawable->height) + pSrc->repeat = 0; + + if (!pMask) + { + if ((op == PictOpSrc && + ((pSrc->format == pDst->format) || + (pSrc->format==PICT_a8r8g8b8 && pDst->format==PICT_x8r8g8b8) || + (pSrc->format==PICT_a8b8g8r8 && pDst->format==PICT_x8b8g8r8))) || + (op == PictOpOver && !pSrc->alphaMap && !pDst->alphaMap && + pSrc->format == pDst->format && + (pSrc->format==PICT_x8r8g8b8 || pSrc->format==PICT_x8b8g8r8))) + { + if (pSrc->pDrawable->width == 1 && + pSrc->pDrawable->height == 1 && + pSrc->repeat) + { + ret = exaTryDriverSolidFill(pSrc, pDst, xSrc, ySrc, xDst, yDst, + width, height); + if (ret == 1) + goto done; + } + else if (pSrcPixmap && !pSrc->repeat && !pSrc->transform) + { + RegionRec region; + + xDst += pDst->pDrawable->x; + yDst += pDst->pDrawable->y; + xSrc += pSrc->pDrawable->x; + ySrc += pSrc->pDrawable->y; + + if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, xDst, + yDst, width, height)) + goto done; + + + exaCopyNtoN (pSrc->pDrawable, pDst->pDrawable, NULL, + REGION_RECTS(®ion), REGION_NUM_RECTS(®ion), + xSrc - xDst, ySrc - yDst, + FALSE, FALSE, 0, NULL); + REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + goto done; + } + else if (pSrcPixmap && !pSrc->transform && + pSrc->repeatType == RepeatNormal) + { + RegionRec region; + DDXPointRec srcOrg; + + /* Let's see if the driver can do the repeat in one go */ + if (pExaScr->info->PrepareComposite && !pSrc->alphaMap && + !pDst->alphaMap) + { + ret = exaTryDriverComposite(op, pSrc, pMask, pDst, xSrc, + ySrc, xMask, yMask, xDst, yDst, + width, height); + if (ret == 1) + goto done; + } + + /* Now see if we can use exaFillRegionTiled() */ + xDst += pDst->pDrawable->x; + yDst += pDst->pDrawable->y; + xSrc += pSrc->pDrawable->x; + ySrc += pSrc->pDrawable->y; + + if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst, xSrc, + ySrc, xMask, yMask, xDst, yDst, + width, height)) + goto done; + + srcOrg.x = (xSrc - xDst) % pSrcPixmap->drawable.width; + srcOrg.y = (ySrc - yDst) % pSrcPixmap->drawable.height; + + ret = exaFillRegionTiled(pDst->pDrawable, ®ion, pSrcPixmap, + &srcOrg, FB_ALLONES, GXcopy); + + REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + + if (ret) + goto done; + } + } + } + + /* Remove repeat in mask if useless */ + if (pMask && pMask->repeat && !pMask->transform && xMask >= 0 && + (xMask + width) <= pMask->pDrawable->width && yMask >= 0 && + (yMask + height) <= pMask->pDrawable->height) + pMask->repeat = 0; + + if (pExaScr->info->PrepareComposite && + (!pSrc->repeat || pSrc->repeatType == RepeatNormal) && + (!pMask || !pMask->repeat || pMask->repeatType == RepeatNormal) && + !pSrc->alphaMap && (!pMask || !pMask->alphaMap) && !pDst->alphaMap) + { + Bool isSrcSolid; + + ret = exaTryDriverComposite(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, + yMask, xDst, yDst, width, height); + if (ret == 1) + goto done; + + /* For generic masks and solid src pictures, mach64 can do Over in two + * passes, similar to the component-alpha case. + */ + isSrcSolid = pSrc->pDrawable->width == 1 && + pSrc->pDrawable->height == 1 && + pSrc->repeat; + + /* If we couldn't do the Composite in a single pass, and it was a + * component-alpha Over, see if we can do it in two passes with + * an OutReverse and then an Add. + */ + if (ret == -1 && op == PictOpOver && pMask && + (pMask->componentAlpha || isSrcSolid)) { + ret = exaTryMagicTwoPassCompositeHelper(op, pSrc, pMask, pDst, + xSrc, ySrc, + xMask, yMask, xDst, yDst, + width, height); + if (ret == 1) + goto done; + } + } + +fallback: +#if DEBUG_TRACE_FALL + exaPrintCompositeFallback (op, pSrc, pMask, pDst); +#endif + + exaDoMigration(pixmaps, npixmaps, FALSE); + ExaCheckComposite (op, pSrc, pMask, pDst, xSrc, ySrc, + xMask, yMask, xDst, yDst, width, height); + +done: + pSrc->repeat = saveSrcRepeat; + if (pMask) + pMask->repeat = saveMaskRepeat; +} +#endif + +/** + * Same as miCreateAlphaPicture, except it uses ExaCheckPolyFillRect instead + * of PolyFillRect to initialize the pixmap after creating it, to prevent + * the pixmap from being migrated. + * + * See the comments about exaTrapezoids. + */ +static PicturePtr +exaCreateAlphaPicture (ScreenPtr pScreen, + PicturePtr pDst, + PictFormatPtr pPictFormat, + CARD16 width, + CARD16 height) +{ + PixmapPtr pPixmap; + PicturePtr pPicture; + GCPtr pGC; + int error; + xRectangle rect; + + if (width > 32767 || height > 32767) + return 0; + + if (!pPictFormat) + { + if (pDst->polyEdge == PolyEdgeSharp) + pPictFormat = PictureMatchFormat (pScreen, 1, PICT_a1); + else + pPictFormat = PictureMatchFormat (pScreen, 8, PICT_a8); + if (!pPictFormat) + return 0; + } + + pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, + pPictFormat->depth); + if (!pPixmap) + return 0; + pGC = GetScratchGC (pPixmap->drawable.depth, pScreen); + if (!pGC) + { + (*pScreen->DestroyPixmap) (pPixmap); + return 0; + } + ValidateGC (&pPixmap->drawable, pGC); + rect.x = 0; + rect.y = 0; + rect.width = width; + rect.height = height; + ExaCheckPolyFillRect (&pPixmap->drawable, pGC, 1, &rect); + exaPixmapDirty (pPixmap, 0, 0, width, height); + FreeScratchGC (pGC); + pPicture = CreatePicture (0, &pPixmap->drawable, pPictFormat, + 0, 0, serverClient, &error); + (*pScreen->DestroyPixmap) (pPixmap); + return pPicture; +} + +/** + * exaTrapezoids is essentially a copy of miTrapezoids that uses + * exaCreateAlphaPicture instead of miCreateAlphaPicture. + * + * The problem with miCreateAlphaPicture is that it calls PolyFillRect + * to initialize the contents after creating the pixmap, which + * causes the pixmap to be moved in for acceleration. The subsequent + * call to RasterizeTrapezoid won't be accelerated however, which + * forces the pixmap to be moved out again. + * + * exaCreateAlphaPicture avoids this roundtrip by using ExaCheckPolyFillRect + * to initialize the contents. + */ +void +exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, + int ntrap, xTrapezoid *traps) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + + /* + * Check for solid alpha add + */ + if (op == PictOpAdd && miIsSolidAlpha (pSrc)) + { + for (; ntrap; ntrap--, traps++) + (*ps->RasterizeTrapezoid) (pDst, traps, 0, 0); + } + else if (maskFormat) + { + PicturePtr pPicture; + BoxRec bounds; + INT16 xDst, yDst; + INT16 xRel, yRel; + + xDst = traps[0].left.p1.x >> 16; + yDst = traps[0].left.p1.y >> 16; + + miTrapezoidBounds (ntrap, traps, &bounds); + if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2) + return; + pPicture = exaCreateAlphaPicture (pScreen, pDst, maskFormat, + bounds.x2 - bounds.x1, + bounds.y2 - bounds.y1); + if (!pPicture) + return; + for (; ntrap; ntrap--, traps++) + (*ps->RasterizeTrapezoid) (pPicture, traps, + -bounds.x1, -bounds.y1); + xRel = bounds.x1 + xSrc - xDst; + yRel = bounds.y1 + ySrc - yDst; + CompositePicture (op, pSrc, pPicture, pDst, + xRel, yRel, 0, 0, bounds.x1, bounds.y1, + bounds.x2 - bounds.x1, + bounds.y2 - bounds.y1); + FreePicture (pPicture, 0); + } + else + { + if (pDst->polyEdge == PolyEdgeSharp) + maskFormat = PictureMatchFormat (pScreen, 1, PICT_a1); + else + maskFormat = PictureMatchFormat (pScreen, 8, PICT_a8); + for (; ntrap; ntrap--, traps++) + exaTrapezoids (op, pSrc, pDst, maskFormat, xSrc, ySrc, 1, traps); + } +} + +#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0) + +/** + * exaRasterizeTrapezoid is just a wrapper around the software implementation. + * + * The trapezoid specification is basically too hard to be done in hardware (at + * the very least, without programmability), so we just do the appropriate + * Prepare/FinishAccess for it before using fbtrap.c. + */ +void +exaRasterizeTrapezoid (PicturePtr pPicture, xTrapezoid *trap, + int x_off, int y_off) +{ + DrawablePtr pDraw = pPicture->pDrawable; + ExaMigrationRec pixmaps[1]; + int xoff, yoff; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = TRUE; + pixmaps[0].pPix = exaGetDrawablePixmap (pDraw); + exaDoMigration(pixmaps, 1, FALSE); + + exaPrepareAccess(pDraw, EXA_PREPARE_DEST); + fbRasterizeTrapezoid(pPicture, trap, x_off, y_off); + exaGetDrawableDeltas(pDraw, pixmaps[0].pPix, &xoff, &yoff); + exaPixmapDirty(pixmaps[0].pPix, pDraw->x + xoff, pDraw->y + yoff, + pDraw->x + xoff + pDraw->width, + pDraw->y + yoff + pDraw->height); + exaFinishAccess(pDraw, EXA_PREPARE_DEST); +} + +/** + * exaAddTriangles does migration and syncing before dumping down to the + * software implementation. + */ +void +exaAddTriangles (PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntri, + xTriangle *tris) +{ + DrawablePtr pDraw = pPicture->pDrawable; + ExaMigrationRec pixmaps[1]; + int xoff, yoff; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = TRUE; + pixmaps[0].pPix = exaGetDrawablePixmap (pDraw); + exaDoMigration(pixmaps, 1, FALSE); + + exaPrepareAccess(pDraw, EXA_PREPARE_DEST); + fbAddTriangles(pPicture, x_off, y_off, ntri, tris); + exaGetDrawableDeltas(pDraw, pixmaps[0].pPix, &xoff, &yoff); + exaPixmapDirty(pixmaps[0].pPix, pDraw->x + xoff, pDraw->y + yoff, + pDraw->x + xoff + pDraw->width, + pDraw->y + yoff + pDraw->height); + exaFinishAccess(pDraw, EXA_PREPARE_DEST); +} + +/** + * Returns TRUE if the glyphs in the lists intersect. Only checks based on + * bounding box, which appears to be good enough to catch most cases at least. + */ +static Bool +exaGlyphsIntersect(int nlist, GlyphListPtr list, GlyphPtr *glyphs) +{ + int x1, x2, y1, y2; + int n; + GlyphPtr glyph; + int x, y; + BoxRec extents; + Bool first = TRUE; + + x = 0; + y = 0; + while (nlist--) { + x += list->xOff; + y += list->yOff; + n = list->len; + list++; + while (n--) { + glyph = *glyphs++; + + if (glyph->info.width == 0 || glyph->info.height == 0) { + x += glyph->info.xOff; + y += glyph->info.yOff; + continue; + } + + x1 = x - glyph->info.x; + if (x1 < MINSHORT) + x1 = MINSHORT; + y1 = y - glyph->info.y; + if (y1 < MINSHORT) + y1 = MINSHORT; + x2 = x1 + glyph->info.width; + if (x2 > MAXSHORT) + x2 = MAXSHORT; + y2 = y1 + glyph->info.height; + if (y2 > MAXSHORT) + y2 = MAXSHORT; + + if (first) { + extents.x1 = x1; + extents.y1 = y1; + extents.x2 = x2; + extents.y2 = y2; + first = FALSE; + } else { + if (x1 < extents.x2 && x2 > extents.x1 && + y1 < extents.y2 && y2 > extents.y1) + { + return TRUE; + } + + if (x1 < extents.x1) + extents.x1 = x1; + if (x2 > extents.x2) + extents.x2 = x2; + if (y1 < extents.y1) + extents.y1 = y1; + if (y2 > extents.y2) + extents.y2 = y2; + } + x += glyph->info.xOff; + y += glyph->info.yOff; + } + } + + return FALSE; +} + +/* exaGlyphs is a slight variation on miGlyphs, to support acceleration. The + * issue is that miGlyphs' use of ModifyPixmapHeader makes it impossible to + * migrate these pixmaps. So, instead we create a pixmap at the beginning of + * the loop and upload each glyph into the pixmap before compositing. + */ +void +exaGlyphs (CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, + int nlist, + GlyphListPtr list, + GlyphPtr *glyphs) +{ + ExaScreenPriv (pDst->pDrawable->pScreen); + PixmapPtr pPixmap = NULL; + PicturePtr pPicture; + PixmapPtr pMaskPixmap = NULL; + PixmapPtr pDstPixmap = exaGetDrawablePixmap(pDst->pDrawable); + PicturePtr pMask; + ScreenPtr pScreen = pDst->pDrawable->pScreen; + int width = 0, height = 0; + int x, y, x1, y1, xoff, yoff; + int xDst = list->xOff, yDst = list->yOff; + int n; + int error; + BoxRec extents; + CARD32 component_alpha; + + /* If we have a mask format but it's the same as all the glyphs and + * the glyphs don't intersect, we can avoid accumulating the glyphs in the + * temporary picture. + */ + if (maskFormat != NULL) { + Bool sameFormat = TRUE; + int i; + + for (i = 0; i < nlist; i++) { + if (maskFormat->format != list[i].format->format) { + sameFormat = FALSE; + break; + } + } + if (sameFormat) { + if (!exaGlyphsIntersect(nlist, list, glyphs)) { + maskFormat = NULL; + } + } + } + + /* If the driver doesn't support accelerated composite, there's no point in + * going to this extra work. Assume that any driver that supports Composite + * will be able to support component alpha using the two-pass helper. + */ + if (!pExaScr->info->PrepareComposite) + { + miGlyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); + return; + } + + if (maskFormat) + { + GCPtr pGC; + xRectangle rect; + + miGlyphExtents (nlist, list, glyphs, &extents); + + extents.x1 = max(extents.x1, 0); + extents.y1 = max(extents.y1, 0); + extents.x2 = min(extents.x2, pDst->pDrawable->width); + extents.y2 = min(extents.y2, pDst->pDrawable->height); + + if (extents.x2 <= extents.x1 || extents.y2 <= extents.y1) + return; + width = extents.x2 - extents.x1; + height = extents.y2 - extents.y1; + pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, + maskFormat->depth); + if (!pMaskPixmap) + return; + component_alpha = NeedsComponent(maskFormat->format); + pMask = CreatePicture (0, &pMaskPixmap->drawable, + maskFormat, CPComponentAlpha, &component_alpha, + serverClient, &error); + if (!pMask) + { + (*pScreen->DestroyPixmap) (pMaskPixmap); + return; + } + ValidatePicture(pMask); + pGC = GetScratchGC (pMaskPixmap->drawable.depth, pScreen); + ValidateGC (&pMaskPixmap->drawable, pGC); + rect.x = 0; + rect.y = 0; + rect.width = width; + rect.height = height; + (*pGC->ops->PolyFillRect) (&pMaskPixmap->drawable, pGC, 1, &rect); + exaPixmapDirty(pMaskPixmap, 0, 0, width, height); + FreeScratchGC (pGC); + x = -extents.x1; + y = -extents.y1; + } + else + { + pMask = pDst; + x = 0; + y = 0; + } + + exaGetDrawableDeltas(pDst->pDrawable, pDstPixmap, &xoff, &yoff); + + while (nlist--) + { + GCPtr pGC = NULL; + int maxwidth = 0, maxheight = 0, i; + ExaMigrationRec pixmaps[1]; + PixmapPtr pScratchPixmap = NULL; + + x += list->xOff; + y += list->yOff; + n = list->len; + for (i = 0; i < n; i++) { + if (glyphs[i]->info.width > maxwidth) + maxwidth = glyphs[i]->info.width; + if (glyphs[i]->info.height > maxheight) + maxheight = glyphs[i]->info.height; + } + if (maxwidth == 0 || maxheight == 0) { + while (n--) + { + GlyphPtr glyph; + + glyph = *glyphs++; + x += glyph->info.xOff; + y += glyph->info.yOff; + } + list++; + continue; + } + + /* Create the (real) temporary pixmap to store the current glyph in */ + pPixmap = (*pScreen->CreatePixmap) (pScreen, maxwidth, maxheight, + list->format->depth); + if (!pPixmap) + return; + + /* Create a temporary picture to wrap the temporary pixmap, so it can be + * used as a source for Composite. + */ + component_alpha = NeedsComponent(list->format->format); + pPicture = CreatePicture (0, &pPixmap->drawable, list->format, + CPComponentAlpha, &component_alpha, + serverClient, &error); + if (!pPicture) { + (*pScreen->DestroyPixmap) (pPixmap); + return; + } + ValidatePicture(pPicture); + + /* Give the temporary pixmap an initial kick towards the screen, so + * it'll stick there. + */ + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = TRUE; + pixmaps[0].pPix = pPixmap; + exaDoMigration (pixmaps, 1, pExaScr->info->PrepareComposite != NULL); + + while (n--) + { + GlyphPtr glyph = *glyphs++; + pointer glyphdata = (pointer) (glyph + 1); + DrawablePtr pCmpDrw = (maskFormat ? pMask : pDst)->pDrawable; + + x1 = x - glyph->info.x; + y1 = y - glyph->info.y; + + if (x1 >= pCmpDrw->width || y1 >= pCmpDrw->height || + (x1 + glyph->info.width) <= 0 || (y1 + glyph->info.height) <= 0) + goto nextglyph; + + (*pScreen->ModifyPixmapHeader) (pScratchPixmap, + glyph->info.width, + glyph->info.height, + 0, 0, -1, glyphdata); + + /* Copy the glyph data into the proper pixmap instead of a fake. + * First we try to use UploadToScreen, if we can, then we fall back + * to a plain exaCopyArea in case of failure. + */ + if (pExaScr->info->UploadToScreen && + exaPixmapIsOffscreen(pPixmap) && + (*pExaScr->info->UploadToScreen) (pPixmap, 0, 0, + glyph->info.width, + glyph->info.height, + glyphdata, + PixmapBytePad(glyph->info.width, + list->format->depth))) + { + exaMarkSync (pScreen); + } else { + /* Set up the scratch pixmap/GC for doing a CopyArea. */ + if (pScratchPixmap == NULL) { + /* Get a scratch pixmap to wrap the original glyph data */ + pScratchPixmap = GetScratchPixmapHeader (pScreen, + glyph->info.width, + glyph->info.height, + list->format->depth, + list->format->depth, + -1, glyphdata); + if (!pScratchPixmap) { + FreePicture(pPicture, 0); + (*pScreen->DestroyPixmap) (pPixmap); + return; + } + + /* Get a scratch GC with which to copy the glyph data from + * scratch to temporary + */ + pGC = GetScratchGC (list->format->depth, pScreen); + ValidateGC (&pPixmap->drawable, pGC); + } else { + (*pScreen->ModifyPixmapHeader) (pScratchPixmap, + glyph->info.width, + glyph->info.height, + 0, 0, -1, glyphdata); + pScratchPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + } + + exaCopyArea (&pScratchPixmap->drawable, &pPixmap->drawable, pGC, + 0, 0, glyph->info.width, glyph->info.height, 0, 0); + } + + exaPixmapDirty (pPixmap, 0, 0, + glyph->info.width, glyph->info.height); + + if (maskFormat) + { + exaComposite (PictOpAdd, pPicture, NULL, pMask, 0, 0, 0, 0, + x1, y1, glyph->info.width, glyph->info.height); + exaPixmapDirty(pMaskPixmap, x1, y1, x1 + glyph->info.width, + y1 + glyph->info.height); + } + else + { + exaComposite (op, pSrc, pPicture, pDst, + xSrc + x1 - xDst, ySrc + y1 - yDst, + 0, 0, x1, y1, glyph->info.width, + glyph->info.height); + x1 += pDst->pDrawable->x + xoff; + y1 += pDst->pDrawable->y + yoff; + exaPixmapDirty(pDstPixmap, x1, y1, x1 + glyph->info.width, + y1 + glyph->info.height); + } +nextglyph: + x += glyph->info.xOff; + y += glyph->info.yOff; + } + list++; + if (pGC != NULL) + FreeScratchGC (pGC); + FreePicture ((pointer) pPicture, 0); + (*pScreen->DestroyPixmap) (pPixmap); + if (pScratchPixmap != NULL) + FreeScratchPixmapHeader (pScratchPixmap); + } + if (maskFormat) + { + x = extents.x1; + y = extents.y1; + exaComposite (op, pSrc, pMask, pDst, xSrc + x - xDst, ySrc + y - yDst, + 0, 0, x, y, width, height); + FreePicture ((pointer) pMask, (XID) 0); + (*pScreen->DestroyPixmap) (pMaskPixmap); + } +} diff --git a/xorg-server-1.4/exa/exa_unaccel.c b/xorg-server-1.4/exa/exa_unaccel.c new file mode 100644 index 0000000..a94648b --- /dev/null +++ b/xorg-server-1.4/exa/exa_unaccel.c @@ -0,0 +1,416 @@ +/* + * + * Copyright © 1999 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 "exa_priv.h" + +/* + * These functions wrap the low-level fb rendering functions and + * synchronize framebuffer/accelerated drawing by stalling until + * the accelerator is idle + */ + +/** + * Calls exaPrepareAccess with EXA_PREPARE_SRC for the tile, if that is the + * current fill style. + * + * Solid doesn't use an extra pixmap source, and Stippled/OpaqueStippled are + * 1bpp and never in fb, so we don't worry about them. + */ +void +exaPrepareAccessGC(GCPtr pGC) +{ + if (pGC->fillStyle == FillTiled) + exaPrepareAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC); +} + +/** + * Finishes access to the tile in the GC, if used. + */ +void +exaFinishAccessGC(GCPtr pGC) +{ + if (pGC->fillStyle == FillTiled) + exaFinishAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC); +} + +#if DEBUG_TRACE_FALL +char +exaDrawableLocation(DrawablePtr pDrawable) +{ + return exaDrawableIsOffscreen(pDrawable) ? 's' : 'm'; +} +#endif /* DEBUG_TRACE_FALL */ + +void +ExaCheckFillSpans (DrawablePtr pDrawable, GCPtr pGC, int nspans, + DDXPointPtr ppt, int *pwidth, int fSorted) +{ + EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC (pGC); + fbFillSpans (pDrawable, pGC, nspans, ppt, pwidth, fSorted); + exaFinishAccessGC (pGC); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); +} + +void +ExaCheckSetSpans (DrawablePtr pDrawable, GCPtr pGC, char *psrc, + DDXPointPtr ppt, int *pwidth, int nspans, int fSorted) +{ + EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + fbSetSpans (pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); +} + +void +ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, + int x, int y, int w, int h, int leftPad, int format, + char *bits) +{ + PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); + int xoff, yoff; + + EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff); + exaPixmapDirty(pPixmap, x + xoff, y + yoff, x + xoff + w, y + yoff + h); +} + +RegionPtr +ExaCheckCopyArea (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, + int srcx, int srcy, int w, int h, int dstx, int dsty) +{ + RegionPtr ret; + + EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst, + exaDrawableLocation(pSrc), exaDrawableLocation(pDst))); + exaPrepareAccess (pDst, EXA_PREPARE_DEST); + exaPrepareAccess (pSrc, EXA_PREPARE_SRC); + ret = fbCopyArea (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty); + exaFinishAccess (pSrc, EXA_PREPARE_SRC); + exaFinishAccess (pDst, EXA_PREPARE_DEST); + + return ret; +} + +RegionPtr +ExaCheckCopyPlane (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, + int srcx, int srcy, int w, int h, int dstx, int dsty, + unsigned long bitPlane) +{ + RegionPtr ret; + + EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst, + exaDrawableLocation(pSrc), exaDrawableLocation(pDst))); + exaPrepareAccess (pDst, EXA_PREPARE_DEST); + exaPrepareAccess (pSrc, EXA_PREPARE_SRC); + ret = fbCopyPlane (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, + bitPlane); + exaFinishAccess (pSrc, EXA_PREPARE_SRC); + exaFinishAccess (pDst, EXA_PREPARE_DEST); + + return ret; +} + +void +ExaCheckPolyPoint (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, + DDXPointPtr pptInit) +{ + EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + fbPolyPoint (pDrawable, pGC, mode, npt, pptInit); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); +} + +void +ExaCheckPolylines (DrawablePtr pDrawable, GCPtr pGC, + int mode, int npt, DDXPointPtr ppt) +{ + EXA_FALLBACK(("to %p (%c), width %d, mode %d, count %d\n", + pDrawable, exaDrawableLocation(pDrawable), + pGC->lineWidth, mode, npt)); + + if (pGC->lineWidth == 0) { + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC (pGC); + fbPolyLine (pDrawable, pGC, mode, npt, ppt); + exaFinishAccessGC (pGC); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + return; + } + /* fb calls mi functions in the lineWidth != 0 case. */ + fbPolyLine (pDrawable, pGC, mode, npt, ppt); +} + +void +ExaCheckPolySegment (DrawablePtr pDrawable, GCPtr pGC, + int nsegInit, xSegment *pSegInit) +{ + EXA_FALLBACK(("to %p (%c) width %d, count %d\n", pDrawable, + exaDrawableLocation(pDrawable), pGC->lineWidth, nsegInit)); + if (pGC->lineWidth == 0) { + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC (pGC); + fbPolySegment (pDrawable, pGC, nsegInit, pSegInit); + exaFinishAccessGC (pGC); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + return; + } + /* fb calls mi functions in the lineWidth != 0 case. */ + fbPolySegment (pDrawable, pGC, nsegInit, pSegInit); +} + +void +ExaCheckPolyArc (DrawablePtr pDrawable, GCPtr pGC, + int narcs, xArc *pArcs) +{ + EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + if (pGC->lineWidth == 0) + { + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC (pGC); + fbPolyArc (pDrawable, pGC, narcs, pArcs); + exaFinishAccessGC (pGC); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); + return; + } + miPolyArc (pDrawable, pGC, narcs, pArcs); +} + +void +ExaCheckPolyFillRect (DrawablePtr pDrawable, GCPtr pGC, + int nrect, xRectangle *prect) +{ + EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC (pGC); + fbPolyFillRect (pDrawable, pGC, nrect, prect); + exaFinishAccessGC (pGC); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); +} + +void +ExaCheckImageGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr *ppci, pointer pglyphBase) +{ + EXA_FALLBACK(("to %p (%c)\n", pDrawable, + exaDrawableLocation(pDrawable))); + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC (pGC); + fbImageGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); + exaFinishAccessGC (pGC); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); +} + +void +ExaCheckPolyGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr *ppci, pointer pglyphBase) +{ + EXA_FALLBACK(("to %p (%c), style %d alu %d\n", pDrawable, + exaDrawableLocation(pDrawable), pGC->fillStyle, pGC->alu)); + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC (pGC); + fbPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); + exaFinishAccessGC (pGC); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); +} + +void +ExaCheckPushPixels (GCPtr pGC, PixmapPtr pBitmap, + DrawablePtr pDrawable, + int w, int h, int x, int y) +{ + EXA_FALLBACK(("from %p to %p (%c,%c)\n", pBitmap, pDrawable, + exaDrawableLocation(&pBitmap->drawable), + exaDrawableLocation(pDrawable))); + exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC (pGC); + fbPushPixels (pGC, pBitmap, pDrawable, w, h, x, y); + exaFinishAccessGC (pGC); + exaFinishAccess (pDrawable, EXA_PREPARE_DEST); +} + +void +ExaCheckGetImage (DrawablePtr pDrawable, + int x, int y, int w, int h, + unsigned int format, unsigned long planeMask, + char *d) +{ + EXA_FALLBACK(("from %p (%c)\n", pDrawable, + exaDrawableLocation(pDrawable))); + exaPrepareAccess (pDrawable, EXA_PREPARE_SRC); + fbGetImage (pDrawable, x, y, w, h, format, planeMask, d); + exaFinishAccess (pDrawable, EXA_PREPARE_SRC); +} + +void +ExaCheckGetSpans (DrawablePtr pDrawable, + int wMax, + DDXPointPtr ppt, + int *pwidth, + int nspans, + char *pdstStart) +{ + EXA_FALLBACK(("from %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + exaPrepareAccess (pDrawable, EXA_PREPARE_SRC); + fbGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart); + exaFinishAccess (pDrawable, EXA_PREPARE_SRC); +} + +void +ExaCheckSaveAreas (PixmapPtr pPixmap, + RegionPtr prgnSave, + int xorg, + int yorg, + WindowPtr pWin) +{ + EXA_FALLBACK(("from %p (%c)\n", &pPixmap->drawable, + exaDrawableLocation(&pPixmap->drawable))); + exaPrepareAccess ((DrawablePtr)pPixmap, EXA_PREPARE_DEST); + fbSaveAreas (pPixmap, prgnSave, xorg, yorg, pWin); + exaFinishAccess ((DrawablePtr)pPixmap, EXA_PREPARE_DEST); +} + +void +ExaCheckRestoreAreas (PixmapPtr pPixmap, + RegionPtr prgnSave, + int xorg, + int yorg, + WindowPtr pWin) +{ + EXA_FALLBACK(("to %p (%c)\n", &pPixmap->drawable, + exaDrawableLocation(&pPixmap->drawable))); + exaPrepareAccess ((DrawablePtr)pPixmap, EXA_PREPARE_DEST); + fbRestoreAreas (pPixmap, prgnSave, xorg, yorg, pWin); + exaFinishAccess ((DrawablePtr)pPixmap, EXA_PREPARE_DEST); +} + +/* XXX: Note the lack of a prepare on the tile, if the window has a tiled + * background. This function happens to only be called if pExaScr->swappedOut, + * so we actually end up not having to do it since the tile won't be in fb. + * That doesn't make this not dirty, though. + */ +void +ExaCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what) +{ + EXA_FALLBACK(("from %p (%c)\n", pWin, + exaDrawableLocation(&pWin->drawable))); + exaPrepareAccess (&pWin->drawable, EXA_PREPARE_DEST); + fbPaintWindow (pWin, pRegion, what); + exaFinishAccess (&pWin->drawable, EXA_PREPARE_DEST); +} + +void +ExaCheckComposite (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) +{ + EXA_FALLBACK(("from picts %p/%p to pict %p\n", + pSrc, pMask, pDst)); + exaPrepareAccess (pDst->pDrawable, EXA_PREPARE_DEST); + if (pSrc->pDrawable != NULL) + exaPrepareAccess (pSrc->pDrawable, EXA_PREPARE_SRC); + if (pMask && pMask->pDrawable != NULL) + exaPrepareAccess (pMask->pDrawable, EXA_PREPARE_MASK); + fbComposite (op, + pSrc, + pMask, + pDst, + xSrc, + ySrc, + xMask, + yMask, + xDst, + yDst, + width, + height); + if (pMask && pMask->pDrawable != NULL) + exaFinishAccess (pMask->pDrawable, EXA_PREPARE_MASK); + if (pSrc->pDrawable != NULL) + exaFinishAccess (pSrc->pDrawable, EXA_PREPARE_SRC); + exaFinishAccess (pDst->pDrawable, EXA_PREPARE_DEST); +} + +/** + * Gets the 0,0 pixel of a pixmap. Used for doing solid fills of tiled pixmaps + * that happen to be 1x1. Pixmap must be at least 8bpp. + * + * XXX This really belongs in fb, so it can be aware of tiling and etc. + */ +CARD32 +exaGetPixmapFirstPixel (PixmapPtr pPixmap) +{ + CARD32 pixel; + void *fb; + Bool need_finish = FALSE; + BoxRec box; + ExaMigrationRec pixmaps[1]; + ExaPixmapPriv (pPixmap); + + fb = pExaPixmap->sys_ptr; + + /* Try to avoid framebuffer readbacks */ + if (exaPixmapIsOffscreen(pPixmap) && + miPointInRegion(DamageRegion(pExaPixmap->pDamage), 0, 0, &box)) + { + need_finish = TRUE; + pixmaps[0].as_dst = FALSE; + pixmaps[0].as_src = TRUE; + pixmaps[0].pPix = pPixmap; + exaDoMigration (pixmaps, 1, FALSE); + exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_SRC); + fb = pPixmap->devPrivate.ptr; + } + + switch (pPixmap->drawable.bitsPerPixel) { + case 32: + pixel = *(CARD32 *)fb; + break; + case 16: + pixel = *(CARD16 *)fb; + break; + default: + pixel = *(CARD8 *)fb; + break; + } + + if (need_finish) + exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC); + + return pixel; +} diff --git a/xorg-server-1.4/fb/Makefile.am b/xorg-server-1.4/fb/Makefile.am new file mode 100644 index 0000000..75861a3 --- /dev/null +++ b/xorg-server-1.4/fb/Makefile.am @@ -0,0 +1,59 @@ +noinst_LTLIBRARIES = libfb.la libwfb.la + +INCLUDES = \ + -I$(top_srcdir)/hw/xfree86/os-support \ + -I$(top_srcdir)/hw/xfree86/os-support/bus \ + -I$(top_srcdir)/hw/xfree86/common +AM_CFLAGS = $(DIX_CFLAGS) + +if XORG +sdk_HEADERS = fb.h fbrop.h fbpseudocolor.h fboverlay.h wfbrename.h +endif + +libfb_la_CFLAGS = $(AM_CFLAGS) + +libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER + +libfb_la_SOURCES = \ + fb.h \ + fb24_32.c \ + fb24_32.h \ + fballpriv.c \ + fbarc.c \ + fbbits.c \ + fbbits.h \ + fbblt.c \ + fbbltone.c \ + fbbstore.c \ + fbcopy.c \ + fbfill.c \ + fbfillrect.c \ + fbfillsp.c \ + fbgc.c \ + fbgetsp.c \ + fbglyph.c \ + fbimage.c \ + fbline.c \ + fboverlay.c \ + fboverlay.h \ + fbpict.c \ + fbpict.h \ + fbpixmap.c \ + fbpoint.c \ + fbpush.c \ + fbrop.h \ + fbscreen.c \ + fbseg.c \ + fbsetsp.c \ + fbsolid.c \ + fbstipple.c \ + fbtile.c \ + fbtrap.c \ + fbutil.c \ + fbwindow.c \ + fbpseudocolor.c \ + fbpseudocolor.h + +libwfb_la_SOURCES = $(libfb_la_SOURCES) + +EXTRA_DIST = fbcmap.c fbcmap_mi.c diff --git a/xorg-server-1.4/fb/Makefile.in b/xorg-server-1.4/fb/Makefile.in new file mode 100644 index 0000000..8a0ca0c --- /dev/null +++ b/xorg-server-1.4/fb/Makefile.in @@ -0,0 +1,1231 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = fb +DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libfb_la_LIBADD = +am_libfb_la_OBJECTS = libfb_la-fb24_32.lo libfb_la-fballpriv.lo \ + libfb_la-fbarc.lo libfb_la-fbbits.lo libfb_la-fbblt.lo \ + libfb_la-fbbltone.lo libfb_la-fbbstore.lo libfb_la-fbcopy.lo \ + libfb_la-fbfill.lo libfb_la-fbfillrect.lo libfb_la-fbfillsp.lo \ + libfb_la-fbgc.lo libfb_la-fbgetsp.lo libfb_la-fbglyph.lo \ + libfb_la-fbimage.lo libfb_la-fbline.lo libfb_la-fboverlay.lo \ + libfb_la-fbpict.lo libfb_la-fbpixmap.lo libfb_la-fbpoint.lo \ + libfb_la-fbpush.lo libfb_la-fbscreen.lo libfb_la-fbseg.lo \ + libfb_la-fbsetsp.lo libfb_la-fbsolid.lo libfb_la-fbstipple.lo \ + libfb_la-fbtile.lo libfb_la-fbtrap.lo libfb_la-fbutil.lo \ + libfb_la-fbwindow.lo libfb_la-fbpseudocolor.lo +libfb_la_OBJECTS = $(am_libfb_la_OBJECTS) +libfb_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(libfb_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +libwfb_la_LIBADD = +am__objects_1 = libwfb_la-fb24_32.lo libwfb_la-fballpriv.lo \ + libwfb_la-fbarc.lo libwfb_la-fbbits.lo libwfb_la-fbblt.lo \ + libwfb_la-fbbltone.lo libwfb_la-fbbstore.lo \ + libwfb_la-fbcopy.lo libwfb_la-fbfill.lo \ + libwfb_la-fbfillrect.lo libwfb_la-fbfillsp.lo \ + libwfb_la-fbgc.lo libwfb_la-fbgetsp.lo libwfb_la-fbglyph.lo \ + libwfb_la-fbimage.lo libwfb_la-fbline.lo \ + libwfb_la-fboverlay.lo libwfb_la-fbpict.lo \ + libwfb_la-fbpixmap.lo libwfb_la-fbpoint.lo libwfb_la-fbpush.lo \ + libwfb_la-fbscreen.lo libwfb_la-fbseg.lo libwfb_la-fbsetsp.lo \ + libwfb_la-fbsolid.lo libwfb_la-fbstipple.lo \ + libwfb_la-fbtile.lo libwfb_la-fbtrap.lo libwfb_la-fbutil.lo \ + libwfb_la-fbwindow.lo libwfb_la-fbpseudocolor.lo +am_libwfb_la_OBJECTS = $(am__objects_1) +libwfb_la_OBJECTS = $(am_libwfb_la_OBJECTS) +libwfb_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libwfb_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libfb_la_SOURCES) $(libwfb_la_SOURCES) +DIST_SOURCES = $(libfb_la_SOURCES) $(libwfb_la_SOURCES) +am__sdk_HEADERS_DIST = fb.h fbrop.h fbpseudocolor.h fboverlay.h \ + wfbrename.h +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(sdkdir)" +sdkHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(sdk_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LTLIBRARIES = libfb.la libwfb.la +INCLUDES = \ + -I$(top_srcdir)/hw/xfree86/os-support \ + -I$(top_srcdir)/hw/xfree86/os-support/bus \ + -I$(top_srcdir)/hw/xfree86/common + +AM_CFLAGS = $(DIX_CFLAGS) +@XORG_TRUE@sdk_HEADERS = fb.h fbrop.h fbpseudocolor.h fboverlay.h wfbrename.h +libfb_la_CFLAGS = $(AM_CFLAGS) +libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER +libfb_la_SOURCES = \ + fb.h \ + fb24_32.c \ + fb24_32.h \ + fballpriv.c \ + fbarc.c \ + fbbits.c \ + fbbits.h \ + fbblt.c \ + fbbltone.c \ + fbbstore.c \ + fbcopy.c \ + fbfill.c \ + fbfillrect.c \ + fbfillsp.c \ + fbgc.c \ + fbgetsp.c \ + fbglyph.c \ + fbimage.c \ + fbline.c \ + fboverlay.c \ + fboverlay.h \ + fbpict.c \ + fbpict.h \ + fbpixmap.c \ + fbpoint.c \ + fbpush.c \ + fbrop.h \ + fbscreen.c \ + fbseg.c \ + fbsetsp.c \ + fbsolid.c \ + fbstipple.c \ + fbtile.c \ + fbtrap.c \ + fbutil.c \ + fbwindow.c \ + fbpseudocolor.c \ + fbpseudocolor.h + +libwfb_la_SOURCES = $(libfb_la_SOURCES) +EXTRA_DIST = fbcmap.c fbcmap_mi.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fb/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign fb/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libfb.la: $(libfb_la_OBJECTS) $(libfb_la_DEPENDENCIES) + $(libfb_la_LINK) $(libfb_la_OBJECTS) $(libfb_la_LIBADD) $(LIBS) +libwfb.la: $(libwfb_la_OBJECTS) $(libwfb_la_DEPENDENCIES) + $(libwfb_la_LINK) $(libwfb_la_OBJECTS) $(libwfb_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fb24_32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fballpriv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbarc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbbits.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbblt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbbltone.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbbstore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbcopy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbfill.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbfillrect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbfillsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbgc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbgetsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbglyph.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbimage.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fboverlay.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbpict.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbpixmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbpoint.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbpseudocolor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbpush.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbscreen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbseg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbsetsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbsolid.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbstipple.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbtile.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbtrap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbutil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbwindow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fb24_32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fballpriv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbarc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbbits.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbblt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbbltone.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbbstore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbcopy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbfill.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbfillrect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbfillsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbgc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbgetsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbglyph.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbimage.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fboverlay.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbpict.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbpixmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbpoint.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbpseudocolor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbpush.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbscreen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbseg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbsetsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbsolid.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbstipple.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbtile.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbtrap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbutil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbwindow.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libfb_la-fb24_32.lo: fb24_32.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fb24_32.lo -MD -MP -MF $(DEPDIR)/libfb_la-fb24_32.Tpo -c -o libfb_la-fb24_32.lo `test -f 'fb24_32.c' || echo '$(srcdir)/'`fb24_32.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fb24_32.Tpo $(DEPDIR)/libfb_la-fb24_32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fb24_32.c' object='libfb_la-fb24_32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fb24_32.lo `test -f 'fb24_32.c' || echo '$(srcdir)/'`fb24_32.c + +libfb_la-fballpriv.lo: fballpriv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fballpriv.lo -MD -MP -MF $(DEPDIR)/libfb_la-fballpriv.Tpo -c -o libfb_la-fballpriv.lo `test -f 'fballpriv.c' || echo '$(srcdir)/'`fballpriv.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fballpriv.Tpo $(DEPDIR)/libfb_la-fballpriv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fballpriv.c' object='libfb_la-fballpriv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fballpriv.lo `test -f 'fballpriv.c' || echo '$(srcdir)/'`fballpriv.c + +libfb_la-fbarc.lo: fbarc.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbarc.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbarc.Tpo -c -o libfb_la-fbarc.lo `test -f 'fbarc.c' || echo '$(srcdir)/'`fbarc.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbarc.Tpo $(DEPDIR)/libfb_la-fbarc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbarc.c' object='libfb_la-fbarc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbarc.lo `test -f 'fbarc.c' || echo '$(srcdir)/'`fbarc.c + +libfb_la-fbbits.lo: fbbits.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbbits.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbbits.Tpo -c -o libfb_la-fbbits.lo `test -f 'fbbits.c' || echo '$(srcdir)/'`fbbits.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbbits.Tpo $(DEPDIR)/libfb_la-fbbits.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbbits.c' object='libfb_la-fbbits.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbbits.lo `test -f 'fbbits.c' || echo '$(srcdir)/'`fbbits.c + +libfb_la-fbblt.lo: fbblt.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbblt.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbblt.Tpo -c -o libfb_la-fbblt.lo `test -f 'fbblt.c' || echo '$(srcdir)/'`fbblt.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbblt.Tpo $(DEPDIR)/libfb_la-fbblt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbblt.c' object='libfb_la-fbblt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbblt.lo `test -f 'fbblt.c' || echo '$(srcdir)/'`fbblt.c + +libfb_la-fbbltone.lo: fbbltone.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbbltone.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbbltone.Tpo -c -o libfb_la-fbbltone.lo `test -f 'fbbltone.c' || echo '$(srcdir)/'`fbbltone.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbbltone.Tpo $(DEPDIR)/libfb_la-fbbltone.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbbltone.c' object='libfb_la-fbbltone.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbbltone.lo `test -f 'fbbltone.c' || echo '$(srcdir)/'`fbbltone.c + +libfb_la-fbbstore.lo: fbbstore.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbbstore.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbbstore.Tpo -c -o libfb_la-fbbstore.lo `test -f 'fbbstore.c' || echo '$(srcdir)/'`fbbstore.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbbstore.Tpo $(DEPDIR)/libfb_la-fbbstore.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbbstore.c' object='libfb_la-fbbstore.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbbstore.lo `test -f 'fbbstore.c' || echo '$(srcdir)/'`fbbstore.c + +libfb_la-fbcopy.lo: fbcopy.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbcopy.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbcopy.Tpo -c -o libfb_la-fbcopy.lo `test -f 'fbcopy.c' || echo '$(srcdir)/'`fbcopy.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbcopy.Tpo $(DEPDIR)/libfb_la-fbcopy.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbcopy.c' object='libfb_la-fbcopy.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbcopy.lo `test -f 'fbcopy.c' || echo '$(srcdir)/'`fbcopy.c + +libfb_la-fbfill.lo: fbfill.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbfill.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbfill.Tpo -c -o libfb_la-fbfill.lo `test -f 'fbfill.c' || echo '$(srcdir)/'`fbfill.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbfill.Tpo $(DEPDIR)/libfb_la-fbfill.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbfill.c' object='libfb_la-fbfill.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbfill.lo `test -f 'fbfill.c' || echo '$(srcdir)/'`fbfill.c + +libfb_la-fbfillrect.lo: fbfillrect.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbfillrect.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbfillrect.Tpo -c -o libfb_la-fbfillrect.lo `test -f 'fbfillrect.c' || echo '$(srcdir)/'`fbfillrect.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbfillrect.Tpo $(DEPDIR)/libfb_la-fbfillrect.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbfillrect.c' object='libfb_la-fbfillrect.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbfillrect.lo `test -f 'fbfillrect.c' || echo '$(srcdir)/'`fbfillrect.c + +libfb_la-fbfillsp.lo: fbfillsp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbfillsp.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbfillsp.Tpo -c -o libfb_la-fbfillsp.lo `test -f 'fbfillsp.c' || echo '$(srcdir)/'`fbfillsp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbfillsp.Tpo $(DEPDIR)/libfb_la-fbfillsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbfillsp.c' object='libfb_la-fbfillsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbfillsp.lo `test -f 'fbfillsp.c' || echo '$(srcdir)/'`fbfillsp.c + +libfb_la-fbgc.lo: fbgc.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbgc.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbgc.Tpo -c -o libfb_la-fbgc.lo `test -f 'fbgc.c' || echo '$(srcdir)/'`fbgc.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbgc.Tpo $(DEPDIR)/libfb_la-fbgc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbgc.c' object='libfb_la-fbgc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbgc.lo `test -f 'fbgc.c' || echo '$(srcdir)/'`fbgc.c + +libfb_la-fbgetsp.lo: fbgetsp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbgetsp.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbgetsp.Tpo -c -o libfb_la-fbgetsp.lo `test -f 'fbgetsp.c' || echo '$(srcdir)/'`fbgetsp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbgetsp.Tpo $(DEPDIR)/libfb_la-fbgetsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbgetsp.c' object='libfb_la-fbgetsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbgetsp.lo `test -f 'fbgetsp.c' || echo '$(srcdir)/'`fbgetsp.c + +libfb_la-fbglyph.lo: fbglyph.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbglyph.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbglyph.Tpo -c -o libfb_la-fbglyph.lo `test -f 'fbglyph.c' || echo '$(srcdir)/'`fbglyph.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbglyph.Tpo $(DEPDIR)/libfb_la-fbglyph.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbglyph.c' object='libfb_la-fbglyph.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbglyph.lo `test -f 'fbglyph.c' || echo '$(srcdir)/'`fbglyph.c + +libfb_la-fbimage.lo: fbimage.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbimage.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbimage.Tpo -c -o libfb_la-fbimage.lo `test -f 'fbimage.c' || echo '$(srcdir)/'`fbimage.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbimage.Tpo $(DEPDIR)/libfb_la-fbimage.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbimage.c' object='libfb_la-fbimage.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbimage.lo `test -f 'fbimage.c' || echo '$(srcdir)/'`fbimage.c + +libfb_la-fbline.lo: fbline.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbline.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbline.Tpo -c -o libfb_la-fbline.lo `test -f 'fbline.c' || echo '$(srcdir)/'`fbline.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbline.Tpo $(DEPDIR)/libfb_la-fbline.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbline.c' object='libfb_la-fbline.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbline.lo `test -f 'fbline.c' || echo '$(srcdir)/'`fbline.c + +libfb_la-fboverlay.lo: fboverlay.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fboverlay.lo -MD -MP -MF $(DEPDIR)/libfb_la-fboverlay.Tpo -c -o libfb_la-fboverlay.lo `test -f 'fboverlay.c' || echo '$(srcdir)/'`fboverlay.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fboverlay.Tpo $(DEPDIR)/libfb_la-fboverlay.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fboverlay.c' object='libfb_la-fboverlay.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fboverlay.lo `test -f 'fboverlay.c' || echo '$(srcdir)/'`fboverlay.c + +libfb_la-fbpict.lo: fbpict.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbpict.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbpict.Tpo -c -o libfb_la-fbpict.lo `test -f 'fbpict.c' || echo '$(srcdir)/'`fbpict.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbpict.Tpo $(DEPDIR)/libfb_la-fbpict.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbpict.c' object='libfb_la-fbpict.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbpict.lo `test -f 'fbpict.c' || echo '$(srcdir)/'`fbpict.c + +libfb_la-fbpixmap.lo: fbpixmap.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbpixmap.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbpixmap.Tpo -c -o libfb_la-fbpixmap.lo `test -f 'fbpixmap.c' || echo '$(srcdir)/'`fbpixmap.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbpixmap.Tpo $(DEPDIR)/libfb_la-fbpixmap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbpixmap.c' object='libfb_la-fbpixmap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbpixmap.lo `test -f 'fbpixmap.c' || echo '$(srcdir)/'`fbpixmap.c + +libfb_la-fbpoint.lo: fbpoint.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbpoint.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbpoint.Tpo -c -o libfb_la-fbpoint.lo `test -f 'fbpoint.c' || echo '$(srcdir)/'`fbpoint.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbpoint.Tpo $(DEPDIR)/libfb_la-fbpoint.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbpoint.c' object='libfb_la-fbpoint.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbpoint.lo `test -f 'fbpoint.c' || echo '$(srcdir)/'`fbpoint.c + +libfb_la-fbpush.lo: fbpush.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbpush.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbpush.Tpo -c -o libfb_la-fbpush.lo `test -f 'fbpush.c' || echo '$(srcdir)/'`fbpush.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbpush.Tpo $(DEPDIR)/libfb_la-fbpush.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbpush.c' object='libfb_la-fbpush.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbpush.lo `test -f 'fbpush.c' || echo '$(srcdir)/'`fbpush.c + +libfb_la-fbscreen.lo: fbscreen.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbscreen.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbscreen.Tpo -c -o libfb_la-fbscreen.lo `test -f 'fbscreen.c' || echo '$(srcdir)/'`fbscreen.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbscreen.Tpo $(DEPDIR)/libfb_la-fbscreen.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbscreen.c' object='libfb_la-fbscreen.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbscreen.lo `test -f 'fbscreen.c' || echo '$(srcdir)/'`fbscreen.c + +libfb_la-fbseg.lo: fbseg.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbseg.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbseg.Tpo -c -o libfb_la-fbseg.lo `test -f 'fbseg.c' || echo '$(srcdir)/'`fbseg.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbseg.Tpo $(DEPDIR)/libfb_la-fbseg.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbseg.c' object='libfb_la-fbseg.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbseg.lo `test -f 'fbseg.c' || echo '$(srcdir)/'`fbseg.c + +libfb_la-fbsetsp.lo: fbsetsp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbsetsp.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbsetsp.Tpo -c -o libfb_la-fbsetsp.lo `test -f 'fbsetsp.c' || echo '$(srcdir)/'`fbsetsp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbsetsp.Tpo $(DEPDIR)/libfb_la-fbsetsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbsetsp.c' object='libfb_la-fbsetsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbsetsp.lo `test -f 'fbsetsp.c' || echo '$(srcdir)/'`fbsetsp.c + +libfb_la-fbsolid.lo: fbsolid.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbsolid.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbsolid.Tpo -c -o libfb_la-fbsolid.lo `test -f 'fbsolid.c' || echo '$(srcdir)/'`fbsolid.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbsolid.Tpo $(DEPDIR)/libfb_la-fbsolid.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbsolid.c' object='libfb_la-fbsolid.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbsolid.lo `test -f 'fbsolid.c' || echo '$(srcdir)/'`fbsolid.c + +libfb_la-fbstipple.lo: fbstipple.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbstipple.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbstipple.Tpo -c -o libfb_la-fbstipple.lo `test -f 'fbstipple.c' || echo '$(srcdir)/'`fbstipple.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbstipple.Tpo $(DEPDIR)/libfb_la-fbstipple.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbstipple.c' object='libfb_la-fbstipple.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbstipple.lo `test -f 'fbstipple.c' || echo '$(srcdir)/'`fbstipple.c + +libfb_la-fbtile.lo: fbtile.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbtile.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbtile.Tpo -c -o libfb_la-fbtile.lo `test -f 'fbtile.c' || echo '$(srcdir)/'`fbtile.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbtile.Tpo $(DEPDIR)/libfb_la-fbtile.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbtile.c' object='libfb_la-fbtile.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbtile.lo `test -f 'fbtile.c' || echo '$(srcdir)/'`fbtile.c + +libfb_la-fbtrap.lo: fbtrap.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbtrap.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbtrap.Tpo -c -o libfb_la-fbtrap.lo `test -f 'fbtrap.c' || echo '$(srcdir)/'`fbtrap.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbtrap.Tpo $(DEPDIR)/libfb_la-fbtrap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbtrap.c' object='libfb_la-fbtrap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbtrap.lo `test -f 'fbtrap.c' || echo '$(srcdir)/'`fbtrap.c + +libfb_la-fbutil.lo: fbutil.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbutil.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbutil.Tpo -c -o libfb_la-fbutil.lo `test -f 'fbutil.c' || echo '$(srcdir)/'`fbutil.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbutil.Tpo $(DEPDIR)/libfb_la-fbutil.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbutil.c' object='libfb_la-fbutil.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbutil.lo `test -f 'fbutil.c' || echo '$(srcdir)/'`fbutil.c + +libfb_la-fbwindow.lo: fbwindow.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbwindow.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbwindow.Tpo -c -o libfb_la-fbwindow.lo `test -f 'fbwindow.c' || echo '$(srcdir)/'`fbwindow.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbwindow.Tpo $(DEPDIR)/libfb_la-fbwindow.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbwindow.c' object='libfb_la-fbwindow.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbwindow.lo `test -f 'fbwindow.c' || echo '$(srcdir)/'`fbwindow.c + +libfb_la-fbpseudocolor.lo: fbpseudocolor.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbpseudocolor.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbpseudocolor.Tpo -c -o libfb_la-fbpseudocolor.lo `test -f 'fbpseudocolor.c' || echo '$(srcdir)/'`fbpseudocolor.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfb_la-fbpseudocolor.Tpo $(DEPDIR)/libfb_la-fbpseudocolor.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbpseudocolor.c' object='libfb_la-fbpseudocolor.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbpseudocolor.lo `test -f 'fbpseudocolor.c' || echo '$(srcdir)/'`fbpseudocolor.c + +libwfb_la-fb24_32.lo: fb24_32.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fb24_32.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fb24_32.Tpo -c -o libwfb_la-fb24_32.lo `test -f 'fb24_32.c' || echo '$(srcdir)/'`fb24_32.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fb24_32.Tpo $(DEPDIR)/libwfb_la-fb24_32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fb24_32.c' object='libwfb_la-fb24_32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fb24_32.lo `test -f 'fb24_32.c' || echo '$(srcdir)/'`fb24_32.c + +libwfb_la-fballpriv.lo: fballpriv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fballpriv.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fballpriv.Tpo -c -o libwfb_la-fballpriv.lo `test -f 'fballpriv.c' || echo '$(srcdir)/'`fballpriv.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fballpriv.Tpo $(DEPDIR)/libwfb_la-fballpriv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fballpriv.c' object='libwfb_la-fballpriv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fballpriv.lo `test -f 'fballpriv.c' || echo '$(srcdir)/'`fballpriv.c + +libwfb_la-fbarc.lo: fbarc.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbarc.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbarc.Tpo -c -o libwfb_la-fbarc.lo `test -f 'fbarc.c' || echo '$(srcdir)/'`fbarc.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbarc.Tpo $(DEPDIR)/libwfb_la-fbarc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbarc.c' object='libwfb_la-fbarc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbarc.lo `test -f 'fbarc.c' || echo '$(srcdir)/'`fbarc.c + +libwfb_la-fbbits.lo: fbbits.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbbits.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbbits.Tpo -c -o libwfb_la-fbbits.lo `test -f 'fbbits.c' || echo '$(srcdir)/'`fbbits.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbbits.Tpo $(DEPDIR)/libwfb_la-fbbits.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbbits.c' object='libwfb_la-fbbits.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbbits.lo `test -f 'fbbits.c' || echo '$(srcdir)/'`fbbits.c + +libwfb_la-fbblt.lo: fbblt.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbblt.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbblt.Tpo -c -o libwfb_la-fbblt.lo `test -f 'fbblt.c' || echo '$(srcdir)/'`fbblt.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbblt.Tpo $(DEPDIR)/libwfb_la-fbblt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbblt.c' object='libwfb_la-fbblt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbblt.lo `test -f 'fbblt.c' || echo '$(srcdir)/'`fbblt.c + +libwfb_la-fbbltone.lo: fbbltone.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbbltone.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbbltone.Tpo -c -o libwfb_la-fbbltone.lo `test -f 'fbbltone.c' || echo '$(srcdir)/'`fbbltone.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbbltone.Tpo $(DEPDIR)/libwfb_la-fbbltone.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbbltone.c' object='libwfb_la-fbbltone.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbbltone.lo `test -f 'fbbltone.c' || echo '$(srcdir)/'`fbbltone.c + +libwfb_la-fbbstore.lo: fbbstore.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbbstore.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbbstore.Tpo -c -o libwfb_la-fbbstore.lo `test -f 'fbbstore.c' || echo '$(srcdir)/'`fbbstore.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbbstore.Tpo $(DEPDIR)/libwfb_la-fbbstore.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbbstore.c' object='libwfb_la-fbbstore.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbbstore.lo `test -f 'fbbstore.c' || echo '$(srcdir)/'`fbbstore.c + +libwfb_la-fbcopy.lo: fbcopy.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbcopy.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbcopy.Tpo -c -o libwfb_la-fbcopy.lo `test -f 'fbcopy.c' || echo '$(srcdir)/'`fbcopy.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbcopy.Tpo $(DEPDIR)/libwfb_la-fbcopy.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbcopy.c' object='libwfb_la-fbcopy.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbcopy.lo `test -f 'fbcopy.c' || echo '$(srcdir)/'`fbcopy.c + +libwfb_la-fbfill.lo: fbfill.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbfill.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbfill.Tpo -c -o libwfb_la-fbfill.lo `test -f 'fbfill.c' || echo '$(srcdir)/'`fbfill.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbfill.Tpo $(DEPDIR)/libwfb_la-fbfill.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbfill.c' object='libwfb_la-fbfill.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbfill.lo `test -f 'fbfill.c' || echo '$(srcdir)/'`fbfill.c + +libwfb_la-fbfillrect.lo: fbfillrect.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbfillrect.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbfillrect.Tpo -c -o libwfb_la-fbfillrect.lo `test -f 'fbfillrect.c' || echo '$(srcdir)/'`fbfillrect.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbfillrect.Tpo $(DEPDIR)/libwfb_la-fbfillrect.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbfillrect.c' object='libwfb_la-fbfillrect.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbfillrect.lo `test -f 'fbfillrect.c' || echo '$(srcdir)/'`fbfillrect.c + +libwfb_la-fbfillsp.lo: fbfillsp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbfillsp.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbfillsp.Tpo -c -o libwfb_la-fbfillsp.lo `test -f 'fbfillsp.c' || echo '$(srcdir)/'`fbfillsp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbfillsp.Tpo $(DEPDIR)/libwfb_la-fbfillsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbfillsp.c' object='libwfb_la-fbfillsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbfillsp.lo `test -f 'fbfillsp.c' || echo '$(srcdir)/'`fbfillsp.c + +libwfb_la-fbgc.lo: fbgc.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbgc.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbgc.Tpo -c -o libwfb_la-fbgc.lo `test -f 'fbgc.c' || echo '$(srcdir)/'`fbgc.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbgc.Tpo $(DEPDIR)/libwfb_la-fbgc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbgc.c' object='libwfb_la-fbgc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbgc.lo `test -f 'fbgc.c' || echo '$(srcdir)/'`fbgc.c + +libwfb_la-fbgetsp.lo: fbgetsp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbgetsp.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbgetsp.Tpo -c -o libwfb_la-fbgetsp.lo `test -f 'fbgetsp.c' || echo '$(srcdir)/'`fbgetsp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbgetsp.Tpo $(DEPDIR)/libwfb_la-fbgetsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbgetsp.c' object='libwfb_la-fbgetsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbgetsp.lo `test -f 'fbgetsp.c' || echo '$(srcdir)/'`fbgetsp.c + +libwfb_la-fbglyph.lo: fbglyph.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbglyph.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbglyph.Tpo -c -o libwfb_la-fbglyph.lo `test -f 'fbglyph.c' || echo '$(srcdir)/'`fbglyph.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbglyph.Tpo $(DEPDIR)/libwfb_la-fbglyph.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbglyph.c' object='libwfb_la-fbglyph.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbglyph.lo `test -f 'fbglyph.c' || echo '$(srcdir)/'`fbglyph.c + +libwfb_la-fbimage.lo: fbimage.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbimage.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbimage.Tpo -c -o libwfb_la-fbimage.lo `test -f 'fbimage.c' || echo '$(srcdir)/'`fbimage.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbimage.Tpo $(DEPDIR)/libwfb_la-fbimage.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbimage.c' object='libwfb_la-fbimage.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbimage.lo `test -f 'fbimage.c' || echo '$(srcdir)/'`fbimage.c + +libwfb_la-fbline.lo: fbline.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbline.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbline.Tpo -c -o libwfb_la-fbline.lo `test -f 'fbline.c' || echo '$(srcdir)/'`fbline.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbline.Tpo $(DEPDIR)/libwfb_la-fbline.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbline.c' object='libwfb_la-fbline.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbline.lo `test -f 'fbline.c' || echo '$(srcdir)/'`fbline.c + +libwfb_la-fboverlay.lo: fboverlay.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fboverlay.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fboverlay.Tpo -c -o libwfb_la-fboverlay.lo `test -f 'fboverlay.c' || echo '$(srcdir)/'`fboverlay.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fboverlay.Tpo $(DEPDIR)/libwfb_la-fboverlay.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fboverlay.c' object='libwfb_la-fboverlay.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fboverlay.lo `test -f 'fboverlay.c' || echo '$(srcdir)/'`fboverlay.c + +libwfb_la-fbpict.lo: fbpict.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbpict.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbpict.Tpo -c -o libwfb_la-fbpict.lo `test -f 'fbpict.c' || echo '$(srcdir)/'`fbpict.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbpict.Tpo $(DEPDIR)/libwfb_la-fbpict.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbpict.c' object='libwfb_la-fbpict.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbpict.lo `test -f 'fbpict.c' || echo '$(srcdir)/'`fbpict.c + +libwfb_la-fbpixmap.lo: fbpixmap.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbpixmap.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbpixmap.Tpo -c -o libwfb_la-fbpixmap.lo `test -f 'fbpixmap.c' || echo '$(srcdir)/'`fbpixmap.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbpixmap.Tpo $(DEPDIR)/libwfb_la-fbpixmap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbpixmap.c' object='libwfb_la-fbpixmap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbpixmap.lo `test -f 'fbpixmap.c' || echo '$(srcdir)/'`fbpixmap.c + +libwfb_la-fbpoint.lo: fbpoint.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbpoint.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbpoint.Tpo -c -o libwfb_la-fbpoint.lo `test -f 'fbpoint.c' || echo '$(srcdir)/'`fbpoint.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbpoint.Tpo $(DEPDIR)/libwfb_la-fbpoint.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbpoint.c' object='libwfb_la-fbpoint.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbpoint.lo `test -f 'fbpoint.c' || echo '$(srcdir)/'`fbpoint.c + +libwfb_la-fbpush.lo: fbpush.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbpush.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbpush.Tpo -c -o libwfb_la-fbpush.lo `test -f 'fbpush.c' || echo '$(srcdir)/'`fbpush.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbpush.Tpo $(DEPDIR)/libwfb_la-fbpush.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbpush.c' object='libwfb_la-fbpush.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbpush.lo `test -f 'fbpush.c' || echo '$(srcdir)/'`fbpush.c + +libwfb_la-fbscreen.lo: fbscreen.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbscreen.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbscreen.Tpo -c -o libwfb_la-fbscreen.lo `test -f 'fbscreen.c' || echo '$(srcdir)/'`fbscreen.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbscreen.Tpo $(DEPDIR)/libwfb_la-fbscreen.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbscreen.c' object='libwfb_la-fbscreen.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbscreen.lo `test -f 'fbscreen.c' || echo '$(srcdir)/'`fbscreen.c + +libwfb_la-fbseg.lo: fbseg.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbseg.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbseg.Tpo -c -o libwfb_la-fbseg.lo `test -f 'fbseg.c' || echo '$(srcdir)/'`fbseg.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbseg.Tpo $(DEPDIR)/libwfb_la-fbseg.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbseg.c' object='libwfb_la-fbseg.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbseg.lo `test -f 'fbseg.c' || echo '$(srcdir)/'`fbseg.c + +libwfb_la-fbsetsp.lo: fbsetsp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbsetsp.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbsetsp.Tpo -c -o libwfb_la-fbsetsp.lo `test -f 'fbsetsp.c' || echo '$(srcdir)/'`fbsetsp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbsetsp.Tpo $(DEPDIR)/libwfb_la-fbsetsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbsetsp.c' object='libwfb_la-fbsetsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbsetsp.lo `test -f 'fbsetsp.c' || echo '$(srcdir)/'`fbsetsp.c + +libwfb_la-fbsolid.lo: fbsolid.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbsolid.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbsolid.Tpo -c -o libwfb_la-fbsolid.lo `test -f 'fbsolid.c' || echo '$(srcdir)/'`fbsolid.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbsolid.Tpo $(DEPDIR)/libwfb_la-fbsolid.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbsolid.c' object='libwfb_la-fbsolid.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbsolid.lo `test -f 'fbsolid.c' || echo '$(srcdir)/'`fbsolid.c + +libwfb_la-fbstipple.lo: fbstipple.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbstipple.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbstipple.Tpo -c -o libwfb_la-fbstipple.lo `test -f 'fbstipple.c' || echo '$(srcdir)/'`fbstipple.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbstipple.Tpo $(DEPDIR)/libwfb_la-fbstipple.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbstipple.c' object='libwfb_la-fbstipple.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbstipple.lo `test -f 'fbstipple.c' || echo '$(srcdir)/'`fbstipple.c + +libwfb_la-fbtile.lo: fbtile.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbtile.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbtile.Tpo -c -o libwfb_la-fbtile.lo `test -f 'fbtile.c' || echo '$(srcdir)/'`fbtile.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbtile.Tpo $(DEPDIR)/libwfb_la-fbtile.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbtile.c' object='libwfb_la-fbtile.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbtile.lo `test -f 'fbtile.c' || echo '$(srcdir)/'`fbtile.c + +libwfb_la-fbtrap.lo: fbtrap.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbtrap.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbtrap.Tpo -c -o libwfb_la-fbtrap.lo `test -f 'fbtrap.c' || echo '$(srcdir)/'`fbtrap.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbtrap.Tpo $(DEPDIR)/libwfb_la-fbtrap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbtrap.c' object='libwfb_la-fbtrap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbtrap.lo `test -f 'fbtrap.c' || echo '$(srcdir)/'`fbtrap.c + +libwfb_la-fbutil.lo: fbutil.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbutil.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbutil.Tpo -c -o libwfb_la-fbutil.lo `test -f 'fbutil.c' || echo '$(srcdir)/'`fbutil.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbutil.Tpo $(DEPDIR)/libwfb_la-fbutil.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbutil.c' object='libwfb_la-fbutil.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbutil.lo `test -f 'fbutil.c' || echo '$(srcdir)/'`fbutil.c + +libwfb_la-fbwindow.lo: fbwindow.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbwindow.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbwindow.Tpo -c -o libwfb_la-fbwindow.lo `test -f 'fbwindow.c' || echo '$(srcdir)/'`fbwindow.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbwindow.Tpo $(DEPDIR)/libwfb_la-fbwindow.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbwindow.c' object='libwfb_la-fbwindow.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbwindow.lo `test -f 'fbwindow.c' || echo '$(srcdir)/'`fbwindow.c + +libwfb_la-fbpseudocolor.lo: fbpseudocolor.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbpseudocolor.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbpseudocolor.Tpo -c -o libwfb_la-fbpseudocolor.lo `test -f 'fbpseudocolor.c' || echo '$(srcdir)/'`fbpseudocolor.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libwfb_la-fbpseudocolor.Tpo $(DEPDIR)/libwfb_la-fbpseudocolor.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbpseudocolor.c' object='libwfb_la-fbpseudocolor.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbpseudocolor.lo `test -f 'fbpseudocolor.c' || echo '$(srcdir)/'`fbpseudocolor.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-sdkHEADERS: $(sdk_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(sdkdir)" || $(MKDIR_P) "$(DESTDIR)$(sdkdir)" + @list='$(sdk_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(sdkHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(sdkdir)/$$f'"; \ + $(sdkHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(sdkdir)/$$f"; \ + done + +uninstall-sdkHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(sdk_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(sdkdir)/$$f'"; \ + rm -f "$(DESTDIR)$(sdkdir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(sdkdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-sdkHEADERS + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-sdkHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sdkHEADERS install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-sdkHEADERS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/fb/fb.h b/xorg-server-1.4/fb/fb.h new file mode 100644 index 0000000..df430b8 --- /dev/null +++ b/xorg-server-1.4/fb/fb.h @@ -0,0 +1,2123 @@ +/* + * + * Copyright © 1998 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 _FB_H_ +#define _FB_H_ + +#include +#include + +#include "scrnintstr.h" +#include "pixmap.h" +#include "pixmapstr.h" +#include "region.h" +#include "gcstruct.h" +#include "colormap.h" +#include "miscstruct.h" +#include "servermd.h" +#include "windowstr.h" +#include "mi.h" +#include "migc.h" +#include "mibstore.h" +#ifdef RENDER +#include "picturestr.h" +#else +#include "picture.h" +#endif + +#ifdef FB_ACCESS_WRAPPER + +#include "wfbrename.h" +#define FBPREFIX(x) wfb##x +#define WRITE(ptr, val) ((*wfbWriteMemory)((ptr), (val), sizeof(*(ptr)))) +#define READ(ptr) ((*wfbReadMemory)((ptr), sizeof(*(ptr)))) + +#define MEMCPY_WRAPPED(dst, src, size) do { \ + size_t _i; \ + CARD8 *_dst = (CARD8*)(dst), *_src = (CARD8*)(src); \ + for(_i = 0; _i < size; _i++) { \ + WRITE(_dst +_i, READ(_src + _i)); \ + } \ +} while(0) + +#define MEMSET_WRAPPED(dst, val, size) do { \ + size_t _i; \ + CARD8 *_dst = (CARD8*)(dst); \ + for(_i = 0; _i < size; _i++) { \ + WRITE(_dst +_i, (val)); \ + } \ +} while(0) + +#else + +#define FBPREFIX(x) fb##x +#define WRITE(ptr, val) (*(ptr) = (val)) +#define READ(ptr) (*(ptr)) +#define MEMCPY_WRAPPED(dst, src, size) memcpy((dst), (src), (size)) +#define MEMSET_WRAPPED(dst, val, size) memset((dst), (val), (size)) + +#endif + +/* + * This single define controls the basic size of data manipulated + * by this software; it must be log2(sizeof (FbBits) * 8) + */ + +#ifndef FB_SHIFT +#define FB_SHIFT LOG2_BITMAP_PAD +#endif + +#if FB_SHIFT < LOG2_BITMAP_PAD + error FB_SHIFT must be >= LOG2_BITMAP_PAD +#endif + +#define FB_UNIT (1 << FB_SHIFT) +#define FB_HALFUNIT (1 << (FB_SHIFT-1)) +#define FB_MASK (FB_UNIT - 1) +#define FB_ALLONES ((FbBits) -1) + +#if GLYPHPADBYTES != 4 +#error "GLYPHPADBYTES must be 4" +#endif +#if GETLEFTBITS_ALIGNMENT != 1 +#error "GETLEFTBITS_ALIGNMENT must be 1" +#endif +/* whether to bother to include 24bpp support */ +#ifndef FBNO24BIT +#define FB_24BIT +#endif + +/* + * Unless otherwise instructed, fb includes code to advertise 24bpp + * windows with 32bpp image format for application compatibility + */ + +#ifdef FB_24BIT +#ifndef FBNO24_32 +#define FB_24_32BIT +#endif +#endif + +#define FB_STIP_SHIFT LOG2_BITMAP_PAD +#define FB_STIP_UNIT (1 << FB_STIP_SHIFT) +#define FB_STIP_MASK (FB_STIP_UNIT - 1) +#define FB_STIP_ALLONES ((FbStip) -1) + +#define FB_STIP_ODDSTRIDE(s) (((s) & (FB_MASK >> FB_STIP_SHIFT)) != 0) +#define FB_STIP_ODDPTR(p) ((((long) (p)) & (FB_MASK >> 3)) != 0) + +#define FbStipStrideToBitsStride(s) (((s) >> (FB_SHIFT - FB_STIP_SHIFT))) +#define FbBitsStrideToStipStride(s) (((s) << (FB_SHIFT - FB_STIP_SHIFT))) + +#define FbFullMask(n) ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1)) + +#if FB_SHIFT == 6 +# ifdef WIN32 +typedef unsigned __int64 FbBits; +# else +# if defined(__alpha__) || defined(__alpha) || \ + defined(ia64) || defined(__ia64__) || \ + defined(__sparc64__) || defined(_LP64) || \ + defined(__s390x__) || \ + defined(amd64) || defined (__amd64__) || \ + defined (__powerpc64__) || \ + (defined(sgi) && (_MIPS_SZLONG == 64)) +typedef unsigned long FbBits; +# else +typedef unsigned long long FbBits; +# endif +# endif +#endif + +#if FB_SHIFT == 5 +typedef CARD32 FbBits; +#endif + +#if FB_SHIFT == 4 +typedef CARD16 FbBits; +#endif + +#if LOG2_BITMAP_PAD == FB_SHIFT +typedef FbBits FbStip; +#else +# if LOG2_BITMAP_PAD == 5 +typedef CARD32 FbStip; +# endif +#endif + +typedef int FbStride; + + +#ifdef FB_DEBUG +extern void fbValidateDrawable(DrawablePtr d); +extern void fbInitializeDrawable(DrawablePtr d); +extern void fbSetBits (FbStip *bits, int stride, FbStip data); +#define FB_HEAD_BITS (FbStip) (0xbaadf00d) +#define FB_TAIL_BITS (FbStip) (0xbaddf0ad) +#else +#define fbValidateDrawable(d) +#define fdInitializeDrawable(d) +#endif + +#include "fbrop.h" + +#if BITMAP_BIT_ORDER == LSBFirst +#define FbScrLeft(x,n) ((x) >> (n)) +#define FbScrRight(x,n) ((x) << (n)) +/* #define FbLeftBits(x,n) ((x) & ((((FbBits) 1) << (n)) - 1)) */ +#define FbLeftStipBits(x,n) ((x) & ((((FbStip) 1) << (n)) - 1)) +#define FbStipMoveLsb(x,s,n) (FbStipRight (x,(s)-(n))) +#define FbPatternOffsetBits 0 +#else +#define FbScrLeft(x,n) ((x) << (n)) +#define FbScrRight(x,n) ((x) >> (n)) +/* #define FbLeftBits(x,n) ((x) >> (FB_UNIT - (n))) */ +#define FbLeftStipBits(x,n) ((x) >> (FB_STIP_UNIT - (n))) +#define FbStipMoveLsb(x,s,n) (x) +#define FbPatternOffsetBits (sizeof (FbBits) - 1) +#endif + +#include "micoord.h" + +#define FbStipLeft(x,n) FbScrLeft(x,n) +#define FbStipRight(x,n) FbScrRight(x,n) + +#define FbRotLeft(x,n) FbScrLeft(x,n) | (n ? FbScrRight(x,FB_UNIT-n) : 0) +#define FbRotRight(x,n) FbScrRight(x,n) | (n ? FbScrLeft(x,FB_UNIT-n) : 0) + +#define FbRotStipLeft(x,n) FbStipLeft(x,n) | (n ? FbStipRight(x,FB_STIP_UNIT-n) : 0) +#define FbRotStipRight(x,n) FbStipRight(x,n) | (n ? FbStipLeft(x,FB_STIP_UNIT-n) : 0) + +#define FbLeftMask(x) ( ((x) & FB_MASK) ? \ + FbScrRight(FB_ALLONES,(x) & FB_MASK) : 0) +#define FbRightMask(x) ( ((FB_UNIT - (x)) & FB_MASK) ? \ + FbScrLeft(FB_ALLONES,(FB_UNIT - (x)) & FB_MASK) : 0) + +#define FbLeftStipMask(x) ( ((x) & FB_STIP_MASK) ? \ + FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) : 0) +#define FbRightStipMask(x) ( ((FB_STIP_UNIT - (x)) & FB_STIP_MASK) ? \ + FbScrLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - (x)) & FB_STIP_MASK) : 0) + +#define FbBitsMask(x,w) (FbScrRight(FB_ALLONES,(x) & FB_MASK) & \ + FbScrLeft(FB_ALLONES,(FB_UNIT - ((x) + (w))) & FB_MASK)) + +#define FbStipMask(x,w) (FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) & \ + FbStipLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - ((x)+(w))) & FB_STIP_MASK)) + + +#define FbMaskBits(x,w,l,n,r) { \ + n = (w); \ + r = FbRightMask((x)+n); \ + l = FbLeftMask(x); \ + if (l) { \ + n -= FB_UNIT - ((x) & FB_MASK); \ + if (n < 0) { \ + n = 0; \ + l &= r; \ + r = 0; \ + } \ + } \ + n >>= FB_SHIFT; \ +} + +#ifdef FBNOPIXADDR +#define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) FbMaskBits(x,w,l,n,r) +#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \ + *dst = FbDoMaskRRop(*dst,and,xor,l); \ +} +#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \ + *dst = FbDoMaskRRop(*dst,and,xor,r); \ +} +#else + +#define FbByteMaskInvalid 0x10 + +#define FbPatternOffset(o,t) ((o) ^ (FbPatternOffsetBits & ~(sizeof (t) - 1))) + +#define FbPtrOffset(p,o,t) ((t *) ((CARD8 *) (p) + (o))) +#define FbSelectPatternPart(xor,o,t) ((xor) >> (FbPatternOffset (o,t) << 3)) +#define FbStorePart(dst,off,t,xor) (WRITE(FbPtrOffset(dst,off,t), \ + FbSelectPart(xor,off,t))) +#ifndef FbSelectPart +#define FbSelectPart(x,o,t) FbSelectPatternPart(x,o,t) +#endif + +#define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) { \ + n = (w); \ + lb = 0; \ + rb = 0; \ + r = FbRightMask((x)+n); \ + if (r) { \ + /* compute right byte length */ \ + if ((copy) && (((x) + n) & 7) == 0) { \ + rb = (((x) + n) & FB_MASK) >> 3; \ + } else { \ + rb = FbByteMaskInvalid; \ + } \ + } \ + l = FbLeftMask(x); \ + if (l) { \ + /* compute left byte length */ \ + if ((copy) && ((x) & 7) == 0) { \ + lb = ((x) & FB_MASK) >> 3; \ + } else { \ + lb = FbByteMaskInvalid; \ + } \ + /* subtract out the portion painted by leftMask */ \ + n -= FB_UNIT - ((x) & FB_MASK); \ + if (n < 0) { \ + if (lb != FbByteMaskInvalid) { \ + if (rb == FbByteMaskInvalid) { \ + lb = FbByteMaskInvalid; \ + } else if (rb) { \ + lb |= (rb - lb) << (FB_SHIFT - 3); \ + rb = 0; \ + } \ + } \ + n = 0; \ + l &= r; \ + r = 0; \ + }\ + } \ + n >>= FB_SHIFT; \ +} + +#if FB_SHIFT == 6 +#define FbDoLeftMaskByteRRop6Cases(dst,xor) \ + case (sizeof (FbBits) - 7) | (1 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 7) | (2 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 7) | (3 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + break; \ + case (sizeof (FbBits) - 7) | (4 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 7) | (5 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \ + break; \ + case (sizeof (FbBits) - 7) | (6 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 7): \ + FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \ + break; \ + case (sizeof (FbBits) - 6) | (1 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 6) | (2 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + break; \ + case (sizeof (FbBits) - 6) | (3 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 6) | (4 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \ + break; \ + case (sizeof (FbBits) - 6) | (5 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 6): \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \ + break; \ + case (sizeof (FbBits) - 5) | (1 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 5) | (2 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 5) | (3 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \ + break; \ + case (sizeof (FbBits) - 5) | (4 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 5): \ + FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \ + break; \ + case (sizeof (FbBits) - 4) | (1 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 4) | (2 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \ + break; \ + case (sizeof (FbBits) - 4) | (3 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 4): \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \ + break; + +#define FbDoRightMaskByteRRop6Cases(dst,xor) \ + case 4: \ + FbStorePart(dst,0,CARD32,xor); \ + break; \ + case 5: \ + FbStorePart(dst,0,CARD32,xor); \ + FbStorePart(dst,4,CARD8,xor); \ + break; \ + case 6: \ + FbStorePart(dst,0,CARD32,xor); \ + FbStorePart(dst,4,CARD16,xor); \ + break; \ + case 7: \ + FbStorePart(dst,0,CARD32,xor); \ + FbStorePart(dst,4,CARD16,xor); \ + FbStorePart(dst,6,CARD8,xor); \ + break; +#else +#define FbDoLeftMaskByteRRop6Cases(dst,xor) +#define FbDoRightMaskByteRRop6Cases(dst,xor) +#endif + +#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \ + switch (lb) { \ + FbDoLeftMaskByteRRop6Cases(dst,xor) \ + case (sizeof (FbBits) - 3) | (1 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 3) | (2 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 2) | (1 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \ + break; \ + case sizeof (FbBits) - 3: \ + FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \ + case sizeof (FbBits) - 2: \ + FbStorePart(dst,sizeof (FbBits) - 2,CARD16,xor); \ + break; \ + case sizeof (FbBits) - 1: \ + FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \ + break; \ + default: \ + WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, l)); \ + break; \ + } \ +} + + +#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \ + switch (rb) { \ + case 1: \ + FbStorePart(dst,0,CARD8,xor); \ + break; \ + case 2: \ + FbStorePart(dst,0,CARD16,xor); \ + break; \ + case 3: \ + FbStorePart(dst,0,CARD16,xor); \ + FbStorePart(dst,2,CARD8,xor); \ + break; \ + FbDoRightMaskByteRRop6Cases(dst,xor) \ + default: \ + WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \ + } \ +} +#endif + +#define FbMaskStip(x,w,l,n,r) { \ + n = (w); \ + r = FbRightStipMask((x)+n); \ + l = FbLeftStipMask(x); \ + if (l) { \ + n -= FB_STIP_UNIT - ((x) & FB_STIP_MASK); \ + if (n < 0) { \ + n = 0; \ + l &= r; \ + r = 0; \ + } \ + } \ + n >>= FB_STIP_SHIFT; \ +} + +/* + * These macros are used to transparently stipple + * in copy mode; the expected usage is with 'n' constant + * so all of the conditional parts collapse into a minimal + * sequence of partial word writes + * + * 'n' is the bytemask of which bytes to store, 'a' is the address + * of the FbBits base unit, 'o' is the offset within that unit + * + * The term "lane" comes from the hardware term "byte-lane" which + */ + +#define FbLaneCase1(n,a,o) ((n) == 0x01 ? (void) \ + WRITE((CARD8 *) ((a)+FbPatternOffset(o,CARD8)), \ + fgxor) : (void) 0) +#define FbLaneCase2(n,a,o) ((n) == 0x03 ? (void) \ + WRITE((CARD16 *) ((a)+FbPatternOffset(o,CARD16)), \ + fgxor) : \ + ((void)FbLaneCase1((n)&1,a,o), \ + FbLaneCase1((n)>>1,a,(o)+1))) +#define FbLaneCase4(n,a,o) ((n) == 0x0f ? (void) \ + WRITE((CARD32 *) ((a)+FbPatternOffset(o,CARD32)), \ + fgxor) : \ + ((void)FbLaneCase2((n)&3,a,o), \ + FbLaneCase2((n)>>2,a,(o)+2))) +#define FbLaneCase8(n,a,o) ((n) == 0x0ff ? (void) (*(FbBits *) ((a)+(o)) = fgxor) : \ + ((void)FbLaneCase4((n)&15,a,o), \ + FbLaneCase4((n)>>4,a,(o)+4))) + +#if FB_SHIFT == 6 +#define FbLaneCase(n,a) FbLaneCase8(n,(CARD8 *) (a),0) +#endif + +#if FB_SHIFT == 5 +#define FbLaneCase(n,a) FbLaneCase4(n,(CARD8 *) (a),0) +#endif + +/* Rotate a filled pixel value to the specified alignement */ +#define FbRot24(p,b) (FbScrRight(p,b) | FbScrLeft(p,24-(b))) +#define FbRot24Stip(p,b) (FbStipRight(p,b) | FbStipLeft(p,24-(b))) + +/* step a filled pixel value to the next/previous FB_UNIT alignment */ +#define FbNext24Pix(p) (FbRot24(p,(24-FB_UNIT%24))) +#define FbPrev24Pix(p) (FbRot24(p,FB_UNIT%24)) +#define FbNext24Stip(p) (FbRot24(p,(24-FB_STIP_UNIT%24))) +#define FbPrev24Stip(p) (FbRot24(p,FB_STIP_UNIT%24)) + +/* step a rotation value to the next/previous rotation value */ +#if FB_UNIT == 64 +#define FbNext24Rot(r) ((r) == 16 ? 0 : (r) + 8) +#define FbPrev24Rot(r) ((r) == 0 ? 16 : (r) - 8) + +#if IMAGE_BYTE_ORDER == MSBFirst +#define FbFirst24Rot(x) (((x) + 8) % 24) +#else +#define FbFirst24Rot(x) ((x) % 24) +#endif + +#endif + +#if FB_UNIT == 32 +#define FbNext24Rot(r) ((r) == 0 ? 16 : (r) - 8) +#define FbPrev24Rot(r) ((r) == 16 ? 0 : (r) + 8) + +#if IMAGE_BYTE_ORDER == MSBFirst +#define FbFirst24Rot(x) (((x) + 16) % 24) +#else +#define FbFirst24Rot(x) ((x) % 24) +#endif +#endif + +#define FbNext24RotStip(r) ((r) == 0 ? 16 : (r) - 8) +#define FbPrev24RotStip(r) ((r) == 16 ? 0 : (r) + 8) + +/* Whether 24-bit specific code is needed for this filled pixel value */ +#define FbCheck24Pix(p) ((p) == FbNext24Pix(p)) + +/* Macros for dealing with dashing */ + +#define FbDashDeclare \ + unsigned char *__dash, *__firstDash, *__lastDash + +#define FbDashInit(pGC,pPriv,dashOffset,dashlen,even) { \ + (even) = TRUE; \ + __firstDash = (pGC)->dash; \ + __lastDash = __firstDash + (pGC)->numInDashList; \ + (dashOffset) %= (pPriv)->dashLength; \ + \ + __dash = __firstDash; \ + while ((dashOffset) >= ((dashlen) = *__dash)) \ + { \ + (dashOffset) -= (dashlen); \ + (even) = 1-(even); \ + if (++__dash == __lastDash) \ + __dash = __firstDash; \ + } \ + (dashlen) -= (dashOffset); \ +} + +#define FbDashNext(dashlen) { \ + if (++__dash == __lastDash) \ + __dash = __firstDash; \ + (dashlen) = *__dash; \ +} + +/* as numInDashList is always even, this case can skip a test */ + +#define FbDashNextEven(dashlen) { \ + (dashlen) = *++__dash; \ +} + +#define FbDashNextOdd(dashlen) FbDashNext(dashlen) + +#define FbDashStep(dashlen,even) { \ + if (!--(dashlen)) { \ + FbDashNext(dashlen); \ + (even) = 1-(even); \ + } \ +} + +/* XXX fb*PrivateIndex should be static, but it breaks the ABI */ + +extern int fbGCPrivateIndex; +extern int fbGetGCPrivateIndex(void); +#ifndef FB_NO_WINDOW_PIXMAPS +extern int fbWinPrivateIndex; +extern int fbGetWinPrivateIndex(void); +#endif +extern const GCOps fbGCOps; +extern const GCFuncs fbGCFuncs; + +#ifdef FB_24_32BIT +#define FB_SCREEN_PRIVATE +#endif + +/* Framebuffer access wrapper */ +typedef FbBits (*ReadMemoryProcPtr)(const void *src, int size); +typedef void (*WriteMemoryProcPtr)(void *dst, FbBits value, int size); +typedef void (*SetupWrapProcPtr)(ReadMemoryProcPtr *pRead, + WriteMemoryProcPtr *pWrite, + DrawablePtr pDraw); +typedef void (*FinishWrapProcPtr)(DrawablePtr pDraw); + +#ifdef FB_ACCESS_WRAPPER + +#define fbPrepareAccess(pDraw) \ + fbGetScreenPrivate((pDraw)->pScreen)->setupWrap( \ + &wfbReadMemory, \ + &wfbWriteMemory, \ + (pDraw)) +#define fbFinishAccess(pDraw) \ + fbGetScreenPrivate((pDraw)->pScreen)->finishWrap(pDraw) + +#else + +#define fbPrepareAccess(pPix) +#define fbFinishAccess(pDraw) + +#endif + + +#ifdef FB_SCREEN_PRIVATE +extern int fbScreenPrivateIndex; +extern int fbGetScreenPrivateIndex(void); + +/* private field of a screen */ +typedef struct { + unsigned char win32bpp; /* window bpp for 32-bpp images */ + unsigned char pix32bpp; /* pixmap bpp for 32-bpp images */ +#ifdef FB_ACCESS_WRAPPER + SetupWrapProcPtr setupWrap; /* driver hook to set pixmap access wrapping */ + FinishWrapProcPtr finishWrap; /* driver hook to clean up pixmap access wrapping */ +#endif +} FbScreenPrivRec, *FbScreenPrivPtr; + +#define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \ + (pScreen)->devPrivates[fbGetScreenPrivateIndex()].ptr) +#endif + +/* private field of GC */ +typedef struct { + FbBits and, xor; /* reduced rop values */ + FbBits bgand, bgxor; /* for stipples */ + FbBits fg, bg, pm; /* expanded and filled */ + unsigned int dashLength; /* total of all dash elements */ + unsigned char oneRect; /* clip list is single rectangle */ + unsigned char evenStipple; /* stipple is even */ + unsigned char bpp; /* current drawable bpp */ +} FbGCPrivRec, *FbGCPrivPtr; + +#define fbGetGCPrivate(pGC) ((FbGCPrivPtr)\ + (pGC)->devPrivates[fbGetGCPrivateIndex()].ptr) + +#define fbGetCompositeClip(pGC) ((pGC)->pCompositeClip) +#define fbGetExpose(pGC) ((pGC)->fExpose) +#define fbGetFreeCompClip(pGC) ((pGC)->freeCompClip) +#define fbGetRotatedPixmap(pGC) ((pGC)->pRotatedPixmap) + +#define fbGetScreenPixmap(s) ((PixmapPtr) (s)->devPrivate) +#ifdef FB_NO_WINDOW_PIXMAPS +#define fbGetWindowPixmap(d) fbGetScreenPixmap(((DrawablePtr) (d))->pScreen) +#else +#define fbGetWindowPixmap(pWin) ((PixmapPtr)\ + ((WindowPtr) (pWin))->devPrivates[fbGetWinPrivateIndex()].ptr) +#endif + +#ifdef ROOTLESS +#define __fbPixDrawableX(pPix) ((pPix)->drawable.x) +#define __fbPixDrawableY(pPix) ((pPix)->drawable.y) +#else +#define __fbPixDrawableX(pPix) 0 +#define __fbPixDrawableY(pPix) 0 +#endif + +#ifdef COMPOSITE +#define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix) - (pPix)->screen_x) +#define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix) - (pPix)->screen_y) +#else +#define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix)) +#define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix)) +#endif +#define __fbPixOffXPix(pPix) (__fbPixDrawableX(pPix)) +#define __fbPixOffYPix(pPix) (__fbPixDrawableY(pPix)) + +#define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \ + PixmapPtr _pPix; \ + if ((pDrawable)->type != DRAWABLE_PIXMAP) { \ + _pPix = fbGetWindowPixmap(pDrawable); \ + (xoff) = __fbPixOffXWin(_pPix); \ + (yoff) = __fbPixOffYWin(_pPix); \ + } else { \ + _pPix = (PixmapPtr) (pDrawable); \ + (xoff) = __fbPixOffXPix(_pPix); \ + (yoff) = __fbPixOffYPix(_pPix); \ + } \ + fbPrepareAccess(pDrawable); \ + (pointer) = (FbBits *) _pPix->devPrivate.ptr; \ + (stride) = ((int) _pPix->devKind) / sizeof (FbBits); (void)(stride); \ + (bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \ +} + +#define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \ + PixmapPtr _pPix; \ + if ((pDrawable)->type != DRAWABLE_PIXMAP) { \ + _pPix = fbGetWindowPixmap(pDrawable); \ + (xoff) = __fbPixOffXWin(_pPix); \ + (yoff) = __fbPixOffYWin(_pPix); \ + } else { \ + _pPix = (PixmapPtr) (pDrawable); \ + (xoff) = __fbPixOffXPix(_pPix); \ + (yoff) = __fbPixOffYPix(_pPix); \ + } \ + fbPrepareAccess(pDrawable); \ + (pointer) = (FbStip *) _pPix->devPrivate.ptr; \ + (stride) = ((int) _pPix->devKind) / sizeof (FbStip); (void)(stride); \ + (bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \ +} + +/* + * XFree86 empties the root BorderClip when the VT is inactive, + * here's a macro which uses that to disable GetImage and GetSpans + */ + +#define fbWindowEnabled(pWin) \ + REGION_NOTEMPTY((pWin)->drawable.pScreen, \ + &WindowTable[(pWin)->drawable.pScreen->myNum]->borderClip) + +#define fbDrawableEnabled(pDrawable) \ + ((pDrawable)->type == DRAWABLE_PIXMAP ? \ + TRUE : fbWindowEnabled((WindowPtr) pDrawable)) + +#define FbPowerOfTwo(w) (((w) & ((w) - 1)) == 0) +/* + * Accelerated tiles are power of 2 width <= FB_UNIT + */ +#define FbEvenTile(w) ((w) <= FB_UNIT && FbPowerOfTwo(w)) +/* + * Accelerated stipples are power of 2 width and <= FB_UNIT/dstBpp + * with dstBpp a power of 2 as well + */ +#define FbEvenStip(w,bpp) ((w) * (bpp) <= FB_UNIT && FbPowerOfTwo(w) && FbPowerOfTwo(bpp)) + +/* + * fb24_32.c + */ +void +fb24_32GetSpans(DrawablePtr pDrawable, + int wMax, + DDXPointPtr ppt, + int *pwidth, + int nspans, + char *pchardstStart); + +void +fb24_32SetSpans (DrawablePtr pDrawable, + GCPtr pGC, + char *src, + DDXPointPtr ppt, + int *pwidth, + int nspans, + int fSorted); + +void +fb24_32PutZImage (DrawablePtr pDrawable, + RegionPtr pClip, + int alu, + FbBits pm, + int x, + int y, + int width, + int height, + CARD8 *src, + FbStride srcStride); + +void +fb24_32GetImage (DrawablePtr pDrawable, + int x, + int y, + int w, + int h, + unsigned int format, + unsigned long planeMask, + char *d); + +void +fb24_32CopyMtoN (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure); + +PixmapPtr +fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel); + +Bool +fb24_32CreateScreenResources(ScreenPtr pScreen); + +Bool +fb24_32ModifyPixmapHeader (PixmapPtr pPixmap, + int width, + int height, + int depth, + int bitsPerPixel, + int devKind, + pointer pPixData); + +/* + * fballpriv.c + */ +Bool +fbAllocatePrivates(ScreenPtr pScreen, int *pGCIndex); + +/* + * fbarc.c + */ + +void +fbPolyArc (DrawablePtr pDrawable, + GCPtr pGC, + int narcs, + xArc *parcs); + +/* + * fbbits.c + */ + +void +fbBresSolid8(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x, + int y, + int e, + int e1, + int e3, + int len); + +void +fbBresDash8 (DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x, + int y, + int e, + int e1, + int e3, + int len); + +void +fbDots8 (FbBits *dst, + FbStride dstStride, + int dstBpp, + BoxPtr pBox, + xPoint *pts, + int npt, + int xorg, + int yorg, + int xoff, + int yoff, + FbBits and, + FbBits xor); + +void +fbArc8 (FbBits *dst, + FbStride dstStride, + int dstBpp, + xArc *arc, + int dx, + int dy, + FbBits and, + FbBits xor); + +void +fbGlyph8 (FbBits *dstLine, + FbStride dstStride, + int dstBpp, + FbStip *stipple, + FbBits fg, + int height, + int shift); + +void +fbPolyline8 (DrawablePtr pDrawable, + GCPtr pGC, + int mode, + int npt, + DDXPointPtr ptsOrig); + +void +fbPolySegment8 (DrawablePtr pDrawable, + GCPtr pGC, + int nseg, + xSegment *pseg); + +void +fbBresSolid16(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x, + int y, + int e, + int e1, + int e3, + int len); + +void +fbBresDash16(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x, + int y, + int e, + int e1, + int e3, + int len); + +void +fbDots16(FbBits *dst, + FbStride dstStride, + int dstBpp, + BoxPtr pBox, + xPoint *pts, + int npt, + int xorg, + int yorg, + int xoff, + int yoff, + FbBits and, + FbBits xor); + +void +fbArc16(FbBits *dst, + FbStride dstStride, + int dstBpp, + xArc *arc, + int dx, + int dy, + FbBits and, + FbBits xor); + +void +fbGlyph16(FbBits *dstLine, + FbStride dstStride, + int dstBpp, + FbStip *stipple, + FbBits fg, + int height, + int shift); + +void +fbPolyline16 (DrawablePtr pDrawable, + GCPtr pGC, + int mode, + int npt, + DDXPointPtr ptsOrig); + +void +fbPolySegment16 (DrawablePtr pDrawable, + GCPtr pGC, + int nseg, + xSegment *pseg); + + +void +fbBresSolid24(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x, + int y, + int e, + int e1, + int e3, + int len); + +void +fbBresDash24(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x, + int y, + int e, + int e1, + int e3, + int len); + +void +fbDots24(FbBits *dst, + FbStride dstStride, + int dstBpp, + BoxPtr pBox, + xPoint *pts, + int npt, + int xorg, + int yorg, + int xoff, + int yoff, + FbBits and, + FbBits xor); + +void +fbArc24(FbBits *dst, + FbStride dstStride, + int dstBpp, + xArc *arc, + int dx, + int dy, + FbBits and, + FbBits xor); + +void +fbGlyph24(FbBits *dstLine, + FbStride dstStride, + int dstBpp, + FbStip *stipple, + FbBits fg, + int height, + int shift); + +void +fbPolyline24 (DrawablePtr pDrawable, + GCPtr pGC, + int mode, + int npt, + DDXPointPtr ptsOrig); + +void +fbPolySegment24 (DrawablePtr pDrawable, + GCPtr pGC, + int nseg, + xSegment *pseg); + + +void +fbBresSolid32(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x, + int y, + int e, + int e1, + int e3, + int len); + +void +fbBresDash32(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x, + int y, + int e, + int e1, + int e3, + int len); + +void +fbDots32(FbBits *dst, + FbStride dstStride, + int dstBpp, + BoxPtr pBox, + xPoint *pts, + int npt, + int xorg, + int yorg, + int xoff, + int yoff, + FbBits and, + FbBits xor); + +void +fbArc32(FbBits *dst, + FbStride dstStride, + int dstBpp, + xArc *arc, + int dx, + int dy, + FbBits and, + FbBits xor); + +void +fbGlyph32(FbBits *dstLine, + FbStride dstStride, + int dstBpp, + FbStip *stipple, + FbBits fg, + int height, + int shift); +void +fbPolyline32 (DrawablePtr pDrawable, + GCPtr pGC, + int mode, + int npt, + DDXPointPtr ptsOrig); + +void +fbPolySegment32 (DrawablePtr pDrawable, + GCPtr pGC, + int nseg, + xSegment *pseg); + +/* + * fbblt.c + */ +void +fbBlt (FbBits *src, + FbStride srcStride, + int srcX, + + FbBits *dst, + FbStride dstStride, + int dstX, + + int width, + int height, + + int alu, + FbBits pm, + int bpp, + + Bool reverse, + Bool upsidedown); + +void +fbBlt24 (FbBits *srcLine, + FbStride srcStride, + int srcX, + + FbBits *dstLine, + FbStride dstStride, + int dstX, + + int width, + int height, + + int alu, + FbBits pm, + + Bool reverse, + Bool upsidedown); + +void +fbBltStip (FbStip *src, + FbStride srcStride, /* in FbStip units, not FbBits units */ + int srcX, + + FbStip *dst, + FbStride dstStride, /* in FbStip units, not FbBits units */ + int dstX, + + int width, + int height, + + int alu, + FbBits pm, + int bpp); + +/* + * fbbltone.c + */ +void +fbBltOne (FbStip *src, + FbStride srcStride, + int srcX, + FbBits *dst, + FbStride dstStride, + int dstX, + int dstBpp, + + int width, + int height, + + FbBits fgand, + FbBits fbxor, + FbBits bgand, + FbBits bgxor); + +#ifdef FB_24BIT +void +fbBltOne24 (FbStip *src, + FbStride srcStride, /* FbStip units per scanline */ + int srcX, /* bit position of source */ + FbBits *dst, + FbStride dstStride, /* FbBits units per scanline */ + int dstX, /* bit position of dest */ + int dstBpp, /* bits per destination unit */ + + int width, /* width in bits of destination */ + int height, /* height in scanlines */ + + FbBits fgand, /* rrop values */ + FbBits fgxor, + FbBits bgand, + FbBits bgxor); +#endif + +void +fbBltPlane (FbBits *src, + FbStride srcStride, + int srcX, + int srcBpp, + + FbStip *dst, + FbStride dstStride, + int dstX, + + int width, + int height, + + FbStip fgand, + FbStip fgxor, + FbStip bgand, + FbStip bgxor, + Pixel planeMask); + +/* + * fbbstore.c + */ +void +fbSaveAreas(PixmapPtr pPixmap, + RegionPtr prgnSave, + int xorg, + int yorg, + WindowPtr pWin); + +void +fbRestoreAreas(PixmapPtr pPixmap, + RegionPtr prgnRestore, + int xorg, + int yorg, + WindowPtr pWin); + +/* + * fbcmap.c + */ +int +fbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps); + +void +fbInstallColormap(ColormapPtr pmap); + +void +fbUninstallColormap(ColormapPtr pmap); + +void +fbResolveColor(unsigned short *pred, + unsigned short *pgreen, + unsigned short *pblue, + VisualPtr pVisual); + +Bool +fbInitializeColormap(ColormapPtr pmap); + +int +fbExpandDirectColors (ColormapPtr pmap, + int ndef, + xColorItem *indefs, + xColorItem *outdefs); + +Bool +fbCreateDefColormap(ScreenPtr pScreen); + +void +fbClearVisualTypes(void); + +Bool +fbHasVisualTypes (int depth); + +Bool +fbSetVisualTypes (int depth, int visuals, int bitsPerRGB); + +Bool +fbSetVisualTypesAndMasks (int depth, int visuals, int bitsPerRGB, + Pixel redMask, Pixel greenMask, Pixel blueMask); + +Bool +fbInitVisuals (VisualPtr *visualp, + DepthPtr *depthp, + int *nvisualp, + int *ndepthp, + int *rootDepthp, + VisualID *defaultVisp, + unsigned long sizes, + int bitsPerRGB); + +/* + * fbcopy.c + */ + +typedef void (*fbCopyProc) (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pDstBox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure); + +void +fbCopyNtoN (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure); + +void +fbCopy1toN (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure); + +void +fbCopyNto1 (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure); + +void +fbCopyRegion (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + RegionPtr pDstRegion, + int dx, + int dy, + fbCopyProc copyProc, + Pixel bitPlane, + void *closure); + +RegionPtr +fbDoCopy (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, + int yIn, + int widthSrc, + int heightSrc, + int xOut, + int yOut, + fbCopyProc copyProc, + Pixel bitplane, + void *closure); + +RegionPtr +fbCopyArea (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, + int yIn, + int widthSrc, + int heightSrc, + int xOut, + int yOut); + +RegionPtr +fbCopyPlane (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, + int yIn, + int widthSrc, + int heightSrc, + int xOut, + int yOut, + unsigned long bitplane); + +/* + * fbfill.c + */ +void +fbFill (DrawablePtr pDrawable, + GCPtr pGC, + int x, + int y, + int width, + int height); + +void +fbSolidBoxClipped (DrawablePtr pDrawable, + RegionPtr pClip, + int xa, + int ya, + int xb, + int yb, + FbBits and, + FbBits xor); + +/* + * fbfillrect.c + */ +void +fbPolyFillRect(DrawablePtr pDrawable, + GCPtr pGC, + int nrectInit, + xRectangle *prectInit); + +#define fbPolyFillArc miPolyFillArc + +#define fbFillPolygon miFillPolygon + +/* + * fbfillsp.c + */ +void +fbFillSpans (DrawablePtr pDrawable, + GCPtr pGC, + int nInit, + DDXPointPtr pptInit, + int *pwidthInit, + int fSorted); + + +/* + * fbgc.c + */ + +Bool +fbCreateGC(GCPtr pGC); + +void +fbPadPixmap (PixmapPtr pPixmap); + +void +fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable); + +/* + * fbgetsp.c + */ +void +fbGetSpans(DrawablePtr pDrawable, + int wMax, + DDXPointPtr ppt, + int *pwidth, + int nspans, + char *pchardstStart); + +/* + * fbglyph.c + */ + +Bool +fbGlyphIn (RegionPtr pRegion, + int x, + int y, + int width, + int height); + +void +fbPolyGlyphBlt (DrawablePtr pDrawable, + GCPtr pGC, + int x, + int y, + unsigned int nglyph, + CharInfoPtr *ppci, + pointer pglyphBase); + +void +fbImageGlyphBlt (DrawablePtr pDrawable, + GCPtr pGC, + int x, + int y, + unsigned int nglyph, + CharInfoPtr *ppci, + pointer pglyphBase); + +/* + * fbimage.c + */ + +void +fbPutImage (DrawablePtr pDrawable, + GCPtr pGC, + int depth, + int x, + int y, + int w, + int h, + int leftPad, + int format, + char *pImage); + +void +fbPutZImage (DrawablePtr pDrawable, + RegionPtr pClip, + int alu, + FbBits pm, + int x, + int y, + int width, + int height, + FbStip *src, + FbStride srcStride); + +void +fbPutXYImage (DrawablePtr pDrawable, + RegionPtr pClip, + FbBits fg, + FbBits bg, + FbBits pm, + int alu, + Bool opaque, + + int x, + int y, + int width, + int height, + + FbStip *src, + FbStride srcStride, + int srcX); + +void +fbGetImage (DrawablePtr pDrawable, + int x, + int y, + int w, + int h, + unsigned int format, + unsigned long planeMask, + char *d); +/* + * fbline.c + */ + +void +fbZeroLine (DrawablePtr pDrawable, + GCPtr pGC, + int mode, + int npt, + DDXPointPtr ppt); + +void +fbZeroSegment (DrawablePtr pDrawable, + GCPtr pGC, + int nseg, + xSegment *pSegs); + +void +fbPolyLine (DrawablePtr pDrawable, + GCPtr pGC, + int mode, + int npt, + DDXPointPtr ppt); + +void +fbFixCoordModePrevious (int npt, + DDXPointPtr ppt); + +void +fbPolySegment (DrawablePtr pDrawable, + GCPtr pGC, + int nseg, + xSegment *pseg); + +#define fbPolyRectangle miPolyRectangle + +/* + * fbpict.c + */ + +Bool +fbPictureInit (ScreenPtr pScreen, + PictFormatPtr formats, + int nformats); + +/* + * fbpixmap.c + */ + +PixmapPtr +fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp); + +PixmapPtr +fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth); + +Bool +fbDestroyPixmap (PixmapPtr pPixmap); + +RegionPtr +fbPixmapToRegion(PixmapPtr pPix); + +/* + * fbpoint.c + */ + +void +fbDots (FbBits *dstOrig, + FbStride dstStride, + int dstBpp, + BoxPtr pBox, + xPoint *pts, + int npt, + int xorg, + int yorg, + int xoff, + int yoff, + FbBits andOrig, + FbBits xorOrig); + +void +fbPolyPoint (DrawablePtr pDrawable, + GCPtr pGC, + int mode, + int npt, + xPoint *pptInit); + +/* + * fbpush.c + */ +void +fbPushPattern (DrawablePtr pDrawable, + GCPtr pGC, + + FbStip *src, + FbStride srcStride, + int srcX, + + int x, + int y, + + int width, + int height); + +void +fbPushFill (DrawablePtr pDrawable, + GCPtr pGC, + + FbStip *src, + FbStride srcStride, + int srcX, + + int x, + int y, + int width, + int height); + +void +fbPush1toN (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure); + +void +fbPushImage (DrawablePtr pDrawable, + GCPtr pGC, + + FbStip *src, + FbStride srcStride, + int srcX, + + int x, + int y, + int width, + int height); + +void +fbPushPixels (GCPtr pGC, + PixmapPtr pBitmap, + DrawablePtr pDrawable, + int dx, + int dy, + int xOrg, + int yOrg); + + +/* + * fbscreen.c + */ + +Bool +fbCloseScreen (int indx, ScreenPtr pScreen); + +Bool +fbRealizeFont(ScreenPtr pScreen, FontPtr pFont); + +Bool +fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont); + +void +fbQueryBestSize (int class, + unsigned short *width, unsigned short *height, + ScreenPtr pScreen); + +PixmapPtr +_fbGetWindowPixmap (WindowPtr pWindow); + +void +_fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap); + +Bool +fbSetupScreen(ScreenPtr pScreen, + pointer pbits, /* pointer to screen bitmap */ + int xsize, /* in pixels */ + int ysize, + int dpix, /* dots per inch */ + int dpiy, + int width, /* pixel width of frame buffer */ + int bpp); /* bits per pixel of frame buffer */ + +Bool +wfbFinishScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp, + SetupWrapProcPtr setupWrap, + FinishWrapProcPtr finishWrap); + +Bool +wfbScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp, + SetupWrapProcPtr setupWrap, + FinishWrapProcPtr finishWrap); + +Bool +fbFinishScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp); + +Bool +fbScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp); + +void +fbInitializeBackingStore (ScreenPtr pScreen); + +/* + * fbseg.c + */ +typedef void FbBres (DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x, + int y, + int e, + int e1, + int e3, + int len); + +FbBres fbBresSolid, fbBresDash, fbBresFill, fbBresFillDash; +/* + * fbsetsp.c + */ + +void +fbSetSpans (DrawablePtr pDrawable, + GCPtr pGC, + char *src, + DDXPointPtr ppt, + int *pwidth, + int nspans, + int fSorted); + +FbBres * +fbSelectBres (DrawablePtr pDrawable, + GCPtr pGC); + +void +fbBres (DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x, + int y, + int e, + int e1, + int e3, + int len); + +void +fbSegment (DrawablePtr pDrawable, + GCPtr pGC, + int xa, + int ya, + int xb, + int yb, + Bool drawLast, + int *dashOffset); + + +/* + * fbsolid.c + */ + +void +fbSolid (FbBits *dst, + FbStride dstStride, + int dstX, + int bpp, + + int width, + int height, + + FbBits and, + FbBits xor); + +#ifdef FB_24BIT +void +fbSolid24 (FbBits *dst, + FbStride dstStride, + int dstX, + + int width, + int height, + + FbBits and, + FbBits xor); +#endif + +/* + * fbstipple.c + */ + +void +fbTransparentSpan (FbBits *dst, + FbBits stip, + FbBits fgxor, + int n); + +void +fbEvenStipple (FbBits *dst, + FbStride dstStride, + int dstX, + int dstBpp, + + int width, + int height, + + FbStip *stip, + FbStride stipStride, + int stipHeight, + + FbBits fgand, + FbBits fgxor, + FbBits bgand, + FbBits bgxor, + + int xRot, + int yRot); + +void +fbOddStipple (FbBits *dst, + FbStride dstStride, + int dstX, + int dstBpp, + + int width, + int height, + + FbStip *stip, + FbStride stipStride, + int stipWidth, + int stipHeight, + + FbBits fgand, + FbBits fgxor, + FbBits bgand, + FbBits bgxor, + + int xRot, + int yRot); + +void +fbStipple (FbBits *dst, + FbStride dstStride, + int dstX, + int dstBpp, + + int width, + int height, + + FbStip *stip, + FbStride stipStride, + int stipWidth, + int stipHeight, + Bool even, + + FbBits fgand, + FbBits fgxor, + FbBits bgand, + FbBits bgxor, + + int xRot, + int yRot); + +/* + * fbtile.c + */ + +void +fbEvenTile (FbBits *dst, + FbStride dstStride, + int dstX, + + int width, + int height, + + FbBits *tile, + FbStride tileStride, + int tileHeight, + + int alu, + FbBits pm, + int xRot, + int yRot); + +void +fbOddTile (FbBits *dst, + FbStride dstStride, + int dstX, + + int width, + int height, + + FbBits *tile, + FbStride tileStride, + int tileWidth, + int tileHeight, + + int alu, + FbBits pm, + int bpp, + + int xRot, + int yRot); + +void +fbTile (FbBits *dst, + FbStride dstStride, + int dstX, + + int width, + int height, + + FbBits *tile, + FbStride tileStride, + int tileWidth, + int tileHeight, + + int alu, + FbBits pm, + int bpp, + + int xRot, + int yRot); + +/* + * fbutil.c + */ +FbBits +fbReplicatePixel (Pixel p, int bpp); + +void +fbReduceRasterOp (int rop, FbBits fg, FbBits pm, FbBits *andp, FbBits *xorp); + +#ifdef FB_ACCESS_WRAPPER +extern ReadMemoryProcPtr wfbReadMemory; +extern WriteMemoryProcPtr wfbWriteMemory; +#endif + +/* + * fbwindow.c + */ + +Bool +fbCreateWindow(WindowPtr pWin); + +Bool +fbDestroyWindow(WindowPtr pWin); + +Bool +fbMapWindow(WindowPtr pWindow); + +Bool +fbPositionWindow(WindowPtr pWin, int x, int y); + +Bool +fbUnmapWindow(WindowPtr pWindow); + +void +fbCopyWindowProc (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure); + +void +fbCopyWindow(WindowPtr pWin, + DDXPointRec ptOldOrg, + RegionPtr prgnSrc); + +Bool +fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask); + +void +fbFillRegionSolid (DrawablePtr pDrawable, + RegionPtr pRegion, + FbBits and, + FbBits xor); + +void +fbFillRegionTiled (DrawablePtr pDrawable, + RegionPtr pRegion, + PixmapPtr pTile); + +void +fbPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what); + + +pixman_image_t *image_from_pict (PicturePtr pict, + Bool has_clip); +void free_pixman_pict (PicturePtr, pixman_image_t *); + +#endif /* _FB_H_ */ + diff --git a/xorg-server-1.4/fb/fb24_32.c b/xorg-server-1.4/fb/fb24_32.c new file mode 100644 index 0000000..00b739b --- /dev/null +++ b/xorg-server-1.4/fb/fb24_32.c @@ -0,0 +1,637 @@ +/* + * + * 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_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" + +/* X apps don't like 24bpp images, this code exposes 32bpp images */ + +/* + * These two functions do a full CopyArea while reformatting + * the data between 24 and 32bpp. They try to go a bit faster + * by reading/writing aligned CARD32s where it's easy + */ + +#define Get8(a) ((CARD32) READ(a)) + +#if BITMAP_BIT_ORDER == MSBFirst +#define Get24(a) ((Get8(a) << 16) | (Get8((a)+1) << 8) | Get8((a)+2)) +#define Put24(a,p) ((WRITE((a+0), (CARD8) ((p) >> 16))), \ + (WRITE((a+1), (CARD8) ((p) >> 8))), \ + (WRITE((a+2), (CARD8) (p)))) +#else +#define Get24(a) (Get8(a) | (Get8((a)+1) << 8) | (Get8((a)+2)<<16)) +#define Put24(a,p) ((WRITE((a+0), (CARD8) (p))), \ + (WRITE((a+1), (CARD8) ((p) >> 8))), \ + (WRITE((a+2), (CARD8) ((p) >> 16)))) +#endif + +typedef void (*fb24_32BltFunc) (CARD8 *srcLine, + FbStride srcStride, + int srcX, + + CARD8 *dstLine, + FbStride dstStride, + int dstX, + + int width, + int height, + + int alu, + FbBits pm); + +static void +fb24_32BltDown (CARD8 *srcLine, + FbStride srcStride, + int srcX, + + CARD8 *dstLine, + FbStride dstStride, + int dstX, + + int width, + int height, + + int alu, + FbBits pm) +{ + CARD32 *src; + CARD8 *dst; + int w; + Bool destInvarient; + CARD32 pixel, dpixel; + FbDeclareMergeRop (); + + srcLine += srcX * 4; + dstLine += dstX * 3; + + FbInitializeMergeRop(alu, (pm | ~(FbBits) 0xffffff)); + destInvarient = FbDestInvarientMergeRop(); + + while (height--) + { + src = (CARD32 *) srcLine; + dst = dstLine; + srcLine += srcStride; + dstLine += dstStride; + w = width; + if (destInvarient) + { + while (((long) dst & 3) && w) + { + w--; + pixel = READ(src++); + pixel = FbDoDestInvarientMergeRop(pixel); + Put24 (dst, pixel); + dst += 3; + } + /* Do four aligned pixels at a time */ + while (w >= 4) + { + CARD32 s0, s1; + s0 = READ(src++); + s0 = FbDoDestInvarientMergeRop(s0); + s1 = READ(src++); + s1 = FbDoDestInvarientMergeRop(s1); +#if BITMAP_BIT_ORDER == LSBFirst + WRITE((CARD32 *)dst, (s0 & 0xffffff) | (s1 << 24)); +#else + WRITE((CARD32 *)dst, (s0 << 8) | ((s1 & 0xffffff) >> 16)); +#endif + s0 = READ(src++); + s0 = FbDoDestInvarientMergeRop(s0); +#if BITMAP_BIT_ORDER == LSBFirst + WRITE((CARD32 *)(dst+4), ((s1 & 0xffffff) >> 8) | (s0 << 16)); +#else + WRITE((CARD32 *)(dst+4), (s1 << 16) | ((s0 & 0xffffff) >> 8)); +#endif + s1 = READ(src++); + s1 = FbDoDestInvarientMergeRop(s1); +#if BITMAP_BIT_ORDER == LSBFirst + WRITE((CARD32 *)(dst+8), ((s0 & 0xffffff) >> 16) | (s1 << 8)); +#else + WRITE((CARD32 *)(dst+8), (s0 << 24) | (s1 & 0xffffff)); +#endif + dst += 12; + w -= 4; + } + while (w--) + { + pixel = READ(src++); + pixel = FbDoDestInvarientMergeRop(pixel); + Put24 (dst, pixel); + dst += 3; + } + } + else + { + while (w--) + { + pixel = READ(src++); + dpixel = Get24 (dst); + pixel = FbDoMergeRop(pixel, dpixel); + Put24 (dst, pixel); + dst += 3; + } + } + } +} + +static void +fb24_32BltUp (CARD8 *srcLine, + FbStride srcStride, + int srcX, + + CARD8 *dstLine, + FbStride dstStride, + int dstX, + + int width, + int height, + + int alu, + FbBits pm) +{ + CARD8 *src; + CARD32 *dst; + int w; + Bool destInvarient; + CARD32 pixel; + FbDeclareMergeRop (); + + FbInitializeMergeRop(alu, (pm | (~(FbBits) 0xffffff))); + destInvarient = FbDestInvarientMergeRop(); + + srcLine += srcX * 3; + dstLine += dstX * 4; + + while (height--) + { + w = width; + src = srcLine; + dst = (CARD32 *) dstLine; + srcLine += srcStride; + dstLine += dstStride; + if (destInvarient) + { + while (((long) src & 3) && w) + { + w--; + pixel = Get24(src); + src += 3; + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); + } + /* Do four aligned pixels at a time */ + while (w >= 4) + { + CARD32 s0, s1; + + s0 = READ((CARD32 *)src); +#if BITMAP_BIT_ORDER == LSBFirst + pixel = s0 & 0xffffff; +#else + pixel = s0 >> 8; +#endif + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); + s1 = READ((CARD32 *)(src+4)); +#if BITMAP_BIT_ORDER == LSBFirst + pixel = (s0 >> 24) | ((s1 << 8) & 0xffffff); +#else + pixel = ((s0 << 16) & 0xffffff) | (s1 >> 16); +#endif + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); + s0 = READ((CARD32 *)(src+8)); +#if BITMAP_BIT_ORDER == LSBFirst + pixel = (s1 >> 16) | ((s0 << 16) & 0xffffff); +#else + pixel = ((s1 << 8) & 0xffffff) | (s0 >> 24); +#endif + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); +#if BITMAP_BIT_ORDER == LSBFirst + pixel = s0 >> 8; +#else + pixel = s0 & 0xffffff; +#endif + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); + src += 12; + w -= 4; + } + while (w) + { + w--; + pixel = Get24(src); + src += 3; + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); + } + } + else + { + while (w--) + { + pixel = Get24(src); + src += 3; + WRITE(dst, FbDoMergeRop(pixel, READ(dst))); + dst++; + } + } + } +} + +/* + * Spans functions; probably unused. + */ +void +fb24_32GetSpans(DrawablePtr pDrawable, + int wMax, + DDXPointPtr ppt, + int *pwidth, + int nspans, + char *pchardstStart) +{ + FbBits *srcBits; + CARD8 *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + CARD8 *dst; + + fbGetDrawable (pDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff); + src = (CARD8 *) srcBits; + srcStride *= sizeof (FbBits); + + while (nspans--) + { + dst = (CARD8 *) pchardstStart; + fb24_32BltUp (src + (ppt->y + srcYoff) * srcStride, srcStride, + ppt->x + srcXoff, + + dst, + 1, + 0, + + *pwidth, + 1, + + GXcopy, + FB_ALLONES); + + pchardstStart += PixmapBytePad(*pwidth, pDrawable->depth); + ppt++; + pwidth++; + } + + fbFinishAccess (pDrawable); +} + +void +fb24_32SetSpans (DrawablePtr pDrawable, + GCPtr pGC, + char *src, + DDXPointPtr ppt, + int *pwidth, + int nspans, + int fSorted) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); + RegionPtr pClip = fbGetCompositeClip(pGC); + FbBits *dstBits; + CARD8 *dst, *d, *s; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + BoxPtr pbox; + int n; + int x1, x2; + + fbGetDrawable (pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff); + dst = (CARD8 *) dstBits; + dstStride *= sizeof (FbBits); + while (nspans--) + { + d = dst + (ppt->y + dstYoff) * dstStride; + s = (CARD8 *) src; + n = REGION_NUM_RECTS(pClip); + pbox = REGION_RECTS (pClip); + while (n--) + { + if (pbox->y1 > ppt->y) + break; + if (pbox->y2 > ppt->y) + { + x1 = ppt->x; + x2 = x1 + *pwidth; + if (pbox->x1 > x1) + x1 = pbox->x1; + if (pbox->x2 < x2) + x2 = pbox->x2; + if (x1 < x2) + fb24_32BltDown (s, + 0, + (x1 - ppt->x), + d, + dstStride, + x1 + dstXoff, + + (x2 - x1), + 1, + pGC->alu, + pPriv->pm); + } + } + src += PixmapBytePad (*pwidth, pDrawable->depth); + ppt++; + pwidth++; + } + + fbFinishAccess (pDrawable); +} + +/* + * Clip and put 32bpp Z-format images to a 24bpp drawable + */ +void +fb24_32PutZImage (DrawablePtr pDrawable, + RegionPtr pClip, + int alu, + FbBits pm, + int x, + int y, + int width, + int height, + CARD8 *src, + FbStride srcStride) +{ + FbBits *dstBits; + CARD8 *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + int nbox; + BoxPtr pbox; + int x1, y1, x2, y2; + + fbGetDrawable (pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff); + dstStride *= sizeof(FbBits); + dst = (CARD8 *) dstBits; + + for (nbox = REGION_NUM_RECTS (pClip), + pbox = REGION_RECTS(pClip); + nbox--; + pbox++) + { + x1 = x; + y1 = y; + x2 = x + width; + y2 = y + height; + if (x1 < pbox->x1) + x1 = pbox->x1; + if (y1 < pbox->y1) + y1 = pbox->y1; + if (x2 > pbox->x2) + x2 = pbox->x2; + if (y2 > pbox->y2) + y2 = pbox->y2; + if (x1 >= x2 || y1 >= y2) + continue; + fb24_32BltDown (src + (y1 - y) * srcStride, + srcStride, + (x1 - x), + + dst + (y1 + dstYoff) * dstStride, + dstStride, + x1 + dstXoff, + + (x2 - x1), + (y2 - y1), + + alu, + pm); + } + + fbFinishAccess (pDrawable); +} + +void +fb24_32GetImage (DrawablePtr pDrawable, + int x, + int y, + int w, + int h, + unsigned int format, + unsigned long planeMask, + char *d) +{ + FbBits *srcBits; + CARD8 *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + FbStride dstStride; + FbBits pm; + + fbGetDrawable (pDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff); + src = (CARD8 *) srcBits; + srcStride *= sizeof (FbBits); + + x += pDrawable->x; + y += pDrawable->y; + + pm = fbReplicatePixel (planeMask, 32); + dstStride = PixmapBytePad(w, pDrawable->depth); + if (pm != FB_ALLONES) + memset (d, 0, dstStride * h); + fb24_32BltUp (src + (y + srcYoff) * srcStride, srcStride, x + srcXoff, + (CARD8 *) d, dstStride, 0, + w, h, GXcopy, pm); + + fbFinishAccess (pDrawable); +} + +void +fb24_32CopyMtoN (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + FbBits *srcBits; + CARD8 *src; + FbStride srcStride; + int srcBpp; + FbBits *dstBits; + CARD8 *dst; + FbStride dstStride; + int dstBpp; + fb24_32BltFunc blt; + int srcXoff, srcYoff; + int dstXoff, dstYoff; + + fbGetDrawable (pSrcDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff); + src = (CARD8 *) srcBits; + srcStride *= sizeof (FbBits); + fbGetDrawable (pDstDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff); + dst = (CARD8 *) dstBits; + dstStride *= sizeof (FbBits); + if (srcBpp == 24) + blt = fb24_32BltUp; + else + blt = fb24_32BltDown; + + while (nbox--) + { + (*blt) (src + (pbox->y1 + dy + srcYoff) * srcStride, + srcStride, + (pbox->x1 + dx + srcXoff), + + dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff), + + (pbox->x2 - pbox->x1), + (pbox->y2 - pbox->y1), + + pGC->alu, + pPriv->pm); + pbox++; + } + + fbFinishAccess (pSrcDrawable); + fbFinishAccess (pDstDrawable); +} + +PixmapPtr +fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel) +{ + ScreenPtr pScreen = pOldTile->drawable.pScreen; + PixmapPtr pNewTile; + FbBits *old, *new; + FbStride oldStride, newStride; + int oldBpp, newBpp; + fb24_32BltFunc blt; + int oldXoff, oldYoff; + int newXoff, newYoff; + + pNewTile = fbCreatePixmapBpp (pScreen, + pOldTile->drawable.width, + pOldTile->drawable.height, + pOldTile->drawable.depth, + bitsPerPixel); + if (!pNewTile) + return 0; + fbGetDrawable (&pOldTile->drawable, + old, oldStride, oldBpp, oldXoff, oldYoff); + fbGetDrawable (&pNewTile->drawable, + new, newStride, newBpp, newXoff, newYoff); + if (oldBpp == 24) + blt = fb24_32BltUp; + else + blt = fb24_32BltDown; + + (*blt) ((CARD8 *) old, + oldStride * sizeof (FbBits), + 0, + + (CARD8 *) new, + newStride * sizeof (FbBits), + 0, + + pOldTile->drawable.width, + pOldTile->drawable.height, + + GXcopy, + FB_ALLONES); + + fbFinishAccess (&pOldTile->drawable); + fbFinishAccess (&pNewTile->drawable); + + return pNewTile; +} + +typedef struct { + pointer pbits; + int width; +} miScreenInitParmsRec, *miScreenInitParmsPtr; + +Bool +fb24_32CreateScreenResources(ScreenPtr pScreen) +{ + miScreenInitParmsPtr pScrInitParms; + int pitch; + Bool retval; + + /* get the pitch before mi destroys it */ + pScrInitParms = (miScreenInitParmsPtr)pScreen->devPrivate; + pitch = BitmapBytePad(pScrInitParms->width * 24); + + if((retval = miCreateScreenResources(pScreen))) { + /* fix the screen pixmap */ + PixmapPtr pPix = (PixmapPtr)pScreen->devPrivate; + pPix->drawable.bitsPerPixel = 24; + pPix->devKind = pitch; + } + + return retval; +} + +Bool +fb24_32ModifyPixmapHeader (PixmapPtr pPixmap, + int width, + int height, + int depth, + int bitsPerPixel, + int devKind, + pointer pPixData) +{ + int bpp, w; + + if (!pPixmap) + return FALSE; + bpp = bitsPerPixel; + if (bpp <= 0) + bpp = pPixmap->drawable.bitsPerPixel; + if (bpp == 24) + { + if (devKind < 0) + { + w = width; + if (w <= 0) + w = pPixmap->drawable.width; + devKind = BitmapBytePad(w * 24); + } + } + return miModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, + devKind, pPixData); +} diff --git a/xorg-server-1.4/fb/fb24_32.h b/xorg-server-1.4/fb/fb24_32.h new file mode 100644 index 0000000..7c9819e --- /dev/null +++ b/xorg-server-1.4/fb/fb24_32.h @@ -0,0 +1,51 @@ +/* + * 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_DIX_CONFIG_H +#include +#endif + +#ifndef _FB24_32_H_ +#define _FB24_32_H_ + +Bool +fb24_32FinishScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp); + +Bool +fb24_32ScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp); + +#endif diff --git a/xorg-server-1.4/fb/fballpriv.c b/xorg-server-1.4/fb/fballpriv.c new file mode 100644 index 0000000..8efb8fa --- /dev/null +++ b/xorg-server-1.4/fb/fballpriv.c @@ -0,0 +1,91 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +#ifdef FB_SCREEN_PRIVATE +int fbScreenPrivateIndex; +int fbGetScreenPrivateIndex(void) +{ + return fbScreenPrivateIndex; +} +#endif +int fbGCPrivateIndex; +int fbGetGCPrivateIndex(void) +{ + return fbGCPrivateIndex; +} +#ifndef FB_NO_WINDOW_PIXMAPS +int fbWinPrivateIndex; +int fbGetWinPrivateIndex(void) +{ + return fbWinPrivateIndex; +} +#endif +int fbGeneration; + +Bool +fbAllocatePrivates(ScreenPtr pScreen, int *pGCIndex) +{ + if (fbGeneration != serverGeneration) + { + fbGCPrivateIndex = miAllocateGCPrivateIndex (); +#ifndef FB_NO_WINDOW_PIXMAPS + fbWinPrivateIndex = AllocateWindowPrivateIndex(); +#endif +#ifdef FB_SCREEN_PRIVATE + fbScreenPrivateIndex = AllocateScreenPrivateIndex (); + if (fbScreenPrivateIndex == -1) + return FALSE; +#endif + + fbGeneration = serverGeneration; + } + if (pGCIndex) + *pGCIndex = fbGCPrivateIndex; + if (!AllocateGCPrivate(pScreen, fbGCPrivateIndex, sizeof(FbGCPrivRec))) + return FALSE; +#ifndef FB_NO_WINDOW_PIXMAPS + if (!AllocateWindowPrivate(pScreen, fbWinPrivateIndex, 0)) + return FALSE; +#endif +#ifdef FB_SCREEN_PRIVATE + { + FbScreenPrivPtr pScreenPriv; + + pScreenPriv = (FbScreenPrivPtr) xalloc (sizeof (FbScreenPrivRec)); + if (!pScreenPriv) + return FALSE; + pScreen->devPrivates[fbScreenPrivateIndex].ptr = (pointer) pScreenPriv; + } +#endif + return TRUE; +} + +#ifdef FB_ACCESS_WRAPPER +ReadMemoryProcPtr wfbReadMemory; +WriteMemoryProcPtr wfbWriteMemory; +#endif diff --git a/xorg-server-1.4/fb/fbarc.c b/xorg-server-1.4/fb/fbarc.c new file mode 100644 index 0000000..3f46bd4 --- /dev/null +++ b/xorg-server-1.4/fb/fbarc.c @@ -0,0 +1,118 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" +#include "mizerarc.h" +#include + +typedef void (*FbArc) (FbBits *dst, + FbStride dstStride, + int dstBpp, + xArc *arc, + int dx, + int dy, + FbBits and, + FbBits xor); + +void +fbPolyArc (DrawablePtr pDrawable, + GCPtr pGC, + int narcs, + xArc *parcs) +{ + FbArc arc; + + if (pGC->lineWidth == 0) + { +#ifndef FBNOPIXADDR + arc = 0; + if (pGC->lineStyle == LineSolid && pGC->fillStyle == FillSolid) + { + switch (pDrawable->bitsPerPixel) + { + case 8: arc = fbArc8; break; + case 16: arc = fbArc16; break; +#ifdef FB_24BIT + case 24: arc = fbArc24; break; +#endif + case 32: arc = fbArc32; break; + } + } + if (arc) + { + FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + BoxRec box; + int x2, y2; + RegionPtr cclip; + + cclip = fbGetCompositeClip (pGC); + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + while (narcs--) + { + if (miCanZeroArc (parcs)) + { + box.x1 = parcs->x + pDrawable->x; + box.y1 = parcs->y + pDrawable->y; + /* + * Because box.x2 and box.y2 get truncated to 16 bits, and the + * RECT_IN_REGION test treats the resulting number as a signed + * integer, the RECT_IN_REGION test alone can go the wrong way. + * This can result in a server crash because the rendering + * routines in this file deal directly with cpu addresses + * of pixels to be stored, and do not clip or otherwise check + * that all such addresses are within their respective pixmaps. + * So we only allow the RECT_IN_REGION test to be used for + * values that can be expressed correctly in a signed short. + */ + x2 = box.x1 + (int)parcs->width + 1; + box.x2 = x2; + y2 = box.y1 + (int)parcs->height + 1; + box.y2 = y2; + if ( (x2 <= SHRT_MAX) && (y2 <= SHRT_MAX) && + (RECT_IN_REGION(pDrawable->pScreen, cclip, &box) == rgnIN) ) + (*arc) (dst, dstStride, dstBpp, + parcs, pDrawable->x + dstXoff, pDrawable->y + dstYoff, + pPriv->and, pPriv->xor); + else + miZeroPolyArc(pDrawable, pGC, 1, parcs); + } + else + miPolyArc(pDrawable, pGC, 1, parcs); + parcs++; + } + fbFinishAccess (pDrawable); + } + else +#endif + miZeroPolyArc (pDrawable, pGC, narcs, parcs); + } + else + miPolyArc (pDrawable, pGC, narcs, parcs); +} diff --git a/xorg-server-1.4/fb/fbbits.c b/xorg-server-1.4/fb/fbbits.c new file mode 100644 index 0000000..8083743 --- /dev/null +++ b/xorg-server-1.4/fb/fbbits.c @@ -0,0 +1,176 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" +#include "miline.h" +#include "mizerarc.h" + +#undef BRESSOLID +#undef BRESDASH +#undef DOTS +#undef ARC +#undef GLYPH +#undef BITS +#undef BITS2 +#undef BITS4 + +#define BRESSOLID fbBresSolid8 +#define BRESDASH fbBresDash8 +#define DOTS fbDots8 +#define ARC fbArc8 +#define GLYPH fbGlyph8 +#define POLYLINE fbPolyline8 +#define POLYSEGMENT fbPolySegment8 +#define BITS BYTE +#define BITS2 CARD16 +#define BITS4 CARD32 + +#include "fbbits.h" + +#undef BRESSOLID +#undef BRESDASH +#undef DOTS +#undef ARC +#undef GLYPH +#undef POLYLINE +#undef POLYSEGMENT +#undef BITS +#undef BITS2 +#undef BITS4 + +#define BRESSOLID fbBresSolid16 +#define BRESDASH fbBresDash16 +#define DOTS fbDots16 +#define ARC fbArc16 +#define GLYPH fbGlyph16 +#define POLYLINE fbPolyline16 +#define POLYSEGMENT fbPolySegment16 +#define BITS CARD16 +#define BITS2 CARD32 +#if FB_SHIFT == 6 +#define BITS4 FbBits +#endif + +#include "fbbits.h" + +#undef BRESSOLID +#undef BRESDASH +#undef DOTS +#undef ARC +#undef GLYPH +#undef POLYLINE +#undef POLYSEGMENT +#undef BITS +#undef BITS2 +#if FB_SHIFT == 6 +#undef BITS4 +#endif + +#ifdef FB_24BIT +#define BRESSOLID fbBresSolid24 +#define BRESDASH fbBresDash24 +#define DOTS fbDots24 +#define ARC fbArc24 +#define POLYLINE fbPolyline24 +#define POLYSEGMENT fbPolySegment24 + +#define BITS CARD32 +#define BITSUNIT BYTE +#define BITSMUL 3 + +#define FbDoTypeStore(b,t,x,s) WRITE(((t *) (b)), (x) >> (s)) +#define FbDoTypeRRop(b,t,a,x,s) WRITE((t *) (b), FbDoRRop(READ((t *) (b)),\ + (a) >> (s), \ + (x) >> (s))) +#define FbDoTypeMaskRRop(b,t,a,x,m,s) WRITE((t *) (b), FbDoMaskRRop(READ((t *) (b)),\ + (a) >> (s), \ + (x) >> (s), \ + (m) >> (s))) +#if BITMAP_BIT_ORDER == LSBFirst +#define BITSSTORE(b,x) ((unsigned long) (b) & 1 ? \ + (FbDoTypeStore (b, CARD8, x, 0), \ + FbDoTypeStore ((b) + 1, CARD16, x, 8)) : \ + (FbDoTypeStore (b, CARD16, x, 0), \ + FbDoTypeStore ((b) + 2, CARD8, x, 16))) +#define BITSRROP(b,a,x) ((unsigned long) (b) & 1 ? \ + (FbDoTypeRRop(b,CARD8,a,x,0), \ + FbDoTypeRRop((b)+1,CARD16,a,x,8)) : \ + (FbDoTypeRRop(b,CARD16,a,x,0), \ + FbDoTypeRRop((b)+2,CARD8,a,x,16))) +#else +#define BITSSTORE(b,x) ((unsigned long) (b) & 1 ? \ + (FbDoTypeStore (b, CARD8, x, 16), \ + FbDoTypeStore ((b) + 1, CARD16, x, 0)) : \ + (FbDoTypeStore (b, CARD16, x, 8), \ + FbDoTypeStore ((b) + 2, CARD8, x, 0))) +#define BITSRROP(b,a,x) ((unsigned long) (b) & 1 ? \ + (FbDoTypeRRop (b, CARD8, a, x, 16), \ + FbDoTypeRRop ((b) + 1, CARD16, a, x, 0)) : \ + (FbDoTypeRRop (b, CARD16, a, x, 8), \ + FbDoTypeRRop ((b) + 2, CARD8, a, x, 0))) +#endif + +#include "fbbits.h" + +#undef BITSSTORE +#undef BITSRROP +#undef BITSMUL +#undef BITSUNIT +#undef BITS + +#undef BRESSOLID +#undef BRESDASH +#undef DOTS +#undef ARC +#undef POLYLINE +#undef POLYSEGMENT +#endif /* FB_24BIT */ + +#define BRESSOLID fbBresSolid32 +#define BRESDASH fbBresDash32 +#define DOTS fbDots32 +#define ARC fbArc32 +#define GLYPH fbGlyph32 +#define POLYLINE fbPolyline32 +#define POLYSEGMENT fbPolySegment32 +#define BITS CARD32 +#if FB_SHIFT == 6 +#define BITS2 FbBits +#endif + +#include "fbbits.h" + +#undef BRESSOLID +#undef BRESDASH +#undef DOTS +#undef ARC +#undef GLYPH +#undef POLYLINE +#undef POLYSEGMENT +#undef BITS +#if FB_SHIFT == 6 +#undef BITS2 +#endif diff --git a/xorg-server-1.4/fb/fbbits.h b/xorg-server-1.4/fb/fbbits.h new file mode 100644 index 0000000..44991f1 --- /dev/null +++ b/xorg-server-1.4/fb/fbbits.h @@ -0,0 +1,971 @@ +/* + * Copyright © 1998 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 defines functions for drawing some primitives using + * underlying datatypes instead of masks + */ + +#define isClipped(c,ul,lr) ((((c) - (ul)) | ((lr) - (c))) & 0x80008000) + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifdef BITSMUL +#define MUL BITSMUL +#else +#define MUL 1 +#endif + +#ifdef BITSSTORE +#define STORE(b,x) BITSSTORE(b,x) +#else +#define STORE(b,x) WRITE((b), (x)) +#endif + +#ifdef BITSRROP +#define RROP(b,a,x) BITSRROP(b,a,x) +#else +#define RROP(b,a,x) WRITE((b), FbDoRRop (READ(b), (a), (x))) +#endif + +#ifdef BITSUNIT +#define UNIT BITSUNIT +#define USE_SOLID +#else +#define UNIT BITS +#endif + +/* + * Define the following before including this file: + * + * BRESSOLID name of function for drawing a solid segment + * BRESDASH name of function for drawing a dashed segment + * DOTS name of function for drawing dots + * ARC name of function for drawing a solid arc + * BITS type of underlying unit + */ + +#ifdef BRESSOLID +void +BRESSOLID (DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x1, + int y1, + int e, + int e1, + int e3, + int len) +{ + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); + UNIT *bits; + FbStride bitsStride; + FbStride majorStep, minorStep; + BITS xor = (BITS) pPriv->xor; + + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + bits = ((UNIT *) (dst + ((y1 + dstYoff) * dstStride))) + (x1 + dstXoff) * MUL; + bitsStride = dstStride * (sizeof (FbBits) / sizeof (UNIT)); + if (signdy < 0) + bitsStride = -bitsStride; + if (axis == X_AXIS) + { + majorStep = signdx * MUL; + minorStep = bitsStride; + } + else + { + majorStep = bitsStride; + minorStep = signdx * MUL; + } + while (len--) + { + STORE(bits,xor); + bits += majorStep; + e += e1; + if (e >= 0) + { + bits += minorStep; + e += e3; + } + } + + fbFinishAccess (pDrawable); +} +#endif + +#ifdef BRESDASH +void +BRESDASH (DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x1, + int y1, + int e, + int e1, + int e3, + int len) +{ + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); + UNIT *bits; + FbStride bitsStride; + FbStride majorStep, minorStep; + BITS xorfg, xorbg; + FbDashDeclare; + int dashlen; + Bool even; + Bool doOdd; + + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + doOdd = pGC->lineStyle == LineDoubleDash; + xorfg = (BITS) pPriv->xor; + xorbg = (BITS) pPriv->bgxor; + + FbDashInit (pGC, pPriv, dashOffset, dashlen, even); + + bits = ((UNIT *) (dst + ((y1 + dstYoff) * dstStride))) + (x1 + dstXoff) * MUL; + bitsStride = dstStride * (sizeof (FbBits) / sizeof (UNIT)); + if (signdy < 0) + bitsStride = -bitsStride; + if (axis == X_AXIS) + { + majorStep = signdx * MUL; + minorStep = bitsStride; + } + else + { + majorStep = bitsStride; + minorStep = signdx * MUL; + } + if (dashlen >= len) + dashlen = len; + if (doOdd) + { + if (!even) + goto doubleOdd; + for (;;) + { + len -= dashlen; + while (dashlen--) + { + STORE(bits,xorfg); + bits += majorStep; + if ((e += e1) >= 0) + { + e += e3; + bits += minorStep; + } + } + if (!len) + break; + + FbDashNextEven(dashlen); + + if (dashlen >= len) + dashlen = len; +doubleOdd: + len -= dashlen; + while (dashlen--) + { + STORE(bits,xorbg); + bits += majorStep; + if ((e += e1) >= 0) + { + e += e3; + bits += minorStep; + } + } + if (!len) + break; + + FbDashNextOdd(dashlen); + + if (dashlen >= len) + dashlen = len; + } + } + else + { + if (!even) + goto onOffOdd; + for (;;) + { + len -= dashlen; + while (dashlen--) + { + STORE(bits,xorfg); + bits += majorStep; + if ((e += e1) >= 0) + { + e += e3; + bits += minorStep; + } + } + if (!len) + break; + + FbDashNextEven (dashlen); + + if (dashlen >= len) + dashlen = len; +onOffOdd: + len -= dashlen; + while (dashlen--) + { + bits += majorStep; + if ((e += e1) >= 0) + { + e += e3; + bits += minorStep; + } + } + if (!len) + break; + + FbDashNextOdd (dashlen); + + if (dashlen >= len) + dashlen = len; + } + } + + fbFinishAccess (pDrawable); +} +#endif + +#ifdef DOTS +void +DOTS (FbBits *dst, + FbStride dstStride, + int dstBpp, + BoxPtr pBox, + xPoint *ptsOrig, + int npt, + int xorg, + int yorg, + int xoff, + int yoff, + FbBits and, + FbBits xor) +{ + INT32 *pts = (INT32 *) ptsOrig; + UNIT *bits = (UNIT *) dst; + UNIT *point; + BITS bxor = (BITS) xor; + BITS band = (BITS) and; + FbStride bitsStride = dstStride * (sizeof (FbBits) / sizeof (UNIT)); + INT32 ul, lr; + INT32 pt; + + ul = coordToInt(pBox->x1 - xorg, pBox->y1 - yorg); + lr = coordToInt(pBox->x2 - xorg - 1, pBox->y2 - yorg - 1); + + bits += bitsStride * (yorg + yoff) + (xorg + xoff) * MUL; + + if (and == 0) + { + while (npt--) + { + pt = *pts++; + if (!isClipped(pt,ul,lr)) + { + point = bits + intToY(pt) * bitsStride + intToX(pt) * MUL; + STORE(point,bxor); + } + } + } + else + { + while (npt--) + { + pt = *pts++; + if (!isClipped(pt,ul,lr)) + { + point = bits + intToY(pt) * bitsStride + intToX(pt) * MUL; + RROP(point,band,bxor); + } + } + } +} +#endif + +#ifdef ARC + +#define ARCCOPY(d) STORE(d,xorBits) +#define ARCRROP(d) RROP(d,andBits,xorBits) + +void +ARC (FbBits *dst, + FbStride dstStride, + int dstBpp, + xArc *arc, + int drawX, + int drawY, + FbBits and, + FbBits xor) +{ + UNIT *bits; + FbStride bitsStride; + miZeroArcRec info; + Bool do360; + int x; + UNIT *yorgp, *yorgop; + BITS andBits, xorBits; + int yoffset, dyoffset; + int y, a, b, d, mask; + int k1, k3, dx, dy; + + bits = (UNIT *) dst; + bitsStride = dstStride * (sizeof (FbBits) / sizeof (UNIT)); + andBits = (BITS) and; + xorBits = (BITS) xor; + do360 = miZeroArcSetup(arc, &info, TRUE); + yorgp = bits + ((info.yorg + drawY) * bitsStride); + yorgop = bits + ((info.yorgo + drawY) * bitsStride); + info.xorg = (info.xorg + drawX) * MUL; + info.xorgo = (info.xorgo + drawX) * MUL; + MIARCSETUP(); + yoffset = y ? bitsStride : 0; + dyoffset = 0; + mask = info.initialMask; + + if (!(arc->width & 1)) + { + if (andBits == 0) + { + if (mask & 2) + ARCCOPY(yorgp + info.xorgo); + if (mask & 8) + ARCCOPY(yorgop + info.xorgo); + } + else + { + if (mask & 2) + ARCRROP(yorgp + info.xorgo); + if (mask & 8) + ARCRROP(yorgop + info.xorgo); + } + } + if (!info.end.x || !info.end.y) + { + mask = info.end.mask; + info.end = info.altend; + } + if (do360 && (arc->width == arc->height) && !(arc->width & 1)) + { + int xoffset = bitsStride; + UNIT *yorghb = yorgp + (info.h * bitsStride) + info.xorg; + UNIT *yorgohb = yorghb - info.h * MUL; + + yorgp += info.xorg; + yorgop += info.xorg; + yorghb += info.h * MUL; + while (1) + { + if (andBits == 0) + { + ARCCOPY(yorgp + yoffset + x * MUL); + ARCCOPY(yorgp + yoffset - x * MUL); + ARCCOPY(yorgop - yoffset - x * MUL); + ARCCOPY(yorgop - yoffset + x * MUL); + } + else + { + ARCRROP(yorgp + yoffset + x * MUL); + ARCRROP(yorgp + yoffset - x * MUL); + ARCRROP(yorgop - yoffset - x * MUL); + ARCRROP(yorgop - yoffset + x * MUL); + } + if (a < 0) + break; + if (andBits == 0) + { + ARCCOPY(yorghb - xoffset - y * MUL); + ARCCOPY(yorgohb - xoffset + y * MUL); + ARCCOPY(yorgohb + xoffset + y * MUL); + ARCCOPY(yorghb + xoffset - y * MUL); + } + else + { + ARCRROP(yorghb - xoffset - y * MUL); + ARCRROP(yorgohb - xoffset + y * MUL); + ARCRROP(yorgohb + xoffset + y * MUL); + ARCRROP(yorghb + xoffset - y * MUL); + } + xoffset += bitsStride; + MIARCCIRCLESTEP(yoffset += bitsStride;); + } + yorgp -= info.xorg; + yorgop -= info.xorg; + x = info.w; + yoffset = info.h * bitsStride; + } + else if (do360) + { + while (y < info.h || x < info.w) + { + MIARCOCTANTSHIFT(dyoffset = bitsStride;); + if (andBits == 0) + { + ARCCOPY(yorgp + yoffset + info.xorg + x * MUL); + ARCCOPY(yorgp + yoffset + info.xorgo - x * MUL); + ARCCOPY(yorgop - yoffset + info.xorgo - x * MUL); + ARCCOPY(yorgop - yoffset + info.xorg + x * MUL); + } + else + { + ARCRROP(yorgp + yoffset + info.xorg + x * MUL); + ARCRROP(yorgp + yoffset + info.xorgo - x * MUL); + ARCRROP(yorgop - yoffset + info.xorgo - x * MUL); + ARCRROP(yorgop - yoffset + info.xorg + x * MUL); + } + MIARCSTEP(yoffset += dyoffset;, yoffset += bitsStride;); + } + } + else + { + while (y < info.h || x < info.w) + { + MIARCOCTANTSHIFT(dyoffset = bitsStride;); + if ((x == info.start.x) || (y == info.start.y)) + { + mask = info.start.mask; + info.start = info.altstart; + } + if (andBits == 0) + { + if (mask & 1) + ARCCOPY(yorgp + yoffset + info.xorg + x * MUL); + if (mask & 2) + ARCCOPY(yorgp + yoffset + info.xorgo - x * MUL); + if (mask & 4) + ARCCOPY(yorgop - yoffset + info.xorgo - x * MUL); + if (mask & 8) + ARCCOPY(yorgop - yoffset + info.xorg + x * MUL); + } + else + { + if (mask & 1) + ARCRROP(yorgp + yoffset + info.xorg + x * MUL); + if (mask & 2) + ARCRROP(yorgp + yoffset + info.xorgo - x * MUL); + if (mask & 4) + ARCRROP(yorgop - yoffset + info.xorgo - x * MUL); + if (mask & 8) + ARCRROP(yorgop - yoffset + info.xorg + x * MUL); + } + if ((x == info.end.x) || (y == info.end.y)) + { + mask = info.end.mask; + info.end = info.altend; + } + MIARCSTEP(yoffset += dyoffset;, yoffset += bitsStride;); + } + } + if ((x == info.start.x) || (y == info.start.y)) + mask = info.start.mask; + if (andBits == 0) + { + if (mask & 1) + ARCCOPY(yorgp + yoffset + info.xorg + x * MUL); + if (mask & 4) + ARCCOPY(yorgop - yoffset + info.xorgo - x * MUL); + if (arc->height & 1) + { + if (mask & 2) + ARCCOPY(yorgp + yoffset + info.xorgo - x * MUL); + if (mask & 8) + ARCCOPY(yorgop - yoffset + info.xorg + x * MUL); + } + } + else + { + if (mask & 1) + ARCRROP(yorgp + yoffset + info.xorg + x * MUL); + if (mask & 4) + ARCRROP(yorgop - yoffset + info.xorgo - x * MUL); + if (arc->height & 1) + { + if (mask & 2) + ARCRROP(yorgp + yoffset + info.xorgo - x * MUL); + if (mask & 8) + ARCRROP(yorgop - yoffset + info.xorg + x * MUL); + } + } +} +#undef ARCCOPY +#undef ARCRROP +#endif + +#ifdef GLYPH +#if BITMAP_BIT_ORDER == LSBFirst +# define WRITE_ADDR1(n) (n) +# define WRITE_ADDR2(n) (n) +# define WRITE_ADDR4(n) (n) +#else +# define WRITE_ADDR1(n) ((n) ^ 3) +# define WRITE_ADDR2(n) ((n) ^ 2) +# define WRITE_ADDR4(n) ((n)) +#endif + +#define WRITE1(d,n,fg) WRITE(d + WRITE_ADDR1(n), (BITS) (fg)) + +#ifdef BITS2 +# define WRITE2(d,n,fg) WRITE((BITS2 *) &((d)[WRITE_ADDR2(n)]), (BITS2) (fg)) +#else +# define WRITE2(d,n,fg) (WRITE1(d,n,fg), WRITE1(d,(n)+1,fg)) +#endif + +#ifdef BITS4 +# define WRITE4(d,n,fg) WRITE((BITS4 *) &((d)[WRITE_ADDR4(n)]), (BITS4) (fg)) +#else +# define WRITE4(d,n,fg) (WRITE2(d,n,fg), WRITE2(d,(n)+2,fg)) +#endif + +void +GLYPH (FbBits *dstBits, + FbStride dstStride, + int dstBpp, + FbStip *stipple, + FbBits fg, + int x, + int height) +{ + int lshift; + FbStip bits; + BITS *dstLine; + BITS *dst; + int n; + int shift; + + dstLine = (BITS *) dstBits; + dstLine += x & ~3; + dstStride *= (sizeof (FbBits) / sizeof (BITS)); + shift = x & 3; + lshift = 4 - shift; + while (height--) + { + bits = *stipple++; + dst = (BITS *) dstLine; + n = lshift; + while (bits) + { + switch (FbStipMoveLsb (FbLeftStipBits (bits, n), 4, n)) { + case 0: + break; + case 1: + WRITE1(dst,0,fg); + break; + case 2: + WRITE1(dst,1,fg); + break; + case 3: + WRITE2(dst,0,fg); + break; + case 4: + WRITE1(dst,2,fg); + break; + case 5: + WRITE1(dst,0,fg); + WRITE1(dst,2,fg); + break; + case 6: + WRITE1(dst,1,fg); + WRITE1(dst,2,fg); + break; + case 7: + WRITE2(dst,0,fg); + WRITE1(dst,2,fg); + break; + case 8: + WRITE1(dst,3,fg); + break; + case 9: + WRITE1(dst,0,fg); + WRITE1(dst,3,fg); + break; + case 10: + WRITE1(dst,1,fg); + WRITE1(dst,3,fg); + break; + case 11: + WRITE2(dst,0,fg); + WRITE1(dst,3,fg); + break; + case 12: + WRITE2(dst,2,fg); + break; + case 13: + WRITE1(dst,0,fg); + WRITE2(dst,2,fg); + break; + case 14: + WRITE1(dst,1,fg); + WRITE2(dst,2,fg); + break; + case 15: + WRITE4(dst,0,fg); + break; + } + bits = FbStipLeft (bits, n); + n = 4; + dst += 4; + } + dstLine += dstStride; + } +} +#undef WRITE_ADDR1 +#undef WRITE_ADDR2 +#undef WRITE_ADDR4 +#undef WRITE1 +#undef WRITE2 +#undef WRITE4 + +#endif + +#ifdef POLYLINE +void +POLYLINE (DrawablePtr pDrawable, + GCPtr pGC, + int mode, + int npt, + DDXPointPtr ptsOrig) +{ + INT32 *pts = (INT32 *) ptsOrig; + int xoff = pDrawable->x; + int yoff = pDrawable->y; + unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); + BoxPtr pBox = REGION_EXTENTS (pDrawable->pScreen, fbGetCompositeClip (pGC)); + + FbBits *dst; + int dstStride; + int dstBpp; + int dstXoff, dstYoff; + + UNIT *bits, *bitsBase; + FbStride bitsStride; + BITS xor = fbGetGCPrivate(pGC)->xor; + BITS and = fbGetGCPrivate(pGC)->and; + int dashoffset = 0; + + INT32 ul, lr; + INT32 pt1, pt2; + + int e, e1, e3, len; + int stepmajor, stepminor; + int octant; + + if (mode == CoordModePrevious) + fbFixCoordModePrevious (npt, ptsOrig); + + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + bitsStride = dstStride * (sizeof (FbBits) / sizeof (UNIT)); + bitsBase = ((UNIT *) dst) + (yoff + dstYoff) * bitsStride + (xoff + dstXoff) * MUL; + ul = coordToInt(pBox->x1 - xoff, pBox->y1 - yoff); + lr = coordToInt(pBox->x2 - xoff - 1, pBox->y2 - yoff - 1); + + pt1 = *pts++; + npt--; + pt2 = *pts++; + npt--; + for (;;) + { + if (isClipped (pt1, ul, lr) | isClipped (pt2, ul, lr)) + { + fbSegment (pDrawable, pGC, + intToX(pt1) + xoff, intToY(pt1) + yoff, + intToX(pt2) + xoff, intToY(pt2) + yoff, + npt == 0 && pGC->capStyle != CapNotLast, + &dashoffset); + if (!npt) { + fbFinishAccess (pDrawable); + return; + } + pt1 = pt2; + pt2 = *pts++; + npt--; + } + else + { + bits = bitsBase + intToY(pt1) * bitsStride + intToX(pt1) * MUL; + for (;;) + { + CalcLineDeltas (intToX(pt1), intToY(pt1), + intToX(pt2), intToY(pt2), + len, e1, stepmajor, stepminor, 1, bitsStride, + octant); + stepmajor *= MUL; + if (len < e1) + { + e3 = len; + len = e1; + e1 = e3; + + e3 = stepminor; + stepminor = stepmajor; + stepmajor = e3; + SetYMajorOctant(octant); + } + e = -len; + e1 <<= 1; + e3 = e << 1; + FIXUP_ERROR (e, octant, bias); + if (and == 0) + { + while (len--) + { + STORE(bits,xor); + bits += stepmajor; + e += e1; + if (e >= 0) + { + bits += stepminor; + e += e3; + } + } + } + else + { + while (len--) + { + RROP(bits,and,xor); + bits += stepmajor; + e += e1; + if (e >= 0) + { + bits += stepminor; + e += e3; + } + } + } + if (!npt) + { + if (pGC->capStyle != CapNotLast && + pt2 != *((INT32 *) ptsOrig)) + { + RROP(bits,and,xor); + } + fbFinishAccess (pDrawable); + return; + } + pt1 = pt2; + pt2 = *pts++; + --npt; + if (isClipped (pt2, ul, lr)) + break; + } + } + } + + fbFinishAccess (pDrawable); +} +#endif + +#ifdef POLYSEGMENT +void +POLYSEGMENT (DrawablePtr pDrawable, + GCPtr pGC, + int nseg, + xSegment *pseg) +{ + INT32 *pts = (INT32 *) pseg; + int xoff = pDrawable->x; + int yoff = pDrawable->y; + unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); + BoxPtr pBox = REGION_EXTENTS (pDrawable->pScreen, fbGetCompositeClip (pGC)); + + FbBits *dst; + int dstStride; + int dstBpp; + int dstXoff, dstYoff; + + UNIT *bits, *bitsBase; + FbStride bitsStride; + FbBits xorBits = fbGetGCPrivate(pGC)->xor; + FbBits andBits = fbGetGCPrivate(pGC)->and; + BITS xor = xorBits; + BITS and = andBits; + int dashoffset = 0; + + INT32 ul, lr; + INT32 pt1, pt2; + + int e, e1, e3, len; + int stepmajor, stepminor; + int octant; + Bool capNotLast; + + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + bitsStride = dstStride * (sizeof (FbBits) / sizeof (UNIT)); + bitsBase = ((UNIT *) dst) + (yoff + dstYoff) * bitsStride + (xoff + dstXoff) * MUL; + ul = coordToInt(pBox->x1 - xoff, pBox->y1 - yoff); + lr = coordToInt(pBox->x2 - xoff - 1, pBox->y2 - yoff - 1); + + capNotLast = pGC->capStyle == CapNotLast; + + while (nseg--) + { + pt1 = *pts++; + pt2 = *pts++; + if (isClipped (pt1, ul, lr) | isClipped (pt2, ul, lr)) + { + fbSegment (pDrawable, pGC, + intToX(pt1) + xoff, intToY(pt1) + yoff, + intToX(pt2) + xoff, intToY(pt2) + yoff, + !capNotLast, &dashoffset); + } + else + { + CalcLineDeltas (intToX(pt1), intToY(pt1), + intToX(pt2), intToY(pt2), + len, e1, stepmajor, stepminor, 1, bitsStride, + octant); + if (e1 == 0 && len > 3 +#if MUL != 1 + && FbCheck24Pix(and) && FbCheck24Pix(xor) +#endif + ) + { + int x1, x2; + FbBits *dstLine; + int dstX, width; + FbBits startmask, endmask; + int nmiddle; + + if (stepmajor < 0) + { + x1 = intToX(pt2); + x2 = intToX(pt1) + 1; + if (capNotLast) + x1++; + } + else + { + x1 = intToX(pt1); + x2 = intToX(pt2); + if (!capNotLast) + x2++; + } + dstX = (x1 + xoff + dstXoff) * (sizeof (UNIT) * 8 * MUL); + width = (x2 - x1) * (sizeof (UNIT) * 8 * MUL); + + dstLine = dst + (intToY(pt1) + yoff + dstYoff) * dstStride; + dstLine += dstX >> FB_SHIFT; + dstX &= FB_MASK; + FbMaskBits (dstX, width, startmask, nmiddle, endmask); + if (startmask) + { + WRITE(dstLine, FbDoMaskRRop (READ(dstLine), andBits, xorBits, startmask)); + dstLine++; + } + if (!andBits) + while (nmiddle--) + WRITE(dstLine++, xorBits); + else + while (nmiddle--) + { + WRITE(dstLine, FbDoRRop (READ(dstLine), andBits, xorBits)); + dstLine++; + } + if (endmask) + WRITE(dstLine, FbDoMaskRRop (READ(dstLine), andBits, xorBits, endmask)); + } + else + { + stepmajor *= MUL; + bits = bitsBase + intToY(pt1) * bitsStride + intToX(pt1) * MUL; + if (len < e1) + { + e3 = len; + len = e1; + e1 = e3; + + e3 = stepminor; + stepminor = stepmajor; + stepmajor = e3; + SetYMajorOctant(octant); + } + e = -len; + e1 <<= 1; + e3 = e << 1; + FIXUP_ERROR (e, octant, bias); + if (!capNotLast) + len++; + if (and == 0) + { + while (len--) + { + STORE(bits,xor); + bits += stepmajor; + e += e1; + if (e >= 0) + { + bits += stepminor; + e += e3; + } + } + } + else + { + while (len--) + { + RROP(bits,and,xor); + bits += stepmajor; + e += e1; + if (e >= 0) + { + bits += stepminor; + e += e3; + } + } + } + } + } + } + + fbFinishAccess (pDrawable); +} +#endif + +#undef MUL +#undef STORE +#undef RROP +#undef UNIT +#undef USE_SOLID + +#undef isClipped diff --git a/xorg-server-1.4/fb/fbblt.c b/xorg-server-1.4/fb/fbblt.c new file mode 100644 index 0000000..837c3a2 --- /dev/null +++ b/xorg-server-1.4/fb/fbblt.c @@ -0,0 +1,954 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include +#include "fb.h" + +#define InitializeShifts(sx,dx,ls,rs) { \ + if (sx != dx) { \ + if (sx > dx) { \ + ls = sx - dx; \ + rs = FB_UNIT - ls; \ + } else { \ + rs = dx - sx; \ + ls = FB_UNIT - rs; \ + } \ + } \ +} + +void +fbBlt (FbBits *srcLine, + FbStride srcStride, + int srcX, + + FbBits *dstLine, + FbStride dstStride, + int dstX, + + int width, + int height, + + int alu, + FbBits pm, + int bpp, + + Bool reverse, + Bool upsidedown) +{ + FbBits *src, *dst; + int leftShift, rightShift; + FbBits startmask, endmask; + FbBits bits, bits1; + int n, nmiddle; + Bool destInvarient; + int startbyte, endbyte; + FbDeclareMergeRop (); + +#ifdef FB_24BIT + if (bpp == 24 && !FbCheck24Pix (pm)) + { + fbBlt24 (srcLine, srcStride, srcX, dstLine, dstStride, dstX, + width, height, alu, pm, reverse, upsidedown); + return; + } +#endif + + if (alu == GXcopy && pm == FB_ALLONES && !reverse && + !(srcX & 7) && !(dstX & 7) && !(width & 7)) { + int i; + CARD8 *src = (CARD8 *) srcLine; + CARD8 *dst = (CARD8 *) dstLine; + + srcStride *= sizeof(FbBits); + dstStride *= sizeof(FbBits); + width >>= 3; + src += (srcX >> 3); + dst += (dstX >> 3); + + if (!upsidedown) + for (i = 0; i < height; i++) + MEMCPY_WRAPPED(dst + i * dstStride, src + i * srcStride, width); + else + for (i = height - 1; i >= 0; i--) + MEMCPY_WRAPPED(dst + i * dstStride, src + i * srcStride, width); + + return; + } + + FbInitializeMergeRop(alu, pm); + destInvarient = FbDestInvarientMergeRop(); + if (upsidedown) + { + srcLine += (height - 1) * (srcStride); + dstLine += (height - 1) * (dstStride); + srcStride = -srcStride; + dstStride = -dstStride; + } + FbMaskBitsBytes (dstX, width, destInvarient, startmask, startbyte, + nmiddle, endmask, endbyte); + if (reverse) + { + srcLine += ((srcX + width - 1) >> FB_SHIFT) + 1; + dstLine += ((dstX + width - 1) >> FB_SHIFT) + 1; + srcX = (srcX + width - 1) & FB_MASK; + dstX = (dstX + width - 1) & FB_MASK; + } + else + { + srcLine += srcX >> FB_SHIFT; + dstLine += dstX >> FB_SHIFT; + srcX &= FB_MASK; + dstX &= FB_MASK; + } + if (srcX == dstX) + { + while (height--) + { + src = srcLine; + srcLine += srcStride; + dst = dstLine; + dstLine += dstStride; + if (reverse) + { + if (endmask) + { + bits = READ(--src); + --dst; + FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask); + } + n = nmiddle; + if (destInvarient) + { + while (n--) + WRITE(--dst, FbDoDestInvarientMergeRop(READ(--src))); + } + else + { + while (n--) + { + bits = READ(--src); + --dst; + WRITE(dst, FbDoMergeRop (bits, READ(dst))); + } + } + if (startmask) + { + bits = READ(--src); + --dst; + FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask); + } + } + else + { + if (startmask) + { + bits = READ(src++); + FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask); + dst++; + } + n = nmiddle; + if (destInvarient) + { +#if 0 + /* + * This provides some speedup on screen->screen blts + * over the PCI bus, usually about 10%. But fb + * isn't usually used for this operation... + */ + if (_ca2 + 1 == 0 && _cx2 == 0) + { + FbBits t1, t2, t3, t4; + while (n >= 4) + { + t1 = *src++; + t2 = *src++; + t3 = *src++; + t4 = *src++; + *dst++ = t1; + *dst++ = t2; + *dst++ = t3; + *dst++ = t4; + n -= 4; + } + } +#endif + while (n--) + WRITE(dst++, FbDoDestInvarientMergeRop(READ(src++))); + } + else + { + while (n--) + { + bits = READ(src++); + WRITE(dst, FbDoMergeRop (bits, READ(dst))); + dst++; + } + } + if (endmask) + { + bits = READ(src); + FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask); + } + } + } + } + else + { + if (srcX > dstX) + { + leftShift = srcX - dstX; + rightShift = FB_UNIT - leftShift; + } + else + { + rightShift = dstX - srcX; + leftShift = FB_UNIT - rightShift; + } + while (height--) + { + src = srcLine; + srcLine += srcStride; + dst = dstLine; + dstLine += dstStride; + + bits1 = 0; + if (reverse) + { + if (srcX < dstX) + bits1 = READ(--src); + if (endmask) + { + bits = FbScrRight(bits1, rightShift); + if (FbScrRight(endmask, leftShift)) + { + bits1 = READ(--src); + bits |= FbScrLeft(bits1, leftShift); + } + --dst; + FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask); + } + n = nmiddle; + if (destInvarient) + { + while (n--) + { + bits = FbScrRight(bits1, rightShift); + bits1 = READ(--src); + bits |= FbScrLeft(bits1, leftShift); + --dst; + WRITE(dst, FbDoDestInvarientMergeRop(bits)); + } + } + else + { + while (n--) + { + bits = FbScrRight(bits1, rightShift); + bits1 = READ(--src); + bits |= FbScrLeft(bits1, leftShift); + --dst; + WRITE(dst, FbDoMergeRop(bits, READ(dst))); + } + } + if (startmask) + { + bits = FbScrRight(bits1, rightShift); + if (FbScrRight(startmask, leftShift)) + { + bits1 = READ(--src); + bits |= FbScrLeft(bits1, leftShift); + } + --dst; + FbDoLeftMaskByteMergeRop (dst, bits, startbyte, startmask); + } + } + else + { + if (srcX > dstX) + bits1 = READ(src++); + if (startmask) + { + bits = FbScrLeft(bits1, leftShift); + if (FbScrLeft(startmask, rightShift)) + { + bits1 = READ(src++); + bits |= FbScrRight(bits1, rightShift); + } + FbDoLeftMaskByteMergeRop (dst, bits, startbyte, startmask); + dst++; + } + n = nmiddle; + if (destInvarient) + { + while (n--) + { + bits = FbScrLeft(bits1, leftShift); + bits1 = READ(src++); + bits |= FbScrRight(bits1, rightShift); + WRITE(dst, FbDoDestInvarientMergeRop(bits)); + dst++; + } + } + else + { + while (n--) + { + bits = FbScrLeft(bits1, leftShift); + bits1 = READ(src++); + bits |= FbScrRight(bits1, rightShift); + WRITE(dst, FbDoMergeRop(bits, READ(dst))); + dst++; + } + } + if (endmask) + { + bits = FbScrLeft(bits1, leftShift); + if (FbScrLeft(endmask, rightShift)) + { + bits1 = READ(src); + bits |= FbScrRight(bits1, rightShift); + } + FbDoRightMaskByteMergeRop (dst, bits, endbyte, endmask); + } + } + } + } +} + +#ifdef FB_24BIT + +#undef DEBUG_BLT24 +#ifdef DEBUG_BLT24 + +static unsigned long +getPixel (char *src, int x) +{ + unsigned long l; + + l = 0; + memcpy (&l, src + x * 3, 3); + return l; +} +#endif + +static void +fbBlt24Line (FbBits *src, + int srcX, + + FbBits *dst, + int dstX, + + int width, + + int alu, + FbBits pm, + + Bool reverse) +{ +#ifdef DEBUG_BLT24 + char *origDst = (char *) dst; + FbBits *origLine = dst + ((dstX >> FB_SHIFT) - 1); + int origNlw = ((width + FB_MASK) >> FB_SHIFT) + 3; + int origX = dstX / 24; +#endif + + int leftShift, rightShift; + FbBits startmask, endmask; + int n; + + FbBits bits, bits1; + FbBits mask; + + int rot; + FbDeclareMergeRop (); + + FbInitializeMergeRop (alu, FB_ALLONES); + FbMaskBits(dstX, width, startmask, n, endmask); +#ifdef DEBUG_BLT24 + ErrorF ("dstX %d width %d reverse %d\n", dstX, width, reverse); +#endif + if (reverse) + { + src += ((srcX + width - 1) >> FB_SHIFT) + 1; + dst += ((dstX + width - 1) >> FB_SHIFT) + 1; + rot = FbFirst24Rot (((dstX + width - 8) & FB_MASK)); + rot = FbPrev24Rot(rot); +#ifdef DEBUG_BLT24 + ErrorF ("dstX + width - 8: %d rot: %d\n", (dstX + width - 8) & FB_MASK, rot); +#endif + srcX = (srcX + width - 1) & FB_MASK; + dstX = (dstX + width - 1) & FB_MASK; + } + else + { + src += srcX >> FB_SHIFT; + dst += dstX >> FB_SHIFT; + srcX &= FB_MASK; + dstX &= FB_MASK; + rot = FbFirst24Rot (dstX); +#ifdef DEBUG_BLT24 + ErrorF ("dstX: %d rot: %d\n", dstX, rot); +#endif + } + mask = FbRot24(pm,rot); +#ifdef DEBUG_BLT24 + ErrorF ("pm 0x%x mask 0x%x\n", pm, mask); +#endif + if (srcX == dstX) + { + if (reverse) + { + if (endmask) + { + bits = READ(--src); + --dst; + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask)); + mask = FbPrev24Pix (mask); + } + while (n--) + { + bits = READ(--src); + --dst; + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask)); + mask = FbPrev24Pix (mask); + } + if (startmask) + { + bits = READ(--src); + --dst; + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & startmask)); + } + } + else + { + if (startmask) + { + bits = READ(src++); + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask)); + dst++; + mask = FbNext24Pix(mask); + } + while (n--) + { + bits = READ(src++); + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask)); + dst++; + mask = FbNext24Pix(mask); + } + if (endmask) + { + bits = READ(src); + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & endmask)); + } + } + } + else + { + if (srcX > dstX) + { + leftShift = srcX - dstX; + rightShift = FB_UNIT - leftShift; + } + else + { + rightShift = dstX - srcX; + leftShift = FB_UNIT - rightShift; + } + + bits1 = 0; + if (reverse) + { + if (srcX < dstX) + bits1 = READ(--src); + if (endmask) + { + bits = FbScrRight(bits1, rightShift); + if (FbScrRight(endmask, leftShift)) + { + bits1 = READ(--src); + bits |= FbScrLeft(bits1, leftShift); + } + --dst; + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask)); + mask = FbPrev24Pix(mask); + } + while (n--) + { + bits = FbScrRight(bits1, rightShift); + bits1 = READ(--src); + bits |= FbScrLeft(bits1, leftShift); + --dst; + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask)); + mask = FbPrev24Pix(mask); + } + if (startmask) + { + bits = FbScrRight(bits1, rightShift); + if (FbScrRight(startmask, leftShift)) + { + bits1 = READ(--src); + bits |= FbScrLeft(bits1, leftShift); + } + --dst; + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask)); + } + } + else + { + if (srcX > dstX) + bits1 = READ(src++); + if (startmask) + { + bits = FbScrLeft(bits1, leftShift); + bits1 = READ(src++); + bits |= FbScrRight(bits1, rightShift); + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask)); + dst++; + mask = FbNext24Pix(mask); + } + while (n--) + { + bits = FbScrLeft(bits1, leftShift); + bits1 = READ(src++); + bits |= FbScrRight(bits1, rightShift); + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask)); + dst++; + mask = FbNext24Pix(mask); + } + if (endmask) + { + bits = FbScrLeft(bits1, leftShift); + if (FbScrLeft(endmask, rightShift)) + { + bits1 = READ(src); + bits |= FbScrRight(bits1, rightShift); + } + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask)); + } + } + } +#ifdef DEBUG_BLT24 + { + int firstx, lastx, x; + + firstx = origX; + if (firstx) + firstx--; + lastx = origX + width/24 + 1; + for (x = firstx; x <= lastx; x++) + ErrorF ("%06x ", getPixel (origDst, x)); + ErrorF ("\n"); + while (origNlw--) + ErrorF ("%08x ", *origLine++); + ErrorF ("\n"); + } +#endif +} + +void +fbBlt24 (FbBits *srcLine, + FbStride srcStride, + int srcX, + + FbBits *dstLine, + FbStride dstStride, + int dstX, + + int width, + int height, + + int alu, + FbBits pm, + + Bool reverse, + Bool upsidedown) +{ + if (upsidedown) + { + srcLine += (height-1) * srcStride; + dstLine += (height-1) * dstStride; + srcStride = -srcStride; + dstStride = -dstStride; + } + while (height--) + { + fbBlt24Line (srcLine, srcX, dstLine, dstX, width, alu, pm, reverse); + srcLine += srcStride; + dstLine += dstStride; + } +#ifdef DEBUG_BLT24 + ErrorF ("\n"); +#endif +} +#endif /* FB_24BIT */ + +#if FB_SHIFT == FB_STIP_SHIFT + 1 + +/* + * Could be generalized to FB_SHIFT > FB_STIP_SHIFT + 1 by + * creating an ring of values stepped through for each line + */ + +void +fbBltOdd (FbBits *srcLine, + FbStride srcStrideEven, + FbStride srcStrideOdd, + int srcXEven, + int srcXOdd, + + FbBits *dstLine, + FbStride dstStrideEven, + FbStride dstStrideOdd, + int dstXEven, + int dstXOdd, + + int width, + int height, + + int alu, + FbBits pm, + int bpp) +{ + FbBits *src; + int leftShiftEven, rightShiftEven; + FbBits startmaskEven, endmaskEven; + int nmiddleEven; + + FbBits *dst; + int leftShiftOdd, rightShiftOdd; + FbBits startmaskOdd, endmaskOdd; + int nmiddleOdd; + + int leftShift, rightShift; + FbBits startmask, endmask; + int nmiddle; + + int srcX, dstX; + + FbBits bits, bits1; + int n; + + Bool destInvarient; + Bool even; + FbDeclareMergeRop (); + + FbInitializeMergeRop (alu, pm); + destInvarient = FbDestInvarientMergeRop(); + + srcLine += srcXEven >> FB_SHIFT; + dstLine += dstXEven >> FB_SHIFT; + srcXEven &= FB_MASK; + dstXEven &= FB_MASK; + srcXOdd &= FB_MASK; + dstXOdd &= FB_MASK; + + FbMaskBits(dstXEven, width, startmaskEven, nmiddleEven, endmaskEven); + FbMaskBits(dstXOdd, width, startmaskOdd, nmiddleOdd, endmaskOdd); + + even = TRUE; + InitializeShifts(srcXEven, dstXEven, leftShiftEven, rightShiftEven); + InitializeShifts(srcXOdd, dstXOdd, leftShiftOdd, rightShiftOdd); + while (height--) + { + src = srcLine; + dst = dstLine; + if (even) + { + srcX = srcXEven; + dstX = dstXEven; + startmask = startmaskEven; + endmask = endmaskEven; + nmiddle = nmiddleEven; + leftShift = leftShiftEven; + rightShift = rightShiftEven; + srcLine += srcStrideEven; + dstLine += dstStrideEven; + even = FALSE; + } + else + { + srcX = srcXOdd; + dstX = dstXOdd; + startmask = startmaskOdd; + endmask = endmaskOdd; + nmiddle = nmiddleOdd; + leftShift = leftShiftOdd; + rightShift = rightShiftOdd; + srcLine += srcStrideOdd; + dstLine += dstStrideOdd; + even = TRUE; + } + if (srcX == dstX) + { + if (startmask) + { + bits = READ(src++); + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), startmask)); + dst++; + } + n = nmiddle; + if (destInvarient) + { + while (n--) + { + bits = READ(src++); + WRITE(dst, FbDoDestInvarientMergeRop(bits)); + dst++; + } + } + else + { + while (n--) + { + bits = READ(src++); + WRITE(dst, FbDoMergeRop (bits, READ(dst))); + dst++; + } + } + if (endmask) + { + bits = READ(src); + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), endmask)); + } + } + else + { + bits = 0; + if (srcX > dstX) + bits = READ(src++); + if (startmask) + { + bits1 = FbScrLeft(bits, leftShift); + bits = READ(src++); + bits1 |= FbScrRight(bits, rightShift); + WRITE(dst, FbDoMaskMergeRop (bits1, READ(dst), startmask)); + dst++; + } + n = nmiddle; + if (destInvarient) + { + while (n--) + { + bits1 = FbScrLeft(bits, leftShift); + bits = READ(src++); + bits1 |= FbScrRight(bits, rightShift); + WRITE(dst, FbDoDestInvarientMergeRop(bits1)); + dst++; + } + } + else + { + while (n--) + { + bits1 = FbScrLeft(bits, leftShift); + bits = READ(src++); + bits1 |= FbScrRight(bits, rightShift); + WRITE(dst, FbDoMergeRop(bits1, READ(dst))); + dst++; + } + } + if (endmask) + { + bits1 = FbScrLeft(bits, leftShift); + if (FbScrLeft(endmask, rightShift)) + { + bits = READ(src); + bits1 |= FbScrRight(bits, rightShift); + } + WRITE(dst, FbDoMaskMergeRop (bits1, READ(dst), endmask)); + } + } + } +} + +#ifdef FB_24BIT +void +fbBltOdd24 (FbBits *srcLine, + FbStride srcStrideEven, + FbStride srcStrideOdd, + int srcXEven, + int srcXOdd, + + FbBits *dstLine, + FbStride dstStrideEven, + FbStride dstStrideOdd, + int dstXEven, + int dstXOdd, + + int width, + int height, + + int alu, + FbBits pm) +{ + Bool even = TRUE; + + while (height--) + { + if (even) + { + fbBlt24Line (srcLine, srcXEven, dstLine, dstXEven, + width, alu, pm, FALSE); + srcLine += srcStrideEven; + dstLine += dstStrideEven; + even = FALSE; + } + else + { + fbBlt24Line (srcLine, srcXOdd, dstLine, dstXOdd, + width, alu, pm, FALSE); + srcLine += srcStrideOdd; + dstLine += dstStrideOdd; + even = TRUE; + } + } +#if 0 + fprintf (stderr, "\n"); +#endif +} +#endif + +#endif + +#if FB_STIP_SHIFT != FB_SHIFT +void +fbSetBltOdd (FbStip *stip, + FbStride stipStride, + int srcX, + FbBits **bits, + FbStride *strideEven, + FbStride *strideOdd, + int *srcXEven, + int *srcXOdd) +{ + int srcAdjust; + int strideAdjust; + + /* + * bytes needed to align source + */ + srcAdjust = (((int) stip) & (FB_MASK >> 3)); + /* + * FbStip units needed to align stride + */ + strideAdjust = stipStride & (FB_MASK >> FB_STIP_SHIFT); + + *bits = (FbBits *) ((char *) stip - srcAdjust); + if (srcAdjust) + { + *strideEven = FbStipStrideToBitsStride (stipStride + 1); + *strideOdd = FbStipStrideToBitsStride (stipStride); + + *srcXEven = srcX + (srcAdjust << 3); + *srcXOdd = srcX + (srcAdjust << 3) - (strideAdjust << FB_STIP_SHIFT); + } + else + { + *strideEven = FbStipStrideToBitsStride (stipStride); + *strideOdd = FbStipStrideToBitsStride (stipStride + 1); + + *srcXEven = srcX; + *srcXOdd = srcX + (strideAdjust << FB_STIP_SHIFT); + } +} +#endif + +void +fbBltStip (FbStip *src, + FbStride srcStride, /* in FbStip units, not FbBits units */ + int srcX, + + FbStip *dst, + FbStride dstStride, /* in FbStip units, not FbBits units */ + int dstX, + + int width, + int height, + + int alu, + FbBits pm, + int bpp) +{ +#if FB_STIP_SHIFT != FB_SHIFT + if (FB_STIP_ODDSTRIDE(srcStride) || FB_STIP_ODDPTR(src) || + FB_STIP_ODDSTRIDE(dstStride) || FB_STIP_ODDPTR(dst)) + { + FbStride srcStrideEven, srcStrideOdd; + FbStride dstStrideEven, dstStrideOdd; + int srcXEven, srcXOdd; + int dstXEven, dstXOdd; + FbBits *s, *d; + int sx, dx; + + src += srcX >> FB_STIP_SHIFT; + srcX &= FB_STIP_MASK; + dst += dstX >> FB_STIP_SHIFT; + dstX &= FB_STIP_MASK; + + fbSetBltOdd (src, srcStride, srcX, + &s, + &srcStrideEven, &srcStrideOdd, + &srcXEven, &srcXOdd); + + fbSetBltOdd (dst, dstStride, dstX, + &d, + &dstStrideEven, &dstStrideOdd, + &dstXEven, &dstXOdd); + +#ifdef FB_24BIT + if (bpp == 24 && !FbCheck24Pix (pm)) + { + fbBltOdd24 (s, srcStrideEven, srcStrideOdd, + srcXEven, srcXOdd, + + d, dstStrideEven, dstStrideOdd, + dstXEven, dstXOdd, + + width, height, alu, pm); + } + else +#endif + { + fbBltOdd (s, srcStrideEven, srcStrideOdd, + srcXEven, srcXOdd, + + d, dstStrideEven, dstStrideOdd, + dstXEven, dstXOdd, + + width, height, alu, pm, bpp); + } + } + else +#endif + { + fbBlt ((FbBits *) src, FbStipStrideToBitsStride (srcStride), + srcX, + (FbBits *) dst, FbStipStrideToBitsStride (dstStride), + dstX, + width, height, + alu, pm, bpp, FALSE, FALSE); + } +} diff --git a/xorg-server-1.4/fb/fbbltone.c b/xorg-server-1.4/fb/fbbltone.c new file mode 100644 index 0000000..ffe6977 --- /dev/null +++ b/xorg-server-1.4/fb/fbbltone.c @@ -0,0 +1,879 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +/* + * Example: srcX = 13 dstX = 8 (FB unit 32 dstBpp 8) + * + * **** **** **** **** **** **** **** **** + * ^ + * ******** ******** ******** ******** + * ^ + * leftShift = 12 + * rightShift = 20 + * + * Example: srcX = 0 dstX = 8 (FB unit 32 dstBpp 8) + * + * **** **** **** **** **** **** **** **** + * ^ + * ******** ******** ******** ******** + * ^ + * + * leftShift = 24 + * rightShift = 8 + */ + +#define LoadBits {\ + if (leftShift) { \ + bitsRight = (src < srcEnd ? READ(src++) : 0); \ + bits = (FbStipLeft (bitsLeft, leftShift) | \ + FbStipRight(bitsRight, rightShift)); \ + bitsLeft = bitsRight; \ + } else \ + bits = (src < srcEnd ? READ(src++) : 0); \ +} + +#ifndef FBNOPIXADDR + +#define LaneCases1(n,a) case n: (void)FbLaneCase(n,a); break +#define LaneCases2(n,a) LaneCases1(n,a); LaneCases1(n+1,a) +#define LaneCases4(n,a) LaneCases2(n,a); LaneCases2(n+2,a) +#define LaneCases8(n,a) LaneCases4(n,a); LaneCases4(n+4,a) +#define LaneCases16(n,a) LaneCases8(n,a); LaneCases8(n+8,a) +#define LaneCases32(n,a) LaneCases16(n,a); LaneCases16(n+16,a) +#define LaneCases64(n,a) LaneCases32(n,a); LaneCases32(n+32,a) +#define LaneCases128(n,a) LaneCases64(n,a); LaneCases64(n+64,a) +#define LaneCases256(n,a) LaneCases128(n,a); LaneCases128(n+128,a) + +#if FB_SHIFT == 6 +#define LaneCases(a) LaneCases256(0,a) +#endif + +#if FB_SHIFT == 5 +#define LaneCases(a) LaneCases16(0,a) +#endif + +#if FB_SHIFT == 6 +CARD8 fb8Lane[256] = { +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, +22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, +41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, +60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, +79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, +98, 99, 100, 101, 102,103,104,105,106,107,108,109,110,111,112,113,114,115, +116, 117, 118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133, +134, 135, 136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151, +152, 153, 154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169, +170, 171, 172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187, +188, 189, 190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205, +206, 207, 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, +224, 225, 226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241, +242, 243, 244,245,246,247,248,249,250,251,252,253,254,255, +}; + +CARD8 fb16Lane[256] = { + 0x00, 0x03, 0x0c, 0x0f, + 0x30, 0x33, 0x3c, 0x3f, + 0xc0, 0xc3, 0xcc, 0xcf, + 0xf0, 0xf3, 0xfc, 0xff, +}; + +CARD8 fb32Lane[16] = { + 0x00, 0x0f, 0xf0, 0xff, +}; +#endif + +#if FB_SHIFT == 5 +CARD8 fb8Lane[16] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 +}; + +CARD8 fb16Lane[16] = { + 0, 3, 12, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + +CARD8 fb32Lane[16] = { + 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; +#endif + +CARD8 *fbLaneTable[33] = { + 0, 0, 0, 0, 0, 0, 0, 0, + fb8Lane, 0, 0, 0, 0, 0, 0, 0, + fb16Lane, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + fb32Lane +}; +#endif + +void +fbBltOne (FbStip *src, + FbStride srcStride, /* FbStip units per scanline */ + int srcX, /* bit position of source */ + FbBits *dst, + FbStride dstStride, /* FbBits units per scanline */ + int dstX, /* bit position of dest */ + int dstBpp, /* bits per destination unit */ + + int width, /* width in bits of destination */ + int height, /* height in scanlines */ + + FbBits fgand, /* rrop values */ + FbBits fgxor, + FbBits bgand, + FbBits bgxor) +{ + const FbBits *fbBits; + FbBits *srcEnd; + int pixelsPerDst; /* dst pixels per FbBits */ + int unitsPerSrc; /* src patterns per FbStip */ + int leftShift, rightShift; /* align source with dest */ + FbBits startmask, endmask; /* dest scanline masks */ + FbStip bits=0, bitsLeft, bitsRight;/* source bits */ + FbStip left; + FbBits mask; + int nDst; /* dest longwords (w.o. end) */ + int w; + int n, nmiddle; + int dstS; /* stipple-relative dst X coordinate */ + Bool copy; /* accelerate dest-invariant */ + Bool transparent; /* accelerate 0 nop */ + int srcinc; /* source units consumed */ + Bool endNeedsLoad = FALSE; /* need load for endmask */ +#ifndef FBNOPIXADDR + CARD8 *fbLane; +#endif + int startbyte, endbyte; + +#ifdef FB_24BIT + if (dstBpp == 24) + { + fbBltOne24 (src, srcStride, srcX, + dst, dstStride, dstX, dstBpp, + width, height, + fgand, fgxor, bgand, bgxor); + return; + } +#endif + + /* + * Do not read past the end of the buffer! + */ + srcEnd = src + height * srcStride; + + /* + * Number of destination units in FbBits == number of stipple pixels + * used each time + */ + pixelsPerDst = FB_UNIT / dstBpp; + + /* + * Number of source stipple patterns in FbStip + */ + unitsPerSrc = FB_STIP_UNIT / pixelsPerDst; + + copy = FALSE; + transparent = FALSE; + if (bgand == 0 && fgand == 0) + copy = TRUE; + else if (bgand == FB_ALLONES && bgxor == 0) + transparent = TRUE; + + /* + * Adjust source and dest to nearest FbBits boundary + */ + src += srcX >> FB_STIP_SHIFT; + dst += dstX >> FB_SHIFT; + srcX &= FB_STIP_MASK; + dstX &= FB_MASK; + + FbMaskBitsBytes(dstX, width, copy, + startmask, startbyte, nmiddle, endmask, endbyte); + + /* + * Compute effective dest alignment requirement for + * source -- must align source to dest unit boundary + */ + dstS = dstX / dstBpp; + /* + * Compute shift constants for effective alignement + */ + if (srcX >= dstS) + { + leftShift = srcX - dstS; + rightShift = FB_STIP_UNIT - leftShift; + } + else + { + rightShift = dstS - srcX; + leftShift = FB_STIP_UNIT - rightShift; + } + /* + * Get pointer to stipple mask array for this depth + */ + fbBits = 0; /* unused */ + if (pixelsPerDst <= 8) + fbBits = fbStippleTable[pixelsPerDst]; +#ifndef FBNOPIXADDR + fbLane = 0; + if (transparent && fgand == 0 && dstBpp >= 8) + fbLane = fbLaneTable[dstBpp]; +#endif + + /* + * Compute total number of destination words written, but + * don't count endmask + */ + nDst = nmiddle; + if (startmask) + nDst++; + + dstStride -= nDst; + + /* + * Compute total number of source words consumed + */ + + srcinc = (nDst + unitsPerSrc - 1) / unitsPerSrc; + + if (srcX > dstS) + srcinc++; + if (endmask) + { + endNeedsLoad = nDst % unitsPerSrc == 0; + if (endNeedsLoad) + srcinc++; + } + + srcStride -= srcinc; + + /* + * Copy rectangle + */ + while (height--) + { + w = nDst; /* total units across scanline */ + n = unitsPerSrc; /* units avail in single stipple */ + if (n > w) + n = w; + + bitsLeft = 0; + if (srcX > dstS) + bitsLeft = READ(src++); + if (n) + { + /* + * Load first set of stipple bits + */ + LoadBits; + + /* + * Consume stipple bits for startmask + */ + if (startmask) + { +#if FB_UNIT > 32 + if (pixelsPerDst == 16) + mask = FbStipple16Bits(FbLeftStipBits(bits,16)); + else +#endif + mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)]; +#ifndef FBNOPIXADDR + if (fbLane) + { + fbTransparentSpan (dst, mask & startmask, fgxor, 1); + } + else +#endif + { + if (mask || !transparent) + FbDoLeftMaskByteStippleRRop (dst, mask, + fgand, fgxor, bgand, bgxor, + startbyte, startmask); + } + bits = FbStipLeft (bits, pixelsPerDst); + dst++; + n--; + w--; + } + /* + * Consume stipple bits across scanline + */ + for (;;) + { + w -= n; + if (copy) + { + while (n--) + { +#if FB_UNIT > 32 + if (pixelsPerDst == 16) + mask = FbStipple16Bits(FbLeftStipBits(bits,16)); + else +#endif + mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)]; + WRITE(dst, FbOpaqueStipple (mask, fgxor, bgxor)); + dst++; + bits = FbStipLeft(bits, pixelsPerDst); + } + } + else + { +#ifndef FBNOPIXADDR + if (fbLane) + { + while (bits && n) + { + switch (fbLane[FbLeftStipBits(bits,pixelsPerDst)]) { + LaneCases((CARD8 *) dst); + } + bits = FbStipLeft(bits,pixelsPerDst); + dst++; + n--; + } + dst += n; + } + else +#endif + { + while (n--) + { + left = FbLeftStipBits(bits,pixelsPerDst); + if (left || !transparent) + { + mask = fbBits[left]; + WRITE(dst, FbStippleRRop (READ(dst), mask, + fgand, fgxor, bgand, bgxor)); + } + dst++; + bits = FbStipLeft(bits, pixelsPerDst); + } + } + } + if (!w) + break; + /* + * Load another set and reset number of available units + */ + LoadBits; + n = unitsPerSrc; + if (n > w) + n = w; + } + } + /* + * Consume stipple bits for endmask + */ + if (endmask) + { + if (endNeedsLoad) + { + LoadBits; + } +#if FB_UNIT > 32 + if (pixelsPerDst == 16) + mask = FbStipple16Bits(FbLeftStipBits(bits,16)); + else +#endif + mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)]; +#ifndef FBNOPIXADDR + if (fbLane) + { + fbTransparentSpan (dst, mask & endmask, fgxor, 1); + } + else +#endif + { + if (mask || !transparent) + FbDoRightMaskByteStippleRRop (dst, mask, + fgand, fgxor, bgand, bgxor, + endbyte, endmask); + } + } + dst += dstStride; + src += srcStride; + } +} + +#ifdef FB_24BIT + +/* + * Crufty macros to initialize the mask array, most of this + * is to avoid compile-time warnings about shift overflow + */ + +#if BITMAP_BIT_ORDER == MSBFirst +#define Mask24Pos(x,r) ((x)*24-(r)) +#else +#define Mask24Pos(x,r) ((x)*24-((r) ? 24 - (r) : 0)) +#endif + +#define Mask24Neg(x,r) (Mask24Pos(x,r) < 0 ? -Mask24Pos(x,r) : 0) +#define Mask24Check(x,r) (Mask24Pos(x,r) < 0 ? 0 : \ + Mask24Pos(x,r) >= FB_UNIT ? 0 : Mask24Pos(x,r)) + +#define Mask24(x,r) (Mask24Pos(x,r) < FB_UNIT ? \ + (Mask24Pos(x,r) < 0 ? \ + 0xffffff >> Mask24Neg (x,r) : \ + 0xffffff << Mask24Check(x,r)) : 0) + +#define SelMask24(b,n,r) ((((b) >> n) & 1) * Mask24(n,r)) + +/* + * Untested for MSBFirst or FB_UNIT == 32 + */ + +#if FB_UNIT == 64 +#define C4_24(b,r) \ + (SelMask24(b,0,r) | \ + SelMask24(b,1,r) | \ + SelMask24(b,2,r) | \ + SelMask24(b,3,r)) + +#define FbStip24New(rot) (2 + (rot != 0)) +#define FbStip24Len 4 + +const FbBits fbStipple24Bits[3][1 << FbStip24Len] = { + /* rotate 0 */ + { + C4_24( 0, 0), C4_24( 1, 0), C4_24( 2, 0), C4_24( 3, 0), + C4_24( 4, 0), C4_24( 5, 0), C4_24( 6, 0), C4_24( 7, 0), + C4_24( 8, 0), C4_24( 9, 0), C4_24(10, 0), C4_24(11, 0), + C4_24(12, 0), C4_24(13, 0), C4_24(14, 0), C4_24(15, 0), + }, + /* rotate 8 */ + { + C4_24( 0, 8), C4_24( 1, 8), C4_24( 2, 8), C4_24( 3, 8), + C4_24( 4, 8), C4_24( 5, 8), C4_24( 6, 8), C4_24( 7, 8), + C4_24( 8, 8), C4_24( 9, 8), C4_24(10, 8), C4_24(11, 8), + C4_24(12, 8), C4_24(13, 8), C4_24(14, 8), C4_24(15, 8), + }, + /* rotate 16 */ + { + C4_24( 0,16), C4_24( 1,16), C4_24( 2,16), C4_24( 3,16), + C4_24( 4,16), C4_24( 5,16), C4_24( 6,16), C4_24( 7,16), + C4_24( 8,16), C4_24( 9,16), C4_24(10,16), C4_24(11,16), + C4_24(12,16), C4_24(13,16), C4_24(14,16), C4_24(15,16), + } +}; + +#endif + +#if FB_UNIT == 32 +#define C2_24(b,r) \ + (SelMask24(b,0,r) | \ + SelMask24(b,1,r)) + +#define FbStip24Len 2 +#if BITMAP_BIT_ORDER == MSBFirst +#define FbStip24New(rot) (1 + (rot == 0)) +#else +#define FbStip24New(rot) (1 + (rot == 8)) +#endif + +const FbBits fbStipple24Bits[3][1 << FbStip24Len] = { + /* rotate 0 */ + { + C2_24( 0, 0), C2_24 ( 1, 0), C2_24 ( 2, 0), C2_24 ( 3, 0), + }, + /* rotate 8 */ + { + C2_24( 0, 8), C2_24 ( 1, 8), C2_24 ( 2, 8), C2_24 ( 3, 8), + }, + /* rotate 16 */ + { + C2_24( 0,16), C2_24 ( 1,16), C2_24 ( 2,16), C2_24 ( 3,16), + } +}; +#endif + +#if BITMAP_BIT_ORDER == LSBFirst + +#define FbMergeStip24Bits(left, right, new) \ + (FbStipLeft (left, new) | FbStipRight ((right), (FbStip24Len - (new)))) + +#define FbMergePartStip24Bits(left, right, llen, rlen) \ + (left | FbStipRight(right, llen)) + +#else + +#define FbMergeStip24Bits(left, right, new) \ + ((FbStipLeft (left, new) & ((1 << FbStip24Len) - 1)) | right) + +#define FbMergePartStip24Bits(left, right, llen, rlen) \ + (FbStipLeft(left, rlen) | right) + +#endif + +#define fbFirstStipBits(len,stip) {\ + int __len = (len); \ + if (len <= remain) { \ + stip = FbLeftStipBits(bits, len); \ + } else { \ + stip = FbLeftStipBits(bits, remain); \ + bits = (src < srcEnd ? READ(src++) : 0); \ + __len = (len) - remain; \ + stip = FbMergePartStip24Bits(stip, FbLeftStipBits(bits, __len), \ + remain, __len); \ + remain = FB_STIP_UNIT; \ + } \ + bits = FbStipLeft (bits, __len); \ + remain -= __len; \ +} + +#define fbInitStipBits(offset,len,stip) {\ + bits = FbStipLeft (READ(src++),offset); \ + remain = FB_STIP_UNIT - offset; \ + fbFirstStipBits(len,stip); \ + stip = FbMergeStip24Bits (0, stip, len); \ +} + +#define fbNextStipBits(rot,stip) {\ + int __new = FbStip24New(rot); \ + FbStip __right; \ + fbFirstStipBits(__new, __right); \ + stip = FbMergeStip24Bits (stip, __right, __new); \ + rot = FbNext24Rot (rot); \ +} + +/* + * Use deep mask tables that incorporate rotation, pull + * a variable number of bits out of the stipple and + * reuse the right bits as needed for the next write + * + * Yes, this is probably too much code, but most 24-bpp screens + * have no acceleration so this code is used for stipples, copyplane + * and text + */ +void +fbBltOne24 (FbStip *srcLine, + FbStride srcStride, /* FbStip units per scanline */ + int srcX, /* bit position of source */ + FbBits *dst, + FbStride dstStride, /* FbBits units per scanline */ + int dstX, /* bit position of dest */ + int dstBpp, /* bits per destination unit */ + + int width, /* width in bits of destination */ + int height, /* height in scanlines */ + + FbBits fgand, /* rrop values */ + FbBits fgxor, + FbBits bgand, + FbBits bgxor) +{ + FbStip *src, *srcEnd; + FbBits leftMask, rightMask, mask; + int nlMiddle, nl; + FbStip stip, bits; + int remain; + int dstS; + int firstlen; + int rot0, rot; + int nDst; + + /* + * Do not read past the end of the buffer! + */ + srcEnd = srcLine + height * srcStride; + + srcLine += srcX >> FB_STIP_SHIFT; + dst += dstX >> FB_SHIFT; + srcX &= FB_STIP_MASK; + dstX &= FB_MASK; + rot0 = FbFirst24Rot (dstX); + + FbMaskBits (dstX, width, leftMask, nlMiddle, rightMask); + + dstS = (dstX + 23) / 24; + firstlen = FbStip24Len - dstS; + + nDst = nlMiddle; + if (leftMask) + nDst++; + dstStride -= nDst; + + /* opaque copy */ + if (bgand == 0 && fgand == 0) + { + while (height--) + { + rot = rot0; + src = srcLine; + srcLine += srcStride; + fbInitStipBits (srcX,firstlen, stip); + if (leftMask) + { + mask = fbStipple24Bits[rot >> 3][stip]; + WRITE(dst, (READ(dst) & ~leftMask) | + (FbOpaqueStipple (mask, + FbRot24(fgxor, rot), + FbRot24(bgxor, rot)) + & leftMask)); + dst++; + fbNextStipBits(rot,stip); + } + nl = nlMiddle; + while (nl--) + { + mask = fbStipple24Bits[rot>>3][stip]; + WRITE(dst, FbOpaqueStipple (mask, + FbRot24(fgxor, rot), + FbRot24(bgxor, rot))); + dst++; + fbNextStipBits(rot,stip); + } + if (rightMask) + { + mask = fbStipple24Bits[rot >> 3][stip]; + WRITE(dst, (READ(dst) & ~rightMask) | + (FbOpaqueStipple (mask, + FbRot24(fgxor, rot), + FbRot24(bgxor, rot)) + & rightMask)); + } + dst += dstStride; + src += srcStride; + } + } + /* transparent copy */ + else if (bgand == FB_ALLONES && bgxor == 0 && fgand == 0) + { + while (height--) + { + rot = rot0; + src = srcLine; + srcLine += srcStride; + fbInitStipBits (srcX, firstlen, stip); + if (leftMask) + { + if (stip) + { + mask = fbStipple24Bits[rot >> 3][stip] & leftMask; + WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask)); + } + dst++; + fbNextStipBits (rot, stip); + } + nl = nlMiddle; + while (nl--) + { + if (stip) + { + mask = fbStipple24Bits[rot>>3][stip]; + WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor,rot) & mask)); + } + dst++; + fbNextStipBits (rot, stip); + } + if (rightMask) + { + if (stip) + { + mask = fbStipple24Bits[rot >> 3][stip] & rightMask; + WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask)); + } + } + dst += dstStride; + } + } + else + { + while (height--) + { + rot = rot0; + src = srcLine; + srcLine += srcStride; + fbInitStipBits (srcX, firstlen, stip); + if (leftMask) + { + mask = fbStipple24Bits[rot >> 3][stip]; + WRITE(dst, FbStippleRRopMask (READ(dst), mask, + FbRot24(fgand, rot), + FbRot24(fgxor, rot), + FbRot24(bgand, rot), + FbRot24(bgxor, rot), + leftMask)); + dst++; + fbNextStipBits(rot,stip); + } + nl = nlMiddle; + while (nl--) + { + mask = fbStipple24Bits[rot >> 3][stip]; + WRITE(dst, FbStippleRRop (READ(dst), mask, + FbRot24(fgand, rot), + FbRot24(fgxor, rot), + FbRot24(bgand, rot), + FbRot24(bgxor, rot))); + dst++; + fbNextStipBits(rot,stip); + } + if (rightMask) + { + mask = fbStipple24Bits[rot >> 3][stip]; + WRITE(dst, FbStippleRRopMask (READ(dst), mask, + FbRot24(fgand, rot), + FbRot24(fgxor, rot), + FbRot24(bgand, rot), + FbRot24(bgxor, rot), + rightMask)); + } + dst += dstStride; + } + } +} +#endif + +/* + * Not very efficient, but simple -- copy a single plane + * from an N bit image to a 1 bit image + */ + +void +fbBltPlane (FbBits *src, + FbStride srcStride, + int srcX, + int srcBpp, + + FbStip *dst, + FbStride dstStride, + int dstX, + + int width, + int height, + + FbStip fgand, + FbStip fgxor, + FbStip bgand, + FbStip bgxor, + Pixel planeMask) +{ + FbBits *s; + FbBits pm; + FbBits srcMask; + FbBits srcMaskFirst; + FbBits srcMask0 = 0; + FbBits srcBits; + + FbStip dstBits; + FbStip *d; + FbStip dstMask; + FbStip dstMaskFirst; + FbStip dstUnion; + int w; + int wt; + int rot0; + + if (!width) + return; + + src += srcX >> FB_SHIFT; + srcX &= FB_MASK; + + dst += dstX >> FB_STIP_SHIFT; + dstX &= FB_STIP_MASK; + + w = width / srcBpp; + + pm = fbReplicatePixel (planeMask, srcBpp); +#ifdef FB_24BIT + if (srcBpp == 24) + { + int w = 24; + + rot0 = FbFirst24Rot (srcX); + if (srcX + w > FB_UNIT) + w = FB_UNIT - srcX; + srcMaskFirst = FbRot24(pm,rot0) & FbBitsMask(srcX,w); + } + else +#endif + { + rot0 = 0; + srcMaskFirst = pm & FbBitsMask(srcX, srcBpp); + srcMask0 = pm & FbBitsMask(0, srcBpp); + } + + dstMaskFirst = FbStipMask(dstX,1); + while (height--) + { + d = dst; + dst += dstStride; + s = src; + src += srcStride; + + srcMask = srcMaskFirst; +#ifdef FB_24BIT + if (srcBpp == 24) + srcMask0 = FbRot24(pm,rot0) & FbBitsMask(0, srcBpp); +#endif + srcBits = READ(s++); + + dstMask = dstMaskFirst; + dstUnion = 0; + dstBits = 0; + + wt = w; + + while (wt--) + { + if (!srcMask) + { + srcBits = READ(s++); +#ifdef FB_24BIT + if (srcBpp == 24) + srcMask0 = FbNext24Pix(srcMask0) & FbBitsMask(0,24); +#endif + srcMask = srcMask0; + } + if (!dstMask) + { + WRITE(d, FbStippleRRopMask(READ(d), dstBits, + fgand, fgxor, bgand, bgxor, + dstUnion)); + d++; + dstMask = FbStipMask(0,1); + dstUnion = 0; + dstBits = 0; + } + if (srcBits & srcMask) + dstBits |= dstMask; + dstUnion |= dstMask; + if (srcBpp == FB_UNIT) + srcMask = 0; + else + srcMask = FbScrRight(srcMask,srcBpp); + dstMask = FbStipRight(dstMask,1); + } + if (dstUnion) + WRITE(d, FbStippleRRopMask(READ(d),dstBits, + fgand, fgxor, bgand, bgxor, + dstUnion)); + } +} + diff --git a/xorg-server-1.4/fb/fbbstore.c b/xorg-server-1.4/fb/fbbstore.c new file mode 100644 index 0000000..3ee5f5e --- /dev/null +++ b/xorg-server-1.4/fb/fbbstore.c @@ -0,0 +1,63 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbSaveAreas(PixmapPtr pPixmap, + RegionPtr prgnSave, + int xorg, + int yorg, + WindowPtr pWin) +{ + fbCopyWindowProc (&pWin->drawable, + &pPixmap->drawable, + 0, + REGION_RECTS(prgnSave), + REGION_NUM_RECTS(prgnSave), + xorg, yorg, + FALSE, + FALSE, + 0,0); +} + +void +fbRestoreAreas(PixmapPtr pPixmap, + RegionPtr prgnRestore, + int xorg, + int yorg, + WindowPtr pWin) +{ + fbCopyWindowProc (&pPixmap->drawable, + &pWin->drawable, + 0, + REGION_RECTS(prgnRestore), + REGION_NUM_RECTS(prgnRestore), + -xorg, -yorg, + FALSE, + FALSE, + 0,0); +} diff --git a/xorg-server-1.4/fb/fbcmap.c b/xorg-server-1.4/fb/fbcmap.c new file mode 100644 index 0000000..c29a513 --- /dev/null +++ b/xorg-server-1.4/fb/fbcmap.c @@ -0,0 +1,591 @@ +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + 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 no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or X Consortium +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and X Consortium make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN 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 SUN 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. + +********************************************************/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "scrnintstr.h" +#include "colormapst.h" +#include "resource.h" +#include "fb.h" + +#ifdef XFree86Server +#error "You should be compiling fbcmap_mi.c instead of fbcmap.c!" +#endif + + + +ColormapPtr FbInstalledMaps[MAXSCREENS]; + +int +fbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps) +{ + /* By the time we are processing requests, we can guarantee that there + * is always a colormap installed */ + *pmaps = FbInstalledMaps[pScreen->myNum]->mid; + return (1); +} + + +void +fbInstallColormap(ColormapPtr pmap) +{ + int index = pmap->pScreen->myNum; + ColormapPtr oldpmap = FbInstalledMaps[index]; + + if(pmap != oldpmap) + { + /* Uninstall pInstalledMap. No hardware changes required, just + * notify all interested parties. */ + if(oldpmap != (ColormapPtr)None) + WalkTree(pmap->pScreen, TellLostMap, (char *)&oldpmap->mid); + /* Install pmap */ + FbInstalledMaps[index] = pmap; + WalkTree(pmap->pScreen, TellGainedMap, (char *)&pmap->mid); + } +} + +void +fbUninstallColormap(ColormapPtr pmap) +{ + int index = pmap->pScreen->myNum; + ColormapPtr curpmap = FbInstalledMaps[index]; + + if(pmap == curpmap) + { + if (pmap->mid != pmap->pScreen->defColormap) + { + curpmap = (ColormapPtr) LookupIDByType(pmap->pScreen->defColormap, + RT_COLORMAP); + (*pmap->pScreen->InstallColormap)(curpmap); + } + } +} + +void +fbResolveColor(unsigned short *pred, + unsigned short *pgreen, + unsigned short *pblue, + VisualPtr pVisual) +{ + int shift = 16 - pVisual->bitsPerRGBValue; + unsigned lim = (1 << pVisual->bitsPerRGBValue) - 1; + + if ((pVisual->class | DynamicClass) == GrayScale) + { + /* rescale to gray then rgb bits */ + *pred = (30L * *pred + 59L * *pgreen + 11L * *pblue) / 100; + *pblue = *pgreen = *pred = ((*pred >> shift) * 65535) / lim; + } + else + { + /* rescale to rgb bits */ + *pred = ((*pred >> shift) * 65535) / lim; + *pgreen = ((*pgreen >> shift) * 65535) / lim; + *pblue = ((*pblue >> shift) * 65535) / lim; + } +} + +Bool +fbInitializeColormap(ColormapPtr pmap) +{ + register unsigned i; + register VisualPtr pVisual; + unsigned lim, maxent, shift; + + pVisual = pmap->pVisual; + lim = (1 << pVisual->bitsPerRGBValue) - 1; + shift = 16 - pVisual->bitsPerRGBValue; + maxent = pVisual->ColormapEntries - 1; + if (pVisual->class == TrueColor) + { + unsigned limr, limg, limb; + + limr = pVisual->redMask >> pVisual->offsetRed; + limg = pVisual->greenMask >> pVisual->offsetGreen; + limb = pVisual->blueMask >> pVisual->offsetBlue; + for(i = 0; i <= maxent; i++) + { + /* rescale to [0..65535] then rgb bits */ + pmap->red[i].co.local.red = + ((((i * 65535) / limr) >> shift) * 65535) / lim; + pmap->green[i].co.local.green = + ((((i * 65535) / limg) >> shift) * 65535) / lim; + pmap->blue[i].co.local.blue = + ((((i * 65535) / limb) >> shift) * 65535) / lim; + } + } + else if (pVisual->class == StaticColor) + { + unsigned n; + unsigned r, g, b; + unsigned red, green, blue; + + for (n = 0; n*n*n < pVisual->ColormapEntries; n++) + ; + n--; + i = 0; + for (r = 0; r < n; r++) + { + red = (((r * 65535 / (n - 1)) >> shift) * 65535) / lim; + for (g = 0; g < n; g++) + { + green = (((g * 65535 / (n - 1)) >> shift) * 65535) / lim; + for (b = 0; b < n; b++) + { + blue = (((b * 65535 / (n - 1)) >> shift) * 65535) / lim; + pmap->red[i].co.local.red = red; + pmap->red[i].co.local.green = green; + pmap->red[i].co.local.blue = blue; + i++; + } + } + } + n = pVisual->ColormapEntries - i; + for (r = 0; r < n; r++) + { + red = (((r * 65535 / (n - 1)) >> shift) * 65535) / lim; + pmap->red[i].co.local.red = red; + pmap->red[i].co.local.green = red; + pmap->red[i].co.local.blue = red; + i++; + } + } + else if (pVisual->class == StaticGray) + { + for(i = 0; i <= maxent; i++) + { + /* rescale to [0..65535] then rgb bits */ + pmap->red[i].co.local.red = ((((i * 65535) / maxent) >> shift) + * 65535) / lim; + pmap->red[i].co.local.green = pmap->red[i].co.local.red; + pmap->red[i].co.local.blue = pmap->red[i].co.local.red; + } + } + return TRUE; +} + +/* When simulating DirectColor on PseudoColor hardware, multiple + entries of the colormap must be updated + */ + +#define AddElement(mask) { \ + pixel = red | green | blue; \ + for (i = 0; i < nresult; i++) \ + if (outdefs[i].pixel == pixel) \ + break; \ + if (i == nresult) \ + { \ + nresult++; \ + outdefs[i].pixel = pixel; \ + outdefs[i].flags = 0; \ + } \ + outdefs[i].flags |= (mask); \ + outdefs[i].red = pmap->red[red >> pVisual->offsetRed].co.local.red; \ + outdefs[i].green = pmap->green[green >> pVisual->offsetGreen].co.local.green; \ + outdefs[i].blue = pmap->blue[blue >> pVisual->offsetBlue].co.local.blue; \ +} + +int +fbExpandDirectColors (ColormapPtr pmap, + int ndef, + xColorItem *indefs, + xColorItem *outdefs) +{ + register int red, green, blue; + int maxred, maxgreen, maxblue; + int stepred, stepgreen, stepblue; + VisualPtr pVisual; + register int pixel; + register int nresult; + register int i; + + pVisual = pmap->pVisual; + + stepred = 1 << pVisual->offsetRed; + stepgreen = 1 << pVisual->offsetGreen; + stepblue = 1 << pVisual->offsetBlue; + maxred = pVisual->redMask; + maxgreen = pVisual->greenMask; + maxblue = pVisual->blueMask; + nresult = 0; + for (;ndef--; indefs++) + { + if (indefs->flags & DoRed) + { + red = indefs->pixel & pVisual->redMask; + for (green = 0; green <= maxgreen; green += stepgreen) + { + for (blue = 0; blue <= maxblue; blue += stepblue) + { + AddElement (DoRed) + } + } + } + if (indefs->flags & DoGreen) + { + green = indefs->pixel & pVisual->greenMask; + for (red = 0; red <= maxred; red += stepred) + { + for (blue = 0; blue <= maxblue; blue += stepblue) + { + AddElement (DoGreen) + } + } + } + if (indefs->flags & DoBlue) + { + blue = indefs->pixel & pVisual->blueMask; + for (red = 0; red <= maxred; red += stepred) + { + for (green = 0; green <= maxgreen; green += stepgreen) + { + AddElement (DoBlue) + } + } + } + } + return nresult; +} + +Bool +fbCreateDefColormap(ScreenPtr pScreen) +{ + unsigned short zero = 0, ones = 0xFFFF; + VisualPtr pVisual; + ColormapPtr cmap; + Pixel wp, bp; + + for (pVisual = pScreen->visuals; + pVisual->vid != pScreen->rootVisual; + pVisual++) + ; + + if (CreateColormap(pScreen->defColormap, pScreen, pVisual, &cmap, + (pVisual->class & DynamicClass) ? AllocNone : AllocAll, + 0) + != Success) + return FALSE; + wp = pScreen->whitePixel; + bp = pScreen->blackPixel; + if ((AllocColor(cmap, &ones, &ones, &ones, &wp, 0) != + Success) || + (AllocColor(cmap, &zero, &zero, &zero, &bp, 0) != + Success)) + return FALSE; + pScreen->whitePixel = wp; + pScreen->blackPixel = bp; + (*pScreen->InstallColormap)(cmap); + return TRUE; +} + +extern int defaultColorVisualClass; + +#define _RZ(d) ((d + 2) / 3) +#define _RS(d) 0 +#define _RM(d) ((1 << _RZ(d)) - 1) +#define _GZ(d) ((d - _RZ(d) + 1) / 2) +#define _GS(d) _RZ(d) +#define _GM(d) (((1 << _GZ(d)) - 1) << _GS(d)) +#define _BZ(d) (d - _RZ(d) - _GZ(d)) +#define _BS(d) (_RZ(d) + _GZ(d)) +#define _BM(d) (((1 << _BZ(d)) - 1) << _BS(d)) +#define _CE(d) (1 << _RZ(d)) + +#define MAX_PSEUDO_DEPTH 10 /* largest DAC size I know */ + +#define StaticGrayMask (1 << StaticGray) +#define GrayScaleMask (1 << GrayScale) +#define StaticColorMask (1 << StaticColor) +#define PseudoColorMask (1 << PseudoColor) +#define TrueColorMask (1 << TrueColor) +#define DirectColorMask (1 << DirectColor) + +#define ALL_VISUALS (StaticGrayMask|\ + GrayScaleMask|\ + StaticColorMask|\ + PseudoColorMask|\ + TrueColorMask|\ + DirectColorMask) + +#define LARGE_VISUALS (TrueColorMask|\ + DirectColorMask) + +typedef struct _fbVisuals { + struct _fbVisuals *next; + int depth; + int bitsPerRGB; + int visuals; + int count; + Pixel redMask, greenMask, blueMask; +} fbVisualsRec, *fbVisualsPtr; + +static const int fbVisualPriority[] = { + PseudoColor, DirectColor, GrayScale, StaticColor, TrueColor, StaticGray +}; + +#define NUM_PRIORITY 6 + +static fbVisualsPtr fbVisuals; + +static int +popCount (int i) +{ + int count; + + count = (i >> 1) & 033333333333; + count = i - count - ((count >> 1) & 033333333333); + count = (((count + (count >> 3)) & 030707070707) % 077); /* HAKMEM 169 */ + return count; +} + +/* + * Distance to least significant one bit + */ +static int +maskShift (Pixel p) +{ + int s; + + if (!p) return 0; + s = 0; + while (!(p & 1)) + { + s++; + p >>= 1; + } + return s; +} + +Bool +fbSetVisualTypesAndMasks (int depth, int visuals, int bitsPerRGB, + Pixel redMask, Pixel greenMask, Pixel blueMask) +{ + fbVisualsPtr new, *prev, v; + + new = (fbVisualsPtr) xalloc (sizeof *new); + if (!new) + return FALSE; + if (!redMask || !greenMask || !blueMask) + { + redMask = _RM(depth); + greenMask = _GM(depth); + blueMask = _BM(depth); + } + new->next = 0; + new->depth = depth; + new->visuals = visuals; + new->bitsPerRGB = bitsPerRGB; + new->redMask = redMask; + new->greenMask = greenMask; + new->blueMask = blueMask; + new->count = popCount (visuals); + for (prev = &fbVisuals; (v = *prev); prev = &v->next); + *prev = new; + return TRUE; +} + +Bool +fbHasVisualTypes (int depth) +{ + fbVisualsPtr v; + + for (v = fbVisuals; v; v = v->next) + if (v->depth == depth) + return TRUE; + return FALSE; +} + +Bool +fbSetVisualTypes (int depth, int visuals, int bitsPerRGB) +{ + return fbSetVisualTypesAndMasks (depth, visuals, bitsPerRGB, + _RM(depth), _GM(depth), _BM(depth)); +} + +/* + * Given a list of formats for a screen, create a list + * of visuals and depths for the screen which coorespond to + * the set which can be used with this version of fb. + */ + +Bool +fbInitVisuals (VisualPtr *visualp, + DepthPtr *depthp, + int *nvisualp, + int *ndepthp, + int *rootDepthp, + VisualID *defaultVisp, + unsigned long sizes, + int bitsPerRGB) +{ + int i, j = 0, k; + VisualPtr visual; + DepthPtr depth; + VisualID *vid; + int d, b; + int f; + int ndepth, nvisual; + int nvtype; + int vtype; + fbVisualsPtr visuals, nextVisuals; + + /* none specified, we'll guess from pixmap formats */ + if (!fbVisuals) + { + for (f = 0; f < screenInfo.numPixmapFormats; f++) + { + d = screenInfo.formats[f].depth; + b = screenInfo.formats[f].bitsPerPixel; + if (sizes & (1 << (b - 1))) + { + if (d > MAX_PSEUDO_DEPTH) + vtype = LARGE_VISUALS; + else if (d == 1) + vtype = StaticGrayMask; + else + vtype = ALL_VISUALS; + } + else + vtype = 0; + if (!fbSetVisualTypes (d, vtype, bitsPerRGB)) + return FALSE; + } + } + nvisual = 0; + ndepth = 0; + for (visuals = fbVisuals; visuals; visuals = nextVisuals) + { + nextVisuals = visuals->next; + ndepth++; + nvisual += visuals->count; + } + depth = (DepthPtr) xalloc (ndepth * sizeof (DepthRec)); + visual = (VisualPtr) xalloc (nvisual * sizeof (VisualRec)); + if (!depth || !visual) + { + xfree (depth); + xfree (visual); + return FALSE; + } + *depthp = depth; + *visualp = visual; + *ndepthp = ndepth; + *nvisualp = nvisual; + for (visuals = fbVisuals; visuals; visuals = nextVisuals) + { + nextVisuals = visuals->next; + d = visuals->depth; + vtype = visuals->visuals; + nvtype = visuals->count; + vid = NULL; + if (nvtype) + { + vid = (VisualID *) xalloc (nvtype * sizeof (VisualID)); + if (!vid) + return FALSE; + } + depth->depth = d; + depth->numVids = nvtype; + depth->vids = vid; + depth++; + for (i = 0; i < NUM_PRIORITY; i++) { + if (! (vtype & (1 << fbVisualPriority[i]))) + continue; + visual->class = fbVisualPriority[i]; + visual->bitsPerRGBValue = visuals->bitsPerRGB; + visual->ColormapEntries = 1 << d; + visual->nplanes = d; + visual->vid = *vid = FakeClientID (0); + switch (visual->class) { + case PseudoColor: + case GrayScale: + case StaticGray: + case StaticColor: + visual->redMask = 0; + visual->greenMask = 0; + visual->blueMask = 0; + visual->offsetRed = 0; + visual->offsetGreen = 0; + visual->offsetBlue = 0; + break; + case DirectColor: + case TrueColor: + visual->ColormapEntries = _CE(d); + visual->redMask = visuals->redMask; + visual->greenMask = visuals->greenMask; + visual->blueMask = visuals->blueMask; + visual->offsetRed = maskShift (visuals->redMask); + visual->offsetGreen = maskShift (visuals->greenMask); + visual->offsetBlue = maskShift (visuals->blueMask); + } + vid++; + visual++; + } + xfree (visuals); + } + fbVisuals = NULL; + visual = *visualp; + depth = *depthp; + for (i = 0; i < ndepth; i++) + { + if (*rootDepthp && *rootDepthp != depth[i].depth) + continue; + for (j = 0; j < depth[i].numVids; j++) + { + for (k = 0; k < nvisual; k++) + if (visual[k].vid == depth[i].vids[j]) + break; + if (k == nvisual) + continue; + if (defaultColorVisualClass < 0 || + visual[k].class == defaultColorVisualClass) + break; + } + if (j != depth[i].numVids) + break; + } + if (i == ndepth) { + for (i = 0; i < ndepth; i++) + { + if (depth[i].numVids) + break; + } + if (i == ndepth) + return FALSE; + j = 0; + } + *rootDepthp = depth[i].depth; + *defaultVisp = depth[i].vids[j]; + return TRUE; +} diff --git a/xorg-server-1.4/fb/fbcmap_mi.c b/xorg-server-1.4/fb/fbcmap_mi.c new file mode 100644 index 0000000..58bcae3 --- /dev/null +++ b/xorg-server-1.4/fb/fbcmap_mi.c @@ -0,0 +1,123 @@ +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + 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 no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or X Consortium +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and X Consortium make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN 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 SUN 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. + +********************************************************/ + + +/** + * This version of fbcmap.c is implemented in terms of mi functions. + * These functions used to be in fbcmap.c and depended upon the symbol + * XFree86Server being defined. + */ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "fb.h" +#include "micmap.h" + +int +fbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps) +{ + return miListInstalledColormaps(pScreen, pmaps); +} + +void +fbInstallColormap(ColormapPtr pmap) +{ + miInstallColormap(pmap); +} + +void +fbUninstallColormap(ColormapPtr pmap) +{ + miUninstallColormap(pmap); +} + +void +fbResolveColor(unsigned short *pred, + unsigned short *pgreen, + unsigned short *pblue, + VisualPtr pVisual) +{ + miResolveColor(pred, pgreen, pblue, pVisual); +} + +Bool +fbInitializeColormap(ColormapPtr pmap) +{ + return miInitializeColormap(pmap); +} + +int +fbExpandDirectColors (ColormapPtr pmap, + int ndef, + xColorItem *indefs, + xColorItem *outdefs) +{ + return miExpandDirectColors(pmap, ndef, indefs, outdefs); +} + +Bool +fbCreateDefColormap(ScreenPtr pScreen) +{ + return miCreateDefColormap(pScreen); +} + +void +fbClearVisualTypes(void) +{ + miClearVisualTypes(); +} + +Bool +fbSetVisualTypes (int depth, int visuals, int bitsPerRGB) +{ + return miSetVisualTypes(depth, visuals, bitsPerRGB, -1); +} + +/* + * Given a list of formats for a screen, create a list + * of visuals and depths for the screen which coorespond to + * the set which can be used with this version of fb. + */ +Bool +fbInitVisuals (VisualPtr *visualp, + DepthPtr *depthp, + int *nvisualp, + int *ndepthp, + int *rootDepthp, + VisualID *defaultVisp, + unsigned long sizes, + int bitsPerRGB) +{ + return miInitVisuals(visualp, depthp, nvisualp, ndepthp, rootDepthp, + defaultVisp, sizes, bitsPerRGB, -1); +} diff --git a/xorg-server-1.4/fb/fbcopy.c b/xorg-server-1.4/fb/fbcopy.c new file mode 100644 index 0000000..68f403f --- /dev/null +++ b/xorg-server-1.4/fb/fbcopy.c @@ -0,0 +1,664 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" + +void +fbCopyNtoN (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure) +{ + CARD8 alu = pGC ? pGC->alu : GXcopy; + FbBits pm = pGC ? fbGetGCPrivate(pGC)->pm : FB_ALLONES; + FbBits *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + + fbGetDrawable (pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + fbGetDrawable (pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + while (nbox--) + { +#ifndef FB_ACCESS_WRAPPER /* pixman_blt() doesn't support accessors yet */ + if (pm == FB_ALLONES && alu == GXcopy && !reverse && + !upsidedown) + { + if (!pixman_blt ((uint32_t *)src, (uint32_t *)dst, srcStride, dstStride, srcBpp, dstBpp, + (pbox->x1 + dx + srcXoff), + (pbox->y1 + dy + srcYoff), + (pbox->x1 + dstXoff), + (pbox->y1 + dstYoff), + (pbox->x2 - pbox->x1), + (pbox->y2 - pbox->y1))) + goto fallback; + else + goto next; + } + fallback: +#endif + fbBlt (src + (pbox->y1 + dy + srcYoff) * srcStride, + srcStride, + (pbox->x1 + dx + srcXoff) * srcBpp, + + dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff) * dstBpp, + + (pbox->x2 - pbox->x1) * dstBpp, + (pbox->y2 - pbox->y1), + + alu, + pm, + dstBpp, + + reverse, + upsidedown); +#ifndef FB_ACCESS_WRAPPER + next: +#endif + pbox++; + } + fbFinishAccess (pDstDrawable); + fbFinishAccess (pSrcDrawable); +} + +void +fbCopy1toN (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + FbBits *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + + fbGetDrawable (pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + fbGetDrawable (pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + while (nbox--) + { + if (dstBpp == 1) + { + fbBlt (src + (pbox->y1 + dy + srcYoff) * srcStride, + srcStride, + (pbox->x1 + dx + srcXoff) * srcBpp, + + dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff) * dstBpp, + + (pbox->x2 - pbox->x1) * dstBpp, + (pbox->y2 - pbox->y1), + + FbOpaqueStipple1Rop(pGC->alu, + pGC->fgPixel,pGC->bgPixel), + pPriv->pm, + dstBpp, + + reverse, + upsidedown); + } + else + { + fbBltOne ((FbStip *) (src + (pbox->y1 + dy + srcYoff) * srcStride), + srcStride*(FB_UNIT/FB_STIP_UNIT), + (pbox->x1 + dx + srcXoff), + + dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff) * dstBpp, + dstBpp, + + (pbox->x2 - pbox->x1) * dstBpp, + (pbox->y2 - pbox->y1), + + pPriv->and, pPriv->xor, + pPriv->bgand, pPriv->bgxor); + } + pbox++; + } + + fbFinishAccess (pDstDrawable); + fbFinishAccess (pSrcDrawable); +} + +void +fbCopyNto1 (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); + + while (nbox--) + { + if (pDstDrawable->bitsPerPixel == 1) + { + FbBits *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + + FbStip *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + + fbGetDrawable (pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + fbGetStipDrawable (pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + fbBltPlane (src + (pbox->y1+ dy + srcYoff) * srcStride, + srcStride, + (pbox->x1 + dx + srcXoff) * srcBpp, + srcBpp, + + dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff) * dstBpp, + + (pbox->x2 - pbox->x1) * srcBpp, + (pbox->y2 - pbox->y1), + + (FbStip) pPriv->and, (FbStip) pPriv->xor, + (FbStip) pPriv->bgand, (FbStip) pPriv->bgxor, + bitplane); + fbFinishAccess (pDstDrawable); + fbFinishAccess (pSrcDrawable); + } + else + { + FbBits *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + + FbStip *tmp; + FbStride tmpStride; + int width, height; + + width = pbox->x2 - pbox->x1; + height = pbox->y2 - pbox->y1; + + tmpStride = ((width + FB_STIP_MASK) >> FB_STIP_SHIFT); + tmp = xalloc (tmpStride * height * sizeof (FbStip)); + if (!tmp) + return; + + fbGetDrawable (pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + fbGetDrawable (pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + fbBltPlane (src + (pbox->y1+ dy + srcYoff) * srcStride, + srcStride, + (pbox->x1 + dx + srcXoff) * srcBpp, + srcBpp, + + tmp, + tmpStride, + 0, + + width * srcBpp, + height, + + fbAndStip(GXcopy,FB_ALLONES,FB_ALLONES), + fbXorStip(GXcopy,FB_ALLONES,FB_ALLONES), + fbAndStip(GXcopy,0,FB_ALLONES), + fbXorStip(GXcopy,0,FB_ALLONES), + bitplane); + fbBltOne (tmp, + tmpStride, + 0, + + dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff) * dstBpp, + dstBpp, + + width * dstBpp, + height, + + pPriv->and, pPriv->xor, + pPriv->bgand, pPriv->bgxor); + xfree (tmp); + + fbFinishAccess (pDstDrawable); + fbFinishAccess (pSrcDrawable); + } + pbox++; + } +} + +void +fbCopyRegion (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + RegionPtr pDstRegion, + int dx, + int dy, + fbCopyProc copyProc, + Pixel bitPlane, + void *closure) +{ + int careful; + Bool reverse; + Bool upsidedown; + BoxPtr pbox; + int nbox; + BoxPtr pboxNew1, pboxNew2, pboxBase, pboxNext, pboxTmp; + + pbox = REGION_RECTS(pDstRegion); + nbox = REGION_NUM_RECTS(pDstRegion); + + /* XXX we have to err on the side of safety when both are windows, + * because we don't know if IncludeInferiors is being used. + */ + careful = ((pSrcDrawable == pDstDrawable) || + ((pSrcDrawable->type == DRAWABLE_WINDOW) && + (pDstDrawable->type == DRAWABLE_WINDOW))); + + pboxNew1 = NULL; + pboxNew2 = NULL; + if (careful && dy < 0) + { + upsidedown = TRUE; + + if (nbox > 1) + { + /* keep ordering in each band, reverse order of bands */ + pboxNew1 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox); + if(!pboxNew1) + return; + pboxBase = pboxNext = pbox+nbox-1; + while (pboxBase >= pbox) + { + while ((pboxNext >= pbox) && + (pboxBase->y1 == pboxNext->y1)) + pboxNext--; + pboxTmp = pboxNext+1; + while (pboxTmp <= pboxBase) + { + *pboxNew1++ = *pboxTmp++; + } + pboxBase = pboxNext; + } + pboxNew1 -= nbox; + pbox = pboxNew1; + } + } + else + { + /* walk source top to bottom */ + upsidedown = FALSE; + } + + if (careful && dx < 0) + { + /* walk source right to left */ + if (dy <= 0) + reverse = TRUE; + else + reverse = FALSE; + + if (nbox > 1) + { + /* reverse order of rects in each band */ + pboxNew2 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox); + if(!pboxNew2) + { + if (pboxNew1) + DEALLOCATE_LOCAL(pboxNew1); + return; + } + pboxBase = pboxNext = pbox; + while (pboxBase < pbox+nbox) + { + while ((pboxNext < pbox+nbox) && + (pboxNext->y1 == pboxBase->y1)) + pboxNext++; + pboxTmp = pboxNext; + while (pboxTmp != pboxBase) + { + *pboxNew2++ = *--pboxTmp; + } + pboxBase = pboxNext; + } + pboxNew2 -= nbox; + pbox = pboxNew2; + } + } + else + { + /* walk source left to right */ + reverse = FALSE; + } + + (*copyProc) (pSrcDrawable, + pDstDrawable, + pGC, + pbox, + nbox, + dx, dy, + reverse, upsidedown, bitPlane, closure); + + if (pboxNew1) + DEALLOCATE_LOCAL (pboxNew1); + if (pboxNew2) + DEALLOCATE_LOCAL (pboxNew2); +} + +RegionPtr +fbDoCopy (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, + int yIn, + int widthSrc, + int heightSrc, + int xOut, + int yOut, + fbCopyProc copyProc, + Pixel bitPlane, + void *closure) +{ + RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */ + Bool freeSrcClip = FALSE; + RegionPtr prgnExposed = NULL; + RegionRec rgnDst; + int dx; + int dy; + int numRects; + int box_x1; + int box_y1; + int box_x2; + int box_y2; + Bool fastSrc = FALSE; /* for fast clipping with pixmap source */ + Bool fastDst = FALSE; /* for fast clipping with one rect dest */ + Bool fastExpose = FALSE; /* for fast exposures with pixmap source */ + + /* Short cut for unmapped windows */ + + if (pDstDrawable->type == DRAWABLE_WINDOW && + !((WindowPtr)pDstDrawable)->realized) + { + return NULL; + } + + if ((pSrcDrawable != pDstDrawable) && + pSrcDrawable->pScreen->SourceValidate) + { + (*pSrcDrawable->pScreen->SourceValidate) (pSrcDrawable, xIn, yIn, widthSrc, heightSrc); + } + + /* Compute source clip region */ + if (pSrcDrawable->type == DRAWABLE_PIXMAP) + { + if ((pSrcDrawable == pDstDrawable) && (pGC->clientClipType == CT_NONE)) + prgnSrcClip = fbGetCompositeClip(pGC); + else + fastSrc = TRUE; + } + else + { + if (pGC->subWindowMode == IncludeInferiors) + { + /* + * XFree86 DDX empties the border clip when the + * VT is inactive, make sure the region isn't empty + */ + if (!((WindowPtr) pSrcDrawable)->parent && + REGION_NOTEMPTY (pSrcDrawable->pScreen, + &((WindowPtr) pSrcDrawable)->borderClip)) + { + /* + * special case bitblt from root window in + * IncludeInferiors mode; just like from a pixmap + */ + fastSrc = TRUE; + } + else if ((pSrcDrawable == pDstDrawable) && + (pGC->clientClipType == CT_NONE)) + { + prgnSrcClip = fbGetCompositeClip(pGC); + } + else + { + prgnSrcClip = NotClippedByChildren((WindowPtr)pSrcDrawable); + freeSrcClip = TRUE; + } + } + else + { + prgnSrcClip = &((WindowPtr)pSrcDrawable)->clipList; + } + } + + xIn += pSrcDrawable->x; + yIn += pSrcDrawable->y; + + xOut += pDstDrawable->x; + yOut += pDstDrawable->y; + + box_x1 = xIn; + box_y1 = yIn; + box_x2 = xIn + widthSrc; + box_y2 = yIn + heightSrc; + + dx = xIn - xOut; + dy = yIn - yOut; + + /* Don't create a source region if we are doing a fast clip */ + if (fastSrc) + { + RegionPtr cclip; + + fastExpose = TRUE; + /* + * clip the source; if regions extend beyond the source size, + * make sure exposure events get sent + */ + if (box_x1 < pSrcDrawable->x) + { + box_x1 = pSrcDrawable->x; + fastExpose = FALSE; + } + if (box_y1 < pSrcDrawable->y) + { + box_y1 = pSrcDrawable->y; + fastExpose = FALSE; + } + if (box_x2 > pSrcDrawable->x + (int) pSrcDrawable->width) + { + box_x2 = pSrcDrawable->x + (int) pSrcDrawable->width; + fastExpose = FALSE; + } + if (box_y2 > pSrcDrawable->y + (int) pSrcDrawable->height) + { + box_y2 = pSrcDrawable->y + (int) pSrcDrawable->height; + fastExpose = FALSE; + } + + /* Translate and clip the dst to the destination composite clip */ + box_x1 -= dx; + box_x2 -= dx; + box_y1 -= dy; + box_y2 -= dy; + + /* If the destination composite clip is one rectangle we can + do the clip directly. Otherwise we have to create a full + blown region and call intersect */ + + cclip = fbGetCompositeClip(pGC); + if (REGION_NUM_RECTS(cclip) == 1) + { + BoxPtr pBox = REGION_RECTS(cclip); + + if (box_x1 < pBox->x1) box_x1 = pBox->x1; + if (box_x2 > pBox->x2) box_x2 = pBox->x2; + if (box_y1 < pBox->y1) box_y1 = pBox->y1; + if (box_y2 > pBox->y2) box_y2 = pBox->y2; + fastDst = TRUE; + } + } + + /* Check to see if the region is empty */ + if (box_x1 >= box_x2 || box_y1 >= box_y2) + { + REGION_NULL(pGC->pScreen, &rgnDst); + } + else + { + BoxRec box; + box.x1 = box_x1; + box.y1 = box_y1; + box.x2 = box_x2; + box.y2 = box_y2; + REGION_INIT(pGC->pScreen, &rgnDst, &box, 1); + } + + /* Clip against complex source if needed */ + if (!fastSrc) + { + REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip); + REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy); + } + + /* Clip against complex dest if needed */ + if (!fastDst) + { + REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, + fbGetCompositeClip(pGC)); + } + + /* Do bit blitting */ + numRects = REGION_NUM_RECTS(&rgnDst); + if (numRects && widthSrc && heightSrc) + fbCopyRegion (pSrcDrawable, pDstDrawable, pGC, + &rgnDst, dx, dy, copyProc, bitPlane, closure); + + /* Pixmap sources generate a NoExposed (we return NULL to do this) */ + if (!fastExpose && pGC->fExpose) + prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, + xIn - pSrcDrawable->x, + yIn - pSrcDrawable->y, + widthSrc, heightSrc, + xOut - pDstDrawable->x, + yOut - pDstDrawable->y, + (unsigned long) bitPlane); + REGION_UNINIT(pGC->pScreen, &rgnDst); + if (freeSrcClip) + REGION_DESTROY(pGC->pScreen, prgnSrcClip); + fbValidateDrawable (pDstDrawable); + return prgnExposed; +} + +RegionPtr +fbCopyArea (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, + int yIn, + int widthSrc, + int heightSrc, + int xOut, + int yOut) +{ + fbCopyProc copy; + +#ifdef FB_24_32BIT + if (pSrcDrawable->bitsPerPixel != pDstDrawable->bitsPerPixel) + copy = fb24_32CopyMtoN; + else +#endif + copy = fbCopyNtoN; + return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, + widthSrc, heightSrc, xOut, yOut, copy, 0, 0); +} + +RegionPtr +fbCopyPlane (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, + int yIn, + int widthSrc, + int heightSrc, + int xOut, + int yOut, + unsigned long bitplane) +{ + if (pSrcDrawable->bitsPerPixel > 1) + return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, + xIn, yIn, widthSrc, heightSrc, + xOut, yOut, fbCopyNto1, (Pixel) bitplane, 0); + else if (bitplane & 1) + return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, + widthSrc, heightSrc, xOut, yOut, fbCopy1toN, + (Pixel) bitplane, 0); + else + return miHandleExposures(pSrcDrawable, pDstDrawable, pGC, + xIn, yIn, + widthSrc, + heightSrc, + xOut, yOut, bitplane); +} diff --git a/xorg-server-1.4/fb/fbfill.c b/xorg-server-1.4/fb/fbfill.c new file mode 100644 index 0000000..831b1ce --- /dev/null +++ b/xorg-server-1.4/fb/fbfill.c @@ -0,0 +1,230 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbFill (DrawablePtr pDrawable, + GCPtr pGC, + int x, + int y, + int width, + int height) +{ + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + switch (pGC->fillStyle) { + case FillSolid: +#ifndef FB_ACCESS_WRAPPER + if (pPriv->and || !pixman_fill ((uint32_t *)dst, dstStride, dstBpp, + x + dstXoff, y + dstYoff, + width, height, + pPriv->xor)) +#endif + fbSolid (dst + (y + dstYoff) * dstStride, + dstStride, + (x + dstXoff) * dstBpp, + dstBpp, + width * dstBpp, height, + pPriv->and, pPriv->xor); + break; + case FillStippled: + case FillOpaqueStippled: { + PixmapPtr pStip = pGC->stipple; + int stipWidth = pStip->drawable.width; + int stipHeight = pStip->drawable.height; + + if (dstBpp == 1) + { + int alu; + FbBits *stip; + FbStride stipStride; + int stipBpp; + int stipXoff, stipYoff; /* XXX assumed to be zero */ + + if (pGC->fillStyle == FillStippled) + alu = FbStipple1Rop(pGC->alu,pGC->fgPixel); + else + alu = FbOpaqueStipple1Rop(pGC->alu,pGC->fgPixel,pGC->bgPixel); + fbGetDrawable (&pStip->drawable, stip, stipStride, stipBpp, stipXoff, stipYoff); + fbTile (dst + (y + dstYoff) * dstStride, + dstStride, + x + dstXoff, + width, height, + stip, + stipStride, + stipWidth, + stipHeight, + alu, + pPriv->pm, + dstBpp, + + (pGC->patOrg.x + pDrawable->x + dstXoff), + pGC->patOrg.y + pDrawable->y - y); + fbFinishAccess (&pStip->drawable); + } + else + { + FbStip *stip; + FbStride stipStride; + int stipBpp; + int stipXoff, stipYoff; /* XXX assumed to be zero */ + FbBits fgand, fgxor, bgand, bgxor; + + fgand = pPriv->and; + fgxor = pPriv->xor; + if (pGC->fillStyle == FillStippled) + { + bgand = fbAnd(GXnoop,(FbBits) 0,FB_ALLONES); + bgxor = fbXor(GXnoop,(FbBits) 0,FB_ALLONES); + } + else + { + bgand = pPriv->bgand; + bgxor = pPriv->bgxor; + } + + fbGetStipDrawable (&pStip->drawable, stip, stipStride, stipBpp, stipXoff, stipYoff); + fbStipple (dst + (y + dstYoff) * dstStride, + dstStride, + (x + dstXoff) * dstBpp, + dstBpp, + width * dstBpp, height, + stip, + stipStride, + stipWidth, + stipHeight, + pPriv->evenStipple, + fgand, fgxor, + bgand, bgxor, + pGC->patOrg.x + pDrawable->x + dstXoff, + pGC->patOrg.y + pDrawable->y - y); + fbFinishAccess (&pStip->drawable); + } + break; + } + case FillTiled: { + PixmapPtr pTile = pGC->tile.pixmap; + FbBits *tile; + FbStride tileStride; + int tileBpp; + int tileWidth; + int tileHeight; + int tileXoff, tileYoff; /* XXX assumed to be zero */ + + fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp, tileXoff, tileYoff); + tileWidth = pTile->drawable.width; + tileHeight = pTile->drawable.height; + fbTile (dst + (y + dstYoff) * dstStride, + dstStride, + (x + dstXoff) * dstBpp, + width * dstBpp, height, + tile, + tileStride, + tileWidth * tileBpp, + tileHeight, + pGC->alu, + pPriv->pm, + dstBpp, + (pGC->patOrg.x + pDrawable->x + dstXoff) * dstBpp, + pGC->patOrg.y + pDrawable->y - y); + fbFinishAccess (&pTile->drawable); + break; + } + } + fbValidateDrawable (pDrawable); + fbFinishAccess (pDrawable); +} + +void +fbSolidBoxClipped (DrawablePtr pDrawable, + RegionPtr pClip, + int x1, + int y1, + int x2, + int y2, + FbBits and, + FbBits xor) +{ + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + BoxPtr pbox; + int nbox; + int partX1, partX2, partY1, partY2; + + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + for (nbox = REGION_NUM_RECTS(pClip), pbox = REGION_RECTS(pClip); + nbox--; + pbox++) + { + partX1 = pbox->x1; + if (partX1 < x1) + partX1 = x1; + + partX2 = pbox->x2; + if (partX2 > x2) + partX2 = x2; + + if (partX2 <= partX1) + continue; + + partY1 = pbox->y1; + if (partY1 < y1) + partY1 = y1; + + partY2 = pbox->y2; + if (partY2 > y2) + partY2 = y2; + + if (partY2 <= partY1) + continue; + +#ifndef FB_ACCESS_WRAPPER + if (and || !pixman_fill ((uint32_t *)dst, dstStride, dstBpp, + partX1 + dstXoff, partY1 + dstYoff, + (partX2 - partX1), (partY2 - partY1), + xor)) +#endif + fbSolid (dst + (partY1 + dstYoff) * dstStride, + dstStride, + (partX1 + dstXoff) * dstBpp, + dstBpp, + + (partX2 - partX1) * dstBpp, + (partY2 - partY1), + and, xor); + } + fbFinishAccess (pDrawable); +} diff --git a/xorg-server-1.4/fb/fbfillrect.c b/xorg-server-1.4/fb/fbfillrect.c new file mode 100644 index 0000000..4e4edb3 --- /dev/null +++ b/xorg-server-1.4/fb/fbfillrect.c @@ -0,0 +1,112 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbPolyFillRect(DrawablePtr pDrawable, + GCPtr pGC, + int nrect, + xRectangle *prect) +{ + RegionPtr pClip = fbGetCompositeClip(pGC); + register BoxPtr pbox; + BoxPtr pextent; + int extentX1, extentX2, extentY1, extentY2; + int fullX1, fullX2, fullY1, fullY2; + int partX1, partX2, partY1, partY2; + int xorg, yorg; + int n; + + xorg = pDrawable->x; + yorg = pDrawable->y; + + pextent = REGION_EXTENTS(pGC->pScreen, pClip); + extentX1 = pextent->x1; + extentY1 = pextent->y1; + extentX2 = pextent->x2; + extentY2 = pextent->y2; + while (nrect--) + { + fullX1 = prect->x + xorg; + fullY1 = prect->y + yorg; + fullX2 = fullX1 + (int) prect->width; + fullY2 = fullY1 + (int) prect->height; + prect++; + + if (fullX1 < extentX1) + fullX1 = extentX1; + + if (fullY1 < extentY1) + fullY1 = extentY1; + + if (fullX2 > extentX2) + fullX2 = extentX2; + + if (fullY2 > extentY2) + fullY2 = extentY2; + + if ((fullX1 >= fullX2) || (fullY1 >= fullY2)) + continue; + n = REGION_NUM_RECTS (pClip); + if (n == 1) + { + fbFill (pDrawable, + pGC, + fullX1, fullY1, fullX2-fullX1, fullY2-fullY1); + } + else + { + pbox = REGION_RECTS(pClip); + /* + * clip the rectangle to each box in the clip region + * this is logically equivalent to calling Intersect() + */ + while(n--) + { + partX1 = pbox->x1; + if (partX1 < fullX1) + partX1 = fullX1; + partY1 = pbox->y1; + if (partY1 < fullY1) + partY1 = fullY1; + partX2 = pbox->x2; + if (partX2 > fullX2) + partX2 = fullX2; + partY2 = pbox->y2; + if (partY2 > fullY2) + partY2 = fullY2; + + pbox++; + + if (partX1 < partX2 && partY1 < partY2) + fbFill (pDrawable, pGC, + partX1, partY1, + partX2 - partX1, partY2 - partY1); + } + } + } +} diff --git a/xorg-server-1.4/fb/fbfillsp.c b/xorg-server-1.4/fb/fbfillsp.c new file mode 100644 index 0000000..5d21472 --- /dev/null +++ b/xorg-server-1.4/fb/fbfillsp.c @@ -0,0 +1,100 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbFillSpans (DrawablePtr pDrawable, + GCPtr pGC, + int n, + DDXPointPtr ppt, + int *pwidth, + int fSorted) +{ + RegionPtr pClip = fbGetCompositeClip(pGC); + BoxPtr pextent, pbox; + int nbox; + int extentX1, extentX2, extentY1, extentY2; + int fullX1, fullX2, fullY1; + int partX1, partX2; + + pextent = REGION_EXTENTS(pGC->pScreen, pClip); + extentX1 = pextent->x1; + extentY1 = pextent->y1; + extentX2 = pextent->x2; + extentY2 = pextent->y2; + while (n--) + { + fullX1 = ppt->x; + fullY1 = ppt->y; + fullX2 = fullX1 + (int) *pwidth; + ppt++; + pwidth++; + + if (fullY1 < extentY1 || extentY2 <= fullY1) + continue; + + if (fullX1 < extentX1) + fullX1 = extentX1; + + if (fullX2 > extentX2) + fullX2 = extentX2; + + if (fullX1 >= fullX2) + continue; + + nbox = REGION_NUM_RECTS (pClip); + if (nbox == 1) + { + fbFill (pDrawable, + pGC, + fullX1, fullY1, fullX2-fullX1, 1); + } + else + { + pbox = REGION_RECTS(pClip); + while(nbox--) + { + if (pbox->y1 <= fullY1 && fullY1 < pbox->y2) + { + partX1 = pbox->x1; + if (partX1 < fullX1) + partX1 = fullX1; + partX2 = pbox->x2; + if (partX2 > fullX2) + partX2 = fullX2; + if (partX2 > partX1) + { + fbFill (pDrawable, pGC, + partX1, fullY1, + partX2 - partX1, 1); + } + } + pbox++; + } + } + } +} diff --git a/xorg-server-1.4/fb/fbgc.c b/xorg-server-1.4/fb/fbgc.c new file mode 100644 index 0000000..fda391b --- /dev/null +++ b/xorg-server-1.4/fb/fbgc.c @@ -0,0 +1,319 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" + +const GCFuncs fbGCFuncs = { + fbValidateGC, + miChangeGC, + miCopyGC, + miDestroyGC, + miChangeClip, + miDestroyClip, + miCopyClip, +}; + +const GCOps fbGCOps = { + fbFillSpans, + fbSetSpans, + fbPutImage, + fbCopyArea, + fbCopyPlane, + fbPolyPoint, + fbPolyLine, + fbPolySegment, + fbPolyRectangle, + fbPolyArc, + miFillPolygon, + fbPolyFillRect, + fbPolyFillArc, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + fbImageGlyphBlt, + fbPolyGlyphBlt, + fbPushPixels +}; + +Bool +fbCreateGC(GCPtr pGC) +{ + pGC->clientClip = NULL; + pGC->clientClipType = CT_NONE; + + pGC->ops = (GCOps *) &fbGCOps; + pGC->funcs = (GCFuncs *) &fbGCFuncs; + + /* fb wants to translate before scan conversion */ + pGC->miTranslate = 1; + + fbGetRotatedPixmap(pGC) = 0; + fbGetExpose(pGC) = 1; + fbGetFreeCompClip(pGC) = 0; + fbGetCompositeClip(pGC) = 0; + fbGetGCPrivate(pGC)->bpp = BitsPerPixel (pGC->depth); + return TRUE; +} + +/* + * Pad pixmap to FB_UNIT bits wide + */ +void +fbPadPixmap (PixmapPtr pPixmap) +{ + int width; + FbBits *bits; + FbBits b; + FbBits mask; + int height; + int w; + int stride; + int bpp; + int xOff, yOff; + + fbGetDrawable (&pPixmap->drawable, bits, stride, bpp, xOff, yOff); + + width = pPixmap->drawable.width * pPixmap->drawable.bitsPerPixel; + height = pPixmap->drawable.height; + mask = FbBitsMask (0, width); + while (height--) + { + b = READ(bits) & mask; + w = width; + while (w < FB_UNIT) + { + b = b | FbScrRight(b, w); + w <<= 1; + } + WRITE(bits, b); + bits += stride; + } + + fbFinishAccess (&pPixmap->drawable); +} + +/* + * Verify that 'bits' repeats every 'len' bits + */ +static Bool +fbBitsRepeat (FbBits bits, int len, int width) +{ + FbBits mask = FbBitsMask(0, len); + FbBits orig = bits & mask; + int i; + + if (width > FB_UNIT) + width = FB_UNIT; + for (i = 0; i < width / len; i++) + { + if ((bits & mask) != orig) + return FALSE; + bits = FbScrLeft(bits,len); + } + return TRUE; +} + +/* + * Check whether an entire bitmap line is a repetition of + * the first 'len' bits + */ +static Bool +fbLineRepeat (FbBits *bits, int len, int width) +{ + FbBits first = bits[0]; + + if (!fbBitsRepeat (first, len, width)) + return FALSE; + width = (width + FB_UNIT-1) >> FB_SHIFT; + bits++; + while (--width) + if (READ(bits) != first) + return FALSE; + return TRUE; +} + +/* + * The even stipple code wants the first FB_UNIT/bpp bits on + * each scanline to represent the entire stipple + */ +static Bool +fbCanEvenStipple (PixmapPtr pStipple, int bpp) +{ + int len = FB_UNIT / bpp; + FbBits *bits; + int stride; + int stip_bpp; + int stipXoff, stipYoff; + int h; + + /* can't even stipple 24bpp drawables */ + if ((bpp & (bpp-1)) != 0) + return FALSE; + /* make sure the stipple width is a multiple of the even stipple width */ + if (pStipple->drawable.width % len != 0) + return FALSE; + fbGetDrawable (&pStipple->drawable, bits, stride, stip_bpp, stipXoff, stipYoff); + h = pStipple->drawable.height; + /* check to see that the stipple repeats horizontally */ + while (h--) + { + if (!fbLineRepeat (bits, len, pStipple->drawable.width)) { + fbFinishAccess (&pStipple->drawable); + return FALSE; + } + bits += stride; + } + fbFinishAccess (&pStipple->drawable); + return TRUE; +} + +void +fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + FbBits mask; + + pGC->lastWinOrg.x = pDrawable->x; + pGC->lastWinOrg.y = pDrawable->y; + + /* + * if the client clip is different or moved OR the subwindowMode has + * changed OR the window's clip has changed since the last validation + * we need to recompute the composite clip + */ + + if ((changes & (GCClipXOrigin|GCClipYOrigin|GCClipMask|GCSubwindowMode)) || + (pDrawable->serialNumber != (pGC->serialNumber & DRAWABLE_SERIAL_BITS)) + ) + { + miComputeCompositeClip (pGC, pDrawable); + pPriv->oneRect = REGION_NUM_RECTS(fbGetCompositeClip(pGC)) == 1; + } + +#ifdef FB_24_32BIT + if (pPriv->bpp != pDrawable->bitsPerPixel) + { + changes |= GCStipple|GCForeground|GCBackground|GCPlaneMask; + pPriv->bpp = pDrawable->bitsPerPixel; + } + if ((changes & GCTile) && fbGetRotatedPixmap(pGC)) + { + (*pGC->pScreen->DestroyPixmap) (fbGetRotatedPixmap(pGC)); + fbGetRotatedPixmap(pGC) = 0; + } + + if (pGC->fillStyle == FillTiled) + { + PixmapPtr pOldTile, pNewTile; + + pOldTile = pGC->tile.pixmap; + if (pOldTile->drawable.bitsPerPixel != pDrawable->bitsPerPixel) + { + pNewTile = fbGetRotatedPixmap(pGC); + if (!pNewTile || pNewTile ->drawable.bitsPerPixel != pDrawable->bitsPerPixel) + { + if (pNewTile) + (*pGC->pScreen->DestroyPixmap) (pNewTile); + pNewTile = fb24_32ReformatTile (pOldTile, pDrawable->bitsPerPixel); + } + if (pNewTile) + { + fbGetRotatedPixmap(pGC) = pOldTile; + pGC->tile.pixmap = pNewTile; + changes |= GCTile; + } + } + } +#endif + if (changes & GCTile) + { + if (!pGC->tileIsPixel && + FbEvenTile (pGC->tile.pixmap->drawable.width * + pDrawable->bitsPerPixel)) + fbPadPixmap (pGC->tile.pixmap); + } + if (changes & GCStipple) + { + pPriv->evenStipple = FALSE; + + if (pGC->stipple) { + + /* can we do an even stipple ?? */ + if (FbEvenStip (pGC->stipple->drawable.width, + pDrawable->bitsPerPixel) && + (fbCanEvenStipple (pGC->stipple, pDrawable->bitsPerPixel))) + pPriv->evenStipple = TRUE; + + if (pGC->stipple->drawable.width * pDrawable->bitsPerPixel < FB_UNIT) + fbPadPixmap (pGC->stipple); + } + } + /* + * Recompute reduced rop values + */ + if (changes & (GCForeground|GCBackground|GCPlaneMask|GCFunction)) + { + int s; + FbBits depthMask; + + mask = FbFullMask(pDrawable->bitsPerPixel); + depthMask = FbFullMask(pDrawable->depth); + + pPriv->fg = pGC->fgPixel & mask; + pPriv->bg = pGC->bgPixel & mask; + + if ((pGC->planemask & depthMask) == depthMask) + pPriv->pm = mask; + else + pPriv->pm = pGC->planemask & mask; + + s = pDrawable->bitsPerPixel; + while (s < FB_UNIT) + { + pPriv->fg |= pPriv->fg << s; + pPriv->bg |= pPriv->bg << s; + pPriv->pm |= pPriv->pm << s; + s <<= 1; + } + pPriv->and = fbAnd(pGC->alu, pPriv->fg, pPriv->pm); + pPriv->xor = fbXor(pGC->alu, pPriv->fg, pPriv->pm); + pPriv->bgand = fbAnd(pGC->alu, pPriv->bg, pPriv->pm); + pPriv->bgxor = fbXor(pGC->alu, pPriv->bg, pPriv->pm); + } + if (changes & GCDashList) + { + unsigned short n = pGC->numInDashList; + unsigned char *dash = pGC->dash; + unsigned int dashLength = 0; + + while (n--) + dashLength += (unsigned int ) *dash++; + pPriv->dashLength = dashLength; + } +} diff --git a/xorg-server-1.4/fb/fbgetsp.c b/xorg-server-1.4/fb/fbgetsp.c new file mode 100644 index 0000000..6402c6c --- /dev/null +++ b/xorg-server-1.4/fb/fbgetsp.c @@ -0,0 +1,87 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbGetSpans(DrawablePtr pDrawable, + int wMax, + DDXPointPtr ppt, + int *pwidth, + int nspans, + char *pchardstStart) +{ + FbBits *src, *dst; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + int xoff; + + /* + * XFree86 DDX empties the root borderClip when the VT is + * switched away; this checks for that case + */ + if (!fbDrawableEnabled(pDrawable)) + return; + +#ifdef FB_24_32BIT + if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth)) + { + fb24_32GetSpans (pDrawable, wMax, ppt, pwidth, nspans, pchardstStart); + return; + } +#endif + + fbGetDrawable (pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + + while (nspans--) + { + xoff = (int) (((long) pchardstStart) & (FB_MASK >> 3)); + dst = (FbBits *) (pchardstStart - xoff); + xoff <<= 3; + fbBlt (src + (ppt->y + srcYoff) * srcStride, srcStride, + (ppt->x + srcXoff) * srcBpp, + + dst, + 1, + xoff, + + *pwidth * srcBpp, + 1, + + GXcopy, + FB_ALLONES, + srcBpp, + + FALSE, + FALSE); + pchardstStart += PixmapBytePad(*pwidth, pDrawable->depth); + ppt++; + pwidth++; + } + + fbFinishAccess (pDrawable); +} diff --git a/xorg-server-1.4/fb/fbglyph.c b/xorg-server-1.4/fb/fbglyph.c new file mode 100644 index 0000000..2c19b74 --- /dev/null +++ b/xorg-server-1.4/fb/fbglyph.c @@ -0,0 +1,481 @@ +/* + * + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" +#include +#include "dixfontstr.h" + +#define dummyScreen screenInfo.screens[0] + +Bool +fbGlyphIn (RegionPtr pRegion, + int x, + int y, + int width, + int height) +{ + BoxRec box; + BoxPtr pExtents = REGION_EXTENTS (dummyScreen, pRegion); + + /* + * Check extents by hand to avoid 16 bit overflows + */ + if (x < (int) pExtents->x1) + return FALSE; + if ((int) pExtents->x2 < x + width) + return FALSE; + if (y < (int) pExtents->y1) + return FALSE; + if ((int) pExtents->y2 < y + height) + return FALSE; + box.x1 = x; + box.x2 = x + width; + box.y1 = y; + box.y2 = y + height; + return RECT_IN_REGION (dummyScreen, pRegion, &box) == rgnIN; +} + +#ifdef FB_24BIT +#ifndef FBNOPIXADDR + +#define WRITE1(d,n,fg) WRITE((d) + (n), (CARD8) fg) +#define WRITE2(d,n,fg) WRITE((CARD16 *) &(d[n]), (CARD16) fg) +#define WRITE4(d,n,fg) WRITE((CARD32 *) &(d[n]), (CARD32) fg) +#if FB_UNIT == 6 && IMAGE_BYTE_ORDER == LSBFirst +#define WRITE8(d) WRITE((FbBits *) &(d[0]), fg) +#else +#define WRITE8(d) WRITE4(d,0,_ABCA), WRITE4(d,4,_BCAB) +#endif + +/* + * This is a bit tricky, but it's brief. Write 12 bytes worth + * of dest, which is four pixels, at a time. This gives constant + * code for each pattern as they're always aligned the same + * + * a b c d a b c d a b c d bytes + * A B C A B C A B C A B C pixels + * + * f0 f1 f2 + * A B C A B C A B C A B C pixels LSB + * C A B C A B C A B C A B pixels MSB + * + * LSB MSB + * A f0 f1 + * B f1 f2 + * C f2 f0 + * A B f0 f2 + * B C f1 f0 + * C A f2 f1 + * A B C A f0 f1 + * B C A B f1 f2 + * C A B C f2 f0 + */ + +#undef _A +#undef _B +#undef _C +#undef _AB +#undef _BC +#undef _CA +#undef _ABCA +#undef _BCAB +#undef _CABC + +#if IMAGE_BYTE_ORDER == MSBFirst +#define _A f1 +#define _B f2 +#define _C f0 +#define _AB f2 +#define _BC f0 +#define _CA f1 +#define _ABCA f1 +#define _BCAB f2 +#define _CABC f0 +#define CASE(a,b,c,d) ((a << 3) | (b << 2) | (c << 1) | d) +#else +#define _A f0 +#define _B f1 +#define _C f2 +#define _AB f0 +#define _BC f1 +#define _CA f2 +#define _ABCA f0 +#define _BCAB f1 +#define _CABC f2 +#define CASE(a,b,c,d) (a | (b << 1) | (c << 2) | (d << 3)) +#endif + +void +fbGlyph24 (FbBits *dstBits, + FbStride dstStride, + int dstBpp, + FbStip *stipple, + FbBits fg, + int x, + int height) +{ + int lshift; + FbStip bits; + CARD8 *dstLine; + CARD8 *dst; + FbStip f0, f1, f2; + int n; + int shift; + + f0 = fg; + f1 = FbRot24(f0,16); + f2 = FbRot24(f0,8); + + dstLine = (CARD8 *) dstBits; + dstLine += (x & ~3) * 3; + dstStride *= (sizeof (FbBits) / sizeof (CARD8)); + shift = x & 3; + lshift = 4 - shift; + while (height--) + { + bits = READ(stipple++); + n = lshift; + dst = dstLine; + while (bits) + { + switch (FbStipMoveLsb (FbLeftStipBits (bits, n), 4, n)) { + case CASE(0,0,0,0): + break; + case CASE(1,0,0,0): + WRITE2(dst,0,_AB); + WRITE1(dst,2,_C); + break; + case CASE(0,1,0,0): + WRITE1(dst,3,_A); + WRITE2(dst,4,_BC); + break; + case CASE(1,1,0,0): + WRITE4(dst,0,_ABCA); + WRITE2(dst,4,_BC); + break; + case CASE(0,0,1,0): + WRITE2(dst,6,_AB); + WRITE1(dst,8,_C); + break; + case CASE(1,0,1,0): + WRITE2(dst,0,_AB); + WRITE1(dst,2,_C); + + WRITE2(dst,6,_AB); + WRITE1(dst,8,_C); + break; + case CASE(0,1,1,0): + WRITE1(dst,3,_A); + WRITE4(dst,4,_BCAB); + WRITE1(dst,8,_C); + break; + case CASE(1,1,1,0): + WRITE8(dst); + WRITE1(dst,8,_C); + break; + case CASE(0,0,0,1): + WRITE1(dst,9,_A); + WRITE2(dst,10,_BC); + break; + case CASE(1,0,0,1): + WRITE2(dst,0,_AB); + WRITE1(dst,2,_C); + + WRITE1(dst,9,_A); + WRITE2(dst,10,_BC); + break; + case CASE(0,1,0,1): + WRITE1(dst,3,_A); + WRITE2(dst,4,_BC); + + WRITE1(dst,9,_A); + WRITE2(dst,10,_BC); + break; + case CASE(1,1,0,1): + WRITE4(dst,0,_ABCA); + WRITE2(dst,4,_BC); + + WRITE1(dst,9,_A); + WRITE2(dst,10,_BC); + break; + case CASE(0,0,1,1): + WRITE2(dst,6,_AB); + WRITE4(dst,8,_CABC); + break; + case CASE(1,0,1,1): + WRITE2(dst,0,_AB); + WRITE1(dst,2,_C); + + WRITE2(dst,6,_AB); + WRITE4(dst,8,_CABC); + break; + case CASE(0,1,1,1): + WRITE1(dst,3,_A); + WRITE4(dst,4,_BCAB); + WRITE4(dst,8,_CABC); + break; + case CASE(1,1,1,1): + WRITE8(dst); + WRITE4(dst,8,_CABC); + break; + } + bits = FbStipLeft (bits, n); + n = 4; + dst += 12; + } + dstLine += dstStride; + } +} +#endif +#endif + +void +fbPolyGlyphBlt (DrawablePtr pDrawable, + GCPtr pGC, + int x, + int y, + unsigned int nglyph, + CharInfoPtr *ppci, + pointer pglyphBase) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); + CharInfoPtr pci; + unsigned char *pglyph; /* pointer bits in glyph */ + int gx, gy; + int gWidth, gHeight; /* width and height of glyph */ + FbStride gStride; /* stride of glyph */ +#ifndef FBNOPIXADDR + void (*glyph) (FbBits *, + FbStride, + int, + FbStip *, + FbBits, + int, + int); + FbBits *dst = 0; + FbStride dstStride = 0; + int dstBpp = 0; + int dstXoff = 0, dstYoff = 0; + + glyph = 0; + if (pGC->fillStyle == FillSolid && pPriv->and == 0) + { + dstBpp = pDrawable->bitsPerPixel; + switch (dstBpp) { + case 8: glyph = fbGlyph8; break; + case 16: glyph = fbGlyph16; break; +#ifdef FB_24BIT + case 24: glyph = fbGlyph24; break; +#endif + case 32: glyph = fbGlyph32; break; + } + } +#endif + x += pDrawable->x; + y += pDrawable->y; + + while (nglyph--) + { + pci = *ppci++; + pglyph = FONTGLYPHBITS(pglyphBase, pci); + gWidth = GLYPHWIDTHPIXELS(pci); + gHeight = GLYPHHEIGHTPIXELS(pci); + if (gWidth && gHeight) + { + gx = x + pci->metrics.leftSideBearing; + gy = y - pci->metrics.ascent; +#ifndef FBNOPIXADDR + if (glyph && gWidth <= sizeof (FbStip) * 8 && + fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) + { + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + (*glyph) (dst + (gy + dstYoff) * dstStride, + dstStride, + dstBpp, + (FbStip *) pglyph, + pPriv->xor, + gx + dstXoff, + gHeight); + fbFinishAccess (pDrawable); + } + else +#endif + { + gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof (FbStip); + fbPushImage (pDrawable, + pGC, + + (FbStip *) pglyph, + gStride, + 0, + + gx, + gy, + gWidth, gHeight); + } + } + x += pci->metrics.characterWidth; + } +} + + +void +fbImageGlyphBlt (DrawablePtr pDrawable, + GCPtr pGC, + int x, + int y, + unsigned int nglyph, + CharInfoPtr *ppciInit, + pointer pglyphBase) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + CharInfoPtr *ppci; + CharInfoPtr pci; + unsigned char *pglyph; /* pointer bits in glyph */ + int gWidth, gHeight; /* width and height of glyph */ + FbStride gStride; /* stride of glyph */ + Bool opaque; + int n; + int gx, gy; +#ifndef FBNOPIXADDR + void (*glyph) (FbBits *, + FbStride, + int, + FbStip *, + FbBits, + int, + int); + FbBits *dst = 0; + FbStride dstStride = 0; + int dstBpp = 0; + int dstXoff = 0, dstYoff = 0; + + glyph = 0; + if (pPriv->and == 0) + { + dstBpp = pDrawable->bitsPerPixel; + switch (dstBpp) { + case 8: glyph = fbGlyph8; break; + case 16: glyph = fbGlyph16; break; +#ifdef FB_24BIT + case 24: glyph = fbGlyph24; break; +#endif + case 32: glyph = fbGlyph32; break; + } + } +#endif + + x += pDrawable->x; + y += pDrawable->y; + + if (TERMINALFONT (pGC->font) +#ifndef FBNOPIXADDR + && !glyph +#endif + ) + { + opaque = TRUE; + } + else + { + int xBack, widthBack; + int yBack, heightBack; + + ppci = ppciInit; + n = nglyph; + widthBack = 0; + while (n--) + widthBack += (*ppci++)->metrics.characterWidth; + + xBack = x; + if (widthBack < 0) + { + xBack += widthBack; + widthBack = -widthBack; + } + yBack = y - FONTASCENT(pGC->font); + heightBack = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); + fbSolidBoxClipped (pDrawable, + fbGetCompositeClip(pGC), + xBack, + yBack, + xBack + widthBack, + yBack + heightBack, + fbAnd(GXcopy,pPriv->bg,pPriv->pm), + fbXor(GXcopy,pPriv->bg,pPriv->pm)); + opaque = FALSE; + } + + ppci = ppciInit; + while (nglyph--) + { + pci = *ppci++; + pglyph = FONTGLYPHBITS(pglyphBase, pci); + gWidth = GLYPHWIDTHPIXELS(pci); + gHeight = GLYPHHEIGHTPIXELS(pci); + if (gWidth && gHeight) + { + gx = x + pci->metrics.leftSideBearing; + gy = y - pci->metrics.ascent; +#ifndef FBNOPIXADDR + if (glyph && gWidth <= sizeof (FbStip) * 8 && + fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) + { + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + (*glyph) (dst + (gy + dstYoff) * dstStride, + dstStride, + dstBpp, + (FbStip *) pglyph, + pPriv->fg, + gx + dstXoff, + gHeight); + fbFinishAccess (pDrawable); + } + else +#endif + { + gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof (FbStip); + fbPutXYImage (pDrawable, + fbGetCompositeClip(pGC), + pPriv->fg, + pPriv->bg, + pPriv->pm, + GXcopy, + opaque, + + gx, + gy, + gWidth, gHeight, + + (FbStip *) pglyph, + gStride, + 0); + } + } + x += pci->metrics.characterWidth; + } +} diff --git a/xorg-server-1.4/fb/fbimage.c b/xorg-server-1.4/fb/fbimage.c new file mode 100644 index 0000000..2b9ac27 --- /dev/null +++ b/xorg-server-1.4/fb/fbimage.c @@ -0,0 +1,368 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" + +void +fbPutImage (DrawablePtr pDrawable, + GCPtr pGC, + int depth, + int x, + int y, + int w, + int h, + int leftPad, + int format, + char *pImage) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + unsigned long i; + FbStride srcStride; + FbStip *src = (FbStip *) pImage; + + x += pDrawable->x; + y += pDrawable->y; + + switch (format) + { + case XYBitmap: + srcStride = BitmapBytePad(w + leftPad) / sizeof (FbStip); + fbPutXYImage (pDrawable, + fbGetCompositeClip(pGC), + pPriv->fg, + pPriv->bg, + pPriv->pm, + pGC->alu, + TRUE, + x, y, w, h, + src, + srcStride, + leftPad); + break; + case XYPixmap: + srcStride = BitmapBytePad(w + leftPad) / sizeof (FbStip); + for (i = (unsigned long)1 << (pDrawable->depth - 1); i; i >>= 1) + { + if (i & pGC->planemask) + { + fbPutXYImage (pDrawable, + fbGetCompositeClip(pGC), + FB_ALLONES, + 0, + fbReplicatePixel (i, pDrawable->bitsPerPixel), + pGC->alu, + TRUE, + x, y, w, h, + src, + srcStride, + leftPad); + src += srcStride * h; + } + } + break; + case ZPixmap: +#ifdef FB_24_32BIT + if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth)) + { + srcStride = PixmapBytePad(w, pDrawable->depth); + fb24_32PutZImage (pDrawable, + fbGetCompositeClip(pGC), + pGC->alu, + (FbBits) pGC->planemask, + x, y, w, h, + (CARD8 *) pImage, + srcStride); + } + else +#endif + { + srcStride = PixmapBytePad(w, pDrawable->depth) / sizeof (FbStip); + fbPutZImage (pDrawable, + fbGetCompositeClip(pGC), + pGC->alu, + pPriv->pm, + x, y, w, h, + src, srcStride); + } + } +} + +void +fbPutZImage (DrawablePtr pDrawable, + RegionPtr pClip, + int alu, + FbBits pm, + int x, + int y, + int width, + int height, + FbStip *src, + FbStride srcStride) +{ + FbStip *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + int nbox; + BoxPtr pbox; + int x1, y1, x2, y2; + + fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + for (nbox = REGION_NUM_RECTS (pClip), + pbox = REGION_RECTS(pClip); + nbox--; + pbox++) + { + x1 = x; + y1 = y; + x2 = x + width; + y2 = y + height; + if (x1 < pbox->x1) + x1 = pbox->x1; + if (y1 < pbox->y1) + y1 = pbox->y1; + if (x2 > pbox->x2) + x2 = pbox->x2; + if (y2 > pbox->y2) + y2 = pbox->y2; + if (x1 >= x2 || y1 >= y2) + continue; + fbBltStip (src + (y1 - y) * srcStride, + srcStride, + (x1 - x) * dstBpp, + + dst + (y1 + dstYoff) * dstStride, + dstStride, + (x1 + dstXoff) * dstBpp, + + (x2 - x1) * dstBpp, + (y2 - y1), + + alu, + pm, + dstBpp); + } + + fbFinishAccess (pDrawable); +} + +void +fbPutXYImage (DrawablePtr pDrawable, + RegionPtr pClip, + FbBits fg, + FbBits bg, + FbBits pm, + int alu, + Bool opaque, + + int x, + int y, + int width, + int height, + + FbStip *src, + FbStride srcStride, + int srcX) +{ + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + int nbox; + BoxPtr pbox; + int x1, y1, x2, y2; + FbBits fgand = 0, fgxor = 0, bgand = 0, bgxor = 0; + + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + if (dstBpp == 1) + { + if (opaque) + alu = FbOpaqueStipple1Rop(alu,fg,bg); + else + alu = FbStipple1Rop(alu,fg); + } + else + { + fgand = fbAnd(alu,fg,pm); + fgxor = fbXor(alu,fg,pm); + if (opaque) + { + bgand = fbAnd(alu,bg,pm); + bgxor = fbXor(alu,bg,pm); + } + else + { + bgand = fbAnd(GXnoop,(FbBits)0,FB_ALLONES); + bgxor = fbXor(GXnoop,(FbBits)0,FB_ALLONES); + } + } + + for (nbox = REGION_NUM_RECTS (pClip), + pbox = REGION_RECTS(pClip); + nbox--; + pbox++) + { + x1 = x; + y1 = y; + x2 = x + width; + y2 = y + height; + if (x1 < pbox->x1) + x1 = pbox->x1; + if (y1 < pbox->y1) + y1 = pbox->y1; + if (x2 > pbox->x2) + x2 = pbox->x2; + if (y2 > pbox->y2) + y2 = pbox->y2; + if (x1 >= x2 || y1 >= y2) + continue; + if (dstBpp == 1) + { + fbBltStip (src + (y1 - y) * srcStride, + srcStride, + (x1 - x) + srcX, + + (FbStip *) (dst + (y1 + dstYoff) * dstStride), + FbBitsStrideToStipStride(dstStride), + (x1 + dstXoff) * dstBpp, + + (x2 - x1) * dstBpp, + (y2 - y1), + + alu, + pm, + dstBpp); + } + else + { + fbBltOne (src + (y1 - y) * srcStride, + srcStride, + (x1 - x) + srcX, + + dst + (y1 + dstYoff) * dstStride, + dstStride, + (x1 + dstXoff) * dstBpp, + dstBpp, + + (x2 - x1) * dstBpp, + (y2 - y1), + + fgand, fgxor, bgand, bgxor); + } + } + + fbFinishAccess (pDrawable); +} + +void +fbGetImage (DrawablePtr pDrawable, + int x, + int y, + int w, + int h, + unsigned int format, + unsigned long planeMask, + char *d) +{ + FbBits *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + FbStip *dst; + FbStride dstStride; + + /* + * XFree86 DDX empties the root borderClip when the VT is + * switched away; this checks for that case + */ + if (!fbDrawableEnabled(pDrawable)) + return; + +#ifdef FB_24_32BIT + if (format == ZPixmap && + pDrawable->bitsPerPixel != BitsPerPixel (pDrawable->depth)) + { + fb24_32GetImage (pDrawable, x, y, w, h, format, planeMask, d); + return; + } +#endif + + fbGetDrawable (pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + + x += pDrawable->x; + y += pDrawable->y; + + dst = (FbStip *) d; + if (format == ZPixmap || srcBpp == 1) + { + FbBits pm; + + pm = fbReplicatePixel (planeMask, srcBpp); + dstStride = PixmapBytePad(w, pDrawable->depth); + if (pm != FB_ALLONES) + memset (d, 0, dstStride * h); + dstStride /= sizeof (FbStip); + fbBltStip ((FbStip *) (src + (y + srcYoff) * srcStride), + FbBitsStrideToStipStride(srcStride), + (x + srcXoff) * srcBpp, + + dst, + dstStride, + 0, + + w * srcBpp, h, + + GXcopy, + pm, + srcBpp); + } + else + { + dstStride = BitmapBytePad(w) / sizeof (FbStip); + fbBltPlane (src + (y + srcYoff) * srcStride, + srcStride, + (x + srcXoff) * srcBpp, + srcBpp, + + dst, + dstStride, + 0, + + w * srcBpp, h, + + fbAndStip(GXcopy,FB_STIP_ALLONES,FB_STIP_ALLONES), + fbXorStip(GXcopy,FB_STIP_ALLONES,FB_STIP_ALLONES), + fbAndStip(GXcopy,0,FB_STIP_ALLONES), + fbXorStip(GXcopy,0,FB_STIP_ALLONES), + planeMask); + } + + fbFinishAccess (pDrawable); +} diff --git a/xorg-server-1.4/fb/fbline.c b/xorg-server-1.4/fb/fbline.c new file mode 100644 index 0000000..2cee123 --- /dev/null +++ b/xorg-server-1.4/fb/fbline.c @@ -0,0 +1,175 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbZeroLine (DrawablePtr pDrawable, + GCPtr pGC, + int mode, + int npt, + DDXPointPtr ppt) +{ + int x1, y1, x2, y2; + int x, y; + int dashOffset; + + x = pDrawable->x; + y = pDrawable->y; + x1 = ppt->x; + y1 = ppt->y; + dashOffset = pGC->dashOffset; + while (--npt) + { + ++ppt; + x2 = ppt->x; + y2 = ppt->y; + if (mode == CoordModePrevious) + { + x2 += x1; + y2 += y1; + } + fbSegment (pDrawable, pGC, x1 + x, y1 + y, + x2 + x, y2 + y, + npt == 1 && pGC->capStyle != CapNotLast, + &dashOffset); + x1 = x2; + y1 = y2; + } +} + +void +fbZeroSegment (DrawablePtr pDrawable, + GCPtr pGC, + int nseg, + xSegment *pSegs) +{ + int dashOffset; + int x, y; + Bool drawLast = pGC->capStyle != CapNotLast; + + x = pDrawable->x; + y = pDrawable->y; + while (nseg--) + { + dashOffset = pGC->dashOffset; + fbSegment (pDrawable, pGC, + pSegs->x1 + x, pSegs->y1 + y, + pSegs->x2 + x, pSegs->y2 + y, + drawLast, + &dashOffset); + pSegs++; + } +} + +void +fbFixCoordModePrevious (int npt, + DDXPointPtr ppt) +{ + int x, y; + + x = ppt->x; + y = ppt->y; + npt--; + while (npt--) + { + ppt++; + x = (ppt->x += x); + y = (ppt->y += y); + } +} + +void +fbPolyLine (DrawablePtr pDrawable, + GCPtr pGC, + int mode, + int npt, + DDXPointPtr ppt) +{ + void (*line) (DrawablePtr, GCPtr, int mode, int npt, DDXPointPtr ppt); + + if (pGC->lineWidth == 0) + { + line = fbZeroLine; +#ifndef FBNOPIXADDR + if (pGC->fillStyle == FillSolid && + pGC->lineStyle == LineSolid && + REGION_NUM_RECTS (fbGetCompositeClip(pGC)) == 1) + { + switch (pDrawable->bitsPerPixel) { + case 8: line = fbPolyline8; break; + case 16: line = fbPolyline16; break; +#ifdef FB_24BIT + case 24: line = fbPolyline24; break; +#endif + case 32: line = fbPolyline32; break; + } + } +#endif + } + else + { + if (pGC->lineStyle != LineSolid) + line = miWideDash; + else + line = miWideLine; + } + (*line) (pDrawable, pGC, mode, npt, ppt); +} + +void +fbPolySegment (DrawablePtr pDrawable, + GCPtr pGC, + int nseg, + xSegment *pseg) +{ + void (*seg) (DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pseg); + + if (pGC->lineWidth == 0) + { + seg = fbZeroSegment; +#ifndef FBNOPIXADDR + if (pGC->fillStyle == FillSolid && + pGC->lineStyle == LineSolid && + REGION_NUM_RECTS (fbGetCompositeClip(pGC)) == 1) + { + switch (pDrawable->bitsPerPixel) { + case 8: seg = fbPolySegment8; break; + case 16: seg = fbPolySegment16; break; +#ifdef FB_24BIT + case 24: seg = fbPolySegment24; break; +#endif + case 32: seg = fbPolySegment32; break; + } + } +#endif + } + else + { + seg = miPolySegment; + } + (*seg) (pDrawable, pGC, nseg, pseg); +} diff --git a/xorg-server-1.4/fb/fboverlay.c b/xorg-server-1.4/fb/fboverlay.c new file mode 100644 index 0000000..5d7481e --- /dev/null +++ b/xorg-server-1.4/fb/fboverlay.c @@ -0,0 +1,454 @@ +/* + * + * 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_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" +#include "fboverlay.h" +#include "shmint.h" + +int fbOverlayGeneration; +int fbOverlayScreenPrivateIndex = -1; + +int fbOverlayGetScreenPrivateIndex(void) +{ + return fbOverlayScreenPrivateIndex; +} + +/* + * Replace this if you want something supporting + * multiple overlays with the same depth + */ +Bool +fbOverlayCreateWindow(WindowPtr pWin) +{ + FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pWin->drawable.pScreen); + int i; + PixmapPtr pPixmap; + + if (pWin->drawable.class != InputOutput) + return TRUE; + +#ifdef FB_SCREEN_PRIVATE + if (pWin->drawable.bitsPerPixel == 32) + pWin->drawable.bitsPerPixel = fbGetScreenPrivate(pWin->drawable.pScreen)->win32bpp; +#endif + + for (i = 0; i < pScrPriv->nlayers; i++) + { + pPixmap = pScrPriv->layer[i].u.run.pixmap; + if (pWin->drawable.depth == pPixmap->drawable.depth) + { + pWin->devPrivates[fbWinPrivateIndex].ptr = (pointer) pPixmap; + /* + * Make sure layer keys are written correctly by + * having non-root layers set to full while the + * root layer is set to empty. This will cause + * all of the layers to get painted when the root + * is mapped + */ + if (!pWin->parent) + { + REGION_EMPTY (pWin->drawable.pScreen, + &pScrPriv->layer[i].u.run.region); + } + return TRUE; + } + } + return FALSE; +} + +Bool +fbOverlayCloseScreen (int iScreen, ScreenPtr pScreen) +{ + FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); + int i; + + for (i = 0; i < pScrPriv->nlayers; i++) + { + (*pScreen->DestroyPixmap)(pScrPriv->layer[i].u.run.pixmap); + REGION_UNINIT (pScreen, &pScrPriv->layer[i].u.run.region); + } + return TRUE; +} + +/* + * Return layer containing this window + */ +int +fbOverlayWindowLayer(WindowPtr pWin) +{ + FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pWin->drawable.pScreen); + int i; + + for (i = 0; i < pScrPriv->nlayers; i++) + if (pWin->devPrivates[fbWinPrivateIndex].ptr == + (pointer) pScrPriv->layer[i].u.run.pixmap) + return i; + return 0; +} + +Bool +fbOverlayCreateScreenResources(ScreenPtr pScreen) +{ + int i; + FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); + PixmapPtr pPixmap; + pointer pbits; + int width; + int depth; + BoxRec box; + + if (!miCreateScreenResources(pScreen)) + return FALSE; + + box.x1 = 0; + box.y1 = 0; + box.x2 = pScreen->width; + box.y2 = pScreen->height; + for (i = 0; i < pScrPriv->nlayers; i++) + { + pbits = pScrPriv->layer[i].u.init.pbits; + width = pScrPriv->layer[i].u.init.width; + depth = pScrPriv->layer[i].u.init.depth; + pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth); + if (!pPixmap) + return FALSE; + if (!(*pScreen->ModifyPixmapHeader)(pPixmap, pScreen->width, + pScreen->height, depth, + BitsPerPixel(depth), + PixmapBytePad(width, depth), + pbits)) + return FALSE; + pScrPriv->layer[i].u.run.pixmap = pPixmap; + REGION_INIT(pScreen, &pScrPriv->layer[i].u.run.region, &box, 0); + } + pScreen->devPrivate = pScrPriv->layer[0].u.run.pixmap; + return TRUE; +} + +void +fbOverlayPaintKey (DrawablePtr pDrawable, + RegionPtr pRegion, + CARD32 pixel, + int layer) +{ + fbFillRegionSolid (pDrawable, pRegion, 0, + fbReplicatePixel (pixel, pDrawable->bitsPerPixel)); +} + +/* + * Track visible region for each layer + */ +void +fbOverlayUpdateLayerRegion (ScreenPtr pScreen, + int layer, + RegionPtr prgn) +{ + FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); + int i; + RegionRec rgnNew; + + if (!prgn || !REGION_NOTEMPTY(pScreen, prgn)) + return; + for (i = 0; i < pScrPriv->nlayers; i++) + { + if (i == layer) + { + /* add new piece to this fb */ + REGION_UNION (pScreen, + &pScrPriv->layer[i].u.run.region, + &pScrPriv->layer[i].u.run.region, + prgn); + } + else if (REGION_NOTEMPTY (pScreen, + &pScrPriv->layer[i].u.run.region)) + { + /* paint new piece with chroma key */ + REGION_NULL (pScreen, &rgnNew); + REGION_INTERSECT (pScreen, + &rgnNew, + prgn, + &pScrPriv->layer[i].u.run.region); + (*pScrPriv->PaintKey) (&pScrPriv->layer[i].u.run.pixmap->drawable, + &rgnNew, + pScrPriv->layer[i].key, + i); + REGION_UNINIT(pScreen, &rgnNew); + /* remove piece from other fbs */ + REGION_SUBTRACT (pScreen, + &pScrPriv->layer[i].u.run.region, + &pScrPriv->layer[i].u.run.region, + prgn); + } + } +} + +/* + * Copy only areas in each layer containing real bits + */ +void +fbOverlayCopyWindow(WindowPtr pWin, + DDXPointRec ptOldOrg, + RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pWin->drawable.pScreen); + RegionRec rgnDst; + int dx, dy; + int i; + RegionRec layerRgn[FB_OVERLAY_MAX]; + PixmapPtr pPixmap; + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + + /* + * Clip to existing bits + */ + REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); + REGION_NULL (pScreen, &rgnDst); + REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + REGION_TRANSLATE(pScreen, &rgnDst, dx, dy); + /* + * Compute the portion of each fb affected by this copy + */ + for (i = 0; i < pScrPriv->nlayers; i++) + { + REGION_NULL (pScreen, &layerRgn[i]); + REGION_INTERSECT(pScreen, &layerRgn[i], &rgnDst, + &pScrPriv->layer[i].u.run.region); + if (REGION_NOTEMPTY (pScreen, &layerRgn[i])) + { + REGION_TRANSLATE(pScreen, &layerRgn[i], -dx, -dy); + pPixmap = pScrPriv->layer[i].u.run.pixmap; + fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable, + 0, + &layerRgn[i], dx, dy, pScrPriv->CopyWindow, 0, + (void *)(long) i); + } + } + /* + * Update regions + */ + for (i = 0; i < pScrPriv->nlayers; i++) + { + if (REGION_NOTEMPTY (pScreen, &layerRgn[i])) + fbOverlayUpdateLayerRegion (pScreen, i, &layerRgn[i]); + + REGION_UNINIT(pScreen, &layerRgn[i]); + } + REGION_UNINIT(pScreen, &rgnDst); +} + +void +fbOverlayWindowExposures (WindowPtr pWin, + RegionPtr prgn, + RegionPtr other_exposed) +{ + fbOverlayUpdateLayerRegion (pWin->drawable.pScreen, + fbOverlayWindowLayer (pWin), + prgn); + miWindowExposures(pWin, prgn, other_exposed); +} + +void +fbOverlayPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) +{ + if (what == PW_BORDER) + fbOverlayUpdateLayerRegion (pWin->drawable.pScreen, + fbOverlayWindowLayer (pWin), + pRegion); + fbPaintWindow (pWin, pRegion, what); +} + +Bool +fbOverlaySetupScreen(ScreenPtr pScreen, + pointer pbits1, + pointer pbits2, + int xsize, + int ysize, + int dpix, + int dpiy, + int width1, + int width2, + int bpp1, + int bpp2) +{ + return fbSetupScreen (pScreen, + pbits1, + xsize, + ysize, + dpix, + dpiy, + width1, + bpp1); +} + +static Bool +fb24_32OverlayCreateScreenResources(ScreenPtr pScreen) +{ + FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); + int pitch; + Bool retval; + int i; + + if((retval = fbOverlayCreateScreenResources(pScreen))) { + for (i = 0; i < pScrPriv->nlayers; i++) + { + /* fix the screen pixmap */ + PixmapPtr pPix = (PixmapPtr) pScrPriv->layer[i].u.run.pixmap; + if (pPix->drawable.bitsPerPixel == 32) { + pPix->drawable.bitsPerPixel = 24; + pitch = BitmapBytePad(pPix->drawable.width * 24); + pPix->devKind = pitch; + } + } + } + + return retval; +} + +Bool +fbOverlayFinishScreenInit(ScreenPtr pScreen, + pointer pbits1, + pointer pbits2, + int xsize, + int ysize, + int dpix, + int dpiy, + int width1, + int width2, + int bpp1, + int bpp2, + int depth1, + int depth2) +{ + VisualPtr visuals; + DepthPtr depths; + int nvisuals; + int ndepths; + int bpp = 0, imagebpp = 32; + VisualID defaultVisual; + FbOverlayScrPrivPtr pScrPriv; + + if (fbOverlayGeneration != serverGeneration) + { + fbOverlayScreenPrivateIndex = AllocateScreenPrivateIndex (); + fbOverlayGeneration = serverGeneration; + } + + pScrPriv = xalloc (sizeof (FbOverlayScrPrivRec)); + if (!pScrPriv) + return FALSE; + +#ifdef FB_24_32BIT + if (bpp1 == 32 || bpp2 == 32) + bpp = 32; + else if (bpp1 == 24 || bpp2 == 24) + bpp = 24; + + if (bpp == 24) + { + int f; + + imagebpp = 32; + /* + * Check to see if we're advertising a 24bpp image format, + * in which case windows will use it in preference to a 32 bit + * format. + */ + for (f = 0; f < screenInfo.numPixmapFormats; f++) + { + if (screenInfo.formats[f].bitsPerPixel == 24) + { + imagebpp = 24; + break; + } + } + } +#endif +#ifdef FB_SCREEN_PRIVATE + if (imagebpp == 32) + { + fbGetScreenPrivate(pScreen)->win32bpp = bpp; + fbGetScreenPrivate(pScreen)->pix32bpp = bpp; + } + else + { + fbGetScreenPrivate(pScreen)->win32bpp = 32; + fbGetScreenPrivate(pScreen)->pix32bpp = 32; + } +#endif + + if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &depth1, + &defaultVisual, ((unsigned long)1<<(bpp1-1)) | + ((unsigned long)1<<(bpp2-1)), 8)) + return FALSE; + if (! miScreenInit(pScreen, 0, xsize, ysize, dpix, dpiy, 0, + depth1, ndepths, depths, + defaultVisual, nvisuals, visuals)) + return FALSE; + /* MI thinks there's no frame buffer */ +#ifdef MITSHM + ShmRegisterFbFuncs(pScreen); +#endif + pScreen->minInstalledCmaps = 1; + pScreen->maxInstalledCmaps = 2; + + pScrPriv->nlayers = 2; + pScrPriv->PaintKey = fbOverlayPaintKey; + pScrPriv->CopyWindow = fbCopyWindowProc; + pScrPriv->layer[0].u.init.pbits = pbits1; + pScrPriv->layer[0].u.init.width = width1; + pScrPriv->layer[0].u.init.depth = depth1; + + pScrPriv->layer[1].u.init.pbits = pbits2; + pScrPriv->layer[1].u.init.width = width2; + pScrPriv->layer[1].u.init.depth = depth2; + + pScreen->devPrivates[fbOverlayScreenPrivateIndex].ptr = (pointer) pScrPriv; + + /* overwrite miCloseScreen with our own */ + pScreen->CloseScreen = fbOverlayCloseScreen; + pScreen->CreateScreenResources = fbOverlayCreateScreenResources; + pScreen->CreateWindow = fbOverlayCreateWindow; + pScreen->WindowExposures = fbOverlayWindowExposures; + pScreen->CopyWindow = fbOverlayCopyWindow; + pScreen->PaintWindowBorder = fbOverlayPaintWindow; +#ifdef FB_24_32BIT + if (bpp == 24 && imagebpp == 32) + { + pScreen->ModifyPixmapHeader = fb24_32ModifyPixmapHeader; + pScreen->CreateScreenResources = fb24_32OverlayCreateScreenResources; + } +#endif + + return TRUE; +} diff --git a/xorg-server-1.4/fb/fboverlay.h b/xorg-server-1.4/fb/fboverlay.h new file mode 100644 index 0000000..af0acb8 --- /dev/null +++ b/xorg-server-1.4/fb/fboverlay.h @@ -0,0 +1,128 @@ +/* + * + * 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 _FBOVERLAY_H_ +#define _FBOVERLAY_H_ + +extern int fbOverlayGeneration; +extern int fbOverlayScreenPrivateIndex; /* XXX should be static */ +extern int fbOverlayGetScreenPrivateIndex(void); + +#ifndef FB_OVERLAY_MAX +#define FB_OVERLAY_MAX 2 +#endif + +typedef void (*fbOverlayPaintKeyProc) (DrawablePtr, RegionPtr, CARD32, int); + +typedef struct _fbOverlayLayer { + union { + struct { + pointer pbits; + int width; + int depth; + } init; + struct { + PixmapPtr pixmap; + RegionRec region; + } run; + } u; + CARD32 key; /* special pixel value */ +} FbOverlayLayer; + +typedef struct _fbOverlayScrPriv { + int nlayers; + fbOverlayPaintKeyProc PaintKey; + fbCopyProc CopyWindow; + FbOverlayLayer layer[FB_OVERLAY_MAX]; +} FbOverlayScrPrivRec, *FbOverlayScrPrivPtr; + +#define fbOverlayGetScrPriv(s) \ + ((fbOverlayGetScreenPrivateIndex() != -1) ? \ + (s)->devPrivates[fbOverlayGetScreenPrivateIndex()].ptr : NULL) +Bool +fbOverlayCreateWindow(WindowPtr pWin); + +Bool +fbOverlayCloseScreen (int iScreen, ScreenPtr pScreen); + +int +fbOverlayWindowLayer(WindowPtr pWin); + +Bool +fbOverlayCreateScreenResources(ScreenPtr pScreen); + +void +fbOverlayPaintKey (DrawablePtr pDrawable, + RegionPtr pRegion, + CARD32 pixel, + int layer); +void +fbOverlayUpdateLayerRegion (ScreenPtr pScreen, + int layer, + RegionPtr prgn); + + +void +fbOverlayCopyWindow(WindowPtr pWin, + DDXPointRec ptOldOrg, + RegionPtr prgnSrc); + +void +fbOverlayWindowExposures (WindowPtr pWin, + RegionPtr prgn, + RegionPtr other_exposed); + +void +fbOverlayPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what); + + +Bool +fbOverlaySetupScreen(ScreenPtr pScreen, + pointer pbits1, + pointer pbits2, + int xsize, + int ysize, + int dpix, + int dpiy, + int width1, + int width2, + int bpp1, + int bpp2); + +Bool +fbOverlayFinishScreenInit(ScreenPtr pScreen, + pointer pbits1, + pointer pbits2, + int xsize, + int ysize, + int dpix, + int dpiy, + int width1, + int width2, + int bpp1, + int bpp2, + int depth1, + int depth2); + +#endif /* _FBOVERLAY_H_ */ diff --git a/xorg-server-1.4/fb/fbpict.c b/xorg-server-1.4/fb/fbpict.c new file mode 100644 index 0000000..85b5171 --- /dev/null +++ b/xorg-server-1.4/fb/fbpict.c @@ -0,0 +1,471 @@ +/* + * + * Copyright © 2000 SuSE, Inc. + * Copyright © 2007 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 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_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" + +#ifdef RENDER + +#include "picturestr.h" +#include "mipict.h" +#include "fbpict.h" + +#define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b)) + +void +fbWalkCompositeRegion (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height, + Bool srcRepeat, + Bool maskRepeat, + CompositeFunc compositeRect) +{ + RegionRec region; + int n; + BoxPtr pbox; + int w, h, w_this, h_this; + int x_msk, y_msk, x_src, y_src, x_dst, y_dst; + + xDst += pDst->pDrawable->x; + yDst += pDst->pDrawable->y; + if (pSrc->pDrawable) + { + xSrc += pSrc->pDrawable->x; + ySrc += pSrc->pDrawable->y; + } + if (pMask && pMask->pDrawable) + { + xMask += pMask->pDrawable->x; + yMask += pMask->pDrawable->y; + } + + if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst, xSrc, ySrc, + xMask, yMask, xDst, yDst, width, height)) + return; + + n = REGION_NUM_RECTS (®ion); + pbox = REGION_RECTS (®ion); + while (n--) + { + h = pbox->y2 - pbox->y1; + y_src = pbox->y1 - yDst + ySrc; + y_msk = pbox->y1 - yDst + yMask; + y_dst = pbox->y1; + while (h) + { + h_this = h; + w = pbox->x2 - pbox->x1; + x_src = pbox->x1 - xDst + xSrc; + x_msk = pbox->x1 - xDst + xMask; + x_dst = pbox->x1; + if (maskRepeat) + { + y_msk = mod (y_msk - pMask->pDrawable->y, pMask->pDrawable->height); + if (h_this > pMask->pDrawable->height - y_msk) + h_this = pMask->pDrawable->height - y_msk; + y_msk += pMask->pDrawable->y; + } + if (srcRepeat) + { + y_src = mod (y_src - pSrc->pDrawable->y, pSrc->pDrawable->height); + if (h_this > pSrc->pDrawable->height - y_src) + h_this = pSrc->pDrawable->height - y_src; + y_src += pSrc->pDrawable->y; + } + while (w) + { + w_this = w; + if (maskRepeat) + { + x_msk = mod (x_msk - pMask->pDrawable->x, pMask->pDrawable->width); + if (w_this > pMask->pDrawable->width - x_msk) + w_this = pMask->pDrawable->width - x_msk; + x_msk += pMask->pDrawable->x; + } + if (srcRepeat) + { + x_src = mod (x_src - pSrc->pDrawable->x, pSrc->pDrawable->width); + if (w_this > pSrc->pDrawable->width - x_src) + w_this = pSrc->pDrawable->width - x_src; + x_src += pSrc->pDrawable->x; + } + (*compositeRect) (op, pSrc, pMask, pDst, + x_src, y_src, x_msk, y_msk, x_dst, y_dst, + w_this, h_this); + w -= w_this; + x_src += w_this; + x_msk += w_this; + x_dst += w_this; + } + h -= h_this; + y_src += h_this; + y_msk += h_this; + y_dst += h_this; + } + pbox++; + } + REGION_UNINIT (pDst->pDrawable->pScreen, ®ion); +} + +void +fbComposite (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) +{ + pixman_image_t *src, *mask, *dest; + + xDst += pDst->pDrawable->x; + yDst += pDst->pDrawable->y; + if (pSrc->pDrawable) + { + xSrc += pSrc->pDrawable->x; + ySrc += pSrc->pDrawable->y; + } + if (pMask && pMask->pDrawable) + { + xMask += pMask->pDrawable->x; + yMask += pMask->pDrawable->y; + } + + miCompositeSourceValidate (pSrc, xSrc, ySrc, width, height); + if (pMask) + miCompositeSourceValidate (pMask, xMask, yMask, width, height); + + src = image_from_pict (pSrc, TRUE); + mask = image_from_pict (pMask, TRUE); + dest = image_from_pict (pDst, TRUE); + + if (src && dest && !(pMask && !mask)) + { + pixman_image_composite (op, src, mask, dest, + xSrc, ySrc, xMask, yMask, xDst, yDst, + width, height); + } + + free_pixman_pict (pSrc, src); + free_pixman_pict (pMask, mask); + free_pixman_pict (pDst, dest); +} + +void +fbCompositeGeneral (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) +{ + fbComposite (op, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, xDst, yDst, + width, height); +} + +#endif /* RENDER */ + +static pixman_image_t * +create_solid_fill_image (PicturePtr pict) +{ + PictSolidFill *solid = &pict->pSourcePict->solidFill; + pixman_color_t color; + CARD32 a, r, g, b; + + a = (solid->color & 0xff000000) >> 24; + r = (solid->color & 0x00ff0000) >> 16; + g = (solid->color & 0x0000ff00) >> 8; + b = (solid->color & 0x000000ff) >> 0; + + color.alpha = (a << 8) | a; + color.red = (r << 8) | r; + color.green = (g << 8) | g; + color.blue = (b << 8) | b; + + return pixman_image_create_solid_fill (&color); +} + +static pixman_image_t * +create_linear_gradient_image (PictGradient *gradient) +{ + PictLinearGradient *linear = (PictLinearGradient *)gradient; + pixman_point_fixed_t p1; + pixman_point_fixed_t p2; + + p1.x = linear->p1.x; + p1.y = linear->p1.y; + p2.x = linear->p2.x; + p2.y = linear->p2.y; + + return pixman_image_create_linear_gradient ( + &p1, &p2, (pixman_gradient_stop_t *)gradient->stops, gradient->nstops); +} + +static pixman_image_t * +create_radial_gradient_image (PictGradient *gradient) +{ + PictRadialGradient *radial = (PictRadialGradient *)gradient; + pixman_point_fixed_t c1; + pixman_point_fixed_t c2; + + c1.x = radial->c1.x; + c1.y = radial->c1.y; + c2.x = radial->c2.x; + c2.y = radial->c2.y; + + return pixman_image_create_radial_gradient ( + &c1, &c2, radial->c1.radius, + radial->c2.radius, + (pixman_gradient_stop_t *)gradient->stops, gradient->nstops); +} + +static pixman_image_t * +create_conical_gradient_image (PictGradient *gradient) +{ + PictConicalGradient *conical = (PictConicalGradient *)gradient; + pixman_point_fixed_t center; + + center.x = conical->center.x; + center.y = conical->center.y; + + return pixman_image_create_conical_gradient ( + ¢er, conical->angle, (pixman_gradient_stop_t *)gradient->stops, + gradient->nstops); +} + +static pixman_image_t * +create_bits_picture (PicturePtr pict, + Bool has_clip) +{ + FbBits *bits; + FbStride stride; + int bpp, xoff, yoff; + pixman_image_t *image; + + fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff); + + bits = (CARD8*)bits + yoff * stride * sizeof(FbBits) + xoff * (bpp / 8); + + image = pixman_image_create_bits ( + pict->format, + pict->pDrawable->width, pict->pDrawable->height, + (uint32_t *)bits, stride * sizeof (FbStride)); + + +#ifdef FB_ACCESS_WRAPPER +#if FB_SHIFT==5 + + pixman_image_set_accessors (image, + (pixman_read_memory_func_t)wfbReadMemory, + (pixman_write_memory_func_t)wfbWriteMemory); + +#else + +#error The pixman library only works when FbBits is 32 bits wide + +#endif +#endif + + /* pCompositeClip is undefined for source pictures, so + * only set the clip region for pictures with drawables + */ + if (has_clip) + { + if (pict->clientClipType != CT_NONE) + pixman_image_set_has_client_clip (image, TRUE); + + pixman_image_set_clip_region (image, pict->pCompositeClip); + } + + /* Indexed table */ + if (pict->pFormat->index.devPrivate) + pixman_image_set_indexed (image, pict->pFormat->index.devPrivate); + + return image; +} + +static void +set_image_properties (pixman_image_t *image, PicturePtr pict) +{ + pixman_repeat_t repeat; + pixman_filter_t filter; + + if (pict->transform) + { + pixman_image_set_transform ( + image, (pixman_transform_t *)pict->transform); + } + + switch (pict->repeatType) + { + default: + case RepeatNone: + repeat = PIXMAN_REPEAT_NONE; + break; + + case RepeatPad: + repeat = PIXMAN_REPEAT_PAD; + break; + + case RepeatNormal: + repeat = PIXMAN_REPEAT_NORMAL; + break; + + case RepeatReflect: + repeat = PIXMAN_REPEAT_REFLECT; + break; + } + + pixman_image_set_repeat (image, repeat); + + if (pict->alphaMap) + { + pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, TRUE); + + pixman_image_set_alpha_map ( + image, alpha_map, pict->alphaOrigin.x, pict->alphaOrigin.y); + + free_pixman_pict (pict->alphaMap, alpha_map); + } + + pixman_image_set_component_alpha (image, pict->componentAlpha); + + switch (pict->filter) + { + default: + case PictFilterNearest: + case PictFilterFast: + filter = PIXMAN_FILTER_NEAREST; + break; + + case PictFilterBilinear: + case PictFilterGood: + filter = PIXMAN_FILTER_BILINEAR; + break; + + case PictFilterConvolution: + filter = PIXMAN_FILTER_CONVOLUTION; + break; + } + + pixman_image_set_filter (image, filter, (pixman_fixed_t *)pict->filter_params, pict->filter_nparams); + pixman_image_set_source_clipping (image, TRUE); +} + +pixman_image_t * +image_from_pict (PicturePtr pict, + Bool has_clip) +{ + pixman_image_t *image = NULL; + + if (!pict) + return NULL; + + if (pict->pDrawable) + { + image = create_bits_picture (pict, has_clip); + } + else if (pict->pSourcePict) + { + SourcePict *sp = pict->pSourcePict; + + if (sp->type == SourcePictTypeSolidFill) + { + image = create_solid_fill_image (pict); + } + else + { + PictGradient *gradient = &pict->pSourcePict->gradient; + + if (sp->type == SourcePictTypeLinear) + image = create_linear_gradient_image (gradient); + else if (sp->type == SourcePictTypeRadial) + image = create_radial_gradient_image (gradient); + else if (sp->type == SourcePictTypeConical) + image = create_conical_gradient_image (gradient); + } + } + + if (image) + set_image_properties (image, pict); + + return image; +} + +void +free_pixman_pict (PicturePtr pict, pixman_image_t *image) +{ + if (image && pixman_image_unref (image) && pict->pDrawable) + fbFinishAccess (pict->pDrawable); +} + +Bool +fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) +{ + +#ifdef RENDER + + PictureScreenPtr ps; + + if (!miPictureInit (pScreen, formats, nformats)) + return FALSE; + ps = GetPictureScreen(pScreen); + ps->Composite = fbComposite; + ps->Glyphs = miGlyphs; + ps->CompositeRects = miCompositeRects; + ps->RasterizeTrapezoid = fbRasterizeTrapezoid; + ps->AddTraps = fbAddTraps; + ps->AddTriangles = fbAddTriangles; + +#endif /* RENDER */ + + return TRUE; +} diff --git a/xorg-server-1.4/fb/fbpict.h b/xorg-server-1.4/fb/fbpict.h new file mode 100644 index 0000000..b4c1dcf --- /dev/null +++ b/xorg-server-1.4/fb/fbpict.h @@ -0,0 +1,482 @@ +/* + * + * Copyright © 2000 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_DIX_CONFIG_H +#include +#endif + +#ifndef _FBPICT_H_ +#define _FBPICT_H_ + +#include "renderedge.h" + + +#if defined(__GNUC__) +#define INLINE __inline__ +#else +#define INLINE +#endif + +#define FbIntMult(a,b,t) ( (t) = (a) * (b) + 0x80, ( ( ( (t)>>8 ) + (t) )>>8 ) ) +#define FbIntDiv(a,b) (((CARD16) (a) * 255) / (b)) + +#define FbGet8(v,i) ((CARD16) (CARD8) ((v) >> i)) + +/* + * There are two ways of handling alpha -- either as a single unified value or + * a separate value for each component, hence each macro must have two + * versions. The unified alpha version has a 'U' at the end of the name, + * the component version has a 'C'. Similarly, functions which deal with + * this difference will have two versions using the same convention. + */ + +#define FbOverU(x,y,i,a,t) ((t) = FbIntMult(FbGet8(y,i),(a),(t)) + FbGet8(x,i),\ + (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i)) + +#define FbOverC(x,y,i,a,t) ((t) = FbIntMult(FbGet8(y,i),FbGet8(a,i),(t)) + FbGet8(x,i),\ + (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i)) + +#define FbInU(x,i,a,t) ((CARD32) FbIntMult(FbGet8(x,i),(a),(t)) << (i)) + +#define FbInC(x,i,a,t) ((CARD32) FbIntMult(FbGet8(x,i),FbGet8(a,i),(t)) << (i)) + +#define FbGen(x,y,i,ax,ay,t,u,v) ((t) = (FbIntMult(FbGet8(y,i),ay,(u)) + \ + FbIntMult(FbGet8(x,i),ax,(v))),\ + (CARD32) ((CARD8) ((t) | \ + (0 - ((t) >> 8)))) << (i)) + +#define FbAdd(x,y,i,t) ((t) = FbGet8(x,i) + FbGet8(y,i), \ + (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i)) + + +#define Alpha(x) ((x) >> 24) +#define Red(x) (((x) >> 16) & 0xff) +#define Green(x) (((x) >> 8) & 0xff) +#define Blue(x) ((x) & 0xff) + +/** + * Returns TRUE if the fbComposeGetSolid can be used to get a single solid + * color representing every source sampling location of the picture. + */ +static INLINE Bool +fbCanGetSolid(PicturePtr pict) +{ + if (pict->pDrawable == NULL || + pict->pDrawable->width != 1 || + pict->pDrawable->height != 1) + { + return FALSE; + } + if (pict->repeat != RepeatNormal) + return FALSE; + + switch (pict->format) { + case PICT_a8r8g8b8: + case PICT_x8r8g8b8: + case PICT_a8b8g8r8: + case PICT_x8b8g8r8: + case PICT_r8g8b8: + case PICT_b8g8r8: + case PICT_r5g6b5: + case PICT_b5g6r5: + return TRUE; + default: + return FALSE; + } +} + +#define fbComposeGetSolid(pict, bits, fmt) { \ + FbBits *__bits__; \ + FbStride __stride__; \ + int __bpp__; \ + int __xoff__,__yoff__; \ +\ + fbGetDrawable((pict)->pDrawable,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \ + switch (__bpp__) { \ + case 32: \ + (bits) = READ((CARD32 *) __bits__); \ + break; \ + case 24: \ + (bits) = Fetch24 ((CARD8 *) __bits__); \ + break; \ + case 16: \ + (bits) = READ((CARD16 *) __bits__); \ + (bits) = cvt0565to0888(bits); \ + break; \ + case 8: \ + (bits) = READ((CARD8 *) __bits__); \ + (bits) = (bits) << 24; \ + break; \ + case 1: \ + (bits) = READ((CARD32 *) __bits__); \ + (bits) = FbLeftStipBits((bits),1) ? 0xff000000 : 0x00000000;\ + break; \ + default: \ + return; \ + } \ + /* If necessary, convert RGB <--> BGR. */ \ + if (PICT_FORMAT_TYPE((pict)->format) != PICT_FORMAT_TYPE(fmt)) \ + { \ + (bits) = (((bits) & 0xff000000) | \ + (((bits) & 0x00ff0000) >> 16) | \ + (((bits) & 0x0000ff00) >> 0) | \ + (((bits) & 0x000000ff) << 16)); \ + } \ + /* manage missing src alpha */ \ + if ((pict)->pFormat->direct.alphaMask == 0) \ + (bits) |= 0xff000000; \ + fbFinishAccess ((pict)->pDrawable); \ +} + +#define fbComposeGetStart(pict,x,y,type,stride,line,mul) {\ + FbBits *__bits__; \ + FbStride __stride__; \ + int __bpp__; \ + int __xoff__,__yoff__; \ +\ + fbGetDrawable((pict)->pDrawable,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \ + (stride) = __stride__ * sizeof (FbBits) / sizeof (type); \ + (line) = ((type *) __bits__) + (stride) * ((y) + __yoff__) + (mul) * ((x) + __xoff__); \ +} +#define cvt8888to0565(s) ((((s) >> 3) & 0x001f) | \ + (((s) >> 5) & 0x07e0) | \ + (((s) >> 8) & 0xf800)) +#define cvt0565to0888(s) (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) | \ + ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \ + ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000))) + +#if IMAGE_BYTE_ORDER == MSBFirst +#define Fetch24(a) ((unsigned long) (a) & 1 ? \ + ((READ(a) << 16) | READ((CARD16 *) ((a)+1))) : \ + ((READ((CARD16 *) (a)) << 8) | READ((a)+2))) +#define Store24(a,v) ((unsigned long) (a) & 1 ? \ + (WRITE(a, (CARD8) ((v) >> 16)), \ + WRITE((CARD16 *) ((a)+1), (CARD16) (v))) : \ + (WRITE((CARD16 *) (a), (CARD16) ((v) >> 8)), \ + WRITE((a)+2, (CARD8) (v)))) +#else +#define Fetch24(a) ((unsigned long) (a) & 1 ? \ + (READ(a) | (READ((CARD16 *) ((a)+1)) << 8)) : \ + (READ((CARD16 *) (a)) | (READ((a)+2) << 16))) +#define Store24(a,v) ((unsigned long) (a) & 1 ? \ + (WRITE(a, (CARD8) (v)), \ + WRITE((CARD16 *) ((a)+1), (CARD16) ((v) >> 8))) : \ + (WRITE((CARD16 *) (a), (CARD16) (v)),\ + WRITE((a)+2, (CARD8) ((v) >> 16)))) +#endif + +/* + The methods below use some tricks to be able to do two color + components at the same time. +*/ + +/* + x_c = (x_c * a) / 255 +*/ +#define FbByteMul(x, a) do { \ + CARD32 t = ((x & 0xff00ff) * a) + 0x800080; \ + t = (t + ((t >> 8) & 0xff00ff)) >> 8; \ + t &= 0xff00ff; \ + \ + x = (((x >> 8) & 0xff00ff) * a) + 0x800080; \ + x = (x + ((x >> 8) & 0xff00ff)); \ + x &= 0xff00ff00; \ + x += t; \ + } while (0) + +/* + x_c = (x_c * a) / 255 + y +*/ +#define FbByteMulAdd(x, a, y) do { \ + CARD32 t = ((x & 0xff00ff) * a) + 0x800080; \ + t = (t + ((t >> 8) & 0xff00ff)) >> 8; \ + t &= 0xff00ff; \ + t += y & 0xff00ff; \ + t |= 0x1000100 - ((t >> 8) & 0xff00ff); \ + t &= 0xff00ff; \ + \ + x = (((x >> 8) & 0xff00ff) * a) + 0x800080; \ + x = (x + ((x >> 8) & 0xff00ff)) >> 8; \ + x &= 0xff00ff; \ + x += (y >> 8) & 0xff00ff; \ + x |= 0x1000100 - ((x >> 8) & 0xff00ff); \ + x &= 0xff00ff; \ + x <<= 8; \ + x += t; \ + } while (0) + +/* + x_c = (x_c * a + y_c * b) / 255 +*/ +#define FbByteAddMul(x, a, y, b) do { \ + CARD32 t; \ + CARD32 r = (x >> 24) * a + (y >> 24) * b + 0x80; \ + r += (r >> 8); \ + r >>= 8; \ + \ + t = (x & 0xff00) * a + (y & 0xff00) * b; \ + t += (t >> 8) + 0x8000; \ + t >>= 16; \ + \ + t |= r << 16; \ + t |= 0x1000100 - ((t >> 8) & 0xff00ff); \ + t &= 0xff00ff; \ + t <<= 8; \ + \ + r = ((x >> 16) & 0xff) * a + ((y >> 16) & 0xff) * b + 0x80; \ + r += (r >> 8); \ + r >>= 8; \ + \ + x = (x & 0xff) * a + (y & 0xff) * b + 0x80; \ + x += (x >> 8); \ + x >>= 8; \ + x |= r << 16; \ + x |= 0x1000100 - ((x >> 8) & 0xff00ff); \ + x &= 0xff00ff; \ + x |= t; \ +} while (0) + +/* + x_c = (x_c * a + y_c *b) / 256 +*/ +#define FbByteAddMul_256(x, a, y, b) do { \ + CARD32 t = (x & 0xff00ff) * a + (y & 0xff00ff) * b; \ + t >>= 8; \ + t &= 0xff00ff; \ + \ + x = ((x >> 8) & 0xff00ff) * a + ((y >> 8) & 0xff00ff) * b; \ + x &= 0xff00ff00; \ + x += t; \ +} while (0) +/* + x_c = (x_c * a_c) / 255 +*/ +#define FbByteMulC(x, a) do { \ + CARD32 t; \ + CARD32 r = (x & 0xff) * (a & 0xff); \ + r |= (x & 0xff0000) * ((a >> 16) & 0xff); \ + r += 0x800080; \ + r = (r + ((r >> 8) & 0xff00ff)) >> 8; \ + r &= 0xff00ff; \ + \ + x >>= 8; \ + t = (x & 0xff) * ((a >> 8) & 0xff); \ + t |= (x & 0xff0000) * (a >> 24); \ + t += 0x800080; \ + t = t + ((t >> 8) & 0xff00ff); \ + x = r | (t & 0xff00ff00); \ + \ + } while (0) + +/* + x_c = (x_c * a) / 255 + y +*/ +#define FbByteMulAddC(x, a, y) do { \ + CARD32 t; \ + CARD32 r = (x & 0xff) * (a & 0xff); \ + r |= (x & 0xff0000) * ((a >> 16) & 0xff); \ + r += 0x800080; \ + r = (r + ((r >> 8) & 0xff00ff)) >> 8; \ + r &= 0xff00ff; \ + r += y & 0xff00ff; \ + r |= 0x1000100 - ((r >> 8) & 0xff00ff); \ + r &= 0xff00ff; \ + \ + x >>= 8; \ + t = (x & 0xff) * ((a >> 8) & 0xff); \ + t |= (x & 0xff0000) * (a >> 24); \ + t += 0x800080; \ + t = (t + ((t >> 8) & 0xff00ff)) >> 8; \ + t &= 0xff00ff; \ + t += (y >> 8) & 0xff00ff; \ + t |= 0x1000100 - ((t >> 8) & 0xff00ff); \ + t &= 0xff00ff; \ + x = r | (t << 8); \ + } while (0) + +/* + x_c = (x_c * a_c + y_c * b) / 255 +*/ +#define FbByteAddMulC(x, a, y, b) do { \ + CARD32 t; \ + CARD32 r = (x >> 24) * (a >> 24) + (y >> 24) * b; \ + r += (r >> 8) + 0x80; \ + r >>= 8; \ + \ + t = (x & 0xff00) * ((a >> 8) & 0xff) + (y & 0xff00) * b; \ + t += (t >> 8) + 0x8000; \ + t >>= 16; \ + \ + t |= r << 16; \ + t |= 0x1000100 - ((t >> 8) & 0xff00ff); \ + t &= 0xff00ff; \ + t <<= 8; \ + \ + r = ((x >> 16) & 0xff) * ((a >> 16) & 0xff) + ((y >> 16) & 0xff) * b + 0x80; \ + r += (r >> 8); \ + r >>= 8; \ + \ + x = (x & 0xff) * (a & 0xff) + (y & 0xff) * b + 0x80; \ + x += (x >> 8); \ + x >>= 8; \ + x |= r << 16; \ + x |= 0x1000100 - ((x >> 8) & 0xff00ff); \ + x &= 0xff00ff; \ + x |= t; \ + } while (0) + +/* + x_c = min(x_c + y_c, 255) +*/ +#define FbByteAdd(x, y) do { \ + CARD32 t; \ + CARD32 r = (x & 0xff00ff) + (y & 0xff00ff); \ + r |= 0x1000100 - ((r >> 8) & 0xff00ff); \ + r &= 0xff00ff; \ + \ + t = ((x >> 8) & 0xff00ff) + ((y >> 8) & 0xff00ff); \ + t |= 0x1000100 - ((t >> 8) & 0xff00ff); \ + r |= (t & 0xff00ff) << 8; \ + x = r; \ + } while (0) + +#define div_255(x) (((x) + 0x80 + (((x) + 0x80) >> 8)) >> 8) + +#if defined(__i386__) && defined(__GNUC__) +#define FASTCALL __attribute__((regparm(3))) +#else +#define FASTCALL +#endif + +typedef struct _FbComposeData { + CARD8 op; + PicturePtr src; + PicturePtr mask; + PicturePtr dest; + INT16 xSrc; + INT16 ySrc; + INT16 xMask; + INT16 yMask; + INT16 xDest; + INT16 yDest; + CARD16 width; + CARD16 height; +} FbComposeData; + +void +fbCompositeRect (const FbComposeData *data, CARD32 *scanline_buffer); + +typedef FASTCALL void (*CombineMaskU) (CARD32 *src, const CARD32 *mask, int width); +typedef FASTCALL void (*CombineFuncU) (CARD32 *dest, const CARD32 *src, int width); +typedef FASTCALL void (*CombineFuncC) (CARD32 *dest, CARD32 *src, CARD32 *mask, int width); + +typedef struct _FbComposeFunctions { + CombineFuncU *combineU; + CombineFuncC *combineC; + CombineMaskU combineMaskU; +} FbComposeFunctions; + +/* fbcompose.c */ + +void +fbCompositeGeneral (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height); + +/* fbpict.c */ +void +fbComposite (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height); + +typedef void (*CompositeFunc) (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height); + +void +fbWalkCompositeRegion (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height, + Bool srcRepeat, + Bool maskRepeat, + CompositeFunc compositeRect); + +/* fbtrap.c */ + +void +fbAddTraps (PicturePtr pPicture, + INT16 xOff, + INT16 yOff, + int ntrap, + xTrap *traps); + +void +fbRasterizeTrapezoid (PicturePtr alpha, + xTrapezoid *trap, + int x_off, + int y_off); + +void +fbAddTriangles (PicturePtr pPicture, + INT16 xOff, + INT16 yOff, + int ntri, + xTriangle *tris); + +#endif /* _FBPICT_H_ */ diff --git a/xorg-server-1.4/fb/fbpixmap.c b/xorg-server-1.4/fb/fbpixmap.c new file mode 100644 index 0000000..88f693e --- /dev/null +++ b/xorg-server-1.4/fb/fbpixmap.c @@ -0,0 +1,387 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" + +PixmapPtr +fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp) +{ + PixmapPtr pPixmap; + size_t datasize; + size_t paddedWidth; + int adjust; + int base; + + paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (FbBits); + if (paddedWidth / 4 > 32767 || height > 32767) + return NullPixmap; + datasize = height * paddedWidth; + base = pScreen->totalPixmapSize; + adjust = 0; + if (base & 7) + adjust = 8 - (base & 7); + datasize += adjust; +#ifdef FB_DEBUG + datasize += 2 * paddedWidth; +#endif + pPixmap = AllocatePixmap(pScreen, datasize); + if (!pPixmap) + return NullPixmap; + pPixmap->drawable.type = DRAWABLE_PIXMAP; + pPixmap->drawable.class = 0; + pPixmap->drawable.pScreen = pScreen; + pPixmap->drawable.depth = depth; + pPixmap->drawable.bitsPerPixel = bpp; + pPixmap->drawable.id = 0; + pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + pPixmap->drawable.x = 0; + pPixmap->drawable.y = 0; + pPixmap->drawable.width = width; + pPixmap->drawable.height = height; + pPixmap->devKind = paddedWidth; + pPixmap->refcnt = 1; + pPixmap->devPrivate.ptr = (pointer) ((char *)pPixmap + base + adjust); +#ifdef FB_DEBUG + pPixmap->devPrivate.ptr = (void *) ((char *) pPixmap->devPrivate.ptr + paddedWidth); + fbInitializeDrawable (&pPixmap->drawable); +#endif + +#ifdef COMPOSITE + pPixmap->screen_x = 0; + pPixmap->screen_y = 0; +#endif + + return pPixmap; +} + +PixmapPtr +fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth) +{ + int bpp; + bpp = BitsPerPixel (depth); +#ifdef FB_SCREEN_PRIVATE + if (bpp == 32 && depth <= 24) + bpp = fbGetScreenPrivate(pScreen)->pix32bpp; +#endif + return fbCreatePixmapBpp (pScreen, width, height, depth, bpp); +} + +Bool +fbDestroyPixmap (PixmapPtr pPixmap) +{ + if(--pPixmap->refcnt) + return TRUE; + xfree(pPixmap); + return TRUE; +} + +#define ADDRECT(reg,r,fr,rx1,ry1,rx2,ry2) \ +if (((rx1) < (rx2)) && ((ry1) < (ry2)) && \ + (!((reg)->data->numRects && \ + ((r-1)->y1 == (ry1)) && \ + ((r-1)->y2 == (ry2)) && \ + ((r-1)->x1 <= (rx1)) && \ + ((r-1)->x2 >= (rx2))))) \ +{ \ + if ((reg)->data->numRects == (reg)->data->size) \ + { \ + miRectAlloc(reg, 1); \ + fr = REGION_BOXPTR(reg); \ + r = fr + (reg)->data->numRects; \ + } \ + r->x1 = (rx1); \ + r->y1 = (ry1); \ + r->x2 = (rx2); \ + r->y2 = (ry2); \ + (reg)->data->numRects++; \ + if(r->x1 < (reg)->extents.x1) \ + (reg)->extents.x1 = r->x1; \ + if(r->x2 > (reg)->extents.x2) \ + (reg)->extents.x2 = r->x2; \ + r++; \ +} + +/* Convert bitmap clip mask into clipping region. + * First, goes through each line and makes boxes by noting the transitions + * from 0 to 1 and 1 to 0. + * Then it coalesces the current line with the previous if they have boxes + * at the same X coordinates. + */ +RegionPtr +fbPixmapToRegion(PixmapPtr pPix) +{ + register RegionPtr pReg; + FbBits *pw, w; + register int ib; + int width, h, base, rx1 = 0, crects; + FbBits *pwLineEnd; + int irectPrevStart, irectLineStart; + register BoxPtr prectO, prectN; + BoxPtr FirstRect, rects, prectLineStart; + Bool fInBox, fSame; + register FbBits mask0 = FB_ALLONES & ~FbScrRight(FB_ALLONES, 1); + FbBits *pwLine; + int nWidth; + + pReg = REGION_CREATE(pPix->drawable.pScreen, NULL, 1); + if(!pReg) + return NullRegion; + FirstRect = REGION_BOXPTR(pReg); + rects = FirstRect; + + fbPrepareAccess(&pPix->drawable); + + pwLine = (FbBits *) pPix->devPrivate.ptr; + nWidth = pPix->devKind >> (FB_SHIFT-3); + + width = pPix->drawable.width; + pReg->extents.x1 = width - 1; + pReg->extents.x2 = 0; + irectPrevStart = -1; + for(h = 0; h < pPix->drawable.height; h++) + { + pw = pwLine; + pwLine += nWidth; + irectLineStart = rects - FirstRect; + /* If the Screen left most bit of the word is set, we're starting in + * a box */ + if(READ(pw) & mask0) + { + fInBox = TRUE; + rx1 = 0; + } + else + fInBox = FALSE; + /* Process all words which are fully in the pixmap */ + pwLineEnd = pw + (width >> FB_SHIFT); + for (base = 0; pw < pwLineEnd; base += FB_UNIT) + { + w = READ(pw++); + if (fInBox) + { + if (!~w) + continue; + } + else + { + if (!w) + continue; + } + for(ib = 0; ib < FB_UNIT; ib++) + { + /* If the Screen left most bit of the word is set, we're + * starting a box */ + if(w & mask0) + { + if(!fInBox) + { + rx1 = base + ib; + /* start new box */ + fInBox = TRUE; + } + } + else + { + if(fInBox) + { + /* end box */ + ADDRECT(pReg, rects, FirstRect, + rx1, h, base + ib, h + 1); + fInBox = FALSE; + } + } + /* Shift the word VISUALLY left one. */ + w = FbScrLeft(w, 1); + } + } + if(width & FB_MASK) + { + /* Process final partial word on line */ + w = READ(pw++); + for(ib = 0; ib < (width & FB_MASK); ib++) + { + /* If the Screen left most bit of the word is set, we're + * starting a box */ + if(w & mask0) + { + if(!fInBox) + { + rx1 = base + ib; + /* start new box */ + fInBox = TRUE; + } + } + else + { + if(fInBox) + { + /* end box */ + ADDRECT(pReg, rects, FirstRect, + rx1, h, base + ib, h + 1); + fInBox = FALSE; + } + } + /* Shift the word VISUALLY left one. */ + w = FbScrLeft(w, 1); + } + } + /* If scanline ended with last bit set, end the box */ + if(fInBox) + { + ADDRECT(pReg, rects, FirstRect, + rx1, h, base + (width & FB_MASK), h + 1); + } + /* if all rectangles on this line have the same x-coords as + * those on the previous line, then add 1 to all the previous y2s and + * throw away all the rectangles from this line + */ + fSame = FALSE; + if(irectPrevStart != -1) + { + crects = irectLineStart - irectPrevStart; + if(crects == ((rects - FirstRect) - irectLineStart)) + { + prectO = FirstRect + irectPrevStart; + prectN = prectLineStart = FirstRect + irectLineStart; + fSame = TRUE; + while(prectO < prectLineStart) + { + if((prectO->x1 != prectN->x1) || (prectO->x2 != prectN->x2)) + { + fSame = FALSE; + break; + } + prectO++; + prectN++; + } + if (fSame) + { + prectO = FirstRect + irectPrevStart; + while(prectO < prectLineStart) + { + prectO->y2 += 1; + prectO++; + } + rects -= crects; + pReg->data->numRects -= crects; + } + } + } + if(!fSame) + irectPrevStart = irectLineStart; + } + if (!pReg->data->numRects) + pReg->extents.x1 = pReg->extents.x2 = 0; + else + { + pReg->extents.y1 = REGION_BOXPTR(pReg)->y1; + pReg->extents.y2 = REGION_END(pReg)->y2; + if (pReg->data->numRects == 1) + { + xfree(pReg->data); + pReg->data = (RegDataPtr)NULL; + } + } + + fbFinishAccess(&pPix->drawable); +#ifdef DEBUG + if (!miValidRegion(pReg)) + FatalError("Assertion failed file %s, line %d: expr\n", __FILE__, __LINE__); +#endif + return(pReg); +} + +#ifdef FB_DEBUG + +#ifndef WIN32 +#include +#else +#include +#endif + +static Bool +fbValidateBits (FbStip *bits, int stride, FbStip data) +{ + while (stride--) + { + if (*bits != data) + { +#ifdef WIN32 + NCD_DEBUG ((DEBUG_FAILURE, "fdValidateBits failed at 0x%x (is 0x%x want 0x%x)", + bits, *bits, data)); +#else + fprintf (stderr, "fbValidateBits failed\n"); +#endif + return FALSE; + } + bits++; + } +} + +void +fbValidateDrawable (DrawablePtr pDrawable) +{ + FbStip *bits, *first, *last; + int stride, bpp; + int xoff, yoff; + int height; + Bool failed; + + if (pDrawable->type != DRAWABLE_PIXMAP) + pDrawable = (DrawablePtr) fbGetWindowPixmap(pDrawable); + fbGetStipDrawable(pDrawable, bits, stride, bpp, xoff, yoff); + first = bits - stride; + last = bits + stride * pDrawable->height; + if (!fbValidateBits (first, stride, FB_HEAD_BITS) || + !fbValidateBits (last, stride, FB_TAIL_BITS)) + fbInitializeDrawable(pDrawable); + fbFinishAccess (pDrawable); +} + +void +fbSetBits (FbStip *bits, int stride, FbStip data) +{ + while (stride--) + *bits++ = data; +} + +void +fbInitializeDrawable (DrawablePtr pDrawable) +{ + FbStip *bits, *first, *last; + int stride, bpp; + int xoff, yoff; + + fbGetStipDrawable(pDrawable, bits, stride, bpp, xoff, yoff); + first = bits - stride; + last = bits + stride * pDrawable->height; + fbSetBits (first, stride, FB_HEAD_BITS); + fbSetBits (last, stride, FB_TAIL_BITS); + fbFinishAccess (pDrawable); +} +#endif /* FB_DEBUG */ diff --git a/xorg-server-1.4/fb/fbpoint.c b/xorg-server-1.4/fb/fbpoint.c new file mode 100644 index 0000000..c0ea8ba --- /dev/null +++ b/xorg-server-1.4/fb/fbpoint.c @@ -0,0 +1,162 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +typedef void (*FbDots) (FbBits *dst, + FbStride dstStride, + int dstBpp, + BoxPtr pBox, + xPoint *pts, + int npt, + int xorg, + int yorg, + int xoff, + int yoff, + FbBits and, + FbBits xor); + +void +fbDots (FbBits *dstOrig, + FbStride dstStride, + int dstBpp, + BoxPtr pBox, + xPoint *pts, + int npt, + int xorg, + int yorg, + int xoff, + int yoff, + FbBits andOrig, + FbBits xorOrig) +{ + FbStip *dst = (FbStip *) dstOrig; + int x1, y1, x2, y2; + int x, y; + FbStip *d; + FbStip and = andOrig; + FbStip xor = xorOrig; + + dstStride = FbBitsStrideToStipStride (dstStride); + x1 = pBox->x1; + y1 = pBox->y1; + x2 = pBox->x2; + y2 = pBox->y2; + while (npt--) + { + x = pts->x + xorg; + y = pts->y + yorg; + pts++; + if (x1 <= x && x < x2 && y1 <= y && y < y2) + { + x = (x + xoff) * dstBpp; + d = dst + ((y + yoff) * dstStride) + (x >> FB_STIP_SHIFT); + x &= FB_STIP_MASK; +#ifdef FB_24BIT + if (dstBpp == 24) + { + FbStip leftMask, rightMask; + int n, rot; + FbStip andT, xorT; + + rot = FbFirst24Rot (x); + andT = FbRot24Stip(and,rot); + xorT = FbRot24Stip(xor,rot); + FbMaskStip (x, 24, leftMask, n, rightMask); + if (leftMask) + { + WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask)); + andT = FbNext24Stip(andT); + xorT = FbNext24Stip(xorT); + d++; + } + if (rightMask) + WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, rightMask)); + } + else +#endif + { + FbStip mask; + mask = FbStipMask(x, dstBpp); + WRITE(d, FbDoMaskRRop (READ(d), and, xor, mask)); + } + } + } +} + +void +fbPolyPoint (DrawablePtr pDrawable, + GCPtr pGC, + int mode, + int nptInit, + xPoint *pptInit) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); + RegionPtr pClip = fbGetCompositeClip(pGC); + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbDots dots; + FbBits and, xor; + xPoint *ppt; + int npt; + BoxPtr pBox; + int nBox; + + /* make pointlist origin relative */ + ppt = pptInit; + npt = nptInit; + if (mode == CoordModePrevious) + { + npt--; + while(npt--) + { + ppt++; + ppt->x += (ppt-1)->x; + ppt->y += (ppt-1)->y; + } + } + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + and = pPriv->and; + xor = pPriv->xor; + dots = fbDots; +#ifndef FBNOPIXADDR + switch (dstBpp) { + case 8: dots = fbDots8; break; + case 16: dots = fbDots16; break; +#ifdef FB_24BIT + case 24: dots = fbDots24; break; +#endif + case 32: dots = fbDots32; break; + } +#endif + for (nBox = REGION_NUM_RECTS (pClip), pBox = REGION_RECTS (pClip); + nBox--; pBox++) + (*dots) (dst, dstStride, dstBpp, pBox, pptInit, nptInit, + pDrawable->x, pDrawable->y, dstXoff, dstYoff, and, xor); + fbFinishAccess (pDrawable); +} diff --git a/xorg-server-1.4/fb/fbpseudocolor.c b/xorg-server-1.4/fb/fbpseudocolor.c new file mode 100644 index 0000000..271e981 --- /dev/null +++ b/xorg-server-1.4/fb/fbpseudocolor.c @@ -0,0 +1,2338 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include +#include "scrnintstr.h" +#include "colormapst.h" +#include "glyphstr.h" +#include "resource.h" +#include +#include "dixfontstr.h" +#include +#include "micmap.h" +#include "fb.h" +#include "fbpseudocolor.h" + +static Bool xxCreateGC(GCPtr pGC); +static void xxValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDraw); +static void xxDestroyGC(GCPtr pGC); +static void xxChangeGC (GCPtr pGC, unsigned long mask); +static void xxCopyGC (GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); +static void xxChangeClip (GCPtr pGC, int type, pointer pvalue, int nrects); + +static void xxCopyClip(GCPtr pgcDst, GCPtr pgcSrc); +static void xxDestroyClip(GCPtr pGC); +static void xxFillSpans(DrawablePtr pDraw, GC *pGC, int nInit, + DDXPointPtr pptInit, int *pwidthInit, int fSorted); +static void xxSetSpans(DrawablePtr pDraw, GCPtr pGC, char *pcharsrc, + DDXPointPtr pptInit, int *pwidthInit, int nspans, + int fSorted); +static void xxPutImage(DrawablePtr pDraw, GCPtr pGC, int depth, int x, int y, + int w, int h,int leftPad, int format, char *pImage); +static RegionPtr xxCopyPlane(DrawablePtr pSrc, + DrawablePtr pDst, GCPtr pGC,int srcx, int srcy, + int width, int height, int dstx, int dsty, + unsigned long bitPlane); +static void xxPolyPoint(DrawablePtr pDraw, GCPtr pGC, int mode, int npt, + xPoint *pptInit); +static void xxPolylines(DrawablePtr pDraw, GCPtr pGC, int mode, + int npt, DDXPointPtr pptInit); +static void xxPolySegment(DrawablePtr pDraw, GCPtr pGC, int nseg, + xSegment *pSeg); +static void xxPolyRectangle(DrawablePtr pDraw, GCPtr pGC, int nRects, + xRectangle *pRects); +static void xxPolyArc( DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs); +static void xxFillPolygon(DrawablePtr pDraw, GCPtr pGC, int shape, + int mode, int count, DDXPointPtr pptInit); +static void xxPolyFillRect(DrawablePtr pDraw, GCPtr pGC, int nRectsInit, + xRectangle *pRectsInit); +static RegionPtr xxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GC *pGC, + int srcx, int srcy, int width, int height, + int dstx, int dsty); +static void xxPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs, + xArc *parcs); +static int xxPolyText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, + char *chars); +static int xxPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, + int count, unsigned short *chars); +static void xxImageText8(DrawablePtr pDraw, GCPtr pGC, int x, + int y, int count, char *chars); +static void xxImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, + int count, unsigned short *chars); +static void xxImageGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int x, int y, + unsigned int nglyph, CharInfoPtr *ppci, + pointer pglyphBase); +static void xxPolyGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int x, int y, + unsigned int nglyph, CharInfoPtr *ppci, + pointer pglyphBase); +static void xxPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDraw, + int dx, int dy, int xOrg, int yOrg); +static void +xxComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, + INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, + INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); +static void +xxGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, + GlyphListPtr list, GlyphPtr *glyphs); + + +typedef struct _xxCmapPrivRec { + CARD32* cmap; + ColormapPtr pmap; + Bool dirty; + struct _xxCmapPrivRec *next; +} xxCmapPrivRec, *xxCmapPrivPtr; + + +typedef struct { + CloseScreenProcPtr CloseScreen; + CreateScreenResourcesProcPtr CreateScreenResources; + CreateWindowProcPtr CreateWindow; + CopyWindowProcPtr CopyWindow; + PaintWindowProcPtr PaintWindowBackground; + PaintWindowProcPtr PaintWindowBorder; + WindowExposuresProcPtr WindowExposures; + CreateGCProcPtr CreateGC; + CreateColormapProcPtr CreateColormap; + DestroyColormapProcPtr DestroyColormap; + InstallColormapProcPtr InstallColormap; + UninstallColormapProcPtr UninstallColormap; + ListInstalledColormapsProcPtr ListInstalledColormaps; + StoreColorsProcPtr StoreColors; +#ifdef RENDER + CompositeProcPtr Composite; + GlyphsProcPtr Glyphs; +#endif + PixmapPtr pPixmap; + char * addr; + pointer pBits; + RegionRec region; + VisualPtr bVisual; + RegionRec bRegion; + int myDepth; + int depth; + ColormapPtr baseCmap; + ColormapPtr* InstalledCmaps; + xxCmapPrivPtr Cmaps; + int numInstalledColormaps; + int colormapDirty; + xxSyncFunc sync; +} xxScrPrivRec, *xxScrPrivPtr; + +#define xxGetScrPriv(s) ((xxScrPrivPtr) \ + (xxScrPrivateIndex != -1) \ + ? (s)->devPrivates[xxScrPrivateIndex].ptr\ + : NULL) +#define xxScrPriv(s) xxScrPrivPtr pScrPriv = xxGetScrPriv(s) + +#define xxGetCmapPriv(s) ((xxCmapPrivPtr) \ + (s)->devPrivates[xxColormapPrivateIndex].ptr) +#define xxCmapPriv(s) xxCmapPrivPtr pCmapPriv = xxGetCmapPriv(s); + +typedef struct _xxGCPriv { + GCOps *ops; + GCFuncs *funcs; +} xxGCPrivRec, *xxGCPrivPtr; + +#define xxGetGCPriv(pGC) ((xxGCPrivPtr) \ + (pGC)->devPrivates[xxGCPrivateIndex].ptr) +#define xxGCPriv(pGC) xxGCPrivPtr pGCPriv = xxGetGCPriv(pGC) + +int xxScrPrivateIndex = -1; +int xxGCPrivateIndex; +int xxColormapPrivateIndex = -1; +int xxGeneration; + + +#define wrap(priv,real,mem,func) {\ + priv->mem = real->mem; \ + real->mem = func; \ +} + +#define unwrap(priv,real,mem) {\ + real->mem = priv->mem; \ +} + +#define MARK_DIRTY (1 << 31) + +#define MAX_NUM_XX_INSTALLED_CMAPS 255 +/* #define DEBUG */ +#ifdef DEBUG +# define DBG ErrorF +# define DBG_ARGS(x) ErrorF x +# define PRINT_RECTS(rec) {\ + int i;\ + BoxPtr box;\ + ErrorF("RECTS: %i\n",REGION_NUM_RECTS(&rec));\ + if (REGION_NUM_RECTS(&rec) > 1) { \ + for (i = 0; i < REGION_NUM_RECTS(&rec); i++ ) {\ + box = REGION_BOX(&rec,i);\ + ErrorF("x1: %hi x2: %hi y1: %hi y2: %hi\n", \ + box->x1,box->x2,box->y1,box->y2);\ + }\ + } else { \ + box = &(rec.extents); \ + ErrorF("x1: %hi x2: %hi y1: %hi y2: %hi\n", \ + box->x1,box->x2,box->y1,box->y2);\ + } \ +} +#else +# define DBG(x) +# define DBG_ARGS(x) +# define PRINT_RECTS(rec) +#endif + +#if 0 +static void xxCopyPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg, + xxCmapPrivPtr pCmapPriv); +static void xxUpdateFb(ScreenPtr pScreen); + + +static void +xxUpdateWindowImmediately(WindowPtr pWin) +{ + xxScrPriv(pWin->drawable.pScreen); + xxCmapPrivPtr pCmapPriv; + ColormapPtr pmap; + + pmap = (ColormapPtr)LookupIDByType(wColormap(pWin),RT_COLORMAP); + + if (pmap && (pCmapPriv = xxGetCmapPriv(pmap)) != (pointer)-1) { + xxCopyPseudocolorRegion(pWin->drawable.pScreen, + &pScrPriv->region, pCmapPriv); + } +} +#else +# define xxUpdateWindowImmediately(x) +#endif + +static ColormapPtr +xxGetBaseColormap(ScreenPtr pScreen) +{ + xxScrPriv(pScreen); + DepthPtr pDepth = pScreen->allowedDepths; + int i,j,k; + ColormapPtr pDefMap + = (ColormapPtr) LookupIDByType(pScreen->defColormap,RT_COLORMAP); + ColormapPtr cmap = NULL; + VisualPtr pVisual = NULL; + + for (i = 0; i < pScreen->numDepths; i++, pDepth++) + if (pDepth->depth == pScrPriv->depth) { + for (j = 0; j < pDepth->numVids; j++) { + if (pDefMap->pVisual->vid == pDepth->vids[j] + && pDefMap->pVisual->class == TrueColor) { + cmap = pDefMap; + break; + } + if (!pVisual) { + for (k = 0; k < pScreen->numVisuals; k++) { + if (pScreen->visuals[k].class == TrueColor + && pScreen->visuals[k].vid + == pDepth->vids[j]) { + pVisual = &pScreen->visuals[k]; + break; + } + } + } + } + if (cmap) + break; + } + + if (!cmap) { + CreateColormap(FakeClientID(0),pScreen,pVisual,&cmap,AllocNone,0); + } + + return cmap; +} + +static Bool +xxCreateScreenResources(ScreenPtr pScreen) +{ + PixmapPtr pPix; + xxScrPriv(pScreen); + Bool ret; + PixmapPtr pPixmap; + BoxRec box; + int depth = pScrPriv->myDepth; + pointer pBits; + + unwrap (pScrPriv,pScreen, CreateScreenResources); + ret = pScreen->CreateScreenResources(pScreen); + wrap(pScrPriv,pScreen,CreateScreenResources,xxCreateScreenResources); + + if (!ret) return FALSE; + + pScrPriv->pBits = NULL; + if (pScrPriv->addr) + pBits = pScrPriv->addr; + else + pBits = xalloc(pScreen->width * pScreen->height + * (BitsPerPixel(depth) >> 3)); + if (!pBits) return FALSE; + + pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth); + if (!pPixmap) { + xfree(pBits); + return FALSE; + } + if (!(*pScreen->ModifyPixmapHeader)(pPixmap, pScreen->width, + pScreen->height, depth, + BitsPerPixel(depth), + PixmapBytePad(pScreen->width, depth), + pBits)) { + xfree(pBits); + return FALSE; + } + if (pScreen->rootDepth == pScrPriv->myDepth) { + pPix = (PixmapPtr)pScreen->devPrivate; + if (!(*pScreen->ModifyPixmapHeader)(pPix, 0,0, pScrPriv->depth, + BitsPerPixel(pScrPriv->depth), + PixmapBytePad(pScreen->width, + pScrPriv->depth), + 0)) { + xfree(pBits); + return FALSE; + } + } + + pScrPriv->baseCmap = xxGetBaseColormap(pScreen); + + pScrPriv->pBits = pBits; + pScrPriv->pPixmap = pPixmap; + box.x1 = 0; + box.y1 = 0; + box.x2 = pScreen->width; + box.y2 = pScreen->height; + REGION_NULL(pScreen, &pScrPriv->region); + REGION_INIT(pScreen, &pScrPriv->bRegion, &box, 0); + + return TRUE; +} + +static Bool +xxCloseScreen (int iScreen, ScreenPtr pScreen) +{ + xxScrPriv(pScreen); + Bool ret; + + (*pScreen->DestroyPixmap)(pScrPriv->pPixmap); + /* We don't need to free the baseColormap as FreeClientResourcess + will have taken care of it. */ + REGION_UNINIT (pScreen, &pScrPriv->region); + + unwrap (pScrPriv,pScreen, CloseScreen); + ret = pScreen->CloseScreen(iScreen,pScreen); + + xfree(pScrPriv->pBits); + xfree(pScrPriv->InstalledCmaps); + xfree(pScrPriv); + + return TRUE; +} + +static Bool +xxMyVisual(ScreenPtr pScreen, VisualID vid) +{ + xxScrPriv(pScreen); + DepthPtr pDepth = pScreen->allowedDepths; + int i,j; + + for (i = 0; i < pScreen->numDepths; i++, pDepth++) + if (pDepth->depth == pScrPriv->myDepth) { + for (j = 0; j < pDepth->numVids; j++) { + if (vid == pDepth->vids[j]) { + return TRUE; + } + } + } + return FALSE; +} + +static Bool +xxInitColormapDummy(ColormapPtr pmap, int index) +{ + return TRUE; +} + +static Bool +xxInitColormapPrivate(ColormapPtr pmap) +{ + xxScrPriv(pmap->pScreen); + xxCmapPrivPtr pCmapPriv; + pointer cmap; + + pmap->devPrivates[xxColormapPrivateIndex].ptr = (pointer) -1; + + if (xxMyVisual(pmap->pScreen,pmap->pVisual->vid)) { + DBG("CreateColormap\n"); + pCmapPriv = (xxCmapPrivPtr) xalloc (sizeof (xxCmapPrivRec)); + if (!pCmapPriv) + return FALSE; + pmap->devPrivates[xxColormapPrivateIndex].ptr = (pointer) pCmapPriv; + cmap = xalloc(sizeof (CARD32) * (1 << pScrPriv->myDepth)); + if (!cmap) + return FALSE; + + memset(cmap,0,sizeof (CARD32) * (1 << pScrPriv->myDepth)); + + pCmapPriv->cmap = cmap; + pCmapPriv->dirty = FALSE; + pCmapPriv->pmap = pmap; + pCmapPriv->next = pScrPriv->Cmaps; + pScrPriv->Cmaps = pCmapPriv; + } + return TRUE; +} + + +static Bool +xxCreateColormap(ColormapPtr pmap) +{ + xxScrPriv(pmap->pScreen); + Bool ret; + + if (!xxInitColormapPrivate(pmap)) return FALSE; + + unwrap(pScrPriv,pmap->pScreen, CreateColormap); + ret = pmap->pScreen->CreateColormap(pmap); + wrap(pScrPriv,pmap->pScreen,CreateColormap,xxCreateColormap); + + return ret; +} + +static int +xxCmapInstalled(ColormapPtr pmap) +{ + xxScrPriv(pmap->pScreen); + int i; + + for (i = 0; i < pScrPriv->numInstalledColormaps; i++) + if (pScrPriv->InstalledCmaps[i] == pmap) + break; + if (i == pScrPriv->numInstalledColormaps) /* not installed */ + return -1; + return i; +} + +static void +xxInstalledCmapDelete(ScreenPtr pScreen, int num) +{ + xxScrPriv(pScreen); + int i; + + pScrPriv->numInstalledColormaps--; + + for (i = num; i < pScrPriv->numInstalledColormaps; i++) + pScrPriv->InstalledCmaps[i] = pScrPriv->InstalledCmaps[i+1]; +} + +static void +xxDestroyColormap(ColormapPtr pmap) +{ + xxScrPriv(pmap->pScreen); + xxCmapPriv(pmap); + + if (pCmapPriv != (pointer) -1) { + xxCmapPrivPtr tmpCmapPriv = pScrPriv->Cmaps; + xxCmapPrivPtr *prevCmapPriv = &pScrPriv->Cmaps; + int n; + + DBG("DestroyColormap\n"); + + if ((n = xxCmapInstalled(pmap)) != -1) + xxInstalledCmapDelete(pmap->pScreen,n); + + while (tmpCmapPriv) { + if (tmpCmapPriv->pmap == pmap) { + *prevCmapPriv = tmpCmapPriv->next; + break; + } + prevCmapPriv = &tmpCmapPriv->next; + tmpCmapPriv = tmpCmapPriv->next; + } + + xfree(pCmapPriv->cmap); + xfree(pCmapPriv); + } + + unwrap(pScrPriv,pmap->pScreen, DestroyColormap); + pmap->pScreen->DestroyColormap(pmap); + wrap(pScrPriv,pmap->pScreen,DestroyColormap,xxDestroyColormap); +} + +#define Shift(v,d) ((d) < 0 ? ((v) >> (-d)) : ((v) << (d))) + +static int +xxComputeCmapShift (unsigned long mask) +{ + int shift; + unsigned long bit; + + shift = 16; + bit = 0x80000000; + while (!(mask & bit)) + { + shift--; + bit >>= 1; + } + return shift; +} + +static void +xxStoreColors(ColormapPtr pmap, int nColors, xColorItem *pColors) +{ + xxScrPriv(pmap->pScreen); + xxCmapPriv(pmap); + + if (pCmapPriv != (pointer) -1) { + + xColorItem *expanddefs; + int i; + VisualPtr bVisual; + int rs, gs, bs; + + if (nColors == 0) return; + + DBG("StoreColors\n"); + + expanddefs = ALLOCATE_LOCAL(sizeof(xColorItem) + * (1 << pScrPriv->myDepth)); + if (!expanddefs) return; + + bVisual = pScrPriv->bVisual; + + DBG("StoreColors\n"); + + rs = xxComputeCmapShift(bVisual->redMask); + gs = xxComputeCmapShift(bVisual->greenMask); + bs = xxComputeCmapShift(bVisual->blueMask); + + if ((pmap->pVisual->class | DynamicClass) == DirectColor) { + nColors = miExpandDirectColors(pmap, nColors, pColors, expanddefs); + pColors = expanddefs; + } + + for (i = 0; i < nColors; i++) { + DBG_ARGS(("index: %i r 0x%x g 0x%x b 0x%x\n", pColors->pixel, + pColors->red, pColors->green, pColors->blue)); + pCmapPriv->cmap[pColors->pixel] = MARK_DIRTY + | (Shift(pColors->red, rs) & bVisual->redMask) + | (Shift(pColors->green, gs) & bVisual->greenMask) + | (Shift(pColors->blue, bs) & bVisual->blueMask); + pColors++; + } + + DEALLOCATE_LOCAL(expanddefs); + + pCmapPriv->dirty = TRUE; + pScrPriv->colormapDirty = TRUE; + + return; + } + + unwrap(pScrPriv,pmap->pScreen, StoreColors); + pmap->pScreen->StoreColors(pmap,nColors,pColors); + wrap(pScrPriv,pmap->pScreen,StoreColors,xxStoreColors); +} + +static void +xxInstallColormap(ColormapPtr pmap) +{ + int i; + xxScrPriv(pmap->pScreen); + xxCmapPriv(pmap); + + if (pCmapPriv != (pointer) -1) { + Pixel *pixels; + xrgb *colors; + int i; + VisualPtr pVisual; + xColorItem *defs; + + DBG("InstallColormap\n"); + + if (xxCmapInstalled(pmap) != -1) + return; + + if (!pScrPriv->numInstalledColormaps) { + unwrap(pScrPriv,pmap->pScreen, InstallColormap); + pmap->pScreen->InstallColormap(pScrPriv->baseCmap); + wrap(pScrPriv,pmap->pScreen,InstallColormap,xxInstallColormap); + } + + pixels = ALLOCATE_LOCAL(sizeof(Pixel) * (1 << pScrPriv->myDepth)); + colors = ALLOCATE_LOCAL(sizeof(xrgb) * (1 << pScrPriv->myDepth)); + defs = ALLOCATE_LOCAL(sizeof(xColorItem) * (1 << pScrPriv->myDepth)); + + if (!pixels || !colors) + return; + + /* if we have more than max installed delete the oldest */ + if (pScrPriv->numInstalledColormaps == MAX_NUM_XX_INSTALLED_CMAPS) + xxInstalledCmapDelete(pmap->pScreen,0); + + pScrPriv->InstalledCmaps[pScrPriv->numInstalledColormaps] = pmap; + pScrPriv->numInstalledColormaps++; + + pVisual = pScrPriv->bVisual; + + for (i = 0; i < (1 << pScrPriv->myDepth); i++) + pixels[i] = i; + + QueryColors (pmap, (1 << pScrPriv->myDepth), pixels, colors); + + for (i = 0; i < (1 << pScrPriv->myDepth); i++) { + defs[i].pixel = pixels[i]; + defs[i].red = colors[i].red; + defs[i].green = colors[i].green; + defs[i].blue = colors[i].blue; + defs[i].flags = DoRed|DoGreen|DoBlue; + } + xxStoreColors(pmap,(1 << pScrPriv->myDepth),defs); + + DEALLOCATE_LOCAL(pixels); + DEALLOCATE_LOCAL(colors); + DEALLOCATE_LOCAL(defs); + + return; + } + + for (i = pScrPriv->numInstalledColormaps; i ; i--) + WalkTree(pmap->pScreen, TellLostMap, + (char *)&pScrPriv->InstalledCmaps[i-1]->mid); + + pScrPriv->numInstalledColormaps = 0; + + unwrap(pScrPriv,pmap->pScreen, InstallColormap); + pmap->pScreen->InstallColormap(pmap); + wrap(pScrPriv,pmap->pScreen,InstallColormap,xxInstallColormap); +} + +static void +xxUninstallColormap(ColormapPtr pmap) +{ + xxScrPriv(pmap->pScreen); + xxCmapPriv(pmap); + + if (pCmapPriv != (pointer) -1) { + int num; + + if ((num = xxCmapInstalled(pmap)) == -1) + return; + + DBG("UninstallColormap\n"); + xxInstalledCmapDelete(pmap->pScreen,num); + + return; + } + + unwrap(pScrPriv,pmap->pScreen, UninstallColormap); + pmap->pScreen->UninstallColormap(pmap); + wrap(pScrPriv,pmap->pScreen,UninstallColormap,xxUninstallColormap); + +} + +static int +xxListInstalledColormaps(ScreenPtr pScreen, Colormap *pCmapIds) +{ + int n,i; + xxScrPriv(pScreen); + + unwrap(pScrPriv,pScreen, ListInstalledColormaps); + n = pScreen->ListInstalledColormaps(pScreen, pCmapIds); + wrap (pScrPriv,pScreen,ListInstalledColormaps,xxListInstalledColormaps); + + pCmapIds += n; + + for (i = 0; i < pScrPriv->numInstalledColormaps; i++) { + *pCmapIds++ = pScrPriv->InstalledCmaps[i]->mid; + n++; + } + + return n; +} + +static Bool +xxCreateWindow(WindowPtr pWin) +{ + xxScrPriv(pWin->drawable.pScreen); + + if (pWin->drawable.class != InputOutput + || pScrPriv->myDepth != pWin->drawable.depth) { + Bool ret; + DBG("CreateWindow NoPseudo\n"); + unwrap (pScrPriv, pWin->drawable.pScreen, CreateWindow); + ret = pWin->drawable.pScreen->CreateWindow(pWin); + wrap(pScrPriv, pWin->drawable.pScreen, CreateWindow, xxCreateWindow); + + return ret; + } + + DBG("CreateWindow\n"); + + pWin->devPrivates[fbWinPrivateIndex].ptr = (pointer) pScrPriv->pPixmap; + PRINT_RECTS(pScrPriv->region); + if (!pWin->parent) { + REGION_EMPTY (pWin->drawable.pScreen, &pScrPriv->region); + } + PRINT_RECTS(pScrPriv->region); + + return TRUE; +} + +static void +xxWalkChildren(WindowPtr pWin, RegionPtr pReg, PixmapPtr pPixmap) +{ + + WindowPtr pCurWin = pWin; + + do { + if (fbGetWindowPixmap(pCurWin) == pPixmap) { + DBG("WalkWindow Add\n"); + REGION_UNION(pWin->drawable.pScreen,pReg,pReg, + &pCurWin->borderClip); + } else { + DBG("WalkWindow Sub\n"); + REGION_SUBTRACT(pWin->drawable.pScreen,pReg,pReg, + &pCurWin->borderClip); + } + if (pCurWin->lastChild) + xxWalkChildren(pCurWin->lastChild,pReg, pPixmap); + } while ((pCurWin = pCurWin->prevSib)); +} + +static void +xxPickMyWindows(WindowPtr pWin, RegionPtr pRgn) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + xxScrPriv(pScreen); + + if (fbGetWindowPixmap(pWin) == pScrPriv->pPixmap) { + REGION_UNION(pWin->drawable.pScreen,pRgn,pRgn,&pWin->borderClip); + } + if (pWin->lastChild) + xxWalkChildren(pWin->lastChild,pRgn,pScrPriv->pPixmap); +} + +static void +xxCopyWindow(WindowPtr pWin, + DDXPointRec ptOldOrg, + RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + xxScrPriv(pScreen); + RegionRec rgn; + RegionRec rgn_new; + int dx, dy; + PixmapPtr pPixmap = fbGetWindowPixmap(pWin); + + DBG("xxCopyWindow\n"); + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + + REGION_NULL(pScreen, &rgn_new); + REGION_UNION(pScreen, &rgn_new,&rgn_new,prgnSrc); + REGION_TRANSLATE(pScreen,&rgn_new,-dx,-dy); + + REGION_NULL(pScreen, &rgn); + xxPickMyWindows(pWin,&rgn); + + unwrap (pScrPriv, pScreen, CopyWindow); + pWin->devPrivates[fbWinPrivateIndex].ptr = fbGetScreenPixmap(pScreen); + pScreen->CopyWindow(pWin, ptOldOrg, prgnSrc); + pWin->devPrivates[fbWinPrivateIndex].ptr = pPixmap; + wrap(pScrPriv, pScreen, CopyWindow, xxCopyWindow); + + REGION_INTERSECT(pScreen,&rgn,&rgn,&rgn_new); + if (REGION_NOTEMPTY (pScreen,&rgn)) { + fbCopyRegion(&pScrPriv->pPixmap->drawable,&pScrPriv->pPixmap->drawable, + 0,&rgn,dx,dy,fbCopyWindowProc,0,(void*)0); + REGION_TRANSLATE(pScreen,&rgn,dx,dy); + REGION_INTERSECT(pScreen,&rgn_new,&pScrPriv->region,&rgn); + REGION_SUBTRACT(pScreen,&pScrPriv->region,&pScrPriv->region,&rgn); + REGION_TRANSLATE(pScreen,&rgn_new,-dx,-dy); + REGION_UNION(pScreen,&pScrPriv->region,&pScrPriv->region,&rgn_new); + } +#if 1 + REGION_UNINIT(pScreen,&rgn_new); + REGION_UNINIT(pScreen,&rgn); +#endif +} + +static void +xxWindowExposures (WindowPtr pWin, + RegionPtr prgn, + RegionPtr other_exposed) +{ + xxScrPriv(pWin->drawable.pScreen); + + if (fbGetWindowPixmap(pWin) == pScrPriv->pPixmap) { + DBG("WindowExposures\n"); + PRINT_RECTS(pScrPriv->region); + REGION_UNION(pWin->drawable.pScreen,&pScrPriv->region, + &pScrPriv->region, + prgn); + PRINT_RECTS(pScrPriv->region); + } else { + DBG("WindowExposures NonPseudo\n"); + PRINT_RECTS(pScrPriv->region); + REGION_SUBTRACT(pWin->drawable.pScreen,&pScrPriv->region, + &pScrPriv->region, + prgn); + PRINT_RECTS(pScrPriv->region); + } + unwrap (pScrPriv, pWin->drawable.pScreen, WindowExposures); + pWin->drawable.pScreen->WindowExposures(pWin, prgn, other_exposed); + wrap(pScrPriv, pWin->drawable.pScreen, WindowExposures, xxWindowExposures); +} + +static void +xxPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) +{ + xxScrPriv(pWin->drawable.pScreen); + RegionRec rgni; + + DBG("xxPaintWindow\n"); + + REGION_NULL (pWin->drawable.pScreen, &rgni); +#if 0 + REGION_UNION (pWin->drawable.pScreen, &rgni, &rgni, &pWin->borderClip); + REGION_INTERSECT(pWin->drawable.pScreen, &rgni, &rgni, pRegion); +#else + REGION_UNION (pWin->drawable.pScreen, &rgni, &rgni, pRegion); +#endif + switch (what) { + case PW_BORDER: + REGION_SUBTRACT (pWin->drawable.pScreen, &rgni, &rgni, &pWin->winSize); + if (fbGetWindowPixmap(pWin) == pScrPriv->pPixmap) { + DBG("PaintWindowBorder\n"); + REGION_UNION (pWin->drawable.pScreen, &pScrPriv->region, + &pScrPriv->region, &rgni); + } else { + DBG("PaintWindowBorder NoOverlay\n"); + REGION_SUBTRACT (pWin->drawable.pScreen, &pScrPriv->region, + &pScrPriv->region, &rgni); + } + unwrap (pScrPriv, pWin->drawable.pScreen, PaintWindowBorder); + pWin->drawable.pScreen->PaintWindowBorder (pWin, pRegion, what); + wrap(pScrPriv, pWin->drawable.pScreen, PaintWindowBorder, + xxPaintWindow); + break; + case PW_BACKGROUND: + switch (pWin->backgroundState) { + case None: + break; + default: + REGION_INTERSECT (pWin->drawable.pScreen, &rgni, + &rgni,&pWin->winSize); + if (fbGetWindowPixmap(pWin) == pScrPriv->pPixmap) { + DBG("PaintWindowBackground\n"); + REGION_UNION (pWin->drawable.pScreen, &pScrPriv->region, + &pScrPriv->region, &rgni); + } else { + DBG("PaintWindowBackground NoOverlay\n"); + REGION_SUBTRACT (pWin->drawable.pScreen, &pScrPriv->region, + &pScrPriv->region, &rgni); + } + break; + } + + unwrap (pScrPriv, pWin->drawable.pScreen, PaintWindowBackground); + pWin->drawable.pScreen->PaintWindowBackground (pWin, pRegion, what); + wrap(pScrPriv, pWin->drawable.pScreen, PaintWindowBackground, + xxPaintWindow); + break; + } + PRINT_RECTS(rgni); + PRINT_RECTS(pScrPriv->region); +#if 1 + REGION_UNINIT(pWin->drawable.pScreen,&rgni); +#endif +} + +static void +xxCopyPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg, + xxCmapPrivPtr pCmapPriv) +{ + xxScrPriv(pScreen); + CARD32 mask = (1 << pScrPriv->myDepth) - 1; + int num = REGION_NUM_RECTS(pReg); + BoxPtr pbox = REGION_RECTS(pReg); + int width, height; + CARD8 *src; + CARD16 *dst, *dst_base; + int dst_stride; + register CARD32 *cmap = pCmapPriv->cmap; + register CARD8 *s; + register CARD16 *d; + int w; + + fbPrepareAccess((DrawablePtr)pScreen->devPrivate); + + dst_base = (CARD16*) ((PixmapPtr)pScreen->devPrivate)->devPrivate.ptr; + dst_stride = (int)((PixmapPtr)pScreen->devPrivate)->devKind + / sizeof (CARD16); + + while (num--) { + height = pbox->y2 - pbox->y1; + width = pbox->x2 - pbox->x1; + + src = (unsigned char *) pScrPriv->pBits + + (pbox->y1 * pScreen->width) + pbox->x1; + dst = dst_base + (pbox->y1 * dst_stride) + pbox->x1; + while (height--) { + w = width; + s = src; + d = dst; + + while(w--) { + *(d++) = (CARD16)*(cmap + ((*(s++)) & mask)); + } + src += pScreen->width; + dst += dst_stride; + } + pbox++; + } + + fbFinishAccess(&((PixmapPtr)pScreen->devPrivate)->drawable); +} + +static void +xxUpdateCmapPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg, + xxCmapPrivPtr pCmapPriv) +{ + xxScrPriv(pScreen); + CARD32 mask = (1 << pScrPriv->myDepth) - 1; + int num = REGION_NUM_RECTS(pReg); + BoxPtr pbox = REGION_RECTS(pReg); + int width, height; + CARD8 *src; + CARD16 *dst, *dst_base; + int dst_stride; + register CARD32 val; + register CARD32 *cmap = pCmapPriv->cmap; + register CARD8 *s; + register CARD16 *d; + int w; + + dst_base = (CARD16*) ((PixmapPtr)pScreen->devPrivate)->devPrivate.ptr; + dst_stride = (int)((PixmapPtr)pScreen->devPrivate)->devKind + / sizeof (CARD16); + + while (num--) { + + height = pbox->y2 - pbox->y1; + width = pbox->x2 - pbox->x1; + + src = (unsigned char *) pScrPriv->pBits + + (pbox->y1 * pScreen->width) + pbox->x1; + dst = dst_base + (pbox->y1 * dst_stride) + pbox->x1; + while (height--) { + w = width; + s = src; + d = dst; + while(w--) { + val = *(cmap + ((*(s++)) & mask)); + if (val & MARK_DIRTY) { + *d = (CARD16) val; + } + d++; + } + src += pScreen->width; + dst += dst_stride; + } + pbox++; + } +} + +static void +xxGetWindowRegion(WindowPtr pWin,RegionPtr winreg) +{ + REGION_NULL(pWin->drawable.pScreen,winreg); + /* get visible part of the border ...Argh */ + REGION_SUBTRACT(pWin->drawable.pScreen,winreg,&pWin->borderSize, + &pWin->winSize); + REGION_INTERSECT(pWin->drawable.pScreen,winreg,winreg, + &pWin->borderClip); + /* add window interior excluding children */ + REGION_UNION(pWin->drawable.pScreen,winreg,winreg, + &pWin->clipList); +} + +static int +xxUpdateRegion(WindowPtr pWin, pointer unused) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + xxScrPriv(pScreen); + ColormapPtr pmap = (pointer) -1; + RegionRec winreg, rgni; + + if (pScrPriv->myDepth == pWin->drawable.depth) { + xxCmapPrivPtr pCmapPriv = (pointer)-1; + xxGetWindowRegion(pWin,&winreg); + + if (pScrPriv->colormapDirty) { + + pmap = (ColormapPtr)LookupIDByType(wColormap(pWin),RT_COLORMAP); + if (!pmap) + goto CONTINUE; /* return ? */ + + pCmapPriv = xxGetCmapPriv(pmap); + if (pCmapPriv == (pointer) -1) + return WT_WALKCHILDREN; + if (!pCmapPriv->dirty) + goto CONTINUE; + + REGION_NULL (pScreen, &rgni); + /* This will be taken care of when damaged regions are updated */ + REGION_SUBTRACT(pScreen, &rgni, &winreg, &pScrPriv->region); + if (REGION_NOTEMPTY (pScreen,&rgni)) + xxUpdateCmapPseudocolorRegion(pScreen,&rgni, pCmapPriv); + } + CONTINUE: + + REGION_NULL (pScreen, &rgni); + REGION_INTERSECT (pScreen, &rgni, &winreg, &pScrPriv->region); + + if (REGION_NOTEMPTY (pScreen,&rgni)) { + if (pmap == (pointer) -1) { + pmap = + (ColormapPtr)LookupIDByType(wColormap(pWin),RT_COLORMAP); + if (!pmap) /* return ? */ + pmap = (ColormapPtr)LookupIDByType(pScreen->defColormap, + RT_COLORMAP); + pCmapPriv = xxGetCmapPriv(pmap); + } + + if (pCmapPriv != (pointer)-1) + xxCopyPseudocolorRegion(pScreen,&rgni, pCmapPriv); + REGION_SUBTRACT(pScreen, &pScrPriv->region, &pScrPriv->region, + &rgni); + } +#if 1 + REGION_UNINIT(pScreen,&rgni); + REGION_UNINIT(pScreen,&winreg); +#endif + } + return WT_WALKCHILDREN; +} + + +static void +xxUpdateFb(ScreenPtr pScreen) +{ + xxScrPriv(pScreen); + + DBG("Update FB\n"); + PRINT_RECTS(pScrPriv->region); + + if (pScrPriv->sync) + pScrPriv->sync(pScreen); /*@!@*/ + + WalkTree(pScreen,xxUpdateRegion,NULL); +#if 0 + if (REGION_NOTEMPTY (pScreen,&pScrPriv->region)) { + ColormapPtr pmap = (pointer) -1; + xxCmapPrivPtr pCmapPriv; + + pmap = (ColormapPtr)LookupIDByType(pScreen->defColormap, + RT_COLORMAP); + pCmapPriv = xxGetCmapPriv(pmap); + if (pCmapPriv != (pointer)-1) + xxCopyPseudocolorRegion(pScreen,&pScrPriv->region, pCmapPriv); + REGION_SUBTRACT(pScreen, &pScrPriv->region, &pScrPriv->region, + &pScrPriv->region); + } +#endif + if (pScrPriv->colormapDirty) { + xxCmapPrivPtr pCmap = pScrPriv->Cmaps; + + while (pCmap) { + int j; + + if (pCmap->dirty) { + for (j = 0; j < (1 << pScrPriv->myDepth); j++) + pCmap->cmap[j] &= ~MARK_DIRTY; + pCmap->dirty = FALSE; + } + pCmap = pCmap->next; + } + pScrPriv->colormapDirty = FALSE; + } +} + +static void +xxBlockHandler (pointer data, + OSTimePtr pTimeout, + pointer pRead) +{ + ScreenPtr pScreen = (ScreenPtr) data; + xxScrPriv(pScreen); + + if (REGION_NOTEMPTY (pScreen,&pScrPriv->region) || pScrPriv->colormapDirty) + xxUpdateFb (pScreen); +} + +static void +xxWakeupHandler (pointer data, int i, pointer LastSelectMask) +{ +} + +Bool +xxSetup(ScreenPtr pScreen, int myDepth, int baseDepth, char* addr, xxSyncFunc sync) +{ + xxScrPrivPtr pScrPriv; + DepthPtr pDepths; + ColormapPtr pDefMap; + int i,j,k; + +#ifdef RENDER + PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); +#endif + + if (xxGeneration != serverGeneration) { + xxScrPrivateIndex = AllocateScreenPrivateIndex (); + if (xxScrPrivateIndex == -1) + return FALSE; + xxColormapPrivateIndex + = AllocateColormapPrivateIndex (xxInitColormapDummy); + if (xxColormapPrivateIndex == -1) + return FALSE; + xxGCPrivateIndex = AllocateGCPrivateIndex (); + if (xxGCPrivateIndex == -1) + return FALSE; + xxGeneration = serverGeneration; + } + + if (!AllocateGCPrivate (pScreen, xxGCPrivateIndex, sizeof (xxGCPrivRec))) + return FALSE; + + pScrPriv = (xxScrPrivPtr) xalloc (sizeof (xxScrPrivRec)); + if (!pScrPriv) + return FALSE; + + if (baseDepth) + pScrPriv->depth = baseDepth; + else { + pDepths = pScreen->allowedDepths; + for (i = 0; i < pScreen->numDepths; i++, pDepths++) + if (pDepths->depth != myDepth) + pScrPriv->depth = pDepths->depth; + } + if (!pScrPriv->depth) + return FALSE; + + pDepths = pScreen->allowedDepths; + for (i = 0; i < pScreen->numDepths; i++, pDepths++) + if (pDepths->depth == pScrPriv->depth) { + for (j = 0; i < pDepths->numVids; j++) { + for (k = 0; k < pScreen->numVisuals; k++) { + if (pScreen->visuals[k].vid + == pDepths[i].vids[j] + && pScreen->visuals[k].class == TrueColor) { + pScrPriv->bVisual = &pScreen->visuals[k]; + goto DONE; + } + } + } + } + + DONE: + if (!pScrPriv->bVisual) + return FALSE; + + pScrPriv->myDepth = myDepth; + pScrPriv->numInstalledColormaps = 0; + pScrPriv->colormapDirty = FALSE; + pScrPriv->Cmaps = NULL; + pScrPriv->sync = sync; + + pScreen->maxInstalledCmaps += MAX_NUM_XX_INSTALLED_CMAPS; + pScrPriv->InstalledCmaps = xcalloc(MAX_NUM_XX_INSTALLED_CMAPS, + sizeof(ColormapPtr)); + if (!pScrPriv->InstalledCmaps) + return FALSE; + + + if (!RegisterBlockAndWakeupHandlers (xxBlockHandler, + xxWakeupHandler, + (pointer) pScreen)) + return FALSE; + + wrap (pScrPriv, pScreen, CloseScreen, xxCloseScreen); + wrap (pScrPriv, pScreen, CreateScreenResources, xxCreateScreenResources); + wrap (pScrPriv, pScreen, CreateWindow, xxCreateWindow); + wrap (pScrPriv, pScreen, CopyWindow, xxCopyWindow); + wrap (pScrPriv, pScreen, PaintWindowBorder, xxPaintWindow); + wrap (pScrPriv, pScreen, PaintWindowBackground, xxPaintWindow); +#if 0 /* can we leave this out even with backing store enabled ? */ + wrap (pScrPriv, pScreen, WindowExposures, xxWindowExposures); +#endif + wrap (pScrPriv, pScreen, CreateGC, xxCreateGC); + wrap (pScrPriv, pScreen, CreateColormap, xxCreateColormap); + wrap (pScrPriv, pScreen, DestroyColormap, xxDestroyColormap); + wrap (pScrPriv, pScreen, InstallColormap, xxInstallColormap); + wrap (pScrPriv, pScreen, UninstallColormap, xxUninstallColormap); + wrap (pScrPriv, pScreen, ListInstalledColormaps, xxListInstalledColormaps); + wrap (pScrPriv, pScreen, StoreColors, xxStoreColors); +#ifdef RENDER + if (ps) { + wrap (pScrPriv, ps, Glyphs, xxGlyphs); + wrap (pScrPriv, ps, Composite, xxComposite); + } +#endif + pScrPriv->addr = addr; + pScreen->devPrivates[xxScrPrivateIndex].ptr = (pointer) pScrPriv; + + pDefMap = (ColormapPtr) LookupIDByType(pScreen->defColormap, RT_COLORMAP); + if (!xxInitColormapPrivate(pDefMap)) + return FALSE; + + return TRUE; +} + +GCFuncs xxGCFuncs = { + xxValidateGC, xxChangeGC, xxCopyGC, xxDestroyGC, + xxChangeClip, xxDestroyClip, xxCopyClip +}; + +static GCOps xxGCOps = { + xxFillSpans, xxSetSpans, + xxPutImage, xxCopyArea, + xxCopyPlane, xxPolyPoint, + xxPolylines, xxPolySegment, + xxPolyRectangle, xxPolyArc, + xxFillPolygon, xxPolyFillRect, + xxPolyFillArc, xxPolyText8, + xxPolyText16, xxImageText8, + xxImageText16, xxImageGlyphBlt, + xxPolyGlyphBlt, xxPushPixels, + {NULL} /* devPrivate */ +}; + +#define IS_VISIBLE(pDraw) (pDraw->type == DRAWABLE_WINDOW \ + && (fbGetWindowPixmap((WindowPtr) pDraw) == pScrPriv->pPixmap)) + +#define TRANSLATE_BOX(box, pDraw) { \ + box.x1 += pDraw->x; \ + box.x2 += pDraw->x; \ + box.y1 += pDraw->y; \ + box.y2 += pDraw->y; \ + } + +#define TRIM_BOX(box, pGC) { \ + BoxPtr extents = &pGC->pCompositeClip->extents;\ + if(box.x1 < extents->x1) box.x1 = extents->x1; \ + if(box.x2 > extents->x2) box.x2 = extents->x2; \ + if(box.y1 < extents->y1) box.y1 = extents->y1; \ + if(box.y2 > extents->y2) box.y2 = extents->y2; \ + } + +#define BOX_NOT_EMPTY(box) \ + (((box.x2 - box.x1) > 0) && ((box.y2 - box.y1) > 0)) + + +#define _ADD_BOX(box,pGC) {\ + if (BOX_NOT_EMPTY(box)) { \ + RegionRec region; \ + ScreenPtr pScreen = pGC->pScreen;\ + REGION_INIT (pScreen, ®ion, &box, 1); \ + REGION_INTERSECT(pScreen,®ion,®ion,\ + (pGC)->pCompositeClip);\ + if (REGION_NOTEMPTY(pScreen,®ion)) { \ + xxScrPriv(pScreen);\ + PRINT_RECTS(pScrPriv->region);\ + REGION_UNION(pScreen,&pScrPriv->region,&pScrPriv->region,®ion);\ + PRINT_RECTS(pScrPriv->region);\ + REGION_UNINIT(pScreen,®ion);\ + }\ + }\ +} + +#define TRANSLATE_AND_ADD_BOX(box,pGC) {\ + TRANSLATE_BOX(box,pDraw); \ + TRIM_BOX(box,pGC); \ + _ADD_BOX(box,pGC); \ +} + +#define ADD_BOX(box,pGC) { \ + TRIM_BOX(box,pGC); \ + _ADD_BOX(box,pGC); \ +} + +#define XX_GC_FUNC_PROLOGUE(pGC) \ + xxGCPriv(pGC); \ + unwrap(pGCPriv, pGC, funcs); \ + if (pGCPriv->ops) unwrap(pGCPriv, pGC, ops) + +#define XX_GC_FUNC_EPILOGUE(pGC) \ + wrap(pGCPriv, pGC, funcs, &xxGCFuncs); \ + if (pGCPriv->ops) wrap(pGCPriv, pGC, ops, &xxGCOps) + +static Bool +xxCreateGC(GCPtr pGC) +{ + ScreenPtr pScreen = pGC->pScreen; + xxScrPriv(pScreen); + xxGCPriv(pGC); + Bool ret; + + unwrap (pScrPriv, pScreen, CreateGC); + if((ret = (*pScreen->CreateGC) (pGC))) { + pGCPriv->ops = NULL; + pGCPriv->funcs = pGC->funcs; + pGC->funcs = &xxGCFuncs; + } + wrap (pScrPriv, pScreen, CreateGC, xxCreateGC); + + return ret; +} + +static void +xxValidateGC( + GCPtr pGC, + unsigned long changes, + DrawablePtr pDraw +){ + XX_GC_FUNC_PROLOGUE (pGC); + (*pGC->funcs->ValidateGC)(pGC, changes, pDraw); + if(pDraw->type == DRAWABLE_WINDOW) + pGCPriv->ops = pGC->ops; /* just so it's not NULL */ + else + pGCPriv->ops = NULL; + XX_GC_FUNC_EPILOGUE (pGC); +} + +static void +xxDestroyGC(GCPtr pGC) +{ + XX_GC_FUNC_PROLOGUE (pGC); + (*pGC->funcs->DestroyGC)(pGC); + XX_GC_FUNC_EPILOGUE (pGC); +} + +static void +xxChangeGC ( + GCPtr pGC, + unsigned long mask +){ + XX_GC_FUNC_PROLOGUE (pGC); + (*pGC->funcs->ChangeGC) (pGC, mask); + XX_GC_FUNC_EPILOGUE (pGC); +} + +static void +xxCopyGC ( + GCPtr pGCSrc, + unsigned long mask, + GCPtr pGCDst +){ + XX_GC_FUNC_PROLOGUE (pGCDst); + (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); + XX_GC_FUNC_EPILOGUE (pGCDst); +} + +static void +xxChangeClip ( + GCPtr pGC, + int type, + pointer pvalue, + int nrects +){ + XX_GC_FUNC_PROLOGUE (pGC); + (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); + XX_GC_FUNC_EPILOGUE (pGC); +} + +static void +xxCopyClip(GCPtr pgcDst, GCPtr pgcSrc) +{ + XX_GC_FUNC_PROLOGUE (pgcDst); + (* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc); + XX_GC_FUNC_EPILOGUE (pgcDst); +} + +static void +xxDestroyClip(GCPtr pGC) +{ + XX_GC_FUNC_PROLOGUE (pGC); + (* pGC->funcs->DestroyClip)(pGC); + XX_GC_FUNC_EPILOGUE (pGC); +} + +#define XX_GC_OP_PROLOGUE(pGC,pDraw) \ + xxScrPriv(pDraw->pScreen); \ + xxGCPriv(pGC); \ + GCFuncs *oldFuncs = pGC->funcs; \ + unwrap(pGCPriv, pGC, funcs); \ + unwrap(pGCPriv, pGC, ops); \ + +#define XX_GC_OP_EPILOGUE(pGC,pDraw) \ + wrap(pGCPriv, pGC, funcs, oldFuncs); \ + wrap(pGCPriv, pGC, ops, &xxGCOps) + +static void +xxFillSpans( + DrawablePtr pDraw, + GC *pGC, + int nInit, + DDXPointPtr pptInit, + int *pwidthInit, + int fSorted +){ + XX_GC_OP_PROLOGUE(pGC, pDraw); + + if(IS_VISIBLE(pDraw) && nInit) { + DDXPointPtr ppt = pptInit; + int *pwidth = pwidthInit; + int i = nInit; + BoxRec box; + + DBG("FillSpans\n"); + box.x1 = ppt->x; + box.x2 = box.x1 + *pwidth; + box.y2 = box.y1 = ppt->y; + + while(--i) { + ppt++; + pwidthInit++; + if(box.x1 > ppt->x) box.x1 = ppt->x; + if(box.x2 < (ppt->x + *pwidth)) + box.x2 = ppt->x + *pwidth; + if(box.y1 > ppt->y) box.y1 = ppt->y; + else if(box.y2 < ppt->y) box.y2 = ppt->y; + } + + box.y2++; + + (*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted); + + + TRANSLATE_AND_ADD_BOX(box, pGC); + } else + (*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted); + + XX_GC_OP_EPILOGUE(pGC, pDraw); +} + +static void +xxSetSpans( + DrawablePtr pDraw, + GCPtr pGC, + char *pcharsrc, + DDXPointPtr pptInit, + int *pwidthInit, + int nspans, + int fSorted +){ + XX_GC_OP_PROLOGUE(pGC, pDraw); + + if(IS_VISIBLE(pDraw) && nspans) { + DDXPointPtr ppt = pptInit; + int *pwidth = pwidthInit; + int i = nspans; + BoxRec box; + + DBG("SetSpans\n"); + box.x1 = ppt->x; + box.x2 = box.x1 + *pwidth; + box.y2 = box.y1 = ppt->y; + + while(--i) { + ppt++; + pwidth++; + if(box.x1 > ppt->x) box.x1 = ppt->x; + if(box.x2 < (ppt->x + *pwidth)) + box.x2 = ppt->x + *pwidth; + if(box.y1 > ppt->y) box.y1 = ppt->y; + else if(box.y2 < ppt->y) box.y2 = ppt->y; + } + + box.y2++; + + (*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, pptInit, + pwidthInit, nspans, fSorted); + + TRANSLATE_AND_ADD_BOX(box, pGC); + } else + (*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, pptInit, + pwidthInit, nspans, fSorted); + + XX_GC_OP_EPILOGUE(pGC, pDraw); +} + +static void +xxPutImage( + DrawablePtr pDraw, + GCPtr pGC, + int depth, + int x, int y, int w, int h, + int leftPad, + int format, + char *pImage +){ + XX_GC_OP_PROLOGUE(pGC, pDraw); + (*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h, + leftPad, format, pImage); + XX_GC_OP_EPILOGUE(pGC, pDraw); + if(IS_VISIBLE(pDraw)) { + BoxRec box; + + DBG("PutImage\n"); + box.x1 = x + pDraw->x; + box.x2 = box.x1 + w; + box.y1 = y + pDraw->y; + box.y2 = box.y1 + h; + + ADD_BOX(box, pGC); + } +} + +static RegionPtr +xxCopyArea( + DrawablePtr pSrc, + DrawablePtr pDst, + GC *pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty +){ + RegionPtr ret; + XX_GC_OP_PROLOGUE(pGC, pDst); + DBG("xxCopyArea\n"); + ret = (*pGC->ops->CopyArea)(pSrc, pDst, + pGC, srcx, srcy, width, height, dstx, dsty); + XX_GC_OP_EPILOGUE(pGC, pDst); + + if(IS_VISIBLE(pDst)) { + BoxRec box; + + DBG("CopyArea\n"); + box.x1 = dstx + pDst->x; + box.x2 = box.x1 + width; + box.y1 = dsty + pDst->y; + box.y2 = box.y1 + height; + + ADD_BOX(box, pGC); + } + + return ret; +} + +static RegionPtr +xxCopyPlane( + DrawablePtr pSrc, + DrawablePtr pDst, + GCPtr pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty, + unsigned long bitPlane +){ + RegionPtr ret; + XX_GC_OP_PROLOGUE(pGC, pDst); + ret = (*pGC->ops->CopyPlane)(pSrc, pDst, + pGC, srcx, srcy, width, height, dstx, dsty, bitPlane); + XX_GC_OP_EPILOGUE(pGC, pDst); + + if(IS_VISIBLE(pDst)) { + BoxRec box; + + DBG("CopyPlane\n"); + box.x1 = dstx + pDst->x; + box.x2 = box.x1 + width; + box.y1 = dsty + pDst->y; + box.y2 = box.y1 + height; + + ADD_BOX(box, pGC); + } + + return ret; +} + +static void +xxPolyPoint( + DrawablePtr pDraw, + GCPtr pGC, + int mode, + int npt, + xPoint *pptInit +){ + XX_GC_OP_PROLOGUE(pGC, pDraw); + (*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit); + XX_GC_OP_EPILOGUE(pGC, pDraw); + + if(IS_VISIBLE(pDraw) && npt) { + BoxRec box; + + DBG("PolyPoint\n"); + box.x2 = box.x1 = pptInit->x; + box.y2 = box.y1 = pptInit->y; + + /* this could be slow if the points were spread out */ + + while(--npt) { + pptInit++; + if(box.x1 > pptInit->x) box.x1 = pptInit->x; + else if(box.x2 < pptInit->x) box.x2 = pptInit->x; + if(box.y1 > pptInit->y) box.y1 = pptInit->y; + else if(box.y2 < pptInit->y) box.y2 = pptInit->y; + } + + box.x2++; + box.y2++; + + TRANSLATE_AND_ADD_BOX(box, pGC); + } +} + +static void +xxPolylines( + DrawablePtr pDraw, + GCPtr pGC, + int mode, + int npt, + DDXPointPtr pptInit +){ + XX_GC_OP_PROLOGUE(pGC, pDraw); + (*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit); + XX_GC_OP_EPILOGUE(pGC, pDraw); + + + if(IS_VISIBLE(pDraw) && npt) { + BoxRec box; + int extra = pGC->lineWidth >> 1; + + DBG("PolyLine\n"); + box.x2 = box.x1 = pptInit->x; + box.y2 = box.y1 = pptInit->y; + + if(npt > 1) { + if(pGC->joinStyle == JoinMiter) + extra = 6 * pGC->lineWidth; + else if(pGC->capStyle == CapProjecting) + extra = pGC->lineWidth; + } + + if(mode == CoordModePrevious) { + int x = box.x1; + int y = box.y1; + while(--npt) { + pptInit++; + x += pptInit->x; + y += pptInit->y; + if(box.x1 > x) box.x1 = x; + else if(box.x2 < x) box.x2 = x; + if(box.y1 > y) box.y1 = y; + else if(box.y2 < y) box.y2 = y; + } + } else { + while(--npt) { + pptInit++; + if(box.x1 > pptInit->x) box.x1 = pptInit->x; + else if(box.x2 < pptInit->x) box.x2 = pptInit->x; + if(box.y1 > pptInit->y) box.y1 = pptInit->y; + else if(box.y2 < pptInit->y) box.y2 = pptInit->y; + } + } + + box.x2++; + box.y2++; + + if(extra) { + box.x1 -= extra; + box.x2 += extra; + box.y1 -= extra; + box.y2 += extra; + } + + TRANSLATE_AND_ADD_BOX(box, pGC); + } +} + +static void +xxPolySegment( + DrawablePtr pDraw, + GCPtr pGC, + int nseg, + xSegment *pSeg + ){ + XX_GC_OP_PROLOGUE(pGC, pDraw); + (*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg); + XX_GC_OP_EPILOGUE(pGC, pDraw); + + if(IS_VISIBLE(pDraw) && nseg) { + BoxRec box; + int extra = pGC->lineWidth; + + DBG("PolySegment\n"); + if(pGC->capStyle != CapProjecting) + extra >>= 1; + + if(pSeg->x2 > pSeg->x1) { + box.x1 = pSeg->x1; + box.x2 = pSeg->x2; + } else { + box.x2 = pSeg->x1; + box.x1 = pSeg->x2; + } + + if(pSeg->y2 > pSeg->y1) { + box.y1 = pSeg->y1; + box.y2 = pSeg->y2; + } else { + box.y2 = pSeg->y1; + box.y1 = pSeg->y2; + } + + while(--nseg) { + pSeg++; + if(pSeg->x2 > pSeg->x1) { + if(pSeg->x1 < box.x1) box.x1 = pSeg->x1; + if(pSeg->x2 > box.x2) box.x2 = pSeg->x2; + } else { + if(pSeg->x2 < box.x1) box.x1 = pSeg->x2; + if(pSeg->x1 > box.x2) box.x2 = pSeg->x1; + } + if(pSeg->y2 > pSeg->y1) { + if(pSeg->y1 < box.y1) box.y1 = pSeg->y1; + if(pSeg->y2 > box.y2) box.y2 = pSeg->y2; + } else { + if(pSeg->y2 < box.y1) box.y1 = pSeg->y2; + if(pSeg->y1 > box.y2) box.y2 = pSeg->y1; + } + } + + box.x2++; + box.y2++; + + if(extra) { + box.x1 -= extra; + box.x2 += extra; + box.y1 -= extra; + box.y2 += extra; + } + + TRANSLATE_AND_ADD_BOX(box, pGC); + } +} + +static void +xxPolyRectangle( + DrawablePtr pDraw, + GCPtr pGC, + int nRects, + xRectangle *pRects +){ + XX_GC_OP_PROLOGUE(pGC, pDraw); + (*pGC->ops->PolyRectangle)(pDraw, pGC, nRects, pRects); + XX_GC_OP_EPILOGUE(pGC, pDraw); + + if(IS_VISIBLE(pDraw) && nRects) + { + BoxRec box; + int offset1, offset2, offset3; + + DBG("PolyRectangle\n"); + offset2 = pGC->lineWidth; + if(!offset2) offset2 = 1; + offset1 = offset2 >> 1; + offset3 = offset2 - offset1; + + while(nRects--) + { + box.x1 = pRects->x - offset1; + box.y1 = pRects->y - offset1; + box.x2 = box.x1 + pRects->width + offset2; + box.y2 = box.y1 + offset2; + TRANSLATE_AND_ADD_BOX(box, pGC); + box.x1 = pRects->x - offset1; + box.y1 = pRects->y + offset3; + box.x2 = box.x1 + offset2; + box.y2 = box.y1 + pRects->height - offset2; + TRANSLATE_AND_ADD_BOX(box, pGC); + box.x1 = pRects->x + pRects->width - offset1; + box.y1 = pRects->y + offset3; + box.x2 = box.x1 + offset2; + box.y2 = box.y1 + pRects->height - offset2; + TRANSLATE_AND_ADD_BOX(box, pGC); + box.x1 = pRects->x - offset1; + box.y1 = pRects->y + pRects->height - offset1; + box.x2 = box.x1 + pRects->width + offset2; + box.y2 = box.y1 + offset2; + TRANSLATE_AND_ADD_BOX(box, pGC); + + pRects++; + } + } +} + +static void +xxPolyArc( + DrawablePtr pDraw, + GCPtr pGC, + int narcs, + xArc *parcs +){ + XX_GC_OP_PROLOGUE(pGC, pDraw); + (*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs); + XX_GC_OP_EPILOGUE(pGC, pDraw); + + if(IS_VISIBLE(pDraw) && narcs) { + int extra = pGC->lineWidth >> 1; + BoxRec box; + + DBG("PolyArc\n"); + box.x1 = parcs->x; + box.x2 = box.x1 + parcs->width; + box.y1 = parcs->y; + box.y2 = box.y1 + parcs->height; + + /* should I break these up instead ? */ + + while(--narcs) { + parcs++; + if(box.x1 > parcs->x) box.x1 = parcs->x; + if(box.x2 < (parcs->x + parcs->width)) + box.x2 = parcs->x + parcs->width; + if(box.y1 > parcs->y) box.y1 = parcs->y; + if(box.y2 < (parcs->y + parcs->height)) + box.y2 = parcs->y + parcs->height; + } + + if(extra) { + box.x1 -= extra; + box.x2 += extra; + box.y1 -= extra; + box.y2 += extra; + } + + box.x2++; + box.y2++; + + TRANSLATE_AND_ADD_BOX(box, pGC); + } +} + +static void +xxFillPolygon( + DrawablePtr pDraw, + GCPtr pGC, + int shape, + int mode, + int count, + DDXPointPtr pptInit +){ + XX_GC_OP_PROLOGUE(pGC, pDraw); + + if(IS_VISIBLE(pDraw) && (count > 2)) { + DDXPointPtr ppt = pptInit; + int i = count; + BoxRec box; + + DBG("FillPolygon\n"); + box.x2 = box.x1 = ppt->x; + box.y2 = box.y1 = ppt->y; + + if(mode != CoordModeOrigin) { + int x = box.x1; + int y = box.y1; + while(--i) { + ppt++; + x += ppt->x; + y += ppt->y; + if(box.x1 > x) box.x1 = x; + else if(box.x2 < x) box.x2 = x; + if(box.y1 > y) box.y1 = y; + else if(box.y2 < y) box.y2 = y; + } + } else { + while(--i) { + ppt++; + if(box.x1 > ppt->x) box.x1 = ppt->x; + else if(box.x2 < ppt->x) box.x2 = ppt->x; + if(box.y1 > ppt->y) box.y1 = ppt->y; + else if(box.y2 < ppt->y) box.y2 = ppt->y; + } + } + + box.x2++; + box.y2++; + + (*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, pptInit); + + TRANSLATE_AND_ADD_BOX(box, pGC); + } else + (*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, pptInit); + + XX_GC_OP_EPILOGUE(pGC, pDraw); +} + +static void +xxPolyFillRect( + DrawablePtr pDraw, + GCPtr pGC, + int nRectsInit, + xRectangle *pRectsInit +){ + XX_GC_OP_PROLOGUE(pGC, pDraw); + + if(IS_VISIBLE(pDraw) && nRectsInit) { + BoxRec box; + xRectangle *pRects = pRectsInit; + int nRects = nRectsInit; + + DBG("PolyFillRect\n"); + box.x1 = pRects->x; + box.x2 = box.x1 + pRects->width; + box.y1 = pRects->y; + box.y2 = box.y1 + pRects->height; + + while(--nRects) { + pRects++; + if(box.x1 > pRects->x) box.x1 = pRects->x; + if(box.x2 < (pRects->x + pRects->width)) + box.x2 = pRects->x + pRects->width; + if(box.y1 > pRects->y) box.y1 = pRects->y; + if(box.y2 < (pRects->y + pRects->height)) + box.y2 = pRects->y + pRects->height; + } + + /* cfb messes with the pRectsInit so we have to do our + calculations first */ + + (*pGC->ops->PolyFillRect)(pDraw, pGC, nRectsInit, pRectsInit); + + TRANSLATE_AND_ADD_BOX(box, pGC); + } else + (*pGC->ops->PolyFillRect)(pDraw, pGC, nRectsInit, pRectsInit); + + XX_GC_OP_EPILOGUE(pGC, pDraw); +} + +static void +xxPolyFillArc( + DrawablePtr pDraw, + GCPtr pGC, + int narcs, + xArc *parcs +){ + XX_GC_OP_PROLOGUE(pGC, pDraw); + (*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs); + XX_GC_OP_EPILOGUE(pGC, pDraw); + + if(IS_VISIBLE(pDraw) && narcs) { + BoxRec box; + + DBG("PolyFillArc\n"); + box.x1 = parcs->x; + box.x2 = box.x1 + parcs->width; + box.y1 = parcs->y; + box.y2 = box.y1 + parcs->height; + + /* should I break these up instead ? */ + + while(--narcs) { + parcs++; + if(box.x1 > parcs->x) box.x1 = parcs->x; + if(box.x2 < (parcs->x + parcs->width)) + box.x2 = parcs->x + parcs->width; + if(box.y1 > parcs->y) box.y1 = parcs->y; + if(box.y2 < (parcs->y + parcs->height)) + box.y2 = parcs->y + parcs->height; + } + + TRANSLATE_AND_ADD_BOX(box, pGC); + } +} + +static int +xxPolyText8( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + char *chars +){ + int width; + + XX_GC_OP_PROLOGUE(pGC, pDraw); + width = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars); + XX_GC_OP_EPILOGUE(pGC, pDraw); + + width -= x; + + if(IS_VISIBLE(pDraw) && (width > 0)) { + BoxRec box; + + DBG("PolyText8\n"); + /* ugh */ + box.x1 = pDraw->x + x + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = pDraw->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + if(count > 1) { + if(width > 0) box.x2 += width; + else box.x1 += width; + } + + box.y1 = pDraw->y + y - FONTMAXBOUNDS(pGC->font, ascent); + box.y2 = pDraw->y + y + FONTMAXBOUNDS(pGC->font, descent); + + ADD_BOX(box, pGC); + } + + return (width + x); +} + +static int +xxPolyText16( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + unsigned short *chars +){ + int width; + + XX_GC_OP_PROLOGUE(pGC, pDraw); + width = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars); + XX_GC_OP_EPILOGUE(pGC, pDraw); + + width -= x; + + if(IS_VISIBLE(pDraw) && (width > 0)) { + BoxRec box; + + DBG("PolyText16\n"); + /* ugh */ + box.x1 = pDraw->x + x + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = pDraw->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + if(count > 1) { + if(width > 0) box.x2 += width; + else box.x1 += width; + } + + box.y1 = pDraw->y + y - FONTMAXBOUNDS(pGC->font, ascent); + box.y2 = pDraw->y + y + FONTMAXBOUNDS(pGC->font, descent); + + ADD_BOX(box, pGC); + } + + return (width + x); +} + +static void +xxImageText8( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + char *chars +){ + XX_GC_OP_PROLOGUE(pGC, pDraw); + (*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars); + XX_GC_OP_EPILOGUE(pGC, pDraw); + + if(IS_VISIBLE(pDraw) && count) { + int top, bot, Min, Max; + BoxRec box; + + DBG("ImageText8\n"); + top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); + bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); + + Min = count * FONTMINBOUNDS(pGC->font, characterWidth); + if(Min > 0) Min = 0; + Max = count * FONTMAXBOUNDS(pGC->font, characterWidth); + if(Max < 0) Max = 0; + + /* ugh */ + box.x1 = pDraw->x + x + Min + + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = pDraw->x + x + Max + + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + box.y1 = pDraw->y + y - top; + box.y2 = pDraw->y + y + bot; + + ADD_BOX(box, pGC); + } +} + +static void +xxImageText16( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + unsigned short *chars +){ + XX_GC_OP_PROLOGUE(pGC, pDraw); + (*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars); + XX_GC_OP_EPILOGUE(pGC, pDraw); + + if(IS_VISIBLE(pDraw) && count) { + int top, bot, Min, Max; + BoxRec box; + + DBG("ImageText16\n"); + top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); + bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); + + Min = count * FONTMINBOUNDS(pGC->font, characterWidth); + if(Min > 0) Min = 0; + Max = count * FONTMAXBOUNDS(pGC->font, characterWidth); + if(Max < 0) Max = 0; + + /* ugh */ + box.x1 = pDraw->x + x + Min + + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = pDraw->x + x + Max + + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + box.y1 = pDraw->y + y - top; + box.y2 = pDraw->y + y + bot; + + ADD_BOX(box, pGC); + } +} + +static void +xxImageGlyphBlt( + DrawablePtr pDraw, + GCPtr pGC, + int x, int y, + unsigned int nglyph, + CharInfoPtr *ppci, + pointer pglyphBase +){ + XX_GC_OP_PROLOGUE(pGC, pDraw); + (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, x, y, nglyph, + ppci, pglyphBase); + XX_GC_OP_EPILOGUE(pGC, pDraw); + + if(IS_VISIBLE(pDraw) && nglyph) { + int top, bot, width = 0; + BoxRec box; + + DBG("ImageGlyphBlt\n"); + top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); + bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); + + box.x1 = ppci[0]->metrics.leftSideBearing; + if(box.x1 > 0) box.x1 = 0; + box.x2 = ppci[nglyph - 1]->metrics.rightSideBearing - + ppci[nglyph - 1]->metrics.characterWidth; + if(box.x2 < 0) box.x2 = 0; + + box.x2 += pDraw->x + x; + box.x1 += pDraw->x + x; + + while(nglyph--) { + width += (*ppci)->metrics.characterWidth; + ppci++; + } + + if(width > 0) + box.x2 += width; + else + box.x1 += width; + + box.y1 = pDraw->y + y - top; + box.y2 = pDraw->y + y + bot; + + ADD_BOX(box, pGC); + } +} + +static void +xxPolyGlyphBlt( + DrawablePtr pDraw, + GCPtr pGC, + int x, int y, + unsigned int nglyph, + CharInfoPtr *ppci, + pointer pglyphBase +){ + XX_GC_OP_PROLOGUE(pGC, pDraw); + (*pGC->ops->PolyGlyphBlt)(pDraw, pGC, x, y, nglyph, + ppci, pglyphBase); + XX_GC_OP_EPILOGUE(pGC, pDraw); + + if(IS_VISIBLE(pDraw) && nglyph) { + BoxRec box; + + DBG("PolyGlyphBlt\n"); + /* ugh */ + box.x1 = pDraw->x + x + ppci[0]->metrics.leftSideBearing; + box.x2 = pDraw->x + x + ppci[nglyph - 1]->metrics.rightSideBearing; + + if(nglyph > 1) { + int width = 0; + + while(--nglyph) { + width += (*ppci)->metrics.characterWidth; + ppci++; + } + + if(width > 0) box.x2 += width; + else box.x1 += width; + } + + box.y1 = pDraw->y + y - FONTMAXBOUNDS(pGC->font, ascent); + box.y2 = pDraw->y + y + FONTMAXBOUNDS(pGC->font, descent); + + ADD_BOX(box, pGC); + } +} + +static void +xxPushPixels( + GCPtr pGC, + PixmapPtr pBitMap, + DrawablePtr pDraw, + int dx, int dy, int xOrg, int yOrg +){ + XX_GC_OP_PROLOGUE(pGC, pDraw); + (*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg); + XX_GC_OP_EPILOGUE(pGC, pDraw); + + if(IS_VISIBLE(pDraw)) { + BoxRec box; + + DBG("PushPixels\n"); + box.x1 = xOrg + pDraw->x; + box.x2 = box.x1 + dx; + box.y1 = yOrg + pDraw->y; + box.y2 = box.y1 + dy; + + ADD_BOX(box, pGC); + } +} + + +#ifdef RENDER +#define RENDER_MAKE_BOX(pDrawable,X,Y,W,H) { \ + box.x1 = X + pDrawable->x; \ + box.x2 = X + pDrawable->x + W; \ + box.y1 = Y + pDrawable->y; \ + box.y2 = Y + pDrawable->y + H; \ +} + +#define RENDER_ADD_BOX(pScreen,box) {\ + if (BOX_NOT_EMPTY(box)) { \ + RegionRec region; \ + xxScrPriv(pScreen);\ + ScreenPtr pScreen = pScreen;\ + REGION_INIT (pScreen, ®ion, &box, 1); \ + PRINT_RECTS(pScrPriv->region);\ + REGION_UNION(pScreen,&pScrPriv->region,&pScrPriv->region,®ion);\ + PRINT_RECTS(pScrPriv->region);\ + REGION_UNINIT(pScreen,®ion);\ + }\ +} + +static void +xxComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, + INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, + INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + xxScrPriv(pScreen); + BoxRec box; + + unwrap (pScrPriv, ps, Composite); + (*ps->Composite) (op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, + xDst, yDst, width, height); + wrap (pScrPriv, ps, Composite, xxComposite); + if (pDst->pDrawable->type == DRAWABLE_WINDOW) { + RENDER_MAKE_BOX(pDst->pDrawable, xDst, yDst, width, height); + RENDER_ADD_BOX(pScreen,box); + } +} + + +static void +xxGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, + GlyphListPtr list, GlyphPtr *glyphs) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + xxScrPriv(pScreen); + int x, y; + int n; + GlyphPtr glyph; + BoxRec box; + + unwrap (pScrPriv, ps, Glyphs); + (*ps->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc, + nlist, list, glyphs); + wrap (pScrPriv, ps, Glyphs, xxGlyphs); + if (pDst->pDrawable->type == DRAWABLE_WINDOW) + { + x = xSrc; + y = ySrc; + while (nlist--) + { + x += list->xOff; + y += list->yOff; + n = list->len; + while (n--) + { + glyph = *glyphs++; + RENDER_MAKE_BOX(pDst->pDrawable, + x - glyph->info.x, y - glyph->info.y, + glyph->info.width, glyph->info.height); + RENDER_ADD_BOX(pScreen,box); + x += glyph->info.xOff; + y += glyph->info.yOff; + } + list++; + } + } +} +#endif + +void +xxPrintVisuals(void) +{ + int k,i,j; + DepthPtr pDepth; + VisualPtr pVisual; + + for (k = 0; k < screenInfo.numScreens; k++) { + ScreenPtr pScreen = screenInfo.screens[k]; + + pDepth = pScreen->allowedDepths; + for (i = 0; i < pScreen->numDepths; i++, pDepth++) + for (j = 0; j < pDepth->numVids; j++) { + ErrorF("depth: %i vid: 0x%lx\n", + pDepth->depth, pDepth->vids[j]); + } + + pVisual = pScreen->visuals; + for (i = 0; i < pScreen->numVisuals; i++, pVisual++) + ErrorF("vid: 0x%x rm: 0x%lx gm: 0x%lx bm: 0x%lx\n", + (unsigned int)pVisual->vid, + pVisual->redMask, + pVisual->greenMask, + pVisual->blueMask); + } +} + + diff --git a/xorg-server-1.4/fb/fbpseudocolor.h b/xorg-server-1.4/fb/fbpseudocolor.h new file mode 100644 index 0000000..64de71d --- /dev/null +++ b/xorg-server-1.4/fb/fbpseudocolor.h @@ -0,0 +1,20 @@ +#ifndef _FB_XX_H_ +# define _FB_XX_H_ + +typedef void (*xxSyncFunc)(ScreenPtr); +extern Bool xxSetup(ScreenPtr pScreen, int myDepth, + int baseDepth, char *addr, xxSyncFunc sync); +extern void xxPrintVisuals(void); + + +#endif /* _FB_XX_H_ */ + + + + + + + + + + diff --git a/xorg-server-1.4/fb/fbpush.c b/xorg-server-1.4/fb/fbpush.c new file mode 100644 index 0000000..891572f --- /dev/null +++ b/xorg-server-1.4/fb/fbpush.c @@ -0,0 +1,245 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbPushPattern (DrawablePtr pDrawable, + GCPtr pGC, + + FbStip *src, + FbStride srcStride, + int srcX, + + int x, + int y, + + int width, + int height) +{ + FbStip *s, bitsMask, bitsMask0, bits; + int xspan; + int w; + int lenspan; + + src += srcX >> FB_STIP_SHIFT; + srcX &= FB_STIP_MASK; + + bitsMask0 = FbStipMask (srcX, 1); + + while (height--) + { + bitsMask = bitsMask0; + w = width; + s = src; + src += srcStride; + bits = READ(s++); + xspan = x; + while (w) + { + if (bits & bitsMask) + { + lenspan = 0; + do + { + lenspan++; + if (lenspan == w) + break; + bitsMask = FbStipRight (bitsMask, 1); + if (!bitsMask) + { + bits = READ(s++); + bitsMask = FbBitsMask(0,1); + } + } while (bits & bitsMask); + fbFill (pDrawable, pGC, xspan, y, lenspan, 1); + xspan += lenspan; + w -= lenspan; + } + else + { + do + { + w--; + xspan++; + if (!w) + break; + bitsMask = FbStipRight (bitsMask, 1); + if (!bitsMask) + { + bits = READ(s++); + bitsMask = FbBitsMask(0,1); + } + } while (!(bits & bitsMask)); + } + } + y++; + } +} + +void +fbPushFill (DrawablePtr pDrawable, + GCPtr pGC, + + FbStip *src, + FbStride srcStride, + int srcX, + + int x, + int y, + int width, + int height) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + + if (pGC->fillStyle == FillSolid) + { + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + int dstX; + int dstWidth; + + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + dst = dst + (y + dstYoff) * dstStride; + dstX = (x + dstXoff) * dstBpp; + dstWidth = width * dstBpp; + if (dstBpp == 1) + { + fbBltStip (src, + srcStride, + srcX, + + (FbStip *) dst, + FbBitsStrideToStipStride (dstStride), + dstX, + + dstWidth, + height, + + FbStipple1Rop(pGC->alu,pGC->fgPixel), + pPriv->pm, + dstBpp); + } + else + { + fbBltOne (src, + srcStride, + srcX, + + dst, + dstStride, + dstX, + dstBpp, + + dstWidth, + height, + + pPriv->and, pPriv->xor, + fbAnd(GXnoop,(FbBits) 0,FB_ALLONES), + fbXor(GXnoop,(FbBits) 0,FB_ALLONES)); + } + fbFinishAccess (pDrawable); + } + else + { + fbPushPattern (pDrawable, pGC, src, srcStride, srcX, + x, y, width, height); + } +} + +void +fbPushImage (DrawablePtr pDrawable, + GCPtr pGC, + + FbStip *src, + FbStride srcStride, + int srcX, + + int x, + int y, + int width, + int height) +{ + RegionPtr pClip = fbGetCompositeClip (pGC); + int nbox; + BoxPtr pbox; + int x1, y1, x2, y2; + + for (nbox = REGION_NUM_RECTS (pClip), + pbox = REGION_RECTS(pClip); + nbox--; + pbox++) + { + x1 = x; + y1 = y; + x2 = x + width; + y2 = y + height; + if (x1 < pbox->x1) + x1 = pbox->x1; + if (y1 < pbox->y1) + y1 = pbox->y1; + if (x2 > pbox->x2) + x2 = pbox->x2; + if (y2 > pbox->y2) + y2 = pbox->y2; + if (x1 >= x2 || y1 >= y2) + continue; + fbPushFill (pDrawable, + pGC, + + src + (y1 - y) * srcStride, + srcStride, + srcX + (x1 - x), + + x1, + y1, + x2 - x1, + y2 - y1); + } +} + +void +fbPushPixels (GCPtr pGC, + PixmapPtr pBitmap, + DrawablePtr pDrawable, + int dx, + int dy, + int xOrg, + int yOrg) +{ + FbStip *stip; + FbStride stipStride; + int stipBpp; + int stipXoff, stipYoff; /* Assumed to be zero */ + + fbGetStipDrawable (&pBitmap->drawable, stip, stipStride, stipBpp, stipXoff, stipYoff); + + fbPushImage (pDrawable, pGC, + stip, stipStride, 0, + xOrg, yOrg, dx, dy); +} diff --git a/xorg-server-1.4/fb/fbrop.h b/xorg-server-1.4/fb/fbrop.h new file mode 100644 index 0000000..1685ee8 --- /dev/null +++ b/xorg-server-1.4/fb/fbrop.h @@ -0,0 +1,136 @@ +/* + * Copyright © 1998 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 _FBROP_H_ +#define _FBROP_H_ + +typedef struct _mergeRopBits { + FbBits ca1, cx1, ca2, cx2; +} FbMergeRopRec, *FbMergeRopPtr; + +extern const FbMergeRopRec FbMergeRopBits[16]; + +#define FbDeclareMergeRop() FbBits _ca1, _cx1, _ca2, _cx2; +#define FbDeclarePrebuiltMergeRop() FbBits _cca, _ccx; + +#define FbInitializeMergeRop(alu,pm) {\ + const FbMergeRopRec *_bits; \ + _bits = &FbMergeRopBits[alu]; \ + _ca1 = _bits->ca1 & pm; \ + _cx1 = _bits->cx1 | ~pm; \ + _ca2 = _bits->ca2 & pm; \ + _cx2 = _bits->cx2 & pm; \ +} + +#define FbDestInvarientRop(alu,pm) ((pm) == FB_ALLONES && \ + (((alu) >> 1 & 5) == ((alu) & 5))) + +#define FbDestInvarientMergeRop() (_ca1 == 0 && _cx1 == 0) + +/* AND has higher precedence than XOR */ + +#define FbDoMergeRop(src, dst) \ + (((dst) & (((src) & _ca1) ^ _cx1)) ^ (((src) & _ca2) ^ _cx2)) + +#define FbDoDestInvarientMergeRop(src) (((src) & _ca2) ^ _cx2) + +#define FbDoMaskMergeRop(src, dst, mask) \ + (((dst) & ((((src) & _ca1) ^ _cx1) | ~(mask))) ^ ((((src) & _ca2) ^ _cx2) & (mask))) + +#define FbDoLeftMaskByteMergeRop(dst, src, lb, l) { \ + FbBits __xor = ((src) & _ca2) ^ _cx2; \ + FbDoLeftMaskByteRRop(dst,lb,l,((src) & _ca1) ^ _cx1,__xor); \ +} + +#define FbDoRightMaskByteMergeRop(dst, src, rb, r) { \ + FbBits __xor = ((src) & _ca2) ^ _cx2; \ + FbDoRightMaskByteRRop(dst,rb,r,((src) & _ca1) ^ _cx1,__xor); \ +} + +#define FbDoRRop(dst, and, xor) (((dst) & (and)) ^ (xor)) + +#define FbDoMaskRRop(dst, and, xor, mask) \ + (((dst) & ((and) | ~(mask))) ^ (xor & mask)) + +/* + * Take a single bit (0 or 1) and generate a full mask + */ +#define fbFillFromBit(b,t) (~((t) ((b) & 1)-1)) + +#define fbXorT(rop,fg,pm,t) ((((fg) & fbFillFromBit((rop) >> 1,t)) | \ + (~(fg) & fbFillFromBit((rop) >> 3,t))) & (pm)) + +#define fbAndT(rop,fg,pm,t) ((((fg) & fbFillFromBit (rop ^ (rop>>1),t)) | \ + (~(fg) & fbFillFromBit((rop>>2) ^ (rop>>3),t))) | \ + ~(pm)) + +#define fbXor(rop,fg,pm) fbXorT(rop,fg,pm,FbBits) + +#define fbAnd(rop,fg,pm) fbAndT(rop,fg,pm,FbBits) + +#define fbXorStip(rop,fg,pm) fbXorT(rop,fg,pm,FbStip) + +#define fbAndStip(rop,fg,pm) fbAndT(rop,fg,pm,FbStip) + +/* + * Stippling operations; + */ + +extern const FbBits fbStipple16Bits[256]; /* half of table */ +#define FbStipple16Bits(b) \ + (fbStipple16Bits[(b)&0xff] | fbStipple16Bits[(b) >> 8] << FB_HALFUNIT) +extern const FbBits fbStipple8Bits[256]; +extern const FbBits fbStipple4Bits[16]; +extern const FbBits fbStipple2Bits[4]; +extern const FbBits fbStipple1Bits[2]; +extern const FbBits *const fbStippleTable[]; + +#define FbStippleRRop(dst, b, fa, fx, ba, bx) \ + (FbDoRRop(dst, fa, fx) & b) | (FbDoRRop(dst, ba, bx) & ~b) + +#define FbStippleRRopMask(dst, b, fa, fx, ba, bx, m) \ + (FbDoMaskRRop(dst, fa, fx, m) & (b)) | (FbDoMaskRRop(dst, ba, bx, m) & ~(b)) + +#define FbDoLeftMaskByteStippleRRop(dst, b, fa, fx, ba, bx, lb, l) { \ + FbBits __xor = ((fx) & (b)) | ((bx) & ~(b)); \ + FbDoLeftMaskByteRRop(dst, lb, l, ((fa) & (b)) | ((ba) & ~(b)), __xor); \ +} + +#define FbDoRightMaskByteStippleRRop(dst, b, fa, fx, ba, bx, rb, r) { \ + FbBits __xor = ((fx) & (b)) | ((bx) & ~(b)); \ + FbDoRightMaskByteRRop(dst, rb, r, ((fa) & (b)) | ((ba) & ~(b)), __xor); \ +} + +#define FbOpaqueStipple(b, fg, bg) (((fg) & (b)) | ((bg) & ~(b))) + +/* + * Compute rop for using tile code for 1-bit dest stipples; modifies + * existing rop to flip depending on pixel values + */ +#define FbStipple1RopPick(alu,b) (((alu) >> (2 - (((b) & 1) << 1))) & 3) + +#define FbOpaqueStipple1Rop(alu,fg,bg) (FbStipple1RopPick(alu,fg) | \ + (FbStipple1RopPick(alu,bg) << 2)) + +#define FbStipple1Rop(alu,fg) (FbStipple1RopPick(alu,fg) | 4) + +#endif diff --git a/xorg-server-1.4/fb/fbscreen.c b/xorg-server-1.4/fb/fbscreen.c new file mode 100644 index 0000000..94033f1 --- /dev/null +++ b/xorg-server-1.4/fb/fbscreen.c @@ -0,0 +1,307 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +Bool +fbCloseScreen (int index, ScreenPtr pScreen) +{ + int d; + DepthPtr depths = pScreen->allowedDepths; + + for (d = 0; d < pScreen->numDepths; d++) + xfree (depths[d].vids); + xfree (depths); + xfree (pScreen->visuals); + xfree (pScreen->devPrivate); +#ifdef FB_SCREEN_PRIVATE + xfree (pScreen->devPrivates[fbScreenPrivateIndex].ptr); +#endif + return TRUE; +} + +Bool +fbRealizeFont(ScreenPtr pScreen, FontPtr pFont) +{ + return (TRUE); +} + +Bool +fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont) +{ + return (TRUE); +} + +void +fbQueryBestSize (int class, + unsigned short *width, unsigned short *height, + ScreenPtr pScreen) +{ + unsigned short w; + + switch (class) { + case CursorShape: + if (*width > pScreen->width) + *width = pScreen->width; + if (*height > pScreen->height) + *height = pScreen->height; + break; + case TileShape: + case StippleShape: + w = *width; + if ((w & (w - 1)) && w < FB_UNIT) + { + for (w = 1; w < *width; w <<= 1) + ; + *width = w; + } + } +} + +PixmapPtr +_fbGetWindowPixmap (WindowPtr pWindow) +{ + return fbGetWindowPixmap (pWindow); +} + +void +_fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap) +{ +#ifdef FB_NO_WINDOW_PIXMAPS + FatalError ("Attempted to set window pixmap without fb support\n"); +#else + pWindow->devPrivates[fbWinPrivateIndex].ptr = (pointer) pPixmap; +#endif +} + +Bool +fbSetupScreen(ScreenPtr pScreen, + pointer pbits, /* pointer to screen bitmap */ + int xsize, /* in pixels */ + int ysize, + int dpix, /* dots per inch */ + int dpiy, + int width, /* pixel width of frame buffer */ + int bpp) /* bits per pixel for screen */ +{ + if (!fbAllocatePrivates(pScreen, (int *) 0)) + return FALSE; + pScreen->defColormap = FakeClientID(0); + /* let CreateDefColormap do whatever it wants for pixels */ + pScreen->blackPixel = pScreen->whitePixel = (Pixel) 0; + pScreen->QueryBestSize = fbQueryBestSize; + /* SaveScreen */ + pScreen->GetImage = fbGetImage; + pScreen->GetSpans = fbGetSpans; + pScreen->CreateWindow = fbCreateWindow; + pScreen->DestroyWindow = fbDestroyWindow; + pScreen->PositionWindow = fbPositionWindow; + pScreen->ChangeWindowAttributes = fbChangeWindowAttributes; + pScreen->RealizeWindow = fbMapWindow; + pScreen->UnrealizeWindow = fbUnmapWindow; + pScreen->PaintWindowBackground = fbPaintWindow; + pScreen->PaintWindowBorder = fbPaintWindow; + pScreen->CopyWindow = fbCopyWindow; + pScreen->CreatePixmap = fbCreatePixmap; + pScreen->DestroyPixmap = fbDestroyPixmap; + pScreen->RealizeFont = fbRealizeFont; + pScreen->UnrealizeFont = fbUnrealizeFont; + pScreen->CreateGC = fbCreateGC; + pScreen->CreateColormap = fbInitializeColormap; + pScreen->DestroyColormap = (void (*)(ColormapPtr))NoopDDA; + pScreen->InstallColormap = fbInstallColormap; + pScreen->UninstallColormap = fbUninstallColormap; + pScreen->ListInstalledColormaps = fbListInstalledColormaps; + pScreen->StoreColors = (void (*)(ColormapPtr, int, xColorItem *))NoopDDA; + pScreen->ResolveColor = fbResolveColor; + pScreen->BitmapToRegion = fbPixmapToRegion; + + pScreen->GetWindowPixmap = _fbGetWindowPixmap; + pScreen->SetWindowPixmap = _fbSetWindowPixmap; + + pScreen->BackingStoreFuncs.SaveAreas = fbSaveAreas; + pScreen->BackingStoreFuncs.RestoreAreas = fbRestoreAreas; + pScreen->BackingStoreFuncs.SetClipmaskRgn = 0; + pScreen->BackingStoreFuncs.GetImagePixmap = 0; + pScreen->BackingStoreFuncs.GetSpansPixmap = 0; + + return TRUE; +} + +#ifdef FB_ACCESS_WRAPPER +Bool +wfbFinishScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp, + SetupWrapProcPtr setupWrap, + FinishWrapProcPtr finishWrap) +#else +Bool +fbFinishScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp) +#endif +{ + VisualPtr visuals; + DepthPtr depths; + int nvisuals; + int ndepths; + int rootdepth; + VisualID defaultVisual; + int imagebpp = bpp; + +#ifdef FB_DEBUG + int stride; + + ysize -= 2; + stride = (width * bpp) / 8; + fbSetBits ((FbStip *) pbits, + stride / sizeof (FbStip), FB_HEAD_BITS); + pbits = (void *) ((char *) pbits + stride); + fbSetBits ((FbStip *) ((char *) pbits + stride * ysize), + stride / sizeof (FbStip), FB_TAIL_BITS); +#endif + /* + * By default, a 24bpp screen will use 32bpp images, this avoids + * problems with many applications which just can't handle packed + * pixels. If you want real 24bit images, include a 24bpp + * format in the pixmap formats + */ +#ifdef FB_24_32BIT + if (bpp == 24) + { + int f; + + imagebpp = 32; + /* + * Check to see if we're advertising a 24bpp image format, + * in which case windows will use it in preference to a 32 bit + * format. + */ + for (f = 0; f < screenInfo.numPixmapFormats; f++) + { + if (screenInfo.formats[f].bitsPerPixel == 24) + { + imagebpp = 24; + break; + } + } + } +#endif +#ifdef FB_SCREEN_PRIVATE + if (imagebpp == 32) + { + fbGetScreenPrivate(pScreen)->win32bpp = bpp; + fbGetScreenPrivate(pScreen)->pix32bpp = bpp; + } + else + { + fbGetScreenPrivate(pScreen)->win32bpp = 32; + fbGetScreenPrivate(pScreen)->pix32bpp = 32; + } +#ifdef FB_ACCESS_WRAPPER + fbGetScreenPrivate(pScreen)->setupWrap = setupWrap; + fbGetScreenPrivate(pScreen)->finishWrap = finishWrap; +#endif +#endif + rootdepth = 0; + if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth, + &defaultVisual,((unsigned long)1<<(imagebpp-1)), 8)) + return FALSE; + if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, + rootdepth, ndepths, depths, + defaultVisual, nvisuals, visuals)) + return FALSE; + /* overwrite miCloseScreen with our own */ + pScreen->CloseScreen = fbCloseScreen; +#ifdef FB_24_32BIT + if (bpp == 24 && imagebpp == 32) + { + pScreen->ModifyPixmapHeader = fb24_32ModifyPixmapHeader; + pScreen->CreateScreenResources = fb24_32CreateScreenResources; + } +#endif +#if 0 + /* leave backing store initialization to the enclosing code so + * it can choose the correct order of wrappers + */ + /* init backing store here so we can overwrite CloseScreen without stepping + * on the backing store wrapped version */ + fbInitializeBackingStore (pScreen); +#endif + return TRUE; +} + +/* dts * (inch/dot) * (25.4 mm / inch) = mm */ +#ifdef FB_ACCESS_WRAPPER +Bool +wfbScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp, + SetupWrapProcPtr setupWrap, + FinishWrapProcPtr finishWrap) +{ + if (!fbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp)) + return FALSE; + if (!wfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, + width, bpp, setupWrap, finishWrap)) + return FALSE; + return TRUE; +} +#else +Bool +fbScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp) +{ + if (!fbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp)) + return FALSE; + if (!fbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, + width, bpp)) + return FALSE; + return TRUE; +} +#endif diff --git a/xorg-server-1.4/fb/fbseg.c b/xorg-server-1.4/fb/fbseg.c new file mode 100644 index 0000000..80ce740 --- /dev/null +++ b/xorg-server-1.4/fb/fbseg.c @@ -0,0 +1,734 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" +#include "miline.h" + +#define fbBresShiftMask(mask,dir,bpp) ((bpp == FB_STIP_UNIT) ? 0 : \ + ((dir < 0) ? FbStipLeft(mask,bpp) : \ + FbStipRight(mask,bpp))) + +void +fbBresSolid (DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x1, + int y1, + int e, + int e1, + int e3, + int len) +{ + FbStip *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); + FbStip and = (FbStip) pPriv->and; + FbStip xor = (FbStip) pPriv->xor; + FbStip mask, mask0; + FbStip bits; + + fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + dst += ((y1 + dstYoff) * dstStride); + x1 = (x1 + dstXoff) * dstBpp; + dst += x1 >> FB_STIP_SHIFT; + x1 &= FB_STIP_MASK; + mask0 = FbStipMask(0, dstBpp); + mask = FbStipRight (mask0, x1); + if (signdx < 0) + mask0 = FbStipRight (mask0, FB_STIP_UNIT - dstBpp); + if (signdy < 0) + dstStride = -dstStride; + if (axis == X_AXIS) + { + bits = 0; + while (len--) + { + bits |= mask; + mask = fbBresShiftMask(mask,signdx,dstBpp); + if (!mask) + { + WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits)); + bits = 0; + dst += signdx; + mask = mask0; + } + e += e1; + if (e >= 0) + { + WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits)); + bits = 0; + dst += dstStride; + e += e3; + } + } + if (bits) + WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits)); + } + else + { + while (len--) + { + WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, mask)); + dst += dstStride; + e += e1; + if (e >= 0) + { + e += e3; + mask = fbBresShiftMask(mask,signdx,dstBpp); + if (!mask) + { + dst += signdx; + mask = mask0; + } + } + } + } + + fbFinishAccess (pDrawable); +} + +void +fbBresDash (DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x1, + int y1, + int e, + int e1, + int e3, + int len) +{ + FbStip *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); + FbStip and = (FbStip) pPriv->and; + FbStip xor = (FbStip) pPriv->xor; + FbStip bgand = (FbStip) pPriv->bgand; + FbStip bgxor = (FbStip) pPriv->bgxor; + FbStip mask, mask0; + FbDashDeclare; + int dashlen; + Bool even; + Bool doOdd; + + fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + doOdd = pGC->lineStyle == LineDoubleDash; + + FbDashInit (pGC, pPriv, dashOffset, dashlen, even); + + dst += ((y1 + dstYoff) * dstStride); + x1 = (x1 + dstXoff) * dstBpp; + dst += x1 >> FB_STIP_SHIFT; + x1 &= FB_STIP_MASK; + mask0 = FbStipMask(0, dstBpp); + mask = FbStipRight (mask0, x1); + if (signdx < 0) + mask0 = FbStipRight (mask0, FB_STIP_UNIT - dstBpp); + if (signdy < 0) + dstStride = -dstStride; + while (len--) + { + if (even) + WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, mask)); + else if (doOdd) + WRITE(dst, FbDoMaskRRop (READ(dst), bgand, bgxor, mask)); + if (axis == X_AXIS) + { + mask = fbBresShiftMask(mask,signdx,dstBpp); + if (!mask) + { + dst += signdx; + mask = mask0; + } + e += e1; + if (e >= 0) + { + dst += dstStride; + e += e3; + } + } + else + { + dst += dstStride; + e += e1; + if (e >= 0) + { + e += e3; + mask = fbBresShiftMask(mask,signdx,dstBpp); + if (!mask) + { + dst += signdx; + mask = mask0; + } + } + } + FbDashStep (dashlen, even); + } + + fbFinishAccess (pDrawable); +} + +void +fbBresFill (DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x1, + int y1, + int e, + int e1, + int e3, + int len) +{ + while (len--) + { + fbFill (pDrawable, pGC, x1, y1, 1, 1); + if (axis == X_AXIS) + { + x1 += signdx; + e += e1; + if (e >= 0) + { + e += e3; + y1 += signdy; + } + } + else + { + y1 += signdy; + e += e1; + if (e >= 0) + { + e += e3; + x1 += signdx; + } + } + } +} + +static void +fbSetFg (DrawablePtr pDrawable, + GCPtr pGC, + Pixel fg) +{ + if (fg != pGC->fgPixel) + { + DoChangeGC (pGC, GCForeground, (XID *) &fg, FALSE); + ValidateGC (pDrawable, pGC); + } +} + +void +fbBresFillDash (DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x1, + int y1, + int e, + int e1, + int e3, + int len) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); + FbDashDeclare; + int dashlen; + Bool even; + Bool doOdd; + Bool doBg; + Pixel fg, bg; + + fg = pGC->fgPixel; + bg = pGC->bgPixel; + + /* whether to fill the odd dashes */ + doOdd = pGC->lineStyle == LineDoubleDash; + /* whether to switch fg to bg when filling odd dashes */ + doBg = doOdd && (pGC->fillStyle == FillSolid || + pGC->fillStyle == FillStippled); + + /* compute current dash position */ + FbDashInit (pGC, pPriv, dashOffset, dashlen, even); + + while (len--) + { + if (even || doOdd) + { + if (doBg) + { + if (even) + fbSetFg (pDrawable, pGC, fg); + else + fbSetFg (pDrawable, pGC, bg); + } + fbFill (pDrawable, pGC, x1, y1, 1, 1); + } + if (axis == X_AXIS) + { + x1 += signdx; + e += e1; + if (e >= 0) + { + e += e3; + y1 += signdy; + } + } + else + { + y1 += signdy; + e += e1; + if (e >= 0) + { + e += e3; + x1 += signdx; + } + } + FbDashStep (dashlen, even); + } + if (doBg) + fbSetFg (pDrawable, pGC, fg); +} + +#ifdef FB_24BIT +static void +fbBresSolid24RRop (DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x1, + int y1, + int e, + int e1, + int e3, + int len) +{ + FbStip *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); + FbStip and = pPriv->and; + FbStip xor = pPriv->xor; + FbStip leftMask, rightMask; + int nl; + FbStip *d; + int x; + int rot; + FbStip andT, xorT; + + fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + dst += ((y1 + dstYoff) * dstStride); + x1 = (x1 + dstXoff) * 24; + if (signdy < 0) + dstStride = -dstStride; + signdx *= 24; + while (len--) + { + d = dst + (x1 >> FB_STIP_SHIFT); + x = x1 & FB_STIP_MASK; + rot = FbFirst24Rot (x); + andT = FbRot24Stip(and,rot); + xorT = FbRot24Stip(xor,rot); + FbMaskStip (x, 24, leftMask, nl, rightMask); + if (leftMask) + { + WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask)); + d++; + andT = FbNext24Stip (andT); + xorT = FbNext24Stip (xorT); + } + if (rightMask) + WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, rightMask)); + if (axis == X_AXIS) + { + x1 += signdx; + e += e1; + if (e >= 0) + { + e += e3; + dst += dstStride; + } + } + else + { + dst += dstStride; + e += e1; + if (e >= 0) + { + e += e3; + x1 += signdx; + } + } + } + + fbFinishAccess (pDrawable); +} + +static void +fbBresDash24RRop (DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x1, + int y1, + int e, + int e1, + int e3, + int len) +{ + FbStip *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); + FbStip andT, xorT; + FbStip fgand = pPriv->and; + FbStip fgxor = pPriv->xor; + FbStip bgand = pPriv->bgand; + FbStip bgxor = pPriv->bgxor; + FbStip leftMask, rightMask; + int nl; + FbStip *d; + int x; + int rot; + FbDashDeclare; + int dashlen; + Bool even; + Bool doOdd; + + fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + doOdd = pGC->lineStyle == LineDoubleDash; + + /* compute current dash position */ + FbDashInit(pGC, pPriv, dashOffset, dashlen, even); + + dst += ((y1 + dstYoff) * dstStride); + x1 = (x1 + dstXoff) * 24; + if (signdy < 0) + dstStride = -dstStride; + signdx *= 24; + while (len--) + { + if (even || doOdd) + { + if (even) + { + andT = fgand; + xorT = fgxor; + } + else + { + andT = bgand; + xorT = bgxor; + } + d = dst + (x1 >> FB_STIP_SHIFT); + x = x1 & FB_STIP_MASK; + rot = FbFirst24Rot (x); + andT = FbRot24Stip (andT, rot); + xorT = FbRot24Stip (xorT, rot); + FbMaskStip (x, 24, leftMask, nl, rightMask); + if (leftMask) + { + WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask)); + d++; + andT = FbNext24Stip (andT); + xorT = FbNext24Stip (xorT); + } + if (rightMask) + WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, rightMask)); + } + if (axis == X_AXIS) + { + x1 += signdx; + e += e1; + if (e >= 0) + { + e += e3; + dst += dstStride; + } + } + else + { + dst += dstStride; + e += e1; + if (e >= 0) + { + e += e3; + x1 += signdx; + } + } + FbDashStep (dashlen, even); + } + + fbFinishAccess (pDrawable); +} +#endif + +/* + * For drivers that want to bail drawing some lines, this + * function takes care of selecting the appropriate rasterizer + * based on the contents of the specified GC. + */ + +FbBres * +fbSelectBres (DrawablePtr pDrawable, + GCPtr pGC) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + int dstBpp = pDrawable->bitsPerPixel; + FbBres * bres; + + if (pGC->lineStyle == LineSolid) + { + bres = fbBresFill; + if (pGC->fillStyle == FillSolid) + { + bres = fbBresSolid; +#ifdef FB_24BIT + if (dstBpp == 24) + bres = fbBresSolid24RRop; +#endif +#ifndef FBNOPIXADDR + if (pPriv->and == 0) + { + switch (dstBpp) { + case 8: bres = fbBresSolid8; break; + case 16: bres = fbBresSolid16; break; +#ifdef FB_24BIT + case 24: bres = fbBresSolid24; break; +#endif + case 32: bres = fbBresSolid32; break; + } + } +#endif + } + } + else + { + bres = fbBresFillDash; + if (pGC->fillStyle == FillSolid) + { + bres = fbBresDash; +#ifdef FB_24BIT + if (dstBpp == 24) + bres = fbBresDash24RRop; +#endif +#ifndef FBNOPIXADDR + if (pPriv->and == 0 && + (pGC->lineStyle == LineOnOffDash || pPriv->bgand == 0)) + { + switch (dstBpp) { + case 8: bres = fbBresDash8; break; + case 16: bres = fbBresDash16; break; +#ifdef FB_24BIT + case 24: bres = fbBresDash24; break; +#endif + case 32: bres = fbBresDash32; break; + } + } +#endif + } + } + return bres; +} + +void +fbBres (DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, + int x1, + int y1, + int e, + int e1, + int e3, + int len) +{ + (*fbSelectBres (pDrawable, pGC)) (pDrawable, pGC, dashOffset, + signdx, signdy, axis, x1, y1, + e, e1, e3, len); +} + +void +fbSegment (DrawablePtr pDrawable, + GCPtr pGC, + int x1, + int y1, + int x2, + int y2, + Bool drawLast, + int *dashOffset) +{ + FbBres * bres; + RegionPtr pClip = fbGetCompositeClip(pGC); + BoxPtr pBox; + int nBox; + int adx; /* abs values of dx and dy */ + int ady; + int signdx; /* sign of dx and dy */ + int signdy; + int e, e1, e2, e3; /* bresenham error and increments */ + int len; /* length of segment */ + int axis; /* major axis */ + int octant; + int dashoff; + int doff; + unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); + unsigned int oc1; /* outcode of point 1 */ + unsigned int oc2; /* outcode of point 2 */ + + nBox = REGION_NUM_RECTS (pClip); + pBox = REGION_RECTS (pClip); + + bres = fbSelectBres (pDrawable, pGC); + + CalcLineDeltas(x1, y1, x2, y2, adx, ady, signdx, signdy, + 1, 1, octant); + + if (adx > ady) + { + axis = X_AXIS; + e1 = ady << 1; + e2 = e1 - (adx << 1); + e = e1 - adx; + len = adx; + } + else + { + axis = Y_AXIS; + e1 = adx << 1; + e2 = e1 - (ady << 1); + e = e1 - ady; + SetYMajorOctant(octant); + len = ady; + } + + FIXUP_ERROR (e, octant, bias); + + /* + * Adjust error terms to compare against zero + */ + e3 = e2 - e1; + e = e - e1; + + /* we have bresenham parameters and two points. + all we have to do now is clip and draw. + */ + + if (drawLast) + len++; + dashoff = *dashOffset; + *dashOffset = dashoff + len; + while(nBox--) + { + oc1 = 0; + oc2 = 0; + OUTCODES(oc1, x1, y1, pBox); + OUTCODES(oc2, x2, y2, pBox); + if ((oc1 | oc2) == 0) + { + (*bres) (pDrawable, pGC, dashoff, + signdx, signdy, axis, x1, y1, + e, e1, e3, len); + break; + } + else if (oc1 & oc2) + { + pBox++; + } + else + { + int new_x1 = x1, new_y1 = y1, new_x2 = x2, new_y2 = y2; + int clip1 = 0, clip2 = 0; + int clipdx, clipdy; + int err; + + if (miZeroClipLine(pBox->x1, pBox->y1, pBox->x2-1, + pBox->y2-1, + &new_x1, &new_y1, &new_x2, &new_y2, + adx, ady, &clip1, &clip2, + octant, bias, oc1, oc2) == -1) + { + pBox++; + continue; + } + + if (axis == X_AXIS) + len = abs(new_x2 - new_x1); + else + len = abs(new_y2 - new_y1); + if (clip2 != 0 || drawLast) + len++; + if (len) + { + /* unwind bresenham error term to first point */ + doff = dashoff; + err = e; + if (clip1) + { + clipdx = abs(new_x1 - x1); + clipdy = abs(new_y1 - y1); + if (axis == X_AXIS) + { + doff += clipdx; + err += e3 * clipdy + e1 * clipdx; + } + else + { + doff += clipdy; + err += e3 * clipdx + e1 * clipdy; + } + } + (*bres) (pDrawable, pGC, doff, + signdx, signdy, axis, new_x1, new_y1, + err, e1, e3, len); + } + pBox++; + } + } /* while (nBox--) */ +} diff --git a/xorg-server-1.4/fb/fbsetsp.c b/xorg-server-1.4/fb/fbsetsp.c new file mode 100644 index 0000000..227ba4c --- /dev/null +++ b/xorg-server-1.4/fb/fbsetsp.c @@ -0,0 +1,102 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbSetSpans (DrawablePtr pDrawable, + GCPtr pGC, + char *src, + DDXPointPtr ppt, + int *pwidth, + int nspans, + int fSorted) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); + RegionPtr pClip = fbGetCompositeClip(pGC); + FbBits *dst, *d, *s; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + BoxPtr pbox; + int n; + int xoff; + int x1, x2; + +#ifdef FB_24_32BIT + if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth)) + { + fb24_32SetSpans (pDrawable, pGC, src, ppt, pwidth, nspans, fSorted); + return; + } +#endif + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + while (nspans--) + { + d = dst + (ppt->y + dstYoff) * dstStride; + xoff = (int) (((long) src) & (FB_MASK >> 3)); + s = (FbBits *) (src - xoff); + xoff <<= 3; + n = REGION_NUM_RECTS(pClip); + pbox = REGION_RECTS (pClip); + while (n--) + { + if (pbox->y1 > ppt->y) + break; + if (pbox->y2 > ppt->y) + { + x1 = ppt->x; + x2 = x1 + *pwidth; + if (pbox->x1 > x1) + x1 = pbox->x1; + if (pbox->x2 < x2) + x2 = pbox->x2; + if (x1 < x2) + fbBlt ((FbBits *) s, + 0, + (x1 - ppt->x) * dstBpp + xoff, + d, + dstStride, + (x1 + dstXoff) * dstBpp, + + (x2 - x1) * dstBpp, + 1, + pGC->alu, + pPriv->pm, + dstBpp, + + FALSE, + FALSE); + } + } + src += PixmapBytePad (*pwidth, pDrawable->depth); + ppt++; + pwidth++; + } + fbValidateDrawable (pDrawable); + fbFinishAccess (pDrawable); +} + diff --git a/xorg-server-1.4/fb/fbsolid.c b/xorg-server-1.4/fb/fbsolid.c new file mode 100644 index 0000000..53fcae0 --- /dev/null +++ b/xorg-server-1.4/fb/fbsolid.c @@ -0,0 +1,213 @@ +/* + * Copyright © 1998 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. + */ + +#define FbSelectPart(xor,o,t) xor + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbSolid (FbBits *dst, + FbStride dstStride, + int dstX, + int bpp, + + int width, + int height, + + FbBits and, + FbBits xor) +{ + FbBits startmask, endmask; + int n, nmiddle; + int startbyte, endbyte; + +#ifdef FB_24BIT + if (bpp == 24 && (!FbCheck24Pix(and) || !FbCheck24Pix(xor))) + { + fbSolid24 (dst, dstStride, dstX, width, height, and, xor); + return; + } +#endif + dst += dstX >> FB_SHIFT; + dstX &= FB_MASK; + FbMaskBitsBytes(dstX, width, and == 0, startmask, startbyte, + nmiddle, endmask, endbyte); + if (startmask) + dstStride--; + dstStride -= nmiddle; + while (height--) + { + if (startmask) + { + FbDoLeftMaskByteRRop(dst,startbyte,startmask,and,xor); + dst++; + } + n = nmiddle; + if (!and) + while (n--) + WRITE(dst++, xor); + else + while (n--) + { + WRITE(dst, FbDoRRop (READ(dst), and, xor)); + dst++; + } + if (endmask) + FbDoRightMaskByteRRop(dst,endbyte,endmask,and,xor); + dst += dstStride; + } +} + +#ifdef FB_24BIT +void +fbSolid24 (FbBits *dst, + FbStride dstStride, + int dstX, + + int width, + int height, + + FbBits and, + FbBits xor) +{ + FbBits startmask, endmask; + FbBits xor0 = 0, xor1 = 0, xor2 = 0; + FbBits and0 = 0, and1 = 0, and2 = 0; + FbBits xorS = 0, andS = 0, xorE = 0, andE = 0; + int n, nmiddle; + int rotS, rot; + + dst += dstX >> FB_SHIFT; + dstX &= FB_MASK; + /* + * Rotate pixel values this far across the word to align on + * screen pixel boundaries + */ + rot = FbFirst24Rot (dstX); + FbMaskBits (dstX, width, startmask, nmiddle, endmask); + if (startmask) + dstStride--; + dstStride -= nmiddle; + + /* + * Precompute rotated versions of the rasterop values + */ + rotS = rot; + xor = FbRot24(xor,rotS); + and = FbRot24(and,rotS); + if (startmask) + { + xorS = xor; + andS = and; + xor = FbNext24Pix(xor); + and = FbNext24Pix(and); + } + + if (nmiddle) + { + xor0 = xor; + and0 = and; + xor1 = FbNext24Pix(xor0); + and1 = FbNext24Pix(and0); + xor2 = FbNext24Pix(xor1); + and2 = FbNext24Pix(and1); + } + + if (endmask) + { + switch (nmiddle % 3) { + case 0: + xorE = xor; + andE = and; + break; + case 1: + xorE = xor1; + andE = and1; + break; + case 2: + xorE = xor2; + andE = and2; + break; + } + } + + while (height--) + { + if (startmask) + { + WRITE(dst, FbDoMaskRRop(READ(dst), andS, xorS, startmask)); + dst++; + } + n = nmiddle; + if (!and0) + { + while (n >= 3) + { + WRITE(dst++, xor0); + WRITE(dst++, xor1); + WRITE(dst++, xor2); + n -= 3; + } + if (n) + { + WRITE(dst++, xor0); + n--; + if (n) + { + WRITE(dst++, xor1); + } + } + } + else + { + while (n >= 3) + { + WRITE(dst, FbDoRRop (READ(dst), and0, xor0)); + dst++; + WRITE(dst, FbDoRRop (READ(dst), and1, xor1)); + dst++; + WRITE(dst, FbDoRRop (READ(dst), and2, xor2)); + dst++; + n -= 3; + } + if (n) + { + WRITE(dst, FbDoRRop (READ(dst), and0, xor0)); + dst++; + n--; + if (n) + { + WRITE(dst, FbDoRRop (READ(dst), and1, xor1)); + dst++; + } + } + } + if (endmask) + WRITE(dst, FbDoMaskRRop (READ(dst), andE, xorE, endmask)); + dst += dstStride; + } +} +#endif diff --git a/xorg-server-1.4/fb/fbstipple.c b/xorg-server-1.4/fb/fbstipple.c new file mode 100644 index 0000000..7d13263 --- /dev/null +++ b/xorg-server-1.4/fb/fbstipple.c @@ -0,0 +1,312 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +#ifndef FBNOPIXADDR +/* + * This is a slight abuse of the preprocessor to generate repetitive + * code, the idea is to generate code for each case of a copy-mode + * transparent stipple + */ +#define LaneCases1(c,a) case c: \ + while (n--) { (void)FbLaneCase(c,a); a++; } \ + break +#define LaneCases2(c,a) LaneCases1(c,a); LaneCases1(c+1,a) +#define LaneCases4(c,a) LaneCases2(c,a); LaneCases2(c+2,a) +#define LaneCases8(c,a) LaneCases4(c,a); LaneCases4(c+4,a) +#define LaneCases16(c,a) LaneCases8(c,a); LaneCases8(c+8,a) +#define LaneCases32(c,a) LaneCases16(c,a); LaneCases16(c+16,a) +#define LaneCases64(c,a) LaneCases32(c,a); LaneCases32(c+32,a) +#define LaneCases128(c,a) LaneCases64(c,a); LaneCases64(c+64,a) +#define LaneCases256(c,a) LaneCases128(c,a); LaneCases128(c+128,a) + +#if FB_SHIFT == 6 +#define LaneCases(a) LaneCases256(0,a) +#endif + +#if FB_SHIFT == 5 +#define LaneCases(a) LaneCases16(0,a) +#endif + +/* + * Repeat a transparent stipple across a scanline n times + */ + +void +fbTransparentSpan (FbBits *dst, + FbBits stip, + FbBits fgxor, + int n) +{ + FbStip s; + + s = ((FbStip) (stip ) & 0x01); + s |= ((FbStip) (stip >> 8) & 0x02); + s |= ((FbStip) (stip >> 16) & 0x04); + s |= ((FbStip) (stip >> 24) & 0x08); +#if FB_SHIFT > 5 + s |= ((FbStip) (stip >> 32) & 0x10); + s |= ((FbStip) (stip >> 40) & 0x20); + s |= ((FbStip) (stip >> 48) & 0x40); + s |= ((FbStip) (stip >> 56) & 0x80); +#endif + switch (s) { + LaneCases(dst); + } +} +#endif + +void +fbEvenStipple (FbBits *dst, + FbStride dstStride, + int dstX, + int dstBpp, + + int width, + int height, + + FbStip *stip, + FbStride stipStride, + int stipHeight, + + FbBits fgand, + FbBits fgxor, + FbBits bgand, + FbBits bgxor, + + int xRot, + int yRot) +{ + FbBits startmask, endmask; + FbBits mask, and, xor; + int nmiddle, n; + FbStip *s, *stipEnd, bits; + int rot, stipX, stipY; + int pixelsPerDst; + const FbBits *fbBits; + Bool transparent; + int startbyte, endbyte; + + /* + * Check for a transparent stipple (stencil) + */ + transparent = FALSE; + if (dstBpp >= 8 && + fgand == 0 && bgand == FB_ALLONES && bgxor == 0) + transparent = TRUE; + + pixelsPerDst = FB_UNIT / dstBpp; + /* + * Adjust dest pointers + */ + dst += dstX >> FB_SHIFT; + dstX &= FB_MASK; + FbMaskBitsBytes (dstX, width, fgand == 0 && bgand == 0, + startmask, startbyte, nmiddle, endmask, endbyte); + + if (startmask) + dstStride--; + dstStride -= nmiddle; + + xRot *= dstBpp; + /* + * Compute stip start scanline and rotation parameters + */ + stipEnd = stip + stipStride * stipHeight; + modulus (- yRot, stipHeight, stipY); + s = stip + stipStride * stipY; + modulus (- xRot, FB_UNIT, stipX); + rot = stipX; + + /* + * Get pointer to stipple mask array for this depth + */ + /* fbStippleTable covers all valid bpp (4,8,16,32) */ + fbBits = fbStippleTable[pixelsPerDst]; + + while (height--) + { + /* + * Extract stipple bits for this scanline; + */ + bits = READ(s); + s += stipStride; + if (s == stipEnd) + s = stip; +#if FB_UNIT > 32 + if (pixelsPerDst == 16) + mask = FbStipple16Bits(FbLeftStipBits(bits,16)); + else +#endif + mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)]; + /* + * Rotate into position and compute reduced rop values + */ + mask = FbRotLeft(mask, rot); + and = (fgand & mask) | (bgand & ~mask); + xor = (fgxor & mask) | (bgxor & ~mask); + +#ifndef FBNOPIXADDR + if (transparent) + { + if (startmask) + { + fbTransparentSpan(dst, mask&startmask, fgxor, 1); + dst++; + } + fbTransparentSpan (dst, mask, fgxor, nmiddle); + dst += nmiddle; + if (endmask) + fbTransparentSpan(dst, mask&endmask, fgxor, 1); + } + else +#endif + { + /* + * Fill scanline + */ + if (startmask) + { + FbDoLeftMaskByteRRop (dst, startbyte, startmask, and, xor); + dst++; + } + n = nmiddle; + if (!and) + while (n--) + WRITE(dst++, xor); + else + { + while (n--) + { + WRITE(dst, FbDoRRop (READ(dst), and, xor)); + dst++; + } + } + if (endmask) + FbDoRightMaskByteRRop(dst, endbyte, endmask, and, xor); + } + dst += dstStride; + } +} + +void +fbOddStipple (FbBits *dst, + FbStride dstStride, + int dstX, + int dstBpp, + + int width, + int height, + + FbStip *stip, + FbStride stipStride, + int stipWidth, + int stipHeight, + + FbBits fgand, + FbBits fgxor, + FbBits bgand, + FbBits bgxor, + + int xRot, + int yRot) +{ + int stipX, stipY, sx; + int widthTmp; + int h, w; + int x, y; + + modulus (- yRot, stipHeight, stipY); + modulus (dstX / dstBpp - xRot, stipWidth, stipX); + y = 0; + while (height) + { + h = stipHeight - stipY; + if (h > height) + h = height; + height -= h; + widthTmp = width; + x = dstX; + sx = stipX; + while (widthTmp) + { + w = (stipWidth - sx) * dstBpp; + if (w > widthTmp) + w = widthTmp; + widthTmp -= w; + fbBltOne (stip + stipY * stipStride, + stipStride, + sx, + + dst + y * dstStride, + dstStride, + x, + dstBpp, + + w, h, + + fgand, fgxor, bgand, bgxor); + x += w; + sx = 0; + } + y += h; + stipY = 0; + } +} + +void +fbStipple (FbBits *dst, + FbStride dstStride, + int dstX, + int dstBpp, + + int width, + int height, + + FbStip *stip, + FbStride stipStride, + int stipWidth, + int stipHeight, + Bool even, + + FbBits fgand, + FbBits fgxor, + FbBits bgand, + FbBits bgxor, + + int xRot, + int yRot) +{ + if (even) + fbEvenStipple (dst, dstStride, dstX, dstBpp, width, height, + stip, stipStride, stipHeight, + fgand, fgxor, bgand, bgxor, xRot, yRot); + else + fbOddStipple (dst, dstStride, dstX, dstBpp, width, height, + stip, stipStride, stipWidth, stipHeight, + fgand, fgxor, bgand, bgxor, xRot, yRot); +} diff --git a/xorg-server-1.4/fb/fbtile.c b/xorg-server-1.4/fb/fbtile.c new file mode 100644 index 0000000..05a27a1 --- /dev/null +++ b/xorg-server-1.4/fb/fbtile.c @@ -0,0 +1,203 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +/* + * Accelerated tile fill -- tile width is a power of two not greater + * than FB_UNIT + */ + +void +fbEvenTile (FbBits *dst, + FbStride dstStride, + int dstX, + + int width, + int height, + + FbBits *tile, + FbStride tileStride, + int tileHeight, + + int alu, + FbBits pm, + int xRot, + int yRot) +{ + FbBits *t, *tileEnd, bits; + FbBits startmask, endmask; + FbBits and, xor; + int n, nmiddle; + int tileX, tileY; + int rot; + int startbyte, endbyte; + + dst += dstX >> FB_SHIFT; + dstX &= FB_MASK; + FbMaskBitsBytes(dstX, width, FbDestInvarientRop(alu, pm), + startmask, startbyte, nmiddle, endmask, endbyte); + if (startmask) + dstStride--; + dstStride -= nmiddle; + + /* + * Compute tile start scanline and rotation parameters + */ + tileEnd = tile + tileHeight * tileStride; + modulus (- yRot, tileHeight, tileY); + t = tile + tileY * tileStride; + modulus (- xRot, FB_UNIT, tileX); + rot = tileX; + + while (height--) + { + + /* + * Pick up bits for this scanline + */ + bits = READ(t); + t += tileStride; + if (t >= tileEnd) t = tile; + bits = FbRotLeft(bits,rot); + and = fbAnd(alu,bits,pm); + xor = fbXor(alu,bits,pm); + + if (startmask) + { + FbDoLeftMaskByteRRop(dst, startbyte, startmask, and, xor); + dst++; + } + n = nmiddle; + if (!and) + while (n--) + WRITE(dst++, xor); + else + while (n--) + { + WRITE(dst, FbDoRRop (READ(dst), and, xor)); + dst++; + } + if (endmask) + FbDoRightMaskByteRRop(dst, endbyte, endmask, and, xor); + dst += dstStride; + } +} + +void +fbOddTile(FbBits *dst, + FbStride dstStride, + int dstX, + + int width, + int height, + + FbBits *tile, + FbStride tileStride, + int tileWidth, + int tileHeight, + + int alu, + FbBits pm, + int bpp, + + int xRot, + int yRot) +{ + int tileX, tileY; + int widthTmp; + int h, w; + int x, y; + + modulus (- yRot, tileHeight, tileY); + y = 0; + while (height) + { + h = tileHeight - tileY; + if (h > height) + h = height; + height -= h; + widthTmp = width; + x = dstX; + modulus (dstX - xRot, tileWidth, tileX); + while (widthTmp) + { + w = tileWidth - tileX; + if (w > widthTmp) + w = widthTmp; + widthTmp -= w; + fbBlt (tile + tileY * tileStride, + tileStride, + tileX, + + dst + y * dstStride, + dstStride, + x, + + w, h, + alu, + pm, + bpp, + + FALSE, + FALSE); + x += w; + tileX = 0; + } + y += h; + tileY = 0; + } +} + +void +fbTile (FbBits *dst, + FbStride dstStride, + int dstX, + + int width, + int height, + + FbBits *tile, + FbStride tileStride, + int tileWidth, + int tileHeight, + + int alu, + FbBits pm, + int bpp, + + int xRot, + int yRot) +{ + if (FbEvenTile (tileWidth)) + fbEvenTile (dst, dstStride, dstX, width, height, + tile, tileStride, tileHeight, + alu, pm, xRot, yRot); + else + fbOddTile (dst, dstStride, dstX, width, height, + tile, tileStride, tileWidth, tileHeight, + alu, pm, bpp, xRot, yRot); +} diff --git a/xorg-server-1.4/fb/fbtrap.c b/xorg-server-1.4/fb/fbtrap.c new file mode 100644 index 0000000..830603a --- /dev/null +++ b/xorg-server-1.4/fb/fbtrap.c @@ -0,0 +1,161 @@ +/* + * 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +#ifdef RENDER + +#include "picturestr.h" +#include "mipict.h" +#include "renderedge.h" +#include "fbpict.h" + +void +fbAddTraps (PicturePtr pPicture, + INT16 x_off, + INT16 y_off, + int ntrap, + xTrap *traps) +{ + pixman_image_t *image = image_from_pict (pPicture, FALSE); + + if (!image) + return; + + pixman_add_traps (image, x_off, y_off, ntrap, (pixman_trap_t *)traps); + + free_pixman_pict (pPicture, image); +} + +void +fbRasterizeTrapezoid (PicturePtr pPicture, + xTrapezoid *trap, + int x_off, + int y_off) +{ + pixman_image_t *image = image_from_pict (pPicture, FALSE); + + if (!image) + return; + + pixman_rasterize_trapezoid (image, (pixman_trapezoid_t *)trap, x_off, y_off); + + free_pixman_pict (pPicture, image); +} + +static int +_GreaterY (xPointFixed *a, xPointFixed *b) +{ + if (a->y == b->y) + return a->x > b->x; + return a->y > b->y; +} + +/* + * Note that the definition of this function is a bit odd because + * of the X coordinate space (y increasing downwards). + */ +static int +_Clockwise (xPointFixed *ref, xPointFixed *a, xPointFixed *b) +{ + xPointFixed ad, bd; + + ad.x = a->x - ref->x; + ad.y = a->y - ref->y; + bd.x = b->x - ref->x; + bd.y = b->y - ref->y; + + return ((xFixed_32_32) bd.y * ad.x - (xFixed_32_32) ad.y * bd.x) < 0; +} + +/* FIXME -- this could be made more efficient */ +void +fbAddTriangles (PicturePtr pPicture, + INT16 x_off, + INT16 y_off, + int ntri, + xTriangle *tris) +{ + xPointFixed *top, *left, *right, *tmp; + xTrapezoid trap; + + for (; ntri; ntri--, tris++) + { + top = &tris->p1; + left = &tris->p2; + right = &tris->p3; + if (_GreaterY (top, left)) { + tmp = left; left = top; top = tmp; + } + if (_GreaterY (top, right)) { + tmp = right; right = top; top = tmp; + } + if (_Clockwise (top, right, left)) { + tmp = right; right = left; left = tmp; + } + + /* + * Two cases: + * + * + + + * / \ / \ + * / \ / \ + * / + + \ + * / -- -- \ + * / -- -- \ + * / --- --- \ + * +-- --+ + */ + + trap.top = top->y; + trap.left.p1 = *top; + trap.left.p2 = *left; + trap.right.p1 = *top; + trap.right.p2 = *right; + if (right->y < left->y) + trap.bottom = right->y; + else + trap.bottom = left->y; + fbRasterizeTrapezoid (pPicture, &trap, x_off, y_off); + if (right->y < left->y) + { + trap.top = right->y; + trap.bottom = left->y; + trap.right.p1 = *right; + trap.right.p2 = *left; + } + else + { + trap.top = left->y; + trap.bottom = right->y; + trap.left.p1 = *left; + trap.left.p2 = *right; + } + fbRasterizeTrapezoid (pPicture, &trap, x_off, y_off); + } +} + +#endif /* RENDER */ diff --git a/xorg-server-1.4/fb/fbutil.c b/xorg-server-1.4/fb/fbutil.c new file mode 100644 index 0000000..5e23297 --- /dev/null +++ b/xorg-server-1.4/fb/fbutil.c @@ -0,0 +1,362 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +FbBits +fbReplicatePixel (Pixel p, int bpp) +{ + FbBits b = p; + + b &= FbFullMask (bpp); + while (bpp < FB_UNIT) + { + b |= b << bpp; + bpp <<= 1; + } + return b; +} + +void +fbReduceRasterOp (int rop, FbBits fg, FbBits pm, FbBits *andp, FbBits *xorp) +{ + FbBits and, xor; + + switch (rop) + { + default: + case GXclear: /* 0 0 0 0 */ + and = 0; + xor = 0; + break; + case GXand: /* 0 0 0 1 */ + and = fg; + xor = 0; + break; + case GXandReverse: /* 0 0 1 0 */ + and = fg; + xor = fg; + break; + case GXcopy: /* 0 0 1 1 */ + and = 0; + xor = fg; + break; + case GXandInverted: /* 0 1 0 0 */ + and = ~fg; + xor = 0; + break; + case GXnoop: /* 0 1 0 1 */ + and = FB_ALLONES; + xor = 0; + break; + case GXxor: /* 0 1 1 0 */ + and = FB_ALLONES; + xor = fg; + break; + case GXor: /* 0 1 1 1 */ + and = ~fg; + xor = fg; + break; + case GXnor: /* 1 0 0 0 */ + and = ~fg; + xor = ~fg; + break; + case GXequiv: /* 1 0 0 1 */ + and = FB_ALLONES; + xor = ~fg; + break; + case GXinvert: /* 1 0 1 0 */ + and = FB_ALLONES; + xor = FB_ALLONES; + break; + case GXorReverse: /* 1 0 1 1 */ + and = ~fg; + xor = FB_ALLONES; + break; + case GXcopyInverted: /* 1 1 0 0 */ + and = 0; + xor = ~fg; + break; + case GXorInverted: /* 1 1 0 1 */ + and = fg; + xor = ~fg; + break; + case GXnand: /* 1 1 1 0 */ + and = fg; + xor = FB_ALLONES; + break; + case GXset: /* 1 1 1 1 */ + and = 0; + xor = FB_ALLONES; + break; + } + and |= ~pm; + xor &= pm; + *andp = and; + *xorp = xor; +} + +#define O 0 +#define I FB_ALLONES + +const FbMergeRopRec FbMergeRopBits[16] = { + { O,O,O,O }, /* clear 0x0 0 */ + { I,O,O,O }, /* and 0x1 src AND dst */ + { I,O,I,O }, /* andReverse 0x2 src AND NOT dst */ + { O,O,I,O }, /* copy 0x3 src */ + { I,I,O,O }, /* andInverted 0x4 NOT src AND dst */ + { O,I,O,O }, /* noop 0x5 dst */ + { O,I,I,O }, /* xor 0x6 src XOR dst */ + { I,I,I,O }, /* or 0x7 src OR dst */ + { I,I,I,I }, /* nor 0x8 NOT src AND NOT dst */ + { O,I,I,I }, /* equiv 0x9 NOT src XOR dst */ + { O,I,O,I }, /* invert 0xa NOT dst */ + { I,I,O,I }, /* orReverse 0xb src OR NOT dst */ + { O,O,I,I }, /* copyInverted 0xc NOT src */ + { I,O,I,I }, /* orInverted 0xd NOT src OR dst */ + { I,O,O,I }, /* nand 0xe NOT src OR NOT dst */ + { O,O,O,I }, /* set 0xf 1 */ +}; + +/* + * Stipple masks are independent of bit/byte order as long + * as bitorder == byteorder. FB doesn't handle the case + * where these differ + */ +#define BitsMask(x,w) ((FB_ALLONES << ((x) & FB_MASK)) & \ + (FB_ALLONES >> ((FB_UNIT - ((x) + (w))) & FB_MASK))) + +#define Mask(x,w) BitsMask((x)*(w),(w)) + + +#define SelMask(b,n,w) ((((b) >> n) & 1) * Mask(n,w)) + +#define C1(b,w) \ + (SelMask(b,0,w)) + +#define C2(b,w) \ + (SelMask(b,0,w) | \ + SelMask(b,1,w)) + +#define C4(b,w) \ + (SelMask(b,0,w) | \ + SelMask(b,1,w) | \ + SelMask(b,2,w) | \ + SelMask(b,3,w)) + +#define C8(b,w) \ + (SelMask(b,0,w) | \ + SelMask(b,1,w) | \ + SelMask(b,2,w) | \ + SelMask(b,3,w) | \ + SelMask(b,4,w) | \ + SelMask(b,5,w) | \ + SelMask(b,6,w) | \ + SelMask(b,7,w)) + +#if FB_UNIT == 16 +#define fbStipple16Bits 0 +#define fbStipple8Bits 0 +const FbBits fbStipple4Bits[16] = { + C4( 0,4), C4( 1,4), C4( 2,4), C4( 3,4), C4( 4,4), C4( 5,4), + C4( 6,4), C4( 7,4), C4( 8,4), C4( 9,4), C4( 10,4), C4( 11,4), + C4( 12,4), C4( 13,4), C4( 14,4), C4( 15,4),}; +const FbBits fbStipple2Bits[4] = { + C2( 0,8), C2( 1,8), C2( 2,8), C2( 3,8), +}; +const FbBits fbStipple1Bits[2] = { + C1( 0,16), C1( 1,16), +}; +#endif +#if FB_UNIT == 32 +#define fbStipple16Bits 0 +const FbBits fbStipple8Bits[256] = { + C8( 0,4), C8( 1,4), C8( 2,4), C8( 3,4), C8( 4,4), C8( 5,4), + C8( 6,4), C8( 7,4), C8( 8,4), C8( 9,4), C8( 10,4), C8( 11,4), + C8( 12,4), C8( 13,4), C8( 14,4), C8( 15,4), C8( 16,4), C8( 17,4), + C8( 18,4), C8( 19,4), C8( 20,4), C8( 21,4), C8( 22,4), C8( 23,4), + C8( 24,4), C8( 25,4), C8( 26,4), C8( 27,4), C8( 28,4), C8( 29,4), + C8( 30,4), C8( 31,4), C8( 32,4), C8( 33,4), C8( 34,4), C8( 35,4), + C8( 36,4), C8( 37,4), C8( 38,4), C8( 39,4), C8( 40,4), C8( 41,4), + C8( 42,4), C8( 43,4), C8( 44,4), C8( 45,4), C8( 46,4), C8( 47,4), + C8( 48,4), C8( 49,4), C8( 50,4), C8( 51,4), C8( 52,4), C8( 53,4), + C8( 54,4), C8( 55,4), C8( 56,4), C8( 57,4), C8( 58,4), C8( 59,4), + C8( 60,4), C8( 61,4), C8( 62,4), C8( 63,4), C8( 64,4), C8( 65,4), + C8( 66,4), C8( 67,4), C8( 68,4), C8( 69,4), C8( 70,4), C8( 71,4), + C8( 72,4), C8( 73,4), C8( 74,4), C8( 75,4), C8( 76,4), C8( 77,4), + C8( 78,4), C8( 79,4), C8( 80,4), C8( 81,4), C8( 82,4), C8( 83,4), + C8( 84,4), C8( 85,4), C8( 86,4), C8( 87,4), C8( 88,4), C8( 89,4), + C8( 90,4), C8( 91,4), C8( 92,4), C8( 93,4), C8( 94,4), C8( 95,4), + C8( 96,4), C8( 97,4), C8( 98,4), C8( 99,4), C8(100,4), C8(101,4), + C8(102,4), C8(103,4), C8(104,4), C8(105,4), C8(106,4), C8(107,4), + C8(108,4), C8(109,4), C8(110,4), C8(111,4), C8(112,4), C8(113,4), + C8(114,4), C8(115,4), C8(116,4), C8(117,4), C8(118,4), C8(119,4), + C8(120,4), C8(121,4), C8(122,4), C8(123,4), C8(124,4), C8(125,4), + C8(126,4), C8(127,4), C8(128,4), C8(129,4), C8(130,4), C8(131,4), + C8(132,4), C8(133,4), C8(134,4), C8(135,4), C8(136,4), C8(137,4), + C8(138,4), C8(139,4), C8(140,4), C8(141,4), C8(142,4), C8(143,4), + C8(144,4), C8(145,4), C8(146,4), C8(147,4), C8(148,4), C8(149,4), + C8(150,4), C8(151,4), C8(152,4), C8(153,4), C8(154,4), C8(155,4), + C8(156,4), C8(157,4), C8(158,4), C8(159,4), C8(160,4), C8(161,4), + C8(162,4), C8(163,4), C8(164,4), C8(165,4), C8(166,4), C8(167,4), + C8(168,4), C8(169,4), C8(170,4), C8(171,4), C8(172,4), C8(173,4), + C8(174,4), C8(175,4), C8(176,4), C8(177,4), C8(178,4), C8(179,4), + C8(180,4), C8(181,4), C8(182,4), C8(183,4), C8(184,4), C8(185,4), + C8(186,4), C8(187,4), C8(188,4), C8(189,4), C8(190,4), C8(191,4), + C8(192,4), C8(193,4), C8(194,4), C8(195,4), C8(196,4), C8(197,4), + C8(198,4), C8(199,4), C8(200,4), C8(201,4), C8(202,4), C8(203,4), + C8(204,4), C8(205,4), C8(206,4), C8(207,4), C8(208,4), C8(209,4), + C8(210,4), C8(211,4), C8(212,4), C8(213,4), C8(214,4), C8(215,4), + C8(216,4), C8(217,4), C8(218,4), C8(219,4), C8(220,4), C8(221,4), + C8(222,4), C8(223,4), C8(224,4), C8(225,4), C8(226,4), C8(227,4), + C8(228,4), C8(229,4), C8(230,4), C8(231,4), C8(232,4), C8(233,4), + C8(234,4), C8(235,4), C8(236,4), C8(237,4), C8(238,4), C8(239,4), + C8(240,4), C8(241,4), C8(242,4), C8(243,4), C8(244,4), C8(245,4), + C8(246,4), C8(247,4), C8(248,4), C8(249,4), C8(250,4), C8(251,4), + C8(252,4), C8(253,4), C8(254,4), C8(255,4), +}; +const FbBits fbStipple4Bits[16] = { + C4( 0,8), C4( 1,8), C4( 2,8), C4( 3,8), C4( 4,8), C4( 5,8), + C4( 6,8), C4( 7,8), C4( 8,8), C4( 9,8), C4( 10,8), C4( 11,8), + C4( 12,8), C4( 13,8), C4( 14,8), C4( 15,8),}; +const FbBits fbStipple2Bits[4] = { + C2( 0,16), C2( 1,16), C2( 2,16), C2( 3,16), +}; +const FbBits fbStipple1Bits[2] = { + C1( 0,32), C1( 1,32), +}; +#endif +#if FB_UNIT == 64 +const FbBits fbStipple16Bits[256] = { + C8( 0,4), C8( 1,4), C8( 2,4), C8( 3,4), C8( 4,4), C8( 5,4), + C8( 6,4), C8( 7,4), C8( 8,4), C8( 9,4), C8( 10,4), C8( 11,4), + C8( 12,4), C8( 13,4), C8( 14,4), C8( 15,4), C8( 16,4), C8( 17,4), + C8( 18,4), C8( 19,4), C8( 20,4), C8( 21,4), C8( 22,4), C8( 23,4), + C8( 24,4), C8( 25,4), C8( 26,4), C8( 27,4), C8( 28,4), C8( 29,4), + C8( 30,4), C8( 31,4), C8( 32,4), C8( 33,4), C8( 34,4), C8( 35,4), + C8( 36,4), C8( 37,4), C8( 38,4), C8( 39,4), C8( 40,4), C8( 41,4), + C8( 42,4), C8( 43,4), C8( 44,4), C8( 45,4), C8( 46,4), C8( 47,4), + C8( 48,4), C8( 49,4), C8( 50,4), C8( 51,4), C8( 52,4), C8( 53,4), + C8( 54,4), C8( 55,4), C8( 56,4), C8( 57,4), C8( 58,4), C8( 59,4), + C8( 60,4), C8( 61,4), C8( 62,4), C8( 63,4), C8( 64,4), C8( 65,4), + C8( 66,4), C8( 67,4), C8( 68,4), C8( 69,4), C8( 70,4), C8( 71,4), + C8( 72,4), C8( 73,4), C8( 74,4), C8( 75,4), C8( 76,4), C8( 77,4), + C8( 78,4), C8( 79,4), C8( 80,4), C8( 81,4), C8( 82,4), C8( 83,4), + C8( 84,4), C8( 85,4), C8( 86,4), C8( 87,4), C8( 88,4), C8( 89,4), + C8( 90,4), C8( 91,4), C8( 92,4), C8( 93,4), C8( 94,4), C8( 95,4), + C8( 96,4), C8( 97,4), C8( 98,4), C8( 99,4), C8(100,4), C8(101,4), + C8(102,4), C8(103,4), C8(104,4), C8(105,4), C8(106,4), C8(107,4), + C8(108,4), C8(109,4), C8(110,4), C8(111,4), C8(112,4), C8(113,4), + C8(114,4), C8(115,4), C8(116,4), C8(117,4), C8(118,4), C8(119,4), + C8(120,4), C8(121,4), C8(122,4), C8(123,4), C8(124,4), C8(125,4), + C8(126,4), C8(127,4), C8(128,4), C8(129,4), C8(130,4), C8(131,4), + C8(132,4), C8(133,4), C8(134,4), C8(135,4), C8(136,4), C8(137,4), + C8(138,4), C8(139,4), C8(140,4), C8(141,4), C8(142,4), C8(143,4), + C8(144,4), C8(145,4), C8(146,4), C8(147,4), C8(148,4), C8(149,4), + C8(150,4), C8(151,4), C8(152,4), C8(153,4), C8(154,4), C8(155,4), + C8(156,4), C8(157,4), C8(158,4), C8(159,4), C8(160,4), C8(161,4), + C8(162,4), C8(163,4), C8(164,4), C8(165,4), C8(166,4), C8(167,4), + C8(168,4), C8(169,4), C8(170,4), C8(171,4), C8(172,4), C8(173,4), + C8(174,4), C8(175,4), C8(176,4), C8(177,4), C8(178,4), C8(179,4), + C8(180,4), C8(181,4), C8(182,4), C8(183,4), C8(184,4), C8(185,4), + C8(186,4), C8(187,4), C8(188,4), C8(189,4), C8(190,4), C8(191,4), + C8(192,4), C8(193,4), C8(194,4), C8(195,4), C8(196,4), C8(197,4), + C8(198,4), C8(199,4), C8(200,4), C8(201,4), C8(202,4), C8(203,4), + C8(204,4), C8(205,4), C8(206,4), C8(207,4), C8(208,4), C8(209,4), + C8(210,4), C8(211,4), C8(212,4), C8(213,4), C8(214,4), C8(215,4), + C8(216,4), C8(217,4), C8(218,4), C8(219,4), C8(220,4), C8(221,4), + C8(222,4), C8(223,4), C8(224,4), C8(225,4), C8(226,4), C8(227,4), + C8(228,4), C8(229,4), C8(230,4), C8(231,4), C8(232,4), C8(233,4), + C8(234,4), C8(235,4), C8(236,4), C8(237,4), C8(238,4), C8(239,4), + C8(240,4), C8(241,4), C8(242,4), C8(243,4), C8(244,4), C8(245,4), + C8(246,4), C8(247,4), C8(248,4), C8(249,4), C8(250,4), C8(251,4), + C8(252,4), C8(253,4), C8(254,4), C8(255,4), +}; +const FbBits fbStipple8Bits[256] = { + C8( 0,8), C8( 1,8), C8( 2,8), C8( 3,8), C8( 4,8), C8( 5,8), + C8( 6,8), C8( 7,8), C8( 8,8), C8( 9,8), C8( 10,8), C8( 11,8), + C8( 12,8), C8( 13,8), C8( 14,8), C8( 15,8), C8( 16,8), C8( 17,8), + C8( 18,8), C8( 19,8), C8( 20,8), C8( 21,8), C8( 22,8), C8( 23,8), + C8( 24,8), C8( 25,8), C8( 26,8), C8( 27,8), C8( 28,8), C8( 29,8), + C8( 30,8), C8( 31,8), C8( 32,8), C8( 33,8), C8( 34,8), C8( 35,8), + C8( 36,8), C8( 37,8), C8( 38,8), C8( 39,8), C8( 40,8), C8( 41,8), + C8( 42,8), C8( 43,8), C8( 44,8), C8( 45,8), C8( 46,8), C8( 47,8), + C8( 48,8), C8( 49,8), C8( 50,8), C8( 51,8), C8( 52,8), C8( 53,8), + C8( 54,8), C8( 55,8), C8( 56,8), C8( 57,8), C8( 58,8), C8( 59,8), + C8( 60,8), C8( 61,8), C8( 62,8), C8( 63,8), C8( 64,8), C8( 65,8), + C8( 66,8), C8( 67,8), C8( 68,8), C8( 69,8), C8( 70,8), C8( 71,8), + C8( 72,8), C8( 73,8), C8( 74,8), C8( 75,8), C8( 76,8), C8( 77,8), + C8( 78,8), C8( 79,8), C8( 80,8), C8( 81,8), C8( 82,8), C8( 83,8), + C8( 84,8), C8( 85,8), C8( 86,8), C8( 87,8), C8( 88,8), C8( 89,8), + C8( 90,8), C8( 91,8), C8( 92,8), C8( 93,8), C8( 94,8), C8( 95,8), + C8( 96,8), C8( 97,8), C8( 98,8), C8( 99,8), C8(100,8), C8(101,8), + C8(102,8), C8(103,8), C8(104,8), C8(105,8), C8(106,8), C8(107,8), + C8(108,8), C8(109,8), C8(110,8), C8(111,8), C8(112,8), C8(113,8), + C8(114,8), C8(115,8), C8(116,8), C8(117,8), C8(118,8), C8(119,8), + C8(120,8), C8(121,8), C8(122,8), C8(123,8), C8(124,8), C8(125,8), + C8(126,8), C8(127,8), C8(128,8), C8(129,8), C8(130,8), C8(131,8), + C8(132,8), C8(133,8), C8(134,8), C8(135,8), C8(136,8), C8(137,8), + C8(138,8), C8(139,8), C8(140,8), C8(141,8), C8(142,8), C8(143,8), + C8(144,8), C8(145,8), C8(146,8), C8(147,8), C8(148,8), C8(149,8), + C8(150,8), C8(151,8), C8(152,8), C8(153,8), C8(154,8), C8(155,8), + C8(156,8), C8(157,8), C8(158,8), C8(159,8), C8(160,8), C8(161,8), + C8(162,8), C8(163,8), C8(164,8), C8(165,8), C8(166,8), C8(167,8), + C8(168,8), C8(169,8), C8(170,8), C8(171,8), C8(172,8), C8(173,8), + C8(174,8), C8(175,8), C8(176,8), C8(177,8), C8(178,8), C8(179,8), + C8(180,8), C8(181,8), C8(182,8), C8(183,8), C8(184,8), C8(185,8), + C8(186,8), C8(187,8), C8(188,8), C8(189,8), C8(190,8), C8(191,8), + C8(192,8), C8(193,8), C8(194,8), C8(195,8), C8(196,8), C8(197,8), + C8(198,8), C8(199,8), C8(200,8), C8(201,8), C8(202,8), C8(203,8), + C8(204,8), C8(205,8), C8(206,8), C8(207,8), C8(208,8), C8(209,8), + C8(210,8), C8(211,8), C8(212,8), C8(213,8), C8(214,8), C8(215,8), + C8(216,8), C8(217,8), C8(218,8), C8(219,8), C8(220,8), C8(221,8), + C8(222,8), C8(223,8), C8(224,8), C8(225,8), C8(226,8), C8(227,8), + C8(228,8), C8(229,8), C8(230,8), C8(231,8), C8(232,8), C8(233,8), + C8(234,8), C8(235,8), C8(236,8), C8(237,8), C8(238,8), C8(239,8), + C8(240,8), C8(241,8), C8(242,8), C8(243,8), C8(244,8), C8(245,8), + C8(246,8), C8(247,8), C8(248,8), C8(249,8), C8(250,8), C8(251,8), + C8(252,8), C8(253,8), C8(254,8), C8(255,8), +}; +const FbBits fbStipple4Bits[16] = { + C4( 0,16), C4( 1,16), C4( 2,16), C4( 3,16), C4( 4,16), C4( 5,16), + C4( 6,16), C4( 7,16), C4( 8,16), C4( 9,16), C4( 10,16), C4( 11,16), + C4( 12,16), C4( 13,16), C4( 14,16), C4( 15,16),}; +const FbBits fbStipple2Bits[4] = { + C2( 0,32), C2( 1,32), C2( 2,32), C2( 3,32), +}; +#define fbStipple1Bits 0 +#endif +const FbBits * const fbStippleTable[] = { + 0, + fbStipple1Bits, + fbStipple2Bits, + 0, + fbStipple4Bits, + 0, + 0, + 0, + fbStipple8Bits, +}; diff --git a/xorg-server-1.4/fb/fbwindow.c b/xorg-server-1.4/fb/fbwindow.c new file mode 100644 index 0000000..144f083 --- /dev/null +++ b/xorg-server-1.4/fb/fbwindow.c @@ -0,0 +1,372 @@ +/* + * Copyright © 1998 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_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" + +Bool +fbCreateWindow(WindowPtr pWin) +{ +#ifndef FB_NO_WINDOW_PIXMAPS + pWin->devPrivates[fbWinPrivateIndex].ptr = + (pointer) fbGetScreenPixmap(pWin->drawable.pScreen); +#endif +#ifdef FB_SCREEN_PRIVATE + if (pWin->drawable.bitsPerPixel == 32) + pWin->drawable.bitsPerPixel = fbGetScreenPrivate(pWin->drawable.pScreen)->win32bpp; +#endif + return TRUE; +} + +Bool +fbDestroyWindow(WindowPtr pWin) +{ + return TRUE; +} + +Bool +fbMapWindow(WindowPtr pWindow) +{ + return TRUE; +} + +Bool +fbPositionWindow(WindowPtr pWin, int x, int y) +{ + return TRUE; +} + +Bool +fbUnmapWindow(WindowPtr pWindow) +{ + return TRUE; +} + +void +fbCopyWindowProc (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure) +{ + FbBits *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + + fbGetDrawable (pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + fbGetDrawable (pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + while (nbox--) + { + fbBlt (src + (pbox->y1 + dy + srcYoff) * srcStride, + srcStride, + (pbox->x1 + dx + srcXoff) * srcBpp, + + dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff) * dstBpp, + + (pbox->x2 - pbox->x1) * dstBpp, + (pbox->y2 - pbox->y1), + + GXcopy, + FB_ALLONES, + dstBpp, + + reverse, + upsidedown); + pbox++; + } + + fbFinishAccess (pDstDrawable); + fbFinishAccess (pSrcDrawable); +} + +void +fbCopyWindow(WindowPtr pWin, + DDXPointRec ptOldOrg, + RegionPtr prgnSrc) +{ + RegionRec rgnDst; + int dx, dy; + + PixmapPtr pPixmap = fbGetWindowPixmap (pWin); + DrawablePtr pDrawable = &pPixmap->drawable; + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); + + REGION_NULL (pWin->drawable.pScreen, &rgnDst); + + REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + +#ifdef COMPOSITE + if (pPixmap->screen_x || pPixmap->screen_y) + REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst, + -pPixmap->screen_x, -pPixmap->screen_y); +#endif + + fbCopyRegion (pDrawable, pDrawable, + 0, + &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); + + REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); + fbValidateDrawable (&pWin->drawable); +} + +Bool +fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask) +{ + PixmapPtr pPixmap; + + if (mask & CWBackPixmap) + { + if (pWin->backgroundState == BackgroundPixmap) + { + pPixmap = pWin->background.pixmap; +#ifdef FB_24_32BIT + if (pPixmap->drawable.bitsPerPixel != pWin->drawable.bitsPerPixel) + { + pPixmap = fb24_32ReformatTile (pPixmap, + pWin->drawable.bitsPerPixel); + if (pPixmap) + { + (*pWin->drawable.pScreen->DestroyPixmap) (pWin->background.pixmap); + pWin->background.pixmap = pPixmap; + } + } +#endif + if (FbEvenTile (pPixmap->drawable.width * + pPixmap->drawable.bitsPerPixel)) + fbPadPixmap (pPixmap); + } + } + if (mask & CWBorderPixmap) + { + if (pWin->borderIsPixel == FALSE) + { + pPixmap = pWin->border.pixmap; +#ifdef FB_24_32BIT + if (pPixmap->drawable.bitsPerPixel != + pWin->drawable.bitsPerPixel) + { + pPixmap = fb24_32ReformatTile (pPixmap, + pWin->drawable.bitsPerPixel); + if (pPixmap) + { + (*pWin->drawable.pScreen->DestroyPixmap) (pWin->border.pixmap); + pWin->border.pixmap = pPixmap; + } + } +#endif + if (FbEvenTile (pPixmap->drawable.width * + pPixmap->drawable.bitsPerPixel)) + fbPadPixmap (pPixmap); + } + } + return TRUE; +} + +void +fbFillRegionSolid (DrawablePtr pDrawable, + RegionPtr pRegion, + FbBits and, + FbBits xor) +{ + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + int n = REGION_NUM_RECTS(pRegion); + BoxPtr pbox = REGION_RECTS(pRegion); + +#ifndef FB_ACCESS_WRAPPER + int try_mmx = 0; + if (!and) + try_mmx = 1; +#endif + + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + while (n--) + { +#ifndef FB_ACCESS_WRAPPER + if (!try_mmx || !pixman_fill (dst, dstStride, dstBpp, + pbox->x1 + dstXoff, pbox->y1 + dstYoff, + (pbox->x2 - pbox->x1), + (pbox->y2 - pbox->y1), + xor)) + { +#endif + fbSolid (dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff) * dstBpp, + dstBpp, + (pbox->x2 - pbox->x1) * dstBpp, + pbox->y2 - pbox->y1, + and, xor); +#ifndef FB_ACCESS_WRAPPER + } +#endif + fbValidateDrawable (pDrawable); + pbox++; + } + + fbFinishAccess (pDrawable); +} + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif + +void +fbFillRegionTiled (DrawablePtr pDrawable, + RegionPtr pRegion, + PixmapPtr pTile) +{ + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbBits *tile; + FbStride tileStride; + int tileBpp; + int tileXoff, tileYoff; /* XXX assumed to be zero */ + int tileWidth, tileHeight; + int n = REGION_NUM_RECTS(pRegion); + BoxPtr pbox = REGION_RECTS(pRegion); + int xRot = pDrawable->x; + int yRot = pDrawable->y; + +#ifdef PANORAMIX + if(!noPanoramiXExtension) + { + int index = pDrawable->pScreen->myNum; + if(&WindowTable[index]->drawable == pDrawable) + { + xRot -= panoramiXdataPtr[index].x; + yRot -= panoramiXdataPtr[index].y; + } + } +#endif + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp, tileXoff, tileYoff); + tileWidth = pTile->drawable.width; + tileHeight = pTile->drawable.height; + xRot += dstXoff; + yRot += dstYoff; + + while (n--) + { + fbTile (dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff) * dstBpp, + (pbox->x2 - pbox->x1) * dstBpp, + pbox->y2 - pbox->y1, + tile, + tileStride, + tileWidth * dstBpp, + tileHeight, + GXcopy, + FB_ALLONES, + dstBpp, + xRot * dstBpp, + yRot - (pbox->y1 + dstYoff)); + pbox++; + } + + fbFinishAccess (&pTile->drawable); + fbFinishAccess (pDrawable); +} + +void +fbPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) +{ + WindowPtr pBgWin; + + switch (what) { + case PW_BACKGROUND: + switch (pWin->backgroundState) { + case None: + break; + case ParentRelative: + do { + pWin = pWin->parent; + } while (pWin->backgroundState == ParentRelative); + (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, + what); + break; + case BackgroundPixmap: + fbFillRegionTiled (&pWin->drawable, + pRegion, + pWin->background.pixmap); + break; + case BackgroundPixel: + fbFillRegionSolid (&pWin->drawable, + pRegion, + 0, + fbReplicatePixel (pWin->background.pixel, + pWin->drawable.bitsPerPixel)); + break; + } + break; + case PW_BORDER: + if (pWin->borderIsPixel) + { + fbFillRegionSolid (&pWin->drawable, + pRegion, + 0, + fbReplicatePixel (pWin->border.pixel, + pWin->drawable.bitsPerPixel)); + } + else + { + for (pBgWin = pWin; + pBgWin->backgroundState == ParentRelative; + pBgWin = pBgWin->parent); + + fbFillRegionTiled (&pBgWin->drawable, + pRegion, + pWin->border.pixmap); + } + break; + } + fbValidateDrawable (&pWin->drawable); +} diff --git a/xorg-server-1.4/fb/wfbrename.h b/xorg-server-1.4/fb/wfbrename.h new file mode 100644 index 0000000..5ea9092 --- /dev/null +++ b/xorg-server-1.4/fb/wfbrename.h @@ -0,0 +1,201 @@ +#define fb16Lane wfb16Lane +#define fb24_32CopyMtoN wfb24_32CopyMtoN +#define fb24_32CreateScreenResources wfb24_32CreateScreenResources +#define fb24_32GetImage wfb24_32GetImage +#define fb24_32GetSpans wfb24_32GetSpans +#define fb24_32ModifyPixmapHeader wfb24_32ModifyPixmapHeader +#define fb24_32PutZImage wfb24_32PutZImage +#define fb24_32ReformatTile wfb24_32ReformatTile +#define fb24_32SetSpans wfb24_32SetSpans +#define fb32Lane wfb32Lane +#define fb8Lane wfb8Lane +#define fbAddTraps wfbAddTraps +#define fbAddTriangles wfbAddTriangles +#define fbAllocatePrivates wfbAllocatePrivates +#define fbArc16 wfbArc16 +#define fbArc24 wfbArc24 +#define fbArc32 wfbArc32 +#define fbArc8 wfbArc8 +#define fbBlt wfbBlt +#define fbBlt24 wfbBlt24 +#define fbBltOne wfbBltOne +#define fbBltOne24 wfbBltOne24 +#define fbBltPlane wfbBltPlane +#define fbBltStip wfbBltStip +#define fbBres wfbBres +#define fbBresDash wfbBresDash +#define fbBresDash16 wfbBresDash16 +#define fbBresDash24 wfbBresDash24 +#define fbBresDash32 wfbBresDash32 +#define fbBresDash8 wfbBresDash8 +#define fbBresFill wfbBresFill +#define fbBresFillDash wfbBresFillDash +#define fbBresSolid wfbBresSolid +#define fbBresSolid16 wfbBresSolid16 +#define fbBresSolid24 wfbBresSolid24 +#define fbBresSolid32 wfbBresSolid32 +#define fbBresSolid8 wfbBresSolid8 +#define fbChangeWindowAttributes wfbChangeWindowAttributes +#define fbClearVisualTypes wfbClearVisualTypes +#define fbCloseScreen wfbCloseScreen +#define fbComposite wfbComposite +#define fbCompositeGeneral wfbCompositeGeneral +#define fbCompositeSolidMask_nx1xn wfbCompositeSolidMask_nx1xn +#define fbCompositeSolidMask_nx8888x0565C wfbCompositeSolidMask_nx8888x0565C +#define fbCompositeSolidMask_nx8888x8888C wfbCompositeSolidMask_nx8888x8888C +#define fbCompositeSolidMask_nx8x0565 wfbCompositeSolidMask_nx8x0565 +#define fbCompositeSolidMask_nx8x0888 wfbCompositeSolidMask_nx8x0888 +#define fbCompositeSolidMask_nx8x8888 wfbCompositeSolidMask_nx8x8888 +#define fbCompositeSrc_0565x0565 wfbCompositeSrc_0565x0565 +#define fbCompositeSrc_8888x0565 wfbCompositeSrc_8888x0565 +#define fbCompositeSrc_8888x0888 wfbCompositeSrc_8888x0888 +#define fbCompositeSrc_8888x8888 wfbCompositeSrc_8888x8888 +#define fbCompositeSrcAdd_1000x1000 wfbCompositeSrcAdd_1000x1000 +#define fbCompositeSrcAdd_8000x8000 wfbCompositeSrcAdd_8000x8000 +#define fbCompositeSrcAdd_8888x8888 wfbCompositeSrcAdd_8888x8888 +#define fbCopy1toN wfbCopy1toN +#define fbCopyArea wfbCopyArea +#define fbCopyNto1 wfbCopyNto1 +#define fbCopyNtoN wfbCopyNtoN +#define fbCopyPlane wfbCopyPlane +#define fbCopyRegion wfbCopyRegion +#define fbCopyWindow wfbCopyWindow +#define fbCopyWindowProc wfbCopyWindowProc +#define fbCreateDefColormap wfbCreateDefColormap +#define fbCreateGC wfbCreateGC +#define fbCreatePixmap wfbCreatePixmap +#define fbCreatePixmapBpp wfbCreatePixmapBpp +#define fbCreateWindow wfbCreateWindow +#define fbDestroyPixmap wfbDestroyPixmap +#define fbDestroyWindow wfbDestroyWindow +#define fbDoCopy wfbDoCopy +#define fbDots wfbDots +#define fbDots16 wfbDots16 +#define fbDots24 wfbDots24 +#define fbDots32 wfbDots32 +#define fbDots8 wfbDots8 +#define fbEvenStipple wfbEvenStipple +#define fbEvenTile wfbEvenTile +#define fbExpandDirectColors wfbExpandDirectColors +#define fbFill wfbFill +#define fbFillRegionSolid wfbFillRegionSolid +#define fbFillRegionTiled wfbFillRegionTiled +#define fbFillSpans wfbFillSpans +#define fbFixCoordModePrevious wfbFixCoordModePrevious +#define fbGCFuncs wfbGCFuncs +#define fbGCOps wfbGCOps +#define fbGCPrivateIndex wfbGCPrivateIndex +#define fbGeneration wfbGeneration +#define fbGetGCPrivateIndex wfbGetGCPrivateIndex +#define fbGetImage wfbGetImage +#define fbGetScreenPrivateIndex wfbGetScreenPrivateIndex +#define fbGetSpans wfbGetSpans +#define _fbGetWindowPixmap _wfbGetWindowPixmap +#define fbGetWinPrivateIndex wfbGetWinPrivateIndex +#define fbGlyph16 wfbGlyph16 +#define fbGlyph24 wfbGlyph24 +#define fbGlyph32 wfbGlyph32 +#define fbGlyph8 wfbGlyph8 +#define fbGlyphIn wfbGlyphIn +#define fbHasVisualTypes wfbHasVisualTypes +#define fbImageGlyphBlt wfbImageGlyphBlt +#define fbIn wfbIn +#define fbInitializeColormap wfbInitializeColormap +#define fbInitVisuals wfbInitVisuals +#define fbInstallColormap wfbInstallColormap +#define fbLaneTable wfbLaneTable +#define fbListInstalledColormaps wfbListInstalledColormaps +#define fbMapWindow wfbMapWindow +#define FbMergeRopBits wFbMergeRopBits +#define fbOddStipple wfbOddStipple +#define fbOddTile wfbOddTile +#define fbOver wfbOver +#define fbOver24 wfbOver24 +#define fbOverlayCloseScreen wfbOverlayCloseScreen +#define fbOverlayCopyWindow wfbOverlayCopyWindow +#define fbOverlayCreateScreenResources wfbOverlayCreateScreenResources +#define fbOverlayCreateWindow wfbOverlayCreateWindow +#define fbOverlayFinishScreenInit wfbOverlayFinishScreenInit +#define fbOverlayGeneration wfbOverlayGeneration +#define fbOverlayGetScreenPrivateIndex wfbOverlayGetScreenPrivateIndex +#define fbOverlayPaintKey wfbOverlayPaintKey +#define fbOverlayPaintWindow wfbOverlayPaintWindow +#define fbOverlayScreenPrivateIndex wfbOverlayScreenPrivateIndex +#define fbOverlaySetupScreen wfbOverlaySetupScreen +#define fbOverlayUpdateLayerRegion wfbOverlayUpdateLayerRegion +#define fbOverlayWindowExposures wfbOverlayWindowExposures +#define fbOverlayWindowLayer wfbOverlayWindowLayer +#define fbPadPixmap wfbPadPixmap +#define fbPaintWindow wfbPaintWindow +#define fbPictureInit wfbPictureInit +#define fbPixmapToRegion wfbPixmapToRegion +#define fbPolyArc wfbPolyArc +#define fbPolyFillRect wfbPolyFillRect +#define fbPolyGlyphBlt wfbPolyGlyphBlt +#define fbPolyLine wfbPolyLine +#define fbPolyline16 wfbPolyline16 +#define fbPolyline24 wfbPolyline24 +#define fbPolyline32 wfbPolyline32 +#define fbPolyline8 wfbPolyline8 +#define fbPolyPoint wfbPolyPoint +#define fbPolySegment wfbPolySegment +#define fbPolySegment16 wfbPolySegment16 +#define fbPolySegment24 wfbPolySegment24 +#define fbPolySegment32 wfbPolySegment32 +#define fbPolySegment8 wfbPolySegment8 +#define fbPositionWindow wfbPositionWindow +#define fbPushFill wfbPushFill +#define fbPushImage wfbPushImage +#define fbPushPattern wfbPushPattern +#define fbPushPixels wfbPushPixels +#define fbPutImage wfbPutImage +#define fbPutXYImage wfbPutXYImage +#define fbPutZImage wfbPutZImage +#define fbQueryBestSize wfbQueryBestSize +#define fbRasterizeEdges wfbRasterizeEdges +#define fbRasterizeTrapezoid wfbRasterizeTrapezoid +#define fbRealizeFont wfbRealizeFont +#define fbReduceRasterOp wfbReduceRasterOp +#define fbReplicatePixel wfbReplicatePixel +#define fbResolveColor wfbResolveColor +#define fbRestoreAreas wfbRestoreAreas +#define fbSaveAreas wfbSaveAreas +#define fbScreenPrivateIndex wfbScreenPrivateIndex +#define fbSegment wfbSegment +#define fbSelectBres wfbSelectBres +#define fbSetSpans wfbSetSpans +#define fbSetupScreen wfbSetupScreen +#define fbSetVisualTypes wfbSetVisualTypes +#define fbSetVisualTypesAndMasks wfbSetVisualTypesAndMasks +#define _fbSetWindowPixmap _wfbSetWindowPixmap +#define fbSolid wfbSolid +#define fbSolid24 wfbSolid24 +#define fbSolidBoxClipped wfbSolidBoxClipped +#define fbStipple wfbStipple +#define fbStipple1Bits wfbStipple1Bits +#define fbStipple24Bits wfbStipple24Bits +#define fbStipple2Bits wfbStipple2Bits +#define fbStipple4Bits wfbStipple4Bits +#define fbStipple8Bits wfbStipple8Bits +#define fbStippleTable wfbStippleTable +#define fbTile wfbTile +#define fbTransparentSpan wfbTransparentSpan +#define fbUninstallColormap wfbUninstallColormap +#define fbUnmapWindow wfbUnmapWindow +#define fbUnrealizeFont wfbUnrealizeFont +#define fbValidateGC wfbValidateGC +#define fbWalkCompositeRegion wfbWalkCompositeRegion +#define fbWinPrivateIndex wfbWinPrivateIndex +#define fbZeroLine wfbZeroLine +#define fbZeroSegment wfbZeroSegment +#define free_pixman_pict wfb_free_pixman_pict +#define image_from_pict wfb_image_from_pict +#define xxScrPrivateIndex wfbxxScrPrivateIndex +#define xxGCPrivateIndex wfbxxGCPrivateIndex +#define xxColormapPrivateIndex wfbxxColormapPrivateIndex +#define xxGeneration wfbxxGeneration +#define xxPrintVisuals wfbxxPrintVisuals +#define xxGCFuncs wfbxxGCFuncs +#define xxGCOps wfbxxGCOps +#define xxSetup wfbxxSetup +#define composeFunctions wfbComposeFunctions diff --git a/xorg-server-1.4/hw/Makefile.am b/xorg-server-1.4/hw/Makefile.am new file mode 100644 index 0000000..99df8e2 --- /dev/null +++ b/xorg-server-1.4/hw/Makefile.am @@ -0,0 +1,59 @@ +if DMX +if BUILD_DARWIN +# Darwin does not need the dmx subdir +else +DMX_SUBDIRS = dmx +endif +endif + +if XORG +if BUILD_DARWIN +# Darwin does not need the xfree86 subdir +else +XORG_SUBDIRS = xfree86 +endif +endif + +if XVFB +XVFB_SUBDIRS = vfb +endif + +if XNEST +XNEST_SUBDIRS = xnest +endif + +if XWIN +XWIN_SUBDIRS = xwin +endif + +if XGL +XGL_SUBDIRS = xgl +endif + +if KDRIVE +KDRIVE_SUBDIRS = kdrive +endif + +if XPRINT +XPRINT_SUBDIRS = xprint +endif + +if BUILD_DARWIN +DARWIN_SUBDIRS = darwin +endif + +SUBDIRS = \ + $(XORG_SUBDIRS) \ + $(XGL_SUBDIRS) \ + $(XWIN_SUBDIRS) \ + $(DARWIN_SUBDIRS) \ + $(XVFB_SUBDIRS) \ + $(XNEST_SUBDIRS) \ + $(DMX_SUBDIRS) \ + $(KDRIVE_SUBDIRS) \ + $(XPRINT_SUBDIRS) + +DIST_SUBDIRS = dmx xfree86 vfb xnest xwin darwin kdrive xgl xprint + +relink: + for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink ; done diff --git a/xorg-server-1.4/hw/Makefile.in b/xorg-server-1.4/hw/Makefile.in new file mode 100644 index 0000000..e1a6791 --- /dev/null +++ b/xorg-server-1.4/hw/Makefile.in @@ -0,0 +1,692 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = hw +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +# Darwin does not need the dmx subdir +@BUILD_DARWIN_FALSE@@DMX_TRUE@DMX_SUBDIRS = dmx + +# Darwin does not need the xfree86 subdir +@BUILD_DARWIN_FALSE@@XORG_TRUE@XORG_SUBDIRS = xfree86 +@XVFB_TRUE@XVFB_SUBDIRS = vfb +@XNEST_TRUE@XNEST_SUBDIRS = xnest +@XWIN_TRUE@XWIN_SUBDIRS = xwin +@XGL_TRUE@XGL_SUBDIRS = xgl +@KDRIVE_TRUE@KDRIVE_SUBDIRS = kdrive +@XPRINT_TRUE@XPRINT_SUBDIRS = xprint +@BUILD_DARWIN_TRUE@DARWIN_SUBDIRS = darwin +SUBDIRS = \ + $(XORG_SUBDIRS) \ + $(XGL_SUBDIRS) \ + $(XWIN_SUBDIRS) \ + $(DARWIN_SUBDIRS) \ + $(XVFB_SUBDIRS) \ + $(XNEST_SUBDIRS) \ + $(DMX_SUBDIRS) \ + $(KDRIVE_SUBDIRS) \ + $(XPRINT_SUBDIRS) + +DIST_SUBDIRS = dmx xfree86 vfb xnest xwin darwin kdrive xgl xprint +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +relink: + for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink ; done +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/darwin/Makefile.am b/xorg-server-1.4/hw/darwin/Makefile.am new file mode 100644 index 0000000..b773910 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/Makefile.am @@ -0,0 +1,287 @@ +noinst_LIBRARIES = libdarwinShared.a +libdarwin_XINPUT_SRCS = darwinXinput.c + +AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ +AM_CPPFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ +INCLUDES = @XORG_INCS@ -I../../miext/rootless + +DEFS = @DEFS@ -DUSE_NEW_CLUT + +if XQUARTZ +XQUARTZ_SUBDIRS = bundle quartz +endif + +SUBDIRS = \ + iokit \ + $(XQUARTZ_SUBDIRS) \ + utils \ + . + +darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app + +libdarwinShared_a_SOURCES = darwin.c \ + darwinEvents.c \ + darwinKeyboard.c \ + $(darwin_XINPUT_SRCS) + +bin_PROGRAMS = XDarwin Xquartz +XDarwin_SOURCES = \ + $(top_srcdir)/fb/fbcmap_mi.c \ + $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/Xi/stubs.c + +Xquartz_SOURCES = \ + $(top_srcdir)/fb/fbcmap_mi.c \ + $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/Xi/stubs.c \ + apple/X11Application.m \ + apple/X11Controller.m \ + quartz/Preferences.m \ + quartz/applewm.c \ + quartz/keysym2ucs.c \ + quartz/pseudoramiX.c \ + quartz/quartz.c \ + quartz/quartzAudio.c \ + quartz/quartzCocoa.m \ + quartz/quartzKeyboard.c \ + quartz/quartzPasteboard.c \ + quartz/quartzStartup.c \ + quartz/xpr/appledri.c \ + quartz/xpr/dri.c \ + quartz/xpr/xprAppleWM.c \ + quartz/xpr/xprCursor.c \ + quartz/xpr/xprFrame.c \ + quartz/xpr/xprScreen.c \ + quartz/xpr/x-hash.c \ + quartz/xpr/x-hook.c \ + quartz/xpr/x-list.c + +XDarwin_LDADD = \ + $(top_builddir)/dix/dixfonts.lo \ + $(top_builddir)/dix/libdix.la \ + $(top_builddir)/config/libconfig.a \ + ./libdarwinShared.a \ + ./iokit/libiokit.a \ + $(top_builddir)/miext/shadow/libshadow.la \ + $(top_builddir)/miext/cw/libcw.la \ + $(DARWIN_LIBS) \ + $(top_builddir)/miext/rootless/librootless.la \ + $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ + $(top_builddir)/miext/rootless/accel/librlAccel.la \ + @XORG_LIBS@ \ + $(XSERVER_LIBS) + +Xquartz_LDADD = \ + $(top_builddir)/dix/dixfonts.lo \ + $(top_builddir)/dix/libdix.la \ + $(top_builddir)/config/libconfig.a \ + ./libdarwinShared.a \ + $(top_builddir)/miext/shadow/libshadow.la \ + $(top_builddir)/miext/cw/libcw.la \ + $(DARWIN_LIBS) \ + $(top_builddir)/miext/rootless/librootless.la \ + $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ + $(top_builddir)/miext/rootless/accel/librlAccel.la \ + @XORG_LIBS@ \ + $(XSERVER_LIBS) -lXplugin + +XDarwin_LDFLAGS = \ + -XCClinker -Objc \ + -Wl,-u,_miDCInitialize \ + -Wl,-framework,IOKit + +Xquartz_LDFLAGS = \ + -XCClinker -Objc \ + -Wl,-u,_miDCInitialize \ + -Wl,-framework,Carbon \ + -Wl,-framework,OpenGL \ + -Wl,-framework,Cocoa \ + -Wl,-framework,CoreAudio \ + -Wl,-framework,IOKit + +XDarwin_CFLAGS = -DINXDARWIN +Xquartz_CFLAGS = -DINXQUARTZ -DHAS_CG_MACH_PORT -DHAS_KL_API -DHAVE_XORG_CONFIG_H + +if XQUARTZ +macosdir = $(darwinappdir)/Contents/MacOS + +DEFS += -DDARWIN_WITH_QUARTZ -DXFree86Server + +macos_PROGRAMS = XDarwinApp +macos_SCRIPTS = x11app + +x11app: + cd apple && xcodebuild CFLAGS="$(XSERVERCFLAGS_CFLAGS)" LDFLAGS="$(XSERVERCFLAGS_LIBS)" + +XDarwinApp_SOURCES = \ + $(top_srcdir)/fb/fbcmap_mi.c \ + $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/Xi/stubs.c + +XDarwinApp_LDADD = \ + $(top_builddir)/dix/dixfonts.lo \ + $(top_builddir)/dix/libdix.la \ + $(top_builddir)/config/libconfig.a \ + $(top_builddir)/os/libos.la \ + ./quartz/XApplication.o \ + ./libdarwinShared.a \ + ./quartz/libXQuartz.a \ + $(top_builddir)/miext/shadow/libshadow.la \ + $(top_builddir)/miext/cw/libcw.la \ + $(DARWIN_LIBS) \ + $(top_builddir)/miext/rootless/librootless.la \ + $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ + $(top_builddir)/miext/rootless/accel/librlAccel.la \ + @XORG_LIBS@ \ + $(XSERVER_LIBS) + +XDarwinApp_LDFLAGS = \ + -XCClinker -Objc \ + -Wl,-u,_miDCInitialize \ + -Wl,-framework,Carbon \ + -Wl,-framework,ApplicationServices \ + -Wl,-framework,Cocoa \ + -Wl,-framework,CoreAudio \ + -Wl,-framework,IOKit + +XDarwinApp_CFLAGS = -DINXDARWINAPP +HOOK_TARGETS = xquartz-install-hook + + +crplugindir = $(darwinappdir)/Contents/Resources/cr.bundle/Contents/MacOS +crplugin_LTLIBRARIES = cr.la +cr_la_SOURCES = \ + quartz/cr/crAppleWM.m \ + quartz/cr/crFrame.m \ + quartz/cr/crScreen.m \ + quartz/fullscreen/quartzCursor.c \ + quartz/cr/XView.m + +cr_la_LIBADD = \ + $(top_builddir)/miext/rootless/librootless.la \ + $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ + $(top_builddir)/miext/rootless/accel/librlAccel.la + +cr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ + -Wl,-framework,Cocoa \ + -Wl,-framework,Carbon \ + -XCClinker -ObjC \ + -XCClinker -bundle_loader -XCClinker XDarwinApp \ + -module -avoid-version -no-undefined +cr_la_DEPENDENCIES = XDarwinApp + +fullscreenplugindir = $(darwinappdir)/Contents/Resources/fullscreen.bundle/Contents/MacOS +fullscreenplugin_LTLIBRARIES = fullscreen.la +fullscreen_la_SOURCES = \ + quartz/fullscreen/fullscreen.c \ + quartz/fullscreen/quartzCursor.c + +fullscreen_la_LIBADD = \ + $(top_builddir)/miext/shadow/libshadow.la + +fullscreen_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ + -XCClinker -bundle_loader -XCClinker XDarwinApp \ + -module -avoid-version -no-undefined +fullscreen_la_DEPENDENCIES = XDarwinApp + +if GLX +glxMesaplugindir = $(darwinappdir)/Contents/Resources/glxMesa.bundle/Contents/MacOS +glxMesaplugin_LTLIBRARIES = glxMesa.la +glxMesa_la_SOURCES = +glxMesa_la_LIBADD = \ + $(top_builddir)/GL/glx/libglx.la \ + $(top_builddir)/GL/mesa/libGLcore.la +glxMesa_la_LDFLAGS = -shrext '' \ + -Wl,-framework,AGL \ + -Wl,-framework,OpenGL \ + -XCClinker -ObjC \ + -XCClinker -bundle_loader -XCClinker XDarwinApp \ + -module -avoid-version -no-undefined +glxMesa_la_DEPENDENCIES = XDarwinApp +endif + +endif +if HAVE_X_PLUGIN + +xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS +xprplugin_LTLIBRARIES = xpr.la +xpr_la_SOURCES = \ + quartz/xpr/appledri.c \ + quartz/xpr/dri.c \ + quartz/xpr/xprAppleWM.c \ + quartz/xpr/xprCursor.c \ + quartz/xpr/xprFrame.c \ + quartz/xpr/xprScreen.c \ + quartz/xpr/x-hash.c \ + quartz/xpr/x-hook.c \ + quartz/xpr/x-list.c + +xpr_la_LIBADD = \ + $(top_builddir)/miext/rootless/librootless.la \ + $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ + $(top_builddir)/miext/rootless/accel/librlAccel.la + +xpr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ + -lXplugin \ + -XCClinker -bundle_loader -XCClinker XDarwinApp \ + -module -avoid-version -no-undefined +xpr_la_DEPENDENCIES = XDarwinApp + +endif + +if HAVE_AGL_FRAMEWORK +glxCGLplugindir = $(darwinappdir)/Contents/Resources/glxCGL.bundle/Contents/MacOS +glxCGLplugin_LTLIBRARIES = glxCGL.la +glxCGL_la_SOURCES = +glxCGL_la_LIBADD = \ + $(top_builddir)/GL/glx/glxext.o \ + $(top_builddir)/GL/glx/libglx.a \ + $(top_builddir)/GL/apple/libAGLcore.a +glxCGL_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ + -Wl,-framework,AGL \ + -Wl,-framework,OpenGL \ + -XCClinker -ObjC \ + -XCClinker -bundle_loader -XCClinker XDarwinApp \ + -module -avoid-version -no-undefined +glxCGL_la_DEPENDENCIES = XDarwinApp + + +glxAGLplugindir = $(darwinappdir)/Contents/Resources/glxAGL.bundle/Contents/MacOS +glxAGLplugin_LTLIBRARIES = glxAGL.la +glxAGL_la_SOURCES = +glxAGL_la_LIBADD = \ + $(top_builddir)/GL/glx/glxext.o \ + $(top_builddir)/GL/glx/libglx.a \ + $(top_builddir)/GL/apple/libAGLcore.a +glxAGL_la_LDFLAGS = -shrext '' \ + -Wl,-framework,AGL \ + -Wl,-framework,OpenGL \ + -XCClinker -ObjC \ + -XCClinker -bundle_loader -XCClinker XDarwinApp \ + -module -avoid-version -no-undefined +glxAGL_la_DEPENDENCIES = XDarwinApp + + + +endif + +man1_MANS = XDarwin.man + +uninstall-hook: + rm -rf $(DESTDIR)$(macosdir)/XDarwin + +install-data-hook: $(HOOK_TARGETS) + +xquartz-install-hook: + mv $(DESTDIR)$(macosdir)/XDarwinApp $(DESTDIR)$(macosdir)/XDarwin + cd apple && xcodebuild install + +EXTRA_DIST = \ + darwin.c \ + darwinClut8.h \ + darwinEvents.c \ + darwin.h \ + darwinKeyboard.c \ + darwinKeyboard.h \ + darwinXinput.c \ + XDarwin.man diff --git a/xorg-server-1.4/hw/darwin/Makefile.in b/xorg-server-1.4/hw/darwin/Makefile.in new file mode 100644 index 0000000..5e0dd9a --- /dev/null +++ b/xorg-server-1.4/hw/darwin/Makefile.in @@ -0,0 +1,2090 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = XDarwin$(EXEEXT) Xquartz$(EXEEXT) +@XQUARTZ_TRUE@am__append_1 = -DDARWIN_WITH_QUARTZ -DXFree86Server +@XQUARTZ_TRUE@macos_PROGRAMS = XDarwinApp$(EXEEXT) +subdir = hw/darwin +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libdarwinShared_a_AR = $(AR) $(ARFLAGS) +libdarwinShared_a_LIBADD = +am_libdarwinShared_a_OBJECTS = darwin.$(OBJEXT) darwinEvents.$(OBJEXT) \ + darwinKeyboard.$(OBJEXT) +libdarwinShared_a_OBJECTS = $(am_libdarwinShared_a_OBJECTS) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(crplugindir)" \ + "$(DESTDIR)$(fullscreenplugindir)" \ + "$(DESTDIR)$(glxAGLplugindir)" "$(DESTDIR)$(glxCGLplugindir)" \ + "$(DESTDIR)$(glxMesaplugindir)" "$(DESTDIR)$(xprplugindir)" \ + "$(DESTDIR)$(bindir)" "$(DESTDIR)$(macosdir)" \ + "$(DESTDIR)$(macosdir)" "$(DESTDIR)$(man1dir)" +crpluginLTLIBRARIES_INSTALL = $(INSTALL) +fullscreenpluginLTLIBRARIES_INSTALL = $(INSTALL) +glxAGLpluginLTLIBRARIES_INSTALL = $(INSTALL) +glxCGLpluginLTLIBRARIES_INSTALL = $(INSTALL) +glxMesapluginLTLIBRARIES_INSTALL = $(INSTALL) +xprpluginLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(crplugin_LTLIBRARIES) $(fullscreenplugin_LTLIBRARIES) \ + $(glxAGLplugin_LTLIBRARIES) $(glxCGLplugin_LTLIBRARIES) \ + $(glxMesaplugin_LTLIBRARIES) $(xprplugin_LTLIBRARIES) +am__cr_la_SOURCES_DIST = quartz/cr/crAppleWM.m quartz/cr/crFrame.m \ + quartz/cr/crScreen.m quartz/fullscreen/quartzCursor.c \ + quartz/cr/XView.m +@XQUARTZ_TRUE@am_cr_la_OBJECTS = crAppleWM.lo crFrame.lo crScreen.lo \ +@XQUARTZ_TRUE@ quartzCursor.lo XView.lo +cr_la_OBJECTS = $(am_cr_la_OBJECTS) +cr_la_LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS) $(cr_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@XQUARTZ_TRUE@am_cr_la_rpath = -rpath $(crplugindir) +am__fullscreen_la_SOURCES_DIST = quartz/fullscreen/fullscreen.c \ + quartz/fullscreen/quartzCursor.c +@XQUARTZ_TRUE@am_fullscreen_la_OBJECTS = fullscreen.lo quartzCursor.lo +fullscreen_la_OBJECTS = $(am_fullscreen_la_OBJECTS) +fullscreen_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(fullscreen_la_LDFLAGS) $(LDFLAGS) -o $@ +@XQUARTZ_TRUE@am_fullscreen_la_rpath = -rpath $(fullscreenplugindir) +am_glxAGL_la_OBJECTS = +glxAGL_la_OBJECTS = $(am_glxAGL_la_OBJECTS) +glxAGL_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(glxAGL_la_LDFLAGS) $(LDFLAGS) -o $@ +@HAVE_AGL_FRAMEWORK_TRUE@am_glxAGL_la_rpath = -rpath \ +@HAVE_AGL_FRAMEWORK_TRUE@ $(glxAGLplugindir) +am_glxCGL_la_OBJECTS = +glxCGL_la_OBJECTS = $(am_glxCGL_la_OBJECTS) +glxCGL_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(glxCGL_la_LDFLAGS) $(LDFLAGS) -o $@ +@HAVE_AGL_FRAMEWORK_TRUE@am_glxCGL_la_rpath = -rpath \ +@HAVE_AGL_FRAMEWORK_TRUE@ $(glxCGLplugindir) +am_glxMesa_la_OBJECTS = +glxMesa_la_OBJECTS = $(am_glxMesa_la_OBJECTS) +glxMesa_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(glxMesa_la_LDFLAGS) $(LDFLAGS) -o $@ +@GLX_TRUE@@XQUARTZ_TRUE@am_glxMesa_la_rpath = -rpath \ +@GLX_TRUE@@XQUARTZ_TRUE@ $(glxMesaplugindir) +am__xpr_la_SOURCES_DIST = quartz/xpr/appledri.c quartz/xpr/dri.c \ + quartz/xpr/xprAppleWM.c quartz/xpr/xprCursor.c \ + quartz/xpr/xprFrame.c quartz/xpr/xprScreen.c \ + quartz/xpr/x-hash.c quartz/xpr/x-hook.c quartz/xpr/x-list.c +@HAVE_X_PLUGIN_TRUE@am_xpr_la_OBJECTS = appledri.lo dri.lo \ +@HAVE_X_PLUGIN_TRUE@ xprAppleWM.lo xprCursor.lo xprFrame.lo \ +@HAVE_X_PLUGIN_TRUE@ xprScreen.lo x-hash.lo x-hook.lo x-list.lo +xpr_la_OBJECTS = $(am_xpr_la_OBJECTS) +xpr_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(xpr_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_X_PLUGIN_TRUE@am_xpr_la_rpath = -rpath $(xprplugindir) +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +macosPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) $(macos_PROGRAMS) +am_XDarwin_OBJECTS = XDarwin-fbcmap_mi.$(OBJEXT) \ + XDarwin-miinitext.$(OBJEXT) XDarwin-stubs.$(OBJEXT) +XDarwin_OBJECTS = $(am_XDarwin_OBJECTS) +am__DEPENDENCIES_1 = +XDarwin_DEPENDENCIES = $(top_builddir)/dix/dixfonts.lo \ + $(top_builddir)/dix/libdix.la \ + $(top_builddir)/config/libconfig.a ./libdarwinShared.a \ + ./iokit/libiokit.a $(top_builddir)/miext/shadow/libshadow.la \ + $(top_builddir)/miext/cw/libcw.la $(am__DEPENDENCIES_1) \ + $(top_builddir)/miext/rootless/librootless.la \ + $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ + $(top_builddir)/miext/rootless/accel/librlAccel.la \ + $(am__DEPENDENCIES_1) +XDarwin_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(XDarwin_CFLAGS) $(CFLAGS) \ + $(XDarwin_LDFLAGS) $(LDFLAGS) -o $@ +am__XDarwinApp_SOURCES_DIST = $(top_srcdir)/fb/fbcmap_mi.c \ + $(top_srcdir)/mi/miinitext.c $(top_srcdir)/Xi/stubs.c +@XQUARTZ_TRUE@am_XDarwinApp_OBJECTS = XDarwinApp-fbcmap_mi.$(OBJEXT) \ +@XQUARTZ_TRUE@ XDarwinApp-miinitext.$(OBJEXT) \ +@XQUARTZ_TRUE@ XDarwinApp-stubs.$(OBJEXT) +XDarwinApp_OBJECTS = $(am_XDarwinApp_OBJECTS) +@XQUARTZ_TRUE@XDarwinApp_DEPENDENCIES = \ +@XQUARTZ_TRUE@ $(top_builddir)/dix/dixfonts.lo \ +@XQUARTZ_TRUE@ $(top_builddir)/dix/libdix.la \ +@XQUARTZ_TRUE@ $(top_builddir)/config/libconfig.a \ +@XQUARTZ_TRUE@ $(top_builddir)/os/libos.la \ +@XQUARTZ_TRUE@ ./quartz/XApplication.o ./libdarwinShared.a \ +@XQUARTZ_TRUE@ ./quartz/libXQuartz.a \ +@XQUARTZ_TRUE@ $(top_builddir)/miext/shadow/libshadow.la \ +@XQUARTZ_TRUE@ $(top_builddir)/miext/cw/libcw.la \ +@XQUARTZ_TRUE@ $(am__DEPENDENCIES_1) \ +@XQUARTZ_TRUE@ $(top_builddir)/miext/rootless/librootless.la \ +@XQUARTZ_TRUE@ $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ +@XQUARTZ_TRUE@ $(top_builddir)/miext/rootless/accel/librlAccel.la \ +@XQUARTZ_TRUE@ $(am__DEPENDENCIES_1) +XDarwinApp_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(XDarwinApp_CFLAGS) \ + $(CFLAGS) $(XDarwinApp_LDFLAGS) $(LDFLAGS) -o $@ +am_Xquartz_OBJECTS = Xquartz-fbcmap_mi.$(OBJEXT) \ + Xquartz-miinitext.$(OBJEXT) Xquartz-stubs.$(OBJEXT) \ + X11Application.$(OBJEXT) X11Controller.$(OBJEXT) \ + Preferences.$(OBJEXT) Xquartz-applewm.$(OBJEXT) \ + Xquartz-keysym2ucs.$(OBJEXT) Xquartz-pseudoramiX.$(OBJEXT) \ + Xquartz-quartz.$(OBJEXT) Xquartz-quartzAudio.$(OBJEXT) \ + quartzCocoa.$(OBJEXT) Xquartz-quartzKeyboard.$(OBJEXT) \ + Xquartz-quartzPasteboard.$(OBJEXT) \ + Xquartz-quartzStartup.$(OBJEXT) Xquartz-appledri.$(OBJEXT) \ + Xquartz-dri.$(OBJEXT) Xquartz-xprAppleWM.$(OBJEXT) \ + Xquartz-xprCursor.$(OBJEXT) Xquartz-xprFrame.$(OBJEXT) \ + Xquartz-xprScreen.$(OBJEXT) Xquartz-x-hash.$(OBJEXT) \ + Xquartz-x-hook.$(OBJEXT) Xquartz-x-list.$(OBJEXT) +Xquartz_OBJECTS = $(am_Xquartz_OBJECTS) +Xquartz_DEPENDENCIES = $(top_builddir)/dix/dixfonts.lo \ + $(top_builddir)/dix/libdix.la \ + $(top_builddir)/config/libconfig.a ./libdarwinShared.a \ + $(top_builddir)/miext/shadow/libshadow.la \ + $(top_builddir)/miext/cw/libcw.la $(am__DEPENDENCIES_1) \ + $(top_builddir)/miext/rootless/librootless.la \ + $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ + $(top_builddir)/miext/rootless/accel/librlAccel.la \ + $(am__DEPENDENCIES_1) +Xquartz_LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS) \ + $(Xquartz_LDFLAGS) $(LDFLAGS) -o $@ +macosSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(macos_SCRIPTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +OBJCCOMPILE = $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) +LTOBJCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) +OBJCLD = $(OBJC) +SOURCES = $(libdarwinShared_a_SOURCES) $(cr_la_SOURCES) \ + $(fullscreen_la_SOURCES) $(glxAGL_la_SOURCES) \ + $(glxCGL_la_SOURCES) $(glxMesa_la_SOURCES) $(xpr_la_SOURCES) \ + $(XDarwin_SOURCES) $(XDarwinApp_SOURCES) $(Xquartz_SOURCES) +DIST_SOURCES = $(libdarwinShared_a_SOURCES) $(am__cr_la_SOURCES_DIST) \ + $(am__fullscreen_la_SOURCES_DIST) $(glxAGL_la_SOURCES) \ + $(glxCGL_la_SOURCES) $(glxMesa_la_SOURCES) \ + $(am__xpr_la_SOURCES_DIST) $(XDarwin_SOURCES) \ + $(am__XDarwinApp_SOURCES_DIST) $(Xquartz_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(man1_MANS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = iokit bundle quartz utils . +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ -DUSE_NEW_CLUT $(am__append_1) +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LIBRARIES = libdarwinShared.a +libdarwin_XINPUT_SRCS = darwinXinput.c +AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ +AM_CPPFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ +INCLUDES = @XORG_INCS@ -I../../miext/rootless +@XQUARTZ_TRUE@XQUARTZ_SUBDIRS = bundle quartz +SUBDIRS = \ + iokit \ + $(XQUARTZ_SUBDIRS) \ + utils \ + . + +darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app +libdarwinShared_a_SOURCES = darwin.c \ + darwinEvents.c \ + darwinKeyboard.c \ + $(darwin_XINPUT_SRCS) + +XDarwin_SOURCES = \ + $(top_srcdir)/fb/fbcmap_mi.c \ + $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/Xi/stubs.c + +Xquartz_SOURCES = \ + $(top_srcdir)/fb/fbcmap_mi.c \ + $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/Xi/stubs.c \ + apple/X11Application.m \ + apple/X11Controller.m \ + quartz/Preferences.m \ + quartz/applewm.c \ + quartz/keysym2ucs.c \ + quartz/pseudoramiX.c \ + quartz/quartz.c \ + quartz/quartzAudio.c \ + quartz/quartzCocoa.m \ + quartz/quartzKeyboard.c \ + quartz/quartzPasteboard.c \ + quartz/quartzStartup.c \ + quartz/xpr/appledri.c \ + quartz/xpr/dri.c \ + quartz/xpr/xprAppleWM.c \ + quartz/xpr/xprCursor.c \ + quartz/xpr/xprFrame.c \ + quartz/xpr/xprScreen.c \ + quartz/xpr/x-hash.c \ + quartz/xpr/x-hook.c \ + quartz/xpr/x-list.c + +XDarwin_LDADD = \ + $(top_builddir)/dix/dixfonts.lo \ + $(top_builddir)/dix/libdix.la \ + $(top_builddir)/config/libconfig.a \ + ./libdarwinShared.a \ + ./iokit/libiokit.a \ + $(top_builddir)/miext/shadow/libshadow.la \ + $(top_builddir)/miext/cw/libcw.la \ + $(DARWIN_LIBS) \ + $(top_builddir)/miext/rootless/librootless.la \ + $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ + $(top_builddir)/miext/rootless/accel/librlAccel.la \ + @XORG_LIBS@ \ + $(XSERVER_LIBS) + +Xquartz_LDADD = \ + $(top_builddir)/dix/dixfonts.lo \ + $(top_builddir)/dix/libdix.la \ + $(top_builddir)/config/libconfig.a \ + ./libdarwinShared.a \ + $(top_builddir)/miext/shadow/libshadow.la \ + $(top_builddir)/miext/cw/libcw.la \ + $(DARWIN_LIBS) \ + $(top_builddir)/miext/rootless/librootless.la \ + $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ + $(top_builddir)/miext/rootless/accel/librlAccel.la \ + @XORG_LIBS@ \ + $(XSERVER_LIBS) -lXplugin + +XDarwin_LDFLAGS = \ + -XCClinker -Objc \ + -Wl,-u,_miDCInitialize \ + -Wl,-framework,IOKit + +Xquartz_LDFLAGS = \ + -XCClinker -Objc \ + -Wl,-u,_miDCInitialize \ + -Wl,-framework,Carbon \ + -Wl,-framework,OpenGL \ + -Wl,-framework,Cocoa \ + -Wl,-framework,CoreAudio \ + -Wl,-framework,IOKit + +XDarwin_CFLAGS = -DINXDARWIN +Xquartz_CFLAGS = -DINXQUARTZ -DHAS_CG_MACH_PORT -DHAS_KL_API -DHAVE_XORG_CONFIG_H +@XQUARTZ_TRUE@macosdir = $(darwinappdir)/Contents/MacOS +@XQUARTZ_TRUE@macos_SCRIPTS = x11app +@XQUARTZ_TRUE@XDarwinApp_SOURCES = \ +@XQUARTZ_TRUE@ $(top_srcdir)/fb/fbcmap_mi.c \ +@XQUARTZ_TRUE@ $(top_srcdir)/mi/miinitext.c \ +@XQUARTZ_TRUE@ $(top_srcdir)/Xi/stubs.c + +@XQUARTZ_TRUE@XDarwinApp_LDADD = \ +@XQUARTZ_TRUE@ $(top_builddir)/dix/dixfonts.lo \ +@XQUARTZ_TRUE@ $(top_builddir)/dix/libdix.la \ +@XQUARTZ_TRUE@ $(top_builddir)/config/libconfig.a \ +@XQUARTZ_TRUE@ $(top_builddir)/os/libos.la \ +@XQUARTZ_TRUE@ ./quartz/XApplication.o \ +@XQUARTZ_TRUE@ ./libdarwinShared.a \ +@XQUARTZ_TRUE@ ./quartz/libXQuartz.a \ +@XQUARTZ_TRUE@ $(top_builddir)/miext/shadow/libshadow.la \ +@XQUARTZ_TRUE@ $(top_builddir)/miext/cw/libcw.la \ +@XQUARTZ_TRUE@ $(DARWIN_LIBS) \ +@XQUARTZ_TRUE@ $(top_builddir)/miext/rootless/librootless.la \ +@XQUARTZ_TRUE@ $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ +@XQUARTZ_TRUE@ $(top_builddir)/miext/rootless/accel/librlAccel.la \ +@XQUARTZ_TRUE@ @XORG_LIBS@ \ +@XQUARTZ_TRUE@ $(XSERVER_LIBS) + +@XQUARTZ_TRUE@XDarwinApp_LDFLAGS = \ +@XQUARTZ_TRUE@ -XCClinker -Objc \ +@XQUARTZ_TRUE@ -Wl,-u,_miDCInitialize \ +@XQUARTZ_TRUE@ -Wl,-framework,Carbon \ +@XQUARTZ_TRUE@ -Wl,-framework,ApplicationServices \ +@XQUARTZ_TRUE@ -Wl,-framework,Cocoa \ +@XQUARTZ_TRUE@ -Wl,-framework,CoreAudio \ +@XQUARTZ_TRUE@ -Wl,-framework,IOKit + +@XQUARTZ_TRUE@XDarwinApp_CFLAGS = -DINXDARWINAPP +@XQUARTZ_TRUE@HOOK_TARGETS = xquartz-install-hook +@XQUARTZ_TRUE@crplugindir = $(darwinappdir)/Contents/Resources/cr.bundle/Contents/MacOS +@XQUARTZ_TRUE@crplugin_LTLIBRARIES = cr.la +@XQUARTZ_TRUE@cr_la_SOURCES = \ +@XQUARTZ_TRUE@ quartz/cr/crAppleWM.m \ +@XQUARTZ_TRUE@ quartz/cr/crFrame.m \ +@XQUARTZ_TRUE@ quartz/cr/crScreen.m \ +@XQUARTZ_TRUE@ quartz/fullscreen/quartzCursor.c \ +@XQUARTZ_TRUE@ quartz/cr/XView.m + +@XQUARTZ_TRUE@cr_la_LIBADD = \ +@XQUARTZ_TRUE@ $(top_builddir)/miext/rootless/librootless.la \ +@XQUARTZ_TRUE@ $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ +@XQUARTZ_TRUE@ $(top_builddir)/miext/rootless/accel/librlAccel.la + +@XQUARTZ_TRUE@cr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ +@XQUARTZ_TRUE@ -Wl,-framework,Cocoa \ +@XQUARTZ_TRUE@ -Wl,-framework,Carbon \ +@XQUARTZ_TRUE@ -XCClinker -ObjC \ +@XQUARTZ_TRUE@ -XCClinker -bundle_loader -XCClinker XDarwinApp \ +@XQUARTZ_TRUE@ -module -avoid-version -no-undefined + +@XQUARTZ_TRUE@cr_la_DEPENDENCIES = XDarwinApp +@XQUARTZ_TRUE@fullscreenplugindir = $(darwinappdir)/Contents/Resources/fullscreen.bundle/Contents/MacOS +@XQUARTZ_TRUE@fullscreenplugin_LTLIBRARIES = fullscreen.la +@XQUARTZ_TRUE@fullscreen_la_SOURCES = \ +@XQUARTZ_TRUE@ quartz/fullscreen/fullscreen.c \ +@XQUARTZ_TRUE@ quartz/fullscreen/quartzCursor.c + +@XQUARTZ_TRUE@fullscreen_la_LIBADD = \ +@XQUARTZ_TRUE@ $(top_builddir)/miext/shadow/libshadow.la + +@XQUARTZ_TRUE@fullscreen_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ +@XQUARTZ_TRUE@ -XCClinker -bundle_loader -XCClinker XDarwinApp \ +@XQUARTZ_TRUE@ -module -avoid-version -no-undefined + +@XQUARTZ_TRUE@fullscreen_la_DEPENDENCIES = XDarwinApp +@GLX_TRUE@@XQUARTZ_TRUE@glxMesaplugindir = $(darwinappdir)/Contents/Resources/glxMesa.bundle/Contents/MacOS +@GLX_TRUE@@XQUARTZ_TRUE@glxMesaplugin_LTLIBRARIES = glxMesa.la +@GLX_TRUE@@XQUARTZ_TRUE@glxMesa_la_SOURCES = +@GLX_TRUE@@XQUARTZ_TRUE@glxMesa_la_LIBADD = \ +@GLX_TRUE@@XQUARTZ_TRUE@ $(top_builddir)/GL/glx/libglx.la \ +@GLX_TRUE@@XQUARTZ_TRUE@ $(top_builddir)/GL/mesa/libGLcore.la + +@GLX_TRUE@@XQUARTZ_TRUE@glxMesa_la_LDFLAGS = -shrext '' \ +@GLX_TRUE@@XQUARTZ_TRUE@ -Wl,-framework,AGL \ +@GLX_TRUE@@XQUARTZ_TRUE@ -Wl,-framework,OpenGL \ +@GLX_TRUE@@XQUARTZ_TRUE@ -XCClinker -ObjC \ +@GLX_TRUE@@XQUARTZ_TRUE@ -XCClinker -bundle_loader -XCClinker XDarwinApp \ +@GLX_TRUE@@XQUARTZ_TRUE@ -module -avoid-version -no-undefined + +@GLX_TRUE@@XQUARTZ_TRUE@glxMesa_la_DEPENDENCIES = XDarwinApp +@HAVE_X_PLUGIN_TRUE@xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS +@HAVE_X_PLUGIN_TRUE@xprplugin_LTLIBRARIES = xpr.la +@HAVE_X_PLUGIN_TRUE@xpr_la_SOURCES = \ +@HAVE_X_PLUGIN_TRUE@ quartz/xpr/appledri.c \ +@HAVE_X_PLUGIN_TRUE@ quartz/xpr/dri.c \ +@HAVE_X_PLUGIN_TRUE@ quartz/xpr/xprAppleWM.c \ +@HAVE_X_PLUGIN_TRUE@ quartz/xpr/xprCursor.c \ +@HAVE_X_PLUGIN_TRUE@ quartz/xpr/xprFrame.c \ +@HAVE_X_PLUGIN_TRUE@ quartz/xpr/xprScreen.c \ +@HAVE_X_PLUGIN_TRUE@ quartz/xpr/x-hash.c \ +@HAVE_X_PLUGIN_TRUE@ quartz/xpr/x-hook.c \ +@HAVE_X_PLUGIN_TRUE@ quartz/xpr/x-list.c + +@HAVE_X_PLUGIN_TRUE@xpr_la_LIBADD = \ +@HAVE_X_PLUGIN_TRUE@ $(top_builddir)/miext/rootless/librootless.la \ +@HAVE_X_PLUGIN_TRUE@ $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ +@HAVE_X_PLUGIN_TRUE@ $(top_builddir)/miext/rootless/accel/librlAccel.la + +@HAVE_X_PLUGIN_TRUE@xpr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ +@HAVE_X_PLUGIN_TRUE@ -lXplugin \ +@HAVE_X_PLUGIN_TRUE@ -XCClinker -bundle_loader -XCClinker XDarwinApp \ +@HAVE_X_PLUGIN_TRUE@ -module -avoid-version -no-undefined + +@HAVE_X_PLUGIN_TRUE@xpr_la_DEPENDENCIES = XDarwinApp +@HAVE_AGL_FRAMEWORK_TRUE@glxCGLplugindir = $(darwinappdir)/Contents/Resources/glxCGL.bundle/Contents/MacOS +@HAVE_AGL_FRAMEWORK_TRUE@glxCGLplugin_LTLIBRARIES = glxCGL.la +@HAVE_AGL_FRAMEWORK_TRUE@glxCGL_la_SOURCES = +@HAVE_AGL_FRAMEWORK_TRUE@glxCGL_la_LIBADD = \ +@HAVE_AGL_FRAMEWORK_TRUE@ $(top_builddir)/GL/glx/glxext.o \ +@HAVE_AGL_FRAMEWORK_TRUE@ $(top_builddir)/GL/glx/libglx.a \ +@HAVE_AGL_FRAMEWORK_TRUE@ $(top_builddir)/GL/apple/libAGLcore.a + +@HAVE_AGL_FRAMEWORK_TRUE@glxCGL_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ +@HAVE_AGL_FRAMEWORK_TRUE@ -Wl,-framework,AGL \ +@HAVE_AGL_FRAMEWORK_TRUE@ -Wl,-framework,OpenGL \ +@HAVE_AGL_FRAMEWORK_TRUE@ -XCClinker -ObjC \ +@HAVE_AGL_FRAMEWORK_TRUE@ -XCClinker -bundle_loader -XCClinker XDarwinApp \ +@HAVE_AGL_FRAMEWORK_TRUE@ -module -avoid-version -no-undefined + +@HAVE_AGL_FRAMEWORK_TRUE@glxCGL_la_DEPENDENCIES = XDarwinApp +@HAVE_AGL_FRAMEWORK_TRUE@glxAGLplugindir = $(darwinappdir)/Contents/Resources/glxAGL.bundle/Contents/MacOS +@HAVE_AGL_FRAMEWORK_TRUE@glxAGLplugin_LTLIBRARIES = glxAGL.la +@HAVE_AGL_FRAMEWORK_TRUE@glxAGL_la_SOURCES = +@HAVE_AGL_FRAMEWORK_TRUE@glxAGL_la_LIBADD = \ +@HAVE_AGL_FRAMEWORK_TRUE@ $(top_builddir)/GL/glx/glxext.o \ +@HAVE_AGL_FRAMEWORK_TRUE@ $(top_builddir)/GL/glx/libglx.a \ +@HAVE_AGL_FRAMEWORK_TRUE@ $(top_builddir)/GL/apple/libAGLcore.a + +@HAVE_AGL_FRAMEWORK_TRUE@glxAGL_la_LDFLAGS = -shrext '' \ +@HAVE_AGL_FRAMEWORK_TRUE@ -Wl,-framework,AGL \ +@HAVE_AGL_FRAMEWORK_TRUE@ -Wl,-framework,OpenGL \ +@HAVE_AGL_FRAMEWORK_TRUE@ -XCClinker -ObjC \ +@HAVE_AGL_FRAMEWORK_TRUE@ -XCClinker -bundle_loader -XCClinker XDarwinApp \ +@HAVE_AGL_FRAMEWORK_TRUE@ -module -avoid-version -no-undefined + +@HAVE_AGL_FRAMEWORK_TRUE@glxAGL_la_DEPENDENCIES = XDarwinApp +man1_MANS = XDarwin.man +EXTRA_DIST = \ + darwin.c \ + darwinClut8.h \ + darwinEvents.c \ + darwin.h \ + darwinKeyboard.c \ + darwinKeyboard.h \ + darwinXinput.c \ + XDarwin.man + +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .m .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/darwin/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/darwin/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libdarwinShared.a: $(libdarwinShared_a_OBJECTS) $(libdarwinShared_a_DEPENDENCIES) + -rm -f libdarwinShared.a + $(libdarwinShared_a_AR) libdarwinShared.a $(libdarwinShared_a_OBJECTS) $(libdarwinShared_a_LIBADD) + $(RANLIB) libdarwinShared.a +install-crpluginLTLIBRARIES: $(crplugin_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(crplugindir)" || $(MKDIR_P) "$(DESTDIR)$(crplugindir)" + @list='$(crplugin_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(crpluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(crplugindir)/$$f'"; \ + $(LIBTOOL) --mode=install $(crpluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(crplugindir)/$$f"; \ + else :; fi; \ + done + +uninstall-crpluginLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(crplugin_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(crplugindir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(crplugindir)/$$p"; \ + done + +clean-crpluginLTLIBRARIES: + -test -z "$(crplugin_LTLIBRARIES)" || rm -f $(crplugin_LTLIBRARIES) + @list='$(crplugin_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-fullscreenpluginLTLIBRARIES: $(fullscreenplugin_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(fullscreenplugindir)" || $(MKDIR_P) "$(DESTDIR)$(fullscreenplugindir)" + @list='$(fullscreenplugin_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(fullscreenpluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(fullscreenplugindir)/$$f'"; \ + $(LIBTOOL) --mode=install $(fullscreenpluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(fullscreenplugindir)/$$f"; \ + else :; fi; \ + done + +uninstall-fullscreenpluginLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(fullscreenplugin_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(fullscreenplugindir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(fullscreenplugindir)/$$p"; \ + done + +clean-fullscreenpluginLTLIBRARIES: + -test -z "$(fullscreenplugin_LTLIBRARIES)" || rm -f $(fullscreenplugin_LTLIBRARIES) + @list='$(fullscreenplugin_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-glxAGLpluginLTLIBRARIES: $(glxAGLplugin_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(glxAGLplugindir)" || $(MKDIR_P) "$(DESTDIR)$(glxAGLplugindir)" + @list='$(glxAGLplugin_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(glxAGLpluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(glxAGLplugindir)/$$f'"; \ + $(LIBTOOL) --mode=install $(glxAGLpluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(glxAGLplugindir)/$$f"; \ + else :; fi; \ + done + +uninstall-glxAGLpluginLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(glxAGLplugin_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(glxAGLplugindir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(glxAGLplugindir)/$$p"; \ + done + +clean-glxAGLpluginLTLIBRARIES: + -test -z "$(glxAGLplugin_LTLIBRARIES)" || rm -f $(glxAGLplugin_LTLIBRARIES) + @list='$(glxAGLplugin_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-glxCGLpluginLTLIBRARIES: $(glxCGLplugin_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(glxCGLplugindir)" || $(MKDIR_P) "$(DESTDIR)$(glxCGLplugindir)" + @list='$(glxCGLplugin_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(glxCGLpluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(glxCGLplugindir)/$$f'"; \ + $(LIBTOOL) --mode=install $(glxCGLpluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(glxCGLplugindir)/$$f"; \ + else :; fi; \ + done + +uninstall-glxCGLpluginLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(glxCGLplugin_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(glxCGLplugindir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(glxCGLplugindir)/$$p"; \ + done + +clean-glxCGLpluginLTLIBRARIES: + -test -z "$(glxCGLplugin_LTLIBRARIES)" || rm -f $(glxCGLplugin_LTLIBRARIES) + @list='$(glxCGLplugin_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-glxMesapluginLTLIBRARIES: $(glxMesaplugin_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(glxMesaplugindir)" || $(MKDIR_P) "$(DESTDIR)$(glxMesaplugindir)" + @list='$(glxMesaplugin_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(glxMesapluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(glxMesaplugindir)/$$f'"; \ + $(LIBTOOL) --mode=install $(glxMesapluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(glxMesaplugindir)/$$f"; \ + else :; fi; \ + done + +uninstall-glxMesapluginLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(glxMesaplugin_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(glxMesaplugindir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(glxMesaplugindir)/$$p"; \ + done + +clean-glxMesapluginLTLIBRARIES: + -test -z "$(glxMesaplugin_LTLIBRARIES)" || rm -f $(glxMesaplugin_LTLIBRARIES) + @list='$(glxMesaplugin_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-xprpluginLTLIBRARIES: $(xprplugin_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(xprplugindir)" || $(MKDIR_P) "$(DESTDIR)$(xprplugindir)" + @list='$(xprplugin_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(xprpluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(xprplugindir)/$$f'"; \ + $(LIBTOOL) --mode=install $(xprpluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(xprplugindir)/$$f"; \ + else :; fi; \ + done + +uninstall-xprpluginLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(xprplugin_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(xprplugindir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(xprplugindir)/$$p"; \ + done + +clean-xprpluginLTLIBRARIES: + -test -z "$(xprplugin_LTLIBRARIES)" || rm -f $(xprplugin_LTLIBRARIES) + @list='$(xprplugin_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +cr.la: $(cr_la_OBJECTS) $(cr_la_DEPENDENCIES) + $(cr_la_LINK) $(am_cr_la_rpath) $(cr_la_OBJECTS) $(cr_la_LIBADD) $(LIBS) +fullscreen.la: $(fullscreen_la_OBJECTS) $(fullscreen_la_DEPENDENCIES) + $(fullscreen_la_LINK) $(am_fullscreen_la_rpath) $(fullscreen_la_OBJECTS) $(fullscreen_la_LIBADD) $(LIBS) +glxAGL.la: $(glxAGL_la_OBJECTS) $(glxAGL_la_DEPENDENCIES) + $(glxAGL_la_LINK) $(am_glxAGL_la_rpath) $(glxAGL_la_OBJECTS) $(glxAGL_la_LIBADD) $(LIBS) +glxCGL.la: $(glxCGL_la_OBJECTS) $(glxCGL_la_DEPENDENCIES) + $(glxCGL_la_LINK) $(am_glxCGL_la_rpath) $(glxCGL_la_OBJECTS) $(glxCGL_la_LIBADD) $(LIBS) +glxMesa.la: $(glxMesa_la_OBJECTS) $(glxMesa_la_DEPENDENCIES) + $(glxMesa_la_LINK) $(am_glxMesa_la_rpath) $(glxMesa_la_OBJECTS) $(glxMesa_la_LIBADD) $(LIBS) +xpr.la: $(xpr_la_OBJECTS) $(xpr_la_DEPENDENCIES) + $(xpr_la_LINK) $(am_xpr_la_rpath) $(xpr_la_OBJECTS) $(xpr_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +install-macosPROGRAMS: $(macos_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(macosdir)" || $(MKDIR_P) "$(DESTDIR)$(macosdir)" + @list='$(macos_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(macosPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(macosdir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(macosPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(macosdir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-macosPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(macos_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(macosdir)/$$f'"; \ + rm -f "$(DESTDIR)$(macosdir)/$$f"; \ + done + +clean-macosPROGRAMS: + @list='$(macos_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +XDarwin$(EXEEXT): $(XDarwin_OBJECTS) $(XDarwin_DEPENDENCIES) + @rm -f XDarwin$(EXEEXT) + $(XDarwin_LINK) $(XDarwin_OBJECTS) $(XDarwin_LDADD) $(LIBS) +XDarwinApp$(EXEEXT): $(XDarwinApp_OBJECTS) $(XDarwinApp_DEPENDENCIES) + @rm -f XDarwinApp$(EXEEXT) + $(XDarwinApp_LINK) $(XDarwinApp_OBJECTS) $(XDarwinApp_LDADD) $(LIBS) +Xquartz$(EXEEXT): $(Xquartz_OBJECTS) $(Xquartz_DEPENDENCIES) + @rm -f Xquartz$(EXEEXT) + $(Xquartz_LINK) $(Xquartz_OBJECTS) $(Xquartz_LDADD) $(LIBS) +install-macosSCRIPTS: $(macos_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(macosdir)" || $(MKDIR_P) "$(DESTDIR)$(macosdir)" + @list='$(macos_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(macosSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(macosdir)/$$f'"; \ + $(macosSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(macosdir)/$$f"; \ + else :; fi; \ + done + +uninstall-macosSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(macos_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(macosdir)/$$f'"; \ + rm -f "$(DESTDIR)$(macosdir)/$$f"; \ + done + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Preferences.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/X11Application.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/X11Controller.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XDarwin-fbcmap_mi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XDarwin-miinitext.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XDarwin-stubs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XDarwinApp-fbcmap_mi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XDarwinApp-miinitext.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XDarwinApp-stubs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XView.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-appledri.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-applewm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-dri.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-fbcmap_mi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-keysym2ucs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-miinitext.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-pseudoramiX.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-quartz.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-quartzAudio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-quartzKeyboard.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-quartzPasteboard.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-quartzStartup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-stubs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-x-hash.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-x-hook.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-x-list.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-xprAppleWM.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-xprCursor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-xprFrame.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xquartz-xprScreen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/appledri.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crAppleWM.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crFrame.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crScreen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/darwin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/darwinEvents.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/darwinKeyboard.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fullscreen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartzCocoa.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartzCursor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-hash.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-hook.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-list.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprAppleWM.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprCursor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprFrame.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprScreen.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +quartzCursor.lo: quartz/fullscreen/quartzCursor.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT quartzCursor.lo -MD -MP -MF $(DEPDIR)/quartzCursor.Tpo -c -o quartzCursor.lo `test -f 'quartz/fullscreen/quartzCursor.c' || echo '$(srcdir)/'`quartz/fullscreen/quartzCursor.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/quartzCursor.Tpo $(DEPDIR)/quartzCursor.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/fullscreen/quartzCursor.c' object='quartzCursor.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o quartzCursor.lo `test -f 'quartz/fullscreen/quartzCursor.c' || echo '$(srcdir)/'`quartz/fullscreen/quartzCursor.c + +fullscreen.lo: quartz/fullscreen/fullscreen.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fullscreen.lo -MD -MP -MF $(DEPDIR)/fullscreen.Tpo -c -o fullscreen.lo `test -f 'quartz/fullscreen/fullscreen.c' || echo '$(srcdir)/'`quartz/fullscreen/fullscreen.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/fullscreen.Tpo $(DEPDIR)/fullscreen.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/fullscreen/fullscreen.c' object='fullscreen.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fullscreen.lo `test -f 'quartz/fullscreen/fullscreen.c' || echo '$(srcdir)/'`quartz/fullscreen/fullscreen.c + +appledri.lo: quartz/xpr/appledri.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT appledri.lo -MD -MP -MF $(DEPDIR)/appledri.Tpo -c -o appledri.lo `test -f 'quartz/xpr/appledri.c' || echo '$(srcdir)/'`quartz/xpr/appledri.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/appledri.Tpo $(DEPDIR)/appledri.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/appledri.c' object='appledri.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o appledri.lo `test -f 'quartz/xpr/appledri.c' || echo '$(srcdir)/'`quartz/xpr/appledri.c + +dri.lo: quartz/xpr/dri.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dri.lo -MD -MP -MF $(DEPDIR)/dri.Tpo -c -o dri.lo `test -f 'quartz/xpr/dri.c' || echo '$(srcdir)/'`quartz/xpr/dri.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dri.Tpo $(DEPDIR)/dri.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/dri.c' object='dri.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dri.lo `test -f 'quartz/xpr/dri.c' || echo '$(srcdir)/'`quartz/xpr/dri.c + +xprAppleWM.lo: quartz/xpr/xprAppleWM.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xprAppleWM.lo -MD -MP -MF $(DEPDIR)/xprAppleWM.Tpo -c -o xprAppleWM.lo `test -f 'quartz/xpr/xprAppleWM.c' || echo '$(srcdir)/'`quartz/xpr/xprAppleWM.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xprAppleWM.Tpo $(DEPDIR)/xprAppleWM.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/xprAppleWM.c' object='xprAppleWM.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xprAppleWM.lo `test -f 'quartz/xpr/xprAppleWM.c' || echo '$(srcdir)/'`quartz/xpr/xprAppleWM.c + +xprCursor.lo: quartz/xpr/xprCursor.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xprCursor.lo -MD -MP -MF $(DEPDIR)/xprCursor.Tpo -c -o xprCursor.lo `test -f 'quartz/xpr/xprCursor.c' || echo '$(srcdir)/'`quartz/xpr/xprCursor.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xprCursor.Tpo $(DEPDIR)/xprCursor.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/xprCursor.c' object='xprCursor.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xprCursor.lo `test -f 'quartz/xpr/xprCursor.c' || echo '$(srcdir)/'`quartz/xpr/xprCursor.c + +xprFrame.lo: quartz/xpr/xprFrame.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xprFrame.lo -MD -MP -MF $(DEPDIR)/xprFrame.Tpo -c -o xprFrame.lo `test -f 'quartz/xpr/xprFrame.c' || echo '$(srcdir)/'`quartz/xpr/xprFrame.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xprFrame.Tpo $(DEPDIR)/xprFrame.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/xprFrame.c' object='xprFrame.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xprFrame.lo `test -f 'quartz/xpr/xprFrame.c' || echo '$(srcdir)/'`quartz/xpr/xprFrame.c + +xprScreen.lo: quartz/xpr/xprScreen.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xprScreen.lo -MD -MP -MF $(DEPDIR)/xprScreen.Tpo -c -o xprScreen.lo `test -f 'quartz/xpr/xprScreen.c' || echo '$(srcdir)/'`quartz/xpr/xprScreen.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xprScreen.Tpo $(DEPDIR)/xprScreen.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/xprScreen.c' object='xprScreen.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xprScreen.lo `test -f 'quartz/xpr/xprScreen.c' || echo '$(srcdir)/'`quartz/xpr/xprScreen.c + +x-hash.lo: quartz/xpr/x-hash.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT x-hash.lo -MD -MP -MF $(DEPDIR)/x-hash.Tpo -c -o x-hash.lo `test -f 'quartz/xpr/x-hash.c' || echo '$(srcdir)/'`quartz/xpr/x-hash.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/x-hash.Tpo $(DEPDIR)/x-hash.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/x-hash.c' object='x-hash.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o x-hash.lo `test -f 'quartz/xpr/x-hash.c' || echo '$(srcdir)/'`quartz/xpr/x-hash.c + +x-hook.lo: quartz/xpr/x-hook.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT x-hook.lo -MD -MP -MF $(DEPDIR)/x-hook.Tpo -c -o x-hook.lo `test -f 'quartz/xpr/x-hook.c' || echo '$(srcdir)/'`quartz/xpr/x-hook.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/x-hook.Tpo $(DEPDIR)/x-hook.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/x-hook.c' object='x-hook.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o x-hook.lo `test -f 'quartz/xpr/x-hook.c' || echo '$(srcdir)/'`quartz/xpr/x-hook.c + +x-list.lo: quartz/xpr/x-list.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT x-list.lo -MD -MP -MF $(DEPDIR)/x-list.Tpo -c -o x-list.lo `test -f 'quartz/xpr/x-list.c' || echo '$(srcdir)/'`quartz/xpr/x-list.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/x-list.Tpo $(DEPDIR)/x-list.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/x-list.c' object='x-list.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o x-list.lo `test -f 'quartz/xpr/x-list.c' || echo '$(srcdir)/'`quartz/xpr/x-list.c + +XDarwin-fbcmap_mi.o: $(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwin_CFLAGS) $(CFLAGS) -MT XDarwin-fbcmap_mi.o -MD -MP -MF $(DEPDIR)/XDarwin-fbcmap_mi.Tpo -c -o XDarwin-fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/XDarwin-fbcmap_mi.Tpo $(DEPDIR)/XDarwin-fbcmap_mi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/fb/fbcmap_mi.c' object='XDarwin-fbcmap_mi.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwin_CFLAGS) $(CFLAGS) -c -o XDarwin-fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c + +XDarwin-fbcmap_mi.obj: $(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwin_CFLAGS) $(CFLAGS) -MT XDarwin-fbcmap_mi.obj -MD -MP -MF $(DEPDIR)/XDarwin-fbcmap_mi.Tpo -c -o XDarwin-fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/XDarwin-fbcmap_mi.Tpo $(DEPDIR)/XDarwin-fbcmap_mi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/fb/fbcmap_mi.c' object='XDarwin-fbcmap_mi.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwin_CFLAGS) $(CFLAGS) -c -o XDarwin-fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` + +XDarwin-miinitext.o: $(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwin_CFLAGS) $(CFLAGS) -MT XDarwin-miinitext.o -MD -MP -MF $(DEPDIR)/XDarwin-miinitext.Tpo -c -o XDarwin-miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/XDarwin-miinitext.Tpo $(DEPDIR)/XDarwin-miinitext.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/mi/miinitext.c' object='XDarwin-miinitext.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwin_CFLAGS) $(CFLAGS) -c -o XDarwin-miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c + +XDarwin-miinitext.obj: $(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwin_CFLAGS) $(CFLAGS) -MT XDarwin-miinitext.obj -MD -MP -MF $(DEPDIR)/XDarwin-miinitext.Tpo -c -o XDarwin-miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/XDarwin-miinitext.Tpo $(DEPDIR)/XDarwin-miinitext.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/mi/miinitext.c' object='XDarwin-miinitext.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwin_CFLAGS) $(CFLAGS) -c -o XDarwin-miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` + +XDarwin-stubs.o: $(top_srcdir)/Xi/stubs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwin_CFLAGS) $(CFLAGS) -MT XDarwin-stubs.o -MD -MP -MF $(DEPDIR)/XDarwin-stubs.Tpo -c -o XDarwin-stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/XDarwin-stubs.Tpo $(DEPDIR)/XDarwin-stubs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/Xi/stubs.c' object='XDarwin-stubs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwin_CFLAGS) $(CFLAGS) -c -o XDarwin-stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c + +XDarwin-stubs.obj: $(top_srcdir)/Xi/stubs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwin_CFLAGS) $(CFLAGS) -MT XDarwin-stubs.obj -MD -MP -MF $(DEPDIR)/XDarwin-stubs.Tpo -c -o XDarwin-stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/XDarwin-stubs.Tpo $(DEPDIR)/XDarwin-stubs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/Xi/stubs.c' object='XDarwin-stubs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwin_CFLAGS) $(CFLAGS) -c -o XDarwin-stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi` + +XDarwinApp-fbcmap_mi.o: $(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwinApp_CFLAGS) $(CFLAGS) -MT XDarwinApp-fbcmap_mi.o -MD -MP -MF $(DEPDIR)/XDarwinApp-fbcmap_mi.Tpo -c -o XDarwinApp-fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/XDarwinApp-fbcmap_mi.Tpo $(DEPDIR)/XDarwinApp-fbcmap_mi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/fb/fbcmap_mi.c' object='XDarwinApp-fbcmap_mi.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwinApp_CFLAGS) $(CFLAGS) -c -o XDarwinApp-fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c + +XDarwinApp-fbcmap_mi.obj: $(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwinApp_CFLAGS) $(CFLAGS) -MT XDarwinApp-fbcmap_mi.obj -MD -MP -MF $(DEPDIR)/XDarwinApp-fbcmap_mi.Tpo -c -o XDarwinApp-fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/XDarwinApp-fbcmap_mi.Tpo $(DEPDIR)/XDarwinApp-fbcmap_mi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/fb/fbcmap_mi.c' object='XDarwinApp-fbcmap_mi.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwinApp_CFLAGS) $(CFLAGS) -c -o XDarwinApp-fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` + +XDarwinApp-miinitext.o: $(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwinApp_CFLAGS) $(CFLAGS) -MT XDarwinApp-miinitext.o -MD -MP -MF $(DEPDIR)/XDarwinApp-miinitext.Tpo -c -o XDarwinApp-miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/XDarwinApp-miinitext.Tpo $(DEPDIR)/XDarwinApp-miinitext.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/mi/miinitext.c' object='XDarwinApp-miinitext.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwinApp_CFLAGS) $(CFLAGS) -c -o XDarwinApp-miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c + +XDarwinApp-miinitext.obj: $(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwinApp_CFLAGS) $(CFLAGS) -MT XDarwinApp-miinitext.obj -MD -MP -MF $(DEPDIR)/XDarwinApp-miinitext.Tpo -c -o XDarwinApp-miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/XDarwinApp-miinitext.Tpo $(DEPDIR)/XDarwinApp-miinitext.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/mi/miinitext.c' object='XDarwinApp-miinitext.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwinApp_CFLAGS) $(CFLAGS) -c -o XDarwinApp-miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` + +XDarwinApp-stubs.o: $(top_srcdir)/Xi/stubs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwinApp_CFLAGS) $(CFLAGS) -MT XDarwinApp-stubs.o -MD -MP -MF $(DEPDIR)/XDarwinApp-stubs.Tpo -c -o XDarwinApp-stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/XDarwinApp-stubs.Tpo $(DEPDIR)/XDarwinApp-stubs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/Xi/stubs.c' object='XDarwinApp-stubs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwinApp_CFLAGS) $(CFLAGS) -c -o XDarwinApp-stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c + +XDarwinApp-stubs.obj: $(top_srcdir)/Xi/stubs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwinApp_CFLAGS) $(CFLAGS) -MT XDarwinApp-stubs.obj -MD -MP -MF $(DEPDIR)/XDarwinApp-stubs.Tpo -c -o XDarwinApp-stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/XDarwinApp-stubs.Tpo $(DEPDIR)/XDarwinApp-stubs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/Xi/stubs.c' object='XDarwinApp-stubs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(XDarwinApp_CFLAGS) $(CFLAGS) -c -o XDarwinApp-stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi` + +Xquartz-fbcmap_mi.o: $(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-fbcmap_mi.o -MD -MP -MF $(DEPDIR)/Xquartz-fbcmap_mi.Tpo -c -o Xquartz-fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-fbcmap_mi.Tpo $(DEPDIR)/Xquartz-fbcmap_mi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/fb/fbcmap_mi.c' object='Xquartz-fbcmap_mi.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c + +Xquartz-fbcmap_mi.obj: $(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-fbcmap_mi.obj -MD -MP -MF $(DEPDIR)/Xquartz-fbcmap_mi.Tpo -c -o Xquartz-fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-fbcmap_mi.Tpo $(DEPDIR)/Xquartz-fbcmap_mi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/fb/fbcmap_mi.c' object='Xquartz-fbcmap_mi.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` + +Xquartz-miinitext.o: $(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-miinitext.o -MD -MP -MF $(DEPDIR)/Xquartz-miinitext.Tpo -c -o Xquartz-miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-miinitext.Tpo $(DEPDIR)/Xquartz-miinitext.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/mi/miinitext.c' object='Xquartz-miinitext.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c + +Xquartz-miinitext.obj: $(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-miinitext.obj -MD -MP -MF $(DEPDIR)/Xquartz-miinitext.Tpo -c -o Xquartz-miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-miinitext.Tpo $(DEPDIR)/Xquartz-miinitext.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/mi/miinitext.c' object='Xquartz-miinitext.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` + +Xquartz-stubs.o: $(top_srcdir)/Xi/stubs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-stubs.o -MD -MP -MF $(DEPDIR)/Xquartz-stubs.Tpo -c -o Xquartz-stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-stubs.Tpo $(DEPDIR)/Xquartz-stubs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/Xi/stubs.c' object='Xquartz-stubs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c + +Xquartz-stubs.obj: $(top_srcdir)/Xi/stubs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-stubs.obj -MD -MP -MF $(DEPDIR)/Xquartz-stubs.Tpo -c -o Xquartz-stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-stubs.Tpo $(DEPDIR)/Xquartz-stubs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/Xi/stubs.c' object='Xquartz-stubs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi` + +Xquartz-applewm.o: quartz/applewm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-applewm.o -MD -MP -MF $(DEPDIR)/Xquartz-applewm.Tpo -c -o Xquartz-applewm.o `test -f 'quartz/applewm.c' || echo '$(srcdir)/'`quartz/applewm.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-applewm.Tpo $(DEPDIR)/Xquartz-applewm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/applewm.c' object='Xquartz-applewm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-applewm.o `test -f 'quartz/applewm.c' || echo '$(srcdir)/'`quartz/applewm.c + +Xquartz-applewm.obj: quartz/applewm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-applewm.obj -MD -MP -MF $(DEPDIR)/Xquartz-applewm.Tpo -c -o Xquartz-applewm.obj `if test -f 'quartz/applewm.c'; then $(CYGPATH_W) 'quartz/applewm.c'; else $(CYGPATH_W) '$(srcdir)/quartz/applewm.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-applewm.Tpo $(DEPDIR)/Xquartz-applewm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/applewm.c' object='Xquartz-applewm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-applewm.obj `if test -f 'quartz/applewm.c'; then $(CYGPATH_W) 'quartz/applewm.c'; else $(CYGPATH_W) '$(srcdir)/quartz/applewm.c'; fi` + +Xquartz-keysym2ucs.o: quartz/keysym2ucs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-keysym2ucs.o -MD -MP -MF $(DEPDIR)/Xquartz-keysym2ucs.Tpo -c -o Xquartz-keysym2ucs.o `test -f 'quartz/keysym2ucs.c' || echo '$(srcdir)/'`quartz/keysym2ucs.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-keysym2ucs.Tpo $(DEPDIR)/Xquartz-keysym2ucs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/keysym2ucs.c' object='Xquartz-keysym2ucs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-keysym2ucs.o `test -f 'quartz/keysym2ucs.c' || echo '$(srcdir)/'`quartz/keysym2ucs.c + +Xquartz-keysym2ucs.obj: quartz/keysym2ucs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-keysym2ucs.obj -MD -MP -MF $(DEPDIR)/Xquartz-keysym2ucs.Tpo -c -o Xquartz-keysym2ucs.obj `if test -f 'quartz/keysym2ucs.c'; then $(CYGPATH_W) 'quartz/keysym2ucs.c'; else $(CYGPATH_W) '$(srcdir)/quartz/keysym2ucs.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-keysym2ucs.Tpo $(DEPDIR)/Xquartz-keysym2ucs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/keysym2ucs.c' object='Xquartz-keysym2ucs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-keysym2ucs.obj `if test -f 'quartz/keysym2ucs.c'; then $(CYGPATH_W) 'quartz/keysym2ucs.c'; else $(CYGPATH_W) '$(srcdir)/quartz/keysym2ucs.c'; fi` + +Xquartz-pseudoramiX.o: quartz/pseudoramiX.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-pseudoramiX.o -MD -MP -MF $(DEPDIR)/Xquartz-pseudoramiX.Tpo -c -o Xquartz-pseudoramiX.o `test -f 'quartz/pseudoramiX.c' || echo '$(srcdir)/'`quartz/pseudoramiX.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-pseudoramiX.Tpo $(DEPDIR)/Xquartz-pseudoramiX.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/pseudoramiX.c' object='Xquartz-pseudoramiX.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-pseudoramiX.o `test -f 'quartz/pseudoramiX.c' || echo '$(srcdir)/'`quartz/pseudoramiX.c + +Xquartz-pseudoramiX.obj: quartz/pseudoramiX.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-pseudoramiX.obj -MD -MP -MF $(DEPDIR)/Xquartz-pseudoramiX.Tpo -c -o Xquartz-pseudoramiX.obj `if test -f 'quartz/pseudoramiX.c'; then $(CYGPATH_W) 'quartz/pseudoramiX.c'; else $(CYGPATH_W) '$(srcdir)/quartz/pseudoramiX.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-pseudoramiX.Tpo $(DEPDIR)/Xquartz-pseudoramiX.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/pseudoramiX.c' object='Xquartz-pseudoramiX.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-pseudoramiX.obj `if test -f 'quartz/pseudoramiX.c'; then $(CYGPATH_W) 'quartz/pseudoramiX.c'; else $(CYGPATH_W) '$(srcdir)/quartz/pseudoramiX.c'; fi` + +Xquartz-quartz.o: quartz/quartz.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-quartz.o -MD -MP -MF $(DEPDIR)/Xquartz-quartz.Tpo -c -o Xquartz-quartz.o `test -f 'quartz/quartz.c' || echo '$(srcdir)/'`quartz/quartz.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-quartz.Tpo $(DEPDIR)/Xquartz-quartz.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/quartz.c' object='Xquartz-quartz.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-quartz.o `test -f 'quartz/quartz.c' || echo '$(srcdir)/'`quartz/quartz.c + +Xquartz-quartz.obj: quartz/quartz.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-quartz.obj -MD -MP -MF $(DEPDIR)/Xquartz-quartz.Tpo -c -o Xquartz-quartz.obj `if test -f 'quartz/quartz.c'; then $(CYGPATH_W) 'quartz/quartz.c'; else $(CYGPATH_W) '$(srcdir)/quartz/quartz.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-quartz.Tpo $(DEPDIR)/Xquartz-quartz.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/quartz.c' object='Xquartz-quartz.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-quartz.obj `if test -f 'quartz/quartz.c'; then $(CYGPATH_W) 'quartz/quartz.c'; else $(CYGPATH_W) '$(srcdir)/quartz/quartz.c'; fi` + +Xquartz-quartzAudio.o: quartz/quartzAudio.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-quartzAudio.o -MD -MP -MF $(DEPDIR)/Xquartz-quartzAudio.Tpo -c -o Xquartz-quartzAudio.o `test -f 'quartz/quartzAudio.c' || echo '$(srcdir)/'`quartz/quartzAudio.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-quartzAudio.Tpo $(DEPDIR)/Xquartz-quartzAudio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/quartzAudio.c' object='Xquartz-quartzAudio.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-quartzAudio.o `test -f 'quartz/quartzAudio.c' || echo '$(srcdir)/'`quartz/quartzAudio.c + +Xquartz-quartzAudio.obj: quartz/quartzAudio.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-quartzAudio.obj -MD -MP -MF $(DEPDIR)/Xquartz-quartzAudio.Tpo -c -o Xquartz-quartzAudio.obj `if test -f 'quartz/quartzAudio.c'; then $(CYGPATH_W) 'quartz/quartzAudio.c'; else $(CYGPATH_W) '$(srcdir)/quartz/quartzAudio.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-quartzAudio.Tpo $(DEPDIR)/Xquartz-quartzAudio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/quartzAudio.c' object='Xquartz-quartzAudio.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-quartzAudio.obj `if test -f 'quartz/quartzAudio.c'; then $(CYGPATH_W) 'quartz/quartzAudio.c'; else $(CYGPATH_W) '$(srcdir)/quartz/quartzAudio.c'; fi` + +Xquartz-quartzKeyboard.o: quartz/quartzKeyboard.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-quartzKeyboard.o -MD -MP -MF $(DEPDIR)/Xquartz-quartzKeyboard.Tpo -c -o Xquartz-quartzKeyboard.o `test -f 'quartz/quartzKeyboard.c' || echo '$(srcdir)/'`quartz/quartzKeyboard.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-quartzKeyboard.Tpo $(DEPDIR)/Xquartz-quartzKeyboard.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/quartzKeyboard.c' object='Xquartz-quartzKeyboard.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-quartzKeyboard.o `test -f 'quartz/quartzKeyboard.c' || echo '$(srcdir)/'`quartz/quartzKeyboard.c + +Xquartz-quartzKeyboard.obj: quartz/quartzKeyboard.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-quartzKeyboard.obj -MD -MP -MF $(DEPDIR)/Xquartz-quartzKeyboard.Tpo -c -o Xquartz-quartzKeyboard.obj `if test -f 'quartz/quartzKeyboard.c'; then $(CYGPATH_W) 'quartz/quartzKeyboard.c'; else $(CYGPATH_W) '$(srcdir)/quartz/quartzKeyboard.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-quartzKeyboard.Tpo $(DEPDIR)/Xquartz-quartzKeyboard.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/quartzKeyboard.c' object='Xquartz-quartzKeyboard.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-quartzKeyboard.obj `if test -f 'quartz/quartzKeyboard.c'; then $(CYGPATH_W) 'quartz/quartzKeyboard.c'; else $(CYGPATH_W) '$(srcdir)/quartz/quartzKeyboard.c'; fi` + +Xquartz-quartzPasteboard.o: quartz/quartzPasteboard.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-quartzPasteboard.o -MD -MP -MF $(DEPDIR)/Xquartz-quartzPasteboard.Tpo -c -o Xquartz-quartzPasteboard.o `test -f 'quartz/quartzPasteboard.c' || echo '$(srcdir)/'`quartz/quartzPasteboard.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-quartzPasteboard.Tpo $(DEPDIR)/Xquartz-quartzPasteboard.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/quartzPasteboard.c' object='Xquartz-quartzPasteboard.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-quartzPasteboard.o `test -f 'quartz/quartzPasteboard.c' || echo '$(srcdir)/'`quartz/quartzPasteboard.c + +Xquartz-quartzPasteboard.obj: quartz/quartzPasteboard.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-quartzPasteboard.obj -MD -MP -MF $(DEPDIR)/Xquartz-quartzPasteboard.Tpo -c -o Xquartz-quartzPasteboard.obj `if test -f 'quartz/quartzPasteboard.c'; then $(CYGPATH_W) 'quartz/quartzPasteboard.c'; else $(CYGPATH_W) '$(srcdir)/quartz/quartzPasteboard.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-quartzPasteboard.Tpo $(DEPDIR)/Xquartz-quartzPasteboard.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/quartzPasteboard.c' object='Xquartz-quartzPasteboard.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-quartzPasteboard.obj `if test -f 'quartz/quartzPasteboard.c'; then $(CYGPATH_W) 'quartz/quartzPasteboard.c'; else $(CYGPATH_W) '$(srcdir)/quartz/quartzPasteboard.c'; fi` + +Xquartz-quartzStartup.o: quartz/quartzStartup.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-quartzStartup.o -MD -MP -MF $(DEPDIR)/Xquartz-quartzStartup.Tpo -c -o Xquartz-quartzStartup.o `test -f 'quartz/quartzStartup.c' || echo '$(srcdir)/'`quartz/quartzStartup.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-quartzStartup.Tpo $(DEPDIR)/Xquartz-quartzStartup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/quartzStartup.c' object='Xquartz-quartzStartup.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-quartzStartup.o `test -f 'quartz/quartzStartup.c' || echo '$(srcdir)/'`quartz/quartzStartup.c + +Xquartz-quartzStartup.obj: quartz/quartzStartup.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-quartzStartup.obj -MD -MP -MF $(DEPDIR)/Xquartz-quartzStartup.Tpo -c -o Xquartz-quartzStartup.obj `if test -f 'quartz/quartzStartup.c'; then $(CYGPATH_W) 'quartz/quartzStartup.c'; else $(CYGPATH_W) '$(srcdir)/quartz/quartzStartup.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-quartzStartup.Tpo $(DEPDIR)/Xquartz-quartzStartup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/quartzStartup.c' object='Xquartz-quartzStartup.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-quartzStartup.obj `if test -f 'quartz/quartzStartup.c'; then $(CYGPATH_W) 'quartz/quartzStartup.c'; else $(CYGPATH_W) '$(srcdir)/quartz/quartzStartup.c'; fi` + +Xquartz-appledri.o: quartz/xpr/appledri.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-appledri.o -MD -MP -MF $(DEPDIR)/Xquartz-appledri.Tpo -c -o Xquartz-appledri.o `test -f 'quartz/xpr/appledri.c' || echo '$(srcdir)/'`quartz/xpr/appledri.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-appledri.Tpo $(DEPDIR)/Xquartz-appledri.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/appledri.c' object='Xquartz-appledri.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-appledri.o `test -f 'quartz/xpr/appledri.c' || echo '$(srcdir)/'`quartz/xpr/appledri.c + +Xquartz-appledri.obj: quartz/xpr/appledri.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-appledri.obj -MD -MP -MF $(DEPDIR)/Xquartz-appledri.Tpo -c -o Xquartz-appledri.obj `if test -f 'quartz/xpr/appledri.c'; then $(CYGPATH_W) 'quartz/xpr/appledri.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/appledri.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-appledri.Tpo $(DEPDIR)/Xquartz-appledri.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/appledri.c' object='Xquartz-appledri.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-appledri.obj `if test -f 'quartz/xpr/appledri.c'; then $(CYGPATH_W) 'quartz/xpr/appledri.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/appledri.c'; fi` + +Xquartz-dri.o: quartz/xpr/dri.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-dri.o -MD -MP -MF $(DEPDIR)/Xquartz-dri.Tpo -c -o Xquartz-dri.o `test -f 'quartz/xpr/dri.c' || echo '$(srcdir)/'`quartz/xpr/dri.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-dri.Tpo $(DEPDIR)/Xquartz-dri.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/dri.c' object='Xquartz-dri.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-dri.o `test -f 'quartz/xpr/dri.c' || echo '$(srcdir)/'`quartz/xpr/dri.c + +Xquartz-dri.obj: quartz/xpr/dri.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-dri.obj -MD -MP -MF $(DEPDIR)/Xquartz-dri.Tpo -c -o Xquartz-dri.obj `if test -f 'quartz/xpr/dri.c'; then $(CYGPATH_W) 'quartz/xpr/dri.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/dri.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-dri.Tpo $(DEPDIR)/Xquartz-dri.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/dri.c' object='Xquartz-dri.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-dri.obj `if test -f 'quartz/xpr/dri.c'; then $(CYGPATH_W) 'quartz/xpr/dri.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/dri.c'; fi` + +Xquartz-xprAppleWM.o: quartz/xpr/xprAppleWM.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-xprAppleWM.o -MD -MP -MF $(DEPDIR)/Xquartz-xprAppleWM.Tpo -c -o Xquartz-xprAppleWM.o `test -f 'quartz/xpr/xprAppleWM.c' || echo '$(srcdir)/'`quartz/xpr/xprAppleWM.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-xprAppleWM.Tpo $(DEPDIR)/Xquartz-xprAppleWM.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/xprAppleWM.c' object='Xquartz-xprAppleWM.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-xprAppleWM.o `test -f 'quartz/xpr/xprAppleWM.c' || echo '$(srcdir)/'`quartz/xpr/xprAppleWM.c + +Xquartz-xprAppleWM.obj: quartz/xpr/xprAppleWM.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-xprAppleWM.obj -MD -MP -MF $(DEPDIR)/Xquartz-xprAppleWM.Tpo -c -o Xquartz-xprAppleWM.obj `if test -f 'quartz/xpr/xprAppleWM.c'; then $(CYGPATH_W) 'quartz/xpr/xprAppleWM.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/xprAppleWM.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-xprAppleWM.Tpo $(DEPDIR)/Xquartz-xprAppleWM.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/xprAppleWM.c' object='Xquartz-xprAppleWM.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-xprAppleWM.obj `if test -f 'quartz/xpr/xprAppleWM.c'; then $(CYGPATH_W) 'quartz/xpr/xprAppleWM.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/xprAppleWM.c'; fi` + +Xquartz-xprCursor.o: quartz/xpr/xprCursor.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-xprCursor.o -MD -MP -MF $(DEPDIR)/Xquartz-xprCursor.Tpo -c -o Xquartz-xprCursor.o `test -f 'quartz/xpr/xprCursor.c' || echo '$(srcdir)/'`quartz/xpr/xprCursor.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-xprCursor.Tpo $(DEPDIR)/Xquartz-xprCursor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/xprCursor.c' object='Xquartz-xprCursor.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-xprCursor.o `test -f 'quartz/xpr/xprCursor.c' || echo '$(srcdir)/'`quartz/xpr/xprCursor.c + +Xquartz-xprCursor.obj: quartz/xpr/xprCursor.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-xprCursor.obj -MD -MP -MF $(DEPDIR)/Xquartz-xprCursor.Tpo -c -o Xquartz-xprCursor.obj `if test -f 'quartz/xpr/xprCursor.c'; then $(CYGPATH_W) 'quartz/xpr/xprCursor.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/xprCursor.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-xprCursor.Tpo $(DEPDIR)/Xquartz-xprCursor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/xprCursor.c' object='Xquartz-xprCursor.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-xprCursor.obj `if test -f 'quartz/xpr/xprCursor.c'; then $(CYGPATH_W) 'quartz/xpr/xprCursor.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/xprCursor.c'; fi` + +Xquartz-xprFrame.o: quartz/xpr/xprFrame.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-xprFrame.o -MD -MP -MF $(DEPDIR)/Xquartz-xprFrame.Tpo -c -o Xquartz-xprFrame.o `test -f 'quartz/xpr/xprFrame.c' || echo '$(srcdir)/'`quartz/xpr/xprFrame.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-xprFrame.Tpo $(DEPDIR)/Xquartz-xprFrame.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/xprFrame.c' object='Xquartz-xprFrame.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-xprFrame.o `test -f 'quartz/xpr/xprFrame.c' || echo '$(srcdir)/'`quartz/xpr/xprFrame.c + +Xquartz-xprFrame.obj: quartz/xpr/xprFrame.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-xprFrame.obj -MD -MP -MF $(DEPDIR)/Xquartz-xprFrame.Tpo -c -o Xquartz-xprFrame.obj `if test -f 'quartz/xpr/xprFrame.c'; then $(CYGPATH_W) 'quartz/xpr/xprFrame.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/xprFrame.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-xprFrame.Tpo $(DEPDIR)/Xquartz-xprFrame.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/xprFrame.c' object='Xquartz-xprFrame.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-xprFrame.obj `if test -f 'quartz/xpr/xprFrame.c'; then $(CYGPATH_W) 'quartz/xpr/xprFrame.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/xprFrame.c'; fi` + +Xquartz-xprScreen.o: quartz/xpr/xprScreen.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-xprScreen.o -MD -MP -MF $(DEPDIR)/Xquartz-xprScreen.Tpo -c -o Xquartz-xprScreen.o `test -f 'quartz/xpr/xprScreen.c' || echo '$(srcdir)/'`quartz/xpr/xprScreen.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-xprScreen.Tpo $(DEPDIR)/Xquartz-xprScreen.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/xprScreen.c' object='Xquartz-xprScreen.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-xprScreen.o `test -f 'quartz/xpr/xprScreen.c' || echo '$(srcdir)/'`quartz/xpr/xprScreen.c + +Xquartz-xprScreen.obj: quartz/xpr/xprScreen.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-xprScreen.obj -MD -MP -MF $(DEPDIR)/Xquartz-xprScreen.Tpo -c -o Xquartz-xprScreen.obj `if test -f 'quartz/xpr/xprScreen.c'; then $(CYGPATH_W) 'quartz/xpr/xprScreen.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/xprScreen.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-xprScreen.Tpo $(DEPDIR)/Xquartz-xprScreen.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/xprScreen.c' object='Xquartz-xprScreen.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-xprScreen.obj `if test -f 'quartz/xpr/xprScreen.c'; then $(CYGPATH_W) 'quartz/xpr/xprScreen.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/xprScreen.c'; fi` + +Xquartz-x-hash.o: quartz/xpr/x-hash.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-x-hash.o -MD -MP -MF $(DEPDIR)/Xquartz-x-hash.Tpo -c -o Xquartz-x-hash.o `test -f 'quartz/xpr/x-hash.c' || echo '$(srcdir)/'`quartz/xpr/x-hash.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-x-hash.Tpo $(DEPDIR)/Xquartz-x-hash.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/x-hash.c' object='Xquartz-x-hash.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-x-hash.o `test -f 'quartz/xpr/x-hash.c' || echo '$(srcdir)/'`quartz/xpr/x-hash.c + +Xquartz-x-hash.obj: quartz/xpr/x-hash.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-x-hash.obj -MD -MP -MF $(DEPDIR)/Xquartz-x-hash.Tpo -c -o Xquartz-x-hash.obj `if test -f 'quartz/xpr/x-hash.c'; then $(CYGPATH_W) 'quartz/xpr/x-hash.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/x-hash.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-x-hash.Tpo $(DEPDIR)/Xquartz-x-hash.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/x-hash.c' object='Xquartz-x-hash.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-x-hash.obj `if test -f 'quartz/xpr/x-hash.c'; then $(CYGPATH_W) 'quartz/xpr/x-hash.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/x-hash.c'; fi` + +Xquartz-x-hook.o: quartz/xpr/x-hook.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-x-hook.o -MD -MP -MF $(DEPDIR)/Xquartz-x-hook.Tpo -c -o Xquartz-x-hook.o `test -f 'quartz/xpr/x-hook.c' || echo '$(srcdir)/'`quartz/xpr/x-hook.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-x-hook.Tpo $(DEPDIR)/Xquartz-x-hook.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/x-hook.c' object='Xquartz-x-hook.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-x-hook.o `test -f 'quartz/xpr/x-hook.c' || echo '$(srcdir)/'`quartz/xpr/x-hook.c + +Xquartz-x-hook.obj: quartz/xpr/x-hook.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-x-hook.obj -MD -MP -MF $(DEPDIR)/Xquartz-x-hook.Tpo -c -o Xquartz-x-hook.obj `if test -f 'quartz/xpr/x-hook.c'; then $(CYGPATH_W) 'quartz/xpr/x-hook.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/x-hook.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-x-hook.Tpo $(DEPDIR)/Xquartz-x-hook.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/x-hook.c' object='Xquartz-x-hook.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-x-hook.obj `if test -f 'quartz/xpr/x-hook.c'; then $(CYGPATH_W) 'quartz/xpr/x-hook.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/x-hook.c'; fi` + +Xquartz-x-list.o: quartz/xpr/x-list.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-x-list.o -MD -MP -MF $(DEPDIR)/Xquartz-x-list.Tpo -c -o Xquartz-x-list.o `test -f 'quartz/xpr/x-list.c' || echo '$(srcdir)/'`quartz/xpr/x-list.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-x-list.Tpo $(DEPDIR)/Xquartz-x-list.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/x-list.c' object='Xquartz-x-list.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-x-list.o `test -f 'quartz/xpr/x-list.c' || echo '$(srcdir)/'`quartz/xpr/x-list.c + +Xquartz-x-list.obj: quartz/xpr/x-list.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -MT Xquartz-x-list.obj -MD -MP -MF $(DEPDIR)/Xquartz-x-list.Tpo -c -o Xquartz-x-list.obj `if test -f 'quartz/xpr/x-list.c'; then $(CYGPATH_W) 'quartz/xpr/x-list.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/x-list.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/Xquartz-x-list.Tpo $(DEPDIR)/Xquartz-x-list.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quartz/xpr/x-list.c' object='Xquartz-x-list.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xquartz_CFLAGS) $(CFLAGS) -c -o Xquartz-x-list.obj `if test -f 'quartz/xpr/x-list.c'; then $(CYGPATH_W) 'quartz/xpr/x-list.c'; else $(CYGPATH_W) '$(srcdir)/quartz/xpr/x-list.c'; fi` + +.m.o: +@am__fastdepOBJC_TRUE@ $(OBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJCCOMPILE) -c -o $@ $< + +.m.obj: +@am__fastdepOBJC_TRUE@ $(OBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.m.lo: +@am__fastdepOBJC_TRUE@ $(LTOBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(LTOBJCCOMPILE) -c -o $@ $< + +crAppleWM.lo: quartz/cr/crAppleWM.m +@am__fastdepOBJC_TRUE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT crAppleWM.lo -MD -MP -MF $(DEPDIR)/crAppleWM.Tpo -c -o crAppleWM.lo `test -f 'quartz/cr/crAppleWM.m' || echo '$(srcdir)/'`quartz/cr/crAppleWM.m +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/crAppleWM.Tpo $(DEPDIR)/crAppleWM.Plo +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='quartz/cr/crAppleWM.m' object='crAppleWM.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o crAppleWM.lo `test -f 'quartz/cr/crAppleWM.m' || echo '$(srcdir)/'`quartz/cr/crAppleWM.m + +crFrame.lo: quartz/cr/crFrame.m +@am__fastdepOBJC_TRUE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT crFrame.lo -MD -MP -MF $(DEPDIR)/crFrame.Tpo -c -o crFrame.lo `test -f 'quartz/cr/crFrame.m' || echo '$(srcdir)/'`quartz/cr/crFrame.m +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/crFrame.Tpo $(DEPDIR)/crFrame.Plo +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='quartz/cr/crFrame.m' object='crFrame.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o crFrame.lo `test -f 'quartz/cr/crFrame.m' || echo '$(srcdir)/'`quartz/cr/crFrame.m + +crScreen.lo: quartz/cr/crScreen.m +@am__fastdepOBJC_TRUE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT crScreen.lo -MD -MP -MF $(DEPDIR)/crScreen.Tpo -c -o crScreen.lo `test -f 'quartz/cr/crScreen.m' || echo '$(srcdir)/'`quartz/cr/crScreen.m +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/crScreen.Tpo $(DEPDIR)/crScreen.Plo +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='quartz/cr/crScreen.m' object='crScreen.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o crScreen.lo `test -f 'quartz/cr/crScreen.m' || echo '$(srcdir)/'`quartz/cr/crScreen.m + +XView.lo: quartz/cr/XView.m +@am__fastdepOBJC_TRUE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT XView.lo -MD -MP -MF $(DEPDIR)/XView.Tpo -c -o XView.lo `test -f 'quartz/cr/XView.m' || echo '$(srcdir)/'`quartz/cr/XView.m +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/XView.Tpo $(DEPDIR)/XView.Plo +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='quartz/cr/XView.m' object='XView.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o XView.lo `test -f 'quartz/cr/XView.m' || echo '$(srcdir)/'`quartz/cr/XView.m + +X11Application.o: apple/X11Application.m +@am__fastdepOBJC_TRUE@ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT X11Application.o -MD -MP -MF $(DEPDIR)/X11Application.Tpo -c -o X11Application.o `test -f 'apple/X11Application.m' || echo '$(srcdir)/'`apple/X11Application.m +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/X11Application.Tpo $(DEPDIR)/X11Application.Po +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='apple/X11Application.m' object='X11Application.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o X11Application.o `test -f 'apple/X11Application.m' || echo '$(srcdir)/'`apple/X11Application.m + +X11Application.obj: apple/X11Application.m +@am__fastdepOBJC_TRUE@ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT X11Application.obj -MD -MP -MF $(DEPDIR)/X11Application.Tpo -c -o X11Application.obj `if test -f 'apple/X11Application.m'; then $(CYGPATH_W) 'apple/X11Application.m'; else $(CYGPATH_W) '$(srcdir)/apple/X11Application.m'; fi` +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/X11Application.Tpo $(DEPDIR)/X11Application.Po +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='apple/X11Application.m' object='X11Application.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o X11Application.obj `if test -f 'apple/X11Application.m'; then $(CYGPATH_W) 'apple/X11Application.m'; else $(CYGPATH_W) '$(srcdir)/apple/X11Application.m'; fi` + +X11Controller.o: apple/X11Controller.m +@am__fastdepOBJC_TRUE@ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT X11Controller.o -MD -MP -MF $(DEPDIR)/X11Controller.Tpo -c -o X11Controller.o `test -f 'apple/X11Controller.m' || echo '$(srcdir)/'`apple/X11Controller.m +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/X11Controller.Tpo $(DEPDIR)/X11Controller.Po +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='apple/X11Controller.m' object='X11Controller.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o X11Controller.o `test -f 'apple/X11Controller.m' || echo '$(srcdir)/'`apple/X11Controller.m + +X11Controller.obj: apple/X11Controller.m +@am__fastdepOBJC_TRUE@ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT X11Controller.obj -MD -MP -MF $(DEPDIR)/X11Controller.Tpo -c -o X11Controller.obj `if test -f 'apple/X11Controller.m'; then $(CYGPATH_W) 'apple/X11Controller.m'; else $(CYGPATH_W) '$(srcdir)/apple/X11Controller.m'; fi` +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/X11Controller.Tpo $(DEPDIR)/X11Controller.Po +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='apple/X11Controller.m' object='X11Controller.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o X11Controller.obj `if test -f 'apple/X11Controller.m'; then $(CYGPATH_W) 'apple/X11Controller.m'; else $(CYGPATH_W) '$(srcdir)/apple/X11Controller.m'; fi` + +Preferences.o: quartz/Preferences.m +@am__fastdepOBJC_TRUE@ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT Preferences.o -MD -MP -MF $(DEPDIR)/Preferences.Tpo -c -o Preferences.o `test -f 'quartz/Preferences.m' || echo '$(srcdir)/'`quartz/Preferences.m +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/Preferences.Tpo $(DEPDIR)/Preferences.Po +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='quartz/Preferences.m' object='Preferences.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o Preferences.o `test -f 'quartz/Preferences.m' || echo '$(srcdir)/'`quartz/Preferences.m + +Preferences.obj: quartz/Preferences.m +@am__fastdepOBJC_TRUE@ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT Preferences.obj -MD -MP -MF $(DEPDIR)/Preferences.Tpo -c -o Preferences.obj `if test -f 'quartz/Preferences.m'; then $(CYGPATH_W) 'quartz/Preferences.m'; else $(CYGPATH_W) '$(srcdir)/quartz/Preferences.m'; fi` +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/Preferences.Tpo $(DEPDIR)/Preferences.Po +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='quartz/Preferences.m' object='Preferences.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o Preferences.obj `if test -f 'quartz/Preferences.m'; then $(CYGPATH_W) 'quartz/Preferences.m'; else $(CYGPATH_W) '$(srcdir)/quartz/Preferences.m'; fi` + +quartzCocoa.o: quartz/quartzCocoa.m +@am__fastdepOBJC_TRUE@ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT quartzCocoa.o -MD -MP -MF $(DEPDIR)/quartzCocoa.Tpo -c -o quartzCocoa.o `test -f 'quartz/quartzCocoa.m' || echo '$(srcdir)/'`quartz/quartzCocoa.m +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/quartzCocoa.Tpo $(DEPDIR)/quartzCocoa.Po +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='quartz/quartzCocoa.m' object='quartzCocoa.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o quartzCocoa.o `test -f 'quartz/quartzCocoa.m' || echo '$(srcdir)/'`quartz/quartzCocoa.m + +quartzCocoa.obj: quartz/quartzCocoa.m +@am__fastdepOBJC_TRUE@ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT quartzCocoa.obj -MD -MP -MF $(DEPDIR)/quartzCocoa.Tpo -c -o quartzCocoa.obj `if test -f 'quartz/quartzCocoa.m'; then $(CYGPATH_W) 'quartz/quartzCocoa.m'; else $(CYGPATH_W) '$(srcdir)/quartz/quartzCocoa.m'; fi` +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/quartzCocoa.Tpo $(DEPDIR)/quartzCocoa.Po +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='quartz/quartzCocoa.m' object='quartzCocoa.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o quartzCocoa.obj `if test -f 'quartz/quartzCocoa.m'; then $(CYGPATH_W) 'quartz/quartzCocoa.m'; else $(CYGPATH_W) '$(srcdir)/quartz/quartzCocoa.m'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man1: $(man1_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ + done +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) \ + $(MANS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(crplugindir)" "$(DESTDIR)$(fullscreenplugindir)" "$(DESTDIR)$(glxAGLplugindir)" "$(DESTDIR)$(glxCGLplugindir)" "$(DESTDIR)$(glxMesaplugindir)" "$(DESTDIR)$(xprplugindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(macosdir)" "$(DESTDIR)$(macosdir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-crpluginLTLIBRARIES \ + clean-fullscreenpluginLTLIBRARIES clean-generic \ + clean-glxAGLpluginLTLIBRARIES clean-glxCGLpluginLTLIBRARIES \ + clean-glxMesapluginLTLIBRARIES clean-libtool \ + clean-macosPROGRAMS clean-noinstLIBRARIES \ + clean-xprpluginLTLIBRARIES mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-crpluginLTLIBRARIES \ + install-fullscreenpluginLTLIBRARIES \ + install-glxAGLpluginLTLIBRARIES \ + install-glxCGLpluginLTLIBRARIES \ + install-glxMesapluginLTLIBRARIES install-macosPROGRAMS \ + install-macosSCRIPTS install-man install-xprpluginLTLIBRARIES + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook + +install-dvi: install-dvi-recursive + +install-exec-am: install-binPROGRAMS + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: install-man1 + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-crpluginLTLIBRARIES \ + uninstall-fullscreenpluginLTLIBRARIES \ + uninstall-glxAGLpluginLTLIBRARIES \ + uninstall-glxCGLpluginLTLIBRARIES \ + uninstall-glxMesapluginLTLIBRARIES uninstall-macosPROGRAMS \ + uninstall-macosSCRIPTS uninstall-man \ + uninstall-xprpluginLTLIBRARIES + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook + +uninstall-man: uninstall-man1 + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-data-am install-strip uninstall-am + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-binPROGRAMS \ + clean-crpluginLTLIBRARIES clean-fullscreenpluginLTLIBRARIES \ + clean-generic clean-glxAGLpluginLTLIBRARIES \ + clean-glxCGLpluginLTLIBRARIES clean-glxMesapluginLTLIBRARIES \ + clean-libtool clean-macosPROGRAMS clean-noinstLIBRARIES \ + clean-xprpluginLTLIBRARIES ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS \ + install-crpluginLTLIBRARIES install-data install-data-am \ + install-data-hook install-dvi install-dvi-am install-exec \ + install-exec-am install-fullscreenpluginLTLIBRARIES \ + install-glxAGLpluginLTLIBRARIES \ + install-glxCGLpluginLTLIBRARIES \ + install-glxMesapluginLTLIBRARIES install-html install-html-am \ + install-info install-info-am install-macosPROGRAMS \ + install-macosSCRIPTS install-man install-man1 install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + install-xprpluginLTLIBRARIES installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-crpluginLTLIBRARIES \ + uninstall-fullscreenpluginLTLIBRARIES \ + uninstall-glxAGLpluginLTLIBRARIES \ + uninstall-glxCGLpluginLTLIBRARIES \ + uninstall-glxMesapluginLTLIBRARIES uninstall-hook \ + uninstall-macosPROGRAMS uninstall-macosSCRIPTS uninstall-man \ + uninstall-man1 uninstall-xprpluginLTLIBRARIES + + +@XQUARTZ_TRUE@x11app: +@XQUARTZ_TRUE@ cd apple && xcodebuild CFLAGS="$(XSERVERCFLAGS_CFLAGS)" LDFLAGS="$(XSERVERCFLAGS_LIBS)" + +uninstall-hook: + rm -rf $(DESTDIR)$(macosdir)/XDarwin + +install-data-hook: $(HOOK_TARGETS) + +xquartz-install-hook: + mv $(DESTDIR)$(macosdir)/XDarwinApp $(DESTDIR)$(macosdir)/XDarwin + cd apple && xcodebuild install +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/darwin/XDarwin.man b/xorg-server-1.4/hw/darwin/XDarwin.man new file mode 100644 index 0000000..eb1b9dc --- /dev/null +++ b/xorg-server-1.4/hw/darwin/XDarwin.man @@ -0,0 +1,205 @@ +.\" $XFree86: xc/programs/Xserver/hw/darwin/XDarwin.man,v 1.3 2001/09/23 23:02:37 torrey Exp $ +.\" +.TH XDARWIN 1 __vendorversion__ +.SH NAME +XDarwin \- X window system server for Darwin operating system +.SH SYNOPSIS +.B XDarwin +[ options ] ... +.SH DESCRIPTION +#ifdef DARWIN_WITH_QUARTZ +.I XDarwin +is the X window server for Mac OS X and the Darwin operating system +provided by the X.Org Foundation. +.I XDarwin +can run in three different modes. On Mac OS X, +.I XDarwin +runs in parallel with Aqua in full screen or rootless modes. These modes +are called Quartz modes, named after the Quartz 2D compositing engine used +by Aqua. XDarwin can also be run from the Darwin text console in IOKit mode. +.PP +When running from the console, +.I XDarwin +acts as the window server and uses IOKit services to access the display +framebuffer, mouse and keyboard and to provide a layer of hardware +abstraction. In console mode, +.I XDarwin +will normally be started by the \fIxdm(1)\fP display manager or by a script +that runs the program \fIxinit(1)\fP. +.PP +When running with the Mac OS X Aqua GUI, +.I XDarwin +will normally be started by launching from the Finder, but it may also be +started from the command line with the \fB\-quartz\fP, \fB\-fullscreen\fP, or +\fB\-rootless\fP options. Note that the defaults for various command line +options are set by the +.I XDarwin +application preferences in the Quartz modes. +.PP +In full screen Quartz mode, when the X Window System is active, it takes over +the entire screen. CoreGraphics is used to capture and draw to the screen. The +.I XDarwin +application allows easy switching between the Mac OS X and X window +desktops. More information is available in the Help menu of the +.I XDarwin +application. +.PP +In rootless mode, the X window system and Aqua share your display. The root +window of the X11 display is the size of the screen and contains all the +other windows. The X11 root window is not displayed in rootless mode as Aqua +handles the desktop background. +#else +.I XDarwin +is the X window server for Mac OS X and the Darwin operating system +provided by the X.Org Foundation. This version of +.I XDarwin +can only be started from the Darwin text console. The Mac OS X Aqua GUI, if +present, must be shut down. +.I XDarwin +uses IOKit services to access the display +framebuffer, mouse and keyboard and to provide a layer of hardware +abstraction. +.I XDarwin +will normally be started by the \fIxdm(1)\fP display manager or by a script +that runs the program \fIxinit(1)\fP. +#endif +.SH OPTIONS +.PP +In addition to the normal server options described in the \fIXserver(1)\fP +manual page, \fIXDarwin\fP accepts the following command line switches: +.TP 8 +.B \-fakebuttons +Emulates a 3 button mouse using modifier keys. By default, the Command modifier +is used to emulate button 2 and Option is used for button 3. Thus, clicking the +first mouse button while holding down Command will act like clicking +button 2. Holding down Option will simulate button 3. +.TP 8 +.B \-nofakebuttons +Do not emulate a 3 button mouse. This is the default. +.TP 8 +.B "\-fakemouse2 \fImodifiers\fP" +Change the modifier keys used to emulate the second mouse button. By default, +Command is used to emulate the second button. Any combination of the following +modifier names may be used: Shift, Option, Control, Command, Fn. For example, +.B \-fakemouse2 """Option,Shift"" +will set holding Option, Shift and clicking on button one as equivalent to +clicking the second mouse button. +.TP 8 +.B "\-fakemouse3 \fImodifiers\fP" +Change the modifier keys used to emulate the third mouse button. By default, +Option is used to emulate the third button. Any combination of the following +modifier names may be used: Shift, Option, Control, Command, Fn. For example, +.B \-fakemouse3 """Control,Shift"" +will set holding Control, Shift and clicking on button one as equivalent to +clicking the third mouse button. +.TP 8 +.B "\-keymap \fIfile\fP" +On startup \fIXDarwin\fP translates a Darwin keymapping into an X keymap. +The default is to read this keymapping from USA.keymapping. With this option +the keymapping will be read from \fIfile\fP instead. If the file's path is +not specified, it will be searched for in Library/Keyboards/ underneath the +following directories (in order): ~, /, /Network, /System. +.TP 8 +.B \-nokeymap +On startup \fIXDarwin\fP translates a Darwin keymapping into an X keymap. +With this option XDarwin queries the kernel for the current keymapping +instead of reading it from a file. This will often fail on newer kernels. +#ifdef DARWIN_WITH_QUARTZ +.TP 8 +.B "\-size \fIwidth\fP \fIheight\fP" +Sets the screen resolution for the X server to use. +Ignored in rootless mode. +.TP 8 +.B "\-depth \fIdepth\fP" +Specifies the color bit depth to use. Currently only 8, 15, and 24 color bits +per pixel are supported. +Ignored in rootless mode. +.TP 8 +.B "\-refresh \fIrate\fP" +Gives the refresh rate to use in Hz. For LCD displays this should be 0. +Ignored in rootless mode. +.TP 8 +.B \-fullscreen +Run full screen in parallel with Mac OS X Aqua GUI. +.TP 8 +.B \-rootless +Run rootless inside Mac OS X Aqua GUI. +.TP 8 +.B \-quartz +Run in parallel with the Mac OS X Aqua GUI using the default mode. +#else +.TP 8 +.B "\-size \fIwidth\fP \fIheight\fP" +Sets the screen resolution for the X server to use. +.TP 8 +.B "\-depth \fIdepth\fP" +Specifies the color bit depth to use. Currently only 8, 15, and 24 color bits +per pixel are supported. +.TP 8 +.B "\-refresh \fIrate\fP" +Gives the refresh rate to use in Hz. For LCD displays this should be 0. +#endif +.TP 8 +.B \-showconfig +Print out the server version and patchlevel. +.TP 8 +.B \-version +Same as \fB\-showconfig\fP. +.SH "SEE ALSO" +.PP +X(__miscmansuffix__), Xorg(1), Xserver(1), xdm(1), xinit(1) +.SH BUGS +.I XDarwin +and this man page still have many limitations. Some of the more obvious +ones are: +.br +- The display mode cannot be changed once the X server has started. +.br +- A screen saver is not supported. +.PP +.SH AUTHORS +XFree86 was originally ported to Mac OS X Server by John Carmack. Dave +Zarzycki used this as the basis of his port of XFree86 4.0 to Darwin 1.0. +Torrey T. Lyons improved and integrated this code into the XFree86 +Project's mainline for the 4.0.2 release. +.PP +The following members of the XonX Team contributed to the following +releases (in alphabetical order): +.TP 4 +XFree86 4.1.0: +.br +Rob Braun - Darwin x86 support +.br +Torrey T. Lyons - Project Lead +.br +Andreas Monitzer - Cocoa version of XDarwin front end +.br +Gregory Robert Parker - Original Quartz implementation +.br +Christoph Pfisterer - Dynamic shared X libraries +.br +Toshimitsu Tanaka - Japanese localization +.TP 4 +XFree86 4.2.0: +.br +Rob Braun - Darwin x86 support +.br +Pablo Di Noto - Spanish localization +.br +Paul Edens - Dutch localization +.br +Kyunghwan Kim - Korean localization +.br +Mario Klebsch - Non-US keyboard support +.br +Torrey T. Lyons - Project Lead +.br +Andreas Monitzer - German localization +.br +Patrik Montgomery - Swedish localization +.br +Greg Parker - Rootless support +.br +Toshimitsu Tanaka - Japanese localization +.br +Olivier Verdier - French localization diff --git a/xorg-server-1.4/hw/darwin/apple/X11Application.m b/xorg-server-1.4/hw/darwin/apple/X11Application.m new file mode 100644 index 0000000..57795f4 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/apple/X11Application.m @@ -0,0 +1,926 @@ +/* X11Application.m -- subclass of NSApplication to multiplex events + + Copyright (c) 2002-2007 Apple Inc. + + 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 ABOVE LISTED COPYRIGHT + HOLDER(S) 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(s) of the above + 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. */ + +#include "../quartz/quartzCommon.h" + +#import "X11Application.h" +#include + +/* ouch! */ +#define BOOL X_BOOL +# include "darwin.h" +# include "../quartz/quartz.h" +# define _APPLEWM_SERVER_ +# include "X11/extensions/applewm.h" +# include "micmap.h" +#undef BOOL + +#include "xf86Version.h" + +#include +#include +#include + +#define DEFAULTS_FILE "/etc/X11/xserver/Xquartz.plist" + +int X11EnableKeyEquivalents = TRUE; +int quartzHasRoot = FALSE, quartzEnableRootless = TRUE; + +extern int darwinFakeButtons, input_check_flag; +// extern Bool enable_stereo; +Bool enable_stereo; //<-- this needs to go back to being an extern once glxCGL is fixed + +extern xEvent *darwinEvents; + +X11Application *X11App; + +#define ALL_KEY_MASKS (NSShiftKeyMask | NSControlKeyMask | NSAlternateKeyMask | NSCommandKeyMask) + +@implementation X11Application + +typedef struct message_struct message; +struct message_struct { + mach_msg_header_t hdr; + SEL selector; + NSObject *arg; +}; + +static mach_port_t _port; + +static void send_nsevent (NSEventType type, NSEvent *e); + +/* Quartz mode initialization routine. This is often dynamically loaded + but is statically linked into this X server. */ +extern Bool QuartzModeBundleInit(void); + +static void init_ports (void) { + kern_return_t r; + NSPort *p; + + if (_port != MACH_PORT_NULL) return; + + r = mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE, &_port); + if (r != KERN_SUCCESS) return; + + p = [NSMachPort portWithMachPort:_port]; + [p setDelegate:NSApp]; + [p scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; +} + +static void message_kit_thread (SEL selector, NSObject *arg) { + message msg; + kern_return_t r; + + msg.hdr.msgh_bits = MACH_MSGH_BITS (MACH_MSG_TYPE_MAKE_SEND, 0); + msg.hdr.msgh_size = sizeof (msg); + msg.hdr.msgh_remote_port = _port; + msg.hdr.msgh_local_port = MACH_PORT_NULL; + msg.hdr.msgh_reserved = 0; + msg.hdr.msgh_id = 0; + + msg.selector = selector; + msg.arg = [arg retain]; + + r = mach_msg (&msg.hdr, MACH_SEND_MSG, msg.hdr.msgh_size, + 0, MACH_PORT_NULL, 0, MACH_PORT_NULL); + if (r != KERN_SUCCESS) + ErrorF("%s: mach_msg failed: %x\n", __FUNCTION__, r); +} + +- (void) handleMachMessage:(void *)_msg { + message *msg = _msg; + + [self performSelector:msg->selector withObject:msg->arg]; + [msg->arg release]; +} + +- (void) set_controller:obj { + if (_controller == nil) _controller = [obj retain]; +} + +- (void) dealloc { + if (_controller != nil) [_controller release]; + + if (_port != MACH_PORT_NULL) + mach_port_deallocate (mach_task_self (), _port); + + [super dealloc]; +} + +- (void) orderFrontStandardAboutPanel: (id) sender { + NSMutableDictionary *dict; + NSDictionary *infoDict; + NSString *tem; + + dict = [NSMutableDictionary dictionaryWithCapacity:2]; + infoDict = [[NSBundle mainBundle] infoDictionary]; + + [dict setObject: NSLocalizedString (@"The X Window System", @"About panel") + forKey:@"ApplicationName"]; + + tem = [infoDict objectForKey:@"CFBundleShortVersionString"]; + + [dict setObject:[NSString stringWithFormat:@"X11.app %@ - X.org X11R7.3", tem] + forKey:@"ApplicationVersion"]; + + [self orderFrontStandardAboutPanelWithOptions: dict]; +} + +- (void) activateX:(BOOL)state { + /* Create a TSM document that supports full Unicode input, and + have it activated while X is active (unless using the old + keymapping files) */ + static TSMDocumentID x11_document; + + if (state) { + QuartzMessageServerThread (kXDarwinActivate, 0); + + if (!_x_active) { + if (x11_document == 0 && darwinKeymapFile == NULL) { + OSType types[1]; + types[0] = kUnicodeDocument; + NewTSMDocument (1, types, &x11_document, 0); + } + + if (x11_document != 0) ActivateTSMDocument (x11_document); + } + } else { + QuartzMessageServerThread (kXDarwinDeactivate, 0); + + if (_x_active && x11_document != 0) + DeactivateTSMDocument (x11_document); + } + + _x_active = state; +} + +- (void) became_key:(NSWindow *)win { + [self activateX:NO]; +} + +- (void) sendEvent:(NSEvent *)e { + NSEventType type; + BOOL for_appkit, for_x; + + type = [e type]; + + /* By default pass down the responder chain and to X. */ + for_appkit = YES; + for_x = YES; + + switch (type) { + case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown: + case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp: + if ([e window] != nil) { + /* Pointer event has a window. Probably something for the kit. */ + + for_x = NO; + + if (_x_active) [self activateX:NO]; + } else if ([self modalWindow] == nil) { + /* Must be an X window. Tell appkit it doesn't have focus. */ + + for_appkit = NO; + + if ([self isActive]) { + [self deactivate]; + + if (!_x_active && quartzProcs->IsX11Window([e window], [e windowNumber])) + [self activateX:YES]; + } + } + break; + + case NSKeyDown: case NSKeyUp: + if (_x_active) { + static int swallow_up; + + /* No kit window is focused, so send it to X. */ + + for_appkit = NO; + + if (type == NSKeyDown) { + /* Before that though, see if there are any global + shortcuts bound to it. */ + + if (X11EnableKeyEquivalents + && [[self mainMenu] performKeyEquivalent:e]) { + swallow_up = [e keyCode]; + for_x = NO; + } else if (!quartzEnableRootless + && ([e modifierFlags] & ALL_KEY_MASKS) + == (NSCommandKeyMask | NSAlternateKeyMask) + && ([e keyCode] == 0 /*a*/ + || [e keyCode] == 53 /*Esc*/)) { + swallow_up = 0; + for_x = NO; +#ifdef DARWIN_DDX_MISSING + QuartzMessageServerThread (kXDarwinToggleFullscreen, 0); +#endif + } + } else { + /* If we saw a key equivalent on the down, don't pass + the up through to X. */ + + if (swallow_up != 0 && [e keyCode] == swallow_up) { + swallow_up = 0; + for_x = NO; + } + } + } + else for_x = NO; + break; + + case NSFlagsChanged: + /* For the l33t X users who remap modifier keys to normal keysyms. */ + if (!_x_active) + for_x = NO; + break; + + case NSAppKitDefined: + switch ([e subtype]) { + case NSApplicationActivatedEventType: + for_x = NO; + if ([self modalWindow] == nil) { + for_appkit = NO; + + /* FIXME: hack to avoid having to pass the event to appkit, + which would cause it to raise one of its windows. */ + _appFlags._active = YES; + + [self activateX:YES]; +#ifdef DARWIN_DDX_MISSING + if ([e data2] & 0x10) QuartzMessageServerThread (kXDarwinBringAllToFront, 0); +#endif + } + break; + + case 18: /* ApplicationDidReactivate */ + if (quartzHasRoot) for_appkit = NO; + break; + + case NSApplicationDeactivatedEventType: + for_x = NO; + [self activateX:NO]; + break; + } + break; + + default: break; /* for gcc */ + } + + if (for_appkit) [super sendEvent:e]; + if (for_x) send_nsevent (type, e); +} + +- (void) set_window_menu:(NSArray *)list { + [_controller set_window_menu:list]; +} + +- (void) set_window_menu_check:(NSNumber *)n { + [_controller set_window_menu_check:n]; +} + +- (void) set_apps_menu:(NSArray *)list { + [_controller set_apps_menu:list]; +} + +- (void) set_front_process:unused { + [NSApp activateIgnoringOtherApps:YES]; + + if ([self modalWindow] == nil) [self activateX:YES]; +} + +- (void) set_can_quit:(NSNumber *)state { + [_controller set_can_quit:[state boolValue]]; +} + +- (void) server_ready:unused { + [_controller server_ready]; +} + +- (void) show_hide_menubar:(NSNumber *)state { + if ([state boolValue]) ShowMenuBar (); + else HideMenuBar (); +} + + +/* user preferences */ + +/* Note that these functions only work for arrays whose elements + can be toll-free-bridged between NS and CF worlds. */ + +static const void *cfretain (CFAllocatorRef a, const void *b) { + return CFRetain (b); +} + +static void cfrelease (CFAllocatorRef a, const void *b) { + CFRelease (b); +} + +static CFMutableArrayRef nsarray_to_cfarray (NSArray *in) { + CFMutableArrayRef out; + CFArrayCallBacks cb; + NSObject *ns; + const CFTypeRef *cf; + int i, count; + + memset (&cb, 0, sizeof (cb)); + cb.version = 0; + cb.retain = cfretain; + cb.release = cfrelease; + + count = [in count]; + out = CFArrayCreateMutable (NULL, count, &cb); + + for (i = 0; i < count; i++) { + ns = [in objectAtIndex:i]; + + if ([ns isKindOfClass:[NSArray class]]) + cf = (CFTypeRef) nsarray_to_cfarray ((NSArray *) ns); + else + cf = CFRetain ((CFTypeRef) ns); + + CFArrayAppendValue (out, cf); + CFRelease (cf); + } + + return out; +} + +static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) { + NSMutableArray *out; + const CFTypeRef *cf; + NSObject *ns; + int i, count; + + count = CFArrayGetCount (in); + out = [[NSMutableArray alloc] initWithCapacity:count]; + + for (i = 0; i < count; i++) { + cf = CFArrayGetValueAtIndex (in, i); + + if (CFGetTypeID (cf) == CFArrayGetTypeID ()) + ns = cfarray_to_nsarray ((CFArrayRef) cf); + else + ns = [(id)cf retain]; + + [out addObject:ns]; + [ns release]; + } + + return out; +} + +- (CFPropertyListRef) prefs_get:(NSString *)key { + CFPropertyListRef value; + + value = CFPreferencesCopyAppValue ((CFStringRef) key, CFSTR (APP_PREFS)); + + if (value == NULL) { + static CFDictionaryRef defaults; + + if (defaults == NULL) { + CFStringRef error = NULL; + CFDataRef data; + CFURLRef url; + SInt32 error_code; + + url = (CFURLCreateFromFileSystemRepresentation + (NULL, (unsigned char *)DEFAULTS_FILE, strlen (DEFAULTS_FILE), false)); + if (CFURLCreateDataAndPropertiesFromResource (NULL, url, &data, + NULL, NULL, &error_code)) { + defaults = (CFPropertyListCreateFromXMLData + (NULL, data, kCFPropertyListMutableContainersAndLeaves, &error)); + if (error != NULL) CFRelease (error); + CFRelease (data); + } + CFRelease (url); + + if (defaults != NULL) { + NSMutableArray *apps, *elt; + int count, i; + NSString *name, *nname; + + /* Localize the names in the default apps menu. */ + + apps = [(NSDictionary *)defaults objectForKey:@PREFS_APPSMENU]; + if (apps != nil) { + count = [apps count]; + for (i = 0; i < count; i++) { + elt = [apps objectAtIndex:i]; + if (elt != nil && [elt isKindOfClass:[NSArray class]]) { + name = [elt objectAtIndex:0]; + if (name != nil) { + nname = NSLocalizedString (name, nil); + if (nname != nil && nname != name) + [elt replaceObjectAtIndex:0 withObject:nname]; + } + } + } + } + } + } + + if (defaults != NULL) value = CFDictionaryGetValue (defaults, key); + if (value != NULL) CFRetain (value); + } + + return value; +} + +- (int) prefs_get_integer:(NSString *)key default:(int)def { + CFPropertyListRef value; + int ret; + + value = [self prefs_get:key]; + + if (value != NULL && CFGetTypeID (value) == CFNumberGetTypeID ()) + CFNumberGetValue (value, kCFNumberIntType, &ret); + else if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) + ret = CFStringGetIntValue (value); + else + ret = def; + + if (value != NULL) CFRelease (value); + + return ret; +} + +- (const char *) prefs_get_string:(NSString *)key default:(const char *)def { + CFPropertyListRef value; + const char *ret = NULL; + + value = [self prefs_get:key]; + + if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) { + NSString *s = (NSString *) value; + + ret = [s UTF8String]; + } + + if (value != NULL) CFRelease (value); + + return ret != NULL ? ret : def; +} + +- (float) prefs_get_float:(NSString *)key default:(float)def { + CFPropertyListRef value; + float ret = def; + + value = [self prefs_get:key]; + + if (value != NULL + && CFGetTypeID (value) == CFNumberGetTypeID () + && CFNumberIsFloatType (value)) + CFNumberGetValue (value, kCFNumberFloatType, &ret); + else if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) + ret = CFStringGetDoubleValue (value); + + if (value != NULL) CFRelease (value); + + return ret; +} + +- (int) prefs_get_boolean:(NSString *)key default:(int)def { + CFPropertyListRef value; + int ret = def; + + value = [self prefs_get:key]; + + if (value != NULL) { + if (CFGetTypeID (value) == CFNumberGetTypeID ()) + CFNumberGetValue (value, kCFNumberIntType, &ret); + else if (CFGetTypeID (value) == CFBooleanGetTypeID ()) + ret = CFBooleanGetValue (value); + else if (CFGetTypeID (value) == CFStringGetTypeID ()) { + const char *tem = [(NSString *) value lossyCString]; + if (strcasecmp (tem, "true") == 0 || strcasecmp (tem, "yes") == 0) + ret = YES; + else + ret = NO; + } + + CFRelease (value); + } + return ret; +} + +- (NSArray *) prefs_get_array:(NSString *)key { + NSArray *ret = nil; + CFPropertyListRef value; + + value = [self prefs_get:key]; + + if (value != NULL) { + if (CFGetTypeID (value) == CFArrayGetTypeID ()) + ret = [cfarray_to_nsarray (value) autorelease]; + + CFRelease (value); + } + + return ret; +} + +- (void) prefs_set_integer:(NSString *)key value:(int)value { + CFNumberRef x; + + x = CFNumberCreate (NULL, kCFNumberIntType, &value); + + CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, CFSTR (APP_PREFS), + kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + + CFRelease (x); +} + +- (void) prefs_set_float:(NSString *)key value:(float)value { + CFNumberRef x; + + x = CFNumberCreate (NULL, kCFNumberFloatType, &value); + + CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, CFSTR (APP_PREFS), + kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + + CFRelease (x); +} + +- (void) prefs_set_boolean:(NSString *)key value:(int)value { + CFPreferencesSetValue ((CFStringRef) key, + (CFTypeRef) value ? kCFBooleanTrue + : kCFBooleanFalse, CFSTR (APP_PREFS), + kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + +} + +- (void) prefs_set_array:(NSString *)key value:(NSArray *)value { + CFArrayRef cfarray; + + cfarray = nsarray_to_cfarray (value); + CFPreferencesSetValue ((CFStringRef) key, + (CFTypeRef) cfarray, + CFSTR (APP_PREFS), + kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + CFRelease (cfarray); +} + +- (void) prefs_set_string:(NSString *)key value:(NSString *)value { + CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) value, + CFSTR (APP_PREFS), kCFPreferencesCurrentUser, + kCFPreferencesAnyHost); +} + +- (void) prefs_synchronize { + CFPreferencesAppSynchronize (kCFPreferencesCurrentApplication); +} + +- (void) read_defaults { + const char *tem; + + quartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP + default:quartzUseSysBeep]; + quartzEnableRootless = [self prefs_get_boolean:@PREFS_ROOTLESS + default:quartzEnableRootless]; +#ifdef DARWIN_DDX_MISSING + quartzFullscreenDisableHotkeys = ![self prefs_get_boolean: + @PREFS_FULLSCREEN_HOTKEYS default: + !quartzFullscreenDisableHotkeys]; + quartzXpluginOptions = [self prefs_get_integer:@PREFS_XP_OPTIONS + default:quartzXpluginOptions]; +#endif + + darwinSwapAltMeta = [self prefs_get_boolean:@PREFS_SWAP_ALT_META + default:darwinSwapAltMeta]; + darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS + default:darwinFakeButtons]; + if (darwinFakeButtons) { + const char *fake2, *fake3; + + fake2 = [self prefs_get_string:@PREFS_FAKE_BUTTON2 default:NULL]; + fake3 = [self prefs_get_string:@PREFS_FAKE_BUTTON3 default:NULL]; + + if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList(fake2); + if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList(fake3); + + } + + X11EnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS + default:X11EnableKeyEquivalents]; + + darwinSyncKeymap = [self prefs_get_boolean:@PREFS_SYNC_KEYMAP + default:darwinSyncKeymap]; + + tem = [self prefs_get_string:@PREFS_KEYMAP_FILE default:NULL]; + + if (tem != NULL) darwinKeymapFile = strdup (tem); + else darwinKeymapFile = NULL; + + darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH + default:darwinDesiredDepth]; + + enable_stereo = [self prefs_get_boolean:@PREFS_ENABLE_STEREO + default:false]; +} + +/* This will end up at the end of the responder chain. */ +- (void) copy:sender { + QuartzMessageServerThread (kXDarwinPasteboardNotify, 1, + AppleWMCopyToPasteboard); +} + +- (BOOL) x_active { + return _x_active; +} + +@end + +static NSArray * +array_with_strings_and_numbers (int nitems, const char **items, + const char *numbers) { + NSMutableArray *array, *subarray; + NSString *string, *number; + int i; + + /* (Can't autorelease on the X server thread) */ + + array = [[NSMutableArray alloc] initWithCapacity:nitems]; + + for (i = 0; i < nitems; i++) { + subarray = [[NSMutableArray alloc] initWithCapacity:2]; + + string = [[NSString alloc] initWithUTF8String:items[i]]; + [subarray addObject:string]; + [string release]; + + if (numbers[i] != 0) { + number = [[NSString alloc] initWithFormat:@"%d", numbers[i]]; + [subarray addObject:number]; + [number release]; + } else + [subarray addObject:@""]; + + [array addObject:subarray]; + [subarray release]; + } + + return array; +} + +void X11ApplicationSetWindowMenu (int nitems, const char **items, + const char *shortcuts) { + NSArray *array; + array = array_with_strings_and_numbers (nitems, items, shortcuts); + + /* Send the array of strings over to the appkit thread */ + + message_kit_thread (@selector (set_window_menu:), array); + [array release]; +} + +void X11ApplicationSetWindowMenuCheck (int idx) { + NSNumber *n; + + n = [[NSNumber alloc] initWithInt:idx]; + + message_kit_thread (@selector (set_window_menu_check:), n); + + [n release]; +} + +void X11ApplicationSetFrontProcess (void) { + message_kit_thread (@selector (set_front_process:), nil); +} + +void X11ApplicationSetCanQuit (int state) { + NSNumber *n; + + n = [[NSNumber alloc] initWithBool:state]; + + message_kit_thread (@selector (set_can_quit:), n); + + [n release]; +} + +void X11ApplicationServerReady (void) { + message_kit_thread (@selector (server_ready:), nil); +} + +void X11ApplicationShowHideMenubar (int state) { + NSNumber *n; + + n = [[NSNumber alloc] initWithBool:state]; + + message_kit_thread (@selector (show_hide_menubar:), n); + + [n release]; +} + +static void * create_thread (void *func, void *arg) { + pthread_attr_t attr; + pthread_t tid; + + pthread_attr_init (&attr); + pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM); + pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); + pthread_create (&tid, &attr, func, arg); + pthread_attr_destroy (&attr); + + return (void *) tid; +} + +static void check_xinitrc (void) { + char *tem, buf[1024]; + NSString *msg; + + if ([X11App prefs_get_boolean:@PREFS_DONE_XINIT_CHECK default:NO]) + return; + + tem = getenv ("HOME"); + if (tem == NULL) goto done; + + snprintf (buf, sizeof (buf), "%s/.xinitrc", tem); + if (access (buf, F_OK) != 0) + goto done; + + /* FIXME: put localized strings into Resources/English.lproj */ + + msg = NSLocalizedString (@"You have an existing ~/.xinitrc file.\n\n\ +Windows displayed by X11 applications may not have titlebars, or may look \ +different to windows displayed by native applications.\n\n\ +Would you like to move aside the existing file and use the standard X11 \ +environment?", @"Startup xinitrc dialog"); + + if (NSRunAlertPanel (nil, msg, NSLocalizedString (@"Yes", @""), + NSLocalizedString (@"No", @""), nil) + == NSAlertDefaultReturn) { + char buf2[1024]; + int i = -1; + + snprintf (buf2, sizeof (buf2), "%s.old", buf); + + for (i = 1; access (buf2, F_OK) == 0; i++) + snprintf (buf2, sizeof (buf2), "%s.old.%d", buf, i); + + rename (buf, buf2); + } + + done: + [X11App prefs_set_boolean:@PREFS_DONE_XINIT_CHECK value:YES]; + [X11App prefs_synchronize]; +} + +void X11ApplicationMain (int argc, const char *argv[], + void (*server_thread) (void *), void *server_arg) { + NSAutoreleasePool *pool; + +#ifdef DEBUG + while (access ("/tmp/x11-block", F_OK) == 0) sleep (1); +#endif + + pool = [[NSAutoreleasePool alloc] init]; + + X11App = (X11Application *) [X11Application sharedApplication]; + + init_ports (); + + [NSApp read_defaults]; + + [NSBundle loadNibNamed:@"main" owner:NSApp]; + + [[NSNotificationCenter defaultCenter] addObserver:NSApp + selector:@selector (became_key:) + name:NSWindowDidBecomeKeyNotification object:nil]; + + check_xinitrc (); + + /* + * The xpr Quartz mode is statically linked into this server. + * Initialize all the Quartz functions. + */ + QuartzModeBundleInit(); + + /* Calculate the height of the menubar so we can avoid it. */ + aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) - + NSMaxY([[NSScreen mainScreen] visibleFrame]) - 1; + + if (!create_thread (server_thread, server_arg)) { + ErrorF("can't create secondary thread\n"); + exit(1); + } + + [NSApp run]; +} + + +/* event conversion */ + +static inline unsigned short +convert_flags (unsigned int nsflags) { + unsigned int xflags = 0; + + if (nsflags == ~0) return 0xffff; + + if (nsflags & NSAlphaShiftKeyMask) xflags |= LockMask; + if (nsflags & NSShiftKeyMask) xflags |= ShiftMask; + if (nsflags & NSControlKeyMask) xflags |= ControlMask; + if (nsflags & NSAlternateKeyMask) xflags |= Mod1Mask; + if (nsflags & NSCommandKeyMask) xflags |= Mod2Mask; + /* FIXME: secondaryfn? */ + + return xflags; +} + + +// This code should probably be merged with that in XDarwin's XServer.m - BB +static void send_nsevent (NSEventType type, NSEvent *e) { + // static unsigned int button_state = 0; + NSRect screen; + NSPoint location; + NSWindow *window; + int pointer_x, pointer_y, ev_button, ev_type; + // int num_events=0, i=0, state; + xEvent xe; + + /* convert location to global top-left coordinates */ + location = [e locationInWindow]; + window = [e window]; + screen = [[[NSScreen screens] objectAtIndex:0] frame]; + + if (window != nil) { + NSRect frame = [window frame]; + pointer_x = location.x + frame.origin.x; + pointer_y = (((screen.origin.y + screen.size.height) + - location.y) - frame.origin.y); + } else { + pointer_x = location.x; + pointer_y = (screen.origin.y + screen.size.height) - location.y; + } + + pointer_y -= aquaMenuBarHeight; + // state = convert_flags ([e modifierFlags]); + + switch (type) { + case NSLeftMouseDown: ev_button=1; ev_type=ButtonPress; goto handle_mouse; + case NSOtherMouseDown: ev_button=2; ev_type=ButtonPress; goto handle_mouse; + case NSRightMouseDown: ev_button=3; ev_type=ButtonPress; goto handle_mouse; + case NSLeftMouseUp: ev_button=1; ev_type=ButtonRelease; goto handle_mouse; + case NSOtherMouseUp: ev_button=2; ev_type=ButtonRelease; goto handle_mouse; + case NSRightMouseUp: ev_button=3; ev_type=ButtonRelease; goto handle_mouse; + case NSLeftMouseDragged: ev_button=1; ev_type=MotionNotify; goto handle_mouse; + case NSOtherMouseDragged: ev_button=2; ev_type=MotionNotify; goto handle_mouse; + case NSRightMouseDragged: ev_button=3; ev_type=MotionNotify; goto handle_mouse; + case NSMouseMoved: ev_button=0; ev_type=MotionNotify; goto handle_mouse; + handle_mouse: + + /* I'm not sure the below code is necessary or useful (-bb) + if(ev_type==ButtonPress) { + if (!quartzProcs->IsX11Window([e window], [e windowNumber])) { + fprintf(stderr, "Dropping event because it's not a window\n"); + break; + } + button_state |= (1 << ev_button); + DarwinSendPointerEvents(ev_type, ev_button, pointer_x, pointer_y); + } else if (ev_type==ButtonRelease && (button_state & (1 << ev_button)) == 0) break; + */ + DarwinSendPointerEvents(ev_type, ev_button, pointer_x, pointer_y); + break; + case NSScrollWheel: + DarwinSendScrollEvents([e deltaY], pointer_x, pointer_y); + break; + + case NSKeyDown: // do we need to translate these keyCodes? + case NSKeyUp: + DarwinSendKeyboardEvents((type == NSKeyDown)?KeyPress:KeyRelease, [e keyCode]); + break; + + case NSFlagsChanged: + DarwinUpdateModKeys([e modifierFlags]); + break; + default: break; /* for gcc */ + } +} diff --git a/xorg-server-1.4/hw/darwin/apple/X11Controller.m b/xorg-server-1.4/hw/darwin/apple/X11Controller.m new file mode 100644 index 0000000..3dc965b --- /dev/null +++ b/xorg-server-1.4/hw/darwin/apple/X11Controller.m @@ -0,0 +1,752 @@ +/* X11Controller.m -- connect the IB ui, also the NSApp delegate + $Id: X11Controller.m,v 1.40 2006/09/06 21:19:32 jharper Exp $ + + Copyright (c) 2002-2007 Apple 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 ABOVE LISTED COPYRIGHT + HOLDER(S) 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(s) of the above + 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. */ + +#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin" + +#include "../quartz/quartzCommon.h" + +#import "X11Controller.h" +#import "X11Application.h" +#import + +/* ouch! */ +#define BOOL X_BOOL +//# include "Xproto.h" +#include "opaque.h" +# include "darwin.h" +# include "../quartz/quartz.h" +# define _APPLEWM_SERVER_ +# include "X11/extensions/applewm.h" +# include "../quartz/applewmExt.h" +//# include "X.h" +#undef BOOL + +#include +#include +#include +#include +#include + +#define TRACE() fprintf (stderr, "%s\n", __FUNCTION__) + +@implementation X11Controller + +- (void) awakeFromNib +{ + X11Application *xapp = NSApp; + NSArray *array; + + /* Point X11Application at ourself. */ + [xapp set_controller:self]; + + array = [xapp prefs_get_array:@PREFS_APPSMENU]; + if (array != nil) + { + int count; + + /* convert from [TITLE1 COMMAND1 TITLE2 COMMAND2 ...] + to [[TITLE1 COMMAND1] [TITLE2 COMMAND2] ...] format. */ + + count = [array count]; + if (count > 0 + && ![[array objectAtIndex:0] isKindOfClass:[NSArray class]]) + { + int i; + NSMutableArray *copy, *sub; + + copy = [NSMutableArray arrayWithCapacity:(count / 2)]; + + for (i = 0; i < count / 2; i++) + { + sub = [[NSMutableArray alloc] initWithCapacity:3]; + [sub addObject:[array objectAtIndex:i*2]]; + [sub addObject:[array objectAtIndex:i*2+1]]; + [sub addObject:@""]; + [copy addObject:sub]; + [sub release]; + } + + array = copy; + } + + [self set_apps_menu:array]; + } +} + +- (void) item_selected:sender +{ + [NSApp activateIgnoringOtherApps:YES]; + + QuartzMessageServerThread (kXDarwinControllerNotify, 2, + AppleWMWindowMenuItem, [sender tag]); +} + +- (void) remove_window_menu +{ + NSMenu *menu; + int first, count, i; + + /* Work backwards so we don't mess up the indices */ + menu = [window_separator menu]; + first = [menu indexOfItem:window_separator] + 1; + count = [menu numberOfItems]; + for (i = count - 1; i >= first; i--) + [menu removeItemAtIndex:i]; + + menu = [dock_window_separator menu]; + count = [menu indexOfItem:dock_window_separator]; + for (i = 0; i < count; i++) + [dock_menu removeItemAtIndex:0]; +} + +- (void) install_window_menu:(NSArray *)list +{ + NSMenu *menu; + NSMenuItem *item; + int first, count, i; + + menu = [window_separator menu]; + first = [menu indexOfItem:window_separator] + 1; + count = [list count]; + for (i = 0; i < count; i++) + { + NSString *name, *shortcut; + + name = [[list objectAtIndex:i] objectAtIndex:0]; + shortcut = [[list objectAtIndex:i] objectAtIndex:1]; + + item = (NSMenuItem *) [menu addItemWithTitle:name action:@selector + (item_selected:) keyEquivalent:shortcut]; + [item setTarget:self]; + [item setTag:i]; + [item setEnabled:YES]; + + item = (NSMenuItem *) [dock_menu insertItemWithTitle:name + action:@selector + (item_selected:) keyEquivalent:shortcut + atIndex:i]; + [item setTarget:self]; + [item setTag:i]; + [item setEnabled:YES]; + } + + if (checked_window_item >= 0 && checked_window_item < count) + { + item = (NSMenuItem *) [menu itemAtIndex:first + checked_window_item]; + [item setState:NSOnState]; + item = (NSMenuItem *) [dock_menu itemAtIndex:checked_window_item]; + [item setState:NSOnState]; + } +} + +- (void) remove_apps_menu +{ + NSMenu *menu; + NSMenuItem *item; + int i; + + if (apps == nil || apps_separator == nil) return; + + menu = [apps_separator menu]; + + if (menu != nil) + { + for (i = [menu numberOfItems] - 1; i >= 0; i--) + { + item = (NSMenuItem *) [menu itemAtIndex:i]; + if ([item tag] != 0) + [menu removeItemAtIndex:i]; + } + } + + if (dock_apps_menu != nil) + { + for (i = [dock_apps_menu numberOfItems] - 1; i >= 0; i--) + { + item = (NSMenuItem *) [dock_apps_menu itemAtIndex:i]; + if ([item tag] != 0) + [dock_apps_menu removeItemAtIndex:i]; + } + } + + [apps release]; + apps = nil; +} + +- (void) prepend_apps_item:(NSArray *)list index:(int)i menu:(NSMenu *)menu +{ + NSString *title, *shortcut = @""; + NSArray *group; + NSMenuItem *item; + + group = [list objectAtIndex:i]; + title = [group objectAtIndex:0]; + if ([group count] >= 3) + shortcut = [group objectAtIndex:2]; + + if ([title length] != 0) + { + item = (NSMenuItem *) [menu insertItemWithTitle:title + action:@selector (app_selected:) + keyEquivalent:shortcut atIndex:0]; + [item setTarget:self]; + [item setEnabled:YES]; + } + else + { + item = (NSMenuItem *) [NSMenuItem separatorItem]; + [menu insertItem:item atIndex:0]; + } + + [item setTag:i+1]; /* can't be zero, so add one */ +} + +- (void) install_apps_menu:(NSArray *)list +{ + NSMenu *menu; + int i, count; + + count = [list count]; + + if (count == 0 || apps_separator == nil) return; + + menu = [apps_separator menu]; + + for (i = count - 1; i >= 0; i--) + { + if (menu != nil) + [self prepend_apps_item:list index:i menu:menu]; + if (dock_apps_menu != nil) + [self prepend_apps_item:list index:i menu:dock_apps_menu]; + } + + apps = [list retain]; +} + +- (void) set_window_menu:(NSArray *)list +{ + [self remove_window_menu]; + [self install_window_menu:list]; + + QuartzMessageServerThread (kXDarwinControllerNotify, 1, + AppleWMWindowMenuNotify); +} + +- (void) set_window_menu_check:(NSNumber *)nn +{ + NSMenu *menu; + NSMenuItem *item; + int first, count; + int n = [nn intValue]; + + menu = [window_separator menu]; + first = [menu indexOfItem:window_separator] + 1; + count = [menu numberOfItems] - first; + + if (checked_window_item >= 0 && checked_window_item < count) + { + item = (NSMenuItem *) [menu itemAtIndex:first + checked_window_item]; + [item setState:NSOffState]; + item = (NSMenuItem *) [dock_menu itemAtIndex:checked_window_item]; + [item setState:NSOffState]; + } + if (n >= 0 && n < count) + { + item = (NSMenuItem *) [menu itemAtIndex:first + n]; + [item setState:NSOnState]; + item = (NSMenuItem *) [dock_menu itemAtIndex:n]; + [item setState:NSOnState]; + } + checked_window_item = n; +} + +- (void) set_apps_menu:(NSArray *)list +{ + [self remove_apps_menu]; + [self install_apps_menu:list]; +} + +- (void) launch_client:(NSString *)filename +{ + const char *command = [filename UTF8String]; + const char *shell; + const char *argv[5]; + int child1, child2 = 0; + int status; + + shell = getenv("SHELL"); + if (shell == NULL) shell = "/bin/bash"; + + argv[0] = shell; + argv[1] = "-l"; + argv[2] = "-c"; + argv[3] = command; + argv[4] = NULL; + + /* Do the fork-twice trick to avoid having to reap zombies */ + + child1 = fork(); + + switch (child1) { + case -1: /* error */ + break; + + case 0: /* child1 */ + child2 = fork(); + + switch (child2) { + int max_files, i; + char buf[1024], *temp; + + case -1: /* error */ + _exit(1); + + case 0: /* child2 */ + /* close all open files except for standard streams */ + max_files = sysconf(_SC_OPEN_MAX); + for (i = 3; i < max_files; i++) close(i); + + /* ensure stdin is on /dev/null */ + close(0); + open("/dev/null", O_RDONLY); + + /* Setup environment */ + temp = getenv("DISPLAY"); + if (temp == NULL || temp[0] == 0) { + snprintf(buf, sizeof(buf), ":%s", display); + setenv("DISPLAY", buf, TRUE); + } + + temp = getenv("PATH"); + if (temp == NULL || temp[0] == 0) + setenv ("PATH", DEFAULT_PATH, TRUE); + else if (strnstr(temp, "/usr/X11/bin", sizeof(temp)) == NULL) { + snprintf(buf, sizeof(buf), "%s:/usr/X11/bin", temp); + setenv("PATH", buf, TRUE); + } + /* cd $HOME */ + temp = getenv("HOME"); + if (temp != NULL && temp[0]!=0) chdir(temp); + + execvp(argv[0], (char **const) argv); + + _exit(2); + + default: /* parent (child1) */ + _exit(0); + } + break; + + default: /* parent */ + waitpid(child1, &status, 0); + } +} + +- (void) app_selected:sender +{ + int tag; + NSString *item; + + tag = [sender tag] - 1; + if (apps == nil || tag < 0 || tag >= [apps count]) + return; + + item = [[apps objectAtIndex:tag] objectAtIndex:1]; + + [self launch_client:item]; +} + +- (IBAction) apps_table_show:sender +{ + NSArray *columns; + + if (table_apps == nil) { + table_apps = [[NSMutableArray alloc] initWithCapacity:1]; + + if (apps != nil)[table_apps addObjectsFromArray:apps]; + } + + columns = [apps_table tableColumns]; + [[columns objectAtIndex:0] setIdentifier:@"0"]; + [[columns objectAtIndex:1] setIdentifier:@"1"]; + [[columns objectAtIndex:2] setIdentifier:@"2"]; + + [apps_table setDataSource:self]; + [apps_table selectRow:0 byExtendingSelection:NO]; + + [[apps_table window] makeKeyAndOrderFront:sender]; +} + +- (IBAction) apps_table_cancel:sender +{ + [[apps_table window] orderOut:sender]; + [apps_table reloadData]; + + [table_apps release]; + table_apps = nil; +} + +- (IBAction) apps_table_done:sender +{ + [apps_table deselectAll:sender]; /* flush edits? */ + + [self remove_apps_menu]; + [self install_apps_menu:table_apps]; + + [NSApp prefs_set_array:@PREFS_APPSMENU value:table_apps]; + [NSApp prefs_synchronize]; + + [[apps_table window] orderOut:sender]; + + [table_apps release]; + table_apps = nil; +} + +- (IBAction) apps_table_new:sender +{ + NSMutableArray *item; + + int row = [apps_table selectedRow], i; + + if (row < 0) row = 0; + else row = row + 1; + + i = row; + if (i > [table_apps count]) + return; /* avoid exceptions */ + + [apps_table deselectAll:sender]; + + item = [[NSMutableArray alloc] initWithCapacity:3]; + [item addObject:@""]; + [item addObject:@""]; + [item addObject:@""]; + + [table_apps insertObject:item atIndex:i]; + [item release]; + + [apps_table reloadData]; + [apps_table selectRow:row byExtendingSelection:NO]; +} + +- (IBAction) apps_table_duplicate:sender +{ + int row = [apps_table selectedRow], i; + NSObject *item; + + if (row < 0) { + [self apps_table_new:sender]; + return; + } + + i = row; + if (i > [table_apps count] - 1) return; /* avoid exceptions */ + + [apps_table deselectAll:sender]; + + item = [[table_apps objectAtIndex:i] mutableCopy]; + [table_apps insertObject:item atIndex:i]; + [item release]; + + [apps_table reloadData]; + [apps_table selectRow:row+1 byExtendingSelection:NO]; +} + +- (IBAction) apps_table_delete:sender +{ + int row = [apps_table selectedRow]; + + if (row >= 0) + { + int i = row; + + if (i > [table_apps count] - 1) return; /* avoid exceptions */ + + [apps_table deselectAll:sender]; + + [table_apps removeObjectAtIndex:i]; + } + + [apps_table reloadData]; + + row = MIN (row, [table_apps count] - 1); + if (row >= 0) + [apps_table selectRow:row byExtendingSelection:NO]; +} + +- (int) numberOfRowsInTableView:(NSTableView *)tableView +{ + if (table_apps == nil) return 0; + + return [table_apps count]; +} + +- (id) tableView:(NSTableView *)tableView +objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row +{ + NSArray *item; + int col; + + if (table_apps == nil) return nil; + + col = [[tableColumn identifier] intValue]; + + item = [table_apps objectAtIndex:row]; + if ([item count] > col) + return [item objectAtIndex:col]; + else + return @""; +} + +- (void) tableView:(NSTableView *)tableView setObjectValue:(id)object + forTableColumn:(NSTableColumn *)tableColumn row:(int)row +{ + NSMutableArray *item; + int col; + + if (table_apps == nil) return; + + col = [[tableColumn identifier] intValue]; + + item = [table_apps objectAtIndex:row]; + [item replaceObjectAtIndex:col withObject:object]; +} + +- (void) hide_window:sender +{ + if ([X11App x_active]) + QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMHideWindow); + else + NSBeep (); /* FIXME: something here */ +} + +- (IBAction)bring_to_front:sender +{ + QuartzMessageServerThread(kXDarwinControllerNotify, 1, AppleWMBringAllToFront); +} + +- (IBAction)close_window:sender +{ + if ([X11App x_active]) + QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMCloseWindow); + else + [[NSApp keyWindow] performClose:sender]; +} + +- (IBAction)minimize_window:sender +{ + if ([X11App x_active]) + QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMMinimizeWindow); + else + [[NSApp keyWindow] performMiniaturize:sender]; +} + +- (IBAction)zoom_window:sender +{ + if ([X11App x_active]) + QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMZoomWindow); + else + [[NSApp keyWindow] performZoom:sender]; +} + +- (IBAction) next_window:sender +{ + QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMNextWindow); +} + +- (IBAction) previous_window:sender +{ + QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMPreviousWindow); +} + +- (IBAction) enable_fullscreen_changed:sender +{ + int value = ![enable_fullscreen intValue]; + +#ifdef DARWIN_DDX_MISSING + QuartzMessageServerThread (kXDarwinSetRootless, 1, value); +#endif + + [NSApp prefs_set_boolean:@PREFS_ROOTLESS value:value]; + [NSApp prefs_synchronize]; +} + +- (IBAction) toggle_fullscreen:sender +{ +#ifdef DARWIN_DDX_MISSING + QuartzMessageServerThread (kXDarwinToggleFullscreen, 0); +#endif +} + +- (void) set_can_quit:(BOOL)state +{ + can_quit = state; +} + +- (IBAction)prefs_changed:sender +{ + darwinFakeButtons = [fake_buttons intValue]; + quartzUseSysBeep = [use_sysbeep intValue]; + X11EnableKeyEquivalents = [enable_keyequivs intValue]; + darwinSyncKeymap = [sync_keymap intValue]; + + /* after adding prefs here, also add to [X11Application read_defaults] + and below */ + + [NSApp prefs_set_boolean:@PREFS_FAKEBUTTONS value:darwinFakeButtons]; + [NSApp prefs_set_boolean:@PREFS_SYSBEEP value:quartzUseSysBeep]; + [NSApp prefs_set_boolean:@PREFS_KEYEQUIVS value:X11EnableKeyEquivalents]; + [NSApp prefs_set_boolean:@PREFS_SYNC_KEYMAP value:darwinSyncKeymap]; + [NSApp prefs_set_boolean:@PREFS_NO_AUTH value:![enable_auth intValue]]; + [NSApp prefs_set_boolean:@PREFS_NO_TCP value:![enable_tcp intValue]]; + [NSApp prefs_set_integer:@PREFS_DEPTH value:[depth selectedTag]]; + + [NSApp prefs_synchronize]; +} + +- (IBAction) prefs_show:sender +{ + [fake_buttons setIntValue:darwinFakeButtons]; + [use_sysbeep setIntValue:quartzUseSysBeep]; + [enable_keyequivs setIntValue:X11EnableKeyEquivalents]; + [sync_keymap setIntValue:darwinSyncKeymap]; + [sync_keymap setEnabled:darwinKeymapFile == NULL]; + + [enable_auth setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_AUTH default:NO]]; + [enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]]; + [depth selectItemAtIndex:[depth indexOfItemWithTag:[NSApp prefs_get_integer:@PREFS_DEPTH default:-1]]]; + + [enable_fullscreen setIntValue:!quartzEnableRootless]; + + [prefs_panel makeKeyAndOrderFront:sender]; +} + +- (IBAction) quit:sender +{ + QuartzMessageServerThread (kXDarwinQuit, 0); +} + +- (IBAction) x11_help:sender +{ + AHLookupAnchor (CFSTR ("Mac Help"), CFSTR ("mchlp2276")); +} + +- (BOOL) validateMenuItem:(NSMenuItem *)item +{ + NSMenu *menu = [item menu]; + + if (item == toggle_fullscreen_item) + return !quartzEnableRootless; + else if (menu == [window_separator menu] || menu == dock_menu + || (menu == [x11_about_item menu] && [item tag] == 42)) + return (AppleWMSelectedEvents () & AppleWMControllerNotifyMask) != 0; + else + return TRUE; +} + +- (void) applicationDidHide:(NSNotification *)notify +{ + QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMHideAll); +} + +- (void) applicationDidUnhide:(NSNotification *)notify +{ + QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMShowAll); +} + +- (NSApplicationTerminateReply) applicationShouldTerminate:sender +{ + NSString *msg; + + if (can_quit || [X11App prefs_get_boolean:@PREFS_NO_QUIT_ALERT default:NO]) + return NSTerminateNow; + + /* Make sure we're frontmost. */ + [NSApp activateIgnoringOtherApps:YES]; + + msg = NSLocalizedString (@"Are you sure you want to quit X11?\n\nIf you quit X11, any X11 applications you are running will stop immediately and you will lose any changes you have not saved.", @"Dialog when quitting"); + + /* FIXME: safe to run the alert in here? Or should we return Later + and then run the alert on a timer? It seems to work here, so.. */ + + return (NSRunAlertPanel (nil, msg, NSLocalizedString (@"Quit", @""), + NSLocalizedString (@"Cancel", @""), nil) + == NSAlertDefaultReturn) ? NSTerminateNow : NSTerminateCancel; +} + +- (void) applicationWillTerminate:(NSNotification *)aNotification +{ + [X11App prefs_synchronize]; + + /* shutdown the X server, it will exit () for us. */ + QuartzMessageServerThread (kXDarwinQuit, 0); + + /* In case it doesn't, exit anyway after a while. */ + while (sleep (10) != 0) ; + exit (1); +} + +- (void) server_ready +{ + x_list *node; + + finished_launching = YES; + + for (node = pending_apps; node != NULL; node = node->next) + { + NSString *filename = node->data; + [self launch_client:filename]; + [filename release]; + } + + x_list_free (pending_apps); + pending_apps = NULL; +} + +- (BOOL) application:(NSApplication *)app openFile:(NSString *)filename +{ + const char *name = [filename UTF8String]; + + if (finished_launching) + [self launch_client:filename]; + else if (name[0] != ':') /* ignore display names */ + pending_apps = x_list_prepend (pending_apps, [filename retain]); + + /* FIXME: report failures. */ + return YES; +} + +@end + +void X11ControllerMain (int argc, const char *argv[], + void (*server_thread) (void *), void *server_arg) +{ + X11ApplicationMain (argc, argv, server_thread, server_arg); +} diff --git a/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/Credits.rtf b/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/Credits.rtf new file mode 100644 index 0000000..5858e59 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/Credits.rtf @@ -0,0 +1,168 @@ +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique; +} +{\colortbl;\red255\green255\blue255;} +\vieww9000\viewh9000\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Contributors to Xorg Foundation Release: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Kaleb KEITHLEY\ + +\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys. +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\f1\b \cf0 Contributors to XFree86 4.4: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Harper\ + +\f2\i Rootless acceleration and Apple-WM extension +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Additional XonX Contributors to XFree86 4.3: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Fabr\'92cio Luis de Castro\ + +\f2\i Portuguese localization +\f0\i0 \ +Michael Oland\ + +\f2\i New XDarwin icon +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 XonX Contributors to XFree86 4.2: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f0\i0 \ +Pablo Di Noto\ + +\f2\i Spanish localization +\f0\i0 \ +Paul Edens\ + +\f2\i Dutch localization +\f0\i0 \ +Kyunghwan Kim\ + +\f2\i Korean localization +\f0\i0 \ +Mario Klebsch\ + +\f2\i Non-US keyboard support +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +Andreas Monitzer\ + +\f2\i German localization +\f0\i0 \ +Patrik Montgomery\ + +\f2\i Swedish localization +\f0\i0 \ +Greg Parker\ + +\f2\i Rootless support +\f0\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f0\i0 \ +Olivier Verdier\ + +\f2\i French localization +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Special Thanks: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Devin Poolman and Zero G Software, Inc.\ + +\f2\i Installer +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 XonX Team Members\ +Contributing to XFree86 4.1: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +Andreas Monitzer\ + +\f2\i Cocoa version of XDarwin front end +\f0\i0 \ +Greg Parker\ + +\f2\i Original Quartz implementation +\f0\i0 \ +Christoph Pfisterer\ + +\f2\i Dynamic shared libraries +\f0\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f0\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Special Thanks: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Tiago Ribeiro\ + +\f2\i XDarwin icon +\f0\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 History: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Carmack\ + +\f2\i Original XFree86 port to Mac OS X Server +\f0\i0 \ +Dave Zarzycki\ + +\f2\i XFree86 4.0 port to Darwin 1.0 +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file diff --git a/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/Localizable.strings b/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..6abd9107299ea24f4724f2fe30c513968b74e8cc GIT binary patch literal 1426 zcwUv1TW`}q5QXPCzrw1JkSc07MO*|zC{TC;0Sbt|n%F6YIEm~Hf&O^ln`1k+)2LEq zd1rU7XU?qs_n#$pY>}PY#)8f4JNt#L*rmuTySCgibia_LRcKbWL`KLtYeiIvc4?Q= zZdmJxZ}x{ZkTFNTC*KVD!KSPiymR6_S74tbGmF_BgJ;xWx`*FeymFqW_Sl}G`%RX_ z){4DkO|76}f@dX!HO_>pThgIp5vQK59 z=pap@m{g}oxt*g@Gh6QRd7iI2WnkKJn&MX}st~H-&4|_gsOf*Aius-M6s-4kzqguT zCblB%`HsQR@Kb*Uk$evIJ?cfodwh3O+-J0#;k1b!M!ptfv%PurwOxjZ7~O~o$281z zj&4qz+a1YI-BxG7Z%I3cxu%!*YJCCOgpLmRceQW#x(!FA8`J)y`d?$e-vZuG_{%uE zCq#FZ583+lUg>`j^iPU(gWE4~t2^vkubrx9TX~48?yAG{QQvx{J5k#@Jcn%H`47nf B<(U8g literal 0 HcwPel00001 diff --git a/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/classes.nib b/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/classes.nib new file mode 100644 index 0000000..77f345a --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/classes.nib @@ -0,0 +1,72 @@ +{ + IBClasses = ( + { + ACTIONS = {showHelp = id; }; + CLASS = FirstResponder; + LANGUAGE = ObjC; + SUPERCLASS = NSObject; + }, + { + ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; + CLASS = Preferences; + LANGUAGE = ObjC; + OUTLETS = { + addToPathButton = id; + addToPathField = id; + button2ModifiersMatrix = id; + button3ModifiersMatrix = id; + depthButton = id; + displayField = id; + dockSwitchButton = id; + fakeButton = id; + keymapFileField = id; + modeMatrix = id; + modeWindowButton = id; + mouseAccelChangeButton = id; + startupHelpButton = id; + switchKeyButton = id; + systemBeepButton = id; + useDefaultShellMatrix = id; + useOtherShellField = id; + useXineramaButton = id; + window = id; + }; + SUPERCLASS = NSObject; + }, + { + CLASS = XApplication; + LANGUAGE = ObjC; + OUTLETS = {preferences = id; xserver = id; }; + SUPERCLASS = NSApplication; + }, + { + ACTIONS = { + bringAllToFront = id; + closeHelpAndShow = id; + itemSelected = id; + nextWindow = id; + previousWindow = id; + showAction = id; + showSwitchPanel = id; + startFullScreen = id; + startRootless = id; + }; + CLASS = XServer; + LANGUAGE = ObjC; + OUTLETS = { + dockMenu = NSMenu; + helpWindow = NSWindow; + modeWindow = NSWindow; + startFullScreenButton = NSButton; + startRootlessButton = NSButton; + startupHelpButton = NSButton; + startupModeButton = NSButton; + switchWindow = NSPanel; + windowMenu = NSMenu; + windowSeparator = NSMenuItem; + }; + SUPERCLASS = NSObject; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/objects.nib b/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/objects.nib new file mode 100644 index 0000000000000000000000000000000000000000..8e9224cb66b4c29ce8d967d9098ceaed13c18c14 GIT binary patch literal 22024 zcwX&1dwf*Ixifh}5<(J4ETDLNMi2rCR=r?r62c=zo{NCRUV5^7k{q%x_dx*L!o;(C zdn>*6rm&X?_@orE*eX&{Afg2nRIG@K9kEh=F38VrxU-#2s4?%CZW;2-yQfA{xe zVRFuy`R1GNHQ&s9Gv{RF1{Qf0hdvC zHN_@!NT^kSj1Bq&9+$`*vRq56#Hs*h3;0xb16{7s>+|MRdA&~6E(cVPI~)pYRQ-8G zi$t`QD|4s$lzPRdxb2D`N>)Uma?TXnWW^n<4Ja;__TX}CCre~8^6GLeL#?c=B#_w` zGJ^rR&Z!t}tz4NiHPEQ|W~oZEKP<>IAgX*mc@b2~o?;WX%iA(qSG8)ZTi0lP0AXz{ zVyzsl0_K$~>CIvIOTsOrfRL6Y(P)%}09}E}?F_~53Ht2Hkmbk&;H-7Y4GPxjD+nFi zsMwoavacx|4r%Knk3mU+D4DD-R2;T|98khxt#F>#H;Kz2hy zwBtSQK=JantF_Fzqi(eSBn!$1LOK^Ew~-*R6O}lKOePQ?{B^^<0`+NqAC20{M!Jz~ z%m{}SPhrlF4 z+S6^9f}kpH7J}+81T_(a;v@^;Zvez)C-NWqY!t$QD&a7)0{qQX76!(viqkP*ON{73 zM(vDFx)O+nzb4UtMtZr4$LgROfA}P@P=2neg;WX_el*Fcauytl)Z~V%$A!0?A-l&_ zr@EojDU#}z0*d4h01CyO(=5wAm!e2PX-;{$v_SDWWjQc9&i^hg-7dOVHmb_$0ex)D z($Ya3&}5cv5g>A*wddJ|9yv@{du3y~mR4VX&#gl@JWj*-oVEQ`G<^dMS&4(T6MzYW ze(2~>*s8`NMlWG>ND)e8NKt}B3=MMDha&4uiW|9C?H-RCxvcTnn3EW%XCAbM)yRI)vN~WjbU^g{Y-P^9oxn`dpg);0vzgf8<>75=L$ww zGTMd&<5dvc8VUnLV578kD?;^We#t(#l5-K|>< zo#a+bFC=7oVe3|lHVj&0#+WzBsRVrvRq+NCi#Z+MO7^}Eihf?G*+iK)osmvdGW<})c zZro28TpWwb3+*N?jZvo)DRw$rx5X_Bxw(5-12oVu(8|fi@H345W)f}50;eTR+;m(Q zNRq{MMOKBhbhT1#`2kc~Lx8Fe`+r((x@LETgB9;S`D~lFRwa7@fPxVTI^|g z8_V3UWzQ|Y;a^7De=>P88A?dz_sIXwj~dCm2b~ZJ5)AyL7*cu{aLGTjjHaijm*(c? zvdb^Oe8-J9-gpAiS65wi)k}T)^!YWVv;tt#EOolXlb4rwTSZ01D|g;`XY`(X?uoXw zwebYwTePmOE?Qn*eh^^h0c>U$csRX4!y3N)R&|Ni@3Oq%3 z?%c_*i08!@U*uOT+qiM#>6I&2Mh6WVwA8?Zw4lSH#l^+Gr=Na03jA~;Kgb8l<*m2g zit+XO>#s*&d+oI-(Av3a)23)?Y3XtcPndf3>(|fy%rnm*+}VQ%51#w*!w;h$ee_ZE zG0vh(GNcOAo}jR??(6T-FtS+mMu}Rgs{~0}b@?`XjFTRK#J9Z4q&OtlT4I4ImT~bmKgt~nV97tC_=xgkZ z88g}u58ycW)mL9dJ3Bk0_&amvOthn;Bl_i+Uq(Ou^wV>?u16ah8un#mWK4&;;PAN4 z(Ux){4J#-pSh{T4vcDfcemr{m^yzc(i()!^_AI|Yb?OwS?STg#I5uFwfcv1%D5Sxl zg&O?f;4t}n-}_!0*zqCYgV(kGkjCHs_O~BjdF7SA1K8V%=zG~Du}>mR-~-4VSy@@X z9y4al^9vU)d=KpUv&SEQ{By9+55|ofw=*XvX9d9g6w(L_E#?pLq#OB&3;Fg#`gcgE zTdcbbQZuAk295#}my7jh;>v+^8KfH^O$7PRgoHdyf^-uRKBP}KIIKTYUT7Dni((_; zJ=V`6UDfYHP0U5uTP^o#{2nYL^EsMs7^E&*I97Ri0AWPFXLa%nWco37MNEUXZVzz&j8Y3;NJVuri76vlaEXB zAuMDLJ2%6y12f$7jy1daNYfj~kv$j3kBj36-dr3%E{-1;#}CWz|MB>dD+Ug}Y>M(g zfVs9RV)RZ%j_{S$k%X01!eZ(2Nvh&EA^^kr5>5)J^Bs!YFBaYLv8TWq23Qvh0azA{ zw=lA-5Zhapx@fe9*NQMeCYqGoL6=MMS(c6ctjosTmZjn&jEtcuo10w_C!Je2<=;e&OKVKqbzLc!tgqUnz zt=kAwmX(#o>64y`2VyNTjh$Sz+j%oQ(xyGzdW{*tg62!jSW}RZx4415Rn%IV+B|Q1 z@GOtgAURZ@Vh?zHXlwzGB8kXPpwS|%Azj;-+1TZ?7`>H??ADTm#<~&NFssPU#%UhP z=*(*o&CF}9XhJ)m1UE;yQ0+w--NhElCn$BkpxPw)V{s3sr$Kc~{zee5w7}!>Ne*SP zA~gs&#TRF=EIIyA5lTxAHS{y_b0i$;=y=q@ilKtn{%$kIbs^JNj7*em{&$n@O>x=A zVrh*0hDX!j+Io#Z!3+D3;9=RdMtF9uX{RqFg=Ggk1S`E6P zGfOT{1N7?oO>s$%Nwv@Og{iq$>2C>*cI#6<|H5qMo4C*Dh$Il6ZS3#F?E&l>H*~fe z+d93c*k;Ogxbc(mtR=3OjzXHy)`Ekg;Wnn{$>20(sdYlCkoZm(wwE?_Qk?r*i>p|N zZnlrFF*&(~K}HMXP|V<(=?+HEq9E~V6*KoyHC!3P82tmI zFCi3OO&YYU%F0UBZWq$vdufKGaNCb8*Rm_c5Beo757%%CoehdhQQYCZq0l(sbLMMU zSP||x6w3&;6Mi4IZGw42j2JHPnz&Vhn>@(fhAg+v@>85?(S9O#5eTG@6Nn zNF5F#8sS4oX5tW%X=_yLE%PchL8SlpYkG6ei8IhkA&rE&c=`Df5p(oR3m$$CWg~_T z9s2I{>C>Z)jg4nrE>{%O{Q2{vs;Wktnwt1C+@G60dp3+}6`#UdYJ!0ywq}L(ii~iu zX8n54o;{tgR>U=DC#(lMUwP$~&VBp#@jSc-n6F^%8-;al*g^|m3qf80)`+-{JcVn( zciwp?ir2T_ew*LpdJfl_cn|HIdg!5taP1p0pfoa8EEXp_4beP{`%`v@W5KN1!Vy^I&mHS{`>E9+2YlDf9TL5 z#Mz0o4Ie%{1rMx=Tab2u@5ETZ(W6IW>Bx~IJel{<4%$Ezrno711`Zt9g8Y2)$tRt- z-p2Ji#sx6p+SyF_j4)^qBSwtq5)YQ0IC0`sXJ_X*T+?@#pq*35V|jVG6%SvZ78e&U z#@GnpIFr1VxBjpUaGgOsrKP3+MZ{Vf@t{5S&CJZa6Z*}*2OoU!`1mpE>?x~k!F$;Jj~+J)4}n(F0e$*@BDg;YozFMu<;1`hAt8;Zj_5i-ih%2c#s zuFzU#9m5&f^j${rQ9X|03lon^#71#OwllJd&(2mACA4B4v-^)TW+0O4HqOCVPe|O| z^$7{f+UTIMHagfkHa;&BOg`P?L_)dniA2@KiNwW;#Knok#fikliNwW;gmofu>-i=I zi6aLiE$5#aoWDxKr7l)G$&V`6E|FG7WD$XAA8b3Z?jg}pth;_*a@?ubo+?#-VlEWaK-GM>_7UlGsEURujYaiy58AcuzM64A;sTTVuDHLn@{$QO8s>M(9hd4?` z){89(MDiF%l4)}W)c_}|xo1H=c0Qe1u=bxOH^9VlxGHv0RCfbzqhKS`&esT5&#S6; z_=0$<+N|d7LAK$TP#F1jGIjen9EdfXAi7x!QkJUheHK|gBW93TYl|Rjvg%e{vQzb& zrs(RKn=Kb4GJ!nbCZ@@fS9UAV@6K1}!Z8Qy%?l8*5r!3a3+c_Nk)e;dB~c2}yR|2!B1G;yJOgWV0nvwg zPxN@|9cbJ=(Ew!Dy6Zh*aYz?w*e8TMbpdqQQiGDx@VahAx9@@kEU@;O1#)dtf<9rd z=d1D^5ieF1H$VQ}qp=btj2w^cUH>4jP9mgE!pv4qcGp`)Q&QeHVdP{F+fng0ii$yad~Lt4D7BT? zLV7S)mqQIm3xpr-?g#`UUw60vvfI*Z;Vq2bTaPRLd+U>$#n8nS=V(h_rD&Sb(YVpF zSa$L^9~zWK7>UiZ5#U_v6u(n$klYHmh%!l<>XLxGU<3S>n(zfb@iLA>ktWM_X{t?{ z1NZ(WFqC29Z6(Q=>kSw4x8YUNb$n+z`BkPS*$s_1^U0G#YWDbmeQZDO3WkX0anIW= zOU*b}Fkb{prm4xPHsQM*V6MoN=_tkPM4ozsGV|SzWD2339|J{L6J4u>&Qa`yxv)_c z9HGyJM3-3=b1Ly|gIwbjJ=);FEpgpw{9Qit1xF=7_{(s3vs|OKnfNxq0N!V$X*J{V z-IRb*=fPcme3dhd#e=6Pb7o32YsZh57Ti!avP+n94l~Yem%V*xY|bCxBLsSAiQmO^9k4=rW)nld$w- z8)-X-n1f{Z#&?XS!3@9|-blhLBJFoXs;a>W{jw@DZUS6ChMozR`*5CkbZcbI=E&R{ zc-{w7L%5)~ibx%id6;)ZfNE8dyHvQoAs+uMoLVcNXfkr_ubJSo7BPAQOG{_;ZqsEI z%~qUE9v6Sx=|cTgHuohoKjyFQ%c}=}RWD&?PyQ<5Z4qIfw7}}G))}s9w*`G6Bfnwv zquWuwAKjkRL>FEom7!sh0)4NU^CS6T$b`)CvvP_gZ4{|3dhxfBgbJravUy7)pva4nB|kf zJjH)xeZ)-9vfJIf<(7%j9GZD$}Qg8L_3hZFmg!? zR9_$n({FP`0p}~;YE2$4r0aZ!)uNy0X9Dqs*Z4Umcgp)+j1EjZ-ezH={=97TGT4|= ztt|E^O;TeZ;2k|;gm?oSJbZ&v=2ikDygm=U0`DKO(Bob>BB!fiV3<@FZ15>wFeX2k z#Nq@6UuGqdkuz~3;pyA~ScFn=9+W~#>&XQ(ngMS1c}BiScC!iGF`8w1Rz|a-mA4HS zn(Rw*@)!w8h$YmcKOq)gu1=Wq#7^oN-kJM5K*+Ba@BB`JWBw3bH#%m}rebl-8D}Ej zc0}&3j_ha$cX|p254h|^=h~!3CUDQ1o|ePt9&!4n#d{t1t2y!c0f^`Gm=~Rp)Gm38 z5r*w%dVNa0AKQ$qT@!&`0lY&?ZRo#;mBQT?@ad3$-HOOq@cMY53(MaW-hOEn{8_sK z{yYbeaM=T^G2!daeyC(UBTuxP9LedUbI{FaPq7JByYTWM>^U|*B=FBc_+bR4BN-hAFb9NazZNS0Js(eLK3Hg^dTeB5 zS>($#k!@%b+fm{RaqxZsu`=>DuSl;(4cW#;CgXVi7+{D5aeQt^@UPZH26aTP>4+TL z8u4K6;{X!D?+MV6kzI)O9Yj(Fil+sLXG}+AR2gLNz}ofIku$&rm4ppEfpxcTgS&U3 zUZeyWd_kDO`+|o*3hey^{BcJ95viRJDZM6AV}s{I0_e10bT^ncT%N)zo3};=V?zT) z#SaDGNd!E+H8P|$5g0c0&$WIQSssluLVz9(CO06QQjH~xW&a_BZGIY6fsYYEQh zEMGVPJa;8i0<{h&fpJ8wc*N}nyn7+B86<`l2=W9PfS+r9=C$^4w-g!GMSI^0gt7L* zkre=(hu*f-FHLQBgKb9804W+0meKErBg2xY9EC6k#3?p7Y4Fh z1+qAFII=5+s%R<@SVpR_?nd`#!c{=VWhCd5ZOsq(7i4`dTNgAK+nsk9HO#&DT&*HNn;mBlb8Ax=HASG^5K;_Y7 z_Mx8&=3?uvaO7B0#d6NxKM;;D?TpDc_Cr+Bjp2x=3+a8jPWl|#JC=!C3c^0v_vDj zDIBS`(z(r|qB4Uz&NNc8N=vXTpyQ?_bl5>DX2yns$QUiT18+}317opfd{M}vudkEL zXNQ(xUm0CUePI_?1jC1xWSFN@tf*E?>>%UBvms!tvs#?Y#gQc$-4Q5CLjiSIMR`WE zI9hI$?TL(oFxDUp@6ETV{y;b~QtQGrPiZNR0R|CkQ~Q%7RiIfq&i8rSyJO^EmV}OH z4&yqL#1sa=cgEb`eRu~t8k|Z+eJZA=Buchg$+T(7uBDvMn9m)6Nf6AFMq^Y3X2(<1 zy0PZxY20r9P6s2e^RFn0B9T|P9Oeu6hH%1V4+ci#I)~ARAuob?nRbtNktMSYGqZSH z!;<>|=H~eM)>IX~2N5fIO2GS6w-xmtF*n~AbWa1*xlLZ=NoaUAuVZ&Avd@xxA14Qv zwH`}mE6?;P37LB^v$wy|(~PdmQt$?jRhMDJ%s1W#q7h%j@HwjLfB>#E3-F;8Am_|R z)nR4y2xk=5a4w9-SxX+rl0II=hl`!DPLJPO_#xsdL0tU%T$Zna`7Ka?=TJd6!hsZ1 zpfs&NSKZVgEdK&lr84@+_7%cq^m2d}8u;h65bs~i{OpAy&=7C#fbbW^F1bmWq%5j( zJEq1YGuo`(CV;X;up)-D4f~+i^64_80NN6xMh=FPW?L#fynQlO0<~I2Q;T_detCg1 zwo!IBDE`q2n9z3>^2lz`i@G$NMT~_PQ0RSSpAYNSx~-&R@pD+*&(H~Op~-=uPhD)$ z49;&+I=N^q#-?Swe!J+=xt>(HAbGqn&(FVxG&?~)ycEZg99+C5ih<9=vCRU`*!ZB+ zX|wwj#nLd&un{7kLzqFT#I{Q;qL~bhB#Y*xKvBr$jj{v%+JH$5mh0NOvX?d-?E19#$a#4RK;ONbq6z-3x|JXt6EXK zNfh8jt;FRC`jslXU2zJ#NrK@szIw3hr2I3cN|IVcPhSvMRZ=ZJO?Rk%uTx%>$T5z} zg+PhEdpboPClltnJti<9TXx;QT=hPpLMy&QA~Z1@6M5?QFgA^_n|g99X@zyYhk z;juS~FLEWdj8k)Wm=^Q*Ht>0EhE3x2Qli@Sz0ly$@Nu?&d|p) zD(l}c`U9PjM{m}zVKfML_m=3lGCB`x!7BGZ^ka<9f&0^pF4aAZ-l_9NX1mUpyJ0B# z2xge@w0l0_?#<}G=@>*I_d(WEQ*{1yy`ylytPk9uV05vL@eX>gj?oWtO5erkILLbE z=kRAKqYk}{(YxS&?PWTTgXlVVlq=x=AB_A7Ds5u~TR6)o)2kT$Dct}0XF7I&@-1A3 zG4ioKhS6rIvBv`$hZ*e;gyk~&@9?z#3Vk!96ZOH2y5R8@MjisdUoxudxIiYIaQTwa zyY+F5UJCb5%++DNeIvlE{;|#j`b!}fmh~U%qZsw+^^7(`{(XL(uj&u!+y(yzE>T8X z;PR&hI$v@x)BTLjg^VMN76Uzf82y!glu?_$hS6Hce+>}m7`7ls^tp`Q0oC^Xi_X{S zf7H)_7JZNTM4M*dUhL4;rG5~FT?E2FnV{uV}n3Jia2f<`H$ zP@g`9!uh=o?ml7k5*;M;BPi_4=rWzh*EA@8_ZRvQMp1zIjGTqb>x}HuM=}bW(svp8 zM6YJ_CvgAYjDqSYXey)w&o{vRE|_EJ^B6^m9f389UIJ3lL9A1u5c0mz7cvUgfUS~P1b1OZ>*4aoX!x@N44baK9R74L`U@SSD5L`}PlGwqml*jkoku!; z4Nr#{IRQ_b`|5oE_JgE4bp26rS$a<5J zm-Jdj?$^I%v|PUf)C9SoF}hH{n^C*IgV7qO^7azFiO~iq`onBM3WkQAW+!G`4O3IS zl+gvcjnTpS1V)xaE?`@tW0aCSs80q+eJ!I?bl_-^j{UEKQ>*jVH7yV zSk>oH{x?R8pp|S!q0^GKUOJB%F?|@LUMPNxk-zC+RMT}HrF3_T-Hf2q501? Y9z7|jtsd*Kd*t!pxs_%Qeyj9<0A@GH(f|Me literal 0 HcwPel00001 diff --git a/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/Makefile.am b/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/Makefile.am new file mode 100644 index 0000000..a480cee --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/Makefile.am @@ -0,0 +1,35 @@ +BINDIR = ${bindir} +include $(top_srcdir)/cpprules.in +XINITDIR = $(libdir)/X11/xinit +XDEFS = \ + -DX_VERSION="$(PLIST_VERSION_STRING)" \ + -DX_PRE_RELEASE="$(PRE)" \ + -DX_REL_DATE="$(XORG_DATE)" \ + -DX_VENDOR_NAME="$(VENDOR_STRING)" \ + -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" + +resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources + +Dutchlprojdir = $(resourcesdir)/Dutch.lproj + +Dutchlproj_DATA = \ + XDarwinHelp.html \ + InfoPlist.strings \ + Credits.rtf Localizable.strings + +Dutchlprojnibdir = $(Dutchlprojdir)/MainMenu.nib +Dutchlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib + +InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ + +CLEANFILES = XDarwinHelp.html InfoPlist.strings + +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp diff --git a/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/Makefile.in b/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/Makefile.in new file mode 100644 index 0000000..91ef6f3 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/Makefile.in @@ -0,0 +1,638 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*- Makefile -*- +# Rules for generating files using the C pre-processor +# (Replaces CppFileTarget from Imake) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/cpprules.in +subdir = hw/darwin/bundle/Dutch.lproj +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(Dutchlprojdir)" \ + "$(DESTDIR)$(Dutchlprojnibdir)" +DutchlprojDATA_INSTALL = $(INSTALL_DATA) +DutchlprojnibDATA_INSTALL = $(INSTALL_DATA) +DATA = $(Dutchlproj_DATA) $(Dutchlprojnib_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +BINDIR = ${bindir} +SED = sed +SUFFIXES = .pre .man .man.pre + +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e '/\@\@$$/s/\@\@$$/\\/' + + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ +XORGMANNAME = X Version 11 +XSERVERNAME = Xorg +MANDEFS = \ + -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__appmansuffix__=$(APP_MAN_SUFFIX) \ + -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ + -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ + -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ + -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ + -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ + -D__mandir__=$(mandir) \ + -D__projectroot__=$(prefix) \ + -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ + -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) + +XINITDIR = $(libdir)/X11/xinit +XDEFS = \ + -DX_VERSION="$(PLIST_VERSION_STRING)" \ + -DX_PRE_RELEASE="$(PRE)" \ + -DX_REL_DATE="$(XORG_DATE)" \ + -DX_VENDOR_NAME="$(VENDOR_STRING)" \ + -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" + +resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources +Dutchlprojdir = $(resourcesdir)/Dutch.lproj +Dutchlproj_DATA = \ + XDarwinHelp.html \ + InfoPlist.strings \ + Credits.rtf Localizable.strings + +Dutchlprojnibdir = $(Dutchlprojdir)/MainMenu.nib +Dutchlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib +CLEANFILES = XDarwinHelp.html InfoPlist.strings +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp + +all: all-am + +.SUFFIXES: +.SUFFIXES: .pre .man .man.pre +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/darwin/bundle/Dutch.lproj/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/darwin/bundle/Dutch.lproj/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-DutchlprojDATA: $(Dutchlproj_DATA) + @$(NORMAL_INSTALL) + test -z "$(Dutchlprojdir)" || $(MKDIR_P) "$(DESTDIR)$(Dutchlprojdir)" + @list='$(Dutchlproj_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(DutchlprojDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Dutchlprojdir)/$$f'"; \ + $(DutchlprojDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Dutchlprojdir)/$$f"; \ + done + +uninstall-DutchlprojDATA: + @$(NORMAL_UNINSTALL) + @list='$(Dutchlproj_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(Dutchlprojdir)/$$f'"; \ + rm -f "$(DESTDIR)$(Dutchlprojdir)/$$f"; \ + done +install-DutchlprojnibDATA: $(Dutchlprojnib_DATA) + @$(NORMAL_INSTALL) + test -z "$(Dutchlprojnibdir)" || $(MKDIR_P) "$(DESTDIR)$(Dutchlprojnibdir)" + @list='$(Dutchlprojnib_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(DutchlprojnibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Dutchlprojnibdir)/$$f'"; \ + $(DutchlprojnibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Dutchlprojnibdir)/$$f"; \ + done + +uninstall-DutchlprojnibDATA: + @$(NORMAL_UNINSTALL) + @list='$(Dutchlprojnib_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(Dutchlprojnibdir)/$$f'"; \ + rm -f "$(DESTDIR)$(Dutchlprojnibdir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(Dutchlprojdir)" "$(DESTDIR)$(Dutchlprojnibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-DutchlprojDATA install-DutchlprojnibDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-DutchlprojDATA uninstall-DutchlprojnibDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install \ + install-DutchlprojDATA install-DutchlprojnibDATA install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall \ + uninstall-DutchlprojDATA uninstall-DutchlprojnibDATA \ + uninstall-am + + +.pre: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ + +.man.pre.man: + $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ + +InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp b/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp new file mode 100644 index 0000000..1113b8a --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp @@ -0,0 +1,103 @@ + + + + +XDarwin Help + + +
+

XDarwin X Server for Mac OS X

+ X_VENDOR_NAME X_VERSION
+ Release Date: X_REL_DATE +
+

Inhoud

+
    +
  1. Belangrijke Informatie
  2. +
  3. Gebruik
  4. +
  5. Instellen van het Path
  6. +
  7. Voorkeursinstellingen
  8. +
  9. Licentie
  10. +
+
+

Belangrijke Informatie

+
+
+#if X_PRE_RELEASE +Dit is een pre-release van XDarwin, waarvoor geen ondersteuning beschikbaar is. Rapporteren van bugs en aanleveren van patches kan op de XonX project pagina bij SourceForge. Kijk alvorens een bug te rapporteren in een pre-release eerst of een nieuwe versie beschikbaar is bij XonX of de X_VENDOR_LINK. +#else +Als de server ouder is dan 6-12 maanden, of als uw hardware nieuwer is dan de bovenstaande datum, kijk dan of een nieuwe versie beschikbaar is voor u een probleem aanmeldt. Rapporteren van bugs en aanleveren van patches kan op de XonX project pagina bij SourceForge. +#endif +
+
+Deze software is beschikbaar gesteld onder de voorwaarden van de MIT X11 / X Consortium Licentie en is beschikbaar 'AS IS',zonder enige garantie. Lees s.v.p. de Licentie voor gebruik.
+ +

Gebruik

+

XDarwin is een open-source X server van het X Window Systeem. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin werkt op Mac OS X in schermvullende of rootless modus.

+

Het X window systeem in schermvullende modus neemt het hele beeldscherm in beslag. U schakelt terug naar de Mac OS X desktop door de toesten Command-Option-A in te drukken. Deze toetsencombinatie kunt u veranderen in de Voorkeuren. Op de Mac OS X desktop klikt u op de XDarwin icoon in de Dock om weer naar het X window systeem te schakelen. (In de Voorkeuren kunt er voor kiezen om een apart XDarwin schakelpaneel te gebruiken op de Mac OS X desktop.)

+

In rootless modus verschijnen het X window systeem en Aqua (de Mac OS X desktop) tegelijk op het scherm. Het achtergrondscherm van X11, waarbinnen alle X11 vensters vallen, is net zo groot als het gehele scherm, maar het achtergrondscherm zelf is onzichtbaar.

+ +

Meerknopsmuis emulatie

+

Voor veel X11 programma's hebt u een 3-knops muis nodig. Met een 1-knops muis kunt u een 3-knops muis nabootsen door een toets in te drukken terwijl u klikt met de muis. Het instellen hiervan kan bij Voorkeuren, "Meerknopsmuis emulatie" in "Algemeen". Emulatie is standaard ingeschakeld: ingedrukt houden van de "command" toets terwijl u klikt emuleert knop 2, ingedrukt houden van "option" emuleert knop 3. Deze toetsen kunt u dus wijzigen in de Voorkeuren. Let op: als u xmodmap gebruikt om de indeling van het toetsenbord te wijzigen, moet u toch de oorspronkelijke toetsen op het toetsenbord gebruiken voor deze functie.

+ +

Instellen van het Path

+

Het path is de lijst van directories waarin gezocht wordt naar commando's. De X11 commando's staan in de directory /usr/X11R6/bin, die dus aan uw path moet worden toegevoegd. XDarwin doet dit automatisch voor u en kan extra directories toevoegen waarin u commando's hebt geïnstalleerd.

+ +

Ervaren gebruikers zullen het path al correct hebben ingesteld in de configuratiebestanden voor hun shell. In dat geval kunt u XDarwin via de Voorkeuren vertellen het path niet te wijzigen. XDarwin start de eerste X11 clients binnen de standaard login shell van de gebruiker (bij de Voorkeuren kunt u een afwijkende shell opgeven). Het instellen van het path is afhankelijk van de shell. Zie hiervoor de man pages voor de shell.

+ +

Het kan handig zijn de manualpages voor X11 toe te voegen aan de lijst waarin gezocht wordt als u documentatie opvraagt. De manualpages voor X11 staan in /usr/X11R6/man en de MANPATH environment variable bevat de lijst van directories waarin naar documentatie wordt gezocht.

+ +

Voorkeursinstellingen

+

Een aantal instellingen kan worden gewijzigd door "Voorkeuren..." te kiezen in het "XDarwin" menu. Wijzigingen van de instellingen genoemd onder "Start" gaan pas in als u XDarwin opnieuw hebt gestart. Een wijziging van de overige instellingen is direct effectief. Hier onder vindt u de verschillende mogelijkheden beschreven:

+ +

Algemeen

+
    +
  • Gebruik systeempiep voor X11: Als u dit inschakelt wordt het Mac OS X waarschuwingssignaal ook gebruikt door X11, anders gebruikt X11 een simpele pieptoon (dit is de standaardinstelling).
  • +
  • Wijzigen muis-versnelling door X11 mogelijk: In een standaard X window systeem kan de window manager de muis-versnelling aanpassen. Dit kan verwarrend zijn omdat de snelheid onder X11 dan verschillend kan zijn van de snelheid die u in Mac OS X bij Systeemvoorkeuren hebt ingesteld. Om verwarring te voorkomen is de standaardinstelling dat X11 de versnelling niet kan wijzigen.
  • +
  • Meerknopsmuis emulatie: Dit is hierboven beschreven bij Gebruik. Als emulatie is ingeschakeld moet u de gekozen toetsen ingedrukt houden terwijl u met de muis klikt om de tweede en derde muisknop na te bootsen.
  • +
+ +

Start

+
    +
  • Standaard modus: Hier kiest u de standaard scherm-modus: schermvullend of rootless (hierboven beschreven bij Gebruik). U kunt ook kiezen tijdens het starten van XDarwin, zie de optie hieronder.
  • +
  • Kies scherm-modus tijdens start: Dit is standaard ingeschakeld zodat u tijdens het starten van XDarwin kunt kiezen tussen schermvullend en rootless scherm-modus. Als u dit uitschakelt start XDarwin in de standaard modus zonder u iets te vragen.
  • +
  • X11 scherm nummer: Met X11 kunnen meerdere schermen worden aangestuurd door verschillende X servers op dezelfde computer. Als u meerdere X servers tegelijk wilt gebruiken stelt u hier het scherm nummer in dat door XDarwin wordt gebruikt.
  • +
  • Xinerama multi-monitor ondersteuning mogelijk: XDarwin ondersteunt het gebruik van meerdere monitoren met Xinerama, waarbij elke monitor wordt gezien als deel van één groot rechthoekig scherm. U kunt Xinerama hier uitschakelen, maar XDarwin werkt op dit moment zonder Xinerama niet goed met meerdere monitoren. Als u maar 1 monitor gebruikt is deze instelling automatisch uitgeschakeld.
  • +
  • Toetsenbordindeling-bestand: Een toetsenbordindeling-bestand wordt bij het starten geladen en omgezet naar een X11 toetsenbordindeling. Voor verschillende talen vindt u toetsenbordindelingen in de directory /System/Library/Keyboards.
  • +
  • Bij starten eerste X11 clients: Als XDarwin start, wordt xinit uitgevoerd om de X window manager en andere X clients te starten (zie "man xinit"). Voordat XDarwin xinit uitvoert voegt het de opgegeven directories toe aan het path. Standaard wordt alleen /usr/X11R6/bin toegevoegd. U kunt meerdere directories opgeven, gescheiden door een dubbelepunt. X clients worden gestart met de standaard login shell van de gebruiker met gebruik van de configuratiebestanden voor die shell. U kunt een afwijkende shell opgeven.
  • +
+ +

Schermvullend

+
    +
  • Toetscombinatie knop: Klik op deze knop om de toetscombinatie te wijzigen waarmee u tussen de Mac OS X desktop en X11 schakelt. Als toetscombinatie kunt u elke combinatie gebruiken van de shift, control, command en option toetsen samen met één normale toets.
  • +
  • Klikken op icoon in Dock schakelt naar X11: Hiermee is een klik op de XDarwin icoon in de Dock voldoende om naar X11 te schakelen. In sommige versies van Mac OS X verdwijnt soms de cursor als u deze mogelijkheid gebruikt en daarna terugkeert naar de Mac OS X desktop.
  • +
  • Toon help bij schermvullend starten: Hiermee wordt een inleidend scherm getoond als XDarwin schermvullend start.
  • +
  • Kleurdiepte: In de schermvullende modus kan X11 een andere kleurdiepte gebruiken dan Aqua (en de Mac OS X desktop). Als u "Huidig" kiest, neemt XDarwin bij het starten de kleurdiepte over van Aqua. U kunt ook kiezen voor 8, 15 of 24 bits.
  • +
+ +

Licentie

+The main license for XDarwin is one based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code. +

X Consortium License

+

Copyright (C) 1996 X Consortium

+

Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without +limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to +whom the Software is furnished to do so, subject to the following conditions:

+

The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software.

+

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE.

+

Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization from +the X Consortium.

+

X Window System is a trademark of X Consortium, Inc.

+ + + diff --git a/xorg-server-1.4/hw/darwin/bundle/English.lproj/Credits.rtf b/xorg-server-1.4/hw/darwin/bundle/English.lproj/Credits.rtf new file mode 100644 index 0000000..34408e7 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/English.lproj/Credits.rtf @@ -0,0 +1,168 @@ +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique; +} +{\colortbl;\red255\green255\blue255;} +\vieww5160\viewh6300\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Contributors to Xorg Foundation Release: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Kaleb KEITHLEY\ + +\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys. +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\f1\b \cf0 Contributors to XFree86 4.4: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Harper\ + +\f2\i Rootless acceleration and Apple-WM extension +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Additional XonX Contributors to XFree86 4.3: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Fabr\'92cio Luis de Castro\ + +\f2\i Portuguese localization +\f0\i0 \ +Michael Oland\ + +\f2\i New XDarwin icon +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 XonX Contributors to XFree86 4.2: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f0\i0 \ +Pablo Di Noto\ + +\f2\i Spanish localization +\f0\i0 \ +Paul Edens\ + +\f2\i Dutch localization +\f0\i0 \ +Kyunghwan Kim\ + +\f2\i Korean localization +\f0\i0 \ +Mario Klebsch\ + +\f2\i Non-US keyboard support +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +Andreas Monitzer\ + +\f2\i German localization +\f0\i0 \ +Patrik Montgomery\ + +\f2\i Swedish localization +\f0\i0 \ +Greg Parker\ + +\f2\i Rootless support +\f0\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f0\i0 \ +Olivier Verdier\ + +\f2\i French localization +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Special Thanks: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Devin Poolman and Zero G Software, Inc.\ + +\f2\i Installer +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 XonX Team Members\ +Contributing to XFree86 4.1: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +Andreas Monitzer\ + +\f2\i Cocoa version of XDarwin front end +\f0\i0 \ +Greg Parker\ + +\f2\i Original Quartz implementation +\f0\i0 \ +Christoph Pfisterer\ + +\f2\i Dynamic shared libraries +\f0\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f0\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Special Thanks: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Tiago Ribeiro\ + +\f2\i XDarwin icon +\f0\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 History: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Carmack\ + +\f2\i Original XFree86 port to Mac OS X Server +\f0\i0 \ +Dave Zarzycki\ + +\f2\i XFree86 4.0 port to Darwin 1.0 +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file diff --git a/xorg-server-1.4/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp b/xorg-server-1.4/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp new file mode 100644 index 0000000..aeb2103 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp @@ -0,0 +1,5 @@ +/* English versions of the Info.plist keys; used by most localizations. */ +/* Most of these are set in the target application settings. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp,v 1.3 2002/07/17 01:24:55 torrey Exp $ */ + +NSHumanReadableCopyright = __quote__ X_VENDOR_NAME X_VERSION __quote__; diff --git a/xorg-server-1.4/hw/darwin/bundle/English.lproj/Localizable.strings b/xorg-server-1.4/hw/darwin/bundle/English.lproj/Localizable.strings new file mode 100644 index 0000000..2c25c1d --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/English.lproj/Localizable.strings @@ -0,0 +1,23 @@ +/* English localized versions of strings used by the Mac OS X front end. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Localizable.strings,v 1.3 2002/01/30 06:50:46 torrey Exp $ */ + +/* Title of alert panel */ +"Quit X server?" = "Quit X server?"; + +/* Text of alert panel */ +"Quitting the X server will terminate any running X Window System programs." = "Quitting the X server will terminate any running X Window System programs."; + +/* Quit */ +"Quit" = "Quit"; + +/* Cancel */ +"Cancel" = "Cancel"; + +/* Default keymapping file */ +"USA.keymapping" = "USA.keymapping"; + +/* Default switch string */ +"Cmd-Opt-a" = "Cmd-Opt-a"; + +/* Button title when changing switch key */ +"Press key" = "Press key"; diff --git a/xorg-server-1.4/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib b/xorg-server-1.4/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib new file mode 100644 index 0000000..77f345a --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib @@ -0,0 +1,72 @@ +{ + IBClasses = ( + { + ACTIONS = {showHelp = id; }; + CLASS = FirstResponder; + LANGUAGE = ObjC; + SUPERCLASS = NSObject; + }, + { + ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; + CLASS = Preferences; + LANGUAGE = ObjC; + OUTLETS = { + addToPathButton = id; + addToPathField = id; + button2ModifiersMatrix = id; + button3ModifiersMatrix = id; + depthButton = id; + displayField = id; + dockSwitchButton = id; + fakeButton = id; + keymapFileField = id; + modeMatrix = id; + modeWindowButton = id; + mouseAccelChangeButton = id; + startupHelpButton = id; + switchKeyButton = id; + systemBeepButton = id; + useDefaultShellMatrix = id; + useOtherShellField = id; + useXineramaButton = id; + window = id; + }; + SUPERCLASS = NSObject; + }, + { + CLASS = XApplication; + LANGUAGE = ObjC; + OUTLETS = {preferences = id; xserver = id; }; + SUPERCLASS = NSApplication; + }, + { + ACTIONS = { + bringAllToFront = id; + closeHelpAndShow = id; + itemSelected = id; + nextWindow = id; + previousWindow = id; + showAction = id; + showSwitchPanel = id; + startFullScreen = id; + startRootless = id; + }; + CLASS = XServer; + LANGUAGE = ObjC; + OUTLETS = { + dockMenu = NSMenu; + helpWindow = NSWindow; + modeWindow = NSWindow; + startFullScreenButton = NSButton; + startRootlessButton = NSButton; + startupHelpButton = NSButton; + startupModeButton = NSButton; + switchWindow = NSPanel; + windowMenu = NSMenu; + windowSeparator = NSMenuItem; + }; + SUPERCLASS = NSObject; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/xorg-server-1.4/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib b/xorg-server-1.4/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib new file mode 100644 index 0000000000000000000000000000000000000000..ebbfd8317de285c8bf5ff9931149263c4ca48cfa GIT binary patch literal 20829 zcwX&1eS8!}mR0!z^FKoCXcLlPETS#UDbAuW@cv8MyU^~8!j zbGM$Jd$TZ0*eoh4DnWElP!>M`#l;0d#jn*CKUPE!S5RaRHbDB`tLmQVo=E`r?*6#n z&uC3|SG{`m-m6#dy?R|uR-U#bB>TdeDtj7O=9fAhuj_i@wCX7nr`O&hd$ma(&BMqi zy54v_|vXUgGFFyNC_vJ5ewGp)MDQ;W@6D`Wb~SfqvM`QzcQ&iWIh zPi@pZwSIYms(O|XUGFxnTHG#c$&3j)CN^qXFhDrQs$f7cRZocOV77aRLOq-mHc^v7a76lV$KBKO#s#vr8$dskml}y zSYcC{RkRgWJh zryHt*>DWlrS|L+C zAeyEhC#h>A(tTzysQKk^m=8g%A?Po!6GKGSiK*szE0)C~sPsbht^a89 zX=6!=PQ&nsLMj516s^G%;$3ITAz1gh79xCF*21#)>fLUty!7%B-k(jKN`?`V-Ix5| z{86je_b^RFf^q?rQYe|7z@`4#Z8S48b4XrZ9vd)Vz}8WtMjeLo-Jn5(b`%s8+)F7P z2{0LsKAqyp&(FVp&54&^e)-g!Z@$^_)?06xJ9g|i^}FBw?gZiknEiljhO@7I1$v9e zjT`qU;&|}E2T#2C;)~{Muf1jh9`o(D-!}K|-HW))M;>|P#O=4=ZUXGqjEs!)EgZ-v z(nq>=>-OVdFnHiMzxj>1e*OAW&p-dXxpnJSUbb!9W^UQC#eD9$=S-lfW97<~rmCt( zfTo{Vc(M=$-V_!V-fZDG@xlu)n81^{efxHPMLaLP^b)^f+Y?Vbabm@a6=whb{qMB! zAT4OPX=!Pxx?#fx6ZmOIevl88%RBG9li=(1*Izex@7`?!t?f@g{j@n`$dF|Yp0IT9 z*|TTh*=L_cxKn@n)1Nv%`Q#Jx(@#G&_wV1&%V(c`W`6Y1N9OzQzi;l`x%1SfO`A;6 zg}b3|zJ&vM%ZIs|-`d*x)dwGZU;>U)Uw!qJdHC>Q^T?4S<~QGbV}AYh*XF^42eGXK z#xd8fU3;{5@7|5jw}*uT=_-Wzs+u`-=8K32aCCh4-FIetd%KB$Cr_R*r2Ym3p&OfB_SHJqz{(%Dr zJ_4|_h**2whxy8QsKv@jsCl-z(l9Y?{&&HJt>}FFwlLW*(f*11o%CD>&I=tlXC~|UUw7-j+>>__GNj19 zf}i2OlYr-pz6oK>X8ufRbgjz)WpnqGbZ`;d`;0;F6M>%GmG0qTmhEjz7@f<=Dei4g zxxB5*g$}5$4=$D(!0SsP#k)`nc>=Ou3I?RG=25lAP;%6dxm(TPK5yN+h`twnCr0Fp z70p{86=B|XXDl*~k$)-1@&CmgkNg36tL&JN2tInwsjQSHDdCXcvqTCsHq^?hBLvyM ziEMrqIQ)IYg`bgCjE=pgH)ve%RP4)c1?*WCb~+-7>x)e^5y|w_AcUFd@h)7T1{(uD z5zKrTO|+k*B|@B?(e&|)d%^I97(|XOOykZOT8*6^!ni&x`GQg)s7ab#oFBxuIydLUYZZI$OR+yDr)91uVb&n9NPmP`SBmILx6ZI8{(~C)3B9%B)%blu==F9&q4}Ji-Npc z8Cl0y&bpGAnN9&8z3&8{Px2`$%wtehlKHc>MC@VCpT%ey$_sv7 z!*n69ET_C)OHwzme{g{UYrh`$ z2vS{8m9%;#EH#E@HOW*?YIvQ?Es#q#JrF1F%TbL@M$XROxx8m|^M`+zx$EwhWx@B8 zWsjsRaZ{L)!RTa0?nMN6jhz%Icw?`Tj9$yggV=~yTPgK!b#>#%d%a$gSU;SBe$}{o z#mZ5`nuO-9%CE=)E&M%Jw7r4ONv!C|CUWrAsF|5TV(t|Kw*EXu&qa-e-_F(yr)$Ur zzaNbK90hl%4IZfhW?TvRWibB%1(a9{H-0m1fp8J#!~>7F>yHDIbws(}ducc|6NQZ3&X@{xfEtU*G&!G>BTAndhP z@6jYBoC^!Zhj0r3F4zdAj)TvEj_M+pQybv4p-G9rMD}5HIG@PjC7nq`ELlMujI4O^ zCm>A-A+JHvg-d)(PQ=C%UbPh|* zDbJS72!>{b#3q`N*B*+MTTK1Dd_E}q{C=@=2Rpi6?COD836@bQvTt&r5pyoQj_gHa zHNnmbMG{O^aI-+0bKJ)M`!6u)glWUv^zXlmZe9v8K8ff<;uoTE6j-b3W$(fUkGc?+ zl+{usTBa&ZvJaM#CP$-s@%#`<3CR)(LQK?+;06Fj-G$?1R9@yD=*N-qucbqcytGRw z2;MkMx2i@}1v}*gq)xzyo~evintuec9Ye(8vZpz3WB|g7K(T9@)4~cKP)W6l1}-P$ za+X)SmxPTr{{}|BoVHPBCJE2a)*lW|)Lc%X6I4NXw1P|>- z6rPrw|4C@~txeFhB;N^72@9E!gZX< zguBve+=@pxu7#adB9oel6V#HlS+GJj@G06*5^L$gX7$04KqNn{=Yg zZmzh`Mn#!tD~blQz;`%z7RTnDMp1eSBPWf-{Hju?$ZFW3`8PW?|Fs16{QTLqgv_pW zVuqN`G_x_Ln~f2jPIyF@?T+ZOtLv3IhZpy{xYOS|V~X-co}hdm(~sN!57LhIwiq|b z=Rz4lDXlzHAtH^C?ZCtDp>6oEVZ+|P;f5Q``uh4)4Gj$@mRoMQ#Z(lGAk?VY70jqt(KFM<3YIf>(?Ls;~)RnzI*p>OpCSe+_|%T*REadd-m+% zb$Aaj->Ir<78Vvp9klRt4b*9^t*w~qI*w_o_uhNY#Ou57zRT}1<%Fp)yoYg)Kk&c< zn4XJU@<1Huy)dnI$3qW2WIp@sv+bA~v{QSSF0`NRv?0Pg{`ljVR$E0xnkdIAdA)k| zVh=z3Fs2pTfB*a6^RytQ9`POv-f!N#nU@V4Hng|3wV8tl4}O4%6j1_C@7}$efp6^J z{>m$_@RaAPufA$J@9~PyKw~?m1cweC`d})aK7IN$<5&RO{>B?`@HDDjFy&}pF%=0o zIqw%;bWs|fzJ2>PqbvYNJErqc zJaFJZqI~}O=e*eWFb?W~37gI|JpKChYes&)_~MIpObKF&5mT2~Fui9Nd`1}5hvCDA zcZvtw4j(>zyuH1>1JjOO6&U9@@>p3}>BPfRXr-m4w_*AgaGXp{H#+~Y4RD=AJVS;I z`85&gKE#9i*dseTdoHY-J@?;#|Dneod+ZSC**9y~u1zb@b{O>akk99PH#avoK*YPj zL|PWg6;PU>{1(a@D35hfu*OQB36;#Gv5l1I8QwLTHn{f$sOP-?p<*me`Z;#waB zT`c z*dILX4<7ah5Br0M{lUY24-f118;j1u!=9-}nuk482bYIU2X=ed#x6YUBBzJl?(nb= zeBT}NC7te&8DZ}1P-2hF$iFet%99VRC9V;i{<`R@03OzoNt#w` z_>FPd8-H?Dyh)8`neoZmey9 zmSl!860`7SO$pQmqvGHh;<}IHDwt4<3GO+QJnCX45MAd$79qAG2=L~uuu#^e4w(vt zNDF7Ea-FQo0k0g!_j+gQbM~0KSIg=m1<_*WlLHL+!WAUEsuBO+2(Y*JLeL!pcDN5GeUn4+HYu7G#Bl+c11fs(+KjyQ@OHB zSVI4@uJS3`=_f#dfbhGEj!%e=vjV;#AN#h`%gq9xDO=z_JrnrZ$Uz{@tZLLa&ZaZr zB-t-RhqEC(w;Eu*8dnP(z|-aQMcmVsGg|?% zFFxIbC4rLmVTWaFlz`Hp+$NZ6I6YIMOLmn%7#8r0&jvp0r@>&u8APz-tY+B4H%)Hh zQ=ECY^{%rapgWkWMG6>mt5frtI-NZ&`Qo*kGy_lLr1Ny4pIJA6$Fyrh(oojiQqS&}}Zi2%0$1pi{slCb0nFXZy{S*PXj;GT1w_O9Ncxh8oW zOfEkJv3KB^rkMPq2IUU|lmm+tFc=UfYLeFzNRS{VJB%+|Juu}Vj|$660$8ollXx8q zB&(J_O8mftoS1mYCx;hm!BB-%RUZuUb3?L=KU6M=m|fd}4)+-}2XA#}0Y8w~8#Ns)aFjq4q2Q5ZelR%rp_`bJ1HzX8bkrIaJs9w`TV}}nH zrzil^0=Xg}Yr{d0@av`U@TOp(X}D7zD0Ps}$Tz7=yjQ+oBE&CswZyGMG2%UK>Nyxj zv${S8XMZMhl+mA~knk!-i1C-Z&@4VqvOjN;HNp?h;mtCgPRT~2R>ng-X~v|Z{RC1WB0$xujj2j_XZZm>mt=g+9ArN$B z#mG*(l}@Y1(})32gB+g0+iL8leil(vs%p}@Mj6?}$k(vfga2`{;Wb6NNgIskPKG|V zrkRM@#~Wj}I&Zqv`Tzmw66wvYtogKpxG7JgI4O!rM=Ix}306%2jwm_`s?(-K&+(5@+91jIV3kZKYq%<9x&1IJM7 z!J}ZoPR&-iR3G&FB;YI{S=pM4MGofT2^G?X+`FWn7en(|D_aK>d}18L?cDzkMM6|r zYg7Z)d9HHFYajdKKGAlUcmxbAS=VGpo&^vSRY=vcFs>L+Nx0qTt|Zk0x(wAIr=4Zw z+vH^EjOM}AJjPZ;GrYkk>v>j_3D;{4+^ zVYdL$S8sI7VDxc*JOtaCM>O&Ht*7HCOJWxbmLL(m!T1sSrZaTI{&SF*bMOq2h``%O zG=6n?d}Avtz;?07-+aA%Oc2j5kAJZ(&N<7@;2$cE71rA3tRy}3>LNe|no?Q( z1jUCeqJK@WxIBLIJRoT$BP-zYzF=uDUV`5EjV2T=^F0pz=C&n2%C*ciHT;mLn03cG80}V)ao5KLIO_h~7LZgH z&d0|%T?0^Ncc}4gTjE<<Ej|rqnqH2RAjb!wo;ki~jY3m} zbM?fZMBTPO_`C$#$w6B;txZTYeuvIK{Y)M|1-KiX{Vv0PpNa2pw{5%+G;@o-#898u=Y5h^HAqFU5ZstVFx6PUhc*<&pFOG!KmG_5_=wXk_a_k(O-OR ziwOIt08|J*9cOJ3&C^K0rO|j3w7R}UkH)8o4hiu>bP&H*upq!jazZ|E69>4IbX=eV zsXhBbMWO54Y7pGpsgnVKy96VGGk9(l&sN81JWC9hpp%Ppu%Ifjm&UrR)am*ZnFow7 zrzz4XH&cMJ%sC-oWuR*YN(3S@M2iQnd0-d6trHghnnEH}t#aZUgDmlxxgK`1i2qm` zNrzH!jE=@-=M;0bqbWeVa!~r{Ibt>}nL@?FPN;@;?q>QGJw<`bo$VhxXZSMc-^)qf zrAWzWC;Y6G=Kk*KIikDOPiWgSIAypZ>1B+Lf{OMO87v2Ye2hJYgr(_=1843<*`9sJm7H^xB^?DSQQxeQ9vr(^&*-ucK|Y zl9}UA8wETH>gD0V{L(_SaGS64vI1`HO%F_&HXhWh;mG z`el#msC|l~ZUhb;l~40ZRd!V#z{+#Nu*XB6=V*wbsxCrYNpOffEInkKQ!)=qZWi^8LMsWUe%<-?lgdI>1bEw7u!U5B1P`ciWOL}^v z=9e|+95A|e!*UT)boYVK7Vs}I5brB?eYYl&+)NI)T*Mfq4Y0YqPF^x0;G3RceyrUa ztrrK&5u0HL*2_=@Lyq7%(WOE}6}h+_neFKI_=YD%H<-U*I4PjjqBcM5StM8SEoOME z3me*#VrvhM(`H%T1S>mH@;yVcihDwQk>i0~sB)WQ3NR8wG34RQTQ7}WL;Q#nz_-z} zU7Ye(Tt~UM^>DL;Atpy##EHYLo7lNIX7#9mDC7`!irY0d_Y5|B_|KW7u!ma%L{ZG8 zhWx`^VU{9^g&Y(jOq+eEMu*VDGggX-XR#U4Bt= z0@HeOH)iEdg^>ZlcBZ_v}VGCBc5PoFEyk9bYyXv2B!A=;`%CO@dU2;niW z&yIPmmgSw+<7(XC1=4gCZH1-Ht?_bjZ zKCsOQtZFg6sUBya1yPIdL%}=L1Z_hdg3YLqd00d!t3!Owr(WSERDGTvtN z5_tR@qj$okjFJC<%X^G`VrY!|j8;a^HL@5D8Ba2@-ME_3YYluYNn&tWH^At{=wf3d zqvylpE^wW2`6DC02C_c8#kh@88Autz=p#_^R2Y6<$}?0(Z-&}zMx(|sMr#b7v0>2j z6r;`XboY61KMXn;+#>u2E}L#M_$jNUnj3XM026XBHdRGFlCHTNwd5 z$v2FgFd7)W397zk6lL52GKHs48SQ28oFQK?9R)6xE@W(N?27qo|%+VHshP=P!Wd0!CLG ze0hU9)6KUV%c*e)=FZ4r^j2tip*sMb!{{#z$|&HYuS0*hyv4{L-~wy91OWb#(T5Fg z&2awT0rm`7yrYdhj9zN=WmGbzF**mDMl z^k%dL1_0*&-Pi`RW(;I>GH|u>4&x3+6$3M_bcMk)u3s5j7(EXR%bFGvgJ7&^%EYRm QH|UuR4pUwn#BYZG8~wgRz5oCK literal 0 HcwPel00001 diff --git a/xorg-server-1.4/hw/darwin/bundle/English.lproj/Makefile.am b/xorg-server-1.4/hw/darwin/bundle/English.lproj/Makefile.am new file mode 100644 index 0000000..4558708 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/English.lproj/Makefile.am @@ -0,0 +1,35 @@ +BINDIR = ${bindir} +include $(top_srcdir)/cpprules.in +XINITDIR = $(libdir)/X11/xinit +XDEFS = \ + -DX_VERSION="$(PLIST_VERSION_STRING)" \ + -DX_PRE_RELEASE="$(PRE)" \ + -DX_REL_DATE="$(XORG_DATE)" \ + -DX_VENDOR_NAME="$(VENDOR_STRING)" \ + -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" + +resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources + +Englishlprojdir = $(resourcesdir)/English.lproj +Englishlproj_DATA = \ + XDarwinHelp.html \ + InfoPlist.strings \ + Credits.rtf Localizable.strings + +Englishlprojnibdir = $(Englishlprojdir)/MainMenu.nib +Englishlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib + +InfoPlist.strings: InfoPlist.strings.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ + +CLEANFILES = XDarwinHelp.html InfoPlist.strings + +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp \ + InfoPlist.strings.cpp diff --git a/xorg-server-1.4/hw/darwin/bundle/English.lproj/Makefile.in b/xorg-server-1.4/hw/darwin/bundle/English.lproj/Makefile.in new file mode 100644 index 0000000..ee37628 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/English.lproj/Makefile.in @@ -0,0 +1,639 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*- Makefile -*- +# Rules for generating files using the C pre-processor +# (Replaces CppFileTarget from Imake) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/cpprules.in +subdir = hw/darwin/bundle/English.lproj +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(Englishlprojdir)" \ + "$(DESTDIR)$(Englishlprojnibdir)" +EnglishlprojDATA_INSTALL = $(INSTALL_DATA) +EnglishlprojnibDATA_INSTALL = $(INSTALL_DATA) +DATA = $(Englishlproj_DATA) $(Englishlprojnib_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +BINDIR = ${bindir} +SED = sed +SUFFIXES = .pre .man .man.pre + +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e '/\@\@$$/s/\@\@$$/\\/' + + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ +XORGMANNAME = X Version 11 +XSERVERNAME = Xorg +MANDEFS = \ + -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__appmansuffix__=$(APP_MAN_SUFFIX) \ + -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ + -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ + -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ + -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ + -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ + -D__mandir__=$(mandir) \ + -D__projectroot__=$(prefix) \ + -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ + -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) + +XINITDIR = $(libdir)/X11/xinit +XDEFS = \ + -DX_VERSION="$(PLIST_VERSION_STRING)" \ + -DX_PRE_RELEASE="$(PRE)" \ + -DX_REL_DATE="$(XORG_DATE)" \ + -DX_VENDOR_NAME="$(VENDOR_STRING)" \ + -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" + +resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources +Englishlprojdir = $(resourcesdir)/English.lproj +Englishlproj_DATA = \ + XDarwinHelp.html \ + InfoPlist.strings \ + Credits.rtf Localizable.strings + +Englishlprojnibdir = $(Englishlprojdir)/MainMenu.nib +Englishlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib +CLEANFILES = XDarwinHelp.html InfoPlist.strings +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp \ + InfoPlist.strings.cpp + +all: all-am + +.SUFFIXES: +.SUFFIXES: .pre .man .man.pre +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/darwin/bundle/English.lproj/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/darwin/bundle/English.lproj/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-EnglishlprojDATA: $(Englishlproj_DATA) + @$(NORMAL_INSTALL) + test -z "$(Englishlprojdir)" || $(MKDIR_P) "$(DESTDIR)$(Englishlprojdir)" + @list='$(Englishlproj_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(EnglishlprojDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Englishlprojdir)/$$f'"; \ + $(EnglishlprojDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Englishlprojdir)/$$f"; \ + done + +uninstall-EnglishlprojDATA: + @$(NORMAL_UNINSTALL) + @list='$(Englishlproj_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(Englishlprojdir)/$$f'"; \ + rm -f "$(DESTDIR)$(Englishlprojdir)/$$f"; \ + done +install-EnglishlprojnibDATA: $(Englishlprojnib_DATA) + @$(NORMAL_INSTALL) + test -z "$(Englishlprojnibdir)" || $(MKDIR_P) "$(DESTDIR)$(Englishlprojnibdir)" + @list='$(Englishlprojnib_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(EnglishlprojnibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Englishlprojnibdir)/$$f'"; \ + $(EnglishlprojnibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Englishlprojnibdir)/$$f"; \ + done + +uninstall-EnglishlprojnibDATA: + @$(NORMAL_UNINSTALL) + @list='$(Englishlprojnib_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(Englishlprojnibdir)/$$f'"; \ + rm -f "$(DESTDIR)$(Englishlprojnibdir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(Englishlprojdir)" "$(DESTDIR)$(Englishlprojnibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-EnglishlprojDATA install-EnglishlprojnibDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-EnglishlprojDATA uninstall-EnglishlprojnibDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install \ + install-EnglishlprojDATA install-EnglishlprojnibDATA \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-EnglishlprojDATA \ + uninstall-EnglishlprojnibDATA uninstall-am + + +.pre: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ + +.man.pre.man: + $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ + +InfoPlist.strings: InfoPlist.strings.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp b/xorg-server-1.4/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp new file mode 100644 index 0000000..5996285 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp @@ -0,0 +1,96 @@ + + + + +XDarwin Help + + +
+

XDarwin X Server for Mac OS X

+ X_VENDOR_NAME X_VERSION
+ Release Date: X_REL_DATE +
+

Contents

+
    +
  1. Important Notice
  2. +
  3. Usage
  4. +
  5. Setting Your Path
  6. +
  7. User Preferences
  8. +
  9. License
  10. +
+
+

Important Notice

+
+
+#if X_PRE_RELEASE +This is a pre-release version of XDarwin, and is not supported in any way. Bugs may be reported and patches may be submitted to the XonX project page at SourceForge. Before reporting bugs in pre-release versions, please check the latest version from XonX or the X_VENDOR_LINK. +#else +If the server is older than 6-12 months, or if your hardware is newer than the above date, look for a newer version before reporting problems. Bugs may be reported and patches may be submitted to the XonX project page at SourceForge. +#endif +
+
+This software is distributed under the terms of the MIT X11 / X Consortium License and is provided AS IS, with no warranty. Please read the License before using.
+ +

Usage

+

XDarwin is a freely redistributable open-source X server for the X Window System. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin runs on Mac OS X in full screen or rootless modes.

+

In full screen mode, when the X window system is active, it takes over the entire screen. You can switch back to the Mac OS X desktop by holding down Command-Option-A. This key combination can be changed in the user preferences. From the Mac OS X desktop, click on the XDarwin icon in the Dock to switch back to the X window system. (You can change this behavior in the user preferences so that you must click the XDarwin icon in the floating switch window instead.)

+

In rootless mode, the X window system and Aqua share your display. The root window of the X11 display is the size of the screen and contains all the other windows. The X11 root window is not displayed in rootless mode as Aqua handles the desktop background.

+

Multi-Button Mouse Emulation

+

Many X11 applications rely on the use of a 3-button mouse. You can emulate a 3-button mouse with a single button by holding down various modifier keys while you click the mouse button. This is controlled by settings in the "Multi-Button Mouse Emulation" section of the "General" preferences. By default, emulation is on and holding down the command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the option key and clicking will simulate the third button. You can change to any combination of modifiers to emulate buttons two and three in the preferences. Note, even if the modifiers keys are mapped to some other key with xmodmap, you still must use the actual keys specified in the preferences for multi-button mouse emulation.

+ +

Setting Your Path

+

Your path is the list of directories to be searched for executable commands. The X11 commands are located in /usr/X11R6/bin, which needs to be added to your path. XDarwin does this for you by default and can also add additional directories where you have installed command line applications.

+

More experienced users will have already set their path correctly using the initialization files for their shell. In this case, you can inform XDarwin not to modify your path in the preferences. XDarwin launches the initial X11 clients in the user's default login shell. (An alternate shell can also be specified in the preferences.) The way to set the path depends on the shell you are using. This is described in the man page documentation for the shell.

+

In addition you may also want to add the X11 man pages to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in /usr/X11R6/man and the MANPATH environment variable contains the list of directories to search.

+ +

User Preferences

+

A number of options may be set from the user preferences, accessible from the "Preferences..." menu item in the "XDarwin" menu. The options listed as start up options will not take effect until you have restarted XDarwin. All other options take effect immediately. The various options are described below:

+

General

+
    +
  • Use System beep for X11: When enabled the standard Mac OS X alert sound is used as the X11 bell. When disabled (default) a simple tone is used.
  • +
  • Allow X11 to change mouse acceleration: In a standard X window system implementation, the window manager can change the mouse acceleration. This can lead to confusion as the mouse acceleration may be set to different values by the Mac OS X System Preferences and the X window manager. By default, X11 is not allowed to change the mouse acceleration to avoid this problem.
  • +
  • Multi-Button Mouse Emulation: This is described above under Usage. When emulation is enabled the selected modifiers must be held down when the mouse button is pushed to emulate the second or third mouse buttons.
  • +
+

Start Up

+
    +
  • Default Mode: If the user does not indicate whether to run in full screen or rootless mode, the mode specified here will be used.
  • +
  • Show mode pick panel on startup: By default, a panel is displayed when XDarwin is started to allow the user to choose between full screen or rootless mode. If this option is turned off, the default mode will be started automatically.
  • +
  • X11 Display number: X11 allows there to be multiple displays managed by separate X servers on a single computer. The user may specify an integer display number for XDarwin to use if more than one X server is going to be run simultaneously.
  • +
  • Allow Xinerama multiple monitor support: XDarwin supports multiple monitors with Xinerama, which treats all monitors as being part of one large rectangular screen. You can disable Xinerama with this option, but currently XDarwin does not handle multiple monitors correctly without it. If you only have a single monitor, Xinerama is automatically disabled.
  • +
  • Keymapping File: A keymapping file is read at startup and translated to an X11 keymap. Keymapping files, available for a wide variety of languages, are found in /System/Library/Keyboards.
  • +
  • Starting First X11 Clients: When XDarwin is started from the Finder, it will run xinit to launch the X window manager and other X clients. (See "man xinit" for more information.) Before XDarwin runs xinit it will add the specified directories to the user's path. By default only /usr/X11R6/bin is added. Additional directories may added, separated by a colon. The X clients are started in the user's default login shell so that the user's shell initialization files are read. If desired, an alternate shell may be specified.
  • +
+

Full Screen

+
    +
  • Key combination button: Click this button and then press any number of modifiers followed by a standard key to change the key combination to switch between Aqua and X11.
  • +
  • Click on icon in Dock switches to X11: Enable this to activate switching to X11 by clicking on the XDarwin icon in the Dock. On some versions of Mac OS X, switching by clicking in the Dock can cause the cursor to disappear on returning to Aqua.
  • +
  • Show help on startup: This will show an introductory splash screen when XDarwin is started in full screen mode.
  • +
  • Color bit depth: In full screen mode, the X11 display can use a different color bit depth than is used by Aqua. If "Current" is specified, the depth used by Aqua when XDarwin starts will be used. Otherwise 8, 15, or 24 bits may be specified.
  • +
+ +

License

+The main license for XDarwin is based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code. +

X Consortium License

+

Copyright (C) 1996 X Consortium

+

Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without +limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to +whom the Software is furnished to do so, subject to the following conditions:

+

The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software.

+

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE.

+

Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization from +the X Consortium.

+

X Window System is a trademark of X Consortium, Inc.

+ + diff --git a/xorg-server-1.4/hw/darwin/bundle/French.lproj/Credits.rtf b/xorg-server-1.4/hw/darwin/bundle/French.lproj/Credits.rtf new file mode 100644 index 0000000..17e0a0d --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/French.lproj/Credits.rtf @@ -0,0 +1,166 @@ +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique; +} +{\colortbl;\red255\green255\blue255;} +\vieww5160\viewh4480\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Contributors to Xorg Foundation Release: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Kaleb KEITHLEY\ + +\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys. +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\f1\b \cf0 Contributors to XFree86 4.4: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Harper\ + +\f2\i Rootless acceleration and Apple-WM extension +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Additional XonX Contributors to XFree86 4.3: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Fabr\'92cio Luis de Castro\ + +\f2\i Portuguese localization +\f0\i0 \ +Michael Oland\ + +\f2\i New XDarwin icon +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 \ +Participants \'88 XonX pour XFree86 4.2 : +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Version pour Darwin x86 +\f0\i0 \ +Pablo Di Noto\ + +\f2\i Traduction en espagnol +\f0\i0 \ +Paul Edens\ + +\f2\i Traduction en allemand +\f0\i0 \ +Kyunghwan Kim\ + +\f2\i Traduction en cor\'8een +\f0\i0 \ +Mario Klebsch\ + +\f2\i Claviers non-US +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Direction du projet +\f0\i0 \ +Andreas Monitzer\ + +\f2\i Traduction en allemand +\f0\i0 \ +Patrik Montgomery\ + +\f2\i Traduction en su\'8edois +\f0\i0 \ +Greg Parker\ + +\f2\i Version \'c7 rootless \'c8 +\f0\i0 \ +Toshimitsu Tanaka\ + +\f2\i Traduction en japonais +\f0\i0 \ +Olivier Verdier\ + +\f2\i Traduction en fran\'8dais +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Remerciements : +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Devin Poolman et Zero G Software, Inc.\ + +\f2\i Installeur +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Participants \'88 XonX pour XFree86 4.2 : +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Version pour Darwin x86 +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Direction du projet +\f0\i0 \ +Andreas Monitzer\ + +\f2\i Version Cocoa de l'interface de XDarwin +\f0\i0 \ +Greg Parker\ + +\f2\i Impl\'8ementation initiale sur Quartz +\f0\i0 \ +Christoph Pfisterer\ + +\f2\i Librairies partag\'8ees dynamiquement +\f0\i0 \ +Toshimitsu Tanaka\ + +\f2\i Traduction en japonais +\f0\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Remerciements : +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Tiago Ribeiro\ + Ic\'99ne +\f2\i XDarwin +\f0\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Historique : +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Carmack\ + +\f2\i Premi\'8fre adaptation de XFree86 sur Mac OS X Server +\f0\i0 \ +Dave Zarzycki\ + +\f2\i Adaptation de Free86 4.0 pour Darwin 1.0 +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Int\'8egration dans le projet XFree86 pour la version 4.0.2} \ No newline at end of file diff --git a/xorg-server-1.4/hw/darwin/bundle/French.lproj/Localizable.strings b/xorg-server-1.4/hw/darwin/bundle/French.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..21c4a99c166c844ba08c7e1b29fb9985a8c3638e GIT binary patch literal 1492 zcwUuMT~pIQ6ur;>iVWiuBMn6dp^oFA!jp_RDDWE7v_zXGWH%Q0@xr-hH{B#tWSma- z<9?od?%n)-kXW`Qk`t*Vlcl6`joU&>oD%H0+(SNv><{)@3?wD&3?!w@uo|(D=a9`Q zZLm6zpK^!QB4UR96!B8*U*#O@75+2$X)KGg=AOz3r)?m5;ZePWokNz%f$Yl!vRg!n zrK0Z~Ya#_Q#;`O*=y1l!y23hzzQ#%M#X!_B&jL2F922wFXkb0U$wmDI-IpE%2|U$j zG^q9!vPCk6e2jfhcJUj-dskj#-IKRoI*~WnCy*YJkrFYqD&^-G6;-UYt-Y=OJMviO zZMjZ(tI1e}+Y-0M+HXs~p}w5jD|ROE@d4UM-s2yvEH#nO5Ud+YHG+D*>mka3*8Vph z>lq8vFvJ(JM+Zox?u!(|I#s%+gkG#`9;0vBFO$CME9hQl3Mpc_Mg~7YMdX^3+~h8y48ew@#c&ETb4Mf00eT=?4CuFTlWtdr>nDn0`Ho9sj86EeRf ze>uCg+5TUM3@6F@FIo4!cIz(Ci5+~4D(H9M9WV@aH-mg1*?G&}M(lF?Mpv9|*U4+v oF<)oyqjFURJZJnG7TzP5H2Q|2bpM+hwQ`2YX_ literal 0 HcwPel00001 diff --git a/xorg-server-1.4/hw/darwin/bundle/French.lproj/MainMenu.nib/classes.nib b/xorg-server-1.4/hw/darwin/bundle/French.lproj/MainMenu.nib/classes.nib new file mode 100644 index 0000000..77f345a --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/French.lproj/MainMenu.nib/classes.nib @@ -0,0 +1,72 @@ +{ + IBClasses = ( + { + ACTIONS = {showHelp = id; }; + CLASS = FirstResponder; + LANGUAGE = ObjC; + SUPERCLASS = NSObject; + }, + { + ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; + CLASS = Preferences; + LANGUAGE = ObjC; + OUTLETS = { + addToPathButton = id; + addToPathField = id; + button2ModifiersMatrix = id; + button3ModifiersMatrix = id; + depthButton = id; + displayField = id; + dockSwitchButton = id; + fakeButton = id; + keymapFileField = id; + modeMatrix = id; + modeWindowButton = id; + mouseAccelChangeButton = id; + startupHelpButton = id; + switchKeyButton = id; + systemBeepButton = id; + useDefaultShellMatrix = id; + useOtherShellField = id; + useXineramaButton = id; + window = id; + }; + SUPERCLASS = NSObject; + }, + { + CLASS = XApplication; + LANGUAGE = ObjC; + OUTLETS = {preferences = id; xserver = id; }; + SUPERCLASS = NSApplication; + }, + { + ACTIONS = { + bringAllToFront = id; + closeHelpAndShow = id; + itemSelected = id; + nextWindow = id; + previousWindow = id; + showAction = id; + showSwitchPanel = id; + startFullScreen = id; + startRootless = id; + }; + CLASS = XServer; + LANGUAGE = ObjC; + OUTLETS = { + dockMenu = NSMenu; + helpWindow = NSWindow; + modeWindow = NSWindow; + startFullScreenButton = NSButton; + startRootlessButton = NSButton; + startupHelpButton = NSButton; + startupModeButton = NSButton; + switchWindow = NSPanel; + windowMenu = NSMenu; + windowSeparator = NSMenuItem; + }; + SUPERCLASS = NSObject; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/xorg-server-1.4/hw/darwin/bundle/French.lproj/MainMenu.nib/objects.nib b/xorg-server-1.4/hw/darwin/bundle/French.lproj/MainMenu.nib/objects.nib new file mode 100644 index 0000000000000000000000000000000000000000..109d5cc6fb00f79c5559401c10bae587688f22b9 GIT binary patch literal 21114 zcwX&%dwdi{ws2Kmgd~I{Bp?rE#48a+NCG}C#N`n{_>d3?BFJ+x(}9M`%xupLfxTX_ z!pwZ@>h9_gdI`7&6_mh@Twl1W3nD?qx8mCtf9~a>tGj@*t{5Kkom164(>*f*y?gH; z-|y!@P4`rtI(6#Qc~*BNBiFymD>;3BMY1=r^e=*RY%mziudbaketO+9$>E=1_uCoy zEEvqLt`#*T6cHd*0iWN~AS#D62h+x4R{*Q^E3$hDZ4T0_^5%^5dR?-^?w398a3~z4 z@@f^J3aV>wk=;&D<1DGc>$3YLMo%>dd&qJ<&Xywt+MZBlN7Uofh!h>s*pf&ieHkvt^05WmVVW z?T}zFx4L$w=HcM=`bSJuM>I}R?5jvH*sZ!&+%~s#i-;+Y5BU8a zH?(yJws_or#p4>XDbm_PT0`(*bX#uyrG(U98flG$@Lw=Pb~wfo3O#~(M)xYo3( zk8>cu@OL4n7VpLZhh@1bgPtQz*#vlzfrR3;XL>w-m*n&5Q=0_imo&HhOE7cZh-)1S zvH-RplygyX6A2Ipk%^Po$&EyTZ#UdafQ#1m2vP@Wr|qOYBOD6BP@@P^x+U1%=aa>X zFtWcdZ3;Jyjl!rTydxBRv}FK{QgOW)rC5wI88EuY3i$TJSPo+Uj~?v;GXV(*BgcU4 zv!s>&NwVZ}_I)JAr$R>VVf4%dLh#$*)n>t_o~Ay?kDqPZ+LUqWIogyrmXJ1}h>?H9 zWy2Rx4AB^B3%G4QNm(IbolS^{t#*~qFE!Y_9;lpVci5)a+U5*1y4WP2-&PMzZrSFw zL$6`el_j=Go`BoQCD|tVIfzpR#gXd*9c?zBC*ZSzq)ToGNM^t`ZOSa$obqzpa2OIK z!sk)^a-d@#e%U4aI5ES*?V-@4e6=16raQ)tMQ(LNIdpkIsN1uG=|WJl#GFx8@*F})IZQbC zbbER*t-gNEm@Bt!r(yh^_0%5#tUw1t#>YW-5`YPV5Ytg1Sk8xI>sM65Xi*WaUQv-{ z_1d;J1wn54GF?8)6Ice5_Su|LgB=ym=8|j;9w)G^)DGJ3SZZG)#pkqp2g+Sq)8xt- z(H+72LGXnA5Y`8@7jQYGAu%=w&DwZ?ENj(wiezI4+%! z$HlP{#BdN7#zB_pJeeeUci&VBk|!%3w_9qEV101uy;8t$^XYSfX-aM}O|MG=5$kAk zz#7{;fmr?C?Rz&Vx-Q%HKFehoSW_1O+Z+IHndG!;sYmw7an5yY(j@|h85QT<%TJJ< z&%#PQ9kNcW{sI%r)+e^A2Gzss0?~Gs%I{LVelnCs6ZyHE8Kt=nv#j@+!sBOWUHAl2~-;Npw44goHq1+ zVQjvnTADMrnTh zlIzxNnCx)-K)QiV>9QdBVd3-l`Js5TYr*e< zyA&eB9B%`qwIj<|xNTgZ-uUlbg}Z@FXm?I6q0=ore+jcX#hW3X4bWWFqh zj{<%J5j>g_WGEQ3IIINvJpot`Uyg899c_~6z+)o?gQj?tW^!WrW(N>wR1u^77@fhx zjTuF$7{w{A7;pDE0xtAZJY4|44F1-E*fzoASRNm`Fe&!f`yw(e z3+-CYrHt-o^gbj2uQ9tOR+UCF5vrJxUopClku?a1SA*1GxB7ZWa~uvL_-jzyeL_bY zm>C5G7Xs{m+5STU_*jUIlnL5HPmov~*UJw9+<3cV`4Rs? zdK%LfigEkm9gN;Hl{RHr{m74J0(4SAwRLNjGu;nH0OJL2&oUyHquvkZI!v!mHjIUf zyf_P_H*OmT>gGapODn%7so$%~P!%J)go0R87-$$G09=vGkkkx`PJ67}bOTI&FcAuC ztVC`FBO3}aG}usRSqoj9V(QwbM)A~Rk{eLCq40o01T2wanN`V*5%Oj*TFq6gy2vtu zIijx^XGFNJQoHQrdXyaKVhAe)+Y;W7NK&!Ti=l*R<}>QeMXI>gypih4I1FgK+|q;)EbOfa>@r#jqctbh&YP(`R#CoQp{xz z^+d9C^N^+f<%s(2$(V$K5KNNX9oxXS#e$VeE*!-(JKCH9J^!nZ!GPE{oX>NL&Y4v% zk5521UKl##R*$FQypFQ+LXI+ys~W5g4xE1czBLyfI=e=ZR>+V(>s^|<>@qsuX`sQf zt{mV0%v1*OKth4Y-3{W+MM!FpCCrKb$uV%U`HPGlD?O;XK%YwW`y(c?$>5#1tGPM6 z<3gQht75Ban%%F+D}VL~1|Y$15fPPiudbbCuR|M|VUA4F(H1OjY03k{dZG}_n+37S zEL&u;)f&Y1rBD&mrcaG)c%3Ek0CDVLgdT~w%YF#%ZsXi;^yl#b>Jta(uMeEh9Bg%QKThTObQ|$_xuX>1u z&Gy@Gw%@nLP&0BTqmUjQKpPI<<^e*%qRSv1lt+yk72kE;MhH!Vj*E(l)0!q+0inr5 zEol*px$hziY~-szxFP3u{NF;smoSq9md&&~Wse98(DOws5n6oz5^+%-7eoRAS7?XW z&f)wNPX}#A~uP}%l-ztmv@~hc?)?C8T-}T!ZHs8yUi;f z`LAV;1=FUHD+$TGi2Uz-s9ubFSP)`^aw(J&DCsHS5pEiEm)Kx!AQtE-Ea zmzRGCFpB^-GX)+_FVHZ0>eQ+4u3o)5`tZXKpYG`BIQ#b7Z=ZYTop+)yz4X%A#~yp^ zG~xr8!+@*C+}F4Qy@i#Pm5(5f2OfCf^zPleqp!X8S`_d^-+lMp=z#+V5La}|mMy1m zyY03p!0t&)OS?qJf%8QANVjg?e&+Fbj&9tzG5YAEkDmS0pZ*lxvu6)4&p-cs^ttDr zi$448vr(Yw+=dMsqKcw?12oOn@nj$hyvfhcU##Oey=&L5D9kCkZ{I$CMLc`=?&Vi( zYj1Bqy?*`rX#f8G@6hoeEf_q|l9CeT$tRzT!hAY$J~$8L%X{y=7n|3cZ@w9Q{q@(Q zKx^j{PdpJVEiG*}%?V3(uU@^}Pe1)M!kzu_!w=7W_St9AKmYm9(Zh!i^K$6Wq3EZd zej5GgqmQDmyzdrbU-5S@K3kM#c>23pS3gIm%Kll%WL$ z1$W$i_uc<>?AWpB>C>mr!6%C4?Af#Y{?w^coVNS#zyHg=ef$0v`iwvtbXurBKMd5S zU3Ae!Eg;7SVII7%`GYjBUAy-1ph1JS0PM{~=w3Hs)k&lYYyg>?m6i4D(W6H{w{qpm zk3p`#+P;1JUqL=Uoj7sgzMPz#bpW#%%5W1c#s~4F>-C5W=k0@XClp*;?0YwqMkup& z90erK7xTx!l>_BsC?lav2L8{2f^(P(feJJ zn2S(bP4{X19wa048Je!w12E0f?}0D0kV_6?&88)KJ=D-XMtx=h?Ppk+%)PXK?EV!x zz=ZP(6V93Odj84Q|K*&ygOJh!;|hL;Kdm6(7sIzfK(MoayT$Wla=#RJVIjlqT#s%i z1YNkdT*X5b!=)B6x`@#MJSiGrai|tAS&CcqD`TmU>Cr}4nGhqtH0MG)VtJ4$P8h>T z2T%Aql4Aw){>;GYKm&vz9?Q5_OptvLx2_su4jdS{%leQY9y)x)=na#5gUIzx9IN@~ zFjj^>7A-Sl`^^)yZ*1S8yFd2eXjeFSh{9r1Vt2mK=YJ-#8x^N=ZR$A#hcg_&U&r|) zvBF8fQOp7yF8d1E`pAV5H8t*HMvgK%vNuk5WNMCb{5wpjT7a31+#Ao!V~ay)FmiCw zAVL-mN)$oM9%1eTh!thGtl*xq3G>FT_v|q%P>kRhLRLmLnf56edC=G!P#7J>)nHT+ zRwq-zDJUDa400&_Ig!%Q=9Lt`N5-c@PV@5kY**Bbn>9H>HaDl%h&T}gXER#Qd0O8) zfru`-`iPaQx0>g4C8O62Ms(Kg0*JI;VjtlrbieSDSMuR)Pp}f?t00nbox1`t`>^8pp74XRt zKIm@nxMf^vpLwZwCX4oYca>r6ocLVhsbwfTDJSD?VOKkN>sX%4Q~3q)xvpfin9sGi zD6*i7xn60OvpU&}8Vi}XU*d01bZl*qVw>vbneFOg*W5}#9iyW;0i(Mnpe)X8+_>-9 zWPZ4?0(k242}5tk_b&j@OvdvT1`87Ar)2R$oyCUHo2PHwtBk6Q>_IrZ8e}Gl;E;|x z8}MJ&zC=NsXWn~ zbK??!7*k<2rTeWr1jaylc?;_ZSy*Qt1Z-V2nu)eG%i#3u(9!CSuSy07@Bz&*c{?M1<9uCOrHe+J;|w<&_`J zm@y-|bm`Kw4Gj%ZEX$THi^{SbUA}xd{|)!&Zn@=_D5Th5K>Bl|jw6<4LW*HWI7l=9 z{_@K&cS3rHX<{d&aGkHd`fBGJZ@j_l@E%}JLb@7-)HH0Og{Lo2=ZCZoQ@>M~wteuy z2T{Df|Ni^@9#b$(4e=hvIkjoiCQMgVogat;!+uONZ-3~ahoX>bc4De*q`H_s8^4V- z8e!Vn+Az($pNO<6OE0;_#l>v%=FOO9cmDB@f8=R0rs8;y1@E7E<{4ffJ?@0mDmr-Z z;7vrNOffu=dN#qlv47_aFTB9F0QT?SA2r|O6@LSbotPpI88YO7L_B@^^l8Ge0Jih3 zx8CC03P!;c+_++D4mkPTue$20Bs`E_HX$znM<=GfpM3HO=Ph2%_XiIiM4X*S+tpWJ zorDL{*e0YM;5#vWKYH|NtQ8?@mH^QJi3?Du`B_3=$e*E|;NaN388s1fbaZceJ%gf8ncz8-#Qd05@+|B?TXA;wI z^9S1i*BQi9T3Y%$BGO;PgYwujGc$8O=*=6gt*ytlZryqegX|J?3;e z--ndkO~m_$v26+{qoJ&X@_Q%`L)qFz!M0W?tD#IFVr$OWqC&cGt7$yw{ah$^D0N*F zY?}wLsOy(O=}xTM3#en zcvANuG?fQomi9xtWliS^B=3~|Lp!BS5*;$S?hxL&Gh~gcYnRIP ze%>w0eQK&vM8px9Yj*mKy#3F+{Sj8TuUQ}L#@s$+>W~HU#{wIREJK-{d~Z{i2uL<3a^p*@jy$=_rQNE`e5XZ7y)yC3OIfWIDQH^ehN5#3OIfW zIL;SvfU}838FLdn^5I0#cVm&o1wd296&LPei7HZo|LBow7g0d$j@>M`PsgFh;iM z_3b{g6rU6P;(YG{aWD)DXLhvVTl})ZUtPNOLVYg$CXazRtI8AbN&@Z53!&9JcxAnV z;|F$dx%3Vzen^LI6YJ~kjtjh@YycPWcaeM@Z7zwwmgv?;vUfF-IM1T5+YPA~tJ1Qv z8RKN9biQS!J;YN1=tA?wThQb98-J4JE$A`lBMBjL7vYOYy3B>wsWp}A5k|fSacxml ziemd41-{P0+~IN(=u`8v)v`?Zu?ZVg{Q3eU`|(J^d(@1U#GaA#gednO8-}>|*s#GG z5_~I8LGZw?%*eZu_ag6~@6gGIVMdx6*(Q#Y5aU>hmEez!lO!78 zeU69&BgV^A?Tn7ch#s$^PduW>BU5+PW9wb@2{@AuP0^vL4o$7F<94~n>v6@h4&2io zX5&YZ6lsOzmX(B~QO3Ebp|*NEzAb6whgS>BeDw_56;+(ssozKE=kOYMK844JgbcX& zvjp>@j3HJM3`rR(UM4r*g*Vb&{t#7ea=TO9#9L~~K07)=-I z^*vt3SE@mkpP`$B2R*>Hgg`GD`2dn$)wK|y``}nJD%F!m)aVg)ORIWurn)$|VPkq) z-azqcU6c0;enz*4bGVB`6ij#gwukW2?6p}>%ZYF0K}_s@f`T?^C&F7+F< zET7MXubqktq<4b^_4kZ=g)kdOjEjx6(;uqb$sejPIwVFr43I!QBACO^EiIK?UemcH zuxiNcoNP62sHm_UWrpSG&6O~$D}&Q6vMeG2I46^+{uCPGl5sX*yBH8HJSaLziN{CiawB*;9E_M1TWJfFl~L z2+b2RSORuHt*(SSg6p^&W%w>dUDXKJjf#34R*V*avw=&0T-P@dU^B`$BWJKjC$8yx zC<;Rct5Yl0+Z)x%fR4O6PX%L?3wIBK(@<}$RIeJWi+FAgNSLHcCyIG3cKCFj`Z6G= z*RE6R7sKzz`5-hK2Wf3l`Dr|qw+fgZ{Q6Fa-SZ37`3uxBh~Ov+);kE)sHlFBP+Gc9 zty`>~MG7B9MZ9`2+_ee3`M`n}36&8jG97J02K`c0i8m&%DaWd{P?cvo0)1T=aftUy z)$4-%HOp8d_%F2vCmKh~k+dWr!AjZ(rPde>YKA0roR3<`&n+R6?{Lr&VRg5;9}rQN zjJy@9^uzXHbuhy710pxcK7Uw!Edd@-j7en0DghHeQGx_KDrOt6 z!pzYMKJN-)m-N?CQQQ(Mo;T0%nlM;9({w7u4<5mwEaE`d;N5SM=e5Ax5iAq@%(uKq zT!GcQ%)i}gQI`LAUZF(byd+M8FZDJ>2!|Dm~;<0*lk`&S66st|%OJoxt`t4MF z{yY^&>9s-h5jLUn>dVPvTr9eojsk_%94l)x&HPv>rmb@$th$o814the6OWA(R=F(K z`t6EeKhhsoZ%;w+T!CG@^$v5bH!~Te*em*&MhmO+EXzeptgH8W&?@({ac+2SOcw=O zz=JgP5M0vAIn%#PBn$?=JZMp~5!kads2iu)l)xAUlXW{QXi`Wzno%@AI}^lbhIIg3 zXF3$?CWD8H4?xSz)2lNhfsv}MNJb(>M^g#Qr@AN)1OQOML~=Oed>+Y#o|2rAaNad z?WUy#qfZ_{p&Lw9`7nsWja=7@uTvl+H9=N@ky8&k8`<9Em<7i;gal1yq0{& zQ3pT+OqJjBN<}hP(gLjP?px|*GpbvIJn52>h`*LZjv}&B&IXyPzQAS^G zfDkOJQP`9?&e14LUQ@6Y>vFlUML8HP-(u>v`Kfx*4c5%#i?gOq)aLo@E2Jv^4v=q@ z1sm#2p%2|bz>7e8*qwY3M3Qzx7C&g1T zL{P|ig|mhgss;K@I7$WMl2#m7joZkccBgZer^fDIYR0YupvlaS0SJ>}Zbuu?yH41t z*b_FL*ntFQmW3UO$)rJuPy%tMp^)EB@_B#A4XW$WLc?|O$j)Ynmc`leXR%W!# zrh&RLx)3fq8Ew=U{RC13t&)*X;C?70|EVcpM&bTNMq1(WDMY>+X3unm#{Vu$9}V}D zs83^Q*^J%|mCu4kXbTw~09D0|{vH6nzFxbLk*~C?7@e+xEKJaVhJQcmc7>@i8 zMw!Otc%wFt(FJh-4Wp~!@?VVh)oK}yX#9`GJOmwq4hQ@i1pZ4q#7GdJ${0BUmya3k zrA=gX9o+9gBJ-ALnT*~Hch50$ulAQw8lL7PpJ}+yKpxi$8J(nkd%HG*(OT_$M()&J zW~38ZI~iRALw)bp_~zKha7oYB@K14&!y1}@a*tNe$Ubd6qs>t979%ggQ%gBhKop~E6ap*QgOH_&{DQ72UXozXks zvWt=5LglfG;p;nGFdK-9c7hR{<(G`g0Q1N|_&UXC6I9&=Q`Kr1ISBX9GkU9r8-KJ; zJMymp^97^7fD3f{H@G}>iMEQ-k#M({5m+YFYq#cN^b&18qjn9w64?RuEsQp3{LsT9 zsC=K1GRwf<_rZI*&2>@7l?K*Kps2F4vATdY2YuiI&gkMC~9W=b-joNMW@yM*k1o7kISC zfECbn6QcoO$N)wk)clN=L*s{x7HRx-Uzdg+ldRQnw~0KVUB~Dg08V4{|7vxNYyhaW zjNSlM1&rPczkoOO0Gx#!dz;bu(2~LEop8xx6qn%J9vTD>GXbU;5`U-%3h#kS5u-Q? zaA%eFCL^acP^n9`vy6aVk1hm!=1oHw)^1$>=q3+0W=w zfZl$ob~~dZpkf!Jb2TtpD%9>{B2 literal 0 HcwPel00001 diff --git a/xorg-server-1.4/hw/darwin/bundle/French.lproj/Makefile.am b/xorg-server-1.4/hw/darwin/bundle/French.lproj/Makefile.am new file mode 100644 index 0000000..656ba5c --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/French.lproj/Makefile.am @@ -0,0 +1,38 @@ +BINDIR = ${bindir} +include $(top_srcdir)/cpprules.in +XINITDIR = $(libdir)/X11/xinit + +XDEFS = \ + -DX_VERSION="$(PLIST_VERSION_STRING)" \ + -DX_PRE_RELEASE="$(PRE)" \ + -DX_REL_DATE="$(XORG_DATE)" \ + -DX_VENDOR_NAME="$(VENDOR_STRING)" \ + -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" + + +resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources + +Frenchlprojdir = $(resourcesdir)/French.lproj + +Frenchlproj_DATA = \ + XDarwinHelp.html \ + InfoPlist.strings \ + Credits.rtf Localizable.strings + +Frenchlprojnibdir = $(Frenchlprojdir)/MainMenu.nib +Frenchlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib + +InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ + +CLEANFILES = XDarwinHelp.html InfoPlist.strings + +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp diff --git a/xorg-server-1.4/hw/darwin/bundle/French.lproj/Makefile.in b/xorg-server-1.4/hw/darwin/bundle/French.lproj/Makefile.in new file mode 100644 index 0000000..8743c0d --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/French.lproj/Makefile.in @@ -0,0 +1,639 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*- Makefile -*- +# Rules for generating files using the C pre-processor +# (Replaces CppFileTarget from Imake) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/cpprules.in +subdir = hw/darwin/bundle/French.lproj +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(Frenchlprojdir)" \ + "$(DESTDIR)$(Frenchlprojnibdir)" +FrenchlprojDATA_INSTALL = $(INSTALL_DATA) +FrenchlprojnibDATA_INSTALL = $(INSTALL_DATA) +DATA = $(Frenchlproj_DATA) $(Frenchlprojnib_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +BINDIR = ${bindir} +SED = sed +SUFFIXES = .pre .man .man.pre + +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e '/\@\@$$/s/\@\@$$/\\/' + + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ +XORGMANNAME = X Version 11 +XSERVERNAME = Xorg +MANDEFS = \ + -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__appmansuffix__=$(APP_MAN_SUFFIX) \ + -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ + -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ + -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ + -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ + -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ + -D__mandir__=$(mandir) \ + -D__projectroot__=$(prefix) \ + -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ + -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) + +XINITDIR = $(libdir)/X11/xinit +XDEFS = \ + -DX_VERSION="$(PLIST_VERSION_STRING)" \ + -DX_PRE_RELEASE="$(PRE)" \ + -DX_REL_DATE="$(XORG_DATE)" \ + -DX_VENDOR_NAME="$(VENDOR_STRING)" \ + -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" + +resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources +Frenchlprojdir = $(resourcesdir)/French.lproj +Frenchlproj_DATA = \ + XDarwinHelp.html \ + InfoPlist.strings \ + Credits.rtf Localizable.strings + +Frenchlprojnibdir = $(Frenchlprojdir)/MainMenu.nib +Frenchlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib +CLEANFILES = XDarwinHelp.html InfoPlist.strings +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp + +all: all-am + +.SUFFIXES: +.SUFFIXES: .pre .man .man.pre +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/darwin/bundle/French.lproj/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/darwin/bundle/French.lproj/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-FrenchlprojDATA: $(Frenchlproj_DATA) + @$(NORMAL_INSTALL) + test -z "$(Frenchlprojdir)" || $(MKDIR_P) "$(DESTDIR)$(Frenchlprojdir)" + @list='$(Frenchlproj_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(FrenchlprojDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Frenchlprojdir)/$$f'"; \ + $(FrenchlprojDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Frenchlprojdir)/$$f"; \ + done + +uninstall-FrenchlprojDATA: + @$(NORMAL_UNINSTALL) + @list='$(Frenchlproj_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(Frenchlprojdir)/$$f'"; \ + rm -f "$(DESTDIR)$(Frenchlprojdir)/$$f"; \ + done +install-FrenchlprojnibDATA: $(Frenchlprojnib_DATA) + @$(NORMAL_INSTALL) + test -z "$(Frenchlprojnibdir)" || $(MKDIR_P) "$(DESTDIR)$(Frenchlprojnibdir)" + @list='$(Frenchlprojnib_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(FrenchlprojnibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Frenchlprojnibdir)/$$f'"; \ + $(FrenchlprojnibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Frenchlprojnibdir)/$$f"; \ + done + +uninstall-FrenchlprojnibDATA: + @$(NORMAL_UNINSTALL) + @list='$(Frenchlprojnib_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(Frenchlprojnibdir)/$$f'"; \ + rm -f "$(DESTDIR)$(Frenchlprojnibdir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(Frenchlprojdir)" "$(DESTDIR)$(Frenchlprojnibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-FrenchlprojDATA install-FrenchlprojnibDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-FrenchlprojDATA uninstall-FrenchlprojnibDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install \ + install-FrenchlprojDATA install-FrenchlprojnibDATA install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall \ + uninstall-FrenchlprojDATA uninstall-FrenchlprojnibDATA \ + uninstall-am + + +.pre: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ + +.man.pre.man: + $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ + +InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp b/xorg-server-1.4/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp new file mode 100644 index 0000000..2a14793 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp @@ -0,0 +1,101 @@ + + + + +XDarwin Help + + +
+

XDarwin X Server pour Mac OS X

+ X_VENDOR_NAME X_VERSION
+ Date : X_REL_DATE +
+

Sommaire

+
    +
  1. Avertissement
  2. +
  3. Utilisation
  4. +
  5. Chemins d'accès
  6. +
  7. Préférences
  8. +
  9. Licence
  10. +
+
+

Avertissement

+
+
+#if PRE_RELEASE +Ceci est une pré-version de XDarwin et ne fait par conséquent l'objet d'aucun support client. Les bogues peuvent être signalés et des patches peuvent être soumis sur la +page du projet XonX chez SourceForge. Veuillez prendre connaissance de la dernière version sur XonX ou le X_VENDOR_LINK avant de signaler un bogue d'une pré-version. +#else +Si le serveur date de plus de 6-12 mois ou si votre matériel est plus récent que la date indiquée ci-dessus, veuillez vous procurer une version plus récente avant de signaler toute anomalie. Les bogues peuvent être signalés et des patches peuvent être soumis sur la page du projet XonX chez SourceForge. +#endif +
+
+Ce logiciel est distribué sous la +Licence du Consortium X/X11 du MIT et est fourni TEL QUEL, sans garanties. Veuillez prendre connaissance de la Licence avant toute utilisation.
+ +

Utilisation

+

XDarwin est une X server libre et distribuable sans contrainte du X Window System. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin fonctionne sous Mac OS X en mode « rootless » ou plein écran.

+

Lorsque le système X window est actif en mode plein écran, il prend en charge la totalité de l'écran. Il est possible de revenir sur le bureau de Mac OS X en appuyant sur Commande-Option-A. Cette combinaison de touches peut être modifiée dans les préférences. Pour revenir dans X window, cliquer sur l'icône de XDarwin dans le Dock de Mac OS X. (Un réglage des préférences permet d'effectuer cette opération en cliquant dans une fenêtre flottante au lieu de l'icône du Dock)

+

En mode « rootless », X window system et Aqua utilisent le même affichage. La fenêtre-mère de l'affichage X11 est de la taille de l'écran et contient toutes les autre fenêtres. En mode « rootless » cette fenêtre-mère n'est pas affichée car Aqua gère le fond d'écran.

+

Émulation de souris à plusieurs boutons

+

Le fonctionnement de la plupart des applications X11 repose sur l'utilisation d'une souris à 3 boutons. Il est possible d'émuler une souris à 3 boutons avec un seul bouton en appuyant sur des touches de modification. Ceci est réglé dans la section "Émulation de souris à plusieurs boutons" de l'onglet "Général" des préférences. L'émulation est activée par défaut. Dans ce cas, cliquer en appuyant simultanément sur la touche "commande" simulera le bouton du milieu. Cliquer en appuyant simultanément sur la touche "option" simulera le bouton de droite. Les préférences permettent de régler n'importe quelle combinaison de touches de modification pour émuler les boutons du milieu et de droite. Notez que même si les touches de modifications sont mises en correspondance avec d'autres touches par xmodmap, ce sont les touches originelles spécifiées dans les préférences qui assureront l'émulation d'une souris à plusieurs boutons. + +

Réglage du chemin d'accès

+

Le chemin d'accès est une liste de répertoires utilisés pour la recherche d'exécutables. Les commandes X11 sont situées dans /usr/X11R6/bin, qui doit être ajouté à votre chemin d'accès. XDarwin fait cela par défaut, et peut également ajouter d'autres répertoires dans lesquels vous auriez installé d'autre commandes unix.

+

Les utilisateurs plus expérimentés auront déjà réglé leur chemin d'accès correctement par le biais des fichiers d'initialisation de leur shell. Dans ce cas, il est possible de demander à XDarwin de ne pas modifier le chemin d'accès initial. XDarwin lance les premiers clients X11 dans le shell d'ouverture de session par défaut. (Un shell de remplacement peut être spécifié dans les préférences.) La façon de régler le chemin d'accès dépend du shell utilisé. Ceci est documenté dans les pages "man" du shell.

+

De plus, il est possible d'ajouter les pages "man" de X11 à la liste des pages recherchées pour la documentation "man". Les pages "man" X11 se trouvent dans /usr/X11R6/man et la variable d'environnement MANPATH contient la liste des répertoires dans lesquels chercher.

+ + +

Préférences

+

Un certain nombre d'options peuvent être réglées dans les préférences. On accède aux préférences en choisissant "Préférences..." dans le menu "XDarwin". Les options décrites comme options de démarrage ne prendront pas effet avant le redémarrage de XDarwin. Les autres options prennent immédiatement effet. Les différentes options sont détaillées ci-après :

+

Général

+
    +
  • Utiliser le bip d'alerte Système dans X11 : Cocher cette option pour que le son d'alerte standard de Mac OS X soit utilisé à la place du son d'alerte de X11. L'option n'est pas cochée ar défaut. Dans ce cas, un simple signal sonore est utilisé.
  • +
  • Autoriser X11 à changer la vitesse de la souris : Dans une implémentation classique du sytème X window, le gestionnaire de fenêtres peut modifier la vitesse de la souris. Cela peut s'avérer déroutant puisque le réglage de la vitesse de la souris peut être différent dans les préférences de Mac OS X et dans le gestionnaire X window. Par défaut, X11 n'est pas autorisé à changer la vitesse de la souris.
  • +
  • Émulation de souris à plusieurs boutons : Ceci est décrit ci-dessus à la rubrique Usage. Lorsque l'émulation est activée, il suffit d'appuyer simultanément sur les touches modificatrices sélectionnées et sur le bouton de la souris afin d'émuler les boutons du milieu et de droite.
  • +
+

Démarrage

+
    +
  • Mode par défaut : Le mode spécifié à cet endroit sera utilisé si l'utilisateur ne l'indique pas au démarrage.
  • +
  • Choix du mode d'affichage au démarrage Par défaut, une fenêtre de dialogue est affichée au démarrage de XDarwin pour permettre à l'utilisateur de choisir entre le mode plein écran et le mode « rootless ». Si cette option est désactivée, le mode par défaut sera automatiquement utilisé.
  • +
  • Numéro d'affichage (Display) X11 offre la possibilité de plusieurs serveurs X sur un ordinateur. L'utilisateur doit spécifier ici le numéro d'affichage utilisé par XDarwin dans le cas où plusieurs serveurs X seraient en service simultanément.
  • +
  • Autoriser la prise en charge Xinerama de plusieurs moniteurs : XDarwin peut être utilisé avec plusieurs moniteur avec Xinerama, qui considère les différents moniteurs comme des parties d'un écran rectugulaire plus grand. Cette option permet de désactiver Xinerama mais XDarwin ne prend alors pour l'instant pas correctement en charge l'affichage sur plusieurs écrans. Si il n'y a qu'un seul moniteur, Xinerama est automatiquement désactivé.
  • +
  • Fichier clavier : Un fichier de correspondance de clavier est lu au démarrage puis transformé en un fihcier de correspondance clavier pour X11. Les fichiers de correspondance clavier, disponibles pour de nombreuses langues, se trouvent dans /System/Library/Keyboards.
  • +
  • Démarrage des premiers clients X11 : Lorsque XDarwin est démarré à partir du Finder, il lance xinit qui lance à son tour le gestionnaire X window ainsi que d'autres clients X. (Voir "man xinit" pour plus d'informations.) Avant de lancer xinit, XDarwin ajoute les répertoires ainsi spécifiés au chemin d'accès de l'utilisateur. Par défaut, seul /usr/X11R6/bin est ajouté. Il est possible d'ajouter d'autres répertoires en les séparants à l'aide de deux points (:). Les clients X sont démarrés à partir du shell par défaut de l'utilisateur. Ainsi, le fichier d'initialisation de shell de l'utilisateur est lu. Un autre shell peut éventuellement être spécifié.
  • +
+

Plein écran

+
    +
  • Combinaison de touches : Appuyer sur ce bouton, puis appuyer sur une ou plusieurs touches modificatrices suivies d'une touche ordinaire. Cette combinaison de touche servira à commuter entre Aqua et X11.
  • +
  • Basculer dans X11 en cliquant sur l'icône du Dock : Cette option permet de passer dans X11 en cliquant dans l'icône de XDarwin dans le Dock. Sur certaines versions de Mac OS X, la commutation en utilisant le Dock peut faire disparaître le curseur lors du retour dans Aqua.
  • +
  • Afficher l'aide du mode plein écran au démarrage : Permet l'affichage d'une fenêtre d'introduction lorsque XDarwin est démarré en mode plein écran.
  • +
  • Profondeur de couleur : En mode plein écran, l'affichage X11 peut utiliser une autre profondeur de couleur que celle employée par Aqua. Si "Actuelle" est choisi, XDarwin utilisera la même profondeur de couleur qu'Aqua. Les autres choix sont 8 (256 couleurs), 15 (milliers de couleurs) et 24 bits (millions de couleurs).
  • +
+ +

Licence

+The main license for XDarwin is one based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code. +

X Consortium License

+

Copyright (C) 1996 X Consortium

+

Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without +limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to +whom the Software is furnished to do so, subject to the following conditions:

+

The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software.

+

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE.

+

Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization from +the X Consortium.

+

X Window System is a trademark of X Consortium, Inc.

+ + + diff --git a/xorg-server-1.4/hw/darwin/bundle/German.lproj/Credits.rtf b/xorg-server-1.4/hw/darwin/bundle/German.lproj/Credits.rtf new file mode 100644 index 0000000..34408e7 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/German.lproj/Credits.rtf @@ -0,0 +1,168 @@ +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique; +} +{\colortbl;\red255\green255\blue255;} +\vieww5160\viewh6300\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Contributors to Xorg Foundation Release: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Kaleb KEITHLEY\ + +\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys. +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\f1\b \cf0 Contributors to XFree86 4.4: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Harper\ + +\f2\i Rootless acceleration and Apple-WM extension +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Additional XonX Contributors to XFree86 4.3: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Fabr\'92cio Luis de Castro\ + +\f2\i Portuguese localization +\f0\i0 \ +Michael Oland\ + +\f2\i New XDarwin icon +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 XonX Contributors to XFree86 4.2: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f0\i0 \ +Pablo Di Noto\ + +\f2\i Spanish localization +\f0\i0 \ +Paul Edens\ + +\f2\i Dutch localization +\f0\i0 \ +Kyunghwan Kim\ + +\f2\i Korean localization +\f0\i0 \ +Mario Klebsch\ + +\f2\i Non-US keyboard support +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +Andreas Monitzer\ + +\f2\i German localization +\f0\i0 \ +Patrik Montgomery\ + +\f2\i Swedish localization +\f0\i0 \ +Greg Parker\ + +\f2\i Rootless support +\f0\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f0\i0 \ +Olivier Verdier\ + +\f2\i French localization +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Special Thanks: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Devin Poolman and Zero G Software, Inc.\ + +\f2\i Installer +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 XonX Team Members\ +Contributing to XFree86 4.1: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +Andreas Monitzer\ + +\f2\i Cocoa version of XDarwin front end +\f0\i0 \ +Greg Parker\ + +\f2\i Original Quartz implementation +\f0\i0 \ +Christoph Pfisterer\ + +\f2\i Dynamic shared libraries +\f0\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f0\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Special Thanks: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Tiago Ribeiro\ + +\f2\i XDarwin icon +\f0\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 History: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Carmack\ + +\f2\i Original XFree86 port to Mac OS X Server +\f0\i0 \ +Dave Zarzycki\ + +\f2\i XFree86 4.0 port to Darwin 1.0 +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file diff --git a/xorg-server-1.4/hw/darwin/bundle/German.lproj/Localizable.strings b/xorg-server-1.4/hw/darwin/bundle/German.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..5db6306ec3bd77993bc49f3b2fc37deff236e60f GIT binary patch literal 1458 zcwUv1U2l|75QgX4UqPB)HSW^2YD|qWtzS19YpQW?=`OUZOP2uaYJa?JY*b%kcGx@C(qrs@v4#9s2|@Wmk7s?HjpIN&@**W~<$<$b_EAQW?Kqv|S1BqNs&Gf9K^GEj>uJC_ z(z6=rj?-oK8wL&I8?fXf@rigetnSA*v9kbQZmAIVd+sMX?5bxHA_(JOsdtOPWcpg4 z=Y;uRXfGF<(=eCYn~caUQ4Y~}a~tfwo`S2JNv27ry=q@zeFC#F|8Og}=U9rf-zga-l_1_`eQ}f>h9~@wf%}zJ5kN9a)_#7IA6wO0%61I`YA`mvWhn?<9Ql^(!-JOJtGk8OF zkB<7@OoWyw6GVkUqC98x4I-#0E+e=NaW8dTaQVam9rzv)mU`#hTh(2?BE@!*vo^$TGb(4`BSkWlE`~g*Vcv$*Z8m-hctzcgDtf^Pk+$cK((;Wc^BOhy8 zzj@W7goN5flW9SJz~>Q#V^?cwmDm-URR>hXTSr%G^rv~tsu~;JiqjELeBN*K;nUiA`1ZXU~9EtLI@KCeqw$?A4(U3;j5 zXnB?JQ)~VRO6CRwjvBXIrK*k)priqlz1C;-v&tX|V(xBF-Oy~>Gv;Cm6L6Q8Ppb46*(pr=V&KSGF> zf%Iu>*A^@*E0bi!3xoj!-mu2I%mhA*S9hGJWnO#HCC=-!pvQ2yP8(zn2@)q!h>JML z&xs1Zz3?mpL|U7#Q77r5U8E}`90~!#$pq=WU+eGpD+(g4WaKZyXj{0g(g55f48Lf8 zIHYaqI15mfR|r&t1*$6nteZ5!?*Jfl633SOE&-mvAcfnt2cmKsSj_1813^mg+mh1# zD4>m-+BD#q`~fhHnXbrw*)PqMz5al#N;R_Lk>;zuI@RIv_yZ0#AhpU$9SGr}Q0QS! z`qoE~;Iy_YFJEAEfoKLqN6}Ot&V;5FT6zYW;0vlwdF<*4V1yx_<#E)>$S0~?vl4LD zhq1#TYuI>wHSd!S$`jWPne1p6ipblc#tn~ZhZuc}9ytK&kO`gP0hD@HCITCViY-g? zr_Yoc9l&&r&!M^`oJ?V?K4+f1Y>~8R*36kw)5WD1rfgHj+syDf9gY5=+Yyjm(tMvk zQ0-Ke#(>mRR$892TQMk+0y^dJ$o~1fZjn_r+$3t&v_(l>!;Ew>vV{>1{-f68J#Iu} z(m=f)`-e?!L=5obk^cbTdCR6d)Mmw7syMxV5Fv;uT~QR!sBjnM@02pC!^A>u!MlLn z9txYfRCGC`+iS6Qdu;;d0XBnx*ss{MsV!sFY1)=oDO8M6A1Ijwb85n3Pn}#7^wvqu z3NQy#ORAIo4o?6crYdfi-&wDy9%=W^8d>$q^&Z({UP2LR*g^!l9j9*5hXg5XkV4$v!_0qN3}in~^pYIpBc zB@dvLW_fFUs)sWILW|AS4lUhTS&74xjfUFo18dxsrKJlymsPz2pnGs8<~fBG=WW8; zD_!YYT5avBpN-ps8UpWGJ6?rmg=RAx@mSNH1lokb2Ghx*aA!oA%ek^Q$jB?J!7x`M z2{7|bBNNu{>&V3^oFiJz0vcG_`qk~-T0XR$HH(|Y$qMf@V3tRk?sGOsIHA!Fp?UO# z+ejfHZ7U7KAR$xB2MB1>>Sbqx$DuZWVw*LEqGqnrBD<;sFkPXF2>ou?-fi!G77=Am zbNl?bnhxH4mhTh|>?PTXkmC{pPE3li~~d z%`R_w`_6Re~-)tSZvhD zF&=K}jR$T#L2}%G+r%bRuKx^|5>SA%Wa45YPz)o`5BrqxJ~>MjkcAqoHBq~l@ueaQ3&&)lIuC_lI|%eXh4 zxktY_yZ;PyongpD+d|Y5KWbLXhW-Qfrqng$)04;-A_5{Yu`LMurxD=mQFrXwktc)nEg+5;Z#@)|h zQ4<#Z?Q8)n)Fnb99y6D&ZV%xCN-U$ye>C>CbKpRY`r)-*tZJqz0gt1RcU>qq7V$VH z`nI}*W$x3muPwXypDuJ>KX)z}M@Z&S@;~!K&C7a*!5|V`qu?rrD?LTK#2>4Url+T0 zkei#!Mvff0>yk?@IRw|?bI(2ZrTqN-J1M2*&?e2+CncP`yu3N(<>h;?yY4z;)v8rS zM@I+0K+lbuni`|5tn6KAvmDxHrhvog1sX1!J$v?>D_5>GHf`E;V)yRdr~dlazn<>y z?lxX}>7`SD{No=_AUtTZA7IV5_qFaoZ_(wKU;YP#v0=l86Hh<=wDHO-uNVNwc=OFS zjeYy}AuMC##*HU#zWHVY+U`nAOFPGefqWu;Bs)9%3ZKvS#l835Yi!-R_0-OtJB?kt zcJb@kXP-5mdFB~o$BrEa&~*Bqd+sq*Rs9Fhw8VsyfgtdqprGIe6UK?Bo_fjvo{Z<8 zf1ckF&U4Q_$M0D8$Rm%OSi5$uF=E7sTTD1e3nl?*adENw_~VZoz)uhIgM6S|-g@h; zC||F?{<`t%tFIbBYtLhkJ!V{R!3C>rJmJ-E(4axyZQHhCyHoGJ`|jzFKmOSG$A^3Gd}w0BjdgI-ZS>>*>mcNC!R1s7k&eM^Gq1XTON$n@^$Oh9eDr!_YHt? z>cD{m#-T%pjDP&&AI7)eerx>w?|(PG{`zaII}Lb@EnBu6DJdxlLf-)<45X_7#%tQb zg$tiXH~{1H;lqcGo}L~9e@>n}X&gOz)cEeZ?~Jd$`s%c<>qcE&-D?>c84I8<*f~Dt zs7twUjV~-LyycEN?)dcJ!Gp$$6DLl?kAc^zQ>Xazv17+LZJnK+Uk@8L?BAfzMM#55 z3pM$}+|JygLx*;N9)AdY@V@pRr17r1?%F?k^yrPyb}G$;nv*ZEk>TqKy{o2jQff

M;_QQ1>TsXGa z_YSz4;aXzCC?qkt*nccoIdGi~*TryM3G!bA7xFM0u1krqA^E+)u>V-{LcPGTC^j#A z#{O9(RsVcyK^};+)%KjmpFuM+pQPz#IW(qO<}=8J7IDo%sQqZMSq>$1h*h3hNQYY% zCi6KuBKo|Co@IkM#s+g?tepS!GymnByoHbp3avZ%8NT8r;2*=&z=7}O@05lgigQ4j z+&#rSS;+D}73h6J(33mN$}pzvEU!9{(d!tMc+yUa^Qm!;@+a3|N=}-KZX4qoN4+~m z;x2}JzCB~t723uVg>m7+<&1=i(36LfLx!@`Rnd^42s0klJWb;bdOWgfiyEr!QNum9 zNa0>aCtq0tT2_(>d-Y8KJHv!cFO0!jvYkeA4ub-)Jf7-sHq@!Upw}hR4s&BUiT;6T zGGbpi8Gq4WMz1YEiC$aKXE=04eAY*#dW2lPyB~yAF{Y`ic}mm;0cBLylA|G@G?j+6 zEgk1Q^nJ3zTXJJ5Ta(}GQ_BuUhB9)LkId1&gSqn-IbhTSLA6G9%XPql-{lC%iZrG{ zUIEccBdof|+6K#!8sT6@K4Wxv35siY>fz!DyP|+x+v(NUT7Y7j%;<%Te6U<1WVw{6 z$0FfgA?WU3EeBe~k~a#o_7Pi39HTz|EA$BJ?Ij8GUIQc?Ah*yUB+-H7gpTCuB~pAymdq2M6D(Dee}Ilz z+X7ip9SdzISHBUSl%7VSWM-f+Cz-;`y@`>NJe)r{uzgZ5qC9trthUMutO*srU*;*< z`Lzz0RIhkjgJKb9(=vZ*!((AQXECEQxUS78iNn~7t~J?p?TQ%TV;QYJAHh_gZwC{4 z0Tvx;lxyR)12cMCc9dau+HWp}CREph1rV84o+I{3Q(;vGDym{0xLITbq7=0xu1{{} zmOV~nC47rT5`d#HCdU>gb|5!%0O7rJ|DU``YrJ^#f0%d~VKD)t`lh8Z3QBP&g1|dW zKB457M6!=Z;@57AJ+L5mxNTksMhKUym$r*VYyWxGiySq$Ta#g5xTd2DGID!I8wL=j z?UhH9fjV?{>qCH}6iX~tmfBSwI`d8J|s4~wq*bx0L z5zz<}5hJ%*yD6_SdJ5%+_ax)M$gSLnjA!(ZjJ|~J@E#*Z%Yr4d;&ciDX7Q-yE9 z*rmK7PRcP402&^n5Ip2UMi*R!B3y7$0)>guOK`SrYld&i!1HXcud!AFJBCEtHiUAJ z^wuEXbQsSot+^Ye*za?@$75Fr!T^>hXW0ZypaPSvL157B@Wz`%MmE~ru3ggL$+B#o zETyD54;Mm|B5^)q+e+Xf_?A*sqTDQ-PQ#9VbKKS~iu5sIlP@(%5xJ~&@b++2A-ML< z_cbnV6v-AwUO~#Ynw0-y{Egs@ZXAw9Hkvi9D6SW74YIT{vFUGa`tUNc5A8^mHR(b& zav$YZj<#jR#{oaw2|}kxY=2;YNH$k_{ou!NHgG-}c>=R|jBMw5JX(>wOHj1D5g9_# zV;cpG{K?EWT3yr1CMEUlPTjKn;yzl2Lt)-3yQ(1&1X0m;l=D8_pNY6)U?} z&-X6-TCXtjVv?dpg9jT|1-8h(56+g~5Cgm?#!J-0xw(IHqtcspn#XP{c+7T-8N1yQ zo0EI(Q5z$_zbQV#0!l=T)n}YoWtw1Ue)mJL0*-nI(;?m(GYo*eo5y9{DCJvwF$`yk z&0LsjB6`7~4<4?T{QeR1)jAcK)#rxY9r%M@MAi;96_H^OGllY5Uqs{v04-mb-G$RC+{d&k5w5Tt7wk%{(%^uF zM}l8?&pySju%XGzTT(;FlA3rF5ZM|=CPubPF|O4Jk83k+aV;a74g3dja@MXqW4`+( zp6&i;%w_NSAIM=_ITp;goCVi~l+v;@T}0%hGHr19Gt^BSH*VZ}3l=Oe>g(%Ic|0Bi zuN!Z?(NGk{XlQ8Q@9=zj>C&Y}d3pI)85tQrH(^9`v{_kM4s5q|>((PLzx;B~tFOL_ zIo6&%d-n9~-MhEvwbx$bW%vwj4y&qa6ciMMZM5**ACv{wty_nA(_@(PeCM5a47|Vn z_S^g!^Ou-c#b>~C?7sW%!(4B~ln25<=Y~1jUp?@^1ID&(+j=n1Y~_hD_iVjeIcRM2 z&_fSlj<%DCoMV=G?hl3$NM{&-JUSC?`A z`RCt9M7}W!r=+B$4fw|XJukfQ0?(iS?K7(JLb{@{ZTxNPxmfBx{p4-sY$ z(l%kjgd{k_h7D^&+M#_9=Dxr9;*03@`RAYW%X$Vpr~^i6X=xIi;lqcwAwOS!`DG90 zmoZAIoaIHg>~!US_#*5BKEbc{T-wW z_i3iWyuTVQ2V6D1Tv&H4w8go8E?oUdd~P1+8ty|3fom8M0cEOdnAry9f>El-&HpdX zVb1}#wkrAz}bp*=R%B&Q4-!U(uze?g5O7fP`JU!D%%J#@~KU2 z;syO<$nj&y@ngvGW61Gi$nj&yVRIP!Z6QOVXFihH_zPRGaE8Xo!9uDIKR8%85(^em z)Buu5$>0bhyBXOEw}%;754T70t)U|Fw{Cd3labrub^zRKB=@Br>uD-jCrs z#4@qWezu4>PDS@;Z^^9%-&TuR{ZsMLM%)fa{D*XAlwsIY^Ig{7$H{mU1B)3s%tM;P z1Cxu@H+zWiTHGfYVE-Lai6_bb;KP#Vl=I{OtQ<0SN2GLxzV9Ia8I^LQF%f({@9AkBp%aX{BVcZVd&+|N~yF| ze2!{6CxUwlb`d0gm&s^W{IFD?bW zE}qcy!m@yGMlX?7zi69NBm0B6FJ>dZJ`iY}JaM8p>;-`9N>V)QbRj8xcpI z66eC;*lu9Txqv%dRW`Z{d;dVe+W$Mk=p8s5co!gJadr_S8(^Ro^Wj>2CJm)imMU&{ zgAb+&{~X0Sb}-)5OK}Rq+IbQ?*SITWR!AZ*j7OU+MJ%;INXD-$1hgP#ASsM%i8*>?Ggw+wsLj!B zh1lo~Ea8e4HWdymA05(%0j0}+z*ieNU9q#Gma>)bU9hya@bhSFL5;&nVyz6TI@= zuQPDh8N_vah-w)K2>8w)x|5N&z=h!)&1_WVT7S4JZRe_$D~*HvS2!~GNTg*F z5cfHFw+QZVg3!mHe=_iC1U`MntH>VV+K!^%np_b%d<2>o@-d3=L!--tdWS>dHBd7| zWAyB|horGI7o&}0nA*O*kh6pG=BG^gc_teNbV!K4V^4gd-6@@_35VlnIOMU*Pw2eB!rV z*urTlNj-ymmG!B3N*Vna&tzhX23&$H7~@ovyBWDHGP)#U9FG(pkK`YZ+}{bMw_%v^ zd3WSA#s>FdlS`1=v1=ln$ZR0;H;mpO&U#uz7Frv06D;x=9T_F6Gm)gb_l&9$B#zJCIaV^0BEEdY1x3ZJlPpJ)E#-JJF>Miauii9 zj}JaQZ%w4%@yNK6$S+~cX`0Z8gNUGMQp8bVDr4?^&~;3_IAy<3Nb)-r_)khA^D81p z@O`u3xD!Rs$d`h!r-7&r8K;BB4=}_w#>;UiH={7EQYh)f)S5U^kJX>RYuv$hRN8XX zAUqz)C5S>t`eHlm7h%}}fi8MVx4ew&yMPxf#iqB$C%IW?l8iXU*X$@R4o7M=KKsoREWq(4j9wZU zBfi!_b%~c8FMCm7Ga2S|vIOof#=^tN%Hl|&1=lC^y)+!TKS>Z<<0W-ckQMC{jtoVT zVX#}1kyga_J*uTr{8b5~Se-)5Wjw-y#=8?phPuf~6v2eF!vxx9Bx2^QZAct~tYqkG z0COJ3pBMP0tD3#wgP>hWe8e-#0L+yveM5ZUhSoTN`GZ=bVVP)69a@TYSAt)P8W`{ib~?#H zEpZ~z^El~}aAnYBW3pO7;9-;G1e3NWwM0vG1ZrZZjRBTnCmy;S))K7-9gED1&&y*( zzn35p;I0s0r*RWW{xju(97`c;2&S|+jh$j2ap=~RfC&0@B##E;2Ze1D`jqXp9ae1+ z4TBs18GbYdtG0Pc%{1%J3V6M+2K1?nyv{!X6IG(DX!VYfAq+H}!N6o(%QL!u$7n3c zbov@sM2micMOpl>V?@iwVOfq}b_1j;w>w%shPQRPWrrFq8_Ge#0>>9E8o`TH*;Z7B zMg9HtzGhUQXz@w3184hSxuniifhp_kWL1qX7~nb+ZQ5@Qs#?9`iji5!$%F-!2fr?i zmFHs95^Q=^pk7vOe{#nkZIjR21ijb_SWIf8X@j{uuL=g-a=nyxA?_eHIW&@I~RK#4f1SxMU~feRg~q)R$uO_uvu2K(9{^rOK>hU+Tx>V zm(gNc=3uzE)YfhN4h)}oM;I@kKPDVZm+|sEzoSW>R*#=k`fWsvM$c5lza0xU;$WG| zZFYYLWj?48R;E7HGgt8{csc^sj4}AML1P=3qdc zzz!^2IM_l?+RUKaUF}q5*=u9W5G@LL3oFAGk2}rA++08s&)oe2KoOT1@(v?a4P4k@ zoF#;pH1bf4E@FVgzHHXZ4{%2LdJ1p{9raIgn>R{v7+nFk4;dW>H?VWJ!EI}+jtg=+3)*Ef`fpJ59ivRoh9w<5 zKYFuX$>_!K^a8BA^yB{oPcMT?>Qi74bj-KVQM#W|pFW{ZN5e+$g3?uty7V%i&R6&A zpx_kz*D)bRuZG+0jI4$_5YR1vwLhc3)dvrNf~Od1*Q-G*;rS?|8r=R5qrcQKmqO3c zxgt-89=VMEPH$oKCVg~<{v<5N^pboi9t2KRKLiqmeuo)tgWKO2ZGqdSQTjWK=(+)< z!RuccIizFii(ad5W#lpaXoX(L2;$3Pqz7*AFgjT0xrY+~IGxcu^nCDn`j~5U+(e@P z43+0GvR}WSk$>0wff;~;KQRJ0F@bhm$2}&x2nye0v>0wD7!B)~{h?>+<8q;3HzW7y zxCKS8)PYKr$KM%UsW&j%td9r)))6qgIzRN+0B=JWy&rC8GrAF)ZoU?N0sX(w`Nq{f z@b+-CewxwSbtsL%>lV{TCfK%cw)=3B%L+WJb$$+(x6<=uM0^Lit;a4gy3)Fky7uQls@y_$8w^>kdZU z`jNBYwG_mpb7S*c{ZmHQ=s)SF^SsXUI;Km>$2w?iyS@fy00AApPR9fnT?my!V376s zpoKcOlJ~;x{*mzO&x`eq39kIFixmFP@;38R $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ + +CLEANFILES = XDarwinHelp.html InfoPlist.strings + +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp diff --git a/xorg-server-1.4/hw/darwin/bundle/German.lproj/Makefile.in b/xorg-server-1.4/hw/darwin/bundle/German.lproj/Makefile.in new file mode 100644 index 0000000..a945693 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/German.lproj/Makefile.in @@ -0,0 +1,639 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*- Makefile -*- +# Rules for generating files using the C pre-processor +# (Replaces CppFileTarget from Imake) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/cpprules.in +subdir = hw/darwin/bundle/German.lproj +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(Germanlprojdir)" \ + "$(DESTDIR)$(Germanlprojnibdir)" +GermanlprojDATA_INSTALL = $(INSTALL_DATA) +GermanlprojnibDATA_INSTALL = $(INSTALL_DATA) +DATA = $(Germanlproj_DATA) $(Germanlprojnib_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +BINDIR = ${bindir} +SED = sed +SUFFIXES = .pre .man .man.pre + +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e '/\@\@$$/s/\@\@$$/\\/' + + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ +XORGMANNAME = X Version 11 +XSERVERNAME = Xorg +MANDEFS = \ + -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__appmansuffix__=$(APP_MAN_SUFFIX) \ + -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ + -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ + -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ + -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ + -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ + -D__mandir__=$(mandir) \ + -D__projectroot__=$(prefix) \ + -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ + -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) + +XINITDIR = $(libdir)/X11/xinit +XDEFS = \ + -DX_VERSION="$(PLIST_VERSION_STRING)" \ + -DX_PRE_RELEASE="$(PRE)" \ + -DX_REL_DATE="$(XORG_DATE)" \ + -DX_VENDOR_NAME="$(VENDOR_STRING)" \ + -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" + +resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources +Germanlprojdir = $(resourcesdir)/German.lproj +Germanlproj_DATA = \ + XDarwinHelp.html \ + InfoPlist.strings \ + Credits.rtf Localizable.strings + +Germanlprojnibdir = $(Germanlprojdir)/MainMenu.nib +Germanlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib +CLEANFILES = XDarwinHelp.html InfoPlist.strings +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp + +all: all-am + +.SUFFIXES: +.SUFFIXES: .pre .man .man.pre +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/darwin/bundle/German.lproj/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/darwin/bundle/German.lproj/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-GermanlprojDATA: $(Germanlproj_DATA) + @$(NORMAL_INSTALL) + test -z "$(Germanlprojdir)" || $(MKDIR_P) "$(DESTDIR)$(Germanlprojdir)" + @list='$(Germanlproj_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(GermanlprojDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Germanlprojdir)/$$f'"; \ + $(GermanlprojDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Germanlprojdir)/$$f"; \ + done + +uninstall-GermanlprojDATA: + @$(NORMAL_UNINSTALL) + @list='$(Germanlproj_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(Germanlprojdir)/$$f'"; \ + rm -f "$(DESTDIR)$(Germanlprojdir)/$$f"; \ + done +install-GermanlprojnibDATA: $(Germanlprojnib_DATA) + @$(NORMAL_INSTALL) + test -z "$(Germanlprojnibdir)" || $(MKDIR_P) "$(DESTDIR)$(Germanlprojnibdir)" + @list='$(Germanlprojnib_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(GermanlprojnibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Germanlprojnibdir)/$$f'"; \ + $(GermanlprojnibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Germanlprojnibdir)/$$f"; \ + done + +uninstall-GermanlprojnibDATA: + @$(NORMAL_UNINSTALL) + @list='$(Germanlprojnib_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(Germanlprojnibdir)/$$f'"; \ + rm -f "$(DESTDIR)$(Germanlprojnibdir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(Germanlprojdir)" "$(DESTDIR)$(Germanlprojnibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-GermanlprojDATA install-GermanlprojnibDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-GermanlprojDATA uninstall-GermanlprojnibDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install \ + install-GermanlprojDATA install-GermanlprojnibDATA install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall \ + uninstall-GermanlprojDATA uninstall-GermanlprojnibDATA \ + uninstall-am + + +.pre: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ + +.man.pre.man: + $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ + +InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp b/xorg-server-1.4/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp new file mode 100644 index 0000000..5996285 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp @@ -0,0 +1,96 @@ + + + + +XDarwin Help + + +

+

XDarwin X Server for Mac OS X

+ X_VENDOR_NAME X_VERSION
+ Release Date: X_REL_DATE +
+

Contents

+
    +
  1. Important Notice
  2. +
  3. Usage
  4. +
  5. Setting Your Path
  6. +
  7. User Preferences
  8. +
  9. License
  10. +
+
+

Important Notice

+
+
+#if X_PRE_RELEASE +This is a pre-release version of XDarwin, and is not supported in any way. Bugs may be reported and patches may be submitted to the XonX project page at SourceForge. Before reporting bugs in pre-release versions, please check the latest version from XonX or the X_VENDOR_LINK. +#else +If the server is older than 6-12 months, or if your hardware is newer than the above date, look for a newer version before reporting problems. Bugs may be reported and patches may be submitted to the XonX project page at SourceForge. +#endif +
+
+This software is distributed under the terms of the MIT X11 / X Consortium License and is provided AS IS, with no warranty. Please read the License before using.
+ +

Usage

+

XDarwin is a freely redistributable open-source X server for the X Window System. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin runs on Mac OS X in full screen or rootless modes.

+

In full screen mode, when the X window system is active, it takes over the entire screen. You can switch back to the Mac OS X desktop by holding down Command-Option-A. This key combination can be changed in the user preferences. From the Mac OS X desktop, click on the XDarwin icon in the Dock to switch back to the X window system. (You can change this behavior in the user preferences so that you must click the XDarwin icon in the floating switch window instead.)

+

In rootless mode, the X window system and Aqua share your display. The root window of the X11 display is the size of the screen and contains all the other windows. The X11 root window is not displayed in rootless mode as Aqua handles the desktop background.

+

Multi-Button Mouse Emulation

+

Many X11 applications rely on the use of a 3-button mouse. You can emulate a 3-button mouse with a single button by holding down various modifier keys while you click the mouse button. This is controlled by settings in the "Multi-Button Mouse Emulation" section of the "General" preferences. By default, emulation is on and holding down the command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the option key and clicking will simulate the third button. You can change to any combination of modifiers to emulate buttons two and three in the preferences. Note, even if the modifiers keys are mapped to some other key with xmodmap, you still must use the actual keys specified in the preferences for multi-button mouse emulation.

+ +

Setting Your Path

+

Your path is the list of directories to be searched for executable commands. The X11 commands are located in /usr/X11R6/bin, which needs to be added to your path. XDarwin does this for you by default and can also add additional directories where you have installed command line applications.

+

More experienced users will have already set their path correctly using the initialization files for their shell. In this case, you can inform XDarwin not to modify your path in the preferences. XDarwin launches the initial X11 clients in the user's default login shell. (An alternate shell can also be specified in the preferences.) The way to set the path depends on the shell you are using. This is described in the man page documentation for the shell.

+

In addition you may also want to add the X11 man pages to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in /usr/X11R6/man and the MANPATH environment variable contains the list of directories to search.

+ +

User Preferences

+

A number of options may be set from the user preferences, accessible from the "Preferences..." menu item in the "XDarwin" menu. The options listed as start up options will not take effect until you have restarted XDarwin. All other options take effect immediately. The various options are described below:

+

General

+
    +
  • Use System beep for X11: When enabled the standard Mac OS X alert sound is used as the X11 bell. When disabled (default) a simple tone is used.
  • +
  • Allow X11 to change mouse acceleration: In a standard X window system implementation, the window manager can change the mouse acceleration. This can lead to confusion as the mouse acceleration may be set to different values by the Mac OS X System Preferences and the X window manager. By default, X11 is not allowed to change the mouse acceleration to avoid this problem.
  • +
  • Multi-Button Mouse Emulation: This is described above under Usage. When emulation is enabled the selected modifiers must be held down when the mouse button is pushed to emulate the second or third mouse buttons.
  • +
+

Start Up

+
    +
  • Default Mode: If the user does not indicate whether to run in full screen or rootless mode, the mode specified here will be used.
  • +
  • Show mode pick panel on startup: By default, a panel is displayed when XDarwin is started to allow the user to choose between full screen or rootless mode. If this option is turned off, the default mode will be started automatically.
  • +
  • X11 Display number: X11 allows there to be multiple displays managed by separate X servers on a single computer. The user may specify an integer display number for XDarwin to use if more than one X server is going to be run simultaneously.
  • +
  • Allow Xinerama multiple monitor support: XDarwin supports multiple monitors with Xinerama, which treats all monitors as being part of one large rectangular screen. You can disable Xinerama with this option, but currently XDarwin does not handle multiple monitors correctly without it. If you only have a single monitor, Xinerama is automatically disabled.
  • +
  • Keymapping File: A keymapping file is read at startup and translated to an X11 keymap. Keymapping files, available for a wide variety of languages, are found in /System/Library/Keyboards.
  • +
  • Starting First X11 Clients: When XDarwin is started from the Finder, it will run xinit to launch the X window manager and other X clients. (See "man xinit" for more information.) Before XDarwin runs xinit it will add the specified directories to the user's path. By default only /usr/X11R6/bin is added. Additional directories may added, separated by a colon. The X clients are started in the user's default login shell so that the user's shell initialization files are read. If desired, an alternate shell may be specified.
  • +
+

Full Screen

+
    +
  • Key combination button: Click this button and then press any number of modifiers followed by a standard key to change the key combination to switch between Aqua and X11.
  • +
  • Click on icon in Dock switches to X11: Enable this to activate switching to X11 by clicking on the XDarwin icon in the Dock. On some versions of Mac OS X, switching by clicking in the Dock can cause the cursor to disappear on returning to Aqua.
  • +
  • Show help on startup: This will show an introductory splash screen when XDarwin is started in full screen mode.
  • +
  • Color bit depth: In full screen mode, the X11 display can use a different color bit depth than is used by Aqua. If "Current" is specified, the depth used by Aqua when XDarwin starts will be used. Otherwise 8, 15, or 24 bits may be specified.
  • +
+ +

License

+The main license for XDarwin is based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code. +

X Consortium License

+

Copyright (C) 1996 X Consortium

+

Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without +limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to +whom the Software is furnished to do so, subject to the following conditions:

+

The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software.

+

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE.

+

Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization from +the X Consortium.

+

X Window System is a trademark of X Consortium, Inc.

+ + diff --git a/xorg-server-1.4/hw/darwin/bundle/Info.plist b/xorg-server-1.4/hw/darwin/bundle/Info.plist new file mode 100644 index 0000000..bfef48d --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Info.plist @@ -0,0 +1,66 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + x11app + + CFBundleTypeName + X11 Application + CFBundleTypeOSTypes + + **** + + CFBundleTypeRole + Viewer + + + CFBundleTypeExtensions + + tool + * + + CFBundleTypeName + UNIX Application + CFBundleTypeOSTypes + + **** + + CFBundleTypeRole + Viewer + + + CFBundleExecutable + XDarwin + CFBundleGetInfoString + XDarwin 1.4.0, X.Org Foundation + CFBundleIconFile + XDarwin.icns + CFBundleIdentifier + org.x.XDarwin + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + XDarwin + CFBundlePackageType + APPL + CFBundleShortVersionString + XDarwin 1.4.0 + CFBundleSignature + ???? + CFBundleVersion + + NSHelpFile + XDarwinHelp.html + NSMainNibFile + MainMenu + NSPrincipalClass + XApplication + + diff --git a/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/Credits.rtf b/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/Credits.rtf new file mode 100644 index 0000000..cf9eae2 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/Credits.rtf @@ -0,0 +1,193 @@ +{\rtf1\mac\ansicpg10001\cocoartf102 +{\fonttbl\f0\fnil\fcharset78 HiraKakuPro-W3;\f1\fswiss\fcharset77 Helvetica;\f2\fswiss\fcharset77 Helvetica-Bold; +\f3\fswiss\fcharset77 Helvetica-Oblique;} +{\colortbl;\red255\green255\blue255;} +\vieww13980\viewh11160\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\fs24 \cf0 \'82\'b1\'82\'cc\'90\'bb\'95\'69\'82\'cd +\f1 XFree86 +\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67 +\f1 (http://www.xfree86.org/) +\f0 \'82\'a8\'82\'e6\'82\'d1\'82\'bb\'82\'cc\'8d\'76\'8c\'a3\'8e\'d2\'82\'c9\'82\'e6\'82\'c1\'82\'c4\'8a\'4a\'94\'ad\'82\'b3\'82\'ea\'82\'bd\'83\'5c\'83\'74\'83\'67\'83\'45\'83\'46\'83\'41\'82\'f0\'8a\'dc\'82\'f1\'82\'c5\'82\'a2\'82\'dc\'82\'b7\'81\'42\'8e\'9f\'82\'cc\'90\'6c\'81\'58\'82\'cd Darwin +\f1 /Mac OS X +\f0 \'82\'cc\'83\'54\'83\'7c\'81\'5b\'83\'67\'82\'c9\'8d\'76\'8c\'a3\'82\'b5\'82\'dc\'82\'b5\'82\'bd\'81\'42 +\f1 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f2\b \cf0 Contributors to Xorg Foundation Release: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Kaleb KEITHLEY\ + +\f0 \'8d\'b6\'89\'45\'82\'cc Ctrl,Alt(Option),Meta(Command) \'82\'a8\'82\'e6\'82\'d1 Shift \'83\'4c\'81\'5b\'82\'cc\'93\'ae\'8d\'ec +\f1 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f2\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Contributors to XFree86 4.4: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Harper +\f3\i \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f0\i0 \cf0 \'83\'8b\'81\'5b\'83\'67\'83\'8c\'83\'58 \'83\'41\'83\'4e\'83\'5a\'83\'89\'83\'8c\'81\'5b\'83\'56\'83\'87\'83\'93 \'82\'a8\'82\'e6\'82\'d1 Apple-WM \'8a\'67\'92\'a3 +\f1 \ +Torrey T. Lyons\ + +\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67 \'83\'8a\'81\'5b\'83\'5f\'81\'5b\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f2\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Additional XonX Contributors to XFree86 4.3: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Fabr\'92cio Luis de Castro\ + +\f0 \'83\'7c\'83\'8b\'83\'67\'83\'4b\'83\'8b\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 +\f1 \ +Michael Oland\ + +\f0 \'90\'56\'82\'b5\'82\'a2 +\f1 XDarwin +\f0 \'83\'41\'83\'43\'83\'52\'83\'93 +\f1 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f2\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 XonX Contributors to XFree86 4.2: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + Darwin x86 +\f3\i +\f0\i0 \'83\'54\'83\'7c\'81\'5b\'83\'67 +\f1 \ +Pablo Di Noto\ + +\f3\i +\f0\i0 \'83\'58\'83\'79\'83\'43\'83\'93\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 +\f1 \ +Paul Edens\ + +\f3\i +\f0\i0 \'83\'49\'83\'89\'83\'93\'83\'5f\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 +\f1 \ +Kyunghwan Kim\ + +\f3\i +\f0\i0 \'8a\'d8\'8d\'91\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 +\f1 \ +Mario Klebsch\ + +\f0 \'94\'f1US\'83\'4c\'81\'5b\'83\'7b\'81\'5b\'83\'68 \'83\'54\'83\'7c\'81\'5b\'83\'67 +\f1 \ +Torrey T. Lyons\ + +\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67 \'83\'8a\'81\'5b\'83\'5f\'81\'5b +\f1 \ +Andreas Monitzer\ + +\f0 \'83\'68\'83\'43\'83\'63\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 +\f1 \ +Patrik Montgomery\ + +\f3\i +\f0\i0 \'83\'58\'83\'45\'83\'46\'81\'5b\'83\'66\'83\'93\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 +\f1 \ +Greg Parker\ + +\f0 \'83\'8b\'81\'5b\'83\'67\'83\'8c\'83\'58 \'83\'54\'83\'7c\'81\'5b\'83\'67 +\f1 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f0 \cf0 \'93\'63\'92\'86 \'8f\'72\'8c\'f5 +\f1 \ + +\f0 \'93\'fa\'96\'7b\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 +\f1 \ +Olivier Verdier\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f3\i \cf0 +\f0\i0 \'83\'74\'83\'89\'83\'93\'83\'58\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 +\f1 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f2\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Special Thanks: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Devin Poolman and Zero G Software, Inc.\ + +\f3\i +\f0\i0 \'83\'43\'83\'93\'83\'58\'83\'67\'81\'5b\'83\'89 +\f1 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f2\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 XonX Team Members\ +Contributing to XFree86 4.1: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + Darwin x86 +\f0 \'83\'54\'83\'7c\'81\'5b\'83\'67 +\f1 \ +Torrey T. Lyons\ + +\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67 \'83\'8a\'81\'5b\'83\'5f\'81\'5b +\f1 \ +Andreas Monitzer\ + Cocoa +\f0 \'94\'c5 XDarwin \'83\'74\'83\'8d\'83\'93\'83\'67\'83\'47\'83\'93\'83\'68 +\f1 \ +Greg Parker\ + +\f0 \'8d\'c5\'8f\'89\'82\'cc Quartz \'83\'43\'83\'93\'83\'76\'83\'8a\'83\'81\'83\'93\'83\'67 +\f1 \ +Christoph Pfisterer\ + +\f0 \'8b\'a4\'97\'4c\'83\'89\'83\'43\'83\'75\'83\'89\'83\'8a +\f1 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f0 \cf0 \'93\'63\'92\'86 \'8f\'72\'8c\'f5 +\f1 \ + +\f0 \'93\'fa\'96\'7b\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 +\f1 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f2\b \cf0 Special Thanks: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Tiago Ribeiro\ + XDarwin +\f0 \'83\'41\'83\'43\'83\'52\'83\'93 +\f1 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f2\b \cf0 History: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Carmack\ + +\f0 XFree86 \'82\'cc Mac OS X Server \'82\'d6\'82\'cc\'8d\'c5\'8f\'89\'82\'cc\'88\'da\'90\'41 +\f1 \ +Dave Zarzycki\ + XFree86 4.0 +\f0 \'82\'f0 Darwin 1.0 \'82\'c9\'88\'da\'90\'41 +\f1 \ +Torrey T. Lyons\ + XFree86 4.0.2 +\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67\'82\'d6\'82\'cc\'93\'9d\'8d\'87} \ No newline at end of file diff --git a/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/Localizable.strings b/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..c5c26d61a29501613b8879fcad648cb985433a52 GIT binary patch literal 1152 zcwUuM%}N4M6h5@9-l0KS3D#Lf6cL%UD6+&vTaM$54vmvIV`fmx9-#LK+O(>NXxBDq z7163~WZymG{5WV4a_^mce!uhGbNn9CGG$4lUDBz8<&sGrmPQVpk^zZBHeEo{fb0xs z7kV2y7pI2P!tRj|xeZxUq&*g|Fyyhxj@iFfW7oc4qLtxUm#QR@KDyjA ziLF@fBBG057*EBi%B=xRecZ~h^Tewys1)~2>^klqn2+i%wb)|!?-=~dAAHAe{1UP= zoS(|sOp3Ai1=5^EIFxtFYg_6yQfwxrkvHG+D}V9>zo%jpU}wRj2Wyr81or{zQ8Unq z__Ks{Gm)i&>bJntB>T8$(z7(p{x?LPyt$8xS~Nai$(q}El^mw21APwOF@{OHWWGEy zsoqnwr%4Zn)6cu B&7=ST literal 0 HcwPel00001 diff --git a/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib b/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib new file mode 100644 index 0000000..77f345a --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib @@ -0,0 +1,72 @@ +{ + IBClasses = ( + { + ACTIONS = {showHelp = id; }; + CLASS = FirstResponder; + LANGUAGE = ObjC; + SUPERCLASS = NSObject; + }, + { + ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; + CLASS = Preferences; + LANGUAGE = ObjC; + OUTLETS = { + addToPathButton = id; + addToPathField = id; + button2ModifiersMatrix = id; + button3ModifiersMatrix = id; + depthButton = id; + displayField = id; + dockSwitchButton = id; + fakeButton = id; + keymapFileField = id; + modeMatrix = id; + modeWindowButton = id; + mouseAccelChangeButton = id; + startupHelpButton = id; + switchKeyButton = id; + systemBeepButton = id; + useDefaultShellMatrix = id; + useOtherShellField = id; + useXineramaButton = id; + window = id; + }; + SUPERCLASS = NSObject; + }, + { + CLASS = XApplication; + LANGUAGE = ObjC; + OUTLETS = {preferences = id; xserver = id; }; + SUPERCLASS = NSApplication; + }, + { + ACTIONS = { + bringAllToFront = id; + closeHelpAndShow = id; + itemSelected = id; + nextWindow = id; + previousWindow = id; + showAction = id; + showSwitchPanel = id; + startFullScreen = id; + startRootless = id; + }; + CLASS = XServer; + LANGUAGE = ObjC; + OUTLETS = { + dockMenu = NSMenu; + helpWindow = NSWindow; + modeWindow = NSWindow; + startFullScreenButton = NSButton; + startRootlessButton = NSButton; + startupHelpButton = NSButton; + startupModeButton = NSButton; + switchWindow = NSPanel; + windowMenu = NSMenu; + windowSeparator = NSMenuItem; + }; + SUPERCLASS = NSObject; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib b/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib new file mode 100644 index 0000000000000000000000000000000000000000..3570027061b3b12dfe7d4ae20fa960832b55660a GIT binary patch literal 21854 zcwX&%d3;pGvT%1cAcR1|CZHJ5p9lyTaN))X1Qg{dYf#{#A510#8AxWr%tYXNKcQ#N zjI81v!-24bJwU>yk$u17!vz;mTsRkzZ?XYTP`E0FWnNYHIWuQw62SZ3{p0)n9OyY` zx~r?Js;jE2`t(UmW5@J-Q?}hR;e+SS>`78UZG&#bLANc9x{LA(=0lO;h2n@sP|BCVRfsl5Mh)La(&U>n+!1n{u<;EcF%_kzzM|k{DUS z=!vm};J3Hf>&AaljM-@HM<`&Dn(8_ZFy-dwV7EKDO02lMOZ)Q-)@yj83WcZmV4Fs@OHx$JVEePEAc2WwvBnr>4YbPPaQuc_}`p zw{q^niv7!cY@v@W^*QHqOly3ua-VB9zu)e2?en?b#Ba9V$BJO&AWb;f=$|_gv z@v(J2Ciz&&IrsdEy^Gbp?0^_F{ucaJORFjlF0a|ZNt`(k<-@k{o(Ft0=fi#Fet=vb zLX(Eq#|kUGsFhp7PvRT zWYY;vBx)pOw2YL+c-(H#g*1ZNv|5Tb_UnhL)Bu${*9w|k7AHju-G~!Y=z-e=qp$!D zL%MN3f=Cb;@`DJ`QO{2jM-Gk`Ty!B8uMpxX$*ctCY&n%m=*mIO3BxfLVFl0m=W zThs5=LbVe#14QlZTTc5mX0mP?K7cC#6kz8@nWw25*)n?BqR*oa5ik!qx>Yf$T(X+8uD-CAHX znmQNC&j}I7zW)%oj|4agNB>_W73(o1`&7^D_sMXucC1sL4OMy0K%e8> z=5y^uK3vOHp4f(}WizYfZPl~k9z^P{T=}+;cE#RxoQ^FiFN}DeJGKSRYWMmu3el0| zI2`$DJ$eYGnP9a|G)nLm`!3ETV&FzPnMvqJxIcVU(lvf_< z{&1ZzsT}5Mi_ws8FUU1GOxY>JtaeAH(Pqwfq`Z>ay=R@>T7qLT=b9{rJd=GGZyTvK zwN;54G+<;zR}Uk*7`efS1pmXwpDO(0P4{lL$w!SKfzyNnI$qn~fGbm==gB z+H5w1L-c@S()$`lX%j|VDL9HNC1i~4pcsJE*|4`zjFxrUOK`eQmZJ-yPLH#nU)qhX z0>9i+Y0=%_m3#IUUb%(v%Flua&LywFw*!2$kr+ywlnGBv&=VlZlrs8HM(3i=;#H95 zb$bG&zm{O`K!~|R-DDF%cGEDs3=&+VBY5Xd_bC{+SdDT98^GgD>$6miUy7xbMUBy# z&IE!G>c~zaBsiDe=bxYbvj1)7P_G~Lco^2IAPT>?7Cq^BIJ{-h#elrcMt<4>< zsP;D)Cr`9l3oO~X<(2A};6{$X+WU?tl8mGlKt&>IT3X^QXLNYw+Syf0-$l;{F%WVK zfy>({eCJM|YdtO?;2k$XNCqx?i*Ak}zMEaOYu>B7|8t_?<8O;ZLFF| zf=83Y<+`N`^GBz^>`l3~dUo_VH*>uy=IdA?kGHm=nLAfu1m-H!P2ewe57mMZA0xG` zP*rN{oj# zz9RIuPV2Ia4+geO(XNTOk3k}$RU#TsVdOYBz2nK==tv?s0bS9)oO~XI-lN8gXrL4= z?%@8)IV*+5>Est%x5;TEw|{}rHYi2-4jH)~DK^wg@w*@cof&QW0HSI8fF6xoO1=+P z0CQSe8m3?(WPz?yK_ z2;4%pG#q(iqPr=`w(Qcz5HzuTkRUzoaz@{L4!ZOn?sxCRE?ig%p_9_&_f1O6;H2OR z78S+lK=7c50IyymQ1HeUJsJHEMpj`XUNxPU8cdkbubpZ zZoa>SQ0P7cs!pQ-W=e94`V{?k@y+RQ4Nl=&6T*F+!3I@(3w=vReG{oA58%2NdfgcI zh~P*4M}xn%B_~VN4nMsj_3CeSYA`nSkv~0be0lI- z(uI)NyU4%iL)D_)gWyRD6o|=4ODNHGz=eObHX0or-KlZo#_ZmE?>+R`V~<^ea^=4J z?mOC~Nt5}M(w+blrR!5Co`i&i=X>_-`SD9Hz2tYfT>he>B3?j!{8?F9{?ydeZvbW- zz{b{rhtmr*Jn`If&wV*##teT+Ny)YM-h1!H@#DvDe(}W@{-Z~a-gx`%x33{SfT;jn z!}NW%E6|&io}RuQajaUk>e_(=2mHs59rFVo|Ce8W=|6Ge1mg0qTet4oU;p}7KfoS} zii&El;y^x;KGL8;gFaTPwQA|orT#5jw%pjaZ=e6rp+meJK781J@ZdrJ-o1PMK-0}7 zOP2U;Hrr*O=|vS!45GlB#Kgq$DvoRW_wV-uPyQoEj_@nu`TO7h&ac?EdGqFLix)5U zw`z)vmmgM6S|PM$m&;On!`KJ$O_$tQlGwYI#x+~28F zr$QZ1SQ<8O-rTZt=T3yX@y$2i-2DFg@BL@bp7mE$RPf^S`TXB~_nrUSZ@=|_^wCE* zcJ12b2VIy0eG^n1$Xf!;)wpHLmR&e?>XaXF+_-Szg8$N`Oa9B3FZ+M|@kjp;Km6c7 zfBrnS-Gp)crKP3+Y}Kk&0rYLE;y}6*VZH{87%}1i;sG2tuUxs}udS{1;7MV z{nh`|Pe1ujF)_oTF9cb9&QX^dLwTrKvt~2r&71fCE?&Iozjp1~ zP5Ah++_-Ur-(S6YmD5&STztMwn>GuePcNiFrG={eq30fa*IjoNfgYa*K6qdK2Wfok zt+y&VcI>zgU|%4@_8O2-n?#zx2aqvwadGpXc;bnJ)22;31$upJWhlUX;Kdk{YR4*>IKe4OSRxV_KzcV^>0Eo%*kl2y89@851J9XheoUQ z08Hc5dyorF;+lh48`73)J=Dc9Bw zGYRR`OuNEz!*>n|1R0+HL73Cta|SbASULuqECqucraTt4qR=b$Qn8AWV}()-hKU5$ zy7-}v9Fq+-I-`A z&=1Hl87Jo%Y?EPOS6iBimciy}rtD0I!C`{zEoof7HUEWtq)%+$r-`Q+NkcM+VMA~) zltrbArwS@NypEi}^*uw|3~&de0w|h)cBci}2MAXpdf^#xJzwdylZ4)h13BygkOfUm(^R00=>o=8Wh3^eK5)6wmk<_Ve6z8^%ldr&yTBj`38S(I8I`3U0K#X#KNd5^QJ5!6gon?uq2Y6EW{!D+ zBZz-|2$RzNw~cb&<1y|77{UJMzaetfJS+OyyP-S`D^BX|3K1(&tPT&qhqfMFx^($= z`0(NWoSd8+d3kw$ER!Zp@TDppn&evam z?Z@j^Uwy^zF>1kR3h!Z@t1DNo#0XDT<$*YGrNqeWwKZ$jz=Z9r#pqIt4l&}?eru5@ z!ff2Q5hJr=A|j1AwKQ(gq6J&Kb}dGxwYzuk=8+{vuXv9I@AvH4!wW=|wGfT?A9&z_ zl|)1t0Xz_`Ie~BNU;F<1@AIhngAYFN>+kW3zk$YDj4C^K?z}1-PwUpLoj4Z2)_(r^ z=R6YE3P!Ek6{A_e$$9VEwQB?(h{&8M3&2r}(c(Y;@eeLryz1{ypFWK^Ymv5Y-MU5K zfymE^v;%xCM!Z#3Re@4jS;>ob596Q?_`7%S9)YKA+qO>Rr@Fej7NbgxQZf3)f)S!t z@HfJsKJ@6(qfR{72GR3Xh4rlOJFyju2`|+;)V?yE`px@2+?~)fwoJauNSkkv%i8U)06YnE~Y~BC=U6t3$dlJL?a2KL&~cN>)7u+r|Pc+WLJ^ z8j;Y59BmD=kJeDy5E1FuRobX9C>LDnMMVDpapd|Sgcb+FH%uC+XGnq@C86s^c3nO4 z@(h-2-XrQxdc+OQ=jT|kL-d_=h#Dw>W9kO>l$E)I@J596tFd-CS`kp`*H=bX{co+X z)<0I*KUUa3R@gsQ*gsa-KUUb^vBHL~8}>U`VQ<$XVuih3hmaLE5;$~)wbir2+Vv~! z8r=%J^7kaly>6E%zot)=mjn}KM&8h!)6);5U$ndUoEv)*1le~a9e=;z^(>=*jhKu zo;IP63CD`ZgtvS+hueY`yJptR+ElY)bLEyLo-(()FGzC83EUa#={bXs-o%4TpR*K? zR0Ku~K)UQD!7pU|laIb6^|oY<+H z^}5eFr)udzADhMHfjXhmubZVeLN?fRM-J8m#!h0?$mp1kD3>uEL&gq2N;5q;7f!Fn zqYH2NQ93;FD>k6iQ$^xT$*jGgI^r0RegiCCJ=+1$+a(`6So!8GpK}2}YV56=_c}1b zvEm7olr%k0-cWVd_(*27wQi5B4jFPDdgCEQmFO*edu*-GSuT#ngt8=#MFZ7>13d`~ z>)EnziYy=%EY^a$8u{_J^Cy=T6_ zFV^i;LU>7J^kIGw>fyv&^7C&v2=#N2(zQXc1P)T<@?#Xa-Y0|ejTFE7&^TDk$FN$Av#KY8(X3kRhGeF(Cp0^p)v)TeD3MmG6@IA$DD#aj55P2+N(f!KkHb%c^v_GEMX_RNp zHVrdaOt~JA&qBFdnmo9#46I7sKg7Xe23aOpJ>tmZLok^;ICm|AB*3(<6)zlkcIudQ z3w!fuy_}$GWM{ZY!l4j%Q*ruRIA}Z=R&OUpw(C14Xs=nkg@-l5dr67*f~-7~r6Bn5 z$<3K$$~)9uH?{N`36`7y;zSk34k7&f8(Qb4u?D9y4ZJ^Z`?(G}`~G zW3DC?^A7;58CLQJln?>~|&1UIYD+@xJxiD`p}9(Rdu5lvkM%vWu(Ux#8SW&n?IQ4aRRM#;+A# zxN?Dv+OuO89vi@+|8i?Jt<{{j1l_7J3K8A@e7kOUqItEdES+WiRP-#4dD`tTt9{D( zG3tH1kMU0WB=}rQc+|988|sxi=@wTxd(OF{wYPCRwUN$V9G>O_8E!Sdpi^@Clk&@B zLA6V}$q*t2AK~-liqYi2$?ZQU<)#pln}U^Ij-$?#3Qg4fMO|=$ktuC)iz5-ifs)%Y z@(GWMKS_=pDi9ZU3WAu3s`yr?y4u{U^K}qeGsHU`e;wA_n7w+@29tVzvpuh z-v&muvd}kpLPg%1+sSB16*j#l zj{i9GALOY*<6$<_1e48Vfq=H2^dQ4cztU$0p(284>N3|?8)2_Gh zJBa^|Gr#z<;2Xi3q`UESGRo;Wf^Uj}y$0S;<9r|)cnuh8sC?3&_X;9-wlrp#K2_2p z1PY_{^z6KC+)I0bG=CJ+dmW}$CTHMoR$n7}wxVBkd%=I82@}9)5I#-*D-*P=3`4 z*A}RLjLhu|U(3_wGeD61Oa?SWiD8a#6y&s^X<;9^!)bXuE-V)o%DHo&@jVg_PPZf6e<;KehbYdX?9XCj+cWZc{K1f`9nf8sYJ<_3 z8=7ofqLV;$Z5x(7wbA|Dy9D61CKmO;_vzdk8A=e zkUi8Uh8!KlYMP88j`*7r2(?cfB9vnVDFVkM*m72ktsVP>x_GFG*T_wUP94GrhPnZI zM5#Dpg4m6g+lCF1CVK16ihAVNL|s5gJpsdbAr&z!Qg$5?_VUP6>lhwV20?cKg-2cp z@Cg`Abh4)mooWG{L95ftp=&6w98X1P9hWH+5)dOIZKw4!2*3O2v0e+E&awKoU+Q2K zJV;n=DzC+THi~mXdm+ZBtj5XQxydi;CHkmG&J7nxFYI)e9tzkP5jGFyVeMx^HRJ+} z9!#v{)e+)-5^BV2fCye1A-1DZxDrnZ8xfppXfL39dN?ltH%w32U@2U`L0Hvw3h)@P z5QVo161Tx1Qj||83B5^*@MGv&QQRQSm!(jH1p+2S_P-nk^*EwAe^p>?elAMCb*@X2*3fD05V?-5Aio|w4Vh+5JltBy#QB+?%i4IBG z5OdZ5?Ju)fEGDDFYGdRx{(^vL5_L(1TOk;5V-R61aHL_n$>=($i^IBDqcwlJuCftU z#__+^psP*9+IYJu7cgez=IUA!IJ_~}WUvKm$#ssp0F+Qy>F1R;Q%L2{SlP&)W1Wh| zscYDcOT|4_TeitI&<1RRVq3By_sqz$7C5+r&;cJoeTmI6XX}V2$2idrlP%9|G3ePL zM-jXgg7a5CbbkiQu7moJLlsyM4w#OBlB5<~(nAXzxh98x4j3)jx=<)}!)y@RME;@& z;ytX@H<)G@${rYQpNJ<~<{2iNo-<9)uw)MnFrTLN=Kc)9;-(4{4`O``Z9QKX-v+v* z3-=d~A>t@qw{=^e5#3<^toERQ28h}OyWthnfEw)5?e(r|)CaND95aOd4`5GG&)W$zs zt$Dh(Q>u5d!1^ilOxJi?G&Tia`HC5oJObdX=0?D>#RP}1Hx(*G7XHOBSQ|!KH8<_? zx{L6^X;eQmA8C;Sz6?4jEUGo5D->w_O&P)+ z0;a*&bvt~4ga#^v(E_C_qeB3~$7mY`hP|%$G=m+D-TlmmhLY~dqy8o#xweV0MO5< z8|p6rR&r&MGMLf!Pz!?|f{N`k;J%X4Y042suEKq9Mz$%xFq#V^HDPpt0xA9tg>Tnf zfad5{%4J5MRHia&Qu;930qU+W3RrNnVxBU9ktNWx9iywD(6=e0Zz@(s z$15PBn@U4Q^8sQlqobkQma)n(M(>5YpBV+A(j9+Q_-@2$1@}(KJMimbZzY=1SD@lE zM*dTo!e}<2y@%1&PzC>+E4ZIR7sKr~gi81`eC-3v1t{qFIy9ees{F=io`U-tbS_-{ z4){9of8oo^=+gjyj?ursOJZb?lEFx!@*<DyfW)fR?$8rYLP0MJjeN;)JT7CIV;!M(04)`;351 z;x3U(X~`%Eo&LZmOfgMt4E4(y{SO52Uv|(!$4RzO;fG-O7edL3NG|l literal 0 HcwPel00001 diff --git a/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/Makefile.am b/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/Makefile.am new file mode 100644 index 0000000..2cc5248 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/Makefile.am @@ -0,0 +1,37 @@ +BINDIR = ${bindir} +include $(top_srcdir)/cpprules.in +XINITDIR = $(libdir)/X11/xinit +XDEFS = \ + -DX_VERSION="$(PLIST_VERSION_STRING)" \ + -DX_PRE_RELEASE="$(PRE)" \ + -DX_REL_DATE="$(XORG_DATE)" \ + -DX_VENDOR_NAME="$(VENDOR_STRING)" \ + -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" + + +resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources + +Japaneselprojdir = $(resourcesdir)/Japanese.lproj + +Japaneselproj_DATA = \ + XDarwinHelp.html \ + InfoPlist.strings \ + Credits.rtf Localizable.strings + +Japaneselprojnibdir = $(Japaneselprojdir)/MainMenu.nib +Japaneselprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib + +InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ + +CLEANFILES = XDarwinHelp.html InfoPlist.strings + +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp diff --git a/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/Makefile.in b/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/Makefile.in new file mode 100644 index 0000000..c37a325 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/Makefile.in @@ -0,0 +1,641 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*- Makefile -*- +# Rules for generating files using the C pre-processor +# (Replaces CppFileTarget from Imake) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/cpprules.in +subdir = hw/darwin/bundle/Japanese.lproj +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(Japaneselprojdir)" \ + "$(DESTDIR)$(Japaneselprojnibdir)" +JapaneselprojDATA_INSTALL = $(INSTALL_DATA) +JapaneselprojnibDATA_INSTALL = $(INSTALL_DATA) +DATA = $(Japaneselproj_DATA) $(Japaneselprojnib_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +BINDIR = ${bindir} +SED = sed +SUFFIXES = .pre .man .man.pre + +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e '/\@\@$$/s/\@\@$$/\\/' + + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ +XORGMANNAME = X Version 11 +XSERVERNAME = Xorg +MANDEFS = \ + -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__appmansuffix__=$(APP_MAN_SUFFIX) \ + -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ + -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ + -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ + -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ + -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ + -D__mandir__=$(mandir) \ + -D__projectroot__=$(prefix) \ + -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ + -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) + +XINITDIR = $(libdir)/X11/xinit +XDEFS = \ + -DX_VERSION="$(PLIST_VERSION_STRING)" \ + -DX_PRE_RELEASE="$(PRE)" \ + -DX_REL_DATE="$(XORG_DATE)" \ + -DX_VENDOR_NAME="$(VENDOR_STRING)" \ + -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" + +resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources +Japaneselprojdir = $(resourcesdir)/Japanese.lproj +Japaneselproj_DATA = \ + XDarwinHelp.html \ + InfoPlist.strings \ + Credits.rtf Localizable.strings + +Japaneselprojnibdir = $(Japaneselprojdir)/MainMenu.nib +Japaneselprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib +CLEANFILES = XDarwinHelp.html InfoPlist.strings +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp + +all: all-am + +.SUFFIXES: +.SUFFIXES: .pre .man .man.pre +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/darwin/bundle/Japanese.lproj/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/darwin/bundle/Japanese.lproj/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-JapaneselprojDATA: $(Japaneselproj_DATA) + @$(NORMAL_INSTALL) + test -z "$(Japaneselprojdir)" || $(MKDIR_P) "$(DESTDIR)$(Japaneselprojdir)" + @list='$(Japaneselproj_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(JapaneselprojDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Japaneselprojdir)/$$f'"; \ + $(JapaneselprojDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Japaneselprojdir)/$$f"; \ + done + +uninstall-JapaneselprojDATA: + @$(NORMAL_UNINSTALL) + @list='$(Japaneselproj_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(Japaneselprojdir)/$$f'"; \ + rm -f "$(DESTDIR)$(Japaneselprojdir)/$$f"; \ + done +install-JapaneselprojnibDATA: $(Japaneselprojnib_DATA) + @$(NORMAL_INSTALL) + test -z "$(Japaneselprojnibdir)" || $(MKDIR_P) "$(DESTDIR)$(Japaneselprojnibdir)" + @list='$(Japaneselprojnib_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(JapaneselprojnibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Japaneselprojnibdir)/$$f'"; \ + $(JapaneselprojnibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Japaneselprojnibdir)/$$f"; \ + done + +uninstall-JapaneselprojnibDATA: + @$(NORMAL_UNINSTALL) + @list='$(Japaneselprojnib_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(Japaneselprojnibdir)/$$f'"; \ + rm -f "$(DESTDIR)$(Japaneselprojnibdir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(Japaneselprojdir)" "$(DESTDIR)$(Japaneselprojnibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-JapaneselprojDATA \ + install-JapaneselprojnibDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-JapaneselprojDATA \ + uninstall-JapaneselprojnibDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install \ + install-JapaneselprojDATA install-JapaneselprojnibDATA \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-JapaneselprojDATA \ + uninstall-JapaneselprojnibDATA uninstall-am + + +.pre: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ + +.man.pre.man: + $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ + +InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp b/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp new file mode 100644 index 0000000..6653f5b --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp @@ -0,0 +1,141 @@ + + + + + + +XDarwin Help + +
+

XDarwin X Server for Mac OS X

+ X_VENDOR_NAME X_VERSION
+ Release Date: X_REL_DATE +
+

Ìܼ¡

+
    +
  1. Ãí°Õ»ö¹à
  2. +
  3. »ÈÍÑË¡
  4. +
  5. ¥Ñ¥¹¤ÎÀßÄê
  6. +
  7. ´Ä¶­ÀßÄê
  8. +
  9. ¥é¥¤¥»¥ó¥¹
  10. +
+
+

Ãí°Õ»ö¹à

+
+
+#if X_PRE_RELEASE +¤³¤ì¤Ï¡¤XDarwin ¤Î¥×¥ì¥ê¥ê¡¼¥¹¥Ð¡¼¥¸¥ç¥ó¤Ç¤¢¤ê¡¤¤¤¤«¤Ê¤ë¾ì¹ç¤Ë¤ª¤¤¤Æ¤â¥µ¥Ý¡¼¥È¤µ¤ì¤Þ¤»¤ó¡£ +¥Ð¥°¤ÎÊó¹ð¤ä¥Ñ¥Ã¥Á¤¬ SourceForge ¤Î XonX ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸¤ËÄó½Ð¤µ¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ +¥×¥ì¥ê¥ê¡¼¥¹¥Ð¡¼¥¸¥ç¥ó¤Î¥Ð¥°¤òÊó¹ð¤¹¤ëÁ°¤Ë¡¤XonX ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸¤Þ¤¿¤Ï X_VENDOR_LINK¤ÇºÇ¿·ÈǤΥÁ¥§¥Ã¥¯¤ò¤·¤Æ²¼¤µ¤¤¡£ +#else +¤â¤·¡¤¥µ¡¼¥Ð¡¼¤¬ 6 -12 ¥ö·î°Ê¾åÁ°¤Î¤â¤Î¤«¡¤¤Þ¤¿¤Ï¤¢¤Ê¤¿¤Î¥Ï¡¼¥É¥¦¥§¥¢¤¬¾åµ­¤ÎÆüÉÕ¤è¤ê¤â¿·¤·¤¤¤â¤Î¤Ê¤é¤Ð¡¤ÌäÂê¤òÊó¹ð¤¹¤ëÁ°¤Ë¤è¤ê¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤òõ¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£ +¥Ð¥°¤ÎÊó¹ð¤ä¥Ñ¥Ã¥Á¤¬ SourceForge ¤Î XonX ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸¤ËÄó½Ð¤µ¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ +#endif +
+
+ËÜ¥½¥Õ¥È¥¦¥§¥¢¤Ï¡¤MIT X11/X Consortium License ¤Î¾ò·ï¤Ë´ð¤Å¤­¡¤ÌµÊݾڤǡ¤¡Ö¤½¤Î¤Þ¤Þ¡×¤Î·Á¤Ç¶¡µë¤µ¤ì¤Þ¤¹¡£ +¤´»ÈÍѤˤʤëÁ°¤Ë¡¤¥é¥¤¥»¥ó¥¹¾ò·ï¤ò¤ªÆɤ߲¼¤µ¤¤¡£ +
+ +

»ÈÍÑË¡

+

XDarwin ¤Ï¡¤ºÆÇÛÉÛ²Äǽ¤Ê¥ª¡¼¥×¥ó¥½¡¼¥¹¤Î X Window System ¤Î¤¿¤á¤Î X ¥µ¡¼¥Ð¡¼¤Î¼ÂÁõ¤Ç¤¹¡£¤³¤Î¥Ð¡¼¥¸¥ç¥ó¤Î XDarwin ¤Ï X_VENDOR_LINK ¤Ë¤è¤Ã¤ÆºîÀ®¤µ¤ì¤Þ¤·¤¿¡£XDarwin ¤Ï¡¤Mac OS X ¾å¤Ç¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Þ¤¿¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤ÇÆ°ºî¤·¤Þ¤¹¡£

+ +

¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Ç¤Ï¡¤X Window System ¤¬¥¢¥¯¥Æ¥£¥Ö¤Ê»þ¡¤¤½¤ì¤ÏÁ´²èÌ̤òÀêÍ­¤·¤Þ¤¹¡£ +¤¢¤Ê¤¿¤Ï¡¤Command-Option-A ¥­¡¼¤ò²¡¤¹¤³¤È¤Ë¤è¤Ã¤Æ Mac OS X ¥Ç¥¹¥¯¥È¥Ã¥×¤ØÀÚ¤êÂؤ¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤Î¥­¡¼¤ÎÁȤ߹ç¤ï¤»¤Ï¡¤´Ä¶­ÀßÄê¤ÇÊѹ¹²Äǽ¤Ç¤¹¡£ +Mac OS X ¥Ç¥¹¥¯¥È¥Ã¥×¤«¤é X Window System ¤ØÀÚ¤êÂؤ¨¤ë¾ì¹ç¤Ï¡¤¥É¥Ã¥¯¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ²¼¤µ¤¤¡£ +¡Ê´Ä¶­ÀßÄê¤Ç¡¤¥Õ¥í¡¼¥Æ¥£¥ó¥°¡¦¥¦¥£¥ó¥É¥¦¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤è¤¦¤ËÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¡Ë

+ +

¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Ç¤Ï¡¤X Window System ¤È Aqua ¤Ï²èÌ̤ò¶¦Í­¤·¤Þ¤¹¡£ +X11 ¤¬É½¼¨¤¹¤ë¥ë¡¼¥È¥¦¥£¥ó¥É¥¦¤Ï²èÌ̤Υµ¥¤¥º¤Ç¤¢¤ê¡¤Â¾¤ÎÁ´¤Æ¤Î¥¦¥£¥ó¥É¥¦¤ò´Þ¤ó¤Ç¤¤¤Þ¤¹¡£ +Aqua ¤¬¥Ç¥¹¥¯¥È¥Ã¥×¤ÎÇطʤòÀ©¸æ¤¹¤ë¤Î¤Ç¡¤X11 ¤Î¥ë¡¼¥È¥¦¥£¥ó¥É¥¦¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Ç¤Ïɽ¼¨¤µ¤ì¤Þ¤»¤ó¡£

+ +

Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó

+

¿¤¯¤Î X11 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¤3 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤òɬÍפȤ·¤Þ¤¹¡£ +¤¢¤Ê¤¿¤Ï¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ÈƱ»þ¤Ë¤¤¤¯¤Ä¤«¤Î½¤¾þ¥­¡¼¤ò²¡¤¹¤³¤È¤Ë¤è¤Ã¤Æ¡¤°ì¤Ä¤Î¥Ü¥¿¥ó¤Ç 3 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤ò¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +¤³¤ì¤Ï¡¤´Ä¶­ÀßÄê¤Î¡Ö°ìÈÌÀßÄê¡×¤Î¡ÖÊ£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¡×¥»¥¯¥·¥ç¥ó¤ÇÀßÄꤷ¤Þ¤¹¡£ +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¤¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤ÏÍ­¸ú¤Ç¡¤¥³¥Þ¥ó¥É¥­¡¼¤ò²¡¤·¤Ê¤¬¤é¥Þ¥¦¥¹¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤ÏÂè 2 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ËÁêÅö¤·¤Þ¤¹¡£ +¥ª¥×¥·¥ç¥ó¥­¡¼¤ò²¡¤·¤Ê¤¬¤é¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤ÏÂè 3 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ËÁêÅö¤·¤Þ¤¹¡£ +¤¢¤Ê¤¿¤Ï¡¤´Ä¶­ÀßÄê¤Ç¥Ü¥¿¥ó 2 ¤È 3 ¤ò¥¨¥ß¥å¥ì¡¼¥È¤¹¤ë¤¿¤á¤Ë»ÈÍѤ¹¤ë½¤¾þ¥­¡¼¤ÎÁȹ礻¤òÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +Ãí¡§½¤¾þ¥­¡¼¤ò xmodmap ¤Ç¾¤Î¥­¡¼¤Ë³ä¤êÅö¤Æ¤Æ¤¤¤ë¾ì¹ç¤Ç¤â¡¤Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤Ç¤ÏËÜÍè¤Î¥³¥Þ¥ó¥É¥­¡¼¤ä¥ª¥×¥·¥ç¥ó¥­¡¼¤ò»È¤ï¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£

+ +

¥Ñ¥¹¤ÎÀßÄê

+

¥Ñ¥¹¤Ï¡¤ ¼Â¹Ô²Äǽ¤Ê¥³¥Þ¥ó¥É¤ò¸¡º÷¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¥ê¥¹¥È¤Ç¤¹¡£ +X11 ¥Ð¥¤¥Ê¥ê¤Ï¡¤/usr/X11R6/bin ¤ËÃÖ¤«¤ì¤Þ¤¹¡£¤¢¤Ê¤¿¤Ï¤½¤ì¤ò¥Ñ¥¹¤Ë²Ã¤¨¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +XDarwin ¤Ï¡¤¤³¤ì¤ò¥Ç¥Õ¥©¥ë¥È¤Ç¹Ô¤¤¤Þ¤¹¡£¤Þ¤¿¡¤¤¢¤Ê¤¿¤¬¥³¥Þ¥ó¥É¥é¥¤¥ó¡¦¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿ÄɲäΥǥ£¥ì¥¯¥È¥ê¤ò²Ã¤¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

+ +

·Ð¸³Ë­¤«¤Ê¥æ¡¼¥¶¡¼¤Ï¡¤¤¹¤Ç¤Ë¼«¤é¤Î¥·¥§¥ë¤Î¤¿¤á¤Ë½é´ü²½¥Õ¥¡¥¤¥ë¤ò»ÈÍѤ·¤Æ¥Ñ¥¹¤òÀßÄꤷ¤Æ¤¤¤ë¤Ç¤·¤ç¤¦¡£ +¤³¤Î¾ì¹ç¡¤¤¢¤Ê¤¿¤Ï´Ä¶­ÀßÄê¤Ç XDarwin ¤¬¤¢¤Ê¤¿¤Î¥Ñ¥¹¤òÊѹ¹¤·¤Ê¤¤¤è¤¦¤ËÀßÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +XDarwin ¤Ï¡¤¥æ¡¼¥¶¡¼¤Î¥Ç¥Õ¥©¥ë¥È¤Î¥í¥°¥¤¥ó¥·¥§¥ë¤ÇºÇ½é¤Î X11 ¥¯¥é¥¤¥¢¥ó¥È¤ò³«»Ï¤·¤Þ¤¹¡£ +¡Ê´Ä¶­ÀßÄê¤ÇÂå¤ï¤ê¤Î¥·¥§¥ë¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¡Ë +¥Ñ¥¹¤òÀßÄꤹ¤ëÊýË¡¤Ï¡¤¤¢¤Ê¤¿¤¬»ÈÍѤ·¤Æ¤¤¤ë¥·¥§¥ë¤Ë°Í¸¤·¤Þ¤¹¡£ +¤³¤ì¤Ï¡¤¥·¥§¥ë¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¥É¥­¥å¥á¥ó¥È¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ + +

¤Þ¤¿¡¤¤¢¤Ê¤¿¤Ï¥É¥­¥å¥á¥ó¥È¤òõ¤·¤Æ¤¤¤ë»þ¡¤X11 ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤ò¸¡º÷¤µ¤ì¤ë¥Ú¡¼¥¸¤Î¥ê¥¹¥È¤ËÄɲä·¤¿¤¤¤È»×¤¦¤«¤â¤·¤ì¤Þ¤»¤ó¡£ +X11 ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ï /usr/X11R6/man ¤ËÃÖ¤«¤ì¤Þ¤¹¡£¤½¤·¤Æ MANPATH ´Ä¶­ÊÑ¿ô¤Ï¸¡º÷¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¥ê¥¹¥È¤ò´Þ¤ó¤Ç¤¤¤Þ¤¹¡£

+ +

´Ä¶­ÀßÄê

+

¡ÖXDarwin¡×¥á¥Ë¥å¡¼¤Î¡Ö´Ä¶­ÀßÄê...¡×¥á¥Ë¥å¡¼¹àÌܤ«¤é¥¢¥¯¥»¥¹¤Ç¤­¤ë´Ä¶­ÀßÄê¥Ñ¥Í¥ë¤Ç¡¤¤¤¤¯¤Ä¤«¤Î¥ª¥×¥·¥ç¥ó¤òÀßÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +¡Öµ¯Æ°¥ª¥×¥·¥ç¥ó¡×¤ÎÆâÍƤϡ¤XDarwin ¤òºÆµ¯Æ°¤¹¤ë¤Þ¤ÇÍ­¸ú¤È¤Ê¤ê¤Þ¤»¤ó¡£ +¾¤ÎÁ´¤Æ¤Î¥ª¥×¥·¥ç¥ó¤ÎÆâÍƤϡ¤Ä¾¤Á¤ËÍ­¸ú¤È¤Ê¤ê¤Þ¤¹¡£ +°Ê²¼¡¤¤½¤ì¤¾¤ì¤Î¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤ÆÀâÌÀ¤·¤Þ¤¹:

+ +

°ìÈÌÀßÄê

+
    +
  • X11 ¤Ç¥·¥¹¥Æ¥à¤Î¥Ó¡¼¥×²»¤ò»ÈÍѤ¹¤ë: ¥ª¥ó¤Î¾ì¹ç¡¤Mac OS X ¤Î¥Ó¡¼¥×²»¤¬ X11 ¤Î¥Ù¥ë¤È¤·¤Æ»ÈÍѤµ¤ì¤Þ¤¹¡£¥ª¥Õ¤Î¾ì¹ç¡Ê¥Ç¥Õ¥©¥ë¥È¡Ë¡¤¥·¥ó¥×¥ë ¥È¡¼¥ó¤¬»È¤ï¤ì¤Þ¤¹¡£
  • +
  • X11 ¤Î¥Þ¥¦¥¹¥¢¥¯¥»¥é¥ì¡¼¥·¥ç¥ó¤òÍ­¸ú¤Ë¤¹¤ë: ɸ½àŪ¤Ê X Window System ¤Î¼ÂÁõ¤Ç¤Ï¡¤¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¡¼¤Ï¥Þ¥¦¥¹¤Î²Ã®ÅÙ¤òÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ + ¥Þ¥¦¥¹¤Î²Ã®ÅÙ¤Ë Mac OS X ¤Î¥·¥¹¥Æ¥à´Ä¶­ÀßÄê¤È X ¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¡¼¤¬°Û¤Ê¤ëÃͤòÀßÄꤷ¤¿¾ì¹ç¡¤¤³¤ì¤Ïº®Íð¤ò¾·¤­¤Þ¤¹¡£ + ¤³¤ÎÌäÂê¤òÈò¤±¤ë¤¿¤á¡¤¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï X11 ¤Î¥Þ¥¦¥¹¥¢¥¯¥»¥é¥ì¡¼¥·¥ç¥ó¤òÍ­¸ú¤È¤·¤Þ¤»¤ó¡£
  • +
  • Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó: »ÈÍÑË¡¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡£¥ª¥ó¤Î¾ì¹ç¡¤¥Þ¥¦¥¹¥Ü¥¿¥ó¤¬Âè 2 ¤Þ¤¿¤ÏÂè 3 ¤Î¥Þ¥¦¥¹¥Ü¥¿¥ó¤ò¥¨¥ß¥å¥ì¡¼¥È¤¹¤ë»þ¤Ë¡¤ÁªÂò¤·¤¿½¤¾þ¥­¡¼¤òƱ»þ¤Ë²¡¤·¤Þ¤¹¡£
  • +
+ +

µ¯Æ°¥ª¥×¥·¥ç¥ó

+
    +
  • ²èÌ̥⡼¥É: ¥æ¡¼¥¶¡¼¤¬¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Þ¤¿¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Î¤É¤Á¤é¤ò»ÈÍѤ¹¤ë¤«¤ò»ØÄꤷ¤Ê¤¤¾ì¹ç¡¤¤³¤³¤Ç»ØÄꤵ¤ì¤¿¥â¡¼¥É¤¬»È¤ï¤ì¤Þ¤¹¡£
  • +
  • µ¯Æ°»þ¤Ë¥â¡¼¥ÉÁªÂò¥Ñ¥Í¥ë¤òɽ¼¨¤¹¤ë: ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¤XDarwin ¤Îµ¯Æ°»þ¤Ë¥æ¡¼¥¶¡¼¤¬¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Þ¤¿¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Î¤É¤Á¤é¤ò»ÈÍѤ¹¤ë¤«¤òÁªÂò¤¹¤ë¥Ñ¥Í¥ë¤òɽ¼¨¤·¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤¬¥ª¥Õ¤Î¾ì¹ç¡¤²èÌ̥⡼¥É¤Ç»ØÄꤷ¤¿¥â¡¼¥É¤Çµ¯Æ°¤·¤Þ¤¹¡£
  • +
  • X11 ¥Ç¥£¥¹¥×¥ì¥¤ÈÖ¹æ: X11¤Ï¡¤°ì¤Ä¤Î¥³¥ó¥Ô¥å¡¼¥¿¾å¤ÇÊÌ¡¹¤Î X ¥µ¡¼¥Ð¡¼¤¬´ÉÍý¤¹¤ëÊ£¿ô¤Î¥Ç¥£¥¹¥×¥ì¥¤¤¬Â¸ºß¤¹¤ë¤³¤È¤òµö¤·¤Þ¤¹¡£Ê£¿ô¤Î X ¥µ¡¼¥Ð¡¼¤¬Æ±»þ¤Ë¼Â¹Ô¤·¤Æ¤¤¤ë»þ¡¤XDarwin ¤¬»ÈÍѤ¹¤ë¥Ç¥£¥¹¥×¥ì¥¤¤ÎÈÖ¹æ¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
  • +
  • Xinerama ¥Þ¥ë¥Á¥â¥Ë¥¿¥µ¥Ý¡¼¥È¤òÍ­¸ú¤Ë¤¹¤ë: XDarwin ¤Ï¡¤Xinerama ¥Þ¥ë¥Á¥â¥Ë¥¿¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£¤½¤ì¤ÏÁ´¤Æ¤Î¥â¥Ë¥¿¤ò°ì¤Ä¤ÎÂ礭¤Ê²èÌ̤ΰìÉô¤È¤ß¤Ê¤·¤Þ¤¹¡£¤¢¤Ê¤¿¤Ï¤³¤Î¥ª¥×¥·¥ç¥ó¤Ç Xinerama ¤ò̵¸ú¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤¿¤À¤·¡¤¸½ºß XDarwin ¤Ï¤½¤ì̵¤·¤ÇÀµ¤·¤¯Ê£¿ô¤Î¥â¥Ë¥¿¤ò°·¤¦¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£¤â¤·¡¤¤¢¤Ê¤¿¤¬°ì¤Ä¤Î¥â¥Ë¥¿¤ò»È¤¦¤À¤±¤Ê¤é¤Ð¡¤Xinerama ¤Ï¼«Æ°Åª¤Ë̵¸ú¤È¤Ê¤ê¤Þ¤¹¡£
  • +
  • ¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¥Õ¥¡¥¤¥ë: ¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¥Õ¥¡¥¤¥ë¤Ïµ¯Æ°»þ¤ËÆɤ߹þ¤Þ¤ì¡¤X11 ¥­¡¼¥Þ¥Ã¥×¤ËÊÑ´¹¤µ¤ì¤Þ¤¹¡£Â¾¸À¸ì¤ËÂбþ¤·¤¿¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¥Õ¥¡¥¤¥ë¤Ï /System/Library/Keyboards ¤Ë¤¢¤ê¤Þ¤¹¡£¡ÊÌõÃí¡§¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¤Ç Japanese ¤òÁªÂò¤¹¤ë¤È¡¤°ìÉô¤Î¥­¡¼¤¬¸ú¤«¤Ê¤¤Åù¤ÎÉÔ¶ñ¹ç¤¬È¯À¸¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£¤³¤Î¾ì¹ç¤Ï USA ¤òÁªÂò¤·¤¿¾å¤Ç ~/.Xmodmap ¤òŬÍѤ·¤Æ²¼¤µ¤¤¡£¡Ë
  • +
  • ºÇ½é¤Î X11 ¥¯¥é¥¤¥¢¥ó¥È¤Îµ¯Æ°: XDarwin ¤¬ Finder¤«¤éµ¯Æ°¤¹¤ë»þ¡¤X ¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¡¼¤È X ¥¯¥é¥¤¥¢¥ó¥È¤Îµ¯Æ°¤Ï xinit ¤ò¼Â¹Ô¤·¤Þ¤¹¡£¡Ê¾ÜºÙ¤Ï "man xinit" ¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡£¡ËXDarwin ¤Ï xinit ¤ò¼Â¹Ô¤¹¤ëÁ°¤Ë¡¤»ØÄꤵ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤ò¥æ¡¼¥¶¡¼¤Î¥Ñ¥¹¤ËÄɲä·¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï /usr/X11R6/bin ¤À¤±¤òÄɲä·¤Þ¤¹¡£Â¾¤Î¥Ç¥£¥ì¥¯¥È¥ê¤òÄɲä·¤¿¤¤¾ì¹ç¤Ï¡¤¥³¥í¥ó¤Ç¶èÀڤäƻØÄꤷ¤Þ¤¹¡£¥æ¡¼¥¶¡¼¤Î¥·¥§¥ë½é´ü²½¥Õ¥¡¥¤¥ë¤òÆɤ߹þ¤à¤¿¤á¤Ë¡¤X ¥¯¥é¥¤¥¢¥ó¥È¤Ï¥æ¡¼¥¶¡¼¤Î¥Ç¥Õ¥©¥ë¥È¥í¥°¥¤¥ó¥·¥§¥ë¤Çµ¯Æ°¤µ¤ì¤Þ¤¹¡£É¬ÍפǤ¢¤ì¤Ð¡¤Âå¤ï¤ê¤Î¥·¥§¥ë¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
  • +
+ +

¥Õ¥ë¥¹¥¯¥ê¡¼¥ó

+
    +
  • ¥­¡¼ÀßÄê¥Ü¥¿¥ó: X11 ¤È Aqua ¤òÀÚ¤êÂؤ¨¤ë¤¿¤á¤Ë»ÈÍѤ¹¤ë¥Ü¥¿¥ó¤ÎÁȤ߹ç¤ï¤»¤ò»ØÄꤷ¤Þ¤¹¡£ + ¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¡¤Ç¤°Õ¤Î¿ô¤Î½¤¾þ¥­¡¼¤Ë³¤¤¤ÆÄ̾ï¤Î¥­¡¼¤ò²¡¤·¤Þ¤¹¡£
  • +
  • ¥É¥Ã¥¯¤Î¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç X11 ¤ËÌá¤ë: ¥ª¥ó¤Î¾ì¹ç¡¤¥É¥Ã¥¯¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç X11 ¤Ø¤ÎÀڤ괹¤¨¤¬²Äǽ¤È¤Ê¤ê¤Þ¤¹¡£Mac OS X ¤Î¤¤¤¯¤Ä¤«¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï¡¤¥É¥Ã¥¯¤Î¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç Aqua ¤ËÌá¤Ã¤¿»þ¡¤¥«¡¼¥½¥ë¤¬¾Ã¼º¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£
  • +
  • µ¯Æ°»þ¤Ë¥Ø¥ë¥×¤òɽ¼¨¤¹¤ë: XDarwin ¤¬¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Çµ¯Æ°¤¹¤ë»þ¡¤¥¹¥×¥é¥Ã¥·¥å¥¹¥¯¥ê¡¼¥ó¤òɽ¼¨¤·¤Þ¤¹¡£
  • +
  • ¿§¿¼ÅÙ: ¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Ç¤Ï¡¤X11 ¥Ç¥£¥¹¥×¥ì¥¤¤¬ Aqua ¤È°Û¤Ê¤ë¿§¿¼ÅÙ¤ò»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¡ÖÊѹ¹¤Ê¤·¡×¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¤XDarwin ¤Ï Aqua ¤Ë¤è¤Ã¤Æ»ÈÍѤµ¤ì¤ë¿§¿¼ÅÙ¤ò»È¤¤¤Þ¤¹¡£¤³¤ì°Ê³°¤Ë 8¡¤15 ¤Þ¤¿¤Ï24 ¥Ó¥Ã¥È¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
  • +
+ +

+¥é¥¤¥»¥ó¥¹ +

+XDarwin ¤Î¼çÍפʥ饤¥»¥ó¥¹¤ÏÅÁÅýŪ¤Ê MIT X11/X Consortium License ¤Ë´ð¤Å¤­¤Þ¤¹¡£ +¤½¤ì¤Ï½¤Àµ¤Þ¤¿¤ÏºÆÇÛÉÛ¤µ¤ì¤ë¥½¡¼¥¹¥³¡¼¥É¤Þ¤¿¤Ï¥Ð¥¤¥Ê¥ê¤Ë¡¤¤½¤ÎÃøºî¸¢/¥é¥¤¥»¥ó¥¹É½¼¨¤¬¤½¤Î¤Þ¤Þ»Ä¤µ¤ì¤ë¤³¤È¤òÍ׵᤹¤ë°Ê³°¤Î¾ò·ï¤ò¶¯À©¤·¤Þ¤»¤ó¡£ +¤è¤ê¿¤¯¤Î¾ðÊó¤È¡¤¥³¡¼¥É¤Î°ìÉô¤ò¥«¥Ð¡¼¤¹¤ëÄɲäÎÃøºî¸¢/¥é¥¤¥»¥ó¥¹É½¼¨¤Î¤¿¤á¤Ë¡¤¥½¡¼¥¹¥³¡¼¥É¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡£ +

+ +X Consortium License

+

Copyright (C) 1996 X Consortium

+

Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without +limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to +whom the Software is furnished to do so, subject to the following conditions:

+

The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software.

+

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE.

+

Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization from +the X Consortium.

+

X Window System is a trademark of X Consortium, Inc.

+ + diff --git a/xorg-server-1.4/hw/darwin/bundle/Makefile.am b/xorg-server-1.4/hw/darwin/bundle/Makefile.am new file mode 100644 index 0000000..dee34fd --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Makefile.am @@ -0,0 +1,38 @@ +BINDIR = ${bindir} +include $(top_srcdir)/cpprules.in +XINITDIR = $(libdir)/X11/xinit +XDEFS = \ + -DX_VERSION="$(PLIST_VERSION_STRING)" \ + -DX_PRE_RELEASE="$(PRE)" \ + -DX_REL_DATE="$(XORG_DATE)" \ + -DX_VENDOR_NAME="$(VENDOR_STRING)" \ + -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" + +SUBDIRS = English.lproj Dutch.lproj French.lproj German.lproj Japanese.lproj \ + ko.lproj Portuguese.lproj Spanish.lproj Swedish.lproj + +bin_SCRIPTS = startXClients + +startXClients: $(srcdir)/startXClients.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) -DXINITDIR=$(XINITDIR) -DXBINDIR=$(BINDIR) $< | $(CPP_SED_MAGIC) > $@ + -chmod 755 startXClients + +contentsdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents +resourcesdir = $(contentsdir)/Resources + +contents_DATA = Info.plist +resources_DATA = XDarwin.icns startXClients + +install-data-hook: + chmod 755 $(DESTDIR)$(resourcesdir)/startXClients + echo "APPL????" > $(DESTDIR)$(contentsdir)/PkgInfo + touch $(DESTDIR)@APPLE_APPLICATIONS_DIR@/XDarwin.app + +uninstall-hook: + rm -rf $(DESTDIR)$(contentsdir)/PkgInfo + +CLEANFILES = startXClients + +EXTRA_DIST = \ + XDarwin.icns \ + Info.plist diff --git a/xorg-server-1.4/hw/darwin/bundle/Makefile.in b/xorg-server-1.4/hw/darwin/bundle/Makefile.in new file mode 100644 index 0000000..14c64c4 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Makefile.in @@ -0,0 +1,827 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*- Makefile -*- +# Rules for generating files using the C pre-processor +# (Replaces CppFileTarget from Imake) + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/cpprules.in +subdir = hw/darwin/bundle +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(contentsdir)" \ + "$(DESTDIR)$(resourcesdir)" +binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(bin_SCRIPTS) +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +contentsDATA_INSTALL = $(INSTALL_DATA) +resourcesDATA_INSTALL = $(INSTALL_DATA) +DATA = $(contents_DATA) $(resources_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +BINDIR = ${bindir} +SED = sed +SUFFIXES = .pre .man .man.pre + +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e '/\@\@$$/s/\@\@$$/\\/' + + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ +XORGMANNAME = X Version 11 +XSERVERNAME = Xorg +MANDEFS = \ + -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__appmansuffix__=$(APP_MAN_SUFFIX) \ + -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ + -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ + -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ + -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ + -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ + -D__mandir__=$(mandir) \ + -D__projectroot__=$(prefix) \ + -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ + -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) + +XINITDIR = $(libdir)/X11/xinit +XDEFS = \ + -DX_VERSION="$(PLIST_VERSION_STRING)" \ + -DX_PRE_RELEASE="$(PRE)" \ + -DX_REL_DATE="$(XORG_DATE)" \ + -DX_VENDOR_NAME="$(VENDOR_STRING)" \ + -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" + +SUBDIRS = English.lproj Dutch.lproj French.lproj German.lproj Japanese.lproj \ + ko.lproj Portuguese.lproj Spanish.lproj Swedish.lproj + +bin_SCRIPTS = startXClients +contentsdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents +resourcesdir = $(contentsdir)/Resources +contents_DATA = Info.plist +resources_DATA = XDarwin.icns startXClients +CLEANFILES = startXClients +EXTRA_DIST = \ + XDarwin.icns \ + Info.plist + +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .pre .man .man.pre +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/darwin/bundle/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/darwin/bundle/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ + else :; fi; \ + done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-contentsDATA: $(contents_DATA) + @$(NORMAL_INSTALL) + test -z "$(contentsdir)" || $(MKDIR_P) "$(DESTDIR)$(contentsdir)" + @list='$(contents_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(contentsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(contentsdir)/$$f'"; \ + $(contentsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(contentsdir)/$$f"; \ + done + +uninstall-contentsDATA: + @$(NORMAL_UNINSTALL) + @list='$(contents_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(contentsdir)/$$f'"; \ + rm -f "$(DESTDIR)$(contentsdir)/$$f"; \ + done +install-resourcesDATA: $(resources_DATA) + @$(NORMAL_INSTALL) + test -z "$(resourcesdir)" || $(MKDIR_P) "$(DESTDIR)$(resourcesdir)" + @list='$(resources_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(resourcesDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(resourcesdir)/$$f'"; \ + $(resourcesDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(resourcesdir)/$$f"; \ + done + +uninstall-resourcesDATA: + @$(NORMAL_UNINSTALL) + @list='$(resources_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(resourcesdir)/$$f'"; \ + rm -f "$(DESTDIR)$(resourcesdir)/$$f"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(SCRIPTS) $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(contentsdir)" "$(DESTDIR)$(resourcesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-contentsDATA install-resourcesDATA + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook + +install-dvi: install-dvi-recursive + +install-exec-am: install-binSCRIPTS + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binSCRIPTS uninstall-contentsDATA \ + uninstall-resourcesDATA + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-data-am install-strip uninstall-am + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binSCRIPTS \ + install-contentsDATA install-data install-data-am \ + install-data-hook install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-resourcesDATA install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binSCRIPTS uninstall-contentsDATA uninstall-hook \ + uninstall-resourcesDATA + + +.pre: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ + +.man.pre.man: + $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ + +startXClients: $(srcdir)/startXClients.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) -DXINITDIR=$(XINITDIR) -DXBINDIR=$(BINDIR) $< | $(CPP_SED_MAGIC) > $@ + -chmod 755 startXClients + +install-data-hook: + chmod 755 $(DESTDIR)$(resourcesdir)/startXClients + echo "APPL????" > $(DESTDIR)$(contentsdir)/PkgInfo + touch $(DESTDIR)@APPLE_APPLICATIONS_DIR@/XDarwin.app + +uninstall-hook: + rm -rf $(DESTDIR)$(contentsdir)/PkgInfo +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/Credits.rtf b/xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/Credits.rtf new file mode 100644 index 0000000..8dcddc2 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/Credits.rtf @@ -0,0 +1,171 @@ +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique; +} +{\colortbl;\red255\green255\blue255;} +\vieww5140\viewh4980\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Contributors to Xorg Foundation Release: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Kaleb KEITHLEY\ + +\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys. +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\f1\b \cf0 Contributors to XFree86 4.4: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Harper\ + +\f2\i Rootless acceleration and Apple-WM extension +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Contribuidores do XonX ao XFree86 4.3: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Fabr\'92cio Luis de Castro +\f1\b \ + +\f2\i\b0 Localiza\'8d\'8bo para o Portugu\'90s\ + +\f0\i0 Michael Oland\ + +\f2\i New XDarwin icon +\f1\i0\b \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Contribuidores do XonX ao XFree86 4.2: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Suporte para o Darwin x86\ + +\f0\i0 Pablo Di Noto\ + +\f2\i Localiza\'8d\'8bo para o Espanhol +\f0\i0 \ +Paul Edens\ + +\f2\i Localiza\'8d\'8bo para o Holand\'90s +\f0\i0 \ +Kyunghwan Kim\ + +\f2\i Localiza\'8d\'8bo para o Coreano +\f0\i0 \ +Mario Klebsch\ + +\f2\i Suporte para teclados Non-US +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i L\'92der de Projeto +\f0\i0 \ +Andreas Monitzer\ + +\f2\i Localiza\'8d\'8bo para o Alem\'8bo +\f0\i0 \ +Patrik Montgomery\ + +\f2\i Localiza\'8d\'8bo para o Sueco +\f0\i0 \ +Greg Parker\ + +\f2\i Suporte ao modo Compartilhado (Rootless) +\f0\i0 \ +Toshimitsu Tanaka\ + +\f2\i Localiza\'8d\'8bo para o Japon\'90s +\f0\i0 \ +Olivier Verdier\ + +\f2\i Localiza\'8d\'8bo para o Fran\'8d\'90s +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Agradecimentos Especiais: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Devin Poolman and Zero G Software, Inc.\ + +\f2\i Instalador +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Membros do Time XonX\ +Contribuindo com o XFree86 4.1: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Suporte ao Darwin x86\ + +\f0\i0 Torrey T. Lyons\ + +\f2\i L\'92der de Projeto +\f0\i0 \ +Andreas Monitzer\ + +\f2\i Vers\'8bo Cocoa da interface XDarwin +\f0\i0 \ +Greg Parker\ + +\f2\i Implementa\'8d\'8bo Original +\f0\i0 +\f2\i ao Quartz \ + +\f0\i0 Christoph Pfisterer\ + +\f2\i Bibliotecas Din\'89micas Compartilhadas +\f0\i0 \ +Toshimitsu Tanaka\ + +\f2\i Localiza\'8d\'8bo para o Japon\'90s +\f0\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Agradecimento Especial: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Tiago Ribeiro\ + +\f2\i \'eacone do XDarwin +\f0\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Hist\'97rico: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Carmack\ + +\f2\i Suporte Original do XFree86 no Mac OS X Server +\f0\i0 \ +Dave Zarzycki\ + +\f2\i Suporte ao +\f0\i0 +\f2\i XFree86 4.0 no Darwin 1.0 +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Integra\'8d\'8bo dentro do Projeto XFree86 na vers\'8bo 4.0.2} \ No newline at end of file diff --git a/xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/Localizable.strings b/xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..c79b282f6460bd155a8b2de19f2e88b2ebbd0554 GIT binary patch literal 1504 zcwUv1+iufP5Jl&iudphfDrz@DqNoTVF69YCQH#i{>o{#7aa`LWz$f=3fHm83eF;HA zmd|D8%*>uWbIz~d7TKW%c5W*xtg^LT^QTtw2ev?(Sj;@PpGc<2zA+c*=jbx#fO*DP zVqGB3@Zi$5e7MDx{a~!@Mn2!;FJb;*7mO4B8FucgVx2NiEo5~FvIkpq4>|XiQz_q5 zdt#@^zT+jbT(;MYu`P)hak3P`8fQe*4dWDj!OHPPAX+QVf-{kw3A5)|ayn#Hd;Nm$ zU5|knOScIJ**+p#U?b#X=CK{~jj$eR9NP)fW5(0%_?XWban3y}=jV)!a^>3O-eiAC zoJw&Uu4C;AF_yE-*e&ku4(ucO&83~FGA$o3&<6IL|3G;sk``jey|<_5@UxP1BCBUT zL@8*i|He~o8Ed;?h%Zo$7P77+S;{8XE|70$t55~Adw=fdvv!Vp!|sA}rL2}h)$fyV zFAuec{apAB@SeCc@7x+&(;a@|7Gy5D)jcY9V#o5kqLbE;p+*l(*l zkmF{|agM5a3jn)x;RX2N1+A)MLkr m*+lN6su81gCKv}PB5aw2$(>>EOlK|e|-amfd zXW*o}&!ehNRh_Cjb-I(4AG|vtd-R|tOFou)I84Wc!{MUJ>WSl~)XbLM!SPa1V&tQ6 zxKm}ds3DOC(WN4!2UVY_9I`Z=F$RZ1x9Xs#_-E0jVfy2O>0<){ui}=1it3L>qG75m zGN4ypW%Xp)ADS4HeJo?uQUsVIsuuN}I%R`nL&=EjS^hvX19MnY+R#7Lr=lCRTPBa<`KWaP%EnP*+WM#hW zsSZj(8Jd7Q@Gr{gS%nm2S9n#O1ETYius;%cBE5IkFI3fsoypnz)^8<*tXp?(c$M<} zAi~Q$wqo(Q(RZrS*}$sv#AZ+%>fo_*9gAUB>*FPuZs z%*yIp6~9NFr=zH%QBF_qX_~Y^)?Cw6kEFW-k|wz(XtEy!*b%HIL#XI2iac*fIGkTu z4GI%b{T^8(Tz#`EtH-JHhi+*IZ^6gTmDSUv8tk3Lt0IjgT!4C6YyE^*HD)%5^)fCL z461&@2UV#4pr(3o7==VDGa-i?JNswnkY^bD!*1dzj7NDpu$W6F(DF}n$Xy~onVABD4T8*!!k zmpRa@FO)MeGKqwUn<&IXByv5`;I|*{Wq?9!3&Ye+*3$<`h z;}}ME^`W3lV`A%YAr!(AdZV!)peesfpy@8q+yEfGWG?&;0x~y|o-SN3KohVYpc^lx z@Fg#WFHay#cK7G$PelTe4s>X~4)R8by&Z*9u2Fl?A1FuL4l8Dw=`u(FR))g%VCx)u30_b&i5sDCh$>3KWrbLed;=>C%P>>b%f= z>mN-#Z7wMZQym@~gbN#|1btF~51lFpin)J{KP_!!*>8q(Z!5dvXP3KwIe9V}N=SBZ z@_+L~tzzGUl!yyTe<(emWVX{U^~Y|bnVFfF=I7_Li!Z)->y=ktc?`;lfddEbEG#Vi z9i_A!`eZo9vPfoK+j?|H8ruava)xf&rIl>-3}a1 zFVJxHjW^!7Z_%PfvBw^J>{M%O>*+V%c;n38y?bLjckVpBe*OAW2oL%k1XxwhvGx_{ zEgm&$)Z++a_3G89T3T9SyLa!70i4*refwf>zWFA?iaq-1qo?k<=bjk!-I|e+aghZB z=ZW-@+}zx2R8>9H)YKGPyLRpA=bn2mwsq@PUbb!97TdCAOKkJz%`u?q%!3a;7}GTE zYoO^C3r-e-z?-6?qB|`Zr=EZQ`54S8wtf3{enmJhyzm0QV%wTEYfdd+zC3op1sB|F z!9iNkZqpt;dT1LqY>2^p+HgKN59G^RZ@m?t*K4o67TdFDPYh^nd*+#EVwYZe=~Bm> zuypFyt($-2#*NtT^t!1r`jPTLH*w=86?7j_lvRKL#*PA31U)cI?=(*w#V&8uI zZS1SBzKR__eE5uMnz324X1$t~m30%014ye5$*umNO7PEOA6uD<%}E%WEk-w%3yBolu55Xt93~PNr3luyEcwl;1!>+2YtGQ076o#e&h5B>3X|v0>#wxe&?~ zP;LPJPlJMUxDm=viLfDs9l&t@*!)7hKw0##3f|-R9MazSLTW=U!PV-x&*1l<8QGg? zrd1D}X^wRde4)i$a}a7L+QX`c8rsXQ&+bb5+7>4J1$sgJ{$<+F0duee=F~(z|LJ7? z%lqzLLN4uUU%}6C*Ga%}M*kaPm;?No(&+0+4k(+ur-Xxx*xu(V^ga<7$vx=_9%b3i zwuI5!8D;2f;dfFv;Pjx^OjcnFDQOT(+kw8UyH#(Ugtv1QJtTQy6W01Tgat0YQW?d_%3_QKRwhR)M_}q@XU4`u zlU|jrn|!jSx;&DL`+Epfrk9mDf|SlJ^K`DEtVpw_?V92sC z(909B3R-A9*69|6AZMK9o-<2RLw=74cW5-;-Z>Z#f{sPg@fUYzbV(5kU`bKh44uK( zO=ESJJ(n&r=Y%d8tKAh+=Bj+(CWSId$o_JJ0qVkI=Ck?ZgBg8<9OD^0rhR6U5af$i6y}3HH?@wE<$QtsS7}CGp@42 z$g#6SdQj3zOG^{f^>b`Aco@lliM>Yn1&)O8C?GQLFYdDt`9KSK{#}f`!b9CxN*V^H zBj<=O8tVZWs(x619z~Obt!2i&Z~L{yhv2RjUy0pClAO?pTV zwXW8jMr>$mlwQgWSrU7?+^nNH3d#cH$V33{99_ysMi0>cmDL=U%*ev;$H);0M&iaY zBZJX;Mt+9?@Y>K{fZ&bY%NdO_vKkxlYO7>8x3+f77`NL^;tPpSV9><)0{7$IOjCTa z0%i~tq{6FU(nCi(_&t`oy(Q0yFZDGEZCU}gqsNM1YOJ}zXmlDm(}H1`pwvFrw^ zM)4}Jc3gTWplTp0$>nR^nx=$6u1eQwzB%vD=vqb_5i?!| zW*`sHIZ`h7Rt&h`9dCC zlrmI$9W-B?lzng*gwNxc!A!cr;t$|3+Ylk52j0shCV=-wYiE%)m+mZ_M^gSY7<-nDfeRZdM@SbOWNZS zr?WIcXX_f+|I3JHyy~9gXr8h>8TPBQVId4C-iyL7fzrC{MyvsezjV zVtdZW?w1-W;|~6nk#~UB-_f_B(m{GST%0rp6CNz1Ok|?1kc1a*hvx|0>xMpH18 z(Lr2o2bCnDar&cDJGO-d<&o^g>~dqe=&Z49ZJOG~J#KuSMU2+~&>71QlPTcz};J#-;!z8EYxrck4`z+6MpS{p`IX%wRKTUQDmBJ~U)g=Fe+u`W` z*J0lkPqJpBpjs0aCd9}I9tfQ%X=v@h!t}R7hjFqTK;u%aV3Jg7*Qlsz()oF=m11^a z1qCVR3R2!N)?rn$=2L=-CQw+03=FVa_6mWCu-d1FbU8tQp5(X$@@?(%X}iTI+qAWC zX)t1NIXrL4<9VCFT`3X3kFN8Dyb0?+8OabwG2mY>8wV}}tw)O7T7=vL%52ox7F%b7 zj5PDL*<9Svau%KKJ6ZK8wTc_Ub#&dHxO*yhtjq<@mHAa1NkKt%4I$MvP6QA?#$wqR zKUQP(7$!V=%ubFTv#aZr+F%0y!Xz$-zdL7QbvsY1p24K)&i{jCslA!UtvxJ!ayg~6 z>|BM2~_)t&bFd@(GuXU~o)iV~YMXAXac`!l!RdTXq_ zy!>!hR@U_vjCe9ICnrb3erwmR{l`l$z0|g6&mK(XwY~iE%Wbc`@=DvQufEFb@E-b{ z&@?SpR8$mo(87~UP#0XWVg)AXPGWNHop;`e;q~pe-{$w2D8mFE-UFVK4?Xk{CKU~f z9|!~eA|?ZW_3*pVhPJ1kdMY+((4dEiNNmO7^z7NQ9_EeX+g^O} zMV_eLwQE<*d5>3o1{&KikvU|@kkzShdiCm6kGP<3+v~5t&Xd1(!9=Nj#RMwAS1g#6v z0})9|goFCnB|AI&c33yBu3EL~=o3#oaTN6Icyn`eT7kA>psz7ZcSZO|9j`ame1 zNpcbx*BU0gdqL?#L@e4~>0|XlzF>GOlED8TCri<*<))?xa;!AuK0GEk^5i{Jb$vJBngqzn|Dv-;pKSFzzKe3`zbBQp~aKd zp~aI8+pGz1GpZ_$!-ot;mIHEQMwO9Bw&x;|jQlBn)bE=nXuBc0)yju1JfWUyP%?kPXL6BMl z&zLpysOc{eIB_?3l*vnyy9Dwcz@Gfp1V5RJ?WA;CCv5{gOmtn(}<5MiIF>33UuvopjvI$lBxs z?PZ{rXo!>15bg+9t*#iqg4_3Q1B@lGYEh{Z=cUX_g>IsTh_Deolui|af z?54gJQ4=esr45ZT@-f4=Aj0q;Z5>`y#FgL(o-qx1_0RQ0tQB$cRbUyAQpN4px%~}i z!lnaEV{|=@rdrj@&cmwWG3GxU@_C`-7ZNt50p4bE0`G9d@w2Et>_0~?tA$0RhMeZ z1le?~>)>+*9B}SWA#AW+t2DV*)>@nWZnV6mrDy#V;`_nwT#a6-^>I~CKl&@uLp46x zA4;72MK~WAc?V`r_@^#2acKbrw`_eb@xP#<%M^FWix%7=K3W&;Xe1-Moudov)3#|L zi1W^c@BFFi3X5CTv=p-L>WD1#cF5BY)t+A~YG|t4kgvRAu z=fUs_b*+;i@38prX1uJ|;x{RrtOXr%%P}N(s+<_{i*t=QA5IClITa8?Sl>&{KNnbQ zKtQnuxX))mc7^J-`p-R!UVP>p)1_MW%GOIxTs3gC)S>vS6X@LWFbXHrv78QrkoF`5 zRD{CDw`5>-2Jrg}JXB{S#%ZCjQ)J}xRABE|Ci8GK-s_L;_i0M>Kt7Dc6Xi78-bpM? znj_w2z%jW(kH?Br=p^e%uRRMRxGv|<#4jlnzpcvPema`Po~Y5>WVq2>J`Oh4&|8hc z0}Zv+7(UeKe8`wxX@I->YeUK#GmI9+-OYvIZtA(asdr&Rd+x>x;tTENo^m?NXxG#) zbPDa4WSq!KdN_`S(@@33%Rx38Sr1B91b5c6dq%sTC8~_0FCN9{Z_)k0?-caudx>!= zQKh1_u66}sN2|eakSWBs{M7;o#vShti8EykfK@O&_7=kqA%{T(2k`uLc#6 z68q%Ktex*=V@q9wuhaDoUj^a;E=HS()PtgL7RJl`M=&`po5d8u< zx~^bl8Zj_nE`&@#cPZbqfJNnzKCV2W-huXGQ)d84dpiP1hT0*%+gbyRMuFf}h(jD> zV~E7a#y7G-#s3Cn6O_$o3*s1gKFTA8=F~tfNzROHv12nvwgQ&DRuBf=3{YddOrK%& zJ7g?qF*Y_Ccx(?r2qQqEzN(PhS=g8=1qgaW#Y zNP)7QZ}rMx86HLhj64Awhx+4}^Dv7}=dZz4R*Uc`9#SRNG!@HikiE=$^0`MX9w5U9 zon=)c{PTXvDQ|t^<3U@tgZZ0N8THZaV|e}q_!I2)z)_PL1Q`(d zEi;})uJ2d|jL8(tew(w2oI(loKVnVt)=?P^9Vg%Z{WL~Pr`UK|kOIzBiHw;$ZnqU0HI zSkrl2TPJ%1@wj%GF|a=>REyCBx@7F%Zrm}$7%|Ye3g`5-aBuI&Da*_#7$81rtPc$4 zR23#IbHF=1PQ#8A3dmcGFr*+G)^@EPU7xXe@uEesqx@GC*_(~*-N9(Nk%j1wAo>ZT zjeR@d;Q$hG2{4N0LPsNP@b9drW4H-1OoWf`42{q=hG0${hr6#3!iFZ}&KXAKBx6&P z(GB7LW}&gL1-cJ{{e!{DLXn*m>uE658|#~l?K_O)hm6sqprrwYxeJL{3B$;{pa5`L zywD;dU$8)i08tl&!1fG479g$-DEie+#;EP^@CZJ@)|Fo8h~| zt_5hRFV$UB=J`QsjN1hcyEi}_oI>`9sL@$)GhS7Oh{;ie3M{KgBXfE(P=K&2h3ugg zk^IY44vuCcIDU5-4!;4GXk4IGf&j;>q)}s^6C|MMl|p1W!0MJVm!C$Br_*QyZFh=c z8!k`&DSFgckS;<-mZ$0#z$i%XIKfFDJReSDQ{R+9eDYU@9cvnGBCsVxFub8XHSEj- zD`@@967qI|*ZN*MYV=D{D|!)D;7h|oaW8Swc?EXpoPGhnp0MTe?GgyRnBsx2su8Ie(x&$&D{T1>97Gg^hP&zo79cs$#ho=gc zbN)B&h#U-?m_R(~hIP#;yxZZ#{?B%S-)@8fZz}=3@lUSLc#GQ&^j)V@@DA7Qg9=sj(&Lp!d8H;hD`{t}?5x+R^U#PpdcTei=t5QV$l3%ArU~-#!w$_ewnhyFxdU@_ zet#LNPo3g%68(2hG@jkS7A$ExyRmyu>^>z}Cu@#Bnxi{<9pJq}e(VR6PU{s8cjug* z5(;|dpi>5n{%O-PVV*mAfN8V%AFDyQ&)fC6^L1giP#WFAJcw>pNc-n35)1No_Xf0Ha1^LO#mfN{}WY z7{JlM99H*<)lprdA-$cO_u!*nLZ+V6!9MRiDnXRZk6rH zO$H>%ljB=V1X0X+hO-ArRl__SP|5`Z(_|0T=s~+k9?vwjN($CFVe@A6I7RVh;rkP< zXv%xm2$L)hsAWyJ47)=?xNWiejp(?a%2~z#unE4wpGFHtsXh5y^kdy_*()?5t(WC0 zYC&t$+K$_TO2dt|vTH(wX(M@zDM2Fu+ zLa&r3jE~4}##=Tc(W0fApUZ+VOj^}EnDp4eq}8&l-TKv=nt7C9S&@n)`?Lm|3alpl z3tsV-^_E@ngIgAw6>r)gnz{t6Ke?6C{H$#{U?mHICi|F1tGx#QY!G;ZX{v3QqYaTp zMz(}A#wc+8&;&vF&7q9mWiDW}&fLi8a+A@$j2tt0)*@`OjC@8PFk2Y?CA3_|$kT8+ zz-S+ne`Hb%PpyosGLM5LfvTfHb2Myf&4G;0g~ug~-f31bdIP{IWb{8wOlpz+@YIdb zRVL4EEjDo*PG>^fr;ILu%SDVfnoZy-;r6^C9o&D;=so5kMlXQzl+oY7z}H8b zyBK-Uyo1pxCST!AaQTwaUqRzaM&0oA7NaF_`Iyo9aCwK(ZqWAbugt@YmO%wr+WSpR zjFD%celerB!&8jWU&G~*i_K>l`7gM8qQ5zU(V&UvlH{O?Z>&%S=;+Mo{U-Ric~G^3 zk^eSlFgg)>J?1ibuHas{eBBc&K4bLX%mPM#3ip{^p!V&B@at4Q{Q46kr%j$uIA!vb z3^QvPt%i>9zXz1R++(h0!~}Fb7=6eb#VA0>&rg33mo30PGmFumn1FvNRAkRGF*!+P zlcy#A36~?f*`Lvn$rBVO;c~dp?8~SRdXo#y35-sFy4@fza~~ty&25ZICO@D;9yc@c zoyoH_zk|zXzW_3_8C?SRdwyo})W#XOG%-5c#3UL0t=Y^d60(hvKbZeybcBgnGwLzj zjQ$+zPcs@dF@r`nnaiko38N}J?qp;uT-E|7>2r*ruH+)bwT!d@%3??(6JqYdT>Mz4UT*BJQ-E>EL|9bK~G4di@K=}8Wup0khf+ZUdXf9y%VUwSJd<#z(f`&jZK)_6$ z(O;N%GI|r#XEOTlW-ms)CQtCJfDylD^ft4S(VL+;m(ly6D#GX-ct=Z$hjQ zfGQZe+Ef{xVXk3x88m*wXuS!F`T^X(0WvU$GpeC@7_Bj3DUF8uZy8-|f;wJlE@bo$ za}uM|p!Nesd%BP$Q;I~4)>=RjhGdT tUT1D+w4XVh(W&O`j8=kydaMz){U0pvI&oZu>Q $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ + +CLEANFILES = XDarwinHelp.html InfoPlist.strings + +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp diff --git a/xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/Makefile.in b/xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/Makefile.in new file mode 100644 index 0000000..6afc355 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/Makefile.in @@ -0,0 +1,641 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*- Makefile -*- +# Rules for generating files using the C pre-processor +# (Replaces CppFileTarget from Imake) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/cpprules.in +subdir = hw/darwin/bundle/Portuguese.lproj +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(Portugueselprojdir)" \ + "$(DESTDIR)$(Portugueselprojnibdir)" +PortugueselprojDATA_INSTALL = $(INSTALL_DATA) +PortugueselprojnibDATA_INSTALL = $(INSTALL_DATA) +DATA = $(Portugueselproj_DATA) $(Portugueselprojnib_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +BINDIR = ${bindir} +SED = sed +SUFFIXES = .pre .man .man.pre + +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e '/\@\@$$/s/\@\@$$/\\/' + + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ +XORGMANNAME = X Version 11 +XSERVERNAME = Xorg +MANDEFS = \ + -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__appmansuffix__=$(APP_MAN_SUFFIX) \ + -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ + -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ + -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ + -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ + -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ + -D__mandir__=$(mandir) \ + -D__projectroot__=$(prefix) \ + -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ + -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) + +XINITDIR = $(libdir)/X11/xinit +XDEFS = \ + -DX_VERSION="$(PLIST_VERSION_STRING)" \ + -DX_PRE_RELEASE="$(PRE)" \ + -DX_REL_DATE="$(XORG_DATE)" \ + -DX_VENDOR_NAME="$(VENDOR_STRING)" \ + -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" + +resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources +Portugueselprojdir = $(resourcesdir)/Portuguese.lproj +Portugueselproj_DATA = \ + XDarwinHelp.html \ + InfoPlist.strings \ + Credits.rtf Localizable.strings + +Portugueselprojnibdir = $(Portugueselprojdir)/MainMenu.nib +Portugueselprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib +CLEANFILES = XDarwinHelp.html InfoPlist.strings +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp + +all: all-am + +.SUFFIXES: +.SUFFIXES: .pre .man .man.pre +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/darwin/bundle/Portuguese.lproj/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/darwin/bundle/Portuguese.lproj/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-PortugueselprojDATA: $(Portugueselproj_DATA) + @$(NORMAL_INSTALL) + test -z "$(Portugueselprojdir)" || $(MKDIR_P) "$(DESTDIR)$(Portugueselprojdir)" + @list='$(Portugueselproj_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(PortugueselprojDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Portugueselprojdir)/$$f'"; \ + $(PortugueselprojDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Portugueselprojdir)/$$f"; \ + done + +uninstall-PortugueselprojDATA: + @$(NORMAL_UNINSTALL) + @list='$(Portugueselproj_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(Portugueselprojdir)/$$f'"; \ + rm -f "$(DESTDIR)$(Portugueselprojdir)/$$f"; \ + done +install-PortugueselprojnibDATA: $(Portugueselprojnib_DATA) + @$(NORMAL_INSTALL) + test -z "$(Portugueselprojnibdir)" || $(MKDIR_P) "$(DESTDIR)$(Portugueselprojnibdir)" + @list='$(Portugueselprojnib_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(PortugueselprojnibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Portugueselprojnibdir)/$$f'"; \ + $(PortugueselprojnibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Portugueselprojnibdir)/$$f"; \ + done + +uninstall-PortugueselprojnibDATA: + @$(NORMAL_UNINSTALL) + @list='$(Portugueselprojnib_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(Portugueselprojnibdir)/$$f'"; \ + rm -f "$(DESTDIR)$(Portugueselprojnibdir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(Portugueselprojdir)" "$(DESTDIR)$(Portugueselprojnibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-PortugueselprojDATA \ + install-PortugueselprojnibDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-PortugueselprojDATA \ + uninstall-PortugueselprojnibDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install \ + install-PortugueselprojDATA install-PortugueselprojnibDATA \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-PortugueselprojDATA \ + uninstall-PortugueselprojnibDATA uninstall-am + + +.pre: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ + +.man.pre.man: + $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ + +InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp b/xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp new file mode 100644 index 0000000..7ef1ba5 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp @@ -0,0 +1,211 @@ + + + +XDarwin Help + + +
+ +

XDarwin X Server para Mac OS X

+ X_VENDOR_NAME X_VERSION
+ Release Date: X_REL_DATE +
+

Índice

+
    +
  1. Notas importantes
  2. +
  3. Uso
  4. +
  5. Ajustando seu Path
  6. + +
  7. Preferências do usuário
  8. +
  9. Licença
  10. +
+
+

Notas importantes

+
+
+#if PRE_RELEASE + Essa é uma versão pré-lancamento + do XDarwin, e ela não é suportada de nenhuma forma. Bugs podem + ser reportados e correções podem ser enviadas para Página + do projeto XonX no SourceForge. Antes de informar bugs em versões + pré-lancamento, por favor verifique a þltima versão em XonX + or X_VENDOR_LINK. +#else +Se o servidor é mais velho que 6-12 semanas, ou seu hardware é + mais novo que a data acima, procure por uma nova versão antes de informar + problemas. Bugs podem ser reportados e correções podem ser enviadas + para a Página do projeto + XonX na SourceForge. +#endif +
+
Este software é distribuído sob os termos da licença + MIT X11 / X Consortium e é provido, sem nenhuma garantia. Por favor + leia a Licença antes de começar a usar + o programa.
+ +

Uso

+

O XDarwin é uma X server "open-source" livremente + redistribuída do Sistema X Window. This version of XDarwin was produced by the X_VENDOR_LINK. + XDarwin roda sobre Mac OS X no modo Tela Cheia ou no modo Compartilhado.

+

No modo Tela Cheia, quando o sistema X window está ativo, ele ocupa + a tela toda. Você pode voltar ao desktop do Mac OS X clicando Command-Option-A. + Essa combinação de teclas pode ser mudada nas preferências. + Pelo desktop Mac OS X, clique no ícone XDarwin no Dock para voltar ao + sistema X window. (Você pode mudar esse comportamento nas preferências + daí você deverá clicar no ícone XDarwin na janela + flutuante que aparecerá.)

+

No modo Compartilhado, o sistema X window e Aqua dividem a mesma tela. A janela + raiz da tela X11 está do tamanho da tela (monitor) e contém todas + as outras janelas. A janela raiz do X11 no modo compartilhado não é + mostrada pois o Aqua controla o fundo de tela.

+

Emulação de Mouse Multi-Botões

+

Muitas aplicações X11 insistem em usar um mouse de 3 botões. + Você pode emular um mouse de 3 botões com um simples botão, + mantendo pressionando teclas modificadoras enquanto você clica no botão + do mouse. Isto é controlado pela configuração da "Emulação + de Mouse Multi-Botões" da preferência "Geral". Por + padrão, a emulação está habilitada e mantendo pressionada + a tecla Command e clicando no botão do mouse ele simulará o clique + no segundo botão do mouse. Mantendo pressionada a tecla Option e clicando + no botão do mouse ele simulará o terceiro botão. Você + pode mudar a combinação de teclas modificadoras para emular os + botões dois e três nas preferências. Nota, se a tecla modificadora + foi mapeada para alguma outra tecla no xmodmap, você ainda terá + que usar a tecla atual especificada nas preferências para a emulação + do mouse multi-botões.

+

Ajustando seu Path

+

Seu path é a lista de diretórios a serem procurados por arquivos + executáveis. O comando X11 está localizado em /usr/X11R6/bin, + que precisa ser adicionado ao seu path. XDarwin faz isso para você por + padrão e pode-se também adicionar diretórios onde você + instalou aplicações de linha de comando.

+

Usuários experientes já terão configurado corretamente + seu path usando arquivos de inicialização de seu shell. Neste + caso, você pode informar o XDarwin para não modificar seu path + nas preferências. O XDarwin inicia o cliente inicial X11 no shell padrão + do usuário corrente. (Um shell alternativo pode ser também expecificado + nas preferências.) O modo para ajustar o path depende do shell que você + está usando. Isto é descrito na man page do seu shell.

+

Você pode também querer adicionar as man pages do X11 para + a lista de páginas a serem procuradas quando você está procurando + por documentação. As man pages do X11 estão localizadas + em /usr/X11R6/man e a variável de ambiente MANPATH + contém a lista de diretórios a buscar.

+

Preferências do Usuário

+

Várias opções podem ser ajustadas nas preferências + do usuário, acessível pelo item "Preferências..." + no menu "XDarwin". As opções listadas como opções + de inicialização, não terão efeito até você + reiniciar o XDarwin. Todas as outras opções terão efeito + imediatamente. Várias das opções estão descritas + abaixo:

+

Geral

+
    +
  • Usar o Beep do Sistema para o X11: Quando habilitado som de alerta + padrão do Mac OS X será usado como alerta no X11. Quando desabilitado + (padrão) um tom simples será usado.
  • +
  • Permitir o X11 mudar a aceleração do mouse: Por implementação + padrão no sistema X window, o gerenciador de janelas pode mudar a aceleração + do mouse. Isso pode gerar uma confusão pois a aceleração + do mouse pode ser ajustada diferentemente nas preferências do Mac OS + X e nas preferências do X window. Por padrão, o X11 não + está habilitado a mudar a aceleração do mouse para evitar + este problema.
  • +
  • Emulação de Mouse de Multi-Botões: Esta opção + está escrita acima em Uso. Quando a emulação + está habilitada as teclas modificadoras selecionadas tem que estar + pressionadas quando o botão do mouse for pressionado, para emular o + segundo e terceiro botões.
  • +
+

Inicial

+
    +
  • Modo Padrão: Se o usuário não indicar qual modo + de exibição quer usar (Tela Cheia ou Compartilhado) o modo especificado + aqui será usado .
  • +
  • Mostrar o painel de escolha na inicialização: Por + padrão, uma painel é mostrado quando o XDarwin é + iniciado para permitir que o usuário escolha ente o modo tela cheia + ou modo compartilhado. Se esta opção estiver desligada, o modo + padrão será inicializado automaticamente.
  • +
  • Número do Monitor X11: O X11 permite ser administrado em multiplos + monitores por servidores X separados num mesmo computador. O usuário + pode indicar o número do monitor para o XDarwin usar se mais de um + servidor X se estiver rodando simultaneamente.
  • +
  • Habilitar suporte a múltiplos monitores pelo Xinerama: o XDarwin + suporta múltiplos monitores com o Xinerama, que trata todos os monitores + como parte de uma grande e retangular tela. Você pode desabilitar o + Xinerama com está opção, mas normalmente o XDarwin não + controla múltiplos monitores corretamente sem está opção. + Se você só tiver um monotor, Xinerama é automaticamente + desabilitado.
  • +
  • Arquivo de Mapa de Teclado: O mapa de teclado é lido na inicialização + e traduzido para um mapa de teclado X11. Arquivos de mapa de teclado, estão + disponíveis numa grande variedade de línguas e são encontradas + em /System/Library/Keyboards.
  • +
  • Iniciando Clientes X11 primeiro: Quando o XDrawin é inicializado + pelo Finder, ele irá rodar o xinit para abrir o controlador + X window e outros clientes X. (Veja o manual "man xinit" para + mais informações.) Antes do XDarwin rodar o xinit + ele irá adicionar específicos diretórios a seu path. + Por padrão somente o /usr/X11R6/bin é adicionado. + separado por um ponto-e-vírgula. Os clientes X são inicializados + no shell padrão do usuário e os arquivos de inicialização + do shell serão lidos. Se desejado, um shell alternativo pode ser especificado.
  • +
+

Tela Cheia

+
    +
  • Botão de Combinação de Teclas: Clique no botão + e pressione qualquer quantidade de teclas modificadoras seguidas por uma tecla + padrão para modificar a combinação quando se quer mudar + entre o Aqua e X11.
  • +
  • Clique no Ícone no Dock para mudar para o X11: Habilitando + esta opção você irá ativar a mudança para + o X11 clicando no ícone do XDarwin no Dock. Em algumas versões + do Mac OS X, mudando pelo clique no Dock pode causar o desaparecimento do + cursor quando retornar ao Aqua.
  • +
  • Mostrar a Ajuda na inicialização: Isto irá mostrar + uma tela introdutória quando o XDarwin for inicializado no modo Tela + Cheia.
  • +
  • Profundidade de Cores em bits: No modo Tela Cheia, a tela do X11 + pode usar uma profundiadde de cor diferente da usada no Aqua. Se a opção + "Atual" está especificada, a profundidade usada pelo Aqua + quando o XDarwin iniciar será a mesma. Além das opções + 8, 15 ou 24 bits que podem ser especificadas.
  • +
+ +

Licença

+

A licença + principal nós por XDarwin baseada na licença tradicional MIT X11 + / X Consortium, que não impõe nenhuma condição sobre + modificações ou redistribuição do código-fonte + ou dos binários desde que o copyright/licença sejam mantidos intactos. + Para mais informações e notícias adicionais de copyright/licensing + em algumas seção do código, por favor refer to the source code.

+

Licença do X Consortium

+

Copyright (C) 1996 X Consortium

+

Permissões são em virtude garantidas, livre de mudanças, + para qualquer pessoa que possua uma cópia deste software e aos arquivos + de documentação associada (o "Software"), para lidar + com o software sem restrições, incluindo limitações + dos direitos de uso, cópia, modificação, inclusão, + publicação, distribuição, sub licença, e/ou + venda de cópias deste Software, e permitir pessoas to whom o Software + é fornecido para ser desta forma, verifique as seguintes condições:

+

O nota de copyright abaixo e a permissão deverão ser incluídas + em todas as cópias ou substanciais porções do Software.

+

O SOFTWARE 'E PROVIDO "COMO TAL", SEM GARANTIAS DE NENHUM TIPO, EXPLICITA + OU IMPLICITA, INCLUINDO MAS NÃO LIMITADO NOS AVISOS DE COMÉRCIO, + TAMANHO OU PARA PROPOSTAS PARTICULARES E NÃO INFRAÇÃO. + EM NENHUM ACONTECIMENTO O X CONSORTIUM SERÁ RESPONSAVÉL POR NENHUMA + RECLAMAÇÃO, DANOS OU OUTRAS RESPONSABILIDADES, SE NUMA AÇÃO + DE CONTRATO, OU OUTRA COISA, SURGINDO DE, FORA DE OU EM CONEXÃO COM O + SOFTWARE OU O USO OU OUTRO MODO DE LIDAR COM O SOFTWARE.

+

Exceto o contido nesta nota, o nome do X Consortium não pode ser usado + em propagandas ou outra forma de promoção de vendas, uso ou outro + modo de lidar com este Software sem ter recebido uma autorização + escrita pelo X Consortium.

+

O Sistema X Window é marca registrada do X Consortium, Inc.

+ + + diff --git a/xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/Credits.rtf b/xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/Credits.rtf new file mode 100644 index 0000000..34408e7 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/Credits.rtf @@ -0,0 +1,168 @@ +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique; +} +{\colortbl;\red255\green255\blue255;} +\vieww5160\viewh6300\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Contributors to Xorg Foundation Release: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Kaleb KEITHLEY\ + +\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys. +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\f1\b \cf0 Contributors to XFree86 4.4: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Harper\ + +\f2\i Rootless acceleration and Apple-WM extension +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Additional XonX Contributors to XFree86 4.3: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Fabr\'92cio Luis de Castro\ + +\f2\i Portuguese localization +\f0\i0 \ +Michael Oland\ + +\f2\i New XDarwin icon +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 XonX Contributors to XFree86 4.2: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f0\i0 \ +Pablo Di Noto\ + +\f2\i Spanish localization +\f0\i0 \ +Paul Edens\ + +\f2\i Dutch localization +\f0\i0 \ +Kyunghwan Kim\ + +\f2\i Korean localization +\f0\i0 \ +Mario Klebsch\ + +\f2\i Non-US keyboard support +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +Andreas Monitzer\ + +\f2\i German localization +\f0\i0 \ +Patrik Montgomery\ + +\f2\i Swedish localization +\f0\i0 \ +Greg Parker\ + +\f2\i Rootless support +\f0\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f0\i0 \ +Olivier Verdier\ + +\f2\i French localization +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Special Thanks: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Devin Poolman and Zero G Software, Inc.\ + +\f2\i Installer +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 XonX Team Members\ +Contributing to XFree86 4.1: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +Andreas Monitzer\ + +\f2\i Cocoa version of XDarwin front end +\f0\i0 \ +Greg Parker\ + +\f2\i Original Quartz implementation +\f0\i0 \ +Christoph Pfisterer\ + +\f2\i Dynamic shared libraries +\f0\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f0\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Special Thanks: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Tiago Ribeiro\ + +\f2\i XDarwin icon +\f0\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 History: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Carmack\ + +\f2\i Original XFree86 port to Mac OS X Server +\f0\i0 \ +Dave Zarzycki\ + +\f2\i XFree86 4.0 port to Darwin 1.0 +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file diff --git a/xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/Localizable.strings b/xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..5bf813f1ff88b2a756ed1d07a23016b26d049a6a GIT binary patch literal 1480 zcwUv1+iuf95QgWPr?4unDrz?c6$nCzL%0G_1c=<4#5sTy2OkLK<#-le1o-w}yFLVp zkmVik%+AdJ&y4ryFN^Hh0()aSi*0LbD{RF+wajK{QZ(Nzu{pXg$Q=6`+ZGuh7p#Sq z=-23$(pIeA_8Rf}C5(*D;uG)VOYP?m4Fto_ls~ zV{~7M5`owGE?HySkTK$9A%q@hMAkj)9DB}}!xw?5Ql6AEkxhg-tyzbB`KTYUz35dS z#?$$P1Gcxw7T5^=2zh3wJR`hM?KbO~-L17_yMr8~y|0R7#Bi)!eI_v4iEG2XVgHsq zrSdklj|rb*j#^^>~Ceu!p=y_MHxRW;y$L9iutDMw7`hmDhtF zq6D<%f8#0ZinY@)#22VXsk}>RHu8zJ3l!T`D^~}%SMgk&_u4tsdvmjVsV*f%2oB~X z?9`#DLQ;EQUyC8G+>-X8us2KycH!2kdN literal 0 HcwPel00001 diff --git a/xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/classes.nib b/xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/classes.nib new file mode 100644 index 0000000..77f345a --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/classes.nib @@ -0,0 +1,72 @@ +{ + IBClasses = ( + { + ACTIONS = {showHelp = id; }; + CLASS = FirstResponder; + LANGUAGE = ObjC; + SUPERCLASS = NSObject; + }, + { + ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; + CLASS = Preferences; + LANGUAGE = ObjC; + OUTLETS = { + addToPathButton = id; + addToPathField = id; + button2ModifiersMatrix = id; + button3ModifiersMatrix = id; + depthButton = id; + displayField = id; + dockSwitchButton = id; + fakeButton = id; + keymapFileField = id; + modeMatrix = id; + modeWindowButton = id; + mouseAccelChangeButton = id; + startupHelpButton = id; + switchKeyButton = id; + systemBeepButton = id; + useDefaultShellMatrix = id; + useOtherShellField = id; + useXineramaButton = id; + window = id; + }; + SUPERCLASS = NSObject; + }, + { + CLASS = XApplication; + LANGUAGE = ObjC; + OUTLETS = {preferences = id; xserver = id; }; + SUPERCLASS = NSApplication; + }, + { + ACTIONS = { + bringAllToFront = id; + closeHelpAndShow = id; + itemSelected = id; + nextWindow = id; + previousWindow = id; + showAction = id; + showSwitchPanel = id; + startFullScreen = id; + startRootless = id; + }; + CLASS = XServer; + LANGUAGE = ObjC; + OUTLETS = { + dockMenu = NSMenu; + helpWindow = NSWindow; + modeWindow = NSWindow; + startFullScreenButton = NSButton; + startRootlessButton = NSButton; + startupHelpButton = NSButton; + startupModeButton = NSButton; + switchWindow = NSPanel; + windowMenu = NSMenu; + windowSeparator = NSMenuItem; + }; + SUPERCLASS = NSObject; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/objects.nib b/xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/objects.nib new file mode 100644 index 0000000000000000000000000000000000000000..2df75ee0cf6cbd155982e4ca02485c268be15dc1 GIT binary patch literal 20952 zcwX&%dwdnuwea3~n}m>rH&_^?mzNkwu$F?hAv}~1c?N`5E1jG(CmA>|=1fA+e&UWN z=l-nP+8CxpXp#DcOKg1nupmf;ilS1B3d(?JMdeB>_$YFN$@$jWd*+-u=Om!t{q7&% z@8{8-nb~{owbx#2?X}ikvxkg4eRWWAhjdMmeJuTCn3jjb;exr9vnu9QEmvInbXk`f zc`qE!nOiApNMn-#nN}Op13pnXra7Eej$Hw)QrA>}HEj;l%k!5`4F(y7Y+4G4WnrJ~iTFi0p8-q=F8T$X{R@meK>Vu(b5Bnv!$mfsW5e6ma3^OPTZ2mD||E&&4&@WbrA zW4H;rK~+}4UEbVEun0lU90KO)2wEtBT_jf_M8*-UYHT6le6%$l>j#RK-V}bj>3B;+ zK1}`5M))zR<}Z^7Std0dZ{iaG>*jKm6AGh;^KDY5DPHeS__LrFpNlv}csCWStEx6+ z&@R%DgEk@qhXp>Q&6^z&wsR)TqF-~%_rsYtPQ1$X^DKZG45cedt|zs`MO5M@GP#y$ z@YfIb3Sgn0USaAYZM2QFWkebqVGzNm_rsTjLMpeT<&3;Eh&DtT%A>6)mR?}~PPSYM z!<0=D!}JxyTn8wD5@kvhHsi%@i8WL&z1V=aqQ)r}=(L;=O5+bewH>gbuc@*SBn~ow>?l?wYV00fs z;WZ|kESNEfM@TXp?iCX`x+>Bf&Mp@}XzLwwNS4C`Qc5F7(dJ*P_!Uj|qG+;F!Mp*` zqPDDXx{z8{J2}qqXgJ*k?)WTFm$m&IE?A3bL>DJ~2LXyBz(YD2S2tg0b7Wvm{g30+sf=oj zPAo>oPb_v)*cdJzp~7$S3Aw8nkv}OIj1^Nf>D7bQjH+ z{krV+%F?ue4{U-i$7#>z%0e2hyLv$sxJV-T==S^A%Z_{bO78j7VVMIDVByPdH6WVN zTQ%7_DfDq+AfS7dP>2sfts&^Wv&9gNtwQ7+Z%K1gBdWhx1lE5v{86{acieGDw56qm7f`rpRaI5Aw6yeXfLR8xncd*w^a2f2X3w7e=9)EYqK`cC z$oV~c_H_R3Z-480`}XbYY-?*fkN5!Q1mK$Q>}y|v-lD6ozWPzbv1!w$^SgHK zioW{lt5Lucee=yXqX!QjL|oB_AAb1!FMs*VD8TMcOG_JS;lOz!eIz?O`^SMm;G^~H z*GF4hTRWe7?z!mh-Me{dZ*Px2|NQgO9XobJfu^qe@4r8)Y1-#N(+w7$3`Bu91qB7a zuyCB;xpQX}<`mt#cQ3ypo)=ztfnTw0>(;I3*R5L@9WrFd?G_%S1x+~Z*RP-U^wUpA zVLlx=ADjpB<*m2gip}eC>l=f7`Zg2-o@c z+i!Qh_uhNa_uqd%dg8#w6%zdv{G9H;FM zfB3^Eg9Z)y4fL6aG+4AyYkugJ=L{S;um$w^7|etBb^egX`|i8%#ATOV_AtOMCSvVn zlf*TNG=U8uKh4U@x@XFiDbLr}*B=4BKDA}bmVbbLzB^;ajJ>(JxoZLD7f{AKXt95Y zC*7(?TsZF#lsloIY_ad%P*y>?!NO5U;(T%bY+Siez6a$>DAxi17eT=}%!cwqB5X*n z9&k8+Hos6WP!|2Hg7?@zi*(n&7qu}L<7#!>r}2BxjLhvc-Kqy*nq}PsUuY569K@PK z`&so+LkHOPnT2$)ZDBHBphIH!`{|_)oTD8$7sl)PFUR^X_v_mU8C7Us!Ow6XO2C6g zdOgyxknLWVU0oe;-0Vi%3YHhpvmYAR&cifS!T>vxOrW?&@Neu*9nda@#^ z;}`X1w7LMJo9cp;89IZlYiERXIV1&wxN}xQl0P7YYBgQe_H6P?u$Oe{0jWj?7zrey zDT4LL4hVB(o>JjrDTzQd{{1JuNx1)~ym&lrO?+(kOawtuMxNz@dNx&1&S?yps<~>^ zI!+k`FMM0AD=x3>4mgBW()~Dn8To+Gk^PZfBfA$DAEz~jsB{+{Iod`P*Ke*^N8J)3 zZYf#2#dcznAUD?{7q{p!q!S$*3LYc!KVnY-ky$20W`X*#NBC%b3ju-nBypdCR7|m` z$Xm(CUcScm7B@{vrGis%>C|cs6EUFH8VXrc10h^nL0PYHaO|4Ir8U%AO7>7g7c+VT z=i3ea6Nc)6Z{<$D<-{o-!^oQ>k>WQ;I?*(?L*Si8`Fi@YIHRY)d)VR-Oa%1P8>m+O zQm6)Y6;d#OTY0X)@#$0~hv751rApvTp}+<^BY|mhJj8Z(pUJyM&JO&)vWwFb+1Tsb zv2k{sjkt?UOJlTwk$VsUUYjNf6uhx-8KV(KHen-PZM_UOWwJ)F^2Mq6-j zyo$krLfjkA5>Do6{BU0>>iHVyL))k;tQ<$5z`e9uvQb62~Cts z_EiaU8npI~aiW(b_4k~*U)h$+sMJjF>TrQ}M( zMazOX3#2!mqg-xfMn$)@(jTPsdo2~J?8+XYV(E4mqE_}g;iwa?F`TZJs}0w{)K?Or z?6w^8V41b?SfH&aK@!Qaz@_uGfCpkG)h)aEBEu+28eOI8p)n3Uy){u!?P2m4F!BiZ zo{tnK4CC}T1MCP@UR~>!yNgM0OHs<0^NdZXz!9VMIH7S@*eDrkh?5+%`(AGKy-jYX z&1d9S+}hu6S^eAX_4cyU+E>m?w9g)4pD$<{^SD8beD*QyYGT>U^rpke!lUt}zKqcY ze5o%eZaUh-QZJpaXg(D}O=)GVf=gPgZxLF$AmZ0VY{}QZFHjp&;_PK4l3>%T>;-<* zvA`L*Q#@rN+ZnmbX1vab!8OS!!s-j?5(wI@dLYVmqeqb{gv~6Q?4;x#ry}Jz#>vlL zUPZ|As>CrMsEI~1F{oLNAx)U@kR~%Rq{*zTQ9ZhIlzS8A8}4(_oZeoZ(d&o#x_$ox zc{+O^iMz^6p-h1Nb?L7}Ui93^9597y=?-mcXoj!f~Tt`Po7v|}DDlpDDoMUNesS^*+IrZz;?-tB=0*3bdUj^>=FKSu+D?PMe(H9+ z59Q|O`iXe07RzHonF6IA%I~2(0_CwD3bt*8vIfd@B69b34jbvhTyzDj`=3IQp;Yxy zuH$|WQ*|A=c1bFBlQ3?d?G>aGm3V302uh>85;|HpZ{0pNazCU0J|t+&YW zJ!`V(V5GUbUOu1fck^Cp-?UfOydXbLgPqd9X{WTAqC-Z{9U^DXHpcrfav#D+x&Q1A zy@*Q^Juf5e`5y4So*sR#=iB(+jon+4-YLoVcGn@<_x`a*-}|7`_mTwPyZgVpzn++|ziv%T)HwFnjQpCB-|}S5Z;O*g za(eW>@$|9ctMyvvF&#s+b)T)VlPoeLk7F_eub5S^=53`~3`P}3b|L^??R>|}Nr`o7 zMr>&QmI@OZ5>)Bx6(SWINlM4Sd@hiXIc5rMfFiCUgr^%3)^sU2-r4YNRV}X+F%X(xs_EU8*ZBDeJadzqyq&Rj=ZgeM)FP zZ(C$H4Yr7yHEmH!SJ1s?Mm94NhX0YrcunGRoFka#9`oUUG!Vgbk$lg$4$+pVE`Nxt za5x=8NRWM`jUOrGMR;dGd!=y{38x+|>1QmO>OH+Bi+InTSDFmw^en7p% zxfr&`jV`d>DCsm_Y>&NU0Izj}SV`hgJ0ox5YXC+Li6j2gynzt^Xo0S}(CKd*KI3PB zfbW8bxDoQ=$GBto<|_3%4xfH{!yVs*fE*A^oeBoo>eO(tPT!oCzVq!fEGlZDc;WZ| zaISq9X|f{D!J{&JG?e>)6F+jHVA2ZTrwBVUP^1lZ@C z_@qEA4d>DSpY$|6JW+%YdCTx^qHj|sep07L$QOQ|s1=sa({(hkoX!NnWm z(5>M0BE=U(0=5Q}njh{evWkMYCeLP^2HkZ+#HcY7JpXl_h09ycFO-1oLiO;c7 z;#C-#ROrFk-N@mP%rxk~qySRmsZ(F*9BgGn)`y2DLyP z1UvzLHe_kZJgr)qiHEEBS7Fj>K#YgHbWN?QU9AW_V8|qW&*Pd;^~0Sw_H@1K;wD_0 zGiwodBIAJui2XwWO;>AuCDIIjb|m1@SIL@^FmMP6sRp|J`kt*Ag;dx2WvAJtIZ3f@ zjENBL(9!&j+UVj`DaFE_v6U*QkcKZk{SYVU;#`amtpgr10H1+&J30QPc|C+aiE;$p z8+RF(;$;_=;yPrE@P$4r0z(gI1z;g`N-+1hkFHZSd@&3%K)J#~3?K-1PTX=<^GcW% z&Zm2qEsfSJ^&A5-@T$w@*xcn3qRrtwcXncLZUq3!Ujf$NUW8}s7)Zpo*gPCBE_Ct9E%BvR&6B#)Gw){hY zOb!JTcmgrF9sM!#HyGtjE6hu_GZnC9TPGowby82Z#yTt$|C+*;@-+pcgL*zIXN8vB zOriwwD#pR{1vH$2Mim+|2}}Q^jqYIdJq$k4yMeAK++Ro9NMx-MHuy)FODnm-0i(ax zcmvJ$U9bf-qMfksgI!m;F$wPm;oau-(0Ux5-)$bKOJ}6Zcw)T){D~gQ2K&8+(I1Ie z*S6n-Z1a@*?MU}V96U%PJ)A&3;9JVcuTi`~2l<~J18Uw8t{DEm7bxnDR08wy>BhxI zJ0oAf<4J@Olg*2Ts7i=WcppyqU4i6L-1;%{5kBp0x4((Zu-&?Fr*!niqKj5QyLgdt zpxwB(0?_S5rwDFDkk*DSk*gez*p6+pr@-AgM$Q`bE8*@Q0r8&*F~8Hu&4!2jaY6^% zjq^C=Gi!~T7sIs`0aw<*-3DyF)nimlG0LYH*Gv%-Nl(kaOnjWx5FE{=k?#!9BaDuS zvHf@w)5%+mFl2fr*i=s_(w4U4jx}qdpYlI2KSmx#X1xsDqy2DZ>lyhM+~?uFj?*}W z^iS+G79BHcJVq(#5P|*mCe)zQFb89Lh4CalG$HNToyJ&%0BH{gESCe9;pwPgQU`Dc zE_dSY{9c^%lu5>MM#sV9zYx=s#m2GY#{PCAxY8JcSiZnoMjAYZ)M><{0xDMP1l!~E z=W9J;t@#KxT_84~OTWbl!Q8g^*M9brF5}0c(i$Rr%Xxwc>_}`elgB`uNC;kIi(9lNR;H&*Eb1pSTe@$cB5{kv30%i{&C=P82}rn z;Ewzq8U1>@F#=cmRVdxFoP{(8#kp<0;YNMif)alQWwr_Lj(%o%+%1aX0sPh%ojeA_ zRpv+~VBL1qJ;!Hpr4gef%s&E)Rh5+@UT;m)KFs_CAd~__MLejid;O`>F z;Uo}PC<1+aP#kkOQh6QNGb^}@7`drnH#>15spKuFaeUK{RVNeYi#(t?qAoV0h_OUi zTkCT>=(aAI6`XnZcgG;IDTR(lyXpOm#UxmvPVSwz1RejpGh#$j=z|516yhmJZf?vT9tM;AMp zbZZh;=u(XUI>$><-qKY=xwu0U{gtm;Xu%HqlBSlu?P z%jF+{=~MA*46FVb4(swNxTmw~HgS}&qYuQYHuEY?aa4gD#mY-UHGx&=Vqy(@(O-Qp zpt%)orUugjQ|foaUTA7npjPLq9|L`5Eefbcb;k*PgA=ObnO48-n7{!9?T?`RV7B8Q zq6x)dUgt2ieuRQaroe>5eK|+x)x!Q(ck-Ii2e+>k#yiIiOseMp{tIH=W!Godi;Rgq z*gmmT`uXG)%4}uzRKI&(Y|4}EzT7P!SeD4TIB0%C%E3whorsA#zB#@wW= z*J|o5@ez0whfK&rXpT-+8WPKWRJ5N#nRZf335Tj|mi z#qSt6Q$Q4O2s?3>ICh?6dUIfqCfMaPIb8yuh55X;JEqrfbOQWW!u6^8690pVO)$UJ-Pj}KJZND1UkDSpvwN>D5W#{ z=iV!n)jm0hv2JpI3<3H<|LKZHuJ!7b_)S>~ff!5_0}wY693&YH2D^oBi2uYVEh$u> z56*Kd!EPjd+XYq;2f*mJw^##U5E8X;iBPcYkfK9dOur|J>Pv#EYX#0aQL!=5>zA}N zl1CjTLfAeD>mwD2hm^U(2#GwqqYZ35O1Ql!EA?s zsKS5Y1w6!}fNicLuzhFb`EXjf+S1=V&*=9|v`(bUeC{^5+Y1ZSoWy9YiPN zXY>JcvkrH;jQ+;Ng8|fIVy=Z&nfR~Skl(>&KWunS&K?6G`!c%G1cjOo_X8Q-WFBMm zQfP(=ZimaidYiX0`oBz`IqNh_81~0fBe-n25&nQS)|;mo*$el7X5`oAK1S{^`OB$YCeMczn>CDH2lwwXI>6-V zzf&fr|EL0$M;Pr3mxqU$rHuMao)7$oS;*)_sNGs;b}~8y?shWrTWE|h`ZM594x_&| z_fCfT(TujhWd|dmG-(Bl{?=R!A}}|FOqlWAP?yFiO8Ij}Z#Q`|?1=daBMe$#ko(N( zjD}3UsD5W&%cy3KVDyLP>##{MpUg4wr5gQ(iFq?xZDKx=x=fyAd;)M@#mEV`bTJw+ zvwBQHYNvxw$HM%O`A2cu!QJPNF(yI~Btyu`?E z^9@Fzo^%1UiCH@Gq{;0QESj`pMt^T&s)&3Am$qBXZFz7#!{{25Cpe#ir%xCKF=JkD zgE^Z~SXJaMMt^R)8C?YT=a!q8UZSd5&*%ccnZf9 $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ + +CLEANFILES = XDarwinHelp.html InfoPlist.strings + +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp diff --git a/xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/Makefile.in b/xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/Makefile.in new file mode 100644 index 0000000..3d83cc6 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/Makefile.in @@ -0,0 +1,639 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*- Makefile -*- +# Rules for generating files using the C pre-processor +# (Replaces CppFileTarget from Imake) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/cpprules.in +subdir = hw/darwin/bundle/Spanish.lproj +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(Spanishlprojdir)" \ + "$(DESTDIR)$(Spanishlprojnibdir)" +SpanishlprojDATA_INSTALL = $(INSTALL_DATA) +SpanishlprojnibDATA_INSTALL = $(INSTALL_DATA) +DATA = $(Spanishlproj_DATA) $(Spanishlprojnib_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +BINDIR = ${bindir} +SED = sed +SUFFIXES = .pre .man .man.pre + +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e '/\@\@$$/s/\@\@$$/\\/' + + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ +XORGMANNAME = X Version 11 +XSERVERNAME = Xorg +MANDEFS = \ + -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__appmansuffix__=$(APP_MAN_SUFFIX) \ + -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ + -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ + -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ + -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ + -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ + -D__mandir__=$(mandir) \ + -D__projectroot__=$(prefix) \ + -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ + -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) + +XINITDIR = $(libdir)/X11/xinit +XDEFS = \ + -DX_VERSION="$(PLIST_VERSION_STRING)" \ + -DX_PRE_RELEASE="$(PRE)" \ + -DX_REL_DATE="$(XORG_DATE)" \ + -DX_VENDOR_NAME="$(VENDOR_STRING)" \ + -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" + +resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources +Spanishlprojdir = $(resourcesdir)/Spanish.lproj +Spanishlproj_DATA = \ + XDarwinHelp.html \ + InfoPlist.strings \ + Credits.rtf Localizable.strings + +Spanishlprojnibdir = $(Spanishlprojdir)/MainMenu.nib +Spanishlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib +CLEANFILES = XDarwinHelp.html InfoPlist.strings +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp + +all: all-am + +.SUFFIXES: +.SUFFIXES: .pre .man .man.pre +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/darwin/bundle/Spanish.lproj/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/darwin/bundle/Spanish.lproj/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-SpanishlprojDATA: $(Spanishlproj_DATA) + @$(NORMAL_INSTALL) + test -z "$(Spanishlprojdir)" || $(MKDIR_P) "$(DESTDIR)$(Spanishlprojdir)" + @list='$(Spanishlproj_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(SpanishlprojDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Spanishlprojdir)/$$f'"; \ + $(SpanishlprojDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Spanishlprojdir)/$$f"; \ + done + +uninstall-SpanishlprojDATA: + @$(NORMAL_UNINSTALL) + @list='$(Spanishlproj_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(Spanishlprojdir)/$$f'"; \ + rm -f "$(DESTDIR)$(Spanishlprojdir)/$$f"; \ + done +install-SpanishlprojnibDATA: $(Spanishlprojnib_DATA) + @$(NORMAL_INSTALL) + test -z "$(Spanishlprojnibdir)" || $(MKDIR_P) "$(DESTDIR)$(Spanishlprojnibdir)" + @list='$(Spanishlprojnib_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(SpanishlprojnibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Spanishlprojnibdir)/$$f'"; \ + $(SpanishlprojnibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Spanishlprojnibdir)/$$f"; \ + done + +uninstall-SpanishlprojnibDATA: + @$(NORMAL_UNINSTALL) + @list='$(Spanishlprojnib_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(Spanishlprojnibdir)/$$f'"; \ + rm -f "$(DESTDIR)$(Spanishlprojnibdir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(Spanishlprojdir)" "$(DESTDIR)$(Spanishlprojnibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-SpanishlprojDATA install-SpanishlprojnibDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-SpanishlprojDATA uninstall-SpanishlprojnibDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install \ + install-SpanishlprojDATA install-SpanishlprojnibDATA \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-SpanishlprojDATA \ + uninstall-SpanishlprojnibDATA uninstall-am + + +.pre: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ + +.man.pre.man: + $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ + +InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp b/xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp new file mode 100644 index 0000000..5cd2786 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp @@ -0,0 +1,111 @@ + + + + +XDarwin Ayuda + + +
+

XDarwin X Server for Mac OS X

+ X_VENDOR_NAME X_VERSION
+ Fecha de release: X_REL_DATE +
+

Contenido

+
    +
  1. Aviso Importante
  2. +
  3. Modo de uso
  4. +
  5. Configurando su Path
  6. +
  7. Preferencias del Usuario
  8. +
  9. Licencia
  10. +
+
+

Aviso Importante

+
+
+#if PRE_RELEASE +Esta es una versión pre-release de XDarwin, y no tiene ningún soporte. Patches y reportes de error pueden ser enviados a la página del proyecto XonX en SourceForge. Antes de reportar errores en versiones pre-release, por favor verifique la ultima versión en XonX o bien el X_VENDOR_LINK. +#else +Si el server el más antiguo que 6 a 12 meses, o si su hardware es posterior a la fecha indicada más arriba, por favor verifique la última versión antes de reportar problemas. Patches y reportes de error pueden ser enviados a la página del proyecto XonX en SourceForge. +#endif +
+
+Este software es distribuido bajo los términos de la Licencia MIT X11 / X Consortium y es provisto sin garantía alguna y en el estado en que se encuentra. Por favor lea la Licencia antes de utilizarlo.
+ +

Modo de uso

+

XDarwin es una X server open-source de distribución libre del X Window System. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin funciona en Mac OS X en modo pantalla completa o en modo rootless (integrado al escritorio).

+

En modo pantalla completa, el X window system toma control total de la pantalla mientras esta activo. Presionando Command-Option-A puede regresar al Escritorio de Mac OS X. Esta combinación de teclas puede cambiarse en las Preferencias de Usuario. Desde el Escritorio de Mac OS X, haga click en ícono de XDarwin en el Dock para volver al X window system. (Puede cambiar esta comportamiento en las Preferencias de Usuario y configurar que XDarwin vuelva al X window system haciendo click en la ventana flotante con el logo X.)

+

En modo rootless, el X window system comparte la pantalla con Aqua. La ventana root de X11 es del tamaño de la pantalla y contiene a todas las demás ventanas. La ventana root de X11 no se muestra en este modo, ya que Aqua maneja el fondo de pantalla.

+

Emulación de mouse multi-botón

+

Muchas aplicaciones X11 requieren del uso de un mouse de 3 botones. Es posible emular un mouse de 3 botones con un mouse de solo un botón presionando teclas modificadoras mientras hace click. Esto es controlado en de la seccion "Emulación mouse" dentro de la sección "General" de las Preferencias del Usuario. Por defecto, la emulación está activa y utiliza la tecla Command para simular el 2do botón y la tecla Option para simlar el 3er botón. La conbinación para simular el 2do y 3er botón pueden ser modificada por cualquier combinación de teclas modificadoras dentro de las Preferencias del Usuario. Tenga en cuenta que aunque las teclas modificadoras hayan sido mapeadas a otras teclas con xmodmap, las teclas configuradas en las Preferencias del Usuario seguirán siendo las utilizadas por la emulación de mouse multi-botón.

+ +

Configurando su Path

+

El path es la lista de directorios donde se buscarán los comandos ejecutables. Los comandos de X11 se encuentran en /usr/X11R6/bin, y éste necesita estar dentro de su path. XDarwin hace ésto automáticamente por defecto, y puede además agregar directorios adicionales donde tenga otros comandos de línea.

+

Usuarios experimentados pueden tener su path correctamente configurado mediante los archivos de inicio de su interprete de comandos. En este caso, puede informarle a XDarwin en las Preferencias de Usuario para que no modifique su path. XDarwin arrancará los clientes X11 iniciales usando el intérprete de comandos del usuario, según su configuración de login. Un intérprete de comandos alternativo puede ser especificado en las Preferencias del Usuario. La manera de configurar el path de su intérprete de comandos depende de cual está usando, y es generalmente descripta en las páginas man del mismo.

+

Además, Ud. puede agregar las páginas man de X11 a la lista de páginas que son consultadas. Estas están ubicadas en /usr/X11R6/man y MANPATH es la variable de entorno que contiene los directorios que son consultados.

+ +

Preferencias del Usuario

+

Ciertas opciones pueden definirse dentro de "Preferencias...", en el menú de XDarwin. Las opciones dentro de de "Inicio" no surtirán efecto hasta que la aplicación se reinicie. Las restantes opciones surten efecto inmediatamente. Las diferentes opciones se describen a continuación:

+

General

+
    +
  • Usar beep del sistema en X11: Cuando esta opción está activa, el sonido de alerta estándar de Mac OS X se usará como alerta de X11. Cuando está desactivada, un simple tono es utilizado (esta es la opción por defecto).
  • +
  • Permitir que X11 cambie la aceleración del mouse: En una implementación estándard de X11, el window manager puede cambiar la aceleración del mouse. Esto puede llevar a una gran confusión si la aceleración es diferente en XDarwin y en Mac OS X. Por defecto, no se le permite a X11 alterar la aceleración para evitar este inconveniente.
  • +
  • Emulación de mouse multi-botón: Esta opción es descripta más arriba bajo Modo de Uso. Cuando esta emulación está activa los modificadores seleccionados deben ser presionados cuando se hace click para emular el botón 2 o el botón 3.
  • +
+

Inicio

+
    +
  • Modo inicial: Si el usuario no indica si desea utilizar la Pantalla Completa o el modo Rootless, el modo especificado aquí será el usado.
  • +
  • Mostrar panel de selección al inicio: Por defecto, un diálogo permite al usuario elegir entre Pantalla Completa o Rootless al inicio. Si esta opción esta desactivada, XDarwin arrancará utilizando el modo por defecto sin consultar al usuario.
  • +
  • Número de display X11: X11 permite que existan múltiples pantallas manejadas por servidores X11 separados funcionando en una misma computadora. El usuario puede especificar aqui un número entero para indicar el número de pantalla (display) que XDarwin utilizará si más de un servidor X funciona en forma simultánea.
  • +
  • Habilitar soporte Xinerama para múltipes monitores: XDarwin suporta múltiple monitores con Xinerama, que maneja todos los monitores como si fueran parte de una gran pantalla rectangular. Puede deshabilitar Xinerama con esta opción, pero XDarwin no maneja múltiples monitores en forma correcta sin esta opción habilitada. Si tiene solo un monitor, Xinerama es automáticamente deshabilitado.
  • +
  • Archivo de mapa de teclado: Un archivo de mapa de teclas es leído al inicio y es traducido a un keymap X11 (un archivo estándard de X11 para especificar la función de cada tecla). Estos archivos, disponibles para una amplia variedad de lenguajes, pueden encontrarse en /System/Library/Keyboards.
  • +
  • Al iniciar clientes X11: Cuando XDarwin arranca desde el Finder, éste ejecutará xinit para a su vez arrancar el window manager y otros clientes. (Vea en "man xinit" para mayor información). Antes de ejecutar xinit XDarwin agregará los directorios especificados al path del usuario. Por defecto, solo /usr/X11R6/bin es agregado. Otros directorios adicionales puede agregarse separados por dos puntos (:). Los clientes X son ejecutados con el intérprete de comandos del usuario, por lo que los archivos de inicio de éste son leídos. Si se desea, un intérprete de comandos diferente puede ser especificado.
  • +
+

Pantalla Completa

+
    +
  • Botón para definir combinación de teclas: Haga click en este botón y luego presione cualquier combinación de modificadores seguidos de una tecla convencional para definir que combinación usará para intercambiar entre X11 y Aqua.
  • +
  • Click en el ícono del Dock cambia a X11: Habilite esta opción para volver a X11 al hacer click en ícono de XDarwin en el Dock. En algunas versiones de Mac OS X, al volver haciendo click en el Dock puede causar al desaparción del cursor al volver a Aqua.
  • +
  • Mostrar ayuda al inicio: Esta opción habilitada hará que una pantalla inicial de introducción aparezca cuando XDarwin es arrancado en modo Pantalla Completa.
  • +
  • Profundidad de color (bits): En modo Pantalla Completa, el display X11 puede utilizar una profundidad de color diferente de la utilizada por Aqua. Si se especifica "Actual", la misma profundidad de color que Aqua utiliza será adoptada por X11. Al contrario, puede especificar 8, 15, o 24 bits.
  • +
+ +

Licencia

+La licencia principal de XDarwin es basada en la Licencia MIT X11 tradicional, que no impone condiciones a la modificación o redistribución del código fuente o de archivos binarios más allá de requerir que los mensajes de Licencia y Copyright se mantengan intactos. Para mayor información y para mensajes adicionales de Licencia y Copyright que cubren algunas secciones del código fuente, por favor consulte the source code. +

Licencia del X Consortium

+

Copyright (C) 1996 X Consortium

+

Se otorga aqui permiso, libre de costo, a toda persona que obtenga una copia de este Software y los archivos de documentación asociados (el "Software"), +para utilizar el Software sin restricciones, incluyendo sin límites los derechos de usar, copiar, modificar, integrar con otros productos, publicar, distribuir, sub-licenciar y/o comercializar copias del Software, y de permitir a las personas que lo reciben para hacer lo propio, sujeto a las siguientes condiciones:

+

El mensaje de Copyright indicado más arriba y este permiso será incluído en todas las copias o porciones sustanciales del Software.

+

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE.

+

Excepto lo indicado en este mensaje, el nombre del X Consortium no será utilizado en propaganda o como medio de promoción para la venta, utilización u otros manejos de este Software sin previa autorización escrita del X Consortium.

+

X Window System es una marca registrada de X Consortium, Inc.

+

X Consortium License (English)

+

Copyright (C) 1996 X Consortium

+

Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without +limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to +whom the Software is furnished to do so, subject to the following conditions:

+

The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software.

+

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE.

+

Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization from +the X Consortium.

+

X Window System is a trademark of X Consortium, Inc.

+ + diff --git a/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/Credits.rtf b/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/Credits.rtf new file mode 100644 index 0000000..34408e7 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/Credits.rtf @@ -0,0 +1,168 @@ +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique; +} +{\colortbl;\red255\green255\blue255;} +\vieww5160\viewh6300\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Contributors to Xorg Foundation Release: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Kaleb KEITHLEY\ + +\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys. +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\f1\b \cf0 Contributors to XFree86 4.4: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Harper\ + +\f2\i Rootless acceleration and Apple-WM extension +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Additional XonX Contributors to XFree86 4.3: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Fabr\'92cio Luis de Castro\ + +\f2\i Portuguese localization +\f0\i0 \ +Michael Oland\ + +\f2\i New XDarwin icon +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 XonX Contributors to XFree86 4.2: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f0\i0 \ +Pablo Di Noto\ + +\f2\i Spanish localization +\f0\i0 \ +Paul Edens\ + +\f2\i Dutch localization +\f0\i0 \ +Kyunghwan Kim\ + +\f2\i Korean localization +\f0\i0 \ +Mario Klebsch\ + +\f2\i Non-US keyboard support +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +Andreas Monitzer\ + +\f2\i German localization +\f0\i0 \ +Patrik Montgomery\ + +\f2\i Swedish localization +\f0\i0 \ +Greg Parker\ + +\f2\i Rootless support +\f0\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f0\i0 \ +Olivier Verdier\ + +\f2\i French localization +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Special Thanks: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Devin Poolman and Zero G Software, Inc.\ + +\f2\i Installer +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 XonX Team Members\ +Contributing to XFree86 4.1: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +Andreas Monitzer\ + +\f2\i Cocoa version of XDarwin front end +\f0\i0 \ +Greg Parker\ + +\f2\i Original Quartz implementation +\f0\i0 \ +Christoph Pfisterer\ + +\f2\i Dynamic shared libraries +\f0\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f0\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Special Thanks: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Tiago Ribeiro\ + +\f2\i XDarwin icon +\f0\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 History: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Carmack\ + +\f2\i Original XFree86 port to Mac OS X Server +\f0\i0 \ +Dave Zarzycki\ + +\f2\i XFree86 4.0 port to Darwin 1.0 +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file diff --git a/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/Localizable.strings b/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..9709e546984181018ef1c651b22ebd732ede3e93 GIT binary patch literal 1464 zcwUv1+iuf95QgWPr&v{7RU~dIPAWpEoNfRW)FOK8#!hM)Czicw2+zxN0N?(u>qAo{ zw92k`j{p2K+24OGvVC)QY8y)}vCJyFJ-EU35WDwSrL5=n)Q*t- zAWCF~eCO=3eigY{)p}u=tp9zLGWRRuAA?*xb=FioTj?@Uv4zlK^k($ l%GqS@qpGWF@qE?`Q0dLAbuFGVbzzF!siz@cs+Ur@{sMxf@09=m literal 0 HcwPel00001 diff --git a/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/classes.nib b/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/classes.nib new file mode 100644 index 0000000..77f345a --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/classes.nib @@ -0,0 +1,72 @@ +{ + IBClasses = ( + { + ACTIONS = {showHelp = id; }; + CLASS = FirstResponder; + LANGUAGE = ObjC; + SUPERCLASS = NSObject; + }, + { + ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; + CLASS = Preferences; + LANGUAGE = ObjC; + OUTLETS = { + addToPathButton = id; + addToPathField = id; + button2ModifiersMatrix = id; + button3ModifiersMatrix = id; + depthButton = id; + displayField = id; + dockSwitchButton = id; + fakeButton = id; + keymapFileField = id; + modeMatrix = id; + modeWindowButton = id; + mouseAccelChangeButton = id; + startupHelpButton = id; + switchKeyButton = id; + systemBeepButton = id; + useDefaultShellMatrix = id; + useOtherShellField = id; + useXineramaButton = id; + window = id; + }; + SUPERCLASS = NSObject; + }, + { + CLASS = XApplication; + LANGUAGE = ObjC; + OUTLETS = {preferences = id; xserver = id; }; + SUPERCLASS = NSApplication; + }, + { + ACTIONS = { + bringAllToFront = id; + closeHelpAndShow = id; + itemSelected = id; + nextWindow = id; + previousWindow = id; + showAction = id; + showSwitchPanel = id; + startFullScreen = id; + startRootless = id; + }; + CLASS = XServer; + LANGUAGE = ObjC; + OUTLETS = { + dockMenu = NSMenu; + helpWindow = NSWindow; + modeWindow = NSWindow; + startFullScreenButton = NSButton; + startRootlessButton = NSButton; + startupHelpButton = NSButton; + startupModeButton = NSButton; + switchWindow = NSPanel; + windowMenu = NSMenu; + windowSeparator = NSMenuItem; + }; + SUPERCLASS = NSObject; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/objects.nib b/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/objects.nib new file mode 100644 index 0000000000000000000000000000000000000000..3157d72cb8787cc9dba45d6af297a5ed49cafd53 GIT binary patch literal 20858 zcwX&%dz=(Sl5plcVHk#a^K>on4g`4(xUPbpGdyPDLmo1$u#5Y#HQhBc#q`VS>S0*- z7INtB?{iOAZyf3vMF9mDL0Aw41s~|Zp(rS>tdCMpKNV3Bblq>|2BE)*%&P9{?is-E z?*6#n&xY)(%8ZPRjEIbgjLM#@Ui#92;tuMXB70fp@i46nhr=&@!dYr%WhDu(T9pM=OQQn!%#beEdXy?nlb4ckICoZ!xNU2v zIC`GwKV4V6EMrYuYkRmiV3|H0QB_V*D_iywf+$IJT?;8Bq-9ww79$bpS!mNeR|)z< znoAkpW&j`zFx@NHD^a-bBalySP+W~(S!;|&BjJaQ_0Uo%T4t)vin~Uabp@J$9q=z2 zT^C(xi22WyfdS3`5Dxc*vHU(=^LvK#Dc_~8tQr_R;P<%|jkL9fH{*=5XVpyd zH;>qikCAo~&c~V5S)cF&?Y$5Pdd^dt^=eh|xchHv-PTSXiNL3bQQcich`XqDTPr6A znCfy>5(=yf_i=QZtav;?SU#}Rg(AV{B2F9LRe=yywIz$5CoQBB7?_1bAV;b@c4|$s zN0&Su>+6*XQ6a)=m|R&~``?AL7mmNi^~)UK`2Z;AW8@|hA}*p5H<8Iti3Z<3xK{ur zt?M18F0!3&C)=~4kqC@9fwS=OaHb3OfD3!F-{S|~Y|ja23JP*+mIguCD4u+m;3Biu6>R0U2(Ug}R;rd@w?Oi0aI1J-gvWqt`Y zxWpcTD{Ku{;!IGZRjYb~V##jRFPcF&VTS+u7?&rfpvPRl?&;VW)cN?7kH4GIduE7H zBkKh7Io{E2tq~BB5S0CoCZ2W{7l&yO9$UqtnxyJpIl#NlRRTqPiN>GW+FAA+;oOB4 zS6?^Q^~;$v$p}KS`;q^e54DPY4SuwK1-vCA*NeD5{a zTyq-AH&a!d+j#*+jMdiG z#wsc*-UgUO0Gr(f9!@XNFmc9=8E-CIwk-C@BafWz=;%0i*=L`P!JK0I_U+?W#Pi~d zFY+t4ZP~Kr?5b6(Vgm;bTyEh(TF~Usva&Mmi6@?j!F)P#J~$8L%h97pY z4jqaCt(`k|?1&8;HmuDtCoDZmN=kgYcI`sAb8o->_W2J#{4n;>M<2yL`Q#H`KK}UQ z*ashc5PRpHcVY(*9z6HdQ%}V}7k&qQ^DP`Ww|tP*qSdQcpLqA(cVmF#+=&w>Vy91^ zj{W5?e~Eqd)mO1Ezx*=x#TQ>-+j$r#wrSI*zm}JmhoEmC3kT9w0P>nVckbNh5D(xu z|IIhw#5y}WWBB>*yYFJ(e*10g>#x6#9Y22jylI-T`uh6ASy@>(Ltk(PT;`}ty`YRN zEG%4p=bd-{pHrt!#m=5RdmcV9Ea%RhAOu5u_%o%^r;{8|Hg``6?-#MX z&$Z}%BG8k&-Tl#45lIP0MiP-uF{8IKa+G`Nqe)&G$BDbz!MCVES%QE?lA9#qa(Un) zHK}eXsLPt3pyBP^=yx-?2VA!<5`G0eDMqnNRNd8pP86uw;f%GeXXK6|q~MOCBnqB{ znO2;y;-M2#QBuQ4_JzD&MUzx%K}E%c#JC^qAba-0e0N2X@H4W8(FxPaLI28AvA5j@ z*t0C`bZi3GM>}Xd?kUkB;F%=58tXNG$mbTJ&(TC&)KiZKL@!3u$1f^nbP+5m{7##l z9T?*HQ#!&vH%2D1=948|>sar`S^9JZrrM~9Vh0@#(dG z%^eH{0>O^;y6%IyIplS+>(NRX`Iymb%aLQ(b}cbJ+PXNR(>v%V$81FJBm_@q0lo7i zLgq=Sip`1cajg}_-O{n%vv~CA(FxkV<~mGUqAiuN@XHV=@~;RmcM!zp$*l;Z1D4+{ zOTa$WH!9dDd#q|`_kpdF1+=Uw2}W+*?bvbL3b?9|^M~C>8%e3x6r< z4H$CzHlycIGw_;b2THiL7|G~9Mh_qqUTq4(Ik2f#T`s|kaJYAzPnb6%ZQc&% zGMdAkNKSEA4B-S_Im4p@L4l49lG^C^0bQ!(_PZKoAM(VugkZE21CDpvKjHaArp^(- z38VN&P7PNY5ZiTev2nGS;}85SAc9RsUVW!^qDAgWQ5nYhVQ!{6P|fh5R^gayHwGl ze1cP3p|N@mw$W>ov!M?~9tjsM3g9e|UXc;RWZaFdC_lSfM#YcQ`n{SCHSX$ep&+c_ zFg<65nq*D(xfLfUb%I91nQEolas$l1nh4dlh0$wV6~uH^MM;84jp*{KVcpcb7l#54 zwVaczmNvrtn;AL8ee$8=B&1H;EAg#FT|9LcY*-B8SD>q%L`|A9#vO8e4h4?ry4!ht zal%G9KS6oik9xQl^|W4R*+L!)G4eYe1TD9Mq2=}}+vf~|t~{3?ol z#L&fEa;enfl5JaxENR@!rLfnM#$KDeeJLSn->KdZkBu=xZuH54fUE_9v}lT;ikyLE zHfmIntx-B75AnUuLq)Ac7g!ksrgdxp^Xao)4UEDEl*Tz$N}Y41JQ^P)KYvjzA&Y9A z13+vRi)CYM7Q)CZOn79L?TF0!#L=or{0zT-(bV#DJhA)+rj1|tFGv^L=?qM641zM2 zQd)7bLPYu}+kuDQL)(}UBSyS)^UXKM8X6kTdA;5kmc@$~$5d5~H8wW#XShE(;-%{PN44hYlUWbY|zlg9kfbdF7SP!-o&^I=ly% zZ!}Gd6%-Ui9klQ?8`SBmSFgqtt1XV$J=i)mHE z;s@eD2ZZU+-#+~C!?9hvc6DM(*G|b|n%91|)4d4u=%bHfI`lyz(t9~p=~Y@<%GR%6 zkLlpfr=NbBr*ko7jQ3dZe)sO(ygc#56P=qkZ;lNeI&>`&sl7O!^78T)m^b$C+`oT6 zPgTG4(n~StJznt{XzavP?(pHm*QMg=+qZ8Ejs>utufP5}Pk-A5Q^ocbQ^a zu1dqxuV23w%?6c20F_nv{VN5w=!L+Ph@EKuHAI6Ls(y&e*tQ1BGAL7sc!gxYN#Fp(V302uM~XD~f8%uVo8ZjeOWj}R&Jb^G6MO1pzu`&i(PM_+ z>xFny?5Q&@rAuCwhi7|qwTXAiyp&EE)gm~^>KZt@XHO(~qhHftZ`fnpVW#63VMA-7 z)0Z>y`hVD)k9T`K zdmd{oPQ*xJmPfuvI8oq`gg>qrg+BxoKLiv%1Qb666h8zMKLiwA2Nbu(LxN;y!3awR z493HNivXqu0$qWB&rrY`L-@xoS_%zux@x`(LC%tSiZ=j`SYh-`Te!EXCXS=IGBfgr zh#YxK;7We>cS{|X{EW`ueI-9V}FSgU2j2wm0 z@ilmMKvU|1(d`*KS1el=JH@~7m}5NMm^Iy3=Z}ixiECRKxrgWZ@@9Lb1yf{giRz24 zbL0cZIF3E_KB#{_QcZUX$M<)T?Ncz{>IoOaYo;?7&# zu^yzMXzAJHf?%lD3!sTqa)fIN<9RE>57z?98bxbTT}n`3jRJiRmFh89ajW$ZcA{GK z5cF^6Bj0*Ze~O{8pPw3~zv#9HBb%JPdd%>s5J-n~-mUqP2Abgy zsES3J>r#5;!5~2$VrxqbO_$OsXRhqVQ7$ZO0h>Ql)*3N*ukv`rOyq7Q9f@8E|HsuEizEB(A+v<<^MG{82p z0rylvJTtUl^lYtOs>TB};&qtc)gZZ1Vrp#&xEhpHKI%3f8f80ckJ{@_zJKI zEn-mh@i&p&{_r=2zzd~b!DdYlDIj?9nnt?P@ydpiJ6wWR=;T&4rBRpsO|lRB+u9&q zsac1k#TobEqa}XM2H%1G0nm@N?Z5J`C8Dn4LKL zZl76Kbi#krfH!SnIz1c1iT>P|NOPuCO93RW)-P*r34eeR#pWN)QWngU=1s4zmYS{} zJ+@1j3Jx>X=aK_KOiIAgo8u4aH7-pJfRHLikL$8q*{qss)dNiND#1CtZJymUz#?k; zKFE5iy<= z-Davj)oXiD?}eSA=#o9z;}7!R>(C{a0-yB@KSTl-cAY0LDVh@aa%O=+);YnMr&q7I z6cX}rQ7iQw8x(v6E;_bctmCCqls9Rqt^@N1Ww=PBfQyDzM$T)fqM8#tXzeoQ__L@b_A(&kk@I`K&ud zzXul1F@uqZFkWTkJWSNc+X#1W;(`jO21YEr>DWs6`W&IbUi|L0z8NgT&1is;jo{Z> zz8cH-XLJFMpF68&4i{K_N0tb(D0ke{PTLljbNdsu>`)Y&y0QdBco4*Y$%jeuwkLj( zWmynf!cVAVv_$t+^8M(C5i7xq$7^vWNC;lz#wtQzcWfiCzo}J_v7Nx4k$)l4q7ofFm4ws^A~|# zTqI%T1-Q|JZ>W;a7%+O-1rE0*#=wB-IUX=QSDZddJYc$vk06c)#v_z2PKhu&xSL>! z(E+U>*rSQD;pwfT*`RwEz`YB_ypS_v-m;vL?TEH8 zItd*SUgNTL#Bl$F$pZLJ!J8hGPfCj6{QMX^hBUfmNu&k^j0!*6$^*60QatK`u&No_ zyx>wH_QS{;Bk*9OrZ(XrZ3xKJc<44#()md?`(@CmDvv&@YP59a6n@;(dA8em!VQB; zaTo-n`LqPXa0fLV8$g)WIXL?e+DNGpkE_W%3bjm6kRM#L0?n?7l3-`+8!g!t+BU+)lcqCxFI>p(@P=W$Xqs*O1l;o+R9TTy5n z>M(9Eg4^YV@bw2q?l$n(6M%o)P+@s)G4J=v1P4>5!Bi869$VtRC7>hz%h z0zN%Z*+6`HD~*}e#tjpVnu&&{8pBIr{AZEWg(YzJHPTsFWDG4eK0^L~fexYi2AI{~ zqxcxT3g>#S5ZhnHqz>ZD8Tl5UN`@GN%8jkqHH;JN6d>)Q!zuB!3x{Lm0a3XMFR?Ag z$!$iza$`-qQH+E{pf??iV~!kQ6cximHuq#SQ{XrWv>A&^jM8%BTO92ki2RJ}Mi^VR z!ozMHU_97oS_1yYr~`iEF9LvmvR#b5U(kFXCxI3*+8dq@VCDRY#`J1q;&nzYy2-;F zjt*pWT)Tn_fx=H5m#m0lBM+?j52d5VM;J0We!M&`YK#>6X#KzyNkN&|6&yux?mr|U zBV#29H6N|zu%I-132coJgeH#+cxPhxl&Fas`^DIa)16V{Tjx+$Bc8t(c;ee3tn0}Q zIyyFSau_Cl4DNcwgAC(?F#n})d|DMqHhI2!Dbwhto%?5nK}8#&NR0NM)RsN;1r8k&~JqM~(SiaA1U!!r|~xkaSub zu$)ZkB?!2~HX)K_q>Q(nRQ?!%wmDIsPM?-9UDoZ$pecS=qYznEN+*;)S)Sf)Mw()k zim6*Oi5gRrA;zOTlZ2CzG896PBPo?!t^SsV>IT6f$GPOFF)>N= z1}sTd5eR#sX9h}YNSbgszU_#aGsdvTpo3G!7%NDQ&m(F~52qOc*ixsf5JcJG^u>m1 z9*-3PW-E>ijCee4oV-+=Fp{2H2R(Dsg$f3=3qUa62+DsG5LZ12y^sP>@vl?acRqQd zz$jIKh`$yQHL8(UTy!_7u*EVKhLe}{#;{mv99-Cp{o&+Q-W*O}A%mPSK==3*k<1CF ztp~8)Y5cnmYQ&$Yh#I$tQ_Mi13+C2^(^R$~W$2+6xd}zWu~&3~tk^L+qhlGZFd9>k zfkzCdm?8{$lFZ&o@hH|bxFMY7H1Owf`4tMJg2#Zg!}(khZRPPe?7UzjawF!#AQGRY z)=swn9)-`RxOBh9$ZPzE0HR6M6}3GHJDdoH7_N{$0rwaXnn2wytjl)!14|v1yRkBd zXQLdo&tq*~Q1Jl9Dv!s}@+^mUc@$Z5)NbXdLohW*<#t}FDb7mT6DxZL8~jU<9S-Pw z(SKfs0k>AI!8AeL@rP6Hs#6{MIXt3Ji#Pxs^Z{60W(x>fr#m)#xL19}GdV_Kg&Zl^axaXp8Ih*P^;-Ky@|Z ztdkWQgYL4FC6PL6KjG9%lGa5RK-1|L`dBt(a*}<5Ju5cmTaB1qceH(LSr#Aof1zKF#!k`L2kc~%3aXt3aNaf` zu%3lzQ+y4ksW?O}{sjW?3-kQ8iH^2LV2k{GIHOY47+q+BtfrU{GE6mL=LD`5F4^@a zY*T+}f=4blc@E`-d74qLxslP^Ox(HCHUQh$WDaLkGTRw#hew!F#KfQdkQOtS(V$t# z=&ww)GUQ&U-?YTU9W`x*3v7w^n{PAvV{<4NDwDgF6{gN;E!=Mn!q?sZ2w-b3H^C5I z4Ue09n=q))dV?u4onj4p%ALz3CZXg$;eGuA@IYmA(R zzV}>bmNU|3s*L_msEslDJF}Y6=_b$Nyl*x$y4d9DjCY|5_{IQ5Uq&A`F}p+m$-Iuy zdC;=;H}G|o(NehlJEKt(6CdO`a|@$Q0Q%{*Q1LuCc(|+|Y>ohj26z9)=u&9h-2?7n zR(s)c6-dbBF86-31DvSI6GUfV(4LI`vpJs8YLjP*K7f{cCqO;8wRKSSC8Nttp05u> zC5Y@E6B8|TCA6Jm^bQjpAUOt=&-Vg=GGGZ@vKhVG6zP34k5LVvzF~BQIfK#JCQtUC z1*qPjhUOeb|A!f1v=LwqF!HY^PvCq9Pj4|=2A3m@7Mpd9HkgAL*#{NRGV(7bUmb=C zR9+5MhZy+`E}t?A{31ZtDwDrR0MhB>u=g;xG8!^5lS}L1vVu_sE}-Ifn1>i0Z}R1Y zNVn@IdPVX_^L9pEQ1N*mlV@lC9qK=3^mceUhRV2{(M2Xt*ns5dD~x<-@_dpBPiGnZ zUogG?AQPzEm1SZ^hkOc`-i&+#Re$&`+`q$UUy~ON=mx8@K=e+2h00~WZ9V`Q5-mC?C?pckXKp8hYRAU3jU znR${?k2#&uStjVBADZ?s(rT`xrjOBE&BtLkU`}N8XV3uu`$K`H)B=bGGP=P8V|kys zkkOx;Ga0?vyn)ea<{Cy<1K4Mb{-asUsBG3SS_2jDGumu&`wE&upJL>n;gSo=PGJGT zg2WV7CtM>60e=U4FS5 NoTakFkAG9}{{at#vK9aU literal 0 HcwPel00001 diff --git a/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/Makefile.am b/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/Makefile.am new file mode 100644 index 0000000..19f35a6 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/Makefile.am @@ -0,0 +1,36 @@ +BINDIR = ${bindir} +include $(top_srcdir)/cpprules.in +XINITDIR = $(libdir)/X11/xinit +XDEFS = \ + -DX_VERSION="$(PLIST_VERSION_STRING)" \ + -DX_PRE_RELEASE="$(PRE)" \ + -DX_REL_DATE="$(XORG_DATE)" \ + -DX_VENDOR_NAME="$(VENDOR_STRING)" \ + -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" + +resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources + +Swedishlprojdir = $(resourcesdir)/Swedish.lproj + +Swedishlproj_DATA = \ + XDarwinHelp.html \ + InfoPlist.strings \ + Credits.rtf Localizable.strings + +Swedishlprojnibdir = $(Swedishlprojdir)/MainMenu.nib +Swedishlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib + +InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ + +CLEANFILES = XDarwinHelp.html InfoPlist.strings + +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp diff --git a/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/Makefile.in b/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/Makefile.in new file mode 100644 index 0000000..bda9041 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/Makefile.in @@ -0,0 +1,639 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*- Makefile -*- +# Rules for generating files using the C pre-processor +# (Replaces CppFileTarget from Imake) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/cpprules.in +subdir = hw/darwin/bundle/Swedish.lproj +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(Swedishlprojdir)" \ + "$(DESTDIR)$(Swedishlprojnibdir)" +SwedishlprojDATA_INSTALL = $(INSTALL_DATA) +SwedishlprojnibDATA_INSTALL = $(INSTALL_DATA) +DATA = $(Swedishlproj_DATA) $(Swedishlprojnib_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +BINDIR = ${bindir} +SED = sed +SUFFIXES = .pre .man .man.pre + +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e '/\@\@$$/s/\@\@$$/\\/' + + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ +XORGMANNAME = X Version 11 +XSERVERNAME = Xorg +MANDEFS = \ + -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__appmansuffix__=$(APP_MAN_SUFFIX) \ + -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ + -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ + -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ + -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ + -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ + -D__mandir__=$(mandir) \ + -D__projectroot__=$(prefix) \ + -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ + -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) + +XINITDIR = $(libdir)/X11/xinit +XDEFS = \ + -DX_VERSION="$(PLIST_VERSION_STRING)" \ + -DX_PRE_RELEASE="$(PRE)" \ + -DX_REL_DATE="$(XORG_DATE)" \ + -DX_VENDOR_NAME="$(VENDOR_STRING)" \ + -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" + +resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources +Swedishlprojdir = $(resourcesdir)/Swedish.lproj +Swedishlproj_DATA = \ + XDarwinHelp.html \ + InfoPlist.strings \ + Credits.rtf Localizable.strings + +Swedishlprojnibdir = $(Swedishlprojdir)/MainMenu.nib +Swedishlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib +CLEANFILES = XDarwinHelp.html InfoPlist.strings +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp + +all: all-am + +.SUFFIXES: +.SUFFIXES: .pre .man .man.pre +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/darwin/bundle/Swedish.lproj/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/darwin/bundle/Swedish.lproj/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-SwedishlprojDATA: $(Swedishlproj_DATA) + @$(NORMAL_INSTALL) + test -z "$(Swedishlprojdir)" || $(MKDIR_P) "$(DESTDIR)$(Swedishlprojdir)" + @list='$(Swedishlproj_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(SwedishlprojDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Swedishlprojdir)/$$f'"; \ + $(SwedishlprojDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Swedishlprojdir)/$$f"; \ + done + +uninstall-SwedishlprojDATA: + @$(NORMAL_UNINSTALL) + @list='$(Swedishlproj_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(Swedishlprojdir)/$$f'"; \ + rm -f "$(DESTDIR)$(Swedishlprojdir)/$$f"; \ + done +install-SwedishlprojnibDATA: $(Swedishlprojnib_DATA) + @$(NORMAL_INSTALL) + test -z "$(Swedishlprojnibdir)" || $(MKDIR_P) "$(DESTDIR)$(Swedishlprojnibdir)" + @list='$(Swedishlprojnib_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(SwedishlprojnibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Swedishlprojnibdir)/$$f'"; \ + $(SwedishlprojnibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Swedishlprojnibdir)/$$f"; \ + done + +uninstall-SwedishlprojnibDATA: + @$(NORMAL_UNINSTALL) + @list='$(Swedishlprojnib_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(Swedishlprojnibdir)/$$f'"; \ + rm -f "$(DESTDIR)$(Swedishlprojnibdir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(Swedishlprojdir)" "$(DESTDIR)$(Swedishlprojnibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-SwedishlprojDATA install-SwedishlprojnibDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-SwedishlprojDATA uninstall-SwedishlprojnibDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install \ + install-SwedishlprojDATA install-SwedishlprojnibDATA \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-SwedishlprojDATA \ + uninstall-SwedishlprojnibDATA uninstall-am + + +.pre: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ + +.man.pre.man: + $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ + +InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp b/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp new file mode 100644 index 0000000..4210878 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp @@ -0,0 +1,103 @@ + + + + +XDarwin Help + + +
+

XDarwin X Server for Mac OS X

+ X_VENDOR_NAME X_VERSION
+ Färdigställt: X_REL_DATE +
+

Innehåll

+
    +
  1. Viktigt!
  2. +
  3. Användande
  4. +
  5. Att ställa in sin sökväg
  6. +
  7. Inställningar
  8. +
  9. Licens
  10. +
+
+

Viktigt!

+
+
+#if PRE_RELEASE +Detta är en testversion av XDarwin, och du kan inte garranteras någon som helst support för den. Buggar och fel kan rapporteras och förslag till fixar kan skickas till XonX-projektets sida på SourceForge. Innan du rapporterar buggar i testversioner, var god pröva den senaste versionen från XonX eller i X_VENDOR_LINK. +#else +Om servern är äldre än 6-12 månader, eller om din hårdvara är nyare än datumet ovan, leta efter en nyare version innan du rapporterar fel. Buggar och fel kan rapporteras och förslag till fixar kan skickas till XonX-projektets sida på SourceForge. +#endif +
+
+Denna programvara distrubueras i enlighet med MIT X11 / X Consortium License och tilhandhålls som den är, helt utan garantier. Var god läs igenom licensdokumentet (engelska) innan du använder programmet.
+ +

Användande

+

XDarwin är en fritt spridd X server av X Window-systemet. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin kan köras på Mac OS X i fullskärmsläge eller rotlöst läge.

+

I fullskärmsläge kommer X window-systemet att ta över hela skärmen när det är aktivt. Du kan byta tillbaka till Mac OS Xs skrivbord genom att trycka Kommando-Alt-A. Denna tangentkombination kan ändra i inställningarna. När du är på Mac OS Xs skrivbord kan du klicka på XDarwin-ikonen i dockan för att byta tillbaka till X Window-systemet. (Du kan förändra detta beteende i inställningarna så att du istället måste klicka i det fltande bytesfönstret istället.)

+

I rotlöstläge delar X11 och Aqua på din skärm. Rotfönstret på X11-skärmen är av samma storlek som hela skärmen och innehåller alla andra fönster - det fungerar som bakgrund. I rotlöstläge visas inte detta rotfönster, eftersom Aqua hanterar skrvbordbakgrunden.

+ +

Emulering av flerknapparsmus

+

Många X11-program utnyttjar en treknapparsmus. Du kan emulera en treknapparsmus med en knapp genom att hålla ner olika knappar på tangentbordet medan du klickar med musens enda knapp. Denna funktion styrs av inställningarna i "Emulera flerknapparsmus" under fliken "Diverse" i inställningarna. Grundinställningen är att emulationen är aktiv och att ett kommando-klick (Håll ner kommando och klicka) simulerar den andra musknappen. Den tredje musknappen fås genom att hålla ner alt och klicka. Du kan ändra detta till någon annan kombination av de fem tangenterna kommando, alt, kontrol, skift och fn (Powerbook/iBook). Notera att om dessa knappar har flyttats med hjälp av kommandot xmodmap kommer denna förändring inte att påverka vilka knappar som används vid flerknappsemulationen.

+ +

Att ställa in sin sökväg

+

Din sökväg är en lista av kataloger som söks igenom när terminalen letar efter kommandon att exekvera. Kommandon som hör till X11 ligger i /usr/X11R6/bin, en katalog som inte ligger i din sökväg från början. XDarwin lägger till denna katalog åt dig, och du kan också lägga till ytterligare kataloger i vilka du lagt program som skall köras från kommandoraden.

+

Mer erfarna användare har antagligen redan ställt in sin sökväg i skalets inställningsfiler. Om detta gäller dig kan ställa in XDarwin så att din sökväg inte modifieras. XDarwin startar de första X11-klienterna i användarens inloggningsskal (Vill du använda ett alternativt skall, kan du specificera detta i inställningarna). Hur du ställer in din sökväg beror på vilket skal du använder. Exakt hur beskrivs i skalets man-sidor.

+ +

Utöver detta kan du också vilja lägga till X11s man-sidor (dokumentation) till listan äver sidor som som skall sökas när du vill läsa efter dokumentationen. X11s man-sidor ligger i /usr/X11R6/man och listan äver kataloger att söka bestämms av variabelnMANPATH.

+ +

Inställningar

+

I inställningarna finns ett antal alternativ där du kan påverka hur XDarwin beter sig i vissa fall. Inställningarna kommer du till genom att välja "Inställningar..." i menyn "XDarwin". De alternativ som finns under fliken "Starta" träder inte i kraft förrän du startat om programmet. Alla andra alternativ träder i kraft omedelbart. De olika alternativen beskrivs nedan:

+

Diverse

+
    +
  • Använd Mac OS varningsljud i X11: När detta alternativ är valt används Mac OS vanliga varningsljud är X11s varningsljud (bell). När detta alternativ inte är valt (förvalt) används en vanlig ton.
  • +
  • Tillåt X11 att ändra musens acceleration: I ett vanligt X11-system kan fönsterhanteraren ändra musens acceleration. Detta kan vara förvirrande eftersom musens acceleration kan vara olika i Mac OS Xs System Preferences och i fönsterhanteraren i X11. Förvalet är att X11 inte kan ändra musens acceleration för att på detta sätt undvika detta problem.
  • +
  • Emulera flerknapparsmus: Detta beskrivs ovan under Användande. När emulationen är aktiv måste du hålla ner de valda knapparna för att emulera en andra eller tredje musknapp.
  • +
+

Starta

+
    +
  • Förvalt läge: Om användaren inte på annat sätt väljer vilket läge som skall användas kommer alternativet här att användas.
  • +
  • Visa val av skärmläge vid start: Förvalet är att visa ett fönster när XDarwin startar som låter användaren välja mellan fullskärmsläge och rotlöst läge. Om detta alternativ inte är aktivt kommer XDarwin automatiskt att startas i det läge som valts ovan.
  • +
  • Skärmnummer i X11: X11 tillåter att det finns flera skärmar styrda av varsin X-server på en och samma dator. Användaren kan ange vilket nummer XDarwin skall använda om mer än en X-server skall användas samtidigt.
  • +
  • Aktivera Xinerama (stöd för flera skärmar): XDarwin stödjer flera skärmar genom Xinerama, vilket hanterar alla skrämar som delar av en enda stor rektangulär skärm. Du kan använda detta alternativ för att stänga av Xinerama, men för närvarande kan inte XDarwin hantera flera skärmar utan det. Om du bara har en skärm kommer Xinerama automatiskt att deaktiveras.
  • +
  • Fil med tangentbordsuppsättning: En fil som anger tangentbordsuppsättning läses vid start och översätts till en tangentborsuppsättningsfil för X11. Filer med tangentbordsuppsättningar för ett stort antal språk finns i /System/Library/Keyboards.
  • +
  • Startar första X11-klienterna: När X11 startas från Finder kommer det att exekvera filen xinit för att starta fönsterhanteraren i X11 och andra program. (Se "man xinit" för mer information.) Innan XDarwin kör xinit kommer det att lägga till katalogern här till användarens sökväg. Förvalet är att endast lägga till katalogen /usr/X11R6/bin. Ytterligare kataloger kan läggas till - separera dem med kolon. X11-klienterna startas i användarens inloggningsskal så att användarens inställningsfiler i skalet läses. Om så önskas kan de startas i ett annat skal.
  • +
+

Fullskärm

+
    +
  • Tangentkombinationsknappen: Tryck på denna knapp och en tangentkombination för att ändra den tangentkombination som används för att byta mellan X11 och Aqua.
  • +
  • Klick på ikonen i dockan byter till X11: Aktivera detta alternativ för att byta till X11 genom att klicka på ikonen i dockan. I vissa versioner av Mac OS X kommer ett bte på detta sätt att gömma pekaren när du återvänder till Aqua.
  • +
  • Visa fullskärmshjälp vid start: Detta kommer att visa en informationsruta när XDarwin startas i fullskärmsläge.
  • +
  • Färgdjup: I fullskärmsläge kan X11 använda ett annat färgdjup än Aquas. Om du väjer "Nuvarande" kommer X11 att använda det färgdjup som Aqua har just då. Annars kan du välja 8, 15, eller 24 bitare färg.
  • +
+ +

Licens (svenska)

+

Den huvudsakliga licens vi använder oss av är baserad på den traditionella MIT X11 / XConsortium-licensen, vilken inte på något sätt begränsar förändringar eller vidarespridning av vare sig källkod eller kompilerad programvara annat än genom att kräva att delarna som rör copyright och licensiering lämnas intakta. För mer information och ytterligare copyright/licensieringsinfromation rörande vissa speciella delar av koden, se the source code.

+ +

Licence (english)

+

The main license for XDarwin is based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code.

+ +

X Consortium License

+

Copyright (C) 1996 X Consortium

+

Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without +limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to +whom the Software is furnished to do so, subject to the following conditions:

+

The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software.

+

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE.

+

Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization from +the X Consortium.

+

X Window System is a trademark of X Consortium, Inc.

+ + diff --git a/xorg-server-1.4/hw/darwin/bundle/XDarwin.icns b/xorg-server-1.4/hw/darwin/bundle/XDarwin.icns new file mode 100644 index 0000000000000000000000000000000000000000..9c560846e6422f3ec6b1c19c5f7705fd77bd128a GIT binary patch literal 69465 zcwX$i30PBC`agczL2#+9+G?xa*V(#Et8J~eb)4?gcI@udPM2vr-6s%M$<4wlAfhNP z2#OmB*&z^?B^RDOI zmwx`y*EB3(_B)?{M7smSu;;!Fj0=4->ZuzS|7rFIVYVQ7m^{q3WOT{773Y%1KX?km ze(L$>w1*$Uu)ySCyWXU;v&k8RS)*tg)O2?>kFm%|!rUQN5+@oI^44)C{MEthQV~Rd zp|s{Wlf1#DP--*;Nm_(m&1Xn*yt|Vyn{hH?qNS!&Ge#0!6C5JUSKZcg;y98jDTIKVBxJzhx}VS41d{?ozcl6g9#!_rNW88SUR0Wh7dcvO*j!klD%{q3nzl$pZa0h8)-DL86NHjfthJEy4g%BQeX$>oXr{L z;I7Oa$({a%=WZWd|N5(soTj)ryjDpJ+;h{sHz{uP4|c+Wl|g}ldzoao0ocTIBhDTdwWC3k&_xbfbJMdc|UI8Sk-j<{*dttT&Xvoz_spcAkY-hZ}W*n?xh zjdjV`@jxu_KNL6iTkIrRgoQ?m{M@`+in#elVC1Ym#7)Y-5jO+(L`JSO5oGg2PS|99 zWaL7;Z{(Syh?{K>FTG7pTl&=(7#0vt{vZE({@GXVpyYsKVGJCbwL*^FyuyY(xnvYu zI(roRHtZZ`3mXrx1ziY|2V4lkF)|Fp$Q%q~^kdkHaSU5>4t|Yd*z9xuUrXTMp16Qv z@$l*+Q1+uR$-xu;0i5oJ$@q{*glZSLwd_8HEnk@Gzy>G2R6b$e}TkKI};u5azp z^{B^F{Z9z9y1Qdvx5{icWfxU7_bBDZ(#d)7&zf#+S-VPUwwv|a${M?s9krfRashhK z)7>poYg7ia-6h*w)uL3kG=tLL=&@^hG5>K-RN zGT2>aGeLMfyUQ9nmEDcU+2lfxUEQUTcd5;G&ndeZnTTZ<4*)xBJz%>Yb9Ym9t6F0w zJg0Db6g(a8+=D=y6%)vob#*l@2DQOXJ;uNu!+ksi+$}dT$vLhzkz~-I*4XXDDfngg z;N${#Az(MlL_-$WJ| z^G*u(Zpb^LR2=e=9y|IdJXTJ98U(B_&+XB+bsUB`;jx?5Y7IOFN8_1;cq9o|PeuK) z*7in8{WxqExofprg+4mRPqbNDYE`tfD4OdnOftk{HfS_D4msOH5Ph;#n~vKmZ&7yC zyTNJ0Si=!Ec^&+2lBQSNou&Nd4q#Jpo(0a>Zex+xBf9GgcYu8C+qn(!u(20>T7c&i zJOjBki87VIx81l~(AcHyk~xv;m^JOSTQvqy5WBk(^aE6<{&X4{V%KzcR_Sr`OoQ4? z`1q7|v@}j|$WRYqP`37U;fC30wV(zCbm^mW9BQL&+xc*KKy$T(ypA$Ym9AKAClu-<)}w7T zNL-WFso7htvfKH1!J&!+8J%hV2S_y~JhW+hY&4yb!D3{PHy}>b-6aOfHi?7;2F_+M z(h$Sw-x~~m(lDpd^v^ORL$z=R*I1Vvjzdx`xrlVp-uH3GyLUa&~Q zkgg#vw@7%L37E+V3CNst3(QyABa;keFcRqWgan+7645kQnj@qWLkaW*oIcw_HYX5Q zTO(Lobpky)x`?naT%PHS(UU@_bL{p_CFC^57y(8@kG9(@w&f#MFE_^7eq$v1=*Ngd z{A~$M%qwhhwx3oaRYK(NEy-EWU|llBS@7@nJqd)Jo{_;$Wx%5;OPmA0n|aZ&`HBSi zcQ&JlJ!y!Ml;2ID1e4@v&%*ZGVI+c0=OXI>VFGy!P?DKog{r-K4U`pnzV{QyNk>Kq zMr+5-A;<_x8JddCIFv%!psKUSjvK=KHb~-r&fIMBCZvako<74R6C@d+b}4A>i;xAX zt5t@}EYNcl9Y}bV}kT2}I zWycrIlo3jCEI1$-!;YrW$fis&7zId{AN0=i z$fC4yUr4VAkOAIhFn4eO7KZ}l#;1y}3XlPgNF19B+o`%hjtlO4PJeZP#2Rqy`oKU8 zJ3%@hkCa{=AcM!h!~!uqaCXkP7cV&6zHe({V~=>!&Gm3>JutJ3Yfqq zhLxvNmMMJyOg zq802qRC-x_RQM;wYM}5$)_E|k;8l3}|xGScVYcH8Z@FIjr(ORAy? z4j=sSFa1vx1cSdl|Lys2&;S4X{PT}KgNi=zIR+HN*b?gdVpJ$&Pp*KH7)x3LMKN}6 zHWb_eqhaW~Er^t3LGmEdhK0!k$Wd%IRN1505~#7yVTTEIq zRoo=ghGAi3lN`f>$Ts*MK#t((J3_!ngoZJw?-V|^;=-lx3~J06;A7Zn5`C8X9yCCr zITa+DA14tOS_LcvP4N`<;Uo-gAr3=Z7zKPh0DYGS*MXysrn;f3s-{WV49OWj%Jc?L0*8|!W7OK!)XS0Rt&pzG99M2T$g30y#PzLh zva?Lc-w1p(gdnVrQ8d<}YSIW&*5}hhn!<$A%X}6VD)>MgMiCrCMk+caU8YUUxwRSfj*?U-T z9fdj%7BSN!*~yhi(F&Cvjj+NXBzH8BP&ewtc|BH`I}l{SBxiX&g8jlODO#kmu^-0b zUPvLlgkI6vy0HiL1c}z@D90N$yzNk>q^e4Sq)DWJG)Eo!<~CJ)qYJO$%TcA#MP~BHLx5IyhGpGawMw>_5qo#7at7;4v;F~-kD^}9{*Y^6^+VqiYBYE ztF3qYZfbNCMVQq=aR=k0d{S7iP$U#p)=K(uYI0+jqJ7UUrF9giRM25H25>~U-N;q%=107lf%4XZTr<}{JsNnMW2af>e z(WaXGxONSwh&P-XZMKe%GO6LWffBdn?I|m-;PQoKyUUIdEMFl$LQ`9f8u)~NJWL+|3Tq8=P-?bt z{HRjM_@=bKQz|)7V1|KeqYl35FOHr;QDvo81mn+Wxb&PZWqXaNY-6*-Vbr4S-rQSTUoGI5?*joksG0&so0--?urMZZ$LN$t@Sf>!jyv+b zLMjn*Mb$ORG2p_g*XT7yGt0^*kZQBY1%$(9($Wu)_qEpwxE1_rMWg-#I3FuhAAlwe zK*R?i^S;4Lm^x+AZ=7~_wbl#xJYHpem+X7cy-};th}H|VJEjKD8|`bBraz-}3`@mQ zK3~8Sf|@I!3JMstGL0B)jp-kFz1Pv%u zL{$PVthl+s1rvKGRRd`dn_M)iZ|rQyZc|gDG#{(jRRMM>5LPPMT79r$!ibxLtX8yw zd%f1?=JxbXz1av=4lKj5r9>=&v7%~4OY0ac!-0fg^}@7^y+=D+`|@}is{<5Ftu|VT zqg%_x;68bx>efaJvT>#Z123_}(bK5eUjYULe5%pz9Hafa%O#aylcM@&*(pkFIKd%r zBYGS4)j4V_a?!x0#^`X2PH^|~D}^9pSg`yYxOC8iQ8szUs7}#kNbiIS4iT>bia?9J z=l37vON0V0zf#fCH39B+6#3A*h`#1_3#$d(6l{VpBXtGmLwHZ`DiwfUaQW3O@*@+d zWCta`d(_<7q%ADdJ4RvjC>oCJ6I9jPRd9gEqsBMYds4``qt+gUhR;($wFb)or-jU5 zF7krj;i_Hx4kI@rs#mnby5}QZH>>0weOr`h9Y}}GFrJCr6z&Z=xw-HVv*HFGzgpVv zfu~?Z8bxcDpbK0&xJWQsDa{xbnnrPn0M~?B{n5~hn**&=gG0vnpRRfB4g4Rs ztbOPGPqk)s*S;OQI-$ZugTZ}*o3i>%mQCI@v3}KGURk^Lqqkmp<+;sJ*TN{+C5R4& zq9soaO@Tt*s$r^vK?C%9CguJ8QT?jCVJ74a8cov%m3LI@7_@+L+RV*z_O*G#JTEM% ziCwGqdMh&b9z4uDR9dz_r<`?7+7Lz<)s0)y)p`hOg2cF3#`?r$P6~s4Rn}lub(Iu@ z`(u(b7;*Gy8ZA0D86CV`n=`1pD|aFn&mw0e#zmu%2~0)~>zaf?qi#Ih2K2#SW+c*K z%4m8bgHg@8DqAqBS{gb)=|M#Kadc*M5S_xkB2zG{I{V92=Fv2AMsgflU37dB8gzM{ zU{x!%`&3k(5bRA%jHBbxK?y9z9@Z6Uf=1aOR$ojLqP+cRB&;kcm9dj`S(czzE2vdX zWeHJUZxaLUBATAeLc;Us2u4*ydxQE?ju1&QU{rK;3=&={l_D5bP3?uMt5SrSKqiZl zb95||fph#Bf~upvOf^l05JjG0_?H=%$WXKV34*Fua#%HOf)Gh+VG+Pf44odw^yddE zwfL|`JxzWi#oxJ4Jzai)!Q>05;q>^Vcp42Uu~jch-=q4${9u&g zJ&Bnb7hQ%%HzuZQek4EeR=_stiRoL|jA$@+b6leOhw}p#xkLc_q^IvJNoQCcM>j^d z|5$p!A{R0kakRuO;+-mE*FG9Y^`qGVi@b@!h>m8LSk)bTdbaULa|0M`Whc_;^;Vsv zgeLo`)BsFpHzRJp%Gko+N{hiAkw2ChFv%MaFc=PFRdq>POf=p56Nv$7XD~=_gK&Rt za$IbjlAJCvmmgp44@Z}Hy^Q>v#2CK~GpElB zB1g@d%4po|7?sAw;k1xwq}zGSYtn+5UI%zC283e=kw=e4BV%CJGUl~e0n|KQMLX40 zR^UL^hqO8|nZcwMdwEiDBiN!?tn?=Zj)7=8rPcJrL>PNjPB44asFF8SsU~v*M<*T^ zMh#A49AaLP63hW_tY`o;n@R}?JTaWIEbu=9oD9D#CAbB~cC{Z?U6vAf!NjQ*$DZ*Kz zJP1C9MvIAwOJXRPlj*>n5TV+%C8}%E0dmr7pv{dj{n@}>z-fDfST#*H;Pr=z78$e=qP3{{Z#2a^U&-EmOlC9 z^2Z;&Z}#uK(;gxev(`L`4iSbP!UDo0=gyfuGZf=obBMs(_{Bd(=nx@l01F5V2@j77 z55uso=?)R(87b=olZOb|SU^Zfcw|IqC^p-9?IA+Pro32u>JT9n3xtUyBEy5RW!D@c zXfikDrBH_mL8li61mYo~5s|Qf?bjS4l;z2yTd6|?M^FG-X+%f}b+2;8A;O+byf5qg zhY0&Hw4sQI&@k-wfh!LYsxvlo_Fi^~@DUmcD~t%kZuVV%h|re4DUW%@A%c4qhPDHX z48k%m9U^EprWPkFFC_?=5y!#Ty`)qHr*%DNxP5zagW`&@X>$~8;>IFIhC`*PkrTYvNn0rVWkuUz-V$~)UM zpWQhx<|ob&20)OJ_pITpEAIK=&*69e^cg}nhK0;q`US7+tCu5hZ}`bGgb#wT@P+aH z`#yVa&f1?!6kvSc5-ebO)4|Mtu9!1x$G}gWA(Y*NVM_TI-@g63xgmkhA5Rs|YC*pR zy1&2m#>#uGG>He51qUE3_-G?IQHOW2}4a7 zxXt@Xe!qP84Ly)Fsa`s=5F-R~pbk23NVadIhogwsW+?u!k$}@zq70A{>#Na^Z z5tp4I^k!%AVy-?zICC%ZBa!pw&J4kxx%>=a`v%^Zjn^a%$I;w#=FOWsBLGXf>mNFGZVW#c?6o^b zd@y!m0>(~w-0o~Lcw)jgF;NJ=yIsScbQ1I6eZe-u{RZ zrQak-gYke1_~Gz*pVtR-?4ZC2H;0TmY54x6xw%GkAS<@hg%dM|T^hY(wH3+2I~``%=j$Y7Vc*OU+Y&UMqEt_@H|6H4YCQYmo@H{^y-iVwiB^j&PIN zqB_)SG+Q?IhgpvH8nr!&t~4^lGeWq16D)Gh{u0BcFo5d9y zKVHQg@p(sFcAL%NbP%(-N8nv>ScQTa>@wtbI5ie_E?&Os25%U>rPq4|z`k}#rR>A&F|9p0x8;442*kSD-c6)sjhqmr4mvr zl~yocd_qOtHrebpkYd=`4f%Tx^J`^zBi54E9nq;htj@sarygv;r=3I>N&hEMoloDF2fA!pPKx%4#x$)0zYC9}ye9|0R2 z_JIs%R_5+FR3#NxRo6Di7459<$j%m-q^?7$>}syxpNd!`Uf?#CeU{B;wOxjW4+kK)h>;P(Ww)AbE;mw( zE>OHmK}YJ#e=Y^IiDA17itk{X-HCR$M3KAwV3oYBP9&~^?J1fRiiVmhK~+N+qOIY8 z58yzQcHGLe&9Yi8*2@5Kf;}7#Qnr|F)Lb*_hFqFzam)5Kk0x`-pb>}D0~PV`u+!xM z%8K%KmDM!1)d@sZ5=osLaOxx?L6rie*x6WLmI}UT82G>~2*zTzT!g}%0WKGlh;V_7 z%_fUu7@#7nhXzfxB3Z?|%ie~+1_NOupr;`|Fc~D{8-2NXyScT^Z8a2}v_USftEm(U zYnqXU$ZOkD{JzR&VVh_4nJ=Q@fQGqnXBe2j$zrGIY8@KvmkTTFKUwiK=ti*DWgGUU zl0jYqY0i?98}j#pe`uBf5J<40p{_jsVQb9?%D|s5kS)M-G6S0DS<_Wsrd* z$had8#K%lfq+v=EHs$TEkT$o~@&!T>uu~&JZ^Q^Bjeg^m zr6A*VTFoXS%MgSh@V)@EnPmxwy%~&seo`buE{gxPPrQlvcRQ_4cNPfCg|uVVsm%O6 zg8G)0Y92rcEAgt(N+F*stZ4-ZAjL}c7}>3TMgvnHg!X}(0{Z%Jb3`9(OmFD3IuV9^ zXwWPd)i(TV#Zy3hh{pxaf{NpAN(Yx{kzsWJg`ysyyay0`gcSsp13E@HQB;Z$B9GeG)*#~H z{Og1wF#zznyh>!8z{bH8GTb-f0BQjM*WvmAgMn#`Fc<*MXa=VOOq|paCpv&__KS}c zvB3oo+dxng8_6IyWt9=z^LCd@n>(a@K$syAp&jtJyeUUopMn~g>=qN+fmVw!BGDi9 zTCD+ypr~#FswLu%9j`wc!y!XP9A^8lHy8OC2h!>pXE#vZ6R6feHa&oQBm9Tv- zESXsmA(#|#DTp}SJ8U-_bei5?mO7+YYqU`219^f`Dy*wmyX;lqF5K-f_d%-QnaHOY zx7v{ng|~oPt3qy#U4e1g72!hZWWIn*)MYd2H5#@$SOeNNLQOenp(tDN!~lHQDCcK!prj%Ez?2KisEFW-k*$DGD^tihBQRWt-oH|*H9C+fq6z~4K(nw?8}sbL zO>A^&XElO~LEzs80tUUbQrB_&q5NY8=PdDz~k*Yv7Y>RzqM zMj6FXi0~bLrt*OmusV~`0@;hlSAa4uhuMlkbHqvHrW#tBs(~sDgo<-#RPd@ADY=%N zLU+3^t5J()))*{KiYy4`Dv1cJ?Xj;Q6&tbl8O$~Z0SRyciZd>o-)_Q@YZA*qtT;@H z!LLZ(q*Zh^BH2a)8+wge)eCY!wopfLCF8!k?3J^SGP)goU?p}Zm052CFXKVCW_EPx zI+Hi)lY|wZ3p^$_ipQ&{5K1XAODmzQf!!LlYPH5_qa<8C#o6*@1L(TcIeE@M;-5PL zWw7=>iyc{9#Fi;{1WOJAM+C+ZRKcYzqg5u-f#rDN^Sx@F#pQ*$n};s4Cxar!>#`X1 z5Kf&iIn-klThZ(g<*g>G1E~-AqCJ!^0ySpyX7c%n$xGr6bK6ZCZJ)ypGaordI6M6e z=ArTk^g;)5!9F?lHXzlDQev~oiUb~I-mujl3(!l^Y^%$T^@HTC`+`lNg4X(V8P+W=Ksfec&|E#Zqd`jMKC}J0tJWypH$4PrKHXi;KJD`B=dn(IVJdV2(3Y0NEMl6q+)3Bc#}}5 zjequGDY`0jnGG5((iT4i#pz~pHiB@EpoF>)T`+}^E67Nf4$;eR1#kKxhnx>CTHCAD8=#g(5X2C8&UeLV{P#6pIC1uCUf$6Lvw>?eUN#in#`Gt-Q5Q{1te8+Bw^mE4#3GRZy@%TYoYWsa$pmA90!TXK zvNi~-n?75ytPk~GgVTU`q|;vmw2{2wB9PO8vRwmY2##Su0w=c@IXQ?OB5}18po9Vh zRokrWXb=}M$ypvBSvxdnYZ8h~39BBeWRr`$PKzEzJ|N%J2T*p$C8!*7-epiWfHH!T zn^8#rV{g_rlq4&}6+GBgHPjaZ9;li?B5#wH?>$J86C*wd&W={F?5r0bNn?{YgAy1Z zCiH4`ek|MNSlQ%)%eQ4iH@Zbn87j!qdt_4O6w~;tsDt^i8CZw@ibm*K1*uTEEuZO&wh{cF55# z#kD;ry304m|6}zt|LWE%Dw{f5YfAU33Z947l#~CPlbXzr~{40wr21FRidJdZ{GOJb6YeTqe`Y|Z>-Ga#J-h}UPwa8 zFeoesKyUs5P)di!m_G)~M5(D6g@^l#^NV>6t)11}^71`7G4DM0T%tkM+21H@>rfot zknjoJU?1_KGzzpf|jcnSmXn~EhR#Er&7ux7xv0jFPa{f(xh`gj*6?pkaZiV%xlTXL$a=(o?8CC zt@tOeta`Imt#tJ?G%9uK){1SZ^lUei44d#kUI+O$lJO%yhD%QT04x)nC9VoZxunGf zS=r+5PPMvKdU!|5zh7VVQn^NL(97iAdbP4mxMxRhdJCI6xJ8(3*z3d7Vp7_4<_97D zJ7obVU^+*9OmeZ#q~Pi=2Yb=k(4cUG^C)2SPsE%mK>O^>p>Q6j2SG*p+Mx|yI7 zZ5Dj+&(pzD`gH1twyJ@0jiU|&?+c~L2zm#OuWG3k>|DR@`PKjGQ8f>C)VFA~DrI+9 zgII(bB&FpXbVOkROtjNK{}<8)NVYn(mn!dp&)aL9s(SI^4PSr;$yGf=J@t*fI<>O9 zyGbHI6-Aq@vJL&n2`8#mz$pcSBg8fHFNeJh6{o`Ibf_9InNUc>AjtxwxwC6vpsQL` zl=SxMmky~l{h&iVphJ-O)IhEUIU_n6KZ(vV>}H*2dRT{RI;*(~7VnLqJU8GHfP2@# z5u#64#mo8hxz!sry`4uDenskTuM?sAzq(_xT8KjRqPCYRRIfmu6!R1^lf3>?ayJ>j z{Z`W(icqQg{vN3BPjppPA4+^_`PVvCwXLm@Wzub_iBV4%6gfS(jz(QW~+q& zglaC}wu^!UeFA#G0yOh3<|&gE#g&*NeoV6&fudl;(ghn#R+RYN5BZ~2F0ABzykdEC zpF+?imo}+Dk-AVpAeOb%0&;bSzue%UqX+;+`j2aF&}z}i97oe6;NRXGNaw+aQVajPFIb@Y{0R#!_~Ddnx=am9-6o;Ijr1@%)Ecf^R( zY|=x}&}vz_IeIFEw%I8!=tm4kn?yQf!!0axki}v)<9#78$mIsK-=o8y?n++ghL;~r z8*!NrLwO)kv?@ClP`3$X>Z3=x6;)iSr~)!85FR=h)Wha#TI0D5Ga54H4`pFjX<_{&C-v(zF`YbR9P>pm&xlT5W%J0{X<99;3Bv@N$V7W zGtki!It~U(aKmi9jw*E=RGCa6&7SbrgI09xjV=ywR~U6$G2(%O|4&e149NKW+E120 ze~KhWZ2dbcB=SaijTlvkO$OI-gSuN$&9C4~FVeSY!b4EX2Ng0pm^7gJ&4J9qi;~Ql z2oKeUW`J`M_z2S-=&Szb?+YY*5Q|?RKOk2(L_`HzG^tmR;?fIxaK?ey&vM%weIybZ}bd|xLxL6NHr`T(mZ+T0sKf59c?Ww z3Yn~4j7}#ge)a>B?>u;Z&-G`#=g$rwhdc+J7T75+0Bo+$f7D^>cMOi4{+>8-d|-fM ze?tt4aI|;-htE9y*J`Wd#BmE$wUG5%ykyN}{S6zcZfa?2QpoD-rNRozV*yQEpO>2D zxN~s$6o{aOV86xAh&O!ZbN`JVQmXYv%a=gS`D;K+E~-jK%Z9G+0~;pA3u5GnAw0-5HSZT zm`#3-bOUyH)O4iJq*cm9r6onXc5E*w$kl?180wkNJ@jyNqro}sKI`+?wQ8H!0GPh4 zt$U%eQ$W=ts)tS117bCh$d|Sv5)Zd_)Co!t9OBiq8TxHUj~ww=-~=SF8_5rmngW4V zv#z_jrgUdEGoJSK7ytfLhSa4ad(DFnugNcyb(`$Osk7$>G%Ab7s4}~ONOT^F4o|8S zen3ezL_J}B7b3Fwz_tx3oXq_F)k@FW>P zcxm-BC7?3qp6%-%d~ns&BZdZD$4o8!t&FeNz5LX}$)Gcq z-UI*s^FvQO_VnsCpC{(*5x3}U#Hm4JkIrdP83_MX3Oaj`C|YDPsf1az01}EyS(ma^ zR{70`pMJ;OQYKgH%*UL^aYrcS0ukQx6I2i%{(j{9?@#n~RPEx>-hY1Wu|cO*C#0`< z@X?izF8}kx%U}JFzM)uz5C@Mad#y)RdRs>R9$r22`jrZBTT+Qwgo~F@w>Q+m{8x#Y zJGlz&(WBPmC(w1f-{)>3gAg7*^2}+^+0%rzw_*R5CX)hmnUu;SN7R~@R4C8uCEN;ele)X97T|=qXfY4AD@Pm_7M9m_9dQyTjyaA~ zXehE#a6Sb0^r_R3qm4KXP0~Gb&=pM$^VMZbpTGH@r(XN;y(jOz{l3RvS~m%3=xo>O zd)50gwjJUNxaHzzgSMkyA{OF;8${?>ueud6Sln}D;Np zr`)Gc4-MFjf+5$Dc2UMhE0#U8;QAXDJ^1R!pa1=#+ity|!YdLrYgDbxT`FZyW=dYs z!9(Sht;g)$vT89$un6Tw9f-R|q>1Ab-#gG9vEMD{K?UhUhmg2)rE73-`1HBclA#kv znuPiE*H^DxdiTP)v*zCN*azQz^4xtlFMa^9qB9D4GDU4&Q+sDua>~Z-C8gqKv$4fZvQ_U3%M=IOPs zJoSfL=go?obNkaDeD%)KTWI~S|s4Jcu{-^ zs31kkg)|t+ldZU&^`{zu?e6eQo*gmdu+OHSfMx zKlu3N-!Gbf%l%8AdmC(FXK|^xUQv{?Vax7PVNFeSRTTj7*}MoyG5z_a5b`cas4eKW z0#L%yO9d9#3=|$u`4oh!r&=i7wQkjWf&;tr5G99$KLzy;}v(@IREB* zAAb6^kK#BRca`yZ9Cp^$;xaCe&*O{GkD*|4Bhmd_6~s9pOUs5W45J$b*NAr_7xF4} zd4cYRSmdMCkeb#)p7`Oa=Udf^8c|6W{ezbte_-+Tv#!7IZ{IOKc=E2B=HGP3pH{rO z?(3w?&6_yMX&VblN)O`|K|DZ8;YL89qY{zBr_fy)z*wDx2T;%@ztx`@u8zkDrCiLS0vc1rrw_JPL-iwEi2m` z_x`iLUj(YRG<$|L}V?oC+~5|SQ}B-V1M z3s>}-PY!xj$x6L9u*wHf#9YS{)qJ^nt<|DeX&}h-=#E-?WrwoAeSPU2^P*Ll zff_iP_=h@@Uw^ryPp8tKJki_Lt?X=XlBl7bF7A_^)e8(?gp?vzp4^*mAsOHENxDeZ4Nwdx*2zp1OG zSs~>XZB9@4@|_n~KK}TVPe1qaORJVXaO;h8XU+(ZoORRv%U}QKgXMQG2Cm9#8k_1W zdFXx@ln=0|ONUmOP{;AV`Y__lpd?7?_;W}ljRI7T_I(3Vzwz8~nV@e7h z^ZqN(u3Yue0Hv03oRy};z!nsl5!GR%Bw=DZKoAKHsx5Z=?b8DNMYK7FUSlq}8 zbjNpzFeoXY=t-jv>6}OdpGS&eHwsfTQ@{LL)zjVG)6r1H-M>AXm7KbL)3@)eUiG&R zqdD2TOLlKs|F74U|Nhqbvm-)-0z>Ei?#<05pFD9-!iL@a26+QiFQ7(i=O;%Y2Umj=xkNg)d&u31vu8W8e!_ke}DD8uQ}Vf3bolhU^BE=?%5E7 z+?F3QY~JtROwW1mEB1yRhs9N50nQEZQy9prntaOwap)z`I|xj$J4nC@w8vM_C8t%l z|GUq=Sy#}akP6EW?%tlAv9VZDvEkouty%kR+V=7WmF2|uuEA47c6}>&v6yvJu)$Hc zto$y8Aq4tcv~co6niD z8s7e$`CGRX6!9fH@z2-3weCNeMSQu+>>N3BZshy(XHOBwbSWyp62?e6;qxPw3fu#m$=j6W@Ezjg5Ujcy8PWz_u%aLuTB(?0sfQ@y_D?W#!04 z3j|DFC_=4PbW`t>`R~0)oGy5*pZSKkydHs+?rfByE1tDgDGUtf6rAK#?x=1=D3=K*yb z;s~%qUW>dKkY~)le?u`(B&n6w;8jr~p#c3vAFe=Lqv*ty!HC~85SAdY67Ex8Fwl=L zOqh@|Y4*@!D{@$g-+uOwSO2)@*YD^tIUcFTNov zeC92z9fxaLJGwd=8>Cf2KJ|0Pgq1Z7Kye77c;W&Zy=delhI~x&JDB7I(kp#=BE2Gy z{^>hwUi!GPY?8+6- zzWCNB^fZd&W0TUpFyZkZ6!ck8**y%!+Z78a%Al=X{m5Mlubc4}J9FDUVQsrsi||42 zctsMIFRZF>?&=1@)#s56N#u|n?(;B#*DWDj1HF}*%uLolRxf|z$)}%x^I!2)%U+bl($}@e1bZj0nW|-S1uhv=w)Esc?Wgu zc5wxR{i^!1{Nztxd*c2-vr^MJN%67q32`_*C^jxGo|&*RJ|Q6qXS35X_YaPIKjav2 z5iY%6t(0wm3#>$TVZ{@Sarz5e$#Z@l@&n%Do1zaI7XH{V{flJOkBRdaO=kGf&)Ui%Hq06BRb=l ze1ifVyt6!*m+8UX;nX|ph*N-bQDQ|(n1R357RQSf|~iLjy+*>h6wKnM5F0>MSQl&P;MQ>~h$wldo)`6I!bCg6*40H4-3L z>a}v*ag)V(GwP(vc09bsYzBTk!3W^YHn_6?dVn;jt&fgi@t!951c!H&NF&) z@WgS)z)@AF;rP&~2L*v~zlGW<;~4S4`X@A-ebq@H#z)A2Z+V< zXGVukI0o!?v!+9BvSr$%1_m6*PYj;)&x(`xjE{}`&Uw#xJf}}N&Dx_bYJcacGdRi< zQI`qS%LhTIp#%5K7@535v7>jC=lfs08An(!3ru1$nXH4~XP*xDc+Pk!dYJIh@$oTy zeDT=Wc_aeM@snrHo<&-Sy7^t`)gY>2A(xyvG2!)s1c&{XCAjq_>K$+Dh5>YUeEclb z>=u&+#Bw$VW(=G_^=Tk#Ll|FpVf_5*lgE$hj#y8Crh(>xKeMBv)i;6rFsS_lsSN~E z7b3VFw*^?OxNQMdvAexzPoFw@+sgPi!G0DK7l?Eq102v*6Yc8>N-ZkvRlfQbHAyN>KGPd;M7?Mk1%-6)+5b!y}XGGg|y+##dJKD+Mh7Bcw4pt08cV;x56 zP_%1Bn`3Akrwb<{sqUf{srl47pEvUiZ10Tcq@lfHOZrbV7^RVsUiG20_4HW#rRE}Q z!Pd%lUCxm(qfRZW+Oq-uFCl(Lb5R<($k(lNV7@UUsl> zcOILuGwtVg7NwHm}r+`4Vrv2hhB0#VoOcjYzqg|J^5phT+BRnAn{lKWW_#_r1EIBbQCYHel z;b1MlyoV^23>y|^ls9I@RA13Rgb_@}yyRHwr{BdUBr_Pv$qBL1G4X6a3%{g$2q4bZ zZ7k``jm_s=-Z=yyLKb5IV4%$;Bqb*&0z`C7B72gKU(z)M!fM-6peaa5oVcoE2w?I6 zCXV` zaZHLAdFs#Y5dvBD@5^c|XVHePX%NE3*^EFyz@ul<;{X8t@U55xiV$r4mvjdK2*KMR zk)}pVI9GQD0Za>v5tJN5;lx0GM~^|011)CZjMSgm6a)xoq#F;k=FsyvS2hH}{5xU( z#Ar1CoS4{HdJOdw+x%?grT)BTAQ(2$vZc_RAD_s%vJnX8=dc)9JPZ9eJUUE{(}JU8 z{WR33{;U=tAX&XLUsIBVNWP-|Cj~ghVp%jS8jr!EnY7@TIKTK$|D3iTShRUxRx6)H zvtQHlgK1cdfMhz076keOYYv^X10?dFYW9J7U0k3uJzB)Mve5_T-3Rj~#jruxI4uGu zO{R=1FZHMUdtlnp>W$^VVGif&-X7%WVB&;mHpqg7CI%0L2o$FLcuNl=u4!|jh9d5& zb{=FwSX>6|ofaL(q~uEcR09vpr`(>eDNLgIrfJ^6j>C-fbXr(+%#@|1{&>F*%y(pO zPHQ<%vt84x1M^j|7@JUXfhmudrHjB=$~e=u z-1r^H_3<~VoWqlm&lBdN=QniQ~C|U+?R57uMNy-D5fmM_=9~mem8++86TgJln|egkhmVD zE>tRqX|C$Bff*g8=_o86;QUC34JFPv8U)#-^+}0IN$b}mdMI(GT-jR#k{l5sW@1t~ zKhal%9c44-(`hK(WWcoR8S6ojE{gNAo*I~QOg_cVkN4B~{Y6L;Oq94DXUtm9!0{wt zDG>!DB+-lQG>DyTQ|$aiD-Fz=4YMWyGf50K9>xOVAv#k6z0^koGn$Ghc6xqB4-FD& zIEXZ9Jw;jo|FseraC};x80D3@bG=2hWPi%;Y4|k%vK|M*rhM58Gc#0DFa; z|E3!T<%A2sb0=`pvvPB?GSkyph)f)bd?)&ujPB)qrNFU zx3G9K3)NQ9vBo}=-R-e)GY@p;(${nT=N&Kp@G%>7A_1hwO5a>86%{ZbQJMwntFsR~ zBsm4<7`ru|25OC`W)(_%N;q^H6eqPRwMu8RDYm3bfve$Puh9h~*o?*T zXmgqQd<{Pf!em@bkxHxWG#qIyOx)3sOBb_$#U>X(6tWq&zz&l#3nl#ABnZoK={mJV zqttYkCbCLP@odkp+28_zd2Ghbkfm@6N;W4!vX_`>QJb79Wmi>pOlI+BhW*!VZb1y* zoJfnob8^>5N5?0|+claIQ+J1~m`=~!%+daD^tGU>{EnFDL{<`*Kw@H-L1lOJbT)Cb zX>^>`^1sm30+4bh<1Q8`XJQQ4c*4FuRo`iCd!uAGD>^1N-SofH(!wSe?}TJ19n^b5T*v&HQQa8)Q@y60joVFk)F1A^x z?jKUM%Bu=DuyN$ZlNgMaU%#8>X3x>41MC>sRZNjy)iTo&*+^`u&Q% zENt)>_S&866Jlx6Y=g>l#@OCecW_e*j)HGY9NV82{<@tk5Q2P1cpFn0;DL;4{r8rR z=7#busVp3*gu*TfrQusse&sfn6mqd!UYMK3h@qJ@y-s^~bAzxTorNbMdyR{Z#i@Me zSM6Z|->==1Uy>6~lj>9^hpM?wxN`#wPmTo(NoB-FCroDYzee{;DtYHXX*T}=9#a5O zqD$LUCoHCvh8D9vJwJ0jh;=f<|5Z9yQpvkdS7jfNWYJmHzTOIjqMBC>O2dFynUuMs zBtJdTFHy$MlwYN5C5626LSx>J&Vqzkr=w3@Sk67PJ1-TK6!Ox{!gBtB&8%1`Vki#( zhb=3qT$&M_f^AtxN|3!aF7J1!;zD-F7B&o5kspb@t1t8!>So!5riKzTQNpXHURG>)+ zB>m?$rucHnxdWxN)Y5_k>!qfY<1EGu2xf_yJIY1nr3dih8Jjur(Xq)CEt%w8bW?Lp zKT6bP{V3>w@`jUju`yW%slv+|QOF7wSfyb?zW7WSe%t_a9q}OLT0lVH^f6Bn^RbNproX5$Bu$bP*uNK^kf1@ zBhITEO(LfnO{}os9CCrLcN-&`9?R(ix9+^uUIGc+4Y9O1R&H@gadF{}f`ZMdi6CcW z1eu_LZkP4ShLXssh7z-#@MM!WT{yar!GLT85*Cv54qGoakq{sZRKTX@mw+S+^7A+6 zvf`(-KLe%)12bOHITAJ5IfCAY8unz75y$xqMp87*jQ%eakzR*xvRA|}XByP41+e4- zm^c?HU@R(J8N1WTS?Cb5@A3|j5PydV6AYE`K)o4q4uA%oI2mxV4rc@>&?=~(emUWU z+?;9-p#+Xj4zddU2sydw>%k8pDzWA?a+b$swb`uJOFbbW{+8pwobm>3Ln2@^FM2pElH)uL6aR_Tm&w5uK0u1(t{edM2{ zkB~m-`(5a?yeSo7#tJCILxcf_J}8eZB9&pfm62g&PYcdvKwXblK46O~Py z4-X7NpuBXd^BCC!0(M~AP=?;vQdd`A>?q_qZK-KC^87#fP5<8Dh~sG)$S!sLkm&KQobUHNl8)&7K%vF~ck;_uubw5mfkdKhir;Nfi2M@N^m3VS;obV?nI~|fjWF&CRi(|KW&<4(*Clkx77k1=l zI_QFji(fiLbW%EwHWMkF)QrNGJ$qW~iaqEH3E>PO zox%4Zk9|Xb2WNPH2V6!j?JmoKJ)Hj8&QI1imgQ$zY|9!}*W}srsyA#qc=~UIciQDM zkVzixbwN0=j#qc(V7;fM(UZCB%wPW8`Ps%5 z6`m|hR$0T!Qb)GCZhiay69a?Z%YBd+^`14uv1<2}mzNY4y2(#H3_E#vlX>*mZ5_GZ z$P=sFt*svGrqg{Fz5n^m;cXjMRODq?b86SFT$YvXu3o!kSLfL)7yC{_i@v$n`$+=eA|*w-;I~&JLVKQSpZ}hqi5KEOlD5O4oke zke{8ETe9+_okvc94j|`TXHH3l+}L8VWq}xwVzYrDa5BPgl`(rda=pACw-+@Xth8mH zJKui>qA%f<{{8Dew6CpoXIOJr?Ag&!;IO+2YgTXG@#V>L=X!VL<)jEwtyyR#HuNx% zndy%<$R=a8bL4ra94M>oZn2yD;6y!kwD&By+U$!bc5iAZ$Vj)BZaTWRwWctC+49Qz z)tk3%|9Ewa1y+Gx;msC1lH#y3ZJAd8<3sKkeH?jS{>ggJ&aLjW-o7&@yCE;{J?{iB zI1T=pZ%eZ|%2t1VY;W6dYDdJx~rvvmu6s~pJ zSvK^739GPLh;)v{Hl!`|j4-l&BhRb-;kVAZ?k1w-WN%N$@e2b-J9MJYCmoIZU969dg<;CzH*&x*Bsw{y+28qc8Ddfu+EXMy@K|U>v?B2-pKKze;ZqN3u z9_KOCx^dy$(T-!M&YULC{eL^Wy=~3vbsILWZK^EDcYy)2iEKx1e!e3+f2|Yc59XA# ztPHCK2}(`3TF|F(r~jHVyl*4l`^c$^td^ZM_HMZRp6EN()d`C^b-b&y`@pX4pR{k= zv1|X~LwnmdtgJ5eI5W~y)3Wl)S2VbZyp0(Sdk9z~#gb{Wq&rjD>5%{2F_4Aa>#x><_5O2GVLDcOz zejKh-`;YA3x^B&ueSLrTUUqoz|1StTtt%^w-MLOMcvjWULo40(+%)hy#JNia?WLtU z%*@nu%djV)k*yl27UN)Us;9BM-qAsHP3h?D?(Y1{Oy5(T=eFV>wWO@*F%DAsp;;P z_BAaw^mLCPdKskap|@R&d8j@FEOlc?28ikZoi&B1EIH5#x4h1dqum`{yNvAM1N z(6`_+_+{|VuxnzR>8V+zts7c$tf@pwSZcb>j-mqmLFP)!bdplO8rgu6@0I*@cUDSf zOeY+q2i;!PH8EL`H`i@iS&quE)2$hH0v*h7 z7=Wv%+6b4=I5%`#0u{l+bOdM|mr)Jp>c@GrrT zfIM4jhUcTEy7Iytf|!<*lLt9~J;RF96HAu!+N0?8wu*dj_&<)lifLF zifhdiaKSpW)@-T#vh@$gzxmTw9bbOl{>k=zJ%52n6mqRsq7af`n0$x$^aaPj)!$ct#qL!ZxQ_Gcw_5&$ML_HfILi=0GLi&I?oF z>UnOj4ITQZD6am?Gk-&KkJn8=_jMB#c&QhA55eTLYzqXQQag36_v)bI3jaUQcbelT zd%BJs-nFrA#Yy--!*1R&5OS?!pukJHa=zJNr({|(%k9{4^xM$9Xf5b{3U&@`JpP2b z0%&AcKnYBD@oGIPB!^^<3K`L5w^uarB7eHC$iE2Hvt1mlhbs+4N7|Kvv#26Zcy;2n z`wV~Wz6XN-1xN#~)}bnIvbw7ObU!)+1cMW<&1d)?`%xhXs?I~V?K-amK?NW`?mGdQ z8F6LmgsSj4*Q@Z+jg37B?$!r^2mV^?tG>S~@uJGz{?q7l_ia?)qnmVpU$3t$$M;+b z3nvDVMgDhJ-_w6M{dGx6Ezz*NmQl7mFFWPkn;<`WR;_Nx`7r*enKZQ@`H}leYf*V= zk;mh9cDR+RtRlS@CeW>`FFgoT-w`u^)r&z)8< z5$s28OQSn6=3%u&ux1$cWA@C4o_@JFF67mhUwHE2`$Fk^C(Qj=v9j9v#uG-PN^Bio zo&OmVr-_ww=6e2#J$KH74=7||G;GGCz#m&0%ClpB79DSpMPEXs(rXp^r5H|NIFs!T z#o25Jiyp$nG0ZfH0)3eLaD9dSrGJVx$12n}&_AfJVi>+0qv1G>K_f8Cc^ll1>Z;r~ zbWyHEm3TP!1OIV0fl(+pUVyQ13XR5~ViNhx zf#+i^3WG{xfKtM5kM~huTl8y_-sRE@%s22pu(eK%L8H^qDsnM8&Y)6hNJ*y2m+8B_ z?2UCL=4TgJYfNI(jg|UIPK-)n(rE-G2V+p^Ov*J=Or}a7bhW3xJmbX$NzKvHStA)A z_~3k43x&y`Qz;Y|#-Y$rEBBC1CR3;na?Vs$<-{$BYl~A%8IAYA&xC;_oW-KkXcQ+F zN}(}X)FJas8tqY8?S6A{baSGbvt~5f1KZ}p!YC|qQ8seh_^5L_K+(ml9<6}WR@Ie!- zh)T+WCBcH2oKVtEAZyzsh#tEd%55=*il0Uj%`a) zv71N1Jg^cMgcvr5U||e`%AzybJT8;!GmUv7CH)BRP*q!y_@t>ZTg!WIbXot4$iuiC z4x7!O(_ntCfXDFLWAlVC9?f;d$dT4-_HU|(0DLEhefe`P z6J&U_H+Q7(% z#{hU>%`Vt@ECuP8X)Obwg2dM#aC73#~WhX5>)K^vFiWdf!Qfsn4QZe ze{vCzN%NVvbpqgy>RQh`#;8WChMPDBxC8%jE>b>Uz~>8i1c%ELh(tc)Vi>RY=G2bH zy5bL>Ug&n~`MNQw9S{Uv82F?hOeo}Wc|3toEFujHTAzC}WXH#KrRmWN%#Bgv8Dk?m zu+89+I7=uH2!#SZOe~TJIev}5GcK>=P<@3XR-dpnR?Z%q*MXUlra4X#Az%r`5(%H> z*K_l@tPVK#mxAdMRqTqfSsnP`Vi!iG@kJs+%ohqpVu@5Th3U%#SjWc4byQb--ZqjO zGGQEC2R;xEKQ2Q+hy_xySR|6jWMZCQy|c%~b=1`sz5mn#SCK)W9T(Su@AQQ&kwhYu zNA_?Y@wmtitN_IkwiKq5ffl54xlG9N2ddg}z#VX! zXTQ84aciuMeG_m8wgk2}g)4=hQ!aylD3sE$5WkMQ#%6b%g5&!QpXHX1&+fp#o9V*n zGy%-1bjZ01l~OX5=~MBnvB@29R=>3vZ8zT1n~*yoAo(;bmn&2Xxk8~-E5xujNL{=* z8r)HhlCuTq$eecza0gb4wgy`Q^Qu)!l}fEfrt>R#G`3?k%Eyr1#KK!*JFumsmSqa1 zDiS7FN2+DhSl6|DBeUc4hVrbJ^rYc--kRA#h9MeF0D2%Ir>G+}8kKZv2%M9CMGt3o zoT#qIiCaiouHcr91~7Fm52j{_;D>f;m|CTD3d5JczIY?B0}Pk2h>VjjO`zETw9)Fq zLO{_fwMM7aIJ69sWn=?Ll>&oD8e~( zU#5EaI;x|ouK2@e9wCi48B_;8sP`#5QcLKk==27?Mot>A?R4fuF$;sx&%-(P3cfBW18_NYyMEf^@)<>U{07n6^YU+c~)&1ekvt#3v@` zK2oPQnH)x@UM-p8*L}e?L5J8trwiN*k;3V^1sa9`{B1~MPQKyOsW%w+x zcZkmcN9%h}JO;5;_`vP)IWWj{!)bhl&R~j;G8qj9tbI!t$AQ<>sO zSWk46L8pxb$Az@oflYOiR1P?TiB}#Y6WQ!LXiEUiRe%eFeKbZQiVcD^8tv?v;Y^&s z`1I`v$x&V9ieE%p|JgfkOn4Pea4JuxBaA-*QCfYJQKt|vDHw*&894Vj0y55uS<@xVNJ(}DcEeX9lFb@0}B*t=v zKmq#G8e$TQTyc>?Hj~TG?d)Ejo0I(fBXQdj6wD2Gr#At8OmJZ{ai&17(dbPHMeCAu z5;l#_d8?yyl_leYmmfA1Wox{ohREpA0|Ad5E~O?9=PlD4QyKuHk~QbL`AEG5UlXL?(V})8E;2NhDwYv zy7GI{p^)Xm?xzWqT9uFiJ1_2d#~1B+NiXRlm=cZl*Y}`90a zcI-b=@xd#G``HY!H1Zx&H)cRa#bUCBA{K}Z`?B+oM^>aQeSCHpl_unK)9*!(g46qx zy;G-&_#rGlmx^PIb={r2H)Oy0^SL4>MuYn%W9Pl0ZWPW}MTBsX6H%N;J3sw2@15s< z7Qv=sG!CSG;dhm~F>4rg% zhM$VXTpD%$k&fL5tCC|E+&2XzQdyzohZN^sr*5oY_OGumRx6|&M)KyHV}eW3I1$s>WI`W)52zdR zKUGy^z5YV9DN@9Bba#EaHRtVT=SQ$WE`=>t&YT+J`(}MtI~JVY`{A1Ie(UMjq$oN6 zrJjz~ZN*8?KQtrMCsn17obFGuoOh49fj-m!{E6&jjc8t1_r|hXbL^vX@!6wV|-GqL5VKgWX^iGs2j>d z_2u@L_3_PdimB_)^)@~8#%oWg!kEZ;1xjOrH9I**E9KFBM!mxp2B%l`r>d&lr3<2) zlhj<|;=rk9fVCAyny+*Wf^ zyeV>eD1lTMbsHTG%e+G56t62)$!@)H{ZLawGh8^(JuTK+CJHp>-ENlcU%~Y##0*OtuCuMnMmZs=U95)%{RIR^XMys0+{%%N4aoK9!^KG-n*>^ni;azm*4{U?o3`JSuOS_e zuTfM{mHW;-0-MHQzBih$0hXJ`gj;nSEH4hk!RaIQZzkEko4_@uj|0~zMh@b@M9f8F zur;n3&y?Vk78Pw!PY)%H$9wW7WR2-#lQkT*MX67-2`rqd9Fwd8)?-uoa$O8EU34@N z#n3CmISe`y7e78$Loy~-x)-(>C zOjBMPm#Gmk7E@zMb-81ylE9`@xVrI}8X70Yp$Sx`1c*v8QAPt{lxb##vFXTk(-Ut_ z)R;GnsPR@g_{V$ zl1l_Xy(v)RJvxQL;44kZ&CS;MXroT2g+IDE(|HWv#+wjSV`JU&)Fn!lHc}z~+0CIE z1~!K$R+^G(YOL{5MxB<>5L(HsaG&XBPK2p(xVk*!m4|c?9i*|hVrqmlSbUj2-fB&Z zi#F&q&Pawvd*2i?nWVgUE2c(el_TC@OiD1S-n=DKqk_)hNh6IhG0`TIL95X?)r?4W zL@0y28&r%B)tHa6inpIMSgl5R)C8a!zhH6%GC~s$B0x-}TBTB|)RD6wGxvR5z6n)h z$;#T|e|ctsxyU4+J0YsZd^$%g5ldt;g&IVGB!vQmN&RQr%<<70Pq&j_BNLlr72=7Z zHGVE+bK%0wL9Q&FkHIbabEV3qn!4}FQ zktBzlsZhzMGOm64AB(M_{jQ=a|INpYWiEr{Unk7gc*u!G;4~1VQ7aX4xlATks9;}R zdj}YUt?}?+RkbH+k;d8>qllUWTjN0&7D8o<6tEzDuGHNY7%pMStu9609<1p z4V{>Dog<3Q7Fio z9txiBe;gal)>w#KB2gnYxsnamNwYQP;7*KBVGHG;Mu|v--j(IytYHQl1=m=FBE<&= zwkjbx=9iO)Yuq=3;y~Kuh(VbWkx(cQilwqJ<~7rehHFGOgNr=F7a0>`Ubr2&#=~Lg zAq1zg_)>C}gfK)Tk%>e7r6;vx0XCLw2XA?KI$ISRyZH718_$V3aH3He93cb|WJ)eL zsg!*69kS(U#>UbU)fLWPK0uWiV~tg}$=G;9A!IWd5TB(=(qGZ5yG+3HR}0M=gS7Dr z(uE$v`I^{h+wGDzQs2?Z#e9gIQbi;RGw??#6S8Tz&$3HLlQw=?Ra@}E<2Xwd7ytI{ zlQzc6*vOT99KDUT^ix--_sTd|N!$H&G*MVSnGEkq@; zkjtV{aKD9bWNkeE-&cTDx8YdKU>$m7q^FW$6v9 zjrS0113c?pEkhRFnEn2pvNonqR~h1xU1dcsb3(LHqlR52c?KiMC zDr*ap7lp{8ip;OyIcr1B5-K!Nab~w0$=9k?D1h-onRFT*;tT7KKGsIkaM;GmD$j?; zsj_HulId>1Hs(^8e2G#Y1ve>^Rs|=OLr52dg|bk}U{;O7ZM5a2EuF`f>*8YPExa4J z4dDz7(g=Yp5>i;$+dK}NO~58(vDr*8z`|EY;5I&eJ4VCd2;_RbV$o!98xmie%NV$g z`$7n~0f7!=Vm^n3PDKaBMST)(Hb;_)`)guaw?lE&`biX5k3xB1LRO}2Bi#p^nqbSjSX?Hy&SXTxu+gd&7T}m zBVt^l#{Et>4=b>ry%MBp1Zf)m|MzJc=11O7!mvdl-v)LZ^9FW&d#nH99*>~>z>c8& zz>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8& zz>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8& zz>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8&z>c8& Kz>fd-^8W`>rs%5x literal 0 HcwPel00001 diff --git a/xorg-server-1.4/hw/darwin/bundle/ko.lproj/Credits.rtf b/xorg-server-1.4/hw/darwin/bundle/ko.lproj/Credits.rtf new file mode 100644 index 0000000..34408e7 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/ko.lproj/Credits.rtf @@ -0,0 +1,168 @@ +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique; +} +{\colortbl;\red255\green255\blue255;} +\vieww5160\viewh6300\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Contributors to Xorg Foundation Release: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Kaleb KEITHLEY\ + +\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys. +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\f1\b \cf0 Contributors to XFree86 4.4: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Harper\ + +\f2\i Rootless acceleration and Apple-WM extension +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Additional XonX Contributors to XFree86 4.3: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Fabr\'92cio Luis de Castro\ + +\f2\i Portuguese localization +\f0\i0 \ +Michael Oland\ + +\f2\i New XDarwin icon +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 XonX Contributors to XFree86 4.2: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f0\i0 \ +Pablo Di Noto\ + +\f2\i Spanish localization +\f0\i0 \ +Paul Edens\ + +\f2\i Dutch localization +\f0\i0 \ +Kyunghwan Kim\ + +\f2\i Korean localization +\f0\i0 \ +Mario Klebsch\ + +\f2\i Non-US keyboard support +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +Andreas Monitzer\ + +\f2\i German localization +\f0\i0 \ +Patrik Montgomery\ + +\f2\i Swedish localization +\f0\i0 \ +Greg Parker\ + +\f2\i Rootless support +\f0\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f0\i0 \ +Olivier Verdier\ + +\f2\i French localization +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Special Thanks: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Devin Poolman and Zero G Software, Inc.\ + +\f2\i Installer +\f0\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f1\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 XonX Team Members\ +Contributing to XFree86 4.1: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f0\i0 \ +Andreas Monitzer\ + +\f2\i Cocoa version of XDarwin front end +\f0\i0 \ +Greg Parker\ + +\f2\i Original Quartz implementation +\f0\i0 \ +Christoph Pfisterer\ + +\f2\i Dynamic shared libraries +\f0\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f0\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 Special Thanks: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Tiago Ribeiro\ + +\f2\i XDarwin icon +\f0\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f1\b \cf0 History: +\f0\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Carmack\ + +\f2\i Original XFree86 port to Mac OS X Server +\f0\i0 \ +Dave Zarzycki\ + +\f2\i XFree86 4.0 port to Darwin 1.0 +\f0\i0 \ +Torrey T. Lyons\ + +\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file diff --git a/xorg-server-1.4/hw/darwin/bundle/ko.lproj/Localizable.strings b/xorg-server-1.4/hw/darwin/bundle/ko.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..fb8c77e0d5f68a93c9c5bbb3815f6636dae451fa GIT binary patch literal 1332 zcwUv1yKmD_6vofMfY`b-SQQHujhlja1R=zuEEEAMhzu+yaoW&0v22GF#0Ucte@GV) z3Y91oOA#We1Y>rF4*e6DfZsii{{$< ztXtBQ7g+1qo-qd!V(AbQV(CbOF_Z{<6Wh94yNq$h6M4=U$p(8%?ohABd{@>OtGo^J zOs$Bu%UqWds|6UH7_&M>+%4th%0)RZ6>M8nvBlTibw)=#5N#quWf=3cLG3Zt@dvC7 zKO06}#c2^^%ZhR~J%&V=SjAPJ;#hnvnhOc*jjGF!7`&Es&oI`hE7X3GNG*%})`63rf&!eT;ky<>> zadc;CZKF(}r`4X+Gj$&6t`4UjyEWoM&GM90{!Wx;^jzJekFSTLHwSZrEwT2tcYehP zgX15+eg7cV=-BS#cfUVv4~RRM>mTi$?hpHiS~IIss(4X{3AVv2WZlpnYXt?f)=Boy zqy4vq?3+Y1i0u+*kT>-vd02d&M6HHu>}KjeM6YXfFfBe+YIf8t9-*FVLQ|D1#JuykH#idfA)8&xNB`o?&ndZr|+-qX~_)(Jzo{%iA`^_#hBcIE1 z!o+-0L);YtWOSL+WiJtx*_Cos9(Dz=e3!#&n@cNYIwX1e$kNhctHtcH+HD@UN2b;# z3P8n8%>TJnT9_@%NfYy@NX}Bbtx$51O2iyHF@KbO(ajqw8X_m>!Do*45tJvC zxy%K{(nyEHyqL&x{KR~5TUirRA$S;7=5pC>(AER^wA)+`dvW%LinnKJ`#l`pW?;|ZZ2>hPP2Y`1YVc1q{c?|6!DfJpe4AvGuU2lWsx`HhH<)~KgRj2IBSbM47|g7! z`H37m^R_!JkHrx}`a|jPlZQwdu@EaMBxdq6;()(4xR-zsozqjM7ScqUNK=f*?FK$Z z5FEzyau27|YDGTs7wx(1y9MzKL3|t#Dkcly zuM1eP5cAHSO@bhF@pw?uFnd#_MXs?{skpFTLqNW%jLu@T_l+Q5_^ZqJc_G@~hCV36 zpKfa`kIC&ASx)i@*#?Y0?A;@`tvrYlYh$h6#$9bytvpkP0!6WwbfLkiq#(UZU(uuRC3{mCd?tR$bEbkWDkfJYQ zSc3L4hegV+RDe8)W_*cxu7q;H^}NvPvJ`o+L%O~!czZtY6Ai021P*nh7F5!mIFQk0 zjMm_2@hV1J;r4(u+T-YBzW-du;h%vNZaM+)=!vZp3GiUhdk7N+OK z{K@vxM@oe-7o|4e5b;&!TdLF_Ua%<3a0q9XSDdAdf_I z0%O|d4$R;2U5u`Mke0{cV&>DgTU)vRqzIrBTHwSWVHWiqH@tD83Pw{2rZ5ke$?odJ zNvO6~~&;FNGB@yj!;6M zyZ`c9B-HTRyMzJ_{lY-#Xp;*WxrF8c{)V7Nwa{0<9cb3- z*0ojDo4i%4O}={Bx2F}1KqcA(Fde>)OTF9HqNVWeZS_6d?Avni?17dbZC`{fa36Dr z4X+oY0|()f95|@kAwJqxDTCEH`{Ds_-F7fhV6d8X_Nsv@=kD3H+=f-}^SP@v*B5Y$ z(4(IDHtg`Ot@dqOn&_)q>07x^Sg)LaVudFK)mt0o`JjZ+%tS>oI*pNKI3~PS)N014 zRsp4v)x)R}J$$vxQGgp-P}!4Eoi1=yNtj@@Sxc->a+^p?JYkyU7B<~M;*zOe2 z3$F|v^9#GZBtl<9;mVJI44S)y`Od)XWQVlCYA1K_n$W&bBcaPYlmP0XKWwH4YII?>d4#JZ1} z2=-o+&9bg!b3qAl$?;kg$yX6Y5D{ojFhd-*=%)=Bt;(DDUmkQ$H5Z`KjM2kbbRE&S z()-qwCj;Ajl`%R#d8&z!sium)p=(`4ltj>un)G0B@%GyljOv2e>UqC3$6QwIGEJ}-N(QSu#AuaM16b!X>HycAhIaWxnh~>GP8)26 z&xjEtFg+1r_clUk6m*-FmJwBc|4k6T)Yn8+gqZN2Ax1mMKn|Ba;ij2e=HYJnw-{f6 zsHT_;t#%PVpbM)A(a(e_cDt)sayo+wn!`f|fy>=2LS7!Xer0bU467 z8TxdJCpkI!q2a@azy0W=kNTG_TjsB+so@2}e}6$ifj>7l_hW#W1+cN5;NkoN5BEIy z;DaA5S+d06*w}dKH^2GK<@euzzvB;o_=EqAH{Q7X!V524LVN&o8gNZE_SLVzZ|c4G z-n$KPY~H;2(yOn&>VM~*cl?0I|G@_z_)nZTfw=rzw{E@k)KgFS0rp5#RMhnv4jd=) zN8;n-e`>ee&urYd(Z755?#l-c9`qkMa)g)HUVF`d`0!!>E3drb2c9}MY}nv;I2_*q zPe0f2#2^a1>D8;(Yz@byLx&FeVNCwlUw@rn5zo=1NBI@ocJ11Ask*w_f9#fTN4jk}< zF06#U$r=tETQbbmtlHXI@2OL#{D9-K*X#9v{q@)WZ@&4)fByV=e_LCd|Lobb*wz7b z{5yB<{H{-*K4s9iw}u1x>IL&Pddie3uOc46(edrK-}>9z+x__Y;fEjm-+%wT|L=eQ zyZ_5CzwA&|)jxOc+;?MQVjhORVBPqfqb?;uxg{kfW$EhGtN(KD+&TZHOP4y}MIPD(f zLQ}csAl3w$sntUb?W@xVs$2BNW}Ertw_=Q=aL3njYe- zjczh0G}FOgaeXah5cO@#Hu+i(b)DkeXH0RL1L=(+Oc=q4%*o5?5ut){H|kp4VDVN~ z;)Y)3YH$5=Oj*2gwRewf2pmQk1BW0TMm7MYaeYAJ`h-)doDWoDG%9ph5Z9PJ^qs)o zL=RVBXX&6Pl0YhqWNIqLSyQ`@c>b63G*f7v_N~tQ1D(qOxTN!e&H3Fknew2t7$S{Q zt8K1nthLw}nN8>%aRwt_Fw))!C$hbB5p(3t0YsBQy5oY0cVMPy3TUDhFo&sQV0)Jb z%=wZlCnqP!*%U*-Y}lC*G5ID=fJepv5yJQiE(~ zF`9Q1qRG3-h{pXUM88p#OLSa%Ojq&mn6_#eG|=QLZw8(6)vd*$cvmmgwt7J!y?YOs zgu?nZ9WeP;@SRTq-d43Ee0y_tc-&mb4Nr&=a{|ObV44xZ{rJvtj|c|RM&yMY@qgC{ z7KBbk&wp+ztih=;>}aggb~IL1OcN-0W5#f9VK-~Ls+)D4ekp7>^(Nn*Chwl*zHJA@ zPBLrtZaRot&B}qcl_2+34Q#LTx$zX)GE%j|&8x&(nq%L>6u`C<6hXWa-yDpdCdj{_W*BeMy zc{-jE62RH{X2n;fEjg7Znv+l|6zJ=7%4{4;w zzza_`pw0y;7^Z0#F~$1mqmTS}{qVyN`8}pfn8x8f(79M&UyrG!qR9hsV2F+>;nQ2T zZ1F={*p6wfo|a;&tAE#1UWD1PV+W>$bws2%aau{r$jD#~4GowQx4-n#OFX5;v>ETQ z;Qh-lzsw7yvh9!t`ER`O#(E;sn*bh26U$-T*uVYQv12@4fAh^Z{l4D3TaL5{vH%?In5KU6$tPU4 zcs1UC`st^LvmJT6_10S>@IcC0j=TeWJEq!a&YTI9zy9^Fyy*8p2X(*?0agT_{{8!x z<9Pn|x4*SxI*aKsrrlUDHPs7#M;O$Hp+kpuiU->uZNCU9cL%1-T@|2n5yzODn`^|w z)4$Bj%qMZ{0dV{fo+=wZ*aoJo;$aF`}T97 zXXkhB+!;}z?Q782bA^S4A42+UBjQ1QU`qkYJx~@w*#xB#%Jwb_wmk=B36%SZ*hbU0 zlaMdm78(WXeg+gXl!7h_w#@`sTL@3y(h|A0dQ$4o2La^(rYb+X{KFsH^Q2H>s2#xxr4+SKBFStmqKabqCMB zeePf%NS+bi&;4g-=tVSP^yrM#UzJby$p^af>5QxmeR!(lPG)2cBg=R)wJa3B(SP>~ z3r9?CHMKtZg|?bXBaQW)KP1%y?;(ur=8-#GE7F5u6X)Z9E3!!WF|PPAuJ|#o_%W{d zF|PPAt}wCQ!@L)wK_%l?3Cf;PF&ls4*0gM!(%%M;Jvrv2@ysb#d(h@QlXt6 z#rZ{dCt(o$%I8*eq&<9fYrR`raia$@FS-(DeuBokcb~7kS=%4NZkDU**2BBM20|6R z&w{Jz6Xz@6<*Tpl_5_U%o0u;ZOBR=DWN|SkVD5^5esC_?ySCc<%xZ6Av(D3#U3CE( zFkAcaGING9C0m)Ctvrye@LAhkoscg%7Fcn1VcrO0>OE^>zFsMg>;&gHX1r~VJ#a9K zk)xcMjOq8A9Sg0tkR4=CbC+X2dR3DwaQD_u*78Roxa)tVPFFz9$ZJ;#X<#CGoV8Fg zX`|%QF6v$bM7Jc~jUV51UXgF?kglD@3VEV-rH)rWj9%IZOupyc-Yu*7K<0O;X*h0B z1$=!#G929sDoi*@xtFu7padX;=SDG%KjZ=RYeDtP7_2}Z5u)hlFk4KM@=eoC-Zd?vZ`-nU zT3=nF`bhB<`!hA#gWn*Y-~&gKZ{u2i!oLzKh){;>^~!4gg!(xNahKU$sjJ7 zL0w2DL6eMatleQMu{$J_6|9k?gumKyi>aV&uE`;l+8r*Z2|Te0mYu2C?2?==(*jt4 z0OPzR5p>z?luQe(POHmQpmPXvFI)`fDDNi|}`9@TO9x<74qOSwFt6Oq1^)YbrH6T~dMF>;Rq@ zmr5RNzJ8)KeX42d__1S63vSOD)+tObhZ$qDm`j~yIMPDXWV_RqZ*f>lVa&NX!#nMk zIWZrf?ApvFl5;X|o2obU*O(eVdTK;h@FNEp`H~SC{`05y@IP#(f)c@_^x4}R%ZXT0 z;<$OTW`A<57Mqjj@p3femawWlP1F-^41SW_y)nS2!MTRH`M&F?!1}q#?-*TxDu!2q zGPq@s%19+B-$PslAG*@wqzk4=#TI*sWOCVc$1qU8!PTlSHvL(VwwS7MwM;h!4mk&( zVfpIZ`qDC>nVvJrG1nwc4*2RfwXHnBpPbg$p540-gBZT9$4})?4u>M*SMV$;BHaiU zLp(>658@LbT#_0uEiG-&fFaotSju>`z_S{t0Dj-b?LMWIpF$8XzTkm{)l1PL2(lP? z>}a{g)K;)3}L0{;G;Rp%C(9PCM%m!XbaCesC9Xa|js#WUFcs6yK() zTce+IFiiN#;9`W?Qp8C~an^XMR8op7g3*hWa!;!@crw%yAH}G`=wwEBG5S#XFvzNK zQG_1hH@Nx)9VhBj46by;$ya`kfYGRc(%zW77?gIg2`jttU@81aOQ+{%7>()Xd~uLg zS|$W_+?DN5kE9lGW&aZPrUFiNcgJ=ZP3Xpv1*oTvV04uO*UBnK81=}t@;jp=Yt`SD z2)Zv|=4|UyaBip^dsZ7X)6h}qZl^vh?Cq;(R^z)`{P?X#o zxpgGIxQ2S?T`of=fzAxy-_YrsZZf{tw$x+{MfJ7BANgudGSow6ck*Ibm#hUMvrgYK zJNrV5x4gPL{#P{s^IZ%h2ZV*I85lmmPg~Si!Q6AVt-q;a^6segu4v^B9LV!!dWGdj zla0QRk+VVVfN#DNv9LnVLHQcW`R@Dc)5?{;Pf~DX}T|hOVx;+5Biw zRJrH%Jig%p+7yTp_(+fuyc*Q#BZCIr`%r~ogKN#0Y!FRtic(vr6wFq#GL;LA_EVf0 z%Bkbf@IAVw_zQ6NCJ0g)m8~4AQxYyHu~>DAOEDHaQZb`>A}-NAQd(qy(SKjIf{E-oc zbYe>#(j2F!DQe%cB}@G0_#cn*_zdOgG^He48I}WT6UE47g$I$SM9HW`XHF?~^Odx8 zrKL`}ctPp7pd7DJhGZ+*SpfJ6N{*3LKtdVNSII#!{|W07FDU1007Vv~gW=L&DCaR8 z63i{sEBbDQzI?T%bJvyLS8C=PTx*cxjA_cpNS>uBcv6+#rOciIUq3)9DNsk=;`GQH z;&KKV>xbK7E3h|c0CII2FwpCOMP)v)NOKVTd)Psmtt`yYw%FpQV@54GwC%OJ6vc{^ zn#I1&dZhJ*5XIYqR(%Tmc@6JlP>C8Dy+*loL3zGTnFcbV2`E{hj>wjAX2>taA=MDh)+o~G7ZWSAu~|IPows#BS5VcP(fULQoe{(G_V|D^Z9rf5KM~CC=5h(J`8;>)Xj&w zULh~Y!2nJna{eOuLsq8?IgK*PDoeu??Bh{BlSA~C^H|@hHdTksY)!~C(5%p}*NGSL z6sa=-l2bMP-2EwxmH3E3^pZPKx@BSAVne%emEW)N4c0Au z8ivT>%L!aXWotQIFwnKl3F>q@Sc}L))R>U zo*+l6Xo*oCF#5p}I>n{UjLd^*E(o@?B|x4U8>CFf5RI zln26k-Q`hc3;Am@;U+`~_u+OPWGEA@1*7$! z9kJOYi_7i+m(71ALNtlG)JjNJcDXSyvXr?-V0O%C1Jt!(U981ky4X;;7c1lVhMJ-F z0M;ft`GcR4#l?n}{T$v>ESVjK+N~UQ8BDFAatE(;NXANfJy!N`7TFh~IvAjjq2C=~ zcN9vFu?`p}IBi=YBw`~A>}4))X$`>dRH5z{SqqI!f54e`Nsbb$%^WhE_Yk}fg7XI+ zhF=|W8lc|iP-QlRgF#0?$#Mpl^rSLZvE(w&0i#=6tAuw?Cj%iaDVBU@iFuy%ptN|Tt#DFc@FVoz7-n#=xP@Zj1hA4Vs7a-UN1%EadXHFeiI_r8 zGjwZc9U!{F{MnsB0reBL$xibEX>^gtOml=*8W-1@XVZd^m5MadI zLp26fz0HM%Q|*(@t|B9D-i+?QSD;z=f?z8e$vy?bhyZKWIabNx)J LAZt1;BM<0 z&dEi^f5T{$B$Y<+f<~-QiM`AzjkH*#Vxb8UP?}?$16mu=7MQ3A+8E%a1g9{fC-)kK zR%dCkd2zTD&`qTRSNe+~5uGuj?>&#d9ENdwcz<*xnb2Q*t3Mx>MR5d!=o8Wah#LqF z5{?FKdP*V0hT?}VBDlaXCW-%$OGJ~eoAtv1(0%t7`VXccR0E$E$`$XFT+kNK?J1(V zN2%2^PrMChRBDW`GsBie7*zzrXf!=!ZA1W}w@(ztM{LXlS`v|I(ULEfnjK~^h9T>g zN7IFRG_AE%bz0xhddUs7JvA#bI>bJ8U{kWzgujInX!%aFD>iV_LbC!*R5bN2)qd?H ztT|RU9k7zcgogT<1g*UQe+Lb`!Bo3$m^~Hl8b%JwQF&JIaV}M2)S(_{beuYb(Oebx zpvbH0LPmd~@{D>lTxuDe2Q7mcISm&`RgbAPj6S0BNmvU2b&Sqb0cxsRz^GGYQ8A3J zP{C|otM+2_QPs+*ONG%Y0NY#!?fn_u4Ba8qKce#ei2sC2$cF2o@;IdaaCwoDay5(5 z0dW5fqf6k@G!XurW^@r;URbE|<-8Ft>lwAcWi6vm0GbR&H^JpPMxR$N0CE*~I_Mmz z8U&tB1t;=4^xriT{v2ZD8K_TW^jB&Qqr+7vqcfm>-&5)-M#sb5KNw{I5y$9Cm2Z;# zpz@uk4mA_91OV_c`jiR?D%5yJK7|Uf*%@%za=j{E-&FbL(^B|W&FEbC_5mY*Q~8#| z3iUjr(*ZqU)B`PN7+tLLEvCM3*P$xMaQ_#`a-m0KPq@E}(Hgiv`mZYA z0b8R^V-)6@X5#DtuY2LL?FMxUqc%Vr#po}g0z{myPG+=3#qAVY2vr@7y5aH)BfnB{ zbA`@Qao31iq4L)Y)ESH}Q2A~P$dkUrh+FN;NTvEQqf-E{2~;00pmL~`jM3TfEsfFj z>f?--s_BfHRlem^tIlS0KHUGns0^1c83ozl78HIv%jmzW4>0;~D&Nbwq<+Qd1M1U^ z7D2@!5EZ@1Xt|og=;KiF))KXZ(S<6k*k|GE-UM|RqqnQvt*(cPU42y0k$iOmqs1!j zYSC5d9nh+xZzjK1`S#r&xSU|*bKn=yt^>FON${s7M&%n|7gbQ|8vy2--YSGU8&uro zBQHbaNzg|4_AVp8g>RRk3!u0j)DJ3u%gA#oEX{!`DAvO&-(&)1rso(1bs;MlmEhZT zPpBZG$KbA=(Pb*`uaQ$Ktg=aJ3!`J8;wU2(Dq+N{USvd7=QE0$`8p#oUV1&MLJlMU zQ14^(4j|r#(dVEFrX&q68F#~ $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ + +CLEANFILES = XDarwinHelp.html InfoPlist.strings + +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp diff --git a/xorg-server-1.4/hw/darwin/bundle/ko.lproj/Makefile.in b/xorg-server-1.4/hw/darwin/bundle/ko.lproj/Makefile.in new file mode 100644 index 0000000..5ea37b0 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/ko.lproj/Makefile.in @@ -0,0 +1,638 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*- Makefile -*- +# Rules for generating files using the C pre-processor +# (Replaces CppFileTarget from Imake) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/cpprules.in +subdir = hw/darwin/bundle/ko.lproj +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(kolprojdir)" \ + "$(DESTDIR)$(kolprojnibdir)" +kolprojDATA_INSTALL = $(INSTALL_DATA) +kolprojnibDATA_INSTALL = $(INSTALL_DATA) +DATA = $(kolproj_DATA) $(kolprojnib_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +BINDIR = ${bindir} +SED = sed +SUFFIXES = .pre .man .man.pre + +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e '/\@\@$$/s/\@\@$$/\\/' + + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ +XORGMANNAME = X Version 11 +XSERVERNAME = Xorg +MANDEFS = \ + -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__appmansuffix__=$(APP_MAN_SUFFIX) \ + -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ + -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ + -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ + -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ + -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ + -D__mandir__=$(mandir) \ + -D__projectroot__=$(prefix) \ + -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ + -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) + +XINITDIR = $(libdir)/X11/xinit +XDEFS = \ + -DX_VERSION="$(PLIST_VERSION_STRING)" \ + -DX_PRE_RELEASE="$(PRE)" \ + -DX_REL_DATE="$(XORG_DATE)" \ + -DX_VENDOR_NAME="$(VENDOR_STRING)" \ + -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" + +resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources +kolprojdir = $(resourcesdir)/ko.lproj +kolproj_DATA = \ + XDarwinHelp.html \ + InfoPlist.strings \ + Credits.rtf Localizable.strings + +kolprojnibdir = $(kolprojdir)/MainMenu.nib +kolprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib +CLEANFILES = XDarwinHelp.html InfoPlist.strings +EXTRA_DIST = \ + Credits.rtf Localizable.strings \ + Localizable.strings \ + MainMenu.nib/classes.nib \ + MainMenu.nib/objects.nib \ + XDarwinHelp.html.cpp + +all: all-am + +.SUFFIXES: +.SUFFIXES: .pre .man .man.pre +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/darwin/bundle/ko.lproj/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/darwin/bundle/ko.lproj/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-kolprojDATA: $(kolproj_DATA) + @$(NORMAL_INSTALL) + test -z "$(kolprojdir)" || $(MKDIR_P) "$(DESTDIR)$(kolprojdir)" + @list='$(kolproj_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(kolprojDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(kolprojdir)/$$f'"; \ + $(kolprojDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(kolprojdir)/$$f"; \ + done + +uninstall-kolprojDATA: + @$(NORMAL_UNINSTALL) + @list='$(kolproj_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(kolprojdir)/$$f'"; \ + rm -f "$(DESTDIR)$(kolprojdir)/$$f"; \ + done +install-kolprojnibDATA: $(kolprojnib_DATA) + @$(NORMAL_INSTALL) + test -z "$(kolprojnibdir)" || $(MKDIR_P) "$(DESTDIR)$(kolprojnibdir)" + @list='$(kolprojnib_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(kolprojnibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(kolprojnibdir)/$$f'"; \ + $(kolprojnibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(kolprojnibdir)/$$f"; \ + done + +uninstall-kolprojnibDATA: + @$(NORMAL_UNINSTALL) + @list='$(kolprojnib_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(kolprojnibdir)/$$f'"; \ + rm -f "$(DESTDIR)$(kolprojnibdir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(kolprojdir)" "$(DESTDIR)$(kolprojnibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-kolprojDATA install-kolprojnibDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-kolprojDATA uninstall-kolprojnibDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-kolprojDATA \ + install-kolprojnibDATA install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-kolprojDATA uninstall-kolprojnibDATA + + +.pre: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ + +.man.pre.man: + $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ + +InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ + +XDarwinHelp.html: XDarwinHelp.html.cpp + $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp b/xorg-server-1.4/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp new file mode 100644 index 0000000..5996285 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp @@ -0,0 +1,96 @@ + + + + +XDarwin Help + + +
+

XDarwin X Server for Mac OS X

+ X_VENDOR_NAME X_VERSION
+ Release Date: X_REL_DATE +
+

Contents

+
    +
  1. Important Notice
  2. +
  3. Usage
  4. +
  5. Setting Your Path
  6. +
  7. User Preferences
  8. +
  9. License
  10. +
+
+

Important Notice

+
+
+#if X_PRE_RELEASE +This is a pre-release version of XDarwin, and is not supported in any way. Bugs may be reported and patches may be submitted to the XonX project page at SourceForge. Before reporting bugs in pre-release versions, please check the latest version from XonX or the X_VENDOR_LINK. +#else +If the server is older than 6-12 months, or if your hardware is newer than the above date, look for a newer version before reporting problems. Bugs may be reported and patches may be submitted to the XonX project page at SourceForge. +#endif +
+
+This software is distributed under the terms of the MIT X11 / X Consortium License and is provided AS IS, with no warranty. Please read the License before using.
+ +

Usage

+

XDarwin is a freely redistributable open-source X server for the X Window System. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin runs on Mac OS X in full screen or rootless modes.

+

In full screen mode, when the X window system is active, it takes over the entire screen. You can switch back to the Mac OS X desktop by holding down Command-Option-A. This key combination can be changed in the user preferences. From the Mac OS X desktop, click on the XDarwin icon in the Dock to switch back to the X window system. (You can change this behavior in the user preferences so that you must click the XDarwin icon in the floating switch window instead.)

+

In rootless mode, the X window system and Aqua share your display. The root window of the X11 display is the size of the screen and contains all the other windows. The X11 root window is not displayed in rootless mode as Aqua handles the desktop background.

+

Multi-Button Mouse Emulation

+

Many X11 applications rely on the use of a 3-button mouse. You can emulate a 3-button mouse with a single button by holding down various modifier keys while you click the mouse button. This is controlled by settings in the "Multi-Button Mouse Emulation" section of the "General" preferences. By default, emulation is on and holding down the command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the option key and clicking will simulate the third button. You can change to any combination of modifiers to emulate buttons two and three in the preferences. Note, even if the modifiers keys are mapped to some other key with xmodmap, you still must use the actual keys specified in the preferences for multi-button mouse emulation.

+ +

Setting Your Path

+

Your path is the list of directories to be searched for executable commands. The X11 commands are located in /usr/X11R6/bin, which needs to be added to your path. XDarwin does this for you by default and can also add additional directories where you have installed command line applications.

+

More experienced users will have already set their path correctly using the initialization files for their shell. In this case, you can inform XDarwin not to modify your path in the preferences. XDarwin launches the initial X11 clients in the user's default login shell. (An alternate shell can also be specified in the preferences.) The way to set the path depends on the shell you are using. This is described in the man page documentation for the shell.

+

In addition you may also want to add the X11 man pages to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in /usr/X11R6/man and the MANPATH environment variable contains the list of directories to search.

+ +

User Preferences

+

A number of options may be set from the user preferences, accessible from the "Preferences..." menu item in the "XDarwin" menu. The options listed as start up options will not take effect until you have restarted XDarwin. All other options take effect immediately. The various options are described below:

+

General

+
    +
  • Use System beep for X11: When enabled the standard Mac OS X alert sound is used as the X11 bell. When disabled (default) a simple tone is used.
  • +
  • Allow X11 to change mouse acceleration: In a standard X window system implementation, the window manager can change the mouse acceleration. This can lead to confusion as the mouse acceleration may be set to different values by the Mac OS X System Preferences and the X window manager. By default, X11 is not allowed to change the mouse acceleration to avoid this problem.
  • +
  • Multi-Button Mouse Emulation: This is described above under Usage. When emulation is enabled the selected modifiers must be held down when the mouse button is pushed to emulate the second or third mouse buttons.
  • +
+

Start Up

+
    +
  • Default Mode: If the user does not indicate whether to run in full screen or rootless mode, the mode specified here will be used.
  • +
  • Show mode pick panel on startup: By default, a panel is displayed when XDarwin is started to allow the user to choose between full screen or rootless mode. If this option is turned off, the default mode will be started automatically.
  • +
  • X11 Display number: X11 allows there to be multiple displays managed by separate X servers on a single computer. The user may specify an integer display number for XDarwin to use if more than one X server is going to be run simultaneously.
  • +
  • Allow Xinerama multiple monitor support: XDarwin supports multiple monitors with Xinerama, which treats all monitors as being part of one large rectangular screen. You can disable Xinerama with this option, but currently XDarwin does not handle multiple monitors correctly without it. If you only have a single monitor, Xinerama is automatically disabled.
  • +
  • Keymapping File: A keymapping file is read at startup and translated to an X11 keymap. Keymapping files, available for a wide variety of languages, are found in /System/Library/Keyboards.
  • +
  • Starting First X11 Clients: When XDarwin is started from the Finder, it will run xinit to launch the X window manager and other X clients. (See "man xinit" for more information.) Before XDarwin runs xinit it will add the specified directories to the user's path. By default only /usr/X11R6/bin is added. Additional directories may added, separated by a colon. The X clients are started in the user's default login shell so that the user's shell initialization files are read. If desired, an alternate shell may be specified.
  • +
+

Full Screen

+
    +
  • Key combination button: Click this button and then press any number of modifiers followed by a standard key to change the key combination to switch between Aqua and X11.
  • +
  • Click on icon in Dock switches to X11: Enable this to activate switching to X11 by clicking on the XDarwin icon in the Dock. On some versions of Mac OS X, switching by clicking in the Dock can cause the cursor to disappear on returning to Aqua.
  • +
  • Show help on startup: This will show an introductory splash screen when XDarwin is started in full screen mode.
  • +
  • Color bit depth: In full screen mode, the X11 display can use a different color bit depth than is used by Aqua. If "Current" is specified, the depth used by Aqua when XDarwin starts will be used. Otherwise 8, 15, or 24 bits may be specified.
  • +
+ +

License

+The main license for XDarwin is based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code. +

X Consortium License

+

Copyright (C) 1996 X Consortium

+

Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without +limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to +whom the Software is furnished to do so, subject to the following conditions:

+

The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software.

+

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE.

+

Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization from +the X Consortium.

+

X Window System is a trademark of X Consortium, Inc.

+ + diff --git a/xorg-server-1.4/hw/darwin/darwin.c b/xorg-server-1.4/hw/darwin/darwin.c new file mode 100644 index 0000000..7da8626 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/darwin.c @@ -0,0 +1,1116 @@ +/************************************************************** + * + * Shared code for the Darwin X Server + * running with Quartz or IOKit display mode + * + **************************************************************/ +/* + * Copyright (c) 2001-2004 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + +#include +#include +#include "os.h" +#include "servermd.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "mibstore.h" // mi backing store implementation +#include "mipointer.h" // mi software cursor +#include "micmap.h" // mi colormap code +#include "fb.h" // fb framebuffer code +#include "site.h" +#include "globals.h" +#include "xorgVersion.h" +#include "xf86Date.h" +#include "dix.h" + +#ifdef XINPUT +# include +# include +# include "exevents.h" +# include "extinit.h" +#endif + +#include +#include +#include +#include +#include +#include + +#define HAS_UTSNAME 1 +#include + +#define NO_CFPLUGIN +#include +#include +#include + +#include "darwin.h" +#include "darwinClut8.h" + +/* + * X server shared global variables + */ +int darwinScreensFound = 0; +int darwinScreenIndex = 0; +io_connect_t darwinParamConnect = 0; +int darwinEventReadFD = -1; +int darwinEventWriteFD = -1; +int darwinMouseAccelChange = 1; +int darwinFakeButtons = 0; + +// location of X11's (0,0) point in global screen coordinates +int darwinMainScreenX = 0; +int darwinMainScreenY = 0; + +// parameters read from the command line or user preferences +unsigned int darwinDesiredWidth = 0, darwinDesiredHeight = 0; +int darwinDesiredDepth = -1; +int darwinDesiredRefresh = -1; +char *darwinKeymapFile = "USA.keymapping"; +int darwinSyncKeymap = FALSE; +int darwinSwapAltMeta = FALSE; + +// modifier masks for faking mouse buttons +int darwinFakeMouse2Mask = NX_COMMANDMASK; +int darwinFakeMouse3Mask = NX_ALTERNATEMASK; + +// devices +DeviceIntPtr darwinPointer = NULL; +DeviceIntPtr darwinKeyboard = NULL; + +// Common pixmap formats +static PixmapFormatRec formats[] = { + { 1, 1, BITMAP_SCANLINE_PAD }, + { 4, 8, BITMAP_SCANLINE_PAD }, + { 8, 8, BITMAP_SCANLINE_PAD }, + { 15, 16, BITMAP_SCANLINE_PAD }, + { 16, 16, BITMAP_SCANLINE_PAD }, + { 24, 32, BITMAP_SCANLINE_PAD }, + { 32, 32, BITMAP_SCANLINE_PAD } +}; +const int NUMFORMATS = sizeof(formats)/sizeof(formats[0]); + +#ifndef OSNAME +#define OSNAME " Darwin" +#endif +#ifndef OSVENDOR +#define OSVENDOR "" +#endif +#ifndef PRE_RELEASE +#define PRE_RELEASE XORG_VERSION_SNAP +#endif + +void +DarwinPrintBanner() +{ +#if PRE_RELEASE + ErrorF("\n" + "This is a pre-release version of the " XVENDORNAME " X11.\n" + "Portions of this release are based on XFree86 4.4RC2 and selected\n" + "files from XFree86 4.4RC3. It is not supported in any way.\n" + "Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n" + "Select the \"xorg\" product for bugs you find in this release.\n" + "Before reporting bugs in pre-release versions please check the\n" + "latest version in the " XVENDORNAME " \"monolithic tree\" CVS\n" + "repository hosted at http://www.freedesktop.org/Software/xorg/"); +#endif +#if XORG_VERSION_SNAP > 0 + ErrorF(".%d", XORG_VERSION_SNAP); +#endif + +#if XORG_VERSION_SNAP >= 900 + ErrorF(" (%d.%d.0 RC %d)", XORG_VERSION_MAJOR, XORG_VERSION_MINOR + 1, + XORG_VERSION_SNAP - 900); +#endif + +#ifdef XORG_CUSTOM_VERSION + ErrorF(" (%s)", XF86_CUSTOM_VERSION); +#endif + ErrorF("\nRelease Date: %s\n", XF86_DATE); + ErrorF("X Protocol Version %d, Revision %d, %s\n", + X_PROTOCOL, X_PROTOCOL_REVISION, XORG_RELEASE ); + ErrorF("Build Operating System: %s %s\n", OSNAME, OSVENDOR); +#ifdef HAS_UTSNAME + { + struct utsname name; + + if (uname(&name) == 0) { + ErrorF("Current Operating System: %s %s %s %s %s\n", + name.sysname, name.nodename, name.release, name.version, name.machine); + } + } +#endif +#if defined(BUILD_DATE) && (BUILD_DATE > 19000000) + { + struct tm t; + char buf[100]; + + bzero(&t, sizeof(t)); + bzero(buf, sizeof(buf)); + t.tm_mday = BUILD_DATE % 100; + t.tm_mon = (BUILD_DATE / 100) % 100 - 1; + t.tm_year = BUILD_DATE / 10000 - 1900; + if (strftime(buf, sizeof(buf), "%d %B %Y", &t)) + ErrorF("Build Date: %s\n", buf); + } +#endif +#if defined(CLOG_DATE) && (CLOG_DATE > 19000000) + { + struct tm t; + char buf[100]; + + bzero(&t, sizeof(t)); + bzero(buf, sizeof(buf)); + t.tm_mday = CLOG_DATE % 100; + t.tm_mon = (CLOG_DATE / 100) % 100 - 1; + t.tm_year = CLOG_DATE / 10000 - 1900; + if (strftime(buf, sizeof(buf), "%d %B %Y", &t)) + ErrorF("Changelog Date: %s\n", buf); + } +#endif +#if defined(BUILDERSTRING) + ErrorF("%s \n",BUILDERSTRING); +#endif + ErrorF("\tBefore reporting problems, check "__VENDORDWEBSUPPORT__"\n" + "\tto make sure that you have the latest version.\n"); +} + + +void DDXRingBell(int volume, int pitch, int duration) +{ + // FIXME -- make some noise, yo +} + + +/* + * DarwinSaveScreen + * X screensaver support. Not implemented. + */ +static Bool DarwinSaveScreen(ScreenPtr pScreen, int on) +{ + // FIXME + if (on == SCREEN_SAVER_FORCER) { + } else if (on == SCREEN_SAVER_ON) { + } else { + } + return TRUE; +} + + +/* + * DarwinAddScreen + * This is a callback from dix during AddScreen() from InitOutput(). + * Initialize the screen and communicate information about it back to dix. + */ +static Bool DarwinAddScreen( + int index, + ScreenPtr pScreen, + int argc, + char **argv ) +{ + int bitsPerRGB, i, dpi; + static int foundIndex = 0; + Bool ret; + VisualPtr visual; + ColormapPtr pmap; + DarwinFramebufferPtr dfb; + + // reset index of found screens for each server generation + if (index == 0) foundIndex = 0; + + // allocate space for private per screen storage + dfb = xalloc(sizeof(DarwinFramebufferRec)); + SCREEN_PRIV(pScreen) = dfb; + + // setup hardware/mode specific details + ret = DarwinModeAddScreen(foundIndex, pScreen); + foundIndex++; + if (! ret) + return FALSE; + + bitsPerRGB = dfb->bitsPerComponent; + + // reset the visual list + miClearVisualTypes(); + + // setup a single visual appropriate for our pixel type + if (dfb->colorType == TrueColor) { + if (!miSetVisualTypes( dfb->colorBitsPerPixel, TrueColorMask, + bitsPerRGB, TrueColor )) { + return FALSE; + } + } else if (dfb->colorType == PseudoColor) { + if (!miSetVisualTypes( dfb->colorBitsPerPixel, PseudoColorMask, + bitsPerRGB, PseudoColor )) { + return FALSE; + } + } else if (dfb->colorType == StaticColor) { + if (!miSetVisualTypes( dfb->colorBitsPerPixel, StaticColorMask, + bitsPerRGB, StaticColor )) { + return FALSE; + } + } else { + return FALSE; + } + + miSetPixmapDepths(); + + // machine independent screen init + // setup _Screen structure in pScreen + if (monitorResolution) + dpi = monitorResolution; + else + dpi = 75; + + // initialize fb + if (! fbScreenInit(pScreen, + dfb->framebuffer, // pointer to screen bitmap + dfb->width, dfb->height, // screen size in pixels + dpi, dpi, // dots per inch + dfb->pitch/(dfb->bitsPerPixel/8), // pixel width of framebuffer + dfb->bitsPerPixel)) // bits per pixel for screen + { + return FALSE; + } + + // set the RGB order correctly for TrueColor + if (dfb->bitsPerPixel > 8) { + for (i = 0, visual = pScreen->visuals; // someday we may have more than 1 + i < pScreen->numVisuals; i++, visual++) { + if (visual->class == TrueColor) { + visual->offsetRed = bitsPerRGB * 2; + visual->offsetGreen = bitsPerRGB; + visual->offsetBlue = 0; + visual->redMask = ((1<offsetRed; + visual->greenMask = ((1<offsetGreen; + visual->blueMask = ((1<offsetBlue; + } + } + } + +#ifdef RENDER + if (! fbPictureInit(pScreen, 0, 0)) { + return FALSE; + } +#endif + +#ifdef MITSHM + ShmRegisterFbFuncs(pScreen); +#endif + + // this must be initialized (why doesn't X have a default?) + pScreen->SaveScreen = DarwinSaveScreen; + + // finish mode dependent screen setup including cursor support + if (!DarwinModeSetupScreen(index, pScreen)) { + return FALSE; + } + + // create and install the default colormap and + // set pScreen->blackPixel / pScreen->white + if (!miCreateDefColormap( pScreen )) { + return FALSE; + } + + /* Set the colormap to the statically defined one if we're in 8 bit + * mode and we're using a fixed color map. Essentially this translates + * to Darwin/x86 in 8-bit mode. + */ + if( (dfb->colorBitsPerPixel == 8) && + (dfb->colorType == StaticColor) ) + { + pmap = miInstalledMaps[pScreen->myNum]; + visual = pmap->pVisual; + for( i = 0; i < visual->ColormapEntries; i++ ) { + pmap->red[i].co.local.red = darwinClut8[i].red; + pmap->red[i].co.local.green = darwinClut8[i].green; + pmap->red[i].co.local.blue = darwinClut8[i].blue; + } + } + + dixScreenOrigins[index].x = dfb->x; + dixScreenOrigins[index].y = dfb->y; + + ErrorF("Screen %d added: %dx%d @ (%d,%d)\n", + index, dfb->width, dfb->height, dfb->x, dfb->y); + + return TRUE; +} + +/* + ============================================================================= + + mouse and keyboard callbacks + + ============================================================================= +*/ + +/* + * DarwinChangePointerControl + * Set mouse acceleration and thresholding + * FIXME: We currently ignore the threshold in ctrl->threshold. + */ +static void DarwinChangePointerControl( + DeviceIntPtr device, + PtrCtrl *ctrl ) +{ + kern_return_t kr; + double acceleration; + + if (!darwinMouseAccelChange) + return; + + acceleration = ctrl->num / ctrl->den; + kr = IOHIDSetMouseAcceleration( darwinParamConnect, acceleration ); + if (kr != KERN_SUCCESS) + ErrorF( "Could not set mouse acceleration with kernel return = 0x%x.\n", kr ); +} + + +/* + * DarwinMouseProc + * Handle the initialization, etc. of a mouse + */ +static int DarwinMouseProc( + DeviceIntPtr pPointer, + int what ) +{ + char map[6]; + + switch (what) { + + case DEVICE_INIT: + pPointer->public.on = FALSE; + + // Set button map. + map[1] = 1; + map[2] = 2; + map[3] = 3; + map[4] = 4; + map[5] = 5; + InitPointerDeviceStruct( (DevicePtr)pPointer, + map, + 5, // numbuttons (4 & 5 are scroll wheel) + GetMotionHistory, + DarwinChangePointerControl, + GetMotionHistorySize(), 2 ); +#ifdef XINPUT + InitValuatorAxisStruct( pPointer, + 0, // X axis + 0, // min value + 16000, // max value (fixme screen size?) + 1, // resolution (fixme ?) + 1, // min resolution + 1 ); // max resolution + InitValuatorAxisStruct( pPointer, + 1, // X axis + 0, // min value + 16000, // max value (fixme screen size?) + 1, // resolution (fixme ?) + 1, // min resolution + 1 ); // max resolution +#endif + break; + + case DEVICE_ON: + pPointer->public.on = TRUE; + AddEnabledDevice( darwinEventReadFD ); + return Success; + + case DEVICE_CLOSE: + case DEVICE_OFF: + pPointer->public.on = FALSE; + RemoveEnabledDevice( darwinEventReadFD ); + return Success; + } + + return Success; +} + + +/* + * DarwinKeybdProc + * Callback from X + */ +static int DarwinKeybdProc( DeviceIntPtr pDev, int onoff ) +{ + switch ( onoff ) { + case DEVICE_INIT: + DarwinKeyboardInit( pDev ); + break; + case DEVICE_ON: + pDev->public.on = TRUE; + AddEnabledDevice( darwinEventReadFD ); + break; + case DEVICE_OFF: + pDev->public.on = FALSE; + RemoveEnabledDevice( darwinEventReadFD ); + break; + case DEVICE_CLOSE: + break; + } + + return Success; +} + +/* +=========================================================================== + + Utility routines + +=========================================================================== +*/ + +/* + * DarwinFindLibraryFile + * Search for a file in the standard Library paths, which are (in order): + * + * ~/Library/ user specific + * /Library/ host specific + * /Network/Library/ LAN specific + * /System/Library/ OS specific + * + * A sub-path can be specified to search in below the various Library + * directories. Returns a new character string (owned by the caller) + * containing the full path to the first file found. + */ +static char * DarwinFindLibraryFile( + const char *file, + const char *pathext ) +{ + // Library search paths + char *pathList[] = { + "", + "/Network", + "/System", + NULL + }; + char *home; + char *fullPath; + int i = 0; + + // Return the file name as is if it is already a fully qualified path. + if (!access(file, F_OK)) { + fullPath = xalloc(strlen(file)+1); + strcpy(fullPath, file); + return fullPath; + } + + fullPath = xalloc(PATH_MAX); + + home = getenv("HOME"); + if (home) { + snprintf(fullPath, PATH_MAX, "%s/Library/%s/%s", home, pathext, file); + if (!access(fullPath, F_OK)) + return fullPath; + } + + while (pathList[i]) { + snprintf(fullPath, PATH_MAX, "%s/Library/%s/%s", pathList[i++], + pathext, file); + if (!access(fullPath, F_OK)) + return fullPath; + } + + xfree(fullPath); + return NULL; +} + + +/* + * DarwinParseModifierList + * Parse a list of modifier names and return a corresponding modifier mask + */ +int DarwinParseModifierList( + const char *constmodifiers) // string containing list of modifier names +{ + int result = 0; + + if (constmodifiers) { + char *modifiers = strdup(constmodifiers); + char *modifier; + int nxkey; + char *p = modifiers; + + while (p) { + modifier = strsep(&p, " ,+&|/"); // allow lots of separators + nxkey = DarwinModifierStringToNXKey(modifier); + if (nxkey != -1) + result |= DarwinModifierNXKeyToNXMask(nxkey); + else + ErrorF("fakebuttons: Unknown modifier \"%s\"\n", modifier); + } + free(modifiers); + } + return result; +} + +/* +=========================================================================== + + Functions needed to link against device independent X + +=========================================================================== +*/ + +/* + * InitInput + * Register the keyboard and mouse devices + */ +void InitInput( int argc, char **argv ) +{ + darwinPointer = AddInputDevice(DarwinMouseProc, TRUE); + RegisterPointerDevice( darwinPointer ); + + darwinKeyboard = AddInputDevice(DarwinKeybdProc, TRUE); + RegisterKeyboardDevice( darwinKeyboard ); + + DarwinEQInit( (DevicePtr)darwinKeyboard, (DevicePtr)darwinPointer ); + + DarwinModeInitInput(argc, argv); +} + + +/* + * DarwinAdjustScreenOrigins + * Shift all screens so the X11 (0, 0) coordinate is at the top + * left of the global screen coordinates. + * + * Screens can be arranged so the top left isn't on any screen, so + * instead use the top left of the leftmost screen as (0,0). This + * may mean some screen space is in -y, but it's better that (0,0) + * be onscreen, or else default xterms disappear. It's better that + * -y be used than -x, because when popup menus are forced + * "onscreen" by dumb window managers like twm, they'll shift the + * menus down instead of left, which still looks funny but is an + * easier target to hit. + */ +void +DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo) +{ + int i, left, top; + + left = dixScreenOrigins[0].x; + top = dixScreenOrigins[0].y; + + /* Find leftmost screen. If there's a tie, take the topmost of the two. */ + for (i = 1; i < pScreenInfo->numScreens; i++) { + if (dixScreenOrigins[i].x < left || + (dixScreenOrigins[i].x == left && + dixScreenOrigins[i].y < top)) + { + left = dixScreenOrigins[i].x; + top = dixScreenOrigins[i].y; + } + } + + darwinMainScreenX = left; + darwinMainScreenY = top; + + /* Shift all screens so that there is a screen whose top left + is at X11 (0,0) and at global screen coordinate + (darwinMainScreenX, darwinMainScreenY). */ + + if (darwinMainScreenX != 0 || darwinMainScreenY != 0) { + for (i = 0; i < pScreenInfo->numScreens; i++) { + dixScreenOrigins[i].x -= darwinMainScreenX; + dixScreenOrigins[i].y -= darwinMainScreenY; + ErrorF("Screen %d placed at X11 coordinate (%d,%d).\n", + i, dixScreenOrigins[i].x, dixScreenOrigins[i].y); + } + } +} + + +/* + * InitOutput + * Initialize screenInfo for all actually accessible framebuffers. + * + * The display mode dependent code gets called three times. The mode + * specific InitOutput routines are expected to discover the number + * of potentially useful screens and cache routes to them internally. + * Inside DarwinAddScreen are two other mode specific calls. + * A mode specific AddScreen routine is called for each screen to + * actually initialize the screen with the ScreenPtr structure. + * After other screen setup has been done, a mode specific + * SetupScreen function can be called to finalize screen setup. + */ +void InitOutput( ScreenInfo *pScreenInfo, int argc, char **argv ) +{ + int i; + static unsigned long generation = 0; + + pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER; + pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; + pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; + pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; + + // List how we want common pixmap formats to be padded + pScreenInfo->numPixmapFormats = NUMFORMATS; + for (i = 0; i < NUMFORMATS; i++) + pScreenInfo->formats[i] = formats[i]; + + // Allocate private storage for each screen's Darwin specific info + if (generation != serverGeneration) { + darwinScreenIndex = AllocateScreenPrivateIndex(); + generation = serverGeneration; + } + + // Discover screens and do mode specific initialization + DarwinModeInitOutput(argc, argv); + + // Add screens + for (i = 0; i < darwinScreensFound; i++) { + AddScreen( DarwinAddScreen, argc, argv ); + } + + DarwinAdjustScreenOrigins(pScreenInfo); +} + + +/* + * OsVendorFataError + */ +void OsVendorFatalError( void ) +{ + ErrorF( " OsVendorFatalError\n" ); +} + + +/* + * OsVendorInit + * Initialization of Darwin OS support. + */ +void OsVendorInit(void) +{ + if (serverGeneration == 1) { + DarwinPrintBanner(); + } + + // Find the full path to the keymapping file. + if ( darwinKeymapFile ) { + char *tempStr = DarwinFindLibraryFile(darwinKeymapFile, "Keyboards"); + if ( !tempStr ) { + ErrorF("Could not find keymapping file %s.\n", darwinKeymapFile); + } else { + ErrorF("Using keymapping provided in %s.\n", tempStr); + } + darwinKeymapFile = tempStr; + } + + if ( !darwinKeymapFile ) { + ErrorF("Reading keymap from the system.\n"); + } +} + + +/* + * ddxInitGlobals + * Called by InitGlobals() from os/util.c. + */ +void ddxInitGlobals(void) +{ +} + + +/* + * ddxProcessArgument + * Process device-dependent command line args. Returns 0 if argument is + * not device dependent, otherwise Count of number of elements of argv + * that are part of a device dependent commandline option. + */ +int ddxProcessArgument( int argc, char *argv[], int i ) +{ + int numDone; + + if ((numDone = DarwinModeProcessArgument( argc, argv, i ))) + return numDone; + + if ( !strcmp( argv[i], "-fakebuttons" ) ) { + darwinFakeButtons = TRUE; + ErrorF( "Faking a three button mouse\n" ); + return 1; + } + + if ( !strcmp( argv[i], "-nofakebuttons" ) ) { + darwinFakeButtons = FALSE; + ErrorF( "Not faking a three button mouse\n" ); + return 1; + } + + if (!strcmp( argv[i], "-fakemouse2" ) ) { + if ( i == argc-1 ) { + FatalError( "-fakemouse2 must be followed by a modifer list\n" ); + } + if (!strcasecmp(argv[i+1], "none") || !strcmp(argv[i+1], "")) + darwinFakeMouse2Mask = 0; + else + darwinFakeMouse2Mask = DarwinParseModifierList(argv[i+1]); + ErrorF("Modifier mask to fake mouse button 2 = 0x%x\n", + darwinFakeMouse2Mask); + return 2; + } + + if (!strcmp( argv[i], "-fakemouse3" ) ) { + if ( i == argc-1 ) { + FatalError( "-fakemouse3 must be followed by a modifer list\n" ); + } + if (!strcasecmp(argv[i+1], "none") || !strcmp(argv[i+1], "")) + darwinFakeMouse3Mask = 0; + else + darwinFakeMouse3Mask = DarwinParseModifierList(argv[i+1]); + ErrorF("Modifier mask to fake mouse button 3 = 0x%x\n", + darwinFakeMouse3Mask); + return 2; + } + + if ( !strcmp( argv[i], "-swapAltMeta" ) ) { + darwinSwapAltMeta = 1; + return 1; + } + + if ( !strcmp( argv[i], "-keymap" ) ) { + if ( i == argc-1 ) { + FatalError( "-keymap must be followed by a filename\n" ); + } + darwinKeymapFile = argv[i+1]; + return 2; + } + + if ( !strcmp( argv[i], "-nokeymap" ) ) { + darwinKeymapFile = NULL; + return 1; + } + + if ( !strcmp( argv[i], "+synckeymap" ) ) { + darwinSyncKeymap = TRUE; + return 1; + } + + if ( !strcmp( argv[i], "-synckeymap" ) ) { + darwinSyncKeymap = FALSE; + return 1; + } + + if ( !strcmp( argv[i], "-size" ) ) { + if ( i >= argc-2 ) { + FatalError( "-size must be followed by two numbers\n" ); + } +#ifdef OLD_POWERBOOK_G3 + ErrorF( "Ignoring unsupported -size option on old PowerBook G3\n" ); +#else + darwinDesiredWidth = atoi( argv[i+1] ); + darwinDesiredHeight = atoi( argv[i+2] ); + ErrorF( "Attempting to use width x height = %i x %i\n", + darwinDesiredWidth, darwinDesiredHeight ); +#endif + return 3; + } + + if ( !strcmp( argv[i], "-depth" ) ) { + int bitDepth; + + if ( i == argc-1 ) { + FatalError( "-depth must be followed by a number\n" ); + } +#ifdef OLD_POWERBOOK_G3 + ErrorF( "Ignoring unsupported -depth option on old PowerBook G3\n"); +#else + bitDepth = atoi( argv[i+1] ); + if (bitDepth == 8) + darwinDesiredDepth = 0; + else if (bitDepth == 15) + darwinDesiredDepth = 1; + else if (bitDepth == 24) + darwinDesiredDepth = 2; + else + FatalError( "Unsupported pixel depth. Use 8, 15, or 24 bits\n" ); + ErrorF( "Attempting to use pixel depth of %i\n", bitDepth ); +#endif + return 2; + } + + if ( !strcmp( argv[i], "-refresh" ) ) { + if ( i == argc-1 ) { + FatalError( "-refresh must be followed by a number\n" ); + } +#ifdef OLD_POWERBOOK_G3 + ErrorF( "Ignoring unsupported -refresh option on old PowerBook G3\n"); +#else + darwinDesiredRefresh = atoi( argv[i+1] ); + ErrorF( "Attempting to use refresh rate of %i\n", darwinDesiredRefresh ); +#endif + return 2; + } + + if (!strcmp( argv[i], "-showconfig" ) || !strcmp( argv[i], "-version" )) { + DarwinPrintBanner(); + exit(0); + } + + // XDarwinStartup uses this argument to indicate the IOKit X server + // should be started. Ignore it here. + if ( !strcmp( argv[i], "-iokit" ) ) { + return 1; + } + + return 0; +} + + +/* + * ddxUseMsg -- + * Print out correct use of device dependent commandline options. + * Maybe the user now knows what really to do ... + */ +void ddxUseMsg( void ) +{ + ErrorF("\n"); + ErrorF("\n"); + ErrorF("Device Dependent Usage:\n"); + ErrorF("\n"); + ErrorF("-fakebuttons : fake a three button mouse with Command and Option keys.\n"); + ErrorF("-nofakebuttons : don't fake a three button mouse.\n"); + ErrorF("-fakemouse2 : fake middle mouse button with modifier keys.\n"); + ErrorF("-fakemouse3 : fake right mouse button with modifier keys.\n"); + ErrorF(" ex: -fakemouse2 \"option,shift\" = option-shift-click is middle button.\n"); + ErrorF("-keymap : read the keymapping from a file instead of the kernel.\n"); + ErrorF("-version : show the server version.\n"); + ErrorF("\n"); +#ifdef DARWIN_WITH_QUARTZ + ErrorF("Quartz modes:\n"); + ErrorF("-fullscreen : run full screen in parallel with Mac OS X window server.\n"); + ErrorF("-rootless : run rootless inside Mac OS X window server.\n"); + ErrorF("-quartz : use default Mac OS X window server mode\n"); + ErrorF("\n"); + ErrorF("Options ignored in rootless mode:\n"); +#endif + ErrorF("-size : use a screen resolution of x .\n"); + ErrorF("-depth <8,15,24> : use this bit depth.\n"); + ErrorF("-refresh : use a monitor refresh rate of Hz.\n"); + ErrorF("\n"); +} + + +/* + * ddxGiveUp -- + * Device dependent cleanup. Called by dix before normal server death. + */ +void ddxGiveUp( void ) +{ + ErrorF( "Quitting XDarwin...\n" ); + + DarwinModeGiveUp(); +} + + +/* + * AbortDDX -- + * DDX - specific abort routine. Called by AbortServer(). The attempt is + * made to restore all original setting of the displays. Also all devices + * are closed. + */ +void AbortDDX( void ) +{ + ErrorF( " AbortDDX\n" ); + /* + * This is needed for a abnormal server exit, since the normal exit stuff + * MUST also be performed (i.e. the vt must be left in a defined state) + */ + ddxGiveUp(); +} + + +#ifdef DPMSExtension +/* + * DPMS extension stubs + */ +Bool DPMSSupported(void) +{ + return FALSE; +} + +void DPMSSet(int level) +{ +} + +int DPMSGet(int *level) +{ + return -1; +} +#endif + + +#include "mivalidate.h" // for union _Validate used by windowstr.h +#include "windowstr.h" // for struct _Window +#include "scrnintstr.h" // for struct _Screen + +// This is copied from Xserver/hw/xfree86/common/xf86Helper.c. +// Quartz mode uses this when switching in and out of Quartz. +// Quartz or IOKit can use this when waking from sleep. +// Copyright (c) 1997-1998 by The XFree86 Project, Inc. + +/* + * xf86SetRootClip -- + * Enable or disable rendering to the screen by + * setting the root clip list and revalidating + * all of the windows + */ + +void +xf86SetRootClip (ScreenPtr pScreen, BOOL enable) +{ + WindowPtr pWin = WindowTable[pScreen->myNum]; + WindowPtr pChild; + Bool WasViewable = (Bool)(pWin->viewable); + Bool anyMarked = TRUE; + RegionPtr pOldClip = NULL, bsExposed; +#ifdef DO_SAVE_UNDERS + Bool dosave = FALSE; +#endif + WindowPtr pLayerWin; + BoxRec box; + + if (WasViewable) + { + for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) + { + (void) (*pScreen->MarkOverlappedWindows)(pChild, + pChild, + &pLayerWin); + } + (*pScreen->MarkWindow) (pWin); + anyMarked = TRUE; + if (pWin->valdata) + { + if (HasBorder (pWin)) + { + RegionPtr borderVisible; + + borderVisible = REGION_CREATE(pScreen, NullBox, 1); + REGION_SUBTRACT(pScreen, borderVisible, + &pWin->borderClip, &pWin->winSize); + pWin->valdata->before.borderVisible = borderVisible; + } + pWin->valdata->before.resized = TRUE; + } + } + + /* + * Use REGION_BREAK to avoid optimizations in ValidateTree + * that assume the root borderClip can't change well, normally + * it doesn't...) + */ + if (enable) + { + box.x1 = 0; + box.y1 = 0; + box.x2 = pScreen->width; + box.y2 = pScreen->height; + REGION_RESET(pScreen, &pWin->borderClip, &box); + REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); + } + else + { + REGION_EMPTY(pScreen, &pWin->borderClip); + REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); + } + + ResizeChildrenWinSize (pWin, 0, 0, 0, 0); + + if (WasViewable) + { + if (pWin->backStorage) + { + pOldClip = REGION_CREATE(pScreen, NullBox, 1); + REGION_COPY(pScreen, pOldClip, &pWin->clipList); + } + + if (pWin->firstChild) + { + anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild, + pWin->firstChild, + (WindowPtr *)NULL); + } + else + { + (*pScreen->MarkWindow) (pWin); + anyMarked = TRUE; + } + +#ifdef DO_SAVE_UNDERS + if (DO_SAVE_UNDERS(pWin)) + { + dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin); + } +#endif /* DO_SAVE_UNDERS */ + + if (anyMarked) + (*pScreen->ValidateTree)(pWin, NullWindow, VTOther); + } + + if (pWin->backStorage && + ((pWin->backingStore == Always) || WasViewable)) + { + if (!WasViewable) + pOldClip = &pWin->clipList; /* a convenient empty region */ + bsExposed = (*pScreen->TranslateBackingStore) + (pWin, 0, 0, pOldClip, + pWin->drawable.x, pWin->drawable.y); + if (WasViewable) + REGION_DESTROY(pScreen, pOldClip); + if (bsExposed) + { + RegionPtr valExposed = NullRegion; + + if (pWin->valdata) + valExposed = &pWin->valdata->after.exposed; + (*pScreen->WindowExposures) (pWin, valExposed, bsExposed); + if (valExposed) + REGION_EMPTY(pScreen, valExposed); + REGION_DESTROY(pScreen, bsExposed); + } + } + if (WasViewable) + { + if (anyMarked) + (*pScreen->HandleExposures)(pWin); +#ifdef DO_SAVE_UNDERS + if (dosave) + (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin); +#endif /* DO_SAVE_UNDERS */ + if (anyMarked && pScreen->PostValidateTree) + (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther); + } + if (pWin->realized) + WindowsRestructured (); + FlushAllOutput (); +} diff --git a/xorg-server-1.4/hw/darwin/darwin.h b/xorg-server-1.4/hw/darwin/darwin.h new file mode 100644 index 0000000..fc4a58a --- /dev/null +++ b/xorg-server-1.4/hw/darwin/darwin.h @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2001-2004 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#ifndef _DARWIN_H +#define _DARWIN_H + +#include +#include "inputstr.h" +#include "scrnintstr.h" +#include +#include + +typedef struct { + void *framebuffer; + int x; + int y; + int width; + int height; + int pitch; + int colorType; + int bitsPerPixel; + int colorBitsPerPixel; + int bitsPerComponent; +} DarwinFramebufferRec, *DarwinFramebufferPtr; + + +// From darwin.c +void DarwinPrintBanner(); +int DarwinParseModifierList(const char *constmodifiers); +void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo); +void xf86SetRootClip (ScreenPtr pScreen, BOOL enable); + +// From darwinEvents.c +Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr); +void DarwinEQEnqueue(const xEvent *e); +void DarwinEQPointerPost(xEvent *e); +void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX); +void DarwinPokeEQ(void); +void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y); +void DarwinSendKeyboardEvents(int ev_type, int keycode); +void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y); + +// From darwinKeyboard.c +int DarwinModifierNXKeyToNXKeycode(int key, int side); +void DarwinKeyboardInit(DeviceIntPtr pDev); +int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide); +int DarwinModifierNXKeyToNXMask(int key); +int DarwinModifierNXMaskToNXKey(int mask); +int DarwinModifierStringToNXKey(const char *string); + +// Mode specific functions +Bool DarwinModeAddScreen(int index, ScreenPtr pScreen); +Bool DarwinModeSetupScreen(int index, ScreenPtr pScreen); +void DarwinModeInitOutput(int argc,char **argv); +void DarwinModeInitInput(int argc, char **argv); +int DarwinModeProcessArgument(int argc, char *argv[], int i); +void DarwinModeProcessEvent(xEvent *xe); +void DarwinModeGiveUp(void); +void DarwinModeBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class); + + +#undef assert +#define assert(x) { if ((x) == 0) \ + FatalError("assert failed on line %d of %s!\n", __LINE__, __FILE__); } +#define kern_assert(x) { if ((x) != KERN_SUCCESS) \ + FatalError("assert failed on line %d of %s with kernel return 0x%x!\n", \ + __LINE__, __FILE__, x); } +#define SCREEN_PRIV(pScreen) \ + ((DarwinFramebufferPtr)pScreen->devPrivates[darwinScreenIndex].ptr) + + +#define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0... + + +/* + * Global variables from darwin.c + */ +extern int darwinScreenIndex; // index into pScreen.devPrivates +extern int darwinScreensFound; +extern io_connect_t darwinParamConnect; +extern int darwinEventReadFD; +extern int darwinEventWriteFD; +extern DeviceIntPtr darwinPointer; +extern DeviceIntPtr darwinKeyboard; + +// User preferences +extern int darwinMouseAccelChange; +extern int darwinFakeButtons; +extern int darwinFakeMouse2Mask; +extern int darwinFakeMouse3Mask; +extern int darwinSwapAltMeta; +extern char *darwinKeymapFile; +extern int darwinSyncKeymap; +extern unsigned int darwinDesiredWidth, darwinDesiredHeight; +extern int darwinDesiredDepth; +extern int darwinDesiredRefresh; + +// location of X11's (0,0) point in global screen coordinates +extern int darwinMainScreenX; +extern int darwinMainScreenY; + + +/* + * Special ddx events understood by the X server + */ +enum { + kXDarwinUpdateModifiers // update all modifier keys + = LASTEvent+1, // (from X.h list of event names) + kXDarwinUpdateButtons, // update state of mouse buttons 2 and up + kXDarwinScrollWheel, // scroll wheel event + + /* + * Quartz-specific events -- not used in IOKit mode + */ + kXDarwinActivate, // restore X drawing and cursor + kXDarwinDeactivate, // clip X drawing and switch to Aqua cursor + kXDarwinSetRootClip, // enable or disable drawing to the X screen + kXDarwinQuit, // kill the X server and release the display + kXDarwinReadPasteboard, // copy Mac OS X pasteboard into X cut buffer + kXDarwinWritePasteboard, // copy X cut buffer onto Mac OS X pasteboard + /* + * AppleWM events + */ + kXDarwinControllerNotify, // send an AppleWMControllerNotify event + kXDarwinPasteboardNotify, // notify the WM to copy or paste + /* + * Xplugin notification events + */ + kXDarwinDisplayChanged, // display configuration has changed + kXDarwinWindowState, // window visibility state has changed + kXDarwinWindowMoved // window has moved on screen +}; + +#endif /* _DARWIN_H */ diff --git a/xorg-server-1.4/hw/darwin/darwinClut8.h b/xorg-server-1.4/hw/darwin/darwinClut8.h new file mode 100644 index 0000000..8e914f3 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/darwinClut8.h @@ -0,0 +1,531 @@ +/* + * Darwin default 8-bit Colormap for StaticColor + */ + +#ifndef _DARWIN_CLUT8_ +#define _DARWIN_CLUT8_ + +#ifdef USE_NEW_CLUT + +static xColorItem darwinClut8[] = { + { 0, 0xffff, 0xffff, 0xffff, 0, 0 }, + { 1, 0xfefe, 0xfefe, 0xfefe, 0, 0 }, + { 2, 0xfdfd, 0xfdfd, 0xfdfd, 0, 0 }, + { 3, 0xb8b8, 0x2727, 0x2b2b, 0, 0 }, + { 4, 0xfcfc, 0xfcfc, 0xfcfc, 0, 0 }, + { 5, 0xffff, 0xffff, 0x0, 0, 0 }, + { 6, 0xfafa, 0xfafa, 0xfafa, 0, 0 }, + { 7, 0xf9f9, 0xf9f9, 0xf9f9, 0, 0 }, + { 8, 0xf8f8, 0xf8f8, 0xf8f8, 0, 0 }, + { 9, 0xf7f7, 0xf7f7, 0xf7f7, 0, 0 }, + { 10, 0xf6f6, 0xf6f6, 0xf6f6, 0, 0 }, + { 11, 0xf5f5, 0xf5f5, 0xf5f5, 0, 0 }, + { 12, 0xf4f4, 0xf4f4, 0xf4f4, 0, 0 }, + { 13, 0xf2f2, 0xf2f2, 0xf2f2, 0, 0 }, + { 14, 0xf1f1, 0xf1f1, 0xf1f1, 0, 0 }, + { 15, 0x0, 0x0, 0x0, 0, 0 }, + { 16, 0xefef, 0xefef, 0xefef, 0, 0 }, + { 17, 0xeeee, 0xeeee, 0xeeee, 0, 0 }, + { 18, 0xeded, 0xeded, 0xeded, 0, 0 }, + { 19, 0xebeb, 0xebeb, 0xebeb, 0, 0 }, + { 20, 0xe8e8, 0xe8e8, 0xe8e8, 0, 0 }, + { 21, 0xe7e7, 0xe7e7, 0xe7e7, 0, 0 }, + { 22, 0xc9c9, 0x3838, 0x3e3e, 0, 0 }, + { 23, 0xe5e5, 0xe5e5, 0xe5e5, 0, 0 }, + { 24, 0xffff, 0x0, 0xffff, 0, 0 }, + { 25, 0xfbfb, 0xfbfb, 0xfbfb, 0, 0 }, + { 26, 0xdede, 0x6c6c, 0x7272, 0, 0 }, + { 27, 0xe0e0, 0xe0e0, 0xe0e0, 0, 0 }, + { 28, 0xe8e8, 0x8686, 0x9090, 0, 0 }, + { 29, 0xdede, 0xdede, 0xdede, 0, 0 }, + { 30, 0xdddd, 0xdddd, 0xdddd, 0, 0 }, + { 31, 0xd3d3, 0x7e7e, 0x8d8d, 0, 0 }, + { 32, 0xd9d9, 0xd9d9, 0xd9d9, 0, 0 }, + { 33, 0xf3f3, 0x9696, 0xa6a6, 0, 0 }, + { 34, 0xb1b1, 0x1c1c, 0x3939, 0, 0 }, + { 35, 0xffff, 0x0, 0x0, 0, 0 }, + { 36, 0xbebe, 0x5e5e, 0x7272, 0, 0 }, + { 37, 0xd3d3, 0xd3d3, 0xd3d3, 0, 0 }, + { 38, 0xc6c6, 0x2e2e, 0x6767, 0, 0 }, + { 39, 0xd1d1, 0xd1d1, 0xd1d1, 0, 0 }, + { 40, 0xa3a3, 0x606, 0x4545, 0, 0 }, + { 41, 0xcece, 0xcece, 0xcece, 0, 0 }, + { 42, 0xcccc, 0xcccc, 0xffff, 0, 0 }, + { 43, 0xcccc, 0xcccc, 0xcccc, 0, 0 }, + { 44, 0xc6c6, 0x8f8f, 0xa7a7, 0, 0 }, + { 45, 0xe1e1, 0xd3d3, 0xd9d9, 0, 0 }, + { 46, 0xcece, 0x9e9e, 0xb4b4, 0, 0 }, + { 47, 0xcaca, 0xcaca, 0xcaca, 0, 0 }, + { 48, 0xbfbf, 0x3f3f, 0x7d7d, 0, 0 }, + { 49, 0xc9c9, 0xc9c9, 0xc9c9, 0, 0 }, + { 50, 0xf4f4, 0x8989, 0xbebe, 0, 0 }, + { 51, 0xc6c6, 0xc6c6, 0xc6c6, 0, 0 }, + { 52, 0xd6d6, 0x5151, 0x9797, 0, 0 }, + { 53, 0xc9c9, 0x2c2c, 0x8484, 0, 0 }, + { 54, 0x9696, 0x1a1a, 0x6a6a, 0, 0 }, + { 55, 0xc2c2, 0xc2c2, 0xc2c2, 0, 0 }, + { 56, 0xf3f3, 0x6f6f, 0xc6c6, 0, 0 }, + { 57, 0xe5e5, 0x4c4c, 0xbbbb, 0, 0 }, + { 58, 0xb7b7, 0x5a5a, 0x9c9c, 0, 0 }, + { 59, 0xbfbf, 0xbfbf, 0xbfbf, 0, 0 }, + { 60, 0xbebe, 0xbebe, 0xbebe, 0, 0 }, + { 61, 0xbdbd, 0xbdbd, 0xbdbd, 0, 0 }, + { 62, 0xb8b8, 0x2121, 0xa2a2, 0, 0 }, + { 63, 0xd3d3, 0x4444, 0xc0c0, 0, 0 }, + { 64, 0xc2c2, 0x6666, 0xb7b7, 0, 0 }, + { 65, 0xf4f4, 0x6666, 0xe6e6, 0, 0 }, + { 66, 0xfcfc, 0x7373, 0xfdfd, 0, 0 }, + { 67, 0xb9b9, 0xb9b9, 0xb9b9, 0, 0 }, + { 68, 0xeaea, 0xdfdf, 0xeaea, 0, 0 }, + { 69, 0xd4d4, 0x7171, 0xd5d5, 0, 0 }, + { 70, 0xf9f9, 0x8b8b, 0xffff, 0, 0 }, + { 71, 0xf5f5, 0xadad, 0xffff, 0, 0 }, + { 72, 0xbcbc, 0x9292, 0xc2c2, 0, 0 }, + { 73, 0xc7c7, 0x4f4f, 0xd9d9, 0, 0 }, + { 74, 0xa0a0, 0x4444, 0xafaf, 0, 0 }, + { 75, 0xc8c8, 0x8c8c, 0xd5d5, 0, 0 }, + { 76, 0xd7d7, 0x7474, 0xf7f7, 0, 0 }, + { 77, 0xb4b4, 0xb4b4, 0xb4b4, 0, 0 }, + { 78, 0xdada, 0x9595, 0xf9f9, 0, 0 }, + { 79, 0xeded, 0xcbcb, 0xffff, 0, 0 }, + { 80, 0xb2b2, 0xb2b2, 0xb2b2, 0, 0 }, + { 81, 0xa1a1, 0x6161, 0xd7d7, 0, 0 }, + { 82, 0xb2b2, 0x8585, 0xe2e2, 0, 0 }, + { 83, 0x5959, 0x2626, 0x9c9c, 0, 0 }, + { 84, 0x7c7c, 0x5151, 0xcccc, 0, 0 }, + { 85, 0xb0b0, 0xb0b0, 0xb0b0, 0, 0 }, + { 86, 0xb4b4, 0x8e8e, 0xfcfc, 0, 0 }, + { 87, 0xd5d5, 0xc0c0, 0xffff, 0, 0 }, + { 88, 0x5d5d, 0x3232, 0xcccc, 0, 0 }, + { 89, 0x7b7b, 0x5c5c, 0xe5e5, 0, 0 }, + { 90, 0xc0c0, 0xb0b0, 0xfdfd, 0, 0 }, + { 91, 0x6060, 0x5353, 0xadad, 0, 0 }, + { 92, 0x1212, 0xc0c, 0x7e7e, 0, 0 }, + { 93, 0x2e2e, 0x2929, 0x9999, 0, 0 }, + { 94, 0x7979, 0x7878, 0xe9e9, 0, 0 }, + { 95, 0x5b5b, 0x5c5c, 0xd0d0, 0, 0 }, + { 96, 0x6969, 0x6a6a, 0xcccc, 0, 0 }, + { 97, 0x9393, 0x9494, 0xf8f8, 0, 0 }, + { 98, 0x9292, 0x9292, 0xc3c3, 0, 0 }, + { 99, 0x4141, 0x4444, 0xbaba, 0, 0 }, + { 100, 0xa8a8, 0xabab, 0xffff, 0, 0 }, + { 101, 0xa3a3, 0xa3a3, 0xa3a3, 0, 0 }, + { 102, 0xdbdb, 0xdddd, 0xeaea, 0, 0 }, + { 103, 0x3131, 0x4949, 0xaaaa, 0, 0 }, + { 104, 0x7070, 0x8f8f, 0xf9f9, 0, 0 }, + { 105, 0x4848, 0x6666, 0xc1c1, 0, 0 }, + { 106, 0x5c5c, 0x7e7e, 0xe9e9, 0, 0 }, + { 107, 0xe2e2, 0xe5e5, 0xebeb, 0, 0 }, + { 108, 0xb0b0, 0xcdcd, 0xffff, 0, 0 }, + { 109, 0x6c6c, 0x8989, 0xb7b7, 0, 0 }, + { 110, 0x3434, 0x6565, 0xafaf, 0, 0 }, + { 111, 0x8c8c, 0xb9b9, 0xffff, 0, 0 }, + { 112, 0x3737, 0x7979, 0xd4d4, 0, 0 }, + { 113, 0x5a5a, 0x9999, 0xeaea, 0, 0 }, + { 114, 0xe0e, 0x4c4c, 0x9595, 0, 0 }, + { 115, 0x7979, 0xb9b9, 0xffff, 0, 0 }, + { 116, 0x8a8a, 0xa3a3, 0xbcbc, 0, 0 }, + { 117, 0x2020, 0x6161, 0x9d9d, 0, 0 }, + { 118, 0x8f8f, 0xaeae, 0xcaca, 0, 0 }, + { 119, 0xa0a, 0x6060, 0xa8a8, 0, 0 }, + { 120, 0x3f3f, 0x9494, 0xd9d9, 0, 0 }, + { 121, 0x6363, 0xb5b5, 0xf9f9, 0, 0 }, + { 122, 0xe2e2, 0xe8e8, 0xeded, 0, 0 }, + { 123, 0x2828, 0x6a6a, 0x9999, 0, 0 }, + { 124, 0x5555, 0xb2b2, 0xe7e7, 0, 0 }, + { 125, 0x3232, 0x8989, 0xa9a9, 0, 0 }, + { 126, 0xcfcf, 0xdada, 0xdede, 0, 0 }, + { 127, 0x2929, 0xa1a1, 0xc7c7, 0, 0 }, + { 128, 0x8686, 0xa9a9, 0xb4b4, 0, 0 }, + { 129, 0x0, 0x5f5f, 0x7979, 0, 0 }, + { 130, 0xc0c, 0x7777, 0x8e8e, 0, 0 }, + { 131, 0x1212, 0x8f8f, 0xabab, 0, 0 }, + { 132, 0x4141, 0xbaba, 0xd5d5, 0, 0 }, + { 133, 0x2424, 0x8282, 0x8383, 0, 0 }, + { 134, 0x2c2c, 0xc4c4, 0xc3c3, 0, 0 }, + { 135, 0x1a1a, 0xabab, 0xa6a6, 0, 0 }, + { 136, 0x4b4b, 0xa8a8, 0xa2a2, 0, 0 }, + { 137, 0xa0a, 0x9393, 0x8585, 0, 0 }, + { 138, 0xd0d, 0xa5a5, 0x9696, 0, 0 }, + { 139, 0x2626, 0xbcbc, 0xacac, 0, 0 }, + { 140, 0x404, 0x8181, 0x7272, 0, 0 }, + { 141, 0x1919, 0xb3b3, 0x8686, 0, 0 }, + { 142, 0x2929, 0xc1c1, 0x9494, 0, 0 }, + { 143, 0x2121, 0x9c9c, 0x7171, 0, 0 }, + { 144, 0x202, 0x8c8c, 0x5050, 0, 0 }, + { 145, 0x3535, 0xd0d0, 0x8989, 0, 0 }, + { 146, 0x4646, 0xa5a5, 0x7676, 0, 0 }, + { 147, 0x202, 0x7d7d, 0x3939, 0, 0 }, + { 148, 0x2929, 0xc9c9, 0x7171, 0, 0 }, + { 149, 0x5757, 0xd6d6, 0x8f8f, 0, 0 }, + { 150, 0xa2a2, 0xb5b5, 0xaaaa, 0, 0 }, + { 151, 0x101, 0x8888, 0x2a2a, 0, 0 }, + { 152, 0x7474, 0xbebe, 0x8a8a, 0, 0 }, + { 153, 0x1919, 0xb6b6, 0x4747, 0, 0 }, + { 154, 0x2d2d, 0xc6c6, 0x5151, 0, 0 }, + { 155, 0x3838, 0xdede, 0x5d5d, 0, 0 }, + { 156, 0x4c4c, 0xf4f4, 0x6f6f, 0, 0 }, + { 157, 0x9191, 0x9c9c, 0x9393, 0, 0 }, + { 158, 0x0, 0x8e8e, 0x1919, 0, 0 }, + { 159, 0x1010, 0xafaf, 0x2828, 0, 0 }, + { 160, 0xe3e3, 0xe3e3, 0xe3e3, 0, 0 }, + { 161, 0x808, 0xa1a1, 0x1a1a, 0, 0 }, + { 162, 0x5959, 0xc2c2, 0x6161, 0, 0 }, + { 163, 0xf0f0, 0xf0f0, 0xf0f0, 0, 0 }, + { 164, 0x8f8f, 0x9c9c, 0x9090, 0, 0 }, + { 165, 0x2323, 0xcece, 0x2a2a, 0, 0 }, + { 166, 0x1212, 0xbaba, 0x1717, 0, 0 }, + { 167, 0x101, 0x8a8a, 0x202, 0, 0 }, + { 168, 0x303, 0x9a9a, 0x202, 0, 0 }, + { 169, 0x4040, 0xe4e4, 0x4040, 0, 0 }, + { 170, 0x808, 0xb2b2, 0x505, 0, 0 }, + { 171, 0x1313, 0xcccc, 0xf0f, 0, 0 }, + { 172, 0x3636, 0xd7d7, 0x3232, 0, 0 }, + { 173, 0x2828, 0xe9e9, 0x1f1f, 0, 0 }, + { 174, 0x5353, 0xfbfb, 0x4c4c, 0, 0 }, + { 175, 0x6f6f, 0xafaf, 0x6a6a, 0, 0 }, + { 176, 0x7171, 0xe0e0, 0x6767, 0, 0 }, + { 177, 0x3232, 0xc0c0, 0x1212, 0, 0 }, + { 178, 0x2929, 0xa5a5, 0x808, 0, 0 }, + { 179, 0x5c5c, 0xdddd, 0x3535, 0, 0 }, + { 180, 0x0, 0xffff, 0xffff, 0, 0 }, + { 181, 0x6363, 0xc8c8, 0x4545, 0, 0 }, + { 182, 0x8686, 0xfdfd, 0x5b5b, 0, 0 }, + { 183, 0x7171, 0xf6f6, 0x3939, 0, 0 }, + { 184, 0x5555, 0xcccc, 0x1515, 0, 0 }, + { 185, 0x0, 0xffff, 0x0, 0, 0 }, + { 186, 0x9090, 0xcaca, 0x6e6e, 0, 0 }, + { 187, 0x4343, 0xa7a7, 0x101, 0, 0 }, + { 188, 0x8d8d, 0xe4e4, 0x3737, 0, 0 }, + { 189, 0xb3b3, 0xf0f0, 0x6464, 0, 0 }, + { 190, 0x8585, 0x8e8e, 0x7a7a, 0, 0 }, + { 191, 0xb0b0, 0xfafa, 0x4d4d, 0, 0 }, + { 192, 0xd6d6, 0xd6d6, 0xd6d6, 0, 0 }, + { 193, 0x8888, 0xd0d0, 0x1a1a, 0, 0 }, + { 194, 0x6a6a, 0xa7a7, 0x303, 0, 0 }, + { 195, 0x9898, 0xbfbf, 0x4141, 0, 0 }, + { 196, 0xcdcd, 0xf8f8, 0x5151, 0, 0 }, + { 197, 0x9494, 0xa4a4, 0x5555, 0, 0 }, + { 198, 0x9191, 0xb0b0, 0xa0a, 0, 0 }, + { 199, 0xdada, 0xf1f1, 0x3c3c, 0, 0 }, + { 200, 0xbaba, 0xcaca, 0x5353, 0, 0 }, + { 201, 0xb9b9, 0xc3c3, 0x2828, 0, 0 }, + { 202, 0xb1b1, 0xbaba, 0x1212, 0, 0 }, + { 203, 0xd2d2, 0xd9d9, 0x2626, 0, 0 }, + { 204, 0xe8e8, 0xecec, 0x2d2d, 0, 0 }, + { 205, 0x9898, 0x9696, 0x202, 0, 0 }, + { 206, 0xadad, 0xadad, 0x5c5c, 0, 0 }, + { 207, 0xe2e2, 0xd8d8, 0x3838, 0, 0 }, + { 208, 0xd9d9, 0xc4c4, 0x3838, 0, 0 }, + { 209, 0xa8a8, 0x9a9a, 0x5050, 0, 0 }, + { 210, 0x0, 0x0, 0xffff, 0, 0 }, + { 211, 0xbebe, 0xaeae, 0x5e5e, 0, 0 }, + { 212, 0x9a9a, 0x9898, 0x8e8e, 0, 0 }, + { 213, 0xacac, 0x8d8d, 0xd0d, 0, 0 }, + { 214, 0xc5c5, 0xa0a0, 0x2b2b, 0, 0 }, + { 215, 0xdbdb, 0xb5b5, 0x4848, 0, 0 }, + { 216, 0xdddd, 0x0, 0x0, 0, 0 }, + { 217, 0x9c9c, 0x6d6d, 0x303, 0, 0 }, + { 218, 0xd4d4, 0xa8a8, 0x4747, 0, 0 }, + { 219, 0xb7b7, 0x7171, 0x1717, 0, 0 }, + { 220, 0xdcdc, 0xa1a1, 0x5a5a, 0, 0 }, + { 221, 0xb9b9, 0x9c9c, 0x7c7c, 0, 0 }, + { 222, 0xb4b4, 0xabab, 0xa2a2, 0, 0 }, + { 223, 0x9e9e, 0x4b4b, 0x101, 0, 0 }, + { 224, 0xc8c8, 0x7878, 0x3535, 0, 0 }, + { 225, 0xd2d2, 0x8d8d, 0x5151, 0, 0 }, + { 226, 0xadad, 0x5252, 0xf0f, 0, 0 }, + { 227, 0x0, 0xbbbb, 0x0, 0, 0 }, + { 228, 0xb2b2, 0x6666, 0x3838, 0, 0 }, + { 229, 0xb1b1, 0xa6a6, 0x9f9f, 0, 0 }, + { 230, 0xb1b1, 0x8787, 0x6f6f, 0, 0 }, + { 231, 0xa4a4, 0x3434, 0x303, 0, 0 }, + { 232, 0xeeee, 0x9e9e, 0x8585, 0, 0 }, + { 233, 0xc9c9, 0x7373, 0x5a5a, 0, 0 }, + { 234, 0xe6e6, 0x9494, 0x7c7c, 0, 0 }, + { 235, 0xa9a9, 0x2222, 0x606, 0, 0 }, + { 236, 0xdbdb, 0x8787, 0x7474, 0, 0 }, + { 237, 0xb0b0, 0x2e2e, 0x1515, 0, 0 }, + { 238, 0xb7b7, 0x5a5a, 0x5050, 0, 0 }, + { 239, 0xb2b2, 0x4242, 0x3b3b, 0, 0 }, + { 240, 0xcdcd, 0x7373, 0x6e6e, 0, 0 }, + { 241, 0xd9d9, 0x5858, 0x5858, 0, 0 }, + { 242, 0xacac, 0xacac, 0xacac, 0, 0 }, + { 243, 0xa0a0, 0xa0a0, 0xa0a0, 0, 0 }, + { 244, 0x9a9a, 0x9a9a, 0x9a9a, 0, 0 }, + { 245, 0x9292, 0x9292, 0x9292, 0, 0 }, + { 246, 0x8e8e, 0x8e8e, 0x8e8e, 0, 0 }, + { 247, 0xbbbb, 0xbbbb, 0xbbbb, 0, 0 }, + { 248, 0x8181, 0x8181, 0x8181, 0, 0 }, + { 249, 0x8888, 0x8888, 0x8888, 0, 0 }, + { 250, 0x7777, 0x7777, 0x7777, 0, 0 }, + { 251, 0x5555, 0x5555, 0x5555, 0, 0 }, + { 252, 0x4444, 0x4444, 0x4444, 0, 0 }, + { 253, 0x2222, 0x2222, 0x2222, 0, 0 }, + { 254, 0x7b7b, 0x7b7b, 0x7b7b, 0, 0 }, + { 255, 0x0, 0x0, 0x0, 0, 0 }, +}; + +#else /* !USE_NEW_CLUT */ + +static xColorItem darwinClut8[] = { + { 0, 0x0000, 0x0000, 0x0000, 0, 0 }, + { 1, 0xffff, 0xffff, 0xcccc, 0, 0 }, + { 2, 0xffff, 0xffff, 0x9999, 0, 0 }, + { 3, 0xffff, 0xffff, 0x6666, 0, 0 }, + { 4, 0xffff, 0xffff, 0x3333, 0, 0 }, + { 5, 0xffff, 0xffff, 0x0000, 0, 0 }, + { 6, 0xffff, 0xcccc, 0xffff, 0, 0 }, + { 7, 0xffff, 0xcccc, 0xcccc, 0, 0 }, + { 8, 0xffff, 0xcccc, 0x9999, 0, 0 }, + { 9, 0xffff, 0xcccc, 0x6666, 0, 0 }, + { 10, 0xffff, 0xcccc, 0x3333, 0, 0 }, + { 11, 0xffff, 0xcccc, 0x0000, 0, 0 }, + { 12, 0xffff, 0x9999, 0xffff, 0, 0 }, + { 13, 0xffff, 0x9999, 0xcccc, 0, 0 }, + { 14, 0xffff, 0x9999, 0x9999, 0, 0 }, + { 15, 0xffff, 0x9999, 0x6666, 0, 0 }, + { 16, 0xffff, 0x9999, 0x3333, 0, 0 }, + { 17, 0xffff, 0x9999, 0x0000, 0, 0 }, + { 18, 0xffff, 0x6666, 0xffff, 0, 0 }, + { 19, 0xffff, 0x6666, 0xcccc, 0, 0 }, + { 20, 0xffff, 0x6666, 0x9999, 0, 0 }, + { 21, 0xffff, 0x6666, 0x6666, 0, 0 }, + { 22, 0xffff, 0x6666, 0x3333, 0, 0 }, + { 23, 0xffff, 0x6666, 0x0000, 0, 0 }, + { 24, 0xffff, 0x3333, 0xffff, 0, 0 }, + { 25, 0xffff, 0x3333, 0xcccc, 0, 0 }, + { 26, 0xffff, 0x3333, 0x9999, 0, 0 }, + { 27, 0xffff, 0x3333, 0x6666, 0, 0 }, + { 28, 0xffff, 0x3333, 0x3333, 0, 0 }, + { 29, 0xffff, 0x3333, 0x0000, 0, 0 }, + { 30, 0xffff, 0x0000, 0xffff, 0, 0 }, + { 31, 0xffff, 0x0000, 0xcccc, 0, 0 }, + { 32, 0xffff, 0x0000, 0x9999, 0, 0 }, + { 33, 0xffff, 0x0000, 0x6666, 0, 0 }, + { 34, 0xffff, 0x0000, 0x3333, 0, 0 }, + { 35, 0xffff, 0x0000, 0x0000, 0, 0 }, + { 36, 0xcccc, 0xffff, 0xffff, 0, 0 }, + { 37, 0xcccc, 0xffff, 0xcccc, 0, 0 }, + { 38, 0xcccc, 0xffff, 0x9999, 0, 0 }, + { 39, 0xcccc, 0xffff, 0x6666, 0, 0 }, + { 40, 0xcccc, 0xffff, 0x3333, 0, 0 }, + { 41, 0xcccc, 0xffff, 0x0000, 0, 0 }, + { 42, 0xcccc, 0xcccc, 0xffff, 0, 0 }, + { 43, 0xcccc, 0xcccc, 0xcccc, 0, 0 }, + { 44, 0xcccc, 0xcccc, 0x9999, 0, 0 }, + { 45, 0xcccc, 0xcccc, 0x6666, 0, 0 }, + { 46, 0xcccc, 0xcccc, 0x3333, 0, 0 }, + { 47, 0xcccc, 0xcccc, 0x0000, 0, 0 }, + { 48, 0xcccc, 0x9999, 0xffff, 0, 0 }, + { 49, 0xcccc, 0x9999, 0xcccc, 0, 0 }, + { 50, 0xcccc, 0x9999, 0x9999, 0, 0 }, + { 51, 0xcccc, 0x9999, 0x6666, 0, 0 }, + { 52, 0xcccc, 0x9999, 0x3333, 0, 0 }, + { 53, 0xcccc, 0x9999, 0x0000, 0, 0 }, + { 54, 0xcccc, 0x6666, 0xffff, 0, 0 }, + { 55, 0xcccc, 0x6666, 0xcccc, 0, 0 }, + { 56, 0xcccc, 0x6666, 0x9999, 0, 0 }, + { 57, 0xcccc, 0x6666, 0x6666, 0, 0 }, + { 58, 0xcccc, 0x6666, 0x3333, 0, 0 }, + { 59, 0xcccc, 0x6666, 0x0000, 0, 0 }, + { 60, 0xcccc, 0x3333, 0xffff, 0, 0 }, + { 61, 0xcccc, 0x3333, 0xcccc, 0, 0 }, + { 62, 0xcccc, 0x3333, 0x9999, 0, 0 }, + { 63, 0xcccc, 0x3333, 0x6666, 0, 0 }, + { 64, 0xcccc, 0x3333, 0x3333, 0, 0 }, + { 65, 0xcccc, 0x3333, 0x0000, 0, 0 }, + { 66, 0xcccc, 0x0000, 0xffff, 0, 0 }, + { 67, 0xcccc, 0x0000, 0xcccc, 0, 0 }, + { 68, 0xcccc, 0x0000, 0x9999, 0, 0 }, + { 69, 0xcccc, 0x0000, 0x6666, 0, 0 }, + { 70, 0xcccc, 0x0000, 0x3333, 0, 0 }, + { 71, 0xcccc, 0x0000, 0x0000, 0, 0 }, + { 72, 0x9999, 0xffff, 0xffff, 0, 0 }, + { 73, 0x9999, 0xffff, 0xcccc, 0, 0 }, + { 74, 0x9999, 0xffff, 0x9999, 0, 0 }, + { 75, 0x9999, 0xffff, 0x6666, 0, 0 }, + { 76, 0x9999, 0xffff, 0x3333, 0, 0 }, + { 77, 0x9999, 0xffff, 0x0000, 0, 0 }, + { 78, 0x9999, 0xcccc, 0xffff, 0, 0 }, + { 79, 0x9999, 0xcccc, 0xcccc, 0, 0 }, + { 80, 0x9999, 0xcccc, 0x9999, 0, 0 }, + { 81, 0x9999, 0xcccc, 0x6666, 0, 0 }, + { 82, 0x9999, 0xcccc, 0x3333, 0, 0 }, + { 83, 0x9999, 0xcccc, 0x0000, 0, 0 }, + { 84, 0x9999, 0x9999, 0xffff, 0, 0 }, + { 85, 0x9999, 0x9999, 0xcccc, 0, 0 }, + { 86, 0x9999, 0x9999, 0x9999, 0, 0 }, + { 87, 0x9999, 0x9999, 0x6666, 0, 0 }, + { 88, 0x9999, 0x9999, 0x3333, 0, 0 }, + { 89, 0x9999, 0x9999, 0x0000, 0, 0 }, + { 90, 0x9999, 0x6666, 0xffff, 0, 0 }, + { 91, 0x9999, 0x6666, 0xcccc, 0, 0 }, + { 92, 0x9999, 0x6666, 0x9999, 0, 0 }, + { 93, 0x9999, 0x6666, 0x6666, 0, 0 }, + { 94, 0x9999, 0x6666, 0x3333, 0, 0 }, + { 95, 0x9999, 0x6666, 0x0000, 0, 0 }, + { 96, 0x9999, 0x3333, 0xffff, 0, 0 }, + { 97, 0x9999, 0x3333, 0xcccc, 0, 0 }, + { 98, 0x9999, 0x3333, 0x9999, 0, 0 }, + { 99, 0x9999, 0x3333, 0x6666, 0, 0 }, + { 100, 0x9999, 0x3333, 0x3333, 0, 0 }, + { 101, 0x9999, 0x3333, 0x0000, 0, 0 }, + { 102, 0x9999, 0x0000, 0xffff, 0, 0 }, + { 103, 0x9999, 0x0000, 0xcccc, 0, 0 }, + { 104, 0x9999, 0x0000, 0x9999, 0, 0 }, + { 105, 0x9999, 0x0000, 0x6666, 0, 0 }, + { 106, 0x9999, 0x0000, 0x3333, 0, 0 }, + { 107, 0x9999, 0x0000, 0x0000, 0, 0 }, + { 108, 0x6666, 0xffff, 0xffff, 0, 0 }, + { 109, 0x6666, 0xffff, 0xcccc, 0, 0 }, + { 110, 0x6666, 0xffff, 0x9999, 0, 0 }, + { 111, 0x6666, 0xffff, 0x6666, 0, 0 }, + { 112, 0x6666, 0xffff, 0x3333, 0, 0 }, + { 113, 0x6666, 0xffff, 0x0000, 0, 0 }, + { 114, 0x6666, 0xcccc, 0xffff, 0, 0 }, + { 115, 0x6666, 0xcccc, 0xcccc, 0, 0 }, + { 116, 0x6666, 0xcccc, 0x9999, 0, 0 }, + { 117, 0x6666, 0xcccc, 0x6666, 0, 0 }, + { 118, 0x6666, 0xcccc, 0x3333, 0, 0 }, + { 119, 0x6666, 0xcccc, 0x0000, 0, 0 }, + { 120, 0x6666, 0x9999, 0xffff, 0, 0 }, + { 121, 0x6666, 0x9999, 0xcccc, 0, 0 }, + { 122, 0x6666, 0x9999, 0x9999, 0, 0 }, + { 123, 0x6666, 0x9999, 0x6666, 0, 0 }, + { 124, 0x6666, 0x9999, 0x3333, 0, 0 }, + { 125, 0x6666, 0x9999, 0x0000, 0, 0 }, + { 126, 0x6666, 0x6666, 0xffff, 0, 0 }, + { 127, 0x6666, 0x6666, 0xcccc, 0, 0 }, + { 128, 0x6666, 0x6666, 0x9999, 0, 0 }, + { 129, 0x6666, 0x6666, 0x6666, 0, 0 }, + { 130, 0x6666, 0x6666, 0x3333, 0, 0 }, + { 131, 0x6666, 0x6666, 0x0000, 0, 0 }, + { 132, 0x6666, 0x3333, 0xffff, 0, 0 }, + { 133, 0x6666, 0x3333, 0xcccc, 0, 0 }, + { 134, 0x6666, 0x3333, 0x9999, 0, 0 }, + { 135, 0x6666, 0x3333, 0x6666, 0, 0 }, + { 136, 0x6666, 0x3333, 0x3333, 0, 0 }, + { 137, 0x6666, 0x3333, 0x0000, 0, 0 }, + { 138, 0x6666, 0x0000, 0xffff, 0, 0 }, + { 139, 0x6666, 0x0000, 0xcccc, 0, 0 }, + { 140, 0x6666, 0x0000, 0x9999, 0, 0 }, + { 141, 0x6666, 0x0000, 0x6666, 0, 0 }, + { 142, 0x6666, 0x0000, 0x3333, 0, 0 }, + { 143, 0x6666, 0x0000, 0x0000, 0, 0 }, + { 144, 0x3333, 0xffff, 0xffff, 0, 0 }, + { 145, 0x3333, 0xffff, 0xcccc, 0, 0 }, + { 146, 0x3333, 0xffff, 0x9999, 0, 0 }, + { 147, 0x3333, 0xffff, 0x6666, 0, 0 }, + { 148, 0x3333, 0xffff, 0x3333, 0, 0 }, + { 149, 0x3333, 0xffff, 0x0000, 0, 0 }, + { 150, 0x3333, 0xcccc, 0xffff, 0, 0 }, + { 151, 0x3333, 0xcccc, 0xcccc, 0, 0 }, + { 152, 0x3333, 0xcccc, 0x9999, 0, 0 }, + { 153, 0x3333, 0xcccc, 0x6666, 0, 0 }, + { 154, 0x3333, 0xcccc, 0x3333, 0, 0 }, + { 155, 0x3333, 0xcccc, 0x0000, 0, 0 }, + { 156, 0x3333, 0x9999, 0xffff, 0, 0 }, + { 157, 0x3333, 0x9999, 0xcccc, 0, 0 }, + { 158, 0x3333, 0x9999, 0x9999, 0, 0 }, + { 159, 0x3333, 0x9999, 0x6666, 0, 0 }, + { 160, 0x3333, 0x9999, 0x3333, 0, 0 }, + { 161, 0x3333, 0x9999, 0x0000, 0, 0 }, + { 162, 0x3333, 0x6666, 0xffff, 0, 0 }, + { 163, 0x3333, 0x6666, 0xcccc, 0, 0 }, + { 164, 0x3333, 0x6666, 0x9999, 0, 0 }, + { 165, 0x3333, 0x6666, 0x6666, 0, 0 }, + { 166, 0x3333, 0x6666, 0x3333, 0, 0 }, + { 167, 0x3333, 0x6666, 0x0000, 0, 0 }, + { 168, 0x3333, 0x3333, 0xffff, 0, 0 }, + { 169, 0x3333, 0x3333, 0xcccc, 0, 0 }, + { 170, 0x3333, 0x3333, 0x9999, 0, 0 }, + { 171, 0x3333, 0x3333, 0x6666, 0, 0 }, + { 172, 0x3333, 0x3333, 0x3333, 0, 0 }, + { 173, 0x3333, 0x3333, 0x0000, 0, 0 }, + { 174, 0x3333, 0x0000, 0xffff, 0, 0 }, + { 175, 0x3333, 0x0000, 0xcccc, 0, 0 }, + { 176, 0x3333, 0x0000, 0x9999, 0, 0 }, + { 177, 0x3333, 0x0000, 0x6666, 0, 0 }, + { 178, 0x3333, 0x0000, 0x3333, 0, 0 }, + { 179, 0x3333, 0x0000, 0x0000, 0, 0 }, + { 180, 0x0000, 0xffff, 0xffff, 0, 0 }, + { 181, 0x0000, 0xffff, 0xcccc, 0, 0 }, + { 182, 0x0000, 0xffff, 0x9999, 0, 0 }, + { 183, 0x0000, 0xffff, 0x6666, 0, 0 }, + { 184, 0x0000, 0xffff, 0x3333, 0, 0 }, + { 185, 0x0000, 0xffff, 0x0000, 0, 0 }, + { 186, 0x0000, 0xcccc, 0xffff, 0, 0 }, + { 187, 0x0000, 0xcccc, 0xcccc, 0, 0 }, + { 188, 0x0000, 0xcccc, 0x9999, 0, 0 }, + { 189, 0x0000, 0xcccc, 0x6666, 0, 0 }, + { 190, 0x0000, 0xcccc, 0x3333, 0, 0 }, + { 191, 0x0000, 0xcccc, 0x0000, 0, 0 }, + { 192, 0x0000, 0x9999, 0xffff, 0, 0 }, + { 193, 0x0000, 0x9999, 0xcccc, 0, 0 }, + { 194, 0x0000, 0x9999, 0x9999, 0, 0 }, + { 195, 0x0000, 0x9999, 0x6666, 0, 0 }, + { 196, 0x0000, 0x9999, 0x3333, 0, 0 }, + { 197, 0x0000, 0x9999, 0x0000, 0, 0 }, + { 198, 0x0000, 0x6666, 0xffff, 0, 0 }, + { 199, 0x0000, 0x6666, 0xcccc, 0, 0 }, + { 200, 0x0000, 0x6666, 0x9999, 0, 0 }, + { 201, 0x0000, 0x6666, 0x6666, 0, 0 }, + { 202, 0x0000, 0x6666, 0x3333, 0, 0 }, + { 203, 0x0000, 0x6666, 0x0000, 0, 0 }, + { 204, 0x0000, 0x3333, 0xffff, 0, 0 }, + { 205, 0x0000, 0x3333, 0xcccc, 0, 0 }, + { 206, 0x0000, 0x3333, 0x9999, 0, 0 }, + { 207, 0x0000, 0x3333, 0x6666, 0, 0 }, + { 208, 0x0000, 0x3333, 0x3333, 0, 0 }, + { 209, 0x0000, 0x3333, 0x0000, 0, 0 }, + { 210, 0x0000, 0x0000, 0xffff, 0, 0 }, + { 211, 0x0000, 0x0000, 0xcccc, 0, 0 }, + { 212, 0x0000, 0x0000, 0x9999, 0, 0 }, + { 213, 0x0000, 0x0000, 0x6666, 0, 0 }, + { 214, 0x0000, 0x0000, 0x3333, 0, 0 }, + { 215, 0xeeee, 0x0000, 0x0000, 0, 0 }, + { 216, 0xdddd, 0x0000, 0x0000, 0, 0 }, + { 217, 0xbbbb, 0x0000, 0x0000, 0, 0 }, + { 218, 0xaaaa, 0x0000, 0x0000, 0, 0 }, + { 219, 0x8888, 0x0000, 0x0000, 0, 0 }, + { 220, 0x7777, 0x0000, 0x0000, 0, 0 }, + { 221, 0x5555, 0x0000, 0x0000, 0, 0 }, + { 222, 0x4444, 0x0000, 0x0000, 0, 0 }, + { 223, 0x2222, 0x0000, 0x0000, 0, 0 }, + { 224, 0x1111, 0x0000, 0x0000, 0, 0 }, + { 225, 0x0000, 0xeeee, 0x0000, 0, 0 }, + { 226, 0x0000, 0xdddd, 0x0000, 0, 0 }, + { 227, 0x0000, 0xbbbb, 0x0000, 0, 0 }, + { 228, 0x0000, 0xaaaa, 0x0000, 0, 0 }, + { 229, 0x0000, 0x8888, 0x0000, 0, 0 }, + { 230, 0x0000, 0x7777, 0x0000, 0, 0 }, + { 231, 0x0000, 0x5555, 0x0000, 0, 0 }, + { 232, 0x0000, 0x4444, 0x0000, 0, 0 }, + { 233, 0x0000, 0x2222, 0x0000, 0, 0 }, + { 234, 0x0000, 0x1111, 0x0000, 0, 0 }, + { 235, 0x0000, 0x0000, 0xeeee, 0, 0 }, + { 236, 0x0000, 0x0000, 0xdddd, 0, 0 }, + { 237, 0x0000, 0x0000, 0xbbbb, 0, 0 }, + { 238, 0x0000, 0x0000, 0xaaaa, 0, 0 }, + { 239, 0x0000, 0x0000, 0x8888, 0, 0 }, + { 240, 0x0000, 0x0000, 0x7777, 0, 0 }, + { 241, 0x0000, 0x0000, 0x5555, 0, 0 }, + { 242, 0x0000, 0x0000, 0x4444, 0, 0 }, + { 243, 0x0000, 0x0000, 0x2222, 0, 0 }, + { 244, 0x0000, 0x0000, 0x1111, 0, 0 }, + { 245, 0xeeee, 0xeeee, 0xeeee, 0, 0 }, + { 246, 0xdddd, 0xdddd, 0xdddd, 0, 0 }, + { 247, 0xbbbb, 0xbbbb, 0xbbbb, 0, 0 }, + { 248, 0xaaaa, 0xaaaa, 0xaaaa, 0, 0 }, + { 249, 0x8888, 0x8888, 0x8888, 0, 0 }, + { 250, 0x7777, 0x7777, 0x7777, 0, 0 }, + { 251, 0x5555, 0x5555, 0x5555, 0, 0 }, + { 252, 0x4444, 0x4444, 0x4444, 0, 0 }, + { 253, 0x2222, 0x2222, 0x2222, 0, 0 }, + { 254, 0x1111, 0x1111, 0x1111, 0, 0 }, + { 255, 0xffff, 0xffff, 0xffff, 0, 0 } +}; +#endif /* USE_NEW_CLUT */ + +#endif /* _DARWIN_CLUT8_ */ diff --git a/xorg-server-1.4/hw/darwin/darwinEvents.c b/xorg-server-1.4/hw/darwin/darwinEvents.c new file mode 100644 index 0000000..3d7f268 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/darwinEvents.c @@ -0,0 +1,446 @@ +/* +Darwin event queue and event handling + +Copyright 2007 Apple Inc. +Copyright 2004 Kaleb S. KEITHLEY. All Rights Reserved. +Copyright (c) 2002-2004 Torrey T. Lyons. All Rights Reserved. + +This file is based on mieq.c by Keith Packard, +which contains the following copyright: +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. + */ + +#define NEED_EVENTS +#include +#include +#include +#include "misc.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "inputstr.h" +#include "mi.h" +#include "scrnintstr.h" +#include "mipointer.h" + +#include "darwin.h" +#include "darwinKeyboard.h" + +#include +#include +#include +#include + +/* Fake button press/release for scroll wheel move. */ +#define SCROLLWHEELUPFAKE 4 +#define SCROLLWHEELDOWNFAKE 5 + +#define QUEUE_SIZE 256 + +typedef struct _Event { + xEvent event; + ScreenPtr pScreen; +} EventRec, *EventPtr; + +int input_check_zero, input_check_flag; + +static int old_flags = 0; // last known modifier state + +typedef struct _EventQueue { + HWEventQueueType head, tail; /* long for SetInputCheck */ + CARD32 lastEventTime; /* to avoid time running backwards */ + Bool lastMotion; + EventRec events[QUEUE_SIZE]; /* static allocation for signals */ + DevicePtr pKbd, pPtr; /* device pointer, to get funcs */ + ScreenPtr pEnqueueScreen; /* screen events are being delivered to */ + ScreenPtr pDequeueScreen; /* screen events are being dispatched to */ +} EventQueueRec, *EventQueuePtr; + +static EventQueueRec darwinEventQueue; +xEvent *darwinEvents; + +/* + * DarwinPressModifierMask + * Press or release the given modifier key, specified by its mask. + */ +static void DarwinPressModifierMask( + int pressed, + int mask) // one of NX_*MASK constants +{ + int key = DarwinModifierNXMaskToNXKey(mask); + + if (key != -1) { + int keycode = DarwinModifierNXKeyToNXKeycode(key, 0); + if (keycode != 0) + DarwinSendKeyboardEvents(pressed, keycode); + } +} + +#ifdef NX_DEVICELCTLKEYMASK +#define CONTROL_MASK(flags) (flags & (NX_DEVICELCTLKEYMASK|NX_DEVICERCTLKEYMASK)) +#else +#define CONTROL_MASK(flags) (NX_CONTROLMASK) +#endif /* NX_DEVICELCTLKEYMASK */ + +#ifdef NX_DEVICELSHIFTKEYMASK +#define SHIFT_MASK(flags) (flags & (NX_DEVICELSHIFTKEYMASK|NX_DEVICERSHIFTKEYMASK)) +#else +#define SHIFT_MASK(flags) (NX_SHIFTMASK) +#endif /* NX_DEVICELSHIFTKEYMASK */ + +#ifdef NX_DEVICELCMDKEYMASK +#define COMMAND_MASK(flags) (flags & (NX_DEVICELCMDKEYMASK|NX_DEVICERCMDKEYMASK)) +#else +#define COMMAND_MASK(flags) (NX_COMMANDMASK) +#endif /* NX_DEVICELCMDKEYMASK */ + +#ifdef NX_DEVICELALTKEYMASK +#define ALTERNATE_MASK(flags) (flags & (NX_DEVICELALTKEYMASK|NX_DEVICERALTKEYMASK)) +#else +#define ALTERNATE_MASK(flags) (NX_ALTERNATEMASK) +#endif /* NX_DEVICELALTKEYMASK */ + +/* + * DarwinUpdateModifiers + * Send events to update the modifier state. + */ +static void DarwinUpdateModifiers( + int pressed, // KeyPress or KeyRelease + int flags ) // modifier flags that have changed +{ + if (flags & NX_ALPHASHIFTMASK) { + DarwinPressModifierMask(pressed, NX_ALPHASHIFTMASK); + } + if (flags & NX_COMMANDMASK) { + DarwinPressModifierMask(pressed, COMMAND_MASK(flags)); + } + if (flags & NX_CONTROLMASK) { + DarwinPressModifierMask(pressed, CONTROL_MASK(flags)); + } + if (flags & NX_ALTERNATEMASK) { + DarwinPressModifierMask(pressed, ALTERNATE_MASK(flags)); + } + if (flags & NX_SHIFTMASK) { + DarwinPressModifierMask(pressed, SHIFT_MASK(flags)); + } + if (flags & NX_SECONDARYFNMASK) { + DarwinPressModifierMask(pressed, NX_SECONDARYFNMASK); + } +} + + +/* + * DarwinSimulateMouseClick + * Send a mouse click to X when multiple mouse buttons are simulated + * with modifier-clicks, such as command-click for button 2. The dix + * layer is told that the previously pressed modifier key(s) are + * released, the simulated click event is sent. After the mouse button + * is released, the modifier keys are reverted to their actual state, + * which may or may not be pressed at that point. This is usually + * closest to what the user wants. Ie. the user typically wants to + * simulate a button 2 press instead of Command-button 2. + */ +static void DarwinSimulateMouseClick( + int pointer_x, + int pointer_y, + int whichButton, // mouse button to be pressed + int modifierMask) // modifiers used for the fake click +{ + // first fool X into forgetting about the keys + DarwinUpdateModifiers(KeyRelease, modifierMask); + + // push the mouse button + DarwinSendPointerEvents(ButtonPress, whichButton, pointer_x, pointer_y); + DarwinSendPointerEvents(ButtonRelease, whichButton, pointer_x, pointer_y); + + // restore old modifiers + DarwinUpdateModifiers(KeyPress, modifierMask); +} + + +Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) { + darwinEvents = (xEvent *)malloc(sizeof(xEvent) * GetMaximumEventsNum()); + mieqInit(); + darwinEventQueue.head = darwinEventQueue.tail = 0; + darwinEventQueue.lastEventTime = GetTimeInMillis (); + darwinEventQueue.pKbd = pKbd; + darwinEventQueue.pPtr = pPtr; + darwinEventQueue.pEnqueueScreen = screenInfo.screens[0]; + darwinEventQueue.pDequeueScreen = darwinEventQueue.pEnqueueScreen; + SetInputCheck(&input_check_zero, &input_check_flag); + return TRUE; +} + + +/* + * DarwinEQEnqueue + * Must be thread safe with ProcessInputEvents. + * DarwinEQEnqueue - called from event gathering thread + * ProcessInputEvents - called from X server thread + * DarwinEQEnqueue should never be called from more than one thread. + * + * This should be deprecated in favor of miEQEnqueue -- BB + */ +void DarwinEQEnqueue(const xEvent *e) { + HWEventQueueType oldtail, newtail; + char byte = 0; + + oldtail = darwinEventQueue.tail; + + // mieqEnqueue() collapses successive motion events into one event. + // This is difficult to do in a thread-safe way and rarely useful. + + newtail = oldtail + 1; + if (newtail == QUEUE_SIZE) newtail = 0; + /* Toss events which come in late */ + if (newtail == darwinEventQueue.head) return; + + darwinEventQueue.events[oldtail].event = *e; + + /* + * Make sure that event times don't go backwards - this + * is "unnecessary", but very useful + */ + if (e->u.keyButtonPointer.time < darwinEventQueue.lastEventTime && + darwinEventQueue.lastEventTime - e->u.keyButtonPointer.time < 10000) + { + darwinEventQueue.events[oldtail].event.u.keyButtonPointer.time = + darwinEventQueue.lastEventTime; + } + darwinEventQueue.events[oldtail].pScreen = darwinEventQueue.pEnqueueScreen; + + // Update the tail after the event is prepared + darwinEventQueue.tail = newtail; + + // Signal there is an event ready to handle + DarwinPokeEQ(); +} + + +/* + * DarwinEQPointerPost + * Post a pointer event. Used by the mipointer.c routines. + */ +void DarwinEQPointerPost(xEvent *e) { + (*darwinEventQueue.pPtr->processInputProc) + (e, (DeviceIntPtr)darwinEventQueue.pPtr, 1); +} + + +void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX) { + darwinEventQueue.pEnqueueScreen = pScreen; + if (fromDIX) + darwinEventQueue.pDequeueScreen = pScreen; +} + + +/* + * ProcessInputEvents + * Read and process events from the event queue until it is empty. + */ +void ProcessInputEvents(void) { + EventRec *e; + int x, y; + xEvent xe; + static int old_flags = 0; // last known modifier state + // button number and modifier mask of currently pressed fake button + input_check_flag=0; + + // ErrorF("calling mieqProcessInputEvents\n"); + mieqProcessInputEvents(); + + // Empty the signaling pipe + x = sizeof(xe); + while (x == sizeof(xe)) + x = read(darwinEventReadFD, &xe, sizeof(xe)); + + while (darwinEventQueue.head != darwinEventQueue.tail) + { + if (screenIsSaved == SCREEN_SAVER_ON) + SaveScreens (SCREEN_SAVER_OFF, ScreenSaverReset); + + e = &darwinEventQueue.events[darwinEventQueue.head]; + xe = e->event; + + // Shift from global screen coordinates to coordinates relative to + // the origin of the current screen. + xe.u.keyButtonPointer.rootX -= darwinMainScreenX + + dixScreenOrigins[miPointerCurrentScreen()->myNum].x; + xe.u.keyButtonPointer.rootY -= darwinMainScreenY + + dixScreenOrigins[miPointerCurrentScreen()->myNum].y; + + /* ErrorF("old rootX = (%d,%d) darwinMainScreen = (%d,%d) dixScreenOrigins[%d]=(%d,%d)\n", + xe.u.keyButtonPointer.rootX, xe.u.keyButtonPointer.rootY, + darwinMainScreenX, darwinMainScreenY, + miPointerCurrentScreen()->myNum, + dixScreenOrigins[miPointerCurrentScreen()->myNum].x, + dixScreenOrigins[miPointerCurrentScreen()->myNum].y); */ + + //Assumption - screen switching can only occur on motion events + + if (e->pScreen != darwinEventQueue.pDequeueScreen) + { + darwinEventQueue.pDequeueScreen = e->pScreen; + x = xe.u.keyButtonPointer.rootX; + y = xe.u.keyButtonPointer.rootY; + if (darwinEventQueue.head == QUEUE_SIZE - 1) + darwinEventQueue.head = 0; + else + ++darwinEventQueue.head; + NewCurrentScreen (darwinEventQueue.pDequeueScreen, x, y); + } + else + { + if (darwinEventQueue.head == QUEUE_SIZE - 1) + darwinEventQueue.head = 0; + else + ++darwinEventQueue.head; + switch (xe.u.u.type) { + case KeyPress: + case KeyRelease: + ErrorF("Unexpected Keyboard event in DarwinProcessInputEvents\n"); + break; + + case ButtonPress: + ErrorF("Unexpected ButtonPress event in DarwinProcessInputEvents\n"); + break; + + case ButtonRelease: + ErrorF("Unexpected ButtonRelease event in DarwinProcessInputEvents\n"); + break; + + case MotionNotify: + ErrorF("Unexpected ButtonRelease event in DarwinProcessInputEvents\n"); + break; + + case kXDarwinUpdateModifiers: + ErrorF("Unexpected ButtonRelease event in DarwinProcessInputEvents\n"); + break; + + case kXDarwinUpdateButtons: + ErrorF("Unexpected XDarwinScrollWheel event in DarwinProcessInputEvents\n"); + break; + + case kXDarwinScrollWheel: + ErrorF("Unexpected XDarwinScrollWheel event in DarwinProcessInputEvents\n"); + break; + + default: + // Check for mode specific event + DarwinModeProcessEvent(&xe); + } + } + } + + // miPointerUpdate(); +} + +/* Sends a null byte down darwinEventWriteFD, which will cause the + Dispatch() event loop to check out event queue */ +void DarwinPokeEQ(void) { + char nullbyte=0; + input_check_flag++; + // bushing: oh, i ... er ... christ. + write(darwinEventWriteFD, &nullbyte, 1); +} + +void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y) { + static int darwinFakeMouseButtonDown = 0; + static int darwinFakeMouseButtonMask = 0; + int i, num_events; + int valuators[2] = {pointer_x, pointer_y}; + if (ev_type == ButtonPress && darwinFakeButtons && ev_button == 1) { + // Mimic multi-button mouse with modifier-clicks + // If both sets of modifiers are pressed, + // button 2 is clicked. + if ((old_flags & darwinFakeMouse2Mask) == darwinFakeMouse2Mask) { + DarwinSimulateMouseClick(pointer_x, pointer_y, 2, darwinFakeMouse2Mask); + darwinFakeMouseButtonDown = 2; + darwinFakeMouseButtonMask = darwinFakeMouse2Mask; + } else if ((old_flags & darwinFakeMouse3Mask) == darwinFakeMouse3Mask) { + DarwinSimulateMouseClick(pointer_x, pointer_y, 3, darwinFakeMouse3Mask); + darwinFakeMouseButtonDown = 3; + darwinFakeMouseButtonMask = darwinFakeMouse3Mask; + } + } + if (ev_type == ButtonRelease && darwinFakeButtons && darwinFakeMouseButtonDown) { + // If last mousedown was a fake click, don't check for + // mouse modifiers here. The user may have released the + // modifiers before the mouse button. + ev_button = darwinFakeMouseButtonDown; + darwinFakeMouseButtonDown = 0; + // Bring modifiers back up to date + DarwinUpdateModifiers(KeyPress, darwinFakeMouseButtonMask & old_flags); + darwinFakeMouseButtonMask = 0; + } + + num_events = GetPointerEvents(darwinEvents, darwinPointer, ev_type, ev_button, + POINTER_ABSOLUTE, 0, 2, valuators); + + for(i=0; i 0.0f ? 4 : 5; + int valuators[2] = {pointer_x, pointer_y}; + + for (count = fabs(count); count > 0.0; count = count - 1.0f) { + int num_events = GetPointerEvents(darwinEvents, darwinPointer, ButtonPress, ev_button, + POINTER_ABSOLUTE, 0, 2, valuators); + for(i=0; i +// 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. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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. +// +//============================================================================= + + +/* +=========================================================================== + + An X keyCode must be in the range XkbMinLegalKeyCode (8) to + XkbMaxLegalKeyCode(255). + + The keyCodes we get from the kernel range from 0 to 127, so we need to + offset the range before passing the keyCode to X. + + An X KeySym is an extended ascii code that is device independent. + + The modifier map is accessed by the keyCode, but the normal map is + accessed by keyCode - MIN_KEYCODE. Sigh. + +=========================================================================== +*/ + +// Define this to get a diagnostic output to stderr which is helpful +// in determining how the X server is interpreting the Darwin keymap. +#undef DUMP_DARWIN_KEYMAP + +/* Define this to use Alt for Mode_switch. */ +#define ALT_IS_MODE_SWITCH 1 + +#include +#include +#include +#include +#include +#include +#include // For the NXSwap* +#include "darwin.h" +#include "darwinKeyboard.h" +#include +#define AltMask Mod1Mask +#define MetaMask Mod2Mask +#define FunctionMask Mod3Mask + +// FIXME: It would be nice to support some of the extra keys in XF86keysym.h, +// at least the volume controls that now ship on every Apple keyboard. + +#define UK(a) NoSymbol // unknown symbol + +static KeySym const next_to_x[256] = { + NoSymbol, NoSymbol, NoSymbol, XK_KP_Enter, + NoSymbol, NoSymbol, NoSymbol, NoSymbol, + XK_BackSpace, XK_Tab, XK_Linefeed, NoSymbol, + NoSymbol, XK_Return, NoSymbol, NoSymbol, + NoSymbol, NoSymbol, NoSymbol, NoSymbol, + NoSymbol, NoSymbol, NoSymbol, NoSymbol, + NoSymbol, NoSymbol, NoSymbol, XK_Escape, + NoSymbol, NoSymbol, NoSymbol, NoSymbol, + XK_space, XK_exclam, XK_quotedbl, XK_numbersign, + XK_dollar, XK_percent, XK_ampersand, XK_apostrophe, + XK_parenleft, XK_parenright, XK_asterisk, XK_plus, + XK_comma, XK_minus, XK_period, XK_slash, + XK_0, XK_1, XK_2, XK_3, + XK_4, XK_5, XK_6, XK_7, + XK_8, XK_9, XK_colon, XK_semicolon, + XK_less, XK_equal, XK_greater, XK_question, + XK_at, XK_A, XK_B, XK_C, + XK_D, XK_E, XK_F, XK_G, + XK_H, XK_I, XK_J, XK_K, + XK_L, XK_M, XK_N, XK_O, + XK_P, XK_Q, XK_R, XK_S, + XK_T, XK_U, XK_V, XK_W, + XK_X, XK_Y, XK_Z, XK_bracketleft, + XK_backslash, XK_bracketright,XK_asciicircum, XK_underscore, + XK_grave, XK_a, XK_b, XK_c, + XK_d, XK_e, XK_f, XK_g, + XK_h, XK_i, XK_j, XK_k, + XK_l, XK_m, XK_n, XK_o, + XK_p, XK_q, XK_r, XK_s, + XK_t, XK_u, XK_v, XK_w, + XK_x, XK_y, XK_z, XK_braceleft, + XK_bar, XK_braceright, XK_asciitilde, XK_BackSpace, +// 128 + NoSymbol, XK_Agrave, XK_Aacute, XK_Acircumflex, + XK_Atilde, XK_Adiaeresis, XK_Aring, XK_Ccedilla, + XK_Egrave, XK_Eacute, XK_Ecircumflex, XK_Ediaeresis, + XK_Igrave, XK_Iacute, XK_Icircumflex, XK_Idiaeresis, +// 144 + XK_ETH, XK_Ntilde, XK_Ograve, XK_Oacute, + XK_Ocircumflex, XK_Otilde, XK_Odiaeresis, XK_Ugrave, + XK_Uacute, XK_Ucircumflex, XK_Udiaeresis, XK_Yacute, + XK_THORN, XK_mu, XK_multiply, XK_division, +// 160 + XK_copyright, XK_exclamdown, XK_cent, XK_sterling, + UK(fraction), XK_yen, UK(fhook), XK_section, + XK_currency, XK_rightsinglequotemark, + XK_leftdoublequotemark, + XK_guillemotleft, + XK_leftanglebracket, + XK_rightanglebracket, + UK(filigature), UK(flligature), +// 176 + XK_registered, XK_endash, XK_dagger, XK_doubledagger, + XK_periodcentered,XK_brokenbar, XK_paragraph, UK(bullet), + XK_singlelowquotemark, + XK_doublelowquotemark, + XK_rightdoublequotemark, + XK_guillemotright, + XK_ellipsis, UK(permille), XK_notsign, XK_questiondown, +// 192 + XK_onesuperior, XK_dead_grave, XK_dead_acute, XK_dead_circumflex, + XK_dead_tilde, XK_dead_macron, XK_dead_breve, XK_dead_abovedot, + XK_dead_diaeresis, + XK_twosuperior, XK_dead_abovering, + XK_dead_cedilla, + XK_threesuperior, + XK_dead_doubleacute, + XK_dead_ogonek, XK_dead_caron, +// 208 + XK_emdash, XK_plusminus, XK_onequarter, XK_onehalf, + XK_threequarters, + XK_agrave, XK_aacute, XK_acircumflex, + XK_atilde, XK_adiaeresis, XK_aring, XK_ccedilla, + XK_egrave, XK_eacute, XK_ecircumflex, XK_ediaeresis, +// 224 + XK_igrave, XK_AE, XK_iacute, XK_ordfeminine, + XK_icircumflex, XK_idiaeresis, XK_eth, XK_ntilde, + XK_Lstroke, XK_Ooblique, XK_OE, XK_masculine, + XK_ograve, XK_oacute, XK_ocircumflex, XK_otilde, +// 240 + XK_odiaeresis, XK_ae, XK_ugrave, XK_uacute, + XK_ucircumflex, XK_idotless, XK_udiaeresis, XK_ygrave, + XK_lstroke, XK_ooblique, XK_oe, XK_ssharp, + XK_thorn, XK_ydiaeresis, NoSymbol, NoSymbol, + }; + +#define MIN_SYMBOL 0xAC +static KeySym const symbol_to_x[] = { + XK_Left, XK_Up, XK_Right, XK_Down + }; +int const NUM_SYMBOL = sizeof(symbol_to_x) / sizeof(symbol_to_x[0]); + +#define MIN_FUNCKEY 0x20 +static KeySym const funckey_to_x[] = { + XK_F1, XK_F2, XK_F3, XK_F4, + XK_F5, XK_F6, XK_F7, XK_F8, + XK_F9, XK_F10, XK_F11, XK_F12, + XK_Insert, XK_Delete, XK_Home, XK_End, + XK_Page_Up, XK_Page_Down, XK_F13, XK_F14, + XK_F15 + }; +int const NUM_FUNCKEY = sizeof(funckey_to_x) / sizeof(funckey_to_x[0]); + +typedef struct { + KeySym normalSym; + KeySym keypadSym; +} darwinKeyPad_t; + +static darwinKeyPad_t const normal_to_keypad[] = { + { XK_0, XK_KP_0 }, + { XK_1, XK_KP_1 }, + { XK_2, XK_KP_2 }, + { XK_3, XK_KP_3 }, + { XK_4, XK_KP_4 }, + { XK_5, XK_KP_5 }, + { XK_6, XK_KP_6 }, + { XK_7, XK_KP_7 }, + { XK_8, XK_KP_8 }, + { XK_9, XK_KP_9 }, + { XK_equal, XK_KP_Equal }, + { XK_asterisk, XK_KP_Multiply }, + { XK_plus, XK_KP_Add }, + { XK_comma, XK_KP_Separator }, + { XK_minus, XK_KP_Subtract }, + { XK_period, XK_KP_Decimal }, + { XK_slash, XK_KP_Divide } +}; +int const NUM_KEYPAD = sizeof(normal_to_keypad) / sizeof(normal_to_keypad[0]); + +static void DarwinChangeKeyboardControl( DeviceIntPtr device, KeybdCtrl *ctrl ) +{ + // keyclick, bell volume / pitch, autorepead, LED's +} + +static darwinKeyboardInfo keyInfo; +static FILE *fref = NULL; +static char *inBuffer = NULL; + +//----------------------------------------------------------------------------- +// Data Stream Object +// Can be configured to treat embedded "numbers" as being composed of +// either 1, 2, or 4 bytes, apiece. +//----------------------------------------------------------------------------- +typedef struct _DataStream +{ + unsigned char const *data; + unsigned char const *data_end; + short number_size; // Size in bytes of a "number" in the stream. +} DataStream; + +static DataStream* new_data_stream( unsigned char const* data, int size ) +{ + DataStream* s = (DataStream*)xalloc( sizeof(DataStream) ); + s->data = data; + s->data_end = data + size; + s->number_size = 1; // Default to byte-sized numbers. + return s; +} + +static void destroy_data_stream( DataStream* s ) +{ + xfree(s); +} + +static unsigned char get_byte( DataStream* s ) +{ + assert(s->data + 1 <= s->data_end); + return *s->data++; +} + +static short get_word( DataStream* s ) +{ + short hi, lo; + assert(s->data + 2 <= s->data_end); + hi = *s->data++; + lo = *s->data++; + return ((hi << 8) | lo); +} + +static int get_dword( DataStream* s ) +{ + int b1, b2, b3, b4; + assert(s->data + 4 <= s->data_end); + b4 = *s->data++; + b3 = *s->data++; + b2 = *s->data++; + b1 = *s->data++; + return ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1); +} + +static int get_number( DataStream* s ) +{ + switch (s->number_size) { + case 4: return get_dword(s); + case 2: return get_word(s); + default: return get_byte(s); + } +} + +//----------------------------------------------------------------------------- +// Utility functions to help parse Darwin keymap +//----------------------------------------------------------------------------- + +/* + * bits_set + * Calculate number of bits set in the modifier mask. + */ +static short bits_set( short mask ) +{ + short n = 0; + + for ( ; mask != 0; mask >>= 1) + if ((mask & 0x01) != 0) + n++; + return n; +} + +/* + * parse_next_char_code + * Read the next character code from the Darwin keymapping + * and write it to the X keymap. + */ +static void parse_next_char_code( + DataStream *s, + KeySym *k ) +{ + const short charSet = get_number(s); + const short charCode = get_number(s); + + if (charSet == 0) { // ascii character + if (charCode >= 0 && charCode < 256) + *k = next_to_x[charCode]; + } else if (charSet == 0x01) { // symbol character + if (charCode >= MIN_SYMBOL && + charCode <= MIN_SYMBOL + NUM_SYMBOL) + *k = symbol_to_x[charCode - MIN_SYMBOL]; + } else if (charSet == 0xFE) { // function key + if (charCode >= MIN_FUNCKEY && + charCode <= MIN_FUNCKEY + NUM_FUNCKEY) + *k = funckey_to_x[charCode - MIN_FUNCKEY]; + } +} + + +/* + * DarwinReadKeymapFile + * Read the appropriate keymapping from a keymapping file. + */ +Bool DarwinReadKeymapFile( + NXKeyMapping *keyMap) +{ + struct stat st; + NXEventSystemDevice info[20]; + int interface = 0, handler_id = 0; + int map_interface, map_handler_id, map_size = 0; + unsigned int i, size; + int *bufferEnd; + union km_tag { + int *intP; + char *charP; + } km; + + fref = fopen( darwinKeymapFile, "rb" ); + if (fref == NULL) { + ErrorF("Unable to open keymapping file '%s' (errno %d).\n", + darwinKeymapFile, errno); + return FALSE; + } + if (fstat(fileno(fref), &st) == -1) { + ErrorF("Could not stat keymapping file '%s' (errno %d).\n", + darwinKeymapFile, errno); + return FALSE; + } + + // check to make sure we don't crash later + if (st.st_size <= 16*sizeof(int)) { + ErrorF("Keymapping file '%s' is invalid (too small).\n", + darwinKeymapFile); + return FALSE; + } + + inBuffer = (char*) xalloc( st.st_size ); + bufferEnd = (int *) (inBuffer + st.st_size); + if (fread(inBuffer, st.st_size, 1, fref) != 1) { + ErrorF("Could not read %qd bytes from keymapping file '%s' (errno %d).\n", + st.st_size, darwinKeymapFile, errno); + return FALSE; + } + + if (strncmp( inBuffer, "KYM1", 4 ) == 0) { + // Magic number OK. + } else if (strncmp( inBuffer, "KYMP", 4 ) == 0) { + ErrorF("Keymapping file '%s' is intended for use with the original NeXT keyboards and cannot be used by XDarwin.\n", darwinKeymapFile); + return FALSE; + } else { + ErrorF("Keymapping file '%s' has a bad magic number and cannot be used by XDarwin.\n", darwinKeymapFile); + return FALSE; + } + + // find the keyboard interface and handler id + size = sizeof( info ) / sizeof( int ); + if (!NXEventSystemInfo( darwinParamConnect, NX_EVS_DEVICE_INFO, + (NXEventSystemInfoType) info, &size )) { + ErrorF("Error reading event status driver info.\n"); + return FALSE; + } + + size = size * sizeof( int ) / sizeof( info[0] ); + for( i = 0; i < size; i++) { + if (info[i].dev_type == NX_EVS_DEVICE_TYPE_KEYBOARD) { + Bool hasInterface = FALSE; + Bool hasMatch = FALSE; + + interface = info[i].interface; + handler_id = info[i].id; + + // Find an appropriate keymapping: + // The first time we try to match both interface and handler_id. + // If we can't match both, we take the first match for interface. + + do { + km.charP = inBuffer; + km.intP++; + while (km.intP+3 < bufferEnd) { + map_interface = NXSwapBigIntToHost(*(km.intP++)); + map_handler_id = NXSwapBigIntToHost(*(km.intP++)); + map_size = NXSwapBigIntToHost(*(km.intP++)); + if (map_interface == interface) { + if (map_handler_id == handler_id || hasInterface) { + hasMatch = TRUE; + break; + } else { + hasInterface = TRUE; + } + } + km.charP += map_size; + } + } while (hasInterface && !hasMatch); + + if (hasMatch) { + // fill in NXKeyMapping structure + keyMap->size = map_size; + keyMap->mapping = (char*) xalloc(map_size); + memcpy(keyMap->mapping, km.charP, map_size); + return TRUE; + } + } // if dev_id == keyboard device + } // foreach info struct + + // The keymapping file didn't match any of the info structs + // returned by NXEventSystemInfo. + ErrorF("Keymapping file '%s' did not contain appropriate keyboard interface.\n", darwinKeymapFile); + return FALSE; +} + + +/* + * DarwinParseNXKeyMapping + */ +Bool DarwinParseNXKeyMapping( + darwinKeyboardInfo *info) +{ + KeySym *k; + int i; + short numMods, numKeys, numPadKeys = 0; + Bool haveKeymap = FALSE; + NXKeyMapping keyMap; + DataStream *keyMapStream; + unsigned char const *numPadStart = 0; + + if (darwinKeymapFile) { + haveKeymap = DarwinReadKeymapFile(&keyMap); + if (fref) + fclose(fref); + if (inBuffer) + xfree(inBuffer); + if (!haveKeymap) { + ErrorF("Reverting to kernel keymapping.\n"); + } + } + + if (!haveKeymap) { + // get the Darwin keyboard map + keyMap.size = NXKeyMappingLength( darwinParamConnect ); + keyMap.mapping = (char*) xalloc( keyMap.size ); + if (!NXGetKeyMapping( darwinParamConnect, &keyMap )) { + return FALSE; + } + } + + keyMapStream = new_data_stream( (unsigned char const*)keyMap.mapping, + keyMap.size ); + + // check the type of map + if (get_word(keyMapStream)) { + keyMapStream->number_size = 2; + ErrorF("Current 16-bit keymapping may not be interpreted correctly.\n"); + } + + // Insert X modifier KeySyms into the keyboard map. + numMods = get_number(keyMapStream); + while (numMods-- > 0) { + int left = 1; // first keycode is left + short const charCode = get_number(keyMapStream); + short numKeyCodes = get_number(keyMapStream); + + // This is just a marker, not a real modifier. + // Store numeric keypad keys for later. + if (charCode == NX_MODIFIERKEY_NUMERICPAD) { + numPadStart = keyMapStream->data; + numPadKeys = numKeyCodes; + } + + while (numKeyCodes-- > 0) { + const short keyCode = get_number(keyMapStream); + if (charCode != NX_MODIFIERKEY_NUMERICPAD) { + switch (charCode) { + case NX_MODIFIERKEY_ALPHALOCK: + info->keyMap[keyCode * GLYPHS_PER_KEY] = XK_Caps_Lock; + break; + case NX_MODIFIERKEY_SHIFT: + info->keyMap[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Shift_L : XK_Shift_R); + break; + case NX_MODIFIERKEY_CONTROL: + info->keyMap[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Control_L : XK_Control_R); + break; + case NX_MODIFIERKEY_ALTERNATE: + info->keyMap[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Mode_switch : XK_Alt_R); + break; + case NX_MODIFIERKEY_COMMAND: + info->keyMap[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Meta_L : XK_Meta_R); + break; + case NX_MODIFIERKEY_SECONDARYFN: + info->keyMap[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Control_L : XK_Control_R); + break; + case NX_MODIFIERKEY_HELP: + // Help is not an X11 modifier; treat as normal key + info->keyMap[keyCode * GLYPHS_PER_KEY] = XK_Help; + break; + } + } + left = 0; + } + } + + // Convert the Darwin keyboard mapping to an X keyboard map. + // A key can have a different character code for each combination of + // modifiers. We currently ignore all modifier combinations except + // those with Shift, AlphaLock, and Alt. + numKeys = get_number(keyMapStream); + for (i = 0, k = info->keyMap; i < numKeys; i++, k += GLYPHS_PER_KEY) { + short const charGenMask = get_number(keyMapStream); + if (charGenMask != 0xFF) { // is key bound? + short numKeyCodes = 1 << bits_set(charGenMask); + + // Record unmodified case + parse_next_char_code( keyMapStream, k ); + numKeyCodes--; + + // If AlphaLock and Shift modifiers produce different codes, + // we record the Shift case since X handles AlphaLock. + if (charGenMask & 0x01) { // AlphaLock + parse_next_char_code( keyMapStream, k+1 ); + numKeyCodes--; + } + + if (charGenMask & 0x02) { // Shift + parse_next_char_code( keyMapStream, k+1 ); + numKeyCodes--; + + if (charGenMask & 0x01) { // Shift-AlphaLock + get_number(keyMapStream); get_number(keyMapStream); + numKeyCodes--; + } + } + + // Skip the Control cases + if (charGenMask & 0x04) { // Control + get_number(keyMapStream); get_number(keyMapStream); + numKeyCodes--; + + if (charGenMask & 0x01) { // Control-AlphaLock + get_number(keyMapStream); get_number(keyMapStream); + numKeyCodes--; + } + + if (charGenMask & 0x02) { // Control-Shift + get_number(keyMapStream); get_number(keyMapStream); + numKeyCodes--; + + if (charGenMask & 0x01) { // Shift-Control-AlphaLock + get_number(keyMapStream); get_number(keyMapStream); + numKeyCodes--; + } + } + } + + // Process Alt cases + if (charGenMask & 0x08) { // Alt + parse_next_char_code( keyMapStream, k+2 ); + numKeyCodes--; + + if (charGenMask & 0x01) { // Alt-AlphaLock + parse_next_char_code( keyMapStream, k+3 ); + numKeyCodes--; + } + + if (charGenMask & 0x02) { // Alt-Shift + parse_next_char_code( keyMapStream, k+3 ); + numKeyCodes--; + + if (charGenMask & 0x01) { // Alt-Shift-AlphaLock + get_number(keyMapStream); get_number(keyMapStream); + numKeyCodes--; + } + } + } + + while (numKeyCodes-- > 0) { + get_number(keyMapStream); get_number(keyMapStream); + } + + if (k[3] == k[2]) k[3] = NoSymbol; + if (k[2] == k[1]) k[2] = NoSymbol; + if (k[1] == k[0]) k[1] = NoSymbol; + if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol; + } + } + + // Now we have to go back through the list of keycodes that are on the + // numeric keypad and update the X keymap. + keyMapStream->data = numPadStart; + while(numPadKeys-- > 0) { + const short keyCode = get_number(keyMapStream); + k = &info->keyMap[keyCode * GLYPHS_PER_KEY]; + for (i = 0; i < NUM_KEYPAD; i++) { + if (*k == normal_to_keypad[i].normalSym) { + k[0] = normal_to_keypad[i].keypadSym; + break; + } + } + } + + // free Darwin keyboard map + destroy_data_stream( keyMapStream ); + xfree( keyMap.mapping ); + + return TRUE; +} + + +/* + * DarwinBuildModifierMaps + * Use the keyMap field of keyboard info structure to populate + * the modMap and modifierKeycodes fields. + */ +static void +DarwinBuildModifierMaps( + darwinKeyboardInfo *info) +{ + int i; + KeySym *k; + + memset(info->modMap, NoSymbol, sizeof(info->modMap)); + memset(info->modifierKeycodes, 0, sizeof(info->modifierKeycodes)); + + for (i = 0; i < NUM_KEYCODES; i++) + { + k = info->keyMap + i * GLYPHS_PER_KEY; + + switch (k[0]) { + case XK_Shift_L: + info->modifierKeycodes[NX_MODIFIERKEY_SHIFT][0] = i; + info->modMap[MIN_KEYCODE + i] = ShiftMask; + break; + + case XK_Shift_R: +#ifdef NX_MODIFIERKEY_RSHIFT + info->modifierKeycodes[NX_MODIFIERKEY_RSHIFT][0] = i; +#else + info->modifierKeycodes[NX_MODIFIERKEY_SHIFT][0] = i; +#endif + info->modMap[MIN_KEYCODE + i] = ShiftMask; + break; + + case XK_Control_L: + info->modifierKeycodes[NX_MODIFIERKEY_CONTROL][0] = i; + info->modMap[MIN_KEYCODE + i] = ControlMask; + break; + + case XK_Control_R: +#ifdef NX_MODIFIERKEY_RCONTROL + info->modifierKeycodes[NX_MODIFIERKEY_RCONTROL][0] = i; +#else + info->modifierKeycodes[NX_MODIFIERKEY_CONTROL][0] = i; +#endif + info->modMap[MIN_KEYCODE + i] = ControlMask; + break; + + case XK_Caps_Lock: + info->modifierKeycodes[NX_MODIFIERKEY_ALPHALOCK][0] = i; + info->modMap[MIN_KEYCODE + i] = LockMask; + break; + + case XK_Alt_L: + info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i; + info->modMap[MIN_KEYCODE + i] = Mod1Mask; + break; + + case XK_Alt_R: +#ifdef NX_MODIFIERKEY_RALTERNATE + info->modifierKeycodes[NX_MODIFIERKEY_RALTERNATE][0] = i; +#else + info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i; +#endif + info->modMap[MIN_KEYCODE + i] = Mod1Mask; + break; + + case XK_Mode_switch: + info->modMap[MIN_KEYCODE + i] = Mod1Mask; + break; + + case XK_Meta_L: + info->modifierKeycodes[NX_MODIFIERKEY_COMMAND][0] = i; + info->modMap[MIN_KEYCODE + i] = Mod2Mask; + break; + + case XK_Meta_R: +#ifdef NX_MODIFIERKEY_RCOMMAND + info->modifierKeycodes[NX_MODIFIERKEY_RCOMMAND][0] = i; +#else + info->modifierKeycodes[NX_MODIFIERKEY_COMMAND][0] = i; +#endif + info->modMap[MIN_KEYCODE + i] = Mod2Mask; + break; + + case XK_Num_Lock: + info->modMap[MIN_KEYCODE + i] = Mod3Mask; + break; + } + + if (darwinSwapAltMeta) + { + switch (k[0]) + { + case XK_Alt_L: + k[0] = XK_Meta_L; + break; + case XK_Alt_R: + k[0] = XK_Meta_R; + break; + case XK_Meta_L: + k[0] = XK_Alt_L; + break; + case XK_Meta_R: + k[0] = XK_Alt_R; + break; + } + } + +#if ALT_IS_MODE_SWITCH + if (k[0] == XK_Alt_L) + k[0] = XK_Mode_switch; +#endif + } +} + + +/* + * DarwinLoadKeyboardMapping + * Load the keyboard map from a file or system and convert + * it to an equivalent X keyboard map and modifier map. + */ +static void +DarwinLoadKeyboardMapping(KeySymsRec *keySyms) +{ + memset(keyInfo.keyMap, 0, sizeof(keyInfo.keyMap)); + + if (!DarwinParseNXKeyMapping(&keyInfo)) { + if (!DarwinModeReadSystemKeymap(&keyInfo)) { + FatalError("Could not build a valid keymap."); + } + } + + DarwinBuildModifierMaps(&keyInfo); + +#ifdef DUMP_DARWIN_KEYMAP + ErrorF("Darwin -> X converted keyboard map\n"); + for (i = 0, k = info->keyMap; i < NX_NUMKEYCODES; + i++, k += GLYPHS_PER_KEY) + { + int j; + ErrorF("0x%02x:", i); + for (j = 0; j < GLYPHS_PER_KEY; j++) { + if (k[j] == NoSymbol) { + ErrorF("\tNoSym"); + } else { + ErrorF("\t0x%x", k[j]); + } + } + ErrorF("\n"); + } +#endif + + keySyms->map = keyInfo.keyMap; + keySyms->mapWidth = GLYPHS_PER_KEY; + keySyms->minKeyCode = MIN_KEYCODE; + keySyms->maxKeyCode = MAX_KEYCODE; +} + + +/* + * DarwinKeyboardInit + * Get the Darwin keyboard map and compute an equivalent + * X keyboard map and modifier map. Set the new keyboard + * device structure. + */ +void DarwinKeyboardInit( + DeviceIntPtr pDev ) +{ + KeySymsRec keySyms; + + // Open a shared connection to the HID System. + // Note that the Event Status Driver is really just a wrapper + // for a kIOHIDParamConnectType connection. + assert( darwinParamConnect = NXOpenEventStatus() ); + + DarwinLoadKeyboardMapping(&keySyms); + + /* Initialize the seed, so we don't reload the keymap unnecessarily + (and possibly overwrite xinitrc changes) */ + DarwinModeSystemKeymapSeed(); + + assert( InitKeyboardDeviceStruct( (DevicePtr)pDev, &keySyms, + keyInfo.modMap, DarwinModeBell, + DarwinChangeKeyboardControl )); +} + + +/* Borrowed from dix/devices.c */ +static Bool +InitModMap(register KeyClassPtr keyc) +{ + int i, j; + CARD8 keysPerModifier[8]; + CARD8 mask; + + if (keyc->modifierKeyMap != NULL) + xfree (keyc->modifierKeyMap); + + keyc->maxKeysPerModifier = 0; + for (i = 0; i < 8; i++) + keysPerModifier[i] = 0; + for (i = 8; i < MAP_LENGTH; i++) + { + for (j = 0, mask = 1; j < 8; j++, mask <<= 1) + { + if (mask & keyc->modifierMap[i]) + { + if (++keysPerModifier[j] > keyc->maxKeysPerModifier) + keyc->maxKeysPerModifier = keysPerModifier[j]; + } + } + } + keyc->modifierKeyMap = (KeyCode *)xalloc(8*keyc->maxKeysPerModifier); + if (!keyc->modifierKeyMap && keyc->maxKeysPerModifier) + return (FALSE); + bzero((char *)keyc->modifierKeyMap, 8*(int)keyc->maxKeysPerModifier); + for (i = 0; i < 8; i++) + keysPerModifier[i] = 0; + for (i = 8; i < MAP_LENGTH; i++) + { + for (j = 0, mask = 1; j < 8; j++, mask <<= 1) + { + if (mask & keyc->modifierMap[i]) + { + keyc->modifierKeyMap[(j*keyc->maxKeysPerModifier) + + keysPerModifier[j]] = i; + keysPerModifier[j]++; + } + } + } + return TRUE; +} + + +void +DarwinKeyboardReload(DeviceIntPtr pDev) +{ + KeySymsRec keySyms; + + DarwinLoadKeyboardMapping(&keySyms); + + if (SetKeySymsMap(&pDev->key->curKeySyms, &keySyms)) { + /* now try to update modifiers. */ + + memmove(pDev->key->modifierMap, keyInfo.modMap, MAP_LENGTH); + InitModMap(pDev->key); + } + + SendMappingNotify(MappingKeyboard, MIN_KEYCODE, NUM_KEYCODES, 0); + SendMappingNotify(MappingModifier, 0, 0, 0); +} + + +//----------------------------------------------------------------------------- +// Modifier translation functions +// +// There are three different ways to specify a Mac modifier key: +// keycode - specifies hardware key, read from keymapping +// key - NX_MODIFIERKEY_*, really an index +// mask - NX_*MASK, mask for modifier flags in event record +// Left and right side have different keycodes but the same key and mask. +//----------------------------------------------------------------------------- + +/* + * DarwinModifierNXKeyToNXKeycode + * Return the keycode for an NX_MODIFIERKEY_* modifier. + * side = 0 for left or 1 for right. + * Returns 0 if key+side is not a known modifier. + */ +int DarwinModifierNXKeyToNXKeycode(int key, int side) +{ + return keyInfo.modifierKeycodes[key][side]; +} + +/* + * DarwinModifierNXKeycodeToNXKey + * Returns -1 if keycode+side is not a modifier key + * outSide may be NULL, else it gets 0 for left and 1 for right. + */ +int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide) +{ + int key, side; + + keycode += MIN_KEYCODE; + // search modifierKeycodes for this keycode+side + for (key = 0; key < NX_NUMMODIFIERS; key++) { + for (side = 0; side <= 1; side++) { + if (keyInfo.modifierKeycodes[key][side] == keycode) break; + } + } + if (key == NX_NUMMODIFIERS) return -1; + if (outSide) *outSide = side; + return key; +} + +/* + * DarwinModifierNXMaskToNXKey + * Returns -1 if mask is not a known modifier mask. + */ +int DarwinModifierNXMaskToNXKey(int mask) +{ + switch (mask) { + case NX_ALPHASHIFTMASK: return NX_MODIFIERKEY_ALPHALOCK; + case NX_SHIFTMASK: return NX_MODIFIERKEY_SHIFT; +#ifdef NX_DEVICELSHIFTKEYMASK + case NX_DEVICELSHIFTKEYMASK: return NX_MODIFIERKEY_SHIFT; + case NX_DEVICERSHIFTKEYMASK: return NX_MODIFIERKEY_RSHIFT; +#endif + case NX_CONTROLMASK: return NX_MODIFIERKEY_CONTROL; +#ifdef NX_DEVICELCTLKEYMASK + case NX_DEVICELCTLKEYMASK: return NX_MODIFIERKEY_CONTROL; + case NX_DEVICERCTLKEYMASK: return NX_MODIFIERKEY_RCONTROL; +#endif + case NX_ALTERNATEMASK: return NX_MODIFIERKEY_ALTERNATE; +#ifdef NX_DEVICELALTKEYMASK + case NX_DEVICELALTKEYMASK: return NX_MODIFIERKEY_ALTERNATE; + case NX_DEVICERALTKEYMASK: return NX_MODIFIERKEY_RALTERNATE; +#endif + case NX_COMMANDMASK: return NX_MODIFIERKEY_COMMAND; +#ifdef NX_DEVICELCMDKEYMASK + case NX_DEVICELCMDKEYMASK: return NX_MODIFIERKEY_COMMAND; + case NX_DEVICERCMDKEYMASK: return NX_MODIFIERKEY_RCOMMAND; +#endif + case NX_NUMERICPADMASK: return NX_MODIFIERKEY_NUMERICPAD; + case NX_HELPMASK: return NX_MODIFIERKEY_HELP; + case NX_SECONDARYFNMASK: return NX_MODIFIERKEY_SECONDARYFN; + } + return -1; +} + +/* + * DarwinModifierNXKeyToNXMask + * Returns 0 if key is not a known modifier key. + */ +int DarwinModifierNXKeyToNXMask(int key) +{ + switch (key) { + case NX_MODIFIERKEY_ALPHALOCK: return NX_ALPHASHIFTMASK; + case NX_MODIFIERKEY_SHIFT: return NX_SHIFTMASK; +#ifdef NX_MODIFIERKEY_RSHIFT + case NX_MODIFIERKEY_RSHIFT: return NX_SHIFTMASK; +#endif + case NX_MODIFIERKEY_CONTROL: return NX_CONTROLMASK; +#ifdef NX_MODIFIERKEY_RCONTROL + case NX_MODIFIERKEY_RCONTROL: return NX_CONTROLMASK; +#endif + case NX_MODIFIERKEY_ALTERNATE: return NX_ALTERNATEMASK; +#ifdef NX_MODIFIERKEY_RALTERNATE + case NX_MODIFIERKEY_RALTERNATE: return NX_ALTERNATEMASK; +#endif + case NX_MODIFIERKEY_COMMAND: return NX_COMMANDMASK; +#ifdef NX_MODIFIERKEY_RCOMMAND + case NX_MODIFIERKEY_RCOMMAND: return NX_COMMANDMASK; +#endif + case NX_MODIFIERKEY_NUMERICPAD: return NX_NUMERICPADMASK; + case NX_MODIFIERKEY_HELP: return NX_HELPMASK; + case NX_MODIFIERKEY_SECONDARYFN: return NX_SECONDARYFNMASK; + } + return 0; +} + +/* + * DarwinModifierStringToNXKey + * Returns -1 if string is not a known modifier. + */ +int DarwinModifierStringToNXKey(const char *str) +{ + if (!strcasecmp(str, "shift")) return NX_MODIFIERKEY_SHIFT; + else if (!strcasecmp(str, "control")) return NX_MODIFIERKEY_CONTROL; + else if (!strcasecmp(str, "option")) return NX_MODIFIERKEY_ALTERNATE; + else if (!strcasecmp(str, "command")) return NX_MODIFIERKEY_COMMAND; + else if (!strcasecmp(str, "fn")) return NX_MODIFIERKEY_SECONDARYFN; + else return -1; +} + +/* + * LegalModifier + * This allows the ddx layer to prevent some keys from being remapped + * as modifier keys. + */ +Bool LegalModifier(unsigned int key, DeviceIntPtr pDev) +{ + return 1; +} diff --git a/xorg-server-1.4/hw/darwin/darwinKeyboard.h b/xorg-server-1.4/hw/darwin/darwinKeyboard.h new file mode 100644 index 0000000..368aee9 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/darwinKeyboard.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2003-2004 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#ifndef DARWIN_KEYBOARD_H +#define DARWIN_KEYBOARD_H 1 + +#define XK_TECHNICAL // needed to get XK_Escape +#define XK_PUBLISHING +#include "X11/keysym.h" +#include "inputstr.h" + +// Each key can generate 4 glyphs. They are, in order: +// unshifted, shifted, modeswitch unshifted, modeswitch shifted +#define GLYPHS_PER_KEY 4 +#define NUM_KEYCODES 248 // NX_NUMKEYCODES might be better +#define MAX_KEYCODE NUM_KEYCODES + MIN_KEYCODE - 1 + +typedef struct darwinKeyboardInfo_struct { + CARD8 modMap[MAP_LENGTH]; + KeySym keyMap[MAP_LENGTH * GLYPHS_PER_KEY]; + unsigned char modifierKeycodes[32][2]; +} darwinKeyboardInfo; + +void DarwinKeyboardReload(DeviceIntPtr pDev); +unsigned int DarwinModeSystemKeymapSeed(void); +Bool DarwinModeReadSystemKeymap(darwinKeyboardInfo *info); + +#endif /* DARWIN_KEYBOARD_H */ diff --git a/xorg-server-1.4/hw/darwin/darwinXinput.c b/xorg-server-1.4/hw/darwin/darwinXinput.c new file mode 100644 index 0000000..260d72a --- /dev/null +++ b/xorg-server-1.4/hw/darwin/darwinXinput.c @@ -0,0 +1,308 @@ + +/* + * X server support of the XINPUT extension for Darwin + * + * This is currently a copy of mi/stubs.c, but eventually this + * should include more complete XINPUT support. + */ + +/************************************************************ + +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. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + 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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-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. + +********************************************************/ + +#define NEED_EVENTS +#include +#include +#include "inputstr.h" +#include +#include +#include "XIstubs.h" + +/*********************************************************************** + * + * Caller: ProcXChangeKeyboardDevice + * + * This procedure does the implementation-dependent portion of the work + * needed to change the keyboard device. + * + * The X keyboard device has a FocusRec. If the device that has been + * made into the new X keyboard did not have a FocusRec, + * ProcXChangeKeyboardDevice will allocate one for it. + * + * If you do not want clients to be able to focus the old X keyboard + * device, call DeleteFocusClassDeviceStruct to free the FocusRec. + * + * If you support input devices with keys that you do not want to be + * used as the X keyboard, you need to check for them here and return + * a BadDevice error. + * + * The default implementation is to do nothing (assume you do want + * clients to be able to focus the old X keyboard). The commented-out + * sample code shows what you might do if you don't want the default. + * + */ + +int +ChangeKeyboardDevice (old_dev, new_dev) + DeviceIntPtr old_dev; + DeviceIntPtr new_dev; + { + /*********************************************************************** + DeleteFocusClassDeviceStruct(old_dev); * defined in xchgptr.c * + **********************************************************************/ + return BadMatch; + } + + +/*********************************************************************** + * + * Caller: ProcXChangePointerDevice + * + * This procedure does the implementation-dependent portion of the work + * needed to change the pointer device. + * + * The X pointer device does not have a FocusRec. If the device that + * has been made into the new X pointer had a FocusRec, + * ProcXChangePointerDevice will free it. + * + * If you want clients to be able to focus the old pointer device that + * has now become accessible through the input extension, you need to + * add a FocusRec to it here. + * + * The XChangePointerDevice protocol request also allows the client + * to choose which axes of the new pointer device are used to move + * the X cursor in the X- and Y- directions. If the axes are different + * than the default ones, you need to keep track of that here. + * + * If you support input devices with valuators that you do not want to be + * used as the X pointer, you need to check for them here and return a + * BadDevice error. + * + * The default implementation is to do nothing (assume you don't want + * clients to be able to focus the old X pointer). The commented-out + * sample code shows what you might do if you don't want the default. + * + */ + +int +ChangePointerDevice ( + DeviceIntPtr old_dev, + DeviceIntPtr new_dev, + unsigned char x, + unsigned char y) + { + /*********************************************************************** + InitFocusClassDeviceStruct(old_dev); * allow focusing old ptr* + + x_axis = x; * keep track of new x-axis* + y_axis = y; * keep track of new y-axis* + if (x_axis != 0 || y_axis != 1) + axes_changed = TRUE; * remember axes have changed* + else + axes_changed = FALSE; + *************************************************************************/ + return BadMatch; + } + +/*********************************************************************** + * + * Caller: ProcXCloseDevice + * + * Take care of implementation-dependent details of closing a device. + * Some implementations may actually close the device, others may just + * remove this clients interest in that device. + * + * The default implementation is to do nothing (assume all input devices + * are initialized during X server initialization and kept open). + * + */ + +void +CloseInputDevice (d, client) + DeviceIntPtr d; + ClientPtr client; + { + } + +/*********************************************************************** + * + * Caller: ProcXListInputDevices + * + * This is the implementation-dependent routine to initialize an input + * device to the point that information about it can be listed. + * Some implementations open all input devices when the server is first + * initialized, and never close them. Other implementations open only + * the X pointer and keyboard devices during server initialization, + * and only open other input devices when some client makes an + * XOpenDevice request. If some other process has the device open, the + * server may not be able to get information about the device to list it. + * + * This procedure should be used by implementations that do not initialize + * all input devices at server startup. It should do device-dependent + * initialization for any devices not previously initialized, and call + * AddInputDevice for each of those devices so that a DeviceIntRec will be + * created for them. + * + * The default implementation is to do nothing (assume all input devices + * are initialized during X server initialization and kept open). + * The commented-out sample code shows what you might do if you don't want + * the default. + * + */ + +void +AddOtherInputDevices () + { + /********************************************************************** + for each uninitialized device, do something like: + + DeviceIntPtr dev; + DeviceProc deviceProc; + pointer private; + + dev = (DeviceIntPtr) AddInputDevice(deviceProc, TRUE); + dev->public.devicePrivate = private; + RegisterOtherDevice(dev); + dev->inited = ((*dev->deviceProc)(dev, DEVICE_INIT) == Success); + ************************************************************************/ + + } + +/*********************************************************************** + * + * Caller: ProcXOpenDevice + * + * This is the implementation-dependent routine to open an input device. + * Some implementations open all input devices when the server is first + * initialized, and never close them. Other implementations open only + * the X pointer and keyboard devices during server initialization, + * and only open other input devices when some client makes an + * XOpenDevice request. This entry point is for the latter type of + * implementation. + * + * If the physical device is not already open, do it here. In this case, + * you need to keep track of the fact that one or more clients has the + * device open, and physically close it when the last client that has + * it open does an XCloseDevice. + * + * The default implementation is to do nothing (assume all input devices + * are opened during X server initialization and kept open). + * + */ + +void +OpenInputDevice (dev, client, status) + DeviceIntPtr dev; + ClientPtr client; + int *status; + { + } + +/**************************************************************************** + * + * Caller: ProcXSetDeviceMode + * + * Change the mode of an extension device. + * This function is used to change the mode of a device from reporting + * relative motion to reporting absolute positional information, and + * vice versa. + * The default implementation below is that no such devices are supported. + * + */ + +int +SetDeviceMode (client, dev, mode) + register ClientPtr client; + DeviceIntPtr dev; + int mode; + { + return BadMatch; + } + +/**************************************************************************** + * + * Caller: ProcXSetDeviceValuators + * + * Set the value of valuators on an extension input device. + * This function is used to set the initial value of valuators on + * those input devices that are capable of reporting either relative + * motion or an absolute position, and allow an initial position to be set. + * The default implementation below is that no such devices are supported. + * + */ + +int +SetDeviceValuators (client, dev, valuators, first_valuator, num_valuators) + register ClientPtr client; + DeviceIntPtr dev; + int *valuators; + int first_valuator; + int num_valuators; + { + return BadMatch; + } + +/**************************************************************************** + * + * Caller: ProcXChangeDeviceControl + * + * Change the specified device controls on an extension input device. + * + */ + +int +ChangeDeviceControl (client, dev, control) + register ClientPtr client; + DeviceIntPtr dev; + xDeviceCtl *control; + { + switch (control->control) + { + case DEVICE_RESOLUTION: + return (BadMatch); + default: + return (BadMatch); + } + } diff --git a/xorg-server-1.4/hw/darwin/iokit/Makefile.am b/xorg-server-1.4/hw/darwin/iokit/Makefile.am new file mode 100644 index 0000000..54464ae --- /dev/null +++ b/xorg-server-1.4/hw/darwin/iokit/Makefile.am @@ -0,0 +1,17 @@ +noinst_LIBRARIES = libiokit.a + +AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ +INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. @XORG_INCS@ +AM_DEFS = +if XQUARTZ +AM_DEFS += -DDARWIN_WITH_QUARTZ -DXFree86Server +XQUARTZ_SUBDIRS = bundle quartz +endif +DEFS = @DEFS@ $(AM_DEFS) + +libiokit_a_SOURCES = xfIOKit.c \ + xfIOKitCursor.c \ + xfIOKitStartup.c + +EXTRA_DIST = \ + xfIOKit.h diff --git a/xorg-server-1.4/hw/darwin/iokit/Makefile.in b/xorg-server-1.4/hw/darwin/iokit/Makefile.in new file mode 100644 index 0000000..e043922 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/iokit/Makefile.in @@ -0,0 +1,630 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@XQUARTZ_TRUE@am__append_1 = -DDARWIN_WITH_QUARTZ -DXFree86Server +subdir = hw/darwin/iokit +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libiokit_a_AR = $(AR) $(ARFLAGS) +libiokit_a_LIBADD = +am_libiokit_a_OBJECTS = xfIOKit.$(OBJEXT) xfIOKitCursor.$(OBJEXT) \ + xfIOKitStartup.$(OBJEXT) +libiokit_a_OBJECTS = $(am_libiokit_a_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libiokit_a_SOURCES) +DIST_SOURCES = $(libiokit_a_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ $(AM_DEFS) +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LIBRARIES = libiokit.a +AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ +INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. @XORG_INCS@ +AM_DEFS = $(am__append_1) +@XQUARTZ_TRUE@XQUARTZ_SUBDIRS = bundle quartz +libiokit_a_SOURCES = xfIOKit.c \ + xfIOKitCursor.c \ + xfIOKitStartup.c + +EXTRA_DIST = \ + xfIOKit.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/darwin/iokit/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/darwin/iokit/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libiokit.a: $(libiokit_a_OBJECTS) $(libiokit_a_DEPENDENCIES) + -rm -f libiokit.a + $(libiokit_a_AR) libiokit.a $(libiokit_a_OBJECTS) $(libiokit_a_LIBADD) + $(RANLIB) libiokit.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfIOKit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfIOKitCursor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfIOKitStartup.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/darwin/iokit/xfIOKit.c b/xorg-server-1.4/hw/darwin/iokit/xfIOKit.c new file mode 100644 index 0000000..c7ebd1c --- /dev/null +++ b/xorg-server-1.4/hw/darwin/iokit/xfIOKit.c @@ -0,0 +1,775 @@ +/************************************************************** + * + * IOKit support for the Darwin X Server + * + * HISTORY: + * Original port to Mac OS X Server by John Carmack + * Port to Darwin 1.0 by Dave Zarzycki + * Significantly rewritten for XFree86 4.0.1 by Torrey Lyons + * + **************************************************************/ +/* + * Copyright (c) 2001-2004 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#if HAVE_XORG_CONFIG_H +#include +#endif + +#include +#include +#include "os.h" +#include "servermd.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "mi.h" +#include "mibstore.h" +#include "mipointer.h" +#include "micmap.h" +#include "shadow.h" + +#include +#include +#include +#include +#include +#include + +#include + +#define NO_CFPLUGIN +#include +#include +#include +#include + +// Define this to work around bugs in the display drivers for +// older PowerBook G3's. If the X server starts without this +// #define, you don't need it. +#undef OLD_POWERBOOK_G3 + +#include "darwin.h" +#include "xfIOKit.h" + +// Globals +int xfIOKitScreenIndex = 0; +io_connect_t xfIOKitInputConnect = 0; + +static pthread_t inputThread; +static EvGlobals * evg; +static mach_port_t masterPort; +static mach_port_t notificationPort; +static IONotificationPortRef NotificationPortRef; +static mach_port_t pmNotificationPort; +static io_iterator_t fbIter; + + +/* + * XFIOKitStoreColors + * This is a callback from X to change the hardware colormap + * when using PsuedoColor. + */ +static void XFIOKitStoreColors( + ColormapPtr pmap, + int numEntries, + xColorItem *pdefs) +{ + kern_return_t kr; + int i; + IOColorEntry *newColors; + ScreenPtr pScreen = pmap->pScreen; + XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen); + + assert( newColors = (IOColorEntry *) + xalloc( numEntries*sizeof(IOColorEntry) )); + + // Convert xColorItem values to IOColorEntry + // assume the colormap is PsuedoColor + // as we do not support DirectColor + for (i = 0; i < numEntries; i++) { + newColors[i].index = pdefs[i].pixel; + newColors[i].red = pdefs[i].red; + newColors[i].green = pdefs[i].green; + newColors[i].blue = pdefs[i].blue; + } + + kr = IOFBSetCLUT( iokitScreen->fbService, 0, numEntries, + kSetCLUTByValue, newColors ); + kern_assert( kr ); + + xfree( newColors ); +} + + +/* + * DarwinModeBell + * FIXME + */ +void DarwinModeBell( + int loud, + DeviceIntPtr pDevice, + pointer ctrl, + int fbclass) +{ +} + + +/* + * DarwinModeGiveUp + * Closes the connections to IOKit services + */ +void DarwinModeGiveUp( void ) +{ + int i; + + // we must close the HID System first + // because it is a client of the framebuffer + NXCloseEventStatus( darwinParamConnect ); + IOServiceClose( xfIOKitInputConnect ); + for (i = 0; i < screenInfo.numScreens; i++) { + XFIOKitScreenPtr iokitScreen = + XFIOKIT_SCREEN_PRIV(screenInfo.screens[i]); + IOServiceClose( iokitScreen->fbService ); + } +} + + +/* + * ClearEvent + * Clear an event from the HID System event queue + */ +static void ClearEvent(NXEvent * ep) +{ + static NXEvent nullEvent = {NX_NULLEVENT, {0, 0 }, 0, -1, 0 }; + + *ep = nullEvent; + ep->data.compound.subType = ep->data.compound.misc.L[0] = + ep->data.compound.misc.L[1] = 0; +} + + +/* + * XFIOKitHIDThread + * Read the HID System event queue, translate it to an X event, + * and queue it for processing. + */ +static void *XFIOKitHIDThread(void *unused) +{ + for (;;) { + NXEQElement *oldHead; + mach_msg_return_t kr; + mach_msg_empty_rcv_t msg; + + kr = mach_msg((mach_msg_header_t*) &msg, MACH_RCV_MSG, 0, + sizeof(msg), notificationPort, 0, MACH_PORT_NULL); + kern_assert(kr); + + while (evg->LLEHead != evg->LLETail) { + NXEvent ev; + xEvent xe; + + // Extract the next event from the kernel queue + oldHead = (NXEQElement*)&evg->lleq[evg->LLEHead]; + ev_lock(&oldHead->sema); + ev = oldHead->event; + ClearEvent(&oldHead->event); + evg->LLEHead = oldHead->next; + ev_unlock(&oldHead->sema); + + memset(&xe, 0, sizeof(xe)); + + // These fields should be filled in for every event + xe.u.keyButtonPointer.rootX = ev.location.x; + xe.u.keyButtonPointer.rootY = ev.location.y; + xe.u.keyButtonPointer.time = GetTimeInMillis(); + + switch( ev.type ) { + case NX_MOUSEMOVED: + xe.u.u.type = MotionNotify; + break; + + case NX_LMOUSEDOWN: + xe.u.u.type = ButtonPress; + xe.u.u.detail = 1; + break; + + case NX_LMOUSEUP: + xe.u.u.type = ButtonRelease; + xe.u.u.detail = 1; + break; + + // A newer kernel generates multi-button events with + // NX_SYSDEFINED. Button 2 isn't handled correctly by + // older kernels anyway. Just let NX_SYSDEFINED events + // handle these. +#if 0 + case NX_RMOUSEDOWN: + xe.u.u.type = ButtonPress; + xe.u.u.detail = 2; + break; + + case NX_RMOUSEUP: + xe.u.u.type = ButtonRelease; + xe.u.u.detail = 2; + break; +#endif + + case NX_KEYDOWN: + xe.u.u.type = KeyPress; + xe.u.u.detail = ev.data.key.keyCode; + break; + + case NX_KEYUP: + xe.u.u.type = KeyRelease; + xe.u.u.detail = ev.data.key.keyCode; + break; + + case NX_FLAGSCHANGED: + xe.u.u.type = kXDarwinUpdateModifiers; + xe.u.clientMessage.u.l.longs0 = ev.flags; + break; + + case NX_SYSDEFINED: + if (ev.data.compound.subType == 7) { + xe.u.u.type = kXDarwinUpdateButtons; + xe.u.clientMessage.u.l.longs0 = + ev.data.compound.misc.L[0]; + xe.u.clientMessage.u.l.longs1 = + ev.data.compound.misc.L[1]; + } else { + continue; + } + break; + + case NX_SCROLLWHEELMOVED: + xe.u.u.type = kXDarwinScrollWheel; + xe.u.clientMessage.u.s.shorts0 = + ev.data.scrollWheel.deltaAxis1; + break; + + default: + continue; + } + + DarwinEQEnqueue(&xe); + } + } + + return NULL; +} + + +/* + * XFIOKitPMThread + * Handle power state notifications + */ +static void *XFIOKitPMThread(void *arg) +{ + ScreenPtr pScreen = (ScreenPtr)arg; + XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen); + + for (;;) { + mach_msg_return_t kr; + mach_msg_empty_rcv_t msg; + + kr = mach_msg((mach_msg_header_t*) &msg, MACH_RCV_MSG, 0, + sizeof(msg), pmNotificationPort, 0, MACH_PORT_NULL); + kern_assert(kr); + + // display is powering down + if (msg.header.msgh_id == 0) { + IOFBAcknowledgePM( iokitScreen->fbService ); + xf86SetRootClip(pScreen, FALSE); + } + // display just woke up + else if (msg.header.msgh_id == 1) { + xf86SetRootClip(pScreen, TRUE); + } + } + return NULL; +} + + +/* + * SetupFBandHID + * Setup an IOFramebuffer service and connect the HID system to it. + */ +static Bool SetupFBandHID( + int index, + DarwinFramebufferPtr dfb, + XFIOKitScreenPtr iokitScreen) +{ + kern_return_t kr; + io_service_t service; + io_connect_t fbService; + vm_address_t vram; + vm_size_t shmemSize; + int i; + UInt32 numModes; + IODisplayModeInformation modeInfo; + IODisplayModeID displayMode, *allModes; + IOIndex displayDepth; + IOFramebufferInformation fbInfo; + IOPixelInformation pixelInfo; + StdFBShmem_t *cshmem; + + // find and open the IOFrameBuffer service + service = IOIteratorNext(fbIter); + if (service == 0) + return FALSE; + + kr = IOServiceOpen( service, mach_task_self(), + kIOFBServerConnectType, &iokitScreen->fbService ); + IOObjectRelease( service ); + if (kr != KERN_SUCCESS) { + ErrorF("Failed to connect as window server to screen %i.\n", index); + return FALSE; + } + fbService = iokitScreen->fbService; + + // create the slice of shared memory containing cursor state data + kr = IOFBCreateSharedCursor( fbService, + kIOFBCurrentShmemVersion, + 32, 32 ); + if (kr != KERN_SUCCESS) + return FALSE; + + // Register for power management events for the framebuffer's device + kr = IOCreateReceivePort(kOSNotificationMessageID, &pmNotificationPort); + kern_assert(kr); + kr = IOConnectSetNotificationPort( fbService, 0, + pmNotificationPort, 0 ); + if (kr != KERN_SUCCESS) { + ErrorF("Power management registration failed.\n"); + } + + // SET THE SCREEN PARAMETERS + // get the current screen resolution, refresh rate and depth + kr = IOFBGetCurrentDisplayModeAndDepth( fbService, + &displayMode, + &displayDepth ); + if (kr != KERN_SUCCESS) + return FALSE; + + // use the current screen resolution if the user + // only wants to change the refresh rate + if (darwinDesiredRefresh != -1 && darwinDesiredWidth == 0) { + kr = IOFBGetDisplayModeInformation( fbService, + displayMode, + &modeInfo ); + if (kr != KERN_SUCCESS) + return FALSE; + darwinDesiredWidth = modeInfo.nominalWidth; + darwinDesiredHeight = modeInfo.nominalHeight; + } + + // use the current resolution and refresh rate + // if the user doesn't have a preference + if (darwinDesiredWidth == 0) { + + // change the pixel depth if desired + if (darwinDesiredDepth != -1) { + kr = IOFBGetDisplayModeInformation( fbService, + displayMode, + &modeInfo ); + if (kr != KERN_SUCCESS) + return FALSE; + if (modeInfo.maxDepthIndex < darwinDesiredDepth) { + ErrorF("Discarding screen %i:\n", index); + ErrorF("Current screen resolution does not support desired pixel depth.\n"); + return FALSE; + } + + displayDepth = darwinDesiredDepth; + kr = IOFBSetDisplayModeAndDepth( fbService, displayMode, + displayDepth ); + if (kr != KERN_SUCCESS) + return FALSE; + } + + // look for display mode with correct resolution and refresh rate + } else { + + // get an array of all supported display modes + kr = IOFBGetDisplayModeCount( fbService, &numModes ); + if (kr != KERN_SUCCESS) + return FALSE; + assert(allModes = (IODisplayModeID *) + xalloc( numModes * sizeof(IODisplayModeID) )); + kr = IOFBGetDisplayModes( fbService, numModes, allModes ); + if (kr != KERN_SUCCESS) + return FALSE; + + for (i = 0; i < numModes; i++) { + kr = IOFBGetDisplayModeInformation( fbService, allModes[i], + &modeInfo ); + if (kr != KERN_SUCCESS) + return FALSE; + + if (modeInfo.flags & kDisplayModeValidFlag && + modeInfo.nominalWidth == darwinDesiredWidth && + modeInfo.nominalHeight == darwinDesiredHeight) { + + if (darwinDesiredDepth == -1) + darwinDesiredDepth = modeInfo.maxDepthIndex; + if (modeInfo.maxDepthIndex < darwinDesiredDepth) { + ErrorF("Discarding screen %i:\n", index); + ErrorF("Desired screen resolution does not support desired pixel depth.\n"); + return FALSE; + } + + if ((darwinDesiredRefresh == -1 || + (darwinDesiredRefresh << 16) == modeInfo.refreshRate)) { + displayMode = allModes[i]; + displayDepth = darwinDesiredDepth; + kr = IOFBSetDisplayModeAndDepth(fbService, + displayMode, + displayDepth); + if (kr != KERN_SUCCESS) + return FALSE; + break; + } + } + } + + xfree( allModes ); + if (i >= numModes) { + ErrorF("Discarding screen %i:\n", index); + ErrorF("Desired screen resolution or refresh rate is not supported.\n"); + return FALSE; + } + } + + kr = IOFBGetPixelInformation( fbService, displayMode, displayDepth, + kIOFBSystemAperture, &pixelInfo ); + if (kr != KERN_SUCCESS) + return FALSE; + +#ifdef __i386__ + /* x86 in 8bit mode currently needs fixed color map... */ + if (pixelInfo.bitsPerComponent == 8 && + pixelInfo.componentCount == 1) + { + pixelInfo.pixelType = kIOFixedCLUTPixels; + } +#endif + +#ifdef OLD_POWERBOOK_G3 + if (pixelInfo.pixelType == kIOCLUTPixels) + pixelInfo.pixelType = kIOFixedCLUTPixels; +#endif + + kr = IOFBGetFramebufferInformationForAperture( fbService, + kIOFBSystemAperture, + &fbInfo ); + if (kr != KERN_SUCCESS) + return FALSE; + + // FIXME: 1x1 IOFramebuffers are sometimes used to indicate video + // outputs without a monitor connected to them. Since IOKit Xinerama + // does not really work, this often causes problems on PowerBooks. + // For now we explicitly check and ignore these screens. + if (fbInfo.activeWidth <= 1 || fbInfo.activeHeight <= 1) { + ErrorF("Discarding screen %i:\n", index); + ErrorF("Invalid width or height.\n"); + return FALSE; + } + + kr = IOConnectMapMemory( fbService, kIOFBCursorMemory, + mach_task_self(), (vm_address_t *) &cshmem, + &shmemSize, kIOMapAnywhere ); + if (kr != KERN_SUCCESS) + return FALSE; + iokitScreen->cursorShmem = cshmem; + + kr = IOConnectMapMemory( fbService, kIOFBSystemAperture, + mach_task_self(), &vram, &shmemSize, + kIOMapAnywhere ); + if (kr != KERN_SUCCESS) + return FALSE; + + iokitScreen->framebuffer = (void*)vram; + dfb->x = cshmem->screenBounds.minx; + dfb->y = cshmem->screenBounds.miny; + dfb->width = fbInfo.activeWidth; + dfb->height = fbInfo.activeHeight; + dfb->pitch = fbInfo.bytesPerRow; + dfb->bitsPerPixel = fbInfo.bitsPerPixel; + dfb->colorBitsPerPixel = pixelInfo.componentCount * + pixelInfo.bitsPerComponent; + dfb->bitsPerComponent = pixelInfo.bitsPerComponent; + + // allocate shadow framebuffer + iokitScreen->shadowPtr = xalloc(dfb->pitch * dfb->height); + dfb->framebuffer = iokitScreen->shadowPtr; + + // Note: Darwin kIORGBDirectPixels = X TrueColor, not DirectColor + if (pixelInfo.pixelType == kIORGBDirectPixels) { + dfb->colorType = TrueColor; + } else if (pixelInfo.pixelType == kIOCLUTPixels) { + dfb->colorType = PseudoColor; + } else if (pixelInfo.pixelType == kIOFixedCLUTPixels) { + dfb->colorType = StaticColor; + } + + // Inform the HID system that the framebuffer is also connected to it. + kr = IOConnectAddClient( xfIOKitInputConnect, fbService ); + kern_assert( kr ); + + // We have to have added at least one screen + // before we can enable the cursor. + kr = IOHIDSetCursorEnable(xfIOKitInputConnect, TRUE); + kern_assert( kr ); + + return TRUE; +} + + +/* + * DarwinModeAddScreen + * IOKit specific initialization for each screen. + */ +Bool DarwinModeAddScreen( + int index, + ScreenPtr pScreen) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + XFIOKitScreenPtr iokitScreen; + + // allocate space for private per screen storage + iokitScreen = xalloc(sizeof(XFIOKitScreenRec)); + XFIOKIT_SCREEN_PRIV(pScreen) = iokitScreen; + + // setup hardware framebuffer + iokitScreen->fbService = 0; + if (! SetupFBandHID(index, dfb, iokitScreen)) { + if (iokitScreen->fbService) { + IOServiceClose(iokitScreen->fbService); + } + return FALSE; + } + + return TRUE; +} + + +/* + * XFIOKitShadowUpdate + * Update the damaged regions of the shadow framebuffer on the screen. + */ +static void XFIOKitShadowUpdate(ScreenPtr pScreen, + shadowBufPtr pBuf) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen); + RegionPtr damage = &pBuf->damage; + int numBox = REGION_NUM_RECTS(damage); + BoxPtr pBox = REGION_RECTS(damage); + int pitch = dfb->pitch; + int bpp = dfb->bitsPerPixel/8; + + // Loop through all the damaged boxes + while (numBox--) { + int width, height, offset; + unsigned char *src, *dst; + + width = (pBox->x2 - pBox->x1) * bpp; + height = pBox->y2 - pBox->y1; + offset = (pBox->y1 * pitch) + (pBox->x1 * bpp); + src = iokitScreen->shadowPtr + offset; + dst = iokitScreen->framebuffer + offset; + + while (height--) { + memcpy(dst, src, width); + dst += pitch; + src += pitch; + } + + // Get the next box + pBox++; + } +} + + +/* + * DarwinModeSetupScreen + * Finalize IOKit specific initialization of each screen. + */ +Bool DarwinModeSetupScreen( + int index, + ScreenPtr pScreen) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + pthread_t pmThread; + + // initalize cursor support + if (! XFIOKitInitCursor(pScreen)) { + return FALSE; + } + + // initialize shadow framebuffer support + if (! shadowInit(pScreen, XFIOKitShadowUpdate, NULL)) { + ErrorF("Failed to initalize shadow framebuffer for screen %i.\n", + index); + return FALSE; + } + + // initialize colormap handling as needed + if (dfb->colorType == PseudoColor) { + pScreen->StoreColors = XFIOKitStoreColors; + } + + // initialize power manager handling + pthread_create( &pmThread, NULL, XFIOKitPMThread, + (void *) pScreen ); + + return TRUE; +} + + +/* + * DarwinModeInitOutput + * One-time initialization of IOKit output support. + */ +void DarwinModeInitOutput( + int argc, + char **argv) +{ + static unsigned long generation = 0; + kern_return_t kr; + io_iterator_t iter; + io_service_t service; + vm_address_t shmem; + vm_size_t shmemSize; + + ErrorF("Display mode: IOKit\n"); + + // Allocate private storage for each screen's IOKit specific info + if (generation != serverGeneration) { + xfIOKitScreenIndex = AllocateScreenPrivateIndex(); + generation = serverGeneration; + } + + kr = IOMasterPort(bootstrap_port, &masterPort); + kern_assert( kr ); + + // Find and open the HID System Service + // Do this now to be sure the Mac OS X window server is not running. + kr = IOServiceGetMatchingServices( masterPort, + IOServiceMatching( kIOHIDSystemClass ), + &iter ); + kern_assert( kr ); + + assert( service = IOIteratorNext( iter ) ); + + kr = IOServiceOpen( service, mach_task_self(), kIOHIDServerConnectType, + &xfIOKitInputConnect ); + if (kr != KERN_SUCCESS) { + ErrorF("Failed to connect to the HID System as the window server!\n"); +#ifdef DARWIN_WITH_QUARTZ + FatalError("Quit the Mac OS X window server or use the -quartz option.\n"); +#else + FatalError("Make sure you have quit the Mac OS X window server.\n"); +#endif + } + + IOObjectRelease( service ); + IOObjectRelease( iter ); + + // Setup the event queue in memory shared by the kernel and X server + kr = IOHIDCreateSharedMemory( xfIOKitInputConnect, + kIOHIDCurrentShmemVersion ); + kern_assert( kr ); + + kr = IOConnectMapMemory( xfIOKitInputConnect, kIOHIDGlobalMemory, + mach_task_self(), &shmem, &shmemSize, + kIOMapAnywhere ); + kern_assert( kr ); + + evg = (EvGlobals *)(shmem + ((EvOffsets *)shmem)->evGlobalsOffset); + + assert(sizeof(EvGlobals) == evg->structSize); + + NotificationPortRef = IONotificationPortCreate( masterPort ); + + notificationPort = IONotificationPortGetMachPort(NotificationPortRef); + + kr = IOConnectSetNotificationPort( xfIOKitInputConnect, + kIOHIDEventNotification, + notificationPort, 0 ); + kern_assert( kr ); + + evg->movedMask |= NX_MOUSEMOVEDMASK; + + // find number of framebuffers + kr = IOServiceGetMatchingServices( masterPort, + IOServiceMatching( IOFRAMEBUFFER_CONFORMSTO ), + &fbIter ); + kern_assert( kr ); + + darwinScreensFound = 0; + while ((service = IOIteratorNext(fbIter))) { + IOObjectRelease( service ); + darwinScreensFound++; + } + IOIteratorReset(fbIter); +} + + +/* + * DarwinModeInitInput + * One-time initialization of IOKit input support. + */ +void DarwinModeInitInput( + int argc, + char **argv) +{ + kern_return_t kr; + int fd[2]; + + kr = IOHIDSetEventsEnable(xfIOKitInputConnect, TRUE); + kern_assert( kr ); + + // Start event passing thread + assert( pipe(fd) == 0 ); + darwinEventReadFD = fd[0]; + darwinEventWriteFD = fd[1]; + fcntl(darwinEventReadFD, F_SETFL, O_NONBLOCK); + pthread_create(&inputThread, NULL, + XFIOKitHIDThread, NULL); + +} + + +/* + * DarwinModeProcessEvent + * Process IOKit specific events. + */ +void DarwinModeProcessEvent( + xEvent *xe) +{ + // No mode specific events + ErrorF("Unknown X event caught: %d\n", xe->u.u.type); +} diff --git a/xorg-server-1.4/hw/darwin/iokit/xfIOKit.h b/xorg-server-1.4/hw/darwin/iokit/xfIOKit.h new file mode 100644 index 0000000..27d27bc --- /dev/null +++ b/xorg-server-1.4/hw/darwin/iokit/xfIOKit.h @@ -0,0 +1,56 @@ +/* + xfIOKit.h + + IOKit specific functions and definitions +*/ +/* + * Copyright (c) 2001-2002 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#ifndef _XFIOKIT_H +#define _XFIOKIT_H + +#include +#include +#include +#include "screenint.h" +#include "darwin.h" + +typedef struct { + io_connect_t fbService; + StdFBShmem_t *cursorShmem; + unsigned char *framebuffer; + unsigned char *shadowPtr; +} XFIOKitScreenRec, *XFIOKitScreenPtr; + +#define XFIOKIT_SCREEN_PRIV(pScreen) \ + ((XFIOKitScreenPtr)pScreen->devPrivates[xfIOKitScreenIndex].ptr) + +extern int xfIOKitScreenIndex; // index into pScreen.devPrivates +extern io_connect_t xfIOKitInputConnect; + +Bool XFIOKitInitCursor(ScreenPtr pScreen); + +#endif /* _XFIOKIT_H */ diff --git a/xorg-server-1.4/hw/darwin/iokit/xfIOKitCursor.c b/xorg-server-1.4/hw/darwin/iokit/xfIOKitCursor.c new file mode 100644 index 0000000..8388513 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/iokit/xfIOKitCursor.c @@ -0,0 +1,737 @@ +/************************************************************** + * + * Cursor support for Darwin X Server + * + * Three different cursor modes are possible: + * X (0) - tracking via Darwin kernel, + * display via X machine independent + * Kernel (1) - tracking and display via Darwin kernel + * (not currently supported) + * Hardware (2) - tracking and display via hardware + * + * The X software cursor uses the Darwin software cursor + * routines in IOFramebuffer.cpp to track the cursor, but + * displays the cursor image using the X machine + * independent display cursor routines in midispcur.c. + * + * The kernel cursor uses IOFramebuffer.cpp routines to + * track and display the cursor. This gives better + * performance as the display calls don't have to cross + * the kernel boundary. Unfortunately, this mode has + * synchronization issues with the user land X server + * and isn't currently used. + * + * Hardware cursor support lets the hardware handle these + * details. + * + * Kernel and hardware cursor mode only work for cursors + * up to a certain size, currently 16x16 pixels. If a + * bigger cursor is set, we fallback to X cursor mode. + * + * HISTORY: + * 1.0 by Torrey T. Lyons, October 30, 2000 + * + **************************************************************/ +/* + * Copyright (c) 2001-2002 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#if HAVE_XORG_CONFIG_H +#include +#endif +#include "scrnintstr.h" +#include "cursorstr.h" +#include "mipointrst.h" +#include "micmap.h" +#define NO_CFPLUGIN +#include +#include +#include "darwin.h" +#include "xfIOKit.h" +#include +#define DUMP_DARWIN_CURSOR FALSE + +#define CURSOR_PRIV(pScreen) \ + ((XFIOKitCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr) + +// The cursors format are documented in IOFramebufferShared.h. +#define RGBto34WithGamma(red, green, blue) \ + ( 0x000F \ + | (((red) & 0xF) << 12) \ + | (((green) & 0xF) << 8) \ + | (((blue) & 0xF) << 4) ) +#define RGBto38WithGamma(red, green, blue) \ + ( 0xFF << 24 \ + | (((red) & 0xFF) << 16) \ + | (((green) & 0xFF) << 8) \ + | (((blue) & 0xFF)) ) +#define HighBitOf32 0x80000000 + +typedef struct { + Bool canHWCursor; + short cursorMode; + RecolorCursorProcPtr RecolorCursor; + InstallColormapProcPtr InstallColormap; + QueryBestSizeProcPtr QueryBestSize; + miPointerSpriteFuncPtr spriteFuncs; + ColormapPtr pInstalledMap; +} XFIOKitCursorScreenRec, *XFIOKitCursorScreenPtr; + +static int darwinCursorScreenIndex = -1; +static unsigned long darwinCursorGeneration = 0; + +/* +=========================================================================== + + Pointer sprite functions + +=========================================================================== +*/ + +/* + Realizing the Darwin hardware cursor (ie. converting from the + X representation to the IOKit representation) is complicated + by the fact that we have three different potential cursor + formats to go to, one for each bit depth (8, 15, or 24). + The IOKit formats are documented in IOFramebufferShared.h. + X cursors are represented as two pieces, a source and a mask. + The mask is a bitmap indicating which parts of the cursor are + transparent and which parts are drawn. The source is a bitmap + indicating which parts of the non-transparent portion of the the + cursor should be painted in the foreground color and which should + be painted in the background color. The bitmaps are given in + 32-bit format with least significant byte and bit first. + (This is opposite PowerPC Darwin.) +*/ + +typedef struct { + unsigned char image[CURSORWIDTH*CURSORHEIGHT]; + unsigned char mask[CURSORWIDTH*CURSORHEIGHT]; +} cursorPrivRec, *cursorPrivPtr; + +/* + * XFIOKitRealizeCursor8 + * Convert the X cursor representation to an 8-bit depth + * format for Darwin. This function assumes the maximum cursor + * width is a multiple of 8. + */ +static Bool +XFIOKitRealizeCursor8( + ScreenPtr pScreen, + CursorPtr pCursor) +{ + cursorPrivPtr newCursor; + unsigned char *newSourceP, *newMaskP; + CARD32 *oldSourceP, *oldMaskP; + xColorItem fgColor, bgColor; + int index, x, y, rowPad; + int cursorWidth, cursorHeight; + ColormapPtr pmap; + + // check cursor size just to be sure + cursorWidth = pCursor->bits->width; + cursorHeight = pCursor->bits->height; + if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH) + return FALSE; + + // get cursor colors in colormap + index = pScreen->myNum; + pmap = miInstalledMaps[index]; + if (!pmap) return FALSE; + + fgColor.red = pCursor->foreRed; + fgColor.green = pCursor->foreGreen; + fgColor.blue = pCursor->foreBlue; + FakeAllocColor(pmap, &fgColor); + bgColor.red = pCursor->backRed; + bgColor.green = pCursor->backGreen; + bgColor.blue = pCursor->backBlue; + FakeAllocColor(pmap, &bgColor); + FakeFreeColor(pmap, fgColor.pixel); + FakeFreeColor(pmap, bgColor.pixel); + + // allocate memory for new cursor image + newCursor = xalloc( sizeof(cursorPrivRec) ); + if (!newCursor) + return FALSE; + memset( newCursor->image, pScreen->blackPixel, CURSORWIDTH*CURSORHEIGHT ); + memset( newCursor->mask, 0, CURSORWIDTH*CURSORHEIGHT ); + + // convert to 8-bit Darwin cursor format + oldSourceP = (CARD32 *) pCursor->bits->source; + oldMaskP = (CARD32 *) pCursor->bits->mask; + newSourceP = newCursor->image; + newMaskP = newCursor->mask; + rowPad = CURSORWIDTH - cursorWidth; + + for (y = 0; y < cursorHeight; y++) { + for (x = 0; x < cursorWidth; x++) { + if (*oldSourceP & (HighBitOf32 >> x)) + *newSourceP = fgColor.pixel; + else + *newSourceP = bgColor.pixel; + if (*oldMaskP & (HighBitOf32 >> x)) + *newMaskP = 255; + else + *newSourceP = pScreen->blackPixel; + newSourceP++; newMaskP++; + } + oldSourceP++; oldMaskP++; + newSourceP += rowPad; newMaskP += rowPad; + } + + // save the result + pCursor->devPriv[pScreen->myNum] = (pointer) newCursor; + return TRUE; +} + + +/* + * XFIOKitRealizeCursor15 + * Convert the X cursor representation to an 15-bit depth + * format for Darwin. + */ +static Bool +XFIOKitRealizeCursor15( + ScreenPtr pScreen, + CursorPtr pCursor) +{ + unsigned short *newCursor; + unsigned short fgPixel, bgPixel; + unsigned short *newSourceP; + CARD32 *oldSourceP, *oldMaskP; + int x, y, rowPad; + int cursorWidth, cursorHeight; + + // check cursor size just to be sure + cursorWidth = pCursor->bits->width; + cursorHeight = pCursor->bits->height; + if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH) + return FALSE; + + // allocate memory for new cursor image + newCursor = xalloc( CURSORWIDTH*CURSORHEIGHT*sizeof(short) ); + if (!newCursor) + return FALSE; + memset( newCursor, 0, CURSORWIDTH*CURSORHEIGHT*sizeof(short) ); + + // calculate pixel values + fgPixel = RGBto34WithGamma( pCursor->foreRed, pCursor->foreGreen, + pCursor->foreBlue ); + bgPixel = RGBto34WithGamma( pCursor->backRed, pCursor->backGreen, + pCursor->backBlue ); + + // convert to 15-bit Darwin cursor format + oldSourceP = (CARD32 *) pCursor->bits->source; + oldMaskP = (CARD32 *) pCursor->bits->mask; + newSourceP = newCursor; + rowPad = CURSORWIDTH - cursorWidth; + + for (y = 0; y < cursorHeight; y++) { + for (x = 0; x < cursorWidth; x++) { + if (*oldMaskP & (HighBitOf32 >> x)) { + if (*oldSourceP & (HighBitOf32 >> x)) + *newSourceP = fgPixel; + else + *newSourceP = bgPixel; + } else { + *newSourceP = 0; + } + newSourceP++; + } + oldSourceP++; oldMaskP++; + newSourceP += rowPad; + } + +#if DUMP_DARWIN_CURSOR + // Write out the cursor + ErrorF("Cursor: 0x%x\n", pCursor); + ErrorF("Width = %i, Height = %i, RowPad = %i\n", cursorWidth, + cursorHeight, rowPad); + for (y = 0; y < cursorHeight; y++) { + newSourceP = newCursor + y*CURSORWIDTH; + for (x = 0; x < cursorWidth; x++) { + if (*newSourceP == fgPixel) + ErrorF("x"); + else if (*newSourceP == bgPixel) + ErrorF("o"); + else + ErrorF(" "); + newSourceP++; + } + ErrorF("\n"); + } +#endif + + // save the result + pCursor->devPriv[pScreen->myNum] = (pointer) newCursor; + return TRUE; +} + + +/* + * XFIOKitRealizeCursor24 + * Convert the X cursor representation to an 24-bit depth + * format for Darwin. This function assumes the maximum cursor + * width is a multiple of 8. + */ +static Bool +XFIOKitRealizeCursor24( + ScreenPtr pScreen, + CursorPtr pCursor) +{ + unsigned int *newCursor; + unsigned int fgPixel, bgPixel; + unsigned int *newSourceP; + CARD32 *oldSourceP, *oldMaskP; + int x, y, rowPad; + int cursorWidth, cursorHeight; + + // check cursor size just to be sure + cursorWidth = pCursor->bits->width; + cursorHeight = pCursor->bits->height; + if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH) + return FALSE; + + // allocate memory for new cursor image + newCursor = xalloc( CURSORWIDTH*CURSORHEIGHT*sizeof(int) ); + if (!newCursor) + return FALSE; + memset( newCursor, 0, CURSORWIDTH*CURSORHEIGHT*sizeof(int) ); + + // calculate pixel values + fgPixel = RGBto38WithGamma( pCursor->foreRed, pCursor->foreGreen, + pCursor->foreBlue ); + bgPixel = RGBto38WithGamma( pCursor->backRed, pCursor->backGreen, + pCursor->backBlue ); + + // convert to 24-bit Darwin cursor format + oldSourceP = (CARD32 *) pCursor->bits->source; + oldMaskP = (CARD32 *) pCursor->bits->mask; + newSourceP = newCursor; + rowPad = CURSORWIDTH - cursorWidth; + + for (y = 0; y < cursorHeight; y++) { + for (x = 0; x < cursorWidth; x++) { + if (*oldMaskP & (HighBitOf32 >> x)) { + if (*oldSourceP & (HighBitOf32 >> x)) + *newSourceP = fgPixel; + else + *newSourceP = bgPixel; + } else { + *newSourceP = 0; + } + newSourceP++; + } + oldSourceP++; oldMaskP++; + newSourceP += rowPad; + } + +#if DUMP_DARWIN_CURSOR + // Write out the cursor + ErrorF("Cursor: 0x%x\n", pCursor); + ErrorF("Width = %i, Height = %i, RowPad = %i\n", cursorWidth, + cursorHeight, rowPad); + for (y = 0; y < cursorHeight; y++) { + newSourceP = newCursor + y*CURSORWIDTH; + for (x = 0; x < cursorWidth; x++) { + if (*newSourceP == fgPixel) + ErrorF("x"); + else if (*newSourceP == bgPixel) + ErrorF("o"); + else + ErrorF(" "); + newSourceP++; + } + ErrorF("\n"); + } +#endif + + // save the result + pCursor->devPriv[pScreen->myNum] = (pointer) newCursor; + return TRUE; +} + + +/* + * XFIOKitRealizeCursor + * + */ +static Bool +XFIOKitRealizeCursor( + ScreenPtr pScreen, + CursorPtr pCursor) +{ + Bool result; + XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + + if ((pCursor->bits->height > CURSORHEIGHT) || + (pCursor->bits->width > CURSORWIDTH) || + // FIXME: this condition is not needed after kernel cursor works + !ScreenPriv->canHWCursor) { + result = (*ScreenPriv->spriteFuncs->RealizeCursor)(pScreen, pCursor); + } else if (dfb->bitsPerPixel == 8) { + result = XFIOKitRealizeCursor8(pScreen, pCursor); + } else if (dfb->bitsPerPixel == 16) { + result = XFIOKitRealizeCursor15(pScreen, pCursor); + } else { + result = XFIOKitRealizeCursor24(pScreen, pCursor); + } + + return result; +} + + +/* + * XFIOKitUnrealizeCursor + * + */ +static Bool +XFIOKitUnrealizeCursor( + ScreenPtr pScreen, + CursorPtr pCursor) +{ + Bool result; + XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + if ((pCursor->bits->height > CURSORHEIGHT) || + (pCursor->bits->width > CURSORWIDTH) || + // FIXME: this condition is not needed after kernel cursor works + !ScreenPriv->canHWCursor) { + result = (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pScreen, pCursor); + } else { + xfree( pCursor->devPriv[pScreen->myNum] ); + result = TRUE; + } + + return result; +} + + +/* + * XFIOKitSetCursor + * Set the cursor sprite and position + * Use hardware cursor if possible + */ +static void +XFIOKitSetCursor( + ScreenPtr pScreen, + CursorPtr pCursor, + int x, + int y) +{ + kern_return_t kr; + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen); + StdFBShmem_t *cshmem = iokitScreen->cursorShmem; + XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + // are we supposed to remove the cursor? + if (!pCursor) { + if (ScreenPriv->cursorMode == 0) + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); + else { + if (!cshmem->cursorShow) { + cshmem->cursorShow++; + if (cshmem->hardwareCursorActive) { + kr = IOFBSetCursorVisible(iokitScreen->fbService, FALSE); + kern_assert( kr ); + } + } + } + return; + } + + // can we use the kernel or hardware cursor? + if ((pCursor->bits->height <= CURSORHEIGHT) && + (pCursor->bits->width <= CURSORWIDTH) && + // FIXME: condition not needed when kernel cursor works + ScreenPriv->canHWCursor) { + + if (ScreenPriv->cursorMode == 0) // remove the X cursor + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); + ScreenPriv->cursorMode = 1; // kernel cursor + + // change the cursor image in shared memory + if (dfb->bitsPerPixel == 8) { + cursorPrivPtr newCursor = + (cursorPrivPtr) pCursor->devPriv[pScreen->myNum]; + memcpy(cshmem->cursor.bw8.image[0], newCursor->image, + CURSORWIDTH*CURSORHEIGHT); + memcpy(cshmem->cursor.bw8.mask[0], newCursor->mask, + CURSORWIDTH*CURSORHEIGHT); + } else if (dfb->bitsPerPixel == 16) { + unsigned short *newCursor = + (unsigned short *) pCursor->devPriv[pScreen->myNum]; + memcpy(cshmem->cursor.rgb.image[0], newCursor, + 2*CURSORWIDTH*CURSORHEIGHT); + } else { + unsigned int *newCursor = + (unsigned int *) pCursor->devPriv[pScreen->myNum]; + memcpy(cshmem->cursor.rgb24.image[0], newCursor, + 4*CURSORWIDTH*CURSORHEIGHT); + } + + // FIXME: We always use a full size cursor, even if the image + // is smaller because I couldn't get the padding to come out + // right otherwise. + cshmem->cursorSize[0].width = CURSORWIDTH; + cshmem->cursorSize[0].height = CURSORHEIGHT; + cshmem->hotSpot[0].x = pCursor->bits->xhot; + cshmem->hotSpot[0].y = pCursor->bits->yhot; + + // try to use a hardware cursor + if (ScreenPriv->canHWCursor) { + kr = IOFBSetNewCursor(iokitScreen->fbService, 0, 0, 0); + // FIXME: this is a fatal error without the kernel cursor + kern_assert( kr ); +#if 0 + if (kr != KERN_SUCCESS) { + ErrorF("Could not set new cursor with kernel return 0x%x.\n", kr); + ScreenPriv->canHWCursor = FALSE; + } +#endif + } + + // make the new cursor visible + if (cshmem->cursorShow) + cshmem->cursorShow--; + + if (!cshmem->cursorShow && ScreenPriv->canHWCursor) { + kr = IOFBSetCursorVisible(iokitScreen->fbService, TRUE); + // FIXME: this is a fatal error without the kernel cursor + kern_assert( kr ); +#if 0 + if (kr != KERN_SUCCESS) { + ErrorF("Couldn't set hardware cursor visible with kernel return 0x%x.\n", kr); + ScreenPriv->canHWCursor = FALSE; + } else +#endif + ScreenPriv->cursorMode = 2; // hardware cursor + } + + return; + } + + // otherwise we use a software cursor + if (ScreenPriv->cursorMode) { + /* remove the kernel or hardware cursor */ + XFIOKitSetCursor(pScreen, 0, x, y); + } + + ScreenPriv->cursorMode = 0; + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, pCursor, x, y); +} + + +/* + * XFIOKitMoveCursor + * Move the cursor. This is a noop for a kernel or hardware cursor. + */ +static void +XFIOKitMoveCursor( + ScreenPtr pScreen, + int x, + int y) +{ + XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + // only the X cursor needs to be explicitly moved + if (!ScreenPriv->cursorMode) + (*ScreenPriv->spriteFuncs->MoveCursor)(pScreen, x, y); +} + +static miPointerSpriteFuncRec darwinSpriteFuncsRec = { + XFIOKitRealizeCursor, + XFIOKitUnrealizeCursor, + XFIOKitSetCursor, + XFIOKitMoveCursor +}; + + +/* +=========================================================================== + + Pointer screen functions + +=========================================================================== +*/ + +/* + * XFIOKitCursorOffScreen + */ +static Bool XFIOKitCursorOffScreen(ScreenPtr *pScreen, int *x, int *y) +{ return FALSE; +} + + +/* + * XFIOKitCrossScreen + */ +static void XFIOKitCrossScreen(ScreenPtr pScreen, Bool entering) +{ return; +} + + +/* + * XFIOKitWarpCursor + * Change the cursor position without generating an event or motion history + */ +static void +XFIOKitWarpCursor( + ScreenPtr pScreen, + int x, + int y) +{ + kern_return_t kr; + + kr = IOHIDSetMouseLocation( xfIOKitInputConnect, x, y ); + if (kr != KERN_SUCCESS) { + ErrorF("Could not set cursor position with kernel return 0x%x.\n", kr); + } + miPointerWarpCursor(pScreen, x, y); +} + +static miPointerScreenFuncRec darwinScreenFuncsRec = { + XFIOKitCursorOffScreen, + XFIOKitCrossScreen, + XFIOKitWarpCursor, + DarwinEQPointerPost, + DarwinEQSwitchScreen +}; + + +/* +=========================================================================== + + Other screen functions + +=========================================================================== +*/ + +/* + * XFIOKitCursorQueryBestSize + * Handle queries for best cursor size + */ +static void +XFIOKitCursorQueryBestSize( + int class, + unsigned short *width, + unsigned short *height, + ScreenPtr pScreen) +{ + XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + if (class == CursorShape) { + *width = CURSORWIDTH; + *height = CURSORHEIGHT; + } else + (*ScreenPriv->QueryBestSize)(class, width, height, pScreen); +} + + +/* + * XFIOKitInitCursor + * Initialize cursor support + */ +Bool +XFIOKitInitCursor( + ScreenPtr pScreen) +{ + XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen); + XFIOKitCursorScreenPtr ScreenPriv; + miPointerScreenPtr PointPriv; + kern_return_t kr; + + // start with no cursor displayed + if (!iokitScreen->cursorShmem->cursorShow++) { + if (iokitScreen->cursorShmem->hardwareCursorActive) { + kr = IOFBSetCursorVisible(iokitScreen->fbService, FALSE); + kern_assert( kr ); + } + } + + // initialize software cursor handling (always needed as backup) + if (!miDCInitialize(pScreen, &darwinScreenFuncsRec)) { + return FALSE; + } + + // allocate private storage for this screen's hardware cursor info + if (darwinCursorGeneration != serverGeneration) { + if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0) + return FALSE; + darwinCursorGeneration = serverGeneration; + } + + ScreenPriv = xcalloc( 1, sizeof(XFIOKitCursorScreenRec) ); + if (!ScreenPriv) return FALSE; + + pScreen->devPrivates[darwinCursorScreenIndex].ptr = (pointer) ScreenPriv; + + // check if a hardware cursor is supported + if (!iokitScreen->cursorShmem->hardwareCursorCapable) { + ScreenPriv->canHWCursor = FALSE; + ErrorF("Hardware cursor not supported.\n"); + } else { + // we need to make sure that the hardware cursor really works + ScreenPriv->canHWCursor = TRUE; + kr = IOFBSetNewCursor(iokitScreen->fbService, 0, 0, 0); + if (kr != KERN_SUCCESS) { + ErrorF("Could not set hardware cursor with kernel return 0x%x.\n", kr); + ScreenPriv->canHWCursor = FALSE; + } + kr = IOFBSetCursorVisible(iokitScreen->fbService, TRUE); + if (kr != KERN_SUCCESS) { + ErrorF("Couldn't set hardware cursor visible with kernel return 0x%x.\n", kr); + ScreenPriv->canHWCursor = FALSE; + } + IOFBSetCursorVisible(iokitScreen->fbService, FALSE); + } + + ScreenPriv->cursorMode = 0; + ScreenPriv->pInstalledMap = NULL; + + // override some screen procedures + ScreenPriv->QueryBestSize = pScreen->QueryBestSize; + pScreen->QueryBestSize = XFIOKitCursorQueryBestSize; +// ScreenPriv->ConstrainCursor = pScreen->ConstrainCursor; +// pScreen->ConstrainCursor = XFIOKitConstrainCursor; + + // initialize hardware cursor handling + PointPriv = (miPointerScreenPtr) + pScreen->devPrivates[miPointerScreenIndex].ptr; + + ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; + PointPriv->spriteFuncs = &darwinSpriteFuncsRec; + + /* Other routines that might be overridden */ +/* + CursorLimitsProcPtr CursorLimits; + RecolorCursorProcPtr RecolorCursor; +*/ + + return TRUE; +} diff --git a/xorg-server-1.4/hw/darwin/iokit/xfIOKitStartup.c b/xorg-server-1.4/hw/darwin/iokit/xfIOKitStartup.c new file mode 100644 index 0000000..07e8c21 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/iokit/xfIOKitStartup.c @@ -0,0 +1,134 @@ +/************************************************************** + * + * Startup code for the IOKit Darwin X Server + * + **************************************************************/ +/* + * Copyright (c) 2001-2004 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + + +#if HAVE_XORG_CONFIG_H +#include +#endif + +#include "darwin.h" +#include "darwinKeyboard.h" +#include "micmap.h" + +void GlxExtensionInit(void); +void GlxWrapInitVisuals(miInitVisualsProcPtr *procPtr); + + +/* + * DarwinHandleGUI + * This function is called first from main(). + * It does nothing for the IOKit X server. + */ +void DarwinHandleGUI( + int argc, + char *argv[], + char *envp[] ) +{ +} + + +/* + * DarwinGlxExtensionInit + * Initialize the GLX extension. + * Mesa is linked into the IOKit mode X server so we just call directly. + */ +void DarwinGlxExtensionInit(void) +{ +#ifdef GLXEXT + GlxExtensionInit(); +#endif +} + + +/* + * DarwinGlxWrapInitVisuals + */ +void DarwinGlxWrapInitVisuals( + miInitVisualsProcPtr *procPtr) +{ +#ifdef GLXEXT + GlxWrapInitVisuals(procPtr); +#endif +} + + +/* + * DarwinModeProcessArgument + * Process IOKit specific command line arguments. + */ +int DarwinModeProcessArgument( + int argc, + char *argv[], + int i) +{ +#ifdef DARWIN_WITH_QUARTZ + // XDarwinStartup uses these arguments to indicate which X server + // should be started. Ignore them here. + if (!strcmp( argv[i], "-fullscreen" ) || + !strcmp( argv[i], "-rootless" ) || + !strcmp( argv[i], "-quartz" )) + { + return 1; + } +#else + if (!strcmp( argv[i], "-fullscreen" ) || + !strcmp( argv[i], "-rootless" ) || + !strcmp( argv[i], "-quartz" )) + { + FatalError("Command line option %s is not available without Quartz " + "support.\n", argv[i]); + } +#endif + + return 0; +} + + +/* + * DarwinModeSystemKeymapSeed + * Changes to NXKeyMapping are not tracked. + */ +unsigned int +DarwinModeSystemKeymapSeed(void) +{ + return 0; +} + + +/* + * DarwinModeReadSystemKeymap + * IOKit has no alternative to NXKeyMapping API. + */ +Bool DarwinModeReadSystemKeymap( + darwinKeyboardInfo *info) +{ + return FALSE; +} diff --git a/xorg-server-1.4/hw/darwin/quartz/Makefile.am b/xorg-server-1.4/hw/darwin/quartz/Makefile.am new file mode 100644 index 0000000..993cdb0 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/Makefile.am @@ -0,0 +1,54 @@ +noinst_LIBRARIES = libXQuartz.a + +AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ +AM_OBJCFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ + +INCLUDES = -I$(srcdir) -I$(srcdir)/.. @XORG_INCS@ +AM_DEFS = -DHAS_CG_MACH_PORT -DHAS_KL_API +if HAVE_X_PLUGIN +AM_DEFS += -DBUILD_XPR +endif +DEFS = @DEFS@ $(AM_DEFS) -DXBINDIR=\"${bindir}\" + +libXQuartz_a_SOURCES = \ + Preferences.m \ + XApplication.m \ + XServer.m \ + applewm.c \ + keysym2ucs.c \ + quartz.c \ + quartzAudio.c \ + quartzCocoa.m \ + quartzPasteboard.c \ + quartzKeyboard.c \ + quartzStartup.c \ + pseudoramiX.c + +bin_PROGRAMS = XDarwinStartup + +XDarwinStartup_SOURCES = XDarwinStartup.c +XDarwinStartup_LDFLAGS = -Wl,-framework,CoreFoundation \ + -Wl,-framework,ApplicationServices +XDarwinStartupCFLAGS = -DXBINDIR="${bindir}" +XDARWINROOT = @APPLE_APPLICATIONS_DIR@ +BINDIR = $(bindir) +install-exec-local: + -(cd $(DESTDIR)$(BINDIR); rm X; $(LN_S) XDarwinStartup X) + +man1_MANS = XDarwinStartup.man + +EXTRA_DIST = \ + applewmExt.h \ + keysym2ucs.h \ + Preferences.h \ + pseudoramiX.h \ + quartzAudio.h \ + quartzCommon.h \ + quartzCursor.c \ + quartzCursor.h \ + quartz.h \ + quartzPasteboard.h \ + XApplication.h \ + XDarwin.pbproj/project.pbxproj \ + XServer.h \ + XDarwinStartup.man diff --git a/xorg-server-1.4/hw/darwin/quartz/Makefile.in b/xorg-server-1.4/hw/darwin/quartz/Makefile.in new file mode 100644 index 0000000..3389afc --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/Makefile.in @@ -0,0 +1,801 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@HAVE_X_PLUGIN_TRUE@am__append_1 = -DBUILD_XPR +bin_PROGRAMS = XDarwinStartup$(EXEEXT) +subdir = hw/darwin/quartz +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libXQuartz_a_AR = $(AR) $(ARFLAGS) +libXQuartz_a_LIBADD = +am_libXQuartz_a_OBJECTS = Preferences.$(OBJEXT) XApplication.$(OBJEXT) \ + XServer.$(OBJEXT) applewm.$(OBJEXT) keysym2ucs.$(OBJEXT) \ + quartz.$(OBJEXT) quartzAudio.$(OBJEXT) quartzCocoa.$(OBJEXT) \ + quartzPasteboard.$(OBJEXT) quartzKeyboard.$(OBJEXT) \ + quartzStartup.$(OBJEXT) pseudoramiX.$(OBJEXT) +libXQuartz_a_OBJECTS = $(am_libXQuartz_a_OBJECTS) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_XDarwinStartup_OBJECTS = XDarwinStartup.$(OBJEXT) +XDarwinStartup_OBJECTS = $(am_XDarwinStartup_OBJECTS) +XDarwinStartup_LDADD = $(LDADD) +XDarwinStartup_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(XDarwinStartup_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +OBJCCOMPILE = $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) +LTOBJCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) +OBJCLD = $(OBJC) +SOURCES = $(libXQuartz_a_SOURCES) $(XDarwinStartup_SOURCES) +DIST_SOURCES = $(libXQuartz_a_SOURCES) $(XDarwinStartup_SOURCES) +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(man1_MANS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ $(AM_DEFS) -DXBINDIR=\"${bindir}\" +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LIBRARIES = libXQuartz.a +AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ +AM_OBJCFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ +INCLUDES = -I$(srcdir) -I$(srcdir)/.. @XORG_INCS@ +AM_DEFS = -DHAS_CG_MACH_PORT -DHAS_KL_API $(am__append_1) +libXQuartz_a_SOURCES = \ + Preferences.m \ + XApplication.m \ + XServer.m \ + applewm.c \ + keysym2ucs.c \ + quartz.c \ + quartzAudio.c \ + quartzCocoa.m \ + quartzPasteboard.c \ + quartzKeyboard.c \ + quartzStartup.c \ + pseudoramiX.c + +XDarwinStartup_SOURCES = XDarwinStartup.c +XDarwinStartup_LDFLAGS = -Wl,-framework,CoreFoundation \ + -Wl,-framework,ApplicationServices + +XDarwinStartupCFLAGS = -DXBINDIR="${bindir}" +XDARWINROOT = @APPLE_APPLICATIONS_DIR@ +BINDIR = $(bindir) +man1_MANS = XDarwinStartup.man +EXTRA_DIST = \ + applewmExt.h \ + keysym2ucs.h \ + Preferences.h \ + pseudoramiX.h \ + quartzAudio.h \ + quartzCommon.h \ + quartzCursor.c \ + quartzCursor.h \ + quartz.h \ + quartzPasteboard.h \ + XApplication.h \ + XDarwin.pbproj/project.pbxproj \ + XServer.h \ + XDarwinStartup.man + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .m .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/darwin/quartz/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/darwin/quartz/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libXQuartz.a: $(libXQuartz_a_OBJECTS) $(libXQuartz_a_DEPENDENCIES) + -rm -f libXQuartz.a + $(libXQuartz_a_AR) libXQuartz.a $(libXQuartz_a_OBJECTS) $(libXQuartz_a_LIBADD) + $(RANLIB) libXQuartz.a +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +XDarwinStartup$(EXEEXT): $(XDarwinStartup_OBJECTS) $(XDarwinStartup_DEPENDENCIES) + @rm -f XDarwinStartup$(EXEEXT) + $(XDarwinStartup_LINK) $(XDarwinStartup_OBJECTS) $(XDarwinStartup_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Preferences.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XApplication.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XDarwinStartup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XServer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/applewm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keysym2ucs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pseudoramiX.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartz.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartzAudio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartzCocoa.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartzKeyboard.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartzPasteboard.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartzStartup.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +.m.o: +@am__fastdepOBJC_TRUE@ $(OBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJCCOMPILE) -c -o $@ $< + +.m.obj: +@am__fastdepOBJC_TRUE@ $(OBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.m.lo: +@am__fastdepOBJC_TRUE@ $(LTOBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepOBJC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(LTOBJCCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man1: $(man1_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ + done +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool \ + clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS install-exec-local + +install-html: install-html-am + +install-info: install-info-am + +install-man: install-man1 + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-man + +uninstall-man: uninstall-man1 + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool clean-noinstLIBRARIES ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-exec-local install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-man \ + uninstall-man1 + +install-exec-local: + -(cd $(DESTDIR)$(BINDIR); rm X; $(LN_S) XDarwinStartup X) +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/darwin/quartz/Preferences.h b/xorg-server-1.4/hw/darwin/quartz/Preferences.h new file mode 100644 index 0000000..cf43758 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/Preferences.h @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2002-2003 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#import + +@interface Preferences : NSObject +{ + IBOutlet NSPanel *window; + IBOutlet id displayField; + IBOutlet id dockSwitchButton; + IBOutlet id fakeButton; + IBOutlet id button2ModifiersMatrix; + IBOutlet id button3ModifiersMatrix; + IBOutlet id switchKeyButton; + IBOutlet id keymapFileField; + IBOutlet id modeMatrix; + IBOutlet id modeWindowButton; + IBOutlet id startupHelpButton; + IBOutlet id systemBeepButton; + IBOutlet id mouseAccelChangeButton; + IBOutlet id useXineramaButton; + IBOutlet id addToPathButton; + IBOutlet id addToPathField; + IBOutlet id useDefaultShellMatrix; + IBOutlet id useOtherShellField; + IBOutlet id depthButton; + + BOOL isGettingKeyCode; + int keyCode; + int modifiers; + NSMutableString *switchString; +} + +- (IBAction)close:(id)sender; +- (IBAction)pickFile:(id)sender; +- (IBAction)saveChanges:(id)sender; +- (IBAction)setKey:(id)sender; + +- (BOOL)sendEvent:(NSEvent *)anEvent; + +- (void)awakeFromNib; +- (void)windowWillClose:(NSNotification *)aNotification; + ++ (void)setUseKeymapFile:(BOOL)newUseKeymapFile; ++ (void)setKeymapFile:(NSString *)newFile; ++ (void)setSwitchString:(NSString *)newString; ++ (void)setKeyCode:(int)newKeyCode; ++ (void)setModifiers:(int)newModifiers; ++ (void)setDisplay:(int)newDisplay; ++ (void)setDockSwitch:(BOOL)newDockSwitch; ++ (void)setFakeButtons:(BOOL)newFakeButtons; ++ (void)setButton2Mask:(int)newFakeMask; ++ (void)setButton3Mask:(int)newFakeMask; ++ (void)setMouseAccelChange:(BOOL)newMouseAccelChange; ++ (void)setUseQDCursor:(int)newUseQDCursor; ++ (void)setRootless:(BOOL)newRootless; ++ (void)setUseAGL:(BOOL)newUseAGL; ++ (void)setModeWindow:(BOOL)newModeWindow; ++ (void)setStartupHelp:(BOOL)newStartupHelp; ++ (void)setSystemBeep:(BOOL)newSystemBeep; ++ (void)setEnableKeyEquivalents:(BOOL)newKeyEquivs; ++ (void)setXinerama:(BOOL)newXinerama; ++ (void)setAddToPath:(BOOL)newAddToPath; ++ (void)setAddToPathString:(NSString *)newAddToPathString; ++ (void)setUseDefaultShell:(BOOL)newUseDefaultShell; ++ (void)setShellString:(NSString *)newShellString; ++ (void)setDepth:(int)newDepth; ++ (void)setDisplayModeBundles:(NSArray *)newBundles; ++ (void)saveToDisk; + ++ (BOOL)useKeymapFile; ++ (NSString *)keymapFile; ++ (NSString *)switchString; ++ (unsigned int)keyCode; ++ (unsigned int)modifiers; ++ (int)display; ++ (BOOL)dockSwitch; ++ (BOOL)fakeButtons; ++ (int)button2Mask; ++ (int)button3Mask; ++ (BOOL)mouseAccelChange; ++ (int)useQDCursor; ++ (BOOL)rootless; ++ (BOOL)useAGL; ++ (BOOL)modeWindow; ++ (BOOL)startupHelp; ++ (BOOL)systemBeep; ++ (BOOL)enableKeyEquivalents; ++ (BOOL)xinerama; ++ (BOOL)addToPath; ++ (NSString *)addToPathString; ++ (BOOL)useDefaultShell; ++ (NSString *)shellString; ++ (int)depth; ++ (NSArray *)displayModeBundles; + +@end + +// Possible settings for useQDCursor +enum { + qdCursor_Never, // never use QuickDraw cursor + qdCursor_Not8Bit, // don't try to use QuickDraw with 8-bit depth + qdCursor_Always // always try to use QuickDraw cursor +}; + +// Possible settings for depth +enum { + depth_Current, + depth_8Bit, + depth_15Bit, + depth_24Bit +}; diff --git a/xorg-server-1.4/hw/darwin/quartz/Preferences.m b/xorg-server-1.4/hw/darwin/quartz/Preferences.m new file mode 100644 index 0000000..eb78fd3 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/Preferences.m @@ -0,0 +1,599 @@ +// +// Preferences.m +// +// This class keeps track of the user preferences. +// +/* + * Copyright (c) 2002-2004 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#import "quartzCommon.h" + +#define BOOL xBOOL +#include "darwin.h" +#undef BOOL + +#import "Preferences.h" + +#include // for modifier masks + +// Macros to build the path name +#ifndef XBINDIR +#define XBINDIR /usr/X11/bin +#endif +#define STR(s) #s +#define XSTRPATH(s) STR(s) + +// Keys for user defaults dictionary +static NSString *X11EnableKeyEquivalentsKey = @"EnableKeyEquivalents"; + + +@implementation Preferences + ++ (void)initialize +{ + // Provide user defaults if needed + NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithInt:0], @"Display", + @"YES", @"FakeButtons", + [NSNumber numberWithInt:NX_COMMANDMASK], @"Button2Mask", + [NSNumber numberWithInt:NX_ALTERNATEMASK], @"Button3Mask", + NSLocalizedString(@"USA.keymapping",@""), @"KeymappingFile", + @"YES", @"UseKeymappingFile", + NSLocalizedString(@"Cmd-Opt-a",@""), @"SwitchString", + @"YES", @"UseRootlessMode", + @"YES", @"UseAGLforGLX", + @"YES", @"ShowModePickWindow", + @"YES", @"ShowStartupHelp", + [NSNumber numberWithInt:0], @"SwitchKeyCode", + [NSNumber numberWithInt:(NSCommandKeyMask | NSAlternateKeyMask)], + @"SwitchModifiers", @"NO", @"UseSystemBeep", + @"YES", X11EnableKeyEquivalentsKey, + @"YES", @"DockSwitch", + @"NO", @"AllowMouseAccelChange", + [NSNumber numberWithInt:qdCursor_Not8Bit], @"UseQDCursor", + @"YES", @"Xinerama", + @"YES", @"AddToPath", + [NSString stringWithCString:XSTRPATH(XBINDIR)], @"AddToPathString", + @"YES", @"UseDefaultShell", + @"/bin/tcsh", @"Shell", + [NSNumber numberWithInt:depth_Current], @"Depth", +#ifdef BUILD_XPR + [NSArray arrayWithObjects:@"xpr.bundle", @"cr.bundle", nil], +#else + [NSArray arrayWithObjects:@"cr.bundle", nil], +#endif + @"DisplayModeBundles", nil]; + + [super initialize]; + [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults]; +} + +// Initialize internal state info of switch key button +- (void)initSwitchKey +{ + keyCode = [Preferences keyCode]; + modifiers = [Preferences modifiers]; + [switchString setString:[Preferences switchString]]; +} + +- (id)init +{ + self = [super init]; + + isGettingKeyCode=NO; + switchString=[[NSMutableString alloc] init]; + [self initSwitchKey]; + + return self; +} + +// Set a modifiers checkbox matrix to match a modifier mask +- (void)resetMatrix:(NSMatrix *)aMatrix withMask:(int)aMask +{ + [aMatrix setState:(aMask & NX_SHIFTMASK) atRow:0 column:0]; + [aMatrix setState:(aMask & NX_CONTROLMASK) atRow:1 column:0]; + [aMatrix setState:(aMask & NX_COMMANDMASK) atRow:2 column:0]; + [aMatrix setState:(aMask & NX_ALTERNATEMASK) atRow:3 column:0]; + [aMatrix setState:(aMask & NX_SECONDARYFNMASK) atRow:4 column:0]; +} + +// Generate a modifiers mask from a modifiers checkbox matrix +- (int)getMaskFromMatrix:(NSMatrix *)aMatrix +{ + int theMask = 0; + + if ([[aMatrix cellAtRow:0 column:0] state]) + theMask |= NX_SHIFTMASK; + if ([[aMatrix cellAtRow:1 column:0] state]) + theMask |= NX_CONTROLMASK; + if ([[aMatrix cellAtRow:2 column:0] state]) + theMask |= NX_COMMANDMASK; + if ([[aMatrix cellAtRow:3 column:0] state]) + theMask |= NX_ALTERNATEMASK; + if ([[aMatrix cellAtRow:4 column:0] state]) + theMask |= NX_SECONDARYFNMASK; + + return theMask; +} + +// Set the window controls to the state in user defaults +- (void)resetWindow +{ + if ([Preferences keymapFile] == nil) + [keymapFileField setStringValue:@" "]; + else + [keymapFileField setStringValue:[Preferences keymapFile]]; + + if ([Preferences switchString] == nil) + [switchKeyButton setTitle:@"--"]; + else + [switchKeyButton setTitle:[Preferences switchString]]; + + [displayField setIntValue:[Preferences display]]; + [dockSwitchButton setIntValue:[Preferences dockSwitch]]; + [fakeButton setIntValue:[Preferences fakeButtons]]; + [self resetMatrix:button2ModifiersMatrix + withMask:[Preferences button2Mask]]; + [self resetMatrix:button3ModifiersMatrix + withMask:[Preferences button3Mask]]; + [modeMatrix setState:[Preferences rootless] atRow:0 column:1]; + [startupHelpButton setIntValue:[Preferences startupHelp]]; + [modeWindowButton setIntValue:[Preferences modeWindow]]; + [systemBeepButton setIntValue:[Preferences systemBeep]]; + [mouseAccelChangeButton setIntValue:[Preferences mouseAccelChange]]; + [useXineramaButton setIntValue:[Preferences xinerama]]; + [addToPathButton setIntValue:[Preferences addToPath]]; + [addToPathField setStringValue:[Preferences addToPathString]]; + [useDefaultShellMatrix setState:![Preferences useDefaultShell] + atRow:1 column:0]; + [useOtherShellField setStringValue:[Preferences shellString]]; + [depthButton selectItemAtIndex:[Preferences depth]]; +} + +- (void)awakeFromNib +{ + [self resetWindow]; +} + +// Preference window delegate +- (void)windowWillClose:(NSNotification *)aNotification +{ + [self resetWindow]; + [self initSwitchKey]; +} + +// User cancelled the changes +- (IBAction)close:(id)sender +{ + [window orderOut:nil]; + [self resetWindow]; // reset window controls + [self initSwitchKey]; // reset switch key state +} + +// Pick keymapping file +- (IBAction)pickFile:(id)sender +{ + int result; + NSArray *fileTypes = [NSArray arrayWithObject:@"keymapping"]; + NSOpenPanel *oPanel = [NSOpenPanel openPanel]; + + [oPanel setAllowsMultipleSelection:NO]; + result = [oPanel runModalForDirectory:@"/System/Library/Keyboards" + file:nil types:fileTypes]; + if (result == NSOKButton) { + [keymapFileField setStringValue:[oPanel filename]]; + } +} + +// User saved changes +- (IBAction)saveChanges:(id)sender +{ + [Preferences setKeyCode:keyCode]; + [Preferences setModifiers:modifiers]; + [Preferences setSwitchString:switchString]; + [Preferences setKeymapFile:[keymapFileField stringValue]]; + [Preferences setUseKeymapFile:YES]; + [Preferences setDisplay:[displayField intValue]]; + [Preferences setDockSwitch:[dockSwitchButton intValue]]; + [Preferences setFakeButtons:[fakeButton intValue]]; + [Preferences setButton2Mask: + [self getMaskFromMatrix:button2ModifiersMatrix]]; + [Preferences setButton3Mask: + [self getMaskFromMatrix:button3ModifiersMatrix]]; + [Preferences setRootless:[[modeMatrix cellAtRow:0 column:1] state]]; + [Preferences setModeWindow:[modeWindowButton intValue]]; + [Preferences setStartupHelp:[startupHelpButton intValue]]; + [Preferences setSystemBeep:[systemBeepButton intValue]]; + [Preferences setMouseAccelChange:[mouseAccelChangeButton intValue]]; + [Preferences setXinerama:[useXineramaButton intValue]]; + [Preferences setAddToPath:[addToPathButton intValue]]; + [Preferences setAddToPathString:[addToPathField stringValue]]; + [Preferences setUseDefaultShell: + [[useDefaultShellMatrix cellAtRow:0 column:0] state]]; + [Preferences setShellString:[useOtherShellField stringValue]]; + [Preferences setDepth:[depthButton indexOfSelectedItem]]; + [Preferences saveToDisk]; + + [window orderOut:nil]; +} + +- (IBAction)setKey:(id)sender +{ + [switchKeyButton setTitle:NSLocalizedString(@"Press key",@"")]; + isGettingKeyCode=YES; + [switchString setString:@""]; +} + +- (BOOL)sendEvent:(NSEvent *)anEvent +{ + if(isGettingKeyCode) { + if([anEvent type]==NSKeyDown) // wait for keyup + return YES; + if([anEvent type]!=NSKeyUp) + return NO; + + if([anEvent modifierFlags] & NSCommandKeyMask) + [switchString appendString:@"Cmd-"]; + if([anEvent modifierFlags] & NSControlKeyMask) + [switchString appendString:@"Ctrl-"]; + if([anEvent modifierFlags] & NSAlternateKeyMask) + [switchString appendString:@"Opt-"]; + if([anEvent modifierFlags] & NSNumericPadKeyMask) // doesn't work + [switchString appendString:@"Num-"]; + if([anEvent modifierFlags] & NSHelpKeyMask) + [switchString appendString:@"Help-"]; + if([anEvent modifierFlags] & NSFunctionKeyMask) // powerbooks only + [switchString appendString:@"Fn-"]; + + [switchString appendString:[anEvent charactersIgnoringModifiers]]; + [switchKeyButton setTitle:switchString]; + + keyCode = [anEvent keyCode]; + modifiers = [anEvent modifierFlags]; + isGettingKeyCode=NO; + + return YES; + } + return NO; +} + ++ (void)setKeymapFile:(NSString *)newFile +{ + [[NSUserDefaults standardUserDefaults] setObject:newFile + forKey:@"KeymappingFile"]; +} + ++ (void)setUseKeymapFile:(BOOL)newUseKeymapFile +{ + [[NSUserDefaults standardUserDefaults] setBool:newUseKeymapFile + forKey:@"UseKeymappingFile"]; +} + ++ (void)setSwitchString:(NSString *)newString +{ + [[NSUserDefaults standardUserDefaults] setObject:newString + forKey:@"SwitchString"]; +} + ++ (void)setKeyCode:(int)newKeyCode +{ + [[NSUserDefaults standardUserDefaults] setInteger:newKeyCode + forKey:@"SwitchKeyCode"]; +} + ++ (void)setModifiers:(int)newModifiers +{ + [[NSUserDefaults standardUserDefaults] setInteger:newModifiers + forKey:@"SwitchModifiers"]; +} + ++ (void)setDisplay:(int)newDisplay +{ + [[NSUserDefaults standardUserDefaults] setInteger:newDisplay + forKey:@"Display"]; +} + ++ (void)setDockSwitch:(BOOL)newDockSwitch +{ + [[NSUserDefaults standardUserDefaults] setBool:newDockSwitch + forKey:@"DockSwitch"]; +} + ++ (void)setFakeButtons:(BOOL)newFakeButtons +{ + [[NSUserDefaults standardUserDefaults] setBool:newFakeButtons + forKey:@"FakeButtons"]; + // Update the setting used by the X server thread + darwinFakeButtons = newFakeButtons; +} + ++ (void)setButton2Mask:(int)newFakeMask +{ + [[NSUserDefaults standardUserDefaults] setInteger:newFakeMask + forKey:@"Button2Mask"]; + // Update the setting used by the X server thread + darwinFakeMouse2Mask = newFakeMask; +} + ++ (void)setButton3Mask:(int)newFakeMask +{ + [[NSUserDefaults standardUserDefaults] setInteger:newFakeMask + forKey:@"Button3Mask"]; + // Update the setting used by the X server thread + darwinFakeMouse3Mask = newFakeMask; +} + ++ (void)setMouseAccelChange:(BOOL)newMouseAccelChange +{ + [[NSUserDefaults standardUserDefaults] setBool:newMouseAccelChange + forKey:@"AllowMouseAccelChange"]; + // Update the setting used by the X server thread + darwinMouseAccelChange = newMouseAccelChange; +} + ++ (void)setUseQDCursor:(int)newUseQDCursor +{ + [[NSUserDefaults standardUserDefaults] setInteger:newUseQDCursor + forKey:@"UseQDCursor"]; +} + ++ (void)setModeWindow:(BOOL)newModeWindow +{ + [[NSUserDefaults standardUserDefaults] setBool:newModeWindow + forKey:@"ShowModePickWindow"]; +} + ++ (void)setRootless:(BOOL)newRootless +{ + [[NSUserDefaults standardUserDefaults] setBool:newRootless + forKey:@"UseRootlessMode"]; +} + ++ (void)setUseAGL:(BOOL)newUseAGL +{ + [[NSUserDefaults standardUserDefaults] setBool:newUseAGL + forKey:@"UseAGLforGLX"]; +} + ++ (void)setStartupHelp:(BOOL)newStartupHelp +{ + [[NSUserDefaults standardUserDefaults] setBool:newStartupHelp + forKey:@"ShowStartupHelp"]; +} + ++ (void)setSystemBeep:(BOOL)newSystemBeep +{ + [[NSUserDefaults standardUserDefaults] setBool:newSystemBeep + forKey:@"UseSystemBeep"]; + // Update the setting used by the X server thread + quartzUseSysBeep = newSystemBeep; +} + ++ (void)setEnableKeyEquivalents:(BOOL)newKeyEquivs +{ + [[NSUserDefaults standardUserDefaults] setBool:newKeyEquivs + forKey:X11EnableKeyEquivalentsKey]; + // Update the setting used by the X server thread + quartzEnableKeyEquivalents = newKeyEquivs; +} + ++ (void)setXinerama:(BOOL)newXinerama +{ + [[NSUserDefaults standardUserDefaults] setBool:newXinerama + forKey:@"Xinerama"]; +} + ++ (void)setAddToPath:(BOOL)newAddToPath +{ + [[NSUserDefaults standardUserDefaults] setBool:newAddToPath + forKey:@"AddToPath"]; +} + ++ (void)setAddToPathString:(NSString *)newAddToPathString +{ + [[NSUserDefaults standardUserDefaults] setObject:newAddToPathString + forKey:@"AddToPathString"]; +} + ++ (void)setUseDefaultShell:(BOOL)newUseDefaultShell +{ + [[NSUserDefaults standardUserDefaults] setBool:newUseDefaultShell + forKey:@"UseDefaultShell"]; +} + ++ (void)setShellString:(NSString *)newShellString +{ + [[NSUserDefaults standardUserDefaults] setObject:newShellString + forKey:@"Shell"]; +} + ++ (void)setDepth:(int)newDepth +{ + [[NSUserDefaults standardUserDefaults] setInteger:newDepth + forKey:@"Depth"]; +} + ++ (void)setDisplayModeBundles:(NSArray *)newBundles +{ + [[NSUserDefaults standardUserDefaults] setObject:newBundles + forKey:@"DisplayModeBundles"]; +} + ++ (void)saveToDisk +{ + [[NSUserDefaults standardUserDefaults] synchronize]; +} + ++ (BOOL)useKeymapFile +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"UseKeymappingFile"]; +} + ++ (NSString *)keymapFile +{ + return [[NSUserDefaults standardUserDefaults] + stringForKey:@"KeymappingFile"]; +} + ++ (NSString *)switchString +{ + return [[NSUserDefaults standardUserDefaults] + stringForKey:@"SwitchString"]; +} + ++ (unsigned int)keyCode +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"SwitchKeyCode"]; +} + ++ (unsigned int)modifiers +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"SwitchModifiers"]; +} + ++ (int)display +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"Display"]; +} + ++ (BOOL)dockSwitch +{ + return [[NSUserDefaults standardUserDefaults] boolForKey:@"DockSwitch"]; +} + ++ (BOOL)fakeButtons +{ + return [[NSUserDefaults standardUserDefaults] boolForKey:@"FakeButtons"]; +} + ++ (int)button2Mask +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"Button2Mask"]; +} + ++ (int)button3Mask +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"Button3Mask"]; +} + ++ (BOOL)mouseAccelChange +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"AllowMouseAccelChange"]; +} + ++ (int)useQDCursor +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"UseQDCursor"]; +} + ++ (BOOL)rootless +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"UseRootlessMode"]; +} + ++ (BOOL)useAGL +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"UseAGLforGLX"]; +} + ++ (BOOL)modeWindow +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"ShowModePickWindow"]; +} + ++ (BOOL)startupHelp +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"ShowStartupHelp"]; +} + ++ (BOOL)systemBeep +{ + return [[NSUserDefaults standardUserDefaults] boolForKey:@"UseSystemBeep"]; +} + ++ (BOOL)enableKeyEquivalents +{ + return [[NSUserDefaults standardUserDefaults] boolForKey:X11EnableKeyEquivalentsKey]; +} + ++ (BOOL)xinerama +{ + return [[NSUserDefaults standardUserDefaults] boolForKey:@"Xinerama"]; +} + ++ (BOOL)addToPath +{ + return [[NSUserDefaults standardUserDefaults] boolForKey:@"AddToPath"]; +} + ++ (NSString *)addToPathString +{ + return [[NSUserDefaults standardUserDefaults] + stringForKey:@"AddToPathString"]; +} + ++ (BOOL)useDefaultShell +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"UseDefaultShell"]; +} + ++ (NSString *)shellString +{ + return [[NSUserDefaults standardUserDefaults] + stringForKey:@"Shell"]; +} + ++ (int)depth +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"Depth"]; +} + ++ (NSArray *)displayModeBundles +{ + return [[NSUserDefaults standardUserDefaults] + objectForKey:@"DisplayModeBundles"]; +} + +@end diff --git a/xorg-server-1.4/hw/darwin/quartz/XApplication.h b/xorg-server-1.4/hw/darwin/quartz/XApplication.h new file mode 100644 index 0000000..2f2b223 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/XApplication.h @@ -0,0 +1,46 @@ +// +// XApplication.h +// +// Created by Andreas Monitzer on January 6, 2001. +// +/* + * Copyright (c) 2001 Andreas Monitzer. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#import + +#import "XServer.h" +#import "Preferences.h" + +@interface XApplication : NSApplication { + IBOutlet XServer *xserver; + IBOutlet Preferences *preferences; +} + +- (void)sendEvent:(NSEvent *)anEvent; + +@end diff --git a/xorg-server-1.4/hw/darwin/quartz/XApplication.m b/xorg-server-1.4/hw/darwin/quartz/XApplication.m new file mode 100644 index 0000000..e0ee8d9 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/XApplication.m @@ -0,0 +1,47 @@ +// +// XApplication.m +// +// Created by Andreas Monitzer on January 6, 2001. +// +/* + * Copyright (c) 2001 Andreas Monitzer. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ +/* $XFree86: $ */ + +#import "XApplication.h" + + +@implementation XApplication + +- (void)sendEvent:(NSEvent *)anEvent { + if (![xserver translateEvent:anEvent]) { + if (![preferences sendEvent:anEvent]) + [super sendEvent:anEvent]; + } +} + +@end diff --git a/xorg-server-1.4/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj b/xorg-server-1.4/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj new file mode 100644 index 0000000..0ad8314 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj @@ -0,0 +1,2519 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 39; + objects = { + 01279092000747AA0A000002 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = XServer.m; + refType = 4; + sourceTree = ""; + }; + 0127909600074AF60A000002 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = XApplication.m; + refType = 4; + sourceTree = ""; + }; + 0127909800074B1A0A000002 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = XApplication.h; + refType = 4; + sourceTree = ""; + }; + 015698ED003DF345CE6F79C2 = { + isa = PBXFileReference; + lastKnownFileType = image.icns; + path = XDarwin.icns; + refType = 4; + sourceTree = ""; + }; + 0157A37D002CF6D7CE6F79C2 = { + children = ( + F533214601A4B45401000001, + 0157A37E002CF6D7CE6F79C2, + F58D65DF018F79B101000001, + F533213D0193CBE001000001, + 43B962E200617B93416877C2, + F5ACD263C5BE031F01000001, + F51BF62E02026E3501000001, + F5ACD25CC5B5E96601000001, + F587E16401924C6901000001, + ); + isa = PBXVariantGroup; + name = Credits.rtf; + path = ""; + refType = 4; + sourceTree = ""; + }; + 0157A37E002CF6D7CE6F79C2 = { + isa = PBXFileReference; + lastKnownFileType = text.rtf; + name = English; + path = English.lproj/Credits.rtf; + refType = 4; + sourceTree = ""; + }; + 015EDCEA004203A8CE6F79C2 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = IOKit.framework; + path = /System/Library/Frameworks/IOKit.framework; + refType = 0; + sourceTree = ""; + }; + 018F40F2003E1902CE6F79C2 = { + children = ( + 018F40F3003E1916CE6F79C2, + 021D6BA9003E1BACCE6F79C2, + 3E74E03600863F047F000001, + F5A94EF10314BAC70100011B, + 018F40F6003E1974CE6F79C2, + 6E5F5F0005537A1A008FEAD7, + ); + isa = PBXGroup; + name = "X Server"; + path = ..; + refType = 4; + sourceTree = ""; + }; + 018F40F3003E1916CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = darwin.c; + refType = 4; + sourceTree = ""; + }; + 018F40F6003E1974CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = darwinKeyboard.c; + refType = 4; + sourceTree = ""; + }; + 018F40F8003E1979CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = quartz.c; + refType = 4; + sourceTree = ""; + }; + 018F40FA003E197ECE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = quartz.h; + refType = 4; + sourceTree = ""; + }; + 018F40FC003E1983CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = xfIOKit.c; + refType = 4; + sourceTree = ""; + }; + 018F40FE003E1988CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = xfIOKit.h; + refType = 4; + sourceTree = ""; + }; + 018F4100003E19E4CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = xfIOKitCursor.c; + refType = 4; + sourceTree = ""; + }; +//010 +//011 +//012 +//013 +//014 +//020 +//021 +//022 +//023 +//024 + 021D6BA9003E1BACCE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = darwin.h; + refType = 4; + sourceTree = ""; + }; + 02A1FEA6006D34BE416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = xfIOKitStartup.c; + refType = 4; + sourceTree = ""; + }; + 02A1FEA8006D38F0416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = quartzStartup.c; + refType = 4; + sourceTree = ""; + }; + 02E03CA000348209CE6F79C2 = { + children = ( + F533214701A4B48301000001, + 02E03CA100348209CE6F79C2, + F58D65E0018F79C001000001, + F533213E0193CBF401000001, + 43B962E300617B93416877C2, + F5ACD268C5BE046401000001, + F51BF62F02026E5C01000001, + F5ACD261C5B5EA2001000001, + F587E16501924C7401000001, + ); + isa = PBXVariantGroup; + name = XDarwinHelp.html; + path = ""; + refType = 4; + sourceTree = ""; + }; + 02E03CA100348209CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.html; + name = English; + path = English.lproj/XDarwinHelp.html; + refType = 4; + sourceTree = ""; + }; +//020 +//021 +//022 +//023 +//024 +//030 +//031 +//032 +//033 +//034 + 0338412F0083BFE57F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = quartzCursor.h; + refType = 4; + sourceTree = ""; + }; +//030 +//031 +//032 +//033 +//034 +//040 +//041 +//042 +//043 +//044 + 04329610000763920A000002 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = Preferences.m; + refType = 4; + sourceTree = ""; + }; + 04329611000763920A000002 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = Preferences.h; + refType = 4; + sourceTree = ""; + }; +//040 +//041 +//042 +//043 +//044 +//080 +//081 +//082 +//083 +//084 + 080E96DDFE201D6D7F000001 = { + children = ( + 04329610000763920A000002, + 04329611000763920A000002, + 0127909600074AF60A000002, + 0127909800074B1A0A000002, + 01279092000747AA0A000002, + 1C4A3109004D8F24CE6F79C2, + ); + isa = PBXGroup; + name = Classes; + refType = 4; + sourceTree = ""; + }; + 089C165CFE840E0CC02AAC07 = { + children = ( + F533214301A4B3F001000001, + 089C165DFE840E0CC02AAC07, + F58D65DD018F798F01000001, + F533213A0193CBA201000001, + 43B962E100617B49416877C2, + F5ACD269C5BE049301000001, + F51BF62B02026DDA01000001, + F5ACD262C5B5EA4D01000001, + F587E16101924C2F01000001, + ); + isa = PBXVariantGroup; + name = InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; + 089C165DFE840E0CC02AAC07 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = English; + path = English.lproj/InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; +//080 +//081 +//082 +//083 +//084 +//0A0 +//0A1 +//0A2 +//0A3 +//0A4 + 0A79E19E004499A1CE6F79C2 = { + explicitFileType = wrapper.application; + isa = PBXFileReference; + path = XDarwin.app; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 0A79E19F004499A1CE6F79C2 = { + buildPhases = ( + 0A79E1A0004499A1CE6F79C2, + 0A79E1A1004499A1CE6F79C2, + 0A79E1A2004499A1CE6F79C2, + 0A79E1A3004499A1CE6F79C2, + 0A79E1A4004499A1CE6F79C2, + ); + buildSettings = { + INSTALL_PATH = /; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = XDarwin; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + WRAPPER_EXTENSION = app; + }; + dependencies = ( + 6EF065C903D4F0CA006877C2, + 6EF065C703D4EE19006877C2, + 6E11A986048BDFFB006877C2, + 6E7904110500F33B00EEC080, + ); + isa = PBXApplicationTarget; + name = XDarwin; + productInstallPath = /; + productName = XDarwin; + productReference = 0A79E19E004499A1CE6F79C2; + productSettingsXML = " + + + + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + x11app + + CFBundleTypeName + X11 Application + CFBundleTypeOSTypes + + **** + + CFBundleTypeRole + Viewer + + + CFBundleTypeExtensions + + tool + * + + CFBundleTypeName + UNIX Application + CFBundleTypeOSTypes + + **** + + CFBundleTypeRole + Viewer + + + CFBundleExecutable + XDarwin + CFBundleGetInfoString + XDarwin 1.4.0, X.Org Foundation + CFBundleIconFile + XDarwin.icns + CFBundleIdentifier + org.x.x11 + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + XDarwin + CFBundlePackageType + APPL + CFBundleShortVersionString + XDarwin 1.4.0 + CFBundleSignature + ???? + CFBundleVersion + + NSHelpFile + XDarwinHelp.html + NSMainNibFile + MainMenu + NSPrincipalClass + XApplication + + +"; + }; + 0A79E1A0004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 0A79E1A1004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + 0A79E1A600449EB2CE6F79C2, + 0A79E1A700449EB2CE6F79C2, + 0A79E1A800449EB2CE6F79C2, + 0A79E1A900449EB2CE6F79C2, + 0A79E1AA00449EB2CE6F79C2, + 1220774500712D2D416877C2, + F54BF6ED017D506E01000001, + ); + isa = PBXResourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 0A79E1A2004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 0A79E1A3004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 0A79E1A4004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 0A79E1A600449EB2CE6F79C2 = { + fileRef = 29B97318FDCFA39411CA2CEA; + isa = PBXBuildFile; + settings = { + }; + }; + 0A79E1A700449EB2CE6F79C2 = { + fileRef = 089C165CFE840E0CC02AAC07; + isa = PBXBuildFile; + settings = { + }; + }; + 0A79E1A800449EB2CE6F79C2 = { + fileRef = 0157A37D002CF6D7CE6F79C2; + isa = PBXBuildFile; + settings = { + }; + }; + 0A79E1A900449EB2CE6F79C2 = { + fileRef = 02E03CA000348209CE6F79C2; + isa = PBXBuildFile; + settings = { + }; + }; + 0A79E1AA00449EB2CE6F79C2 = { + fileRef = 015698ED003DF345CE6F79C2; + isa = PBXBuildFile; + settings = { + }; + }; +//0A0 +//0A1 +//0A2 +//0A3 +//0A4 +//100 +//101 +//102 +//103 +//104 + 1058C7A0FEA54F0111CA2CBB = { + children = ( + F53321400193CCF001000001, + 1BE4F84D0006C9890A000002, + 1058C7A1FEA54F0111CA2CBB, + F53321410193CCF001000001, + 015EDCEA004203A8CE6F79C2, + ); + isa = PBXGroup; + name = "Linked Frameworks"; + refType = 4; + sourceTree = ""; + }; + 1058C7A1FEA54F0111CA2CBB = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = Cocoa.framework; + path = /System/Library/Frameworks/Cocoa.framework; + refType = 0; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB = { + children = ( + 29B97325FDCFA39411CA2CEA, + 29B97324FDCFA39411CA2CEA, + ); + isa = PBXGroup; + name = "Other Frameworks"; + refType = 4; + sourceTree = ""; + }; +//100 +//101 +//102 +//103 +//104 +//120 +//121 +//122 +//123 +//124 + 1220774300712D2D416877C2 = { + children = ( + F533214501A4B42501000001, + 1220774400712D2D416877C2, + F58D65DE018F79A001000001, + F533213C0193CBC901000001, + 1220774600712D75416877C2, + F5ACD266C5BE03C501000001, + F51BF62D02026E1C01000001, + F5ACD25FC5B5E9AA01000001, + F587E16301924C5E01000001, + ); + isa = PBXVariantGroup; + name = Localizable.strings; + path = ""; + refType = 4; + sourceTree = ""; + }; + 1220774400712D2D416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = English; + path = English.lproj/Localizable.strings; + refType = 4; + sourceTree = ""; + }; + 1220774500712D2D416877C2 = { + fileRef = 1220774300712D2D416877C2; + isa = PBXBuildFile; + settings = { + }; + }; + 1220774600712D75416877C2 = { + fileEncoding = 10; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = Japanese; + path = Japanese.lproj/Localizable.strings; + refType = 4; + sourceTree = ""; + }; +//120 +//121 +//122 +//123 +//124 +//170 +//171 +//172 +//173 +//174 + 170DFAFF00729A35416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = XDarwinStartup.c; + refType = 4; + sourceTree = ""; + }; + 170DFB0000729C86416877C2 = { + children = ( + 018F40FC003E1983CE6F79C2, + 018F40FE003E1988CE6F79C2, + 018F4100003E19E4CE6F79C2, + 02A1FEA6006D34BE416877C2, + ); + isa = PBXGroup; + name = IOKit; + path = ../iokit; + refType = 4; + sourceTree = ""; + }; +//170 +//171 +//172 +//173 +//174 +//190 +//191 +//192 +//193 +//194 + 19C28FACFE9D520D11CA2CBB = { + children = ( + 0A79E19E004499A1CE6F79C2, + 6EF7C58703D3BC6D00000104, + 6EF065C603D4EE19006877C2, + 6E11A985048BDFEE006877C2, + 6E7904100500F05600EEC080, + ); + isa = PBXGroup; + name = Products; + refType = 4; + sourceTree = ""; + }; +//190 +//191 +//192 +//193 +//194 +//1B0 +//1B1 +//1B2 +//1B3 +//1B4 + 1BD8DE4200B8A3567F000001 = { + children = ( + F533214401A4B40F01000001, + 1BD8DE4300B8A3567F000001, + F58D65DC018F794D01000001, + F533213B0193CBB401000001, + 1BD8DE4700B8A3C77F000001, + F5ACD264C5BE035B01000001, + F51BF62C02026E0601000001, + F5ACD25DC5B5E97701000001, + F587E16201924C5301000001, + ); + isa = PBXVariantGroup; + name = InfoPlist.strings.cpp; + path = ""; + refType = 4; + sourceTree = ""; + }; + 1BD8DE4300B8A3567F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = English; + path = English.lproj/InfoPlist.strings.cpp; + refType = 4; + sourceTree = ""; + }; + 1BD8DE4400B8A38E7F000001 = { + children = ( + F533214801A4B4D701000001, + 1BD8DE4500B8A38E7F000001, + F58D65E1018F79E001000001, + F533213F0193CC2501000001, + 1BD8DE4800B8A4167F000001, + F5ACD267C5BE03FC01000001, + F51BF63002026E8D01000001, + F5ACD260C5B5E9DF01000001, + F587E16601924C9D01000001, + ); + isa = PBXVariantGroup; + name = XDarwinHelp.html.cpp; + path = ""; + refType = 4; + sourceTree = ""; + }; + 1BD8DE4500B8A38E7F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = English; + path = English.lproj/XDarwinHelp.html.cpp; + refType = 4; + sourceTree = ""; + }; + 1BD8DE4700B8A3C77F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = Japanese; + path = Japanese.lproj/InfoPlist.strings.cpp; + refType = 4; + sourceTree = ""; + }; + 1BD8DE4800B8A4167F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = Japanese; + path = Japanese.lproj/XDarwinHelp.html.cpp; + refType = 4; + sourceTree = ""; + }; + 1BE4F84D0006C9890A000002 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = Carbon.framework; + path = /System/Library/Frameworks/Carbon.framework; + refType = 0; + sourceTree = ""; + }; +//1B0 +//1B1 +//1B2 +//1B3 +//1B4 +//1C0 +//1C1 +//1C2 +//1C3 +//1C4 + 1C4A3109004D8F24CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = XServer.h; + refType = 4; + sourceTree = ""; + }; +//1C0 +//1C1 +//1C2 +//1C3 +//1C4 +//230 +//231 +//232 +//233 +//234 + 237A34C10076E37E7F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = quartzAudio.c; + refType = 4; + sourceTree = ""; + }; + 237A34C20076E37E7F000001 = { + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + OPTIMIZATION_CFLAGS = "-O0"; + ZERO_LINK = YES; + }; + isa = PBXBuildStyle; + name = Development; + }; + 237A34C30076E37E7F000001 = { + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + ZERO_LINK = NO; + }; + isa = PBXBuildStyle; + name = Deployment; + }; + 237A34C40076F4F07F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = quartzAudio.h; + refType = 4; + sourceTree = ""; + }; +//230 +//231 +//232 +//233 +//234 +//290 +//291 +//292 +//293 +//294 + 29B97313FDCFA39411CA2CEA = { + buildSettings = { + }; + buildStyles = ( + 237A34C20076E37E7F000001, + 237A34C30076E37E7F000001, + ); + hasScannedForEncodings = 1; + isa = PBXProject; + knownRegions = ( + English, + Japanese, + French, + German, + Swedish, + Dutch, + Spanish, + ko, + Portuguese, + ); + mainGroup = 29B97314FDCFA39411CA2CEA; + projectDirPath = ""; + targets = ( + 0A79E19F004499A1CE6F79C2, + 6EF7C58603D3BC6D00000104, + 6E11A984048BDFEE006877C2, + 6EF065C503D4EE19006877C2, + 6E79040F0500F05600EEC080, + ); + }; + 29B97314FDCFA39411CA2CEA = { + children = ( + 080E96DDFE201D6D7F000001, + 018F40F2003E1902CE6F79C2, + 170DFB0000729C86416877C2, + 43B962CE00617089416877C2, + F5614B3D025112D901000114, + 6EC4A64C042A9597006877C2, + 32FEE13C00E07C3E7F000001, + 6EE1214104968658006877C2, + 6EC4A66D042A97FC006877C2, + 29B97315FDCFA39411CA2CEA, + 29B97317FDCFA39411CA2CEA, + 29B97323FDCFA39411CA2CEA, + 19C28FACFE9D520D11CA2CBB, + ); + isa = PBXGroup; + name = "Xmaster-Cocoa"; + path = ""; + refType = 4; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA = { + children = ( + 170DFAFF00729A35416877C2, + ); + isa = PBXGroup; + name = "Other Sources"; + path = ""; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + 29B97317FDCFA39411CA2CEA = { + children = ( + 29B97318FDCFA39411CA2CEA, + 089C165CFE840E0CC02AAC07, + 1BD8DE4200B8A3567F000001, + 1220774300712D2D416877C2, + 0157A37D002CF6D7CE6F79C2, + 02E03CA000348209CE6F79C2, + 1BD8DE4400B8A38E7F000001, + 015698ED003DF345CE6F79C2, + F54BF6EA017D500901000001, + F54BF6EC017D506E01000001, + ); + isa = PBXGroup; + name = Resources; + path = ../bundle; + refType = 4; + sourceTree = ""; + }; + 29B97318FDCFA39411CA2CEA = { + children = ( + F533214201A4B3CE01000001, + 29B97319FDCFA39411CA2CEA, + F58D65DB018F793801000001, + F53321390193CB6A01000001, + 43B962E000617B49416877C2, + F5ACD265C5BE038601000001, + F51BF62A02026DAF01000001, + F5ACD25EC5B5E98D01000001, + F587E16001924C1D01000001, + ); + isa = PBXVariantGroup; + name = MainMenu.nib; + path = ""; + refType = 4; + sourceTree = ""; + }; + 29B97319FDCFA39411CA2CEA = { + isa = PBXFileReference; + lastKnownFileType = wrapper.nib; + name = English; + path = English.lproj/MainMenu.nib; + refType = 4; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA = { + children = ( + 1058C7A0FEA54F0111CA2CBB, + 1058C7A2FEA54F0111CA2CBB, + ); + isa = PBXGroup; + name = Frameworks; + path = ""; + refType = 4; + sourceTree = ""; + }; + 29B97324FDCFA39411CA2CEA = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = AppKit.framework; + path = /System/Library/Frameworks/AppKit.framework; + refType = 0; + sourceTree = ""; + }; + 29B97325FDCFA39411CA2CEA = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = Foundation.framework; + path = /System/Library/Frameworks/Foundation.framework; + refType = 0; + sourceTree = ""; + }; +//290 +//291 +//292 +//293 +//294 +//320 +//321 +//322 +//323 +//324 + 32FEE13C00E07C3E7F000001 = { + children = ( + F5269C2D01D5BC3501000001, + F5269C2E01D5BC3501000001, + ); + isa = PBXGroup; + name = "Old Cocoa Imp"; + path = ""; + refType = 4; + sourceTree = ""; + }; +//320 +//321 +//322 +//323 +//324 +//350 +//351 +//352 +//353 +//354 + 3576829A0077B8F17F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = quartzCursor.c; + refType = 4; + sourceTree = ""; + }; +//350 +//351 +//352 +//353 +//354 +//3E0 +//3E1 +//3E2 +//3E3 +//3E4 + 3E74E03600863F047F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = darwinClut8.h; + refType = 4; + sourceTree = ""; + }; +//3E0 +//3E1 +//3E2 +//3E3 +//3E4 +//430 +//431 +//432 +//433 +//434 + 43B962CE00617089416877C2 = { + children = ( + 6EE9B21604E859C200CA7FEA, + 6E97A0F505079F9100B8294C, + 6E5F5F030553815A008FEAD7, + 6E5F5F040553815A008FEAD7, + 018F40F8003E1979CE6F79C2, + 018F40FA003E197ECE6F79C2, + 237A34C10076E37E7F000001, + 237A34C40076F4F07F000001, + 43B962CF00617089416877C2, + F5582948015DAD3B01000001, + 6E5F5F0105537A5F008FEAD7, + 43B962D000617089416877C2, + 43B962D100617089416877C2, + 02A1FEA8006D38F0416877C2, + ); + isa = PBXGroup; + name = Quartz; + path = ""; + refType = 4; + sourceTree = ""; + }; + 43B962CF00617089416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = quartzCocoa.m; + refType = 4; + sourceTree = ""; + }; + 43B962D000617089416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = quartzPasteboard.c; + refType = 4; + sourceTree = ""; + }; + 43B962D100617089416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = quartzPasteboard.h; + refType = 4; + sourceTree = ""; + }; + 43B962E000617B49416877C2 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.nib; + name = Japanese; + path = Japanese.lproj/MainMenu.nib; + refType = 4; + sourceTree = ""; + }; + 43B962E100617B49416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = Japanese; + path = Japanese.lproj/InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; + 43B962E200617B93416877C2 = { + isa = PBXFileReference; + lastKnownFileType = text.rtf; + name = Japanese; + path = Japanese.lproj/Credits.rtf; + refType = 4; + sourceTree = ""; + }; + 43B962E300617B93416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.html; + name = Japanese; + path = Japanese.lproj/XDarwinHelp.html; + refType = 4; + sourceTree = ""; + }; +//430 +//431 +//432 +//433 +//434 +//6E0 +//6E1 +//6E2 +//6E3 +//6E4 + 6E11A97F048BDFEE006877C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6E11A980048BDFEE006877C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXResourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6E11A981048BDFEE006877C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6E11A982048BDFEE006877C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6E11A983048BDFEE006877C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6E11A984048BDFEE006877C2 = { + buildPhases = ( + 6E11A97F048BDFEE006877C2, + 6E11A980048BDFEE006877C2, + 6E11A981048BDFEE006877C2, + 6E11A982048BDFEE006877C2, + 6E11A983048BDFEE006877C2, + ); + buildSettings = { + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = glxCGL; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + WRAPPER_EXTENSION = bundle; + }; + dependencies = ( + ); + isa = PBXBundleTarget; + name = glxCGL; + productInstallPath = "$(USER_LIBRARY_DIR)/Bundles"; + productName = glxCGL; + productReference = 6E11A985048BDFEE006877C2; + productSettingsXML = " + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + glxCGL + CFBundleGetInfoString + + CFBundleIconFile + + CFBundleIdentifier + + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + GLX bundle using Apple's OpenGL + CFBundlePackageType + BNDL + CFBundleShortVersionString + 0.1 + CFBundleSignature + ???? + CFBundleVersion + 0.1 + + +"; + }; + 6E11A985048BDFEE006877C2 = { + explicitFileType = wrapper.cfbundle; + isa = PBXFileReference; + path = glxCGL.bundle; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 6E11A986048BDFFB006877C2 = { + isa = PBXTargetDependency; + target = 6E11A984048BDFEE006877C2; + targetProxy = 6E4CAF650702464F001A7398; + }; + 6E4CAF630702464F001A7398 = { + containerPortal = 29B97313FDCFA39411CA2CEA; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = 6EF7C58603D3BC6D00000104; + remoteInfo = glxAGL; + }; + 6E4CAF640702464F001A7398 = { + containerPortal = 29B97313FDCFA39411CA2CEA; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = 6E79040F0500F05600EEC080; + remoteInfo = xpr; + }; + 6E4CAF650702464F001A7398 = { + containerPortal = 29B97313FDCFA39411CA2CEA; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = 6E11A984048BDFEE006877C2; + remoteInfo = glxCGL; + }; + 6E4CAF660702464F001A7398 = { + containerPortal = 29B97313FDCFA39411CA2CEA; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = 6EF065C503D4EE19006877C2; + remoteInfo = glxMesa; + }; + 6E5F5F0005537A1A008FEAD7 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = darwinKeyboard.h; + refType = 4; + sourceTree = ""; + }; + 6E5F5F0105537A5F008FEAD7 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = quartzKeyboard.c; + refType = 4; + sourceTree = ""; + }; + 6E5F5F030553815A008FEAD7 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = keysym2ucs.c; + refType = 4; + sourceTree = ""; + }; + 6E5F5F040553815A008FEAD7 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = keysym2ucs.h; + refType = 4; + sourceTree = ""; + }; + 6E6656EC048832CF006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = "x-hook.c"; + refType = 4; + sourceTree = ""; + }; + 6E6656ED048832CF006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = "x-hook.h"; + refType = 4; + sourceTree = ""; + }; + 6E6656F0048832EC006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = dri.c; + refType = 4; + sourceTree = ""; + }; + 6E6656F1048832EC006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = dri.h; + refType = 4; + sourceTree = ""; + }; + 6E6656F2048832EC006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = dristruct.h; + refType = 4; + sourceTree = ""; + }; + 6E6656F3048832F9006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = appledri.c; + refType = 4; + sourceTree = ""; + }; + 6E79040104FD5ED900EEC080 = { + children = ( + 6E79040204FD5EDA00EEC080, + 6E79040304FD5EDA00EEC080, + 6E79040404FD5EDA00EEC080, + ); + isa = PBXGroup; + name = "Safe Alpha"; + path = safeAlpha; + refType = 4; + sourceTree = ""; + }; + 6E79040204FD5EDA00EEC080 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = safeAlpha.h; + refType = 4; + sourceTree = ""; + }; + 6E79040304FD5EDA00EEC080 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = safeAlphaPicture.c; + refType = 4; + sourceTree = ""; + }; + 6E79040404FD5EDA00EEC080 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = safeAlphaWindow.c; + refType = 4; + sourceTree = ""; + }; + 6E79040A0500F05600EEC080 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6E79040B0500F05600EEC080 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXResourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6E79040C0500F05600EEC080 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6E79040D0500F05600EEC080 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6E79040E0500F05600EEC080 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6E79040F0500F05600EEC080 = { + buildPhases = ( + 6E79040A0500F05600EEC080, + 6E79040B0500F05600EEC080, + 6E79040C0500F05600EEC080, + 6E79040D0500F05600EEC080, + 6E79040E0500F05600EEC080, + ); + buildSettings = { + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = xpr; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + WRAPPER_EXTENSION = bundle; + }; + dependencies = ( + ); + isa = PBXBundleTarget; + name = xpr; + productInstallPath = "$(USER_LIBRARY_DIR)/Bundles"; + productName = xpr; + productReference = 6E7904100500F05600EEC080; + productSettingsXML = " + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + xpr + CFBundleGetInfoString + + CFBundleIconFile + + CFBundleIdentifier + + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Xplugin rootless implementation + CFBundlePackageType + BNDL + CFBundleShortVersionString + 0.1 + CFBundleSignature + ???? + CFBundleVersion + 0.1 + + +"; + }; + 6E7904100500F05600EEC080 = { + explicitFileType = wrapper.cfbundle; + isa = PBXFileReference; + path = xpr.bundle; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 6E7904110500F33B00EEC080 = { + isa = PBXTargetDependency; + target = 6E79040F0500F05600EEC080; + targetProxy = 6E4CAF640702464F001A7398; + }; + 6E97A0F2050798B100B8294C = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = xprAppleWM.c; + refType = 4; + sourceTree = ""; + }; + 6E97A0F305079B6500B8294C = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = crAppleWM.m; + refType = 4; + sourceTree = ""; + }; + 6E97A0F505079F9100B8294C = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = applewmExt.h; + refType = 4; + sourceTree = ""; + }; + 6EA0B3AF0544A9CC006877C2 = { + children = ( + 6EA0B3B00544A9CC006877C2, + 6EA0B3B10544A9CC006877C2, + 6EA0B3B20544A9CC006877C2, + 6EA0B3B30544A9CC006877C2, + 6EA0B3B40544A9CC006877C2, + 6EA0B3B50544A9CC006877C2, + 6EA0B3B60544A9CC006877C2, + 6EA0B3B70544A9CC006877C2, + ); + isa = PBXGroup; + name = Acceleration; + path = accel; + refType = 4; + sourceTree = ""; + }; + 6EA0B3B00544A9CC006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = rlAccel.h; + refType = 4; + sourceTree = ""; + }; + 6EA0B3B10544A9CC006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = rlBlt.c; + refType = 4; + sourceTree = ""; + }; + 6EA0B3B20544A9CC006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = rlCopy.c; + refType = 4; + sourceTree = ""; + }; + 6EA0B3B30544A9CC006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = rlFill.c; + refType = 4; + sourceTree = ""; + }; + 6EA0B3B40544A9CC006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = rlFillRect.c; + refType = 4; + sourceTree = ""; + }; + 6EA0B3B50544A9CC006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = rlFillSpans.c; + refType = 4; + sourceTree = ""; + }; + 6EA0B3B60544A9CC006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = rlGlyph.c; + refType = 4; + sourceTree = ""; + }; + 6EA0B3B70544A9CC006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = rlSolid.c; + refType = 4; + sourceTree = ""; + }; + 6EA8EEC80445E25C006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = rootlessConfig.h; + refType = 4; + sourceTree = ""; + }; + 6EC4A64C042A9597006877C2 = { + children = ( + 6EC4A65D042A9654006877C2, + 6EC4A65E042A9654006877C2, + 6EC4A65F042A9654006877C2, + 6EA8EEC80445E25C006877C2, + 6EC4A661042A9654006877C2, + 6EC4A662042A9654006877C2, + 6EC4A660042A9654006877C2, + 6EC4A663042A9654006877C2, + 6EC4A664042A9654006877C2, + 6EA0B3AF0544A9CC006877C2, + 6E79040104FD5ED900EEC080, + ); + isa = PBXGroup; + name = Rootless; + path = ../../../miext/rootless; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + 6EC4A65D042A9654006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = rootless.h; + refType = 4; + sourceTree = ""; + }; + 6EC4A65E042A9654006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = rootlessCommon.c; + refType = 4; + sourceTree = ""; + }; + 6EC4A65F042A9654006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = rootlessCommon.h; + refType = 4; + sourceTree = ""; + }; + 6EC4A660042A9654006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = rootlessWindow.h; + refType = 4; + sourceTree = ""; + }; + 6EC4A661042A9654006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = rootlessScreen.c; + refType = 4; + sourceTree = ""; + }; + 6EC4A662042A9654006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = rootlessWindow.c; + refType = 4; + sourceTree = ""; + }; + 6EC4A663042A9654006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = rootlessGC.c; + refType = 4; + sourceTree = ""; + }; + 6EC4A664042A9654006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = rootlessValTree.c; + refType = 4; + sourceTree = ""; + }; + 6EC4A66D042A97FC006877C2 = { + children = ( + 6EF471A004478DE0006877C2, + 6E6656F3048832F9006877C2, + 6E6656F0048832EC006877C2, + 6E6656F1048832EC006877C2, + 6E6656F2048832EC006877C2, + 6ECF218404589E4D006877C2, + 6E97A0F2050798B100B8294C, + 6ECF218604589F40006877C2, + 6EF4719E04478B08006877C2, + 6EDDB2DF04508B2C006877C2, + 6EF471A204479263006877C2, + 6EF471A404479263006877C2, + 6E6656EC048832CF006877C2, + 6E6656ED048832CF006877C2, + 6EF471A504479263006877C2, + 6EF471A304479263006877C2, + ); + isa = PBXGroup; + path = xpr; + refType = 4; + sourceTree = ""; + }; + 6ECF218404589E4D006877C2 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = xpr.h; + refType = 4; + sourceTree = ""; + }; + 6ECF218604589F40006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = xprCursor.c; + refType = 4; + sourceTree = ""; + }; + 6EDDB2DF04508B2C006877C2 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = xprScreen.c; + refType = 4; + sourceTree = ""; + }; + 6EE1214104968658006877C2 = { + children = ( + 6EE1214304968692006877C2, + 6EE1214404968692006877C2, + 6EE1214204968692006877C2, + 6E97A0F305079B6500B8294C, + 6EE1214504968692006877C2, + 6EE1214604968692006877C2, + ); + isa = PBXGroup; + path = cr; + refType = 4; + sourceTree = ""; + }; + 6EE1214204968692006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = cr.h; + refType = 4; + sourceTree = ""; + }; + 6EE1214304968692006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = XView.m; + refType = 4; + sourceTree = ""; + }; + 6EE1214404968692006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = XView.h; + refType = 4; + sourceTree = ""; + }; + 6EE1214504968692006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = crFrame.m; + refType = 4; + sourceTree = ""; + }; + 6EE1214604968692006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = crScreen.m; + refType = 4; + sourceTree = ""; + }; + 6EE9B21604E859C200CA7FEA = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = applewm.c; + refType = 4; + sourceTree = ""; + }; + 6EF065C003D4EE19006877C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF065C103D4EE19006877C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXResourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF065C203D4EE19006877C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF065C303D4EE19006877C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF065C403D4EE19006877C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF065C503D4EE19006877C2 = { + buildPhases = ( + 6EF065C003D4EE19006877C2, + 6EF065C103D4EE19006877C2, + 6EF065C203D4EE19006877C2, + 6EF065C303D4EE19006877C2, + 6EF065C403D4EE19006877C2, + ); + buildSettings = { + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = glxMesa; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + WRAPPER_EXTENSION = bundle; + }; + dependencies = ( + ); + isa = PBXBundleTarget; + name = glxMesa; + productInstallPath = "$(USER_LIBRARY_DIR)/Bundles"; + productName = glxMesa; + productReference = 6EF065C603D4EE19006877C2; + productSettingsXML = " + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + glxMesa + CFBundleGetInfoString + + CFBundleIconFile + + CFBundleIdentifier + + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + GLX bundle with Mesa + CFBundlePackageType + BNDL + CFBundleShortVersionString + 0.1 + CFBundleSignature + ???? + CFBundleVersion + 0.1 + + +"; + }; + 6EF065C603D4EE19006877C2 = { + explicitFileType = wrapper.cfbundle; + isa = PBXFileReference; + path = glxMesa.bundle; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 6EF065C703D4EE19006877C2 = { + isa = PBXTargetDependency; + target = 6EF065C503D4EE19006877C2; + targetProxy = 6E4CAF660702464F001A7398; + }; + 6EF065C903D4F0CA006877C2 = { + isa = PBXTargetDependency; + target = 6EF7C58603D3BC6D00000104; + targetProxy = 6E4CAF630702464F001A7398; + }; + 6EF4719E04478B08006877C2 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = xprFrame.c; + refType = 4; + sourceTree = ""; + }; + 6EF471A004478DE0006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = Xplugin.h; + refType = 4; + sourceTree = ""; + }; + 6EF471A204479263006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = "x-hash.c"; + refType = 4; + sourceTree = ""; + }; + 6EF471A304479263006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = "x-list.h"; + refType = 4; + sourceTree = ""; + }; + 6EF471A404479263006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = "x-hash.h"; + refType = 4; + sourceTree = ""; + }; + 6EF471A504479263006877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = "x-list.c"; + refType = 4; + sourceTree = ""; + }; + 6EF7C58103D3BC6D00000104 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF7C58203D3BC6D00000104 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXResourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF7C58303D3BC6D00000104 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF7C58403D3BC6D00000104 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF7C58503D3BC6D00000104 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF7C58603D3BC6D00000104 = { + buildPhases = ( + 6EF7C58103D3BC6D00000104, + 6EF7C58203D3BC6D00000104, + 6EF7C58303D3BC6D00000104, + 6EF7C58403D3BC6D00000104, + 6EF7C58503D3BC6D00000104, + ); + buildSettings = { + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = glxAGL; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + WRAPPER_EXTENSION = bundle; + }; + dependencies = ( + ); + isa = PBXBundleTarget; + name = glxAGL; + productName = glxAGL; + productReference = 6EF7C58703D3BC6D00000104; + productSettingsXML = " + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + glxAGL + CFBundleGetInfoString + + CFBundleIconFile + + CFBundleIdentifier + + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + GLX bundle using AGL framework + CFBundlePackageType + BNDL + CFBundleShortVersionString + 0.1 + CFBundleSignature + ???? + CFBundleVersion + 0.1 + + +"; + }; + 6EF7C58703D3BC6D00000104 = { + explicitFileType = wrapper.cfbundle; + isa = PBXFileReference; + path = glxAGL.bundle; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; +//6E0 +//6E1 +//6E2 +//6E3 +//6E4 +//F50 +//F51 +//F52 +//F53 +//F54 + F51BF62A02026DAF01000001 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.nib; + name = Portuguese; + path = Portuguese.lproj/MainMenu.nib; + refType = 4; + sourceTree = ""; + }; + F51BF62B02026DDA01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = Portuguese; + path = Portuguese.lproj/InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; + F51BF62C02026E0601000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = Portuguese; + path = Portuguese.lproj/InfoPlist.strings.cpp; + refType = 4; + sourceTree = ""; + }; + F51BF62D02026E1C01000001 = { + fileEncoding = 10; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = Portuguese; + path = Portuguese.lproj/Localizable.strings; + refType = 4; + sourceTree = ""; + }; + F51BF62E02026E3501000001 = { + isa = PBXFileReference; + lastKnownFileType = text.rtf; + name = Portuguese; + path = Portuguese.lproj/Credits.rtf; + refType = 4; + sourceTree = ""; + }; + F51BF62F02026E5C01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.html; + name = Portuguese; + path = Portuguese.lproj/XDarwinHelp.html; + refType = 4; + sourceTree = ""; + }; + F51BF63002026E8D01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = Portuguese; + path = Portuguese.lproj/XDarwinHelp.html.cpp; + refType = 4; + sourceTree = ""; + }; + F5269C2D01D5BC3501000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = pseudoramiX.c; + refType = 4; + sourceTree = ""; + }; + F5269C2E01D5BC3501000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = pseudoramiX.h; + refType = 4; + sourceTree = ""; + }; + F53321390193CB6A01000001 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.nib; + name = German; + path = German.lproj/MainMenu.nib; + refType = 4; + sourceTree = ""; + }; + F533213A0193CBA201000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = German; + path = German.lproj/InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; + F533213B0193CBB401000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = German; + path = German.lproj/InfoPlist.strings.cpp; + refType = 4; + sourceTree = ""; + }; + F533213C0193CBC901000001 = { + fileEncoding = 10; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = German; + path = German.lproj/Localizable.strings; + refType = 4; + sourceTree = ""; + }; + F533213D0193CBE001000001 = { + isa = PBXFileReference; + lastKnownFileType = text.rtf; + name = German; + path = German.lproj/Credits.rtf; + refType = 4; + sourceTree = ""; + }; + F533213E0193CBF401000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.html; + name = German; + path = German.lproj/XDarwinHelp.html; + refType = 4; + sourceTree = ""; + }; + F533213F0193CC2501000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = German; + path = German.lproj/XDarwinHelp.html.cpp; + refType = 4; + sourceTree = ""; + }; + F53321400193CCF001000001 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = ApplicationServices.framework; + path = /System/Library/Frameworks/ApplicationServices.framework; + refType = 0; + sourceTree = ""; + }; + F53321410193CCF001000001 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = CoreAudio.framework; + path = /System/Library/Frameworks/CoreAudio.framework; + refType = 0; + sourceTree = ""; + }; + F533214201A4B3CE01000001 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.nib; + name = Dutch; + path = Dutch.lproj/MainMenu.nib; + refType = 4; + sourceTree = ""; + }; + F533214301A4B3F001000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = Dutch; + path = Dutch.lproj/InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; + F533214401A4B40F01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = Dutch; + path = Dutch.lproj/InfoPlist.strings.cpp; + refType = 4; + sourceTree = ""; + }; + F533214501A4B42501000001 = { + fileEncoding = 10; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = Dutch; + path = Dutch.lproj/Localizable.strings; + refType = 4; + sourceTree = ""; + }; + F533214601A4B45401000001 = { + isa = PBXFileReference; + lastKnownFileType = text.rtf; + name = Dutch; + path = Dutch.lproj/Credits.rtf; + refType = 4; + sourceTree = ""; + }; + F533214701A4B48301000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.html; + name = Dutch; + path = Dutch.lproj/XDarwinHelp.html; + refType = 4; + sourceTree = ""; + }; + F533214801A4B4D701000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = Dutch; + path = Dutch.lproj/XDarwinHelp.html.cpp; + refType = 4; + sourceTree = ""; + }; + F54BF6EA017D500901000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + path = startXClients.cpp; + refType = 4; + sourceTree = ""; + }; + F54BF6EC017D506E01000001 = { + isa = PBXFileReference; + lastKnownFileType = text.script.sh; + path = startXClients; + refType = 4; + sourceTree = ""; + }; + F54BF6ED017D506E01000001 = { + fileRef = F54BF6EC017D506E01000001; + isa = PBXBuildFile; + settings = { + }; + }; + F5582948015DAD3B01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = quartzCommon.h; + refType = 4; + sourceTree = ""; + }; + F5614B3B0251124C01000114 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = fullscreen.c; + refType = 4; + sourceTree = ""; + }; + F5614B3D025112D901000114 = { + children = ( + F5614B3B0251124C01000114, + 3576829A0077B8F17F000001, + 0338412F0083BFE57F000001, + ); + isa = PBXGroup; + path = fullscreen; + refType = 4; + sourceTree = ""; + }; + F587E16001924C1D01000001 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.nib; + name = Swedish; + path = Swedish.lproj/MainMenu.nib; + refType = 4; + sourceTree = ""; + }; + F587E16101924C2F01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = Swedish; + path = Swedish.lproj/InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; + F587E16201924C5301000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = Swedish; + path = Swedish.lproj/InfoPlist.strings.cpp; + refType = 4; + sourceTree = ""; + }; + F587E16301924C5E01000001 = { + fileEncoding = 10; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = Swedish; + path = Swedish.lproj/Localizable.strings; + refType = 4; + sourceTree = ""; + }; + F587E16401924C6901000001 = { + isa = PBXFileReference; + lastKnownFileType = text.rtf; + name = Swedish; + path = Swedish.lproj/Credits.rtf; + refType = 4; + sourceTree = ""; + }; + F587E16501924C7401000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.html; + name = Swedish; + path = Swedish.lproj/XDarwinHelp.html; + refType = 4; + sourceTree = ""; + }; + F587E16601924C9D01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = Swedish; + path = Swedish.lproj/XDarwinHelp.html.cpp; + refType = 4; + sourceTree = ""; + }; + F58D65DB018F793801000001 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.nib; + name = French; + path = French.lproj/MainMenu.nib; + refType = 4; + sourceTree = ""; + }; + F58D65DC018F794D01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = French; + path = French.lproj/InfoPlist.strings.cpp; + refType = 4; + sourceTree = ""; + }; + F58D65DD018F798F01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = French; + path = French.lproj/InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; + F58D65DE018F79A001000001 = { + fileEncoding = 10; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = French; + path = French.lproj/Localizable.strings; + refType = 4; + sourceTree = ""; + }; + F58D65DF018F79B101000001 = { + isa = PBXFileReference; + lastKnownFileType = text.rtf; + name = French; + path = French.lproj/Credits.rtf; + refType = 4; + sourceTree = ""; + }; + F58D65E0018F79C001000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.html; + name = French; + path = French.lproj/XDarwinHelp.html; + refType = 4; + sourceTree = ""; + }; + F58D65E1018F79E001000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = French; + path = French.lproj/XDarwinHelp.html.cpp; + refType = 4; + sourceTree = ""; + }; + F5A94EF10314BAC70100011B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = darwinEvents.c; + refType = 4; + sourceTree = ""; + }; + F5ACD25CC5B5E96601000001 = { + isa = PBXFileReference; + lastKnownFileType = text.rtf; + name = Spanish; + path = Spanish.lproj/Credits.rtf; + refType = 4; + sourceTree = ""; + }; + F5ACD25DC5B5E97701000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = Spanish; + path = Spanish.lproj/InfoPlist.strings.cpp; + refType = 4; + sourceTree = ""; + }; + F5ACD25EC5B5E98D01000001 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.nib; + name = Spanish; + path = Spanish.lproj/MainMenu.nib; + refType = 4; + sourceTree = ""; + }; + F5ACD25FC5B5E9AA01000001 = { + fileEncoding = 10; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = Spanish; + path = Spanish.lproj/Localizable.strings; + refType = 4; + sourceTree = ""; + }; + F5ACD260C5B5E9DF01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = Spanish; + path = Spanish.lproj/XDarwinHelp.html.cpp; + refType = 4; + sourceTree = ""; + }; + F5ACD261C5B5EA2001000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.html; + name = Spanish; + path = Spanish.lproj/XDarwinHelp.html; + refType = 4; + sourceTree = ""; + }; + F5ACD262C5B5EA4D01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = Spanish; + path = Spanish.lproj/InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; + F5ACD263C5BE031F01000001 = { + isa = PBXFileReference; + lastKnownFileType = text.rtf; + name = ko; + path = ko.lproj/Credits.rtf; + refType = 4; + sourceTree = ""; + }; + F5ACD264C5BE035B01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = ko; + path = ko.lproj/InfoPlist.strings.cpp; + refType = 4; + sourceTree = ""; + }; + F5ACD265C5BE038601000001 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.nib; + name = ko; + path = ko.lproj/MainMenu.nib; + refType = 4; + sourceTree = ""; + }; + F5ACD266C5BE03C501000001 = { + fileEncoding = 10; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = ko; + path = ko.lproj/Localizable.strings; + refType = 4; + sourceTree = ""; + }; + F5ACD267C5BE03FC01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = ko; + path = ko.lproj/XDarwinHelp.html.cpp; + refType = 4; + sourceTree = ""; + }; + F5ACD268C5BE046401000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.html; + name = ko; + path = ko.lproj/XDarwinHelp.html; + refType = 4; + sourceTree = ""; + }; + F5ACD269C5BE049301000001 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = ko; + path = ko.lproj/InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; + }; + rootObject = 29B97313FDCFA39411CA2CEA; +} diff --git a/xorg-server-1.4/hw/darwin/quartz/XDarwinStartup.c b/xorg-server-1.4/hw/darwin/quartz/XDarwinStartup.c new file mode 100644 index 0000000..8041e32 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/XDarwinStartup.c @@ -0,0 +1,163 @@ +/************************************************************** + * + * Startup program for Darwin X servers + * + * This program selects the appropriate X server to launch: + * XDarwin IOKit X server (default) + * XDarwinQuartz A soft link to the Quartz X server + * executable (-quartz etc. option) + * + * If told to idle, the program will simply pause and not + * launch any X server. This is to support startx being + * run by XDarwin.app. + * + **************************************************************/ +/* + * Copyright (c) 2001-2002 Torrey T. Lyons. 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 + * TORREY T. LYONS 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 Torrey T. Lyons shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in this Software without prior written authorization from + * Torrey T. Lyons. + */ + +#include +#include +#include +#include +#include +#include + +// Macros to build the path name +#ifndef XBINDIR +#define XBINDIR /usr/X11/bin +#endif +#define STR(s) #s +#define XSTRPATH(s) STR(s) "/" +#define XPATH(file) XSTRPATH(XBINDIR) STR(file) + +int main( + int argc, + char *argv[] ) +{ + int i, j, quartzMode = -1; + char **newargv; + + // Check if we are going to run in Quartz mode or idle + // to support startx from the Quartz server. The last + // parameter in the list is the one used. + for (i = argc-1; i; i--) { + if (!strcmp(argv[i], "-idle")) { + pause(); + return 0; + + } else if (!strcmp(argv[i], "-quartz") || + !strcmp(argv[i], "-rootless") || + !strcmp(argv[i], "-fullscreen")) + { + quartzMode = 1; + break; + + } else if (!strcmp(argv[i], "-iokit")) { + quartzMode = 0; + break; + } + } + + if (quartzMode == -1) { +#ifdef HAS_CG_MACH_PORT + // Check if the CoreGraphics window server is running. + // Mike Paquette says this is the fastest way to determine if it is running. + CFMachPortRef cgMachPortRef = CGWindowServerCFMachPort(); + if (cgMachPortRef == NULL) + quartzMode = 0; + else + quartzMode = 1; +#else + // On older systems we assume IOKit mode. + quartzMode = 0; +#endif + } + + if (quartzMode) { + // Launch the X server for the quartz modes + + char quartzPath[PATH_MAX+1]; + int pathLength; + OSStatus theStatus; + CFURLRef appURL; + CFStringRef appPath; + Boolean success; + + // Build the new argument list + newargv = (char **) malloc((argc+2) * sizeof(char *)); + for (j = argc; j; j--) + newargv[j] = argv[j]; + newargv[argc] = "-nostartx"; + newargv[argc+1] = NULL; + + // Use the XDarwinQuartz soft link if it is valid + pathLength = readlink(XPATH(XDarwinQuartz), quartzPath, PATH_MAX); + if (pathLength != -1) { + quartzPath[pathLength] = '\0'; + newargv[0] = quartzPath; + execv(newargv[0], newargv); + } + + // Otherwise query LaunchServices for the location of the XDarwin application + theStatus = LSFindApplicationForInfo(kLSUnknownCreator, + CFSTR("org.x.x11"), + NULL, NULL, &appURL); + if (theStatus) { + fprintf(stderr, "Could not find the XDarwin application. (Error = 0x%lx)\n", theStatus); + fprintf(stderr, "Launch XDarwin once from the Finder.\n"); + return theStatus; + } + + appPath = CFURLCopyFileSystemPath (appURL, kCFURLPOSIXPathStyle); + success = CFStringGetCString(appPath, quartzPath, PATH_MAX, CFStringGetSystemEncoding()); + if (! success) { + fprintf(stderr, "Could not find path to XDarwin application.\n"); + return success; + } + + // Launch the XDarwin application + strncat(quartzPath, "/Contents/MacOS/XDarwin", PATH_MAX); + newargv[0] = quartzPath; + execv(newargv[0], newargv); + fprintf(stderr, "Could not start XDarwin application at %s.\n", newargv[0]); + return errno; + + } else { + + // Build the new argument list + newargv = (char **) malloc((argc+1) * sizeof(char *)); + for (j = argc; j; j--) + newargv[j] = argv[j]; + newargv[0] = "XDarwin"; + newargv[argc] = NULL; + + // Launch the IOKit X server + execvp(newargv[0], newargv); + fprintf(stderr, "Could not start XDarwin IOKit X server.\n"); + return errno; + } +} diff --git a/xorg-server-1.4/hw/darwin/quartz/XDarwinStartup.man b/xorg-server-1.4/hw/darwin/quartz/XDarwinStartup.man new file mode 100644 index 0000000..9bf7dfa --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/XDarwinStartup.man @@ -0,0 +1,75 @@ +.\" $XFree86: xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.man,v 1.1 2002/02/05 19:16:14 torrey Exp $ +.TH XDarwinStartup 1 +.SH NAME +XDarwinStartup - Startup program for the XDarwin X window server +.SH SYNOPSIS +.B XDarwinStartup +[\fI-iokit\fP] +[\fI-fullscreen\fP] +[\fI-rootless\fP] +[\fI-quartz\fP] +[\fI-idle\fP] +[\fIoptions\fP] +.SH DESCRIPTION +The \fIXDarwin(1)\fP X window server can be run in a variety of different +modes and is actually two different executables. The IOKit X server, +XDarwin, is used when running from the console. It is most commonly +located in __XBinDir__. The Quartz X server, for running in parallel with +Aqua, is a full-fledged Mac OS X application that can be started from +the Finder. Its application bundle is XDarwin.app, which is typically +located in /Applications. +.I XDarwinStartup +allows easy switching between these X servers and auto-detection of the +appropriate one to use when launching from the command line. +When run without any arguments, +.I XDarwinStartup +will start the Quartz X server if the Core Graphics window server +is currently running. Otherwise it will start the IOKit X server. +.PP +To locate the Quartz X server, +.I XDarwinStartup +will try to read the soft link at __XBinDir__/XDarwinQuartz. +This is typically a soft link to the executable of the XDarwin.app +application. If this fails, +.I XDarwinStartup +will call Launch Services to locate XDarwin.app. +.PP +To start the IOKit X server, +.I XDarwinStartup +will run the XDarwin executable, which should be present in the +user's path. +.SH OPTIONS +.I XDarwinStartup +accepts and passes on all options to the X server it +launches. In addition the following options have specific effects: +.TP 8 +.B \-iokit +Launch the IOKit X server. +.TP 8 +.B \-fullscreen +Launch the Quartz X server to run in full screen mode. +.TP 8 +.B \-rootless +Launch the Quartz X server to run in rootless mode. +.TP 8 +.B \-quartz +Launch the Quartz X server. +.TP 8 +.B \-idle +Pause and do nothing. This option is used by XDarwin.app when it is +started from the Finder. +.SH FILES +.TP 30 +__XBinDir__/XDarwin +IOKit mode X server +.TP 30 +/Applications/XDarwin.app +Quartz mode X server +.TP 30 +__XBinDir__/XDarwinQuartz +Soft link to Quartz mode X server executable +.SH SEE ALSO +XDarwin(1) +.SH BUGS +The path to XDarwinQuartz should not be hard coded. + diff --git a/xorg-server-1.4/hw/darwin/quartz/XServer.h b/xorg-server-1.4/hw/darwin/quartz/XServer.h new file mode 100644 index 0000000..030ccb5 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/XServer.h @@ -0,0 +1,136 @@ +// +// XServer.h +// +/* + * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved. + * Copyright (c) 2002-2003 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#define BOOL xBOOL +#include +#undef BOOL + +#import + +@interface XServer : NSObject { + // Server state + int serverState; + NSRecursiveLock *serverLock; + NSMutableArray *pendingClients; + BOOL serverVisible; + BOOL rootlessMenuBarVisible; + BOOL queueShowServer; + BOOL quitWithoutQuery; + BOOL pendingAppQuitReply; + UInt32 mouseState; + unsigned short swallowedKey; + BOOL sendServerEvents; + BOOL x11Active; + + // Aqua interface + IBOutlet NSWindow *modeWindow; + IBOutlet NSButton *startupModeButton; + IBOutlet NSButton *startFullScreenButton; + IBOutlet NSButton *startRootlessButton; + IBOutlet NSWindow *helpWindow; + IBOutlet NSButton *startupHelpButton; + IBOutlet NSPanel *switchWindow; + + // Menu elements setable by Apple-WM extension + IBOutlet NSMenu *windowMenu; + IBOutlet NSMenuItem *windowSeparator; + IBOutlet NSMenu *dockMenu; + int checkedWindowItem; +} + +- (id)init; + +- (BOOL)translateEvent:(NSEvent *)anEvent; +- (BOOL)getMousePosition:(xEvent *)xe fromEvent:(NSEvent *)anEvent; + +- (NSString *)makeSafePath:(NSString *)path; + +- (BOOL)loadDisplayBundle; +- (void)startX; +- (void)finishStartX; +- (BOOL)startXClients; +- (void)runClient:(NSString *)filename; +- (void)run; +- (void)toggle; +- (void)showServer:(BOOL)show; +- (void)forceShowServer:(BOOL)show; +- (void)setRootClip:(BOOL)enable; +- (void)readPasteboard; +- (void)writePasteboard; +- (void)quitServer; +- (void)sendXEvent:(xEvent *)xe; +- (void)sendShowHide:(BOOL)show; +- (void)clientProcessDone:(int)clientStatus; +- (void)activateX11:(BOOL)state; +- (void)windowBecameKey:(NSNotification *)notification; +- (void)setX11WindowList:(NSArray *)list; +- (void)setX11WindowCheck:(NSNumber *)nn; + +// Aqua interface actions +- (IBAction)startFullScreen:(id)sender; +- (IBAction)startRootless:(id)sender; +- (IBAction)closeHelpAndShow:(id)sender; +- (IBAction)showSwitchPanel:(id)sender; +- (IBAction)showAction:(id)sender; +- (IBAction)itemSelected:(id)sender; +- (IBAction)nextWindow:(id)sender; +- (IBAction)previousWindow:(id)sender; +- (IBAction)performClose:(id)sender; +- (IBAction)performMiniaturize:(id)sender; +- (IBAction)performZoom:(id)sender; +- (IBAction)bringAllToFront:(id)sender; +- (IBAction)copy:(id)sender; + +// NSApplication delegate +- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender; +- (void)applicationWillTerminate:(NSNotification *)aNotification; +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification; +- (void)applicationDidHide:(NSNotification *)aNotification; +- (void)applicationDidUnhide:(NSNotification *)aNotification; +- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag; +- (void)applicationWillResignActive:(NSNotification *)aNotification; +- (void)applicationWillBecomeActive:(NSNotification *)aNotification; +- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename; + +// NSPort delegate +- (void)handlePortMessage:(NSPortMessage *)portMessage; + +@end + +// X server states +enum { + server_NotStarted, + server_Starting, + server_Running, + server_Quitting, + server_Done +}; diff --git a/xorg-server-1.4/hw/darwin/quartz/XServer.m b/xorg-server-1.4/hw/darwin/quartz/XServer.m new file mode 100644 index 0000000..32bfbf5 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/XServer.m @@ -0,0 +1,1541 @@ +// +// XServer.m +// +// This class handles the interaction between the Cocoa front-end +// and the Darwin X server thread. +// +// Created by Andreas Monitzer on January 6, 2001. +// +/* + * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved. + * Copyright (c) 2002-2005 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ +/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.3 2004/07/30 19:12:17 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.19 2003/11/24 05:39:01 torrey Exp $ */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "quartzCommon.h" + +#define BOOL xBOOL +#include "X11/X.h" +#include "X11/Xproto.h" +#include "os.h" +#include "opaque.h" +#include "darwin.h" +#include "quartz.h" +#define _APPLEWM_SERVER_ +#include "X11/extensions/applewm.h" +#include "applewmExt.h" +#undef BOOL + +#import "XServer.h" +#import "Preferences.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +// For power management notifications +#import +#import +#import +#import +#import + +// Types of shells +enum { + shell_Unknown, + shell_Bourne, + shell_C +}; + +typedef struct { + char *name; + int type; +} shellList_t; + +static shellList_t const shellList[] = { + { "csh", shell_C }, // standard C shell + { "tcsh", shell_C }, // ... needs no introduction + { "sh", shell_Bourne }, // standard Bourne shell + { "zsh", shell_Bourne }, // Z shell + { "bash", shell_Bourne }, // GNU Bourne again shell + { NULL, shell_Unknown } +}; + +extern int argcGlobal; +extern char **argvGlobal; +extern char **envpGlobal; +extern int main(int argc, char *argv[], char *envp[]); +extern void HideMenuBar(void); +extern void ShowMenuBar(void); +static void childDone(int sig); +static void powerDidChange(void *x, io_service_t y, natural_t messageType, + void *messageArgument); + +static NSPort *signalPort; +static NSPort *returnPort; +static NSPortMessage *signalMessage; +static pid_t clientPID; +static XServer *oneXServer; +static NSRect aquaMenuBarBox; +static io_connect_t root_port; + + +@implementation XServer + +- (id)init +{ + self = [super init]; + oneXServer = self; + + serverState = server_NotStarted; + serverLock = [[NSRecursiveLock alloc] init]; + pendingClients = nil; + clientPID = 0; + sendServerEvents = NO; + x11Active = YES; + serverVisible = NO; + rootlessMenuBarVisible = YES; + queueShowServer = YES; + quartzServerQuitting = NO; + pendingAppQuitReply = NO; + mouseState = 0; + + // set up a port to safely send messages to main thread from server thread + signalPort = [[NSPort port] retain]; + returnPort = [[NSPort port] retain]; + signalMessage = [[NSPortMessage alloc] initWithSendPort:signalPort + receivePort:returnPort components:nil]; + + // set up receiving end + [signalPort setDelegate:self]; + [[NSRunLoop currentRunLoop] addPort:signalPort + forMode:NSDefaultRunLoopMode]; + [[NSRunLoop currentRunLoop] addPort:signalPort + forMode:NSModalPanelRunLoopMode]; + + return self; +} + +- (NSApplicationTerminateReply) + applicationShouldTerminate:(NSApplication *)sender +{ + // Quit if the X server is not running + if ([serverLock tryLock]) { + quartzServerQuitting = YES; + serverState = server_Done; + if (clientPID != 0) + kill(clientPID, SIGINT); + return NSTerminateNow; + } + + // Hide the X server and stop sending it events + [self showServer:NO]; + sendServerEvents = NO; + + if (!quitWithoutQuery && (clientPID != 0 || !quartzStartClients)) { + int but; + + but = NSRunAlertPanel(NSLocalizedString(@"Quit X server?",@""), + NSLocalizedString(@"Quitting the X server will terminate any running X Window System programs.",@""), + NSLocalizedString(@"Quit",@""), + NSLocalizedString(@"Cancel",@""), + nil); + + switch (but) { + case NSAlertDefaultReturn: // quit + break; + case NSAlertAlternateReturn: // cancel + if (serverState == server_Running) + sendServerEvents = YES; + return NSTerminateCancel; + } + } + + quartzServerQuitting = YES; + if (clientPID != 0) + kill(clientPID, SIGINT); + + // At this point the X server is either running or starting. + if (serverState == server_Starting) { + // Quit will be queued later when server is running + pendingAppQuitReply = YES; + return NSTerminateLater; + } else if (serverState == server_Running) { + [self quitServer]; + } + + return NSTerminateNow; +} + +// Ensure that everything has quit cleanly +- (void)applicationWillTerminate:(NSNotification *)aNotification +{ + // Make sure the client process has finished + if (clientPID != 0) { + NSLog(@"Waiting on client process..."); + sleep(2); + + // If the client process hasn't finished yet, kill it off + if (clientPID != 0) { + int clientStatus; + NSLog(@"Killing client process..."); + killpg(clientPID, SIGKILL); + waitpid(clientPID, &clientStatus, 0); + } + } + + // Wait until the X server thread quits + [serverLock lock]; +} + +// returns YES when event was handled +- (BOOL)translateEvent:(NSEvent *)anEvent +{ + xEvent xe; + static BOOL mouse1Pressed = NO; + NSEventType type; + unsigned int flags; + + if (!sendServerEvents) { + return NO; + } + + type = [anEvent type]; + flags = [anEvent modifierFlags]; + + if (!quartzRootless) { + // Check for switch keypress + if ((type == NSKeyDown) && (![anEvent isARepeat]) && + ([anEvent keyCode] == [Preferences keyCode])) + { + unsigned int switchFlags = [Preferences modifiers]; + + // Switch if all the switch modifiers are pressed, while none are + // pressed that should not be, except for caps lock. + if (((flags & switchFlags) == switchFlags) && + ((flags & ~(switchFlags | NSAlphaShiftKeyMask)) == 0)) + { + [self toggle]; + return YES; + } + } + + if (!serverVisible) + return NO; + } + + memset(&xe, 0, sizeof(xe)); + + switch (type) { + case NSLeftMouseUp: + if (quartzRootless && !mouse1Pressed) { + // MouseUp after MouseDown in menu - ignore + return NO; + } + mouse1Pressed = NO; + [self getMousePosition:&xe fromEvent:anEvent]; + xe.u.u.type = ButtonRelease; + xe.u.u.detail = 1; + break; + + case NSLeftMouseDown: + if (quartzRootless) { + // Check that event is in X11 window + if (!quartzProcs->IsX11Window([anEvent window], + [anEvent windowNumber])) + { + if (x11Active) + [self activateX11:NO]; + return NO; + } else { + if (!x11Active) + [self activateX11:YES]; + } + } + mouse1Pressed = YES; + [self getMousePosition:&xe fromEvent:anEvent]; + xe.u.u.type = ButtonPress; + xe.u.u.detail = 1; + break; + + case NSRightMouseUp: + [self getMousePosition:&xe fromEvent:anEvent]; + xe.u.u.type = ButtonRelease; + xe.u.u.detail = 3; + break; + + case NSRightMouseDown: + [self getMousePosition:&xe fromEvent:anEvent]; + xe.u.u.type = ButtonPress; + xe.u.u.detail = 3; + break; + + case NSOtherMouseUp: + { + int hwButton = [anEvent buttonNumber]; + + [self getMousePosition:&xe fromEvent:anEvent]; + xe.u.u.type = ButtonRelease; + xe.u.u.detail = (hwButton == 2) ? hwButton : hwButton + 1; + break; + } + + case NSOtherMouseDown: + { + int hwButton = [anEvent buttonNumber]; + + [self getMousePosition:&xe fromEvent:anEvent]; + xe.u.u.type = ButtonPress; + xe.u.u.detail = (hwButton == 2) ? hwButton : hwButton + 1; + break; + } + + case NSMouseMoved: + case NSLeftMouseDragged: + case NSRightMouseDragged: + case NSOtherMouseDragged: + [self getMousePosition:&xe fromEvent:anEvent]; + xe.u.u.type = MotionNotify; + break; + + case NSScrollWheel: + [self getMousePosition:&xe fromEvent:anEvent]; + xe.u.u.type = kXDarwinScrollWheel; + xe.u.clientMessage.u.s.shorts0 = [anEvent deltaX] + + [anEvent deltaY]; + break; + + case NSKeyDown: + case NSKeyUp: + if (!x11Active) { + swallowedKey = 0; + return NO; + } + + if (type == NSKeyDown) { + // If the mouse is not on the valid X display area, + // don't send the X server key events. + if (![self getMousePosition:&xe fromEvent:nil]) { + swallowedKey = [anEvent keyCode]; + return NO; + } + + // See if there are any global shortcuts for this key combo. + if (quartzEnableKeyEquivalents + && [[NSApp mainMenu] performKeyEquivalent:anEvent]) + { + swallowedKey = [anEvent keyCode]; + return YES; + } + } else { + // If the down key event was a valid key combo, + // don't pass the up event to X11. + if (swallowedKey != 0 && [anEvent keyCode] == swallowedKey) { + swallowedKey = 0; + return NO; + } + } + + xe.u.u.type = (type == NSKeyDown) ? KeyPress : KeyRelease; + xe.u.u.detail = [anEvent keyCode]; + break; + + case NSFlagsChanged: + if (!x11Active) + return NO; + xe.u.u.type = kXDarwinUpdateModifiers; + xe.u.clientMessage.u.l.longs0 = flags; + break; + + default: + return NO; + } + + [self sendXEvent:&xe]; + + // Rootless: Send first NSLeftMouseDown to Cocoa windows and views so + // window ordering can be suppressed. + // Don't pass further events - they (incorrectly?) bring the window + // forward no matter what. + if (quartzRootless && + (type == NSLeftMouseDown || type == NSLeftMouseUp) && + [anEvent clickCount] == 1 && [anEvent window]) + { + return NO; + } + + return YES; +} + +// Return mouse coordinates, inverting y coordinate. +// The coordinates are extracted from an event or the current mouse position. +// For rootless mode, the menu bar is treated as not part of the usable +// X display area and the cursor position is adjusted accordingly. +// Returns YES if the cursor is not in the menu bar. +- (BOOL)getMousePosition:(xEvent *)xe fromEvent:(NSEvent *)anEvent +{ + NSPoint pt; + + if (anEvent) { + NSWindow *eventWindow = [anEvent window]; + + if (eventWindow) { + pt = [anEvent locationInWindow]; + pt.x += [eventWindow frame].origin.x; + pt.y += [eventWindow frame].origin.y; + } else { + pt = [NSEvent mouseLocation]; + } + } else { + pt = [NSEvent mouseLocation]; + } + + xe->u.keyButtonPointer.rootX = (int)(pt.x); + + if (quartzRootless && NSMouseInRect(pt, aquaMenuBarBox, NO)) { + // mouse in menu bar - tell X11 that it's just below instead + xe->u.keyButtonPointer.rootY = aquaMenuBarHeight; + return NO; + } else { + xe->u.keyButtonPointer.rootY = + NSHeight([[NSScreen mainScreen] frame]) - (int)(pt.y); + return YES; + } +} + + +// Make a safe path +// +// Return the path in single quotes in case there are problematic characters in it. +// We still have to worry about there being single quotes in the path. So, replace +// all instances of the ' character in the path with '\''. +- (NSString *)makeSafePath:(NSString *)path +{ + NSMutableString *safePath = [NSMutableString stringWithString:path]; + NSRange aRange = NSMakeRange(0, [safePath length]); + + while (aRange.length) { + aRange = [safePath rangeOfString:@"'" options:0 range:aRange]; + if (!aRange.length) + break; + [safePath replaceCharactersInRange:aRange + withString:@"\'\\'\'"]; + aRange.location += 4; + aRange.length = [safePath length] - aRange.location; + } + + safePath = [NSMutableString stringWithFormat:@"'%@'", safePath]; + + return safePath; +} + + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification +{ + // Block SIGPIPE + // SIGPIPE repeatably killed the (rootless) server when closing a + // dozen xterms in rapid succession. Those SIGPIPEs should have been + // sent to the X server thread, which ignores them, but somehow they + // ended up in this thread instead. + { + sigset_t set; + sigemptyset(&set); + sigaddset(&set, SIGPIPE); + // pthread_sigmask not implemented yet + // pthread_sigmask(SIG_BLOCK, &set, NULL); + sigprocmask(SIG_BLOCK, &set, NULL); + } + + if (quartzRootless == -1) { + // The display mode was not set from the command line. + // Show mode pick panel? + if ([Preferences modeWindow]) { + if ([Preferences rootless]) + [startRootlessButton setKeyEquivalent:@"\r"]; + else + [startFullScreenButton setKeyEquivalent:@"\r"]; + [modeWindow makeKeyAndOrderFront:nil]; + } else { + // Otherwise use default mode + quartzRootless = [Preferences rootless]; + [self startX]; + } + } else { + [self startX]; + } +} + + +// Load the appropriate display mode bundle +- (BOOL)loadDisplayBundle +{ + if (quartzRootless) { + NSEnumerator *enumerator = [[Preferences displayModeBundles] + objectEnumerator]; + NSString *bundleName; + + while ((bundleName = [enumerator nextObject])) { + if (QuartzLoadDisplayBundle([bundleName cString])) + return YES; + } + + return NO; + } else { + return QuartzLoadDisplayBundle("fullscreen.bundle"); + } +} + + +// Start the X server thread and the client process +- (void)startX +{ + NSDictionary *appDictionary; + NSString *appVersion; + + [modeWindow close]; + + // Calculate the height of the menu bar so rootless mode can avoid it + if (quartzRootless) { + aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) - + NSMaxY([[NSScreen mainScreen] visibleFrame]) - 1; + aquaMenuBarBox = + NSMakeRect(0, NSMaxY([[NSScreen mainScreen] visibleFrame]) + 1, + NSWidth([[NSScreen mainScreen] frame]), + aquaMenuBarHeight); + } + + // Write the XDarwin version to the console log + appDictionary = [[NSBundle mainBundle] infoDictionary]; + appVersion = [appDictionary objectForKey:@"CFBundleShortVersionString"]; + if (appVersion) + NSLog(@"\n%@", appVersion); + else + NSLog(@"No version"); + + if (![self loadDisplayBundle]) + [NSApp terminate:nil]; + + if (quartzRootless) { + // We need to track whether the key window is an X11 window + [[NSNotificationCenter defaultCenter] + addObserver:self + selector:@selector(windowBecameKey:) + name:NSWindowDidBecomeKeyNotification + object:nil]; + + // Request notification of screen layout changes even when this + // is not the active application + [[NSDistributedNotificationCenter defaultCenter] + addObserver:self + selector:@selector(applicationDidChangeScreenParameters:) + name:NSApplicationDidChangeScreenParametersNotification + object:nil]; + } + + // Start the X server thread + serverState = server_Starting; + [NSThread detachNewThreadSelector:@selector(run) toTarget:self + withObject:nil]; + + // Start the X clients if started from GUI + if (quartzStartClients) { + [self startXClients]; + } + + if (quartzRootless) { + // There is no help window for rootless; just start + [helpWindow close]; + helpWindow = nil; + } else { + IONotificationPortRef notify; + io_object_t anIterator; + + // Register for system power notifications + root_port = IORegisterForSystemPower(0, ¬ify, powerDidChange, + &anIterator); + if (root_port) { + CFRunLoopAddSource([[NSRunLoop currentRunLoop] getCFRunLoop], + IONotificationPortGetRunLoopSource(notify), + kCFRunLoopDefaultMode); + } else { + NSLog(@"Failed to register for system power notifications."); + } + + // Show the X switch window if not using dock icon switching + if (![Preferences dockSwitch]) + [switchWindow orderFront:nil]; + + if ([Preferences startupHelp]) { + // display the full screen mode help + [helpWindow makeKeyAndOrderFront:nil]; + queueShowServer = NO; + } else { + // start running full screen and make sure X is visible + ShowMenuBar(); + [self closeHelpAndShow:nil]; + } + } +} + +// Finish starting the X server thread +// This includes anything that must be done after the X server is +// ready to process events after the first or subsequent generations. +- (void)finishStartX +{ + sendServerEvents = YES; + serverState = server_Running; + + if (quartzRootless) { + [self forceShowServer:[NSApp isActive]]; + } else { + [self forceShowServer:queueShowServer]; + } + + if (quartzServerQuitting) { + [self quitServer]; + if (pendingAppQuitReply) + [NSApp replyToApplicationShouldTerminate:YES]; + return; + } + + if (pendingClients) { + NSEnumerator *enumerator = [pendingClients objectEnumerator]; + NSString *filename; + + while ((filename = [enumerator nextObject])) { + [self runClient:filename]; + } + + [pendingClients release]; + pendingClients = nil; + } +} + +// Start the first X clients in a separate process +- (BOOL)startXClients +{ + struct passwd *passwdUser; + NSString *shellPath, *dashShellName, *commandStr, *startXPath; + NSString *safeStartXPath; + NSBundle *thisBundle; + const char *shellPathStr, *newargv[3], *shellNameStr; + int fd[2], outFD, length, shellType, i; + + // Register to catch the signal when the client processs finishes + signal(SIGCHLD, childDone); + + // Get user's password database entry + passwdUser = getpwuid(getuid()); + + // Find the shell to use + if ([Preferences useDefaultShell]) + shellPath = [NSString stringWithCString:passwdUser->pw_shell]; + else + shellPath = [Preferences shellString]; + + dashShellName = [NSString stringWithFormat:@"-%@", + [shellPath lastPathComponent]]; + shellPathStr = [shellPath cString]; + shellNameStr = [[shellPath lastPathComponent] cString]; + + if (access(shellPathStr, X_OK)) { + NSLog(@"Shell %s is not valid!", shellPathStr); + return NO; + } + + // Find the type of shell + for (i = 0; shellList[i].name; i++) { + if (!strcmp(shellNameStr, shellList[i].name)) + break; + } + shellType = shellList[i].type; + + newargv[0] = [dashShellName cString]; + if (shellType == shell_Bourne) { + // Bourne shells need to be told they are interactive to make + // sure they read all their initialization files. + newargv[1] = "-i"; + newargv[2] = NULL; + } else { + newargv[1] = NULL; + } + + // Create a pipe to communicate with the X client process + NSAssert(pipe(fd) == 0, @"Could not create new pipe."); + + // Open a file descriptor for writing to stdout and stderr + outFD = open("/dev/console", O_WRONLY, 0); + if (outFD == -1) { + outFD = open("/dev/null", O_WRONLY, 0); + NSAssert(outFD != -1, @"Could not open shell output."); + } + + // Fork process to start X clients in user's default shell + // Sadly we can't use NSTask because we need to start a login shell. + // Login shells are started by passing "-" as the first character of + // argument 0. NSTask forces argument 0 to be the shell's name. + clientPID = vfork(); + if (clientPID == 0) { + + // Inside the new process: + if (fd[0] != STDIN_FILENO) { + dup2(fd[0], STDIN_FILENO); // Take stdin from pipe + close(fd[0]); + } + close(fd[1]); // Close write end of pipe + if (outFD == STDOUT_FILENO) { // Setup stdout and stderr + dup2(outFD, STDERR_FILENO); + } else if (outFD == STDERR_FILENO) { + dup2(outFD, STDOUT_FILENO); + } else { + dup2(outFD, STDERR_FILENO); + dup2(outFD, STDOUT_FILENO); + close(outFD); + } + + // Setup environment + setenv("HOME", passwdUser->pw_dir, 1); + setenv("SHELL", shellPathStr, 1); + setenv("LOGNAME", passwdUser->pw_name, 1); + setenv("USER", passwdUser->pw_name, 1); + setenv("TERM", "unknown", 1); + if (chdir(passwdUser->pw_dir)) // Change to user's home dir + NSLog(@"Could not change to user's home directory."); + + execv(shellPathStr, (char * const *)newargv); // Start user's shell + + NSLog(@"Could not start X client process with errno = %i.", errno); + _exit(127); + } + + // In parent process: + close(fd[0]); // Close read end of pipe + close(outFD); // Close output file descriptor + + thisBundle = [NSBundle bundleForClass:[self class]]; + startXPath = [thisBundle pathForResource:@"startXClients" ofType:nil]; + if (!startXPath) { + NSLog(@"Could not find startXClients in application bundle!"); + return NO; + } + + safeStartXPath = [self makeSafePath:startXPath]; + + if ([Preferences addToPath]) { + commandStr = [NSString stringWithFormat:@"%@ :%d %@\n", + safeStartXPath, [Preferences display], + [Preferences addToPathString]]; + } else { + commandStr = [NSString stringWithFormat:@"%@ :%d\n", + safeStartXPath, [Preferences display]]; + } + + length = [commandStr cStringLength]; + if (write(fd[1], [commandStr cString], length) != length) { + NSLog(@"Write to X client process failed."); + return NO; + } + + // Close the pipe so that shell will terminate when xinit quits + close(fd[1]); + + return YES; +} + +// Start the specified client in its own task +// FIXME: This should be unified with startXClients +- (void)runClient:(NSString *)filename +{ + const char *command = [[self makeSafePath:filename] UTF8String]; + const char *shell; + const char *argv[5]; + int child1, child2 = 0; + int status; + + shell = getenv("SHELL"); + if (shell == NULL) + shell = "/bin/bash"; + + /* At least [ba]sh, [t]csh and zsh all work with this syntax. We + need to use an interactive shell to force it to load the user's + environment. */ + + argv[0] = shell; + argv[1] = "-i"; + argv[2] = "-c"; + argv[3] = command; + argv[4] = NULL; + + /* Do the fork-twice trick to avoid having to reap zombies */ + + child1 = fork(); + + switch (child1) { + case -1: /* error */ + break; + + case 0: /* child1 */ + child2 = fork(); + + switch (child2) { + int max_files, i; + char buf[1024], *tem; + + case -1: /* error */ + _exit(1); + + case 0: /* child2 */ + /* close all open files except for standard streams */ + max_files = sysconf(_SC_OPEN_MAX); + for (i = 3; i < max_files; i++) + close(i); + + /* ensure stdin is on /dev/null */ + close(0); + open("/dev/null", O_RDONLY); + + /* cd $HOME */ + tem = getenv("HOME"); + if (tem != NULL) + chdir(tem); + + /* Setup environment */ +// snprintf(buf, sizeof(buf), ":%s", display); +// setenv("DISPLAY", buf, TRUE); + tem = getenv("PATH"); + if (tem != NULL && tem[0] != NULL) + snprintf(buf, sizeof(buf), "%s:/usr/X11/bin", tem); + else + snprintf(buf, sizeof(buf), "/bin:/usr/bin:/usr/X11/bin"); + setenv("PATH", buf, TRUE); + + execvp(argv[0], (char **const) argv); + + _exit(2); + + default: /* parent (child1) */ + _exit(0); + } + break; + + default: /* parent */ + waitpid(child1, &status, 0); + } +} + +// Run the X server thread +- (void)run +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + [serverLock lock]; + main(argcGlobal, argvGlobal, envpGlobal); + serverVisible = NO; + [pool release]; + [serverLock unlock]; + QuartzMessageMainThread(kQuartzServerDied, nil, 0); +} + +// Full screen mode was picked in the mode pick panel +- (IBAction)startFullScreen:(id)sender +{ + [Preferences setModeWindow:[startupModeButton intValue]]; + [Preferences saveToDisk]; + quartzRootless = FALSE; + [self startX]; +} + +// Rootless mode was picked in the mode pick panel +- (IBAction)startRootless:(id)sender +{ + [Preferences setModeWindow:[startupModeButton intValue]]; + [Preferences saveToDisk]; + quartzRootless = TRUE; + [self startX]; +} + +// Close the help splash screen and show the X server +- (IBAction)closeHelpAndShow:(id)sender +{ + if (sender) { + int helpVal = [startupHelpButton intValue]; + [Preferences setStartupHelp:helpVal]; + [Preferences saveToDisk]; + } + [helpWindow close]; + helpWindow = nil; + + [self forceShowServer:YES]; + [NSApp activateIgnoringOtherApps:YES]; +} + +// Show the Aqua-X11 switch panel useful for fullscreen mode +- (IBAction)showSwitchPanel:(id)sender +{ + [switchWindow orderFront:nil]; +} + +// Show the X server when sent message from GUI +- (IBAction)showAction:(id)sender +{ + [self forceShowServer:YES]; +} + +// Show or hide the X server or menu bar in rootless mode +- (void)toggle +{ + if (quartzRootless) { +#if 0 + // FIXME: Remove or add option to not dodge menubar + if (rootlessMenuBarVisible) + HideMenuBar(); + else + ShowMenuBar(); + rootlessMenuBarVisible = !rootlessMenuBarVisible; +#endif + } else { + [self showServer:!serverVisible]; + } +} + +// Show or hide the X server on screen +- (void)showServer:(BOOL)show +{ + // Do not show or hide multiple times in a row + if (serverVisible == show) + return; + + if (sendServerEvents) { + [self sendShowHide:show]; + } else if (serverState == server_Starting) { + queueShowServer = show; + } +} + +// Show or hide the X server irregardless of the current state +- (void)forceShowServer:(BOOL)show +{ + serverVisible = !show; + [self showServer:show]; +} + +// Tell the X server to show or hide itself. +// This ignores the current X server visible state. +// +// In full screen mode, the order we do things is important and must be +// preserved between the threads. X drawing operations have to be performed +// in the X server thread. It appears that we have the additional +// constraint that we must hide and show the menu bar in the main thread. +// +// To show the X server: +// 1. Capture the displays. (Main thread) +// 2. Hide the menu bar. (Must be in main thread) +// 3. Send event to X server thread to redraw X screen. +// 4. Redraw the X screen. (Must be in X server thread) +// +// To hide the X server: +// 1. Send event to X server thread to stop drawing. +// 2. Stop drawing to the X screen. (Must be in X server thread) +// 3. Message main thread that drawing is stopped. +// 4. If main thread still wants X server hidden: +// a. Release the displays. (Main thread) +// b. Unhide the menu bar. (Must be in main thread) +// Otherwise we have already queued an event to start drawing again. +// +- (void)sendShowHide:(BOOL)show +{ + xEvent xe; + + [self getMousePosition:&xe fromEvent:nil]; + + if (show) { + if (!quartzRootless) { + quartzProcs->CaptureScreens(); + HideMenuBar(); + } + [self activateX11:YES]; + + // the mouse location will have moved; track it + xe.u.u.type = MotionNotify; + [self sendXEvent:&xe]; + + // inform the X server of the current modifier state + xe.u.u.type = kXDarwinUpdateModifiers; + xe.u.clientMessage.u.l.longs0 = [[NSApp currentEvent] modifierFlags]; + [self sendXEvent:&xe]; + + // If there is no AppleWM-aware cut and paste manager, do what we can. + if ((AppleWMSelectedEvents() & AppleWMPasteboardNotifyMask) == 0) { + // put the pasteboard into the X cut buffer + [self readPasteboard]; + } + } else { + // If there is no AppleWM-aware cut and paste manager, do what we can. + if ((AppleWMSelectedEvents() & AppleWMPasteboardNotifyMask) == 0) { + // put the X cut buffer on the pasteboard + [self writePasteboard]; + } + + [self activateX11:NO]; + } + + serverVisible = show; +} + +// Enable or disable rendering to the X screen +- (void)setRootClip:(BOOL)enable +{ + xEvent xe; + + xe.u.u.type = kXDarwinSetRootClip; + xe.u.clientMessage.u.l.longs0 = enable; + [self sendXEvent:&xe]; +} + +// Tell the X server to read from the pasteboard into the X cut buffer +- (void)readPasteboard +{ + xEvent xe; + + xe.u.u.type = kXDarwinReadPasteboard; + [self sendXEvent:&xe]; +} + +// Tell the X server to write the X cut buffer into the pasteboard +- (void)writePasteboard +{ + xEvent xe; + + xe.u.u.type = kXDarwinWritePasteboard; + [self sendXEvent:&xe]; +} + +- (void)quitServer +{ + xEvent xe; + + xe.u.u.type = kXDarwinQuit; + [self sendXEvent:&xe]; + + // Revert to the Mac OS X arrow cursor. The main thread sets the cursor + // and it won't be responding to future requests to change it. + [[NSCursor arrowCursor] set]; + + serverState = server_Quitting; +} + +- (void)sendXEvent:(xEvent *)xe +{ + // This field should be filled in for every event + xe->u.keyButtonPointer.time = GetTimeInMillis(); + + DarwinEQEnqueue(xe); +} + +// Handle messages from the X server thread +- (void)handlePortMessage:(NSPortMessage *)portMessage +{ + unsigned msg = [portMessage msgid]; + + switch (msg) { + case kQuartzServerHidden: + // Make sure the X server wasn't queued to be shown again while + // the hide was pending. + if (!quartzRootless && !serverVisible) { + quartzProcs->ReleaseScreens(); + ShowMenuBar(); + } + break; + + case kQuartzServerStarted: + [self finishStartX]; + break; + + case kQuartzServerDied: + sendServerEvents = NO; + serverState = server_Done; + if (!quartzServerQuitting) { + [NSApp terminate:nil]; // quit if we aren't already + } + break; + + case kQuartzCursorUpdate: + if (quartzProcs->CursorUpdate) + quartzProcs->CursorUpdate(); + break; + + case kQuartzPostEvent: + { + const xEvent *xe = [[[portMessage components] lastObject] bytes]; + DarwinEQEnqueue(xe); + break; + } + + case kQuartzSetWindowMenu: + { + NSArray *list; + [[[portMessage components] lastObject] getBytes:&list]; + [self setX11WindowList:list]; + [list release]; + break; + } + + case kQuartzSetWindowMenuCheck: + { + int n; + [[[portMessage components] lastObject] getBytes:&n]; + [self setX11WindowCheck:[NSNumber numberWithInt:n]]; + break; + } + + case kQuartzSetFrontProcess: + [NSApp activateIgnoringOtherApps:YES]; + break; + + case kQuartzSetCanQuit: + { + int n; + [[[portMessage components] lastObject] getBytes:&n]; + quitWithoutQuery = (BOOL) n; + break; + } + + default: + NSLog(@"Unknown message from server thread."); + } +} + +// Quit the X server when the X client process finishes +- (void)clientProcessDone:(int)clientStatus +{ + if (WIFEXITED(clientStatus)) { + int exitStatus = WEXITSTATUS(clientStatus); + if (exitStatus != 0) + NSLog(@"X client process terminated with status %i.", exitStatus); + } else { + NSLog(@"X client process terminated abnormally."); + } + + if (!quartzServerQuitting) { + [NSApp terminate:nil]; // quit if we aren't already + } +} + +// User selected an X11 window from a menu +- (IBAction)itemSelected:(id)sender +{ + xEvent xe; + + [NSApp activateIgnoringOtherApps:YES]; + + // Notify the client of the change through the X server thread + xe.u.u.type = kXDarwinControllerNotify; + xe.u.clientMessage.u.l.longs0 = AppleWMWindowMenuItem; + xe.u.clientMessage.u.l.longs1 = [sender tag]; + [self sendXEvent:&xe]; +} + +// User selected Next from window menu +- (IBAction)nextWindow:(id)sender +{ + QuartzMessageServerThread(kXDarwinControllerNotify, 1, + AppleWMNextWindow); +} + +// User selected Previous from window menu +- (IBAction)previousWindow:(id)sender +{ + QuartzMessageServerThread(kXDarwinControllerNotify, 1, + AppleWMPreviousWindow); +} + +/* + * The XPR implementation handles close, minimize, and zoom actions for X11 + * windows here, while CR handles these in the NSWindow class. + */ + +// Handle Close from window menu for X11 window in XPR implementation +- (IBAction)performClose:(id)sender +{ + QuartzMessageServerThread(kXDarwinControllerNotify, 1, + AppleWMCloseWindow); +} + +// Handle Minimize from window menu for X11 window in XPR implementation +- (IBAction)performMiniaturize:(id)sender +{ + QuartzMessageServerThread(kXDarwinControllerNotify, 1, + AppleWMMinimizeWindow); +} + +// Handle Zoom from window menu for X11 window in XPR implementation +- (IBAction)performZoom:(id)sender +{ + QuartzMessageServerThread(kXDarwinControllerNotify, 1, + AppleWMZoomWindow); +} + +// Handle "Bring All to Front" from window menu +- (IBAction)bringAllToFront:(id)sender +{ + if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0) { + QuartzMessageServerThread(kXDarwinControllerNotify, 1, + AppleWMBringAllToFront); + } else { + [NSApp arrangeInFront:nil]; + } +} + +// This ends up at the end of the responder chain. +- (IBAction)copy:(id)sender +{ + QuartzMessageServerThread(kXDarwinPasteboardNotify, 1, + AppleWMCopyToPasteboard); +} + +// Set whether or not X11 is active and should receive all key events +- (void)activateX11:(BOOL)state +{ + if (state) { + QuartzMessageServerThread(kXDarwinActivate, 0); + } + else { + QuartzMessageServerThread(kXDarwinDeactivate, 0); + } + + x11Active = state; +} + +// Some NSWindow became the key window +- (void)windowBecameKey:(NSNotification *)notification +{ + NSWindow *window = [notification object]; + + if (quartzProcs->IsX11Window(window, [window windowNumber])) { + if (!x11Active) + [self activateX11:YES]; + } else { + if (x11Active) + [self activateX11:NO]; + } +} + +// Set the Apple-WM specifiable part of the window menu +- (void)setX11WindowList:(NSArray *)list +{ + NSMenuItem *item; + int first, count, i; + xEvent xe; + + /* Work backwards so we don't mess up the indices */ + first = [windowMenu indexOfItem:windowSeparator] + 1; + if (first > 0) { + count = [windowMenu numberOfItems]; + for (i = count - 1; i >= first; i--) + [windowMenu removeItemAtIndex:i]; + } else { + windowSeparator = (NSMenuItem *)[windowMenu addItemWithTitle:@"" + action:nil + keyEquivalent:@""]; + } + + count = [dockMenu numberOfItems]; + for (i = 0; i < count; i++) + [dockMenu removeItemAtIndex:0]; + + count = [list count]; + + for (i = 0; i < count; i++) + { + NSString *name, *shortcut; + + name = [[list objectAtIndex:i] objectAtIndex:0]; + shortcut = [[list objectAtIndex:i] objectAtIndex:1]; + + item = (NSMenuItem *)[windowMenu addItemWithTitle:name + action:@selector(itemSelected:) + keyEquivalent:shortcut]; + [item setTarget:self]; + [item setTag:i]; + [item setEnabled:YES]; + + item = (NSMenuItem *)[dockMenu insertItemWithTitle:name + action:@selector(itemSelected:) + keyEquivalent:shortcut atIndex:i]; + [item setTarget:self]; + [item setTag:i]; + [item setEnabled:YES]; + } + + if (checkedWindowItem >= 0 && checkedWindowItem < count) + { + item = (NSMenuItem *)[windowMenu itemAtIndex:first + checkedWindowItem]; + [item setState:NSOnState]; + item = (NSMenuItem *)[dockMenu itemAtIndex:checkedWindowItem]; + [item setState:NSOnState]; + } + + // Notify the client of the change through the X server thread + xe.u.u.type = kXDarwinControllerNotify; + xe.u.clientMessage.u.l.longs0 = AppleWMWindowMenuNotify; + [self sendXEvent:&xe]; +} + +// Set the checked item on the Apple-WM specifiable window menu +- (void)setX11WindowCheck:(NSNumber *)nn +{ + NSMenuItem *item; + int first, count; + int n = [nn intValue]; + + first = [windowMenu indexOfItem:windowSeparator] + 1; + count = [windowMenu numberOfItems] - first; + + if (checkedWindowItem >= 0 && checkedWindowItem < count) + { + item = (NSMenuItem *)[windowMenu itemAtIndex:first + checkedWindowItem]; + [item setState:NSOffState]; + item = (NSMenuItem *)[dockMenu itemAtIndex:checkedWindowItem]; + [item setState:NSOffState]; + } + if (n >= 0 && n < count) + { + item = (NSMenuItem *)[windowMenu itemAtIndex:first + n]; + [item setState:NSOnState]; + item = (NSMenuItem *)[dockMenu itemAtIndex:n]; + [item setState:NSOnState]; + } + checkedWindowItem = n; +} + +// Return whether or not a menu item should be enabled +- (BOOL)validateMenuItem:(NSMenuItem *)item +{ + NSMenu *menu = [item menu]; + + if (menu == windowMenu && [item tag] == 30) { + // Mode switch panel is for fullscreen only + return !quartzRootless; + } + else if ((menu == windowMenu && [item tag] != 40) || menu == dockMenu) { + // The special window and dock menu items should not be active unless + // there is an AppleWM-aware window manager running. + return (AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0; + } + else { + return TRUE; + } +} + +/* + * Application Delegate Methods + */ + +- (void)applicationDidChangeScreenParameters:(NSNotification *)aNotification +{ + if (quartzProcs->ScreenChanged) + quartzProcs->ScreenChanged(); +} + +- (void)applicationDidHide:(NSNotification *)aNotification +{ + if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0) { + QuartzMessageServerThread(kXDarwinControllerNotify, 1, + AppleWMHideAll); + } else { + if (quartzProcs->HideWindows) + quartzProcs->HideWindows(YES); + } +} + +- (void)applicationDidUnhide:(NSNotification *)aNotification +{ + if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0) { + QuartzMessageServerThread(kXDarwinControllerNotify, 1, + AppleWMShowAll); + } else { + if (quartzProcs->HideWindows) + quartzProcs->HideWindows(NO); + } +} + +// Called when the user clicks the application icon, +// but not when Cmd-Tab is used. +// Rootless: Don't switch until applicationWillBecomeActive. +- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication + hasVisibleWindows:(BOOL)flag +{ + if ([Preferences dockSwitch] && !quartzRootless) { + [self showServer:YES]; + } + return NO; +} + +- (void)applicationWillResignActive:(NSNotification *)aNotification +{ + [self showServer:NO]; +} + +- (void)applicationWillBecomeActive:(NSNotification *)aNotification +{ + if (quartzRootless) { + [self showServer:YES]; + + // If there is no AppleWM-aware window manager, we can't allow + // interleaving of Aqua and X11 windows. + if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) == 0) { + [NSApp arrangeInFront:nil]; + } + } +} + +// Called when the user opens a document type that we claim (ie. an X11 executable). +- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename +{ + if (serverState == server_Running) { + [self runClient:filename]; + return YES; + } + else if (serverState == server_NotStarted || serverState == server_Starting) { + if ([filename UTF8String][0] != ':') { // Ignore display names + if (!pendingClients) { + pendingClients = [[NSMutableArray alloc] initWithCapacity:1]; + } + [pendingClients addObject:filename]; + return YES; // Assume it will launch successfully + } + return NO; + } + + // If the server is quitting or done, + // its too late to launch new clients this time. + return NO; +} + +@end + + +// Send a message to the main thread, which calls handlePortMessage in +// response. Must only be called from the X server thread because +// NSPort is not thread safe. +void QuartzMessageMainThread(unsigned msg, void *data, unsigned length) +{ + if (length > 0) { + NSData *eventData = [NSData dataWithBytes:data length:length]; + NSArray *eventArray = [NSArray arrayWithObject:eventData]; + NSPortMessage *newMessage = + [[NSPortMessage alloc] + initWithSendPort:signalPort + receivePort:returnPort components:eventArray]; + [newMessage setMsgid:msg]; + [newMessage sendBeforeDate:[NSDate distantPast]]; + [newMessage release]; + } else { + [signalMessage setMsgid:msg]; + [signalMessage sendBeforeDate:[NSDate distantPast]]; + } +} + +void +QuartzSetWindowMenu(int nitems, const char **items, + const char *shortcuts) +{ + NSMutableArray *array; + int i; + + array = [[NSMutableArray alloc] initWithCapacity:nitems]; + + for (i = 0; i < nitems; i++) { + NSMutableArray *subarray = [NSMutableArray arrayWithCapacity:2]; + NSString *string = [NSString stringWithUTF8String:items[i]]; + + [subarray addObject:string]; + + if (shortcuts[i] != 0) { + NSString *number = [NSString stringWithFormat:@"%d", + shortcuts[i]]; + [subarray addObject:number]; + } else + [subarray addObject:@""]; + + [array addObject:subarray]; + } + + /* Send the array of strings over to the main thread. */ + /* Will be released in main thread. */ + QuartzMessageMainThread(kQuartzSetWindowMenu, &array, sizeof(NSArray *)); +} + +// Handle SIGCHLD signals +static void childDone(int sig) +{ + int clientStatus; + + if (clientPID == 0) + return; + + // Make sure it was the client task that finished + if (waitpid(clientPID, &clientStatus, WNOHANG) == clientPID) { + if (WIFSTOPPED(clientStatus)) + return; + clientPID = 0; + [oneXServer clientProcessDone:clientStatus]; + } +} + +static void powerDidChange( + void *x, + io_service_t y, + natural_t messageType, + void *messageArgument) +{ + switch (messageType) { + case kIOMessageSystemWillSleep: + if (!quartzRootless) { + [oneXServer setRootClip:FALSE]; + } + IOAllowPowerChange(root_port, (long)messageArgument); + break; + case kIOMessageCanSystemSleep: + IOAllowPowerChange(root_port, (long)messageArgument); + break; + case kIOMessageSystemHasPoweredOn: + if (!quartzRootless) { + [oneXServer setRootClip:TRUE]; + } + break; + } + +} diff --git a/xorg-server-1.4/hw/darwin/quartz/applewm.c b/xorg-server-1.4/hw/darwin/quartz/applewm.c new file mode 100644 index 0000000..cc11cfa --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/applewm.c @@ -0,0 +1,730 @@ +/************************************************************************** + +Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved. +Copyright (c) 2003 Torrey T. Lyons. 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, sub license, 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 PRECISION INSIGHT AND/OR ITS 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. + +**************************************************************************/ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "quartzCommon.h" + +#define NEED_REPLIES +#define NEED_EVENTS +#include "misc.h" +#include "dixstruct.h" +#include "globals.h" +#include "extnsionst.h" +#include "colormapst.h" +#include "cursorstr.h" +#include "scrnintstr.h" +#include "windowstr.h" +#include "servermd.h" +#include "swaprep.h" +#include "propertyst.h" +#include +#include "darwin.h" +#define _APPLEWM_SERVER_ +#include "X11/extensions/applewmstr.h" +#include "applewmExt.h" + +#define DEFINE_ATOM_HELPER(func,atom_name) \ +static Atom func (void) { \ + static int generation; \ + static Atom atom; \ + if (generation != serverGeneration) { \ + generation = serverGeneration; \ + atom = MakeAtom (atom_name, strlen (atom_name), TRUE); \ + } \ + return atom; \ +} + +DEFINE_ATOM_HELPER(xa_native_screen_origin, "_NATIVE_SCREEN_ORIGIN") +DEFINE_ATOM_HELPER (xa_apple_no_order_in, "_APPLE_NO_ORDER_IN") + +static AppleWMProcsPtr appleWMProcs; + +static int WMErrorBase; + +static DISPATCH_PROC(ProcAppleWMDispatch); +static DISPATCH_PROC(SProcAppleWMDispatch); + +static void AppleWMResetProc(ExtensionEntry* extEntry); + +static unsigned char WMReqCode = 0; +static int WMEventBase = 0; + +static RESTYPE ClientType, EventType; /* resource types for event masks */ +static XID eventResource; + +/* Currently selected events */ +static unsigned int eventMask = 0; + +static int WMFreeClient (pointer data, XID id); +static int WMFreeEvents (pointer data, XID id); +static void SNotifyEvent(xAppleWMNotifyEvent *from, xAppleWMNotifyEvent *to); + +typedef struct _WMEvent *WMEventPtr; +typedef struct _WMEvent { + WMEventPtr next; + ClientPtr client; + XID clientResource; + unsigned int mask; +} WMEventRec; + +static inline BoxRec +make_box (int x, int y, int w, int h) +{ + BoxRec r; + r.x1 = x; + r.y1 = y; + r.x2 = x + w; + r.y2 = y + h; + return r; +} + +void +AppleWMExtensionInit( + AppleWMProcsPtr procsPtr) +{ + ExtensionEntry* extEntry; + + ClientType = CreateNewResourceType(WMFreeClient); + EventType = CreateNewResourceType(WMFreeEvents); + eventResource = FakeClientID(0); + + if (ClientType && EventType && + (extEntry = AddExtension(APPLEWMNAME, + AppleWMNumberEvents, + AppleWMNumberErrors, + ProcAppleWMDispatch, + SProcAppleWMDispatch, + AppleWMResetProc, + StandardMinorOpcode))) + { + WMReqCode = (unsigned char)extEntry->base; + WMErrorBase = extEntry->errorBase; + WMEventBase = extEntry->eventBase; + EventSwapVector[WMEventBase] = (EventSwapPtr) SNotifyEvent; + appleWMProcs = procsPtr; + } +} + +/*ARGSUSED*/ +static void +AppleWMResetProc ( + ExtensionEntry* extEntry +) +{ +} + +/* Updates the _NATIVE_SCREEN_ORIGIN property on the given root window. */ +void +AppleWMSetScreenOrigin( + WindowPtr pWin +) +{ + long data[2]; + + data[0] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].x + + darwinMainScreenX); + data[1] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].y + + darwinMainScreenY); + + ChangeWindowProperty(pWin, xa_native_screen_origin(), XA_INTEGER, + 32, PropModeReplace, 2, data, TRUE); +} + +/* Window managers can set the _APPLE_NO_ORDER_IN property on windows + that are being genie-restored from the Dock. We want them to + be mapped but remain ordered-out until the animation + completes (when the Dock will order them in). */ +Bool +AppleWMDoReorderWindow( + WindowPtr pWin +) +{ + Atom atom; + PropertyPtr prop; + + atom = xa_apple_no_order_in(); + for (prop = wUserProps(pWin); prop != NULL; prop = prop->next) + { + if (prop->propertyName == atom && prop->type == atom) + return FALSE; + } + + return TRUE; +} + + +static int +ProcAppleWMQueryVersion( + register ClientPtr client +) +{ + xAppleWMQueryVersionReply rep; + register int n; + + REQUEST_SIZE_MATCH(xAppleWMQueryVersionReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.majorVersion = APPLE_WM_MAJOR_VERSION; + rep.minorVersion = APPLE_WM_MINOR_VERSION; + rep.patchVersion = APPLE_WM_PATCH_VERSION; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + } + WriteToClient(client, sizeof(xAppleWMQueryVersionReply), (char *)&rep); + return (client->noClientException); +} + + +/* events */ + +static inline void +updateEventMask (WMEventPtr *pHead) +{ + WMEventPtr pCur; + + eventMask = 0; + for (pCur = *pHead; pCur != NULL; pCur = pCur->next) + eventMask |= pCur->mask; +} + +/*ARGSUSED*/ +static int +WMFreeClient (data, id) + pointer data; + XID id; +{ + WMEventPtr pEvent; + WMEventPtr *pHead, pCur, pPrev; + + pEvent = (WMEventPtr) data; + pHead = (WMEventPtr *) LookupIDByType(eventResource, EventType); + if (pHead) { + pPrev = 0; + for (pCur = *pHead; pCur && pCur != pEvent; pCur=pCur->next) + pPrev = pCur; + if (pCur) { + if (pPrev) + pPrev->next = pEvent->next; + else + *pHead = pEvent->next; + } + updateEventMask (pHead); + } + xfree ((pointer) pEvent); + return 1; +} + +/*ARGSUSED*/ +static int +WMFreeEvents (data, id) + pointer data; + XID id; +{ + WMEventPtr *pHead, pCur, pNext; + + pHead = (WMEventPtr *) data; + for (pCur = *pHead; pCur; pCur = pNext) { + pNext = pCur->next; + FreeResource (pCur->clientResource, ClientType); + xfree ((pointer) pCur); + } + xfree ((pointer) pHead); + eventMask = 0; + return 1; +} + +static int +ProcAppleWMSelectInput (client) + register ClientPtr client; +{ + REQUEST(xAppleWMSelectInputReq); + WMEventPtr pEvent, pNewEvent, *pHead; + XID clientResource; + + REQUEST_SIZE_MATCH (xAppleWMSelectInputReq); + pHead = (WMEventPtr *)SecurityLookupIDByType(client, + eventResource, EventType, DixWriteAccess); + if (stuff->mask != 0) { + if (pHead) { + /* check for existing entry. */ + for (pEvent = *pHead; pEvent; pEvent = pEvent->next) + { + if (pEvent->client == client) + { + pEvent->mask = stuff->mask; + updateEventMask (pHead); + return Success; + } + } + } + + /* build the entry */ + pNewEvent = (WMEventPtr) xalloc (sizeof (WMEventRec)); + if (!pNewEvent) + return BadAlloc; + pNewEvent->next = 0; + pNewEvent->client = client; + pNewEvent->mask = stuff->mask; + /* + * add a resource that will be deleted when + * the client goes away + */ + clientResource = FakeClientID (client->index); + pNewEvent->clientResource = clientResource; + if (!AddResource (clientResource, ClientType, (pointer)pNewEvent)) + return BadAlloc; + /* + * create a resource to contain a pointer to the list + * of clients selecting input. This must be indirect as + * the list may be arbitrarily rearranged which cannot be + * done through the resource database. + */ + if (!pHead) + { + pHead = (WMEventPtr *) xalloc (sizeof (WMEventPtr)); + if (!pHead || + !AddResource (eventResource, EventType, (pointer)pHead)) + { + FreeResource (clientResource, RT_NONE); + return BadAlloc; + } + *pHead = 0; + } + pNewEvent->next = *pHead; + *pHead = pNewEvent; + updateEventMask (pHead); + } else if (stuff->mask == 0) { + /* delete the interest */ + if (pHead) { + pNewEvent = 0; + for (pEvent = *pHead; pEvent; pEvent = pEvent->next) { + if (pEvent->client == client) + break; + pNewEvent = pEvent; + } + if (pEvent) { + FreeResource (pEvent->clientResource, ClientType); + if (pNewEvent) + pNewEvent->next = pEvent->next; + else + *pHead = pEvent->next; + xfree (pEvent); + updateEventMask (pHead); + } + } + } else { + client->errorValue = stuff->mask; + return BadValue; + } + return Success; +} + +/* + * deliver the event + */ + +void +AppleWMSendEvent (type, mask, which, arg) + int type, which, arg; + unsigned int mask; +{ + WMEventPtr *pHead, pEvent; + ClientPtr client; + xAppleWMNotifyEvent se; + + pHead = (WMEventPtr *) LookupIDByType(eventResource, EventType); + if (!pHead) + return; + for (pEvent = *pHead; pEvent; pEvent = pEvent->next) { + client = pEvent->client; + if ((pEvent->mask & mask) == 0 + || client == serverClient || client->clientGone) + { + continue; + } + se.type = type + WMEventBase; + se.kind = which; + se.arg = arg; + se.sequenceNumber = client->sequence; + se.time = currentTime.milliseconds; + WriteEventsToClient (client, 1, (xEvent *) &se); + } +} + +/* Safe to call from any thread. */ +unsigned int +AppleWMSelectedEvents (void) +{ + return eventMask; +} + + +/* general utility functions */ + +static int +ProcAppleWMDisableUpdate( + register ClientPtr client +) +{ + REQUEST_SIZE_MATCH(xAppleWMDisableUpdateReq); + + appleWMProcs->DisableUpdate(); + + return (client->noClientException); +} + +static int +ProcAppleWMReenableUpdate( + register ClientPtr client +) +{ + REQUEST_SIZE_MATCH(xAppleWMReenableUpdateReq); + + appleWMProcs->EnableUpdate(); + + return (client->noClientException); +} + + +/* window functions */ + +static int +ProcAppleWMSetWindowMenu( + register ClientPtr client +) +{ + const char *bytes, **items; + char *shortcuts; + int max_len, nitems, i, j; + REQUEST(xAppleWMSetWindowMenuReq); + + REQUEST_AT_LEAST_SIZE(xAppleWMSetWindowMenuReq); + + nitems = stuff->nitems; + items = xalloc (sizeof (char *) * nitems); + shortcuts = xalloc (sizeof (char) * nitems); + + max_len = (stuff->length << 2) - sizeof(xAppleWMSetWindowMenuReq); + bytes = (char *) &stuff[1]; + + for (i = j = 0; i < max_len && j < nitems;) + { + shortcuts[j] = bytes[i++]; + items[j++] = bytes + i; + + while (i < max_len) + { + if (bytes[i++] == 0) + break; + } + } + +#ifdef INXQUARTZ + X11ApplicationSetWindowMenu (nitems, items, shortcuts); +#else + QuartzSetWindowMenu (nitems, items, shortcuts); +#endif + + free(items); + free(shortcuts); + + return (client->noClientException); +} + +static int +ProcAppleWMSetWindowMenuCheck( + register ClientPtr client +) +{ + REQUEST(xAppleWMSetWindowMenuCheckReq); + + REQUEST_SIZE_MATCH(xAppleWMSetWindowMenuCheckReq); +#ifdef INXQUARTZ + X11ApplicationSetWindowMenuCheck(stuff->index); +#else + QuartzMessageMainThread(kQuartzSetWindowMenuCheck, &stuff->index, + sizeof(stuff->index)); +#endif + return (client->noClientException); +} + +static int +ProcAppleWMSetFrontProcess( + register ClientPtr client +) +{ + REQUEST_SIZE_MATCH(xAppleWMSetFrontProcessReq); +#ifdef INXQUARTZ + X11ApplicationSetFrontProcess(); +#else + QuartzMessageMainThread(kQuartzSetFrontProcess, NULL, 0); +#endif + return (client->noClientException); +} + +static int +ProcAppleWMSetWindowLevel( + register ClientPtr client +) +{ + REQUEST(xAppleWMSetWindowLevelReq); + WindowPtr pWin; + int errno; + + REQUEST_SIZE_MATCH(xAppleWMSetWindowLevelReq); + + if (Success != dixLookupWindow(&pWin, stuff->window, client, + DixReadAccess)) + return BadValue; + + if (stuff->level < 0 || stuff->level >= AppleWMNumWindowLevels) { + return BadValue; + } + + errno = appleWMProcs->SetWindowLevel(pWin, stuff->level); + if (errno != Success) { + return errno; + } + + return (client->noClientException); +} + +static int +ProcAppleWMSetCanQuit( + register ClientPtr client +) +{ + REQUEST(xAppleWMSetCanQuitReq); + + REQUEST_SIZE_MATCH(xAppleWMSetCanQuitReq); +#ifdef INXQUARTZ + X11ApplicationSetCanQuit(stuff->state); +#else + QuartzMessageMainThread(kQuartzSetCanQuit, &stuff->state, + sizeof(stuff->state)); +#endif + + return (client->noClientException); +} + + +/* frame functions */ + +static int +ProcAppleWMFrameGetRect( + register ClientPtr client +) +{ + xAppleWMFrameGetRectReply rep; + BoxRec ir, or, rr; + REQUEST(xAppleWMFrameGetRectReq); + + REQUEST_SIZE_MATCH(xAppleWMFrameGetRectReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + ir = make_box (stuff->ix, stuff->iy, stuff->iw, stuff->ih); + or = make_box (stuff->ox, stuff->oy, stuff->ow, stuff->oh); + + if (appleWMProcs->FrameGetRect(stuff->frame_rect, + stuff->frame_class, + &or, &ir, &rr) != Success) + { + return BadValue; + } + + rep.x = rr.x1; + rep.y = rr.y1; + rep.w = rr.x2 - rr.x1; + rep.h = rr.y2 - rr.y1; + + WriteToClient(client, sizeof(xAppleWMFrameGetRectReply), (char *)&rep); + return (client->noClientException); +} + +static int +ProcAppleWMFrameHitTest( + register ClientPtr client +) +{ + xAppleWMFrameHitTestReply rep; + BoxRec ir, or; + int ret; + REQUEST(xAppleWMFrameHitTestReq); + + REQUEST_SIZE_MATCH(xAppleWMFrameHitTestReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + ir = make_box (stuff->ix, stuff->iy, stuff->iw, stuff->ih); + or = make_box (stuff->ox, stuff->oy, stuff->ow, stuff->oh); + + if (appleWMProcs->FrameHitTest(stuff->frame_class, stuff->px, + stuff->py, &or, &ir, &ret) != Success) + { + return BadValue; + } + + rep.ret = ret; + + WriteToClient(client, sizeof(xAppleWMFrameHitTestReply), (char *)&rep); + return (client->noClientException); +} + +static int +ProcAppleWMFrameDraw( + register ClientPtr client +) +{ + BoxRec ir, or; + unsigned int title_length, title_max; + unsigned char *title_bytes; + REQUEST(xAppleWMFrameDrawReq); + WindowPtr pWin; + + REQUEST_AT_LEAST_SIZE(xAppleWMFrameDrawReq); + + if (Success != dixLookupWindow(&pWin, stuff->window, client, + DixReadAccess)) + return BadValue; + + ir = make_box (stuff->ix, stuff->iy, stuff->iw, stuff->ih); + or = make_box (stuff->ox, stuff->oy, stuff->ow, stuff->oh); + + title_length = stuff->title_length; + title_max = (stuff->length << 2) - sizeof(xAppleWMFrameDrawReq); + + if (title_max < title_length) + return BadValue; + + title_bytes = (unsigned char *) &stuff[1]; + + errno = appleWMProcs->FrameDraw(pWin, stuff->frame_class, + stuff->frame_attr, &or, &ir, + title_length, title_bytes); + if (errno != Success) { + return errno; + } + + return (client->noClientException); +} + + +/* dispatch */ + +static int +ProcAppleWMDispatch ( + register ClientPtr client +) +{ + REQUEST(xReq); + + switch (stuff->data) + { + case X_AppleWMQueryVersion: + return ProcAppleWMQueryVersion(client); + } + + if (!LocalClient(client)) + return WMErrorBase + AppleWMClientNotLocal; + + switch (stuff->data) + { + case X_AppleWMSelectInput: + return ProcAppleWMSelectInput(client); + case X_AppleWMDisableUpdate: + return ProcAppleWMDisableUpdate(client); + case X_AppleWMReenableUpdate: + return ProcAppleWMReenableUpdate(client); + case X_AppleWMSetWindowMenu: + return ProcAppleWMSetWindowMenu(client); + case X_AppleWMSetWindowMenuCheck: + return ProcAppleWMSetWindowMenuCheck(client); + case X_AppleWMSetFrontProcess: + return ProcAppleWMSetFrontProcess(client); + case X_AppleWMSetWindowLevel: + return ProcAppleWMSetWindowLevel(client); + case X_AppleWMSetCanQuit: + return ProcAppleWMSetCanQuit(client); + case X_AppleWMFrameGetRect: + return ProcAppleWMFrameGetRect(client); + case X_AppleWMFrameHitTest: + return ProcAppleWMFrameHitTest(client); + case X_AppleWMFrameDraw: + return ProcAppleWMFrameDraw(client); + default: + return BadRequest; + } +} + +static void +SNotifyEvent(from, to) + xAppleWMNotifyEvent *from, *to; +{ + to->type = from->type; + to->kind = from->kind; + cpswaps (from->sequenceNumber, to->sequenceNumber); + cpswapl (from->time, to->time); + cpswapl (from->arg, to->arg); +} + +static int +SProcAppleWMQueryVersion( + register ClientPtr client +) +{ + register int n; + REQUEST(xAppleWMQueryVersionReq); + swaps(&stuff->length, n); + return ProcAppleWMQueryVersion(client); +} + +static int +SProcAppleWMDispatch ( + register ClientPtr client +) +{ + REQUEST(xReq); + + /* It is bound to be non-local when there is byte swapping */ + if (!LocalClient(client)) + return WMErrorBase + AppleWMClientNotLocal; + + /* only local clients are allowed WM access */ + switch (stuff->data) + { + case X_AppleWMQueryVersion: + return SProcAppleWMQueryVersion(client); + default: + return BadRequest; + } +} diff --git a/xorg-server-1.4/hw/darwin/quartz/applewmExt.h b/xorg-server-1.4/hw/darwin/quartz/applewmExt.h new file mode 100644 index 0000000..60d49ef --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/applewmExt.h @@ -0,0 +1,84 @@ +/* + * External interface for the server's AppleWM support + */ +/************************************************************************** + +Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved. +Copyright (c) 2003-2004 Torrey T. Lyons. 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, sub license, 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 PRECISION INSIGHT AND/OR ITS 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. + +**************************************************************************/ + +#ifndef _APPLEWMEXT_H_ +#define _APPLEWMEXT_H_ + +#include "window.h" + +typedef int (*DisableUpdateProc)(void); +typedef int (*EnableUpdateProc)(void); +typedef int (*SetWindowLevelProc)(WindowPtr pWin, int level); +typedef int (*FrameGetRectProc)(int type, int class, const BoxRec *outer, + const BoxRec *inner, BoxRec *ret); +typedef int (*FrameHitTestProc)(int class, int x, int y, + const BoxRec *outer, + const BoxRec *inner, int *ret); +typedef int (*FrameDrawProc)(WindowPtr pWin, int class, unsigned int attr, + const BoxRec *outer, const BoxRec *inner, + unsigned int title_len, + const unsigned char *title_bytes); + +/* + * AppleWM implementation function list + */ +typedef struct _AppleWMProcs { + DisableUpdateProc DisableUpdate; + EnableUpdateProc EnableUpdate; + SetWindowLevelProc SetWindowLevel; + FrameGetRectProc FrameGetRect; + FrameHitTestProc FrameHitTest; + FrameDrawProc FrameDraw; +} AppleWMProcsRec, *AppleWMProcsPtr; + +void AppleWMExtensionInit( + AppleWMProcsPtr procsPtr +); + +void AppleWMSetScreenOrigin( + WindowPtr pWin +); + +Bool AppleWMDoReorderWindow( + WindowPtr pWin +); + +void AppleWMSendEvent( + int /* type */, + unsigned int /* mask */, + int /* which */, + int /* arg */ +); + +unsigned int AppleWMSelectedEvents( + void +); + +#endif /* _APPLEWMEXT_H_ */ diff --git a/xorg-server-1.4/hw/darwin/quartz/cr/XView.m b/xorg-server-1.4/hw/darwin/quartz/cr/XView.m new file mode 100644 index 0000000..8bcd1a7 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/cr/XView.m @@ -0,0 +1,76 @@ +/* + * NSView subclass for Mac OS X rootless X server + * + * Each rootless window contains an instance of this class. + * This class handles events while drawing is handled by Carbon + * code in the rootless Aqua implementation. + * + * Copyright (c) 2001 Greg Parker. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/XView.m,v 1.1 2003/06/07 05:49:07 torrey Exp $ */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#import "XView.h" + + +@implementation XView + +- (BOOL)isFlipped +{ + return NO; +} + +- (BOOL)isOpaque +{ + return YES; +} + +- (BOOL)acceptsFirstResponder +{ + return YES; +} + +- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent +{ + return YES; +} + +- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent +{ + return YES; +} + +- (void)mouseDown:(NSEvent *)anEvent +{ + // Only X is allowed to restack windows. + [NSApp preventWindowOrdering]; + if (! [NSApp isActive]) { + [NSApp activateIgnoringOtherApps:YES]; + } + [[self nextResponder] mouseDown:anEvent]; +} + +@end diff --git a/xorg-server-1.4/hw/darwin/quartz/cr/crAppleWM.m b/xorg-server-1.4/hw/darwin/quartz/cr/crAppleWM.m new file mode 100644 index 0000000..0741d4e --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/cr/crAppleWM.m @@ -0,0 +1,159 @@ +/* + * Cocoa rootless implementation functions for AppleWM extension + */ +/* + * Copyright (c) 2003 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprFrame.c,v 1.2 2003/06/30 01:45:13 torrey Exp $ */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "quartz/quartzCommon.h" +#include "quartz/cr/cr.h" + +#undef BOOL +#define BOOL xBOOL +#include "rootless.h" +#include "X11/X.h" +#define _APPLEWM_SERVER_ +#include "X11/extensions/applewm.h" +#include "quartz/applewmExt.h" +#undef BOOL + +#define StdDocumentStyleMask (NSTitledWindowMask | \ + NSClosableWindowMask | \ + NSMiniaturizableWindowMask | \ + NSResizableWindowMask) + +static int +CRDisableUpdate(void) +{ + return Success; +} + + +static int +CREnableUpdate(void) +{ + return Success; +} + + +static int CRSetWindowLevel( + WindowPtr pWin, + int level) +{ + CRWindowPtr crWinPtr; + + crWinPtr = (CRWindowPtr) RootlessFrameForWindow(pWin, TRUE); + if (crWinPtr == 0) + return BadWindow; + + RootlessStopDrawing(pWin, FALSE); + + [crWinPtr->window setLevel:level]; + + return Success; +} + + +static int CRFrameGetRect( + int type, + int class, + const BoxRec *outer, + const BoxRec *inner, + BoxRec *ret) +{ + return Success; +} + + +static int CRFrameHitTest( + int class, + int x, + int y, + const BoxRec *outer, + const BoxRec *inner, + int *ret) +{ + return 0; +} + + +static int CRFrameDraw( + WindowPtr pWin, + int class, + unsigned int attr, + const BoxRec *outer, + const BoxRec *inner, + unsigned int title_len, + const unsigned char *title_bytes) +{ + CRWindowPtr crWinPtr; + NSWindow *window; + Bool hasResizeIndicator; + + /* We assume the window has not yet been framed so + RootlessFrameForWindow() will cause it to be. Record the window + style so that the appropriate one will be used when it is framed. + If the window is already framed, we can't change the window + style and the following will have no effect. */ + + nextWindowToFrame = pWin; + if (class == AppleWMFrameClassDocument) + nextWindowStyle = StdDocumentStyleMask; + else + nextWindowStyle = NSBorderlessWindowMask; + + crWinPtr = (CRWindowPtr) RootlessFrameForWindow(pWin, TRUE); + if (crWinPtr == 0) + return BadWindow; + + window = crWinPtr->window; + + [window setTitle:[NSString stringWithCString:title_bytes + length:title_len]]; + + hasResizeIndicator = (attr & AppleWMFrameGrowBox) ? YES : NO; + [window setShowsResizeIndicator:hasResizeIndicator]; + + return Success; +} + + +static AppleWMProcsRec crAppleWMProcs = { + CRDisableUpdate, + CREnableUpdate, + CRSetWindowLevel, + CRFrameGetRect, + CRFrameHitTest, + CRFrameDraw +}; + + +void CRAppleWMInit(void) +{ + AppleWMExtensionInit(&crAppleWMProcs); +} diff --git a/xorg-server-1.4/hw/darwin/quartz/cr/crFrame.m b/xorg-server-1.4/hw/darwin/quartz/cr/crFrame.m new file mode 100644 index 0000000..2b8e57d --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/cr/crFrame.m @@ -0,0 +1,441 @@ +/* + * Cocoa rootless implementation frame functions + */ +/* + * Copyright (c) 2001 Greg Parker. All Rights Reserved. + * Copyright (c) 2002-2003 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ +/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/cr/crFrame.m,v 1.2 2004/04/23 19:15:51 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crFrame.m,v 1.9 2004/03/19 02:05:29 torrey Exp $ */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "quartz/quartzCommon.h" +#include "quartz/cr/cr.h" + +#undef BOOL +#define BOOL xBOOL +#include "rootless.h" +#include "quartz/applewmExt.h" +#include "windowstr.h" +#undef BOOL + +WindowPtr nextWindowToFrame = NULL; +unsigned int nextWindowStyle = 0; + +static void CRReshapeFrame(RootlessFrameID wid, RegionPtr pShape); + + +/* + * CRCreateFrame + * Create a new physical window. + * Rootless windows must not autodisplay! Autodisplay can cause a deadlock. + * Event thread - autodisplay: locks view hierarchy, then window + * X Server thread - window resize: locks window, then view hierarchy + * Deadlock occurs if each thread gets one lock and waits for the other. + */ +static Bool +CRCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen, + int newX, int newY, RegionPtr pShape) +{ + CRWindowPtr crWinPtr; + NSRect bounds; + NSWindow *theWindow; + XView *theView; + unsigned int theStyleMask = NSBorderlessWindowMask; + + crWinPtr = (CRWindowPtr) xalloc(sizeof(CRWindowRec)); + + bounds = NSMakeRect(newX, + NSHeight([[NSScreen mainScreen] frame]) - + newY - pFrame->height, + pFrame->width, pFrame->height); + + // Check if AppleWM has specified a style for this window + if (pFrame->win == nextWindowToFrame) { + theStyleMask = nextWindowStyle; + } + nextWindowToFrame = NULL; + + // Create an NSWindow for the new X11 window + theWindow = [[NSWindow alloc] initWithContentRect:bounds + styleMask:theStyleMask + backing:NSBackingStoreBuffered +#ifdef DEFER_NSWINDOW + defer:YES]; +#else + defer:NO]; +#endif + + if (!theWindow) return FALSE; + + [theWindow setBackgroundColor:[NSColor clearColor]]; // erase transparent + [theWindow setAlphaValue:1.0]; // draw opaque + [theWindow setOpaque:YES]; // changed when window is shaped + + [theWindow useOptimizedDrawing:YES]; // Has no overlapping sub-views + [theWindow setAutodisplay:NO]; // See comment above + [theWindow disableFlushWindow]; // We do all the flushing manually + [theWindow setHasShadow:YES]; // All windows have shadows + [theWindow setReleasedWhenClosed:YES]; // Default, but we want to be sure + + theView = [[XView alloc] initWithFrame:bounds]; + [theWindow setContentView:theView]; + [theWindow setInitialFirstResponder:theView]; + +#ifdef DEFER_NSWINDOW + // We need the NSWindow to actually be created now. + // If we had to defer creating it, we have to order it + // onto the screen to force it to be created. + + if (pFrame->win->prevSib) { + CRWindowPtr crWinPtr = (CRWindowPtr) RootlessFrameForWindow( + pFrame->win->prevSib, FALSE); + int upperNum = [crWinPtr->window windowNumber]; + [theWindow orderWindow:NSWindowBelow relativeTo:upperNum]; + } else { + [theWindow orderFront:nil]; + } +#endif + + [theWindow setAcceptsMouseMovedEvents:YES]; + + crWinPtr->window = theWindow; + crWinPtr->view = theView; + + [theView lockFocus]; + // Fill the window with white to make sure alpha channel is set + NSEraseRect(bounds); + crWinPtr->port = [theView qdPort]; + crWinPtr->context = [[NSGraphicsContext currentContext] graphicsPort]; + // CreateCGContextForPort(crWinPtr->port, &crWinPtr->context); + [theView unlockFocus]; + + // Store the implementation private frame ID + pFrame->wid = (RootlessFrameID) crWinPtr; + + // Reshape the frame if it was created shaped. + if (pShape != NULL) + CRReshapeFrame(pFrame->wid, pShape); + + return TRUE; +} + + +/* + * CRDestroyFrame + * Destroy a frame. + */ +static void +CRDestroyFrame(RootlessFrameID wid) +{ + CRWindowPtr crWinPtr = (CRWindowPtr) wid; + + [crWinPtr->window orderOut:nil]; + [crWinPtr->window close]; + [crWinPtr->view release]; + free(crWinPtr); +} + + +/* + * CRMoveFrame + * Move a frame on screen. + */ +static void +CRMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY) +{ + CRWindowPtr crWinPtr = (CRWindowPtr) wid; + NSPoint topLeft; + + topLeft = NSMakePoint(newX, + NSHeight([[NSScreen mainScreen] frame]) - newY); + + [crWinPtr->window setFrameTopLeftPoint:topLeft]; +} + + +/* + * CRResizeFrame + * Move and resize a frame. + */ +static void +CRResizeFrame(RootlessFrameID wid, ScreenPtr pScreen, + int newX, int newY, unsigned int newW, unsigned int newH, + unsigned int gravity) +{ + CRWindowPtr crWinPtr = (CRWindowPtr) wid; + NSRect bounds = NSMakeRect(newX, NSHeight([[NSScreen mainScreen] frame]) - + newY - newH, newW, newH); + + [crWinPtr->window setFrame:bounds display:NO]; +} + + +/* + * CRRestackFrame + * Change the frame order. Put the frame behind nextWid or on top if + * it is NULL. Unmapped frames are mapped by restacking them. + */ +static void +CRRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid) +{ + CRWindowPtr crWinPtr = (CRWindowPtr) wid; + CRWindowPtr crNextWinPtr = (CRWindowPtr) nextWid; + + if (crNextWinPtr) { + int upperNum = [crNextWinPtr->window windowNumber]; + + [crWinPtr->window orderWindow:NSWindowBelow relativeTo:upperNum]; + } else { + [crWinPtr->window makeKeyAndOrderFront:nil]; + } +} + + +/* + * CRReshapeFrame + * Set the shape of a frame. + */ +static void +CRReshapeFrame(RootlessFrameID wid, RegionPtr pShape) +{ + CRWindowPtr crWinPtr = (CRWindowPtr) wid; + NSRect bounds = [crWinPtr->view frame]; + int winHeight = NSHeight(bounds); + BoxRec localBox = {0, 0, NSWidth(bounds), winHeight}; + + [crWinPtr->view lockFocus]; + + if (pShape != NULL) { + // Calculate the region outside the new shape. + miInverse(pShape, pShape, &localBox); + } + + // If window is currently shaped we need to undo the previous shape. + if (![crWinPtr->window isOpaque]) { + [[NSColor whiteColor] set]; + NSRectFillUsingOperation(bounds, NSCompositeDestinationAtop); + } + + if (pShape != NULL) { + int count = REGION_NUM_RECTS(pShape); + BoxRec *extRects = REGION_RECTS(pShape); + BoxRec *rects, *end; + + // Make transparent if window is now shaped. + [crWinPtr->window setOpaque:NO]; + + // Clear the areas outside the window shape + [[NSColor clearColor] set]; + for (rects = extRects, end = extRects+count; rects < end; rects++) { + int rectHeight = rects->y2 - rects->y1; + NSRectFill( NSMakeRect(rects->x1, + winHeight - rects->y1 - rectHeight, + rects->x2 - rects->x1, rectHeight) ); + } + [[NSGraphicsContext currentContext] flushGraphics]; + + // force update of window shadow + [crWinPtr->window setHasShadow:NO]; + [crWinPtr->window setHasShadow:YES]; + + } else { + [crWinPtr->window setOpaque:YES]; + [[NSGraphicsContext currentContext] flushGraphics]; + } + + [crWinPtr->view unlockFocus]; +} + + +/* + * CRUnmapFrame + * Unmap a frame. + */ +static void +CRUnmapFrame(RootlessFrameID wid) +{ + CRWindowPtr crWinPtr = (CRWindowPtr) wid; + + [crWinPtr->window orderOut:nil]; +} + + +/* + * CRStartDrawing + * When a window's buffer is not being drawn to, the CoreGraphics + * window server may compress or move it. Call this routine + * to lock down the buffer during direct drawing. It returns + * a pointer to the backing buffer. + */ +static void +CRStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) +{ + CRWindowPtr crWinPtr = (CRWindowPtr) wid; + PixMapHandle pix; + + [crWinPtr->view lockFocus]; + crWinPtr->port = [crWinPtr->view qdPort]; + LockPortBits(crWinPtr->port); + [crWinPtr->view unlockFocus]; + pix = GetPortPixMap(crWinPtr->port); + + *pixelData = GetPixBaseAddr(pix); + *bytesPerRow = GetPixRowBytes(pix) & 0x3fff; // fixme is mask needed? +} + + +/* + * CRStopDrawing + * When direct access to a window's buffer is no longer needed, this + * routine should be called to allow CoreGraphics to compress or + * move it. + */ +static void +CRStopDrawing(RootlessFrameID wid, Bool flush) +{ + CRWindowPtr crWinPtr = (CRWindowPtr) wid; + + UnlockPortBits(crWinPtr->port); + + if (flush) { + QDFlushPortBuffer(crWinPtr->port, NULL); + } +} + + +/* + * CRUpdateRegion + * Flush a region from a window's backing buffer to the screen. + */ +static void +CRUpdateRegion(RootlessFrameID wid, RegionPtr pDamage) +{ + CRWindowPtr crWinPtr = (CRWindowPtr) wid; + +#ifdef ROOTLESS_TRACK_DAMAGE + int count = REGION_NUM_RECTS(pDamage); + BoxRec *rects = REGION_RECTS(pDamage); + BoxRec *end; + + static RgnHandle rgn = NULL; + static RgnHandle box = NULL; + + if (!rgn) rgn = NewRgn(); + if (!box) box = NewRgn(); + + for (end = rects+count; rects < end; rects++) { + Rect qdRect; + qdRect.left = rects->x1; + qdRect.top = rects->y1; + qdRect.right = rects->x2; + qdRect.bottom = rects->y2; + + RectRgn(box, &qdRect); + UnionRgn(rgn, box, rgn); + } + + QDFlushPortBuffer(crWinPtr->port, rgn); + + SetEmptyRgn(rgn); + SetEmptyRgn(box); + +#else /* !ROOTLESS_TRACK_DAMAGE */ + QDFlushPortBuffer(crWinPtr->port, NULL); +#endif +} + + +/* + * CRDamageRects + * Mark damaged rectangles as requiring redisplay to screen. + */ +static void +CRDamageRects(RootlessFrameID wid, int count, const BoxRec *rects, + int shift_x, int shift_y) +{ + CRWindowPtr crWinPtr = (CRWindowPtr) wid; + const BoxRec *end; + + for (end = rects + count; rects < end; rects++) { + Rect qdRect; + qdRect.left = rects->x1 + shift_x; + qdRect.top = rects->y1 + shift_y; + qdRect.right = rects->x2 + shift_x; + qdRect.bottom = rects->y2 + shift_y; + + QDAddRectToDirtyRegion(crWinPtr->port, &qdRect); + } +} + + +/* + * Called to check if the frame should be reordered when it is restacked. + */ +Bool CRDoReorderWindow(RootlessWindowPtr pFrame) +{ + WindowPtr pWin = pFrame->win; + + return AppleWMDoReorderWindow(pWin); +} + + +static RootlessFrameProcsRec CRRootlessProcs = { + CRCreateFrame, + CRDestroyFrame, + CRMoveFrame, + CRResizeFrame, + CRRestackFrame, + CRReshapeFrame, + CRUnmapFrame, + CRStartDrawing, + CRStopDrawing, + CRUpdateRegion, + CRDamageRects, + NULL, + CRDoReorderWindow, + NULL, + NULL, + NULL, + NULL +}; + + +/* + * Initialize CR implementation + */ +Bool +CRInit(ScreenPtr pScreen) +{ + RootlessInit(pScreen, &CRRootlessProcs); + + rootless_CopyBytes_threshold = 0; + rootless_FillBytes_threshold = 0; + rootless_CompositePixels_threshold = 0; + rootless_CopyWindow_threshold = 0; + + return TRUE; +} diff --git a/xorg-server-1.4/hw/darwin/quartz/cr/crScreen.m b/xorg-server-1.4/hw/darwin/quartz/cr/crScreen.m new file mode 100644 index 0000000..9dd130e --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/cr/crScreen.m @@ -0,0 +1,383 @@ +/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.4 2004/08/12 20:24:36 torrey Exp $ */ +/* + * Cocoa rootless implementation initialization + */ +/* + * Copyright (c) 2001 Greg Parker. All Rights Reserved. + * Copyright (c) 2002-2004 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.5 2003/11/12 20:21:52 torrey Exp $ */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "quartz/quartzCommon.h" +#include "quartz/cr/cr.h" + +#undef BOOL +#define BOOL xBOOL +#include "darwin.h" +#include "quartz/quartz.h" +#include "quartz/quartzCursor.h" +#include "rootless.h" +#include "safeAlpha/safeAlpha.h" +#include "quartz/pseudoramiX.h" +#include "quartz/applewmExt.h" + +#include "regionstr.h" +#include "scrnintstr.h" +#include "picturestr.h" +#include "globals.h" +#ifdef DAMAGE +# include "damage.h" +#endif +#undef BOOL + +// Name of GLX bundle using AGL framework +static const char *crOpenGLBundle = "glxAGL.bundle"; + +static Class classXView = nil; + + +/* + * CRDisplayInit + * Find all screens. + * + * Multihead note: When rootless mode uses PseudoramiX, the + * X server only sees one screen; only PseudoramiX itself knows + * about all of the screens. + */ +static void +CRDisplayInit(void) +{ + ErrorF("Display mode: Rootless Quartz -- Cocoa implementation\n"); + + if (noPseudoramiXExtension) { + darwinScreensFound = [[NSScreen screens] count]; + } else { + darwinScreensFound = 1; // only PseudoramiX knows about the rest + } + + CRAppleWMInit(); +} + + +/* + * CRAddPseudoramiXScreens + * Add a single virtual screen encompassing all the physical screens + * with PseudoramiX. + */ +static void +CRAddPseudoramiXScreens(int *x, int *y, int *width, int *height) +{ + int i; + NSRect unionRect = NSMakeRect(0, 0, 0, 0); + NSArray *screens = [NSScreen screens]; + + // Get the union of all screens (minus the menu bar on main screen) + for (i = 0; i < [screens count]; i++) { + NSScreen *screen = [screens objectAtIndex:i]; + NSRect frame = [screen frame]; + frame.origin.y = [[NSScreen mainScreen] frame].size.height - + frame.size.height - frame.origin.y; + if (NSEqualRects([screen frame], [[NSScreen mainScreen] frame])) { + frame.origin.y += aquaMenuBarHeight; + frame.size.height -= aquaMenuBarHeight; + } + unionRect = NSUnionRect(unionRect, frame); + } + + // Use unionRect as the screen size for the X server. + *x = unionRect.origin.x; + *y = unionRect.origin.y; + *width = unionRect.size.width; + *height = unionRect.size.height; + + // Tell PseudoramiX about the real screens. + // InitOutput() will move the big screen to (0,0), + // so compensate for that here. + for (i = 0; i < [screens count]; i++) { + NSScreen *screen = [screens objectAtIndex:i]; + NSRect frame = [screen frame]; + int j; + + // Skip this screen if it's a mirrored copy of an earlier screen. + for (j = 0; j < i; j++) { + if (NSEqualRects(frame, [[screens objectAtIndex:j] frame])) { + ErrorF("PseudoramiX screen %d is a mirror of screen %d.\n", + i, j); + break; + } + } + if (j < i) continue; // this screen is a mirrored copy + + frame.origin.y = [[NSScreen mainScreen] frame].size.height - + frame.size.height - frame.origin.y; + + if (NSEqualRects([screen frame], [[NSScreen mainScreen] frame])) { + frame.origin.y += aquaMenuBarHeight; + frame.size.height -= aquaMenuBarHeight; + } + + ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i, + (int)frame.size.width, (int)frame.size.height, + (int)frame.origin.x, (int)frame.origin.y); + + frame.origin.x -= unionRect.origin.x; + frame.origin.y -= unionRect.origin.y; + + ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n", + i, (int)frame.origin.x, (int)frame.origin.y); + + PseudoramiXAddScreen(frame.origin.x, frame.origin.y, + frame.size.width, frame.size.height); + } +} + + +/* + * CRScreenParams + * Set the basic screen parameters. + */ +static void +CRScreenParams(int index, DarwinFramebufferPtr dfb) +{ + dfb->bitsPerComponent = CGDisplayBitsPerSample(kCGDirectMainDisplay); + dfb->bitsPerPixel = CGDisplayBitsPerPixel(kCGDirectMainDisplay); + dfb->colorBitsPerPixel = 3 * dfb->bitsPerComponent; + + if (noPseudoramiXExtension) { + NSScreen *screen = [[NSScreen screens] objectAtIndex:index]; + NSRect frame = [screen frame]; + + // set x, y so (0,0) is top left of main screen + dfb->x = NSMinX(frame); + dfb->y = NSHeight([[NSScreen mainScreen] frame]) - + NSHeight(frame) - NSMinY(frame); + + dfb->width = NSWidth(frame); + dfb->height = NSHeight(frame); + + // Shift the usable part of main screen down to avoid the menu bar. + if (NSEqualRects(frame, [[NSScreen mainScreen] frame])) { + dfb->y += aquaMenuBarHeight; + dfb->height -= aquaMenuBarHeight; + } + + } else { + CRAddPseudoramiXScreens(&dfb->x, &dfb->y, &dfb->width, &dfb->height); + } +} + + +/* + * CRAddScreen + * Init the framebuffer and record pixmap parameters for the screen. + */ +static Bool +CRAddScreen(int index, ScreenPtr pScreen) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + QuartzScreenPtr displayInfo = QUARTZ_PRIV(pScreen); + CGRect cgRect; + CGDisplayCount numDisplays; + CGDisplayCount allocatedDisplays = 0; + CGDirectDisplayID *displays = NULL; + CGDisplayErr cgErr; + + CRScreenParams(index, dfb); + + dfb->colorType = TrueColor; + + /* Passing zero width (pitch) makes miCreateScreenResources set the + screen pixmap to the framebuffer pointer, i.e. NULL. The generic + rootless code takes care of making this work. */ + dfb->pitch = 0; + dfb->framebuffer = NULL; + + // Get all CoreGraphics displays covered by this X11 display. + cgRect = CGRectMake(dfb->x, dfb->y, dfb->width, dfb->height); + do { + cgErr = CGGetDisplaysWithRect(cgRect, 0, NULL, &numDisplays); + if (cgErr) break; + allocatedDisplays = numDisplays; + displays = xrealloc(displays, + numDisplays * sizeof(CGDirectDisplayID)); + cgErr = CGGetDisplaysWithRect(cgRect, allocatedDisplays, displays, + &numDisplays); + if (cgErr != CGDisplayNoErr) break; + } while (numDisplays > allocatedDisplays); + + if (cgErr != CGDisplayNoErr || numDisplays == 0) { + ErrorF("Could not find CGDirectDisplayID(s) for X11 screen %d: %dx%d @ %d,%d.\n", + index, dfb->width, dfb->height, dfb->x, dfb->y); + return FALSE; + } + + // This X11 screen covers all CoreGraphics displays we just found. + // If there's more than one CG display, then video mirroring is on + // or PseudoramiX is on. + displayInfo->displayCount = allocatedDisplays; + displayInfo->displayIDs = displays; + + return TRUE; +} + + +/* + * CRSetupScreen + * Setup the screen for rootless access. + */ +static Bool +CRSetupScreen(int index, ScreenPtr pScreen) +{ + // Add alpha protecting replacements for fb screen functions + pScreen->PaintWindowBackground = SafeAlphaPaintWindow; + pScreen->PaintWindowBorder = SafeAlphaPaintWindow; + +#ifdef RENDER + { + PictureScreenPtr ps = GetPictureScreen(pScreen); + ps->Composite = SafeAlphaComposite; + } +#endif /* RENDER */ + + // Initialize accelerated rootless drawing + // Note that this must be done before DamageSetup(). + RootlessAccelInit(pScreen); + +#ifdef DAMAGE + // The Damage extension needs to wrap underneath the + // generic rootless layer, so do it now. + if (!DamageSetup(pScreen)) + return FALSE; +#endif + + // Initialize generic rootless code + return CRInit(pScreen); +} + + +/* + * CRScreenChanged + * Configuration of displays has changed. + */ +static void +CRScreenChanged(void) +{ + QuartzMessageServerThread(kXDarwinDisplayChanged, 0); +} + + +/* + * CRUpdateScreen + * Update screen after configuation change. + */ +static void +CRUpdateScreen(ScreenPtr pScreen) +{ + rootlessGlobalOffsetX = darwinMainScreenX; + rootlessGlobalOffsetY = darwinMainScreenY; + + AppleWMSetScreenOrigin(WindowTable[pScreen->myNum]); + + RootlessRepositionWindows(pScreen); + RootlessUpdateScreenPixmap(pScreen); +} + + +/* + * CRInitInput + * Finalize CR specific setup. + */ +static void +CRInitInput(int argc, char **argv) +{ + int i; + + rootlessGlobalOffsetX = darwinMainScreenX; + rootlessGlobalOffsetY = darwinMainScreenY; + + for (i = 0; i < screenInfo.numScreens; i++) + AppleWMSetScreenOrigin(WindowTable[i]); +} + + +/* + * CRIsX11Window + * Returns TRUE if cr is displaying this window. + */ +static Bool +CRIsX11Window(void *nsWindow, int windowNumber) +{ + NSWindow *theWindow = nsWindow; + + if (!theWindow) + return FALSE; + + if ([[theWindow contentView] isKindOfClass:classXView]) + return TRUE; + else + return FALSE; +} + + +/* + * Quartz display mode function list. + */ +static QuartzModeProcsRec crModeProcs = { + CRDisplayInit, + CRAddScreen, + CRSetupScreen, + CRInitInput, + QuartzInitCursor, + QuartzReallySetCursor, + QuartzSuspendXCursor, + QuartzResumeXCursor, + NULL, // No capture or release in rootless mode + NULL, + CRScreenChanged, + CRAddPseudoramiXScreens, + CRUpdateScreen, + CRIsX11Window, + NULL, // Cocoa NSWindows hide themselves + RootlessFrameForWindow, + TopLevelParent, + NULL, // No support for DRI surfaces + NULL +}; + + +/* + * QuartzModeBundleInit + * Initialize the display mode bundle after loading. + */ +Bool +QuartzModeBundleInit(void) +{ + quartzProcs = &crModeProcs; + quartzOpenGLBundle = crOpenGLBundle; + classXView = [XView class]; + return TRUE; +} diff --git a/xorg-server-1.4/hw/darwin/quartz/fullscreen/fullscreen.c b/xorg-server-1.4/hw/darwin/quartz/fullscreen/fullscreen.c new file mode 100644 index 0000000..02f6e89 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/fullscreen/fullscreen.c @@ -0,0 +1,569 @@ +/* + * Screen routines for full screen Quartz mode + * + * Copyright (c) 2002-2003 Torrey T. Lyons. 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 + * TORREY T. LYONS 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(s) of the above 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. + */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "quartz/quartzCommon.h" +#include "darwin.h" +#include "quartz/quartz.h" +#include "quartz/quartzCursor.h" +#include "colormapst.h" +#include "scrnintstr.h" +#include "micmap.h" +#include "shadow.h" + +// Full screen specific per screen storage structure +typedef struct { + CGDirectDisplayID displayID; + CFDictionaryRef xDisplayMode; + CFDictionaryRef aquaDisplayMode; + CGDirectPaletteRef xPalette; + CGDirectPaletteRef aquaPalette; + unsigned char *framebuffer; + unsigned char *shadowPtr; +} FSScreenRec, *FSScreenPtr; + +#define FULLSCREEN_PRIV(pScreen) \ + ((FSScreenPtr)pScreen->devPrivates[fsScreenIndex].ptr) + +static int fsScreenIndex; +static CGDirectDisplayID *quartzDisplayList = NULL; +static int quartzNumScreens = 0; +static FSScreenPtr quartzScreens[MAXSCREENS]; + +static int darwinCmapPrivateIndex = -1; +static unsigned long darwinCmapGeneration = 0; + +#define CMAP_PRIV(pCmap) \ + ((CGDirectPaletteRef) (pCmap)->devPrivates[darwinCmapPrivateIndex].ptr) + +/* + ============================================================================= + + Colormap handling + + ============================================================================= +*/ + +/* + * FSInitCmapPrivates + * Colormap privates may be allocated after the default colormap has + * already been created for some screens. This initialization procedure + * is called for each default colormap that is found. + */ +static Bool +FSInitCmapPrivates( + ColormapPtr pCmap) +{ + return TRUE; +} + + +/* + * FSCreateColormap + * This is a callback from X after a new colormap is created. + * We allocate a new CoreGraphics pallete for each colormap. + */ +static Bool +FSCreateColormap( + ColormapPtr pCmap) +{ + CGDirectPaletteRef pallete; + + // Allocate private storage for the hardware dependent colormap info. + if (darwinCmapGeneration != serverGeneration) { + if ((darwinCmapPrivateIndex = + AllocateColormapPrivateIndex(FSInitCmapPrivates)) < 0) + { + return FALSE; + } + darwinCmapGeneration = serverGeneration; + } + + pallete = CGPaletteCreateDefaultColorPalette(); + if (!pallete) return FALSE; + + CMAP_PRIV(pCmap) = pallete; + return TRUE; +} + + +/* + * FSDestroyColormap + * This is called by DIX FreeColormap after it has uninstalled a colormap + * and notified all interested parties. We deallocated the corresponding + * CoreGraphics pallete. + */ +static void +FSDestroyColormap( + ColormapPtr pCmap) +{ + CGPaletteRelease( CMAP_PRIV(pCmap) ); +} + + +/* + * FSInstallColormap + * Set the current CoreGraphics pallete to the pallete corresponding + * to the provided colormap. + */ +static void +FSInstallColormap( + ColormapPtr pCmap) +{ + CGDirectPaletteRef palette = CMAP_PRIV(pCmap); + ScreenPtr pScreen = pCmap->pScreen; + FSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen); + + // Inform all interested parties that the map is being changed. + miInstallColormap(pCmap); + + if (quartzServerVisible) + CGDisplaySetPalette(fsDisplayInfo->displayID, palette); + + fsDisplayInfo->xPalette = palette; +} + + +/* + * FSStoreColors + * This is a callback from X to change the hardware colormap + * when using PsuedoColor in full screen mode. + */ +static void +FSStoreColors( + ColormapPtr pCmap, + int numEntries, + xColorItem *pdefs) +{ + CGDirectPaletteRef palette = CMAP_PRIV(pCmap); + ScreenPtr pScreen = pCmap->pScreen; + FSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen); + CGDeviceColor color; + int i; + + if (! palette) + return; + + for (i = 0; i < numEntries; i++) { + color.red = pdefs[i].red / 65535.0; + color.green = pdefs[i].green / 65535.0; + color.blue = pdefs[i].blue / 65535.0; + CGPaletteSetColorAtIndex(palette, color, pdefs[i].pixel); + } + + // Update hardware colormap + if (quartzServerVisible) + CGDisplaySetPalette(fsDisplayInfo->displayID, palette); +} + + +/* + ============================================================================= + + Switching between Aqua and X + + ============================================================================= +*/ + +/* + * FSCapture + * Capture the screen so we can draw. Called directly from the main thread + * to synchronize with hiding the menubar. + */ +static void FSCapture(void) +{ + int i; + + if (quartzRootless) return; + + for (i = 0; i < quartzNumScreens; i++) { + FSScreenPtr fsDisplayInfo = quartzScreens[i]; + CGDirectDisplayID cgID = fsDisplayInfo->displayID; + + if (!CGDisplayIsCaptured(cgID)) { + CGDisplayCapture(cgID); + fsDisplayInfo->aquaDisplayMode = CGDisplayCurrentMode(cgID); + if (fsDisplayInfo->xDisplayMode != fsDisplayInfo->aquaDisplayMode) + CGDisplaySwitchToMode(cgID, fsDisplayInfo->xDisplayMode); + if (fsDisplayInfo->xPalette) + CGDisplaySetPalette(cgID, fsDisplayInfo->xPalette); + } + } +} + + +/* + * FSRelease + * Release the screen so others can draw. + */ +static void FSRelease(void) +{ + int i; + + if (quartzRootless) return; + + for (i = 0; i < quartzNumScreens; i++) { + FSScreenPtr fsDisplayInfo = quartzScreens[i]; + CGDirectDisplayID cgID = fsDisplayInfo->displayID; + + if (CGDisplayIsCaptured(cgID)) { + if (fsDisplayInfo->xDisplayMode != fsDisplayInfo->aquaDisplayMode) + CGDisplaySwitchToMode(cgID, fsDisplayInfo->aquaDisplayMode); + if (fsDisplayInfo->aquaPalette) + CGDisplaySetPalette(cgID, fsDisplayInfo->aquaPalette); + CGDisplayRelease(cgID); + } + } +} + + +/* + * FSSuspendScreen + * Suspend X11 cursor and drawing to the screen. + */ +static void FSSuspendScreen( + ScreenPtr pScreen) +{ + QuartzSuspendXCursor(pScreen); + xf86SetRootClip(pScreen, FALSE); +} + + +/* + * FSResumeScreen + * Resume X11 cursor and drawing to the screen. + */ +static void FSResumeScreen( + ScreenPtr pScreen, + int x, // cursor location + int y ) +{ + QuartzResumeXCursor(pScreen, x, y); + xf86SetRootClip(pScreen, TRUE); +} + + +/* + ============================================================================= + + Screen initialization + + ============================================================================= +*/ + +/* + * FSDisplayInit + * Full screen specific initialization called from InitOutput. + */ +static void FSDisplayInit(void) +{ + static unsigned long generation = 0; + CGDisplayCount quartzDisplayCount = 0; + + ErrorF("Display mode: Full screen Quartz -- Direct Display\n"); + + // Allocate private storage for each screen's mode specific info + if (generation != serverGeneration) { + fsScreenIndex = AllocateScreenPrivateIndex(); + generation = serverGeneration; + } + + // Find all the CoreGraphics displays + CGGetActiveDisplayList(0, NULL, &quartzDisplayCount); + quartzDisplayList = xalloc(quartzDisplayCount * sizeof(CGDirectDisplayID)); + CGGetActiveDisplayList(quartzDisplayCount, quartzDisplayList, + &quartzDisplayCount); + + darwinScreensFound = quartzDisplayCount; + atexit(FSRelease); +} + + +/* + * FSFindDisplayMode + * Find the appropriate display mode to use in full screen mode. + * If display mode is not the same as the current Aqua mode, switch + * to the new mode. + */ +static Bool FSFindDisplayMode( + FSScreenPtr fsDisplayInfo) +{ + CGDirectDisplayID cgID = fsDisplayInfo->displayID; + size_t height, width, bpp; + boolean_t exactMatch; + + fsDisplayInfo->aquaDisplayMode = CGDisplayCurrentMode(cgID); + + // If no user options, use current display mode + if (darwinDesiredWidth == 0 && darwinDesiredDepth == -1 && + darwinDesiredRefresh == -1) + { + fsDisplayInfo->xDisplayMode = fsDisplayInfo->aquaDisplayMode; + return TRUE; + } + + // If the user has no choice for size, use current + if (darwinDesiredWidth == 0) { + width = CGDisplayPixelsWide(cgID); + height = CGDisplayPixelsHigh(cgID); + } else { + width = darwinDesiredWidth; + height = darwinDesiredHeight; + } + + switch (darwinDesiredDepth) { + case 0: + bpp = 8; + break; + case 1: + bpp = 16; + break; + case 2: + bpp = 32; + break; + default: + bpp = CGDisplayBitsPerPixel(cgID); + } + + if (darwinDesiredRefresh == -1) { + fsDisplayInfo->xDisplayMode = + CGDisplayBestModeForParameters(cgID, bpp, width, height, + &exactMatch); + } else { + fsDisplayInfo->xDisplayMode = + CGDisplayBestModeForParametersAndRefreshRate(cgID, bpp, + width, height, darwinDesiredRefresh, &exactMatch); + } + if (!exactMatch) { + fsDisplayInfo->xDisplayMode = fsDisplayInfo->aquaDisplayMode; + return FALSE; + } + + // Switch to the new display mode + CGDisplaySwitchToMode(cgID, fsDisplayInfo->xDisplayMode); + return TRUE; +} + + +/* + * FSAddScreen + * Do initialization of each screen for Quartz in full screen mode. + */ +static Bool FSAddScreen( + int index, + ScreenPtr pScreen) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + QuartzScreenPtr displayInfo = QUARTZ_PRIV(pScreen); + CGDirectDisplayID cgID = quartzDisplayList[index]; + CGRect bounds; + FSScreenPtr fsDisplayInfo; + + // Allocate space for private per screen fullscreen specific storage. + fsDisplayInfo = xalloc(sizeof(FSScreenRec)); + FULLSCREEN_PRIV(pScreen) = fsDisplayInfo; + + displayInfo->displayCount = 1; + displayInfo->displayIDs = xrealloc(displayInfo->displayIDs, + 1 * sizeof(CGDirectDisplayID)); + displayInfo->displayIDs[0] = cgID; + + fsDisplayInfo->displayID = cgID; + fsDisplayInfo->xDisplayMode = 0; + fsDisplayInfo->aquaDisplayMode = 0; + fsDisplayInfo->xPalette = 0; + fsDisplayInfo->aquaPalette = 0; + + // Capture full screen because X doesn't like read-only framebuffer. + // We need to do this before we (potentially) switch the display mode. + CGDisplayCapture(cgID); + + if (! FSFindDisplayMode(fsDisplayInfo)) { + ErrorF("Could not support specified display mode on screen %i.\n", + index); + xfree(fsDisplayInfo); + return FALSE; + } + + // Don't need to flip y-coordinate as CoreGraphics treats (0, 0) + // as the top left of main screen. + bounds = CGDisplayBounds(cgID); + dfb->x = bounds.origin.x; + dfb->y = bounds.origin.y; + dfb->width = bounds.size.width; + dfb->height = bounds.size.height; + dfb->pitch = CGDisplayBytesPerRow(cgID); + dfb->bitsPerPixel = CGDisplayBitsPerPixel(cgID); + + if (dfb->bitsPerPixel == 8) { + if (CGDisplayCanSetPalette(cgID)) { + dfb->colorType = PseudoColor; + } else { + dfb->colorType = StaticColor; + } + dfb->bitsPerComponent = 8; + dfb->colorBitsPerPixel = 8; + } else { + dfb->colorType = TrueColor; + dfb->bitsPerComponent = CGDisplayBitsPerSample(cgID); + dfb->colorBitsPerPixel = CGDisplaySamplesPerPixel(cgID) * + dfb->bitsPerComponent; + } + + fsDisplayInfo->framebuffer = CGDisplayBaseAddress(cgID); + + // allocate shadow framebuffer + fsDisplayInfo->shadowPtr = xalloc(dfb->pitch * dfb->height); + dfb->framebuffer = fsDisplayInfo->shadowPtr; + + return TRUE; +} + + +/* + * FSShadowUpdate + * Update the damaged regions of the shadow framebuffer on the display. + */ +static void FSShadowUpdate( + ScreenPtr pScreen, + shadowBufPtr pBuf) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + FSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen); + RegionPtr damage = &pBuf->damage; + int numBox = REGION_NUM_RECTS(damage); + BoxPtr pBox = REGION_RECTS(damage); + int pitch = dfb->pitch; + int bpp = dfb->bitsPerPixel/8; + + // Don't update if the X server is not visible + if (!quartzServerVisible) + return; + + // Loop through all the damaged boxes + while (numBox--) { + int width, height, offset; + unsigned char *src, *dst; + + width = (pBox->x2 - pBox->x1) * bpp; + height = pBox->y2 - pBox->y1; + offset = (pBox->y1 * pitch) + (pBox->x1 * bpp); + src = fsDisplayInfo->shadowPtr + offset; + dst = fsDisplayInfo->framebuffer + offset; + + while (height--) { + memcpy(dst, src, width); + dst += pitch; + src += pitch; + } + + // Get the next box + pBox++; + } +} + + +/* + * FSSetupScreen + * Finalize full screen specific setup of each screen. + */ +static Bool FSSetupScreen( + int index, + ScreenPtr pScreen) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + FSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen); + CGDirectDisplayID cgID = fsDisplayInfo->displayID; + + // Initialize shadow framebuffer support + if (! shadowInit(pScreen, FSShadowUpdate, NULL)) { + ErrorF("Failed to initalize shadow framebuffer for screen %i.\n", + index); + return FALSE; + } + + if (dfb->colorType == PseudoColor) { + // Initialize colormap handling + size_t aquaBpp; + + // If Aqua is using 8 bits we need to keep track of its pallete. + CFNumberGetValue(CFDictionaryGetValue(fsDisplayInfo->aquaDisplayMode, + kCGDisplayBitsPerPixel), kCFNumberLongType, &aquaBpp); + if (aquaBpp <= 8) + fsDisplayInfo->aquaPalette = CGPaletteCreateWithDisplay(cgID); + + pScreen->CreateColormap = FSCreateColormap; + pScreen->DestroyColormap = FSDestroyColormap; + pScreen->InstallColormap = FSInstallColormap; + pScreen->StoreColors = FSStoreColors; + + } + + quartzScreens[quartzNumScreens++] = fsDisplayInfo; + return TRUE; +} + + +/* + * Quartz display mode function list. + */ +static QuartzModeProcsRec fsModeProcs = { + FSDisplayInit, + FSAddScreen, + FSSetupScreen, + NULL, // Not needed + QuartzInitCursor, + QuartzReallySetCursor, + FSSuspendScreen, + FSResumeScreen, + FSCapture, + FSRelease, + NULL, // No dynamic screen change support + NULL, + NULL, + NULL, // No rootless code in fullscreen + NULL, + NULL, + NULL, + NULL, // No support for DRI surfaces + NULL +}; + + +/* + * QuartzModeBundleInit + * Initialize the display mode bundle after loading. + */ +Bool +QuartzModeBundleInit(void) +{ + quartzProcs = &fsModeProcs; + quartzOpenGLBundle = NULL; // Only Mesa support for now + return TRUE; +} diff --git a/xorg-server-1.4/hw/darwin/quartz/fullscreen/quartzCursor.c b/xorg-server-1.4/hw/darwin/quartz/fullscreen/quartzCursor.c new file mode 100644 index 0000000..77fa008 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/fullscreen/quartzCursor.c @@ -0,0 +1,654 @@ +/************************************************************** + * + * Support for using the Quartz Window Manager cursor + * + **************************************************************/ +/* + * Copyright (c) 2001-2003 Torrey T. Lyons and Greg Parker. + * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "quartz/quartzCommon.h" +#include "quartz/quartzCursor.h" +#include "darwin.h" + +#include + +#include "mi.h" +#include "scrnintstr.h" +#include "cursorstr.h" +#include "mipointrst.h" +#include "globals.h" + +// Size of the QuickDraw cursor +#define CURSORWIDTH 16 +#define CURSORHEIGHT 16 + +typedef struct { + int qdCursorMode; + int qdCursorVisible; + int useQDCursor; + QueryBestSizeProcPtr QueryBestSize; + miPointerSpriteFuncPtr spriteFuncs; +} QuartzCursorScreenRec, *QuartzCursorScreenPtr; + +static int darwinCursorScreenIndex = -1; +static unsigned long darwinCursorGeneration = 0; +static CursorPtr quartzLatentCursor = NULL; +static QD_Cursor gQDArrow; // QuickDraw arrow cursor + +// Cursor for the main thread to set (NULL = arrow cursor). +static CCrsrHandle currentCursor = NULL; +static pthread_mutex_t cursorMutex; +static pthread_cond_t cursorCondition; + +#define CURSOR_PRIV(pScreen) \ + ((QuartzCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr) + +#define HIDE_QD_CURSOR(pScreen, visible) \ + if (visible) { \ + int ix; \ + for (ix = 0; ix < QUARTZ_PRIV(pScreen)->displayCount; ix++) { \ + CGDisplayHideCursor(QUARTZ_PRIV(pScreen)->displayIDs[ix]); \ + } \ + visible = FALSE; \ + } ((void)0) + +#define SHOW_QD_CURSOR(pScreen, visible) \ + { \ + int ix; \ + for (ix = 0; ix < QUARTZ_PRIV(pScreen)->displayCount; ix++) { \ + CGDisplayShowCursor(QUARTZ_PRIV(pScreen)->displayIDs[ix]); \ + } \ + visible = TRUE; \ + } ((void)0) + +#define CHANGE_QD_CURSOR(cursorH) \ + if (!quartzServerQuitting) { \ + /* Acquire lock and tell the main thread to change cursor */ \ + pthread_mutex_lock(&cursorMutex); \ + currentCursor = (CCrsrHandle) (cursorH); \ + QuartzMessageMainThread(kQuartzCursorUpdate, NULL, 0); \ + \ + /* Wait for the main thread to change the cursor */ \ + pthread_cond_wait(&cursorCondition, &cursorMutex); \ + pthread_mutex_unlock(&cursorMutex); \ + } ((void)0) + + +/* + * MakeQDCursor helpers: CTAB_ENTER, interleave + */ + +// Add a color entry to a ctab +#define CTAB_ENTER(ctab, index, r, g, b) \ + ctab->ctTable[index].value = index; \ + ctab->ctTable[index].rgb.red = r; \ + ctab->ctTable[index].rgb.green = g; \ + ctab->ctTable[index].rgb.blue = b + +// Make an unsigned short by interleaving the bits of bytes c1 and c2. +// High bit of c1 is first; low bit of c2 is last. +// Interleave is a built-in INTERCAL operator. +static unsigned short +interleave( + unsigned char c1, + unsigned char c2 ) +{ + return + ((c1 & 0x80) << 8) | ((c2 & 0x80) << 7) | + ((c1 & 0x40) << 7) | ((c2 & 0x40) << 6) | + ((c1 & 0x20) << 6) | ((c2 & 0x20) << 5) | + ((c1 & 0x10) << 5) | ((c2 & 0x10) << 4) | + ((c1 & 0x08) << 4) | ((c2 & 0x08) << 3) | + ((c1 & 0x04) << 3) | ((c2 & 0x04) << 2) | + ((c1 & 0x02) << 2) | ((c2 & 0x02) << 1) | + ((c1 & 0x01) << 1) | ((c2 & 0x01) << 0) ; +} + +/* + * MakeQDCursor + * Make a QuickDraw color cursor from the given X11 cursor. + * Warning: This code is nasty. Color cursors were meant to be read + * from resources; constructing the structures programmatically is messy. + */ +/* + QuickDraw cursor representation: + Our color cursor is a 2 bit per pixel pixmap. + Each pixel's bits are (source<<1 | mask) from the original X cursor pixel. + The cursor's color table maps the colors like this: + (2-bit value | X result | colortable | Mac result) + 00 | transparent | white | transparent (white outside mask) + 01 | back color | back color | back color + 10 | undefined | black | invert background (just for fun) + 11 | fore color | fore color | fore color +*/ +static CCrsrHandle +MakeQDCursor( + CursorPtr pCursor ) +{ + CCrsrHandle result; + CCrsrPtr curs; + int i, w, h; + unsigned short rowMask; + PixMap *pix; + ColorTable *ctab; + unsigned short *image; + + result = (CCrsrHandle) NewHandleClear(sizeof(CCrsr)); + if (!result) return NULL; + HLock((Handle)result); + curs = *result; + + // Initialize CCrsr + curs->crsrType = 0x8001; // 0x8000 = b&w, 0x8001 = color + curs->crsrMap = (PixMapHandle) NewHandleClear(sizeof(PixMap)); + if (!curs->crsrMap) goto pixAllocFailed; + HLock((Handle)curs->crsrMap); + pix = *curs->crsrMap; + curs->crsrData = NULL; // raw cursor image data (set below) + curs->crsrXData = NULL; // QD's processed data + curs->crsrXValid = 0; // zero means QD must re-process cursor data + curs->crsrXHandle = NULL; // reserved + memset(curs->crsr1Data, 0, CURSORWIDTH*CURSORHEIGHT/8); // b&w data + memset(curs->crsrMask, 0, CURSORWIDTH*CURSORHEIGHT/8); // b&w & color mask + curs->crsrHotSpot.h = min(CURSORWIDTH, pCursor->bits->xhot); // hot spot + curs->crsrHotSpot.v = min(CURSORHEIGHT, pCursor->bits->yhot); // hot spot + curs->crsrXTable = 0; // reserved + curs->crsrID = GetCTSeed(); // unique ID from Color Manager + + // Set the b&w data and mask + w = min(pCursor->bits->width, CURSORWIDTH); + h = min(pCursor->bits->height, CURSORHEIGHT); + rowMask = ~((1 << (CURSORWIDTH - w)) - 1); + for (i = 0; i < h; i++) { + curs->crsr1Data[i] = rowMask & + ((pCursor->bits->source[i*4]<<8) | pCursor->bits->source[i*4+1]); + curs->crsrMask[i] = rowMask & + ((pCursor->bits->mask[i*4]<<8) | pCursor->bits->mask[i*4+1]); + } + + // Set the color data and mask + // crsrMap: defines bit depth and size and colortable only + pix->rowBytes = (CURSORWIDTH * 2 / 8) | 0x8000; // last bit on means PixMap + SetRect(&pix->bounds, 0, 0, CURSORWIDTH, CURSORHEIGHT); // see TN 1020 + pix->pixelSize = 2; + pix->cmpCount = 1; + pix->cmpSize = 2; + // pix->pmTable set below + + // crsrData is the pixel data. crsrMap's baseAddr is not used. + curs->crsrData = NewHandleClear(CURSORWIDTH*CURSORHEIGHT * 2 / 8); + if (!curs->crsrData) goto imageAllocFailed; + HLock((Handle)curs->crsrData); + image = (unsigned short *) *curs->crsrData; + // Pixel data is just 1-bit data and mask interleaved (see above) + for (i = 0; i < h; i++) { + unsigned char s, m; + s = pCursor->bits->source[i*4] & (rowMask >> 8); + m = pCursor->bits->mask[i*4] & (rowMask >> 8); + image[2*i] = interleave(s, m); + s = pCursor->bits->source[i*4+1] & (rowMask & 0x00ff); + m = pCursor->bits->mask[i*4+1] & (rowMask & 0x00ff); + image[2*i+1] = interleave(s, m); + } + + // Build the color table (entries described above) + // NewPixMap allocates a color table handle. + pix->pmTable = (CTabHandle) NewHandleClear(sizeof(ColorTable) + 3 + * sizeof(ColorSpec)); + if (!pix->pmTable) goto ctabAllocFailed; + HLock((Handle)pix->pmTable); + ctab = *pix->pmTable; + ctab->ctSeed = GetCTSeed(); + ctab->ctFlags = 0; + ctab->ctSize = 3; // color count - 1 + CTAB_ENTER(ctab, 0, 0xffff, 0xffff, 0xffff); + CTAB_ENTER(ctab, 1, pCursor->backRed, pCursor->backGreen, + pCursor->backBlue); + CTAB_ENTER(ctab, 2, 0x0000, 0x0000, 0x0000); + CTAB_ENTER(ctab, 3, pCursor->foreRed, pCursor->foreGreen, + pCursor->foreBlue); + + HUnlock((Handle)pix->pmTable); // ctab + HUnlock((Handle)curs->crsrData); // image data + HUnlock((Handle)curs->crsrMap); // pix + HUnlock((Handle)result); // cursor + + return result; + + // "What we have here is a failure to allocate" +ctabAllocFailed: + HUnlock((Handle)curs->crsrData); + DisposeHandle((Handle)curs->crsrData); +imageAllocFailed: + HUnlock((Handle)curs->crsrMap); + DisposeHandle((Handle)curs->crsrMap); +pixAllocFailed: + HUnlock((Handle)result); + DisposeHandle((Handle)result); + return NULL; +} + + +/* + * FreeQDCursor + * Destroy a QuickDraw color cursor created with MakeQDCursor(). + * The cursor must not currently be on screen. + */ +static void FreeQDCursor(CCrsrHandle cursHandle) +{ + CCrsrPtr curs; + PixMap *pix; + + HLock((Handle)cursHandle); + curs = *cursHandle; + HLock((Handle)curs->crsrMap); + pix = *curs->crsrMap; + DisposeHandle((Handle)pix->pmTable); + HUnlock((Handle)curs->crsrMap); + DisposeHandle((Handle)curs->crsrMap); + DisposeHandle((Handle)curs->crsrData); + HUnlock((Handle)cursHandle); + DisposeHandle((Handle)cursHandle); +} + + +/* +=========================================================================== + + Pointer sprite functions + +=========================================================================== +*/ + +/* + * QuartzRealizeCursor + * Convert the X cursor representation to QuickDraw format if possible. + */ +Bool +QuartzRealizeCursor( + ScreenPtr pScreen, + CursorPtr pCursor ) +{ + CCrsrHandle qdCursor; + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + if(!pCursor || !pCursor->bits) + return FALSE; + + // if the cursor is too big we use a software cursor + if ((pCursor->bits->height > CURSORHEIGHT) || + (pCursor->bits->width > CURSORWIDTH) || !ScreenPriv->useQDCursor) + { + if (quartzRootless) { + // rootless can't use a software cursor + return TRUE; + } else { + return (*ScreenPriv->spriteFuncs->RealizeCursor) + (pScreen, pCursor); + } + } + + // make new cursor image + qdCursor = MakeQDCursor(pCursor); + if (!qdCursor) return FALSE; + + // save the result + pCursor->devPriv[pScreen->myNum] = (pointer) qdCursor; + + return TRUE; +} + + +/* + * QuartzUnrealizeCursor + * Free the storage space associated with a realized cursor. + */ +Bool +QuartzUnrealizeCursor( + ScreenPtr pScreen, + CursorPtr pCursor ) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + if ((pCursor->bits->height > CURSORHEIGHT) || + (pCursor->bits->width > CURSORWIDTH) || !ScreenPriv->useQDCursor) + { + if (quartzRootless) { + return TRUE; + } else { + return (*ScreenPriv->spriteFuncs->UnrealizeCursor) + (pScreen, pCursor); + } + } else { + CCrsrHandle oldCursor = (CCrsrHandle) pCursor->devPriv[pScreen->myNum]; + + if (currentCursor != oldCursor) { + // This should only fail when quitting, in which case we just leak. + FreeQDCursor(oldCursor); + } + pCursor->devPriv[pScreen->myNum] = NULL; + return TRUE; + } +} + + +/* + * QuartzSetCursor + * Set the cursor sprite and position. + * Use QuickDraw cursor if possible. + */ +static void +QuartzSetCursor( + ScreenPtr pScreen, + CursorPtr pCursor, + int x, + int y) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + quartzLatentCursor = pCursor; + + // Don't touch Mac OS cursor if X is hidden! + if (!quartzServerVisible) + return; + + if (!pCursor) { + // Remove the cursor completely. + HIDE_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); + if (! ScreenPriv->qdCursorMode) + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); + } + else if ((pCursor->bits->height <= CURSORHEIGHT) && + (pCursor->bits->width <= CURSORWIDTH) && ScreenPriv->useQDCursor) + { + // Cursor is small enough to use QuickDraw directly. + if (! ScreenPriv->qdCursorMode) // remove the X cursor + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); + ScreenPriv->qdCursorMode = TRUE; + + CHANGE_QD_CURSOR(pCursor->devPriv[pScreen->myNum]); + SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); + } + else if (quartzRootless) { + // Rootless can't use a software cursor, so we just use Mac OS arrow. + CHANGE_QD_CURSOR(NULL); + SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); + } + else { + // Cursor is too big for QuickDraw. Use X software cursor. + HIDE_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); + ScreenPriv->qdCursorMode = FALSE; + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, pCursor, x, y); + } +} + + +/* + * QuartzReallySetCursor + * Set the QuickDraw cursor. Called from the main thread since changing the + * cursor with QuickDraw is not thread safe on dual processor machines. + */ +void +QuartzReallySetCursor() +{ + pthread_mutex_lock(&cursorMutex); + + if (currentCursor) { + SetCCursor(currentCursor); + } else { + SetCursor(&gQDArrow); + } + + pthread_cond_signal(&cursorCondition); + pthread_mutex_unlock(&cursorMutex); +} + + +/* + * QuartzMoveCursor + * Move the cursor. This is a noop for QuickDraw. + */ +static void +QuartzMoveCursor( + ScreenPtr pScreen, + int x, + int y) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + // only the X cursor needs to be explicitly moved + if (!ScreenPriv->qdCursorMode) + (*ScreenPriv->spriteFuncs->MoveCursor)(pScreen, x, y); +} + + +static miPointerSpriteFuncRec quartzSpriteFuncsRec = { + QuartzRealizeCursor, + QuartzUnrealizeCursor, + QuartzSetCursor, + QuartzMoveCursor +}; + + +/* +=========================================================================== + + Pointer screen functions + +=========================================================================== +*/ + +/* + * QuartzCursorOffScreen + */ +static Bool QuartzCursorOffScreen(ScreenPtr *pScreen, int *x, int *y) +{ + return FALSE; +} + + +/* + * QuartzCrossScreen + */ +static void QuartzCrossScreen(ScreenPtr pScreen, Bool entering) +{ + return; +} + + +/* + * QuartzWarpCursor + * Change the cursor position without generating an event or motion history. + * The input coordinates (x,y) are in pScreen-local X11 coordinates. + * + */ +static void +QuartzWarpCursor( + ScreenPtr pScreen, + int x, + int y) +{ + static int neverMoved = TRUE; + + if (neverMoved) { + // Don't move the cursor the first time. This is the jump-to-center + // initialization, and it's annoying because we may still be in MacOS. + neverMoved = FALSE; + return; + } + + if (quartzServerVisible) { + CGDisplayErr cgErr; + CGPoint cgPoint; + // Only need to do this for one display. Any display will do. + CGDirectDisplayID cgID = QUARTZ_PRIV(pScreen)->displayIDs[0]; + CGRect cgRect = CGDisplayBounds(cgID); + + // Convert (x,y) to CoreGraphics screen-local CG coordinates. + // This is necessary because the X11 screen and CG screen may not + // coincide. (e.g. X11 screen may be moved to dodge the menu bar) + + // Make point in X11 global coordinates + cgPoint = CGPointMake(x + dixScreenOrigins[pScreen->myNum].x, + y + dixScreenOrigins[pScreen->myNum].y); + // Shift to CoreGraphics global screen coordinates + cgPoint.x += darwinMainScreenX; + cgPoint.y += darwinMainScreenY; + // Shift to CoreGraphics screen-local coordinates + cgPoint.x -= cgRect.origin.x; + cgPoint.y -= cgRect.origin.y; + + cgErr = CGDisplayMoveCursorToPoint(cgID, cgPoint); + if (cgErr != CGDisplayNoErr) { + ErrorF("Could not set cursor position with error code 0x%x.\n", + cgErr); + } + } + + miPointerWarpCursor(pScreen, x, y); + miPointerUpdate(); +} + + +static miPointerScreenFuncRec quartzScreenFuncsRec = { + QuartzCursorOffScreen, + QuartzCrossScreen, + QuartzWarpCursor, + DarwinEQPointerPost, + DarwinEQSwitchScreen +}; + + +/* +=========================================================================== + + Other screen functions + +=========================================================================== +*/ + +/* + * QuartzCursorQueryBestSize + * Handle queries for best cursor size + */ +static void +QuartzCursorQueryBestSize( + int class, + unsigned short *width, + unsigned short *height, + ScreenPtr pScreen) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + if (class == CursorShape) { + *width = CURSORWIDTH; + *height = CURSORHEIGHT; + } else { + (*ScreenPriv->QueryBestSize)(class, width, height, pScreen); + } +} + + +/* + * QuartzInitCursor + * Initialize cursor support + */ +Bool +QuartzInitCursor( + ScreenPtr pScreen ) +{ + QuartzCursorScreenPtr ScreenPriv; + miPointerScreenPtr PointPriv; + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + + // initialize software cursor handling (always needed as backup) + if (!miDCInitialize(pScreen, &quartzScreenFuncsRec)) { + return FALSE; + } + + // allocate private storage for this screen's QuickDraw cursor info + if (darwinCursorGeneration != serverGeneration) { + if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0) + return FALSE; + darwinCursorGeneration = serverGeneration; + } + + ScreenPriv = xcalloc( 1, sizeof(QuartzCursorScreenRec) ); + if (!ScreenPriv) return FALSE; + + CURSOR_PRIV(pScreen) = ScreenPriv; + + // override some screen procedures + ScreenPriv->QueryBestSize = pScreen->QueryBestSize; + pScreen->QueryBestSize = QuartzCursorQueryBestSize; + + // initialize QuickDraw cursor handling + GetQDGlobalsArrow(&gQDArrow); + PointPriv = (miPointerScreenPtr) + pScreen->devPrivates[miPointerScreenIndex].ptr; + + ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; + PointPriv->spriteFuncs = &quartzSpriteFuncsRec; + + if (!quartzRootless) + ScreenPriv->useQDCursor = QuartzFSUseQDCursor(dfb->colorBitsPerPixel); + else + ScreenPriv->useQDCursor = TRUE; + ScreenPriv->qdCursorMode = TRUE; + ScreenPriv->qdCursorVisible = TRUE; + + // initialize cursor mutex lock + pthread_mutex_init(&cursorMutex, NULL); + + // initialize condition for waiting + pthread_cond_init(&cursorCondition, NULL); + + return TRUE; +} + + +// X server is hiding. Restore the Aqua cursor. +void QuartzSuspendXCursor( + ScreenPtr pScreen ) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + CHANGE_QD_CURSOR(NULL); + SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); +} + + +// X server is showing. Restore the X cursor. +void QuartzResumeXCursor( + ScreenPtr pScreen, + int x, + int y ) +{ + QuartzSetCursor(pScreen, quartzLatentCursor, x, y); +} diff --git a/xorg-server-1.4/hw/darwin/quartz/keysym2ucs.c b/xorg-server-1.4/hw/darwin/quartz/keysym2ucs.c new file mode 100644 index 0000000..3be59df --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/keysym2ucs.c @@ -0,0 +1,908 @@ +/* + * This module converts keysym values into the corresponding ISO 10646 + * (UCS, Unicode) values. + * + * The array keysymtab[] contains pairs of X11 keysym values for graphical + * characters and the corresponding Unicode value. The function + * keysym2ucs() maps a keysym onto a Unicode value using a binary search, + * therefore keysymtab[] must remain SORTED by keysym value. + * + * The keysym -> UTF-8 conversion will hopefully one day be provided + * by Xlib via XmbLookupString() and should ideally not have to be + * done in X applications. But we are not there yet. + * + * We allow to represent any UCS character in the range U-00000000 to + * U-00FFFFFF by a keysym value in the range 0x01000000 to 0x01ffffff. + * This admittedly does not cover the entire 31-bit space of UCS, but + * it does cover all of the characters up to U-10FFFF, which can be + * represented by UTF-16, and more, and it is very unlikely that higher + * UCS codes will ever be assigned by ISO. So to get Unicode character + * U+ABCD you can directly use keysym 0x0100abcd. + * + * NOTE: The comments in the table below contain the actual character + * encoded in UTF-8, so for viewing and editing best use an editor in + * UTF-8 mode. + * + * Author: Markus G. Kuhn , University of Cambridge, April 2001 + * + * Special thanks to Richard Verhoeven for preparing + * an initial draft of the mapping table. + * + * This software is in the public domain. Share and enjoy! + * + * AUTOMATICALLY GENERATED FILE, DO NOT EDIT !!! (unicode/convmap.pl) + */ + +#include "keysym2ucs.h" + +#include +#include + +struct codepair { + unsigned short keysym; + unsigned short ucs; +}; + +const static struct codepair keysymtab[] = { + { 0x01a1, 0x0104 }, + { 0x01a2, 0x02d8 }, + { 0x01a3, 0x0141 }, + { 0x01a5, 0x013d }, + { 0x01a6, 0x015a }, + { 0x01a9, 0x0160 }, + { 0x01aa, 0x015e }, + { 0x01ab, 0x0164 }, + { 0x01ac, 0x0179 }, + { 0x01ae, 0x017d }, + { 0x01af, 0x017b }, + { 0x01b1, 0x0105 }, + { 0x01b2, 0x02db }, + { 0x01b3, 0x0142 }, + { 0x01b5, 0x013e }, + { 0x01b6, 0x015b }, + { 0x01b7, 0x02c7 }, + { 0x01b9, 0x0161 }, + { 0x01ba, 0x015f }, + { 0x01bb, 0x0165 }, + { 0x01bc, 0x017a }, + { 0x01bd, 0x02dd }, + { 0x01be, 0x017e }, + { 0x01bf, 0x017c }, + { 0x01c0, 0x0154 }, + { 0x01c3, 0x0102 }, + { 0x01c5, 0x0139 }, + { 0x01c6, 0x0106 }, + { 0x01c8, 0x010c }, + { 0x01ca, 0x0118 }, + { 0x01cc, 0x011a }, + { 0x01cf, 0x010e }, + { 0x01d0, 0x0110 }, + { 0x01d1, 0x0143 }, + { 0x01d2, 0x0147 }, + { 0x01d5, 0x0150 }, + { 0x01d8, 0x0158 }, + { 0x01d9, 0x016e }, + { 0x01db, 0x0170 }, + { 0x01de, 0x0162 }, + { 0x01e0, 0x0155 }, + { 0x01e3, 0x0103 }, + { 0x01e5, 0x013a }, + { 0x01e6, 0x0107 }, + { 0x01e8, 0x010d }, + { 0x01ea, 0x0119 }, + { 0x01ec, 0x011b }, + { 0x01ef, 0x010f }, + { 0x01f0, 0x0111 }, + { 0x01f1, 0x0144 }, + { 0x01f2, 0x0148 }, + { 0x01f5, 0x0151 }, + { 0x01f8, 0x0159 }, + { 0x01f9, 0x016f }, + { 0x01fb, 0x0171 }, + { 0x01fe, 0x0163 }, + { 0x01ff, 0x02d9 }, + { 0x02a1, 0x0126 }, + { 0x02a6, 0x0124 }, + { 0x02a9, 0x0130 }, + { 0x02ab, 0x011e }, + { 0x02ac, 0x0134 }, + { 0x02b1, 0x0127 }, + { 0x02b6, 0x0125 }, + { 0x02b9, 0x0131 }, + { 0x02bb, 0x011f }, + { 0x02bc, 0x0135 }, + { 0x02c5, 0x010a }, + { 0x02c6, 0x0108 }, + { 0x02d5, 0x0120 }, + { 0x02d8, 0x011c }, + { 0x02dd, 0x016c }, + { 0x02de, 0x015c }, + { 0x02e5, 0x010b }, + { 0x02e6, 0x0109 }, + { 0x02f5, 0x0121 }, + { 0x02f8, 0x011d }, + { 0x02fd, 0x016d }, + { 0x02fe, 0x015d }, + { 0x03a2, 0x0138 }, + { 0x03a3, 0x0156 }, + { 0x03a5, 0x0128 }, + { 0x03a6, 0x013b }, + { 0x03aa, 0x0112 }, + { 0x03ab, 0x0122 }, + { 0x03ac, 0x0166 }, + { 0x03b3, 0x0157 }, + { 0x03b5, 0x0129 }, + { 0x03b6, 0x013c }, + { 0x03ba, 0x0113 }, + { 0x03bb, 0x0123 }, + { 0x03bc, 0x0167 }, + { 0x03bd, 0x014a }, + { 0x03bf, 0x014b }, + { 0x03c0, 0x0100 }, + { 0x03c7, 0x012e }, + { 0x03cc, 0x0116 }, + { 0x03cf, 0x012a }, + { 0x03d1, 0x0145 }, + { 0x03d2, 0x014c }, + { 0x03d3, 0x0136 }, + { 0x03d9, 0x0172 }, + { 0x03dd, 0x0168 }, + { 0x03de, 0x016a }, + { 0x03e0, 0x0101 }, + { 0x03e7, 0x012f }, + { 0x03ec, 0x0117 }, + { 0x03ef, 0x012b }, + { 0x03f1, 0x0146 }, + { 0x03f2, 0x014d }, + { 0x03f3, 0x0137 }, + { 0x03f9, 0x0173 }, + { 0x03fd, 0x0169 }, + { 0x03fe, 0x016b }, + { 0x047e, 0x203e }, + { 0x04a1, 0x3002 }, + { 0x04a2, 0x300c }, + { 0x04a3, 0x300d }, + { 0x04a4, 0x3001 }, + { 0x04a5, 0x30fb }, + { 0x04a6, 0x30f2 }, + { 0x04a7, 0x30a1 }, + { 0x04a8, 0x30a3 }, + { 0x04a9, 0x30a5 }, + { 0x04aa, 0x30a7 }, + { 0x04ab, 0x30a9 }, + { 0x04ac, 0x30e3 }, + { 0x04ad, 0x30e5 }, + { 0x04ae, 0x30e7 }, + { 0x04af, 0x30c3 }, + { 0x04b0, 0x30fc }, + { 0x04b1, 0x30a2 }, + { 0x04b2, 0x30a4 }, + { 0x04b3, 0x30a6 }, + { 0x04b4, 0x30a8 }, + { 0x04b5, 0x30aa }, + { 0x04b6, 0x30ab }, + { 0x04b7, 0x30ad }, + { 0x04b8, 0x30af }, + { 0x04b9, 0x30b1 }, + { 0x04ba, 0x30b3 }, + { 0x04bb, 0x30b5 }, + { 0x04bc, 0x30b7 }, + { 0x04bd, 0x30b9 }, + { 0x04be, 0x30bb }, + { 0x04bf, 0x30bd }, + { 0x04c0, 0x30bf }, + { 0x04c1, 0x30c1 }, + { 0x04c2, 0x30c4 }, + { 0x04c3, 0x30c6 }, + { 0x04c4, 0x30c8 }, + { 0x04c5, 0x30ca }, + { 0x04c6, 0x30cb }, + { 0x04c7, 0x30cc }, + { 0x04c8, 0x30cd }, + { 0x04c9, 0x30ce }, + { 0x04ca, 0x30cf }, + { 0x04cb, 0x30d2 }, + { 0x04cc, 0x30d5 }, + { 0x04cd, 0x30d8 }, + { 0x04ce, 0x30db }, + { 0x04cf, 0x30de }, + { 0x04d0, 0x30df }, + { 0x04d1, 0x30e0 }, + { 0x04d2, 0x30e1 }, + { 0x04d3, 0x30e2 }, + { 0x04d4, 0x30e4 }, + { 0x04d5, 0x30e6 }, + { 0x04d6, 0x30e8 }, + { 0x04d7, 0x30e9 }, + { 0x04d8, 0x30ea }, + { 0x04d9, 0x30eb }, + { 0x04da, 0x30ec }, + { 0x04db, 0x30ed }, + { 0x04dc, 0x30ef }, + { 0x04dd, 0x30f3 }, + { 0x04de, 0x309b }, + { 0x04df, 0x309c }, + { 0x05ac, 0x060c }, + { 0x05bb, 0x061b }, + { 0x05bf, 0x061f }, + { 0x05c1, 0x0621 }, + { 0x05c2, 0x0622 }, + { 0x05c3, 0x0623 }, + { 0x05c4, 0x0624 }, + { 0x05c5, 0x0625 }, + { 0x05c6, 0x0626 }, + { 0x05c7, 0x0627 }, + { 0x05c8, 0x0628 }, + { 0x05c9, 0x0629 }, + { 0x05ca, 0x062a }, + { 0x05cb, 0x062b }, + { 0x05cc, 0x062c }, + { 0x05cd, 0x062d }, + { 0x05ce, 0x062e }, + { 0x05cf, 0x062f }, + { 0x05d0, 0x0630 }, + { 0x05d1, 0x0631 }, + { 0x05d2, 0x0632 }, + { 0x05d3, 0x0633 }, + { 0x05d4, 0x0634 }, + { 0x05d5, 0x0635 }, + { 0x05d6, 0x0636 }, + { 0x05d7, 0x0637 }, + { 0x05d8, 0x0638 }, + { 0x05d9, 0x0639 }, + { 0x05da, 0x063a }, + { 0x05e0, 0x0640 }, + { 0x05e1, 0x0641 }, + { 0x05e2, 0x0642 }, + { 0x05e3, 0x0643 }, + { 0x05e4, 0x0644 }, + { 0x05e5, 0x0645 }, + { 0x05e6, 0x0646 }, + { 0x05e7, 0x0647 }, + { 0x05e8, 0x0648 }, + { 0x05e9, 0x0649 }, + { 0x05ea, 0x064a }, + { 0x05eb, 0x064b }, + { 0x05ec, 0x064c }, + { 0x05ed, 0x064d }, + { 0x05ee, 0x064e }, + { 0x05ef, 0x064f }, + { 0x05f0, 0x0650 }, + { 0x05f1, 0x0651 }, + { 0x05f2, 0x0652 }, + { 0x06a1, 0x0452 }, + { 0x06a2, 0x0453 }, + { 0x06a3, 0x0451 }, + { 0x06a4, 0x0454 }, + { 0x06a5, 0x0455 }, + { 0x06a6, 0x0456 }, + { 0x06a7, 0x0457 }, + { 0x06a8, 0x0458 }, + { 0x06a9, 0x0459 }, + { 0x06aa, 0x045a }, + { 0x06ab, 0x045b }, + { 0x06ac, 0x045c }, + { 0x06ae, 0x045e }, + { 0x06af, 0x045f }, + { 0x06b0, 0x2116 }, + { 0x06b1, 0x0402 }, + { 0x06b2, 0x0403 }, + { 0x06b3, 0x0401 }, + { 0x06b4, 0x0404 }, + { 0x06b5, 0x0405 }, + { 0x06b6, 0x0406 }, + { 0x06b7, 0x0407 }, + { 0x06b8, 0x0408 }, + { 0x06b9, 0x0409 }, + { 0x06ba, 0x040a }, + { 0x06bb, 0x040b }, + { 0x06bc, 0x040c }, + { 0x06be, 0x040e }, + { 0x06bf, 0x040f }, + { 0x06c0, 0x044e }, + { 0x06c1, 0x0430 }, + { 0x06c2, 0x0431 }, + { 0x06c3, 0x0446 }, + { 0x06c4, 0x0434 }, + { 0x06c5, 0x0435 }, + { 0x06c6, 0x0444 }, + { 0x06c7, 0x0433 }, + { 0x06c8, 0x0445 }, + { 0x06c9, 0x0438 }, + { 0x06ca, 0x0439 }, + { 0x06cb, 0x043a }, + { 0x06cc, 0x043b }, + { 0x06cd, 0x043c }, + { 0x06ce, 0x043d }, + { 0x06cf, 0x043e }, + { 0x06d0, 0x043f }, + { 0x06d1, 0x044f }, + { 0x06d2, 0x0440 }, + { 0x06d3, 0x0441 }, + { 0x06d4, 0x0442 }, + { 0x06d5, 0x0443 }, + { 0x06d6, 0x0436 }, + { 0x06d7, 0x0432 }, + { 0x06d8, 0x044c }, + { 0x06d9, 0x044b }, + { 0x06da, 0x0437 }, + { 0x06db, 0x0448 }, + { 0x06dc, 0x044d }, + { 0x06dd, 0x0449 }, + { 0x06de, 0x0447 }, + { 0x06df, 0x044a }, + { 0x06e0, 0x042e }, + { 0x06e1, 0x0410 }, + { 0x06e2, 0x0411 }, + { 0x06e3, 0x0426 }, + { 0x06e4, 0x0414 }, + { 0x06e5, 0x0415 }, + { 0x06e6, 0x0424 }, + { 0x06e7, 0x0413 }, + { 0x06e8, 0x0425 }, + { 0x06e9, 0x0418 }, + { 0x06ea, 0x0419 }, + { 0x06eb, 0x041a }, + { 0x06ec, 0x041b }, + { 0x06ed, 0x041c }, + { 0x06ee, 0x041d }, + { 0x06ef, 0x041e }, + { 0x06f0, 0x041f }, + { 0x06f1, 0x042f }, + { 0x06f2, 0x0420 }, + { 0x06f3, 0x0421 }, + { 0x06f4, 0x0422 }, + { 0x06f5, 0x0423 }, + { 0x06f6, 0x0416 }, + { 0x06f7, 0x0412 }, + { 0x06f8, 0x042c }, + { 0x06f9, 0x042b }, + { 0x06fa, 0x0417 }, + { 0x06fb, 0x0428 }, + { 0x06fc, 0x042d }, + { 0x06fd, 0x0429 }, + { 0x06fe, 0x0427 }, + { 0x06ff, 0x042a }, + { 0x07a1, 0x0386 }, + { 0x07a2, 0x0388 }, + { 0x07a3, 0x0389 }, + { 0x07a4, 0x038a }, + { 0x07a5, 0x03aa }, + { 0x07a7, 0x038c }, + { 0x07a8, 0x038e }, + { 0x07a9, 0x03ab }, + { 0x07ab, 0x038f }, + { 0x07ae, 0x0385 }, + { 0x07af, 0x2015 }, + { 0x07b1, 0x03ac }, + { 0x07b2, 0x03ad }, + { 0x07b3, 0x03ae }, + { 0x07b4, 0x03af }, + { 0x07b5, 0x03ca }, + { 0x07b6, 0x0390 }, + { 0x07b7, 0x03cc }, + { 0x07b8, 0x03cd }, + { 0x07b9, 0x03cb }, + { 0x07ba, 0x03b0 }, + { 0x07bb, 0x03ce }, + { 0x07c1, 0x0391 }, + { 0x07c2, 0x0392 }, + { 0x07c3, 0x0393 }, + { 0x07c4, 0x0394 }, + { 0x07c5, 0x0395 }, + { 0x07c6, 0x0396 }, + { 0x07c7, 0x0397 }, + { 0x07c8, 0x0398 }, + { 0x07c9, 0x0399 }, + { 0x07ca, 0x039a }, + { 0x07cb, 0x039b }, + { 0x07cc, 0x039c }, + { 0x07cd, 0x039d }, + { 0x07ce, 0x039e }, + { 0x07cf, 0x039f }, + { 0x07d0, 0x03a0 }, + { 0x07d1, 0x03a1 }, + { 0x07d2, 0x03a3 }, + { 0x07d4, 0x03a4 }, + { 0x07d5, 0x03a5 }, + { 0x07d6, 0x03a6 }, + { 0x07d7, 0x03a7 }, + { 0x07d8, 0x03a8 }, + { 0x07d9, 0x03a9 }, + { 0x07e1, 0x03b1 }, + { 0x07e2, 0x03b2 }, + { 0x07e3, 0x03b3 }, + { 0x07e4, 0x03b4 }, + { 0x07e5, 0x03b5 }, + { 0x07e6, 0x03b6 }, + { 0x07e7, 0x03b7 }, + { 0x07e8, 0x03b8 }, + { 0x07e9, 0x03b9 }, + { 0x07ea, 0x03ba }, + { 0x07eb, 0x03bb }, + { 0x07ec, 0x03bc }, + { 0x07ed, 0x03bd }, + { 0x07ee, 0x03be }, + { 0x07ef, 0x03bf }, + { 0x07f0, 0x03c0 }, + { 0x07f1, 0x03c1 }, + { 0x07f2, 0x03c3 }, + { 0x07f3, 0x03c2 }, + { 0x07f4, 0x03c4 }, + { 0x07f5, 0x03c5 }, + { 0x07f6, 0x03c6 }, + { 0x07f7, 0x03c7 }, + { 0x07f8, 0x03c8 }, + { 0x07f9, 0x03c9 }, + { 0x08a1, 0x23b7 }, + { 0x08a2, 0x250c }, + { 0x08a3, 0x2500 }, + { 0x08a4, 0x2320 }, + { 0x08a5, 0x2321 }, + { 0x08a6, 0x2502 }, + { 0x08a7, 0x23a1 }, + { 0x08a8, 0x23a3 }, + { 0x08a9, 0x23a4 }, + { 0x08aa, 0x23a6 }, + { 0x08ab, 0x239b }, + { 0x08ac, 0x239d }, + { 0x08ad, 0x239e }, + { 0x08ae, 0x23a0 }, + { 0x08af, 0x23a8 }, + { 0x08b0, 0x23ac }, + { 0x08bc, 0x2264 }, + { 0x08bd, 0x2260 }, + { 0x08be, 0x2265 }, + { 0x08bf, 0x222b }, + { 0x08c0, 0x2234 }, + { 0x08c1, 0x221d }, + { 0x08c2, 0x221e }, + { 0x08c5, 0x2207 }, + { 0x08c8, 0x223c }, + { 0x08c9, 0x2243 }, + { 0x08cd, 0x21d4 }, + { 0x08ce, 0x21d2 }, + { 0x08cf, 0x2261 }, + { 0x08d6, 0x221a }, + { 0x08da, 0x2282 }, + { 0x08db, 0x2283 }, + { 0x08dc, 0x2229 }, + { 0x08dd, 0x222a }, + { 0x08de, 0x2227 }, + { 0x08df, 0x2228 }, + { 0x08ef, 0x2202 }, + { 0x08f6, 0x0192 }, + { 0x08fb, 0x2190 }, + { 0x08fc, 0x2191 }, + { 0x08fd, 0x2192 }, + { 0x08fe, 0x2193 }, + { 0x09e0, 0x25c6 }, + { 0x09e1, 0x2592 }, + { 0x09e2, 0x2409 }, + { 0x09e3, 0x240c }, + { 0x09e4, 0x240d }, + { 0x09e5, 0x240a }, + { 0x09e8, 0x2424 }, + { 0x09e9, 0x240b }, + { 0x09ea, 0x2518 }, + { 0x09eb, 0x2510 }, + { 0x09ec, 0x250c }, + { 0x09ed, 0x2514 }, + { 0x09ee, 0x253c }, + { 0x09ef, 0x23ba }, + { 0x09f0, 0x23bb }, + { 0x09f1, 0x2500 }, + { 0x09f2, 0x23bc }, + { 0x09f3, 0x23bd }, + { 0x09f4, 0x251c }, + { 0x09f5, 0x2524 }, + { 0x09f6, 0x2534 }, + { 0x09f7, 0x252c }, + { 0x09f8, 0x2502 }, + { 0x0aa1, 0x2003 }, + { 0x0aa2, 0x2002 }, + { 0x0aa3, 0x2004 }, + { 0x0aa4, 0x2005 }, + { 0x0aa5, 0x2007 }, + { 0x0aa6, 0x2008 }, + { 0x0aa7, 0x2009 }, + { 0x0aa8, 0x200a }, + { 0x0aa9, 0x2014 }, + { 0x0aaa, 0x2013 }, + { 0x0aae, 0x2026 }, + { 0x0aaf, 0x2025 }, + { 0x0ab0, 0x2153 }, + { 0x0ab1, 0x2154 }, + { 0x0ab2, 0x2155 }, + { 0x0ab3, 0x2156 }, + { 0x0ab4, 0x2157 }, + { 0x0ab5, 0x2158 }, + { 0x0ab6, 0x2159 }, + { 0x0ab7, 0x215a }, + { 0x0ab8, 0x2105 }, + { 0x0abb, 0x2012 }, + { 0x0abc, 0x2329 }, + { 0x0abe, 0x232a }, + { 0x0ac3, 0x215b }, + { 0x0ac4, 0x215c }, + { 0x0ac5, 0x215d }, + { 0x0ac6, 0x215e }, + { 0x0ac9, 0x2122 }, + { 0x0aca, 0x2613 }, + { 0x0acc, 0x25c1 }, + { 0x0acd, 0x25b7 }, + { 0x0ace, 0x25cb }, + { 0x0acf, 0x25af }, + { 0x0ad0, 0x2018 }, + { 0x0ad1, 0x2019 }, + { 0x0ad2, 0x201c }, + { 0x0ad3, 0x201d }, + { 0x0ad4, 0x211e }, + { 0x0ad6, 0x2032 }, + { 0x0ad7, 0x2033 }, + { 0x0ad9, 0x271d }, + { 0x0adb, 0x25ac }, + { 0x0adc, 0x25c0 }, + { 0x0add, 0x25b6 }, + { 0x0ade, 0x25cf }, + { 0x0adf, 0x25ae }, + { 0x0ae0, 0x25e6 }, + { 0x0ae1, 0x25ab }, + { 0x0ae2, 0x25ad }, + { 0x0ae3, 0x25b3 }, + { 0x0ae4, 0x25bd }, + { 0x0ae5, 0x2606 }, + { 0x0ae6, 0x2022 }, + { 0x0ae7, 0x25aa }, + { 0x0ae8, 0x25b2 }, + { 0x0ae9, 0x25bc }, + { 0x0aea, 0x261c }, + { 0x0aeb, 0x261e }, + { 0x0aec, 0x2663 }, + { 0x0aed, 0x2666 }, + { 0x0aee, 0x2665 }, + { 0x0af0, 0x2720 }, + { 0x0af1, 0x2020 }, + { 0x0af2, 0x2021 }, + { 0x0af3, 0x2713 }, + { 0x0af4, 0x2717 }, + { 0x0af5, 0x266f }, + { 0x0af6, 0x266d }, + { 0x0af7, 0x2642 }, + { 0x0af8, 0x2640 }, + { 0x0af9, 0x260e }, + { 0x0afa, 0x2315 }, + { 0x0afb, 0x2117 }, + { 0x0afc, 0x2038 }, + { 0x0afd, 0x201a }, + { 0x0afe, 0x201e }, + { 0x0ba3, 0x003c }, + { 0x0ba6, 0x003e }, + { 0x0ba8, 0x2228 }, + { 0x0ba9, 0x2227 }, + { 0x0bc0, 0x00af }, + { 0x0bc2, 0x22a5 }, + { 0x0bc3, 0x2229 }, + { 0x0bc4, 0x230a }, + { 0x0bc6, 0x005f }, + { 0x0bca, 0x2218 }, + { 0x0bcc, 0x2395 }, + { 0x0bce, 0x22a4 }, + { 0x0bcf, 0x25cb }, + { 0x0bd3, 0x2308 }, + { 0x0bd6, 0x222a }, + { 0x0bd8, 0x2283 }, + { 0x0bda, 0x2282 }, + { 0x0bdc, 0x22a2 }, + { 0x0bfc, 0x22a3 }, + { 0x0cdf, 0x2017 }, + { 0x0ce0, 0x05d0 }, + { 0x0ce1, 0x05d1 }, + { 0x0ce2, 0x05d2 }, + { 0x0ce3, 0x05d3 }, + { 0x0ce4, 0x05d4 }, + { 0x0ce5, 0x05d5 }, + { 0x0ce6, 0x05d6 }, + { 0x0ce7, 0x05d7 }, + { 0x0ce8, 0x05d8 }, + { 0x0ce9, 0x05d9 }, + { 0x0cea, 0x05da }, + { 0x0ceb, 0x05db }, + { 0x0cec, 0x05dc }, + { 0x0ced, 0x05dd }, + { 0x0cee, 0x05de }, + { 0x0cef, 0x05df }, + { 0x0cf0, 0x05e0 }, + { 0x0cf1, 0x05e1 }, + { 0x0cf2, 0x05e2 }, + { 0x0cf3, 0x05e3 }, + { 0x0cf4, 0x05e4 }, + { 0x0cf5, 0x05e5 }, + { 0x0cf6, 0x05e6 }, + { 0x0cf7, 0x05e7 }, + { 0x0cf8, 0x05e8 }, + { 0x0cf9, 0x05e9 }, + { 0x0cfa, 0x05ea }, + { 0x0da1, 0x0e01 }, + { 0x0da2, 0x0e02 }, + { 0x0da3, 0x0e03 }, + { 0x0da4, 0x0e04 }, + { 0x0da5, 0x0e05 }, + { 0x0da6, 0x0e06 }, + { 0x0da7, 0x0e07 }, + { 0x0da8, 0x0e08 }, + { 0x0da9, 0x0e09 }, + { 0x0daa, 0x0e0a }, + { 0x0dab, 0x0e0b }, + { 0x0dac, 0x0e0c }, + { 0x0dad, 0x0e0d }, + { 0x0dae, 0x0e0e }, + { 0x0daf, 0x0e0f }, + { 0x0db0, 0x0e10 }, + { 0x0db1, 0x0e11 }, + { 0x0db2, 0x0e12 }, + { 0x0db3, 0x0e13 }, + { 0x0db4, 0x0e14 }, + { 0x0db5, 0x0e15 }, + { 0x0db6, 0x0e16 }, + { 0x0db7, 0x0e17 }, + { 0x0db8, 0x0e18 }, + { 0x0db9, 0x0e19 }, + { 0x0dba, 0x0e1a }, + { 0x0dbb, 0x0e1b }, + { 0x0dbc, 0x0e1c }, + { 0x0dbd, 0x0e1d }, + { 0x0dbe, 0x0e1e }, + { 0x0dbf, 0x0e1f }, + { 0x0dc0, 0x0e20 }, + { 0x0dc1, 0x0e21 }, + { 0x0dc2, 0x0e22 }, + { 0x0dc3, 0x0e23 }, + { 0x0dc4, 0x0e24 }, + { 0x0dc5, 0x0e25 }, + { 0x0dc6, 0x0e26 }, + { 0x0dc7, 0x0e27 }, + { 0x0dc8, 0x0e28 }, + { 0x0dc9, 0x0e29 }, + { 0x0dca, 0x0e2a }, + { 0x0dcb, 0x0e2b }, + { 0x0dcc, 0x0e2c }, + { 0x0dcd, 0x0e2d }, + { 0x0dce, 0x0e2e }, + { 0x0dcf, 0x0e2f }, + { 0x0dd0, 0x0e30 }, + { 0x0dd1, 0x0e31 }, + { 0x0dd2, 0x0e32 }, + { 0x0dd3, 0x0e33 }, + { 0x0dd4, 0x0e34 }, + { 0x0dd5, 0x0e35 }, + { 0x0dd6, 0x0e36 }, + { 0x0dd7, 0x0e37 }, + { 0x0dd8, 0x0e38 }, + { 0x0dd9, 0x0e39 }, + { 0x0dda, 0x0e3a }, + { 0x0ddf, 0x0e3f }, + { 0x0de0, 0x0e40 }, + { 0x0de1, 0x0e41 }, + { 0x0de2, 0x0e42 }, + { 0x0de3, 0x0e43 }, + { 0x0de4, 0x0e44 }, + { 0x0de5, 0x0e45 }, + { 0x0de6, 0x0e46 }, + { 0x0de7, 0x0e47 }, + { 0x0de8, 0x0e48 }, + { 0x0de9, 0x0e49 }, + { 0x0dea, 0x0e4a }, + { 0x0deb, 0x0e4b }, + { 0x0dec, 0x0e4c }, + { 0x0ded, 0x0e4d }, + { 0x0df0, 0x0e50 }, + { 0x0df1, 0x0e51 }, + { 0x0df2, 0x0e52 }, + { 0x0df3, 0x0e53 }, + { 0x0df4, 0x0e54 }, + { 0x0df5, 0x0e55 }, + { 0x0df6, 0x0e56 }, + { 0x0df7, 0x0e57 }, + { 0x0df8, 0x0e58 }, + { 0x0df9, 0x0e59 }, + { 0x0ea1, 0x3131 }, + { 0x0ea2, 0x3132 }, + { 0x0ea3, 0x3133 }, + { 0x0ea4, 0x3134 }, + { 0x0ea5, 0x3135 }, + { 0x0ea6, 0x3136 }, + { 0x0ea7, 0x3137 }, + { 0x0ea8, 0x3138 }, + { 0x0ea9, 0x3139 }, + { 0x0eaa, 0x313a }, + { 0x0eab, 0x313b }, + { 0x0eac, 0x313c }, + { 0x0ead, 0x313d }, + { 0x0eae, 0x313e }, + { 0x0eaf, 0x313f }, + { 0x0eb0, 0x3140 }, + { 0x0eb1, 0x3141 }, + { 0x0eb2, 0x3142 }, + { 0x0eb3, 0x3143 }, + { 0x0eb4, 0x3144 }, + { 0x0eb5, 0x3145 }, + { 0x0eb6, 0x3146 }, + { 0x0eb7, 0x3147 }, + { 0x0eb8, 0x3148 }, + { 0x0eb9, 0x3149 }, + { 0x0eba, 0x314a }, + { 0x0ebb, 0x314b }, + { 0x0ebc, 0x314c }, + { 0x0ebd, 0x314d }, + { 0x0ebe, 0x314e }, + { 0x0ebf, 0x314f }, + { 0x0ec0, 0x3150 }, + { 0x0ec1, 0x3151 }, + { 0x0ec2, 0x3152 }, + { 0x0ec3, 0x3153 }, + { 0x0ec4, 0x3154 }, + { 0x0ec5, 0x3155 }, + { 0x0ec6, 0x3156 }, + { 0x0ec7, 0x3157 }, + { 0x0ec8, 0x3158 }, + { 0x0ec9, 0x3159 }, + { 0x0eca, 0x315a }, + { 0x0ecb, 0x315b }, + { 0x0ecc, 0x315c }, + { 0x0ecd, 0x315d }, + { 0x0ece, 0x315e }, + { 0x0ecf, 0x315f }, + { 0x0ed0, 0x3160 }, + { 0x0ed1, 0x3161 }, + { 0x0ed2, 0x3162 }, + { 0x0ed3, 0x3163 }, + { 0x0ed4, 0x11a8 }, + { 0x0ed5, 0x11a9 }, + { 0x0ed6, 0x11aa }, + { 0x0ed7, 0x11ab }, + { 0x0ed8, 0x11ac }, + { 0x0ed9, 0x11ad }, + { 0x0eda, 0x11ae }, + { 0x0edb, 0x11af }, + { 0x0edc, 0x11b0 }, + { 0x0edd, 0x11b1 }, + { 0x0ede, 0x11b2 }, + { 0x0edf, 0x11b3 }, + { 0x0ee0, 0x11b4 }, + { 0x0ee1, 0x11b5 }, + { 0x0ee2, 0x11b6 }, + { 0x0ee3, 0x11b7 }, + { 0x0ee4, 0x11b8 }, + { 0x0ee5, 0x11b9 }, + { 0x0ee6, 0x11ba }, + { 0x0ee7, 0x11bb }, + { 0x0ee8, 0x11bc }, + { 0x0ee9, 0x11bd }, + { 0x0eea, 0x11be }, + { 0x0eeb, 0x11bf }, + { 0x0eec, 0x11c0 }, + { 0x0eed, 0x11c1 }, + { 0x0eee, 0x11c2 }, + { 0x0eef, 0x316d }, + { 0x0ef0, 0x3171 }, + { 0x0ef1, 0x3178 }, + { 0x0ef2, 0x317f }, + { 0x0ef3, 0x3181 }, + { 0x0ef4, 0x3184 }, + { 0x0ef5, 0x3186 }, + { 0x0ef6, 0x318d }, + { 0x0ef7, 0x318e }, + { 0x0ef8, 0x11eb }, + { 0x0ef9, 0x11f0 }, + { 0x0efa, 0x11f9 }, + { 0x0eff, 0x20a9 }, +#if 0 + /* FIXME: there is no keysym 0x13a4? But 0x20ac is EuroSign in both + keysym and Unicode */ + { 0x13a4, 0x20ac }, +#endif + { 0x13bc, 0x0152 }, + { 0x13bd, 0x0153 }, + { 0x13be, 0x0178 }, + { 0x20ac, 0x20ac }, + + /* Special function keys. */ + + { 0xff08, 0x0008 }, /* XK_BackSpace */ + { 0xff09, 0x0009 }, /* XK_Tab */ + { 0xff0a, 0x000a }, /* XK_Linefeed */ + { 0xff0d, 0x000d }, /* XK_Return */ + { 0xff13, 0x0013 }, /* XK_Pause */ + { 0xff1b, 0x001b }, /* XK_Escape */ + { 0xff50, 0x0001 }, /* XK_Home */ + { 0xff51, 0x001c }, /* XK_Left */ + { 0xff52, 0x001e }, /* XK_Up */ + { 0xff53, 0x001d }, /* XK_Right */ + { 0xff54, 0x001f }, /* XK_Down */ + { 0xff55, 0x000b }, /* XK_Prior */ + { 0xff56, 0x000c }, /* XK_Next */ + { 0xff57, 0x0004 }, /* XK_End */ + { 0xff6a, 0x0005 }, /* XK_Help */ + { 0xffff, 0x007f }, /* XK_Delete */ +}; + +long keysym2ucs(int keysym) +{ + int min = 0; + int max = sizeof(keysymtab) / sizeof(struct codepair) - 1; + int mid; + + /* first check for Latin-1 characters (1:1 mapping) */ + if ((keysym >= 0x0020 && keysym <= 0x007e) || + (keysym >= 0x00a0 && keysym <= 0x00ff)) + return keysym; + + /* also check for directly encoded 24-bit UCS characters */ + if ((keysym & 0xff000000) == 0x01000000) + return keysym & 0x00ffffff; + + /* binary search in table */ + while (max >= min) { + mid = (min + max) / 2; + if (keysymtab[mid].keysym < keysym) + min = mid + 1; + else if (keysymtab[mid].keysym > keysym) + max = mid - 1; + else { + /* found it */ + return keysymtab[mid].ucs; + } + } + + /* no matching Unicode value found */ + return -1; +} + +static int reverse_compare (const void *a, const void *b) +{ + const struct codepair *ca = a, *cb = b; + + return ca->ucs - cb->ucs; +} + +int ucs2keysym(long ucs) +{ + static struct codepair *reverse_keysymtab; + + int min = 0; + int max = sizeof(keysymtab) / sizeof(struct codepair) - 1; + int mid; + + if (reverse_keysymtab == NULL) + { + reverse_keysymtab = malloc (sizeof (keysymtab)); + memcpy (reverse_keysymtab, keysymtab, sizeof (keysymtab)); + + qsort (reverse_keysymtab, + sizeof (keysymtab) / sizeof (struct codepair), + sizeof (struct codepair), + reverse_compare); + } + + /* first check for Latin-1 characters (1:1 mapping) */ + if ((ucs >= 0x0020 && ucs <= 0x007e) || + (ucs >= 0x00a0 && ucs <= 0x00ff)) + return ucs; + + /* binary search in table */ + while (max >= min) { + mid = (min + max) / 2; + if (reverse_keysymtab[mid].ucs < ucs) + min = mid + 1; + else if (reverse_keysymtab[mid].ucs > ucs) + max = mid - 1; + else { + /* found it */ + return reverse_keysymtab[mid].keysym; + } + } + + /* finally, assume a directly encoded 24-bit UCS character */ + return ucs | 0x01000000; +} diff --git a/xorg-server-1.4/hw/darwin/quartz/keysym2ucs.h b/xorg-server-1.4/hw/darwin/quartz/keysym2ucs.h new file mode 100644 index 0000000..f5b7a18 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/keysym2ucs.h @@ -0,0 +1,36 @@ +/* + * This module converts keysym values into the corresponding ISO 10646 + * (UCS, Unicode) values. + * + * The array keysymtab[] contains pairs of X11 keysym values for graphical + * characters and the corresponding Unicode value. The function + * keysym2ucs() maps a keysym onto a Unicode value using a binary search, + * therefore keysymtab[] must remain SORTED by keysym value. + * + * The keysym -> UTF-8 conversion will hopefully one day be provided + * by Xlib via XmbLookupString() and should ideally not have to be + * done in X applications. But we are not there yet. + * + * We allow to represent any UCS character in the range U-00000000 to + * U-00FFFFFF by a keysym value in the range 0x01000000 to 0x01ffffff. + * This admittedly does not cover the entire 31-bit space of UCS, but + * it does cover all of the characters up to U-10FFFF, which can be + * represented by UTF-16, and more, and it is very unlikely that higher + * UCS codes will ever be assigned by ISO. So to get Unicode character + * U+ABCD you can directly use keysym 0x0100abcd. + * + * Author: Markus G. Kuhn , University of Cambridge, April 2001 + * + * Special thanks to Richard Verhoeven for preparing + * an initial draft of the mapping table. + * + * This software is in the public domain. Share and enjoy! + */ + +#ifndef KEYSYM2UCS_H +#define KEYSYM2UCS_H 1 + +extern long keysym2ucs(int keysym); +extern int ucs2keysym(long ucs); + +#endif /* KEYSYM2UCS_H */ diff --git a/xorg-server-1.4/hw/darwin/quartz/pseudoramiX.c b/xorg-server-1.4/hw/darwin/quartz/pseudoramiX.c new file mode 100644 index 0000000..7ba6d5a --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/pseudoramiX.c @@ -0,0 +1,434 @@ +/* + * Minimal implementation of PanoramiX/Xinerama + * + * This is used in rootless mode where the underlying window server + * already provides an abstracted view of multiple screens as one + * large screen area. + * + * This code is largely based on panoramiX.c, which contains the + * following copyright notice: + */ +/***************************************************************** +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. +******************************************************************/ + +#include "pseudoramiX.h" +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "extnsionst.h" +#include "dixstruct.h" +#include "window.h" +#include +#include "globals.h" + +extern int ProcPanoramiXQueryVersion (ClientPtr client); + +static void PseudoramiXResetProc(ExtensionEntry *extEntry); + +static int ProcPseudoramiXQueryVersion(ClientPtr client); +static int ProcPseudoramiXGetState(ClientPtr client); +static int ProcPseudoramiXGetScreenCount(ClientPtr client); +static int ProcPseudoramiXGetScreenSize(ClientPtr client); +static int ProcPseudoramiXIsActive(ClientPtr client); +static int ProcPseudoramiXQueryScreens(ClientPtr client); +static int ProcPseudoramiXDispatch(ClientPtr client); + +static int SProcPseudoramiXQueryVersion(ClientPtr client); +static int SProcPseudoramiXGetState(ClientPtr client); +static int SProcPseudoramiXGetScreenCount(ClientPtr client); +static int SProcPseudoramiXGetScreenSize(ClientPtr client); +static int SProcPseudoramiXIsActive(ClientPtr client); +static int SProcPseudoramiXQueryScreens(ClientPtr client); +static int SProcPseudoramiXDispatch(ClientPtr client); + + +typedef struct { + int x; + int y; + int w; + int h; +} PseudoramiXScreenRec; + +static PseudoramiXScreenRec *pseudoramiXScreens = NULL; +static int pseudoramiXScreensAllocated = 0; +static int pseudoramiXNumScreens = 0; +static unsigned long pseudoramiXGeneration = 0; + + +// Add a PseudoramiX screen. +// The rest of the X server will know nothing about this screen. +// Can be called before or after extension init. +// Screens must be re-added once per generation. +void +PseudoramiXAddScreen(int x, int y, int w, int h) +{ + PseudoramiXScreenRec *s; + + if (noPseudoramiXExtension) return; + + if (pseudoramiXNumScreens == pseudoramiXScreensAllocated) { + pseudoramiXScreensAllocated += pseudoramiXScreensAllocated + 1; + pseudoramiXScreens = xrealloc(pseudoramiXScreens, + pseudoramiXScreensAllocated * + sizeof(PseudoramiXScreenRec)); + } + + s = &pseudoramiXScreens[pseudoramiXNumScreens++]; + s->x = x; + s->y = y; + s->w = w; + s->h = h; +} + + +// Initialize PseudoramiX. +// Copied from PanoramiXExtensionInit +void PseudoramiXExtensionInit(int argc, char *argv[]) +{ + Bool success = FALSE; + ExtensionEntry *extEntry; + + if (noPseudoramiXExtension) return; + + /* Even with only one screen we need to enable PseudoramiX to allow + dynamic screen configuration changes. */ +#if 0 + if (pseudoramiXNumScreens == 1) { + // Only one screen - disable Xinerama extension. + noPseudoramiXExtension = TRUE; + return; + } +#endif + + // The server must not run the PanoramiX operations. + noPanoramiXExtension = TRUE; + + if (pseudoramiXGeneration != serverGeneration) { + extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0, + ProcPseudoramiXDispatch, + SProcPseudoramiXDispatch, + PseudoramiXResetProc, + StandardMinorOpcode); + if (!extEntry) { + ErrorF("PseudoramiXExtensionInit(): AddExtension failed\n"); + } else { + pseudoramiXGeneration = serverGeneration; + success = TRUE; + } + } + + if (!success) { + ErrorF("%s Extension (PseudoramiX) failed to initialize\n", + PANORAMIX_PROTOCOL_NAME); + return; + } +} + + +void PseudoramiXResetScreens(void) +{ + pseudoramiXNumScreens = 0; +} + + +static void PseudoramiXResetProc(ExtensionEntry *extEntry) +{ + PseudoramiXResetScreens(); +} + + +// was PanoramiX +static int ProcPseudoramiXQueryVersion(ClientPtr client) +{ + return ProcPanoramiXQueryVersion(client); +} + + +// was PanoramiX +static int ProcPseudoramiXGetState(ClientPtr client) +{ + REQUEST(xPanoramiXGetStateReq); + WindowPtr pWin; + xPanoramiXGetStateReply rep; + register int n, rc; + + REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.state = !noPseudoramiXExtension; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swaps (&rep.state, n); + } + WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep); + return client->noClientException; +} + + +// was PanoramiX +static int ProcPseudoramiXGetScreenCount(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenCountReq); + WindowPtr pWin; + xPanoramiXGetScreenCountReply rep; + register int n, rc; + + REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.ScreenCount = pseudoramiXNumScreens; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swaps (&rep.ScreenCount, n); + } + WriteToClient (client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep); + return client->noClientException; +} + + +// was PanoramiX +static int ProcPseudoramiXGetScreenSize(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenSizeReq); + WindowPtr pWin; + xPanoramiXGetScreenSizeReply rep; + register int n, rc; + + REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + /* screen dimensions */ + rep.width = pseudoramiXScreens[stuff->screen].w; + // was panoramiXdataPtr[stuff->screen].width; + rep.height = pseudoramiXScreens[stuff->screen].h; + // was panoramiXdataPtr[stuff->screen].height; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swaps (&rep.width, n); + swaps (&rep.height, n); + } + WriteToClient (client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep); + return client->noClientException; +} + + +// was Xinerama +static int ProcPseudoramiXIsActive(ClientPtr client) +{ + /* REQUEST(xXineramaIsActiveReq); */ + xXineramaIsActiveReply rep; + + REQUEST_SIZE_MATCH(xXineramaIsActiveReq); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.state = !noPseudoramiXExtension; + if (client->swapped) { + register int n; + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.state, n); + } + WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep); + return client->noClientException; +} + + +// was Xinerama +static int ProcPseudoramiXQueryScreens(ClientPtr client) +{ + /* REQUEST(xXineramaQueryScreensReq); */ + xXineramaQueryScreensReply rep; + + REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.number = noPseudoramiXExtension ? 0 : pseudoramiXNumScreens; + rep.length = rep.number * sz_XineramaScreenInfo >> 2; + if (client->swapped) { + register int n; + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.number, n); + } + WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep); + + if (!noPseudoramiXExtension) { + xXineramaScreenInfo scratch; + int i; + + for(i = 0; i < pseudoramiXNumScreens; i++) { + scratch.x_org = pseudoramiXScreens[i].x; + scratch.y_org = pseudoramiXScreens[i].y; + scratch.width = pseudoramiXScreens[i].w; + scratch.height = pseudoramiXScreens[i].h; + + if(client->swapped) { + register int n; + swaps (&scratch.x_org, n); + swaps (&scratch.y_org, n); + swaps (&scratch.width, n); + swaps (&scratch.height, n); + } + WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch); + } + } + + return client->noClientException; +} + + +// was PanoramiX +static int ProcPseudoramiXDispatch (ClientPtr client) +{ REQUEST(xReq); + switch (stuff->data) + { + case X_PanoramiXQueryVersion: + return ProcPseudoramiXQueryVersion(client); + case X_PanoramiXGetState: + return ProcPseudoramiXGetState(client); + case X_PanoramiXGetScreenCount: + return ProcPseudoramiXGetScreenCount(client); + case X_PanoramiXGetScreenSize: + return ProcPseudoramiXGetScreenSize(client); + case X_XineramaIsActive: + return ProcPseudoramiXIsActive(client); + case X_XineramaQueryScreens: + return ProcPseudoramiXQueryScreens(client); + } + return BadRequest; +} + + + +static int +SProcPseudoramiXQueryVersion (ClientPtr client) +{ + REQUEST(xPanoramiXQueryVersionReq); + register int n; + + swaps(&stuff->length,n); + REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq); + return ProcPseudoramiXQueryVersion(client); +} + +static int +SProcPseudoramiXGetState(ClientPtr client) +{ + REQUEST(xPanoramiXGetStateReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + return ProcPseudoramiXGetState(client); +} + +static int +SProcPseudoramiXGetScreenCount(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenCountReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + return ProcPseudoramiXGetScreenCount(client); +} + +static int +SProcPseudoramiXGetScreenSize(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenSizeReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + return ProcPseudoramiXGetScreenSize(client); +} + + +static int +SProcPseudoramiXIsActive(ClientPtr client) +{ + REQUEST(xXineramaIsActiveReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xXineramaIsActiveReq); + return ProcPseudoramiXIsActive(client); +} + + +static int +SProcPseudoramiXQueryScreens(ClientPtr client) +{ + REQUEST(xXineramaQueryScreensReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); + return ProcPseudoramiXQueryScreens(client); +} + + +static int +SProcPseudoramiXDispatch (ClientPtr client) +{ REQUEST(xReq); + switch (stuff->data) + { + case X_PanoramiXQueryVersion: + return SProcPseudoramiXQueryVersion(client); + case X_PanoramiXGetState: + return SProcPseudoramiXGetState(client); + case X_PanoramiXGetScreenCount: + return SProcPseudoramiXGetScreenCount(client); + case X_PanoramiXGetScreenSize: + return SProcPseudoramiXGetScreenSize(client); + case X_XineramaIsActive: + return SProcPseudoramiXIsActive(client); + case X_XineramaQueryScreens: + return SProcPseudoramiXQueryScreens(client); + } + return BadRequest; +} diff --git a/xorg-server-1.4/hw/darwin/quartz/pseudoramiX.h b/xorg-server-1.4/hw/darwin/quartz/pseudoramiX.h new file mode 100644 index 0000000..df5010d --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/pseudoramiX.h @@ -0,0 +1,9 @@ +/* + * Minimal implementation of PanoramiX/Xinerama + */ + +extern int noPseudoramiXExtension; + +void PseudoramiXAddScreen(int x, int y, int w, int h); +void PseudoramiXExtensionInit(int argc, char *argv[]); +void PseudoramiXResetScreens(void); diff --git a/xorg-server-1.4/hw/darwin/quartz/quartz.c b/xorg-server-1.4/hw/darwin/quartz/quartz.c new file mode 100644 index 0000000..038b21e --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/quartz.c @@ -0,0 +1,432 @@ +/************************************************************** + * + * Quartz-specific support for the Darwin X Server + * + **************************************************************/ +/* + * Copyright (c) 2001-2004 Greg Parker and Torrey T. Lyons. + * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "quartzCommon.h" +#include "quartz.h" +#include "darwin.h" +#include "quartzAudio.h" +#include "pseudoramiX.h" +#define _APPLEWM_SERVER_ +#include "X11/extensions/applewm.h" +#include "applewmExt.h" + +// X headers +#include "scrnintstr.h" +#include "windowstr.h" +#include "colormapst.h" +#include "globals.h" + +// System headers +#include +#include +#include +#include + +// Shared global variables for Quartz modes +int quartzEventWriteFD = -1; +int quartzStartClients = 1; +int quartzRootless = -1; +int quartzUseSysBeep = 0; +int quartzUseAGL = 1; +int quartzEnableKeyEquivalents = 1; +int quartzServerVisible = TRUE; +int quartzServerQuitting = FALSE; +int quartzScreenIndex = 0; +int aquaMenuBarHeight = 0; +int noPseudoramiXExtension = TRUE; +QuartzModeProcsPtr quartzProcs = NULL; +const char *quartzOpenGLBundle = NULL; + +/* +=========================================================================== + + Screen functions + +=========================================================================== +*/ + +/* + * DarwinModeAddScreen + * Do mode dependent initialization of each screen for Quartz. + */ +Bool DarwinModeAddScreen( + int index, + ScreenPtr pScreen) +{ + // allocate space for private per screen Quartz specific storage + QuartzScreenPtr displayInfo = xcalloc(sizeof(QuartzScreenRec), 1); + QUARTZ_PRIV(pScreen) = displayInfo; + + // do Quartz mode specific initialization + return quartzProcs->AddScreen(index, pScreen); +} + + +/* + * DarwinModeSetupScreen + * Finalize mode specific setup of each screen. + */ +Bool DarwinModeSetupScreen( + int index, + ScreenPtr pScreen) +{ + // do Quartz mode specific setup + if (! quartzProcs->SetupScreen(index, pScreen)) + return FALSE; + + // setup cursor support + if (! quartzProcs->InitCursor(pScreen)) + return FALSE; + + return TRUE; +} + + +/* + * DarwinModeInitOutput + * Quartz display initialization. + */ +void DarwinModeInitOutput( + int argc, + char **argv ) +{ + static unsigned long generation = 0; + + // Allocate private storage for each screen's Quartz specific info + if (generation != serverGeneration) { + quartzScreenIndex = AllocateScreenPrivateIndex(); + generation = serverGeneration; + } + + if (serverGeneration == 0) { + QuartzAudioInit(); + } + + if (!RegisterBlockAndWakeupHandlers(QuartzBlockHandler, + QuartzWakeupHandler, + NULL)) + { + FatalError("Could not register block and wakeup handlers."); + } + + // Do display mode specific initialization + quartzProcs->DisplayInit(); + + // Init PseudoramiX implementation of Xinerama. + // This should be in InitExtensions, but that causes link errors + // for servers that don't link in pseudoramiX.c. + if (!noPseudoramiXExtension) { + PseudoramiXExtensionInit(argc, argv); + } +} + + +/* + * DarwinModeInitInput + * Inform the main thread the X server is ready to handle events. + */ +void DarwinModeInitInput( + int argc, + char **argv ) +{ +#ifdef INXQUARTZ + X11ApplicationServerReady(); +#else + QuartzMessageMainThread(kQuartzServerStarted, NULL, 0); +#endif + + // Do final display mode specific initialization before handling events + if (quartzProcs->InitInput) + quartzProcs->InitInput(argc, argv); +} + + +/* + * QuartzUpdateScreens + * Adjust for screen arrangement changes. + */ +static void QuartzUpdateScreens(void) +{ + ScreenPtr pScreen; + WindowPtr pRoot; + int x, y, width, height, sx, sy; + xEvent e; + + if (noPseudoramiXExtension || screenInfo.numScreens != 1) + { + /* FIXME: if not using Xinerama, we have multiple screens, and + to do this properly may need to add or remove screens. Which + isn't possible. So don't do anything. Another reason why + we default to running with Xinerama. */ + + return; + } + + pScreen = screenInfo.screens[0]; + + PseudoramiXResetScreens(); + quartzProcs->AddPseudoramiXScreens(&x, &y, &width, &height); + + dixScreenOrigins[pScreen->myNum].x = x; + dixScreenOrigins[pScreen->myNum].y = y; + pScreen->mmWidth = pScreen->mmWidth * ((double) width / pScreen->width); + pScreen->mmHeight = pScreen->mmHeight * ((double) height / pScreen->height); + pScreen->width = width; + pScreen->height = height; + + /* FIXME: should probably do something with RandR here. */ + + DarwinAdjustScreenOrigins(&screenInfo); + quartzProcs->UpdateScreen(pScreen); + + sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + /* Adjust the root window. */ + pRoot = WindowTable[pScreen->myNum]; + AppleWMSetScreenOrigin(pRoot); + pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL); + pScreen->PaintWindowBackground(pRoot, &pRoot->borderClip, PW_BACKGROUND); +// QuartzIgnoreNextWarpCursor(); + DefineInitialRootWindow(pRoot); + + /* Send an event for the root reconfigure */ + e.u.u.type = ConfigureNotify; + e.u.configureNotify.window = pRoot->drawable.id; + e.u.configureNotify.aboveSibling = None; + e.u.configureNotify.x = x - sx; + e.u.configureNotify.y = y - sy; + e.u.configureNotify.width = width; + e.u.configureNotify.height = height; + e.u.configureNotify.borderWidth = wBorderWidth(pRoot); + e.u.configureNotify.override = pRoot->overrideRedirect; + DeliverEvents(pRoot, &e, 1, NullWindow); + + /* FIXME: Should we use RREditConnectionInfo(pScreen)? */ +} + + +/* + * QuartzShow + * Show the X server on screen. Does nothing if already shown. + * Calls mode specific screen resume to restore the X clip regions + * (if needed) and the X server cursor state. + */ +static void QuartzShow( + int x, // cursor location + int y ) +{ + int i; + + if (!quartzServerVisible) { + quartzServerVisible = TRUE; + for (i = 0; i < screenInfo.numScreens; i++) { + if (screenInfo.screens[i]) { + quartzProcs->ResumeScreen(screenInfo.screens[i], x, y); + } + } + } +} + + +/* + * QuartzHide + * Remove the X server display from the screen. Does nothing if already + * hidden. Calls mode specific screen suspend to set X clip regions to + * prevent drawing (if needed) and restore the Aqua cursor. + */ +static void QuartzHide(void) +{ + int i; + + if (quartzServerVisible) { + for (i = 0; i < screenInfo.numScreens; i++) { + if (screenInfo.screens[i]) { + quartzProcs->SuspendScreen(screenInfo.screens[i]); + } + } + } + quartzServerVisible = FALSE; +#ifndef INXQUARTZ + QuartzMessageMainThread(kQuartzServerHidden, NULL, 0); +#endif +} + + +/* + * QuartzSetRootClip + * Enable or disable rendering to the X screen. + */ +static void QuartzSetRootClip( + BOOL enable) +{ + int i; + + if (!quartzServerVisible) + return; + + for (i = 0; i < screenInfo.numScreens; i++) { + if (screenInfo.screens[i]) { + xf86SetRootClip(screenInfo.screens[i], enable); + } + } +} + + +/* + * QuartzMessageServerThread + * Send the X server thread a message by placing it on the event queue. + */ +void +QuartzMessageServerThread( + int type, + int argc, ...) +{ + xEvent xe; + INT32 *argv; + int i, max_args; + va_list args; + + memset(&xe, 0, sizeof(xe)); + xe.u.u.type = type; + xe.u.clientMessage.u.l.type = type; + + argv = &xe.u.clientMessage.u.l.longs0; + max_args = 4; + + if (argc > 0 && argc <= max_args) { + va_start (args, argc); + for (i = 0; i < argc; i++) + argv[i] = (int) va_arg (args, int); + va_end (args); + } + + DarwinEQEnqueue(&xe); +} + + +/* + * DarwinModeProcessEvent + * Process Quartz specific events. + */ +void DarwinModeProcessEvent( + xEvent *xe) +{ + switch (xe->u.u.type) { + + case kXDarwinActivate: + QuartzShow(xe->u.keyButtonPointer.rootX, + xe->u.keyButtonPointer.rootY); + AppleWMSendEvent(AppleWMActivationNotify, + AppleWMActivationNotifyMask, + AppleWMIsActive, 0); + break; + + case kXDarwinDeactivate: + AppleWMSendEvent(AppleWMActivationNotify, + AppleWMActivationNotifyMask, + AppleWMIsInactive, 0); + QuartzHide(); + break; + + case kXDarwinSetRootClip: + QuartzSetRootClip((BOOL)xe->u.clientMessage.u.l.longs0); + break; + + case kXDarwinQuit: + GiveUp(0); + break; + + case kXDarwinReadPasteboard: + QuartzReadPasteboard(); + break; + + case kXDarwinWritePasteboard: + QuartzWritePasteboard(); + break; + + /* + * AppleWM events + */ + case kXDarwinControllerNotify: + AppleWMSendEvent(AppleWMControllerNotify, + AppleWMControllerNotifyMask, + xe->u.clientMessage.u.l.longs0, + xe->u.clientMessage.u.l.longs1); + break; + + case kXDarwinPasteboardNotify: + AppleWMSendEvent(AppleWMPasteboardNotify, + AppleWMPasteboardNotifyMask, + xe->u.clientMessage.u.l.longs0, + xe->u.clientMessage.u.l.longs1); + break; + + case kXDarwinDisplayChanged: + QuartzUpdateScreens(); + break; + + case kXDarwinWindowState: + case kXDarwinWindowMoved: + // FIXME: Not implemented yet + break; + + default: + ErrorF("Unknown application defined event type %d.\n", + xe->u.u.type); + } +} + + +/* + * DarwinModeGiveUp + * Cleanup before X server shutdown + * Release the screen and restore the Aqua cursor. + */ +void DarwinModeGiveUp(void) +{ +#if 0 +// Trying to switch cursors when quitting causes deadlock + int i; + + for (i = 0; i < screenInfo.numScreens; i++) { + if (screenInfo.screens[i]) { + QuartzSuspendXCursor(screenInfo.screens[i]); + } + } +#endif + + if (!quartzRootless) + quartzProcs->ReleaseScreens(); +} diff --git a/xorg-server-1.4/hw/darwin/quartz/quartz.h b/xorg-server-1.4/hw/darwin/quartz/quartz.h new file mode 100644 index 0000000..f1b36b6 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/quartz.h @@ -0,0 +1,129 @@ +/* + * quartz.h + * + * External interface of the Quartz display modes seen by the generic, mode + * independent parts of the Darwin X server. + */ +/* + * Copyright (c) 2001-2003 Greg Parker and Torrey T. Lyons. + * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#ifndef _QUARTZ_H +#define _QUARTZ_H + +#include "quartzPasteboard.h" + +#include "screenint.h" +#include "window.h" + +/*------------------------------------------ + Quartz display mode function types + ------------------------------------------*/ + +/* + * Display mode initialization + */ +typedef void (*DisplayInitProc)(void); +typedef Bool (*AddScreenProc)(int index, ScreenPtr pScreen); +typedef Bool (*SetupScreenProc)(int index, ScreenPtr pScreen); +typedef void (*InitInputProc)(int argc, char **argv); + +/* + * Cursor functions + */ +typedef Bool (*InitCursorProc)(ScreenPtr pScreen); +typedef void (*CursorUpdateProc)(void); + +/* + * Suspend and resume X11 activity + */ +typedef void (*SuspendScreenProc)(ScreenPtr pScreen); +typedef void (*ResumeScreenProc)(ScreenPtr pScreen, int x, int y); +typedef void (*CaptureScreensProc)(void); +typedef void (*ReleaseScreensProc)(void); + +/* + * Screen state change support + */ +typedef void (*ScreenChangedProc)(void); +typedef void (*AddPseudoramiXScreensProc)(int *x, int *y, int *width, int *height); +typedef void (*UpdateScreenProc)(ScreenPtr pScreen); + +/* + * Rootless helper functions + */ +typedef Bool (*IsX11WindowProc)(void *nsWindow, int windowNumber); +typedef void (*HideWindowsProc)(Bool hide); + +/* + * Rootless functions for optional export to GLX layer + */ +typedef void * (*FrameForWindowProc)(WindowPtr pWin, Bool create); +typedef WindowPtr (*TopLevelParentProc)(WindowPtr pWindow); +typedef Bool (*CreateSurfaceProc) + (ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable, + unsigned int client_id, unsigned int *surface_id, + unsigned int key[2], void (*notify) (void *arg, void *data), + void *notify_data); +typedef Bool (*DestroySurfaceProc) + (ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable, + void (*notify) (void *arg, void *data), void *notify_data); + +/* + * Quartz display mode function list + */ +typedef struct _QuartzModeProcs { + DisplayInitProc DisplayInit; + AddScreenProc AddScreen; + SetupScreenProc SetupScreen; + InitInputProc InitInput; + + InitCursorProc InitCursor; + CursorUpdateProc CursorUpdate; // Not used if NULL + + SuspendScreenProc SuspendScreen; + ResumeScreenProc ResumeScreen; + CaptureScreensProc CaptureScreens; // Only called in fullscreen + ReleaseScreensProc ReleaseScreens; // Only called in fullscreen + + ScreenChangedProc ScreenChanged; + AddPseudoramiXScreensProc AddPseudoramiXScreens; + UpdateScreenProc UpdateScreen; + + IsX11WindowProc IsX11Window; + HideWindowsProc HideWindows; + + FrameForWindowProc FrameForWindow; + TopLevelParentProc TopLevelParent; + CreateSurfaceProc CreateSurface; + DestroySurfaceProc DestroySurface; +} QuartzModeProcsRec, *QuartzModeProcsPtr; + +extern QuartzModeProcsPtr quartzProcs; + +Bool QuartzLoadDisplayBundle(const char *dpyBundleName); + +#endif diff --git a/xorg-server-1.4/hw/darwin/quartz/quartzAudio.c b/xorg-server-1.4/hw/darwin/quartz/quartzAudio.c new file mode 100644 index 0000000..16b9c2b --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/quartzAudio.c @@ -0,0 +1,344 @@ +// +// QuartzAudio.m +// +// X Window bell support using CoreAudio or AppKit. +// Greg Parker gparker@cs.stanford.edu 19 Feb 2001 +// +// Info about sine wave sound playback: +// CoreAudio code derived from macosx-dev posting by Tim Wood +// http://www.omnigroup.com/mailman/archive/macosx-dev/2000-May/002004.html +// Smoothing transitions between sounds +// http://www.wam.umd.edu/~mphoenix/dss/dss.html +// +/* + * Copyright (c) 2001 Greg Parker. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "quartzCommon.h" +#include "quartzAudio.h" + +#include +#include + +#include "inputstr.h" +#include +#include + +void NSBeep(); + +typedef struct QuartzAudioRec { + double frequency; + double amplitude; + + UInt32 curFrame; + UInt32 remainingFrames; + UInt32 totalFrames; + UInt32 bytesPerFrame; + double sampleRate; + UInt32 fadeLength; + + UInt32 bufferByteCount; + Boolean playing; + pthread_mutex_t lock; + + // used to fade out interrupted sound and avoid 'pop' + double prevFrequency; + double prevAmplitude; + UInt32 prevFrame; +} QuartzAudioRec; + +static AudioDeviceID quartzAudioDevice = kAudioDeviceUnknown; +static QuartzAudioRec data; + + +/* + * QuartzAudioEnvelope + * Fade sound in and out to avoid pop. + * Sounds with shorter duration will never reach full amplitude. Deal. + */ +static double QuartzAudioEnvelope( + UInt32 curFrame, + UInt32 totalFrames, + UInt32 fadeLength ) +{ + double fadeFrames = min(fadeLength, totalFrames / 2); + if (fadeFrames < 1) return 0; + + if (curFrame < fadeFrames) { + return curFrame / fadeFrames; + } else if (curFrame > totalFrames - fadeFrames) { + return (totalFrames-curFrame) / fadeFrames; + } else { + return 1.0; + } +} + + +/* + * QuartzFillBuffer + * Fill this buffer with data and update the data position. + * FIXME: this is ugly + */ +static void QuartzFillBuffer( + AudioBuffer *audiobuffer, + QuartzAudioRec *data ) +{ + float *buffer, *b; + unsigned int frame, frameCount; + unsigned int bufferFrameCount; + float multiplier, v; + int i; + + buffer = (float *)audiobuffer->mData; + bufferFrameCount = audiobuffer->mDataByteSize / data->bytesPerFrame; + + frameCount = min(bufferFrameCount, data->remainingFrames); + + // Fade out previous sine wave, if any. + b = buffer; + if (data->prevFrame) { + multiplier = 2*M_PI*(data->prevFrequency/data->sampleRate); + for (frame = 0; frame < data->fadeLength; frame++) { + v = data->prevAmplitude * + QuartzAudioEnvelope(frame+data->fadeLength, + 2*data->fadeLength, + data->fadeLength) * + sin(multiplier * (data->prevFrame+frame)); + for (i = 0; i < audiobuffer->mNumberChannels; i++) { + *b++ = v; + } + } + // no more prev fade + data->prevFrame = 0; + + // adjust for space eaten by prev fade + buffer += audiobuffer->mNumberChannels*frame; + bufferFrameCount -= frame; + frameCount = min(bufferFrameCount, data->remainingFrames); + } + + // Write a sine wave with the specified frequency and amplitude + multiplier = 2*M_PI*(data->frequency/data->sampleRate); + for (frame = 0; frame < frameCount; frame++) { + v = data->amplitude * + QuartzAudioEnvelope(data->curFrame+frame, data->totalFrames, + data->fadeLength) * + sin(multiplier * (data->curFrame+frame)); + for (i = 0; i < audiobuffer->mNumberChannels; i++) { + *b++ = v; + } + } + + // Zero out the rest of the buffer, if any + memset(b, 0, sizeof(float) * audiobuffer->mNumberChannels * + (bufferFrameCount-frame)); + + data->curFrame += frameCount; + data->remainingFrames -= frameCount; + if (data->remainingFrames == 0) { + data->playing = FALSE; + data->curFrame = 0; + } +} + + +/* + * QuartzAudioIOProc + * Callback function for audio playback. + * FIXME: use inOutputTime to correct for skipping + */ +static OSStatus +QuartzAudioIOProc( + AudioDeviceID inDevice, + const AudioTimeStamp *inNow, + const AudioBufferList *inInputData, + const AudioTimeStamp *inInputTime, + AudioBufferList *outOutputData, + const AudioTimeStamp *inOutputTime, + void *inClientData ) +{ + QuartzAudioRec *data = (QuartzAudioRec *)inClientData; + int i; + Boolean wasPlaying; + + pthread_mutex_lock(&data->lock); + wasPlaying = data->playing; + for (i = 0; i < outOutputData->mNumberBuffers; i++) { + if (data->playing) { + QuartzFillBuffer(outOutputData->mBuffers+i, data); + } + else { + memset(outOutputData->mBuffers[i].mData, 0, + outOutputData->mBuffers[i].mDataByteSize); + } + } + if (wasPlaying && !data->playing) { + OSStatus err; + err = AudioDeviceStop(inDevice, QuartzAudioIOProc); + } + pthread_mutex_unlock(&data->lock); + return 0; +} + + +/* + * QuartzCoreAudioBell + * Play a tone using the CoreAudio API + */ +static void QuartzCoreAudioBell( + int volume, // volume is % of max + int pitch, // pitch is Hz + int duration ) // duration is milliseconds +{ + if (quartzAudioDevice == kAudioDeviceUnknown) return; + + pthread_mutex_lock(&data.lock); + + // fade previous sound, if any + data.prevFrequency = data.frequency; + data.prevAmplitude = data.amplitude; + data.prevFrame = data.curFrame; + + // set new sound + data.frequency = pitch; + data.amplitude = volume / 100.0; + data.curFrame = 0; + data.totalFrames = (int)(data.sampleRate * duration / 1000.0); + data.remainingFrames = data.totalFrames; + + if (! data.playing) { + OSStatus status; + status = AudioDeviceStart(quartzAudioDevice, QuartzAudioIOProc); + if (status) { + ErrorF("QuartzAudioBell: AudioDeviceStart returned %ld\n", status); + } else { + data.playing = TRUE; + } + } + pthread_mutex_unlock(&data.lock); +} + + +/* + * DarwinModeBell + * Ring the bell + */ +void DarwinModeBell( + int volume, // volume in percent of max + DeviceIntPtr pDevice, + pointer ctrl, + int class ) +{ + int pitch; // pitch in Hz + int duration; // duration in milliseconds + + if (class == BellFeedbackClass) { + pitch = ((BellCtrl*)ctrl)->pitch; + duration = ((BellCtrl*)ctrl)->duration; + } else if (class == KbdFeedbackClass) { + pitch = ((KeybdCtrl*)ctrl)->bell_pitch; + duration = ((KeybdCtrl*)ctrl)->bell_duration; + } else { + ErrorF("QuartzBell: bad bell class %d\n", class); + return; + } + + if (quartzUseSysBeep) { + if (volume) + NSBeep(); + } else { + QuartzCoreAudioBell(volume, pitch, duration); + } +} + + +/* + * QuartzAudioInit + * Prepare to play the bell with the CoreAudio API + */ +void QuartzAudioInit(void) +{ + UInt32 propertySize; + OSStatus status; + AudioDeviceID outputDevice; + AudioStreamBasicDescription outputStreamDescription; + double sampleRate; + + // Get the default output device + propertySize = sizeof(outputDevice); + status = AudioHardwareGetProperty( + kAudioHardwarePropertyDefaultOutputDevice, + &propertySize, &outputDevice); + if (status) { + ErrorF("QuartzAudioInit: AudioHardwareGetProperty returned %ld\n", + status); + return; + } + if (outputDevice == kAudioDeviceUnknown) { + ErrorF("QuartzAudioInit: No audio output devices available.\n"); + return; + } + + // Get the basic device description + propertySize = sizeof(outputStreamDescription); + status = AudioDeviceGetProperty(outputDevice, 0, FALSE, + kAudioDevicePropertyStreamFormat, + &propertySize, &outputStreamDescription); + if (status) { + ErrorF("QuartzAudioInit: GetProperty(stream format) returned %ld\n", + status); + return; + } + sampleRate = outputStreamDescription.mSampleRate; + + // Fill in the playback data + data.frequency = 0; + data.amplitude = 0; + data.curFrame = 0; + data.remainingFrames = 0; + data.bytesPerFrame = outputStreamDescription.mBytesPerFrame; + data.sampleRate = sampleRate; + // data.bufferByteCount = bufferByteCount; + data.playing = FALSE; + data.prevAmplitude = 0; + data.prevFrame = 0; + data.prevFrequency = 0; + data.fadeLength = data.sampleRate / 200; + pthread_mutex_init(&data.lock, NULL); // fixme error check + + // fixme assert fadeLength +#endif + +#include "quartzCommon.h" + +#define BOOL xBOOL +#include "darwin.h" +#undef BOOL + +#include + +#import "Preferences.h" +#include "pseudoramiX.h" + +extern void FatalError(const char *, ...); +extern char *display; +extern int noPanoramiXExtension; + + +/* + * QuartzReadPreferences + * Read the user preferences from the Cocoa front end. + */ +void QuartzReadPreferences(void) +{ + char *fileString; + + darwinFakeButtons = [Preferences fakeButtons]; + darwinFakeMouse2Mask = [Preferences button2Mask]; + darwinFakeMouse3Mask = [Preferences button3Mask]; + darwinMouseAccelChange = [Preferences mouseAccelChange]; + quartzUseSysBeep = [Preferences systemBeep]; + quartzEnableKeyEquivalents = [Preferences enableKeyEquivalents]; + + // quartzRootless has already been set + if (quartzRootless) { + // Use PseudoramiX instead of Xinerama + noPanoramiXExtension = TRUE; + noPseudoramiXExtension = ![Preferences xinerama]; + + quartzUseAGL = [Preferences useAGL]; + } else { + noPanoramiXExtension = ![Preferences xinerama]; + noPseudoramiXExtension = TRUE; + + // Full screen can't use AGL for GLX + quartzUseAGL = FALSE; + } + + if ([Preferences useKeymapFile]) { + fileString = (char *) [[Preferences keymapFile] lossyCString]; + darwinKeymapFile = (char *) malloc(strlen(fileString)+1); + if (! darwinKeymapFile) + FatalError("malloc failed in QuartzReadPreferences()!\n"); + strcpy(darwinKeymapFile, fileString); + } + + display = (char *) malloc(8); + if (! display) + FatalError("malloc failed in QuartzReadPreferences()!\n"); + snprintf(display, 8, "%i", [Preferences display]); + + darwinDesiredDepth = [Preferences depth] - 1; +} + + +/* + * QuartzWriteCocoaPasteboard + * Write text to the Mac OS X pasteboard. + */ +void QuartzWriteCocoaPasteboard( + char *text) +{ + NSPasteboard *pasteboard; + NSArray *pasteboardTypes; + NSString *string; + + if (! text) return; + pasteboard = [NSPasteboard generalPasteboard]; + if (! pasteboard) return; + string = [NSString stringWithCString:text]; + if (! string) return; + pasteboardTypes = [NSArray arrayWithObject:NSStringPboardType]; + + // nil owner because we don't provide type translations + [pasteboard declareTypes:pasteboardTypes owner:nil]; + [pasteboard setString:string forType:NSStringPboardType]; +} + + +/* + * QuartzReadCocoaPasteboard + * Read text from the Mac OS X pasteboard and return it as a heap string. + * The caller must free the string. + */ +char *QuartzReadCocoaPasteboard(void) +{ + NSPasteboard *pasteboard; + NSArray *pasteboardTypes; + NSString *existingType; + char *text = NULL; + + pasteboardTypes = [NSArray arrayWithObject:NSStringPboardType]; + pasteboard = [NSPasteboard generalPasteboard]; + if (! pasteboard) return NULL; + + existingType = [pasteboard availableTypeFromArray:pasteboardTypes]; + if (existingType) { + NSString *string = [pasteboard stringForType:existingType]; + char *buffer; + + if (! string) return NULL; + buffer = (char *) [string lossyCString]; + text = (char *) malloc(strlen(buffer)+1); + if (text) + strcpy(text, buffer); + } + + return text; +} + + +/* + * QuartzFSUseQDCursor + * Return whether the screen should use a QuickDraw cursor. + */ +int QuartzFSUseQDCursor( + int depth) // screen depth +{ + switch ([Preferences useQDCursor]) { + case qdCursor_Always: + return TRUE; + case qdCursor_Never: + return FALSE; + case qdCursor_Not8Bit: + if (depth > 8) + return TRUE; + else + return FALSE; + } + return TRUE; +} + + +/* + * QuartzBlockHandler + * Clean out any autoreleased objects. + */ +void QuartzBlockHandler( + void *blockData, + void *pTimeout, + void *pReadmask) +{ + static NSAutoreleasePool *aPool = nil; + + [aPool release]; + aPool = [[NSAutoreleasePool alloc] init]; +} + + +/* + * QuartzWakeupHandler + */ +void QuartzWakeupHandler( + void *blockData, + int result, + void *pReadmask) +{ + // nothing here +} diff --git a/xorg-server-1.4/hw/darwin/quartz/quartzCommon.h b/xorg-server-1.4/hw/darwin/quartz/quartzCommon.h new file mode 100644 index 0000000..f5dff66 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/quartzCommon.h @@ -0,0 +1,106 @@ +/* + * quartzCommon.h + * + * Common definitions used internally by all Quartz modes + * + * This file should be included before any X11 or IOKit headers + * so that it can avoid symbol conflicts. + * + * Copyright (c) 2001-2004 Torrey T. Lyons and Greg Parker. + * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#ifndef _QUARTZCOMMON_H +#define _QUARTZCOMMON_H + +// QuickDraw in ApplicationServices has the following conflicts with +// the basic X server headers. Use QD_ to use the QuickDraw +// definition of any of these symbols, or the normal name for the +// X11 definition. +#define Cursor QD_Cursor +#define WindowPtr QD_WindowPtr +#define Picture QD_Picture +#include +#undef Cursor +#undef WindowPtr +#undef Picture + +// Quartz specific per screen storage structure +typedef struct { + // List of CoreGraphics displays that this X11 screen covers. + // This is more than one CG display for video mirroring and + // rootless PseudoramiX mode. + // No CG display will be covered by more than one X11 screen. + int displayCount; + CGDirectDisplayID *displayIDs; +} QuartzScreenRec, *QuartzScreenPtr; + +#define QUARTZ_PRIV(pScreen) \ + ((QuartzScreenPtr)pScreen->devPrivates[quartzScreenIndex].ptr) + +// Data stored at startup for Cocoa front end +extern int quartzEventWriteFD; +extern int quartzStartClients; + +// User preferences used by Quartz modes +extern int quartzRootless; +extern int quartzUseSysBeep; +extern int quartzUseAGL; +extern int quartzEnableKeyEquivalents; + +// Other shared data +extern int quartzServerVisible; +extern int quartzServerQuitting; +extern int quartzScreenIndex; +extern int aquaMenuBarHeight; + +// Name of GLX bundle for native OpenGL +extern const char *quartzOpenGLBundle; + +void QuartzReadPreferences(void); +void QuartzMessageMainThread(unsigned msg, void *data, unsigned length); +void QuartzMessageServerThread(int type, int argc, ...); +void QuartzSetWindowMenu(int nitems, const char **items, + const char *shortcuts); +void QuartzFSCapture(void); +void QuartzFSRelease(void); +int QuartzFSUseQDCursor(int depth); +void QuartzBlockHandler(void *blockData, void *pTimeout, void *pReadmask); +void QuartzWakeupHandler(void *blockData, int result, void *pReadmask); + +// Messages that can be sent to the main thread. +enum { + kQuartzServerHidden, + kQuartzServerStarted, + kQuartzServerDied, + kQuartzCursorUpdate, + kQuartzPostEvent, + kQuartzSetWindowMenu, + kQuartzSetWindowMenuCheck, + kQuartzSetFrontProcess, + kQuartzSetCanQuit +}; + +#endif /* _QUARTZCOMMON_H */ diff --git a/xorg-server-1.4/hw/darwin/quartz/quartzCursor.c b/xorg-server-1.4/hw/darwin/quartz/quartzCursor.c new file mode 100644 index 0000000..6ed6a76 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/quartzCursor.c @@ -0,0 +1,657 @@ +/************************************************************** + * + * Support for using the Quartz Window Manager cursor + * + **************************************************************/ +/* + * Copyright (c) 2001-2003 Torrey T. Lyons and Greg Parker. + * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "quartzCommon.h" +#include "quartzCursor.h" +#include "darwin.h" + +#include + +#include "mi.h" +#include "scrnintstr.h" +#include "cursorstr.h" +#include "mipointrst.h" +#include "globals.h" + +// Size of the QuickDraw cursor +#define CURSORWIDTH 16 +#define CURSORHEIGHT 16 + +typedef struct { + int qdCursorMode; + int qdCursorVisible; + int useQDCursor; + QueryBestSizeProcPtr QueryBestSize; + miPointerSpriteFuncPtr spriteFuncs; +} QuartzCursorScreenRec, *QuartzCursorScreenPtr; + +static int darwinCursorScreenIndex = -1; +static unsigned long darwinCursorGeneration = 0; +static CursorPtr quartzLatentCursor = NULL; +static QD_Cursor gQDArrow; // QuickDraw arrow cursor + +// Cursor for the main thread to set (NULL = arrow cursor). +static CCrsrHandle currentCursor = NULL; +static pthread_mutex_t cursorMutex; +static pthread_cond_t cursorCondition; + +#define CURSOR_PRIV(pScreen) \ + ((QuartzCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr) + +#define HIDE_QD_CURSOR(pScreen, visible) \ + if (visible) { \ + int ix; \ + for (ix = 0; ix < QUARTZ_PRIV(pScreen)->displayCount; ix++) { \ + CGDisplayHideCursor(QUARTZ_PRIV(pScreen)->displayIDs[ix]); \ + } \ + visible = FALSE; \ + } ((void)0) + +#define SHOW_QD_CURSOR(pScreen, visible) \ + { \ + int ix; \ + for (ix = 0; ix < QUARTZ_PRIV(pScreen)->displayCount; ix++) { \ + CGDisplayShowCursor(QUARTZ_PRIV(pScreen)->displayIDs[ix]); \ + } \ + visible = TRUE; \ + } ((void)0) + +#define CHANGE_QD_CURSOR(cursorH) \ + if (!quartzServerQuitting) { \ + /* Acquire lock and tell the main thread to change cursor */ \ + pthread_mutex_lock(&cursorMutex); \ + currentCursor = (CCrsrHandle) (cursorH); \ +#ifndef INXQUARTZ + QuartzMessageMainThread(kQuartzCursorUpdate, NULL, 0); \ +#endif + \ + /* Wait for the main thread to change the cursor */ \ + pthread_cond_wait(&cursorCondition, &cursorMutex); \ + pthread_mutex_unlock(&cursorMutex); \ + } ((void)0) + + +/* + * MakeQDCursor helpers: CTAB_ENTER, interleave + */ + +// Add a color entry to a ctab +#define CTAB_ENTER(ctab, index, r, g, b) \ + ctab->ctTable[index].value = index; \ + ctab->ctTable[index].rgb.red = r; \ + ctab->ctTable[index].rgb.green = g; \ + ctab->ctTable[index].rgb.blue = b + +// Make an unsigned short by interleaving the bits of bytes c1 and c2. +// High bit of c1 is first; low bit of c2 is last. +// Interleave is a built-in INTERCAL operator. +static unsigned short +interleave( + unsigned char c1, + unsigned char c2 ) +{ + return + ((c1 & 0x80) << 8) | ((c2 & 0x80) << 7) | + ((c1 & 0x40) << 7) | ((c2 & 0x40) << 6) | + ((c1 & 0x20) << 6) | ((c2 & 0x20) << 5) | + ((c1 & 0x10) << 5) | ((c2 & 0x10) << 4) | + ((c1 & 0x08) << 4) | ((c2 & 0x08) << 3) | + ((c1 & 0x04) << 3) | ((c2 & 0x04) << 2) | + ((c1 & 0x02) << 2) | ((c2 & 0x02) << 1) | + ((c1 & 0x01) << 1) | ((c2 & 0x01) << 0) ; +} + +/* + * MakeQDCursor + * Make a QuickDraw color cursor from the given X11 cursor. + * Warning: This code is nasty. Color cursors were meant to be read + * from resources; constructing the structures programmatically is messy. + */ +/* + QuickDraw cursor representation: + Our color cursor is a 2 bit per pixel pixmap. + Each pixel's bits are (source<<1 | mask) from the original X cursor pixel. + The cursor's color table maps the colors like this: + (2-bit value | X result | colortable | Mac result) + 00 | transparent | white | transparent (white outside mask) + 01 | back color | back color | back color + 10 | undefined | black | invert background (just for fun) + 11 | fore color | fore color | fore color +*/ +static CCrsrHandle +MakeQDCursor( + CursorPtr pCursor ) +{ + CCrsrHandle result; + CCrsrPtr curs; + int i, w, h; + unsigned short rowMask; + PixMap *pix; + ColorTable *ctab; + unsigned short *image; + + result = (CCrsrHandle) NewHandleClear(sizeof(CCrsr)); + if (!result) return NULL; + HLock((Handle)result); + curs = *result; + + // Initialize CCrsr + curs->crsrType = 0x8001; // 0x8000 = b&w, 0x8001 = color + curs->crsrMap = (PixMapHandle) NewHandleClear(sizeof(PixMap)); + if (!curs->crsrMap) goto pixAllocFailed; + HLock((Handle)curs->crsrMap); + pix = *curs->crsrMap; + curs->crsrData = NULL; // raw cursor image data (set below) + curs->crsrXData = NULL; // QD's processed data + curs->crsrXValid = 0; // zero means QD must re-process cursor data + curs->crsrXHandle = NULL; // reserved + memset(curs->crsr1Data, 0, CURSORWIDTH*CURSORHEIGHT/8); // b&w data + memset(curs->crsrMask, 0, CURSORWIDTH*CURSORHEIGHT/8); // b&w & color mask + curs->crsrHotSpot.h = min(CURSORWIDTH, pCursor->bits->xhot); // hot spot + curs->crsrHotSpot.v = min(CURSORHEIGHT, pCursor->bits->yhot); // hot spot + curs->crsrXTable = 0; // reserved + curs->crsrID = GetCTSeed(); // unique ID from Color Manager + + // Set the b&w data and mask + w = min(pCursor->bits->width, CURSORWIDTH); + h = min(pCursor->bits->height, CURSORHEIGHT); + rowMask = ~((1 << (CURSORWIDTH - w)) - 1); + for (i = 0; i < h; i++) { + curs->crsr1Data[i] = rowMask & + ((pCursor->bits->source[i*4]<<8) | pCursor->bits->source[i*4+1]); + curs->crsrMask[i] = rowMask & + ((pCursor->bits->mask[i*4]<<8) | pCursor->bits->mask[i*4+1]); + } + + // Set the color data and mask + // crsrMap: defines bit depth and size and colortable only + pix->rowBytes = (CURSORWIDTH * 2 / 8) | 0x8000; // last bit on means PixMap + SetRect(&pix->bounds, 0, 0, CURSORWIDTH, CURSORHEIGHT); // see TN 1020 + pix->pixelSize = 2; + pix->cmpCount = 1; + pix->cmpSize = 2; + // pix->pmTable set below + + // crsrData is the pixel data. crsrMap's baseAddr is not used. + curs->crsrData = NewHandleClear(CURSORWIDTH*CURSORHEIGHT * 2 / 8); + if (!curs->crsrData) goto imageAllocFailed; + HLock((Handle)curs->crsrData); + image = (unsigned short *) *curs->crsrData; + // Pixel data is just 1-bit data and mask interleaved (see above) + for (i = 0; i < h; i++) { + unsigned char s, m; + s = pCursor->bits->source[i*4] & (rowMask >> 8); + m = pCursor->bits->mask[i*4] & (rowMask >> 8); + image[2*i] = interleave(s, m); + s = pCursor->bits->source[i*4+1] & (rowMask & 0x00ff); + m = pCursor->bits->mask[i*4+1] & (rowMask & 0x00ff); + image[2*i+1] = interleave(s, m); + } + + // Build the color table (entries described above) + // NewPixMap allocates a color table handle. + pix->pmTable = (CTabHandle) NewHandleClear(sizeof(ColorTable) + 3 + * sizeof(ColorSpec)); + if (!pix->pmTable) goto ctabAllocFailed; + HLock((Handle)pix->pmTable); + ctab = *pix->pmTable; + ctab->ctSeed = GetCTSeed(); + ctab->ctFlags = 0; + ctab->ctSize = 3; // color count - 1 + CTAB_ENTER(ctab, 0, 0xffff, 0xffff, 0xffff); + CTAB_ENTER(ctab, 1, pCursor->backRed, pCursor->backGreen, + pCursor->backBlue); + CTAB_ENTER(ctab, 2, 0x0000, 0x0000, 0x0000); + CTAB_ENTER(ctab, 3, pCursor->foreRed, pCursor->foreGreen, + pCursor->foreBlue); + + HUnlock((Handle)pix->pmTable); // ctab + HUnlock((Handle)curs->crsrData); // image data + HUnlock((Handle)curs->crsrMap); // pix + HUnlock((Handle)result); // cursor + + return result; + + // "What we have here is a failure to allocate" +ctabAllocFailed: + HUnlock((Handle)curs->crsrData); + DisposeHandle((Handle)curs->crsrData); +imageAllocFailed: + HUnlock((Handle)curs->crsrMap); + DisposeHandle((Handle)curs->crsrMap); +pixAllocFailed: + HUnlock((Handle)result); + DisposeHandle((Handle)result); + return NULL; +} + + +/* + * FreeQDCursor + * Destroy a QuickDraw color cursor created with MakeQDCursor(). + * The cursor must not currently be on screen. + */ +static void FreeQDCursor(CCrsrHandle cursHandle) +{ + CCrsrPtr curs; + PixMap *pix; + + HLock((Handle)cursHandle); + curs = *cursHandle; + HLock((Handle)curs->crsrMap); + pix = *curs->crsrMap; + DisposeHandle((Handle)pix->pmTable); + HUnlock((Handle)curs->crsrMap); + DisposeHandle((Handle)curs->crsrMap); + DisposeHandle((Handle)curs->crsrData); + HUnlock((Handle)cursHandle); + DisposeHandle((Handle)cursHandle); +} + + +/* +=========================================================================== + + Pointer sprite functions + +=========================================================================== +*/ + +/* + * QuartzRealizeCursor + * Convert the X cursor representation to QuickDraw format if possible. + */ +Bool +QuartzRealizeCursor( + ScreenPtr pScreen, + CursorPtr pCursor ) +{ + CCrsrHandle qdCursor; + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + if(!pCursor || !pCursor->bits) + return FALSE; + + // if the cursor is too big we use a software cursor + if ((pCursor->bits->height > CURSORHEIGHT) || + (pCursor->bits->width > CURSORWIDTH) || !ScreenPriv->useQDCursor) + { + if (quartzRootless) { + // rootless can't use a software cursor + return TRUE; + } else { + return (*ScreenPriv->spriteFuncs->RealizeCursor) + (pScreen, pCursor); + } + } + + // make new cursor image + qdCursor = MakeQDCursor(pCursor); + if (!qdCursor) return FALSE; + + // save the result + pCursor->devPriv[pScreen->myNum] = (pointer) qdCursor; + + return TRUE; +} + + +/* + * QuartzUnrealizeCursor + * Free the storage space associated with a realized cursor. + */ +Bool +QuartzUnrealizeCursor( + ScreenPtr pScreen, + CursorPtr pCursor ) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + if ((pCursor->bits->height > CURSORHEIGHT) || + (pCursor->bits->width > CURSORWIDTH) || !ScreenPriv->useQDCursor) + { + if (quartzRootless) { + return TRUE; + } else { + return (*ScreenPriv->spriteFuncs->UnrealizeCursor) + (pScreen, pCursor); + } + } else { + CCrsrHandle oldCursor = (CCrsrHandle) pCursor->devPriv[pScreen->myNum]; + + if (currentCursor != oldCursor) { + // This should only fail when quitting, in which case we just leak. + FreeQDCursor(oldCursor); + } + pCursor->devPriv[pScreen->myNum] = NULL; + return TRUE; + } +} + + +/* + * QuartzSetCursor + * Set the cursor sprite and position. + * Use QuickDraw cursor if possible. + */ +static void +QuartzSetCursor( + ScreenPtr pScreen, + CursorPtr pCursor, + int x, + int y) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + quartzLatentCursor = pCursor; + + // Don't touch Mac OS cursor if X is hidden! + if (!quartzServerVisible) + return; + + if (!pCursor) { + // Remove the cursor completely. + HIDE_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); + if (! ScreenPriv->qdCursorMode) + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); + } + else if ((pCursor->bits->height <= CURSORHEIGHT) && + (pCursor->bits->width <= CURSORWIDTH) && ScreenPriv->useQDCursor) + { + // Cursor is small enough to use QuickDraw directly. + if (! ScreenPriv->qdCursorMode) // remove the X cursor + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); + ScreenPriv->qdCursorMode = TRUE; + + CHANGE_QD_CURSOR(pCursor->devPriv[pScreen->myNum]); + SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); + } + else if (quartzRootless) { + // Rootless can't use a software cursor, so we just use Mac OS arrow. + CHANGE_QD_CURSOR(NULL); + SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); + } + else { + // Cursor is too big for QuickDraw. Use X software cursor. + HIDE_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); + ScreenPriv->qdCursorMode = FALSE; + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, pCursor, x, y); + } +} + + +/* + * QuartzReallySetCursor + * Set the QuickDraw cursor. Called from the main thread since changing the + * cursor with QuickDraw is not thread safe on dual processor machines. + */ +void +QuartzReallySetCursor() +{ + pthread_mutex_lock(&cursorMutex); + + if (currentCursor) { + SetCCursor(currentCursor); + } else { + SetCursor(&gQDArrow); + } + + pthread_cond_signal(&cursorCondition); + pthread_mutex_unlock(&cursorMutex); +} + + +/* + * QuartzMoveCursor + * Move the cursor. This is a noop for QuickDraw. + */ +static void +QuartzMoveCursor( + ScreenPtr pScreen, + int x, + int y) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + // only the X cursor needs to be explicitly moved + if (!ScreenPriv->qdCursorMode) + (*ScreenPriv->spriteFuncs->MoveCursor)(pScreen, x, y); +} + + +static miPointerSpriteFuncRec quartzSpriteFuncsRec = { + QuartzRealizeCursor, + QuartzUnrealizeCursor, + QuartzSetCursor, + QuartzMoveCursor +}; + + +/* +=========================================================================== + + Pointer screen functions + +=========================================================================== +*/ + +/* + * QuartzCursorOffScreen + */ +static Bool QuartzCursorOffScreen(ScreenPtr *pScreen, int *x, int *y) +{ + return FALSE; +} + + +/* + * QuartzCrossScreen + */ +static void QuartzCrossScreen(ScreenPtr pScreen, Bool entering) +{ + return; +} + + +/* + * QuartzWarpCursor + * Change the cursor position without generating an event or motion history. + * The input coordinates (x,y) are in pScreen-local X11 coordinates. + * + */ +static void +QuartzWarpCursor( + ScreenPtr pScreen, + int x, + int y) +{ + static int neverMoved = TRUE; + + if (neverMoved) { + // Don't move the cursor the first time. This is the jump-to-center + // initialization, and it's annoying because we may still be in MacOS. + neverMoved = FALSE; + return; + } + + if (quartzServerVisible) { + CGDisplayErr cgErr; + CGPoint cgPoint; + // Only need to do this for one display. Any display will do. + CGDirectDisplayID cgID = QUARTZ_PRIV(pScreen)->displayIDs[0]; + CGRect cgRect = CGDisplayBounds(cgID); + + // Convert (x,y) to CoreGraphics screen-local CG coordinates. + // This is necessary because the X11 screen and CG screen may not + // coincide. (e.g. X11 screen may be moved to dodge the menu bar) + + // Make point in X11 global coordinates + cgPoint = CGPointMake(x + dixScreenOrigins[pScreen->myNum].x, + y + dixScreenOrigins[pScreen->myNum].y); + // Shift to CoreGraphics global screen coordinates + cgPoint.x += darwinMainScreenX; + cgPoint.y += darwinMainScreenY; + // Shift to CoreGraphics screen-local coordinates + cgPoint.x -= cgRect.origin.x; + cgPoint.y -= cgRect.origin.y; + + cgErr = CGDisplayMoveCursorToPoint(cgID, cgPoint); + if (cgErr != CGDisplayNoErr) { + ErrorF("Could not set cursor position with error code 0x%x.\n", + cgErr); + } + } + + miPointerWarpCursor(pScreen, x, y); + miPointerUpdate(); +} + + +static miPointerScreenFuncRec quartzScreenFuncsRec = { + QuartzCursorOffScreen, + QuartzCrossScreen, + QuartzWarpCursor, + DarwinEQPointerPost, + DarwinEQSwitchScreen +}; + + +/* +=========================================================================== + + Other screen functions + +=========================================================================== +*/ + +/* + * QuartzCursorQueryBestSize + * Handle queries for best cursor size + */ +static void +QuartzCursorQueryBestSize( + int class, + unsigned short *width, + unsigned short *height, + ScreenPtr pScreen) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + if (class == CursorShape) { + *width = CURSORWIDTH; + *height = CURSORHEIGHT; + } else { + (*ScreenPriv->QueryBestSize)(class, width, height, pScreen); + } +} + + +/* + * QuartzInitCursor + * Initialize cursor support + */ +Bool +QuartzInitCursor( + ScreenPtr pScreen ) +{ + QuartzCursorScreenPtr ScreenPriv; + miPointerScreenPtr PointPriv; + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + + // initialize software cursor handling (always needed as backup) + if (!miDCInitialize(pScreen, &quartzScreenFuncsRec)) { + return FALSE; + } + + // allocate private storage for this screen's QuickDraw cursor info + if (darwinCursorGeneration != serverGeneration) { + if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0) + return FALSE; + darwinCursorGeneration = serverGeneration; + } + + ScreenPriv = xcalloc( 1, sizeof(QuartzCursorScreenRec) ); + if (!ScreenPriv) return FALSE; + + CURSOR_PRIV(pScreen) = ScreenPriv; + + // override some screen procedures + ScreenPriv->QueryBestSize = pScreen->QueryBestSize; + pScreen->QueryBestSize = QuartzCursorQueryBestSize; + + // initialize QuickDraw cursor handling + GetQDGlobalsArrow(&gQDArrow); + PointPriv = (miPointerScreenPtr) + pScreen->devPrivates[miPointerScreenIndex].ptr; + + ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; + PointPriv->spriteFuncs = &quartzSpriteFuncsRec; + + if (!quartzRootless) + ScreenPriv->useQDCursor = QuartzFSUseQDCursor(dfb->colorBitsPerPixel); + else + ScreenPriv->useQDCursor = TRUE; + ScreenPriv->qdCursorMode = TRUE; + ScreenPriv->qdCursorVisible = TRUE; + + // initialize cursor mutex lock + pthread_mutex_init(&cursorMutex, NULL); + + // initialize condition for waiting + pthread_cond_init(&cursorCondition, NULL); + + return TRUE; +} + + +// X server is hiding. Restore the Aqua cursor. +void QuartzSuspendXCursor( + ScreenPtr pScreen ) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + CHANGE_QD_CURSOR(NULL); + SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); +} + + +// X server is showing. Restore the X cursor. +void QuartzResumeXCursor( + ScreenPtr pScreen, + int x, + int y ) +{ + QuartzSetCursor(pScreen, quartzLatentCursor, x, y); +} diff --git a/xorg-server-1.4/hw/darwin/quartz/quartzCursor.h b/xorg-server-1.4/hw/darwin/quartz/quartzCursor.h new file mode 100644 index 0000000..57fac68 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/quartzCursor.h @@ -0,0 +1,43 @@ +/* + * quartzCursor.h + * + * External interface for Quartz hardware cursor + */ +/* + * Copyright (c) 2001 Torrey T. Lyons and Greg Parker. + * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#ifndef QUARTZCURSOR_H +#define QUARTZCURSOR_H + +#include "screenint.h" + +Bool QuartzInitCursor(ScreenPtr pScreen); +void QuartzReallySetCursor(void); +void QuartzSuspendXCursor(ScreenPtr pScreen); +void QuartzResumeXCursor(ScreenPtr pScreen, int x, int y); + +#endif diff --git a/xorg-server-1.4/hw/darwin/quartz/quartzKeyboard.c b/xorg-server-1.4/hw/darwin/quartz/quartzKeyboard.c new file mode 100644 index 0000000..bdd5416 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/quartzKeyboard.c @@ -0,0 +1,389 @@ +/* + quartzKeyboard.c + + Code to build a keymap using the Carbon Keyboard Layout API, + which is supported on Mac OS X 10.2 and newer. + + Copyright (c) 2003 Apple Computer, 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 ABOVE LISTED COPYRIGHT + HOLDER(S) 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(s) of the above + 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. +*/ + +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "quartzCommon.h" + +#include +#include + +#include "darwinKeyboard.h" +#include "X11/keysym.h" +#include "keysym2ucs.h" + +#ifdef HAS_KL_API + +#define HACK_MISSING 1 +#define HACK_KEYPAD 1 + +enum { + MOD_COMMAND = 256, + MOD_SHIFT = 512, + MOD_OPTION = 2048, + MOD_CONTROL = 4096, +}; + +#define UKEYSYM(u) ((u) | 0x01000000) + +/* Table of keycode->keysym mappings we use to fallback on for important + keys that are often not in the Unicode mapping. */ + +const static struct { + unsigned short keycode; + KeySym keysym; +} known_keys[] = { + {55, XK_Meta_L}, + {56, XK_Shift_L}, + {57, XK_Caps_Lock}, + {58, XK_Alt_L}, + {59, XK_Control_L}, + + {60, XK_Shift_R}, + {61, XK_Alt_R}, + {62, XK_Control_R}, + {63, XK_Meta_R}, + + {122, XK_F1}, + {120, XK_F2}, + {99, XK_F3}, + {118, XK_F4}, + {96, XK_F5}, + {97, XK_F6}, + {98, XK_F7}, + {100, XK_F8}, + {101, XK_F9}, + {109, XK_F10}, + {103, XK_F11}, + {111, XK_F12}, + {105, XK_F13}, + {107, XK_F14}, + {113, XK_F15}, +}; + +/* Table of keycode->old,new-keysym mappings we use to fixup the numeric + keypad entries. */ + +const static struct { + unsigned short keycode; + KeySym normal, keypad; +} known_numeric_keys[] = { + {65, XK_period, XK_KP_Decimal}, + {67, XK_asterisk, XK_KP_Multiply}, + {69, XK_plus, XK_KP_Add}, + {75, XK_slash, XK_KP_Divide}, + {76, 0x01000003, XK_KP_Enter}, + {78, XK_minus, XK_KP_Subtract}, + {81, XK_equal, XK_KP_Equal}, + {82, XK_0, XK_KP_0}, + {83, XK_1, XK_KP_1}, + {84, XK_2, XK_KP_2}, + {85, XK_3, XK_KP_3}, + {86, XK_4, XK_KP_4}, + {87, XK_5, XK_KP_5}, + {88, XK_6, XK_KP_6}, + {89, XK_7, XK_KP_7}, + {91, XK_8, XK_KP_8}, + {92, XK_9, XK_KP_9}, +}; + +/* Table mapping normal keysyms to their dead equivalents. + FIXME: all the unicode keysyms (apart from circumflex) were guessed. */ + +const static struct { + KeySym normal, dead; +} dead_keys[] = { + {XK_grave, XK_dead_grave}, + {XK_acute, XK_dead_acute}, + {XK_asciicircum, XK_dead_circumflex}, + {UKEYSYM (0x2c6), XK_dead_circumflex}, /* MODIFIER LETTER CIRCUMFLEX ACCENT */ + {XK_asciitilde, XK_dead_tilde}, + {UKEYSYM (0x2dc), XK_dead_tilde}, /* SMALL TILDE */ + {XK_macron, XK_dead_macron}, + {XK_breve, XK_dead_breve}, + {XK_abovedot, XK_dead_abovedot}, + {XK_diaeresis, XK_dead_diaeresis}, + {UKEYSYM (0x2da), XK_dead_abovering}, /* DOT ABOVE */ + {XK_doubleacute, XK_dead_doubleacute}, + {XK_caron, XK_dead_caron}, + {XK_cedilla, XK_dead_cedilla}, + {XK_ogonek, XK_dead_ogonek}, + {UKEYSYM (0x269), XK_dead_iota}, /* LATIN SMALL LETTER IOTA */ + {UKEYSYM (0x2ec), XK_dead_voiced_sound}, /* MODIFIER LETTER VOICING */ +/* {XK_semivoiced_sound, XK_dead_semivoiced_sound}, */ + {UKEYSYM (0x323), XK_dead_belowdot}, /* COMBINING DOT BELOW */ + {UKEYSYM (0x309), XK_dead_hook}, /* COMBINING HOOK ABOVE */ + {UKEYSYM (0x31b), XK_dead_horn}, /* COMBINING HORN */ +}; + +unsigned int +DarwinModeSystemKeymapSeed (void) +{ + static unsigned int seed; + + static KeyboardLayoutRef last_key_layout; + KeyboardLayoutRef key_layout; + + KLGetCurrentKeyboardLayout (&key_layout); + + if (key_layout != last_key_layout) + seed++; + + last_key_layout = key_layout; + + return seed; +} + +static inline UniChar +macroman2ucs (unsigned char c) +{ + /* Precalculated table mapping MacRoman-128 to Unicode. Generated + by creating single element CFStringRefs then extracting the + first character. */ + + static const unsigned short table[128] = { + 0xc4, 0xc5, 0xc7, 0xc9, 0xd1, 0xd6, 0xdc, 0xe1, + 0xe0, 0xe2, 0xe4, 0xe3, 0xe5, 0xe7, 0xe9, 0xe8, + 0xea, 0xeb, 0xed, 0xec, 0xee, 0xef, 0xf1, 0xf3, + 0xf2, 0xf4, 0xf6, 0xf5, 0xfa, 0xf9, 0xfb, 0xfc, + 0x2020, 0xb0, 0xa2, 0xa3, 0xa7, 0x2022, 0xb6, 0xdf, + 0xae, 0xa9, 0x2122, 0xb4, 0xa8, 0x2260, 0xc6, 0xd8, + 0x221e, 0xb1, 0x2264, 0x2265, 0xa5, 0xb5, 0x2202, 0x2211, + 0x220f, 0x3c0, 0x222b, 0xaa, 0xba, 0x3a9, 0xe6, 0xf8, + 0xbf, 0xa1, 0xac, 0x221a, 0x192, 0x2248, 0x2206, 0xab, + 0xbb, 0x2026, 0xa0, 0xc0, 0xc3, 0xd5, 0x152, 0x153, + 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0xf7, 0x25ca, + 0xff, 0x178, 0x2044, 0x20ac, 0x2039, 0x203a, 0xfb01, 0xfb02, + 0x2021, 0xb7, 0x201a, 0x201e, 0x2030, 0xc2, 0xca, 0xc1, + 0xcb, 0xc8, 0xcd, 0xce, 0xcf, 0xcc, 0xd3, 0xd4, + 0xf8ff, 0xd2, 0xda, 0xdb, 0xd9, 0x131, 0x2c6, 0x2dc, + 0xaf, 0x2d8, 0x2d9, 0x2da, 0xb8, 0x2dd, 0x2db, 0x2c7, + }; + + if (c < 128) + return c; + else + return table[c - 128]; +} + +static KeySym +make_dead_key (KeySym in) +{ + int i; + + for (i = 0; i < sizeof (dead_keys) / sizeof (dead_keys[0]); i++) + { + if (dead_keys[i].normal == in) + return dead_keys[i].dead; + } + + return in; +} + +Bool +DarwinModeReadSystemKeymap (darwinKeyboardInfo *info) +{ + KeyboardLayoutRef key_layout; + const void *chr_data; + int num_keycodes = NUM_KEYCODES; + UInt32 keyboard_type = 0; + int is_uchr, i, j; + OSStatus err; + KeySym *k; + + KLGetCurrentKeyboardLayout (&key_layout); + KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data); + + if (chr_data != NULL) + { + is_uchr = 1; + keyboard_type = LMGetKbdType (); + } + else + { + KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data); + + if (chr_data == NULL) + { + ErrorF ( "Couldn't get uchr or kchr resource\n"); + return FALSE; + } + + is_uchr = 0; + num_keycodes = 128; + } + + + /* Scan the keycode range for the Unicode character that each + key produces in the four shift states. Then convert that to + an X11 keysym (which may just the bit that says "this is + Unicode" if it can't find the real symbol.) */ + + for (i = 0; i < num_keycodes; i++) + { + static const int mods[4] = {0, MOD_SHIFT, MOD_OPTION, + MOD_OPTION | MOD_SHIFT}; + + k = info->keyMap + i * GLYPHS_PER_KEY; + + for (j = 0; j < 4; j++) + { + if (is_uchr) + { + UniChar s[8]; + UniCharCount len; + UInt32 dead_key_state, extra_dead; + + dead_key_state = 0; + err = UCKeyTranslate (chr_data, i, kUCKeyActionDown, + mods[j] >> 8, keyboard_type, 0, + &dead_key_state, 8, &len, s); + if (err != noErr) + continue; + + if (len == 0 && dead_key_state != 0) + { + /* Found a dead key. Work out which one it is, but + remembering that it's dead. */ + + extra_dead = 0; + err = UCKeyTranslate (chr_data, i, kUCKeyActionDown, + mods[j] >> 8, keyboard_type, + kUCKeyTranslateNoDeadKeysMask, + &extra_dead, 8, &len, s); + if (err != noErr) + continue; + } + + if (len > 0 && s[0] != 0x0010) + { + k[j] = ucs2keysym (s[0]); + + if (dead_key_state != 0) + k[j] = make_dead_key (k[j]); + } + } + else + { + UInt32 c, state = 0; + UInt16 code; + + code = i | mods[j]; + c = KeyTranslate (chr_data, code, &state); + + /* Dead keys are only processed on key-down, so ask + to translate those events. When we find a dead key, + translating the matching key up event will give + us the actual dead character. */ + + if (state != 0) + { + UInt32 state2 = 0; + c = KeyTranslate (chr_data, code | 128, &state2); + } + + /* Characters seem to be in MacRoman encoding. */ + + if (c != 0 && c != 0x0010) + { + k[j] = ucs2keysym (macroman2ucs (c & 255)); + + if (state != 0) + k[j] = make_dead_key (k[j]); + } + } + } + + if (k[3] == k[2]) + k[3] = NoSymbol; + if (k[2] == k[1]) + k[2] = NoSymbol; + if (k[1] == k[0]) + k[1] = NoSymbol; + if (k[0] == k[2] && k[1] == k[3]) + k[2] = k[3] = NoSymbol; + } + + /* Fix up some things that are normally missing.. */ + + if (HACK_MISSING) + { + for (i = 0; i < sizeof (known_keys) / sizeof (known_keys[0]); i++) + { + k = info->keyMap + known_keys[i].keycode * GLYPHS_PER_KEY; + + if (k[0] == NoSymbol && k[1] == NoSymbol + && k[2] == NoSymbol && k[3] == NoSymbol) + { + k[0] = known_keys[i].keysym; + } + } + } + + /* And some more things. We find the right symbols for the numeric + keypad, but not the KP_ keysyms. So try to convert known keycodes. */ + + if (HACK_KEYPAD) + { + for (i = 0; i < sizeof (known_numeric_keys) + / sizeof (known_numeric_keys[0]); i++) + { + k = info->keyMap + known_numeric_keys[i].keycode * GLYPHS_PER_KEY; + + if (k[0] == known_numeric_keys[i].normal) + { + k[0] = known_numeric_keys[i].keypad; + } + } + } + + return TRUE; +} + +#else /* !HAS_KL_API */ + +unsigned int +DarwinModeSystemKeymapSeed (void) +{ + return 0; +} + +Bool +DarwinModeReadSystemKeymap (darwinKeyboardInfo *info) +{ + return FALSE; +} + +#endif /* HAS_KL_API */ diff --git a/xorg-server-1.4/hw/darwin/quartz/quartzPasteboard.c b/xorg-server-1.4/hw/darwin/quartz/quartzPasteboard.c new file mode 100644 index 0000000..a3536fc --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/quartzPasteboard.c @@ -0,0 +1,152 @@ +/************************************************************** + * quartzPasteboard.c + * + * Aqua pasteboard <-> X cut buffer + * Greg Parker gparker@cs.stanford.edu March 8, 2001 + **************************************************************/ +/* + * Copyright (c) 2001 Greg Parker. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "quartzPasteboard.h" + +#include +#include "windowstr.h" +#include "propertyst.h" +#include "scrnintstr.h" +#include "selection.h" +#include "globals.h" + +extern Selection *CurrentSelections; +extern int NumCurrentSelections; + + +// Helper function to read the X11 cut buffer +// FIXME: What about multiple screens? Currently, this reads the first +// CUT_BUFFER0 from the first screen where the buffer content is a string. +// Returns a string on the heap that the caller must free. +// Returns NULL if there is no cut text or there is not enough memory. +static char * QuartzReadCutBuffer(void) +{ + int i; + char *text = NULL; + + for (i = 0; i < screenInfo.numScreens; i++) { + ScreenPtr pScreen = screenInfo.screens[i]; + PropertyPtr pProp; + + pProp = wUserProps (WindowTable[pScreen->myNum]); + while (pProp && pProp->propertyName != XA_CUT_BUFFER0) { + pProp = pProp->next; + } + if (! pProp) continue; + if (pProp->type != XA_STRING) continue; + if (pProp->format != 8) continue; + + text = xalloc(1 + pProp->size); + if (! text) continue; + memcpy(text, pProp->data, pProp->size); + text[pProp->size] = '\0'; + return text; + } + + // didn't find any text + return NULL; +} + +// Write X cut buffer to Mac OS X pasteboard +// Called by ProcessInputEvents() in response to request from X server thread. +void QuartzWritePasteboard(void) +{ + char *text; + text = QuartzReadCutBuffer(); + if (text) { + QuartzWriteCocoaPasteboard(text); + free(text); + } +} + +#define strequal(a, b) (0 == strcmp((a), (b))) + +// Read Mac OS X pasteboard into X cut buffer +// Called by ProcessInputEvents() in response to request from X server thread. +void QuartzReadPasteboard(void) +{ + char *oldText = QuartzReadCutBuffer(); + char *text = QuartzReadCocoaPasteboard(); + + // Compare text with current cut buffer contents. + // Change the buffer if both exist and are different + // OR if there is new text but no old text. + // Otherwise, don't clear the selection unnecessarily. + + if ((text && oldText && !strequal(text, oldText)) || + (text && !oldText)) { + int scrn, sel; + + for (scrn = 0; scrn < screenInfo.numScreens; scrn++) { + ScreenPtr pScreen = screenInfo.screens[scrn]; + // Set the cut buffers on each screen + // fixme really on each screen? + ChangeWindowProperty(WindowTable[pScreen->myNum], XA_CUT_BUFFER0, + XA_STRING, 8, PropModeReplace, + strlen(text), (pointer)text, TRUE); + } + + // Undo any current X selection (similar to code in dispatch.c) + // FIXME: what about secondary selection? + // FIXME: only touch first XA_PRIMARY selection? + sel = 0; + while ((sel < NumCurrentSelections) && + CurrentSelections[sel].selection != XA_PRIMARY) + sel++; + if (sel < NumCurrentSelections) { + // Notify client if necessary + if (CurrentSelections[sel].client) { + xEvent event; + + event.u.u.type = SelectionClear; + event.u.selectionClear.time = GetTimeInMillis(); + event.u.selectionClear.window = CurrentSelections[sel].window; + event.u.selectionClear.atom = CurrentSelections[sel].selection; + TryClientEvents(CurrentSelections[sel].client, &event, 1, + NoEventMask, NoEventMask /*CantBeFiltered*/, + NullGrab); + } + + // Erase it + // FIXME: need to erase .selection too? dispatch.c doesn't + CurrentSelections[sel].pWin = NullWindow; + CurrentSelections[sel].window = None; + CurrentSelections[sel].client = NullClient; + } + } + + if (text) free(text); + if (oldText) free(oldText); +} diff --git a/xorg-server-1.4/hw/darwin/quartz/quartzPasteboard.h b/xorg-server-1.4/hw/darwin/quartz/quartzPasteboard.h new file mode 100644 index 0000000..afcb6e5 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/quartzPasteboard.h @@ -0,0 +1,44 @@ +/* + QuartzPasteboard.h + + Mac OS X pasteboard <-> X cut buffer + Greg Parker gparker@cs.stanford.edu March 8, 2001 +*/ +/* + * Copyright (c) 2001 Greg Parker. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#ifndef _QUARTZPASTEBOARD_H +#define _QUARTZPASTEBOARD_H + +// Aqua->X +void QuartzReadPasteboard(); +char * QuartzReadCocoaPasteboard(void); // caller must free string + +// X->Aqua +void QuartzWritePasteboard(); +void QuartzWriteCocoaPasteboard(char *text); + +#endif /* _QUARTZPASTEBOARD_H */ diff --git a/xorg-server-1.4/hw/darwin/quartz/quartzStartup.c b/xorg-server-1.4/hw/darwin/quartz/quartzStartup.c new file mode 100644 index 0000000..76392e4 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/quartzStartup.c @@ -0,0 +1,353 @@ +/************************************************************** + * + * Startup code for the Quartz Darwin X Server + * + **************************************************************/ +/* + * Copyright (c) 2001-2004 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ + +#include +#include +#include +#include "quartzCommon.h" +#include "darwin.h" +#include "quartz.h" +#include "opaque.h" +#include "micmap.h" +#include + +char **envpGlobal; // argcGlobal and argvGlobal + // are from dix/globals.c + +#ifdef INXQUARTZ +void X11ControllerMain(int argc, char *argv[], void (*server_thread) (void *), void *server_arg); +# ifdef GLXEXT +void GlxExtensionInit(void); +void GlxWrapInitVisuals(miInitVisualsProcPtr *); +# endif + +static void server_thread (void *arg) { + extern int main (int argc, char **argv, char **envp); + exit (main (argcGlobal, argvGlobal, envpGlobal)); +} +#else +int NSApplicationMain(int argc, char *argv[]); +typedef Bool (*QuartzModeBundleInitPtr)(void); + +# ifdef GLXEXT +// GLX bundle function pointers +typedef void (*GlxExtensionInitPtr)(void); +static GlxExtensionInitPtr GlxExtensionInit = NULL; +typedef void (*GlxWrapInitVisualsPtr)(miInitVisualsProcPtr *); +static GlxWrapInitVisualsPtr GlxWrapInitVisuals = NULL; +void * __DarwinglXMesaProvider = NULL; +typedef void (*GlxPushProviderPtr)(void *); +GlxPushProviderPtr GlxPushProvider = NULL; +# endif +#endif + +/* + * DarwinHandleGUI + * This function is called first from main(). The first time + * it is called we start the Mac OS X front end. The front end + * will call main() again from another thread to run the X + * server. On the second call this function loads the user + * preferences set by the Mac OS X front end. + */ +void DarwinHandleGUI( + int argc, + char *argv[], + char *envp[] ) +{ + static Bool been_here = FALSE; + int main_exit, i; + int fd[2]; + + if (been_here) { +#ifdef INXDARWINAPP + QuartzReadPreferences(); +#endif + return; + } + been_here = TRUE; + + // Make a pipe to pass events + assert( pipe(fd) == 0 ); + darwinEventReadFD = fd[0]; + darwinEventWriteFD = fd[1]; + fcntl(darwinEventReadFD, F_SETFL, O_NONBLOCK); + + // Store command line arguments to pass back to main() + argcGlobal = argc; + argvGlobal = argv; + envpGlobal = envp; + + quartzStartClients = 1; + for (i = 1; i < argc; i++) { + // Display version info without starting Mac OS X UI if requested + if (!strcmp( argv[i], "-showconfig" ) || !strcmp( argv[i], "-version" )) { + DarwinPrintBanner(); + exit(0); + } + + // Determine if we need to start X clients + // and what display mode to use + if (!strcmp(argv[i], "-nostartx")) { + quartzStartClients = 0; + } else if (!strcmp( argv[i], "-fullscreen")) { + quartzRootless = 0; + } else if (!strcmp( argv[i], "-rootless")) { + quartzRootless = 1; + } + } + +#ifdef INXQUARTZ + /* Initially I ran the X server on the main thread, and received + events on the second thread. But now we may be using Carbon, + that needs to run on the main thread. (Otherwise, when it's + prebound, it will initialize itself on the wrong thread) + + grr.. but doing that means that if the X thread gets scheduled + before the main thread when we're _not_ prebound, things fail, + so initialize by hand. */ + extern void _InitHLTB(void); + + _InitHLTB(); + + X11ControllerMain(argc, argv, server_thread, NULL); +#else + main_exit = NSApplicationMain(argc, argv); +#endif + exit(main_exit); +} + +#ifndef INXQUARTZ +/* + * QuartzLoadDisplayBundle + * Try to load the appropriate bundle containing the back end display code. + */ +Bool QuartzLoadDisplayBundle( + const char *dpyBundleName) +{ + CFBundleRef mainBundle; + CFStringRef bundleName; + CFURLRef bundleURL; + CFBundleRef dpyBundle; + QuartzModeBundleInitPtr bundleInit; + + // Get the main bundle for the application + mainBundle = CFBundleGetMainBundle(); + + // Make CFString from bundle name + bundleName = CFStringCreateWithCStringNoCopy(kCFAllocatorDefault, + dpyBundleName, + kCFStringEncodingASCII, + kCFAllocatorNull); + + // Look for the appropriate bundle in the main bundle + bundleURL = CFBundleCopyResourceURL(mainBundle, bundleName, + NULL, NULL); + if (!bundleURL) { + ErrorF("Could not find display mode bundle %s.\n", dpyBundleName); + return FALSE; + } + + // Make a bundle instance using the URLRef + dpyBundle = CFBundleCreate(kCFAllocatorDefault, bundleURL); + + if (!CFBundleLoadExecutable(dpyBundle)) { + ErrorF("Could not load display mode bundle %s.\n", dpyBundleName); + return FALSE; + } + + // Lookup the bundle initialization function + bundleInit = (void *) + CFBundleGetFunctionPointerForName(dpyBundle, + CFSTR("QuartzModeBundleInit")); + if (!bundleInit) { + ErrorF("Could not initialize display mode bundle %s.\n", + dpyBundleName); + return FALSE; + } + if (!bundleInit()) + return FALSE; + + // Release the CF objects + CFRelease(bundleName); + CFRelease(bundleURL); + + return TRUE; +} + +#ifdef GLXEXT +/* + * LoadGlxBundle + * The Quartz mode X server needs to dynamically load the appropriate + * bundle before initializing GLX. + */ +static void LoadGlxBundle(void) +{ + CFBundleRef mainBundle; + CFStringRef bundleName; + CFURLRef bundleURL; + CFBundleRef glxBundle; + + // Get the main bundle for the application + mainBundle = CFBundleGetMainBundle(); + + // Choose the bundle to load + ErrorF("Loading GLX bundle "); + if (/*quartzUseAGL*/0) { + bundleName = CFStringCreateWithCStringNoCopy(kCFAllocatorDefault, + quartzOpenGLBundle, + kCFStringEncodingASCII, + kCFAllocatorNull); + ErrorF("%s (using Apple's OpenGL)\n", quartzOpenGLBundle); + } else { + bundleName = CFSTR("glxMesa.bundle"); + CFRetain(bundleName); // so we can release later + ErrorF("glxMesa.bundle (using Mesa)\n"); + } + + // Look for the appropriate GLX bundle in the main bundle by name + bundleURL = CFBundleCopyResourceURL(mainBundle, bundleName, + NULL, NULL); + if (!bundleURL) { + FatalError("Could not find GLX bundle."); + } + + // Make a bundle instance using the URLRef + glxBundle = CFBundleCreate(kCFAllocatorDefault, bundleURL); + + if (!CFBundleLoadExecutable(glxBundle)) { + FatalError("Could not load GLX bundle."); + } + + // Find the GLX init functions + + + __DarwinglXMesaProvider = (void *) CFBundleGetDataPointerForName( + glxBundle, CFSTR("__glXMesaProvider")); + + GlxPushProvider = (void *) CFBundleGetFunctionPointerForName( + glxBundle, CFSTR("GlxPushProvider")); + + GlxExtensionInit = (void *) CFBundleGetFunctionPointerForName( + glxBundle, CFSTR("GlxExtensionInit")); + + GlxWrapInitVisuals = (void *) CFBundleGetFunctionPointerForName( + glxBundle, CFSTR("GlxWrapInitVisuals")); + + if (!GlxExtensionInit || !GlxWrapInitVisuals) { + FatalError("Could not initialize GLX bundle."); + } + + // Release the CF objects + CFRelease(bundleName); + CFRelease(bundleURL); +} +# endif +#else + +Bool QuartzLoadDisplayBundle(const char *dpyBundleName) +{ + return TRUE; + } + +#endif + +#ifdef GLXEXT +void DarwinGlxPushProvider(void *impl) +{ +#ifndef INXQUARTZ + if (!GlxExtensionInit) + LoadGlxBundle(); +#endif + + GlxPushProvider(impl); +} + +/* + * DarwinGlxExtensionInit + * Initialize the GLX extension. + */ +void DarwinGlxExtensionInit(void) +{ +#ifndef INXQUARTZ + if (!GlxExtensionInit) + LoadGlxBundle(); +#endif + GlxExtensionInit(); +} + + +/* + * DarwinGlxWrapInitVisuals + */ +void DarwinGlxWrapInitVisuals( + miInitVisualsProcPtr *procPtr) +{ +#ifndef INXQUARTZ + if (!GlxWrapInitVisuals) + LoadGlxBundle(); +#endif + GlxWrapInitVisuals(procPtr); +} +#endif + +int DarwinModeProcessArgument( int argc, char *argv[], int i ) +{ + // fullscreen: CoreGraphics full-screen mode + // rootless: Cocoa rootless mode + // quartz: Default, either fullscreen or rootless + + if ( !strcmp( argv[i], "-fullscreen" ) ) { + ErrorF( "Running full screen in parallel with Mac OS X Quartz window server.\n" ); + return 1; + } + + if ( !strcmp( argv[i], "-rootless" ) ) { + ErrorF( "Running rootless inside Mac OS X window server.\n" ); + return 1; + } + + if ( !strcmp( argv[i], "-quartz" ) ) { + ErrorF( "Running in parallel with Mac OS X Quartz window server.\n" ); + return 1; + } + + // The Mac OS X front end uses this argument, which we just ignore here. + if ( !strcmp( argv[i], "-nostartx" ) ) { + return 1; + } + + // This command line arg is passed when launched from the Aqua GUI. + if ( !strncmp( argv[i], "-psn_", 5 ) ) { + return 1; + } + + return 0; +} diff --git a/xorg-server-1.4/hw/darwin/quartz/xpr/appledri.c b/xorg-server-1.4/hw/darwin/quartz/xpr/appledri.c new file mode 100644 index 0000000..ef68c86 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/xpr/appledri.c @@ -0,0 +1,350 @@ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +Copyright (c) 2002 Apple Computer, 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, sub license, 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 PRECISION INSIGHT AND/OR ITS 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: + * Kevin E. Martin + * Jens Owen + * Rickard E. (Rik) Faith + * + */ + +#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 _APPLEDRI_SERVER_ +#include "appledristr.h" +#include "swaprep.h" +#include "dri.h" +#include "dristruct.h" + +static int DRIErrorBase = 0; + +static DISPATCH_PROC(ProcAppleDRIDispatch); +static DISPATCH_PROC(SProcAppleDRIDispatch); + +static void AppleDRIResetProc(ExtensionEntry* extEntry); + +static unsigned char DRIReqCode = 0; +static int DRIEventBase = 0; + +static void SNotifyEvent(xAppleDRINotifyEvent *from, xAppleDRINotifyEvent *to); + +typedef struct _DRIEvent *DRIEventPtr; +typedef struct _DRIEvent { + DRIEventPtr next; + ClientPtr client; + XID clientResource; + unsigned int mask; +} DRIEventRec; + + +void +AppleDRIExtensionInit(void) +{ + ExtensionEntry* extEntry; + + if (DRIExtensionInit() && + (extEntry = AddExtension(APPLEDRINAME, + AppleDRINumberEvents, + AppleDRINumberErrors, + ProcAppleDRIDispatch, + SProcAppleDRIDispatch, + AppleDRIResetProc, + StandardMinorOpcode))) { + DRIReqCode = (unsigned char)extEntry->base; + DRIErrorBase = extEntry->errorBase; + DRIEventBase = extEntry->eventBase; + EventSwapVector[DRIEventBase] = (EventSwapPtr) SNotifyEvent; + } +} + +/*ARGSUSED*/ +static void +AppleDRIResetProc ( + ExtensionEntry* extEntry +) +{ + DRIReset(); +} + +static int +ProcAppleDRIQueryVersion( + register ClientPtr client +) +{ + xAppleDRIQueryVersionReply rep; + register int n; + + REQUEST_SIZE_MATCH(xAppleDRIQueryVersionReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.majorVersion = APPLE_DRI_MAJOR_VERSION; + rep.minorVersion = APPLE_DRI_MINOR_VERSION; + rep.patchVersion = APPLE_DRI_PATCH_VERSION; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + } + WriteToClient(client, sizeof(xAppleDRIQueryVersionReply), (char *)&rep); + return (client->noClientException); +} + + +/* surfaces */ + +static int +ProcAppleDRIQueryDirectRenderingCapable( + register ClientPtr client +) +{ + xAppleDRIQueryDirectRenderingCapableReply rep; + Bool isCapable; + + REQUEST(xAppleDRIQueryDirectRenderingCapableReq); + REQUEST_SIZE_MATCH(xAppleDRIQueryDirectRenderingCapableReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + if (!DRIQueryDirectRenderingCapable( screenInfo.screens[stuff->screen], + &isCapable)) { + return BadValue; + } + rep.isCapable = isCapable; + + if (!LocalClient(client)) + rep.isCapable = 0; + + WriteToClient(client, + sizeof(xAppleDRIQueryDirectRenderingCapableReply), (char *)&rep); + return (client->noClientException); +} + +static int +ProcAppleDRIAuthConnection( + register ClientPtr client +) +{ + xAppleDRIAuthConnectionReply rep; + + REQUEST(xAppleDRIAuthConnectionReq); + REQUEST_SIZE_MATCH(xAppleDRIAuthConnectionReq); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.authenticated = 1; + + if (!DRIAuthConnection( screenInfo.screens[stuff->screen], stuff->magic)) { + ErrorF("Failed to authenticate %u\n", stuff->magic); + rep.authenticated = 0; + } + WriteToClient(client, sizeof(xAppleDRIAuthConnectionReply), (char *)&rep); + return (client->noClientException); +} + +static void surface_notify( + void *_arg, + void *data +) +{ + DRISurfaceNotifyArg *arg = _arg; + int client_index = (int) data; + ClientPtr client; + xAppleDRINotifyEvent se; + + if (client_index < 0 || client_index >= currentMaxClients) + return; + + client = clients[client_index]; + if (client == NULL || client == serverClient || client->clientGone) + return; + + se.type = DRIEventBase + AppleDRISurfaceNotify; + se.kind = arg->kind; + se.arg = arg->id; + se.sequenceNumber = client->sequence; + se.time = currentTime.milliseconds; + WriteEventsToClient (client, 1, (xEvent *) &se); +} + +static int +ProcAppleDRICreateSurface( + ClientPtr client +) +{ + xAppleDRICreateSurfaceReply rep; + DrawablePtr pDrawable; + xp_surface_id sid; + unsigned int key[2]; + int rc; + + REQUEST(xAppleDRICreateSurfaceReq); + REQUEST_SIZE_MATCH(xAppleDRICreateSurfaceReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, + DixReadAccess); + if (rc != Success) + return rc; + + rep.key_0 = rep.key_1 = rep.uid = 0; + + if (!DRICreateSurface( screenInfo.screens[stuff->screen], + (Drawable)stuff->drawable, pDrawable, + stuff->client_id, &sid, key, + surface_notify, (void *) client->index)) { + return BadValue; + } + + rep.key_0 = key[0]; + rep.key_1 = key[1]; + rep.uid = sid; + + WriteToClient(client, sizeof(xAppleDRICreateSurfaceReply), (char *)&rep); + return (client->noClientException); +} + +static int +ProcAppleDRIDestroySurface( + register ClientPtr client +) +{ + REQUEST(xAppleDRIDestroySurfaceReq); + DrawablePtr pDrawable; + REQUEST_SIZE_MATCH(xAppleDRIDestroySurfaceReq); + int rc; + + rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, + DixReadAccess); + if (rc != Success) + return rc; + + if (!DRIDestroySurface( screenInfo.screens[stuff->screen], + (Drawable)stuff->drawable, + pDrawable, NULL, NULL)) { + return BadValue; + } + + return (client->noClientException); +} + + +/* dispatch */ + +static int +ProcAppleDRIDispatch ( + register ClientPtr client +) +{ + REQUEST(xReq); + + switch (stuff->data) + { + case X_AppleDRIQueryVersion: + return ProcAppleDRIQueryVersion(client); + case X_AppleDRIQueryDirectRenderingCapable: + return ProcAppleDRIQueryDirectRenderingCapable(client); + } + + if (!LocalClient(client)) + return DRIErrorBase + AppleDRIClientNotLocal; + + switch (stuff->data) + { + case X_AppleDRIAuthConnection: + return ProcAppleDRIAuthConnection(client); + case X_AppleDRICreateSurface: + return ProcAppleDRICreateSurface(client); + case X_AppleDRIDestroySurface: + return ProcAppleDRIDestroySurface(client); + default: + return BadRequest; + } +} + +static void +SNotifyEvent( + xAppleDRINotifyEvent *from, + xAppleDRINotifyEvent *to +) +{ + to->type = from->type; + to->kind = from->kind; + cpswaps (from->sequenceNumber, to->sequenceNumber); + cpswapl (from->time, to->time); + cpswapl (from->arg, to->arg); +} + +static int +SProcAppleDRIQueryVersion( + register ClientPtr client +) +{ + register int n; + REQUEST(xAppleDRIQueryVersionReq); + swaps(&stuff->length, n); + return ProcAppleDRIQueryVersion(client); +} + +static int +SProcAppleDRIDispatch ( + register ClientPtr client +) +{ + REQUEST(xReq); + + /* It is bound to be non-local when there is byte swapping */ + if (!LocalClient(client)) + return DRIErrorBase + AppleDRIClientNotLocal; + + /* only local clients are allowed DRI access */ + switch (stuff->data) + { + case X_AppleDRIQueryVersion: + return SProcAppleDRIQueryVersion(client); + default: + return BadRequest; + } +} diff --git a/xorg-server-1.4/hw/darwin/quartz/xpr/dri.c b/xorg-server-1.4/hw/darwin/quartz/xpr/dri.c new file mode 100644 index 0000000..08ee382 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/xpr/dri.c @@ -0,0 +1,754 @@ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +Copyright (c) 2002 Apple Computer, 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, sub license, 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 PRECISION INSIGHT AND/OR ITS 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: + * Jens Owen + * Rickard E. (Rik) Faith + * + */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + +#include +#include + +#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 "windowstr.h" +#include "servermd.h" +#define _APPLEDRI_SERVER_ +#include "appledristr.h" +#include "swaprep.h" +#include "dri.h" +#include "dristruct.h" +#include "mi.h" +#include "mipointer.h" +#include "rootless.h" +#include "x-hash.h" +#include "x-hook.h" + +#include + +static int DRIScreenPrivIndex = -1; +static int DRIWindowPrivIndex = -1; +static int DRIPixmapPrivIndex = -1; + +static RESTYPE DRIDrawablePrivResType; + +static x_hash_table *surface_hash; /* maps surface ids -> drawablePrivs */ + +/* FIXME: don't hardcode this? */ +#define CG_INFO_FILE "/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/Info-macos.plist" + +/* Corresponds to SU Jaguar Green */ +#define CG_REQUIRED_MAJOR 1 +#define CG_REQUIRED_MINOR 157 +#define CG_REQUIRED_MICRO 11 + +/* Returns version as major.minor.micro in 10.10.10 fixed form */ +static unsigned int +get_cg_version (void) +{ + static unsigned int version; + + FILE *fh; + char *ptr; + + if (version != 0) + return version; + + /* I tried CFBundleGetVersion, but it returns zero, so.. */ + + fh = fopen (CG_INFO_FILE, "r"); + if (fh != NULL) + { + char buf[256]; + + while (fgets (buf, sizeof (buf), fh) != NULL) + { + unsigned char c; + + if (!strstr (buf, "CFBundleShortVersionString") + || fgets (buf, sizeof (buf), fh) == NULL) + { + continue; + } + + ptr = strstr (buf, ""); + if (ptr == NULL) + continue; + + ptr += strlen (""); + + /* Now PTR points to "MAJOR.MINOR.MICRO". */ + + version = 0; + + again: + switch ((c = *ptr++)) + { + case '.': + version = version * 1024; + goto again; + + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + version = ((version & ~0x3ff) + + (version & 0x3ff) * 10 + (c - '0')); + goto again; + } + break; + } + + fclose (fh); + } + + return version; +} + +static Bool +test_cg_version (unsigned int major, unsigned int minor, unsigned int micro) +{ + unsigned int cg_ver = get_cg_version (); + + unsigned int cg_major = (cg_ver >> 20) & 0x3ff; + unsigned int cg_minor = (cg_ver >> 10) & 0x3ff; + unsigned int cg_micro = cg_ver & 0x3ff; + + if (cg_major > major) + return TRUE; + else if (cg_major < major) + return FALSE; + + /* cg_major == major */ + + if (cg_minor > minor) + return TRUE; + else if (cg_minor < minor) + return FALSE; + + /* cg_minor == minor */ + + if (cg_micro < micro) + return FALSE; + + return TRUE; +} + +Bool +DRIScreenInit(ScreenPtr pScreen) +{ + DRIScreenPrivPtr pDRIPriv; + int i; + + pDRIPriv = (DRIScreenPrivPtr) xcalloc(1, sizeof(DRIScreenPrivRec)); + if (!pDRIPriv) { + pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; + return FALSE; + } + + pScreen->devPrivates[DRIScreenPrivIndex].ptr = (pointer) pDRIPriv; + pDRIPriv->directRenderingSupport = TRUE; + pDRIPriv->nrWindows = 0; + + /* Need recent cg for window access update */ + if (!test_cg_version (CG_REQUIRED_MAJOR, + CG_REQUIRED_MINOR, + CG_REQUIRED_MICRO)) + { + ErrorF ("[DRI] disabled direct rendering; requires CoreGraphics %d.%d.%d\n", + CG_REQUIRED_MAJOR, CG_REQUIRED_MINOR, CG_REQUIRED_MICRO); + + pDRIPriv->directRenderingSupport = FALSE; + + /* Note we don't nuke the dri private, since we need it for + managing indirect surfaces. */ + } + + /* Initialize drawable tables */ + for (i = 0; i < DRI_MAX_DRAWABLES; i++) { + pDRIPriv->DRIDrawables[i] = NULL; + } + + return TRUE; +} + +Bool +DRIFinishScreenInit(ScreenPtr pScreen) +{ + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + + /* Allocate zero sized private area for each window. Should a window + * become a DRI window, we'll hang a DRIWindowPrivateRec off of this + * private index. + */ + if (!AllocateWindowPrivate(pScreen, DRIWindowPrivIndex, 0)) + return FALSE; + + /* Wrap DRI support */ + pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree; + pScreen->ValidateTree = DRIValidateTree; + + pDRIPriv->wrap.PostValidateTree = pScreen->PostValidateTree; + pScreen->PostValidateTree = DRIPostValidateTree; + + pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; + pScreen->WindowExposures = DRIWindowExposures; + + pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow; + pScreen->CopyWindow = DRICopyWindow; + + pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify; + pScreen->ClipNotify = DRIClipNotify; + + ErrorF("[DRI] screen %d installation complete\n", pScreen->myNum); + + return TRUE; +} + +void +DRICloseScreen(ScreenPtr pScreen) +{ + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + + if (pDRIPriv && pDRIPriv->directRenderingSupport) { + xfree(pDRIPriv); + pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; + } +} + +Bool +DRIExtensionInit(void) +{ + static unsigned long DRIGeneration = 0; + + if (DRIGeneration != serverGeneration) { + if ((DRIScreenPrivIndex = AllocateScreenPrivateIndex()) < 0) + return FALSE; + DRIGeneration = serverGeneration; + } + + /* + * Allocate a window private index with a zero sized private area for + * each window, then should a window become a DRI window, we'll hang + * a DRIWindowPrivateRec off of this private index. Do same for pixmaps. + */ + if ((DRIWindowPrivIndex = AllocateWindowPrivateIndex()) < 0) + return FALSE; + if ((DRIPixmapPrivIndex = AllocatePixmapPrivateIndex()) < 0) + return FALSE; + + DRIDrawablePrivResType = CreateNewResourceType(DRIDrawablePrivDelete); + + return TRUE; +} + +void +DRIReset(void) +{ + /* + * This stub routine is called when the X Server recycles, resources + * allocated by DRIExtensionInit need to be managed here. + * + * Currently this routine is a stub because all the interesting resources + * are managed via the screen init process. + */ +} + +Bool +DRIQueryDirectRenderingCapable(ScreenPtr pScreen, Bool* isCapable) +{ + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + + if (pDRIPriv) + *isCapable = pDRIPriv->directRenderingSupport; + else + *isCapable = FALSE; + + return TRUE; +} + +Bool +DRIAuthConnection(ScreenPtr pScreen, unsigned int magic) +{ +#if 0 + /* FIXME: something? */ + + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + + if (drmAuthMagic(pDRIPriv->drmFD, magic)) return FALSE; +#endif + return TRUE; +} + +static void +DRIUpdateSurface(DRIDrawablePrivPtr pDRIDrawablePriv, DrawablePtr pDraw) +{ + xp_window_changes wc; + unsigned int flags = 0; + + if (pDRIDrawablePriv->sid == 0) + return; + +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 + wc.depth = (pDraw->bitsPerPixel == 32 ? XP_DEPTH_ARGB8888 + : pDraw->bitsPerPixel == 16 ? XP_DEPTH_RGB555 : XP_DEPTH_NIL); + if (wc.depth != XP_DEPTH_NIL) + flags |= XP_DEPTH; +#endif + + if (pDraw->type == DRAWABLE_WINDOW) { + WindowPtr pWin = (WindowPtr) pDraw; + WindowPtr pTopWin = TopLevelParent(pWin); + + wc.x = pWin->drawable.x - (pTopWin->drawable.x - pTopWin->borderWidth); + wc.y = pWin->drawable.y - (pTopWin->drawable.y - pTopWin->borderWidth); + wc.width = pWin->drawable.width + 2 * pWin->borderWidth; + wc.height = pWin->drawable.height + 2 * pWin->borderWidth; + wc.bit_gravity = XP_GRAVITY_NONE; + + wc.shape_nrects = REGION_NUM_RECTS(&pWin->clipList); + wc.shape_rects = REGION_RECTS(&pWin->clipList); + wc.shape_tx = - (pTopWin->drawable.x - pTopWin->borderWidth); + wc.shape_ty = - (pTopWin->drawable.y - pTopWin->borderWidth); + + flags |= XP_BOUNDS | XP_SHAPE; + + } else if (pDraw->type == DRAWABLE_PIXMAP) { + wc.x = 0; + wc.y = 0; + wc.width = pDraw->width; + wc.height = pDraw->height; + wc.bit_gravity = XP_GRAVITY_NONE; + flags |= XP_BOUNDS; + } + + xp_configure_surface(pDRIDrawablePriv->sid, flags, &wc); +} + +Bool +DRICreateSurface(ScreenPtr pScreen, Drawable id, + DrawablePtr pDrawable, xp_client_id client_id, + xp_surface_id *surface_id, unsigned int ret_key[2], + void (*notify) (void *arg, void *data), void *notify_data) +{ + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + DRIDrawablePrivPtr pDRIDrawablePriv; + xp_window_id wid = 0; + + if (pDrawable->type == DRAWABLE_WINDOW) { + WindowPtr pWin = (WindowPtr)pDrawable; + + pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); + if (pDRIDrawablePriv == NULL) { + xp_error err; + xp_window_changes wc; + + /* allocate a DRI Window Private record */ + if (!(pDRIDrawablePriv = xalloc(sizeof(DRIDrawablePrivRec)))) { + return FALSE; + } + + pDRIDrawablePriv->pDraw = pDrawable; + pDRIDrawablePriv->pScreen = pScreen; + pDRIDrawablePriv->refCount = 0; + pDRIDrawablePriv->drawableIndex = -1; + pDRIDrawablePriv->notifiers = NULL; + + /* find the physical window */ + wid = (xp_window_id) RootlessFrameForWindow(pWin, TRUE); + if (wid == 0) { + xfree(pDRIDrawablePriv); + return FALSE; + } + + /* allocate the physical surface */ + err = xp_create_surface(wid, &pDRIDrawablePriv->sid); + if (err != Success) { + xfree(pDRIDrawablePriv); + return FALSE; + } + + /* Make it visible */ + wc.stack_mode = XP_MAPPED_ABOVE; + wc.sibling = 0; + err = xp_configure_surface(pDRIDrawablePriv->sid, XP_STACKING, &wc); + if (err != Success) + { + xp_destroy_surface(pDRIDrawablePriv->sid); + xfree(pDRIDrawablePriv); + return FALSE; + } + + /* save private off of preallocated index */ + pWin->devPrivates[DRIWindowPrivIndex].ptr = (pointer)pDRIDrawablePriv; + } + } + +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 + else if (pDrawable->type == DRAWABLE_PIXMAP) { + PixmapPtr pPix = (PixmapPtr)pDrawable; + + pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix); + if (pDRIDrawablePriv == NULL) { + xp_error err; + + /* allocate a DRI Window Private record */ + if (!(pDRIDrawablePriv = xcalloc(1, sizeof(DRIDrawablePrivRec)))) { + return FALSE; + } + + pDRIDrawablePriv->pDraw = pDrawable; + pDRIDrawablePriv->pScreen = pScreen; + pDRIDrawablePriv->refCount = 0; + pDRIDrawablePriv->drawableIndex = -1; + pDRIDrawablePriv->notifiers = NULL; + + /* Passing a null window id to Xplugin in 10.3+ asks for + an accelerated offscreen surface. */ + + err = xp_create_surface(0, &pDRIDrawablePriv->sid); + if (err != Success) { + xfree(pDRIDrawablePriv); + return FALSE; + } + + /* save private off of preallocated index */ + pPix->devPrivates[DRIPixmapPrivIndex].ptr = (pointer)pDRIDrawablePriv; + } + } +#endif + + else { /* for GLX 1.3, a PBuffer */ + /* NOT_DONE */ + return FALSE; + } + + /* Finish initialization of new surfaces */ + if (pDRIDrawablePriv->refCount == 0) { + unsigned int key[2] = {0}; + xp_error err; + + /* try to give the client access to the surface */ + if (client_id != 0 && wid != 0) + { + err = xp_export_surface(wid, pDRIDrawablePriv->sid, + client_id, key); + if (err != Success) { + xp_destroy_surface(pDRIDrawablePriv->sid); + xfree(pDRIDrawablePriv); + return FALSE; + } + } + + pDRIDrawablePriv->key[0] = key[0]; + pDRIDrawablePriv->key[1] = key[1]; + + ++pDRIPriv->nrWindows; + + /* and stash it by surface id */ + if (surface_hash == NULL) + surface_hash = x_hash_table_new(NULL, NULL, NULL, NULL); + x_hash_table_insert(surface_hash, + (void *) pDRIDrawablePriv->sid, pDRIDrawablePriv); + + /* track this in case this window is destroyed */ + AddResource(id, DRIDrawablePrivResType, (pointer)pDrawable); + + /* Initialize shape */ + DRIUpdateSurface(pDRIDrawablePriv, pDrawable); + } + + pDRIDrawablePriv->refCount++; + + *surface_id = pDRIDrawablePriv->sid; + + if (ret_key != NULL) { + ret_key[0] = pDRIDrawablePriv->key[0]; + ret_key[1] = pDRIDrawablePriv->key[1]; + } + + if (notify != NULL) { + pDRIDrawablePriv->notifiers = x_hook_add(pDRIDrawablePriv->notifiers, + notify, notify_data); + } + + return TRUE; +} + +Bool +DRIDestroySurface(ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable, + void (*notify) (void *, void *), void *notify_data) +{ + DRIDrawablePrivPtr pDRIDrawablePriv; + + if (pDrawable->type == DRAWABLE_WINDOW) { + pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW((WindowPtr)pDrawable); + } else if (pDrawable->type == DRAWABLE_PIXMAP) { + pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_PIXMAP((PixmapPtr)pDrawable); + } else { + return FALSE; + } + + if (pDRIDrawablePriv != NULL) { + if (notify != NULL) { + pDRIDrawablePriv->notifiers = x_hook_remove(pDRIDrawablePriv->notifiers, + notify, notify_data); + } + if (--pDRIDrawablePriv->refCount <= 0) { + /* This calls back to DRIDrawablePrivDelete + which frees the private area */ + FreeResourceByType(id, DRIDrawablePrivResType, FALSE); + } + } + + return TRUE; +} + +Bool +DRIDrawablePrivDelete(pointer pResource, XID id) +{ + DrawablePtr pDrawable = (DrawablePtr)pResource; + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pDrawable->pScreen); + DRIDrawablePrivPtr pDRIDrawablePriv = NULL; + WindowPtr pWin = NULL; + PixmapPtr pPix = NULL; + + if (pDrawable->type == DRAWABLE_WINDOW) { + pWin = (WindowPtr)pDrawable; + pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); + } else if (pDrawable->type == DRAWABLE_PIXMAP) { + pPix = (PixmapPtr)pDrawable; + pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix); + } + + if (pDRIDrawablePriv == NULL) + return FALSE; + + if (pDRIDrawablePriv->drawableIndex != -1) { + /* release drawable table entry */ + pDRIPriv->DRIDrawables[pDRIDrawablePriv->drawableIndex] = NULL; + } + + if (pDRIDrawablePriv->sid != 0) { + xp_destroy_surface(pDRIDrawablePriv->sid); + x_hash_table_remove(surface_hash, (void *) pDRIDrawablePriv->sid); + } + + if (pDRIDrawablePriv->notifiers != NULL) + x_hook_free(pDRIDrawablePriv->notifiers); + + xfree(pDRIDrawablePriv); + + if (pDrawable->type == DRAWABLE_WINDOW) { + pWin->devPrivates[DRIWindowPrivIndex].ptr = NULL; + } else if (pDrawable->type == DRAWABLE_PIXMAP) { + pPix->devPrivates[DRIPixmapPrivIndex].ptr = NULL; + } + + --pDRIPriv->nrWindows; + + return TRUE; +} + +void +DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); + + if (pDRIDrawablePriv) { + /* FIXME: something? */ + } + + pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures; + + (*pScreen->WindowExposures)(pWin, prgn, bsreg); + + pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; + pScreen->WindowExposures = DRIWindowExposures; +} + +void +DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + DRIDrawablePrivPtr pDRIDrawablePriv; + + if (pDRIPriv->nrWindows > 0) { + pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); + if (pDRIDrawablePriv != NULL) { + DRIUpdateSurface(pDRIDrawablePriv, &pWin->drawable); + } + } + + /* unwrap */ + pScreen->CopyWindow = pDRIPriv->wrap.CopyWindow; + + /* call lower layers */ + (*pScreen->CopyWindow)(pWin, ptOldOrg, prgnSrc); + + /* rewrap */ + pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow; + pScreen->CopyWindow = DRICopyWindow; +} + +int +DRIValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) +{ + ScreenPtr pScreen = pParent->drawable.pScreen; + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + int returnValue; + + /* unwrap */ + pScreen->ValidateTree = pDRIPriv->wrap.ValidateTree; + + /* call lower layers */ + returnValue = (*pScreen->ValidateTree)(pParent, pChild, kind); + + /* rewrap */ + pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree; + pScreen->ValidateTree = DRIValidateTree; + + return returnValue; +} + +void +DRIPostValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) +{ + ScreenPtr pScreen; + DRIScreenPrivPtr pDRIPriv; + + if (pParent) { + pScreen = pParent->drawable.pScreen; + } else { + pScreen = pChild->drawable.pScreen; + } + pDRIPriv = DRI_SCREEN_PRIV(pScreen); + + if (pDRIPriv->wrap.PostValidateTree) { + /* unwrap */ + pScreen->PostValidateTree = pDRIPriv->wrap.PostValidateTree; + + /* call lower layers */ + (*pScreen->PostValidateTree)(pParent, pChild, kind); + + /* rewrap */ + pDRIPriv->wrap.PostValidateTree = pScreen->PostValidateTree; + pScreen->PostValidateTree = DRIPostValidateTree; + } +} + +void +DRIClipNotify(WindowPtr pWin, int dx, int dy) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + DRIDrawablePrivPtr pDRIDrawablePriv; + + if ((pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin))) { + DRIUpdateSurface(pDRIDrawablePriv, &pWin->drawable); + } + + if (pDRIPriv->wrap.ClipNotify) { + pScreen->ClipNotify = pDRIPriv->wrap.ClipNotify; + + (*pScreen->ClipNotify)(pWin, dx, dy); + + pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify; + pScreen->ClipNotify = DRIClipNotify; + } +} + +/* This lets us get at the unwrapped functions so that they can correctly + * call the lower level functions, and choose whether they will be + * called at every level of recursion (eg in validatetree). + */ +DRIWrappedFuncsRec * +DRIGetWrappedFuncs(ScreenPtr pScreen) +{ + return &(DRI_SCREEN_PRIV(pScreen)->wrap); +} + +void +DRIQueryVersion(int *majorVersion, + int *minorVersion, + int *patchVersion) +{ + *majorVersion = APPLE_DRI_MAJOR_VERSION; + *minorVersion = APPLE_DRI_MINOR_VERSION; + *patchVersion = APPLE_DRI_PATCH_VERSION; +} + +void +DRISurfaceNotify(xp_surface_id id, int kind) +{ + DRIDrawablePrivPtr pDRIDrawablePriv = NULL; + DRISurfaceNotifyArg arg; + + arg.id = id; + arg.kind = kind; + + if (surface_hash != NULL) + { + pDRIDrawablePriv = x_hash_table_lookup(surface_hash, + (void *) id, NULL); + } + + if (pDRIDrawablePriv == NULL) + return; + + if (kind == AppleDRISurfaceNotifyDestroyed) + { + pDRIDrawablePriv->sid = 0; + x_hash_table_remove(surface_hash, (void *) id); + } + + x_hook_run(pDRIDrawablePriv->notifiers, &arg); + + if (kind == AppleDRISurfaceNotifyDestroyed) + { + /* Kill off the handle. */ + + FreeResourceByType(pDRIDrawablePriv->pDraw->id, + DRIDrawablePrivResType, FALSE); + } +} diff --git a/xorg-server-1.4/hw/darwin/quartz/xpr/x-hash.c b/xorg-server-1.4/hw/darwin/quartz/xpr/x-hash.c new file mode 100644 index 0000000..6bbeacf --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/xpr/x-hash.c @@ -0,0 +1,341 @@ +/* x-hash.c - basic hash tables + + Copyright (c) 2002 Apple Computer, 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 ABOVE LISTED COPYRIGHT + HOLDER(S) 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(s) of the above + 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. */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "x-hash.h" +#include "x-list.h" +#include +#include + +struct x_hash_table_struct { + unsigned int bucket_index; + unsigned int total_keys; + x_list **buckets; + + x_hash_fun *hash_key; + x_compare_fun *compare_keys; + x_destroy_fun *destroy_key; + x_destroy_fun *destroy_value; +}; + +#define ITEM_NEW(k, v) X_PFX (list_prepend) ((x_list *) (k), v) +#define ITEM_FREE(i) X_PFX (list_free_1) (i) +#define ITEM_KEY(i) ((void *) (i)->next) +#define ITEM_VALUE(i) ((i)->data) + +#define SPLIT_THRESHOLD_FACTOR 2 + +/* http://planetmath.org/?op=getobj&from=objects&name=GoodHashTablePrimes */ +static const unsigned int bucket_sizes[] = { + 29, 53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593, 49157, + 98317, 196613, 393241, 786433, 1572869, 3145739, 6291469, 12582917, + 25165843, 50331653, 100663319, 201326611, 402653189, 805306457, + 1610612741 +}; + +#define N_BUCKET_SIZES (sizeof (bucket_sizes) / sizeof (bucket_sizes[0])) + +static inline unsigned int +hash_table_total_buckets (x_hash_table *h) +{ + return bucket_sizes[h->bucket_index]; +} + +static inline void +hash_table_destroy_item (x_hash_table *h, void *k, void *v) +{ + if (h->destroy_key != 0) + (*h->destroy_key) (k); + + if (h->destroy_value != 0) + (*h->destroy_value) (v); +} + +static inline unsigned int +hash_table_hash_key (x_hash_table *h, void *k) +{ + if (h->hash_key != 0) + return (*h->hash_key) (k); + else + return (unsigned int) k; +} + +static inline int +hash_table_compare_keys (x_hash_table *h, void *k1, void *k2) +{ + if (h->compare_keys == 0) + return k1 == k2; + else + return (*h->compare_keys) (k1, k2) == 0; +} + +static void +hash_table_split (x_hash_table *h) +{ + x_list **new, **old; + x_list *node, *item, *next; + int new_size, old_size; + unsigned int b; + int i; + + if (h->bucket_index == N_BUCKET_SIZES - 1) + return; + + old_size = hash_table_total_buckets (h); + old = h->buckets; + + h->bucket_index++; + + new_size = hash_table_total_buckets (h); + new = calloc (new_size, sizeof (x_list *)); + + if (new == 0) + { + h->bucket_index--; + return; + } + + for (i = 0; i < old_size; i++) + { + for (node = old[i]; node != 0; node = next) + { + next = node->next; + item = node->data; + + b = hash_table_hash_key (h, ITEM_KEY (item)) % new_size; + + node->next = new[b]; + new[b] = node; + } + } + + h->buckets = new; + free (old); +} + +X_EXTERN x_hash_table * +X_PFX (hash_table_new) (x_hash_fun *hash, + x_compare_fun *compare, + x_destroy_fun *key_destroy, + x_destroy_fun *value_destroy) +{ + x_hash_table *h; + + h = calloc (1, sizeof (x_hash_table)); + if (h == 0) + return 0; + + h->bucket_index = 0; + h->buckets = calloc (hash_table_total_buckets (h), sizeof (x_list *)); + + if (h->buckets == 0) + { + free (h); + return 0; + } + + h->hash_key = hash; + h->compare_keys = compare; + h->destroy_key = key_destroy; + h->destroy_value = value_destroy; + + return h; +} + +X_EXTERN void +X_PFX (hash_table_free) (x_hash_table *h) +{ + int n, i; + x_list *node, *item; + + assert (h != NULL); + + n = hash_table_total_buckets (h); + + for (i = 0; i < n; i++) + { + for (node = h->buckets[i]; node != 0; node = node->next) + { + item = node->data; + hash_table_destroy_item (h, ITEM_KEY (item), ITEM_VALUE (item)); + ITEM_FREE (item); + } + X_PFX (list_free) (h->buckets[i]); + } + + free (h->buckets); + free (h); +} + +X_EXTERN unsigned int +X_PFX (hash_table_size) (x_hash_table *h) +{ + assert (h != NULL); + + return h->total_keys; +} + +static void +hash_table_modify (x_hash_table *h, void *k, void *v, int replace) +{ + unsigned int hash_value; + x_list *node, *item; + + assert (h != NULL); + + hash_value = hash_table_hash_key (h, k); + + for (node = h->buckets[hash_value % hash_table_total_buckets (h)]; + node != 0; node = node->next) + { + item = node->data; + + if (hash_table_compare_keys (h, ITEM_KEY (item), k)) + { + if (replace) + { + hash_table_destroy_item (h, ITEM_KEY (item), + ITEM_VALUE (item)); + item->next = k; + ITEM_VALUE (item) = v; + } + else + { + hash_table_destroy_item (h, k, ITEM_VALUE (item)); + ITEM_VALUE (item) = v; + } + return; + } + } + + /* Key isn't already in the table. Insert it. */ + + if (h->total_keys + 1 + > hash_table_total_buckets (h) * SPLIT_THRESHOLD_FACTOR) + { + hash_table_split (h); + } + + hash_value = hash_value % hash_table_total_buckets (h); + h->buckets[hash_value] = X_PFX (list_prepend) (h->buckets[hash_value], + ITEM_NEW (k, v)); + h->total_keys++; +} + +X_EXTERN void +X_PFX (hash_table_insert) (x_hash_table *h, void *k, void *v) +{ + hash_table_modify (h, k, v, 0); +} + +X_EXTERN void +X_PFX (hash_table_replace) (x_hash_table *h, void *k, void *v) +{ + hash_table_modify (h, k, v, 1); +} + +X_EXTERN void +X_PFX (hash_table_remove) (x_hash_table *h, void *k) +{ + unsigned int hash_value; + x_list **ptr, *item; + + assert (h != NULL); + + hash_value = hash_table_hash_key (h, k); + + for (ptr = &h->buckets[hash_value % hash_table_total_buckets (h)]; + *ptr != 0; ptr = &((*ptr)->next)) + { + item = (*ptr)->data; + + if (hash_table_compare_keys (h, ITEM_KEY (item), k)) + { + hash_table_destroy_item (h, ITEM_KEY (item), ITEM_VALUE (item)); + ITEM_FREE (item); + item = *ptr; + *ptr = item->next; + X_PFX (list_free_1) (item); + h->total_keys--; + return; + } + } +} + +X_EXTERN void * +X_PFX (hash_table_lookup) (x_hash_table *h, void *k, void **k_ret) +{ + unsigned int hash_value; + x_list *node, *item; + + assert (h != NULL); + + hash_value = hash_table_hash_key (h, k); + + for (node = h->buckets[hash_value % hash_table_total_buckets (h)]; + node != 0; node = node->next) + { + item = node->data; + + if (hash_table_compare_keys (h, ITEM_KEY (item), k)) + { + if (k_ret != 0) + *k_ret = ITEM_KEY (item); + + return ITEM_VALUE (item); + } + } + + if (k_ret != 0) + *k_ret = 0; + + return 0; +} + +X_EXTERN void +X_PFX (hash_table_foreach) (x_hash_table *h, + x_hash_foreach_fun *fun, void *data) +{ + int i, n; + x_list *node, *item; + + assert (h != NULL); + + n = hash_table_total_buckets (h); + + for (i = 0; i < n; i++) + { + for (node = h->buckets[i]; node != 0; node = node->next) + { + item = node->data; + (*fun) (ITEM_KEY (item), ITEM_VALUE (item), data); + } + } +} diff --git a/xorg-server-1.4/hw/darwin/quartz/xpr/x-hash.h b/xorg-server-1.4/hw/darwin/quartz/xpr/x-hash.h new file mode 100644 index 0000000..3456dbe --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/xpr/x-hash.h @@ -0,0 +1,60 @@ +/* x-hash.h -- basic hash table class + + Copyright (c) 2002 Apple Computer, 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 ABOVE LISTED COPYRIGHT + HOLDER(S) 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(s) of the above + 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. */ + +#ifndef X_HASH_H +#define X_HASH_H 1 + +typedef struct x_hash_table_struct x_hash_table; + +typedef int (x_compare_fun) (const void *a, const void *b); +typedef unsigned int (x_hash_fun) (const void *k); +typedef void (x_destroy_fun) (void *x); +typedef void (x_hash_foreach_fun) (void *k, void *v, void *data); + +/* for X_PFX and X_EXTERN */ +#include "x-list.h" + +X_EXTERN x_hash_table *X_PFX (hash_table_new) (x_hash_fun *hash, + x_compare_fun *compare, + x_destroy_fun *key_destroy, + x_destroy_fun *value_destroy); +X_EXTERN void X_PFX (hash_table_free) (x_hash_table *h); + +X_EXTERN unsigned int X_PFX (hash_table_size) (x_hash_table *h); + +X_EXTERN void X_PFX (hash_table_insert) (x_hash_table *h, void *k, void *v); +X_EXTERN void X_PFX (hash_table_replace) (x_hash_table *h, void *k, void *v); +X_EXTERN void X_PFX (hash_table_remove) (x_hash_table *h, void *k); +X_EXTERN void *X_PFX (hash_table_lookup) (x_hash_table *h, + void *k, void **k_ret); +X_EXTERN void X_PFX (hash_table_foreach) (x_hash_table *h, + x_hash_foreach_fun *fun, + void *data); + +#endif /* X_HASH_H */ diff --git a/xorg-server-1.4/hw/darwin/quartz/xpr/x-hook.c b/xorg-server-1.4/hw/darwin/quartz/xpr/x-hook.c new file mode 100644 index 0000000..42915db --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/xpr/x-hook.c @@ -0,0 +1,106 @@ +/* x-hook.c + + Copyright (c) 2003 Apple Computer, 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 ABOVE LISTED COPYRIGHT + HOLDER(S) 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(s) of the above + 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. */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "x-hook.h" +#include +#include + +#define CELL_NEW(f,d) X_PFX (list_prepend) ((x_list *) (f), (d)) +#define CELL_FREE(c) X_PFX (list_free_1) (c) +#define CELL_FUN(c) ((x_hook_function *) ((c)->next)) +#define CELL_DATA(c) ((c)->data) + +X_EXTERN x_list * +X_PFX (hook_add) (x_list *lst, x_hook_function *fun, void *data) +{ + return X_PFX (list_prepend) (lst, CELL_NEW (fun, data)); +} + +X_EXTERN x_list * +X_PFX (hook_remove) (x_list *lst, x_hook_function *fun, void *data) +{ + x_list *node, *cell; + x_list *to_delete = NULL; + + for (node = lst; node != NULL; node = node->next) + { + cell = node->data; + if (CELL_FUN (cell) == fun && CELL_DATA (cell) == data) + to_delete = X_PFX (list_prepend) (to_delete, cell); + } + + for (node = to_delete; node != NULL; node = node->next) + { + cell = node->data; + lst = X_PFX (list_remove) (lst, cell); + CELL_FREE (cell); + } + + X_PFX (list_free) (to_delete); +} + +X_EXTERN void +X_PFX (hook_run) (x_list *lst, void *arg) +{ + x_list *node, *cell; + x_hook_function **fun; + void **data; + int length, i; + + length = X_PFX (list_length) (lst); + fun = alloca (sizeof (x_hook_function *) * length); + data = alloca (sizeof (void *) * length); + + for (i = 0, node = lst; node != NULL; node = node->next, i++) + { + cell = node->data; + fun[i] = CELL_FUN (cell); + data[i] = CELL_DATA (cell); + } + + for (i = 0; i < length; i++) + { + (*fun[i]) (arg, data[i]); + } +} + +X_EXTERN void +X_PFX (hook_free) (x_list *lst) +{ + x_list *node; + + for (node = lst; node != NULL; node = node->next) + { + CELL_FREE (node->data); + } + + X_PFX (list_free) (lst); +} diff --git a/xorg-server-1.4/hw/darwin/quartz/xpr/x-list.c b/xorg-server-1.4/hw/darwin/quartz/xpr/x-list.c new file mode 100644 index 0000000..a5f835d --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/xpr/x-list.c @@ -0,0 +1,335 @@ +/* x-list.c + + Copyright (c) 2002 Apple Computer, 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 ABOVE LISTED COPYRIGHT + HOLDER(S) 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(s) of the above + 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. */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "x-list.h" +#include +#include +#include + +/* Allocate in ~4k blocks */ +#define NODES_PER_BLOCK 508 + +typedef struct x_list_block_struct x_list_block; + +struct x_list_block_struct { + x_list l[NODES_PER_BLOCK]; +}; + +static x_list *freelist; + +static pthread_mutex_t freelist_lock = PTHREAD_MUTEX_INITIALIZER; + +static inline void +list_free_1 (x_list *node) +{ + node->next = freelist; + freelist = node; +} + +X_EXTERN void +X_PFX (list_free_1) (x_list *node) +{ + assert (node != NULL); + + pthread_mutex_lock (&freelist_lock); + + list_free_1 (node); + + pthread_mutex_unlock (&freelist_lock); +} + +X_EXTERN void +X_PFX (list_free) (x_list *lst) +{ + x_list *next; + + pthread_mutex_lock (&freelist_lock); + + for (; lst != NULL; lst = next) + { + next = lst->next; + list_free_1 (lst); + } + + pthread_mutex_unlock (&freelist_lock); +} + +X_EXTERN x_list * +X_PFX (list_prepend) (x_list *lst, void *data) +{ + x_list *node; + + pthread_mutex_lock (&freelist_lock); + + if (freelist == NULL) + { + x_list_block *b; + int i; + + b = malloc (sizeof (x_list_block)); + + for (i = 0; i < NODES_PER_BLOCK - 1; i++) + b->l[i].next = &(b->l[i+1]); + b->l[i].next = NULL; + + freelist = b->l; + } + + node = freelist; + freelist = node->next; + + pthread_mutex_unlock (&freelist_lock); + + node->next = lst; + node->data = data; + + return node; +} + +X_EXTERN x_list * +X_PFX (list_append) (x_list *lst, void *data) +{ + x_list *head = lst; + + if (lst == NULL) + return X_PFX (list_prepend) (NULL, data); + + while (lst->next != NULL) + lst = lst->next; + + lst->next = X_PFX (list_prepend) (NULL, data); + + return head; +} + +X_EXTERN x_list * +X_PFX (list_reverse) (x_list *lst) +{ + x_list *head = NULL, *next; + + while (lst != NULL) + { + next = lst->next; + lst->next = head; + head = lst; + lst = next; + } + + return head; +} + +X_EXTERN x_list * +X_PFX (list_find) (x_list *lst, void *data) +{ + for (; lst != NULL; lst = lst->next) + { + if (lst->data == data) + return lst; + } + + return NULL; +} + +X_EXTERN x_list * +X_PFX (list_nth) (x_list *lst, int n) +{ + while (n-- > 0 && lst != NULL) + lst = lst->next; + + return lst; +} + +X_EXTERN x_list * +X_PFX (list_pop) (x_list *lst, void **data_ret) +{ + void *data = NULL; + + if (lst != NULL) + { + x_list *tem = lst; + data = lst->data; + lst = lst->next; + X_PFX (list_free_1) (tem); + } + + if (data_ret != NULL) + *data_ret = data; + + return lst; +} + +X_EXTERN x_list * +X_PFX (list_filter) (x_list *lst, + int (*pred) (void *item, void *data), void *data) +{ + x_list *ret = NULL, *node; + + for (node = lst; node != NULL; node = node->next) + { + if ((*pred) (node->data, data)) + ret = X_PFX (list_prepend) (ret, node->data); + } + + return X_PFX (list_reverse) (ret); +} + +X_EXTERN x_list * +X_PFX (list_map) (x_list *lst, + void *(*fun) (void *item, void *data), void *data) +{ + x_list *ret = NULL, *node; + + for (node = lst; node != NULL; node = node->next) + { + X_PFX (list_prepend) (ret, fun (node->data, data)); + } + + return X_PFX (list_reverse) (ret); +} + +X_EXTERN x_list * +X_PFX (list_copy) (x_list *lst) +{ + x_list *copy = NULL; + + for (; lst != NULL; lst = lst->next) + { + copy = X_PFX (list_prepend) (copy, lst->data); + } + + return X_PFX (list_reverse) (copy); +} + +X_EXTERN x_list * +X_PFX (list_remove) (x_list *lst, void *data) +{ + x_list **ptr, *node; + + for (ptr = &lst; *ptr != NULL;) + { + node = *ptr; + + if (node->data == data) + { + *ptr = node->next; + X_PFX (list_free_1) (node); + } + else + ptr = &((*ptr)->next); + } + + return lst; +} + +X_EXTERN unsigned int +X_PFX (list_length) (x_list *lst) +{ + unsigned int n; + + n = 0; + for (; lst != NULL; lst = lst->next) + n++; + + return n; +} + +X_EXTERN void +X_PFX (list_foreach) (x_list *lst, + void (*fun) (void *data, void *user_data), + void *user_data) +{ + for (; lst != NULL; lst = lst->next) + { + (*fun) (lst->data, user_data); + } +} + +static x_list * +list_sort_1 (x_list *lst, int length, + int (*less) (const void *, const void *)) +{ + x_list *mid, *ptr; + x_list *out_head, *out; + int mid_point, i; + + /* This is a standard (stable) list merge sort */ + + if (length < 2) + return lst; + + /* Calculate the halfway point. Split the list into two sub-lists. */ + + mid_point = length / 2; + ptr = lst; + for (i = mid_point - 1; i > 0; i--) + ptr = ptr->next; + mid = ptr->next; + ptr->next = NULL; + + /* Sort each sub-list. */ + + lst = list_sort_1 (lst, mid_point, less); + mid = list_sort_1 (mid, length - mid_point, less); + + /* Then merge them back together. */ + + assert (lst != NULL && mid != NULL); + + if ((*less) (mid->data, lst->data)) + out = out_head = mid, mid = mid->next; + else + out = out_head = lst, lst = lst->next; + + while (lst != NULL && mid != NULL) + { + if ((*less) (mid->data, lst->data)) + out = out->next = mid, mid = mid->next; + else + out = out->next = lst, lst = lst->next; + } + + if (lst != NULL) + out->next = lst; + else + out->next = mid; + + return out_head; +} + +X_EXTERN x_list * +X_PFX (list_sort) (x_list *lst, int (*less) (const void *, const void *)) +{ + int length; + + length = X_PFX (list_length) (lst); + + return list_sort_1 (lst, length, less); +} diff --git a/xorg-server-1.4/hw/darwin/quartz/xpr/x-list.h b/xorg-server-1.4/hw/darwin/quartz/xpr/x-list.h new file mode 100644 index 0000000..04af024 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/xpr/x-list.h @@ -0,0 +1,77 @@ +/* x-list.h -- simple list type + + Copyright (c) 2002 Apple Computer, 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 ABOVE LISTED COPYRIGHT + HOLDER(S) 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(s) of the above + 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. */ + +#ifndef X_LIST_H +#define X_LIST_H 1 + +/* This is just a cons. */ + +typedef struct x_list_struct x_list; + +struct x_list_struct { + void *data; + x_list *next; +}; + +#ifndef X_PFX +# define X_PFX(x) x_ ## x +#endif + +#ifndef X_EXTERN +# define X_EXTERN __private_extern__ +#endif + +X_EXTERN void X_PFX (list_free_1) (x_list *node); +X_EXTERN x_list *X_PFX (list_prepend) (x_list *lst, void *data); + +X_EXTERN x_list *X_PFX (list_append) (x_list *lst, void *data); +X_EXTERN x_list *X_PFX (list_remove) (x_list *lst, void *data); +X_EXTERN void X_PFX (list_free) (x_list *lst); +X_EXTERN x_list *X_PFX (list_pop) (x_list *lst, void **data_ret); + +X_EXTERN x_list *X_PFX (list_copy) (x_list *lst); +X_EXTERN x_list *X_PFX (list_reverse) (x_list *lst); +X_EXTERN x_list *X_PFX (list_find) (x_list *lst, void *data); +X_EXTERN x_list *X_PFX (list_nth) (x_list *lst, int n); +X_EXTERN x_list *X_PFX (list_filter) (x_list *src, + int (*pred) (void *item, void *data), + void *data); +X_EXTERN x_list *X_PFX (list_map) (x_list *src, + void *(*fun) (void *item, void *data), + void *data); + +X_EXTERN unsigned int X_PFX (list_length) (x_list *lst); +X_EXTERN void X_PFX (list_foreach) (x_list *lst, void (*fun) + (void *data, void *user_data), + void *user_data); + +X_EXTERN x_list *X_PFX (list_sort) (x_list *lst, int (*less) (const void *, + const void *)); + +#endif /* X_LIST_H */ diff --git a/xorg-server-1.4/hw/darwin/quartz/xpr/xprAppleWM.c b/xorg-server-1.4/hw/darwin/quartz/xpr/xprAppleWM.c new file mode 100644 index 0000000..fdf404c --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/xpr/xprAppleWM.c @@ -0,0 +1,99 @@ +/* + * Xplugin rootless implementation functions for AppleWM extension + */ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2003 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "xpr.h" +#include "quartz/applewmExt.h" +#include "rootless.h" +#include "Xplugin.h" +#include + +static int xprSetWindowLevel( + WindowPtr pWin, + int level) +{ + xp_window_id wid; + xp_window_changes wc; + + wid = (xp_window_id) RootlessFrameForWindow (pWin, TRUE); + if (wid == 0) + return BadWindow; + + RootlessStopDrawing (pWin, FALSE); + + wc.window_level = level; + if (xp_configure_window (wid, XP_WINDOW_LEVEL, &wc) != Success) { + return BadValue; + } + + return Success; +} + + +static int xprFrameDraw( + WindowPtr pWin, + int class, + unsigned int attr, + const BoxRec *outer, + const BoxRec *inner, + unsigned int title_len, + const unsigned char *title_bytes) +{ + xp_window_id wid; + + wid = (xp_window_id) RootlessFrameForWindow (pWin, FALSE); + if (wid == 0) + return BadWindow; + + if (xp_frame_draw (wid, class, attr, outer, inner, + title_len, title_bytes) != Success) + { + return BadValue; + } + + return Success; +} + + +static AppleWMProcsRec xprAppleWMProcs = { + xp_disable_update, + xp_reenable_update, + xprSetWindowLevel, + xp_frame_get_rect, + xp_frame_hit_test, + xprFrameDraw +}; + + +void xprAppleWMInit(void) +{ + AppleWMExtensionInit(&xprAppleWMProcs); +} diff --git a/xorg-server-1.4/hw/darwin/quartz/xpr/xprCursor.c b/xorg-server-1.4/hw/darwin/quartz/xpr/xprCursor.c new file mode 100644 index 0000000..e7f23b7 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/xpr/xprCursor.c @@ -0,0 +1,421 @@ +/************************************************************** + * + * Xplugin cursor support + * + **************************************************************/ +/* + * Copyright (c) 2001 Torrey T. Lyons and Greg Parker. + * Copyright (c) 2002 Apple Computer, 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "quartz/quartzCommon.h" +#include "xpr.h" +#include "darwin.h" +#include "Xplugin.h" + +#include "mi.h" +#include "scrnintstr.h" +#include "cursorstr.h" +#include "mipointrst.h" +#include "windowstr.h" +#include "globals.h" +#include "servermd.h" +#include "dixevents.h" + +typedef struct { + int cursorVisible; + QueryBestSizeProcPtr QueryBestSize; + miPointerSpriteFuncPtr spriteFuncs; +} QuartzCursorScreenRec, *QuartzCursorScreenPtr; + +static int darwinCursorScreenIndex = -1; +static unsigned long darwinCursorGeneration = 0; + +#define CURSOR_PRIV(pScreen) \ + ((QuartzCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr) + + +static Bool +load_cursor(CursorPtr src, int screen) +{ + uint32_t *data; + uint32_t rowbytes; + int width, height; + int hot_x, hot_y; + + uint32_t fg_color, bg_color; + uint8_t *srow, *sptr; + uint8_t *mrow, *mptr; + uint32_t *drow, *dptr; + unsigned xcount, ycount; + + xp_error err; + + width = src->bits->width; + height = src->bits->height; + hot_x = src->bits->xhot; + hot_y = src->bits->yhot; + +#ifdef ARGB_CURSOR + if (src->bits->argb != NULL) + { + rowbytes = src->bits->width * sizeof(CARD32); + data = (uint32_t *) src->bits->argb; + } + else +#endif + { + fg_color = 0xFF00 | (src->foreRed >> 8); + fg_color <<= 16; + fg_color |= src->foreGreen & 0xFF00; + fg_color |= src->foreBlue >> 8; + + bg_color = 0xFF00 | (src->backRed >> 8); + bg_color <<= 16; + bg_color |= src->backGreen & 0xFF00; + bg_color |= src->backBlue >> 8; + + fg_color = htonl(fg_color); + bg_color = htonl(bg_color); + + /* round up to 8 pixel boundary so we can convert whole bytes */ + rowbytes = ((src->bits->width * 4) + 31) & ~31; + data = alloca(rowbytes * src->bits->height); + + if (!src->bits->emptyMask) + { + ycount = src->bits->height; + srow = src->bits->source; mrow = src->bits->mask; + drow = data; + + while (ycount-- > 0) + { + xcount = (src->bits->width + 7) / 8; + sptr = srow; mptr = mrow; + dptr = drow; + + while (xcount-- > 0) + { + uint8_t s, m; + int i; + + s = *sptr++; m = *mptr++; + for (i = 0; i < 8; i++) + { +#if BITMAP_BIT_ORDER == MSBFirst + if (m & 128) + *dptr++ = (s & 128) ? fg_color : bg_color; + else + *dptr++ = 0; + s <<= 1; m <<= 1; +#else + if (m & 1) + *dptr++ = (s & 1) ? fg_color : bg_color; + else + *dptr++ = 0; + s >>= 1; m >>= 1; +#endif + } + } + + srow += BitmapBytePad(src->bits->width); + mrow += BitmapBytePad(src->bits->width); + drow = (uint32_t *) ((char *) drow + rowbytes); + } + } + else + { + memset(data, 0, src->bits->height * rowbytes); + } + } + + err = xp_set_cursor(width, height, hot_x, hot_y, data, rowbytes); + return err == Success; +} + + +/* +=========================================================================== + + Pointer sprite functions + +=========================================================================== +*/ + +/* + * QuartzRealizeCursor + * Convert the X cursor representation to native format if possible. + */ +static Bool +QuartzRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) +{ + if(pCursor == NULL || pCursor->bits == NULL) + return FALSE; + + /* FIXME: cache ARGB8888 representation? */ + + return TRUE; +} + + +/* + * QuartzUnrealizeCursor + * Free the storage space associated with a realized cursor. + */ +static Bool +QuartzUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) +{ + return TRUE; +} + + +/* + * QuartzSetCursor + * Set the cursor sprite and position. + */ +static void +QuartzSetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + if (!quartzServerVisible) + return; + + if (pCursor == NULL) + { + if (ScreenPriv->cursorVisible) + { + xp_hide_cursor(); + ScreenPriv->cursorVisible = FALSE; + } + } + else + { + load_cursor(pCursor, pScreen->myNum); + + if (!ScreenPriv->cursorVisible) + { + xp_show_cursor(); + ScreenPriv->cursorVisible = TRUE; + } + } +} + + +/* + * QuartzMoveCursor + * Move the cursor. This is a noop for us. + */ +static void +QuartzMoveCursor(ScreenPtr pScreen, int x, int y) +{ +} + + +static miPointerSpriteFuncRec quartzSpriteFuncsRec = { + QuartzRealizeCursor, + QuartzUnrealizeCursor, + QuartzSetCursor, + QuartzMoveCursor +}; + + +/* +=========================================================================== + + Pointer screen functions + +=========================================================================== +*/ + +/* + * QuartzCursorOffScreen + */ +static Bool +QuartzCursorOffScreen(ScreenPtr *pScreen, int *x, int *y) +{ + return FALSE; +} + + +/* + * QuartzCrossScreen + */ +static void +QuartzCrossScreen(ScreenPtr pScreen, Bool entering) +{ + return; +} + + +/* + * QuartzWarpCursor + * Change the cursor position without generating an event or motion history. + * The input coordinates (x,y) are in pScreen-local X11 coordinates. + * + */ +static void +QuartzWarpCursor(ScreenPtr pScreen, int x, int y) +{ + static Bool neverMoved = TRUE; + + if (neverMoved) + { + /* Don't move the cursor the first time. This is the + jump-to-center initialization, and it's annoying. */ + neverMoved = FALSE; + return; + } + + if (quartzServerVisible) + { + int sx, sy; + + sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + CGWarpMouseCursorPosition(CGPointMake(sx + x, sy + y)); + } + + miPointerWarpCursor(pScreen, x, y); + miPointerUpdate(); +} + + +static miPointerScreenFuncRec quartzScreenFuncsRec = { + QuartzCursorOffScreen, + QuartzCrossScreen, + QuartzWarpCursor, + DarwinEQPointerPost, + DarwinEQSwitchScreen +}; + + +/* +=========================================================================== + + Other screen functions + +=========================================================================== +*/ + +/* + * QuartzCursorQueryBestSize + * Handle queries for best cursor size + */ +static void +QuartzCursorQueryBestSize(int class, unsigned short *width, + unsigned short *height, ScreenPtr pScreen) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + if (class == CursorShape) + { + /* FIXME: query window server? */ + *width = 32; + *height = 32; + } + else + { + (*ScreenPriv->QueryBestSize)(class, width, height, pScreen); + } +} + +/* + * QuartzInitCursor + * Initialize cursor support + */ +Bool +QuartzInitCursor(ScreenPtr pScreen) +{ + QuartzCursorScreenPtr ScreenPriv; + miPointerScreenPtr PointPriv; + + /* initialize software cursor handling (always needed as backup) */ + if (!miDCInitialize(pScreen, &quartzScreenFuncsRec)) + return FALSE; + + /* allocate private storage for this screen's QuickDraw cursor info */ + if (darwinCursorGeneration != serverGeneration) + { + if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0) + return FALSE; + + darwinCursorGeneration = serverGeneration; + } + + ScreenPriv = xcalloc(1, sizeof(QuartzCursorScreenRec)); + if (ScreenPriv == NULL) + return FALSE; + + CURSOR_PRIV(pScreen) = ScreenPriv; + + /* override some screen procedures */ + ScreenPriv->QueryBestSize = pScreen->QueryBestSize; + pScreen->QueryBestSize = QuartzCursorQueryBestSize; + + PointPriv = (miPointerScreenPtr) pScreen->devPrivates[miPointerScreenIndex].ptr; + + ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; + PointPriv->spriteFuncs = &quartzSpriteFuncsRec; + + ScreenPriv->cursorVisible = TRUE; + return TRUE; +} + + +/* + * QuartzSuspendXCursor + * X server is hiding. Restore the Aqua cursor. + */ +void +QuartzSuspendXCursor(ScreenPtr pScreen) +{ +} + + +/* + * QuartzResumeXCursor + * X server is showing. Restore the X cursor. + */ +void +QuartzResumeXCursor(ScreenPtr pScreen, int x, int y) +{ + WindowPtr pWin; + CursorPtr pCursor; + + pWin = GetSpriteWindow(); + if (pWin->drawable.pScreen != pScreen) + return; + + pCursor = GetSpriteCursor(); + if (pCursor == NULL) + return; + + QuartzSetCursor(pScreen, pCursor, x, y); +} diff --git a/xorg-server-1.4/hw/darwin/quartz/xpr/xprFrame.c b/xorg-server-1.4/hw/darwin/quartz/xpr/xprFrame.c new file mode 100644 index 0000000..b71b2a6 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/xpr/xprFrame.c @@ -0,0 +1,495 @@ +/* + * Xplugin rootless implementation frame functions + */ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2003 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "xpr.h" +#include "rootlessCommon.h" +#include "Xplugin.h" +#include "x-hash.h" +#include "x-list.h" +#include "quartz/applewmExt.h" + +#include "propertyst.h" +#include "dix.h" +#include +#include "windowstr.h" + +#include + +#define DEFINE_ATOM_HELPER(func,atom_name) \ +static Atom func (void) { \ + static int generation; \ + static Atom atom; \ + if (generation != serverGeneration) { \ + generation = serverGeneration; \ + atom = MakeAtom (atom_name, strlen (atom_name), TRUE); \ + } \ + return atom; \ +} + +DEFINE_ATOM_HELPER(xa_native_window_id, "_NATIVE_WINDOW_ID") + +/* Maps xp_window_id -> RootlessWindowRec */ +static x_hash_table *window_hash; +static pthread_mutex_t window_hash_mutex; + +static Bool no_configure_window; + + +static inline xp_error +xprConfigureWindow(xp_window_id id, unsigned int mask, + const xp_window_changes *values) +{ + if (!no_configure_window) + return xp_configure_window(id, mask, values); + else + return XP_Success; +} + + +static void +xprSetNativeProperty(RootlessWindowPtr pFrame) +{ + xp_error err; + unsigned int native_id; + long data; + + err = xp_get_native_window((xp_window_id) pFrame->wid, &native_id); + if (err == Success) + { + /* FIXME: move this to AppleWM extension */ + + data = native_id; + ChangeWindowProperty(pFrame->win, xa_native_window_id(), + XA_INTEGER, 32, PropModeReplace, 1, &data, TRUE); + } +} + + +/* + * Create and display a new frame. + */ +Bool +xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen, + int newX, int newY, RegionPtr pShape) +{ + WindowPtr pWin = pFrame->win; + xp_window_changes wc; + unsigned int mask = 0; + xp_error err; + + wc.x = newX; + wc.y = newY; + wc.width = pFrame->width; + wc.height = pFrame->height; + wc.bit_gravity = XP_GRAVITY_NONE; + mask |= XP_BOUNDS; + + if (pWin->drawable.depth == 8) + { + wc.depth = XP_DEPTH_INDEX8; +#if 0 + wc.colormap = xprColormapCallback; + wc.colormap_data = pScreen; + mask |= XP_COLORMAP; +#endif + } + else if (pWin->drawable.depth == 15) + wc.depth = XP_DEPTH_RGB555; + else if (pWin->drawable.depth == 24) + wc.depth = XP_DEPTH_ARGB8888; + else + wc.depth = XP_DEPTH_NIL; + mask |= XP_DEPTH; + + if (pShape != NULL) + { + wc.shape_nrects = REGION_NUM_RECTS(pShape); + wc.shape_rects = REGION_RECTS(pShape); + wc.shape_tx = wc.shape_ty = 0; + mask |= XP_SHAPE; + } + + err = xp_create_window(mask, &wc, (xp_window_id *) &pFrame->wid); + + if (err != Success) + { + return FALSE; + } + + if (window_hash == NULL) + { + window_hash = x_hash_table_new(NULL, NULL, NULL, NULL); + pthread_mutex_init(&window_hash_mutex, NULL); + } + + pthread_mutex_lock(&window_hash_mutex); + x_hash_table_insert(window_hash, pFrame->wid, pFrame); + pthread_mutex_unlock(&window_hash_mutex); + + xprSetNativeProperty(pFrame); + + return TRUE; +} + + +/* + * Destroy a frame. + */ +void +xprDestroyFrame(RootlessFrameID wid) +{ + pthread_mutex_lock(&window_hash_mutex); + x_hash_table_remove(window_hash, wid); + pthread_mutex_unlock(&window_hash_mutex); + + xp_destroy_window((xp_window_id) wid); +} + + +/* + * Move a frame on screen. + */ +void +xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY) +{ + xp_window_changes wc; + + wc.x = newX; + wc.y = newY; + + xprConfigureWindow((xp_window_id) wid, XP_ORIGIN, &wc); +} + + +/* + * Resize and move a frame. + */ +void +xprResizeFrame(RootlessFrameID wid, ScreenPtr pScreen, + int newX, int newY, unsigned int newW, unsigned int newH, + unsigned int gravity) +{ + xp_window_changes wc; + + wc.x = newX; + wc.y = newY; + wc.width = newW; + wc.height = newH; + wc.bit_gravity = gravity; + + /* It's unlikely that being async will save us anything here. + But it can't hurt. */ + + xprConfigureWindow((xp_window_id) wid, XP_BOUNDS, &wc); +} + + +/* + * Change frame stacking. + */ +void +xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid) +{ + xp_window_changes wc; + + /* Stack frame below nextWid it if it exists, or raise + frame above everything otherwise. */ + + if (nextWid == NULL) + { + wc.stack_mode = XP_MAPPED_ABOVE; + wc.sibling = 0; + } + else + { + wc.stack_mode = XP_MAPPED_BELOW; + wc.sibling = (xp_window_id) nextWid; + } + + xprConfigureWindow((xp_window_id) wid, XP_STACKING, &wc); +} + + +/* + * Change the frame's shape. + */ +void +xprReshapeFrame(RootlessFrameID wid, RegionPtr pShape) +{ + xp_window_changes wc; + + if (pShape != NULL) + { + wc.shape_nrects = REGION_NUM_RECTS(pShape); + wc.shape_rects = REGION_RECTS(pShape); + } + else + { + wc.shape_nrects = -1; + wc.shape_rects = NULL; + } + + wc.shape_tx = wc.shape_ty = 0; + + xprConfigureWindow((xp_window_id) wid, XP_SHAPE, &wc); +} + + +/* + * Unmap a frame. + */ +void +xprUnmapFrame(RootlessFrameID wid) +{ + xp_window_changes wc; + + wc.stack_mode = XP_UNMAPPED; + wc.sibling = 0; + + xprConfigureWindow((xp_window_id) wid, XP_STACKING, &wc); +} + + +/* + * Start drawing to a frame. + * Prepare for direct access to its backing buffer. + */ +void +xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) +{ + void *data[2]; + unsigned int rowbytes[2]; + xp_error err; + + err = xp_lock_window((xp_window_id) wid, NULL, NULL, data, rowbytes, NULL); + if (err != Success) + FatalError("Could not lock window %i for drawing.", (int) wid); + + *pixelData = data[0]; + *bytesPerRow = rowbytes[0]; +} + + +/* + * Stop drawing to a frame. + */ +void +xprStopDrawing(RootlessFrameID wid, Bool flush) +{ + xp_unlock_window((xp_window_id) wid, flush); +} + + +/* + * Flush drawing updates to the screen. + */ +void +xprUpdateRegion(RootlessFrameID wid, RegionPtr pDamage) +{ + xp_flush_window((xp_window_id) wid); +} + + +/* + * Mark damaged rectangles as requiring redisplay to screen. + */ +void +xprDamageRects(RootlessFrameID wid, int nrects, const BoxRec *rects, + int shift_x, int shift_y) +{ + xp_mark_window((xp_window_id) wid, nrects, rects, shift_x, shift_y); +} + + +/* + * Called after the window associated with a frame has been switched + * to a new top-level parent. + */ +void +xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin) +{ + DeleteProperty(oldWin, xa_native_window_id()); + + xprSetNativeProperty(pFrame); +} + + +/* + * Called to check if the frame should be reordered when it is restacked. + */ +Bool xprDoReorderWindow(RootlessWindowPtr pFrame) +{ + WindowPtr pWin = pFrame->win; + + return AppleWMDoReorderWindow(pWin); +} + + +/* + * Copy area in frame to another part of frame. + * Used to accelerate scrolling. + */ +void +xprCopyWindow(RootlessFrameID wid, int dstNrects, const BoxRec *dstRects, + int dx, int dy) +{ + xp_copy_window((xp_window_id) wid, (xp_window_id) wid, + dstNrects, dstRects, dx, dy); +} + + +static RootlessFrameProcsRec xprRootlessProcs = { + xprCreateFrame, + xprDestroyFrame, + xprMoveFrame, + xprResizeFrame, + xprRestackFrame, + xprReshapeFrame, + xprUnmapFrame, + xprStartDrawing, + xprStopDrawing, + xprUpdateRegion, + xprDamageRects, + xprSwitchWindow, + xprDoReorderWindow, + xp_copy_bytes, + xp_fill_bytes, + xp_composite_pixels, + xprCopyWindow +}; + + +/* + * Initialize XPR implementation + */ +Bool +xprInit(ScreenPtr pScreen) +{ + RootlessInit(pScreen, &xprRootlessProcs); + + rootless_CopyBytes_threshold = xp_copy_bytes_threshold; + rootless_FillBytes_threshold = xp_fill_bytes_threshold; + rootless_CompositePixels_threshold = xp_composite_area_threshold; + rootless_CopyWindow_threshold = xp_scroll_area_threshold; + + no_configure_window = FALSE; + + return TRUE; +} + + +/* + * Given the id of a physical window, try to find the top-level (or root) + * X window that it represents. + */ +static WindowPtr +xprGetXWindow(xp_window_id wid) +{ + RootlessWindowRec *winRec; + + if (window_hash == NULL) + return NULL; + + winRec = x_hash_table_lookup(window_hash, (void *) wid, NULL); + + return winRec != NULL ? winRec->win : NULL; +} + + +/* + * The windowNumber is an AppKit window number. Returns TRUE if xpr is + * displaying a window with that number. + */ +Bool +xprIsX11Window(void *nsWindow, int windowNumber) +{ + Bool ret; + xp_window_id wid; + + if (window_hash == NULL) + return FALSE; + + /* need to lock, since this function can be called by any thread */ + + pthread_mutex_lock(&window_hash_mutex); + + if (xp_lookup_native_window(windowNumber, &wid)) + ret = xprGetXWindow(wid) != NULL; + else + ret = FALSE; + + pthread_mutex_unlock(&window_hash_mutex); + + return ret; +} + + +/* + * xprHideWindows + * Hide or unhide all top level windows. This is called for application hide/ + * unhide events if the window manager is not Apple-WM aware. Xplugin windows + * do not hide or unhide themselves. + */ +void +xprHideWindows(Bool hide) +{ + int screen; + WindowPtr pRoot, pWin; + + for (screen = 0; screen < screenInfo.numScreens; screen++) { + pRoot = WindowTable[screenInfo.screens[screen]->myNum]; + RootlessFrameID prevWid = NULL; + + for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib) { + RootlessWindowRec *winRec = WINREC(pWin); + + if (winRec != NULL) { + if (hide) { + xprUnmapFrame(winRec->wid); + } else { + BoxRec box; + + xprRestackFrame(winRec->wid, prevWid); + prevWid = winRec->wid; + + box.x1 = 0; + box.y1 = 0; + box.x2 = winRec->width; + box.y2 = winRec->height; + + xprDamageRects(winRec->wid, 1, &box, 0, 0); + RootlessQueueRedisplay(screenInfo.screens[screen]); + } + } + } + } +} diff --git a/xorg-server-1.4/hw/darwin/quartz/xpr/xprScreen.c b/xorg-server-1.4/hw/darwin/quartz/xpr/xprScreen.c new file mode 100644 index 0000000..67a0737 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/quartz/xpr/xprScreen.c @@ -0,0 +1,404 @@ +/* + * Xplugin rootless implementation screen functions + */ +/* + * Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved. + * Copyright (c) 2004 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above 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. + */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#include "quartz/quartzCommon.h" +#include "quartz/quartz.h" +#include "xpr.h" +#include "quartz/pseudoramiX.h" +#include "darwin.h" +#include "rootless.h" +#include "safeAlpha/safeAlpha.h" +#include "dri.h" +#include "globals.h" +#include "Xplugin.h" +#include "quartz/applewmExt.h" + +#ifdef DAMAGE +# include "damage.h" +#endif + +// Name of GLX bundle for native OpenGL +static const char *xprOpenGLBundle = "glxCGL.bundle"; + +/* + * eventHandler + * Callback handler for Xplugin events. + */ +static void +eventHandler(unsigned int type, const void *arg, + unsigned int arg_size, void *data) +{ + switch (type) + { + case XP_EVENT_DISPLAY_CHANGED: + QuartzMessageServerThread(kXDarwinDisplayChanged, 0); + break; + + case XP_EVENT_WINDOW_STATE_CHANGED: + if (arg_size >= sizeof(xp_window_state_event)) + { + const xp_window_state_event *ws_arg = arg; + + QuartzMessageServerThread(kXDarwinWindowState, 2, + ws_arg->id, ws_arg->state); + } + break; + + case XP_EVENT_WINDOW_MOVED: + if (arg_size == sizeof(xp_window_id)) + { + xp_window_id id = * (xp_window_id *) arg; + + QuartzMessageServerThread(kXDarwinWindowMoved, 1, id); + } + break; + + case XP_EVENT_SURFACE_DESTROYED: + case XP_EVENT_SURFACE_CHANGED: + if (arg_size == sizeof(xp_surface_id)) + { + int kind; + + if (type == XP_EVENT_SURFACE_DESTROYED) + kind = AppleDRISurfaceNotifyDestroyed; + else + kind = AppleDRISurfaceNotifyChanged; + + DRISurfaceNotify(*(xp_surface_id *) arg, kind); + } + break; + } +} + +/* + * displayScreenBounds + * Return the display ID for a particular display index. + */ +static CGDirectDisplayID +displayAtIndex(int index) +{ + CGError err; + CGDisplayCount cnt; + CGDirectDisplayID dpy[index+1]; + + err = CGGetActiveDisplayList(index + 1, dpy, &cnt); + if (err == kCGErrorSuccess && cnt == index + 1) + return dpy[index]; + else + return kCGNullDirectDisplay; +} + +/* + * displayScreenBounds + * Return the bounds of a particular display. + */ +static CGRect +displayScreenBounds(CGDirectDisplayID id) +{ + CGRect frame; + + frame = CGDisplayBounds(id); + + /* Remove menubar to help standard X11 window managers. */ + + if (frame.origin.x == 0 && frame.origin.y == 0) + { + frame.origin.y += aquaMenuBarHeight; + frame.size.height -= aquaMenuBarHeight; + } + + return frame; +} + +/* + * xprAddPseudoramiXScreens + * Add a single virtual screen encompassing all the physical screens + * with PseudoramiX. + */ +static void +xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height) +{ + CGDisplayCount i, displayCount; + CGDirectDisplayID *displayList = NULL; + CGRect unionRect = CGRectNull, frame; + + // Find all the CoreGraphics displays + CGGetActiveDisplayList(0, NULL, &displayCount); + displayList = xalloc(displayCount * sizeof(CGDirectDisplayID)); + CGGetActiveDisplayList(displayCount, displayList, &displayCount); + + /* Get the union of all screens */ + for (i = 0; i < displayCount; i++) + { + CGDirectDisplayID dpy = displayList[i]; + frame = displayScreenBounds(dpy); + unionRect = CGRectUnion(unionRect, frame); + } + + /* Use unionRect as the screen size for the X server. */ + *x = unionRect.origin.x; + *y = unionRect.origin.y; + *width = unionRect.size.width; + *height = unionRect.size.height; + + /* Tell PseudoramiX about the real screens. */ + for (i = 0; i < displayCount; i++) + { + CGDirectDisplayID dpy = displayList[i]; + + frame = displayScreenBounds(dpy); + + ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i, + (int)frame.size.width, (int)frame.size.height, + (int)frame.origin.x, (int)frame.origin.y); + + frame.origin.x -= unionRect.origin.x; + frame.origin.y -= unionRect.origin.y; + + ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n", + i, (int)frame.origin.x, (int)frame.origin.y); + + PseudoramiXAddScreen(frame.origin.x, frame.origin.y, + frame.size.width, frame.size.height); + } + + xfree(displayList); +} + +/* + * xprDisplayInit + * Find number of CoreGraphics displays and initialize Xplugin. + */ +static void +xprDisplayInit(void) +{ + CGDisplayCount displayCount; + + ErrorF("Display mode: Rootless Quartz -- Xplugin implementation\n"); + + CGGetActiveDisplayList(0, NULL, &displayCount); + + /* With PseudoramiX, the X server only sees one screen; only PseudoramiX + itself knows about all of the screens. */ + + if (noPseudoramiXExtension) + darwinScreensFound = displayCount; + else + darwinScreensFound = 1; + + if (xp_init(XP_IN_BACKGROUND) != Success) + FatalError("Could not initialize the Xplugin library."); + + xp_select_events(XP_EVENT_DISPLAY_CHANGED + | XP_EVENT_WINDOW_STATE_CHANGED + | XP_EVENT_WINDOW_MOVED + | XP_EVENT_SURFACE_CHANGED + | XP_EVENT_SURFACE_DESTROYED, + eventHandler, NULL); + + AppleDRIExtensionInit(); + xprAppleWMInit(); +} + +/* + * xprAddScreen + * Init the framebuffer and record pixmap parameters for the screen. + */ +static Bool +xprAddScreen(int index, ScreenPtr pScreen) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + + /* If no specific depth chosen, look for the depth of the main display. + Else if 16bpp specified, use that. Else use 32bpp. */ + + dfb->colorType = TrueColor; + dfb->bitsPerComponent = 8; + dfb->bitsPerPixel = 32; + dfb->colorBitsPerPixel = 24; + + if (darwinDesiredDepth == -1) + { + dfb->bitsPerComponent = CGDisplayBitsPerSample(kCGDirectMainDisplay); + dfb->bitsPerPixel = CGDisplayBitsPerPixel(kCGDirectMainDisplay); + dfb->colorBitsPerPixel = + CGDisplaySamplesPerPixel(kCGDirectMainDisplay) * + dfb->bitsPerComponent; + } + else if (darwinDesiredDepth == 15) + { + dfb->bitsPerComponent = 5; + dfb->bitsPerPixel = 16; + dfb->colorBitsPerPixel = 15; + } + else if (darwinDesiredDepth == 8) + { + dfb->colorType = PseudoColor; + dfb->bitsPerComponent = 8; + dfb->bitsPerPixel = 8; + dfb->colorBitsPerPixel = 8; + } + + if (noPseudoramiXExtension) + { + CGDirectDisplayID dpy; + CGRect frame; + + dpy = displayAtIndex(index); + + frame = displayScreenBounds(dpy); + + dfb->x = frame.origin.x; + dfb->y = frame.origin.y; + dfb->width = frame.size.width; + dfb->height = frame.size.height; + } + else + { + xprAddPseudoramiXScreens(&dfb->x, &dfb->y, &dfb->width, &dfb->height); + } + + /* Passing zero width (pitch) makes miCreateScreenResources set the + screen pixmap to the framebuffer pointer, i.e. NULL. The generic + rootless code takes care of making this work. */ + dfb->pitch = 0; + dfb->framebuffer = NULL; + + DRIScreenInit(pScreen); + + return TRUE; +} + +/* + * xprSetupScreen + * Setup the screen for rootless access. + */ +static Bool +xprSetupScreen(int index, ScreenPtr pScreen) +{ + // Add alpha protecting replacements for fb screen functions + pScreen->PaintWindowBackground = SafeAlphaPaintWindow; + pScreen->PaintWindowBorder = SafeAlphaPaintWindow; + +#ifdef RENDER + { + PictureScreenPtr ps = GetPictureScreen(pScreen); + ps->Composite = SafeAlphaComposite; + } +#endif /* RENDER */ + + // Initialize accelerated rootless drawing + // Note that this must be done before DamageSetup(). + RootlessAccelInit(pScreen); + +#ifdef DAMAGE + // The Damage extension needs to wrap underneath the + // generic rootless layer, so do it now. + if (!DamageSetup(pScreen)) + return FALSE; +#endif + + // Initialize generic rootless code + if (!xprInit(pScreen)) + return FALSE; + + return DRIFinishScreenInit(pScreen); +} + +/* + * xprUpdateScreen + * Update screen after configuation change. + */ +static void +xprUpdateScreen(ScreenPtr pScreen) +{ + rootlessGlobalOffsetX = darwinMainScreenX; + rootlessGlobalOffsetY = darwinMainScreenY; + + AppleWMSetScreenOrigin(WindowTable[pScreen->myNum]); + + RootlessRepositionWindows(pScreen); + RootlessUpdateScreenPixmap(pScreen); +} + +/* + * xprInitInput + * Finalize xpr specific setup. + */ +static void +xprInitInput(int argc, char **argv) +{ + int i; + + rootlessGlobalOffsetX = darwinMainScreenX; + rootlessGlobalOffsetY = darwinMainScreenY; + + for (i = 0; i < screenInfo.numScreens; i++) + AppleWMSetScreenOrigin(WindowTable[i]); +} + +/* + * Quartz display mode function list. + */ +static QuartzModeProcsRec xprModeProcs = { + xprDisplayInit, + xprAddScreen, + xprSetupScreen, + xprInitInput, + QuartzInitCursor, + NULL, // No need to update cursor + QuartzSuspendXCursor, + QuartzResumeXCursor, + NULL, // No capture or release in rootless mode + NULL, + NULL, // Xplugin sends screen change events directly + xprAddPseudoramiXScreens, + xprUpdateScreen, + xprIsX11Window, + xprHideWindows, + RootlessFrameForWindow, + TopLevelParent, + DRICreateSurface, + DRIDestroySurface +}; + +/* + * QuartzModeBundleInit + * Initialize the display mode bundle after loading. + */ +Bool +QuartzModeBundleInit(void) +{ + quartzProcs = &xprModeProcs; + quartzOpenGLBundle = xprOpenGLBundle; + return TRUE; +} diff --git a/xorg-server-1.4/hw/darwin/utils/Makefile.am b/xorg-server-1.4/hw/darwin/utils/Makefile.am new file mode 100644 index 0000000..11a2611 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/utils/Makefile.am @@ -0,0 +1,11 @@ +bin_PROGRAMS = dumpkeymap + +dumpkeymap_SOURCES = dumpkeymap.c + +dumpkeymap_LDFLAGS = -Wl,-framework,IOKit + +man1_MANS = dumpkeymap.man + +EXTRA_DIST = \ + README.txt \ + dumpkeymap.man diff --git a/xorg-server-1.4/hw/darwin/utils/Makefile.in b/xorg-server-1.4/hw/darwin/utils/Makefile.in new file mode 100644 index 0000000..bc2ed99 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/utils/Makefile.in @@ -0,0 +1,703 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = dumpkeymap$(EXEEXT) +subdir = hw/darwin/utils +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_dumpkeymap_OBJECTS = dumpkeymap.$(OBJEXT) +dumpkeymap_OBJECTS = $(am_dumpkeymap_OBJECTS) +dumpkeymap_LDADD = $(LDADD) +dumpkeymap_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(dumpkeymap_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(dumpkeymap_SOURCES) +DIST_SOURCES = $(dumpkeymap_SOURCES) +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(man1_MANS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +dumpkeymap_SOURCES = dumpkeymap.c +dumpkeymap_LDFLAGS = -Wl,-framework,IOKit +man1_MANS = dumpkeymap.man +EXTRA_DIST = \ + README.txt \ + dumpkeymap.man + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/darwin/utils/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/darwin/utils/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +dumpkeymap$(EXEEXT): $(dumpkeymap_OBJECTS) $(dumpkeymap_DEPENDENCIES) + @rm -f dumpkeymap$(EXEEXT) + $(dumpkeymap_LINK) $(dumpkeymap_OBJECTS) $(dumpkeymap_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dumpkeymap.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man1: $(man1_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ + done +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(MANS) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-info: install-info-am + +install-man: install-man1 + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-man + +uninstall-man: uninstall-man1 + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-man \ + uninstall-man1 + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/darwin/utils/README.txt b/xorg-server-1.4/hw/darwin/utils/README.txt new file mode 100644 index 0000000..fb6d439 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/utils/README.txt @@ -0,0 +1,111 @@ +dumpkeymap - Diagnostic dump and detailed description of .keymapping files +Version 4 + +Copyright (C)1999,2000 by Eric Sunshine +Eric Sunshine, 1 December 2000 + +OVERVIEW +======== +This package contains the diagnostic utility dumpkeymap, as well as highly +detailed documentation describing the internal layout of the Apple/NeXT +.keymapping file. + +The dumpkeymap utility displays detailed information about each .keymapping +file mentioned on the command-line. On Apple and NeXT platforms, if no +.keymapping files are mentioned on the command-line, then it will instead +dissect the key mapping currently in use by the WindowServer and AppKit. + +Documentation includes a thorough and detailed description of the internal +layout of the .keymapping file, as well as an explanation of how to interpret +the output of dumpkeymap. + +The complete set of documentation is available for perusal via dumpkeymap's +manual page (dumpkeymap.1), as well as via the command-line options described +below. + + --help + Usage summary. + --help-keymapping + Detailed discussion of the internal format of a .keymapping file. + --help-output + Explanation of dumpkeymap's output. + --help-files + List of key mapping-related files and directories. + --help-diagnostics + Explanation of diagnostic messages. + +Once the manual page is been installed, documentation can also be accessed +with the Unix `man' command: + + % man dumpkeymap + + +COMPILATION +=========== +MacOS/X, Darwin + + cc -Wall -o dumpkeymap dumpkeymap.c -framework IOKit + +MacOS/X DP4 (Developer Preview 4) + + cc -Wall -o dumpkeymap dumpkeymap.c -FKernel -framework IOKit + +MacOS/X Server, OpenStep, NextStep + + cc -Wall -o dumpkeymap dumpkeymap.c + +By default, dumpkeymap is configured to interface with the HID driver (Apple) +or event-status driver (NeXT), thus allowing it to dump the key mapping which +is currently in use by the WindowServer and AppKit. However, these facilities +are specific to Apple/NeXT. In order to build dumpkeymap for non-Apple/NeXT +platforms, you must define the DUMPKEYMAP_FILE_ONLY flag when compiling the +program. This flag inhibits use of the HID and event-status drivers and +configures dumpkeymap to work strictly with raw key mapping files. + +For example, to compile for Linux: + + gcc -Wall -DDUMPKEYMAP_FILE_ONLY -o dumpkeymap dumpkeymap.c + + +INSTALLATION +============ +Install the dumpkeymap executable image in a location mentioned in the PATH +environment variable. Typicall locations for executable files are: + + /usr/local/bin + $(HOME)/bin + +Install the manual page, dumpkeymap.1, in the `man1' subdirectory one of the +standard manual page locations or in any other location mentioned by the +MANPATH environment variable. + +Typical locations for manual pages on most Unix platforms are: + + /usr/local/man/man1 + +Typical locations for manual pages on MacOS/X, Darwin, and MacOS/X Server are: + + /usr/local/man/man1 + /Local/Documentation/ManPages/man1 + /Network/Documentation/ManPages/man1 + +Typical locations for manual pages on OpenStep and NextStep are: + + /usr/local/man/man1 + /LocalLibrary/Documentation/ManPages/man1 + /LocalDeveloper/Documentation/ManPages/man1 + + +CONCLUSION +========== +This program and its accompanying documentation were written by Eric Sunshine +and are copyright (C)1999,2000 by Eric Sunshine . + +The implementation of dumpkeymap is based upon information gathered on +September 3, 1997 by Eric Sunshine and Paul S. +McCarthy during an effort to reverse engineer the format +of the NeXT .keymapping file. + + + +$XFree86: xc/programs/Xserver/hw/darwin/utils/README.txt,v 1.1 2000/12/01 19:47:39 dawes Exp $ diff --git a/xorg-server-1.4/hw/darwin/utils/dumpkeymap.c b/xorg-server-1.4/hw/darwin/utils/dumpkeymap.c new file mode 100644 index 0000000..d2eeca5 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/utils/dumpkeymap.c @@ -0,0 +1,1453 @@ +//============================================================================= +// +// Copyright (C) 1999,2000 by Eric Sunshine +// 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. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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. +// +//============================================================================= +//----------------------------------------------------------------------------- +// dumpkeymap.c +// +// Prints a textual representation of each Apple/NeXT .keymapping file +// mentioned on the command-line. If no files are mentioned and if the +// local machine is an Apple or NeXT installation, then the key mapping +// currently in use by the WindowServer and the AppKit is printed +// instead. +// +// Invoke dumpkeymap with one of the options listed below in order to +// view detailed documentation about .keymapping files and the use of +// this program. +// +// --help: Usage summary. +// --help-keymapping: Detailed discussion of the internal format of a +// .keymapping file. +// --help-output: Explanation of dumpkeymap's output. +// --help-files: List of key mapping-related files and directories. +// --help-diagnostics: Explanation of diagnostic messages. +// +// COMPILATION INSTRUCTIONS +// +// MacOS/X, Darwin +// cc -Wall -o dumpkeymap dumpkeymap.c -framework IOKit +// +// MacOS/X DP4 (Developer Preview 4) +// cc -Wall -o dumpkeymap dumpkeymap.c -FKernel -framework IOKit +// +// MacOS/X Server, OpenStep, NextStep +// cc -Wall -o dumpkeymap dumpkeymap.c +// +// By default, dumpkeymap is configured to interface with the HID driver +// (Apple) or event-status driver (NeXT), thus allowing it to dump the +// key mapping which is currently in use by the WindowServer and AppKit. +// However, these facilities are specific to Apple/NeXT. In order to +// build dumpkeymap for non-Apple/NeXT platforms, you must define the +// DUMPKEYMAP_FILE_ONLY flag when compiling the program. This flag +// inhibits use of the HID and event-status drivers and configures +// dumpkeymap to work strictly with raw key mapping files. +// +// For example, to compile for Linux: +// gcc -Wall -DDUMPKEYMAP_FILE_ONLY -o dumpkeymap dumpkeymap.c +// +// CONCLUSION +// +// This program and its accompanying documentation were written by Eric +// Sunshine and are copyright (C)1999,2000 by Eric Sunshine +// . +// +// The implementation of dumpkeymap is based upon information gathered +// on September 3, 1997 by Eric Sunshine and +// Paul S. McCarthy during an effort to reverse +// engineer the format of the NeXT .keymapping file. +// +// HISTORY +// +// v4 2000/12/01 Eric Sunshine +// Updated manual page to work with `rman', the `man' to `HTML' +// translator. Unfortunately, however, rman is missing important +// roff features such as diversions, indentation, and tab stops, +// and is also hideously buggy, so getting the manual to work with +// rman required quite a few work-arounds. +// The manual page has now been tested with nroff (plain text), troff +// (PostScript, etc.), groff (PostScript), and rman (HTML, etc.) +// +// v3 2000/11/28 Eric Sunshine +// Considerably expanded the documentation. +// Augmented the existing description of .keymapping internals. +// Added these new documentation topics: +// - Output: Very important section describing how to interpret +// the output of dumpkeymap. +// - Files: Lists files and directories related to key mappings. +// - Diagnostics: Explains diagnostic messages issued by +// dumpkeymap. +// Created a manual page (dumpkeymap.1) which contains the complete +// set of documentation for key mapping files and dumpkeymap. +// Added command-line options (--help, --help-keymapping, +// --help-output, --help-files, --help-diagnostics) which allow +// access to all key mapping documentation. Previously the +// description of the internal layout of a .keymapping file was +// only available as source code comments. +// Added --version option. +// Ported to non-Apple/NeXT platforms. Defining the pre-processor +// flag DUMPKEYMAP_FILE_ONLY at compilation time inhibits use of +// Apple/NeXT-specific API. +// Added a README file. +// +// v2 2000/11/13 Eric Sunshine +// Converted from C++ to plain-C. +// Now parses and takes into account the "number-size" flag stored +// with each key map. This flag indicates the size, in bytes, of +// all remaining numeric values in the mapping. Updated all code +// to respect this flag. (Previously, the purpose of this field +// was unknown, and it was thus denoted as +// `KeyMapping::fill[2]'.) +// Updated all documentation; especially the "KEY MAPPING +// DESCRIPTION" section. Added discussion of the "number-size" +// flag and revamped all structure definitions to use the generic +// data type `number' instead of `uchar' or 'byte'. Clarified +// several sections of the documentation and added missing +// discussions about type definitions and the relationship of +// `interface' and `handler_id' to .keymapping and .keyboard +// files. +// Updated compilation instructions to include directions for all +// platforms on which this program might be built. +// Now published under the formal BSD license rather than a +// home-grown license. +// +// v1 1999/09/08 Eric Sunshine +// Created. +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#if !defined(DUMPKEYMAP_FILE_ONLY) +#include +#endif + +#define PROG_NAME "dumpkeymap" +#define PROG_VERSION "4" +#define AUTHOR_NAME "Eric Sunshine" +#define AUTHOR_EMAIL "sunshine@sunshineco.com" +#define AUTHOR_INFO AUTHOR_NAME " <" AUTHOR_EMAIL ">" +#define COPYRIGHT "Copyright (C) 1999,2000 by " AUTHOR_INFO + +typedef unsigned char byte; +typedef unsigned short word; +typedef unsigned int natural; +typedef unsigned long dword; +typedef dword number; + +#define ASCII_SET 0x00 +#define BIND_FUNCTION 0xfe +#define BIND_SPECIAL 0xff + +#define OPT_SWITCH(X) { char const* switched_str__=(X); if (0) { +#define OPT_CASE(X,Y) } else if (strcmp(switched_str__,(#X)) == 0 || \ + strcmp(switched_str__,(#Y)) == 0) { +#define OPT_DEFAULT } else { +#define OPT_SWITCH_END }} + +//----------------------------------------------------------------------------- +// Translation Tables +//----------------------------------------------------------------------------- +static char const* const SPECIAL_CODE[] = + { + "sound-up", + "sound-down", + "brightness-up", + "brightness-down", + "alpha-lock", + "help", + "power", + "secondary-up-arrow", + "secondary-down-arrow" + }; +#define N_SPECIAL_CODE (sizeof(SPECIAL_CODE) / sizeof(SPECIAL_CODE[0])) + +static char const* const MODIFIER_CODE[] = + { + "alpha-lock", + "shift", + "control", + "alternate", + "command", + "keypad", + "help" + }; +#define N_MODIFIER_CODE (sizeof(MODIFIER_CODE) / sizeof(MODIFIER_CODE[0])) + +static char const* const MODIFIER_MASK[] = + { + "-----", // R = carriage-return + "----L", // A = alternate + "---S-", // C = control + "---SL", // S = shift + "--C--", // L = alpha-lock + "--C-L", + "--CS-", + "--CSL", + "-A---", + "-A--L", + "-A-S-", + "-A-SL", + "-AC--", + "-AC-L", + "-ACS-", + "-ACSL", + "R----", + "R---L", + "R--S-", + "R--SL", + "R-C--", + "R-C-L", + "R-CS-", + "R-CSL", + "RA---", + "RA--L", + "RA-S-", + "RA-SL", + "RAC--", + "RAC-L", + "RACS-", + "RACSL", + }; +#define N_MODIFIER_MASK (sizeof(MODIFIER_MASK) / sizeof(MODIFIER_MASK[0])) + +#define FUNCTION_KEY_FIRST 0x20 +static char const* const FUNCTION_KEY[] = + { + "F1", // 0x20 + "F2", // 0x21 + "F3", // 0x22 + "F4", // 0x23 + "F5", // 0x24 + "F6", // 0x25 + "F7", // 0x26 + "F8", // 0x27 + "F9", // 0x28 + "F10", // 0x29 + "F11", // 0x2a + "F12", // 0x2b + "insert", // 0x2c + "delete", // 0x2d + "home", // 0x2e + "end", // 0x2f + "page up", // 0x30 + "page down", // 0x31 + "print screen", // 0x32 + "scroll lock", // 0x33 + "pause", // 0x34 + "sys-request", // 0x35 + "break", // 0x36 + "reset (HIL)", // 0x37 + "stop (HIL)", // 0x38 + "menu (HIL)", // 0x39 + "user (HIL)", // 0x3a + "system (HIL)", // 0x3b + "print (HIL)", // 0x3c + "clear line (HIL)", // 0x3d + "clear display (HIL)", // 0x3e + "insert line (HIL)", // 0x3f + "delete line (HIL)", // 0x40 + "insert char (HIL)", // 0x41 + "delete char (HIL)", // 0x42 + "prev (HIL)", // 0x43 + "next (HIL)", // 0x44 + "select (HIL)", // 0x45 + }; +#define N_FUNCTION_KEY (sizeof(FUNCTION_KEY) / sizeof(FUNCTION_KEY[0])) + + +//----------------------------------------------------------------------------- +// Data Stream Object +// Can be configured to treat embedded "numbers" as being composed of +// either 1, 2, or 4 bytes, apiece. +//----------------------------------------------------------------------------- +typedef struct _DataStream + { + byte const* data; + byte const* data_end; + natural number_size; // Size in bytes of a "number" in the stream. + } DataStream; + +static DataStream* new_data_stream( byte const* data, int size ) + { + DataStream* s = (DataStream*)malloc( sizeof(DataStream) ); + s->data = data; + s->data_end = data + size; + s->number_size = 1; // Default to byte-sized numbers. + return s; + } + +static void destroy_data_stream( DataStream* s ) + { + free(s); + } + +static int end_of_stream( DataStream* s ) + { + return (s->data >= s->data_end); + } + +static void expect_nbytes( DataStream* s, int nbytes ) + { + if (s->data + nbytes > s->data_end) + { + fputs( "Insufficient data in keymapping data stream.\n", stderr ); + exit(-1); + } + } + +static byte get_byte( DataStream* s ) + { + expect_nbytes( s, 1 ); + return *s->data++; + } + +static word get_word( DataStream* s ) + { + word hi, lo; + expect_nbytes( s, 2 ); + hi = *s->data++; + lo = *s->data++; + return ((hi << 8) | lo); + } + +static dword get_dword( DataStream* s ) + { + dword b1, b2, b3, b4; + expect_nbytes( s, 4 ); + b4 = *s->data++; + b3 = *s->data++; + b2 = *s->data++; + b1 = *s->data++; + return ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1); + } + +static number get_number( DataStream* s ) + { + switch (s->number_size) + { + case 4: return get_dword(s); + case 2: return get_word(s); + default: return get_byte(s); + } + } + + +//----------------------------------------------------------------------------- +// Translation Utility Functions +//----------------------------------------------------------------------------- +static char const* special_code_desc( number n ) + { + if (n < N_SPECIAL_CODE) + return SPECIAL_CODE[n]; + else + return "invalid"; + } + +static char const* modifier_code_desc( number n ) + { + if (n < N_MODIFIER_CODE) + return MODIFIER_CODE[n]; + else + return "invalid"; + } + +static char const* modifier_mask_desc( number n ) + { + if (n < N_MODIFIER_MASK) + return MODIFIER_MASK[n]; + else + return "?????"; + } + +static char const* function_key_desc( number n ) + { + if (n >= FUNCTION_KEY_FIRST && n < N_FUNCTION_KEY + FUNCTION_KEY_FIRST) + return FUNCTION_KEY[ n - FUNCTION_KEY_FIRST ]; + else + return "unknown"; + } + +static number bits_set( number mask ) + { + number n = 0; + for ( ; mask != 0; mask >>= 1) + if ((mask & 0x01) != 0) + n++; + return n; + } + + +//----------------------------------------------------------------------------- +// Unparse a list of Modifier records. +//----------------------------------------------------------------------------- +static void unparse_modifiers( DataStream* s ) + { + number nmod = get_number(s); // Modifier count + printf( "MODIFIERS [%lu]\n", nmod ); + while (nmod-- > 0) + { + number nscan; + number const code = get_number(s); + printf( "%s:", modifier_code_desc(code) ); + nscan = get_number(s); + while (nscan-- > 0) + printf( " 0x%02x", (natural)get_number(s) ); + putchar( '\n' ); + } + putchar( '\n' ); + } + + +//----------------------------------------------------------------------------- +// Unparse a list of Character records. +//----------------------------------------------------------------------------- +typedef void (*UnparseSpecialFunc)( number code ); + +static void unparse_char_codes( + DataStream* s, number ncodes, UnparseSpecialFunc unparse_special ) + { + if (ncodes != 0) + { + while (ncodes-- > 0) + { + number const char_set = get_number(s); + number const code = get_number(s); + putchar(' '); + switch (char_set) + { + case ASCII_SET: + { + int const c = (int)code; + if (isprint(c)) + printf( "\"%c\"", c ); + else if (code < ' ') + printf( "\"^%c\"", c + '@' ); + else + printf( "%02x", c ); + break; + } + case BIND_FUNCTION: + printf( "[%s]", function_key_desc(code) ); + break; + case BIND_SPECIAL: + unparse_special( code ); + break; + default: + printf( "%02x/%02x", (natural)char_set, (natural)code ); + break; + } + } + } + } + + +//----------------------------------------------------------------------------- +// Unparse a list of scan code bindings. +//----------------------------------------------------------------------------- +static void unparse_key_special( number code ) + { + printf( "{seq#%lu}", code ); + } + +static void unparse_characters( DataStream* s ) + { + number const NOT_BOUND = 0xff; + number const nscans = get_number(s); + number scan; + printf( "CHARACTERS [%lu]\n", nscans ); + for (scan = 0; scan < nscans; scan++) + { + number const mask = get_number(s); + printf( "scan 0x%02x: ", (natural)scan ); + if (mask == NOT_BOUND) + fputs( "not-bound\n", stdout ); + else + { + number const bits = bits_set( mask ); + number const codes = 1 << bits; + printf( "%s ", modifier_mask_desc(mask) ); + unparse_char_codes( s, codes, unparse_key_special ); + putchar( '\n' ); + } + } + putchar( '\n' ); + } + + +//----------------------------------------------------------------------------- +// Unparse a list of key sequences. +//----------------------------------------------------------------------------- +static void unparse_sequence_special( number code ) + { + printf( "{%s}", (code == 0 ? "unmodify" : modifier_code_desc(code)) ); + } + +static void unparse_sequences( DataStream* s ) + { + number const nseqs = get_number(s); + number seq; + printf( "SEQUENCES [%lu]\n", nseqs ); + for (seq = 0; seq < nseqs; seq++) + { + number const nchars = get_number(s); + printf( "sequence %lu:", seq ); + unparse_char_codes( s, nchars, unparse_sequence_special ); + putchar( '\n' ); + } + putchar( '\n' ); + } + + +//----------------------------------------------------------------------------- +// Unparse a list of special keys. +//----------------------------------------------------------------------------- +static void unparse_specials( DataStream* s ) + { + number nspecials = get_number(s); + printf( "SPECIALS [%lu]\n", nspecials ); + while (nspecials-- > 0) + { + number const special = get_number(s); + number const scan = get_number(s); + printf( "%s: 0x%02x\n", special_code_desc(special), (natural)scan ); + } + putchar( '\n' ); + } + + +//----------------------------------------------------------------------------- +// Unparse the number-size flag. +//----------------------------------------------------------------------------- +static void unparse_numeric_size( DataStream* s ) + { + word const numbers_are_shorts = get_word(s); + s->number_size = numbers_are_shorts ? 2 : 1; + } + + +//----------------------------------------------------------------------------- +// Unparse an entire key map. +//----------------------------------------------------------------------------- +static void unparse_keymap_data( DataStream* s ) + { + unparse_numeric_size(s); + unparse_modifiers(s); + unparse_characters(s); + unparse_sequences(s); + unparse_specials(s); + } + + +//----------------------------------------------------------------------------- +// Unparse the active key map. +//----------------------------------------------------------------------------- +#if !defined(DUMPKEYMAP_FILE_ONLY) +static int unparse_active_keymap( void ) + { + int rc = 1; + NXEventHandle const h = NXOpenEventStatus(); + if (h == 0) + fputs( "Unable to open event status driver.\n", stderr ); + else + { + NXKeyMapping km; + km.size = NXKeyMappingLength(h); + if (km.size <= 0) + fprintf( stderr, "Bad key mapping length (%d).\n", km.size ); + else + { + km.mapping = (char*)malloc( km.size ); + if (NXGetKeyMapping( h, &km ) == 0) + fputs( "Unable to get current key mapping.\n", stderr ); + else + { + DataStream* stream = + new_data_stream( (byte const*)km.mapping, km.size ); + fputs( "=============\nACTIVE KEYMAP\n=============\n\n", + stdout); + unparse_keymap_data( stream ); + destroy_data_stream( stream ); + rc = 0; + } + free( km.mapping ); + } + NXCloseEventStatus(h); + } + return rc; + } +#endif + + +//----------------------------------------------------------------------------- +// Unparse one key map from a keymapping file. +//----------------------------------------------------------------------------- +static void unparse_keymap( DataStream* s ) + { + dword const interface = get_dword(s); + dword const handler_id = get_dword(s); + dword const map_size = get_dword(s); + printf( "interface: 0x%02lx\nhandler_id: 0x%02lx\nmap_size: %lu bytes\n\n", + interface, handler_id, map_size ); + unparse_keymap_data(s); + } + + +//----------------------------------------------------------------------------- +// Check the magic number of a keymapping file. +//----------------------------------------------------------------------------- +static int check_magic_number( DataStream* s ) + { + return (get_byte(s) == 'K' && + get_byte(s) == 'Y' && + get_byte(s) == 'M' && + get_byte(s) == '1'); + } + + +//----------------------------------------------------------------------------- +// Unparse all key maps within a keymapping file. +//----------------------------------------------------------------------------- +static int unparse_keymaps( DataStream* s ) + { + int rc = 0; + if (check_magic_number(s)) + { + int n = 1; + while (!end_of_stream(s)) + { + printf( "---------\nKEYMAP #%d\n---------\n", n++ ); + unparse_keymap(s); + } + } + else + { + fputs( "Bad magic number.\n", stderr ); + rc = 1; + } + return rc; + } + + +//----------------------------------------------------------------------------- +// Unparse a keymapping file. +//----------------------------------------------------------------------------- +static int unparse_keymap_file( char const* const path ) + { + int rc = 1; + FILE* file; + printf( "===========\nKEYMAP FILE\n===========\n%s\n\n", path ); + file = fopen( path, "rb" ); + if (file == 0) + perror( "Unable to open key mapping file" ); + else + { + struct stat st; + if (fstat( fileno(file), &st ) != 0) + perror( "Unable to determine key mapping file size" ); + else + { + byte* buffer = (byte*)malloc( st.st_size ); + if (fread( buffer, st.st_size, 1, file ) != 1) + perror( "Unable to read key mapping file" ); + else + { + DataStream* stream = new_data_stream(buffer, (int)st.st_size); + fclose( file ); file = 0; + rc = unparse_keymaps( stream ); + destroy_data_stream( stream ); + } + free( buffer ); + } + if (file != 0) + fclose( file ); + } + return rc; + } + + +//----------------------------------------------------------------------------- +// Handle the case when no documents are mentioned on the command-line. For +// Apple/NeXT platforms, dump the currently active key mapping; else display +// an error message. +//----------------------------------------------------------------------------- +static int handle_empty_document_list( void ) + { +#if !defined(DUMPKEYMAP_FILE_ONLY) + return unparse_active_keymap(); +#else + fputs( "ERROR: Must specify at least one .keymapping file.\n\n", stderr ); + return 1; +#endif + } + + +//----------------------------------------------------------------------------- +// Print a detailed description of the internal layout of a key mapping. +//----------------------------------------------------------------------------- +static void print_internal_layout_info( FILE* f ) + { + fputs( +"What follows is a detailed descriptions of the internal layout of an\n" +"Apple/NeXT .keymapping file.\n" +"\n" +"Types and Data\n" +"--------------\n" +"The following type definitions are employed throughout this discussion:\n" +"\n" +" typedef unsigned char byte;\n" +" typedef unsigned short word;\n" +" typedef unsigned long dword;\n" +"\n" +"Additionally, the type definition `number' is used generically to indicate\n" +"a numeric value. The actual size of the `number' type may be one or two\n" +"bytes depending upon how the data is stored in the key map. Although most\n" +"key maps use byte-sized numeric values, word-sized values are also allowed.\n" +"\n" +"Multi-byte values in a key mapping file are stored in big-endian byte\n" +"order.\n" +"\n" +"Key Mapping File and Device Mapping\n" +"-----------------------------------\n" +"A key mapping file begins with a magic-number and continues with a variable\n" +"number of device-specific key mappings.\n" +"\n" +" struct KeyMappingFile {\n" +" char magic_number[4]; // `KYM1'\n" +" DeviceMapping maps[...]; // Variable number of maps\n" +" };\n" +"\n" +" struct DeviceMapping {\n" +" dword interface; // Interface type\n" +" dword handler_id; // Interface subtype\n" +" dword map_size; // Byte count of `map' (below)\n" +" KeyMapping map;\n" +" };\n" +"\n" +"The value of `interface' represents a family of keyboard device types\n" +"(such as Intel PC, ADB, NeXT, Sun Type5, etc.), and is generally\n" +"specified as one of the constant values NX_EVS_DEVICE_INTERFACE_ADB,\n" +"NX_EVS_DEVICE_INTERFACE_ACE, etc., which are are defined in IOHIDTypes.h on\n" +"MacOS/X and Darwin, and in ev_types.h on MacOS/X Server, OpenStep, and\n" +"NextStep.\n" +"\n" +"The value of `handler_id' represents a specific keyboard layout within the\n" +"much broader `interface' family. For instance, for a 101-key Intel PC\n" +"keyboard (of type NX_EVS_DEVICE_INTERFACE_ACE) the `handler_id' is '0',\n" +"whereas for a 102-key keyboard it is `1'.\n" +"\n" +"Together, `interface' and `handler_id' identify the exact keyboard hardware\n" +"to which this mapping applies. Programs which display a visual\n" +"representation of a keyboard layout, match `interface' and `handler_id'\n" +"from the .keymapping file against the `interface' and `handler_id' values\n" +"found in each .keyboard file.\n" +"\n" +"Key Mapping\n" +"-----------\n" +"A key mapping completely defines the relationship of all scan codes with\n" +"their associated functionality. A KeyMapping structure is embedded within\n" +"the DeviceMapping structure in a KeyMappingFile. The key mapping currently\n" +"in use by the WindowServer and AppKit is also represented by a KeyMapping\n" +"structure, and can be referred to directly by calling NXGetKeyMapping() and\n" +"accessing the `mapping' data member of the returned NXKeyMapping structure.\n" +"\n" +" struct KeyMapping {\n" +" word number_size; // 0=1 byte, non-zero=2 bytes\n" +" number num_modifier_groups; // Modifier groups\n" +" ModifierGroup modifier_groups[...];\n" +" number num_scan_codes; // Scan groups\n" +" ScanGroup scan_table[...];\n" +" number num_sequence_lists; // Sequence lists\n" +" Sequence sequence_lists[...];\n" +" number num_special_keys; // Special keys\n" +" SpecialKey special_key[...];\n" +" };\n" +"\n" +"The `number_size' flag determines the size, in bytes, of all remaining\n" +"numeric values (denoted by the type definition `number') within the key\n" +"mapping. If its value is zero, then numbers are represented by a single\n" +"byte. If it is non-zero, then numbers are represented by a word (two\n" +"bytes).\n" +"\n" +"Modifier Group\n" +"--------------\n" +"A modifier group defines all scan codes which map to a particular type of\n" +"modifier, such as `shift', `control', etc.\n" +"\n" +" enum Modifier {\n" +" ALPHALOCK = 0,\n" +" SHIFT,\n" +" CONTROL,\n" +" ALTERNATE,\n" +" COMMAND,\n" +" KEYPAD,\n" +" HELP\n" +" };\n" +"\n" +" struct ModifierGroup {\n" +" number modifier; // A Modifier constant\n" +" number num_scan_codes;\n" +" number scan_codes[...]; // Variable number of scan codes\n" +" };\n" +"\n" +"The scan_codes[] array contains a list of all scan codes which map to the\n" +"specified modifier. The `shift', `command', and `alternate' modifiers are\n" +"frequently mapped to two different scan codes, apiece, since these\n" +"modifiers often appear on both the left and right sides of the keyboard.\n" +"\n" +"Scan Group\n" +"----------\n" +"There is one ScanGroup for each scan code generated by the given keyboard.\n" +"This number is given by KeyMapping::num_scan_codes. The first scan group\n" +"represents hardware scan code 0, the second represents scan code 1, etc.\n" +"\n" +" enum ModifierMask {\n" +" ALPHALOCK_MASK = 1 << 0,\n" +" SHIFT_MASK = 1 << 1,\n" +" CONTROL_MASK = 1 << 2,\n" +" ALTERNATE_MASK = 1 << 3,\n" +" CARRIAGE_RETURN_MASK = 1 << 4\n" +" };\n" +" #define NOT_BOUND 0xff\n" +"\n" +" struct ScanGroup {\n" +" number mask;\n" +" Character characters[...];\n" +" };\n" +"\n" +"For each scan code, `mask' defines which modifier combinations generate\n" +"characters. If `mask' is NOT_BOUND (0xff) then then this scan code does\n" +"not generate any characters ever, and its characters[] array is zero\n" +"length. Otherwise, the characters[] array contains one Character record\n" +"for each modifier combination.\n" +"\n" +"The number of records in characters[] is determined by computing (1 <<\n" +"bits_set_in_mask). In other words, if mask is zero, then zero bits are\n" +"set, so characters[] contains only one record. If `mask' is (SHIFT_MASK |\n" +"CONTROL_MASK), then two bits are set, so characters[] contains four\n" +"records.\n" +"\n" +"The first record always represents the character which is generated by that\n" +"key when no modifiers are active. The remaining records represent\n" +"characters generated by the various modifier combinations. Using the\n" +"example with the `shift' and `control' masks set, record two would\n" +"represent the character with the `shift' modifier active; record three, the\n" +"`control' modifier active; and record four, both the `shift' and `control'\n" +"modifiers active.\n" +"\n" +"As a special case, ALPHALOCK_MASK implies SHIFT_MASK, though only\n" +"ALPHALOCK_MASK appears in `mask'. In this case the same character is\n" +"generated for both the `shift' and `alpha-lock' modifiers, but only needs\n" +"to appear once in the characters[] array.\n" +"\n" +"CARRIAGE_RETURN_MASK does not actually refer to a modifier key. Instead,\n" +"it is used to distinguish the scan code which is given the special\n" +"pseudo-designation of `carriage return' key. Typically, this mask appears\n" +"solo in a ScanGroup record and only the two Character records for control-M\n" +"and control-C follow. This flag may be a throwback to an earlier time or\n" +"may be specially interpreted by the low-level keyboard driver, but its\n" +"purpose is otherwise enigmatic.\n" +"Character\n" +"---------\n" +"Each Character record indicates the character generated when this key is\n" +"pressed, as well as the character set which contains the character. Well\n" +"known character sets are `ASCII' and `Symbol'. The character set can also\n" +"be one of the meta values FUNCTION_KEY or KEY_SEQUENCE. If it is\n" +"FUNCTION_KEY then `char_code' represents a generally well-known function\n" +"key such as those enumerated by FunctionKey. If the character set is\n" +"KEY_SEQUENCE then `char_code' represents a zero-base index into\n" +"KeyMapping::sequence_lists[].\n" +"\n" +" enum CharacterSet {\n" +" ASCII = 0x00,\n" +" SYMBOL = 0x01,\n" +" ...\n" +" FUNCTION_KEY = 0xfe,\n" +" KEY_SEQUENCE = 0xff\n" +" };\n" +"\n" +" struct Character {\n" +" number set; // CharacterSet of generated character\n" +" number char_code; // Actual character generated\n" +" };\n" +"\n" +" enum FunctionKey {\n" +" F1 = 0x20, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,\n" +" INSERT, DELETE, HOME, END, PAGE_UP, PAGE_DOWN, PRINT_SCREEN,\n" +" SCROLL_LOCK, PAUSE, SYS_REQUEST, BREAK, RESET, STOP, MENU, USER,\n" +" SYSTEM, PRINT, CLEAR_LINE, CLEAR_DISPLAY, INSERT_LINE,\n" +" DELETE_LINE, INSERT_CHAR, DELETE_CHAR, PREV, NEXT, SELECT\n" +" };\n" +"\n" +"Sequence\n" +"--------\n" +"When Character::set contains the meta value KEY_SEQUENCE, the scan code is\n" +"bound to a sequence of keys rather than a single character. A sequence is\n" +"a series of modifiers and characters which are automatically generated when\n" +"the associated key is depressed.\n" +"\n" +" #define MODIFIER_KEY 0xff\n" +"\n" +" struct Sequence {\n" +" number num_chars;\n" +" Character characters[...];\n" +" };\n" +"\n" +"Each generated Character is represented as previously described, with the\n" +"exception that MODIFIER_KEY may appear in place of KEY_SEQUENCE. When the\n" +"value of Character::set is MODIFIER_KEY then Character::char_code\n" +"represents a modifier key rather than an actual character. If the modifier\n" +"represented by `char_code' is non-zero, then it indicates that the\n" +"associated modifier key has been depressed. In this case, the value is one\n" +"of the constants enumerated by Modifier (SHIFT, CONTROL, ALTERNATE, etc.).\n" +"If the value is zero then it means that the modifier keys have been\n" +"released.\n" +"\n" +"Special Key\n" +"-----------\n" +"A special key is one which is scanned directly by the Mach kernel rather\n" +"than by the WindowServer. In general, events are not generated for special\n" +"keys.\n" +"\n" +" enum SpecialKeyType {\n" +" VOLUME_UP = 0,\n" +" VOLUME_DOWN,\n" +" BRIGHTNESS_UP,\n" +" BRIGHTNESS_DOWN,\n" +" ALPHA_LOCK,\n" +" HELP,\n" +" POWER,\n" +" SECONDARY_ARROW_UP,\n" +" SECONDARY_ARROW_DOWN\n" +" };\n" +"\n" +" struct SpecialKey {\n" +" number type; // A SpecialKeyType constant\n" +" number scan_code; // Actual scan code\n" +" };\n" +"\n", f ); + } + + +//----------------------------------------------------------------------------- +// Print an explanation of the output generated by this program. +//----------------------------------------------------------------------------- +static void print_output_info( FILE* f ) + { + fputs( +"What follows is an explanation and description of the various pieces of\n" +"information emitted by dumpkeymap.\n" +"\n" +"For a more thorough discussion of any particular piece of information\n" +"described here, refer to the detailed description of the internal layout of\n" +"a key mapping given by the --help-layout option.\n" +"\n" +"Conventions\n" +"-----------\n" +"Depending upon context, some numeric values are displayed in decimal\n" +"notation, whereas others are displayed in hexadecimal notation.\n" +"Hexadecimal numbers are denoted by a `0x' prefix (for instance, `0x7b'),\n" +"except when explicitly noted otherwise.\n" +"\n" +"Key Mapping Source\n" +"------------------\n" +"The first piece of information presented about a particular key mapping is\n" +"the source from which the data was gleaned. For a .keymapping file, the\n" +"title `KEYMAP FILE' is emitted along with the path and name of the file in\n" +"question. For the key mapping currently in use by the WindowServer and\n" +"AppKit, the title `ACTIVE KEYMAP' is emitted instead.\n" +"\n" +"Device Information\n" +"------------------\n" +"Each .keymapping file may contain one or more raw key mappings. For\n" +"example, a file which maps keys to a Dvorak-style layout might contain raw\n" +"mappings for Intel PC, ADB, NeXT, and Sun Type5 keyboards.\n" +"\n" +"For each raw mapping, the following information is emitted:\n" +"\n" +" o The title `KEYMAP' along with the mapping's relative position in the\n" +" .keymapping file.\n" +" o The `interface' identifier.\n" +" o The `handler_id' sub-identifier.\n" +" o The size of the raw mapping resource counted in bytes.\n" +"\n" +"The `interface' and `handler_id' values, taken together, define a specific\n" +"keyboard device. A .keyboard file, which describes the visual layout of a\n" +"keyboard, also contains `interface' and `handler_id' identifiers. The\n" +".keyboard file corresponding to a particular key mapping can be found by\n" +"matching the `interface' and `handler_id' values from each resource.\n" +"\n" +"Modifiers\n" +"---------\n" +"Each mapping may contain zero or more modifier records which associate\n" +"hardware scan codes with modifier descriptions such as `shift', `control',\n" +"`alternate', etc. The title `MODIFIERS' is printed along with the count of\n" +"modifier records which follow. For each modifier record, the modifier's\n" +"name is printed along with a list of scan codes, in hexadecimal format,\n" +"which generate that modifier value. For example:\n" +"\n" +" MODIFIERS [4]\n" +" alternate: 0x1d 0x60\n" +" control: 0x3a\n" +" keypad: 0x52 0x53 ... 0x63 0x62\n" +" shift: 0x2a 0x36\n" +"\n" +"Characters\n" +"----------\n" +"Each mapping may contain zero or more character records which associate\n" +"hardware scan codes with the actual characters generated by those scan\n" +"codes in the presence or absence of various modifier combinations. The\n" +"title `CHARACTERS' is printed along with the count of character records\n" +"which follow. Here is a highly abbreviated example:\n" +"\n" +" CHARACTERS [9]\n" +" scan 0x00: -AC-L \"a\" \"A\" \"^A\" \"^A\" ca c7 \"^A\" \"^A\"\n" +" scan 0x07: -AC-L \"x\" \"X\" \"^X\" \"^X\" 01/b4 01/ce \"^X\" \"^X\"\n" +" scan 0x0a: ---S- \"<\" \">\"\n" +" scan 0x13: -ACS- \"2\" \"@\" \"^@\" \"^@\" b2 b3 \"^@\" \"^@\"\n" +" scan 0x24: R---- \"^M\" \"^C\"\n" +" scan 0x3e: ----- [F4]\n" +" scan 0x4a: ----- [page up]\n" +" scan 0x60: ----- {seq#3}\n" +" scan 0x68: not-bound\n" +"\n" +"For each record, the hexadecimal value of the hardware scan code is\n" +"printed, followed by a list of modifier flag combinations and the actual\n" +"characters generated by this scan code with and without modifiers applied.\n" +"\n" +"The modifier flags field is composed of a combination of single letter\n" +"representations of the various modifier types. The letters stand for:\n" +"\n" +" L - alpha-lock\n" +" S - shift\n" +" C - control\n" +" A - alternate\n" +" R - carriage-return\n" +"\n" +"As a special case, the `alpha-lock' flag also implies the `shift' flag, so\n" +"these two flags never appear together in the same record.\n" +"\n" +"The combination of modifier flags determines the meaning and number of\n" +"fields which follow. The first field after the modifier flags always\n" +"represents the character that will be generated if no modifier keys are\n" +"depressed. The remaining fields represent characters generated by the\n" +"various modifier combinations. The order of the fields follows this\n" +"general pattern:\n" +"\n" +" o The character generated by this scan code when no modifiers are in\n" +" effect is listed first.\n" +"\n" +" o If the `L' or `S' flag is active, then the shifted character\n" +" generated by this scan code is listed next.\n" +"\n" +" o If the `C' flag is active, then the control-character generated by\n" +" this scan code is listed next. Furthermore, if the `L' or `S' flag\n" +" is also active, then the shifted control-character is listed after\n" +" that.\n" +"\n" +" o If the `A' flag is active, then the alternate-character generated by\n" +" this scan code is listed next. Furthermore, if the `L' or `S' flag\n" +" is active, then the shifted alternate-character is listed after that.\n" +" If the `C' flag is also active, then the alternate-control-character\n" +" is listed next. Finally, if the `C' and `L' or `C' and `S' flags are\n" +" also active, then the shifted alternate-control-character is listed.\n" +"\n" +"The `R' flag does not actually refer to a modifier key. Instead, it is\n" +"used to distinguish the scan code which is given the special\n" +"pseudo-designation of `carriage return' key. Typically, this mask appears\n" +"solo and only the two fields for control-M and control-C follow. This flag\n" +"may be a throwback to an earlier time or may be specially interpreted by\n" +"the low-level keyboard driver, but its purpose is otherwise enigmatic.\n" +"\n" +"Recalling the example from above, the following fields can be identified:\n" +"\n" +" scan 0x00: -AC-L \"a\" \"A\" \"^A\" \"^A\" ca c7 \"^A\" \"^A\"\n" +"\n" +" o Lower-case `a' is generated when no modifiers are active.\n" +" o Upper-case `A' is generated when `shift' or `alpha-lock' are active.\n" +" o Control-A is generated when `control' is active.\n" +" o Control-A is generated when `control' and `shift' are active.\n" +" o The character represented by the hexadecimal code 0xca is generated\n" +" when `alternate' is active.\n" +" o The character represented by 0xc7 is generated when `alternate' and\n" +" `shift' (or `alpha-lock') are active.\n" +" o Control-A is generated when `alternate' and `control' are active.\n" +" o Control-A is generated when `alternate', `control' and `shift' (or\n" +" `alpha-lock') are active.\n" +"\n" +"The notation used to represent a particular generated character varies.\n" +"\n" +" o Printable ASCII characters are quoted, as in \"x\" or \"X\".\n" +"\n" +" o Control-characters are quoted and prefixed with `^', as in \"^X\".\n" +"\n" +" o Characters with values greater than 127 (0x7f) are displayed as\n" +" hexadecimal values without the `0x' prefix.\n" +"\n" +" o Characters in a non-ASCII character set (such as `Symbol') are\n" +" displayed as two hexadecimal numbers separated by a slash, as in\n" +" `01/4a'. The first number is the character set's identification code\n" +" (such as `01' for the `Symbol' set), and the second number is the\n" +" value of the generated character.\n" +"\n" +" o Non-printing special function characters are displayed with the\n" +" function's common name enclosed in brackets, as in `[page up]' or\n" +" `[F4]'.\n" +"\n" +" o If the binding represents a key sequence rather than a single\n" +" character, then the sequence's identification number is enclosed in\n" +" braces, as in `{seq#3}'.\n" +"\n" +"Recalling a few examples from above, the following interpretations can be\n" +"made:\n" +"\n" +" scan 0x07: -AC-L \"x\" \"X\" \"^X\" \"^X\" 01/b4 01/ce \"^X\" \"^X\"\n" +" scan 0x3e: ----- [F4]\n" +" scan 0x4a: ----- [page up]\n" +" scan 0x60: ----- {seq#3}\n" +"\n" +" o \"x\" and \"X\" are printable ASCII characters.\n" +" o \"^X\" is a control-character.\n" +" o `01/b4' and `01/ce' represent the character codes 0xb4 and 0xce in\n" +" the `Symbol' character set.\n" +" o Scan code 0x3e generates function-key `F4', and scan code 0x4a\n" +" generates function-key `page up'.\n" +" o Scan code 0x60 is bound to key sequence #3.\n" +"\n" +"Finally, if a scan code is not bound to any characters, then it is\n" +"annotated with the label `not-bound', as with example scan code 0x68 from\n" +"above.\n" +"\n" +"Sequences\n" +"---------\n" +"A scan code (modified and unmodified) can be bound to a key sequence rather\n" +"than generating a single character or acting as a modifier. When it is\n" +"bound to a key sequence, a series of character invocations and modifier\n" +"actions are automatically generated rather than a single keystroke.\n" +"\n" +"Each mapping may contain zero or more key sequence records. The title\n" +"`SEQUENCES' is printed along with the count of sequence records which\n" +"follow. For example:\n" +"\n" +" SEQUENCES [3]\n" +" sequence 0: \"f\" \"o\" \"o\"\n" +" sequence 1: {alternate} \"b\" \"a\" \"r\" {unmodify}\n" +" sequence 2: [home] \"b\" \"a\" \"z\"\n" +"\n" +"The notation used to represent the sequence of generated characters is\n" +"identical to the notation already described in the `Characters' section\n" +"above, with the exception that modifier actions may be interposed between\n" +"generated characters. Such modifier actions are represented by the\n" +"modifier's name enclosed in braces. The special name `{unmodify}'\n" +"indicates the release of the modifier keys.\n" +"\n" +"Thus, the sequences in the above example can be interpreted as follows:\n" +"\n" +" o Sequence #0 generates `foo'.\n" +" o Sequence #1 invokes the `alternate' modifier, generates `bar', and\n" +" then releases `alternate'.\n" +" o Sequence #2 invokes the `home' key and then generates `baz'. In a\n" +" text editor, this would probably result in `baz' being prepended to\n" +" the line of text on which the cursor resides.\n" +"\n" +"Special Keys\n" +"------------\n" +"Certain keyboards feature keys which perform some type of special purpose\n" +"function rather than generating a character or acting as a modifier. For\n" +"instance, Apple keyboards often contain a `power' key, and NeXT keyboards\n" +"have historically featured screen brightness and volume control keys.\n" +"\n" +"Each mapping may contain zero or more special-key records which associate\n" +"hardware scan codes with such special purpose functions. The title\n" +"`SPECIALS' is printed along with the count of records which follow. For\n" +"each record, the special function's name is printed along with a list of\n" +"scan codes, in hexadecimal format, which are bound to that function. For\n" +"example:\n" +"\n" +" SPECIALS [6]\n" +" alpha-lock: 0x39\n" +" brightness-down: 0x79\n" +" brightness-up: 0x74\n" +" power: 0x7f\n" +" sound-down: 0x77\n" +" sound-up: 0x73\n" +"\n", f ); + } + + +//----------------------------------------------------------------------------- +// Print a summary of the various files and directories which are related to +// key mappings. +//----------------------------------------------------------------------------- +static void print_files_info( FILE* f ) + { + fputs( +"This is a summary of the various files and directories which are related to\n" +"key mappings.\n" +"\n" +"*.keymapping\n" +" A key mapping file which precisely defines the relationship of all\n" +" hardware-specific keyboard scan-codes with their associated\n" +" functionality.\n" +"\n" +"*.keyboard\n" +" A file describing the physical layout of keys on a particular type of\n" +" keyboard. Each `key' token in this file defines the position and shape\n" +" of the key on the keyboard, as well as the associated scan code which\n" +" that key generates. A .keymapping file, on the other hand, defines the\n" +" characters which are generated by a particular scan code depending upon\n" +" the state of the various modifier keys (such as shift, control, etc.).\n" +" The `interface' and `handler_id' values from a .keymapping file are\n" +" matched against those in each .keyboard file in order to associate a\n" +" particular .keyboard file with a key mapping. Various GUI programs use\n" +" the .keyboard file to display a visual representation of a keyboard for\n" +" the user. Since these files are just plain text, they can be easily\n" +" viewed and interpreted without the aid of a specialized program, thus\n" +" dumpkeymap leaves these files alone.\n" +"\n" +"/System/Library/Keyboards\n" +"/Network/Library/Keyboards\n" +"/Local/Library/Keyboards\n" +"/Library/Keyboards\n" +" Repositories for .keymapping and .keyboard files for MacOS/X, Darwin,\n" +" and MacOS/X Server.\n" +"\n" +"/NextLibrary/Keyboards\n" +"/LocalLibrary/Keyboards\n" +" Repositories for .keymapping and .keyboard files for OpenStep and\n" +" NextStep.\n" +"\n" +"$(HOME)/Library/Keyboards\n" +" Repository for personal .keymapping and .keyboard files.\n" +"\n", f ); + } + + +//----------------------------------------------------------------------------- +// Print a list of the various diagnostic messages which may be emitted. +//----------------------------------------------------------------------------- +static void print_diagnostics_info( FILE* f ) + { + fputs( +"The following diagnostic messages may be issued to the standard error\n" +"stream.\n" +"\n" +"Unrecognized option.\n" +" An unrecognized option was specified on the command-line. Invoke\n" +" dumpkeymap with the --help option to view a list of valid options.\n" +"\n" +"Insufficient data in keymapping data stream.\n" +" The key mapping file or data stream is corrupt. Either the file has\n" +" been incorrectly truncated or a field, such as those which indicates\n" +" the number of variable records which follow, contains a corrupt value.\n" +"\n" +"The following diagnostic messages have significance only when trying to\n" +"print .keymapping files mentioned on the command-line.\n" +"\n" +"Bad magic number.\n" +" The mentioned file is not a .keymapping file. The file's content does\n" +" not start with the string `KYM1'.\n" +"\n" +"Unable to open key mapping file.\n" +" The call to fopen() failed; probably because the specified path is\n" +" invalid or dumpkeymap does not have permission to read the file.\n" +"\n" +"Unable to determine key mapping file size.\n" +" The call to fstat() failed, thus memory can not be allocated for\n" +" loading the file.\n" +"\n" +"Unable to read key mapping file.\n" +" The call to fread() failed.\n" +"\n" +"The following diagnostic messages have significance only when trying to\n" +"print the currently active key mapping when no .keymapping files have been\n" +"mentioned on the command-line.\n" +"\n" +"Unable to open event status driver.\n" +" The call to NXOpenEventStatus() failed.\n" +"\n" +"Bad key mapping length.\n" +" The call to NXKeyMappingLength() returned a bogus value.\n" +"\n" +"Unable to get current key mapping.\n" +" The call to NXGetKeyMapping() failed.\n" +"\n" +"The following diagnostic messages have significance only when using\n" +"dumpkeymap on a non-Apple/NeXT platform.\n" +"\n" +"Must specify at least one .keymapping file.\n" +" No .keymapping files were mentioned on the command-line. On\n" +" non-Apple/NeXT platforms, there is no concept of a currently active\n" +" .keymapping file, so at least one file must be mentioned on the\n" +" command-line.\n" +"\n", f ); + } + + +//----------------------------------------------------------------------------- +// Print warranty. +//----------------------------------------------------------------------------- +static void print_warranty( FILE* f ) + { + fputs( +"This software is provided by the author `AS IS' and any express or implied\n" +"WARRANTIES, including, but not limited to, the implied warranties of\n" +"MERCHANTABILITY and FITNESS FOR A PARTICULAR PURPOSE are DISCLAIMED. In NO\n" +"EVENT shall the author be LIABLE for any DIRECT, INDIRECT, INCIDENTAL,\n" +"SPECIAL, EXEMPLARY, or CONSEQUENTIAL damages (including, but not limited\n" +"to, procurement of substitute goods or services; loss of use, data, or\n" +"profits; or business interruption) however caused and on any theory of\n" +"liability, whether in contract, strict liability, or tort (including\n" +"negligence or otherwise) arising in any way out of the use of this\n" +"software, even if advised of the possibility of such damage.\n" +"\n", f ); + } + + +//----------------------------------------------------------------------------- +// Print this program's version number. +//----------------------------------------------------------------------------- +static void print_version( FILE* f ) + { + fputs( "Version " PROG_VERSION " (built " __DATE__ ")\n\n", f ); + } + + +//----------------------------------------------------------------------------- +// Print a usage summary. +//----------------------------------------------------------------------------- +static void print_usage( FILE* f ) + { + fputs( +"Usage: dumpkeymap [options] [-] [file ...]\n" +"\n" +"Prints a textual representation of each Apple/NeXT .keymapping file\n" +"mentioned on the command-line. If no files are mentioned and if the local\n" +"machine is an Apple or NeXT installation, then the key mapping currently in\n" +"use by the WindowServer and the AppKit is printed instead.\n" +"\n" +"Options:\n" +" -h --help\n" +" Display general program instructions and option summary.\n" +"\n" +" -k --help-keymapping\n" +" Display a detailed description of the internal layout of a\n" +" .keymapping file.\n" +"\n" +" -o --help-output\n" +" Display an explanation of the output generated by dumpkeymap when\n" +" dissecting a .keymapping file.\n" +"\n" +" -f --help-files\n" +" Display a summary of the various files and directories which are\n" +" related to key mappings.\n" +"\n" +" -d --help-diagnostics\n" +" Display a list of the various diagnostic messages which may be\n" +" emitted by dumpkeymap.\n" +"\n" +" -v --version\n" +" Display the dumpkeymap version number and warranty information.\n" +"\n" +" - --\n" +" Inhibit processing of options at this point in the argument list.\n" +" An occurrence of `-' or `--' in the argument list causes all\n" +" following arguments to be treated as file names even if an argument\n" +" begins with a `-' character.\n" +"\n", f ); + } + + +//----------------------------------------------------------------------------- +// Print an informational banner. +//----------------------------------------------------------------------------- +static void print_banner( FILE* f ) + { + fputs( "\n" PROG_NAME " v" PROG_VERSION " by " AUTHOR_INFO "\n" + COPYRIGHT "\n\n", f ); + } + + +//----------------------------------------------------------------------------- +// Process command-line arguments. Examine options first; collecting files +// along the way. If all is well, process collected file list. +//----------------------------------------------------------------------------- +int main( int const argc, char const* const argv[] ) + { + int rc = 0, i, nfiles = 0, more_options = 1, process_files = 1; + int* files = (int*)calloc( argc - 1, sizeof(int) ); + print_banner( stdout ); + + for (i = 1; i < argc; i++) + { + char const* const s = argv[i]; + if (!more_options || *s != '-') + files[ nfiles++ ] = i; + else + { + OPT_SWITCH(s) + OPT_CASE(-,--) + more_options = 0; + OPT_CASE(-h,--help) + print_usage( stdout ); + process_files = 0; + OPT_CASE(-k,--help-keymapping) + print_internal_layout_info( stdout ); + process_files = 0; + OPT_CASE(-o,--help-output) + print_output_info( stdout ); + process_files = 0; + OPT_CASE(-f,--help-files) + print_files_info( stdout ); + process_files = 0; + OPT_CASE(-d,--help-diagnostics) + print_diagnostics_info( stdout ); + process_files = 0; + OPT_CASE(-v,--version) + print_version( stdout ); + print_warranty( stdout ); + process_files = 0; + OPT_DEFAULT + fprintf( stderr, "ERROR: Unrecognized option: %s\n\n", s ); + process_files = 0; + rc = 1; + OPT_SWITCH_END + } + } + + if (process_files) + { + if (nfiles == 0) + rc = handle_empty_document_list(); + else + for (i = 0; i < nfiles; i++) + rc |= unparse_keymap_file( argv[files[i]] ); + } + + free( files ); + return rc; + } diff --git a/xorg-server-1.4/hw/darwin/utils/dumpkeymap.man b/xorg-server-1.4/hw/darwin/utils/dumpkeymap.man new file mode 100644 index 0000000..90a2cd0 --- /dev/null +++ b/xorg-server-1.4/hw/darwin/utils/dumpkeymap.man @@ -0,0 +1,1004 @@ +.ig +//============================================================================= +// +// Manual page for `dumpkeymap'. +// +// Copyright (C) 1999,2000 by Eric Sunshine +// 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. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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. +// +//============================================================================= +// +// $XFree86$ +// +.. +.ig +//----------------------------------------------------------------------------- +// Local identification information. +//----------------------------------------------------------------------------- +.. +.nr VE 4 \" Version number +.TH DUMPKEYMAP 1 "v\n(VE \-\- 1 December 2000" "Version \n(VE" +.de UP +1 December 2000 +.. +.ig +//----------------------------------------------------------------------------- +// Annotation Macros +// ----------------- +// Facilitate creation of annotated, non-filled blocks of text. An +// annotated block is initiated with the `AS' macro. Each annotated, +// non-filled line within the block must be introduced with the `AN' macro +// which takes three arguments. The first argument is the detail text to +// be annotated. The second is a string of spaces used to align the +// annotations by certain (broken) roff interpreters which fail to +// implement the proper set of roff commands (such as diversions, +// indentation, and tab stops). It is assumed that the spaces will be +// used with fixed-point font. The third argument is the annotation +// itself. The block should be terminated with the `AE' macro. For all +// roff interpreters which properly implement diversions, indentation, and +// tab stops, all annotations within the block are automatically aligned at +// the same horizontal position. This position is guaranteed to be just +// to the right of the widest `AN' detail line. For broken roff +// interpreters, such as `rman', the string of spaces from the second +// argument are used to align the annotations. Finally, the `AZ' macro, +// which takes a single argument, can be used to to insert a non-annotated +// line into the block which does not play a part in the calculation of +// the horizontal annotation alignment. +// +// Implementation Notes +// -------------------- +// *1* These macros utilize a diversion (named `AD'). Since the prevailing +// indentation is stored along with the diverted text, we must muck with +// the indentation level in order to prevent the indentation from being +// applied to the text a second time when `AD' is finally emitted. +// +// *2* Unfortunately, `.if' strips leading whitespace from following text, so +// `AN' uses \& to preserve the whitespace. +// +// *3* This manual page has been tested for proper formatting with troff, +// groff, nroff and rman (the `man' to `HTML' converter). Unfortunately, +// rman fails to implement many useful features such as diversions, +// indentation, and tab stops, and is also hideously buggy. Furthermore +// it identifies itself as nroff and fails to provide any further +// identification, so there is no way to create macros which specifically +// work around its limitations. Following is a list of several bugs in +// rman which the implementation of these macros must avoid: +// o Fails with multi-line conditionals within macros. +// o Fails on macro definition within multi-line conditionals. +// o Fails when macro arguments are not delimited by exactly 1 space. +// o String definition `.ds' ignores the value; uses empty "" instead. +// As a consequence of these problems, the following macros are written +// using a series of ugly single-line `.if' conditionals rather than the +// more natural multi-line `.if' and `.ie' conditionals. Also, rman fails +// to understand the common idiom of `.\"' to introduce a comment, which +// is why all comments in this file are wrapped in ignore `.ig' blocks. +//----------------------------------------------------------------------------- +.. +.de AS +.if t .nr AW 0 +.if t .nr AI \\n(.i +.if t .in -\\n(AI +.nf +.. +.de AN +.if t .if \w'\\$1'>\\n(AW .nr AW \w'\\$1' +.if t .da AD +.if t \\&\\$1\\t\\$3 +.if t .da +.if n \\&\\$1 \\$2\\$3 +.. +.de AZ +.if t .da AD +\\$1 +.if t .da +.. +.de AE +.if t .in +\\n(AIu +.if t .if \\n(AW .ta \\n(AWu+\w'\\(em'u +.if t .AD +.if t .DT +.if t .rm AD +.if t .rm AW +.fi +.. +.ig +//----------------------------------------------------------------------------- +// Bulleted list macros -- `BG' begins a bulleted list; `BU' delimits +// bulleted entries; `BE' ends a bulleted list. +//----------------------------------------------------------------------------- +.. +.de BG +.PP +.RS +.. +.de BU +.HP +\\(bu\\ \\c +.. +.de BE +.RE +.PP +.. +.ig +//----------------------------------------------------------------------------- +// Indented paragraph with stylized hanging tag macro. `TG' takes a single +// argument and treats it as the hanging tag of the indented paragraph. +// The tag is italicized in troff but not in nroff. +//----------------------------------------------------------------------------- +.. +.de TG +.TP +.ie t .I "\\$1" +.el \\$1 +.. +.ig +//----------------------------------------------------------------------------- +// Manual page for `dumpkeymap'. +//----------------------------------------------------------------------------- +.. +.SH NAME +dumpkeymap \- Dianostic dump of a .keymapping file +.SH SYNOPSIS +.B dumpkeymap +.RI [ options "] [-] [" file "...]" +.SH DESCRIPTION +.I dumpkeymap +prints a textual representation of each Apple/\c +.SM NeXT +.I .keymapping +file mentioned on the command-line. If no files are mentioned and if the +local machine is an Apple or +.SM NeXT +installation, then the key mapping currently in use by the WindowServer and the +AppKit is printed instead. +.SH OPTIONS +.TP +.B "\-h \-\^\-help" +Display general program instructions and option summary. +.TP +.B "\-k \-\^\-help\-keymapping" +Display a detailed description of the internal layout of a +.I .keymapping +file. This is the same information as that presented in the +.I "Key Mapping Description" +section of this document. +.TP +.B "\-o \-\^\-help\-output" +Display an explanation of the output generated by +.I dumpkeymap +when dissecting a +.I .keymapping +file. This is the same information as that presented in the +.I "Output Description" +section of this document. +.TP +.B "\-f \-\^\-help\-files" +Display a summary of the various files and directories which are related to +key mappings. This is the same information as that presented in the +.I "Files" +section of this document. +.TP +.B "\-d \-\^\-help\-diagnostics" +Display a list of the various diagnostic messages which may be emitted by +.I dumpkeymap. +This is the same information as that presented in the +.I "Diagnostics" +section of this document. +.TP +.B "\-v \-\^\-version" +Display the +.I dumpkeymap +version number and warranty information. +.TP +.B "\- \-\^\-" +Inhibit processing of options at this point in the argument list. An +occurrence of `\-' or `\-\^\-' in the argument list causes all following +arguments to be treated as file names even if an argument begins with a `\-' +character. +.SH "KEY MAPPING DESCRIPTION" +The following sections describe, in complete detail, the format of a raw key +mapping resource, as well as the format of the +.I .keymapping +file which encapsulates one or more raw mappings. +.SH "Types and Data" +The following type definitions are employed throughout this discussion: +.PP +.RS +.AS +.AZ "typedef unsigned char byte;" +.AZ "typedef unsigned short word;" +.AZ "typedef unsigned long dword;" +.AE +.RE +.PP +Additionally, the type definition +.RI ` number ' +is used generically to +indicate a numeric value. The actual size of the +.RI ` number ' +type may be one or two bytes depending upon how the data is stored in the key +map. Although most key maps use byte-sized numeric values, word-sized values +are also allowed. +.PP +Multi-byte values in a key mapping file are stored in big-endian byte order. +.SH "Key Mapping File and Device Mapping" +A key mapping file begins with a magic-number and continues with a +variable number of device-specific key mappings. +.PP +.RS +.AS +.AZ "struct KeyMappingFile {" +.AN " char magic_number[4];" " " "// `KYM1'" +.AN " DeviceMapping maps[...];" "" "// Variable number of maps" +.AZ }; +.AE +.PP +.AS +.AZ "struct DeviceMapping {" +.AN " dword interface;" " " "// Interface type" +.AN " dword handler_id;" "" "// Interface subtype" +.AN " dword map_size;" " " "// Byte count of `map' (below)" +.AN " KeyMapping map;" +.AZ }; +.AE +.RE +.PP +The value of `interface' represents a family of keyboard device types +(such as Intel +.SM "PC, ADB, NeXT," +Sun Type5, etc.), and is generally specified as one of the constant values +.SM "NX_EVS_DEVICE_INTERFACE_ADB, NX_EVS_DEVICE_INTERFACE_ACE," +etc., which are are defined in IOHIDTypes.h on MacOS/X and Darwin, and in +ev_types.h on MacOS/X Server, OpenStep, and NextStep. +.PP +The value of `handler_id' represents a specific keyboard layout within the +much broader `interface' family. For instance, for a 101-key Intel +.SM PC +keyboard (of type +.SM NX_EVS_DEVICE_INTERFACE_ACE\c +) the `handler_id' is '0', whereas for a 102-key keyboard it is `1'. +.PP +Together, `interface' and `handler_id' identify the exact keyboard hardware to +which this mapping applies. Programs which display a visual representation of +a keyboard layout, match `interface' and `handler_id' from the +.I .keymapping +file against the `interface' and `handler_id' values found in each +.I .keyboard +file. +.SH "Key Mapping" +A key mapping completely defines the relationship of all scan codes with their +associated functionality. A +.I KeyMapping +structure is embedded within the +.I DeviceMapping +structure in a +.IR KeyMappingFile . +The key mapping currently in use by the WindowServer and AppKit is also +represented by a +.I KeyMapping +structure, and can be referred to directly by calling NXGetKeyMapping() and +accessing the `mapping' data member of the returned +.I NXKeyMapping +structure. +.PP +.RS +.AS +.AZ "struct KeyMapping {" +.AN " word number_size;" " " "// 0=1 byte, non-zero=2 bytes" +.AN " number num_modifier_groups;" "" "// Modifier groups" +.AZ " ModifierGroup modifier_groups[...];" +.AN " number num_scan_codes;" " " "// Scan groups" +.AN " ScanGroup scan_table[...];" +.AN " number num_sequence_lists;" " " "// Sequence lists" +.AN " Sequence sequence_lists[...];" +.AN " number num_special_keys;" " " "// Special keys" +.AN " SpecialKey special_key[...];" +.AZ }; +.AE +.RE +.PP +The `number_size' flag determines the size, in bytes, of all remaining numeric +values (denoted by the type definition +.RI ` number ') +within the +key mapping. If its value is zero, then numbers are represented by a single +byte. If it is non-zero, then numbers are represented by a word (two bytes). +.SH "Modifier Group" +A modifier group defines all scan codes which map to a particular type of +modifier, such as +.IR shift , +.IR control , +etc. +.PP +.RS +.AS +.AZ "enum Modifier {" +.AZ " ALPHALOCK = 0," +.AZ " SHIFT," +.AZ " CONTROL," +.AZ " ALTERNATE," +.AZ " COMMAND," +.AZ " KEYPAD," +.AZ " HELP" +.AZ }; +.AE +.PP +.AS +.AZ "struct ModifierGroup {" +.AN " number modifier;" " " "// A Modifier constant" +.AN " number num_scan_codes;" +.AN " number scan_codes[...];" "" "// Variable number of scan codes" +.AZ }; +.AE +.RE +.PP +The scan_codes[] array contains a list of all scan codes which map to the +specified modifier. The +.IR shift ", " command ", and " alternate +modifiers are frequently mapped to two different scan codes, apiece, +since these modifiers often appear on both the left and right sides of +the keyboard. +.SH "Scan Group" +There is one +.I ScanGroup +for each scan code generated by the given keyboard. This number is given by +KeyMapping::num_scan_codes. The first scan group represents hardware scan +code 0, the second represents scan code 1, etc. +.PP +.RS +.AS +.AZ "enum ModifierMask {" +.AN " ALPHALOCK_MASK" " " "= 1 << 0," +.AN " SHIFT_MASK" " " "= 1 << 1," +.AN " CONTROL_MASK" " " "= 1 << 2," +.AN " ALTERNATE_MASK" " " "= 1 << 3," +.AN " CARRIAGE_RETURN_MASK" "" "= 1 << 4" +.AZ }; +.AZ "#define NOT_BOUND 0xff" +.AE +.PP +.AS +.AZ "struct ScanGroup {" +.AN " number mask;" +.AN " Character characters[...];" +.AZ }; +.AE +.RE +.PP +For each scan code, `mask' defines which modifier combinations generate +characters. If `mask' is +.SM NOT_BOUND +(0xff) then then this scan code does not generate any characters ever, and its +characters[] array is zero length. Otherwise, the characters[] array contains +one +.I Character +record for each modifier combination. +.PP +The number of records in characters[] is determined by computing (1 << +bits_set_in_mask). In other words, if mask is zero, then zero bits are set, +so characters[] contains only one record. If `mask' is +.SM "(SHIFT_MASK | CONTROL_MASK)," +then two bits are set, so characters[] contains four records. +.PP +The first record always represents the character which is generated by that +key when no modifiers are active. The remaining records represent characters +generated by the various modifier combinations. Using the example with the +.I shift +and +.I control +masks set, record two would represent the character with the +.I shift +modifier active; record three, the +.I control +modifier active; and record four, both the +.I shift +and +.I control +modifiers active. +.PP +As a special case, +.SM ALPHALOCK_MASK +implies +.SM SHIFT_MASK, +though only +.SM ALPHALOCK_MASK +appears in `mask'. In this case the same character is generated for both the +.I shift +and +.I alpha-lock +modifiers, but only needs to appear once in the characters[] array. +.PP +.SM CARRIAGE_RETURN_MASK +does not actually refer to a modifier key. Instead, it is used to +distinguish the scan code which is given the special pseudo-designation of +.I "carriage return" +key. Typically, this mask appears solo in a +.I ScanGroup +record and only the two +.I Character +records for control-M and control-C follow. This flag may be a throwback to +an earlier time or may be specially interpreted by the low-level keyboard +driver, but its purpose is otherwise enigmatic. +.SH Character +Each +.I Character +record indicates the character generated when this key is pressed, as well as +the character set which contains the character. Well known character sets are +.SM `ASCII' +and `Symbol'. The character set can also be one of the meta values +.SM FUNCTION_KEY +or +.SM KEY_SEQUENCE. +If it is +.SM FUNCTION_KEY +then `char_code' represents a generally well-known function key such as those +enumerated by +.I FunctionKey. +If the character set is +.SM KEY_SEQUENCE +then `char_code' represents is a zero-base index into +KeyMapping::sequence_lists[]. +.PP +.RS +.AS +.AZ "enum CharacterSet {" +.AN " ASCII" " " "= 0x00," +.AN " SYMBOL" " " "= 0x01," +.AN " ..." +.AN " FUNCTION_KEY" "" "= 0xfe," +.AN " KEY_SEQUENCE" "" "= 0xff" +.AZ }; +.AE +.PP +.AS +.AZ "struct Character {" +.AN " number set;" " " "// CharacterSet of generated character" +.AN " number char_code;" "" "// Actual character generated" +.AZ }; +.AE +.PP +.AS +.AZ "enum FunctionKey {" +.AZ " F1 = 0x20, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12," +.AZ " INSERT, DELETE, HOME, END, PAGE_UP, PAGE_DOWN, PRINT_SCREEN," +.AZ " SCROLL_LOCK, PAUSE, SYS_REQUEST, BREAK, RESET, STOP, MENU," +.AZ " USER, SYSTEM, PRINT, CLEAR_LINE, CLEAR_DISPLAY, INSERT_LINE," +.AZ " DELETE_LINE, INSERT_CHAR, DELETE_CHAR, PREV, NEXT, SELECT" +.AZ }; +.AE +.RE +.SH Sequence +When Character::set contains the meta value +.SM KEY_SEQUENCE, +the scan code is bound to a sequence of keys rather than a single character. +A sequence is a series of modifiers and characters which are automatically +generated when the associated key is depressed. +.PP +.RS +.AS +.AZ "#define MODIFIER_KEY 0xff" +.AE +.PP +.AS +.AZ "struct Sequence {" +.AN " number num_chars;" +.AN " Character characters[...];" +.AZ }; +.AE +.RE +.PP +Each generated +.I Character +is represented as previously described, with the exception that +.SM MODIFIER_KEY +may appear in place of +.SM KEY_SEQUENCE. +When the value of Character::set is +.SM MODIFIER_KEY +then Character::char_code represents a modifier key rather than an actual +character. If the modifier represented by `char_code' is non-zero, then it +indicates that the associated modifier key has been depressed. In this case, +the value is one of the constants enumerated by +.I Modifier +(\c +.SM "SHIFT, CONTROL, ALTERNATE," +etc.). If the value is zero then it means that the modifier keys have been +released. +.SH "Special Key" +A special key is one which is scanned directly by the Mach kernel rather than +by the WindowServer. In general, events are not generated for special keys. +.PP +.RS +.AS +.AZ "enum SpecialKeyType {" +.AZ " VOLUME_UP = 0," +.AZ " VOLUME_DOWN," +.AZ " BRIGHTNESS_UP," +.AZ " BRIGHTNESS_DOWN," +.AZ " ALPHA_LOCK," +.AZ " HELP," +.AZ " POWER," +.AZ " SECONDARY_ARROW_UP," +.AZ " SECONDARY_ARROW_DOWN" +.AZ }; +.AE +.PP +.AS +.AZ "struct SpecialKey {" +.AN " number type;" " " "// A SpecialKeyType constant" +.AN " number scan_code;" "" "// Actual scan code" +.AZ }; +.AE +.RE +.SH OUTPUT +What follows is an explanation and description of the various pieces of +information emitted by +.I dumpkeymap. +.PP +For a more thorough discussion of any particular piece of information described +here, refer to the detailed description of the internal layout of a key mapping +provided by the +.I "Key Mapping Description" +section above. +.SH Conventions +Depending upon context, some numeric values are displayed in decimal +notation, whereas others are displayed in hexadecimal notation. +Hexadecimal numbers are denoted by a `0x' prefix (for instance, `0x7b'), +except when explicitly noted otherwise. +.SH "Key Mapping Source" +The first piece of information presented about a particular key mapping is the +source from which the data was gleaned. For a +.I .keymapping +file, the title +.SM "`KEYMAP FILE'" +is emitted along with the path and name of the file in question. For the key +mapping currently in use by the WindowServer and AppKit, the title +.SM "`ACTIVE KEYMAP'" +is emitted instead. +.SH "Device Information" +Each +.I .keymapping +file may contain one or more raw key mappings. For example, a file which maps +keys to a Dvorak-style layout might contain raw mappings for Intel +.SM "PC, ADB, NeXT," +and Sun Type5 keyboards. +.PP +For each raw mapping, the following information is emitted: +.BG +.BU +The title +.SM `KEYMAP' +along with the mapping's relative position in the +.I .keymapping +file. +.BU +The `interface' identifier. +.BU +The `handler_id' sub-identifier. +.BU +The size of the raw mapping resource counted in bytes. +.BE +The `interface' and `handler_id' values, taken together, define a specific +keyboard device. A +.I .keyboard +file, which describes the visual layout of a keyboard, also contains +`interface' and `handler_id' identifiers. The +.I .keyboard +file corresponding to a particular key mapping can be found by matching the +`interface' and `handler_id' values from each resource. +.SH Modifiers +Each mapping may contain zero or more modifier records which associate hardware +scan codes with modifier descriptions such as +.I "shift, control, alternate," +etc. The title +.SM `MODIFIERS' +is printed along with the count of modifier records which follow. For each +modifier record, the modifier's name is printed along with a list of scan +codes, in hexadecimal format, which generate that modifier value. For example: +.PP +.RS +.nf +MODIFIERS [4] +alternate: 0x1d 0x60 +control: 0x3a +keypad: 0x52 0x53 ... 0x63 0x62 +shift: 0x2a 0x36 +.fi +.RE +.SH Characters +Each mapping may contain zero or more character records which associate +hardware scan codes with the actual characters generated by those scan +codes in the presence or absence of various modifier combinations. The +title +.SM `CHARACTERS' +is printed along with the count of character records which follow. Here is a +highly abbreviated example: +.PP +.RS +.nf +CHARACTERS [9] +scan 0x00: -AC-L "a" "A" "^A" "^A" ca c7 "^A" "^A" +scan 0x07: -AC-L "x" "X" "^X" "^X" 01/b4 01/ce "^X" "^X" +scan 0x0a: ---S- "<" ">" +scan 0x13: -ACS- "2" "@" "^@" "^@" b2 b3 "^@" "^@" +scan 0x24: R---- "^M" "^C" +scan 0x3e: ----- [F4] +scan 0x4a: ----- [page up] +scan 0x60: ----- {seq#3} +scan 0x68: not-bound +.fi +.RE +.PP +For each record, the hexadecimal value of the hardware scan code is printed, +followed by a list of modifier flag combinations and the actual characters +generated by this scan code with and without modifiers applied. +.PP +The modifier flags field is composed of a combination of single letter +representations of the various modifier types. The letters stand for: +.PP +.RS +.nf +L \- alpha-lock +S \- shift +C \- control +A \- alternate +R \- carriage-return +.fi +.RE +.PP +As a special case, the +.I alpha-lock +flag also implies the +.I shift +flag, so these two flags never appear together in the same record. +.PP +The combination of modifier flags determines the meaning and number of fields +which follow. The first field after the modifier flags always represents the +character that will be generated if no modifier keys are depressed. The +remaining fields represent characters generated by the various modifier +combinations. The order of the fields follows this general pattern: +.BG +.BU +The character generated by this scan code when no modifiers are in effect is +listed first. +.BU +If the `L' or `S' flag is active, then the shifted character generated by this +scan code is listed next. +.BU +If the `C' flag is active, then the control-character generated by this scan +code is listed next. Furthermore, if the `L' or `S' flag is also active, then +the shifted control-character is listed after that. +.BU +If the `A' flag is active, then the alternate-character generated by this scan +code is listed next. Furthermore, if the `L' or `S' flag is active, then the +shifted alternate-character is listed after that. If the `C' flag is also +active, then the alternate-control-character is listed next. Finally, if the +`C' and `L' or `C' and `S' flags are also active, then the shifted +alternate-control-character is listed. +.BE +The `R' flag does not actually refer to a modifier key. Instead, it is used to +distinguish the scan code which is given the special pseudo-designation of +.I "carriage return" +key. Typically, this mask appears solo and only the two fields for control-M +and control-C follow. This flag may be a throwback to an earlier time or may +be specially interpreted by the low-level keyboard driver, but its purpose is +otherwise enigmatic. +.PP +Recalling the example from above, the following fields can be identified: +.PP +.RS +.nf +scan 0x00: -AC-L "a" "A" "^A" "^A" ca c7 "^A" "^A" +.fi +.RE +.BG +.BU +Lower-case `a' is generated when no modifiers are active. +.BU +Upper-case `A' is generated when +.IR shift " or " alpha-lock +are active. +.BU +Control-A is generated when +.I control +is active. +.BU +Control-A is generated when +.IR control " and " shift +are active. +.BU +The character represented by the hexadecimal code 0xca is generated when +.I alternate +is active. +.BU +The character represented by 0xc7 is generated when +.IR alternate " and " shift " (or " alpha-lock ") are active." +.BU +Control-A is generated when +.IR alternate " and " control +are active. +.BU +Control-A is generated when +.IR "alternate, control" " and " shift " (or " alpha-lock ") are active." +.BE +The notation used to represent a particular generated character varies. +.BG +.BU +Printable +.SM ASCII +characters are quoted, as in "x" or "X". +.BU +Control-characters are quoted and prefixed with `^', as in "^X". +.BU +Characters with values greater than 127 (0x7f) are displayed as hexadecimal +values without the `0x' prefix. +.BU +Characters in a non-\c +.SM ASCII +character set (such as `Symbol') are displayed as two hexadecimal numbers +separated by a slash, as in `01/4a'. The first number is the character set's +identification code (such as `01' for the `Symbol' set), and the second number +is the value of the generated character. +.BU +Non-printing special function characters are displayed with the function's +common name enclosed in brackets, as in `[page up]' or `[F4]'. +.BU +If the binding represents a key sequence rather than a single character, then +the sequence's identification number is enclosed in braces, as in `{seq#3}'. +.BE +Recalling a few examples from above, the following interpretations can be made: +.PP +.RS +.nf +scan 0x07: -AC-L "x" "X" "^X" "^X" 01/b4 01/ce "^X" "^X" +scan 0x3e: ----- [F4] +scan 0x4a: ----- [page up] +scan 0x60: ----- {seq#3} +.fi +.RE +.BG +.BU +"x" and "X" are printable +.SM ASCII +characters. +.BU +"^X" is a control-character. +.BU +`01/b4' and `01/ce' represent the character codes 0xb4 and 0xce in the `Symbol' +character set. +.BU +Scan code 0x3e generates function-key `F4', and scan code 0x4a generates +function-key `page up'. +.BU +Scan code 0x60 is bound to key sequence #3. +.BE +Finally, if a scan code is not bound to any characters, then it is annotated +with the label `not-bound', as with example scan code 0x68 from above. +.SH Sequences +A scan code (modified and unmodified) can be bound to a key sequence rather +than generating a single character or acting as a modifier. When it is bound +to a key sequence, a series of character invocations and modifier actions are +automatically generated rather than a single keystroke. +.PP +Each mapping may contain zero or more key sequence records. The title +.SM `SEQUENCES' +is printed along with the count of sequence records which follow. For example: +.PP +.RS +.nf +SEQUENCES [3] +sequence 0: "f" "o" "o" +sequence 1: {alternate} "b" "a" "r" {unmodify} +sequence 2: [home] "b" "a" "z" +.fi +.RE +.PP +The notation used to represent the sequence of generated characters is +identical to the notation already described in the +.I Characters +section above, with the exception that modifier actions may be interposed +between generated characters. Such modifier actions are represented by the +modifier's name enclosed in braces. The special name `{unmodify}' indicates +the release of the modifier keys. +.PP +Thus, the sequences in the above example can be interpreted as follows: +.BG +.BU +Sequence\ #0 generates `foo'. +.BU +Sequence\ #1 invokes the +.I alternate +modifier, generates `bar', and then releases +.I alternate. +.BU +Sequence\ #2 invokes the +.I home +key and then generates `baz'. In a text editor, this would probably result in +`baz' being prepended to the line of text on which the cursor resides. +.BE +.SH Special Keys +Certain keyboards feature keys which perform some type of special purpose +function rather than generating a character or acting as a modifier. For +instance, Apple keyboards often contain a +.I power +key, and +.SM NeXT +keyboards have historically featured screen brightness and volume control keys. +.PP +Each mapping may contain zero or more special-key records which associate +hardware scan codes with such special purpose functions. The title +.SM `SPECIALS' +is printed along with the count of records which follow. For each record, the +special function's name is printed along with a list of scan codes, in +hexadecimal format, which are bound to that function. For example: +.PP +.RS +.nf +SPECIALS [6] +alpha-lock: 0x39 +brightness-down: 0x79 +brightness-up: 0x74 +power: 0x7f +sound-down: 0x77 +sound-up: 0x73 +.fi +.RE +.SH FILES +.IP *.keymapping +A key mapping file which precisely defines the relationship of all +hardware-specific keyboard scan-codes with their associated functionality. +.IP *.keyboard +A file describing the physical layout of keys on a particular type of +keyboard. Each `key' token in this file defines the position and shape of the +key on the keyboard, as well as the associated scan code which that key +generates. A +.I .keymapping +file, on the other hand, defines the characters which are generated by a +particular scan code depending upon the state of the various modifier keys +(such as +.I shift, +.I control, +etc.). The `interface' and `handler_id' values from a +.I .keymapping +file are matched against those in each +.I .keyboard +file in order to associate a particular +.I .keyboard +file with a key mapping. Various +.SM GUI +programs use the +.I .keyboard +file to display a visual representation of a keyboard for the user. Since +these files are just plain text, they can be easily viewed and interpreted +without the aid of a specialized program, thus +.I dumpkeymap +leaves these files alone. +.PP +/System/Library/Keyboards +.br +/Network/Library/Keyboards +.br +/Local/Library/Keyboards +.br +/Library/Keyboards +.RS +Repositories for +.I .keymapping +and +.I .keyboard +files for MacOS/X, Darwin, and MacOS/X Server. +.RE +.PP +/NextLibrary/Keyboards +.br +/LocalLibrary/Keyboards +.RS +Repositories for +.I .keymapping +and +.I .keyboard +files for OpenStep and NextStep. +.RE +.IP $(HOME)/Library/Keyboards +Repository for personal +.I .keymapping +and +.I .keyboard +files. +.SH DIGANOSTICS +The following diagnostic messages may be issued to the standard error stream. +.TG "Unrecognized option." +An unrecognized option was specified on the command-line. Invoke +.I dumpkeymap +with the +.B "\-\^\-help" +option to view a list of valid options. +.TG "Insufficient data in keymapping data stream." +The key mapping file or data stream is corrupt. Either the file has been +incorrectly truncated or a field, such as those which indicates the number of +variable records which follow, contains a corrupt value. +.PP +The following diagnostic messages have significance only when trying to print +.I .keymapping +files mentioned on the command-line. +.TG "Bad magic number." +The mentioned file is not a +.I .keymapping +file. The file's content does not start with the string `KYM1'. +.TG "Unable to open key mapping file." +The call to fopen() failed; probably because the specified path is invalid or +.I dumpkeymap +does not have permission to read the file. +.TG "Unable to determine key mapping file size." +The call to fstat() failed, thus memory can not be allocated for loading the +file. +.TG "Unable to read key mapping file." +The call to fread() failed. +.PP +The following diagnostic messages have significance only when trying to print +the currently active key mapping when no +.I .keymapping +files have been mentioned on the command-line. +.TG "Unable to open event status driver." +The call to NXOpenEventStatus() failed. +.TG "Bad key mapping length." +The call to NXKeyMappingLength() returned a bogus value. +.TG "Unable to get current key mapping." +The call to NXGetKeyMapping() failed. +.PP +The following diagnostic messages have significance only when using +.I dumpkeymap +on a non-Apple/\c +.SM NeXT +platform. +.TG "Must specify at least one .keymapping file." +No +.I .keymapping +files were mentioned on the command-line. On non-Apple/\c +.SM NeXT +platforms, there is no concept of a currently active +.I .keymapping +file, so at least one file must be mentioned on the command-line. +.SH AUTHOR +Eric Sunshine wrote +.I dumpkeymap +and this document, the +.I "dumpkeymap user's manual." +Both +.I dumpkeymap +and this document are copyright \(co1999,2000 by Eric Sunshine +. All rights reserved. +.PP +The implementation of +.I dumpkeymap +is based upon information gathered on September 3, 1997 by Eric Sunshine + and Paul S. McCarthy during an +effort to reverse engineer the format of the +.SM NeXT +.I .keymapping +file. +.if n .PP +.if n Version \n(VE \-\- +.if n .UP diff --git a/xorg-server-1.4/hw/dmx/Makefile.am b/xorg-server-1.4/hw/dmx/Makefile.am new file mode 100644 index 0000000..002ea11 --- /dev/null +++ b/xorg-server-1.4/hw/dmx/Makefile.am @@ -0,0 +1,116 @@ +DIST_SUBDIRS = input config glxProxy examples doc + +SUBDIRS = input config examples +bin_PROGRAMS = Xdmx + +if XINERAMA +PANORAMIX_SRCS = $(top_srcdir)/Xext/panoramiX.c +endif + +if GLX +SUBDIRS += glxProxy +GLX_LIBS = glxProxy/libglxproxy.a +GLX_SRCS = $(PANORAMIX_SRCS) dmx_glxvisuals.c dmx_glxvisuals.h +GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod \ + -I@MESA_SOURCE@/include +GLX_DEFS = @GL_CFLAGS@ +endif + +if BUILDDOCS +SUBDIRS += doc +endif + +AM_CFLAGS = \ + -DHAVE_DMX_CONFIG_H \ + $(DIX_CFLAGS) \ + $(GLX_INCS) \ + $(GLX_DEFS) \ + $(DMX_CFLAGS) \ + @DMXMODULES_CFLAGS@ + +Xdmx_SOURCES = dmx.c \ + dmxcb.c \ + dmxcb.h \ + dmxclient.h \ + dmxcmap.c \ + dmxcmap.h \ + dmx-config.h \ + dmxcursor.c \ + dmxcursor.h \ + dmxdpms.c \ + dmxdpms.h \ + dmxextension.c \ + dmxextension.h \ + dmxfont.c \ + dmxfont.h \ + dmxgc.c \ + dmxgc.h \ + dmxgcops.c \ + dmxgcops.h \ + dmx.h \ + dmxinit.c \ + dmxinit.h \ + dmxinput.c \ + dmxinput.h \ + dmxlog.c \ + dmxlog.h \ + dmxpict.c \ + dmxpict.h \ + dmxpixmap.c \ + dmxpixmap.h \ + dmxprop.c \ + dmxprop.h \ + dmxscrinit.c \ + dmxscrinit.h \ + dmxshadow.c \ + dmxshadow.h \ + dmxstat.c \ + dmxstat.h \ + dmxsync.c \ + dmxsync.h \ + dmxvisual.c \ + dmxvisual.h \ + dmxwindow.c \ + dmxwindow.h \ + $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/fb/fbcmap_mi.c \ + $(GLX_SRCS) + + +#if COMPOSITE +#Xdmx_SOURCES += fakecw.c +#endif + +Xdmx_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +Xdmx_LDADD = $(XORG_CORE_LIBS) \ + $(XDMX_LIBS) \ + $(GLX_LIBS) \ + input/libdmxinput.a \ + config/libdmxconfig.a \ + @DMXMODULES_LIBS@ + +# Man page +appmandir = $(APP_MAN_DIR) + +appman_PRE = Xdmx.man +appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) + +CLEANFILES = $(appman_DATA) + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ + XORGMANNAME = X Version 11 + +MAN_SUBSTS = \ + -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ + -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' + +SUFFIXES = .$(APP_MAN_SUFFIX) .man + +.man.$(APP_MAN_SUFFIX): + sed $(MAN_SUBSTS) < $< > $@ + +EXTRA_DIST = $(appman_PRE) + +relink: + rm -f Xdmx && $(MAKE) Xdmx diff --git a/xorg-server-1.4/hw/dmx/Makefile.in b/xorg-server-1.4/hw/dmx/Makefile.in new file mode 100644 index 0000000..8c289ab --- /dev/null +++ b/xorg-server-1.4/hw/dmx/Makefile.in @@ -0,0 +1,974 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = Xdmx$(EXEEXT) +@GLX_TRUE@am__append_1 = glxProxy +@BUILDDOCS_TRUE@am__append_2 = doc +subdir = hw/dmx +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am__Xdmx_SOURCES_DIST = dmx.c dmxcb.c dmxcb.h dmxclient.h dmxcmap.c \ + dmxcmap.h dmx-config.h dmxcursor.c dmxcursor.h dmxdpms.c \ + dmxdpms.h dmxextension.c dmxextension.h dmxfont.c dmxfont.h \ + dmxgc.c dmxgc.h dmxgcops.c dmxgcops.h dmx.h dmxinit.c \ + dmxinit.h dmxinput.c dmxinput.h dmxlog.c dmxlog.h dmxpict.c \ + dmxpict.h dmxpixmap.c dmxpixmap.h dmxprop.c dmxprop.h \ + dmxscrinit.c dmxscrinit.h dmxshadow.c dmxshadow.h dmxstat.c \ + dmxstat.h dmxsync.c dmxsync.h dmxvisual.c dmxvisual.h \ + dmxwindow.c dmxwindow.h $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/fb/fbcmap_mi.c $(top_srcdir)/Xext/panoramiX.c \ + dmx_glxvisuals.c dmx_glxvisuals.h +@XINERAMA_TRUE@am__objects_1 = panoramiX.$(OBJEXT) +@GLX_TRUE@am__objects_2 = $(am__objects_1) dmx_glxvisuals.$(OBJEXT) +am_Xdmx_OBJECTS = dmx.$(OBJEXT) dmxcb.$(OBJEXT) dmxcmap.$(OBJEXT) \ + dmxcursor.$(OBJEXT) dmxdpms.$(OBJEXT) dmxextension.$(OBJEXT) \ + dmxfont.$(OBJEXT) dmxgc.$(OBJEXT) dmxgcops.$(OBJEXT) \ + dmxinit.$(OBJEXT) dmxinput.$(OBJEXT) dmxlog.$(OBJEXT) \ + dmxpict.$(OBJEXT) dmxpixmap.$(OBJEXT) dmxprop.$(OBJEXT) \ + dmxscrinit.$(OBJEXT) dmxshadow.$(OBJEXT) dmxstat.$(OBJEXT) \ + dmxsync.$(OBJEXT) dmxvisual.$(OBJEXT) dmxwindow.$(OBJEXT) \ + miinitext.$(OBJEXT) fbcmap_mi.$(OBJEXT) $(am__objects_2) +Xdmx_OBJECTS = $(am_Xdmx_OBJECTS) +am__DEPENDENCIES_1 = +Xdmx_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(GLX_LIBS) input/libdmxinput.a config/libdmxconfig.a +Xdmx_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(Xdmx_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(Xdmx_SOURCES) +DIST_SOURCES = $(am__Xdmx_SOURCES_DIST) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +appmanDATA_INSTALL = $(INSTALL_DATA) +DATA = $(appman_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +DIST_SUBDIRS = input config glxProxy examples doc +SUBDIRS = input config examples $(am__append_1) $(am__append_2) +@XINERAMA_TRUE@PANORAMIX_SRCS = $(top_srcdir)/Xext/panoramiX.c +@GLX_TRUE@GLX_LIBS = glxProxy/libglxproxy.a +@GLX_TRUE@GLX_SRCS = $(PANORAMIX_SRCS) dmx_glxvisuals.c dmx_glxvisuals.h +@GLX_TRUE@GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod \ +@GLX_TRUE@ -I@MESA_SOURCE@/include + +@GLX_TRUE@GLX_DEFS = @GL_CFLAGS@ +AM_CFLAGS = \ + -DHAVE_DMX_CONFIG_H \ + $(DIX_CFLAGS) \ + $(GLX_INCS) \ + $(GLX_DEFS) \ + $(DMX_CFLAGS) \ + @DMXMODULES_CFLAGS@ + +Xdmx_SOURCES = dmx.c \ + dmxcb.c \ + dmxcb.h \ + dmxclient.h \ + dmxcmap.c \ + dmxcmap.h \ + dmx-config.h \ + dmxcursor.c \ + dmxcursor.h \ + dmxdpms.c \ + dmxdpms.h \ + dmxextension.c \ + dmxextension.h \ + dmxfont.c \ + dmxfont.h \ + dmxgc.c \ + dmxgc.h \ + dmxgcops.c \ + dmxgcops.h \ + dmx.h \ + dmxinit.c \ + dmxinit.h \ + dmxinput.c \ + dmxinput.h \ + dmxlog.c \ + dmxlog.h \ + dmxpict.c \ + dmxpict.h \ + dmxpixmap.c \ + dmxpixmap.h \ + dmxprop.c \ + dmxprop.h \ + dmxscrinit.c \ + dmxscrinit.h \ + dmxshadow.c \ + dmxshadow.h \ + dmxstat.c \ + dmxstat.h \ + dmxsync.c \ + dmxsync.h \ + dmxvisual.c \ + dmxvisual.h \ + dmxwindow.c \ + dmxwindow.h \ + $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/fb/fbcmap_mi.c \ + $(GLX_SRCS) + + +#if COMPOSITE +#Xdmx_SOURCES += fakecw.c +#endif +Xdmx_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +Xdmx_LDADD = $(XORG_CORE_LIBS) \ + $(XDMX_LIBS) \ + $(GLX_LIBS) \ + input/libdmxinput.a \ + config/libdmxconfig.a \ + @DMXMODULES_LIBS@ + + +# Man page +appmandir = $(APP_MAN_DIR) +appman_PRE = Xdmx.man +appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) +CLEANFILES = $(appman_DATA) + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ +XORGMANNAME = X Version 11 +MAN_SUBSTS = \ + -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ + -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' + +SUFFIXES = .$(APP_MAN_SUFFIX) .man +EXTRA_DIST = $(appman_PRE) +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/dmx/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/dmx/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +Xdmx$(EXEEXT): $(Xdmx_OBJECTS) $(Xdmx_DEPENDENCIES) + @rm -f Xdmx$(EXEEXT) + $(Xdmx_LINK) $(Xdmx_OBJECTS) $(Xdmx_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmx_glxvisuals.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxcb.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxcmap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxcursor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxdpms.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxextension.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxfont.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxgc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxgcops.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxinit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxinput.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxlog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxpict.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxpixmap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxprop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxscrinit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxshadow.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxsync.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxvisual.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxwindow.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbcmap_mi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miinitext.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panoramiX.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +miinitext.o: $(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.o -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/mi/miinitext.c' object='miinitext.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c + +miinitext.obj: $(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.obj -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/mi/miinitext.c' object='miinitext.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` + +fbcmap_mi.o: $(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap_mi.o -MD -MP -MF $(DEPDIR)/fbcmap_mi.Tpo -c -o fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/fbcmap_mi.Tpo $(DEPDIR)/fbcmap_mi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/fb/fbcmap_mi.c' object='fbcmap_mi.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c + +fbcmap_mi.obj: $(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap_mi.obj -MD -MP -MF $(DEPDIR)/fbcmap_mi.Tpo -c -o fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/fbcmap_mi.Tpo $(DEPDIR)/fbcmap_mi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/fb/fbcmap_mi.c' object='fbcmap_mi.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` + +panoramiX.o: $(top_srcdir)/Xext/panoramiX.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT panoramiX.o -MD -MP -MF $(DEPDIR)/panoramiX.Tpo -c -o panoramiX.o `test -f '$(top_srcdir)/Xext/panoramiX.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/panoramiX.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/panoramiX.Tpo $(DEPDIR)/panoramiX.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/Xext/panoramiX.c' object='panoramiX.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o panoramiX.o `test -f '$(top_srcdir)/Xext/panoramiX.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/panoramiX.c + +panoramiX.obj: $(top_srcdir)/Xext/panoramiX.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT panoramiX.obj -MD -MP -MF $(DEPDIR)/panoramiX.Tpo -c -o panoramiX.obj `if test -f '$(top_srcdir)/Xext/panoramiX.c'; then $(CYGPATH_W) '$(top_srcdir)/Xext/panoramiX.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xext/panoramiX.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/panoramiX.Tpo $(DEPDIR)/panoramiX.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/Xext/panoramiX.c' object='panoramiX.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o panoramiX.obj `if test -f '$(top_srcdir)/Xext/panoramiX.c'; then $(CYGPATH_W) '$(top_srcdir)/Xext/panoramiX.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xext/panoramiX.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-appmanDATA: $(appman_DATA) + @$(NORMAL_INSTALL) + test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)" + @list='$(appman_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \ + $(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \ + done + +uninstall-appmanDATA: + @$(NORMAL_UNINSTALL) + @list='$(appman_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \ + rm -f "$(DESTDIR)$(appmandir)/$$f"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(PROGRAMS) $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-appmanDATA + +install-dvi: install-dvi-recursive + +install-exec-am: install-binPROGRAMS + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-appmanDATA install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-appmanDATA uninstall-binPROGRAMS + + +.man.$(APP_MAN_SUFFIX): + sed $(MAN_SUBSTS) < $< > $@ + +relink: + rm -f Xdmx && $(MAKE) Xdmx +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/dmx/Xdmx.man b/xorg-server-1.4/hw/dmx/Xdmx.man new file mode 100644 index 0000000..9c8bdea --- /dev/null +++ b/xorg-server-1.4/hw/dmx/Xdmx.man @@ -0,0 +1,741 @@ +.\" $XFree86$ +.\" +.\" Copyright 2001-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: +.\" +.\" he 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. +.TH Xdmx 1 __vendorversion__ +.SH NAME +Xdmx - Distributed Multi-head X server +.SH SYNOPSIS +.B Xdmx +[:display] [option ...] +.SH DESCRIPTION +.I Xdmx +is a proxy X server that uses one or more other X servers as its display +devices. It provides multi-head X functionality for displays that might +be located on different machines. +.I Xdmx +functions as a front-end X server that acts as a proxy to a set of +back-end X servers. All of the visible rendering is passed to the +back-end X servers. Clients connect to the +.I Xdmx +front-end, and everything appears as it would in a regular multi-head +configuration. If Xinerama is enabled (e.g., with +.B +xinerama +on the command line), the clients see a single large screen. +.PP +.I Xdmx +communicates to the back-end X servers using the standard X11 protocol, +and standard and/or commonly available X server extensions. +.SH OPTIONS +In addition to the normal X server options described in the +.I Xserver(1) +manual page, +.I Xdmx +accepts the following command line switches: +.TP 8 +.BI "\-display " display-name +This specifies the name(s) of the back-end X server display(s) to connect +to. This option may be specified multiple times to connect to more than +one back-end display. The first is used as screen 0, the second as screen 1, +etc. If this option is omitted, the +.B $DISPLAY +environment variable is used as the single back-end X server display. +.sp +.TP 8 +.BI "\-xinput " input-source +This specifies the source to use for XInput extension devices. The +choices are the same as for +.BR "\-input " , +described below, except that core devices on backend servers cannot be +treated as XInput extension devices. (Although extension devices on +backend and console servers are supported as extension devices under +.IR Xdmx ). +.sp +.TP 8 +.BI "\-input " input-source +This specifies the source to use for the core input devices. The choices are: +.RS +.TP 4 +.B dummy +A set of dummy core input drivers are used. These never generate any +input events. +.sp +.TP 4 +.B local +The raw keyboard and pointer from the local computer are used. A +comma-separated list of driver names can be appended. For example, to +select the example Linux keyboard and PS/2 mouse driver use: +.BR "-input local,kbd,ps2" . +The following drivers have been implemented for Linux: kbd, ms (a +two-button Microsoft mouse driver), ps2 (a PS/2 mouse driver), usb-mou +(a USB mouse driver), usb-kbd (a USB keyboard driver), and usb-oth (a +USB non-keyboard, non-mouse driver). Additional drivers may be +implemented in the future. Appropriate defaults will be used if no +comma-separated list is provided. +.sp +.TP 4 +.I display-name +If the display-name is a back-end server, then core input events are +taken from the server specified. Otherwise, a console window will be +opened on the specified display. +.sp +If the +.I display-name +is followed by ",xi" then XInput extension devices on the display will +be used as +.I Xdmx +XInput extension devices. If the +.I display-name +is followed by ",noxi" then XInput extension devices on the display will +.B not +be used as +.I Xdmx +XInput extension devices. Currently, the default is ",xi". +.sp +If the +.I display-name +is followed by ",console" and the +.I display-name +refers to a display that is used as a backend display, then a console +window will be opened on that display +.B and +that display will be treated as a backend display. Otherwise (or if +",noconsole" is used), the display will be treated purely as a backend +or a console display, as described above. +.sp +If the +.I display-name +is followed by ",windows", then outlines of the windows on the backend +will be displayed inside the console window. Otherwise (or if +",nowindows" is used), the console window will not display the outlines +of backend windows. (This option only applies to console input.) +.sp +If the +.I display-name +is followed by ",xkb", then the next 1 to 3 comma-separated parameters +will specify the keycodes, symbols, and geometry of the keyboard for +this input device. For example, ",xkb,xfree86,pc104" will specify that +the "xfree86" keycodes and the "pc104" symbols should be used to +initialize the keyboard. For an SGI keyboard, ",xkb,sgi/indy(pc102)" +might be useful. A list of keycodes, symbols, and geometries can be +found in +.IR /usr/X11R6/lib/X11/xkb . +If this option is not specified, the input device will be queried, +perhaps using the XKEYBOARD extension. +.RE +.sp +.RS +If this option isn't specified, the default input source is the first +back-end server (the one used for screen 0). The console window shows +the layout of the back-end display(s) and pointer movements and key +presses within the console window will be used as core input devices. +.sp +Several special function keys are active, depending on the input +source: +.sp +.RS +.B Ctrl-Alt-q +will terminate the +.I Xdmx +server in all modes. +.sp +.B Ctrl-Alt-g +will toggle a +server grab in console mode (a special cursor, currently a spider, is +used to indicate an active server grab). +.sp +.B Ctrl-Alt-f +will toggle fine-grain motion in console mode (a special cursor, +currently a cross hair, is used to indicate this mode). If this mode is +combined with a server grab, then the cursor will have 4 lines instead +of only 2. +.sp +.BR Ctrl-Alt-F1 " through " Ctrl-Alt-F12 +will switch to another VC in local (raw) mode. +.RE +.RE +.sp +.TP 8 +.BI "-shadowfb" +This option turns on (legacy) support for the shadow frame buffer. +.sp +.TP 8 +.BI "-noshadowfb" +This option turns off (legacy) support for the shadow frame buffer. +Note that this option has been deprecated and will be removed in the +next release. +.sp +.TP 8 +.BI "-nomulticursor" +This option turns off support for displaying multiple cursors on +overlapped back-end displays. This option is available for testing and +benchmarking purposes. +.sp +.TP 8 +.BI "-fontpath" +This option sets the +.I Xdmx +server's default font path. This option can be specified multiple times +to accommodate multiple font paths. See the +.B "FONT PATHS" +section below for very important information regarding setting the +default font path. +.sp +.TP 8 +.BI "-configfile " filename +Specify the configuration file that should be read. Note that if the +.B \-display +command-line option is used, then the configuration file will be +ignored. +.sp +.TP 8 +.BI "-config " name +Specify a configuration to use. The +.I name +will be the name following the +.B virtual +keyword in the configuration file. +.sp +.TP 8 +.BI "-stat " "interval screens" +This option enables the display of performance statistics. The interval +is in seconds. The screens is a count of the number of back-end screens +for which data is printed each interval. Specifying 0 for screens will +display data for all screens. +.sp +For each screen, the following information is printed: the screen +number, an absolute count of the number of XSync() calls made +(SyncCount), the rate of these calls during the previous interval +(Sync/s), the average round-trip time (in microseconds) of the last 10 +XSync() calls (avSync), the maximum round-trip time (in microseconds) of +the last 10 XSync calls (mxSync), the average number of XSync() requests +that were pending but not yet processed for each of the last 10 +processed XSync() calls, the maximum number of XSync() requests that +were pending but not yet processed for each of the last 10 processed +XSync() calls, and a histogram showing the distribution of the times of +all of the XSync() calls that were made during the previous interval. +.sp +(The length of the moving average and the number and value of histogram +bins are configurable at compile time in the +.B dmxstat.h +header file.) +.sp +.TP 8 +.BI "-syncbatch " interval +This option sets the +.I interval +in milliseconds for XSync() batching. An +.I interval +less than or equal to 0 will disable XSync() batching. The default +.I interval +is 100 ms. +.sp +.TP 8 +.BI "-nooffscreenopt" +This option disables the offscreen optimization. Since the lazy window +creation optimization requires the offscreen optimization to be enabled, +this option will also disable the lazy window creation optimization. +.sp +.TP 8 +.BI "-nowindowopt" +This option disables the lazy window creation optimization. +.sp +.TP 8 +.BI "-nosubdivprims" +This option disables the primitive subdivision optimization. +.sp +.TP 8 +.BI "-noxkb" +Disable use of the XKB extension for communication with the back end +displays. (Combine with +.B "-kb" +to disable all use of XKB.) +.sp +.TP 8 +.BI "-depth " int +This option sets the root window's default depth. When choosing a +default visual from those available on the back-end X server, the first +visual with that matches the depth specified is used. +.sp +This option can be combined with the +.BI "-cc" +option, which specifies the default color visual class, to force the use +of a specific depth and color class for the root window. +.sp +.TP 8 +.BI "-norender" +This option disables the RENDER extension. +.sp +.TP 8 +.BI "-noglxproxy" +This option disables GLX proxy -- the build-in GLX extension +implementation that is DMX aware. +.sp +.TP 8 +.BI "-noglxswapgroup" +This option disables the swap group and swap barrier extensions in GLX +proxy. +.sp +.TP 8 +.BI "-glxsyncswap" +This option enables synchronization after a swap buffers call by waiting +until all X protocol has been processed. When a client issues a +glXSwapBuffers request, Xdmx relays that request to each back-end X +server, and those requests are buffered along with all other protocol +requests. However, in systems that have large network buffers, this +buffering can lead to the set of back-end X servers handling the swap +buffers request asynchronously. With this option, an XSync() request is +issued to each back-end X server after sending the swap buffers request. +The XSync() requests will flush all buffered protocol (including the +swap buffers requests) and wait until the back-end X servers have +processed those requests before continuing. This option does not wait +until all GL commands have been processed so there might be previously +issued commands that are still being processed in the GL pipe when the +XSync() request returns. See the +.BI "-glxfinishswap" +option below if Xdmx should wait until the GL commands have been +processed. +.sp +.TP 8 +.BI "-glxfinishswap" +This option enables synchronization after a swap buffers call by waiting +until all GL commands have been completed. It is similar to the +.BI "-glxsyncswap" +option above; however, instead of issuing an XSync(), it issues a +glFinish() request to each back-end X server after sending the swap +buffers requests. The glFinish() request will flush all buffered +protocol requests, process both X and GL requests, and wait until all +previously called GL commands are complete before returning. +.sp +.TP 8 +.BI "-ignorebadfontpaths" +This option ignores font paths that are not available on all back-end +servers by removing the bad font path(s) from the default font path +list. If no valid font paths are left after removing the bad paths, an +error to that effect is printed in the log. +.sp +.TP 8 +.BI "-addremovescreens" +This option enables the dynamic addition and removal of screens, which +is disabled by default. Note that GLXProxy and Render do not yet +support dynamic addition and removal of screens, and must be disabled +via the +.BI "-noglxproxy" +and +.BI "-norender" +command line options described above. +.sp +.TP 8 +.BI "-param" +This option specifies parameters on the command line. Currently, only +parameters dealing with XKEYBOARD configuration are supported. These +parameters apply only to the core keyboard. Parameter values are +installation-dependent. Please see +.I /usr/X11R6/lib/X11/xkb +or a similar directory for complete information. +.RS +.TP 8 +.B XkbRules +Defaults to "xfree86". Other values may include "sgi" and "sun". +.sp +.TP 8 +.B XkbModel +Defaults to "pc101". When used with "xfree86" rules, other values may +include "pc102", "pc104", "pc105", "microsoft", and many others. When +used with "sun" rules, other values may include "type4" and "type5". +.sp +.TP 8 +.B XkbLayout +Defaults to "us". Other country codes and "dvorak" are usually +available. +.sp +.TP 8 +.B XkbVariant +Defaults to "". +.sp +.TP 8 +.B XkbOptions +Defaults to "". +.RE +.SH "CONFIGURATION FILE GRAMMAR" +The following words and tokens are reserved: +.RS +.B virtual +.B display +.B wall +.B option +.B param +.B { +.B } +.B ; +.B # +.RE +.PP +Comments start with a +.B # +mark and extend to the end of the line. They may appear anywhere. If a +configuration file is read into +.BR xdmxconfig , +the comments in that file will be preserved, but will not be editable. +.PP +The grammar is as follows: +.RS +virtual-list ::= [ virtual-list ] | virtual + +virtual ::= +.B virtual +[ name ] [ dim ] +.B { +dw-list +.B } + +dw-list ::= [ dw-list ] | dw + +dw ::= display | wall | option + +display ::= +.B display +name [ geometry ] [ / geometry ] [ origin ] +.B ; + +wall ::= +.B wall +[ dim ] [ dim ] name-list +.B ; + +option ::= +.B option +name-list +.B ; + +param ::= +.B param +name-list +.B ; + +param ::= +.B param { +param-list +.B } + +param-list ::= [ param-list ] | name-list +.B ; + +name-list ::= [ name-list ] | name + +name ::= string | double-quoted-string + +dim ::= integer +.B x +integer + +geometry ::= [ integer +.B x +integer ] [ signed-integer signed-integer ] + +origin ::= +.B @ +integer +.B x +integer +.RE +.PP +The name following +.B virtual +is used as an identifier for the configuration, and may be passed to +.B Xdmx +using the +.B \-config +command line option. The name of a display should be standard X display +name, although no checking is performed (e.g., "machine:0"). +.PP +For names, double quotes are optional unless the name is reserved or +contains spaces. +.PP +The first dimension following +.B wall +is the dimension for tiling (e.g., 2x4 or 4x4). The second dimension +following +.B wall +is the dimension of each display in the wall (e.g., 1280x1024). +.PP +The first geometry following +.B display +is the geometry of the screen window on the backend server. The second +geometry, which is always preceeded by a slash, is the geometry of the +root window. By default, the root window has the same geometry as the +screen window. +.PP +The +.B option +line can be used to specify any command-line options (e.g., +.BR \-input ). +(It cannot be used to specify the name of the front-end display.) The +option line is processed once at server startup, just line command line +options. This behavior may be unexpected. +.SH "CONFIGURATION FILE EXAMPLES" +Two displays being used for a desktop may be specified in any of the +following formats: +.RS +.nf +virtual example0 { + display d0:0 1280x1024 @0x0; + display d1:0 1280x1024 @1280x0; +} +.sp +virtual example1 { + display d0:0 1280x1024; + display d1:0 @1280x0; +} +.sp +virtual example2 { + display "d0:0"; + display "d1:0" @1280x0; +} +.sp +virtual example3 { wall 2x1 d0:0 d1:0; } +.fi +.RE +A 4x4 wall of 16 total displays could be specified as follows (if no +tiling dimension is specified, an approximate square is used): +.RS +.nf +virtual example4 { + wall d0:0 d1:0 d2:0 d3:0 + d4:0 d5:0 d6:0 d7:0 + d8:0 d9:0 da:0 db:0 + dc:0 dd:0 de:0 df:0; +} +.fi +.RE +.SH "FONT PATHS" +The font path used by the +.I Xdmx +front-end server will be propagated to each back-end server,which +requires that each back-end server have access to the exact same font +paths as the front-end server. This can be most easily handled by +either using a font server (e.g., xfs) or by remotely mounting the font +paths on each back-end server, and then setting the +.I Xdmx +server's default font path with the +-I "-fontpath" +command line option described above. +.PP +For example, if you specify a font path with the following command line: +.RS +Xdmx :1 -display d0:0 -fontpath /usr/fonts/75dpi/ -fontpath /usr/fonts/Type1/ +xinerama +.RE +Then, /usr/fonts/75dpi/ and /usr/fonts/Type1/ must be valid font paths +on the +.I Xdmx +server and all back-end server, which is d0 in this example. +.PP +Font servers can also be specified with the +.I "-fontpath" +option. For example, let's assume that a properly configured font +server is running on host d0. Then, the following command line +.RS +Xdmx :1 -display d0:0 -display d1:0 -fontpath tcp/d0:7100 +xinerama +.RE +will initialize the front-end +.I Xdmx +server and each of the back-end servers to use the font server on d0. +.PP +Some fonts might not be supported by either the front-end or the +back-end servers. For example, let's assume the front-end +.I Xdmx +server includes support Type1 fonts, but one of the back-end servers +does not. Let's also assume that the default font path for +.I Xdmx +includes Type1 fonts in its font path. Then, when +.I Xdmx +initializes the default font path to load the default font, the font +path that includes Type1 fonts (along with the other default font paths +that are used by the +.I Xdmx +server) is sent to the back-end server that cannot handle Type1 fonts. +That back-end server then rejects the font path and sends an error back +to the +.I Xdmx +server. +.I Xdmx +then prints an error message and exits because it failed to set the +default font path and was unable load the default font. +.PP +To fix this error, the offending font path must be removed from the +default font path by using a different +.I "-fontpath" +command line option. +.PP +The +.I "-fontpath" +option can also be added to the configuration file as described above. +.SH "COMMAND-LINE EXAMPLES" +The back-end machines are d0 and d1, core input is from the pointer and +keyboard attached to d0, clients will refer to :1 when opening windows: +.RS +Xdmx :1 -display d0:0 -display d1:0 +xinerama +.RE +.PP +As above, except with core input from d1: +.RS +Xdmx :1 -display d0:0 -display d1:0 -input d1:0 +xinerama +.RE +.PP +As above, except with core input from a console window on the local +display: +.RS +Xdmx :1 -display d0:0 -display d1:0 -input :0 +xinerama +.RE +.PP +As above, except with core input from the local keyboard and mouse: +.RS +Xdmx :1 -display d0:0 -display d1:0 -input local,kbd,ps2 +xinerama +.RE +Note that local input can be used under Linux while another X session is +running on :0 (assuming the user can access the Linux console tty and +mouse devices): a new (blank) VC will be used for keyboard input on the +local machine and the Ctrl-Alt-F* sequence will be available to change +to another VC (possibly back to another X session running on the local +machine). Using Ctrl-Alt-Backspace on the blank VC will terminate the +Xdmx session and return to the original VC. +.PP +This example uses the configuration file shown in the previous section: +.RS +Xdmx :1 -input :0 +xinerama -configfile filename -config example2 +.RE +With this configuration file line: +.RS +option -input :0 +xinerama; +.RE +the command line can be shortened to: +.RS +Xdmx :1 -configfile filename -config example2 +.RE +.SH "USING THE USB DEVICE DRIVERS" +.P +The USB device drivers use the devices called +.IR /dev/input/event0 ", " /dev/input/event1 ", etc." +under Linux. These devices are driven using the +.I evdev +Linux kernel module, which is part of the hid suite. Please note that +if you load the +.I mousedev +or +.I kbddev +Linux kernel modules, then USB devices will appear as core Linux input +devices and you will not be able to select between using the device only +as an +.I Xdmx +core device or an +.I Xdmx +XInput extension device. Further, you may be unable to unload the +.I mousedev +Linux kernel module if +.I XFree86 +is configured to use +.I /dev/input/mice +as an input device (this is quite helpful for laptop users and is set up +by default under some Linux distributions, but should be changed if USB +devices are to be used with +.IR Xdmx ). +.PP +The USB device drivers search through the Linux devices for the first +mouse, keyboard, or non-mouse-non-keyboard Linux device and use that +device. +.SH "KEYBOARD INITIALIZATION" +.PP +If +.I Xdmx +was invoked with +.I \-xkb +or was +.B not +compiled to use the XKEYBOARD extension, then a keyboard on a backend or +console will be initialized using the map that the host X server +provides. +.PP +If the XKEYBOARD extension is used for both +.I Xdmx +and the host X server for the keyboard (i.e., the backend or console X +server), then the type of the keyboard will +be obtained from the host X server and the keyboard under +.I Xdmx +will be initialized with that information. Otherwise, the default type +of keyboard will be initialized. In both cases, the map from the host X +server will +.B not +be used. This means that different initial behavior may be noted with +and without XKEYBOARD. Consistent and expected results will be obtained +by running XKEYBOARD on all servers and by avoiding the use of +.I xmodmap +on the backend or console X servers prior to starting +.IR Xdmx . +.PP +If +.I \-xkbmap +is specified on the +.I Xdmx +command line, then that map will currently be used for all keyboards. +.SH "MULTIPLE CORE KEYBOARDS" +X was not designed to support multiple core keyboards. However, +.I Xdmx +provides some support for multiple core keyboards. Best results will be +obtained if all of the keyboards are of the same type and are using the +same keyboard map. Because the X server passes raw key code information +to the X client, key symbols for keyboards with different key maps would +be different if the key code for each keyboard was sent without +translation to the client. Therefore, +.I Xdmx +will attempt to translate the key code from a core keyboard to the key +code for the key with the same key symbol of the +.B first +core keyboard that was loaded. If the key symbol appears in both maps, +the results will be expected. Otherwise, the second core keyboard will +return a NoSymbol key symbol for some keys that would have been +translated if it was the first core keyboard. +.ig +.SH ENVIRONMENT +.. +.ig +.SH FILES +.. +.SH "SEE ALSO" +.BR DMX "(3X), " X "(__miscmansuffix__), " Xserver "(1), " xdmxconfig "(1), " +.BR vdltodmx "(1), " xfs "(1), " xkbcomp (1) +.SH AUTHORS +Kevin E. Martin +.I , +David H. Dawes +.I , +and +Rickard E. (Rik) Faith +.IR . +.PP +Portions of +.I Xdmx +are based on code from The XFree86 Project +.RI ( http://www.xfree86.org ) +and X.Org +.RI ( http://www.x.org ). diff --git a/xorg-server-1.4/hw/dmx/config/Canvas.c b/xorg-server-1.4/hw/dmx/config/Canvas.c new file mode 100644 index 0000000..c2eba87 --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/Canvas.c @@ -0,0 +1,159 @@ +/* + * 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 2002 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 + * + * This file was originally taken from xc/lib/Xaw/Template.c + */ + +#include +#include +#include "CanvasP.h" + +static void CanvasInitialize(Widget request, Widget w, + ArgList args, Cardinal *num_args) +{ +} + +static void CanvasExpose(Widget w, XEvent *event, Region region) +{ + CanvasExposeDataRec data; + + data.w = w; + data.event = event; + data.region = region; + + if (!XtIsRealized(w)) return; + XtCallCallbacks(w, XtNcanvasExposeCallback, (XtPointer)&data); +} + +static void CanvasResize(Widget w) +{ + if (!XtIsRealized(w)) return; + XtCallCallbacks(w, XtNcanvasResizeCallback, (XtPointer)w); +} + +static void CanvasAction(Widget w, XEvent *event, + String *params, Cardinal *num_params) +{ + XtCallCallbacks(w, XtNcallback, (XtPointer)event); +} + +#define offset(field) XtOffsetOf(CanvasRec, canvas.field) +static XtResource resources[] = { + { XtNcallback, XtCCallback, XtRCallback, + sizeof(XtCallbackList), offset(input_callback), XtRCallback, NULL }, + { XtNcanvasExposeCallback, XtCcanvasExposeCallback, XtRCallback, + sizeof(XtCallbackList), offset(expose_callback), XtRCallback, NULL }, + { XtNcanvasResizeCallback, XtCcanvasResizeCallback, XtRCallback, + sizeof(XtCallbackList), offset(resize_callback), XtRCallback, NULL }, +}; +#undef offset + +static XtActionsRec actions[] = +{ + {"canvas", CanvasAction}, +}; + +static char translations[] = +": canvas()\n\ +: canvas()\n\ +: canvas()\n\ +: canvas()\n\ +" +; + +#define Superclass (&widgetClassRec) +CanvasClassRec canvasClassRec = { + /* core */ + { + (WidgetClass)Superclass, /* superclass */ + "Canvas", /* class_name */ + sizeof(CanvasRec), /* widget_size */ + NULL, /* class_initialize */ + NULL, /* class_part_initialize */ + False, /* class_inited */ + CanvasInitialize, /* initialize */ + NULL, /* initialize_hook */ + XtInheritRealize, /* realize */ + actions, /* actions */ + XtNumber(actions), /* num_actions */ + resources, /* resources */ + XtNumber(resources), /* num_resources */ + NULLQUARK, /* xrm_class */ + True, /* compress_motion */ + True, /* compress_exposure */ + True, /* compress_enterleave */ + False, /* visible_interest */ + NULL, /* destroy */ + CanvasResize, /* resize */ + CanvasExpose, /* expose */ + NULL, /* set_values */ + NULL, /* set_values_hook */ + XtInheritSetValuesAlmost, /* set_values_almost */ + NULL, /* get_values_hook */ + NULL, /* accept_focus */ + XtVersion, /* version */ + NULL, /* callback_private */ + translations, /* tm_table */ + XtInheritQueryGeometry, /* query_geometry */ + XtInheritDisplayAccelerator, /* display_accelerator */ + NULL, /* extension */ + }, + /* canvas */ + { + NULL, /* extension */ + } +}; + +WidgetClass canvasWidgetClass = (WidgetClass)&canvasClassRec; diff --git a/xorg-server-1.4/hw/dmx/config/Canvas.h b/xorg-server-1.4/hw/dmx/config/Canvas.h new file mode 100644 index 0000000..fe9a57f --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/Canvas.h @@ -0,0 +1,55 @@ +/* + +Copyright 1987, 1998 The Open Group +Copyright 2002 Red Hat Inc., Durham, North Carolina. + +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: + * Rickard E. (Rik) Faith + * + * This file was originally taken from xc/lib/Xaw/Template.h + */ + +#ifndef _Canvas_h +#define _Canvas_h + +#include + +#define XtNcanvasExposeCallback "canvasExposeCallback" +#define XtCcanvasExposeCallback "CanvasExposeCallback" +#define XtNcanvasResizeCallback "canvasResizeCallback" +#define XtCcanvasResizeCallback "CanvasResizeCallback" + +typedef struct _CanvasClassRec *CanvasWidgetClass; +typedef struct _CanvasRec *CanvasWidget; +extern WidgetClass canvasWidgetClass; + +typedef struct _CanvasExposeDataRec { + Widget w; + XEvent *event; + Region region; +} CanvasExposeDataRec, *CanvasExposeDataPtr; + +#endif /* _Canvas_h */ diff --git a/xorg-server-1.4/hw/dmx/config/CanvasP.h b/xorg-server-1.4/hw/dmx/config/CanvasP.h new file mode 100644 index 0000000..cf43710 --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/CanvasP.h @@ -0,0 +1,65 @@ +/* + +Copyright 1987, 1998 The Open Group +Copyright 2002 Red Hat Inc., Durham, North Carolina. + +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: + * Rickard E. (Rik) Faith + * + * This file was originally taken from xc/lib/Xaw/TemplateP.h + */ + +#ifndef _CanvasP_h +#define _CanvasP_h + +#include "Canvas.h" + +/* include superclass private header file */ +#include + +typedef struct { + XtPointer extension; +} CanvasClassPart; + +typedef struct _CanvasClassRec { + CoreClassPart core_class; + CanvasClassPart canvas_class; +} CanvasClassRec; + +extern CanvasClassRec canvasClassRec; + +typedef struct { + XtCallbackList input_callback; + XtCallbackList expose_callback; + XtCallbackList resize_callback; +} CanvasPart; + +typedef struct _CanvasRec { + CorePart core; + CanvasPart canvas; +} CanvasRec; + +#endif /* _CanvasP_h */ diff --git a/xorg-server-1.4/hw/dmx/config/Makefile.am b/xorg-server-1.4/hw/dmx/config/Makefile.am new file mode 100644 index 0000000..c31e049 --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/Makefile.am @@ -0,0 +1,89 @@ +noinst_LIBRARIES = libdmxconfig.a + +LIBSRCS = parser.y \ + scanner.l \ + dmxparse.c \ + dmxparse.h \ + dmxprint.c \ + dmxprint.h \ + dmxcompat.c \ + dmxcompat.h \ + dmxconfig.c \ + dmxconfig.h + +parser.h: parser.c +scanner.c: scanner.l parser.h + +BUILT_SOURCES = parser.c parser.h scanner.c + +MAINTAINERCLEANFILES = $(BUILT_SOURCES) + +libdmxconfig_a_SOURCES = $(LIBSRCS) + +if GLX +GLX_DEFS = @GL_CFLAGS@ +GLX_INCS = -I@MESA_SOURCE@/include +endif + +AM_YFLAGS = -d +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -I$(top_srcdir)/hw/dmx \ + $(GLX_INCS) \ + -DHAVE_DMX_CONFIG_H \ + -DDMX_LOG_STANDALONE \ + $(GLX_DEFS) \ + @DMXMODULES_CFLAGS@ + +bin_PROGRAMS = xdmxconfig vdltodmx dmxtodmx + +xdmxconfig_DEPENDENCIES = libdmxconfig.a +xdmxconfig_SOURCES = \ + xdmxconfig.c \ + $(top_srcdir)/hw/dmx/dmxlog.c \ + Canvas.c \ + Canvas.h \ + CanvasP.h +xdmxconfig_LDADD = -L. -ldmxconfig @XDMXCONFIG_DEP_LIBS@ +xdmxconfig_CFLAGS = $(AM_CFLAGS) @XDMXCONFIG_DEP_CFLAGS@ + +vdltodmx_DEPENDENCIES = libdmxconfig.a +vdltodmx_SOURCES = vdltodmx.c +vdltodmx_LDADD = -L. -ldmxconfig + +dmxtodmx_DEPENDENCIES = libdmxconfig.a +dmxtodmx_SOURCES = dmxtodmx.c +dmxtodmx_LDADD = -L. -ldmxconfig + +appmandir = $(APP_MAN_DIR) + +appman_PRE = xdmxconfig.man vdltodmx.man dmxtodmx.man +appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) + +CLEANFILES = $(appman_DATA) + +SUFFIXES = .$(APP_MAN_SUFFIX) .man + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ + XORGMANNAME = X Version 11 + +MAN_SUBSTS = -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' + +.man.$(APP_MAN_SUFFIX): + sed $(MAN_SUBSTS) < $< > $@ + +EXTRA_DIST = \ + $(appman_PRE) \ + test-a.in test-a.out \ + test-b.in test-b.out \ + test-c.in test-c.out \ + test-d.in test-d.out \ + test-e.in test-e.out \ + test-f.in test-f.out \ + test-g.in test-g.out \ + test-h.in test-h.out \ + test-i.in test-i.out \ + test-j.in test-j.out \ + test-k.in test-k.out \ + test-l.in test-l.out diff --git a/xorg-server-1.4/hw/dmx/config/Makefile.in b/xorg-server-1.4/hw/dmx/config/Makefile.in new file mode 100644 index 0000000..2f76622 --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/Makefile.in @@ -0,0 +1,852 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = xdmxconfig$(EXEEXT) vdltodmx$(EXEEXT) dmxtodmx$(EXEEXT) +subdir = hw/dmx/config +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO \ + parser.c parser.h scanner.c +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libdmxconfig_a_AR = $(AR) $(ARFLAGS) +libdmxconfig_a_LIBADD = +am__objects_1 = parser.$(OBJEXT) scanner.$(OBJEXT) dmxparse.$(OBJEXT) \ + dmxprint.$(OBJEXT) dmxcompat.$(OBJEXT) dmxconfig.$(OBJEXT) +am_libdmxconfig_a_OBJECTS = $(am__objects_1) +libdmxconfig_a_OBJECTS = $(am_libdmxconfig_a_OBJECTS) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_dmxtodmx_OBJECTS = dmxtodmx.$(OBJEXT) +dmxtodmx_OBJECTS = $(am_dmxtodmx_OBJECTS) +am_vdltodmx_OBJECTS = vdltodmx.$(OBJEXT) +vdltodmx_OBJECTS = $(am_vdltodmx_OBJECTS) +am_xdmxconfig_OBJECTS = xdmxconfig-xdmxconfig.$(OBJEXT) \ + xdmxconfig-dmxlog.$(OBJEXT) xdmxconfig-Canvas.$(OBJEXT) +xdmxconfig_OBJECTS = $(am_xdmxconfig_OBJECTS) +xdmxconfig_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(xdmxconfig_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +@MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ || +LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) +LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) +YLWRAP = $(top_srcdir)/ylwrap +@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || +YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) +LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS) +SOURCES = $(libdmxconfig_a_SOURCES) $(dmxtodmx_SOURCES) \ + $(vdltodmx_SOURCES) $(xdmxconfig_SOURCES) +DIST_SOURCES = $(libdmxconfig_a_SOURCES) $(dmxtodmx_SOURCES) \ + $(vdltodmx_SOURCES) $(xdmxconfig_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +appmanDATA_INSTALL = $(INSTALL_DATA) +DATA = $(appman_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RGB_DB = @RGB_DB@ +SERVERCONFIGdir = @SERVERCONFIGdir@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +SYS_LIBS = @SYS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VENDOR_RELEASE = @VENDOR_RELEASE@ +VERSION = @VERSION@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_LIBS = @XDMX_LIBS@ +XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ +XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ +XEGL_LIBS = @XEGL_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XERRORDB_PATH = @XERRORDB_PATH@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ +XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ +XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ +XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_CORE_LIBS = @XORG_CORE_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +noinst_LIBRARIES = libdmxconfig.a +LIBSRCS = parser.y \ + scanner.l \ + dmxparse.c \ + dmxparse.h \ + dmxprint.c \ + dmxprint.h \ + dmxcompat.c \ + dmxcompat.h \ + dmxconfig.c \ + dmxconfig.h + +BUILT_SOURCES = parser.c parser.h scanner.c +MAINTAINERCLEANFILES = $(BUILT_SOURCES) +libdmxconfig_a_SOURCES = $(LIBSRCS) +@GLX_TRUE@GLX_DEFS = @GL_CFLAGS@ +@GLX_TRUE@GLX_INCS = -I@MESA_SOURCE@/include +AM_YFLAGS = -d +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -I$(top_srcdir)/hw/dmx \ + $(GLX_INCS) \ + -DHAVE_DMX_CONFIG_H \ + -DDMX_LOG_STANDALONE \ + $(GLX_DEFS) \ + @DMXMODULES_CFLAGS@ + +xdmxconfig_DEPENDENCIES = libdmxconfig.a +xdmxconfig_SOURCES = \ + xdmxconfig.c \ + $(top_srcdir)/hw/dmx/dmxlog.c \ + Canvas.c \ + Canvas.h \ + CanvasP.h + +xdmxconfig_LDADD = -L. -ldmxconfig @XDMXCONFIG_DEP_LIBS@ +xdmxconfig_CFLAGS = $(AM_CFLAGS) @XDMXCONFIG_DEP_CFLAGS@ +vdltodmx_DEPENDENCIES = libdmxconfig.a +vdltodmx_SOURCES = vdltodmx.c +vdltodmx_LDADD = -L. -ldmxconfig +dmxtodmx_DEPENDENCIES = libdmxconfig.a +dmxtodmx_SOURCES = dmxtodmx.c +dmxtodmx_LDADD = -L. -ldmxconfig +appmandir = $(APP_MAN_DIR) +appman_PRE = xdmxconfig.man vdltodmx.man dmxtodmx.man +appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) +CLEANFILES = $(appman_DATA) +SUFFIXES = .$(APP_MAN_SUFFIX) .man + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ +XORGMANNAME = X Version 11 +MAN_SUBSTS = -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' +EXTRA_DIST = \ + $(appman_PRE) \ + test-a.in test-a.out \ + test-b.in test-b.out \ + test-c.in test-c.out \ + test-d.in test-d.out \ + test-e.in test-e.out \ + test-f.in test-f.out \ + test-g.in test-g.out \ + test-h.in test-h.out \ + test-i.in test-i.out \ + test-j.in test-j.out \ + test-k.in test-k.out \ + test-l.in test-l.out + +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .l .lo .o .obj .y +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/dmx/config/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/dmx/config/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libdmxconfig.a: $(libdmxconfig_a_OBJECTS) $(libdmxconfig_a_DEPENDENCIES) + -rm -f libdmxconfig.a + $(libdmxconfig_a_AR) libdmxconfig.a $(libdmxconfig_a_OBJECTS) $(libdmxconfig_a_LIBADD) + $(RANLIB) libdmxconfig.a +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +dmxtodmx$(EXEEXT): $(dmxtodmx_OBJECTS) $(dmxtodmx_DEPENDENCIES) + @rm -f dmxtodmx$(EXEEXT) + $(LINK) $(dmxtodmx_OBJECTS) $(dmxtodmx_LDADD) $(LIBS) +vdltodmx$(EXEEXT): $(vdltodmx_OBJECTS) $(vdltodmx_DEPENDENCIES) + @rm -f vdltodmx$(EXEEXT) + $(LINK) $(vdltodmx_OBJECTS) $(vdltodmx_LDADD) $(LIBS) +xdmxconfig$(EXEEXT): $(xdmxconfig_OBJECTS) $(xdmxconfig_DEPENDENCIES) + @rm -f xdmxconfig$(EXEEXT) + $(xdmxconfig_LINK) $(xdmxconfig_OBJECTS) $(xdmxconfig_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxcompat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxconfig.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxparse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxprint.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxtodmx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scanner.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vdltodmx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdmxconfig-Canvas.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdmxconfig-dmxlog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdmxconfig-xdmxconfig.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +xdmxconfig-xdmxconfig.o: xdmxconfig.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-xdmxconfig.o -MD -MP -MF $(DEPDIR)/xdmxconfig-xdmxconfig.Tpo -c -o xdmxconfig-xdmxconfig.o `test -f 'xdmxconfig.c' || echo '$(srcdir)/'`xdmxconfig.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xdmxconfig-xdmxconfig.Tpo $(DEPDIR)/xdmxconfig-xdmxconfig.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xdmxconfig.c' object='xdmxconfig-xdmxconfig.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-xdmxconfig.o `test -f 'xdmxconfig.c' || echo '$(srcdir)/'`xdmxconfig.c + +xdmxconfig-xdmxconfig.obj: xdmxconfig.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-xdmxconfig.obj -MD -MP -MF $(DEPDIR)/xdmxconfig-xdmxconfig.Tpo -c -o xdmxconfig-xdmxconfig.obj `if test -f 'xdmxconfig.c'; then $(CYGPATH_W) 'xdmxconfig.c'; else $(CYGPATH_W) '$(srcdir)/xdmxconfig.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xdmxconfig-xdmxconfig.Tpo $(DEPDIR)/xdmxconfig-xdmxconfig.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xdmxconfig.c' object='xdmxconfig-xdmxconfig.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-xdmxconfig.obj `if test -f 'xdmxconfig.c'; then $(CYGPATH_W) 'xdmxconfig.c'; else $(CYGPATH_W) '$(srcdir)/xdmxconfig.c'; fi` + +xdmxconfig-dmxlog.o: $(top_srcdir)/hw/dmx/dmxlog.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-dmxlog.o -MD -MP -MF $(DEPDIR)/xdmxconfig-dmxlog.Tpo -c -o xdmxconfig-dmxlog.o `test -f '$(top_srcdir)/hw/dmx/dmxlog.c' || echo '$(srcdir)/'`$(top_srcdir)/hw/dmx/dmxlog.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xdmxconfig-dmxlog.Tpo $(DEPDIR)/xdmxconfig-dmxlog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/hw/dmx/dmxlog.c' object='xdmxconfig-dmxlog.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-dmxlog.o `test -f '$(top_srcdir)/hw/dmx/dmxlog.c' || echo '$(srcdir)/'`$(top_srcdir)/hw/dmx/dmxlog.c + +xdmxconfig-dmxlog.obj: $(top_srcdir)/hw/dmx/dmxlog.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-dmxlog.obj -MD -MP -MF $(DEPDIR)/xdmxconfig-dmxlog.Tpo -c -o xdmxconfig-dmxlog.obj `if test -f '$(top_srcdir)/hw/dmx/dmxlog.c'; then $(CYGPATH_W) '$(top_srcdir)/hw/dmx/dmxlog.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/hw/dmx/dmxlog.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xdmxconfig-dmxlog.Tpo $(DEPDIR)/xdmxconfig-dmxlog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/hw/dmx/dmxlog.c' object='xdmxconfig-dmxlog.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-dmxlog.obj `if test -f '$(top_srcdir)/hw/dmx/dmxlog.c'; then $(CYGPATH_W) '$(top_srcdir)/hw/dmx/dmxlog.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/hw/dmx/dmxlog.c'; fi` + +xdmxconfig-Canvas.o: Canvas.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-Canvas.o -MD -MP -MF $(DEPDIR)/xdmxconfig-Canvas.Tpo -c -o xdmxconfig-Canvas.o `test -f 'Canvas.c' || echo '$(srcdir)/'`Canvas.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xdmxconfig-Canvas.Tpo $(DEPDIR)/xdmxconfig-Canvas.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Canvas.c' object='xdmxconfig-Canvas.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-Canvas.o `test -f 'Canvas.c' || echo '$(srcdir)/'`Canvas.c + +xdmxconfig-Canvas.obj: Canvas.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-Canvas.obj -MD -MP -MF $(DEPDIR)/xdmxconfig-Canvas.Tpo -c -o xdmxconfig-Canvas.obj `if test -f 'Canvas.c'; then $(CYGPATH_W) 'Canvas.c'; else $(CYGPATH_W) '$(srcdir)/Canvas.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xdmxconfig-Canvas.Tpo $(DEPDIR)/xdmxconfig-Canvas.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Canvas.c' object='xdmxconfig-Canvas.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-Canvas.obj `if test -f 'Canvas.c'; then $(CYGPATH_W) 'Canvas.c'; else $(CYGPATH_W) '$(srcdir)/Canvas.c'; fi` + +.l.c: + $(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) + +.y.c: + $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-appmanDATA: $(appman_DATA) + @$(NORMAL_INSTALL) + test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)" + @list='$(appman_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \ + $(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \ + done + +uninstall-appmanDATA: + @$(NORMAL_UNINSTALL) + @list='$(appman_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \ + rm -f "$(DESTDIR)$(appmandir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -rm -f parser.c + -rm -f parser.h + -rm -f scanner.c + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool \ + clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-appmanDATA + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool clean-noinstLIBRARIES ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-appmanDATA \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-appmanDATA uninstall-binPROGRAMS + + +parser.h: parser.c +scanner.c: scanner.l parser.h + +.man.$(APP_MAN_SUFFIX): + sed $(MAN_SUBSTS) < $< > $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server-1.4/hw/dmx/config/TODO b/xorg-server-1.4/hw/dmx/config/TODO new file mode 100644 index 0000000..2998ff4 --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/TODO @@ -0,0 +1,7 @@ +Fri May 31 13:20:17 2002 + +1) Sanitize values from input boxes. + +2) Add canvas colors to cavas widget resources or to command-line options. + +3) Add ability to edit option line(s) and wall. diff --git a/xorg-server-1.4/hw/dmx/config/dmxcompat.c b/xorg-server-1.4/hw/dmx/config/dmxcompat.c new file mode 100644 index 0000000..b4190ff --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/dmxcompat.c @@ -0,0 +1,236 @@ +/* + * Copyright 2002 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 provides some compatibility support for reading VDL files + * that are used by xmovie + * (http://www.llnl.gov/icc/sdd/img/xmovie/xmovie.shtml). + * + * This file is not used by the DMX server. + */ + +#ifdef HAVE_DMX_CONFIG_H +#include +#endif + +#include "dmxconfig.h" +#include "dmxparse.h" +#include "dmxcompat.h" +#include "parser.h" +#include +#include +#include +#include + +static int dmxVDLReadLine(FILE *str, char *buf, int len) +{ + if (fgets(buf, len, str)) return strlen(buf); + return 0; +} + +static int dmxVDLCount(const char *buf) +{ + return strtol(buf, NULL, 10); +} + +static void dmxVDLVirtualEntry(const char *buf, + char *name, int *len, + int *x, int *y) +{ + char *end; + const char *s; + char *d; + int start; + + *x = strtol(buf, &end, 10); + *y = strtol(end, &end, 10); + + for (s = end, d = name, start = 1; *s && *s != '['; ++s) { + if (start && isspace(*s)) continue; + *d++ = *s; + start = 0; + } + *d = '\0'; + while (d > name && isspace(d[-1])) *--d = '\0'; /* remove trailing space */ + *len = strlen(name); +} + +static void dmxVDLDisplayEntry(const char *buf, + char *name, int *len, + int *x, int *y, + int *xoff, int *yoff, + int *xorig, int *yorig) +{ + const char *pt; + char *end; + + pt = strchr(buf, ' '); + strncpy(name, buf, pt-buf); + name[pt-buf] = '\0'; + *len = strlen(name); + + *x = strtol(pt, &end, 10); + *y = strtol(end, &end, 10); + *xorig = strtol(end, &end, 10); + *yorig = strtol(end, &end, 10); + *xoff = strtol(end, &end, 10); + *yoff = strtol(end, NULL, 10); +} + +/** Read from the VDL format \a filename and return a newly allocated \a + * DMXConfigEntryPtr */ +DMXConfigEntryPtr dmxVDLRead(const char *filename) +{ + FILE *str; + char buf[2048]; /* RATS: Use ok */ + char *pt; + int lineno = 0; + DMXConfigEntryPtr entry = NULL; + DMXConfigVirtualPtr virtual = NULL; + DMXConfigSubPtr sub = NULL; + DMXConfigDisplayPtr display = NULL; + DMXConfigFullDimPtr fdim = NULL; + int vcount = 0; + int dcount = 0; + int icount = 0; + int x, y, xoff, yoff, xorig, yorig; + char name[2048]; /* RATS: Use ok */ + const char *tmp; + int len; + enum { + simulateFlag, + virtualCount, + virtualEntry, + displayCount, + displayEntry, + ignoreCount, + ignoreEntry + } state = simulateFlag; + + if (!filename) str = stdin; + else str = fopen(filename, "r"); + if (!str) return NULL; + + while (dmxVDLReadLine(str, buf, sizeof(buf))) { + DMXConfigCommentPtr comment = NULL; + + ++lineno; + for (pt = buf; *pt; pt++) + if (*pt == '\r' || *pt == '\n') { + *pt = '\0'; + break; + } + if (buf[0] == '#') { + tmp = dmxConfigCopyString(buf + 1, strlen(buf + 1)); + comment = dmxConfigCreateComment(T_COMMENT, lineno, tmp); + entry = dmxConfigAddEntry(entry, dmxConfigComment, comment, NULL); + continue; + } + switch (state) { + case simulateFlag: + state = virtualCount; + break; + case virtualCount: + vcount = dmxVDLCount(buf); + state = virtualEntry; + break; + case virtualEntry: + len = sizeof(name); + dmxVDLVirtualEntry(buf, name, &len, &x, &y); + tmp = dmxConfigCopyString(name, len); + virtual = dmxConfigCreateVirtual(NULL, + dmxConfigCreateString(T_STRING, + lineno, + NULL, + tmp), + dmxConfigCreatePair(T_DIMENSION, + lineno, + NULL, + x, y, 0, 0), + NULL, NULL, NULL); + state = displayCount; + break; + case displayCount: + dcount = dmxVDLCount(buf); + state = displayEntry; + break; + case displayEntry: + dmxVDLDisplayEntry(buf, name, &len, &x, &y, &xoff, &yoff, + &xorig, &yorig); + tmp = dmxConfigCopyString(name, len); + fdim = dmxConfigCreateFullDim( + dmxConfigCreatePartDim( + dmxConfigCreatePair(T_DIMENSION, + lineno, + NULL, + x, y, 0, 0), + dmxConfigCreatePair(T_OFFSET, + lineno, + NULL, + xoff, yoff, + xoff, yoff)), + NULL); + display = dmxConfigCreateDisplay(NULL, + dmxConfigCreateString(T_STRING, + lineno, + NULL, + tmp), + fdim, + dmxConfigCreatePair(T_ORIGIN, + lineno, + NULL, + xorig, yorig, + 0, 0), + NULL); + sub = dmxConfigAddSub(sub, dmxConfigSubDisplay(display)); + if (!--dcount) { + state = ignoreCount; + virtual->subentry = sub; + entry = dmxConfigAddEntry(entry, + dmxConfigVirtual, + NULL, + virtual); + virtual = NULL; + sub = NULL; + } + break; + case ignoreCount: + icount = dmxVDLCount(buf); + state = ignoreEntry; + break; + case ignoreEntry: + if (!--icount) state = virtualEntry; + break; + } + } + return entry; +} diff --git a/xorg-server-1.4/hw/dmx/config/dmxcompat.h b/xorg-server-1.4/hw/dmx/config/dmxcompat.h new file mode 100644 index 0000000..7188920 --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/dmxcompat.h @@ -0,0 +1,44 @@ +/* + * Copyright 2002 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 + * Interface to VDL compatibility support. \see dmxcompat.c + * + * This file is not used by the DMX server. + */ + +#ifndef _DMXCOMPAT_H_ +#define _DMXCOMPAT_H_ + +extern DMXConfigEntryPtr dmxVDLRead(const char *filename); +#endif diff --git a/xorg-server-1.4/hw/dmx/config/dmxconfig.c b/xorg-server-1.4/hw/dmx/config/dmxconfig.c new file mode 100644 index 0000000..225d892 --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/dmxconfig.c @@ -0,0 +1,498 @@ +/* + * Copyright 2002-2003 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 + * Provides interface for reading DMX configuration files and for + * combining that information with command-line configuration parameters. */ + + +#ifdef HAVE_DMX_CONFIG_H +#include +#endif + +#include "dmx.h" +#include "dmxinput.h" +#include "dmxconfig.h" +#include "dmxparse.h" +#include "dmxlog.h" +#include "dmxcb.h" +#include "dmxstat.h" +#include "parser.h" + +extern int yyparse(void); +extern FILE *yyin; + +static char *dmxXkbRules; +static char *dmxXkbModel; +static char *dmxXkbLayout; +static char *dmxXkbVariant; +static char *dmxXkbOptions; + +/** Stores lists of configuration information. */ +typedef struct DMXConfigListStruct { + const char *name; + struct DMXConfigListStruct *next; +} DMXConfigList, *DMXConfigListPtr; + +/** This stucture stores the parsed configuration information. */ +typedef struct DMXConfigCmdStruct { + const char *filename; + const char *config; + DMXConfigList *displays; + DMXConfigList *inputs; + DMXConfigList *xinputs; +} DMXConfigCmd, *DMXConfigCmdPtr; + +DMXConfigEntryPtr dmxConfigEntry; +static DMXConfigCmd dmxConfigCmd; + +static int dmxDisplaysFromCommandLine; + +/** Make a note that \a display is the name of an X11 display that + * should be initialized as a backend (output) display. Called from + * #ddxProcessArgument. */ +void dmxConfigStoreDisplay(const char *display) +{ + DMXConfigListPtr entry = malloc(sizeof(*entry)); + entry->name = strdup(display); + entry->next = NULL; + if (!dmxConfigCmd.displays) dmxConfigCmd.displays = entry; + else { + DMXConfigList *pt; + for (pt = dmxConfigCmd.displays; pt->next; pt = pt->next); + if (!pt) + dmxLog(dmxFatal, "dmxConfigStoreDisplay: end of list non-NULL\n"); + pt->next = entry; + } + ++dmxDisplaysFromCommandLine; +} + +/** Make a note that \a input is the name of an X11 display that should + * be used for input (either a backend or a console input device). */ +void dmxConfigStoreInput(const char *input) +{ + DMXConfigListPtr entry = malloc(sizeof(*entry)); + entry->name = strdup(input); + entry->next = NULL; + if (!dmxConfigCmd.inputs) dmxConfigCmd.inputs = entry; + else { + DMXConfigList *pt; + for (pt = dmxConfigCmd.inputs; pt->next; pt = pt->next); + if (!pt) + dmxLog(dmxFatal, "dmxConfigStoreInput: end of list non-NULL\n"); + pt->next = entry; + } +} + +/** Make a note that \a input is the name of an X11 display that should + * be used for input from XInput extension devices. */ +void dmxConfigStoreXInput(const char *input) +{ + DMXConfigListPtr entry = malloc(sizeof(*entry)); + entry->name = strdup(input); + entry->next = NULL; + if (!dmxConfigCmd.xinputs) dmxConfigCmd.xinputs = entry; + else { + DMXConfigList *pt; + for (pt = dmxConfigCmd.xinputs; pt->next; pt = pt->next); + if (!pt) + dmxLog(dmxFatal, "dmxConfigStoreXInput: end of list non-NULL\n"); + pt->next = entry; + } +} + +/** Make a note that \a file is the configuration file. */ +void dmxConfigStoreFile(const char *file) +{ + if (dmxConfigCmd.filename) + dmxLog(dmxFatal, "Only one -configfile allowed\n"); + dmxConfigCmd.filename = strdup(file); +} + +/** Make a note that \a config should be used as the configuration for + * current instantiation of the DMX server. */ +void dmxConfigStoreConfig(const char *config) +{ + if (dmxConfigCmd.config) dmxLog(dmxFatal, "Only one -config allowed\n"); + dmxConfigCmd.config = strdup(config); +} + +static int dmxConfigReadFile(const char *filename, int debug) +{ + FILE *str; + + if (!(str = fopen(filename, "r"))) return -1; + dmxLog(dmxInfo, "Reading configuration file \"%s\"\n", filename); + yyin = str; + yydebug = debug; + yyparse(); + fclose(str); + return 0; +} + +static const char *dmxConfigMatch(const char *target, DMXConfigEntryPtr entry) +{ + DMXConfigVirtualPtr v = entry->virtual; + const char *name = NULL; + + if (v && v->name) name = v->name; + + if (v && !dmxConfigCmd.config) return v->name ? v->name : ""; + if (!name) return NULL; + if (!strcmp(name, target)) return name; + return NULL; +} + +static DMXScreenInfo *dmxConfigAddDisplay(const char *name, + int scrnWidth, int scrnHeight, + int scrnX, int scrnY, + int scrnXSign, int scrnYSign, + int rootWidth, int rootHeight, + int rootX, int rootY, + int rootXSign, int rootYSign) +{ + DMXScreenInfo *dmxScreen; + + if (!(dmxScreens = realloc(dmxScreens, + (dmxNumScreens+1) * sizeof(*dmxScreens)))) + dmxLog(dmxFatal, + "dmxConfigAddDisplay: realloc failed for screen %d (%s)\n", + dmxNumScreens, name); + + dmxScreen = &dmxScreens[dmxNumScreens]; + memset(dmxScreen, 0, sizeof(*dmxScreen)); + dmxScreen->name = name; + dmxScreen->index = dmxNumScreens; + dmxScreen->scrnWidth = scrnWidth; + dmxScreen->scrnHeight = scrnHeight; + dmxScreen->scrnX = scrnX; + dmxScreen->scrnY = scrnY; + dmxScreen->scrnXSign = scrnXSign; + dmxScreen->scrnYSign = scrnYSign; + dmxScreen->rootWidth = rootWidth; + dmxScreen->rootHeight = rootHeight; + dmxScreen->rootX = rootX; + dmxScreen->rootY = rootY; + dmxScreen->stat = dmxStatAlloc(); + ++dmxNumScreens; + return dmxScreen; +} + +DMXInputInfo *dmxConfigAddInput(const char *name, int core) +{ + DMXInputInfo *dmxInput; + + if (!(dmxInputs = realloc(dmxInputs, + (dmxNumInputs+1) * sizeof(*dmxInputs)))) + dmxLog(dmxFatal, + "dmxConfigAddInput: realloc failed for input %d (%s)\n", + dmxNumInputs, name); + + dmxInput = &dmxInputs[dmxNumInputs]; + + memset(dmxInput, 0, sizeof(*dmxInput)); + dmxInput->name = name; + dmxInput->inputIdx = dmxNumInputs; + dmxInput->scrnIdx = -1; + dmxInput->core = core; + ++dmxNumInputs; + return dmxInput; +} + +static void dmxConfigCopyFromDisplay(DMXConfigDisplayPtr d) +{ + DMXScreenInfo *dmxScreen; + + dmxScreen = dmxConfigAddDisplay(d->name, + d->scrnWidth, d->scrnHeight, + d->scrnX, d->scrnY, + d->scrnXSign, d->scrnYSign, + d->rootWidth, d->rootHeight, + d->rootX, d->rootY, + d->rootXSign, d->rootXSign); + dmxScreen->where = PosAbsolute; + dmxScreen->whereX = d->rootXOrigin; + dmxScreen->whereY = d->rootYOrigin; +} + +static void dmxConfigCopyFromWall(DMXConfigWallPtr w) +{ + DMXConfigStringPtr pt; + DMXScreenInfo *dmxScreen; + int edge = dmxNumScreens; + int last = dmxNumScreens; + + if (!w->xwall && !w->ywall) { /* Try to make it square */ + int count; + for (pt = w->nameList, count = 0; pt; pt = pt->next) ++count; + w->xwall = sqrt(count) + .5; + } + + for (pt = w->nameList; pt; pt = pt->next) { + dmxScreen = dmxConfigAddDisplay(pt->string, w->width, w->height, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + if (pt == w->nameList) { /* Upper left */ + dmxScreen->where = PosAbsolute; + dmxScreen->whereX = 0; + dmxScreen->whereY = 0; + } else if (w->xwall) { /* Tile left to right, then top to bottom */ + if (!((dmxNumScreens-1) % w->xwall)) { + dmxScreen->where = PosBelow; + dmxScreen->whereRefScreen = edge; + edge = dmxNumScreens-1; + } else { + dmxScreen->where = PosRightOf; + dmxScreen->whereRefScreen = last; + } + } else { /* Tile top to bottom, then left to right */ + if (!((dmxNumScreens-1) % w->ywall)) { + dmxScreen->where = PosRightOf; + dmxScreen->whereRefScreen = edge; + edge = dmxNumScreens-1; + } else { + dmxScreen->where = PosBelow; + dmxScreen->whereRefScreen = last; + } + + } + last = dmxNumScreens-1; + if (dmxScreen->where == PosAbsolute) + dmxLog(dmxInfo, "Added %s at %d %d\n", + pt->string, dmxScreen->whereX, dmxScreen->whereY); + else + dmxLog(dmxInfo, "Added %s %s %s\n", + pt->string, + dmxScreen->where == PosBelow ? "below" : "right of", + dmxScreens[dmxScreen->whereRefScreen].name); + } +} + +static void dmxConfigCopyFromOption(DMXConfigOptionPtr o) +{ + DMXConfigStringPtr pt; + int argc = 0; + char **argv = NULL; + + if (serverGeneration != 1) return; /* FIXME: only do once, for now */ + if (!o || !o->string) return; + for (pt = o->option; pt; pt = pt->next) { + if (pt->string) { + ++argc; + argv = realloc(argv, (argc+1) * sizeof(*argv)); + argv[argc] = (char *)pt->string; + } + } + argv[0] = NULL; + ProcessCommandLine(argc+1, argv); + free(argv); +} + +static void dmxConfigCopyFromParam(DMXConfigParamPtr p) +{ + const char **argv; + int argc; + + if ((argv = dmxConfigLookupParam(p, "xkbrules", &argc)) && argc == 2) { + dmxConfigSetXkbRules(argv[1]); + } else if ((argv = dmxConfigLookupParam(p, "xkbmodel", &argc)) + && argc == 2) { + dmxConfigSetXkbModel(argv[1]); + } else if ((argv = dmxConfigLookupParam(p, "xkblayout", &argc)) + && argc == 2) { + dmxConfigSetXkbLayout(argv[1]); + } else if ((argv = dmxConfigLookupParam(p, "xkbvariant", &argc)) + && argc == 2) { + dmxConfigSetXkbVariant(argv[1]); + } else if ((argv = dmxConfigLookupParam(p, "xkboptions", &argc)) + && argc == 2) { + dmxConfigSetXkbOptions(argv[1]); + } +} + +static void dmxConfigCopyData(DMXConfigVirtualPtr v) +{ + DMXConfigSubPtr sub; + + if (v->dim) dmxSetWidthHeight(v->dim->x, v->dim->y); + else dmxSetWidthHeight(0, 0); + for (sub = v->subentry; sub; sub = sub->next) { + switch (sub->type) { + case dmxConfigDisplay: dmxConfigCopyFromDisplay(sub->display); break; + case dmxConfigWall: dmxConfigCopyFromWall(sub->wall); break; + case dmxConfigOption: dmxConfigCopyFromOption(sub->option); break; + case dmxConfigParam: dmxConfigCopyFromParam(sub->param); break; + default: + dmxLog(dmxFatal, + "dmxConfigCopyData: not a display, wall, or value\n"); + } + } +} + +static void dmxConfigFromCommandLine(void) +{ + DMXConfigListPtr pt; + + dmxLog(dmxInfo, "Using configuration from command line\n"); + for (pt = dmxConfigCmd.displays; pt; pt = pt->next) { + DMXScreenInfo *dmxScreen = dmxConfigAddDisplay(pt->name, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0); + if (dmxNumScreens == 1) { + dmxScreen->where = PosAbsolute; + dmxScreen->whereX = 0; + dmxScreen->whereY = 0; + dmxLog(dmxInfo, "Added %s at %d %d\n", + dmxScreen->name, dmxScreen->whereX, dmxScreen->whereY); + } else { + dmxScreen->where = PosRightOf; + dmxScreen->whereRefScreen = dmxNumScreens - 2; + if (dmxScreen->whereRefScreen < 0) dmxScreen->whereRefScreen = 0; + dmxLog(dmxInfo, "Added %s %s %s\n", + dmxScreen->name, + dmxScreen->where == PosBelow ? "below" : "right of", + dmxScreens[dmxScreen->whereRefScreen].name); + } + } +} + +static void dmxConfigFromConfigFile(void) +{ + DMXConfigEntryPtr pt; + const char *name; + + for (pt = dmxConfigEntry; pt; pt = pt->next) { + /* FIXME -- if an input is specified, use it */ + if (pt->type != dmxConfigVirtual) continue; + if ((name = dmxConfigMatch(dmxConfigCmd.config, pt))) { + dmxLog(dmxInfo, "Using configuration \"%s\"\n", name); + dmxConfigCopyData(pt->virtual); + return; + } + } + dmxLog(dmxFatal, "Could not find configuration \"%s\" in \"%s\"\n", + dmxConfigCmd.config, dmxConfigCmd.filename); +} + +static void dmxConfigConfigInputs(void) +{ + DMXConfigListPtr pt; + + if (dmxNumInputs) return; + + if (dmxConfigCmd.inputs) { /* Use command line */ + for (pt = dmxConfigCmd.inputs; pt; pt = pt->next) + dmxConfigAddInput(pt->name, TRUE); + } else if (dmxNumScreens) { /* Use first display */ + dmxConfigAddInput(dmxScreens[0].name, TRUE); + } else { /* Use dummy */ + dmxConfigAddInput("dummy", TRUE); + } + + if (dmxConfigCmd.xinputs) { /* Non-core devices from command line */ + for (pt = dmxConfigCmd.xinputs; pt; pt = pt->next) + dmxConfigAddInput(pt->name, FALSE); + } +} + +/** Set up the appropriate global variables so that the DMX server will + * be initialized using the configuration specified in the config file + * and on the command line. */ +void dmxConfigConfigure(void) +{ + if (dmxConfigEntry) { + dmxConfigFreeEntry(dmxConfigEntry); + dmxConfigEntry = NULL; + } + if (dmxConfigCmd.filename) { + if (dmxConfigCmd.displays) + dmxLog(dmxWarning, + "Using configuration file \"%s\" instead of command line\n", + dmxConfigCmd.filename); + dmxConfigReadFile(dmxConfigCmd.filename, 0); + dmxConfigFromConfigFile(); + } else { + if (dmxConfigCmd.config) + dmxLog(dmxWarning, + "Configuration name (%s) without configuration file\n", + dmxConfigCmd.config); + dmxConfigFromCommandLine(); + } + dmxConfigConfigInputs(); +} + +/** This function determines the number of displays we WILL have and + * sets MAXSCREENS to that value. This is difficult since the number + * depends on the command line (which is easy to count) or on the config + * file, which has to be parsed. */ +void dmxConfigSetMaxScreens(void) +{ + static int processing = 0; + + if (processing) return; /* Prevent reentry via ProcessCommandLine */ + processing = 1; + if (dmxConfigCmd.filename) { + if (!dmxNumScreens) + dmxConfigConfigure(); +#ifndef MAXSCREENS + SetMaxScreens(dmxNumScreens); +#endif + } else +#ifndef MAXSCREENS + SetMaxScreens(dmxDisplaysFromCommandLine); +#endif + processing = 0; +} + +/** This macro is used to generate the following access methods: + * - dmxConfig{Set,Get}rules + * - dmxConfig{Set,Get}model + * - dmxConfig{Set,Get}layout + * - dmxConfig{Set,Get}variant + * - dmxConfig{Set,Get}options + * These methods are used to read and write information about the keyboard. */ + +#define GEN(param,glob,def) \ + void dmxConfigSet##glob(const char *param) { \ + if (dmx##glob) free((void *)dmx##glob); \ + dmx##glob = strdup(param); \ + } \ + char *dmxConfigGet##glob(void) { \ + return (char *)(dmx##glob ? dmx##glob : def); \ + } + +GEN(rules, XkbRules, DMX_DEFAULT_XKB_RULES) +GEN(model, XkbModel, DMX_DEFAULT_XKB_MODEL) +GEN(layout, XkbLayout, DMX_DEFAULT_XKB_LAYOUT) +GEN(variant, XkbVariant, DMX_DEFAULT_XKB_VARIANT) +GEN(options, XkbOptions, DMX_DEFAULT_XKB_OPTIONS) + diff --git a/xorg-server-1.4/hw/dmx/config/dmxconfig.h b/xorg-server-1.4/hw/dmx/config/dmxconfig.h new file mode 100644 index 0000000..7c9dbc7 --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/dmxconfig.h @@ -0,0 +1,64 @@ +/* + * Copyright 2002 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 + * Interface for DMX configuration file support. \see dmxconfig.c */ + +#ifndef _DMXCONFIG_H_ +#define _DMXCONFIG_H_ +#define DMX_DEFAULT_XKB_RULES "xfree86" +#define DMX_DEFAULT_XKB_MODEL "pc101" +#define DMX_DEFAULT_XKB_LAYOUT "us" +#define DMX_DEFAULT_XKB_VARIANT NULL +#define DMX_DEFAULT_XKB_OPTIONS NULL + +extern void dmxConfigStoreDisplay(const char *display); +extern void dmxConfigStoreInput(const char *input); /* Core devices */ +extern void dmxConfigStoreXInput(const char *input); /* Non-core devices */ +extern void dmxConfigStoreFile(const char *file); +extern void dmxConfigStoreConfig(const char *config); +extern void dmxConfigConfigure(void); +extern void dmxConfigSetMaxScreens(void); + +extern void dmxConfigSetXkbRules(const char *rules); +extern void dmxConfigSetXkbModel(const char *model); +extern void dmxConfigSetXkbLayout(const char *layout); +extern void dmxConfigSetXkbVariant(const char *variant); +extern void dmxConfigSetXkbOptions(const char *options); + +extern char *dmxConfigGetXkbRules(void); +extern char *dmxConfigGetXkbModel(void); +extern char *dmxConfigGetXkbLayout(void); +extern char *dmxConfigGetXkbVariant(void); +extern char *dmxConfigGetXkbOptions(void); +#endif diff --git a/xorg-server-1.4/hw/dmx/config/dmxparse.c b/xorg-server-1.4/hw/dmx/config/dmxparse.c new file mode 100644 index 0000000..0bf9470 --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/dmxparse.c @@ -0,0 +1,610 @@ +/* + * Copyright 2002 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 provides support routines and helper functions to be used + * by the DMX configuration file parser. + * + * Because the DMX configuration file parsing should be capable of being + * used in a stand-alone fashion (i.e., independent from the DMX server + * source tree), no dependencies on other DMX routines are made. */ + +#ifdef HAVE_DMX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include "dmxparse.h" + +/** A general error logging routine that does not depend on the dmxLog + * functions. */ +void dmxConfigLog(const char *format, ...) +{ + va_list args; + + va_start(args, format); + vprintf(format, args); /* RATS: All calls to dmxConfigLog from + * dmxparse.c and dmxprint.c use a + * trusted format. */ + va_end(args); +} + +void *dmxConfigAlloc(unsigned long bytes) +{ + void *area = malloc(bytes); + if (!area) { + dmxConfigLog("dmxConfigAlloc: out of memory\n"); + return NULL; + } + memset(area, 0, bytes); + return area; +} + +void *dmxConfigRealloc(void *orig, unsigned long orig_bytes, + unsigned long bytes) +{ + unsigned char *area = realloc(orig, bytes); + if (!area) { + dmxConfigLog("dmxConfigRealloc: out of memory\n"); + return NULL; + } + memset(area + orig_bytes, 0, bytes - orig_bytes); + return area; +} + +const char *dmxConfigCopyString(const char *string, int length) +{ + char *copy; + + if (!length) length = strlen(string); + copy = dmxConfigAlloc(length + 1); + if (length) strncpy(copy, string, length); + copy[length] = '\0'; + return copy; +} + +void dmxConfigFree(void *area) +{ + if (area) free(area); +} + +DMXConfigTokenPtr dmxConfigCreateToken(int token, int line, + const char *comment) +{ + DMXConfigTokenPtr pToken = dmxConfigAlloc(sizeof(*pToken)); + pToken->token = token; + pToken->line = line; + pToken->comment = comment; + return pToken; +} + +void dmxConfigFreeToken(DMXConfigTokenPtr p) +{ + if (!p) return; + dmxConfigFree((void *)p->comment); + dmxConfigFree(p); +} + +DMXConfigStringPtr dmxConfigCreateString(int token, int line, + const char *comment, + const char *string) +{ + DMXConfigStringPtr pString = dmxConfigAlloc(sizeof(*pString)); + + pString->token = token; + pString->line = line; + pString->comment = comment; + pString->string = string; + return pString; +} + +void dmxConfigFreeString(DMXConfigStringPtr p) +{ + DMXConfigStringPtr next; + + if (!p) return; + do { + next = p->next; + dmxConfigFree((void *)p->comment); + dmxConfigFree((void *)p->string); + dmxConfigFree(p); + } while ((p = next)); +} + +DMXConfigNumberPtr dmxConfigCreateNumber(int token, int line, + const char *comment, + int number) +{ + DMXConfigNumberPtr pNumber = dmxConfigAlloc(sizeof(*pNumber)); + + pNumber->token = token; + pNumber->line = line; + pNumber->comment = comment; + pNumber->number = number; + return pNumber; +} + +void dmxConfigFreeNumber(DMXConfigNumberPtr p) +{ + if (!p) return; + dmxConfigFree((void *)p->comment); + dmxConfigFree(p); +} + +DMXConfigPairPtr dmxConfigCreatePair(int token, int line, + const char *comment, + int x, int y, + int xsign, int ysign) +{ + DMXConfigPairPtr pPair = dmxConfigAlloc(sizeof(*pPair)); + + pPair->token = token; + pPair->line = line; + pPair->comment = comment; + pPair->x = x; + pPair->y = y; + pPair->xsign = (xsign < 0) ? -1 : 1; + pPair->ysign = (ysign < 0) ? -1 : 1; + return pPair; +} + +void dmxConfigFreePair(DMXConfigPairPtr p) +{ + if (!p) return; + dmxConfigFree((void *)p->comment); + dmxConfigFree(p); +} + +DMXConfigCommentPtr dmxConfigCreateComment(int token, int line, + const char *comment) +{ + DMXConfigCommentPtr pComment = dmxConfigAlloc(sizeof(*pComment)); + + pComment->token = token; + pComment->line = line; + pComment->comment = comment; + return pComment; +} + +void dmxConfigFreeComment(DMXConfigCommentPtr p) +{ + if (!p) return; + dmxConfigFree((void *)p->comment); + dmxConfigFree(p); +} + +DMXConfigPartDimPtr dmxConfigCreatePartDim(DMXConfigPairPtr pDim, + DMXConfigPairPtr pOffset) +{ + DMXConfigPartDimPtr pPart = dmxConfigAlloc(sizeof(*pPart)); + pPart->dim = pDim; + pPart->offset = pOffset; + return pPart; +} + +void dmxConfigFreePartDim(DMXConfigPartDimPtr p) +{ + if (!p) return; + dmxConfigFreePair(p->dim); + dmxConfigFreePair(p->offset); + dmxConfigFree(p); +} + +DMXConfigFullDimPtr dmxConfigCreateFullDim(DMXConfigPartDimPtr pScrn, + DMXConfigPartDimPtr pRoot) +{ + DMXConfigFullDimPtr pFull = dmxConfigAlloc(sizeof(*pFull)); + pFull->scrn = pScrn; + pFull->root = pRoot; + return pFull; +} + +void dmxConfigFreeFullDim(DMXConfigFullDimPtr p) +{ + if (!p) return; + dmxConfigFreePartDim(p->scrn); + dmxConfigFreePartDim(p->root); + dmxConfigFree(p); +} + +DMXConfigDisplayPtr dmxConfigCreateDisplay(DMXConfigTokenPtr pStart, + DMXConfigStringPtr pName, + DMXConfigFullDimPtr pDim, + DMXConfigPairPtr pOrigin, + DMXConfigTokenPtr pEnd) +{ + DMXConfigDisplayPtr pDisplay = dmxConfigAlloc(sizeof(*pDisplay)); + + memset(pDisplay, 0, sizeof(*pDisplay)); + + pDisplay->start = pStart; + pDisplay->dname = pName; + pDisplay->dim = pDim; + pDisplay->origin = pOrigin; + pDisplay->end = pEnd; + + pDisplay->name = pName ? pName->string : NULL; + pDisplay->rootXOrigin = pOrigin ? pOrigin->x : 0; + pDisplay->rootYOrigin = pOrigin ? pOrigin->y : 0; + + if (pDim && pDim->scrn && pDim->scrn->dim) { + pDisplay->scrnWidth = pDim->scrn->dim->x; + pDisplay->scrnHeight = pDim->scrn->dim->y; + } + if (pDim && pDim->scrn && pDim->scrn->offset) { + pDisplay->scrnX = pDim->scrn->offset->x; + pDisplay->scrnY = pDim->scrn->offset->y; + pDisplay->scrnXSign = pDim->scrn->offset->xsign; + pDisplay->scrnYSign = pDim->scrn->offset->ysign; + } + + if (pDim && pDim->root) { + if (pDim->root->dim) { + pDisplay->rootWidth = pDim->root->dim->x; + pDisplay->rootHeight = pDim->root->dim->y; + } + if (pDim->root->offset) { + pDisplay->rootX = pDim->root->offset->x; + pDisplay->rootY = pDim->root->offset->y; + pDisplay->rootXSign = pDim->root->offset->xsign; + pDisplay->rootYSign = pDim->root->offset->ysign; + } + } else { /* If no root specification, copy width + * and height from scrn -- leave offset + * as zero, since it is relative to + * scrn. */ + pDisplay->rootWidth = pDisplay->scrnWidth; + pDisplay->rootHeight = pDisplay->scrnHeight; + } + + + return pDisplay; +} + +void dmxConfigFreeDisplay(DMXConfigDisplayPtr p) +{ + if (!p) return; + dmxConfigFreeToken(p->start); + dmxConfigFreeString(p->dname); + dmxConfigFreeFullDim(p->dim); + dmxConfigFreeToken(p->end); + dmxConfigFree(p); +} + +DMXConfigWallPtr dmxConfigCreateWall(DMXConfigTokenPtr pStart, + DMXConfigPairPtr pWallDim, + DMXConfigPairPtr pDisplayDim, + DMXConfigStringPtr pNameList, + DMXConfigTokenPtr pEnd) +{ + DMXConfigWallPtr pWall = dmxConfigAlloc(sizeof(*pWall)); + + pWall->start = pStart; + pWall->wallDim = pWallDim; + pWall->displayDim = pDisplayDim; + pWall->nameList = pNameList; + pWall->end = pEnd; + + pWall->width = pDisplayDim ? pDisplayDim->x : 0; + pWall->height = pDisplayDim ? pDisplayDim->y : 0; + pWall->xwall = pWallDim ? pWallDim->x : 0; + pWall->ywall = pWallDim ? pWallDim->y : 0; + + return pWall; +} + +void dmxConfigFreeWall(DMXConfigWallPtr p) +{ + if (!p) return; + dmxConfigFreeToken(p->start); + dmxConfigFreePair(p->wallDim); + dmxConfigFreePair(p->displayDim); + dmxConfigFreeString(p->nameList); + dmxConfigFreeToken(p->end); + dmxConfigFree(p); +} + +DMXConfigOptionPtr dmxConfigCreateOption(DMXConfigTokenPtr pStart, + DMXConfigStringPtr pOption, + DMXConfigTokenPtr pEnd) +{ + int length = 0; + int offset = 0; + DMXConfigStringPtr p; + DMXConfigOptionPtr option = dmxConfigAlloc(sizeof(*option)); + + for (p = pOption; p; p = p->next) { + if (p->string) length += strlen(p->string) + 1; + } + + option->string = dmxConfigAlloc(length + 1); + + for (p = pOption; p; p = p->next) { + if (p->string) { + int len = strlen(p->string); + strncpy(option->string + offset, p->string, len); + offset += len; + if (p->next) option->string[offset++] = ' '; + } + } + option->string[offset] = '\0'; + + option->start = pStart; + option->option = pOption; + option->end = pEnd; + + return option; +} + +void dmxConfigFreeOption(DMXConfigOptionPtr p) +{ + if (!p) return; + if (p->string) free(p->string); + dmxConfigFreeToken(p->start); + dmxConfigFreeString(p->option); + dmxConfigFreeToken(p->end); + dmxConfigFree(p); +} + +const char **dmxConfigLookupParam(DMXConfigParamPtr p, const char *key, + int *argc) +{ + DMXConfigParamPtr pt; + + for (pt = p; pt; pt = pt->next) { + if (pt->argv && !strcasecmp(pt->argv[0], key)) { + *argc = pt->argc; + return pt->argv; + } + } + *argc = 0; + return NULL; +} + +DMXConfigParamPtr dmxConfigCreateParam(DMXConfigTokenPtr pStart, + DMXConfigTokenPtr pOpen, + DMXConfigStringPtr pParam, + DMXConfigTokenPtr pClose, + DMXConfigTokenPtr pEnd) +{ + DMXConfigParamPtr param = dmxConfigAlloc(sizeof(*param)); + DMXConfigStringPtr pt; + + param->argc = 0; + param->argv = NULL; + for (pt = pParam; pt; pt = pt->next) { + if (pt->string) { + param->argv = realloc(param->argv, + (param->argc+2) * sizeof(*param->argv)); + param->argv[param->argc] = pt->string; + ++param->argc; + } + } + if (param->argv) param->argv[param->argc] = NULL; + + param->start = pStart; + param->open = pOpen; + param->param = pParam; + param->close = pClose; + param->end = pEnd; + + return param; +} + +void dmxConfigFreeParam(DMXConfigParamPtr p) +{ + DMXConfigParamPtr next; + + if (!p) return; + do { + next = p->next; + dmxConfigFreeToken(p->start); + dmxConfigFreeToken(p->open); + dmxConfigFreeString(p->param); + dmxConfigFreeToken(p->close); + dmxConfigFreeToken(p->end); + dmxConfigFree(p->argv); + dmxConfigFree(p); + } while ((p = next)); +} + +DMXConfigSubPtr dmxConfigCreateSub(DMXConfigType type, + DMXConfigCommentPtr comment, + DMXConfigDisplayPtr display, + DMXConfigWallPtr wall, + DMXConfigOptionPtr option, + DMXConfigParamPtr param) +{ + DMXConfigSubPtr pSub = dmxConfigAlloc(sizeof(*pSub)); + pSub->type = type; + switch (type) { + case dmxConfigComment: pSub->comment = comment; break; + case dmxConfigDisplay: pSub->display = display; break; + case dmxConfigWall: pSub->wall = wall; break; + case dmxConfigOption: pSub->option = option; break; + case dmxConfigParam: pSub->param = param; break; + default: dmxConfigLog("Type %d not supported in subentry\n", type); break; + } + return pSub; +} + +void dmxConfigFreeSub(DMXConfigSubPtr sub) +{ + DMXConfigSubPtr pt; + + for (pt = sub; pt; pt = pt->next) { + switch (pt->type) { + case dmxConfigComment: dmxConfigFreeComment(pt->comment); break; + case dmxConfigDisplay: dmxConfigFreeDisplay(pt->display); break; + case dmxConfigWall: dmxConfigFreeWall(pt->wall); break; + case dmxConfigOption: dmxConfigFreeOption(pt->option); break; + case dmxConfigParam: dmxConfigFreeParam(pt->param); break; + default: + dmxConfigLog("Type %d not supported in subentry\n", pt->type); + break; + } + } + dmxConfigFree(sub); +} + +DMXConfigSubPtr dmxConfigSubComment(DMXConfigCommentPtr comment) +{ + return dmxConfigCreateSub(dmxConfigComment, comment, NULL, NULL, NULL, + NULL); +} + +DMXConfigSubPtr dmxConfigSubDisplay(DMXConfigDisplayPtr display) +{ + return dmxConfigCreateSub(dmxConfigDisplay, NULL, display, NULL, NULL, + NULL); +} + +DMXConfigSubPtr dmxConfigSubWall(DMXConfigWallPtr wall) +{ + return dmxConfigCreateSub(dmxConfigWall, NULL, NULL, wall, NULL, NULL); +} + +DMXConfigSubPtr dmxConfigSubOption(DMXConfigOptionPtr option) +{ + return dmxConfigCreateSub(dmxConfigOption, NULL, NULL, NULL, option, NULL); +} + +DMXConfigSubPtr dmxConfigSubParam(DMXConfigParamPtr param) +{ + return dmxConfigCreateSub(dmxConfigParam, NULL, NULL, NULL, NULL, param); +} + +extern DMXConfigSubPtr dmxConfigAddSub(DMXConfigSubPtr head, + DMXConfigSubPtr sub) +{ + DMXConfigSubPtr pt; + + if (!head) return sub; + for (pt = head; pt->next; pt = pt->next); + pt->next = sub; + return head; +} + +DMXConfigVirtualPtr dmxConfigCreateVirtual(DMXConfigTokenPtr pStart, + DMXConfigStringPtr pName, + DMXConfigPairPtr pDim, + DMXConfigTokenPtr pOpen, + DMXConfigSubPtr pSubentry, + DMXConfigTokenPtr pClose) +{ + DMXConfigVirtualPtr pVirtual = dmxConfigAlloc(sizeof(*pVirtual)); + + pVirtual->start = pStart; + pVirtual->vname = pName; + pVirtual->dim = pDim; + pVirtual->open = pOpen; + pVirtual->subentry = pSubentry; + pVirtual->close = pClose; + + pVirtual->name = pName ? pName->string : NULL; + pVirtual->width = pDim ? pDim->x : 0; + pVirtual->height = pDim ? pDim->y : 0; + + return pVirtual; +} + +void dmxConfigFreeVirtual(DMXConfigVirtualPtr virtual) +{ + dmxConfigFreeToken(virtual->start); + dmxConfigFreeString(virtual->vname); + dmxConfigFreePair(virtual->dim); + dmxConfigFreeToken(virtual->open); + dmxConfigFreeSub(virtual->subentry); + dmxConfigFreeToken(virtual->close); + dmxConfigFree(virtual); +} + +DMXConfigEntryPtr dmxConfigCreateEntry(DMXConfigType type, + DMXConfigCommentPtr comment, + DMXConfigVirtualPtr virtual) +{ + DMXConfigEntryPtr pEntry = dmxConfigAlloc(sizeof(*pEntry)); + pEntry->type = type; + switch (type) { + case dmxConfigComment: pEntry->comment = comment; break; + case dmxConfigVirtual: pEntry->virtual = virtual; break; + default: dmxConfigLog("Type %d not supported in entry\n", type); break; + } + return pEntry; +} + +void dmxConfigFreeEntry(DMXConfigEntryPtr entry) +{ + DMXConfigEntryPtr pt; + + for (pt = entry; pt; pt = pt->next) { + switch (pt->type) { + case dmxConfigComment: dmxConfigFreeComment(pt->comment); break; + case dmxConfigVirtual: dmxConfigFreeVirtual(pt->virtual); break; + default: + dmxConfigLog("Type %d not supported in entry\n", pt->type); + break; + } + } + dmxConfigFree(entry); +} + +DMXConfigEntryPtr dmxConfigAddEntry(DMXConfigEntryPtr head, + DMXConfigType type, + DMXConfigCommentPtr comment, + DMXConfigVirtualPtr virtual) +{ + DMXConfigEntryPtr child = dmxConfigCreateEntry(type, comment, virtual); + DMXConfigEntryPtr pt; + + if (!head) return child; + + for (pt = head; pt->next; pt = pt->next); + pt->next = child; + + return head; +} + +DMXConfigEntryPtr dmxConfigEntryComment(DMXConfigCommentPtr comment) +{ + return dmxConfigCreateEntry(dmxConfigComment, comment, NULL); +} + +DMXConfigEntryPtr dmxConfigEntryVirtual(DMXConfigVirtualPtr virtual) +{ + return dmxConfigCreateEntry(dmxConfigVirtual, NULL, virtual); +} diff --git a/xorg-server-1.4/hw/dmx/config/dmxparse.h b/xorg-server-1.4/hw/dmx/config/dmxparse.h new file mode 100644 index 0000000..de81d23 --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/dmxparse.h @@ -0,0 +1,297 @@ +/* + * Copyright 2002 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 + * Interface to DMX configuration file parser. \see dmxparse.c */ + +#ifndef _DMXPARSE_H_ +#define _DMXPARSE_H_ + +#include /* For FILE */ + +/** Stores tokens not stored in other structures (e.g., keywords and ;) */ +typedef struct _DMXConfigToken { + int token; + int line; + const char *comment; +} DMXConfigToken, *DMXConfigTokenPtr; + +/** Stores parsed strings. */ +typedef struct _DMXConfigString { + int token; + int line; + const char *comment; + const char *string; + struct _DMXConfigString *next; +} DMXConfigString, *DMXConfigStringPtr; + +/** Stores parsed numbers. */ +typedef struct _DMXConfigNumber { + int token; + int line; + const char *comment; + int number; +} DMXConfigNumber, *DMXConfigNumberPtr; + +/** Stores parsed pairs (e.g., x y) */ +typedef struct _DMXConfigPair { + int token; + int line; + const char *comment; + int x; + int y; + int xsign; + int ysign; +} DMXConfigPair, *DMXConfigPairPtr; + +/** Stores parsed comments not stored with a token. */ +typedef struct _DMXConfigComment { + int token; + int line; + const char *comment; +} DMXConfigComment, *DMXConfigCommentPtr; + +typedef enum { + dmxConfigComment, + dmxConfigVirtual, + dmxConfigDisplay, + dmxConfigWall, + dmxConfigOption, + dmxConfigParam +} DMXConfigType; + +/** Stores a geometry specification. */ +typedef struct _DMXConfigPartDim { + DMXConfigPairPtr dim; + DMXConfigPairPtr offset; +} DMXConfigPartDim, *DMXConfigPartDimPtr; + +/** Stores a pair of geometry specifications. */ +typedef struct _DMXConfigFullDim { + DMXConfigPartDimPtr scrn; + DMXConfigPartDimPtr root; +} DMXConfigFullDim, *DMXConfigFullDimPtr; + +/** Stores parsed display information. */ +typedef struct _DMXConfigDisplay { + /* Summary information */ + const char *name; + /* Screen Window Geometry */ + int scrnWidth, scrnHeight; + int scrnX, scrnY; + int scrnXSign, scrnYSign; + /* Root Window Geometry */ + int rootWidth, rootHeight; + int rootX, rootY; + int rootXSign, rootYSign; + /* Origin in global space */ + int rootXOrigin, rootYOrigin; + + /* Raw configuration information */ + DMXConfigTokenPtr start; + DMXConfigStringPtr dname; + DMXConfigFullDimPtr dim; + DMXConfigPairPtr origin; + DMXConfigTokenPtr end; +} DMXConfigDisplay, *DMXConfigDisplayPtr; + +/** Stores parsed wall information. */ +typedef struct _DMXConfigWall { + /* Summary information */ + int width, height; /* dimensions of displays */ + int xwall, ywall; /* dimensions of wall, in tiles */ + + + /* Raw configuration informaiton */ + DMXConfigTokenPtr start; + DMXConfigPairPtr wallDim; + DMXConfigPairPtr displayDim; + DMXConfigStringPtr nameList; + DMXConfigTokenPtr end; +} DMXConfigWall, *DMXConfigWallPtr; + +/** Stores parsed option information. */ +typedef struct _DMXConfigOption { + /* Summary information */ + char *string; + + /* Raw configuration informaiton */ + DMXConfigTokenPtr start; + DMXConfigStringPtr option; + DMXConfigTokenPtr end; +} DMXConfigOption, *DMXConfigOptionPtr; + +/** Stores parsed param information. */ +typedef struct _DMXConfigParam { + int argc; + const char **argv; + + DMXConfigTokenPtr start; + DMXConfigTokenPtr open; + DMXConfigStringPtr param; + DMXConfigTokenPtr close; + DMXConfigTokenPtr end; /* Either open/close OR end */ + struct _DMXConfigParam *next; +} DMXConfigParam, *DMXConfigParamPtr; + +/** Stores options under an entry (subentry). */ +typedef struct _DMXConfigSub { + DMXConfigType type; + DMXConfigCommentPtr comment; + DMXConfigDisplayPtr display; + DMXConfigWallPtr wall; + DMXConfigOptionPtr option; + DMXConfigParamPtr param; + struct _DMXConfigSub *next; +} DMXConfigSub, *DMXConfigSubPtr; + +/** Stores parsed virtual information. */ +typedef struct _DMXConfigVirtual { + /* Summary information */ + const char *name; + int width, height; + + /* Raw configuration information */ + DMXConfigTokenPtr start; + DMXConfigStringPtr vname; + DMXConfigPairPtr dim; + DMXConfigTokenPtr open; + DMXConfigSubPtr subentry; + DMXConfigTokenPtr close; +} DMXConfigVirtual, *DMXConfigVirtualPtr; + +/** Heads entry storage. */ +typedef struct _DMXConfigEntry { + DMXConfigType type; + DMXConfigCommentPtr comment; + DMXConfigVirtualPtr virtual; + struct _DMXConfigEntry *next; +} DMXConfigEntry, *DMXConfigEntryPtr; + +extern DMXConfigEntryPtr dmxConfigEntry; + +extern int yylex(void); +extern int yydebug; +extern void yyerror(const char *message); + +extern void dmxConfigLog(const char *format, ...); +extern void *dmxConfigAlloc(unsigned long bytes); +extern void *dmxConfigRealloc(void *orig, + unsigned long orig_bytes, + unsigned long bytes); +extern const char *dmxConfigCopyString(const char *string, + int length); +extern void dmxConfigFree(void *area); +extern DMXConfigTokenPtr dmxConfigCreateToken(int token, int line, + const char *comment); +extern void dmxConfigFreeToken(DMXConfigTokenPtr p); +extern DMXConfigStringPtr dmxConfigCreateString(int token, int line, + const char *comment, + const char *string); +extern void dmxConfigFreeString(DMXConfigStringPtr p); +extern DMXConfigNumberPtr dmxConfigCreateNumber(int token, int line, + const char *comment, + int number); +extern void dmxConfigFreeNumber(DMXConfigNumberPtr p); +extern DMXConfigPairPtr dmxConfigCreatePair(int token, int line, + const char *comment, + int x, int y, + int xsign, int ysign); +extern void dmxConfigFreePair(DMXConfigPairPtr p); +extern DMXConfigCommentPtr dmxConfigCreateComment(int token, int line, + const char *comment); +extern void dmxConfigFreeComment(DMXConfigCommentPtr p); +extern DMXConfigPartDimPtr dmxConfigCreatePartDim(DMXConfigPairPtr pDim, + DMXConfigPairPtr pOffset); +extern void dmxConfigFreePartDim(DMXConfigPartDimPtr p); +extern DMXConfigFullDimPtr dmxConfigCreateFullDim(DMXConfigPartDimPtr pScrn, + DMXConfigPartDimPtr pRoot); +extern void dmxConfigFreeFullDim(DMXConfigFullDimPtr p); +extern DMXConfigDisplayPtr dmxConfigCreateDisplay(DMXConfigTokenPtr pStart, + DMXConfigStringPtr pName, + DMXConfigFullDimPtr pDim, + DMXConfigPairPtr pOrigin, + DMXConfigTokenPtr pEnd); +extern void dmxConfigFreeDisplay(DMXConfigDisplayPtr p); +extern DMXConfigWallPtr dmxConfigCreateWall(DMXConfigTokenPtr pStart, + DMXConfigPairPtr pWallDim, + DMXConfigPairPtr pDisplayDim, + DMXConfigStringPtr pNameList, + DMXConfigTokenPtr pEnd); +extern void dmxConfigFreeWall(DMXConfigWallPtr p); +extern DMXConfigOptionPtr dmxConfigCreateOption(DMXConfigTokenPtr pStart, + DMXConfigStringPtr pOption, + DMXConfigTokenPtr pEnd); +extern void dmxConfigFreeOption(DMXConfigOptionPtr p); +extern DMXConfigParamPtr dmxConfigCreateParam(DMXConfigTokenPtr pStart, + DMXConfigTokenPtr pOpen, + DMXConfigStringPtr pParam, + DMXConfigTokenPtr pClose, + DMXConfigTokenPtr pEnd); +extern void dmxConfigFreeParam(DMXConfigParamPtr p); +extern const char **dmxConfigLookupParam(DMXConfigParamPtr p, + const char *key, + int *argc); +extern DMXConfigSubPtr dmxConfigCreateSub(DMXConfigType type, + DMXConfigCommentPtr comment, + DMXConfigDisplayPtr display, + DMXConfigWallPtr wall, + DMXConfigOptionPtr option, + DMXConfigParamPtr param); +extern void dmxConfigFreeSub(DMXConfigSubPtr sub); +extern DMXConfigSubPtr dmxConfigSubComment(DMXConfigCommentPtr comment); +extern DMXConfigSubPtr dmxConfigSubDisplay(DMXConfigDisplayPtr display); +extern DMXConfigSubPtr dmxConfigSubWall(DMXConfigWallPtr wall); +extern DMXConfigSubPtr dmxConfigSubOption(DMXConfigOptionPtr option); +extern DMXConfigSubPtr dmxConfigSubParam(DMXConfigParamPtr param); +extern DMXConfigSubPtr dmxConfigAddSub(DMXConfigSubPtr head, + DMXConfigSubPtr sub); +extern DMXConfigVirtualPtr dmxConfigCreateVirtual(DMXConfigTokenPtr pStart, + DMXConfigStringPtr pName, + DMXConfigPairPtr pDim, + DMXConfigTokenPtr pOpen, + DMXConfigSubPtr pSubentry, + DMXConfigTokenPtr pClose); +extern void dmxConfigFreeVirtual(DMXConfigVirtualPtr virtual); +extern DMXConfigEntryPtr dmxConfigCreateEntry(DMXConfigType type, + DMXConfigCommentPtr comment, + DMXConfigVirtualPtr virtual); +extern void dmxConfigFreeEntry(DMXConfigEntryPtr entry); +extern DMXConfigEntryPtr dmxConfigAddEntry(DMXConfigEntryPtr head, + DMXConfigType type, + DMXConfigCommentPtr comment, + DMXConfigVirtualPtr virtual); +extern DMXConfigEntryPtr dmxConfigEntryComment(DMXConfigCommentPtr comment); +extern DMXConfigEntryPtr dmxConfigEntryVirtual(DMXConfigVirtualPtr virtual); + +#endif diff --git a/xorg-server-1.4/hw/dmx/config/dmxprint.c b/xorg-server-1.4/hw/dmx/config/dmxprint.c new file mode 100644 index 0000000..599ebf5 --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/dmxprint.c @@ -0,0 +1,455 @@ +/* + * Copyright 2002 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 provides support routines and helper functions to be used + * to pretty-print DMX configurations. + * + * Because the DMX configuration file parsing should be capable of being + * used in a stand-alone fashion (i.e., independent from the DMX server + * source tree), no dependencies on other DMX routines are made. */ + +#ifdef HAVE_DMX_CONFIG_H +#include +#endif + +#include "dmxconfig.h" +#include "dmxparse.h" +#include "dmxprint.h" +#include "parser.h" +#include +#include +#include + +static FILE *str = NULL; +static int indent = 0; +static int pos = 0; + +/** Stack of indentation information used for pretty-printing + * configuration information. */ +static struct stack { + int base; + int comment; + int step; + struct stack *next; +} *stack, initialStack = { 0, 0, 4, NULL }; + +static void dmxConfigIndent(void) +{ + int i; + if (indent < 0) indent = 0; + if (indent > 40) indent = 40; + for (i = 0; i < indent; i++) fprintf(str, " "); +} + +static void dmxConfigNewline(void) +{ + if (pos) fprintf(str, "\n"); + pos = 0; +} + +static void dmxConfigPushState(int base, int comment, int step) +{ + struct stack *new = dmxConfigAlloc(sizeof(*new)); + new->base = base; + new->comment = comment; + new->step = step; + new->next = stack; + stack = new; + indent = base; + dmxConfigNewline(); +} + +static void dmxConfigPushComment(void) +{ + if (stack) indent = stack->comment; +} + +static void dmxConfigPushStep(void) +{ + if (stack) indent = stack->step; +} + +static void dmxConfigPopState(void) +{ + struct stack *old = stack; + + if (!stack) return; + indent = old->base; + stack = old->next; + if (!stack) dmxConfigLog("Stack underflow\n"); + dmxConfigFree(old); + dmxConfigNewline(); +} + +static void dmxConfigOutput(int addSpace, int doNewline, const char *comment, + const char *format, ...) +{ + va_list args; + + if (!pos) dmxConfigIndent(); + else if (addSpace) fprintf(str, " "); + + if (format) { + va_start(args, format); + /* RATS: This hasn't been audited -- it + * could probably result in a buffer + * overflow. */ + pos += vfprintf(str, format, args); /* assumes no newlines! */ + va_end(args); + } + + if (comment) { + if (pos) fprintf(str, " "); + pos += fprintf(str, "#%s", comment); + dmxConfigNewline(); + dmxConfigPushComment(); + } else if (doNewline) dmxConfigNewline(); +} + +static void dmxConfigPrintComment(DMXConfigCommentPtr p) +{ + dmxConfigOutput(1, 1, p->comment, NULL); +} + +static void dmxConfigPrintTokenFlag(DMXConfigTokenPtr p, int flag) +{ + if (!p) return; + switch (p->token) { + case T_VIRTUAL: + dmxConfigPushState(0, 4, 4); + dmxConfigOutput(0, 0, p->comment, "virtual"); + break; + case T_DISPLAY: + dmxConfigPushState(4, 12, 16); + dmxConfigOutput(0, 0, p->comment, "display"); + break; + case T_WALL: + dmxConfigPushState(4, 12, 16); + dmxConfigOutput(0, 0, p->comment, "wall"); + break; + case T_OPTION: + dmxConfigPushState(4, 12, 16); + dmxConfigOutput(0, 0, p->comment, "option"); + break; + case T_PARAM: + dmxConfigPushState(4, 8, 12); + dmxConfigOutput(0, 0, p->comment, "param"); + break; + case ';': + dmxConfigOutput(0, 1, p->comment, ";"); + if (flag) dmxConfigPopState(); + break; + case '{': + dmxConfigOutput(1, 1, p->comment, "{"); + dmxConfigPushStep(); + break; + case '}': + if (flag) dmxConfigPopState(); + dmxConfigOutput(0, 1, p->comment, "}"); + break; + case '/': + dmxConfigOutput(1, 0, NULL, "/"); + break; + default: + dmxConfigLog("unknown token %d on line %d\n", p->token, p->line); + } +} + +static void dmxConfigPrintToken(DMXConfigTokenPtr p) +{ + dmxConfigPrintTokenFlag(p, 1); +} + +static void dmxConfigPrintTokenNopop(DMXConfigTokenPtr p) +{ + dmxConfigPrintTokenFlag(p, 0); +} + +static int dmxConfigPrintQuotedString(const char *s) +{ + const char *pt; + + if (!s || !s[0]) return 1; /* Quote empty string */ + for (pt = s; *pt; ++pt) if (isspace(*pt)) return 1; + return 0; +} + +static void dmxConfigPrintString(DMXConfigStringPtr p, int quote) +{ + DMXConfigStringPtr pt; + + if (!p) return; + for (pt = p; pt; pt = pt->next) { + if (quote && dmxConfigPrintQuotedString(pt->string)) { + dmxConfigOutput(1, 0, pt->comment, "\"%s\"", + pt->string ? pt->string : ""); + } else + dmxConfigOutput(1, 0, pt->comment, "%s", + pt->string ? pt->string : ""); + } +} + +static int dmxConfigPrintPair(DMXConfigPairPtr p, int addSpace) +{ + const char *format = NULL; + + if (!p) return 0; + switch (p->token) { + case T_ORIGIN: format = "@%dx%d"; break; + case T_DIMENSION: format = "%dx%d"; break; + case T_OFFSET: format = "%c%d%c%d"; break; + } + if (p->token == T_OFFSET) { + if (!p->comment && !p->x && !p->y && p->xsign >= 0 && p->ysign >= 0) + return 0; + dmxConfigOutput(addSpace, 0, p->comment, format, + p->xsign < 0 ? '-' : '+', p->x, + p->ysign < 0 ? '-' : '+', p->y); + } else { + if (!p->comment && !p->x && !p->y) return 0; + dmxConfigOutput(addSpace, 0, p->comment, format, p->x, p->y); + } + return 1; +} + +static void dmxConfigPrintDisplay(DMXConfigDisplayPtr p) +{ + DMXConfigToken dummyStart = { T_DISPLAY, 0, NULL }; + DMXConfigToken dummyEnd = { ';', 0, NULL }; + DMXConfigToken dummySep = { '/', 0, NULL }; + DMXConfigString dummyName = { T_STRING, 0, NULL, NULL, NULL }; + DMXConfigPair dummySDim = { T_DIMENSION, 0, NULL, 0, 0, 0, 0 }; + DMXConfigPair dummySOffset = { T_OFFSET, 0, NULL, 0, 0, 0, 0 }; + DMXConfigPair dummyRDim = { T_DIMENSION, 0, NULL, 0, 0, 0, 0 }; + DMXConfigPair dummyROffset = { T_OFFSET, 0, NULL, 0, 0, 0, 0 }; + DMXConfigPair dummyOrigin = { T_ORIGIN, 0, NULL, 0, 0, 0, 0 }; + int output; + + if (p->dname) p->dname->string = p->name; + else dummyName.string = p->name; + + if (p->dim && p->dim->scrn && p->dim->scrn->dim) { + p->dim->scrn->dim->x = p->scrnWidth; + p->dim->scrn->dim->y = p->scrnHeight; + } else { + dummySDim.x = p->scrnWidth; + dummySDim.y = p->scrnHeight; + } + + if (p->dim && p->dim->scrn && p->dim->scrn->offset) { + p->dim->scrn->offset->x = p->scrnX; + p->dim->scrn->offset->y = p->scrnY; + } else { + dummySOffset.x = p->scrnX; + dummySOffset.y = p->scrnY; + } + + if (p->dim && p->dim->root && p->dim->root->dim) { + p->dim->root->dim->x = p->rootWidth; + p->dim->root->dim->y = p->rootHeight; + } else { + dummyRDim.x = p->rootWidth; + dummyRDim.y = p->rootHeight; + } + + if (p->dim && p->dim->root && p->dim->root->offset) { + p->dim->root->offset->x = p->rootX; + p->dim->root->offset->y = p->rootY; + } else { + dummyROffset.x = p->rootX; + dummyROffset.y = p->rootY; + } + + if (p->origin) { + p->origin->x = p->rootXOrigin, p->origin->y = p->rootYOrigin; + p->origin->xsign = p->rootXSign, p->origin->ysign = p->rootYSign; + } else { + dummyOrigin.x = p->rootXOrigin, dummyOrigin.y = p->rootYOrigin; + dummyOrigin.xsign = p->rootXSign, dummyOrigin.ysign = p->rootYSign; + } + + dmxConfigPrintToken(p->start ? p->start : &dummyStart); + dmxConfigPrintString(p->dname ? p->dname : &dummyName, 1); + + if (p->dim && p->dim->scrn && p->dim->scrn->dim) + output = dmxConfigPrintPair(p->dim->scrn->dim, 1); + else + output = dmxConfigPrintPair(&dummySDim, 1); + if (p->dim && p->dim->scrn && p->dim->scrn->offset) + dmxConfigPrintPair(p->dim->scrn->offset, !output); + else + dmxConfigPrintPair(&dummySOffset, !output); + + if (p->scrnWidth != p->rootWidth + || p->scrnHeight != p->rootHeight + || p->rootX + || p->rootY) { + dmxConfigPrintToken(&dummySep); + if (p->dim && p->dim->root && p->dim->root->dim) + output = dmxConfigPrintPair(p->dim->root->dim, 1); + else + output = dmxConfigPrintPair(&dummyRDim, 1); + if (p->dim && p->dim->root && p->dim->root->offset) + dmxConfigPrintPair(p->dim->root->offset, !output); + else + dmxConfigPrintPair(&dummyROffset, !output); + } + + dmxConfigPrintPair(p->origin ? p->origin : &dummyOrigin, 1); + dmxConfigPrintToken(p->end ? p->end : &dummyEnd); +} + +static void dmxConfigPrintWall(DMXConfigWallPtr p) +{ + dmxConfigPrintToken(p->start); + dmxConfigPrintPair(p->wallDim, 1); + dmxConfigPrintPair(p->displayDim, 1); + dmxConfigPrintString(p->nameList, 1); + dmxConfigPrintToken(p->end); +} + +static void dmxConfigPrintOption(DMXConfigOptionPtr p) +{ + DMXConfigToken dummyStart = { T_OPTION, 0, NULL }; + DMXConfigString dummyOption = { T_STRING, 0, NULL, NULL, NULL }; + DMXConfigToken dummyEnd = { ';', 0, NULL }; + + dummyOption.string = p->string; + + dmxConfigPrintToken(p->start ? p->start : &dummyStart); + dmxConfigPrintString(&dummyOption, 0); + dmxConfigPrintToken(p->end ? p->end : &dummyEnd); +} + +static void dmxConfigPrintParam(DMXConfigParamPtr p) +{ + if (!p) return; + if (p->start) { + if (p->open && p->close) { + dmxConfigPrintToken(p->start); + dmxConfigPrintToken(p->open); + dmxConfigPrintParam(p->next); + dmxConfigPrintToken(p->close); + } else if (p->end && p->param) { + dmxConfigPrintToken(p->start); + dmxConfigPrintString(p->param, 1); + dmxConfigPrintToken(p->end); + } else + dmxConfigLog("dmxConfigPrintParam: cannot handle format (a)\n"); + } else if (p->end && p->param) { + dmxConfigPrintString(p->param, 1); + dmxConfigPrintTokenNopop(p->end); + dmxConfigPrintParam(p->next); + } else + dmxConfigLog("dmxConfigPrintParam: cannot handle format (b)\n"); +} + +static void dmxConfigPrintSub(DMXConfigSubPtr p) +{ + DMXConfigSubPtr pt; + + if (!p) return; + for (pt = p; pt; pt = pt->next) { + switch (pt->type) { + case dmxConfigComment: dmxConfigPrintComment(pt->comment); break; + case dmxConfigDisplay: dmxConfigPrintDisplay(pt->display); break; + case dmxConfigWall: dmxConfigPrintWall(pt->wall); break; + case dmxConfigOption: dmxConfigPrintOption(pt->option); break; + case dmxConfigParam: dmxConfigPrintParam(pt->param); break; + default: + dmxConfigLog("dmxConfigPrintSub:" + " cannot handle type %d in subentry\n", pt->type); + } + } +} + +static void dmxConfigPrintVirtual(DMXConfigVirtualPtr p) +{ + DMXConfigToken dummyStart = { T_VIRTUAL, 0, NULL }; + DMXConfigToken dummyOpen = { '{', 0, NULL }; + DMXConfigToken dummyClose = { '}', 0, NULL }; + DMXConfigString dummyName = { T_STRING, 0, NULL, NULL, NULL }; + DMXConfigPair dummyDim = { T_DIMENSION, 0, NULL, 0, 0 }; + + if (p->vname) p->vname->string = p->name; + else dummyName.string = p->name; + + if (p->dim) p->dim->x = p->width, p->dim->y = p->height; + else dummyDim.x = p->width, dummyDim.y = p->height; + + + dmxConfigPrintToken(p->start ? p->start : &dummyStart); + dmxConfigPrintString(p->vname ? p->vname : &dummyName, 1); + dmxConfigPrintPair(p->dim ? p->dim : &dummyDim, 1); + dmxConfigPrintToken(p->open ? p->open : &dummyOpen); + dmxConfigPrintSub(p->subentry); + dmxConfigPrintToken(p->close ? p->close : &dummyClose); +} + +/** The configuration information in \a entry will be pretty-printed to + * the \a stream. If \a stream is NULL, then stdout will be used. */ +void dmxConfigPrint(FILE *stream, DMXConfigEntryPtr entry) +{ + DMXConfigEntryPtr pt; + + if (!stream) str = stdout; + else str = stream; + + stack = &initialStack; + + for (pt = entry; pt; pt = pt->next) { + switch (pt->type) { + case dmxConfigComment: dmxConfigPrintComment(pt->comment); break; + case dmxConfigVirtual: dmxConfigPrintVirtual(pt->virtual); break; + default: + dmxConfigLog("dmxConfigPrint: cannot handle type %d in entry\n", + pt->type); + } + } + if (pos) dmxConfigNewline(); +} + +/** The configuration information in \a p will be pretty-printed to the + * \a stream. If \a stream is NULL, then stdout will be used. */ +void dmxConfigVirtualPrint(FILE *stream, DMXConfigVirtualPtr p) +{ + if (!stream) str = stdout; + else str = stream; + + stack = &initialStack; + + dmxConfigPrintVirtual(p); + if (pos) dmxConfigNewline(); +} diff --git a/xorg-server-1.4/hw/dmx/config/dmxprint.h b/xorg-server-1.4/hw/dmx/config/dmxprint.h new file mode 100644 index 0000000..d162dea --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/dmxprint.h @@ -0,0 +1,43 @@ +/* + * Copyright 2002 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 + * Interface to DMX configuration file pretty-printer. \see dmxprint.c */ + +#ifndef _DMXPRINT_H_ +#define _DMXPRINT_H_ + +void dmxConfigPrint(FILE *str, DMXConfigEntryPtr entry); +void dmxConfigVirtualPrint(FILE *str, DMXConfigVirtualPtr p); + +#endif diff --git a/xorg-server-1.4/hw/dmx/config/dmxtodmx.c b/xorg-server-1.4/hw/dmx/config/dmxtodmx.c new file mode 100644 index 0000000..0d4ee4c --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/dmxtodmx.c @@ -0,0 +1,49 @@ +/* + * Copyright 2002 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 + * + * This is a simple filter for testing. + */ + +#include "dmxconfig.h" +#include "dmxparse.h" +#include "dmxprint.h" +#include "dmxcompat.h" + +extern int yyparse(void); +extern FILE *yyin; + +int main(int argc, char **argv) +{ + yydebug = 0; + yyparse(); + dmxConfigPrint(stdout, dmxConfigEntry); + return 0; +} diff --git a/xorg-server-1.4/hw/dmx/config/dmxtodmx.man b/xorg-server-1.4/hw/dmx/config/dmxtodmx.man new file mode 100644 index 0000000..68c7f5b --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/dmxtodmx.man @@ -0,0 +1,41 @@ +.\" $XFree86$ +.\" Copyright 2002 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 +.\" +.TH dmxtodmx 1 __vendorversion__ +.SH NAME +dmxtodmx - dmx configuration file parser and printer +.SH SYNOPSIS +.B dmxtodmx +.SH DESCRIPTION +.I dmxtodmx +reads the standard input, parsing a configuration file for the +.I Xdmx +distributed multi-head X server. After a successful parse, the file is +pretty-printed to standard output. +.SH "SEE ALSO" +Xdmx(1), vdltodmx(1), xdmxconfig(1) diff --git a/xorg-server-1.4/hw/dmx/config/parser.c b/xorg-server-1.4/hw/dmx/config/parser.c new file mode 100644 index 0000000..c8fc62e --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/parser.c @@ -0,0 +1,1500 @@ +/* A Bison parser, made from /home/anholt/xserver-stable/hw/dmx/config/parser.y, by GNU bison 1.75. */ + +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. + + 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, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Written by Richard Stallman by simplifying the original so called + ``semantic'' parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Pure parsers. */ +#define YYPURE 0 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + T_VIRTUAL = 258, + T_DISPLAY = 259, + T_WALL = 260, + T_OPTION = 261, + T_PARAM = 262, + T_STRING = 263, + T_DIMENSION = 264, + T_OFFSET = 265, + T_ORIGIN = 266, + T_COMMENT = 267, + T_LINE_COMMENT = 268 + }; +#endif +#define T_VIRTUAL 258 +#define T_DISPLAY 259 +#define T_WALL 260 +#define T_OPTION 261 +#define T_PARAM 262 +#define T_STRING 263 +#define T_DIMENSION 264 +#define T_OFFSET 265 +#define T_ORIGIN 266 +#define T_COMMENT 267 +#define T_LINE_COMMENT 268 + + + + +/* Copy the first part of user declarations. */ +#line 35 "parser.y" + +#ifdef HAVE_DMX_CONFIG_H +#include +#endif + +#include "dmxparse.h" +#include +#include +#define YYDEBUG 1 +#define YYERROR_VERBOSE +#define YY_USE_PROTOS + +DMXConfigEntryPtr dmxConfigEntry = NULL; +#define APPEND(type, h, t) \ +{ \ + type pt; \ + for (pt = h; pt->next; pt = pt->next); \ + pt->next = t; \ +} + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +#ifndef YYSTYPE +#line 56 "parser.y" +typedef union { + DMXConfigTokenPtr token; + DMXConfigStringPtr string; + DMXConfigNumberPtr number; + DMXConfigPairPtr pair; + DMXConfigFullDimPtr fdim; + DMXConfigPartDimPtr pdim; + DMXConfigDisplayPtr display; + DMXConfigWallPtr wall; + DMXConfigOptionPtr option; + DMXConfigParamPtr param; + DMXConfigCommentPtr comment; + DMXConfigSubPtr subentry; + DMXConfigVirtualPtr virtual; + DMXConfigEntryPtr entry; +} yystype; +/* Line 188 of /usr/local/share/bison/yacc.c. */ +#line 137 "parser.c" +# define YYSTYPE yystype +# define YYSTYPE_IS_TRIVIAL 1 +#endif + +#ifndef YYLTYPE +typedef struct yyltype +{ + int first_line; + int first_column; + int last_line; + int last_column; +} yyltype; +# define YYLTYPE yyltype +# define YYLTYPE_IS_TRIVIAL 1 +#endif + +/* Copy the second part of user declarations. */ + + +/* Line 213 of /usr/local/share/bison/yacc.c. */ +#line 158 "parser.c" + +#if ! defined (yyoverflow) || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# if YYSTACK_USE_ALLOCA +# define YYSTACK_ALLOC alloca +# else +# ifndef YYSTACK_USE_ALLOCA +# if defined (alloca) || defined (_ALLOCA_H) +# define YYSTACK_ALLOC alloca +# else +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# else +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +# define YYSTACK_ALLOC malloc +# define YYSTACK_FREE free +# endif +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ + + +#if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + short yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAX) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined (__STDC__) || defined (__cplusplus) + typedef signed char yysigned_char; +#else + typedef short yysigned_char; +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 13 +#define YYLAST 106 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 18 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 25 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 59 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 95 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 268 + +#define YYTRANSLATE(X) \ + ((unsigned)(X) <= YYMAXUTOK ? yytranslate[X] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const unsigned char yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 3, 2, 4, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const unsigned char yyprhs[] = +{ + 0, 0, 3, 5, 7, 10, 12, 14, 19, 25, + 31, 38, 40, 43, 45, 47, 49, 51, 53, 57, + 61, 66, 68, 71, 74, 77, 79, 81, 85, 88, + 90, 96, 101, 106, 111, 115, 119, 122, 128, 133, + 137, 139, 142, 144, 147, 149, 152, 154, 157, 159, + 162, 164, 167, 169, 172, 174, 177, 179, 182, 184 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yysigned_char yyrhs[] = +{ + 19, 0, -1, 20, -1, 21, -1, 20, 21, -1, + 22, -1, 17, -1, 7, 39, 23, 40, -1, 7, + 35, 39, 23, 40, -1, 7, 34, 39, 23, 40, + -1, 7, 34, 35, 39, 23, 40, -1, 24, -1, + 23, 24, -1, 17, -1, 31, -1, 32, -1, 25, + -1, 26, -1, 10, 42, 38, -1, 11, 42, 38, + -1, 11, 39, 27, 40, -1, 28, -1, 27, 28, + -1, 42, 38, -1, 35, 36, -1, 35, -1, 36, + -1, 29, 6, 29, -1, 6, 29, -1, 29, -1, + 33, 34, 30, 37, 38, -1, 33, 30, 37, 38, + -1, 33, 34, 37, 38, -1, 33, 34, 30, 38, + -1, 33, 30, 38, -1, 33, 34, 38, -1, 33, + 38, -1, 41, 35, 35, 42, 38, -1, 41, 35, + 42, 38, -1, 41, 42, 38, -1, 8, -1, 8, + 16, -1, 12, -1, 12, 16, -1, 13, -1, 13, + 16, -1, 14, -1, 14, 16, -1, 15, -1, 15, + 16, -1, 5, -1, 5, 16, -1, 3, -1, 3, + 16, -1, 4, -1, 4, 16, -1, 9, -1, 9, + 16, -1, 34, -1, 42, 34, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const unsigned char yyrline[] = +{ + 0, 95, 95, 98, 99, 102, 103, 106, 108, 110, + 112, 116, 117, 120, 121, 122, 123, 124, 127, 131, + 133, 139, 140, 143, 147, 149, 151, 155, 157, 159, + 163, 165, 167, 170, 172, 174, 176, 180, 182, 184, + 188, 189, 192, 193, 196, 197, 200, 201, 204, 205, + 208, 209, 212, 213, 216, 217, 220, 221, 224, 225 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE +/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "'{'", "'}'", "';'", "'/'", "T_VIRTUAL", + "T_DISPLAY", "T_WALL", "T_OPTION", "T_PARAM", "T_STRING", "T_DIMENSION", + "T_OFFSET", "T_ORIGIN", "T_COMMENT", "T_LINE_COMMENT", "$accept", + "Program", "EntryList", "Entry", "Virtual", "SubList", "Sub", + "OptionEntry", "ParamEntry", "ParamList", "Param", "PartialDim", + "FullDim", "DisplayEntry", "WallEntry", "Display", "Name", "Dimension", + "Offset", "Origin", "Terminal", "Open", "Close", "Wall", "NameList", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const unsigned short yytoknum[] = +{ + 0, 256, 257, 123, 125, 59, 47, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const unsigned char yyr1[] = +{ + 0, 18, 19, 20, 20, 21, 21, 22, 22, 22, + 22, 23, 23, 24, 24, 24, 24, 24, 25, 26, + 26, 27, 27, 28, 29, 29, 29, 30, 30, 30, + 31, 31, 31, 31, 31, 31, 31, 32, 32, 32, + 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, + 38, 38, 39, 39, 40, 40, 41, 41, 42, 42 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const unsigned char yyr2[] = +{ + 0, 2, 1, 1, 2, 1, 1, 4, 5, 5, + 6, 1, 2, 1, 1, 1, 1, 1, 3, 3, + 4, 1, 2, 2, 2, 1, 1, 3, 2, 1, + 5, 4, 4, 4, 3, 3, 2, 5, 4, 3, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const unsigned char yydefact[] = +{ + 0, 0, 6, 0, 2, 3, 5, 52, 42, 44, + 0, 0, 0, 1, 4, 53, 43, 45, 0, 0, + 0, 40, 56, 0, 0, 13, 0, 11, 16, 17, + 14, 15, 0, 0, 0, 0, 0, 41, 57, 58, + 0, 0, 0, 54, 12, 7, 50, 0, 46, 29, + 0, 0, 25, 26, 36, 0, 0, 0, 9, 8, + 59, 18, 0, 21, 0, 19, 55, 51, 28, 47, + 0, 48, 0, 34, 0, 0, 35, 24, 0, 0, + 39, 10, 22, 20, 23, 27, 49, 31, 0, 33, + 32, 0, 38, 30, 37 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yysigned_char yydefgoto[] = +{ + -1, 3, 4, 5, 6, 26, 27, 28, 29, 62, + 63, 49, 50, 30, 31, 32, 39, 52, 53, 72, + 54, 12, 45, 33, 64 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -32 +static const yysigned_char yypact[] = +{ + -3, 41, -32, 22, -3, -32, -32, 12, 35, 46, + 5, 62, 75, -32, -32, -32, -32, -32, 62, 75, + 75, 51, 54, 59, 18, -32, 65, -32, -32, -32, + -32, -32, 88, 37, 75, 65, 65, -32, -32, -32, + 86, 59, 86, 61, -32, -32, 79, -4, 80, 28, + 31, 74, 67, -32, -32, 37, 86, 65, -32, -32, + -32, -32, 56, -32, 86, -32, -32, -32, -32, -32, + -4, 81, 94, -32, 31, 94, -32, -32, 59, 86, + -32, -32, -32, -32, -32, -32, -32, -32, 94, -32, + -32, 86, -32, -32, -32 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yysigned_char yypgoto[] = +{ + -32, -32, -32, 99, -32, 6, -19, -32, -32, -32, + 42, -28, 55, -32, -32, -32, -1, 2, 53, -31, + -27, 48, -30, -32, -22 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, parse error. */ +#define YYTABLE_NINF -1 +static const unsigned char yytable[] = +{ + 10, 40, 42, 11, 1, 58, 59, 44, 7, 9, + 48, 56, 18, 61, 2, 65, 44, 44, 9, 68, + 75, 7, 13, 73, 76, 35, 36, 81, 15, 80, + 8, 51, 83, 79, 70, 55, 46, 84, 44, 60, + 57, 60, 85, 88, 7, 87, 71, 89, 90, 8, + 9, 16, 92, 8, 9, 60, 91, 78, 19, 20, + 43, 93, 17, 60, 94, 7, 34, 37, 8, 43, + 38, 8, 41, 21, 22, 23, 24, 66, 60, 46, + 47, 48, 25, 21, 22, 23, 24, 9, 48, 71, + 60, 46, 25, 46, 47, 67, 69, 86, 8, 46, + 8, 9, 48, 14, 82, 77, 74 +}; + +static const unsigned char yycheck[] = +{ + 1, 23, 24, 1, 7, 35, 36, 26, 3, 13, + 14, 33, 10, 40, 17, 42, 35, 36, 13, 47, + 51, 3, 0, 50, 51, 19, 20, 57, 16, 56, + 12, 32, 62, 55, 6, 33, 5, 64, 57, 40, + 34, 42, 70, 74, 3, 72, 15, 74, 75, 12, + 13, 16, 79, 12, 13, 56, 78, 55, 10, 11, + 4, 88, 16, 64, 91, 3, 18, 16, 12, 4, + 16, 12, 24, 8, 9, 10, 11, 16, 79, 5, + 6, 14, 17, 8, 9, 10, 11, 13, 14, 15, + 91, 5, 17, 5, 6, 16, 16, 16, 12, 5, + 12, 13, 14, 4, 62, 52, 51 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const unsigned char yystos[] = +{ + 0, 7, 17, 19, 20, 21, 22, 3, 12, 13, + 34, 35, 39, 0, 21, 16, 16, 16, 35, 39, + 39, 8, 9, 10, 11, 17, 23, 24, 25, 26, + 31, 32, 33, 41, 39, 23, 23, 16, 16, 34, + 42, 39, 42, 4, 24, 40, 5, 6, 14, 29, + 30, 34, 35, 36, 38, 35, 42, 23, 40, 40, + 34, 38, 27, 28, 42, 38, 16, 16, 29, 16, + 6, 15, 37, 38, 30, 37, 38, 36, 35, 42, + 38, 40, 28, 40, 38, 29, 16, 38, 37, 38, + 38, 42, 38, 38, 38 +}; + +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) +# define YYSIZE_T __SIZE_TYPE__ +#endif +#if ! defined (YYSIZE_T) && defined (size_t) +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +#endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int +#endif + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY -2 +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrlab1 + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yychar1 = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror ("syntax error: cannot back up"); \ + YYERROR; \ + } \ +while (0) + +#define YYTERROR 1 +#define YYERRCODE 256 + +/* YYLLOC_DEFAULT -- Compute the default location (before the actions + are run). */ + +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + Current.first_line = Rhs[1].first_line; \ + Current.first_column = Rhs[1].first_column; \ + Current.last_line = Rhs[N].last_line; \ + Current.last_column = Rhs[N].last_column; +#endif + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#define YYLEX yylex () + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) +# define YYDSYMPRINT(Args) \ +do { \ + if (yydebug) \ + yysymprint Args; \ +} while (0) +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YYDSYMPRINT(Args) +#endif /* !YYDEBUG */ + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#if YYMAXDEPTH == 0 +# undef YYMAXDEPTH +#endif + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined (__GLIBC__) && defined (_STRING_H) +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +# if defined (__STDC__) || defined (__cplusplus) +yystrlen (const char *yystr) +# else +yystrlen (yystr) + const char *yystr; +# endif +{ + register const char *yys = yystr; + + while (*yys++ != '\0') + continue; + + return yys - yystr - 1; +} +# endif +# endif + +# ifndef yystpcpy +# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +# if defined (__STDC__) || defined (__cplusplus) +yystpcpy (char *yydest, const char *yysrc) +# else +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +# endif +{ + register char *yyd = yydest; + register const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +#endif /* !YYERROR_VERBOSE */ + + + +#if YYDEBUG +/*-----------------------------. +| Print this symbol on YYOUT. | +`-----------------------------*/ + +static void +#if defined (__STDC__) || defined (__cplusplus) +yysymprint (FILE* yyout, int yytype, YYSTYPE yyvalue) +#else +yysymprint (yyout, yytype, yyvalue) + FILE* yyout; + int yytype; + YYSTYPE yyvalue; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvalue; + + if (yytype < YYNTOKENS) + { + YYFPRINTF (yyout, "token %s (", yytname[yytype]); +# ifdef YYPRINT + YYPRINT (yyout, yytoknum[yytype], yyvalue); +# endif + } + else + YYFPRINTF (yyout, "nterm %s (", yytname[yytype]); + + switch (yytype) + { + default: + break; + } + YYFPRINTF (yyout, ")"); +} +#endif /* YYDEBUG. */ + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +static void +#if defined (__STDC__) || defined (__cplusplus) +yydestruct (int yytype, YYSTYPE yyvalue) +#else +yydestruct (yytype, yyvalue) + int yytype; + YYSTYPE yyvalue; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvalue; + + switch (yytype) + { + default: + break; + } +} + + + +/* The user can define YYPARSE_PARAM as the name of an argument to be passed + into yyparse. The argument should have type void *. + It should actually point to an object. + Grammar actions can access the variable by casting it + to the proper pointer type. */ + +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM +# define YYPARSE_PARAM_DECL +# else +# define YYPARSE_PARAM_ARG YYPARSE_PARAM +# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; +# endif +#else /* !YYPARSE_PARAM */ +# define YYPARSE_PARAM_ARG +# define YYPARSE_PARAM_DECL +#endif /* !YYPARSE_PARAM */ + +/* Prevent warning if -Wstrict-prototypes. */ +#ifdef __GNUC__ +# ifdef YYPARSE_PARAM +int yyparse (void *); +# else +int yyparse (void); +# endif +#endif + + +/* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; + +/* Number of parse errors so far. */ +int yynerrs; + + +int +yyparse (YYPARSE_PARAM_ARG) + YYPARSE_PARAM_DECL +{ + + register int yystate; + register int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Lookahead token as an internal (translated) token number. */ + int yychar1 = 0; + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + short yyssa[YYINITDEPTH]; + short *yyss = yyssa; + register short *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + register YYSTYPE *yyvsp; + + + +#define YYPOPSTACK (yyvsp--, yyssp--) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* When reducing, the number of symbols on the RHS of the reduced + rule. */ + int yylen; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. so pushing a state here evens the stacks. + */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyssp >= yyss + yystacksize - 1) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + short *yyss1 = yyss; + + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow ("parser stack overflow", + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyoverflowlab; +# else + /* Extend the stack our own way. */ + if (yystacksize >= YYMAXDEPTH) + goto yyoverflowlab; + yystacksize *= 2; + if (yystacksize > YYMAXDEPTH) + yystacksize = YYMAXDEPTH; + + { + short *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyoverflowlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyssp >= yyss + yystacksize - 1) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + +/* Do appropriate processing given the current state. */ +/* Read a lookahead token if we need one and don't already have one. */ +/* yyresume: */ + + /* First try to decide what to do without reference to lookahead token. */ + + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* yychar is either YYEMPTY or YYEOF + or a valid token in external form. */ + + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + /* Convert token to internal form (in yychar1) for indexing tables with. */ + + if (yychar <= 0) /* This means end of input. */ + { + yychar1 = 0; + yychar = YYEOF; /* Don't call YYLEX any more. */ + + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yychar1 = YYTRANSLATE (yychar); + + /* We have to keep this `#if YYDEBUG', since we use variables + which are defined only if `YYDEBUG' is set. */ + YYDPRINTF ((stderr, "Next token is ")); + YYDSYMPRINT ((stderr, yychar1, yylval)); + YYDPRINTF ((stderr, "\n")); + } + + /* If the proper action on seeing token YYCHAR1 is to reduce or to + detect an error, take that action. */ + yyn += yychar1; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yychar1) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Shift the lookahead token. */ + YYDPRINTF ((stderr, "Shifting token %d (%s), ", + yychar, yytname[yychar1])); + + /* Discard the token being shifted unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + *++yyvsp = yylval; + + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + yystate = yyn; + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + +#if YYDEBUG + /* We have to keep this `#if YYDEBUG', since we use variables which + are defined only if `YYDEBUG' is set. */ + if (yydebug) + { + int yyi; + + YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", + yyn - 1, yyrline[yyn]); + + /* Print the symbols being reduced, and their result. */ + for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++) + YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); + YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); + } +#endif + switch (yyn) + { + case 2: +#line 95 "parser.y" + { dmxConfigEntry = yyvsp[0].entry; } + break; + + case 4: +#line 99 "parser.y" + { APPEND(DMXConfigEntryPtr,yyvsp[-1].entry,yyvsp[0].entry); yyval.entry = yyvsp[-1].entry; } + break; + + case 5: +#line 102 "parser.y" + { yyval.entry = dmxConfigEntryVirtual(yyvsp[0].virtual); } + break; + + case 6: +#line 103 "parser.y" + { yyval.entry = dmxConfigEntryComment(yyvsp[0].comment); } + break; + + case 7: +#line 107 "parser.y" + { yyval.virtual = dmxConfigCreateVirtual(yyvsp[-3].token, NULL, NULL, yyvsp[-2].token, yyvsp[-1].subentry, yyvsp[0].token); } + break; + + case 8: +#line 109 "parser.y" + { yyval.virtual = dmxConfigCreateVirtual(yyvsp[-4].token, NULL, yyvsp[-3].pair, yyvsp[-2].token, yyvsp[-1].subentry, yyvsp[0].token); } + break; + + case 9: +#line 111 "parser.y" + { yyval.virtual = dmxConfigCreateVirtual(yyvsp[-4].token, yyvsp[-3].string, NULL, yyvsp[-2].token, yyvsp[-1].subentry, yyvsp[0].token); } + break; + + case 10: +#line 113 "parser.y" + { yyval.virtual = dmxConfigCreateVirtual(yyvsp[-5].token, yyvsp[-4].string, yyvsp[-3].pair, yyvsp[-2].token, yyvsp[-1].subentry, yyvsp[0].token ); } + break; + + case 12: +#line 117 "parser.y" + { APPEND(DMXConfigSubPtr,yyvsp[-1].subentry,yyvsp[0].subentry); yyval.subentry = yyvsp[-1].subentry; } + break; + + case 13: +#line 120 "parser.y" + { yyval.subentry = dmxConfigSubComment(yyvsp[0].comment); } + break; + + case 14: +#line 121 "parser.y" + { yyval.subentry = dmxConfigSubDisplay(yyvsp[0].display); } + break; + + case 15: +#line 122 "parser.y" + { yyval.subentry = dmxConfigSubWall(yyvsp[0].wall); } + break; + + case 16: +#line 123 "parser.y" + { yyval.subentry = dmxConfigSubOption(yyvsp[0].option); } + break; + + case 17: +#line 124 "parser.y" + { yyval.subentry = dmxConfigSubParam(yyvsp[0].param); } + break; + + case 18: +#line 128 "parser.y" + { yyval.option = dmxConfigCreateOption(yyvsp[-2].token, yyvsp[-1].string, yyvsp[0].token); } + break; + + case 19: +#line 132 "parser.y" + { yyval.param = dmxConfigCreateParam(yyvsp[-2].token, NULL, yyvsp[-1].string, NULL, yyvsp[0].token); } + break; + + case 20: +#line 134 "parser.y" + { yyval.param = dmxConfigCreateParam(yyvsp[-3].token, yyvsp[-2].token, NULL, yyvsp[0].token, NULL); + yyval.param->next = yyvsp[-1].param; + } + break; + + case 22: +#line 140 "parser.y" + { APPEND(DMXConfigParamPtr,yyvsp[-1].param,yyvsp[0].param); yyval.param = yyvsp[-1].param; } + break; + + case 23: +#line 144 "parser.y" + { yyval.param = dmxConfigCreateParam(NULL, NULL, yyvsp[-1].string, NULL, yyvsp[0].token); } + break; + + case 24: +#line 148 "parser.y" + { yyval.pdim = dmxConfigCreatePartDim(yyvsp[-1].pair, yyvsp[0].pair); } + break; + + case 25: +#line 150 "parser.y" + { yyval.pdim = dmxConfigCreatePartDim(yyvsp[0].pair, NULL); } + break; + + case 26: +#line 152 "parser.y" + { yyval.pdim = dmxConfigCreatePartDim(NULL, yyvsp[0].pair); } + break; + + case 27: +#line 156 "parser.y" + { yyval.fdim = dmxConfigCreateFullDim(yyvsp[-2].pdim, yyvsp[0].pdim); } + break; + + case 28: +#line 158 "parser.y" + { yyval.fdim = dmxConfigCreateFullDim(NULL, yyvsp[0].pdim); } + break; + + case 29: +#line 160 "parser.y" + { yyval.fdim = dmxConfigCreateFullDim(yyvsp[0].pdim, NULL); } + break; + + case 30: +#line 164 "parser.y" + { yyval.display = dmxConfigCreateDisplay(yyvsp[-4].token, yyvsp[-3].string, yyvsp[-2].fdim, yyvsp[-1].pair, yyvsp[0].token); } + break; + + case 31: +#line 166 "parser.y" + { yyval.display = dmxConfigCreateDisplay(yyvsp[-3].token, NULL, yyvsp[-2].fdim, yyvsp[-1].pair, yyvsp[0].token); } + break; + + case 32: +#line 168 "parser.y" + { yyval.display = dmxConfigCreateDisplay(yyvsp[-3].token, yyvsp[-2].string, NULL, yyvsp[-1].pair, yyvsp[0].token); } + break; + + case 33: +#line 171 "parser.y" + { yyval.display = dmxConfigCreateDisplay(yyvsp[-3].token, yyvsp[-2].string, yyvsp[-1].fdim, NULL, yyvsp[0].token); } + break; + + case 34: +#line 173 "parser.y" + { yyval.display = dmxConfigCreateDisplay(yyvsp[-2].token, NULL, yyvsp[-1].fdim, NULL, yyvsp[0].token); } + break; + + case 35: +#line 175 "parser.y" + { yyval.display = dmxConfigCreateDisplay(yyvsp[-2].token, yyvsp[-1].string, NULL, NULL, yyvsp[0].token); } + break; + + case 36: +#line 177 "parser.y" + { yyval.display = dmxConfigCreateDisplay(yyvsp[-1].token, NULL, NULL, NULL, yyvsp[0].token); } + break; + + case 37: +#line 181 "parser.y" + { yyval.wall = dmxConfigCreateWall(yyvsp[-4].token, yyvsp[-3].pair, yyvsp[-2].pair, yyvsp[-1].string, yyvsp[0].token); } + break; + + case 38: +#line 183 "parser.y" + { yyval.wall = dmxConfigCreateWall(yyvsp[-3].token, yyvsp[-2].pair, NULL, yyvsp[-1].string, yyvsp[0].token); } + break; + + case 39: +#line 185 "parser.y" + { yyval.wall = dmxConfigCreateWall(yyvsp[-2].token, NULL, NULL, yyvsp[-1].string, yyvsp[0].token); } + break; + + case 41: +#line 189 "parser.y" + { yyval.token = yyvsp[-1].token; yyval.token->comment = yyvsp[0].comment->comment; } + break; + + case 43: +#line 193 "parser.y" + { yyval.string = yyvsp[-1].string; yyval.string->comment = yyvsp[0].comment->comment; } + break; + + case 45: +#line 197 "parser.y" + { yyval.pair = yyvsp[-1].pair; yyval.pair->comment = yyvsp[0].comment->comment; } + break; + + case 47: +#line 201 "parser.y" + { yyval.pair = yyvsp[-1].pair; yyval.pair->comment = yyvsp[0].comment->comment; } + break; + + case 49: +#line 205 "parser.y" + { yyval.pair = yyvsp[-1].pair; yyval.pair->comment = yyvsp[0].comment->comment; } + break; + + case 51: +#line 209 "parser.y" + { yyval.token = yyvsp[-1].token; yyval.token->comment = yyvsp[0].comment->comment; } + break; + + case 53: +#line 213 "parser.y" + { yyval.token = yyvsp[-1].token; yyval.token->comment = yyvsp[0].comment->comment; } + break; + + case 55: +#line 217 "parser.y" + { yyval.token = yyvsp[-1].token; yyval.token->comment = yyvsp[0].comment->comment; } + break; + + case 57: +#line 221 "parser.y" + { yyval.token = yyvsp[-1].token; yyval.token->comment = yyvsp[0].comment->comment; } + break; + + case 59: +#line 225 "parser.y" + { APPEND(DMXConfigStringPtr, yyvsp[-1].string, yyvsp[0].string); yyval.string = yyvsp[-1].string; } + break; + + + } + +/* Line 1016 of /usr/local/share/bison/yacc.c. */ +#line 1281 "parser.c" + + yyvsp -= yylen; + yyssp -= yylen; + + +#if YYDEBUG + if (yydebug) + { + short *yyssp1 = yyss - 1; + YYFPRINTF (stderr, "state stack now"); + while (yyssp1 != yyssp) + YYFPRINTF (stderr, " %d", *++yyssp1); + YYFPRINTF (stderr, "\n"); + } +#endif + + *++yyvsp = yyval; + + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (YYPACT_NINF < yyn && yyn < YYLAST) + { + YYSIZE_T yysize = 0; + int yytype = YYTRANSLATE (yychar); + char *yymsg; + int yyx, yycount; + + yycount = 0; + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + for (yyx = yyn < 0 ? -yyn : 0; + yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + yysize += yystrlen (yytname[yyx]) + 15, yycount++; + yysize += yystrlen ("parse error, unexpected ") + 1; + yysize += yystrlen (yytname[yytype]); + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg != 0) + { + char *yyp = yystpcpy (yymsg, "parse error, unexpected "); + yyp = yystpcpy (yyp, yytname[yytype]); + + if (yycount < 5) + { + yycount = 0; + for (yyx = yyn < 0 ? -yyn : 0; + yyx < (int) (sizeof (yytname) / sizeof (char *)); + yyx++) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + const char *yyq = ! yycount ? ", expecting " : " or "; + yyp = yystpcpy (yyp, yyq); + yyp = yystpcpy (yyp, yytname[yyx]); + yycount++; + } + } + yyerror (yymsg); + YYSTACK_FREE (yymsg); + } + else + yyerror ("parse error; also virtual memory exhausted"); + } + else +#endif /* YYERROR_VERBOSE */ + yyerror ("parse error"); + } + goto yyerrlab1; + + +/*----------------------------------------------------. +| yyerrlab1 -- error raised explicitly by an action. | +`----------------------------------------------------*/ +yyerrlab1: + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + /* Return failure if at end of input. */ + if (yychar == YYEOF) + { + /* Pop the error token. */ + YYPOPSTACK; + /* Pop the rest of the stack. */ + while (yyssp > yyss) + { + YYDPRINTF ((stderr, "Error: popping ")); + YYDSYMPRINT ((stderr, + yystos[*yyssp], + *yyvsp)); + YYDPRINTF ((stderr, "\n")); + yydestruct (yystos[*yyssp], *yyvsp); + YYPOPSTACK; + } + YYABORT; + } + + YYDPRINTF ((stderr, "Discarding token %d (%s).\n", + yychar, yytname[yychar1])); + yydestruct (yychar1, yylval); + yychar = YYEMPTY; + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + YYDPRINTF ((stderr, "Error: popping ")); + YYDSYMPRINT ((stderr, + yystos[*yyssp], *yyvsp)); + YYDPRINTF ((stderr, "\n")); + + yydestruct (yystos[yystate], *yyvsp); + yyvsp--; + yystate = *--yyssp; + + +#if YYDEBUG + if (yydebug) + { + short *yyssp1 = yyss - 1; + YYFPRINTF (stderr, "Error: state stack now"); + while (yyssp1 != yyssp) + YYFPRINTF (stderr, " %d", *++yyssp1); + YYFPRINTF (stderr, "\n"); + } +#endif + } + + if (yyn == YYFINAL) + YYACCEPT; + + YYDPRINTF ((stderr, "Shifting error token, ")); + + *++yyvsp = yylval; + + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*----------------------------------------------. +| yyoverflowlab -- parser overflow comes here. | +`----------------------------------------------*/ +yyoverflowlab: + yyerror ("parser stack overflow"); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif + return yyresult; +} + + +#line 95 "parser.y" + diff --git a/xorg-server-1.4/hw/dmx/config/parser.h b/xorg-server-1.4/hw/dmx/config/parser.h new file mode 100644 index 0000000..0e90f06 --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/parser.h @@ -0,0 +1,90 @@ +/* A Bison parser, made from /home/anholt/xserver-stable/hw/dmx/config/parser.y, by GNU bison 1.75. */ + +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. + + 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, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +#ifndef BISON_PARSER_H +# define BISON_PARSER_H + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + T_VIRTUAL = 258, + T_DISPLAY = 259, + T_WALL = 260, + T_OPTION = 261, + T_PARAM = 262, + T_STRING = 263, + T_DIMENSION = 264, + T_OFFSET = 265, + T_ORIGIN = 266, + T_COMMENT = 267, + T_LINE_COMMENT = 268 + }; +#endif +#define T_VIRTUAL 258 +#define T_DISPLAY 259 +#define T_WALL 260 +#define T_OPTION 261 +#define T_PARAM 262 +#define T_STRING 263 +#define T_DIMENSION 264 +#define T_OFFSET 265 +#define T_ORIGIN 266 +#define T_COMMENT 267 +#define T_LINE_COMMENT 268 + + + + +#ifndef YYSTYPE +#line 56 "parser.y" +typedef union { + DMXConfigTokenPtr token; + DMXConfigStringPtr string; + DMXConfigNumberPtr number; + DMXConfigPairPtr pair; + DMXConfigFullDimPtr fdim; + DMXConfigPartDimPtr pdim; + DMXConfigDisplayPtr display; + DMXConfigWallPtr wall; + DMXConfigOptionPtr option; + DMXConfigParamPtr param; + DMXConfigCommentPtr comment; + DMXConfigSubPtr subentry; + DMXConfigVirtualPtr virtual; + DMXConfigEntryPtr entry; +} yystype; +/* Line 1237 of /usr/local/share/bison/yacc.c. */ +#line 83 "parser.h" +# define YYSTYPE yystype +#endif + +extern YYSTYPE yylval; + + +#endif /* not BISON_PARSER_H */ + diff --git a/xorg-server-1.4/hw/dmx/config/parser.y b/xorg-server-1.4/hw/dmx/config/parser.y new file mode 100644 index 0000000..ac24410 --- /dev/null +++ b/xorg-server-1.4/hw/dmx/config/parser.y @@ -0,0 +1,226 @@ +/* $XFree86$ */ +/* + * Copyright 2002-2003 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 + * + */ + +%{ +#ifdef HAVE_DMX_CONFIG_H +#include +#endif + +#include "dmxparse.h" +#include +#include +#define YYDEBUG 1 +#define YYERROR_VERBOSE +#define YY_USE_PROTOS + +DMXConfigEntryPtr dmxConfigEntry = NULL; +#define APPEND(type, h, t) \ +{ \ + type pt; \ + for (pt = h; pt->next; pt = pt->next); \ + pt->next = t; \ +} +%} + +%union { + DMXConfigTokenPtr token; + DMXConfigStringPtr string; + DMXConfigNumberPtr number; + DMXConfigPairPtr pair; + DMXConfigFullDimPtr fdim; + DMXConfigPartDimPtr pdim; + DMXConfigDisplayPtr display; + DMXConfigWallPtr wall; + DMXConfigOptionPtr option; + DMXConfigParamPtr param; + DMXConfigCommentPtr comment; + DMXConfigSubPtr subentry; + DMXConfigVirtualPtr virtual; + DMXConfigEntryPtr entry; +} + + /* Terminals */ +%token '{' '}' ';' '/' T_VIRTUAL T_DISPLAY T_WALL T_OPTION T_PARAM +%token T_STRING +%token T_DIMENSION T_OFFSET T_ORIGIN +%token T_COMMENT T_LINE_COMMENT + + /* Non-termials */ +%type Display Wall Terminal Open Close +%type NameList Name +%type Dimension Offset Origin +%type PartialDim +%type FullDim +%type DisplayEntry +%type